From 363678a54142e62fdd4ca39a0db5c54af1a704dc Mon Sep 17 00:00:00 2001 From: zouyu <2723363702@qq.com> Date: 星期四, 29 二月 2024 15:39:59 +0800 Subject: [PATCH] 生产调度修改 --- src/views/quality/processInspect/index.vue | 101 +++++++++++++++++++++++++------------------------- 1 files changed, 50 insertions(+), 51 deletions(-) diff --git a/src/views/quality/processInspect/index.vue b/src/views/quality/processInspect/index.vue index 349f765..210b8f1 100644 --- a/src/views/quality/processInspect/index.vue +++ b/src/views/quality/processInspect/index.vue @@ -2,7 +2,7 @@ <div class="content-main"> <div class="rawPage"> <basic-container> - <ttable + <ttable :table="table" @handleSelectionChange="handleSelectionChange" :prelang="prelang" @@ -12,19 +12,6 @@ <template #toolbar></template> </ttable> </basic-container> - <el-dialog - top="10vh" - title="鎵撳嵃棰勮" - :visible.sync="printDialogVisible" - width="60%"> - <div style="width:100%;height: 60vh;overflow-y: scroll;"> - <printTemplate id="printRaw" :formData="printFormData"></printTemplate> - </div> - <span slot="footer" class="dialog-footer"> - <el-button @click="()=>{printDialogVisible = false;this.printFormData=null}">鍙� 娑�</el-button> - <el-button type="primary" @click="printFun()">鎵� 鍗�</el-button> - </span> - </el-dialog> </div> </div> </template> @@ -34,18 +21,15 @@ import * as fecha from 'element-ui/lib/utils/date' import processInspectForm from './processInspect-form' import { transform } from '@/util/fileTransform' + import { mapGetters } from 'vuex' import { page,deleteById,exportProcessInsProduct } from '@/api/quality/processInspect' - import printTemplate from './processInspect-print.vue' export default { components: { processInspectForm, ttable, - printTemplate }, data() { return { - printFormData: null, - printDialogVisible: false, result:[{label:'鍏ㄩ儴',value: ''},{label:'鍚堟牸',value: '1'},{label:'涓嶅悎鏍�',value: '0'}], type: [1], prelang: 'processInspect', @@ -73,12 +57,28 @@ column: [ { minWidth: '120', - prop: 'orderNumber', - label: '璁㈠崟缂栧彿', + prop: 'proInsNo', + label: '杩囩▼妫�楠岀紪鍙�', isTrue: true, isSearch: true, searchInfoType: 'text', render: { fun: this.addOrUpdateHandle } + }, + { + minWidth: '120', + prop: 'orderNumber', + label: '璁㈠崟缂栧彿', + isTrue: true, + isSearch: true, + searchInfoType: 'text' + }, + { + minWidth: '120', + prop: 'materialCode', + label: '浜у搧缂栧彿', + isTrue: true, + isSearch: true, + searchInfoType: 'text' }, { minWidth: '120', @@ -90,7 +90,6 @@ }, { minWidth: '130', - width: '150', prop: 'specs', label: '瑙勬牸鍨嬪彿', sort: true, @@ -163,28 +162,8 @@ } }, ], - toolbar: [ - { - text: '鏂板', - type: 'primary', - fun: this.addOrUpdateHandle - }, - { - text: '瀵煎嚭', - fun: this.exportExcel - } - ], - operator: [{ - text: '鎵撳嵃', - type: 'text', - size: 'small', - fun: this.showPrint - },{ - text: '浣滃簾', - type: 'text', - size: 'small', - fun: this.deleteHandle - }], + toolbar: [], + operator: null, operatorConfig: { fixed: 'right', label: '鎿嶄綔', @@ -194,15 +173,30 @@ }, } }, - created() { }, + computed: { + ...mapGetters(['permissions']) + }, + created() { + if(this.permissions.quality_processInspect_add){ + this.table.toolbar.push({ + text: '鏂板', + type: 'primary', + fun: this.addOrUpdateHandle + }) + } + if(this.permissions.quality_processInspect_del){ + this.table.operator = [{ + text: '浣滃簾', + type: 'text', + size: 'small', + fun: this.deleteHandle + }] + } + }, methods: { - showPrint(){ - this.printDialogVisible = true - }, exportExcel(){ let queryParam=this.$refs.processInspect.getQueryParam(); delete queryParam.criteria - console.log(queryParam); exportProcessInsProduct(queryParam).then((res)=>{ transform(res) }) @@ -225,10 +219,15 @@ }, // 鏂板 / 淇敼 addOrUpdateHandle(row) { + if(!this.permissions.quality_processInspect_edit && row){ + this.$message.error("璇ヨ鑹叉病鏈夋搷浣滄潈闄�") + return + } this.$router.push({ name: 'processInspectForm', - query: { id: row == null ? null : row.id,resultVal : row == null ? null : row.result }, - }) + query: { id: row == null ? null : row.id }, + params: { resultVal : row == null ? null : row.result } + }) }, formatResult(row, column, cellValue){ if(cellValue != undefined || cellValue != null){ @@ -330,4 +329,4 @@ .rawPage .content-body { flex: 1; } -</style> \ No newline at end of file +</style> -- Gitblit v1.9.3