From aa8684dfcf2ddbbadbd045770ff540e64c26bbee Mon Sep 17 00:00:00 2001 From: zouyu <2723363702@qq.com> Date: 星期三, 06 三月 2024 17:53:45 +0800 Subject: [PATCH] 销售订单-下载排产单 --- src/views/plan/customerorder/index.vue | 47 ++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 38 insertions(+), 9 deletions(-) diff --git a/src/views/plan/customerorder/index.vue b/src/views/plan/customerorder/index.vue index e69e1ae..6cad8e6 100644 --- a/src/views/plan/customerorder/index.vue +++ b/src/views/plan/customerorder/index.vue @@ -299,6 +299,7 @@ exportCustomerOrderSplit, syncOrder, dropByContractNo, + downloadProduct, downloadWordFile } from '../../../api/plan/customerorder' import DocumentTable from '@/views/common/document.vue' @@ -920,11 +921,18 @@ }) } this.table.toolbar.push({ - text: '涓嬭浇Word', + text: '涓嬭浇宸ヨ壓鏂囦欢', disabled: false, type: 'primary', fun: this.downloadWord, permitArr: ['03plan','04planed'], + }) + this.table.toolbar.push({ + text: '涓嬭浇鎺掍骇鍗�', + disabled: false, + type: 'primary', + permitArr: [], + fun: this.downloadProductionScheduling, }) this.table.toolbar.push({ text: '鍏宠仈璁㈠崟', @@ -949,7 +957,7 @@ cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - checkHanderOrder(val.id).then(res=>{ + checkHanderOrder(val).then(res=>{ if(res.status===200){ this.$message.success("瀹℃牳閫氳繃") this.getData() @@ -993,8 +1001,22 @@ this.interrelatedOrderId = currentOrder.id this.showInterrelatedOrderDialog = true }, - - //涓嬭浇word + //涓嬭浇鎺掍骇閫氱煡鍗� + downloadProductionScheduling(){ + let ids = this.multipleSelection.map(obj => obj.id) + if(ids.length<1){ + this.$message.error("璇烽�夋嫨涓�鏉℃暟鎹�") + return + } + downloadProduct({ids: ids}).then(res=>{ + if(res.status===200){ + transform(res) + } + }).catch(error=>{ + console.error(error) + }) + }, + //涓嬭浇宸ヨ壓鏂囦欢 downloadWord(){ let ids = this.multipleSelection.map(ele=>ele.id) if(ids.length<1){ @@ -1106,16 +1128,23 @@ }, // 鏂板 / 淇敼 addOrUpdateHandle(row) { - this.addOrUpdateVisible = true - this.$nextTick(() => { - this.$refs.addOrUpdate.init(row ? row.id : row) - }) + if(row.isPass){ + this.addOrUpdateVisible = true + this.$nextTick(() => { + this.$refs.addOrUpdate.init(row ? row.id : row) + }) + }else{ + this.addSampleVisible = true + this.$nextTick(() => { + this.$refs.addSampleForm.init(row ? row.contractNo : null) + }) + } }, // 鏂板鏍峰搧璁㈠崟 addSampleCustomerOrder() { this.addSampleVisible = true this.$nextTick(() => { - this.$refs.addSampleForm.init(0) + this.$refs.addSampleForm.init(null) }) }, // 鎵撳紑鏃ユ湡閫夋嫨妗� -- Gitblit v1.9.3