From 0eb33ad679009a155a9afd3450332dd174393069 Mon Sep 17 00:00:00 2001 From: jishenghua <752718920@qq.com> Date: Thu, 9 May 2024 22:30:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=87=87=E8=B4=AD=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E7=9A=84=E5=85=B3=E8=81=94=E9=80=BB=E8=BE=91=EF=BC=8C?= =?UTF-8?q?=E9=80=9A=E8=BF=87=E6=8E=A5=E5=8F=A3=E6=9D=A5=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=8D=95=E6=8D=AE=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/bill/modules/PurchaseOrderModal.vue | 37 +++++++++++-------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/jshERP-web/src/views/bill/modules/PurchaseOrderModal.vue b/jshERP-web/src/views/bill/modules/PurchaseOrderModal.vue index 18416fbe..5ad692b5 100644 --- a/jshERP-web/src/views/bill/modules/PurchaseOrderModal.vue +++ b/jshERP-web/src/views/bill/modules/PurchaseOrderModal.vue @@ -191,7 +191,7 @@ import { FormTypes } from '@/utils/JEditableTableUtil' import { JEditableTableMixin } from '@/mixins/JEditableTableMixin' import { BillModalMixin } from '../mixins/BillModalMixin' - import { getCurrentSystemConfig } from '@/api/api' + import { findBillDetailByNumber, getCurrentSystemConfig } from '@/api/api' import { getMpListShort, changeListFmtMinus,handleIntroJs } from "@/utils/util" import JUpload from '@/components/jeecg/JUpload' import JDate from '@/components/jeecg/JDate' @@ -416,26 +416,31 @@ info.linkId = info.id this.changeColumnShow(info) } - if(linkNumber.indexOf('QGD')===-1) { - this.$nextTick(() => { - this.form.setFieldsValue({ - 'linkNumber': linkNumber - }) - }) - } else { - //关联请购单 - this.$nextTick(() => { - this.form.setFieldsValue({ - 'linkApply': linkNumber - }) - }) - } + //根据单号查询单据类型 + findBillDetailByNumber({'number':linkNumber}).then((res) => { + if (res.code === 200) { + if(res.data && res.data.subType === '请购单') { + //关联请购单 + this.$nextTick(() => { + this.form.setFieldsValue({ + 'linkApply': linkNumber + }) + }) + } else { + this.$nextTick(() => { + this.form.setFieldsValue({ + 'linkNumber': linkNumber + }) + }) + } + } + }) //给优惠后金额重新赋值 discountLastMoney = discountLastMoney?discountLastMoney:0 this.$nextTick(() => { this.form.setFieldsValue({ 'discountLastMoney': discountLastMoney.toFixed(2), - 'changeAmount': discountLastMoney + 'changeAmount': discountLastMoney.toFixed(2) }) }) this.materialTable.dataSource = selectBillDetailRows