diff --git a/src/components/Template/CustomTable.vue b/src/components/Template/CustomTable.vue index cd6c26d..66501e5 100644 --- a/src/components/Template/CustomTable.vue +++ b/src/components/Template/CustomTable.vue @@ -507,7 +507,7 @@ export default { getOperationColumns() { return { columnsData: this.columns, headerSelectFields: this.headerSelectFields,fieldItemLabel: this.fieldItemLabel } }, - //获取其他下拉框的配制 + //获取其他下拉框的配置 getOtherItem(sItem) { return { label: sItem.otherLabel ? this.$t(sItem.otherLabel) : this.$t("template.common.other"), @@ -869,6 +869,9 @@ export default { if (type === "select") { this.$emit('bodySelectChange', { rowIndex, item: row, colIndex, value, key: col.prop, dataSource: this.localDataSource, headerSelectFields: this.headerSelectFields }); } + if (type === "checkboxTree") { + this.$emit('bodyTreeChange', { rowIndex, colIndex, value, row, type }); + } }, // 表体子值变化 onBodySubValueChange(rowIndex, colIndex, value, row, type) { @@ -936,7 +939,7 @@ export default { // 优先从行数据中获取动态label(如jzbh1Label) item.checkboxLabel = currentItem[dynamicLabelKey]; } else if (col.checkboxLabel !== undefined && col.checkboxLabel !== '') { - // 否则使用列配制的checkboxLabel + // 否则使用列配置的checkboxLabel item.checkboxLabel = this.$t(col.checkboxLabel); } if (col.bodyType === "operableInput" ) { @@ -1151,7 +1154,7 @@ export default { onBlur(rowIndex, colKey) { const value = this.localDataSource[rowIndex][colKey]; - // 查找对应的列配制 + // 查找对应的列配置 const col = this.columns.find(c => c.prop === colKey); if (col && col.bodyFillType === "actFill" && col.compareTo) { const compareToValue = this.localDataSource[rowIndex][col.compareTo]; @@ -1168,7 +1171,7 @@ export default { this.$emit("blur", { rowIndex, colKey, value, dataSource: this.localDataSource, headerSelectFields: this.headerSelectFields, item: this.localDataSource[rowIndex] }); }, onSubBlur(rowIndex, colKey, value) { - // 查找对应的列配制 + // 查找对应的列配置 const col = this.columns.find(c => c.bodySubKey === colKey); if (col && col.bodySubFillType === "actFill" && col.bodySubCompareTo) { const compareToValue = this.localDataSource[rowIndex][col.bodySubCompareTo]; diff --git a/src/views/business/comps/template/comps/bl/BL001.vue b/src/views/business/comps/template/comps/bl/BL001.vue index ee582e8..6155206 100644 --- a/src/views/business/comps/template/comps/bl/BL001.vue +++ b/src/views/business/comps/template/comps/bl/BL001.vue @@ -40,6 +40,7 @@ { + // if(!item?.ypmcTa){ + // this.$refs.ypyjTableRef.updateDataSourceByRowIndex(index, {yps:0}) + // }else{ + // let checkTree = item?.ypmcTa?.checkedValues?.filter(i=>i.checked) + // this.$refs.ypyjTableRef.updateDataSourceByRowIndex(index, {yps:checkTree.length}) + // } + // }) const firstList = stepTableFormData_1 .filter(item => item && item.ypmc && item.ypmc.trim()) // 严格过滤空值 .map(item => ({ @@ -378,8 +388,10 @@ export default { }) }, //样品名称选择 - changeTree(rowIndex, colIndex, value, row, type){ - console.log(rowIndex, colIndex, value, row, type,9999) + changeTree(data){ + let { rowIndex , value , row } = data + let checkTree = value?.checkedValues?.filter(i=>i.checked) + this.$refs.ypyjTableRef.updateDataSourceByRowIndex(rowIndex, {yps:checkTree?.length}) }, } } diff --git a/src/views/business/comps/template/comps/dj/DJ002.vue b/src/views/business/comps/template/comps/dj/DJ002.vue index b75dd47..d9feb58 100644 --- a/src/views/business/comps/template/comps/dj/DJ002.vue +++ b/src/views/business/comps/template/comps/dj/DJ002.vue @@ -43,6 +43,7 @@ fieldItemLabel="template.dj.dj003.ypyjxx" :columns="ypyjColumns" :ref="'ypyjTableRef'" + @clickButton="handleClickButton" :showOperation="fillType === 'actFill'" :showAddRow="fillType === 'actFill'" :formData="formData" @@ -242,7 +243,13 @@ export default { { label: 'template.dj.dj003.cysj', prop: "cysj", - bodyType: 'dateTime', + bodyType: 'input', + bodySubType: 'button', + bodySubButtonName: 'template.dl.dl018.ksButton', + bodySubKey: 'cysjButton', + bodySubyDisabled: this.fillType !== 'actFill', + bodyDisabled: true, + bodySubFillType: 'actFill', bodyFillType: 'actFill' }, { @@ -277,6 +284,8 @@ export default { maxlength: 200, subType: 'button', subKey: 'yjsjButton', + disabled:true, + subDisabled: this.fillType !== 'actFill', buttonName: 'template.dj.dj003.hqsj', }, dsfs: { @@ -333,11 +342,15 @@ export default { }, // 点击按钮 handleClickButton(_item, signData) { - this.$refs.yjczxxRef.updateFormData( - _item?.subKey?.replace("Button", ""), - moment().format('YYYY/MM/DD HH:mm'), - { isUpdateRecord: true, signData } - ) + if(_item === 'cysjButton'){ + this.$refs.ypyjTableRef.updateDataSourceByRowIndex(signData, {cysj:moment().format('YYYY/MM/DD HH:mm')}) + }else{ + this.$refs.yjczxxRef.updateFormData( + _item?.subKey?.replace("Button", ""), + moment().format('YYYY/MM/DD HH:mm'), + { isUpdateRecord: true, signData } + ) + } }, //获取表格数据并赋值 getTabletoCheck() { diff --git a/src/views/business/comps/template/comps/dj/DJ003.vue b/src/views/business/comps/template/comps/dj/DJ003.vue index 68ef185..701d2d8 100644 --- a/src/views/business/comps/template/comps/dj/DJ003.vue +++ b/src/views/business/comps/template/comps/dj/DJ003.vue @@ -21,6 +21,7 @@ fieldItemLabel="template.dj.dj003.ypyjxx" :columns="ypyjColumns" :ref="'ypyjTableRef'" + @clickButton="handleClickButton" :showOperation="fillType === 'actFill'" :showAddRow="fillType === 'actFill'" :formData="formData" @@ -198,7 +199,13 @@ export default { { label: 'template.dj.dj003.cysj', prop: "cysj", - bodyType: 'dateTime', + bodyType: 'input', + bodySubType: 'button', + bodySubButtonName: 'template.dl.dl018.ksButton', + bodySubKey: 'cysjButton', + bodySubyDisabled: this.fillType !== 'actFill', + bodyDisabled: true, + bodySubFillType: 'actFill', bodyFillType: 'actFill' }, { @@ -233,6 +240,8 @@ export default { maxlength: 200, subType: 'button', subKey: 'yjsjButton', + disabled:true, + subDisabled: this.fillType !== 'actFill', buttonName: 'template.dj.dj003.hqsj', }, dsfs: { @@ -285,12 +294,15 @@ export default { }, // 点击按钮 handleClickButton(_item, signData) { - this.$refs.yjczxxRef.updateFormData( - _item?.subKey?.replace("Button", ""), - moment().format('YYYY/MM/DD HH:mm'), - { isUpdateRecord: true, signData } - ) - + if(_item === 'cysjButton'){ + this.$refs.ypyjTableRef.updateDataSourceByRowIndex(signData, {cysj:moment().format('YYYY/MM/DD HH:mm')}) + }else{ + this.$refs.yjczxxRef.updateFormData( + _item?.subKey?.replace("Button", ""), + moment().format('YYYY/MM/DD HH:mm'), + { isUpdateRecord: true, signData } + ) + } }, } } diff --git a/src/views/business/comps/template/comps/dl/DL003.vue b/src/views/business/comps/template/comps/dl/DL003.vue index 6eea372..56417b4 100644 --- a/src/views/business/comps/template/comps/dl/DL003.vue +++ b/src/views/business/comps/template/comps/dl/DL003.vue @@ -225,6 +225,7 @@ export default { maxlength: 200, subType: 'button', subKey: 'jzkssjButton', + disabled: true, subDisabled: this.fillType !== 'actFill', buttonName: 'template.dl.dl003.ksButton', }, @@ -234,7 +235,9 @@ export default { fillType: 'actFill', maxlength: 200, subType: 'button', + disabled: true, subKey: 'jzjssjButton', + subDisabled: this.fillType !== 'actFill', buttonName: 'template.dl.dl003.jsButton', }, fssygbh: { @@ -273,6 +276,7 @@ export default { type: 'input', subType: 'button', subKey: 'pykssjButton', + subDisabled: this.fillType !== 'actFill', buttonName: 'template.dl.dl003.ksButton', }, diff --git a/src/views/business/comps/template/comps/dl/DL004.vue b/src/views/business/comps/template/comps/dl/DL004.vue index 3d8bf99..d644373 100644 --- a/src/views/business/comps/template/comps/dl/DL004.vue +++ b/src/views/business/comps/template/comps/dl/DL004.vue @@ -196,6 +196,8 @@ export default { fillType: 'actFill', maxlength: 200, subType: 'button', + disabled: true, + subDisabled: this.fillType !== 'actFill', subKey: 'pykssjButton', buttonName: 'template.dl.dl003.ksButton', }, @@ -205,6 +207,8 @@ export default { fillType: 'actFill', maxlength: 200, subType: 'button', + disabled: true, + subDisabled: this.fillType !== 'actFill', subKey: 'pyjssjButton', buttonName: 'template.dl.dl003.jsButton', },