优化采购订单的关联逻辑,通过接口来查询单据类型

This commit is contained in:
jishenghua
2024-05-09 22:30:48 +08:00
parent bfdfa889a0
commit 0eb33ad679

View File

@@ -191,7 +191,7 @@
import { FormTypes } from '@/utils/JEditableTableUtil' import { FormTypes } from '@/utils/JEditableTableUtil'
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin' import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import { BillModalMixin } from '../mixins/BillModalMixin' import { BillModalMixin } from '../mixins/BillModalMixin'
import { getCurrentSystemConfig } from '@/api/api' import { findBillDetailByNumber, getCurrentSystemConfig } from '@/api/api'
import { getMpListShort, changeListFmtMinus,handleIntroJs } from "@/utils/util" import { getMpListShort, changeListFmtMinus,handleIntroJs } from "@/utils/util"
import JUpload from '@/components/jeecg/JUpload' import JUpload from '@/components/jeecg/JUpload'
import JDate from '@/components/jeecg/JDate' import JDate from '@/components/jeecg/JDate'
@@ -416,26 +416,31 @@
info.linkId = info.id info.linkId = info.id
this.changeColumnShow(info) this.changeColumnShow(info)
} }
if(linkNumber.indexOf('QGD')===-1) { //根据单号查询单据类型
this.$nextTick(() => { findBillDetailByNumber({'number':linkNumber}).then((res) => {
this.form.setFieldsValue({ if (res.code === 200) {
'linkNumber': linkNumber if(res.data && res.data.subType === '请购单') {
})
})
} else {
//关联请购单 //关联请购单
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue({ this.form.setFieldsValue({
'linkApply': linkNumber 'linkApply': linkNumber
}) })
}) })
} else {
this.$nextTick(() => {
this.form.setFieldsValue({
'linkNumber': linkNumber
})
})
} }
}
})
//给优惠后金额重新赋值 //给优惠后金额重新赋值
discountLastMoney = discountLastMoney?discountLastMoney:0 discountLastMoney = discountLastMoney?discountLastMoney:0
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue({ this.form.setFieldsValue({
'discountLastMoney': discountLastMoney.toFixed(2), 'discountLastMoney': discountLastMoney.toFixed(2),
'changeAmount': discountLastMoney 'changeAmount': discountLastMoney.toFixed(2)
}) })
}) })
this.materialTable.dataSource = selectBillDetailRows this.materialTable.dataSource = selectBillDetailRows