From e789693b116a856f6da406a6a7778e5c935b6242 Mon Sep 17 00:00:00 2001 From: yanyan <513352169@qq.com> Date: Wed, 8 Apr 2026 10:23:40 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A8=8E=E7=8E=87,=20=E4=BB=98=E6=AC=BE?= =?UTF-8?q?=E6=96=B9=E5=BC=8F,=E4=BA=A4=E8=B4=A7=E6=9D=A1=E6=AC=BE,?= =?UTF-8?q?=E8=B4=A7=E5=B8=81,=20=E6=94=B9=E7=94=A8=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E6=A1=86=EF=BC=8C=E9=80=89=E6=8B=A9=E4=BE=9B=E5=BA=94=E5=95=86?= =?UTF-8?q?=E5=92=8C=E7=89=A9=E6=96=99=E7=9A=84=E8=BE=93=E5=85=A5=E6=A1=86?= =?UTF-8?q?=EF=BC=8C=E9=9C=80=E8=A6=81=E5=A2=9E=E5=8A=A0change=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/base/currency.js | 5 + src/api/base/deliveryTerm.js | 5 + src/api/base/paymentTerm.js | 5 + src/api/base/tax.js | 5 + src/api/supplier/purQuotation.js | 4 + .../supplier/com_inquiry_QuotationList.vue | 9 +- src/views/modules/supplier/purDetailList.vue | 1 + src/views/modules/supplier/purHeaderList.vue | 266 ++++++- .../modules/supplier/purReplyHistList.vue | 710 ++++++++++++++++++ 9 files changed, 981 insertions(+), 29 deletions(-) create mode 100644 src/api/base/currency.js create mode 100644 src/api/base/deliveryTerm.js create mode 100644 src/api/base/paymentTerm.js create mode 100644 src/api/base/tax.js create mode 100644 src/views/modules/supplier/purReplyHistList.vue diff --git a/src/api/base/currency.js b/src/api/base/currency.js new file mode 100644 index 0000000..9db08ef --- /dev/null +++ b/src/api/base/currency.js @@ -0,0 +1,5 @@ +import { createAPI } from '@/utils/httpRequest.js' + + +export const searchCurrencyList = (data) => createAPI(`/currency/getCurrencyList`, 'post', data) + diff --git a/src/api/base/deliveryTerm.js b/src/api/base/deliveryTerm.js new file mode 100644 index 0000000..ce5139f --- /dev/null +++ b/src/api/base/deliveryTerm.js @@ -0,0 +1,5 @@ +import { createAPI } from '@/utils/httpRequest.js' + + +export const searchDeliveryList = (data) => createAPI(`/deliveryTerm/getDeliveryList`, 'post', data) + diff --git a/src/api/base/paymentTerm.js b/src/api/base/paymentTerm.js new file mode 100644 index 0000000..55b9ca7 --- /dev/null +++ b/src/api/base/paymentTerm.js @@ -0,0 +1,5 @@ +import { createAPI } from '@/utils/httpRequest.js' + + +export const searchPaymentList = (data) => createAPI(`/paymentTerm/getPaymentList`, 'post', data) + diff --git a/src/api/base/tax.js b/src/api/base/tax.js new file mode 100644 index 0000000..fd3bb05 --- /dev/null +++ b/src/api/base/tax.js @@ -0,0 +1,5 @@ +import { createAPI } from '@/utils/httpRequest.js' + + +export const searchTaxList = (data) => createAPI(`/tax/getTaxList`, 'post', data) + diff --git a/src/api/supplier/purQuotation.js b/src/api/supplier/purQuotation.js index 3c1695a..ae68aec 100644 --- a/src/api/supplier/purQuotation.js +++ b/src/api/supplier/purQuotation.js @@ -16,3 +16,7 @@ export const deleteMaterial = (data) => createAPI(`/supplier/delPurDetail`, 'pos //询价查询接口 export const searchPurDetailList = (data) => createAPI(`/supplier/getPurDetailPage`, 'post', data) + + +//新增报价 +export const createPurPeplyHist = (data) => createAPI(`/supplier/savePurReplyHist`, 'post', data) diff --git a/src/views/modules/supplier/com_inquiry_QuotationList.vue b/src/views/modules/supplier/com_inquiry_QuotationList.vue index 11b716d..62cde67 100644 --- a/src/views/modules/supplier/com_inquiry_QuotationList.vue +++ b/src/views/modules/supplier/com_inquiry_QuotationList.vue @@ -12,7 +12,7 @@ 查询 - 新增 + @@ -201,6 +201,7 @@ export default { page: 1, limit: 1000 }, + type: 'add', // 假设类型 dialogVisible: false, dialogTitle: '新增报价记录', formData: { @@ -253,6 +254,12 @@ export default { ] } }, + computed: { + shouldShowButton() { + // 根据类型返回布尔值 + return this.type === 'add'; + } +}, methods: { // 初始化方法,供父组件调用 init(inData) { diff --git a/src/views/modules/supplier/purDetailList.vue b/src/views/modules/supplier/purDetailList.vue index 400521e..260f485 100644 --- a/src/views/modules/supplier/purDetailList.vue +++ b/src/views/modules/supplier/purDetailList.vue @@ -320,6 +320,7 @@ export default { this.$refs.quotationList.init({ orderNo: this.currentRow.orderNo, itemNo: this.currentRow.itemNo, + type: 'view', height: this.tabHeight }) } diff --git a/src/views/modules/supplier/purHeaderList.vue b/src/views/modules/supplier/purHeaderList.vue index 7c3e89c..a875c30 100644 --- a/src/views/modules/supplier/purHeaderList.vue +++ b/src/views/modules/supplier/purHeaderList.vue @@ -112,12 +112,12 @@ 供应商编码 - + - + @@ -139,9 +139,30 @@ - + - + + + + + + + + + + + + + + @@ -154,19 +175,31 @@ - + + + + + - + - - - - - - + + + + + + @@ -184,14 +217,7 @@ - - - - - - - - + @@ -221,7 +247,7 @@ 物料编码 - + @@ -398,6 +424,29 @@ import { downLoadObjectFile } from "../../../api/oss/oss"; +import { + searchTaxList +} from "@/api/base/tax.js"; + +import { + searchCurrencyList +} from "@/api/base/currency.js"; + +import { + searchPaymentList +} from "@/api/base/paymentTerm.js"; + + +import { + searchDeliveryList +} from "@/api/base/deliveryTerm.js"; + +// 添加物料信息查询接口 +import { + searchPartInfo +} from '@/api/part/partInfo.js' + + export default { components: { Chooselist @@ -411,6 +460,10 @@ export default { submitLoading: false, materialLoading: false, materialSubmitLoading: false, + taxLoading: false, + currencyLoading: false, + pamentLoading: false, + deliveryLoading: false, dataList: [], pageIndex: 1, pageSize: 20, @@ -422,10 +475,32 @@ export default { supplierName: '', status: '' }, + taxList: [], + taxForm: { + taxRate: '', + taxCode: null, + taxDesc: '' + }, + currencyList: [], + currencyForm: { + currency: '', + currencyDesc: '' + }, + paymentList: [], + paymentForm: { + paymentTermId: '', + paymentTerm: '' + }, + deliveryList: [], + deliveryForm: { + deliveryTermId:'', + deliveryTerm:'' + }, dialogVisible: false, dialogTitle: '新增询价单', editMode: false, form: { + id: '', paymentTermDesc: '', deliveryTermDesc: '', currency: '', @@ -493,6 +568,10 @@ export default { // this.calcHeight() // window.addEventListener('resize', this.calcHeight) this.getList() + this.getTaxList() + this.getCurrencyList() + this.getPamentList() + this.getDeliveryList() }, beforeDestroy() { // window.removeEventListener('resize', this.calcHeight) @@ -539,12 +618,26 @@ export default { this.materialForm.partNo = val.part_no this.materialForm.partDesc = val.part_desc this.materialForm.spec = val.part_spec + this.materialForm.umid = val.unit + this.getPartInfo() } if (this.tagNo === 510) { this.materialForm.umid = val.UMID } }, + // 供应商编码变化时触发,自动带出供应商信息 + handleSupplierIdChange(val) { + if (!val || val.trim() === '') { + return + } + // 调用查询供应商信息接口 + const params = { + site: this.$store.state.user.site, + supplierNo: val.trim() + } + this.searchSupplierInfo() + }, searchSupplierInfo() { const params = { site: this.$store.state.user.site, @@ -557,13 +650,13 @@ export default { this.form.phoneNo = data.row.phoneNo || this.form.phoneNo this.form.faxNo = data.row.faxNo || this.form.faxNo this.form.contact = data.row.contact || this.form.contact - this.form.taxRate = data.row.taxRate || this.form.taxRate - this.form.taxCode = data.row.taxCode || this.form.taxCode - this.form.paymentTerm = data.row.paymentTerm || this.form.paymentTerm - this.form.paymentTermDesc = data.row.paymentTermDesc || this.form.paymentTermDesc - this.form.deliveryTerm = data.row.deliveryTerm || this.form.deliveryTerm - this.form.deliveryTermDesc = data.row.deliveryTermDesc || this.form.deliveryTermDesc - this.form.currency = data.row.currency || this.form.currency + this.taxForm.taxRate = data.row.taxRate || this.taxForm.taxRate + this.taxForm.taxCode = data.row.taxCode || this.taxForm.taxCode + this.paymentForm.paymentTermId = data.row.paymentTerm || this.paymentForm.paymentTermId + this.paymentForm.paymentTerm = data.row.paymentTermDesc || this.paymentForm.paymentTerm + this.deliveryForm.deliveryTermId = data.row.deliveryTerm || this.deliveryForm.deliveryTermId + this.deliveryForm.deliveryTerm = data.row.deliveryTermDesc || this.deliveryForm.deliveryTerm + this.currencyForm.currency = data.row.currency || this.currencyForm.currency } else { this.$message.error((data && data.msg) || '获取列表失败') } @@ -617,6 +710,84 @@ export default { this.currentInquiry = row this.loadMaterialList(row.orderNo) }, + + //加载税率列表 + getTaxList() { + this.taxLoading = true + searchTaxList({ + site: this.$store.state.user.site + }).then(({data}) => { + if (data.code === 0) { + this.taxList = data.rows || [] + } else { + this.taxList = [] + } + this.taxLoading = false + }).catch(() => { + this.taxList = [] + this.taxLoading = false + this.$message.error('获取税率列表失败') + }) + }, + //加载货币列表 + getCurrencyList() { + this.currencyLoading = true + searchCurrencyList({ + site: this.$store.state.user.site + }).then(({data}) => { + if (data.code === 0) { + this.currencyList = data.rows || [] + } else { + this.currencyList = [] + } + this.currencyLoading = false + }).catch(() => { + this.currencyList = [] + this.currencyLoading = false + this.$message.error('获取货币列表失败') + }) + }, + + //加载付款方式列表 + getPamentList() { + this.pamentLoading = true + searchPaymentList({ + site: this.$store.state.user.site + }).then(({data}) => { + if (data.code === 0) { + this.paymentList = data.rows || [] + } else { + this.paymentList = [] + } + this.pamentLoading = false + }).catch(() => { + this.paymentList = [] + this.pamentLoading = false + this.$message.error('获取付款方式列表失败') + }) + }, + + //加载交易条款列表 + getDeliveryList() { + this.deliveryLoading = true + searchDeliveryList({ + site: this.$store.state.user.site + }).then(({data}) => { + if (data.code === 0) { + this.deliveryList = data.rows || [] + } else { + this.deliveryList = [] + } + this.deliveryLoading = false + }).catch(() => { + this.deliveryList = [] + this.deliveryLoading = false + this.$message.error('获取交易条款列表失败') + }) + }, + + + // 加载物料列表 loadMaterialList(orderNo) { this.materialLoading = true @@ -643,6 +814,7 @@ export default { this.editMode = false const today = this.getTodayDate() this.form = { + id: '', site: this.$store.state.user.site, orderNo: '', supplierId: '', @@ -698,6 +870,9 @@ export default { this.submitLoading = false }) }, + + + handleDelete(row) { this.$confirm('确定删除询价单: ' + row.orderNo + ' ?', '提示', { type: 'warning' }).then(() => { deletePurHeader({ id: row.id }).then(({data}) => { @@ -757,6 +932,41 @@ export default { } this.materialDialogVisible = true }, + // 物料编码变化时触发,自动带出物料信息 + handlePartNoChange(val) { + if (!val || val.trim() === '') { + return + } + + // 假设有一个 getPartInfo 接口 + this.getPartInfo() + }, + + getPartInfo(){ + // 调用物料信息查询接口 + const params = { + site: this.$store.state.user.site, + partNo: this.materialForm.partNo + } + searchPartInfo(params).then(({data}) => { + console.log(data) + if (data.code === 0) { + // 自动填充物料相关信息 + this.materialForm.partNo = data.data.partNo || val + this.materialForm.partDesc = data.data.partDesc || this.materialForm.partDesc + this.materialForm.spec = data.data.partSpec || this.materialForm.spec + this.materialForm.umid = data.data.unit || this.materialForm.umid + + this.$message.success('已自动获取物料信息') + } else { + this.$message.warning('未找到该物料信息,请手动填写') + } + }).catch(() => { + this.$message.error('获取物料信息失败') + }) + }, + + saveMaterial() { if (!this.materialForm.partNo) { this.$message.warning('物料编码不能为空') diff --git a/src/views/modules/supplier/purReplyHistList.vue b/src/views/modules/supplier/purReplyHistList.vue new file mode 100644 index 0000000..8795baa --- /dev/null +++ b/src/views/modules/supplier/purReplyHistList.vue @@ -0,0 +1,710 @@ + + + + + \ No newline at end of file