diff --git a/src/api/PurchasingCenter/CreatePurchaseContract.js b/src/api/PurchasingCenter/CreatePurchaseContract.js index 06fb7d44..67c36d98 100644 --- a/src/api/PurchasingCenter/CreatePurchaseContract.js +++ b/src/api/PurchasingCenter/CreatePurchaseContract.js @@ -1,18 +1,28 @@ import request from '@/utils/request' // 初始化供应商 -export function initSupplier(num) { +export function initSupplier() { return request({ url: '', method: 'post', data: { type: '3', - name: `SELECT distinct 供应商流水号,供应商名称 -FROM 采购管理_询价单_视图 -where not EXISTS (select * from 采购管理_采购合同_采购部 where 是否启用 = 1 and 是否未通过 is null and 询价单编号 = 采购合同编号) and 采购员流水号 = ${num}` + name: `SELECT distinct * from 采购管理_供应商` } }) } +// export function initSupplier(num) { +// return request({ +// url: '', +// method: 'post', +// data: { +// type: '3', +// name: `SELECT distinct 供应商流水号,供应商名称 +// FROM 采购管理_询价单_视图 +// where not EXISTS (select * from 采购管理_采购合同_采购部 where 是否启用 = 1 and 是否未通过 is null and 询价单编号 = 采购合同编号) and 采购员流水号 = ${num}` +// } +// }) +// } // 查询询价单列表 表1 export function searchInquirySheet(check1, value1, check2, value2, check3, id, check4, supplier) { return request({ diff --git a/src/views/PurchasingCenter/CreatePurchaseContract/index.vue b/src/views/PurchasingCenter/CreatePurchaseContract/index.vue index 0aa4a8b8..0dc669b0 100644 --- a/src/views/PurchasingCenter/CreatePurchaseContract/index.vue +++ b/src/views/PurchasingCenter/CreatePurchaseContract/index.vue @@ -4,10 +4,10 @@ - - + + @@ -15,10 +15,11 @@ - - + + + @@ -370,6 +371,7 @@ export default { }, fetchData() { initSupplier(this.id).then(res => { + // this.id this.supplier = [] for (let i = 0; i < res.data.length; i++) { this.supplier.push({ @@ -446,6 +448,13 @@ export default { } }) }, + supplierChange9745() { + for (let i = 0; i < this.supplier.length; i++) { + if (this.supplier[i].value === this.supplierValue) { + this.supplierName = this.supplier[i].label + } + } + }, contractChange() { // 选择合同select searchContractHeader(this.contractNumValue).then(response => { this.deliveryDate = response.data[0].交货日期