|
@@ -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">{{ formData.dispatch_no }}</div>
|
|
|
+ <div style="width: 60%;word-break: break-all">{{ item.dispatch_no}}</div>
|
|
|
</div>
|
|
|
<div style="display: flex" class="unit">
|
|
|
<label style="width: 40%">产品名称:</label>
|
|
@@ -23,7 +23,7 @@
|
|
|
<div class="unit">
|
|
|
<label>班组:</label>
|
|
|
<b-form-select
|
|
|
- v-model="formData.team_id"
|
|
|
+ v-model="item.team_id"
|
|
|
:options="teamList"
|
|
|
style="
|
|
|
height: 1.4rem;
|
|
@@ -44,7 +44,7 @@
|
|
|
<div class="unit">
|
|
|
<label>人员:</label>
|
|
|
<Select
|
|
|
- v-model="formData.employee_id"
|
|
|
+ v-model="item.employee_id"
|
|
|
style="
|
|
|
width: 70%;
|
|
|
background: #fff;
|
|
@@ -52,7 +52,6 @@
|
|
|
size='small'
|
|
|
transfer
|
|
|
multiple
|
|
|
- :disabled="!formData.team_id"
|
|
|
>
|
|
|
<Option v-for="item in employeeList" :key="item.id" :label="item.text" :value="item.value"/>
|
|
|
</Select>
|
|
@@ -81,7 +80,7 @@
|
|
|
<div
|
|
|
v-for="(_item, _index) in item.break"
|
|
|
:key="_index"
|
|
|
- style="display: flex; align-item: center"
|
|
|
+ style="display: flex; align-items: center"
|
|
|
>
|
|
|
<div style="width: 35%; padding: 0 0.5rem 1rem 0.5rem">
|
|
|
<label>不良品原因:</label>
|
|
@@ -209,60 +208,46 @@ export default {
|
|
|
v.text = v.title
|
|
|
})
|
|
|
})
|
|
|
+ // 获取班组
|
|
|
+ const data = {
|
|
|
+ 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},
|
|
|
+ header: ['Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiYXV0aCI6IlJPTEVfSU5ORVJfVVNFUixST0xFX0FETUlOIiwidG9rZW5JZCI6IjM1IiwiZXhwIjoxNjk0MjM3NzIyfQ.aO1_RGWVxXygefwuUg_au3ys71zc2KuIbxZNWgTBeLRK9JVEqQZeza4X1gtoA8_BxoKZUuaPnTP9gUrEGgF3UQ', 'Content-Sign: 88cb27fd67215452422c18f3ed71028e', 'Content-Type:application/json']
|
|
|
+ }
|
|
|
+ this.axios.post('/api/testdwy', { ...data }).then(res => {
|
|
|
+ this.teamList = res.data.content.filter(v => v.status)
|
|
|
+ this.teamList.forEach(v => {
|
|
|
+ v.value = v.team_code
|
|
|
+ v.text = v.title
|
|
|
+ })
|
|
|
+ })
|
|
|
+ // 获取人员
|
|
|
+ const data3 = {
|
|
|
+ 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', { ...data3 }).then(res => {
|
|
|
+ this.employeeList = res.data.content
|
|
|
+ this.employeeList.forEach(v => {
|
|
|
+ v.value = v.id
|
|
|
+ v.text = v.name
|
|
|
+ })
|
|
|
+ })
|
|
|
},
|
|
|
mounted () {
|
|
|
- this.list = []
|
|
|
- const id = this.$route.query.id.split(',')
|
|
|
+ const id = this.$route.query.id
|
|
|
this.initData(id)
|
|
|
},
|
|
|
methods: {
|
|
|
- async initData (id) {
|
|
|
- // 获取班组
|
|
|
- const data1 = {
|
|
|
- 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},
|
|
|
- header: ['Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiYXV0aCI6IlJPTEVfSU5ORVJfVVNFUixST0xFX0FETUlOIiwidG9rZW5JZCI6IjM1IiwiZXhwIjoxNjk0MjM3NzIyfQ.aO1_RGWVxXygefwuUg_au3ys71zc2KuIbxZNWgTBeLRK9JVEqQZeza4X1gtoA8_BxoKZUuaPnTP9gUrEGgF3UQ', 'Content-Sign: 88cb27fd67215452422c18f3ed71028e', 'Content-Type:application/json']
|
|
|
- }
|
|
|
- await this.axios.post('/api/testdwy', { ...data1 }).then(res => {
|
|
|
- this.teamList = res.data.content.filter(v => v.status)
|
|
|
- this.teamList.forEach(v => {
|
|
|
- v.value = v.team_code
|
|
|
- v.text = v.title
|
|
|
- })
|
|
|
+ initData (id) {
|
|
|
+ this.list = JSON.parse(localStorage.getItem(id + ''))
|
|
|
+ this.list.forEach(v => {
|
|
|
+ v.team_id = this.formData.team_id
|
|
|
+ v.break = [
|
|
|
+ { break_id: '', break_num: 0 }
|
|
|
+ ]
|
|
|
})
|
|
|
- for(const v in id){
|
|
|
- const data = {
|
|
|
- url: `http://121.36.142.167:7774/jbl/api/module-data/dispatch_orders/dispatch_orders/474048895554891776/${id[v]}`,
|
|
|
- header: ['Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiYXV0aCI6IlJPTEVfSU5ORVJfVVNFUixST0xFX0FETUlOIiwidG9rZW5JZCI6IjM1IiwiZXhwIjoxNjk0MjM3NzIyfQ.aO1_RGWVxXygefwuUg_au3ys71zc2KuIbxZNWgTBeLRK9JVEqQZeza4X1gtoA8_BxoKZUuaPnTP9gUrEGgF3UQ', 'Content-Type:application/json']
|
|
|
- }
|
|
|
- await this.axios.post('/api/testdwyget', { ...data }).then(res => {
|
|
|
- this.list.push(...res.data.data['dispatch_orders_dtl'])
|
|
|
- this.formData = res.data.data['dispatch_orders']
|
|
|
- this.formData.employee_id = []
|
|
|
- if (this.formData.team_id) {
|
|
|
- // 获取班组下的人员
|
|
|
- console.log((this.teamList))
|
|
|
- const id = this.teamList.find(v => v.team_code === this.formData.team_id).dynamic_form_value_id
|
|
|
- const data = {
|
|
|
- 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']
|
|
|
- }
|
|
|
- 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.list.forEach(v => {
|
|
|
- v.team_id = this.formData.team_id
|
|
|
- v.break = [
|
|
|
- { break_id: '', break_num: 0 }
|
|
|
- ]
|
|
|
- })
|
|
|
- })
|
|
|
- }
|
|
|
},
|
|
|
handleBreakAdd (_index, item, index) {
|
|
|
item.break.splice(_index + 1, 0, {
|
|
@@ -401,7 +386,4 @@ export default {
|
|
|
margin: 0.5rem;
|
|
|
border: 0.1rem solid;
|
|
|
}
|
|
|
-::v-deep ul.ivu-select-dropdown-list{
|
|
|
- padding: 0 !important;
|
|
|
-}
|
|
|
</style>
|