From e9e0a3541f090f1d95786a4da0330985cf6e7614 Mon Sep 17 00:00:00 2001 From: zouyu <2723363702@qq.com> Date: 星期四, 30 十一月 2023 15:20:24 +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 | 173 +++++++++++++ vue.config.js | 3 src/api/quality/Packaging_ledger.js | 66 +++++ src/views/quality/Packaging_ledger/index.vue | 320 ++++++++++++++---------- src/views/quality/Packaging_ledger/pack-fromadd.vue | 171 +++++++++++++ 5 files changed, 596 insertions(+), 137 deletions(-) diff --git a/src/api/quality/Packaging_ledger.js b/src/api/quality/Packaging_ledger.js new file mode 100644 index 0000000..642d86c --- /dev/null +++ b/src/api/quality/Packaging_ledger.js @@ -0,0 +1,66 @@ +import request from '@/router/axios' + +export function pagedata(query) { + return request({ + url: '/mes/qualityPackageBox/page', + method: 'get', + params: query + }) +} + +export function dataadd(query) { + return request({ + url: '/mes/qualityPackageBoxDetail/selProduct', + method: 'get', + params: query + }) +} + +export function list(query) { + return request({ + url: '/mes//qualityPackageBoxDetail/list', + method: 'get', + params: query + }) +} + +export function customerpage(query) { + return request({ + url: '/mes/customer/page', + method: 'get', + params: query + }) +} + +export function pagedataadd(obj) { + return request({ + url: '/mes/qualityPackageBox/add', + method: 'post', + data: obj + }) +} + + +export function saveList(obj) { + return request({ + url: '/mes/qualityPackageBoxDetail/saveList', + method: 'post', + data: obj + }) +} +export function dropById(query) { + return request({ + url: '/mes/qualityPackageBox/dropById', + method: 'get', + params: query + }) +} + + +export function deledata(query) { + return request({ + url: '/mes/qualityPackageBoxDetail/dropById', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/src/views/quality/Packaging_ledger/index.vue b/src/views/quality/Packaging_ledger/index.vue index 430bba5..0e0f2f0 100644 --- a/src/views/quality/Packaging_ledger/index.vue +++ b/src/views/quality/Packaging_ledger/index.vue @@ -4,17 +4,17 @@ <el-row> <el-col :span="11"> <ttable - :table="table" - :isShowHide="true" - :prelang="prelang" - :options="options" - ref="processconfiguration" - > + :table="table" + :isShowHide="true" + :prelang="prelang" + :ajaxFun="ajaxFun" + :options="options" + @handleSelectionChange="handleCurrentChange" + ref="processconfiguration" + > <template #toolbar></template> </ttable> </el-col> - - <el-col :span="13" style="padding-left: 10px"> <el-card> <div slot="header"> @@ -32,31 +32,21 @@ </el-button> --> </el-col> <el-col :span="2"> - <!-- <el-button + <el-button style="float: right; padding: 3px 0" type="text" - :disabled="isSubmit" - v-thinclick="`dataFormTestStandardParam`" - v-if="editable" + @click="addpreserve" >淇濆瓨 - </el-button> --> + </el-button> </el-col> <el-col :span="2"> - <!-- <el-button + <el-button style="float: right; padding: 3px 0" type="text" @click="relateOperationParam()" - v-if="editable" >娣诲姞 - </el-button> --> + </el-button> </el-col> - </el-row> - <el-row> - <!-- <span style="font-weight:500" v-if="testNo.length > 0" - >鎮ㄥ綋鍓嶉�夋嫨鐨勬娴嬫爣鍑嗙紪鍙锋槸锛�<span style="color:#066EFF">{{ - testNo - }}</span></span - > --> </el-row> </div> <el-table @@ -77,80 +67,31 @@ align="center" width="50" /> - <!-- <el-table-column - label="鏄惁寮曠敤宸ヨ壓鍙傛暟" - prop="isReference" - align="center" - > - <template slot-scope="scope"> - <el-select - v-model="scope.row.isReference" - placeholder="璇烽�夋嫨" - style="width: 100%;" - > - <el-option - v-for="(item, index) in referenceOptions" - :key="index" - :label="item.label" - :value="item.value" - > - </el-option> - </el-select> - </template> - </el-table-column> - <el-table-column label="鏄惁鎶芥" prop="isCheck" align="center"> - <template slot-scope="scope"> - <el-select - v-model="scope.row.isCheck" - placeholder="璇烽�夋嫨" - style="width: 100%;" - > - <el-option - v-for="(item, index) in isCheckOptions" - :key="index" - :label="item.label" - :value="item.value" - > - </el-option> - </el-select> - </template> - </el-table-column> <el-table-column - label="绾胯姱" - prop="wireCore" - align="center" - width="60" - > - <template slot-scope="scope"> - <el-input v-model="scope.row.wireCore"></el-input> - </template> - </el-table-column> --> - <el-table-column label="鍙傛暟缂栧彿" prop="code" align="center" /> - <el-table-column - label="鍙傛暟椤�" - prop="parameterItem" + label="浜у搧" + prop="product" align="center" /> <el-table-column - label="瑕佹眰鑼冨洿" - prop="referenceValue" + label="浜у搧缂栧彿" + prop="productNo" align="center" > </el-table-column> <el-table-column - label="榛樿鍊�" - prop="defaultValue" + label="瑙勬牸鍨嬪彿" + prop="specs" align="center" > </el-table-column> <el-table-column - label="鍙傛暟椤圭被鍨�" - prop="paramType" + label="鍗曚綅" + prop="unit" align="center" > </el-table-column> <el-table-column - label="鍙傛暟鏍煎紡" + label="鏁伴噺" prop="parameterFormat" align="center" width="80" @@ -158,36 +99,53 @@ <template slot-scope="scope"> <el-input v-model="scope.row.parameterFormat"></el-input> </template> - </el-table-column><el-table-column - label="娴嬭瘯鏂规硶" - prop="purpose" - align="center" - width="80" - > - </el-table-column> - <el-table-column - label="娴嬭瘯鐩殑" - prop="method" - align="center" - width="80" - > </el-table-column> <el-table-column label="鍗曚綅" prop="unit" align="center" /> + <el-table-column + fixed="right" + label="鎿嶄綔" + align="center" + width="80"> + <template slot-scope="scope"> + <el-button @click="deleteadd(scope.row)" size="small">鍒犻櫎</el-button> + </template> + </el-table-column> </el-table> </el-card> </el-col> </el-row> + + <!-- 鏂板 --> + <packfrom + :currshowlist.sync="addOrUpdateVisible" + > + </packfrom> + <packfromadd + :currshowlist.sync="increase" + :packageBoxIddata ="packageBoxId" + @handleSelectionChange = "preserve" + > + </packfromadd> </basic-container> </div> </template> <script> +import { pagedata,dropById,list,saveList,deledata} from '@/api/quality/Packaging_ledger' import ttable from '@/views/common/ztt-table.vue' +import packfrom from './pack-from.vue' +import packfromadd from './pack-fromadd.vue' export default { data(){ return { + goid:'', + testStandardParams: [], + packageBoxId:{}, prelang: 'operation', dataListLoading: false, + ajaxFun: pagedata, + increase:false, + addOrUpdateVisible:false, options: { height: 300, // 榛樿楂樺害-涓轰簡琛ㄥご鍥哄畾 stripe: true, // 鏄惁涓烘枒椹汗 table @@ -195,7 +153,8 @@ border: true, // 鏄惁鏈夌旱鍚戣竟妗� lazy: false, // 鏄惁闇�瑕佹噿鍔犺浇 fit: true, // 鍒楃殑瀹藉害鏄惁鑷拺寮� - multiSelect: true, // + multiSelect: false, // + isEdit:false, seqNo: true, isShowHide: true, // 鏄惁鏄剧ず鏄惧奖鎸夐挳 isRefresh: true, // 鏄惁鏄剧ず鍒锋柊鎸夐挳 @@ -209,49 +168,41 @@ data: [], // 鏍囬 column: [ + { + minWidth: 'code', + prop: 'state', + label: '鐘舵��', + sort: true, + isTrue: true, + isSearch: true, + searchInfoType: 'text' + }, { minWidth: '140', - prop: 'oo', - label: '璁㈠崟缂栧彿', + prop: 'packageNo', + label: '鍖呰缂栧彿', isTrue: true, isSearch: true, searchInfoType: 'text', },{ minWidth: '140', - prop: 'materhhooial', - label: '璐ㄩ噺杩芥函鍙�', + prop: 'createUser', + label: '鍒涘缓浜�', + isTrue: true, + isSearch: true, + searchInfoType: 'text', + },{ + minWidth: '140', + prop: 'contractNo', + label: '鍚堝悓鍙�', isTrue: true, isSearch: true, searchInfoType: 'text', }, { minWidth: '140', - prop: 'mateuurial', - label: '浜у搧鍚嶇О', - isTrue: true, - isSearch: true, - searchInfoType: 'text', - }, - { - minWidth: '140', - prop: 'materoiial', - label: '瑙勬牸鍨嬪彿', - isTrue: true, - isSearch: true, - searchInfoType: 'text', - }, - { - minWidth: '140', - prop: 'matperoial', - label: '鍗曚綅', - isTrue: true, - isSearch: true, - searchInfoType: 'text', - }, - { - minWidth: '140', - prop: 'materpial', - label: '鏁伴噺', + prop: 'updateUser', + label: '鏇存柊浜�', isTrue: true, isSearch: true, searchInfoType: 'text', @@ -259,8 +210,18 @@ { minWidth: '130', width: '150', - prop: 'dealTime', - label: '鍏ュ簱鏃堕棿', + prop: 'updateTime', + label: '鏇存柊鏃ユ湡', + sort: true, + isTrue: true, + isSearch: true, + searchInfoType: 'datetimerange', + }, + { + minWidth: '130', + width: '150', + prop: 'createTime', + label: '鍒涘缓鏃ユ湡', sort: true, isTrue: true, isSearch: true, @@ -268,20 +229,107 @@ }, ], toolbar: [ - { - text: 'xxx', - type: 'primary', - }, + { + text: '鏂板', + type: 'primary', + fun: this.addOrUpdateHandle + }, ], + operator: [ + { + text: '鍒犻櫎', + icon: 'el-icon-delete', + type: 'text', + size: 'small', + fun: this.deleteHandle + },{ + text: 'xx', + icon: 'el-icon-delete', + type: 'text', + size: 'small', + // fun: this.deleteHandle + } + ], + operatorConfig: { + fixed: 'right', + label: '鎿嶄綔', + width: 120, + minWidth: 120 + } }, } }, - medthods: {}, -// computed: { -// ...mapGetters(['permissions']) -// }, components: { - ttable + ttable, + packfrom, + packfromadd + }, + watch: { + // renovate() { + // if (this.innerVisible = false) { + // this.$nextTick(() => { + // this.getData() + // }) + // } + // } + }, + methods: { + // 鑾峰彇鏁版嵁鍒楄〃 + getData() { + this.$refs.processconfiguration.refreshData() + }, + //add + addOrUpdateHandle(){ + this.addOrUpdateVisible = true + }, + //鍒犻櫎 + deleteHandle(row){ + dropById({id:row.id}).then((res) =>{ + this.getData() + this.$message.error('鍒犻櫎鎴愬姛') + }) + }, + handleCurrentChange(row){ + console.log(row,"id"); + this.packageBoxId = { + packageBoxId:row[0].id + } + this.goid = row[0].id + list({packageBoxId:row[0].id}).then((res) =>{ + console.log(res,"nihaoa"); + this.testStandardParams = res.data.data + }) + }, + //璇︽儏娣诲姞 + relateOperationParam(){ + this.increase = true + }, + preserve(datalist){ + console.log(datalist); + this.testStandardParams = datalist + + }, + addpreserve(){ + console.log(this.testStandardParams,"淇濆瓨鏁版嵁"); + this.testStandardParams.forEach(el => { + el.packageBoxId =this.goid + }); + console.log(this.testStandardParams,"niaho"); + saveList(this.testStandardParams).then((res) =>{ + console.log(res,"淇濆瓨鐨�"); + this.$message.success('淇濆瓨鎴愬姛') + this.testStandardParams + }) + }, + deleteadd(row){ + console.log(row,""); + deledata({id:row.id}).then((res)=>{ + this.$message.success('鍒犻櫎鎴愬姛') + this.testStandardParams + }) + } }, + computed: { + }, } </script> \ No newline at end of file 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..24e15cf --- /dev/null +++ b/src/views/quality/Packaging_ledger/pack-from.vue @@ -0,0 +1,173 @@ +<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: false, // + isEdit:false, + 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 diff --git a/src/views/quality/Packaging_ledger/pack-fromadd.vue b/src/views/quality/Packaging_ledger/pack-fromadd.vue new file mode 100644 index 0000000..e27e45a --- /dev/null +++ b/src/views/quality/Packaging_ledger/pack-fromadd.vue @@ -0,0 +1,171 @@ +<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" + :paramObj="packageBoxIddata" + :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 { dataadd,saveList } from '@/api/quality/Packaging_ledger' +import ttable from '@/views/common/ztt-table.vue' + export default { + props:{ + currshowlist: { + type: Boolean, + default: false + }, + packageBoxIddata:{ + type: Object + }, + }, + data() { + return { + datalist:[], + datalistid:"", + ajaxFun: dataadd, + 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: 'product', + label: '浜у搧', + sort: true, + isTrue: true, + isSearch: true, + searchInfoType: 'text' + }, + { + minWidth: '120', + prop: 'productNo', + label: '浜у搧缂栧彿', + sort: true, + isTrue: true, + isSearch: true, + searchInfoType: 'text' + }, + { + minWidth: '140', + prop: 'specs', + label: '瑙勬牸鍨嬪彿', + sort: true, + isTrue: true, + isSearch: true, + searchInfoType: 'text', + }, + { + minWidth: '120', + prop: 'unit', + label: '鍗曚綅', + sort: true, + isTrue: true, + isSearch: true, + searchInfoType: 'datetimerange' + }, + ], + }, + addOrUpdateVisible: false + } + }, + components: { + ttable + }, + watch: { + currshowlist() { + console.log(22211); + this.innerVisible = this.currshowlist + } + }, + computed: { + // ...mapGetters(['permissions']) + }, + created() { + this.getParamType() + }, + methods: { + // 鑾峰彇鏁版嵁鍒楄〃 + getData() { + this.$refs.paramTable.getDataList() + }, + handleSelectionChange(val){ + let data = val + data.forEach(el => { + this.datalistid = el + }); + }, + saveSelectRow() { + console.log(this.packageBoxIddata,"123"); + saveList ({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 ) + }, + handleSelectionChange(val){ + this.datalist = val + console.log(this.datalist,"鏁版嵁"); + }, + saveSelectRow(){ + this.$emit('handleSelectionChange',this.datalist ) + this.innerVisible = false + } + } + } + </script> + \ No newline at end of file diff --git a/vue.config.js b/vue.config.js index 2ba50db..b450b4c 100644 --- a/vue.config.js +++ b/vue.config.js @@ -3,10 +3,11 @@ * https://cli.vuejs.org/zh/config/ */ // const url = 'http://192.168.2.7:9999' +const url = 'http://192.168.2.7:9999' //const url = 'http://192.168.32.45:9999' // const url = 'http://192.168.0.23:9999' - const url = 'http://localhost:9999' +// const url = 'http://localhost:9999' // const url = 'http://ztt-gateway:9999' const localUrl = 'http://localhost:8089' -- Gitblit v1.9.3