From c0cab1eb814346db67b3387d5da153fe7ca07d3a Mon Sep 17 00:00:00 2001 From: "15881625488@163.com" <15881625488@163.com> Date: Fri, 6 Mar 2026 15:53:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:[=E6=A8=A1=E6=9D=BF=E7=AE=A1=E7=90=86]?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/comps/template/comps/gsp/GSP005.vue | 32 +++++++++++++--------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/src/views/business/comps/template/comps/gsp/GSP005.vue b/src/views/business/comps/template/comps/gsp/GSP005.vue index 3309ebc..ec1997a 100644 --- a/src/views/business/comps/template/comps/gsp/GSP005.vue +++ b/src/views/business/comps/template/comps/gsp/GSP005.vue @@ -617,49 +617,55 @@ export default { // 溶液 onTableBeforeReagentRySubmit(data, zlIndex, formZlConfig) { const { selectData, callback, key, formFields } = data; + debugger //源溶剂编号/批号 - if (key === "yrybhphSub" && !isCommonUnit(selectData.row.kcdw, [formFields.yrysjtjUnit])) { - callback.prevent('库存单位与预制不符,请重新选择或申请废止并重新预制。'); + if (key === "yrybhphSub" && !isCommonUnit(selectData.row.nddw, [formFields.yrysjndUnit])) { + callback.prevent('浓度单位与预制不符,请重新选择或申请废止并重新预制。'); } //溶剂编号/批号 - if (key === "rjbhphSub" && !isCommonUnit(selectData.row.kcdw, [formFields.rjsjtjUnit])) { - callback.prevent('库存单位与预制不符,请重新选择或申请废止并重新预制。'); + if (key === "rjbhphSub" && !isCommonUnit(selectData.row.nddw, [formFields.rjsjndUnit])) { + callback.prevent('浓度单位与预制不符,请重新选择或申请废止并重新预制。'); } }, onTableRegentRySubmit(zlIndex, data) { if (data.key === 'yrybhphSub') { this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('yrybhphSubType', data.selectInfo.selectType) this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('yrybhphSubKcdw', data.selectInfo.row.kcdw) - this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('yrymc', data.selectInfo.row.mc) + this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('yrybhphSubNddw', data.selectInfo.row.nddw) + this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('yrymc', data.selectInfo.row.mc||'NA') } if (data.key === 'rjbhphSub') { this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjbhphSubType', data.selectInfo.selectType) this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjbhphSubKcdw', data.selectInfo.row.kcdw) - this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjmc', data.selectInfo.row.mc) + this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjbhphSubNddw', data.selectInfo.row.nddw) + this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjmc', data.selectInfo.row.mc||'NA') } }, // 质量 onTableBeforeReagentZlSubmit(data, zlIndex, formZlConfig) { const { selectData, callback, key, formFields } = data; + debugger //溶剂编号/批号 - if (key === "rjbhphSub" && !isCommonUnit(selectData.row.kcdw, [formFields.rjsjtjUnit])) { - callback.prevent('库存单位与预制不符,请重新选择或申请废止并重新预制。'); - } - //试验物质编号/批号 - if (key === "sywzbhphSub" && !isCommonUnit(selectData.row.kcdw, [formFields.sywzsjclzUnit])) { + if (key === "rjbhphSub" && !isCommonUnit(selectData.row.nddw, [formFields.rjsjndUnit])) { callback.prevent('库存单位与预制不符,请重新选择或申请废止并重新预制。'); } + // //试验物质编号/批号 + // if (key === "sywzbhphSub" && !isCommonUnit(selectData.row.kcdw, [formFields.sywzsjclzUnit])) { + // callback.prevent('库存单位与预制不符,请重新选择或申请废止并重新预制。'); + // } }, onTableRegentZlSubmit(zlIndex, data) { if (data.key === 'sywzbhphSub') { this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('sywzbhphSubType', data.selectInfo.selectType) this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('sywzbhphSubKcdw', data.selectInfo.row.kcdw) - this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('sywzmcSub', data.selectInfo.row.mc) + this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('sywzbhphSubNddw', data.selectInfo.row.nddw) + this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('sywzmcSub', data.selectInfo.row.mc||'NA') } if (data.key === 'rjbhphSub') { this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjbhphSubType', data.selectInfo.selectType) this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjbhphSubKcdw', data.selectInfo.row.kcdw) - this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjmc', data.selectInfo.row.mc) + this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjbhphSubNddw', data.selectInfo.row.nddw) + this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjmc', data.selectInfo.row.mc||'NA') } }, //新增质量 From a0e09ca38727ec92866edd006b5c1c0bbaeaea7b Mon Sep 17 00:00:00 2001 From: memorylkf <312904636@qq.com> Date: Fri, 6 Mar 2026 16:48:44 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20[=E6=A8=A1=E6=9D=BF=E7=AE=A1?= =?UTF-8?q?=E7=90=86]=20=E6=A0=B7=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lang/en/template/yp.js | 4 +- src/lang/zh/template/yp.js | 4 +- .../business/comps/template/comps/yp/YP002.vue | 2 +- .../business/comps/template/comps/yp/YP005.vue | 69 +++++++++++++++++++++- 4 files changed, 73 insertions(+), 6 deletions(-) diff --git a/src/lang/en/template/yp.js b/src/lang/en/template/yp.js index 8143a59..7800cf3 100644 --- a/src/lang/en/template/yp.js +++ b/src/lang/en/template/yp.js @@ -57,6 +57,8 @@ export default { ybsm: 'Sample Description', zz: 'Tissue', qxsj: 'Cleaning time', - qxbz: 'Cleaning Procedure' + qxbz: 'Cleaning Procedure', + ks: 'Start', + js: 'Finish' } } diff --git a/src/lang/zh/template/yp.js b/src/lang/zh/template/yp.js index bc1ec1a..cb2722d 100644 --- a/src/lang/zh/template/yp.js +++ b/src/lang/zh/template/yp.js @@ -57,6 +57,8 @@ export default { ybsm: '样本说明', zz: '组织', qxsj: '清洗时间', - qxbz: '清洗步骤' + qxbz: '清洗步骤', + ks: '开始', + js: '结束' } } diff --git a/src/views/business/comps/template/comps/yp/YP002.vue b/src/views/business/comps/template/comps/yp/YP002.vue index f18ad11..737dae1 100644 --- a/src/views/business/comps/template/comps/yp/YP002.vue +++ b/src/views/business/comps/template/comps/yp/YP002.vue @@ -141,7 +141,7 @@ export default { maxlength: 200, subType:"button", subKey:"jssjButton", - buttonName:"获取时间" + buttonName:"template.yp.yp002.hqsj" }, } }, diff --git a/src/views/business/comps/template/comps/yp/YP005.vue b/src/views/business/comps/template/comps/yp/YP005.vue index 82372af..580a870 100644 --- a/src/views/business/comps/template/comps/yp/YP005.vue +++ b/src/views/business/comps/template/comps/yp/YP005.vue @@ -17,8 +17,11 @@ :ref="`tableRef`" :columns="tableColumns" :formData="formData" + operationWidth = "80px" :prefixKey = "`table`" - fieldItemLabel = "template.common.operationSteps" + fieldItemLabel = "template.yp.yp005.ybsm" + @clickButton="handleClickButton" + @onCheckboxTagChange="onCheckboxTagChange" :showOperation="fillType === 'preFill'" > @@ -48,10 +52,12 @@ import { EventBus } from "@/utils/eventBus"; import { uniqeResource } from "@/utils/calUnitTools"; import { debounce } from 'lodash-es' import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue" +import ImportExcelDialog from '../../dialog/ImportExcelDialog' +import moment from "moment"; export default { name: "YP003", - components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete }, + components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete,ImportExcelDialog }, mixins: [templateMixin], props: { fillType: { @@ -147,14 +153,25 @@ export default { },{ label: 'template.yp.yp005.zz', prop: 'zz', - bodyType: 'input', + bodyType: 'checkboxTag', bodyFillType: 'actFill', + bodySubType:"button", + bodySubFillType:"preFill", + bodySubButtonName:"template.common.importTemplate", + bodySubKey:"exportBtn", + showBodySub:this.fillType === "preFill", width: 280, },{ label: 'template.yp.yp005.qxsj', prop: 'qxsj', bodyType: 'input', bodyFillType: 'actFill', + + bodySubType:"button", + bodySubFillType:"actFill", + bodySubButtonName:"template.yp.yp005.ks", + bodySubKey:"startBtn", + showBodySub:this.fillType === "actFill", width: 280, }] }, @@ -162,11 +179,34 @@ export default { data() { return { formData: {}, + currentRowIndex: -1, }; }, mounted() { }, methods: { + // 点击按钮 + handleClickButton(key,rowIndex,colIndex,e,data){ + if(key === "exportBtn"){ + this.currentRowIndex = rowIndex; + this.$refs.ImportExcelDialog.show() + } + if(key === "startBtn"){ + this.$refs.tableRef.updateDataSourceByRowIndex(rowIndex,{ + qxsj: moment().format("YYYY/MM/DD HH:mm"), + }) + + // this.$nextTick(() => { + // //通知后端保存数据 + // const params = { + // type: "fieldChanged", + // newRecord: null, + // resourceList: null, + // } + // EventBus.$emit('onModifyRecord', params,) + // }) + } + }, //获取已填写的表单数据 getFilledFormData() { return this.getFilledFormDataByRefs(["baseInfoRef", "tableRef", "stepRef", "remarkRef"]) @@ -195,6 +235,29 @@ export default { tableRef.deleteRow(rowIndex); } }, + + onLoadExcelData(excelData) { + const data = excelData.splice(1); + const tagData = data.map((item)=>{ + return { + checked:undefined, + tagValue:item[0], + } + }) + this.$refs.tableRef.updateDataSourceByRowIndex(this.currentRowIndex,{zz:tagData}); + this.$refs.tableRef.onErrorUpdate(this.currentRowIndex, 1, 'zz', false) + this.$refs.ImportExcelDialog.cancel() + setTimeout(() => { + this.justUpdateFilledFormData(); + }, 100); + }, + downloadExcelTemplate(arr){ + this.exportExcel(arr) + }, + onCheckboxTagChange(rowIndex,colIndex,data){ + const num = data.filter((item)=>item.checked).length; + this.$refs.tableRef.updateDataSourceByRowIndex(rowIndex, {'ypsl':num}) + } } };