From 52499edf106a5e2540deac418c91db15f2815339 Mon Sep 17 00:00:00 2001 From: 王震 <10952869+daywangzhen@user.noreply.gitee.com> Date: 星期五, 01 十二月 2023 10:27:03 +0800 Subject: [PATCH] modified: src/views/quality/Packaging_ledger/index.vue modified: src/views/quality/Packaging_ledger/pack-from.vue modified: src/views/quality/Packaging_ledger/pack-fromadd.vue --- src/views/quality/Packaging_ledger/index.vue | 351 +++++++++++++++++++++++++++++++++++----------------------- 1 files changed, 210 insertions(+), 141 deletions(-) diff --git a/src/views/quality/Packaging_ledger/index.vue b/src/views/quality/Packaging_ledger/index.vue index 430bba5..ce34a87 100644 --- a/src/views/quality/Packaging_ledger/index.vue +++ b/src/views/quality/Packaging_ledger/index.vue @@ -4,23 +4,23 @@ <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" + @currentChange="handleCurrentChange" + ref="processconfiguration" + > <template #toolbar></template> </ttable> </el-col> - - <el-col :span="13" style="padding-left: 10px"> <el-card> <div slot="header"> <el-row> <el-col :span="8"> - <span>鏍囧噯鍙傛暟</span> + <span>瑁呯鏄庣粏</span> </el-col> <el-col :span="8" :offset="4"> <!-- <el-button @@ -32,38 +32,28 @@ </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 :data="testStandardParams" id="testStandardParamTable" ref="testStandardParam" - :default-sort="{ prop: 'index' }" + highlight-current-row height="700" style="width: 100%" @@ -72,122 +62,92 @@ stripe > <el-table-column - prop="index" + type ="index" label="搴忓彿" 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="鍙傛暟鏍煎紡" - prop="parameterFormat" + label="鏁伴噺" + 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="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" + @way = "wayRenovate" + > + </packfrom> + <packfromadd + :currshowlist.sync="increase" + :packageBoxIddata ="packageBoxId" + @handleSelectionChange = "preserve" + > + </packfromadd> </basic-container> </div> </template> <script> +import { pagedata,dropById,list,saveList,deledata,sAuditstatus} 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 { + dataway:{}, + goid:'', + testStandardParams: [], + packageBoxId:{}, prelang: 'operation', dataListLoading: false, + ajaxFun: pagedata, + increase:false, + addOrUpdateVisible:false, options: { height: 300, // 榛樿楂樺害-涓轰簡琛ㄥご鍥哄畾 stripe: true, // 鏄惁涓烘枒椹汗 table @@ -195,7 +155,8 @@ border: true, // 鏄惁鏈夌旱鍚戣竟妗� lazy: false, // 鏄惁闇�瑕佹噿鍔犺浇 fit: true, // 鍒楃殑瀹藉害鏄惁鑷拺寮� - multiSelect: true, // + multiSelect: false, // + isEdit:false, seqNo: true, isShowHide: true, // 鏄惁鏄剧ず鏄惧奖鎸夐挳 isRefresh: true, // 鏄惁鏄剧ず鍒锋柊鎸夐挳 @@ -209,49 +170,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 +212,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 +231,126 @@ }, ], toolbar: [ - { - text: 'xxx', - type: 'primary', - }, + { + text: '鏂板', + type: 'primary', + fun: this.addOrUpdateHandle + }, ], + operator: [ + { + text: '妫�楠�', + icon: 'el-icon-delete', + type: 'text', + size: 'small', + fun: this.check + },{ + text: '鍒犻櫎', + 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: { + + }, + methods: { + // 鑾峰彇鏁版嵁鍒楄〃 + getData() { + this.$refs.processconfiguration.refreshData() + }, + wayRenovate(){ + this.getData() + }, + //add + addOrUpdateHandle(){ + this.addOrUpdateVisible = true + }, + //鍒犻櫎 + deleteHandle(row){ + dropById({id:row.id}).then((res) =>{ + this.getData() + this.$message.success('鍒犻櫎鎴愬姛') + }) + }, + handleCurrentChange(row){ + console.log(row,"涓�琛�"); + this.dataway = row + this.packageBoxId = { + packageBoxId:row.id + } + this.goid = row.id + this.rightquery() + }, + rightquery(){ + list({packageBoxId:this.goid}).then((res) =>{ + console.log(res,"nihaoa"); + this.testStandardParams = res.data.data + }) + }, + //璇︽儏娣诲姞 + relateOperationParam(){ + if (this.dataway.state == "鏈姤妫�") { + this.increase = true + }else{ + this.$message.error('璇峰厛閫夋嫨鍖呰椤圭洰') + } + }, + preserve(datalist){ + this.testStandardParams = datalist + + }, + //鍙宠竟淇濆瓨 + addpreserve(){ + console.log(this.testStandardParams,"淇濆瓨鏁版嵁"); + this.testStandardParams.forEach(el => { + el.packageBoxId =this.goid + }); + saveList(this.testStandardParams).then((res) =>{ + console.log(res,"淇濆瓨鎴愬姛"); + this.$message.success('淇濆瓨鎴愬姛') + this.rightquery() + }) + }, + //鍒犻櫎 + deleteadd(row){ + console.log(row,""); + deledata({id:row.id}).then((res)=>{ + this.$message.success('鍒犻櫎鎴愬姛') + this.rightquery() + }) + }, + //瀹℃牳 + check(row){ + console.log(row,"瀹℃牳"); + let packageBox = { + id:row.id, + packageNo:row.packageNo, + contractNo:row.contractNo, + customerId:row.customerId, + } + sAuditstatus(packageBox).then((res) =>{ + this.getData() + this.$message.success('妫�楠屾垚鍔�') + }) + }, }, + computed: { + }, } </script> \ No newline at end of file -- Gitblit v1.9.3