|
@@ -5,16 +5,16 @@
|
|
|
<div class="add" @click="handleAdd(item, index)">+</div>
|
|
<div class="add" @click="handleAdd(item, index)">+</div>
|
|
|
<div class="delete" @click="handleDelete(index)">x</div>
|
|
<div class="delete" @click="handleDelete(index)">x</div>
|
|
|
<div class="unit" style="display: flex">
|
|
<div class="unit" style="display: flex">
|
|
|
- <label style="width: 50%">生产订单号:</label>
|
|
|
|
|
- <div style="width: 50%;word-break: break-all">{{ item.product_no}}</div>
|
|
|
|
|
|
|
+ <label style="width: 50%">销售订单号:</label>
|
|
|
|
|
+ <div style="width: 50%;word-break: break-all">{{ item.no}}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div style="display: flex" class="unit">
|
|
<div style="display: flex" class="unit">
|
|
|
<label>产品名称:</label>
|
|
<label>产品名称:</label>
|
|
|
- <div style="width: 60%">{{ item.product_title }}</div>
|
|
|
|
|
|
|
+ <div style="width: 60%">{{ item.material_code_show }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div style="display: flex; width: 100%; padding: 0.5rem">
|
|
<div style="display: flex; width: 100%; padding: 0.5rem">
|
|
|
<label style="width: 15%; text-align: right">工艺:</label>
|
|
<label style="width: 15%; text-align: right">工艺:</label>
|
|
|
- <div style="width: 60%">准分子爱格浅橡9327</div>
|
|
|
|
|
|
|
+ <div style="width: 60%">{{ item.specs }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div style="display: flex" class="unit">
|
|
<div style="display: flex" class="unit">
|
|
|
<label>包装数量:</label>
|
|
<label>包装数量:</label>
|
|
@@ -23,7 +23,7 @@
|
|
|
type="number"
|
|
type="number"
|
|
|
placeholder=" 请输入"
|
|
placeholder=" 请输入"
|
|
|
style="width: 60%; padding: 0 0 0 0.2rem"
|
|
style="width: 60%; padding: 0 0 0 0.2rem"
|
|
|
- v-model="item.quantity"
|
|
|
|
|
|
|
+ v-model="item.box_num"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="unit">
|
|
<div class="unit">
|
|
@@ -39,7 +39,7 @@
|
|
|
border-radius: 0.6rem;
|
|
border-radius: 0.6rem;
|
|
|
background: #fff;
|
|
background: #fff;
|
|
|
"
|
|
"
|
|
|
- @change="handleChooseTeam"
|
|
|
|
|
|
|
+ @change="handleChooseTeam($event,index)"
|
|
|
>
|
|
>
|
|
|
<template v-slot:first>
|
|
<template v-slot:first>
|
|
|
<b-form-select-option value="" disabled
|
|
<b-form-select-option value="" disabled
|
|
@@ -52,7 +52,7 @@
|
|
|
<div class="unit">
|
|
<div class="unit">
|
|
|
<label>人员:</label>
|
|
<label>人员:</label>
|
|
|
<Select
|
|
<Select
|
|
|
- v-model="formData.employee_id"
|
|
|
|
|
|
|
+ v-model="item.employee_id"
|
|
|
:options="employeeList"
|
|
:options="employeeList"
|
|
|
style="
|
|
style="
|
|
|
width: 60%;
|
|
width: 60%;
|
|
@@ -61,7 +61,7 @@
|
|
|
multiple
|
|
multiple
|
|
|
transfer
|
|
transfer
|
|
|
size="small"
|
|
size="small"
|
|
|
- :disabled="!formData.team_id"
|
|
|
|
|
|
|
+ :disabled="item.team_id ? false : true"
|
|
|
>
|
|
>
|
|
|
<Option v-for="item in employeeList" :key="item.id" :label="item.text" :value="item.value"/>
|
|
<Option v-for="item in employeeList" :key="item.id" :label="item.text" :value="item.value"/>
|
|
|
</Select>
|
|
</Select>
|
|
@@ -125,7 +125,7 @@ export default {
|
|
|
const data = {
|
|
const data = {
|
|
|
url: 'http://121.36.142.167:7774/jbl/api/module-data/team_list/page',
|
|
url: 'http://121.36.142.167:7774/jbl/api/module-data/team_list/page',
|
|
|
post: {"direction":"DESC","property":"id","fromClientType":"pc","number":0,"sorts":[],"rules":[],"size":15,"specialConditions":[],"dynamicFormCode":"team","developmentSystemId":null,"debugFlag":true},
|
|
post: {"direction":"DESC","property":"id","fromClientType":"pc","number":0,"sorts":[],"rules":[],"size":15,"specialConditions":[],"dynamicFormCode":"team","developmentSystemId":null,"debugFlag":true},
|
|
|
- header: ['Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiYXV0aCI6IlJPTEVfSU5ORVJfVVNFUixST0xFX0FETUlOIiwidG9rZW5JZCI6IjM1IiwiZXhwIjoxNjk0MjM3NzIyfQ.aO1_RGWVxXygefwuUg_au3ys71zc2KuIbxZNWgTBeLRK9JVEqQZeza4X1gtoA8_BxoKZUuaPnTP9gUrEGgF3UQ', 'Content-Sign: 88cb27fd67215452422c18f3ed71028e', 'Content-Type:application/json']
|
|
|
|
|
|
|
+ header: ['Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiYXV0aCI6IlJPTEVfSU5ORVJfVVNFUixST0xFX0FETUlOLFJPTEVfSU5URVJGQUNFIiwidG9rZW5JZCI6IjM1IiwiZXhwIjoxNjk0Njc0MTE0fQ.L3Di3K_cpF0rWSgvzbcLufLm8bkCxd3Y-xudfKzSm4F-qdpDr0hYWWQP5K5BYTNuZnu4tWpGmSW2KRHU0pjt-A', 'Content-Type:application/json']
|
|
|
}
|
|
}
|
|
|
this.axios.post('/api/testdwy', { ...data }).then(res => {
|
|
this.axios.post('/api/testdwy', { ...data }).then(res => {
|
|
|
this.teamList = res.data.content.filter(v => v.status)
|
|
this.teamList = res.data.content.filter(v => v.status)
|
|
@@ -134,51 +134,57 @@ export default {
|
|
|
v.text = v.title
|
|
v.text = v.title
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
|
|
+ // 获取人员
|
|
|
|
|
+ const data1 = {
|
|
|
|
|
+ url: 'http://121.36.142.167:7774/jbl/api/module-data/team_code_btn/page',
|
|
|
|
|
+ post:{"direction":"DESC","property":"id","fromClientType":"pc","number":0,"sorts":[],"rules":[],"size":15,"specialConditions":[],"workflowSearchBean":{},"dynamicFormCode":"person","dynamicFormTable":null,"ignoreField":true,"developmentSystemId":null,"debugFlag":true},
|
|
|
|
|
+ header: ['Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiYXV0aCI6IlJPTEVfSU5ORVJfVVNFUixST0xFX0FETUlOLFJPTEVfSU5URVJGQUNFIiwidG9rZW5JZCI6IjM1IiwiZXhwIjoxNjk0Njc0MTE0fQ.L3Di3K_cpF0rWSgvzbcLufLm8bkCxd3Y-xudfKzSm4F-qdpDr0hYWWQP5K5BYTNuZnu4tWpGmSW2KRHU0pjt-A', 'Content-Type:application/json']
|
|
|
|
|
+ }
|
|
|
|
|
+ this.axios.post('/api/testdwy', { ...data1 }).then(res => {
|
|
|
|
|
+ this.employeeList = res.data.content
|
|
|
|
|
+ this.employeeList.forEach(v => {
|
|
|
|
|
+ v.value = v.no
|
|
|
|
|
+ v.text = v.name
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ beforeRouteLeave (to, from, next) {
|
|
|
|
|
+ localStorage.removeItem(this.$route.query.id + '')
|
|
|
|
|
+ next()
|
|
|
|
|
+ },
|
|
|
|
|
+ beforeRouteEnter (to, from, next) {
|
|
|
|
|
+ if (localStorage.getItem(to.query.id)) {
|
|
|
|
|
+ next()
|
|
|
|
|
+ } else {
|
|
|
|
|
+ next(vm => {
|
|
|
|
|
+ vm.$router.replace('/cms/package/detail')
|
|
|
|
|
+ // 跳到该路由页面后,再替换为from.path来源路径
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
mounted () {
|
|
mounted () {
|
|
|
- this.list = []
|
|
|
|
|
- const id = this.$route.query.id.split(',')
|
|
|
|
|
- id.forEach(v => {
|
|
|
|
|
- const data = {
|
|
|
|
|
- url: `http://121.36.142.167:7774/jbl/api/module-data/production_orders/production_orders/473693703256879104/${v}`,
|
|
|
|
|
- header: ['Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiYXV0aCI6IlJPTEVfSU5ORVJfVVNFUixST0xFX0FETUlOIiwidG9rZW5JZCI6IjM1IiwiZXhwIjoxNjk0MjM3NzIyfQ.aO1_RGWVxXygefwuUg_au3ys71zc2KuIbxZNWgTBeLRK9JVEqQZeza4X1gtoA8_BxoKZUuaPnTP9gUrEGgF3UQ', 'Content-Type:application/json']
|
|
|
|
|
- }
|
|
|
|
|
- this.initData(data)
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const id = this.$route.query.id
|
|
|
|
|
+ this.initData(id)
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- initData (row) {
|
|
|
|
|
- this.axios.post('/api/testdwyget', { ...row }).then(res => {
|
|
|
|
|
- this.list.push(...res.data.data['production_orders_dtl'])
|
|
|
|
|
- this.formData = res.data.data['production_orders']
|
|
|
|
|
- this.formData.employee_id = []
|
|
|
|
|
- this.list.forEach(v => {
|
|
|
|
|
- v.team_id = this.formData.team_id
|
|
|
|
|
- v.break = [
|
|
|
|
|
- { break_id: '', break_num: 0 }
|
|
|
|
|
- ]
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ initData (id) {
|
|
|
|
|
+ this.list = JSON.parse(localStorage.getItem(id + ''))
|
|
|
|
|
+ this.list.forEach(v => {
|
|
|
|
|
+ v.team_id = ''
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- handleChooseTeam (e) {
|
|
|
|
|
|
|
+ handleChooseTeam (e, index) {
|
|
|
if (e) {
|
|
if (e) {
|
|
|
- this.formData.team_id = e
|
|
|
|
|
// 获取班组下的人员
|
|
// 获取班组下的人员
|
|
|
- const id = this.teamList.find(v => v.team_code === this.formData.team_id).dynamic_form_value_id
|
|
|
|
|
|
|
+ const id = this.teamList.find(v => v.team_code === e).dynamic_form_value_id
|
|
|
const data = {
|
|
const data = {
|
|
|
url: `http://121.36.142.167:7774/jbl/api/module-data/team/team/472629516238663680/${id}`,
|
|
url: `http://121.36.142.167:7774/jbl/api/module-data/team/team/472629516238663680/${id}`,
|
|
|
header: ['Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiYXV0aCI6IlJPTEVfSU5ORVJfVVNFUixST0xFX0FETUlOIiwidG9rZW5JZCI6IjM1IiwiZXhwIjoxNjk0MjM3NzIyfQ.aO1_RGWVxXygefwuUg_au3ys71zc2KuIbxZNWgTBeLRK9JVEqQZeza4X1gtoA8_BxoKZUuaPnTP9gUrEGgF3UQ', 'Content-Type:application/json']
|
|
header: ['Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiYXV0aCI6IlJPTEVfSU5ORVJfVVNFUixST0xFX0FETUlOIiwidG9rZW5JZCI6IjM1IiwiZXhwIjoxNjk0MjM3NzIyfQ.aO1_RGWVxXygefwuUg_au3ys71zc2KuIbxZNWgTBeLRK9JVEqQZeza4X1gtoA8_BxoKZUuaPnTP9gUrEGgF3UQ', 'Content-Type:application/json']
|
|
|
}
|
|
}
|
|
|
this.axios.post('/api/testdwyget', { ...data }).then(res => {
|
|
this.axios.post('/api/testdwyget', { ...data }).then(res => {
|
|
|
- this.employeeList = res.data.data.employee
|
|
|
|
|
- this.employeeList.forEach(v => {
|
|
|
|
|
- v.value = v.team_code
|
|
|
|
|
- v.text = v.team_code_show
|
|
|
|
|
- })
|
|
|
|
|
- this.formData.employee_id = []
|
|
|
|
|
|
|
+ this.list[index].employee_id = res.data.data.employee.map(v => v.team_code)
|
|
|
|
|
+ this.$forceUpdate()
|
|
|
})
|
|
})
|
|
|
- } else {
|
|
|
|
|
- this.formData.employee_id = []
|
|
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
handleReturn () {
|
|
handleReturn () {
|