From d9e3845749b028b104dc724838beb26a64b1b108 Mon Sep 17 00:00:00 2001 From: zouyu <2723363702@qq.com> Date: 星期五, 05 一月 2024 13:27:46 +0800 Subject: [PATCH] 销售订单-下载按钮修改 --- src/views/plan/customerorder/index.vue | 81 ++++++++++++++-------------------------- 1 files changed, 28 insertions(+), 53 deletions(-) diff --git a/src/views/plan/customerorder/index.vue b/src/views/plan/customerorder/index.vue index 159596c..8602ff0 100644 --- a/src/views/plan/customerorder/index.vue +++ b/src/views/plan/customerorder/index.vue @@ -53,8 +53,7 @@ style="margin-left:10px;" type="primary" @click="()=>exportDialogVisible=true" - >瀵煎嚭鍙拌处</el-button - > + >瀵煎嚭鍙拌处</el-button> </template> </ttable> <!-- 寮圭獥, 鏃ユ湡閫夋嫨 --> @@ -273,7 +272,8 @@ exportCustomerOrder, exportCustomerOrderSplit, syncOrder, - dropByContractNo + dropByContractNo, + downloadWordFile } from '../../../api/plan/customerorder' import DocumentTable from '@/views/common/document.vue' import { remote } from '@/api/admin/dict' @@ -285,6 +285,7 @@ export default { data() { return { + uniqueStateArr: [], dataForm: { selectTime: null, exportTime: null @@ -414,6 +415,7 @@ width: '100px', prop: 'contractNo', label: '鍚堝悓缂栧彿', + sort: true, isTrue: true, isSearch: true, searchInfoType: 'text', @@ -818,36 +820,6 @@ created() { // this.getManufactureAttrs() this.getTitles() - /** - * { - text: '鑾峰彇閿�鍞鍗�', - type: 'primary', - fun: this.pullCustomerOrder, - disabled: false, - permitArr: [] - }, - { - text: '鑾峰彇IFS琛屽彿', - type: 'primary', - fun: this.pullIfsLineNo, - disabled: false, - permitArr: [], - loading: false - }, - { - text: '鎻愪氦瀹℃牳', - type: 'primary', - fun: this.auditCustomerOrder, - disabled: false, - permitArr: [], - loading: false - }, - { - text: '涓荤敓浜ц鍒�', - disabled: false, - fun: this.masterPlanHandle - } - */ this.table.toolbar.push({ text: '鏂板閿�鍞鍗�', type: 'primary', @@ -855,14 +827,6 @@ disabled: false, permitArr: [] }) - // this.table.toolbar.push({ - // text: '鍚屾ERP', - // type: 'primary', - // fun: this.syncERP, - // loading: false, - // disabled: false, - // permitArr: [] - // }) if (this.permissions.customerorder_from_otc) { this.table.toolbar.push({ text: '鑾峰彇閿�鍞鍗�', @@ -872,16 +836,6 @@ permitArr: [] }) } - // if (this.permissions.customerorder_ifs_line) { - // this.table.toolbar.push({ - // text: '鑾峰彇ERP琛屽彿', - // type: 'primary', - // fun: this.pullIfsLineNo, - // disabled: false, - // permitArr: [], - // loading: false - // }) - // } if (this.permissions.customerorder_submit_oa) { this.table.toolbar.push({ text: '鎻愪氦瀹℃牳', @@ -897,18 +851,38 @@ text: '璁剧疆閿�鍞欢', type: 'primary', fun: this.setSalesPart, - disabled: false + disabled: false, + permitArr: [] }) } if (this.permissions.customerorder_create_masterplan) { this.table.toolbar.push({ text: '涓荤敓浜ц鍒�', disabled: false, - fun: this.masterPlanHandle + fun: this.masterPlanHandle, + permitArr: [] }) } + this.table.toolbar.push({ + text: '涓嬭浇Word', + disabled: false, + type: 'primary', + fun: this.downloadWordFile, + permitArr: ['03plan','04planed'], + }) }, methods: { + //涓嬭浇word + downloadWord(){ + let ids = this.multipleSelection.map(ele=>ele.id) + if(ids.length<1){ + this.$message.error("璇烽�夋嫨涓�鏉℃暟鎹�") + return + } + downloadWordFile(ids).then().catch(error=>{ + console.error(error); + }) + }, getOtcPartSyncOptionList() { return this.otcPartSyncOptionList }, @@ -1211,6 +1185,7 @@ uniqueStateArr.push(stateArr[i]) } } + console.log(uniqueStateArr); // 寰幆鑷畾涔夋寜閽紝鍒ゆ柇姣忎釜鎸夐挳鐨刾ermitArr鏄惁瀹屽叏鍖呭惈閫変腑鐘舵�侊紝鑻ュ畬鍏ㄥ寘鍚紝鍒欐寜閽寒锛屽惁鍒欐寜閽伆 for (var i = 0; i < this.stateTagArr.length; i++) { if ( -- Gitblit v1.9.3