From 6317d3b3cf91bad379cf72ee0bd8a595b8e24e77 Mon Sep 17 00:00:00 2001 From: Fixiaobai <fixiaobai@163.com> Date: 星期三, 06 十二月 2023 16:41:20 +0800 Subject: [PATCH] modified: src/views/warehouse/pallettransports/index.vue --- src/views/quality/Packaging_ledger/index.vue | 74 +++++++++++++++++++------------------ 1 files changed, 38 insertions(+), 36 deletions(-) diff --git a/src/views/quality/Packaging_ledger/index.vue b/src/views/quality/Packaging_ledger/index.vue index 9a665e4..45b5115 100644 --- a/src/views/quality/Packaging_ledger/index.vue +++ b/src/views/quality/Packaging_ledger/index.vue @@ -9,7 +9,7 @@ :prelang="prelang" :ajaxFun="ajaxFun" :options="options" - @handleSelectionChange="handleCurrentChange" + @currentChange="handleCurrentChange" ref="processconfiguration" > <template #toolbar></template> @@ -41,6 +41,7 @@ </el-col> <el-col :span="2"> <el-button + v-if="!isCheck" style="float: right; padding: 3px 0" type="text" @click="relateOperationParam()" @@ -53,7 +54,7 @@ :data="testStandardParams" id="testStandardParamTable" ref="testStandardParam" - :default-sort="{ prop: 'index' }" + highlight-current-row height="700" style="width: 100%" @@ -62,7 +63,7 @@ stripe > <el-table-column - prop="index" + type ="index" label="搴忓彿" align="center" width="50" @@ -92,12 +93,12 @@ </el-table-column> <el-table-column label="鏁伴噺" - prop="parameterFormat" + prop="number" align="center" width="80" > <template slot-scope="scope"> - <el-input v-model="scope.row.parameterFormat"></el-input> + <el-input v-model="scope.row.number"></el-input> </template> </el-table-column> <el-table-column label="鍗曚綅" prop="unit" align="center" /> @@ -118,7 +119,7 @@ <!-- 鏂板 --> <packfrom :currshowlist.sync="addOrUpdateVisible" - > + @refreshDataList="getData"> </packfrom> <packfromadd :currshowlist.sync="increase" @@ -138,6 +139,8 @@ export default { data(){ return { + isCheck: false, + dataway:{}, goid:'', testStandardParams: [], packageBoxId:{}, @@ -237,17 +240,17 @@ ], operator: [ { + text: '妫�楠�', + icon: 'el-icon-position', + type: 'text', + size: 'small', + fun: this.check + },{ text: '鍒犻櫎', icon: 'el-icon-delete', type: 'text', size: 'small', fun: this.deleteHandle - },{ - text: '妫�楠�', - icon: 'el-icon-delete', - type: 'text', - size: 'small', - fun: this.check } ], operatorConfig: { @@ -265,18 +268,15 @@ packfromadd }, watch: { - // renovate() { - // if (this.innerVisible = false) { - // this.$nextTick(() => { - // this.getData() - // }) - // } - // } + }, methods: { // 鑾峰彇鏁版嵁鍒楄〃 getData() { this.$refs.processconfiguration.refreshData() + }, + wayRenovate(){ + this.getData() }, //add addOrUpdateHandle(){ @@ -286,54 +286,56 @@ deleteHandle(row){ dropById({id:row.id}).then((res) =>{ this.getData() - this.$message.error('鍒犻櫎鎴愬姛') + this.$message.success('鍒犻櫎鎴愬姛') }) }, handleCurrentChange(row){ - console.log(row,"id"); - this.packageBoxId = { - packageBoxId:row[0].id + if(row.state=='宸叉姤妫�'){ + this.isCheck = true } - this.goid = row[0].id - list({packageBoxId:row[0].id}).then((res) =>{ - console.log(res,"nihaoa"); + this.dataway = row + this.packageBoxId = { + packageBoxId:row.id + } + this.goid = row.id + this.rightquery() + }, + rightquery(){ + list({packageBoxId:this.goid}).then((res) =>{ this.testStandardParams = res.data.data }) }, //璇︽儏娣诲姞 relateOperationParam(){ - - this.increase = true - + if (this.dataway.state == "鏈姤妫�") { + this.increase = true + }else{ + this.$message.error('璇峰厛閫夋嫨鍖呰椤圭洰') + } }, 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) =>{ this.$message.success('淇濆瓨鎴愬姛') - this.testStandardParams + this.rightquery() }) }, //鍒犻櫎 deleteadd(row){ - console.log(row,""); deledata({id:row.id}).then((res)=>{ this.$message.success('鍒犻櫎鎴愬姛') - this.testStandardParams + this.rightquery() }) }, //瀹℃牳 check(row){ - console.log(row,"瀹℃牳"); let packageBox = { id:row.id, packageNo:row.packageNo, -- Gitblit v1.9.3