From c30b850bdf5c48a2279f293d414850c32501192a Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期一, 29 四月 2024 16:25:25 +0800 Subject: [PATCH] 修改首页样式 --- src/views/quality/finishedProductInspection/finishedProduct-form.vue | 132 +++++++++++++++++++++++++++++++++++++++----- 1 files changed, 117 insertions(+), 15 deletions(-) diff --git a/src/views/quality/finishedProductInspection/finishedProduct-form.vue b/src/views/quality/finishedProductInspection/finishedProduct-form.vue index 02135a1..c504af6 100644 --- a/src/views/quality/finishedProductInspection/finishedProduct-form.vue +++ b/src/views/quality/finishedProductInspection/finishedProduct-form.vue @@ -104,6 +104,9 @@ <el-tab-pane label="妫�楠岄」鐩�"> <el-row> <el-col v-if="resultVal==null" :span="24" class="inspectionProject_span" style="text-align: right;"> + <el-button size="small" + type="primary" + @click="saveTable()">淇濆瓨</el-button> <el-button size="mini" @click="clickAddInspectionColumn()">娣诲姞妫�娴嬪�煎垪</el-button> <el-button size="mini" @click="clickDeleteInspectionColumn()">鍒犻櫎妫�娴嬪�煎垪</el-button> </el-col> @@ -282,6 +285,54 @@ </el-table-column> </el-table> </el-tab-pane> + <el-tab-pane label="闄勪欢"> + <el-table :data="configFileTableData" height="400px"> + <el-table-column + prop="orderNumber" + align="center" + label="璁㈠崟鍙�" + show-overflow-tooltip + > + </el-table-column> + <el-table-column + prop="originalFileName" + align="center" + label="鍘熸枃浠跺悕" + width="200" + > + </el-table-column> + <el-table-column prop="fileName" align="center" label="鏂囦欢鍚庣紑"> + </el-table-column> + <el-table-column prop="createUser" align="center" label="涓婁紶浜�"> + </el-table-column> + <el-table-column + prop="createTime" + align="center" + label="涓婁紶鏃堕棿" + show-overflow-tooltip + > + </el-table-column> + <el-table-column prop="updateUser" align="center" label="鏇存柊浜�"> + </el-table-column> + <el-table-column + prop="updateTime" + align="center" + label="鏇存柊鏃堕棿" + show-overflow-tooltip + > + </el-table-column> + <el-table-column fixed="right" align="center" label="鎿嶄綔"> + <template slot-scope="scope"> + <el-button + @click="downloadProcessConfigFiles(scope.row)" + type="text" + size="small" + >涓嬭浇</el-button + > + </template> + </el-table-column> + </el-table> + </el-tab-pane> </el-tabs> </div> @@ -335,6 +386,7 @@ queryById, updateDeviceById, updateFinishedInsProduct, + updateFinishedInsProduct2, updateFinishedInspectById, selectDeviceAPI, updateLocationIdById, @@ -347,12 +399,15 @@ import { getIfsLocationByGroupCopyAll } from '@/api/warehouse/location' import qrCodeApp from '@/views/common/qrCodeApp' import { getStore } from '@/util/store' + import { getProcessConfigFile } from '@/api/plan/manufacturingorder' + import * as customerorder from '@/api/plan/customerorder' export default { components:{ qrCodeApp }, data() { return { + dataForm:null, progrecessFileLoading: false, processConfigFileTableData: [], headers: { @@ -404,6 +459,7 @@ }, inspectionItems: [], // 鏂板妫�楠岄」鐩〃鏍� inspectionResultForm: [], + configFileTableData:[] } }, watch: { @@ -427,6 +483,49 @@ this.init() }, methods: { + getProcessConfigFile(){ + getProcessConfigFile({ + orderNumber: this.dataForm.orderNumber, + lineNumber: this.dataForm.customerNo + }).then((res)=>{ + this.configFileTableData = res.data.data + }) + }, + downloadProcessConfigFiles(row){ + customerorder.downloadProcessConfigFile( + row.fileName, + row.bucketName, + row.originalFileName + ) + }, + saveTable(){ + let finishedInsProducts = []; + if(this.inspectionItems.length>0){ + this.inspectionItems.forEach(item=>{ + if(item.children!=null&&item.children.length>0){ + item.children.forEach(item2=>{ + let obj = {}; + obj.id = item2.iid; + obj.note = item2.inote; + obj.required = item2.required; + obj.inspectionValue = item2.empiricalValueAddss.join(','); + obj.deviceId = item2.eId; + finishedInsProducts.push(obj); + }) + } + }) + } + if(finishedInsProducts.length>0){ + updateFinishedInsProduct2(finishedInsProducts).then(res=>{ + if(res.data.code == 0){ + this.$message.success("鏇存柊鎴愬姛") + }else{ + this.$message.error("鏇存柊澶辫触") + } + this.init() + }) + } + }, delProcessConfigFile(row) { this.$confirm('鏄惁鍒犻櫎璇ラ檮浠�', '鎻愮ず', { confirmButtonText: '纭畾', @@ -569,6 +668,7 @@ if(id != null){ queryById(id).then(res=>{ let result = res.data.data + this.dataForm = result this.processInspectVo.finInsNo = result.finInsNo this.processInspectVo.orderNumber = result.orderNumber this.processInspectVo.mcode = result.materialCode @@ -629,6 +729,7 @@ userName: Array.from(new Set(userList)).join(","), result: this.resultVal==null ? rVal : this.resultVal, }] + this.getProcessConfigFile() }).catch(error=>{ console.error(error) }) @@ -677,20 +778,20 @@ if (str === undefined || str === '' || str === null ) { return } - let obj = { - deviceId: row.eId, - fpid: row.iid, - inspectionValue: str, - note : row.inote - } - updateFinishedInsProduct(obj).then(res=>{ - if(res.data.code == 0){ - this.$message.success("鏇存柊鎴愬姛") - }else{ - this.$message.error("鏇存柊澶辫触") - } - this.init() - }) + // let obj = { + // deviceId: row.eId, + // fpid: row.iid, + // inspectionValue: str, + // note : row.inote + // } + // updateFinishedInsProduct(obj).then(res=>{ + // if(res.data.code == 0){ + // this.$message.success("鏇存柊鎴愬姛") + // }else{ + // this.$message.error("鏇存柊澶辫触") + // } + // this.init() + // }) } }, addTestProject() { @@ -784,10 +885,11 @@ } else { if (this.empiricalValueAddMaxNumber != this.empiricalValueAdd - 1) { this.empiricalValueAdd = this.empiricalValueAdd - 1; - this.changeRowResult() + // this.changeRowResult() this.inspectionItems.forEach(i => { i.empiricalValueAddss.splice(this.empiricalValueAdd, 1); }); + this.saveTable() } } }, -- Gitblit v1.9.3