diff --git a/src/components/Template/Step.vue b/src/components/Template/Step.vue index 2a47de3..d1fed3b 100644 --- a/src/components/Template/Step.vue +++ b/src/components/Template/Step.vue @@ -42,6 +42,14 @@ import Tpjysd from './StepComponents/ry/tpjysd.vue';//溶液-天平校验(双点 import Qywz from './StepComponents/ry/qywz.vue';//溶液-取用物质 import Clfcz from './StepComponents/ry/clfcz.vue';//称量(非传值) import Clcz from './StepComponents/ry/clcz.vue';//称量(传值) +import Bdtj from './StepComponents/ry/bdtj.vue';//标定(体积) +import Bdzl from './StepComponents/ry/bdzl.vue';//标定(质量) +import Tjphcz from './StepComponents/ry/tjphcz.vue';//调节PH(传值) +import Tjphfcz from './StepComponents/ry/tjphfcz.vue';//调节PH(非传值) +import Lx from './StepComponents/ry/lx.vue';//离心 + + + const stepTypes = [ @@ -54,6 +62,12 @@ const stepTypes = [ { label: '取用物质', value: 'qywz' }, { label: '称量(非传值)', value: 'clfcz' }, { label: '称量(传值)', value: 'clcz' }, + { label: '标定(体积)', value: 'bdtj' }, + { label: '标定(质量)', value: 'bdzl' }, + { label: '调节PH(传值)', value: 'tjphcz' }, + { label: '调节PH(非传值)', value: 'tjphfcz' }, + { label: '离心', value: 'lx' }, + ]; export default { @@ -88,6 +102,11 @@ export default { Qywz, Clfcz, Clcz, + Bdtj, + Bdzl, + Tjphcz, + Tjphfcz, + Lx, }, computed: { stepComponentMap() { @@ -102,6 +121,11 @@ export default { 'qywz': 'Qywz', 'clfcz': 'Clfcz', 'clcz': 'Clcz', + 'bdtj': 'Bdtj', + 'bdzl': 'Bdzl', + 'tjphcz': 'Tjphcz', + 'tjphfcz': 'Tjphfcz', + 'lx': 'Lx', } } return this.componentMap @@ -385,7 +409,7 @@ export default { .step-content { display: flex; - align-items: start; + align-items: flex-start; } } } diff --git a/src/components/Template/StepComponents/ry/bdtj.vue b/src/components/Template/StepComponents/ry/bdtj.vue new file mode 100644 index 0000000..69886ea --- /dev/null +++ b/src/components/Template/StepComponents/ry/bdtj.vue @@ -0,0 +1,84 @@ + + + + + + \ No newline at end of file diff --git a/src/components/Template/StepComponents/ry/bdzl.vue b/src/components/Template/StepComponents/ry/bdzl.vue new file mode 100644 index 0000000..01a23da --- /dev/null +++ b/src/components/Template/StepComponents/ry/bdzl.vue @@ -0,0 +1,68 @@ + + + + + + \ No newline at end of file diff --git a/src/components/Template/StepComponents/ry/lx.vue b/src/components/Template/StepComponents/ry/lx.vue new file mode 100644 index 0000000..98031c5 --- /dev/null +++ b/src/components/Template/StepComponents/ry/lx.vue @@ -0,0 +1,115 @@ + + + + + + \ No newline at end of file diff --git a/src/components/Template/StepComponents/ry/tjphcz.vue b/src/components/Template/StepComponents/ry/tjphcz.vue new file mode 100644 index 0000000..db74b52 --- /dev/null +++ b/src/components/Template/StepComponents/ry/tjphcz.vue @@ -0,0 +1,107 @@ + + + + + + \ No newline at end of file diff --git a/src/components/Template/StepComponents/ry/tjphfcz.vue b/src/components/Template/StepComponents/ry/tjphfcz.vue new file mode 100644 index 0000000..bd2006c --- /dev/null +++ b/src/components/Template/StepComponents/ry/tjphfcz.vue @@ -0,0 +1,103 @@ + + + + + + \ No newline at end of file diff --git a/src/components/Template/StepComponents/ry/tpjydd.vue b/src/components/Template/StepComponents/ry/tpjydd.vue index 94b5f69..c0de841 100644 --- a/src/components/Template/StepComponents/ry/tpjydd.vue +++ b/src/components/Template/StepComponents/ry/tpjydd.vue @@ -62,7 +62,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js'; options:this.getDictOptions("business_zldw") }, text5:{ - label:"标准砝码发修正值为", + label:"标准砝码修正值为", type:"text", }, sjsr3:{ diff --git a/src/components/Template/StepComponents/ry/tpjysd.vue b/src/components/Template/StepComponents/ry/tpjysd.vue index 78e5e08..8dda79b 100644 --- a/src/components/Template/StepComponents/ry/tpjysd.vue +++ b/src/components/Template/StepComponents/ry/tpjysd.vue @@ -71,7 +71,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js'; options:this.getDictOptions("business_zldw") }, dfmtext5:{ - label:"标准砝码发修正值为", + label:"标准砝码修正值为", type:"text", }, dfmsjsr3:{ @@ -161,7 +161,7 @@ import stepMixins from '@/components/Template/mixins/stepMixins.js'; options:this.getDictOptions("business_zldw") }, text5:{ - label:"标准砝码发修正值为", + label:"标准砝码修正值为", type:"text", }, sjsr3:{ diff --git a/src/components/Template/StepComponents/ry/ym.vue b/src/components/Template/StepComponents/ry/ym.vue new file mode 100644 index 0000000..f2ebf47 --- /dev/null +++ b/src/components/Template/StepComponents/ry/ym.vue @@ -0,0 +1,111 @@ + + + + + + \ No newline at end of file diff --git a/src/components/Template/mixins/stepMixins.js b/src/components/Template/mixins/stepMixins.js index f02150c..09194fb 100644 --- a/src/components/Template/mixins/stepMixins.js +++ b/src/components/Template/mixins/stepMixins.js @@ -1,5 +1,5 @@ export default { - dicts:["business_tjdw","business_czhj","business_rqcz","business_zldw"], + dicts:["business_tjdw","business_czhj","business_rqcz","business_zldw","business_yqscdw","business_zsdw"], props: { formData: { type: Object, diff --git a/src/components/Template/operation/TableOpertaion.vue b/src/components/Template/operation/TableOpertaion.vue index 0175703..3b7b0dc 100644 --- a/src/components/Template/operation/TableOpertaion.vue +++ b/src/components/Template/operation/TableOpertaion.vue @@ -56,7 +56,7 @@ export default { watch: { row: { handler(newVal, oldVal) { - this.innerRow = newVal; + this.innerRow = JSON.parse(JSON.stringify(newVal)); }, deep: true, } @@ -66,6 +66,10 @@ export default { innerRow: this.row, } }, + mounted() { + console.log("mounted") + + }, methods: { // 开始配置 onStartConfig() { @@ -88,6 +92,8 @@ export default { // 分装 onSubPackage() { const { columns, innerRow } = this; + console.log(columns,innerRow,"inner") + const { headerSelectFields, columnsData } = columns; const col = columnsData.find((item) => item.myCodeFields); const { myCodeFields, maxVolumeField, maxVolumeFieldUnit } = col; @@ -106,9 +112,10 @@ export default { units.push(headerSelectFields[key]) }) const {total,unit} = addTj(cols,units) + let defaultData = { mybh: fields.join(""), maxVolume: total, maxVolumeUnit: unit, rowIndex: this.rowIndex } if (innerRow.fzsj) { - defaultData = innerRow.fzsj + defaultData = {...innerRow.fzsj,...defaultData} } EventBus.$emit("showSubPackageDialog", defaultData) }, diff --git a/src/views/business/comps/template/comps/sp/SWYPBQGZYZBB.vue b/src/views/business/comps/template/comps/sp/SWYPBQGZYZBB.vue index b042232..221ec47 100644 --- a/src/views/business/comps/template/comps/sp/SWYPBQGZYZBB.vue +++ b/src/views/business/comps/template/comps/sp/SWYPBQGZYZBB.vue @@ -20,7 +20,7 @@ :showOperation="fillType === 'actFill'" ref="stepTableRef" :columns="stepColumns" :formData="formData"> @@ -47,8 +47,7 @@ import CustomTable from '@/components/Template/CustomTable.vue'; import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue'; import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"; import { EventBus } from "@/utils/eventBus"; -import moment from 'moment'; - +import { addTj } from "@/utils/calUnitTools"; export default { name: "SWYPBQGZYZBB", components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, SelectReagentDialog, TableOpertaion }, @@ -417,6 +416,27 @@ export default { mounted() { }, methods: { + startConfig(val){ + const { rowData } = val; + let postData = { + bh:rowData.targetSolutionCode+rowData.subTargetSolutionCode, + } + this.startConfigRequest(postData); + }, + configComplete(val){ + const { rowData,headerSelectFields } = val; + //计算实际目标溶液体积(实际起始溶液体积+实际稀释液体积) + const {total,unit} = addTj([rowData.actStartSolutionVolume, rowData.actDiluentVolume], [headerSelectFields.actStartSolutionVolumeUnit, headerSelectFields.actDiluentVolumeUnit]) + let postData = { + mc:null, + bh:rowData.targetSolutionCode+rowData.subTargetSolutionCode, + nd:rowData.actSolutionConcentration,//实际目标溶液浓度 + nddw:headerSelectFields.actSolutionConcentrationUnit, + kc: total, + kcdw: unit, + } + this.configCompleteRequest(postData); + }, //打印标签回调 printTag(data) { const printConfig = this.getBasePrintConfig(data); @@ -424,8 +444,26 @@ export default { }, //分装回调 subPackageSubmit(data) { - const { fzsj, rowData } = data; - console.log(data, "子项提交事件") + const { fzsj, rowData,headerSelectFields } = data; + const {fzList = [],dw="",mybh} = fzsj; + if(fzList && fzList.length>0){ + const list = fzList.map((item)=>{ + return{ + bh:mybh+item.subCode, + kc:item.num, + kcdw:dw, + } + }) + let postData = { + studyId:this.formData.studyId, + studyFormId:this.formData.id, + bh:mybh, + nd:rowData.actSolutionConcentration || 0, + nddw:headerSelectFields.actSolutionConcentrationUnit, + list:list + } + this.subPackageRequest(postData); + } }, //更新代码 async handleUpdateCode() { @@ -477,32 +515,35 @@ export default { }, //更新table数据 updateStepTableData(row) { - const { stepTableFormData = [] } = this.formData; + const {stepTableFormData = []} = this.$refs.stepTableRef.getFilledFormData(); // 创建新的表格数据副本 const newStepTableData = JSON.parse(JSON.stringify(stepTableFormData)); // 遍历数据,按要求更新起始溶液编号 for (let i = 0; i < newStepTableData.length; i++) { + const item = newStepTableData[i]; + const volume = item.actStartSolutionVolume || 0; if (i === 0) { // 第一条记录的起始溶液编号是确认弹框带出来的,也就是row.code字段 - newStepTableData[i].startSolutionCode = row.code; + newStepTableData[i].startSolutionCode = row.bh; } else { // 第二条的起始溶液编号是第一条数据里面的targetSolutionCode字段, // 第三条的起始溶液编号是第二条数据里面的targetSolutionCode字段,以此类推 newStepTableData[i].startSolutionCode = newStepTableData[i - 1].targetSolutionCode; } + this.updateSjmbrynd(item, row.nd) } // 更新stepTableRef组件的数据 this.$refs.stepTableRef.updateDataSource(newStepTableData); }, async getFormData() { - return await this.validFormFields(["baseInfoRef", , "stepFormPackageRef", "stepTableRef", "stepRef", "remarkRef"]); + return await this.validFormFields(["baseInfoRef", "stepFormPackageRef", "stepTableRef", "stepRef", "remarkRef"]); }, async onSave() { // const formData = await this.getFormData(); - const formData = await this.validFormFields(["baseInfoRef", , "stepFormPackageRef", "stepTableRef", "stepRef", "remarkRef"]); + const formData = await this.validFormFields(["baseInfoRef","stepFormPackageRef", "stepTableRef", "stepRef", "remarkRef"]); console.log(formData, "formData") } diff --git a/src/views/business/comps/template/comps/sp/SWYPNBGZYZBB.vue b/src/views/business/comps/template/comps/sp/SWYPNBGZYZBB.vue index abd32a1..da384f7 100644 --- a/src/views/business/comps/template/comps/sp/SWYPNBGZYZBB.vue +++ b/src/views/business/comps/template/comps/sp/SWYPNBGZYZBB.vue @@ -2,7 +2,8 @@ @@ -98,7 +105,7 @@ import templateMixin from "../../mixins/templateMixin"; import CustomTable from '@/components/Template/CustomTable.vue'; import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue'; import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"; -import {getExpireDate} from "@/utils/index.js"; +import { getExpireDate } from "@/utils/index.js"; import moment from "moment"; import { getLadderColumnsConfig, getParallelColumnsConfig, getLadderFormConfig, getBaseInfoFormConfig, getRemarkFormConfig, getStorageConditionFormConfig, getParalleStepFormConfig } from "../../formConfig/paralleAndLadderConfig.js"; export default { @@ -125,7 +132,7 @@ export default { formData: { immediate: true, handler(v) { - if(v &&this.fillType === "actFill"){ + if (v && this.fillType === "actFill") { this.handleUpdateCode(); } } @@ -168,94 +175,115 @@ export default { dataSource: [], currentTableIndex: "",//当前点击的表格索引 currentTableKey: "",//当前点击的表格key - targetAcSolutionFromTable:true,//是否从表格中获取实际原始溶液浓度 + targetAcSolutionFromTable: true,//是否从表格中获取实际原始溶液浓度 }; }, mounted() { }, - methods: { - getTemplateName(){ - if(this.templateData.templateMc){ + methods: { + subPackageSubmit(val, configType, index) { + // const { rowData } = val; + // let postData = { + // bh: rowData.targetSolutionCode + rowData.subTargetSolutionCode, + // } + // this.startConfigRequest(postData); + }, + configComplete(val) { + const { rowData, headerSelectFields } = val; + //计算实际目标溶液体积(实际起始溶液体积+实际稀释液体积) + const { total, unit } = addTj([rowData.actStartSolutionVolume, rowData.actDiluentVolume], [headerSelectFields.actStartSolutionVolumeUnit, headerSelectFields.actDiluentVolumeUnit]) + let postData = { + mc: null, + bh: rowData.targetSolutionCode + rowData.subTargetSolutionCode, + nd: rowData.actSolutionConcentration,//实际目标溶液浓度 + nddw: headerSelectFields.actSolutionConcentrationUnit, + kc: total, + kcdw: unit, + } + this.configCompleteRequest(postData); + }, + getTemplateName() { + if (this.templateData.templateMc) { return this.templateData.templateMc } const o = { - "SP004":"生物样品内标工作液制备表", - "SP005":"生物样品质控工作液制备表", - "SP006":"生物样品标准曲线/质控样品制备表", + "SP004": "生物样品内标工作液制备表", + "SP005": "生物样品质控工作液制备表", + "SP006": "生物样品标准曲线/质控样品制备表", } return o[this.sn]; }, //标签打印 - printTag(e,configType,index){ + printTag(e, configType, index) { const { nickName, name } = this.$store.getters; - const {printCode,row,type} = e; + const { printCode, row, type } = e; const currentForm = this.formData[configType][index]; - const {stepStorageCondition,startDate,expireDate,paralleStepStorageCondition} = currentForm; + const { stepStorageCondition, startDate, expireDate, paralleStepStorageCondition } = currentForm; const targetSolutionExpirationDate = row.targetSolutionExpirationDate; const lang = this.$i18n.locale; const printConfig = { - "品名":"暂时还不知道品名是哪个字段", - "存储条件":stepStorageCondition || paralleStepStorageCondition, - "配制日期":moment(startDate).format("YYYY-MM-DD"), - "有效期至":moment(targetSolutionExpirationDate || expireDate).format("YYYY-MM-DD HH:mm"), - "配置者":lang === "zh_CN" ? nickName : name, + "品名": "暂时还不知道品名是哪个字段", + "存储条件": stepStorageCondition || paralleStepStorageCondition, + "配制日期": moment(startDate).format("YYYY-MM-DD"), + "有效期至": moment(targetSolutionExpirationDate || expireDate).format("YYYY-MM-DD HH:mm"), + "配置者": lang === "zh_CN" ? nickName : name, //type==="subPackage"从分装打印过来的, //type==="row" 从列表上点过来的 - "编号":type === "subPackage" ? printCode : (row.targetSolutionCode+row.subTargetSolutionCode), + "编号": type === "subPackage" ? printCode : (row.targetSolutionCode + row.subTargetSolutionCode), } console.log(printConfig, "printConfig") - EventBus.$emit('showTagPrintDialog', {printConfig}) + EventBus.$emit('showTagPrintDialog', { printConfig }) }, // 为指定的表单数据数组分配编号 async assignNumbersToTableData(config) { const configs = this.formData[config] - const {startDate} = this.formData; + const { startDate } = this.formData; // 检查paralleConfigs中的paralleTableFormData数组 if (configs && configs.length > 0) { for (let i = 0; i < configs.length; i++) { const ref = config === "paralleConfigs" ? `paralleStepTableRef_${i}` : `ladderStepTableRef_${i}`; - const {stepTableFormData = [], effectivePeriod, effectivePeriodUnit,expireDate} = configs[i]; - if(!expireDate && config === "ladderConfigs"){ + const { stepTableFormData = [], effectivePeriod, effectivePeriodUnit, expireDate } = configs[i]; + if (!expireDate && config === "ladderConfigs") { const date = getExpireDate(startDate, effectivePeriod, effectivePeriodUnit); configs[i].expireDate = date; } if (stepTableFormData && stepTableFormData.length > 0) { - const tableDataArray = stepTableFormData; - // 检查表单数据中是否有任何一行的subTargetSolutionCode有值 - const hasAnyWithValue = tableDataArray.some(row => - row.subTargetSolutionCode && row.subTargetSolutionCode.trim() !== ''); - // 如果没有任何一行有值,则为所有行分配编号 - if (!hasAnyWithValue) { - const length = tableDataArray.length; - const snList = await this.getLatestSn(length); - tableDataArray.forEach((row, idx) => { - let expDate = {}; - if(config === "paralleConfigs" && !row.targetSolutionExpirationDate){ - let date = getExpireDate(startDate, row.targetSolutionCycle, row.targetSolutionCyclePrecision); - expDate = { - targetSolutionExpirationDate: date - } + const tableDataArray = stepTableFormData; + // 检查表单数据中是否有任何一行的subTargetSolutionCode有值 + const hasAnyWithValue = tableDataArray.some(row => + row.subTargetSolutionCode && row.subTargetSolutionCode.trim() !== ''); + // 如果没有任何一行有值,则为所有行分配编号 + if (!hasAnyWithValue) { + const length = tableDataArray.length; + const snList = await this.getLatestSn(length); + tableDataArray.forEach((row, idx) => { + let expDate = {}; + if (config === "paralleConfigs" && !row.targetSolutionExpirationDate) { + let date = getExpireDate(startDate, row.targetSolutionCycle, row.targetSolutionCyclePrecision); + expDate = { + targetSolutionExpirationDate: date } - this.$refs[ref][0]?.updateDataSourceByRowIndex(idx,{subTargetSolutionCode:snList[idx],...expDate}); - }); - Promise.resolve(); - } + } + this.$refs[ref][0]?.updateDataSourceByRowIndex(idx, { subTargetSolutionCode: snList[idx], ...expDate }); + }); + Promise.resolve(); + } } } } - + }, async handleUpdateCode() { - Promise.all([this.assignNumbersToTableData("ladderConfigs"),this.assignNumbersToTableData("paralleConfigs") - ]).then(()=>{ + Promise.all([this.assignNumbersToTableData("ladderConfigs"), this.assignNumbersToTableData("paralleConfigs") + ]).then(() => { console.log("nextTick") //通知后端保存数据 const params = { - type: "fieldChanged", - newRecord: null, - resourceList: null, - } + type: "fieldChanged", + newRecord: null, + resourceList: null, + } EventBus.$emit('onModifyRecord', params,) }) }, @@ -321,37 +349,37 @@ export default { // 表格失去焦点事件 onHandleTableBlur(type, configIndex, e) { - const { colKey = "",item } = e; + const { colKey = "", item } = e; if (colKey === "targetStartSolutionConcentration" || colKey === "targetSolutionVolume" || colKey === "targetSolutionConcentration" || colKey === "targetStartSolutionVolumePrecision" || colKey === "targetDiluentVolumePrecision") { - if(type === "ladder"){ + if (type === "ladder") { const volume = this.$refs[`ladderStepFormPackageRef_${configIndex}`][0]?.getFormDataByKey("targetStartSolution") || 0; if (volume) { this.updateTargetStartSolutionVolume(item, volume); } - }else if(type === "paralle"){ + } else if (type === "paralle") { const volumne = item.targetStartSolutionConcentration || 0; if (volumne) { this.updateTargetStartSolutionVolume(item, volumne); } } - }else if(colKey === "actStartSolutionVolume" || colKey === "actDiluentVolume"){//实际起始溶液体积和实际目标溶液体积 - if(type === "ladder"){ + } else if (colKey === "actStartSolutionVolume" || colKey === "actDiluentVolume") {//实际起始溶液体积和实际目标溶液体积 + if (type === "ladder") { const targetAcSolution = this.$refs[`ladderStepFormPackageRef_${configIndex}`][0]?.getFormDataByKey("targetAcSolution") || 0;//获取实际起始溶液浓度 - if(targetAcSolution){ - this.updateSjmbrynd(item,targetAcSolution); + if (targetAcSolution) { + this.updateSjmbrynd(item, targetAcSolution); } - }else if(type === "paralle"){ + } else if (type === "paralle") { const targetAcSolution = item.targetAcSolution || 0;//获取实际起始溶液浓度 - if(targetAcSolution){ - this.updateSjmbrynd(item,targetAcSolution); + if (targetAcSolution) { + this.updateSjmbrynd(item, targetAcSolution); } } - + } }, //表格点击事件 - handleTableClickable(type, rowIndex, col,tableRowIndex) { - if(col.prop === "actStartSolutionCode"){//实际原始溶液编号点击事件 + handleTableClickable(type, rowIndex, col, tableRowIndex) { + if (col.prop === "actStartSolutionCode") {//实际原始溶液编号点击事件 this.currentTableKey = col.prop; this.currentType = type; this.currentRowIndex = rowIndex; @@ -374,26 +402,26 @@ export default { } }, //选择试剂提交事件 - onSelectReagentSubmit(code,row) { - const { currentSubKey,currentTableKey,currentRowIndex,currentTableIndex } = this; - if(currentSubKey){ - const ref = this.currentType === "ladder" ?"ladderStepFormPackageRef_":"paralleStepFormPackageRef_" + onSelectReagentSubmit(code, row) { + const { currentSubKey, currentTableKey, currentRowIndex, currentTableIndex } = this; + if (currentSubKey) { + const ref = this.currentType === "ladder" ? "ladderStepFormPackageRef_" : "paralleStepFormPackageRef_" const packageRef = this.$refs[`${ref}${this.currentRowIndex}`][0]; - if(currentSubKey === "subStartSolution"){ - packageRef.updateFormData("targetAcSolution", row.nd,["targetAcSolution"]); - packageRef.onValueChangeCompareTo("targetAcSolution", row.nd,"targetStartSolution"); + if (currentSubKey === "subStartSolution") { + packageRef.updateFormData("targetAcSolution", row.nd, ["targetAcSolution"]); + packageRef.onValueChangeCompareTo("targetAcSolution", row.nd, "targetStartSolution"); } packageRef.updateFormData(currentSubKey, code); this.currentSubKey = ""; - }else if (currentTableKey === "actStartSolutionCode"){//实际原始溶液编号点击事件 + } else if (currentTableKey === "actStartSolutionCode") {//实际原始溶液编号点击事件 const tableRef = this.$refs[`paralleStepTableRef_${currentRowIndex}`][0]; - if(tableRef){ - tableRef.updateDataSourceByRowIndex(currentTableIndex,{ + if (tableRef) { + tableRef.updateDataSourceByRowIndex(currentTableIndex, { actStartSolutionCode: code, targetAcSolution: row.nd, }) - } + } } this.$refs.selectReagentDialogRef.onCancel() }, @@ -518,8 +546,9 @@ export default { .mt-0 { margin-top: 0; } -.s-container{ + +.s-container { box-shadow: none !important; - padding:24px 0 !important; + padding: 24px 0 !important; } \ No newline at end of file diff --git a/src/views/business/comps/template/dialog/SubPackageDialog.vue b/src/views/business/comps/template/dialog/SubPackageDialog.vue index b276d3d..3b19ece 100644 --- a/src/views/business/comps/template/dialog/SubPackageDialog.vue +++ b/src/views/business/comps/template/dialog/SubPackageDialog.vue @@ -128,6 +128,7 @@ export default { } else { const errMsg = "分装后小份容量之和大于母液容量,是否确认分装?" const {maxVolume,maxVolumeUnit,dw} = this.formData; + const totalVolume = this.fzList.reduce((acc, cur) => acc + Number(cur.num), 0); const compareResult = compareVolume(totalVolume,dw,maxVolume, maxVolumeUnit); console.log(compareResult,totalVolume,dw,maxVolume, maxVolumeUnit,"比较结果"); @@ -151,7 +152,6 @@ export default { }, submitEmit(){ EventBus.$emit('dialogSubPackageSubmit', {...this.formData, fzList: this.fzList}); - this.$message.success('分装成功'); setTimeout(() => { this.close(); }, 500); diff --git a/src/views/business/comps/template/mixins/templateMixin.js b/src/views/business/comps/template/mixins/templateMixin.js index 62426f2..7e7b8d7 100644 --- a/src/views/business/comps/template/mixins/templateMixin.js +++ b/src/views/business/comps/template/mixins/templateMixin.js @@ -1,5 +1,6 @@ import moment from 'moment' -import { getLatestSn } from '@/api/template' +import { getLatestSn } from '@/api/template'; +import { sj_subpackage,sj_startConfiguration,sj_configurationCompleted } from '@/api/business/sj/sj'; export default { dicts: [ 'business_pztj', @@ -129,6 +130,34 @@ export default { this.setTemplateData({}) }, methods: { + //开始配置 + //postData: {bh: '123456'} + async startConfigRequest (postData){ + const res = await sj_startConfiguration(postData) + if (res.code === 200) { + this.$message.success('开始配置成功') + } else { + this.$message.error('开始配置失败') + } + }, + //完成配置 + async configCompleteRequest (postData){ + const res = await sj_configurationCompleted(postData) + if (res.code === 200) { + this.$message.success('完成配置成功') + } else { + this.$message.error('完成配置失败') + } + }, + //分装 + async subPackageRequest (postData){ + const res = await sj_subpackage(postData) + if (res.code === 200) { + this.$message.success('分装成功') + } else { + this.$message.error('分装失败') + } + }, //获取打印配置 getBasePrintConfig (data = {}){ const { printCode,type,row = {} } = data; @@ -317,7 +346,8 @@ export default { actStartSolutionVolume / actVol ).toFixed(precision) - item.actSolutionConcentration = actNd + console.log(actNd,targetAcSolution,actStartSolutionVolume,actVol, "actNd") + item.actSolutionConcentration = actNd === 'Infinity' ? 0 : actNd }, //更新起始溶液体积时,计算目标溶液预计浓度 updateTargetStartSolutionVolume(item, volume) {