From 3ad7c3118e2ed9dcffcec4117952826e3bca871c Mon Sep 17 00:00:00 2001 From: Vergil <974548713@qq.com> Date: Tue, 7 Apr 2020 10:04:01 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E7=A6=BB=E7=BA=BF=E5=90=88=E5=90=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/PurchasingCenter/OfflineContract.js | 3 +-- src/views/PurchasingCenter/OfflineContract/index.vue | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/api/PurchasingCenter/OfflineContract.js b/src/api/PurchasingCenter/OfflineContract.js index c4f07a15..1b1a3081 100644 --- a/src/api/PurchasingCenter/OfflineContract.js +++ b/src/api/PurchasingCenter/OfflineContract.js @@ -296,8 +296,7 @@ export function searchMaterial22(check1, val1, pageCurrent, pageSize) { ModularID: router.currentRoute.path, type: '1', name: '采购管理_离线采购_物料主文件_基本_查询数据', - param: `名称规格型号_check=${check1}&名称规格型号=${val1}`, - Pagination: pageCurrent + '&' + pageSize + param: `名称规格型号_check=${check1}&名称规格型号=${val1}&PageCurrent=${pageCurrent}&PageSize=${pageSize}&PageCount=1111=int=output&ItemCount=1111=int=output` } }) } diff --git a/src/views/PurchasingCenter/OfflineContract/index.vue b/src/views/PurchasingCenter/OfflineContract/index.vue index 6fd0ea20..bff4e020 100644 --- a/src/views/PurchasingCenter/OfflineContract/index.vue +++ b/src/views/PurchasingCenter/OfflineContract/index.vue @@ -1668,12 +1668,12 @@ export default { this.loading2 = true searchMaterial22(check1, this.materialName, this.pageCurrent22, this.pageSize22).then(response => { console.log(response.data, 3333) - this.tableData22 = response.data.rows - this.total22 = response.data.total + this.tableData22 = response.data.result + this.total22 = parseInt(response.data.output[0].ItemCount) const supplier = [] this.remarkFilters = [] this.supplierFilters = [] - response.data.rows.map(v => { + response.data.result.map(v => { if (v.供货商 === null) { v.供货商 = '' } if (!supplier.includes(v.供货商)) { supplier.push(v.供货商) From 7756bc0b3b4f78791df6541942a4dc400db44d1f Mon Sep 17 00:00:00 2001 From: Vergil <974548713@qq.com> Date: Tue, 7 Apr 2020 15:24:10 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E9=87=87=E8=B4=AD=E9=83=A8=E9=87=87?= =?UTF-8?q?=E8=B4=AD=E7=A6=81=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BacklogGoodsAnalysis/index.vue | 9 ++++-- .../CreateInquirySheet/index.vue | 25 ++++++++++++++-- .../CreatePurchaseContract/index.vue | 8 +++++ .../InvoiceSettlementApplication/index.vue | 7 +++-- .../OfflineContract/index.vue | 29 +++++++++++++++---- .../OfflineContractRequestFund/index.vue | 8 ++++- .../SupplierManagement/index.vue | 29 +++++++++++++------ 7 files changed, 91 insertions(+), 24 deletions(-) diff --git a/src/views/PurchasingCenter/BacklogGoodsAnalysis/index.vue b/src/views/PurchasingCenter/BacklogGoodsAnalysis/index.vue index 38533a46..a3496ec8 100644 --- a/src/views/PurchasingCenter/BacklogGoodsAnalysis/index.vue +++ b/src/views/PurchasingCenter/BacklogGoodsAnalysis/index.vue @@ -133,10 +133,10 @@ 转为滞货数量: - + @@ -149,6 +149,7 @@ export default { name: 'BacklogGoodsAnalysis', data() { return { + turnToBacklogGoods_diaable: false, materialName: '', materialSpec: '', materialModel: '', @@ -200,13 +201,15 @@ export default { }, turnToBacklogGoods(row) { this.number = 0 - this.dialogFormVisible = true + this.turnToBacklogGoods_diaable = false this.maxNumber = row.可转滞货数量 this.materialNum = row.物料流水号 this.materialLocalNum = row.物料与货位对照流水号 this.localNum = row.货位流水号 + this.dialogFormVisible = true }, submitTurn() { + this.turnToBacklogGoods_diaable = true submitTurn(this.materialNum, this.number, this.materialLocalNum, this.localNum).then(response => { if (response.data[0].result === '1') { this.searchTable1() diff --git a/src/views/PurchasingCenter/CreateInquirySheet/index.vue b/src/views/PurchasingCenter/CreateInquirySheet/index.vue index 54b7be4b..374b5f59 100644 --- a/src/views/PurchasingCenter/CreateInquirySheet/index.vue +++ b/src/views/PurchasingCenter/CreateInquirySheet/index.vue @@ -80,7 +80,7 @@ - 调整采购任务 + 调整采购任务 取消 { if (response.data[0].result === '1') { this.$message.success('调整成功') this.searchTable11() + this.tiaozheng1_disable = false } else { this.$message.warning('调整失败') } @@ -1989,6 +1994,7 @@ export default { submitCreateInquirySheet() { // 提交创建询价单 this.$refs['form2'].validate((valid) => { if (valid) { + this.createInquirySheet_disable = true const numGroup1 = [] // 空数组,放现有的询价单号 searchCreateInquirySheet2().then(response => { // 先查询判断是否存在 for (let i = 0; i < response.data.length; i++) { @@ -1996,6 +2002,7 @@ export default { } }).then(() => { if (numGroup1.indexOf(this.form2.inquirySheetNum) !== -1) { + this.createInquirySheet_disable = false this.$message.error('该询价单号已存在') } else { createInquirySheet(this.form2.inquirySheetNum, this.id, this.form2.supplierValue, '').then(response => { @@ -2006,6 +2013,7 @@ export default { this.supplierValue = '' this.dialogVisible2 = false this.searchTable2() + this.createInquirySheet_disable = false } else { this.$message.error('操作失败') } }) } @@ -2019,6 +2027,7 @@ export default { submitCreateInquirySheet1() { // 提交创建询价单 this.$refs['form2'].validate((valid) => { if (valid) { + this.createInquirySheet_disable = true createInquirySheet(this.form2.inquirySheetNum, this.id, this.form2.supplierNameValue, '').then(response => { if (!(response.data)) { this.$message.success('创建成功') @@ -2029,7 +2038,11 @@ export default { this.dialogVisible2 = false this.inquirySheetNum = this.form2.inquirySheetNum this.searchTable2(this.inquirySheetNum) - } else { this.$message.error('操作失败!该询价单已存在,请重新输入') } + this.createInquirySheet_disable = false + } else { + this.$message.error('操作失败!该询价单已存在,请重新输入') + this.createInquirySheet_disable = false + } }) } }) @@ -2084,6 +2097,7 @@ export default { submitEditInquirySheet() { // 提交编辑询价单 this.$refs['form2'].validate((valid) => { if (valid) { + this.createInquirySheet_disable = true const numGroup1 = [] // 空数组,放现有的询价单号 const numGroup2 = [] // 空数组,放现有的询价单流水号 searchCreateInquirySheet2().then(response => { // 先查询判断是否存在 @@ -2094,6 +2108,7 @@ export default { }).then(() => { if (numGroup1.indexOf(this.form2.inquirySheetNum) !== -1 && numGroup1.indexOf(this.form2.inquirySheetNum) !== numGroup2.indexOf(parseInt(this.form2.inquirySheetNumValue))) { this.$message.error('该询价单号已存在') + this.createInquirySheet_disable = false } else { editInquirySheet(this.form2.inquirySheetNumValue, this.form2.inquirySheetNum, this.form2.supplierNameValue).then(response => { if (response.data[0].result === '1') { @@ -2103,7 +2118,11 @@ export default { this.supplierValue = '' this.dialogVisible2 = false this.searchTable2() - } else { this.$message.error('修改失败') } + this.createInquirySheet_disable = false + } else { + this.$message.error('修改失败') + this.createInquirySheet_disable = false + } }) } }) diff --git a/src/views/PurchasingCenter/CreatePurchaseContract/index.vue b/src/views/PurchasingCenter/CreatePurchaseContract/index.vue index 5f557e88..8269b12a 100644 --- a/src/views/PurchasingCenter/CreatePurchaseContract/index.vue +++ b/src/views/PurchasingCenter/CreatePurchaseContract/index.vue @@ -178,6 +178,7 @@ export default { inject: ['reload'], data() { return { + generateContract_disabed: true, isShowN: false, loading: false, openDeal: true, @@ -856,6 +857,7 @@ export default { // this.content = `自定义` // }, generateContract() { // 生成采购合同 + this.generateContract_disabed = true for (let i = 0; i < this.tableData1.length; i++) { if (this.tableData1[i].含税单价 === '') { console.log(this.tableData1[i].含税单价, '含税单价') @@ -863,6 +865,7 @@ export default { } } if (this.count === this.tableData1.length) { + this.generateContract_disabed = false this.$message.error('该合同未绑定物料信息') } else { this.content = this.contentNew.replace(/ /g, '') @@ -899,8 +902,10 @@ export default { this.$message.success('合同生成成功') this.openDeal = true this.reload() + this.generateContract_disabed = false } else { this.$message.error('生成合同失败') + this.generateContract_disabed = false } }) }).catch(() => { @@ -908,11 +913,14 @@ export default { type: 'info', message: '已取消操作' }) + this.generateContract_disabed = false }) } else { + this.generateContract_disabed = false this.$message.warning('请先选择模板进行预览') } } else { + this.generateContract_disabed = false this.$message.warning('请先选择合同进行编辑') } } diff --git a/src/views/PurchasingCenter/InvoiceSettlementApplication/index.vue b/src/views/PurchasingCenter/InvoiceSettlementApplication/index.vue index 825f1d35..8127b322 100644 --- a/src/views/PurchasingCenter/InvoiceSettlementApplication/index.vue +++ b/src/views/PurchasingCenter/InvoiceSettlementApplication/index.vue @@ -278,8 +278,8 @@ @@ -400,6 +400,7 @@ export default { name: '', // 发票结算申请 data() { return { + submitAdd1_disable: false, dateRange: '', pickerOptions: { shortcuts: [{ @@ -518,6 +519,7 @@ export default { this.form1.isCost = '' this.form1.remark = '' this.title1 = '到票结算申请' + this.submitAdd1_disable = false this.dialogVisible1 = true }, searchTable1() { @@ -542,6 +544,7 @@ export default { submitAdd1() { // 提交新增 this.$refs['form1'].validate((valid) => { if (valid) { + this.submitAdd1_disable = true insertInto(this.form1.invoiceNum, this.form1.money, this.form1.supplierValue, this.form1.paid, this.form1.unpaid, this.form1.tax, this.form1.isCost, this.form1.remark).then(response => { if (response.data[0].result === '1') { this.$message.success('增加成功') diff --git a/src/views/PurchasingCenter/OfflineContract/index.vue b/src/views/PurchasingCenter/OfflineContract/index.vue index bff4e020..afffe14a 100644 --- a/src/views/PurchasingCenter/OfflineContract/index.vue +++ b/src/views/PurchasingCenter/OfflineContract/index.vue @@ -26,7 +26,7 @@ start-placeholder="开始日期" end-placeholder="结束日期"/> 查询 - 调整采购任务 + 调整采购任务 确定 { if (response.data[0].result === '1') { this.$message.success('调整成功') this.searchTable11() + this.tiaozheng1_disable = false } else { this.$message.warning('调整失败') + this.tiaozheng1_disable = false } }) } else { @@ -1104,6 +1112,7 @@ export default { this.form2.供应商名称 = '' this.form2.规定到货时间 = '' this.form2.离线合同备注 = '付款方式:;付款时间:;到货时间:;开票信息:;其他说明:;' + this.submitAddOfflineContract_disable = false this.dialogVisible2 = true }) }, @@ -1117,9 +1126,11 @@ export default { } }) }, - submitAddOfflineContract() { // 新建离线合同 + // 新建离线合同 + submitAddOfflineContract() { this.$refs['form2'].validate((valid) => { if (valid) { + this.submitAddOfflineContract_disable = true const numGroup1 = [] // 空数组,放现有的询价单号 searchOfflineContract2().then(response => { // 先查询判断是否存在 for (let i = 0; i < response.data.length; i++) { @@ -1131,11 +1142,13 @@ export default { } else { addOfflineContract(this.form2.离线合同编号, this.form2.离线合同名称, this.form2.供应商流水号, this.id, this.form2.规定到货时间, this.form2.离线合同备注).then(response => { if (response.data[0].result === '1') { + this.dialogVisible2 = false this.$message.success('新建离线合同成功') this.offlineContract = this.form2.离线合同编号 this.searchTable2(this.offlineContract) - this.dialogVisible2 = false - } else { this.$message.error('新建离线合同失败') } + } else { + this.$message.error('新建离线合同失败') + } }) } }) @@ -1157,11 +1170,13 @@ export default { this.form2.供应商名称 = row.供应商名称 this.form2.规定到货时间 = row.规定到货时间 this.form2.离线合同备注 = row.离线合同备注 + this.submitEditOfflineContract_disable = false this.dialogVisible2 = true }, submitEditOfflineContract() { this.$refs['form2'].validate((valid) => { if (valid) { + this.submitEditOfflineContract_disable = true const numGroup1 = [] // 空数组,放现有的离线合同号 const numGroup2 = [] // 空数组,放现有的离线合同流水号 searchOfflineContract2().then(response => { // 先查询判断是否存在 @@ -1175,10 +1190,12 @@ export default { } else { editOfflineContract(this.form2.离线合同流水号, this.form2.离线合同编号, this.form2.离线合同名称, this.form2.供应商流水号, this.id, this.form2.规定到货时间, this.form2.离线合同备注).then(response => { if (response.data[0].result === '1') { + this.dialogVisible2 = false this.$message.success('修改离线合同成功') this.searchTable2() - this.dialogVisible2 = false - } else { this.$message.error('修改离线合同失败') } + } else { + this.$message.error('修改离线合同失败') + } }) } }) diff --git a/src/views/PurchasingCenter/OfflineContractRequestFund/index.vue b/src/views/PurchasingCenter/OfflineContractRequestFund/index.vue index 02fd9bd2..cc9bbb19 100644 --- a/src/views/PurchasingCenter/OfflineContractRequestFund/index.vue +++ b/src/views/PurchasingCenter/OfflineContractRequestFund/index.vue @@ -247,7 +247,7 @@ 合计: - 确定请款 + 确定请款 @@ -195,6 +195,7 @@ import { timeToStamp, numSubtract } from '@/utils/tool' export default { data() { return { + requestFund_disabe: false, selectContents: [], getDate: null, tableData0: [], @@ -316,11 +317,13 @@ export default { this.totalDebt = this.totalSum - this.totalPay }) }, - requestFund() { // 请款 - this.dialogVisible2 = true + // 请款 + requestFund() { this.supplierValue = '' this.fetchData() // 重新获取供应商 this.tableData01 = [] + this.requestFund_disabe = false + this.dialogVisible2 = true }, searchTable01() { // 查询待请款 if (this.supplierValue) { @@ -359,6 +362,7 @@ export default { }, submitRequestFund() { // 确认请款 if (this.supplierValue && this.contractGroup.length !== 0) { + this.requestFund_disabe = true this.SUM = 0 this.contractGroup = [] this.sumGroup = [] @@ -372,6 +376,7 @@ export default { } } if (this.SUM === 0) { + this.requestFund_disabe = false this.$message.error('请款金额不能为0') } else { submitRequestFund(this.contractGroup, this.sumGroup, this.supplierValue, this.SUM, this.id).then(response => {