|
|
|
@ -1,11 +1,11 @@ |
|
|
|
import { getuuid } from '@/utils/index.js'; |
|
|
|
import { EventBus } from "@/utils/eventBus"; |
|
|
|
export default { |
|
|
|
dicts:[ |
|
|
|
"business_tjdw","business_czhj","business_rqcz","business_zldw", |
|
|
|
"business_yqscdw","business_zsdw","business_wddw","business_ccwz","business_ggdw", |
|
|
|
"business_hjxx","business_zzzc","business_step_pcr","business_fycx","business_step_pcrfxyp", |
|
|
|
"business_cctj" |
|
|
|
dicts: [ |
|
|
|
"business_tjdw", "business_czhj", "business_rqcz", "business_zldw", |
|
|
|
"business_yqscdw", "business_zsdw", "business_wddw", "business_ccwz", "business_ggdw", |
|
|
|
"business_hjxx", "business_zzzc", "business_step_pcr", "business_fycx", "business_step_pcrfxyp", |
|
|
|
"business_cctj" |
|
|
|
], |
|
|
|
props: { |
|
|
|
formData: { |
|
|
|
@ -33,15 +33,15 @@ export default { |
|
|
|
destroyed() { |
|
|
|
EventBus.$off("dialogSubPackageSubmit") |
|
|
|
EventBus.$off("subPackageDialogPrintTag") |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 打印标签
|
|
|
|
// 打印标签
|
|
|
|
onPrintTag(data) { |
|
|
|
this.$emit("printTag") |
|
|
|
}, |
|
|
|
onSubPackageSubmit(data) { |
|
|
|
if (data.uuid === this.uuid) { |
|
|
|
console.log(data,"ddd") |
|
|
|
console.log(data, "ddd") |
|
|
|
//通知后端保存数据
|
|
|
|
const params = { |
|
|
|
type: "fieldChanged", |
|
|
|
@ -52,19 +52,26 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
// 点击按钮
|
|
|
|
onHandleClickButton(e,item,key) { |
|
|
|
const {buttonName = "",myCodeFields = []} = e; |
|
|
|
const fields = []; |
|
|
|
const stepFormData = this.getFilledFormData(); |
|
|
|
myCodeFields.forEach((key) => { |
|
|
|
fields.push(stepFormData[key]) |
|
|
|
}); |
|
|
|
console.log(fields,item,"fields") |
|
|
|
if(buttonName === '分装'){ |
|
|
|
EventBus.$emit("showSubPackageDialog", {mybh:fields.join(""),uuid:this.uuid,fzType:"step"}) |
|
|
|
onHandleClickButton(e, item, key) { |
|
|
|
const { buttonName = "", myCodeFields = [], maxVolumeField = "", maxVolumeUnitField = "" } = e; |
|
|
|
|
|
|
|
if (buttonName === '分装') { |
|
|
|
const fields = []; |
|
|
|
const stepFormData = this.getFilledFormData(); |
|
|
|
if (!myCodeFields.length || !maxVolumeField || !maxVolumeUnitField) { |
|
|
|
console.warn("请配置分装参数") |
|
|
|
return |
|
|
|
} |
|
|
|
const maxVolume = stepFormData[maxVolumeField]; |
|
|
|
const maxVolumeUnit = stepFormData[maxVolumeUnitField]; |
|
|
|
myCodeFields.forEach((key) => { |
|
|
|
fields.push(stepFormData[key]) |
|
|
|
}); |
|
|
|
|
|
|
|
EventBus.$emit("showSubPackageDialog", { mybh: fields.join(""), maxVolume, maxVolumeUnit, uuid: this.uuid, fzType: "step" }) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
async getFormData() { |
|
|
|
return await this.$refs.stepFormPackageRef.getFormData(); |
|
|
|
}, |
|
|
|
@ -74,7 +81,7 @@ export default { |
|
|
|
getSjResource() { |
|
|
|
return this.$refs.stepFormPackageRef?.getSjResource(); |
|
|
|
}, |
|
|
|
//试验配制条件options
|
|
|
|
//试验配制条件options
|
|
|
|
getDictOptions(dictType) { |
|
|
|
return this.dict.type[dictType] || [] |
|
|
|
}, |
|
|
|
@ -82,7 +89,7 @@ export default { |
|
|
|
this.$refs.stepFormPackageRef.resetRecord(); |
|
|
|
}, |
|
|
|
//更新温层数据
|
|
|
|
updateWcData(key,value) { |
|
|
|
updateWcData(key, value) { |
|
|
|
const options = this.getDictOptions("business_ccwz"); |
|
|
|
const selectedOption = options.find(item => item.value === value); |
|
|
|
if (selectedOption) { |
|
|
|
|