15881625488@163.com 3 weeks ago
parent
commit
a574da8099
6 changed files with 119 additions and 10 deletions
  1. +3
    -3
      src/components/Template/CustomTable.vue
  2. +3
    -3
      src/components/Template/HandleFormItem.vue
  3. +101
    -0
      src/components/Template/StepComponents/JcbComp.vue
  4. +2
    -2
      src/components/Template/StepComponents/jcb/qb.vue
  5. +6
    -1
      src/components/Template/StepFormPackage.vue
  6. +4
    -1
      src/components/Template/mixins/stepMixins.js

+ 3
- 3
src/components/Template/CustomTable.vue View File

@ -527,9 +527,9 @@ export default {
},
//
handleClickable(col, rowIndex, colIndex, row) {
if (this.templateFillType !== 'actFill') {
return
}
// if (this.templateFillType !== 'actFill') {
// return
// }
this.$emit("clickable", col, rowIndex, row)
},
onBeforeReagentSubmit(data, callback, col, row) {

+ 3
- 3
src/components/Template/HandleFormItem.vue View File

@ -1378,9 +1378,9 @@ export default {
return commonInfo;
},
handleClickable(item, event) {
if (this.templateFillType !== 'actFill') {
return
}
// if (this.templateFillType !== 'actFill') {
// return
// }
this.$emit("clickable", item)
},
//

+ 101
- 0
src/components/Template/StepComponents/JcbComp.vue View File

@ -0,0 +1,101 @@
<template>
<div class="jcb-table-container">
<CustomTable :ref="`tableRef`" :columns="jcbColumns" :formData="formData" :prefixKey="prefixKey"
class="jcb-table"
operationWidth = "120px"
@clickable="handleClickable"
@clickButton = "handleClickButton"
fieldItemLabel="template.common.operationSteps" :showOperation="templateFillType === 'preFill'">
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow">
</TableOpertaionDelete>
</template>
</CustomTable>
</div>
</template>
<script>
import CustomTable from '../CustomTable.vue';
import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue"
export default {
inject: ['templateFillType'],
components: {
CustomTable,
TableOpertaionDelete,
},
name: 'JcbComp',
props: {
formData: {
type: Object,
default: () => { },
},
prefixKey: {
type: String,
default: '',
},
},
computed: {
jcbColumns() {
return [
{
label: '处理批',
prop: 'clp',
width: '200px',
bodyType:"clickable",
bodyKey:"clpClick",
bodyFillType:"preFill",
},
{
label: '时间',
prop: 'time',
width: '200px',
bodyType:"input",
bodyDisabled:true,
bodyFillType:"preFill",
bodySubType:"button",
bodySubButtonName:"取出",
bodySubKey:"timeClick",
bodySubFillType:"preFill",
},
]
},
},
methods: {
//
deleteRow(rowIndex) {
const tableRef = this.$refs['tableRef'];
if (tableRef) {
tableRef.deleteRow(rowIndex);
}
},
//
handleClickable(col, rowIndex, row) {
console.log(col, rowIndex, row,"rowIndex")
if (col.bodyKey === 'clpClick') {
console.log(col, rowIndex, row,"rowIndex")
// this.$refs['tableRef'].updateDataSourceByRowIndex(rowIndex, { clp: row.clp + '1' })
}
},
//
handleClickButton(col, rowIndex, row) {
console.log(col, rowIndex, row,"rowIndex")
if (col.bodySubKey === 'timeClick') {
console.log(col, rowIndex, row,"rowIndex")
// this.$refs['tableRef'].updateDataSourceByRowIndex(rowIndex, { time: row.time + '1' })
}
},
}
}
</script>
<style lang="scss">
.jcb-table-container{
width: 600px;
}
.jcb-table{
.custom-table-wrapper{
margin-top: 0;
}
}
</style>

+ 2
- 2
src/components/Template/StepComponents/jcb/qb.vue View File

@ -22,9 +22,9 @@ export default {
formConfig() {
let config = [{
config: {
text1: {
qb: {
label: "待处理。。。。",
type: "text",
type: "qb",
},
}
}]

+ 6
- 1
src/components/Template/StepFormPackage.vue View File

@ -53,6 +53,9 @@
@onSubPackageSubmit="onSubPackageSubmit(key) "
:stepIndex="stepIndex" :prefixKey="prefixKey+'_'+index" @update="(data)=>onSubPackageUpdate(data,key)" :subData = "formFields[key]" :ref="'zlSubPackageRef_'+key" />
</template>
<template v-else-if="sItem.type === 'qb'">
<JcbComp ref="jcbCompRef" :stepIndex="stepIndex" :prefixKey="prefixKey+'_'+index" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
</template>
<div v-show="isShowOther(formFields[key])" class="flex flex1">
<div class="other-title">{{sItem.otherLabel ? $t(sItem.otherLabel) : $t("template.common.other") }}</div>
@ -70,6 +73,7 @@
<script>
import HandleFormItem from '@/components/Template/HandleFormItem.vue'
import formPackageMixins from '@/components/Template/mixins/formPackageMixins.js'
import JcbComp from '@/components/Template/StepComponents/JcbComp.vue'
import ZLSubPackage from '@/components/Template/StepComponents/ZLSubPackage.vue'
import { isShowOther } from "@/utils/formPackageCommon.js";
import { EventBus } from "@/utils/eventBus";
@ -79,7 +83,8 @@ export default {
inject: ['templateFillType','templateData'],
components: {
HandleFormItem,
ZLSubPackage
ZLSubPackage,
JcbComp,
},
mixins: [formPackageMixins],
props: {

+ 4
- 1
src/components/Template/mixins/stepMixins.js View File

@ -2,7 +2,10 @@ import { getuuid, justUpdateFilledFormData } from '@/utils/index.js'
import { EventBus } from '@/utils/eventBus'
import { getLatestSn, getLatestSnArr } from '@/api/template'
export default {
inject: ['templateFillType', 'getMybh'],
inject: {
templateFillType: { default: 'preFill' },
getMybh: { default: () => null }
},
dicts: [
'business_tjdw',
'business_czhj',

Loading…
Cancel
Save