From 46528c3843ce67038ddb2e00dd3d3998c206a69e Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期一, 06 五月 2024 17:26:10 +0800
Subject: [PATCH] 1.递交
---
src/views/workOrder/workOrderList.vue | 87 +++++++++++++++++++++++++++++++++++++------
1 files changed, 75 insertions(+), 12 deletions(-)
diff --git a/src/views/workOrder/workOrderList.vue b/src/views/workOrder/workOrderList.vue
index 6c176b4..af688a1 100644
--- a/src/views/workOrder/workOrderList.vue
+++ b/src/views/workOrder/workOrderList.vue
@@ -263,6 +263,18 @@
width="100"
/>
<el-table-column
+ prop="clerkuser"
+ label="閿�鍞笟鍔″憳"
+ sortable="custom"
+ show-tooltip-when-overflow
+ width="150"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.clerkuser">{{ row.clerkuser }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
prop="wkshp_name"
label="鐢熶骇杞﹂棿"
show-tooltip-when-overflow
@@ -488,7 +500,7 @@
<!--鏂板娲惧彂瀵硅瘽妗�-->
<el-dialog
v-el-drag-dialog
- :title="operation==='add'?'鏂板':'淇敼'"
+ :title="operation==='add'?'鏂板':(operation==='edit'?'淇敼':'璇︽儏')"
:visible.sync="dialogVisible"
width="1200px"
top="8vh"
@@ -620,6 +632,7 @@
:popper-append-to-body="false"
style="width: 200px;"
placeholder="璇烽�夋嫨杞﹂棿"
+ @change="getMesOrderNewStepContent"
>
<el-option
v-for="item in wkshopArr"
@@ -1968,7 +1981,7 @@
import {
AddMesOrderCodeSearch,
AddUpdateMesOrder, DeleteMesOrder,
- MesBadOrderSearch, MesOrderDistribution,
+ MesBadOrderSearch, MesOrderDistribution, MesOrderNewStepContent,
MesOrderSearch,
UpdateMesOrderStepSearch
} from '@/api/WorkOrder'
@@ -2425,6 +2438,10 @@
},
// 娲惧彂
send() {
+ if (this.multipleSelection.length === 0) {
+ return this.$message.info('璇峰厛鍕鹃�夌浉瀵瑰簲鐨勫伐鍗曪紒')
+ }
+
this.$confirm('鏄惁纭娲惧彂?', '鎻愮ず', {
confirmButtonText: '纭畾',
cancelButtonText: '鍙栨秷',
@@ -2496,16 +2513,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 +2556,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