From 0f0d62f85d0e44c03161ef6d3043a4d70fe553dd Mon Sep 17 00:00:00 2001 From: 王震 <10952869+daywangzhen@user.noreply.gitee.com> Date: 星期四, 30 十一月 2023 15:07:42 +0800 Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/mes-ocea-before --- src/views/quality/Packaging_ledger/pack-from.vue | 172 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 172 insertions(+), 0 deletions(-) diff --git a/src/views/quality/Packaging_ledger/pack-from.vue b/src/views/quality/Packaging_ledger/pack-from.vue new file mode 100644 index 0000000..d761510 --- /dev/null +++ b/src/views/quality/Packaging_ledger/pack-from.vue @@ -0,0 +1,172 @@ +<template> + <el-dialog + width="60%" + title="鍙傛暟" + top="5vh" + :visible.sync="innerVisible" + :show="currshowlist" + @close="$emit('update:currshowlist', false)" + append-to-body + class="part-dialog" + > + <ttable + :table="table" + @handleSelectionChange="handleSelectionChange" + :prelang="prelang" + :options="options" + :ajaxFun="ajaxFun" + :bottomOffset="350" + ref="paramTable" + > + <template #toolbar></template> + </ttable> + <div slot="footer" class="dialog-footer"> + <el-button @click="innerVisible = false">鍙� 娑�</el-button> + <el-button type="primary" @click="saveSelectRow">纭� 瀹�</el-button> + </div> + </el-dialog> + </template> + <script> +import { customerpage,pagedataadd } from '@/api/quality/Packaging_ledger' +import ttable from '@/views/common/ztt-table.vue' + export default { + props:{ + currshowlist: { + type: Boolean, + default: false + }, + }, + data() { + return { + datalistid:"", + ajaxFun: customerpage, + currentRow: false, + typeOptions: [], + innerVisible: false, + listLoading: true, + multipleSelection: [], + isShowQuery: false, + uploadInfo: { + // 鏄惁灞曠ず涓婁紶EXCEL浠ュ強瀵瑰簲鐨剈rl + isShow: false, + url: '' + }, + prelang: 'operation', + options: { + height: 300, // 榛樿楂樺害-涓轰簡琛ㄥご鍥哄畾 + stripe: true, // 鏄惁涓烘枒椹汗 table + highlightCurrentRow: false, // 鏄惁瑕侀珮浜綋鍓嶈 + border: true, // 鏄惁鏈夌旱鍚戣竟妗� + lazy: false, // 鏄惁闇�瑕佹噿鍔犺浇 + fit: true, // 鍒楃殑瀹藉害鏄惁鑷拺寮� + multiSelect: true, // + seqNo: true, + isShowHide: true, // 鏄惁鏄剧ず鏄惧奖鎸夐挳 + isSearch: true, // 楂樼骇鏌ヨ鎸夐挳 + defaultOrderBy: { column: 'createTime', direction: 'desc' } + }, + table: { + total: 0, + currentPage: 1, + pageSize: 20, + data: [], + // 鏍囬 + column: [ + { + minWidth: 'code', + prop: 'contractNo', + label: '鍚堝悓鍙�', + sort: true, + isTrue: true, + isSearch: true, + searchInfoType: 'text' + }, + { + minWidth: '120', + prop: 'customerName', + label: '瀹㈡埛鍚嶇О', + sort: true, + isTrue: true, + isSearch: true, + searchInfoType: 'text' + }, + { + minWidth: '140', + prop: 'customerNo', + label: '瀹㈡埛缂栫爜', + sort: true, + isTrue: true, + isSearch: true, + searchInfoType: 'text', + }, + { + minWidth: '120', + prop: 'deliveryDate', + label: '浜よ揣鏃ユ湡', + sort: true, + isTrue: true, + isSearch: true, + searchInfoType: 'datetimerange' + }, + { + minWidth: '120', + prop: 'entityName', + label: '宸ョ▼鍚嶇О', + sort: true, + isTrue: true, + isSearch: true, + searchInfoType: 'text' + }, + ], + }, + addOrUpdateVisible: false + } + }, + components: { + ttable + }, + watch: { + currshowlist() { + console.log(22211); + this.innerVisible = this.currshowlist + if (this.currshowlist) { + this.$nextTick(() => { + this.getData() + }) + } + } + }, + computed: { + // ...mapGetters(['permissions']) + }, + created() { + this.getParamType() + }, + methods: { + // 鑾峰彇鏁版嵁鍒楄〃 + getData() { + this.$refs.paramTable.getDataList() + }, + handleSelectionChange(val){ + let data = val + data.forEach(el => { + this.datalistid = el + }); + console.log(this.datalistid); + }, + saveSelectRow() { + pagedataadd ({customerId:this.datalistid.id,contractNo:this.datalistid.contractNo}).then((res =>{ + console.log(res); + if (res.status === 200) { + this.$message.success('鏂板鎴愬姛') + }else{ + this.$message.error('鍒涘缓澶辫触') + } + })) + this.innerVisible = false + this.$emit('handleSelectionChange',this.innerVisible ) + }, + } + } + </script> + \ No newline at end of file -- Gitblit v1.9.3