选择销售订单

This commit is contained in:
2023-07-26 14:53:39 +08:00
parent 6523295b6b
commit eb2c670285
2 changed files with 36 additions and 38 deletions

View File

@@ -26,7 +26,7 @@ export default {
},
computed: {
title () {
let res = ['成品入库', '选择成品箱物料', '成品入库查询'][Number(this.$route.meta.guidePath) - 1]
let res = ['成品入库', '选择销售订单', '成品入库查询'][Number(this.$route.meta.guidePath) - 1]
return res
},
...mapGetters(['keepAlive'])

View File

@@ -39,33 +39,27 @@
<thead>
<tr>
<th>选择</th>
<th>序号</th>
<th>日期</th>
<th>单据</th>
<th>客户</th>
<th>箱号</th>
<th>物料编码</th>
<th>物料名称</th>
<th>交期</th>
<th>销售单</th>
<th></th>
<th>物料规格</th>
<th>数量</th>
<th>单位</th>
<th>物料编码</th>
<th>客户</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="e.sale_code" @click="toRadio(e)">
<tr v-for="e in dataList" :key="e.sale_code" @click="toRadio(e)">
<td>
<button class="iconfont select_icon select_square_icon" :class="e.checked ? 'selected_icon' : 'unselect_icon'"></button>
</td>
<td>{{i + 1}}</td>
<td>{{e.create_time}}</td>
<td>{{e.plandeliver_date}}</td>
<td>{{e.sale_code}}</td>
<td>{{e.cust_name}}</td>
<td>{{e.bucketunique}}</td>
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
<td>{{e.seq_no}}</td>
<td>{{e.material_spec}}</td>
<td>{{e.sale_qty | numeric(3)}}</td>
<td>{{e.qty_unit_name}}</td>
<td>{{e.sale_qty | numeric(0)}}</td>
<td>{{e.material_code}}</td>
<td>{{e.cust_name}}</td>
</tr>
</tbody>
</table>
@@ -80,7 +74,7 @@ export default {
data () {
return {
page: 1,
size: '30',
size: '22',
busy: false,
desc: '',
val1: '',
@@ -99,30 +93,34 @@ export default {
this.page = 1
this.busy = false
this.desc = ''
let res = await getMaterial(this.date !== null ? dateTimeFtt(this.date[0]) : '', this.date !== null ? dateTimeFtt(this.date[1]) : '', this.val1, this.val2)
this.dataList = []
res.data.map(el => {
this.$set(el, 'checked', false)
})
this.dataList = [...res.data]
if (res.data.length < 30) {
this.busy = true
this.desc = '已加载全部数据'
let res = await getMaterial(this.page + '', this.size, this.date !== null ? dateTimeFtt(this.date[0]) : '', this.date !== null ? dateTimeFtt(this.date[1]) : '', this.val1, this.val2)
if (res.code === 200) {
this.dataList = []
res.content.map(el => {
this.$set(el, 'checked', false)
})
this.dataList = [...res.content]
if (res.content.length < 22) {
this.busy = true
this.desc = '已加载全部数据'
}
}
},
async loadMore () {
this.busy = true
this.page++
let res = await getMaterial(this.date !== null ? dateTimeFtt(this.date[0]) : '', this.date !== null ? dateTimeFtt(this.date[1]) : '', this.val1, this.val2)
res.data.map(el => {
this.$set(el, 'checked', false)
})
this.dataList = [...this.dataList, ...res.data]
if (res.data.length < 30) {
this.busy = true
this.desc = '已加载全部数据'
} else {
this.busy = false
let res = await getMaterial(this.page + '', this.size, this.date !== null ? dateTimeFtt(this.date[0]) : '', this.date !== null ? dateTimeFtt(this.date[1]) : '', this.val1, this.val2)
if (res.code === 200) {
res.content.map(el => {
this.$set(el, 'checked', false)
})
this.dataList = [...this.dataList, ...res.content]
if (res.content.length < 22) {
this.busy = true
this.desc = '已加载全部数据'
} else {
this.busy = false
}
}
},
colseUp () {