From 8b6b764f3903d7c154023386090dd29958f5b203 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期五, 19 一月 2024 10:40:10 +0800
Subject: [PATCH] 1.生产报工 工单号扫描完回车置空
---
src/views/workOrder/workOrderList.vue | 75 +++++++++++++++++++++++++++++++------
1 files changed, 63 insertions(+), 12 deletions(-)
diff --git a/src/views/workOrder/workOrderList.vue b/src/views/workOrder/workOrderList.vue
index 6c176b4..dec0654 100644
--- a/src/views/workOrder/workOrderList.vue
+++ b/src/views/workOrder/workOrderList.vue
@@ -488,7 +488,7 @@
<!--鏂板娲惧彂瀵硅瘽妗�-->
<el-dialog
v-el-drag-dialog
- :title="operation==='add'?'鏂板':'淇敼'"
+ :title="operation==='add'?'鏂板':(operation==='edit'?'淇敼':'璇︽儏')"
:visible.sync="dialogVisible"
width="1200px"
top="8vh"
@@ -620,6 +620,7 @@
:popper-append-to-body="false"
style="width: 200px;"
placeholder="璇烽�夋嫨杞﹂棿"
+ @change="getMesOrderNewStepContent"
>
<el-option
v-for="item in wkshopArr"
@@ -1968,7 +1969,7 @@
import {
AddMesOrderCodeSearch,
AddUpdateMesOrder, DeleteMesOrder,
- MesBadOrderSearch, MesOrderDistribution,
+ MesBadOrderSearch, MesOrderDistribution, MesOrderNewStepContent,
MesOrderSearch,
UpdateMesOrderStepSearch
} from '@/api/WorkOrder'
@@ -2425,6 +2426,10 @@
},
// 娲惧彂
send() {
+ if (this.multipleSelection.length === 0) {
+ return this.$message.info('璇峰厛鍕鹃�夌浉瀵瑰簲鐨勫伐鍗曪紒')
+ }
+
this.$confirm('鏄惁纭娲惧彂?', '鎻愮ず', {
confirmButtonText: '纭畾',
cancelButtonText: '鍙栨秷',
@@ -2496,16 +2501,36 @@
const { data: res } = await UpdateMesOrderStepSearch(data)
this.dialogForm.mesmaxqty = res.canupdate_qty
- res.stepdata.forEach(i => {
- this.stepTableData.push(
- {
- stepcode: i.step_code,
- stepname: i.stepname,
- stepprice: i.stepprice
- }
- )
- })
- this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
+ if (res.stepdata.length > 0) {
+ res.stepdata.forEach(i => {
+ this.stepTableData.push(
+ {
+ stepcode: i.step_code,
+ stepname: i.stepname,
+ stepprice: i.stepprice
+ }
+ )
+ })
+ this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
+ } else {
+ const data2 = {
+ wkshopcode: this.dialogForm.wkshopcode,
+ partcode: this.dialogForm.partcode
+ }
+ const { data: res2 } = await MesOrderNewStepContent(data2)
+ if (res2.length > 0) {
+ res2.forEach(i => {
+ this.stepTableData.push(
+ {
+ stepcode: i.step_code,
+ // stepname: i.stepname,
+ stepprice: i.stepprice
+ }
+ )
+ })
+ this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
+ }
+ }
this.dialogVisible = true
},
@@ -2519,7 +2544,33 @@
this.dialogForm.partname = this.partArr.find(item => item.partcode === val).partname
this.dialogForm.partcode = this.partArr.find(item => item.partcode === val).partcode
this.dialogForm.partspec = this.partArr.find(item => item.partcode === val).partspec
+ if (this.dialogForm.wkshopcode) {
+ this.getMesOrderNewStepContent()
+ }
},
+ async getMesOrderNewStepContent() {
+ const data = {
+ wkshopcode: this.dialogForm.wkshopcode,
+ partcode: this.dialogForm.partcode
+ }
+ const { data: res } = await MesOrderNewStepContent(data)
+ // console.log(res)
+ this.stepSelectedValue = []
+ this.stepTableData = []
+ if (res.length > 0) {
+ res.forEach(i => {
+ this.stepTableData.push(
+ {
+ stepcode: i.step_code,
+ // stepname: i.stepname,
+ stepprice: i.stepprice
+ }
+ )
+ })
+ this.stepSelectedValue = this.stepTableData.map(i => i.stepcode)
+ }
+ },
+
// 瀵硅瘽妗嗗叧闂簨浠�
handleClose() {
this.dialogForm = {
--
Gitblit v1.9.3