From 82a0439f46b893e008ce9156ab172fb3de7f1060 Mon Sep 17 00:00:00 2001 From: zss <zss@example.com> Date: 星期五, 12 四月 2024 14:15:39 +0800 Subject: [PATCH] 表单修改 --- src/views/plan/customerorder/index.vue | 80 ++++++++++++++++++++++++++++++--------- 1 files changed, 61 insertions(+), 19 deletions(-) diff --git a/src/views/plan/customerorder/index.vue b/src/views/plan/customerorder/index.vue index 3ae8486..70957f3 100644 --- a/src/views/plan/customerorder/index.vue +++ b/src/views/plan/customerorder/index.vue @@ -11,6 +11,7 @@ :toolbarMaxLength="4" :paramArr="type" ref="customerOrderTable" + :expandRowKeys="expandRowKeys" > <template #toolbar> <el-dropdown @@ -57,6 +58,12 @@ @click="() => (exportDialogVisible = true)" >瀵煎嚭鍙拌处</el-button > + <!-- <el-button + style="margin-left: 10px" + type="primary" + @click="() => ($refs.technology.init())" + >缂栧啓鎶�鏈氦搴曞崟</el-button + > --> </template> </ttable> <!-- 寮圭獥, 鏃ユ湡閫夋嫨 --> @@ -347,6 +354,7 @@ ></el-table-column> </el-table> </el-dialog> + <technology-form ref="technology"></technology-form> </div> </template> @@ -358,6 +366,7 @@ } from '@/api/plan/customerOrderInterrelated' import ConfirmPullCustomerorder from './confirm-pull-customerorder' import TableForm from './customerorder-form' +import TechnologyForm from './technology-form.vue' import TableFormDEesc from './customerorder-form-desc' import SampleTableForm from './sample-customerorder-form' import { mapGetters } from 'vuex' @@ -384,7 +393,8 @@ exportCustomerOrderSplit, syncOrder, dropByContractNo, - downloadWordFile, + downloadProduct, + downloadWordFile } from '../../../api/plan/customerorder' import DocumentTable from '@/views/common/document.vue' import { remote } from '@/api/admin/dict' @@ -399,11 +409,13 @@ interrelatedOrderId: null, interrelatedOrderData: [], showInterrelatedOrderDialog: false, + technologyDialog:true, uniqueStateArr: [], dataForm: { selectTime: null, exportTime: null, }, + expandRowKeys: [], dataRule: { exportTime: [ { required: true, message: '瀵煎嚭鏃ユ湡涓嶈兘涓虹┖', trigger: 'change' }, @@ -585,7 +597,7 @@ sort: true, isTrue: true, isSearch: true, - searchInfoType: 'text', + searchInfoType: 'date', formatter: this.formatDutyDate, }, { @@ -962,6 +974,7 @@ SalesPartBatchDialog, TableFormDEesc, CustomerorderReturnDialog, + TechnologyForm, }, computed: { ...mapGetters(['permissions']), @@ -1000,6 +1013,7 @@ created() { // this.getManufactureAttrs() this.getTitles() + if (this.permissions.plan_customerorder_add) { this.table.toolbar.push({ text: '鏂板閿�鍞鍗�', type: 'primary', @@ -1007,6 +1021,7 @@ disabled: false, permitArr: [], }) + } if (this.permissions.customerorder_from_otc) { this.table.toolbar.push({ text: '鑾峰彇閿�鍞鍗�', @@ -1035,13 +1050,25 @@ permitArr: [], }) } - this.table.toolbar.push({ - text: '涓嬭浇Word', - disabled: false, - type: 'primary', - fun: this.downloadWord, - permitArr: ['03plan', '04planed'], - }) + if(this.permissions.plan_download_process_file){ + this.table.toolbar.push({ + text: '涓嬭浇宸ヨ壓鏂囦欢', + disabled: false, + type: 'primary', + fun: this.downloadWord, + permitArr: ['03plan','04planed'], + }) + } + if(this.permissions.plan_download_product_file){ + this.table.toolbar.push({ + text: '涓嬭浇鎺掍骇鍗�', + disabled: false, + type: 'primary', + permitArr: [], + fun: this.downloadProductionScheduling, + }) + } + if(this.permissions.plan_relevance_order){ this.table.toolbar.push({ text: '鍏宠仈璁㈠崟', disabled: false, @@ -1049,6 +1076,7 @@ fun: this.interrelatedOrderFun, permitArr: [], }) + } if (this.permissions.customerorder_create_masterplan) { this.table.toolbar.push({ text: '涓荤敓浜ц鍒�', @@ -1115,16 +1143,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).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') @@ -1241,6 +1282,7 @@ this.$refs.addSampleForm.init(row ? row.contractNo : null) }) } + this.expandRowKeys=[row.id] }, // 鏂板鏍峰搧璁㈠崟 addSampleCustomerOrder() { -- Gitblit v1.9.3