From 9906e6b188bf2c36dddc0d5adadbf02e69ea3e4b Mon Sep 17 00:00:00 2001 From: wujian <14790700720@163.com> Date: 星期五, 25 十月 2024 09:17:29 +0800 Subject: [PATCH] add -sap --- jcdm-ui/src/views/main/om/productionOrde/detail.vue | 105 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 99 insertions(+), 6 deletions(-) diff --git a/jcdm-ui/src/views/main/om/productionOrde/detail.vue b/jcdm-ui/src/views/main/om/productionOrde/detail.vue index 5d24ee3..096bd8a 100644 --- a/jcdm-ui/src/views/main/om/productionOrde/detail.vue +++ b/jcdm-ui/src/views/main/om/productionOrde/detail.vue @@ -10,13 +10,14 @@ placeholder="璇锋壂鎻忕浣撶爜" /> </el-form-item> + <el-checkbox class="custom-size" style="margin-left: 40px; margin-right: 40px" v-model="repairFlag">杩斾慨</el-checkbox> <el-button size="large" type="info" @click="refresh">杩斿洖</el-button> </el-form> </el-card> <el-row :gutter="0"> <el-col :span="6"> <div > - <el-card style="height: 460px"> + <el-card style="height: 560px"> <el-descriptions class="margin-top" :column="1" direction="horizontal"> <el-descriptions-item label="鐢熶骇璁㈠崟">{{singleSelect.workOrderNo}}</el-descriptions-item> <el-descriptions-item label="鏈哄瀷" :span="2">{{singleSelect.typeZ}}</el-descriptions-item> @@ -32,7 +33,7 @@ </el-col> <el-col :span="18"> <div> - <el-card style="height: 460px; overflow: auto"> + <el-card style="height: 560px; overflow: auto"> <el-table border :data="orderSchedulingList"> <el-table-column type="index" @@ -42,6 +43,9 @@ </el-table-column> <el-table-column label="鍙戝姩鏈哄彿" align="center" prop="engineNo" width="150"> + + </el-table-column> + <el-table-column label="绠变綋鐮�" align="center" prop="boxCode" width="250"> </el-table-column> <el-table-column label="鏈哄瀷" align="center" prop="model"> @@ -66,7 +70,14 @@ <span>{{ parseTime(scope.row.operateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> </template> </el-table-column> - + <el-table-column + fixed="right" + label="鎿嶄綔" + width="100"> + <template slot-scope="scope"> + <el-button @click="handleClick(scope.row)" type="text" size="small">鏇存崲绠变綋涓婄嚎</el-button> + </template> + </el-table-column> </el-table> <pagination v-show="total>0" @@ -80,20 +91,54 @@ </el-col> </el-row> </div> + <el-dialog v-dialogpop-up :title="title" :visible.sync="changeBoxFlag" width="500px" append-to-body> + <span slot="title"> + <i class="el-icon-s-order"></i> + {{titleName}} + </span> + <el-form ref="changeFrom" inline :model="changeFrom" label-width="80px"> + <el-form-item label="鍙戝姩鏈哄彿" prop="sfcCode"> + <el-input disabled v-model="changeFrom.sfcCode" style="width: 370px"/> + </el-form-item> + <el-form-item label="鍘熺浣撶爜" prop="boxCode"> + <el-input disabled v-model="changeFrom.boxCode" style="width: 370px"/> + </el-form-item> + <el-form-item label="鐜扮浣撶爜" v-model="changeFrom.newBoxCode" prop="newBoxCode"> + <input v-model="changeFrom.newBoxCode" + ref="changeBoxInput" + style="height: 39px; width: 370px" + placeholder="璇锋壂鎻忕浣撶爜" + /> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="submitFormForBoxCode">纭� 瀹�</el-button> + <el-button @click="cancel">鍙� 娑�</el-button> + </div> + </el-dialog> </div> </template> <script> -import { engineNoIsInModel, getSumDataMethod, listOrderScheduling3 } from "../../../../api/main/bs/orderScheduling/orderScheduling"; +import { engineNoIsInModel, changeBoxCode, getSumDataMethod, listOrderScheduling3 } from "../../../../api/main/bs/orderScheduling/orderScheduling"; export default { name: 'Detail', props: ['singleSelect'], dicts: ['order_scheduling_produce_status','quality_status','print_status','material_type'], data(){ return{ + title: '鏇存崲绠变綋', + changeBoxFlag: false, + titleName: '鏇存崲绠变綋', + changeFrom: { + boxCode: '', + newBoxCode: '', + sfcCode: '' + }, // 鎬绘潯鏁� total: 0, + repairFlag:false, queryParams: { orderNo:'', pageNum: 1, @@ -110,8 +155,53 @@ handleQuery(){ }, + submitFormForBoxCode(){ + if (this.changeFrom.newBoxCode === '' || this.changeFrom.newBoxCode === null){ + this.$message.info("鏂扮浣撶爜涓嶈兘涓虹┖") + } else { + changeBoxCode({sfcCode:this.changeFrom.sfcCode,newBoxCode:this.changeFrom.newBoxCode}).then(res => { + console.log('res',res) + if (res.code===200){ + this.$message({ + message:'鎿嶄綔鎴愬姛', + type:'success' + }) + this.changeBoxFlag = false + this.getListData() + this.$refs.inputdata.focus() + }else { + this.$message({ + message:res.msg, + type:'warning' + }) + + } + }) + } + + }, + handleClick(row){ + console.log('row',row) + this.changeBoxFlag = true + this.changeFrom.sfcCode = row.engineNo + this.changeFrom.boxCode = row.boxCode + this.changeFrom.newBoxCode = '' + this.$nextTick(()=>{ + this.$refs.changeBoxInput.focus() + }) + }, + cancel(){ + this.changeBoxFlag = false + this.$refs.inputdata.focus() + }, + handleChangeBoxInput(event){ + const input = event.target + const inputValue = input.value + this.changeFrom.newBoxCode = inputValue + + }, refresh() { - location.reload(); + this.$emit("reserveChild",null) }, setFocus(){ this.$nextTick(()=>{ @@ -131,7 +221,7 @@ this.scannerFlag = true //鎵弿瀹屾垚 engineNoIsInModel({engineNo:this.queryParams.productionNotice, - model:this.singleSelect.typeZ,orderNo:this.singleSelect.workOrderNo + model:this.singleSelect.typeZ,orderNo:this.singleSelect.workOrderNo,repairFlag:this.repairFlag }).then(res => { if (res.data===500){ this.$message({ @@ -143,6 +233,7 @@ message:'鎿嶄綔鎴愬姛', type:'success' }) + this.repairFlag = false this.getListData() } }) @@ -167,9 +258,11 @@ this.getListData() this.setFocus() this.$refs.inputdata.addEventListener('keydown',this.handleScannerInput) + this.$refs.changeBoxInput.addEventListener('keydown',this.handleChangeBoxInput) }, beforeDestroy() { this.$refs.inputdata.removeEventListener('keydown',this.handleScannerInput) + this.$refs.changeBoxInput.removeEventListener('keydown',this.handleChangeBoxInput) } } </script> -- Gitblit v1.9.3