|
@@ -3,11 +3,11 @@
|
|
|
<div class="header">
|
|
|
<div class="header_top">
|
|
|
<Button
|
|
|
- type="primary"
|
|
|
- class="header_btn"
|
|
|
- ghost
|
|
|
- @click="handleShow"
|
|
|
- :icon="is_show ? 'ios-arrow-dropup' : 'ios-arrow-dropdown'"
|
|
|
+ type="primary"
|
|
|
+ class="header_btn"
|
|
|
+ ghost
|
|
|
+ @click="handleShow"
|
|
|
+ :icon="is_show ? 'ios-arrow-dropup' : 'ios-arrow-dropdown'"
|
|
|
>
|
|
|
<div style="margin-right: 0.6rem">
|
|
|
{{ is_show ? "收起" : "展开" }}
|
|
@@ -45,42 +45,42 @@
|
|
|
<div class="bdy">
|
|
|
<table>
|
|
|
<tr style="height: 2rem">
|
|
|
- <th style="width: 3rem">生产订单号</th>
|
|
|
+ <th style="width: 3rem">派工单号</th>
|
|
|
<th style="width: 4rem">产品名称</th>
|
|
|
<th style="width: 3rem">规格型号</th>
|
|
|
- <th style="width: 3rem">已完工数量</th>
|
|
|
- <th style="width: 3rem">未完工数量</th>
|
|
|
+ <th style="width: 3rem">已包装数量</th>
|
|
|
+ <th style="width: 3rem">未包装数量</th>
|
|
|
</tr>
|
|
|
<tr
|
|
|
- v-for="(item, index) in tableData"
|
|
|
- :key="index"
|
|
|
- @click="handleChoose(item, index)"
|
|
|
- :class="item.is_choose ? 'choose_item' : ''"
|
|
|
+ v-for="(item, index) in tableData"
|
|
|
+ :key="index"
|
|
|
+ @click="handleChoose(item, index)"
|
|
|
+ :class="item.is_choose ? 'choose_item' : ''"
|
|
|
>
|
|
|
<td>
|
|
|
- {{ item.production_no }}
|
|
|
+ {{ item.no }}
|
|
|
</td>
|
|
|
- <td>{{ item.product_title }}</td>
|
|
|
- <td>{{ item.size }}</td>
|
|
|
- <td>{{ item.finished_num }}</td>
|
|
|
- <td>{{ item.un_finished_quantity }}</td>
|
|
|
+ <td>{{ item.material_code_show }}</td>
|
|
|
+ <td>{{item.specs }}</td>
|
|
|
+ <td>{{ item.box_num }}</td>
|
|
|
+ <td>{{ item.not_box_num }}</td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
</div>
|
|
|
<div class="footer">
|
|
|
<Button
|
|
|
- type="primary"
|
|
|
- class="header_btn"
|
|
|
- style="margin-right: 3rem; height: 2.6rem"
|
|
|
- @click="handleReturn"
|
|
|
+ type="primary"
|
|
|
+ class="header_btn"
|
|
|
+ style="margin-right: 3rem; height: 2.6rem"
|
|
|
+ @click="handleReturn"
|
|
|
>
|
|
|
返回</Button
|
|
|
>
|
|
|
<Button
|
|
|
- type="primary"
|
|
|
- class="header_btn"
|
|
|
- style="margin-left: 3rem; height: 2.6rem"
|
|
|
- @click="handelGoSure"
|
|
|
+ type="primary"
|
|
|
+ class="header_btn"
|
|
|
+ style="margin-left: 3rem; height: 2.6rem"
|
|
|
+ @click="handelGoSure"
|
|
|
>
|
|
|
确认</Button
|
|
|
>
|
|
@@ -91,32 +91,35 @@
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
|
-
|
|
|
tableData: [],
|
|
|
is_show: true,
|
|
|
is_use: false
|
|
|
-
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
|
- let data = {}
|
|
|
- if (localStorage.getItem('fyy_target')) {
|
|
|
- data.target = JSON.parse(localStorage.getItem('fyy_target'))
|
|
|
- }
|
|
|
- data = {
|
|
|
- url: 'http://121.36.142.167:7774/jbl/api/module-data/production_orders_list/page',
|
|
|
- post: {"direction":"DESC","property":"id","fromClientType":"pc","number":0,"sorts":[],"rules":[],"size":15,"specialConditions":[],"dynamicFormCode":"production_orders","developmentSystemId":null,"debugFlag":true},
|
|
|
- header: ['Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiYXV0aCI6IlJPTEVfSU5ORVJfVVNFUixST0xFX0FETUlOIiwidG9rZW5JZCI6IjM1IiwiZXhwIjoxNjk0MjM3NzIyfQ.aO1_RGWVxXygefwuUg_au3ys71zc2KuIbxZNWgTBeLRK9JVEqQZeza4X1gtoA8_BxoKZUuaPnTP9gUrEGgF3UQ', 'Content-Sign: e2938faaabcd8654dfb07a98bd84d3f1', 'Content-Type:application/json']
|
|
|
- }
|
|
|
- this.initData(data)
|
|
|
+ // if (localStorage.getItem('fyy_target')) {
|
|
|
+ // data.target = JSON.parse(localStorage.getItem('fyy_target'))
|
|
|
+ // }
|
|
|
+ this.tableData = []
|
|
|
+ const fyyTarget = ('SO202308070002,SO202308070001').split(',')
|
|
|
+ fyyTarget.forEach(v => {
|
|
|
+ const data = {
|
|
|
+ url: 'http://121.36.142.167:7774/jbl/api/module-data/sale_order/page',
|
|
|
+ post: {"direction":"DESC","property":"id","fromClientType":"pc","number":0,"sorts":[],"rules":[{"field":"exe_sale_order_b.no","option":"LIKE_ANYWHERE","values":[v]}],"size":15,"specialConditions":[],"workflowSearchBean":{},"dynamicFormCode":"sale_order","dynamicFormTable":null,"ignoreField":true,"developmentSystemId":null,"debugFlag":true},
|
|
|
+ header: ['Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxIiwiYXV0aCI6IlJPTEVfSU5ORVJfVVNFUixST0xFX0FETUlOLFJPTEVfSU5URVJGQUNFIiwidG9rZW5JZCI6IjM1IiwiZXhwIjoxNjk0Njc0MTE0fQ.L3Di3K_cpF0rWSgvzbcLufLm8bkCxd3Y-xudfKzSm4F-qdpDr0hYWWQP5K5BYTNuZnu4tWpGmSW2KRHU0pjt-A', 'Content-Sign:a2898699a4433b413d8473e4b59d64b8', 'Content-Type:application/json']
|
|
|
+ }
|
|
|
+ this.initData(data)
|
|
|
+ })
|
|
|
},
|
|
|
methods: {
|
|
|
initData (row) {
|
|
|
this.axios.post('/api/testdwy', { ...row }).then(res => {
|
|
|
- this.tableData = res.data.content ? res.data.content : []
|
|
|
- this.tableData.forEach(v => {
|
|
|
+ res.data.content.forEach(v => {
|
|
|
v.is_choose = false
|
|
|
+ v.no = v.exe_sale_order_b.no
|
|
|
+ v.box_num = v.box_num || 0
|
|
|
})
|
|
|
+ this.tableData.push(...res.data.content)
|
|
|
})
|
|
|
},
|
|
|
handelGoSure () {
|
|
@@ -124,20 +127,21 @@ export default {
|
|
|
return this.$Message.warning('请先选择数据!')
|
|
|
}
|
|
|
localStorage.removeItem('fyy_target')
|
|
|
- const id = this.tableData.filter(v => v.is_choose).map(v => v['dynamic_form_value_id']).toString()
|
|
|
- this.$router.push({ path: '/cms/Package/detailed', query: { id } })
|
|
|
+ const dataId = Math.floor(Math.random() * 100)
|
|
|
+ const text = JSON.stringify(this.tableData.filter(v => v.is_choose))
|
|
|
+ localStorage.setItem(dataId + '', text)
|
|
|
+ this.$router.push({ path: '/cms/package/detailed', query: { id: dataId } })
|
|
|
},
|
|
|
handleReturn () {
|
|
|
- localStorage.removeItem('fyy_target');
|
|
|
- this.$router.push('/cms/home');
|
|
|
+ localStorage.removeItem('fyy_target')
|
|
|
+ this.$router.push('/cms/home')
|
|
|
},
|
|
|
- handleChoose(item, index) {
|
|
|
- item.is_choose = !item.is_choose;
|
|
|
- this.tableData.splice(index, 1, item);
|
|
|
+ handleChoose (item, index) {
|
|
|
+ item.is_choose = !item.is_choose
|
|
|
+ this.tableData.splice(index, 1, item)
|
|
|
},
|
|
|
handleShow () {
|
|
|
- this.is_show = !this.is_show;
|
|
|
- console.log(document.getElementsByClassName('header'))
|
|
|
+ this.is_show = !this.is_show
|
|
|
if (this.is_show) {
|
|
|
document.getElementsByClassName('header')[0].style = 'height:7rem;overflow:hidden;transition:all .4s;'
|
|
|
setTimeout(() => {
|
|
@@ -145,7 +149,7 @@ export default {
|
|
|
this.is_use = false
|
|
|
}, 400)
|
|
|
} else {
|
|
|
- this.is_use = true;
|
|
|
+ this.is_use = true
|
|
|
document.getElementsByClassName('header')[0].style = 'height:2.7rem;overflow:hidden;transition:all .4s;'
|
|
|
}
|
|
|
}
|