|
|
@@ -4,7 +4,7 @@
|
|
|
<div v-for="(item, index) in list" :key="index" class="item">
|
|
|
<div class="unit" style="display: flex">
|
|
|
<label style="width: 40%">派工单号:</label>
|
|
|
- <div style="width: 60%;word-break: break-all">{{ item.dispatch_no}}</div>
|
|
|
+ <div style="width: 60%;word-break: break-all">{{ item.dispatch_order_no}}</div>
|
|
|
</div>
|
|
|
<div style="display: flex" class="unit">
|
|
|
<label style="width: 40%">产品名称:</label>
|
|
|
@@ -18,6 +18,7 @@
|
|
|
style="width: 70%; padding: 0 0 0 0.2rem"
|
|
|
v-model="item.finished_num"
|
|
|
type="number"
|
|
|
+ @on-change="handleChangeNumber($event,index)"
|
|
|
/>
|
|
|
</div>
|
|
|
<div class="unit">
|
|
|
@@ -32,6 +33,7 @@
|
|
|
border-radius: 0.6rem;
|
|
|
background: #fff;
|
|
|
"
|
|
|
+ @change="(e)=>handleChangeTeam(e,index)"
|
|
|
>
|
|
|
<!-- @change="handleChooseTeam"-->
|
|
|
<template v-slot:first>
|
|
|
@@ -49,10 +51,10 @@
|
|
|
width: 70%;
|
|
|
background: #fff;
|
|
|
"
|
|
|
- id="iSelect"
|
|
|
size='small'
|
|
|
transfer
|
|
|
multiple
|
|
|
+ @on-change="handleChangeEmployee($event,index)"
|
|
|
>
|
|
|
<Option v-for="item in employeeList" :key="item.id" :label="item.text" :value="item.value"/>
|
|
|
</Select>
|
|
|
@@ -70,6 +72,7 @@
|
|
|
border-radius: 0.6rem;
|
|
|
background: #fff;
|
|
|
"
|
|
|
+ @change="(e) => handleChangeEquipment(e,index)"
|
|
|
>
|
|
|
<template v-slot:first>
|
|
|
<b-form-select-option value="" disabled
|
|
|
@@ -255,13 +258,31 @@ export default {
|
|
|
this.initData(id)
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleChangeNumber (e, index) {
|
|
|
+ this.list[index].not_finished_num = this.list[index].dispatch_num - (e.target.value * 1)
|
|
|
+ },
|
|
|
+ handleChangeEmployee (e, index) {
|
|
|
+ this.list[index].employee_id_show = this.employeeList.filter(v => e.indexOf(v.no) !== -1).map(v => v.name).toString().replace(/,/g, '/$/$/$').replace(/\//g, '')
|
|
|
+ console.log(this.list[index])
|
|
|
+ },
|
|
|
+ handleChangeTeam (e, index) {
|
|
|
+ this.list[index].team_id_show = this.teamList.find(v => v.team_code === e).title
|
|
|
+ },
|
|
|
+ handleChangeEquipment (e, index) {
|
|
|
+ this.list[index].equipment_id_show = this.equipmentList.find(v => v.device_code === e).title
|
|
|
+ },
|
|
|
initData (id) {
|
|
|
this.list = JSON.parse(localStorage.getItem(id + ''))
|
|
|
this.list.forEach(v => {
|
|
|
v.team_finish_id = v.dispatch_orders.team_id
|
|
|
+ v.team_id_show = v.dispatch_orders.team_id_show
|
|
|
v.equipment_id = v.dispatch_orders.equipment_id
|
|
|
+ v.equipment_id_show = v.dispatch_orders.equipment_id_show
|
|
|
v.finished_num = v.not_finished_num
|
|
|
+ v.dispatch_order_no = v.dispatch_no
|
|
|
+ v.id = null
|
|
|
v.employee_id = v.dispatch_orders.employee_id.split(',')
|
|
|
+ v.employee_id_show = v.dispatch_orders.employee_id_show
|
|
|
v.break = [
|
|
|
{ break_id: '', break_num: 0 }
|
|
|
]
|
|
|
@@ -314,7 +335,7 @@ export default {
|
|
|
url: 'http://121.36.142.167:7774/jbl/api/module-data/completion_orders/completion_orders',
|
|
|
post: {
|
|
|
bizId: -1,
|
|
|
- bizTypeEK: 'LOWCODE',
|
|
|
+ bizTypeEk: 'LOWCODE',
|
|
|
dynamicFormId: "474201923419320320",
|
|
|
showModelId: "474382714828959744",
|
|
|
data: {
|
|
|
@@ -324,9 +345,9 @@ export default {
|
|
|
created_by: null,
|
|
|
created_date: null,
|
|
|
employee_id: v.employee_id.toString(),
|
|
|
- employee_id_show: "郭银",
|
|
|
+ employee_id_show: v.employee_id_show,
|
|
|
equipment_id: v.equipment_id,
|
|
|
- equipment_id_show: "5号多层热压机",
|
|
|
+ equipment_id_show: v.equipment_id_show,
|
|
|
last_modified_by: null,
|
|
|
last_modified_date: null,
|
|
|
process_id: v.dispatch_orders.process_id,
|
|
|
@@ -334,9 +355,9 @@ export default {
|
|
|
remark: null,
|
|
|
site: null,
|
|
|
team_id: v.team_finish_id,
|
|
|
- team_id_show: "包装一组",
|
|
|
+ team_id_show: v.team_id_show
|
|
|
},
|
|
|
- completion_orders_dtl: v
|
|
|
+ completion_orders_dtl: [v]
|
|
|
}
|
|
|
},
|
|
|
header: ['Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiYXV0aCI6IlJPTEVfSU5ORVJfVVNFUixST0xFX0FETUlOLFJPTEVfSU5URVJGQUNFIiwidG9rZW5JZCI6IjM1IiwiZXhwIjoxNjk0Njc0MTE0fQ.L3Di3K_cpF0rWSgvzbcLufLm8bkCxd3Y-xudfKzSm4F-qdpDr0hYWWQP5K5BYTNuZnu4tWpGmSW2KRHU0pjt-A', 'Content-Type:application/json']
|