From 6ac64fea29fa0df01f9d0e70372e086de9725aa1 Mon Sep 17 00:00:00 2001 From: zouyu <2723363702@qq.com> Date: 星期三, 06 三月 2024 19:50:01 +0800 Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/mes-ocea-before --- src/views/plan/customerorder/index.vue | 53 +++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 37 insertions(+), 16 deletions(-) diff --git a/src/views/plan/customerorder/index.vue b/src/views/plan/customerorder/index.vue index 3ae8486..3b0251a 100644 --- a/src/views/plan/customerorder/index.vue +++ b/src/views/plan/customerorder/index.vue @@ -384,7 +384,8 @@ exportCustomerOrderSplit, syncOrder, dropByContractNo, - downloadWordFile, + downloadProduct, + downloadWordFile } from '../../../api/plan/customerorder' import DocumentTable from '@/views/common/document.vue' import { remote } from '@/api/admin/dict' @@ -1036,11 +1037,18 @@ }) } this.table.toolbar.push({ - text: '涓嬭浇Word', - disabled: false, - type: 'primary', - fun: this.downloadWord, - permitArr: ['03plan', '04planed'], + 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: '鍏宠仈璁㈠崟', @@ -1115,16 +1123,29 @@ this.interrelatedOrderId = currentOrder.id this.showInterrelatedOrderDialog = true }, - - //涓嬭浇word - downloadWord() { - let ids = this.multipleSelection.map((ele) => ele.id) - if (ids.length < 1) { - this.$message.error('璇烽�夋嫨涓�鏉℃暟鎹�') - return - } - downloadWordFile(ids) - .then((response) => { + //涓嬭浇鎺掍骇閫氱煡鍗� + 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){ + this.$message.error("璇烽�夋嫨涓�鏉℃暟鎹�") + return + } + downloadWordFile(ids).then(response=>{ // 澶勭悊杩斿洖鐨勬枃浠舵祦 const blob = response.data const link = document.createElement('a') -- Gitblit v1.9.3