luojie 1 month ago
parent
commit
d5107a03a4
5 changed files with 92 additions and 19 deletions
  1. +3
    -1
      src/lang/en/template/yp.js
  2. +3
    -1
      src/lang/zh/template/yp.js
  3. +19
    -13
      src/views/business/comps/template/comps/gsp/GSP005.vue
  4. +1
    -1
      src/views/business/comps/template/comps/yp/YP002.vue
  5. +66
    -3
      src/views/business/comps/template/comps/yp/YP005.vue

+ 3
- 1
src/lang/en/template/yp.js View File

@ -57,6 +57,8 @@ export default {
ybsm: 'Sample Description', ybsm: 'Sample Description',
zz: 'Tissue', zz: 'Tissue',
qxsj: 'Cleaning time', qxsj: 'Cleaning time',
qxbz: 'Cleaning Procedure'
qxbz: 'Cleaning Procedure',
ks: 'Start',
js: 'Finish'
} }
} }

+ 3
- 1
src/lang/zh/template/yp.js View File

@ -57,6 +57,8 @@ export default {
ybsm: '样本说明', ybsm: '样本说明',
zz: '组织', zz: '组织',
qxsj: '清洗时间', qxsj: '清洗时间',
qxbz: '清洗步骤'
qxbz: '清洗步骤',
ks: '开始',
js: '结束'
} }
} }

+ 19
- 13
src/views/business/comps/template/comps/gsp/GSP005.vue View File

@ -617,49 +617,55 @@ export default {
// //
onTableBeforeReagentRySubmit(data, zlIndex, formZlConfig) { onTableBeforeReagentRySubmit(data, zlIndex, formZlConfig) {
const { selectData, callback, key, formFields } = data; 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) { onTableRegentRySubmit(zlIndex, data) {
if (data.key === 'yrybhphSub') { if (data.key === 'yrybhphSub') {
this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('yrybhphSubType', data.selectInfo.selectType) 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('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') { if (data.key === 'rjbhphSub') {
this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjbhphSubType', data.selectInfo.selectType) 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('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) { onTableBeforeReagentZlSubmit(data, zlIndex, formZlConfig) {
const { selectData, callback, key, formFields } = data; 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('库存单位与预制不符,请重新选择或申请废止并重新预制。'); callback.prevent('库存单位与预制不符,请重新选择或申请废止并重新预制。');
} }
// ///
// if (key === "sywzbhphSub" && !isCommonUnit(selectData.row.kcdw, [formFields.sywzsjclzUnit])) {
// callback.prevent('');
// }
}, },
onTableRegentZlSubmit(zlIndex, data) { onTableRegentZlSubmit(zlIndex, data) {
if (data.key === 'sywzbhphSub') { if (data.key === 'sywzbhphSub') {
this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('sywzbhphSubType', data.selectInfo.selectType) 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('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') { if (data.key === 'rjbhphSub') {
this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjbhphSubType', data.selectInfo.selectType) 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('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')
} }
}, },
// //

+ 1
- 1
src/views/business/comps/template/comps/yp/YP002.vue View File

@ -141,7 +141,7 @@ export default {
maxlength: 200, maxlength: 200,
subType:"button", subType:"button",
subKey:"jssjButton", subKey:"jssjButton",
buttonName:"获取时间"
buttonName:"template.yp.yp002.hqsj"
}, },
} }
}, },

+ 66
- 3
src/views/business/comps/template/comps/yp/YP005.vue View File

@ -17,8 +17,11 @@
:ref="`tableRef`" :ref="`tableRef`"
:columns="tableColumns" :columns="tableColumns"
:formData="formData" :formData="formData"
operationWidth = "80px"
:prefixKey = "`table`" :prefixKey = "`table`"
fieldItemLabel = "template.common.operationSteps"
fieldItemLabel = "template.yp.yp005.ybsm"
@clickButton="handleClickButton"
@onCheckboxTagChange="onCheckboxTagChange"
:showOperation="fillType === 'preFill'" :showOperation="fillType === 'preFill'"
> >
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> <template slot="operation" slot-scope="{ row, rowIndex, columns }">
@ -34,6 +37,7 @@
</div> </div>
</div> </div>
<!-- <button @click="onSave">保存</button> --> <!-- <button @click="onSave">保存</button> -->
<ImportExcelDialog ref="ImportExcelDialog" @onLoadData="onLoadExcelData" :downloadArr="['组织']" @downloadExcelTemplate="downloadExcelTemplate" />
</div> </div>
</template> </template>
@ -48,10 +52,12 @@ import { EventBus } from "@/utils/eventBus";
import { uniqeResource } from "@/utils/calUnitTools"; import { uniqeResource } from "@/utils/calUnitTools";
import { debounce } from 'lodash-es' import { debounce } from 'lodash-es'
import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue" import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue"
import ImportExcelDialog from '../../dialog/ImportExcelDialog'
import moment from "moment";
export default { export default {
name: "YP003", name: "YP003",
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete },
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete,ImportExcelDialog },
mixins: [templateMixin], mixins: [templateMixin],
props: { props: {
fillType: { fillType: {
@ -147,14 +153,25 @@ export default {
},{ },{
label: 'template.yp.yp005.zz', label: 'template.yp.yp005.zz',
prop: 'zz', prop: 'zz',
bodyType: 'input',
bodyType: 'checkboxTag',
bodyFillType: 'actFill', bodyFillType: 'actFill',
bodySubType:"button",
bodySubFillType:"preFill",
bodySubButtonName:"template.common.importTemplate",
bodySubKey:"exportBtn",
showBodySub:this.fillType === "preFill",
width: 280, width: 280,
},{ },{
label: 'template.yp.yp005.qxsj', label: 'template.yp.yp005.qxsj',
prop: 'qxsj', prop: 'qxsj',
bodyType: 'input', bodyType: 'input',
bodyFillType: 'actFill', bodyFillType: 'actFill',
bodySubType:"button",
bodySubFillType:"actFill",
bodySubButtonName:"template.yp.yp005.ks",
bodySubKey:"startBtn",
showBodySub:this.fillType === "actFill",
width: 280, width: 280,
}] }]
}, },
@ -162,11 +179,34 @@ export default {
data() { data() {
return { return {
formData: {}, formData: {},
currentRowIndex: -1,
}; };
}, },
mounted() { mounted() {
}, },
methods: { 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() { getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "tableRef", "stepRef", "remarkRef"]) return this.getFilledFormDataByRefs(["baseInfoRef", "tableRef", "stepRef", "remarkRef"])
@ -195,6 +235,29 @@ export default {
tableRef.deleteRow(rowIndex); 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})
}
} }
}; };
</script> </script>

Loading…
Cancel
Save