diff --git a/src/components/printBill/bill.vue b/src/components/printBill/bill.vue index 7034a1c..65ae0f4 100644 --- a/src/components/printBill/bill.vue +++ b/src/components/printBill/bill.vue @@ -25,11 +25,11 @@ 项目编号: - {{ billAllObj[0]?.xmNo }} + {{ billAllObj[0]?.xmNo }} 项目描述: - {{ billAllObj[0]?.xmMs }} + {{ billAllObj[0]?.bizType == 1 ? xmMs : billAllObj[0]?.xmMs }} @@ -127,29 +127,22 @@ const props = defineProps({ }, }); -function isChukuFun(isChuku){ - // scope.row.isChuku==0?"已入库":(scope.row.isChuku==1?"已出库":"审批中") - if(isChuku == 0){ - return "已入库" - } else if(isChuku == 1){ - return "已出库" - }else if(isChuku == 3){ - return "借料出库" - }else if(isChuku == 2){ - return "审批中" - }else if(isChuku == 4){ - return "入库撤销" - }else if(isChuku == 5){ - return "出库撤销" - } -} const isRuKu = computed(() => { return props.billAllObj[0]?.bizType == 0; }); -// 获取第一条数据作为头部基础信息来源 -const header = computed(() => (props.billAllObj && props.billAllObj.length > 0 ? props.billAllObj[0] : {})); +// 获取不同的项目描述 +const xmMs = computed(() => { + const validXmMsValues = props.billAllObj + .map(item => item.xmMs) // 提取所有 xmMs 属性值 + .filter(value => !!value); // 过滤掉 null/undefined/空字符串等假值 + // 3. 去重:得到所有不同的 xmMs 值 + const uniqueXmMs = [...new Set(validXmMsValues)]; + // 4. 核心逻辑:多个值用 + 拼接,单个值直接返回,无值返回空字符串 + return uniqueXmMs.length > 1 ? uniqueXmMs.join('、') : uniqueXmMs[0] || ''; +}); + // 汇总逻辑 const summaryList = computed(() => { @@ -158,7 +151,8 @@ const summaryList = computed(() => { props.billAllObj.forEach(item => { if (map.has(item.wlNo)) { const existing = map.get(item.wlNo); - existing.totalQty = (parseFloat(existing.totalQty) + parseFloat(item.realQty)); + const total = (parseFloat(existing.totalQty) + parseFloat(item.realQty)) * 100*10000 + existing.totalQty = total / ( 100 * 10000); } else { map.set(item.wlNo, { ...item, diff --git a/src/components/storageBill/bill.vue b/src/components/storageBill/bill.vue index 2b45b68..059c2e7 100644 --- a/src/components/storageBill/bill.vue +++ b/src/components/storageBill/bill.vue @@ -145,7 +145,8 @@ const summaryList = computed(() => { props.billAllObj.forEach(item => { if (map.has(item.wlNo)) { const existing = map.get(item.wlNo); - existing.totalQty = (parseFloat(existing.totalQty) + parseFloat(item.realQty)); + const total = (parseFloat(existing.totalQty) + parseFloat(item.realQty)) * 100*10000 + existing.totalQty = total / ( 100 * 10000); } else { map.set(item.wlNo, { ...item, diff --git a/src/views/plan/jh/index.vue b/src/views/plan/jh/index.vue index cb44427..7dd35cf 100644 --- a/src/views/plan/jh/index.vue +++ b/src/views/plan/jh/index.vue @@ -294,7 +294,7 @@ - + @@ -309,7 +309,7 @@ - + @@ -804,6 +804,30 @@ function handlePrint(){ // Print.print('printMe'); // showContent.value = false; } +// 合同金额改变 +function htDjChange(e,name) { + console.log(e,form.value,name,'e===>'); + if(e){ + const htDj = form.value?.htDj + const jhQty = form.value?.jhQty + const jhAmt = (Number(htDj) * Number(jhQty)* 100*10000) / ( 100*10000) + console.log(jhAmt,'jhAmt==>'); + if(!(/^-?\d+(\.\d+)?$/.test(e))){ + if(name == 'htDj'){ + proxy.$modal.msgError("合同单价请输入数字"); + return; + } + if(name == 'jhQty'){ + proxy.$modal.msgError("计划交货数量请输入数字"); + return; + } + form.value.jhAmt='' + }else{ + form.value.jhAmt=jhAmt + } + } + +} getList();