2023-06-28 18:09:04 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="order-wraper">
|
|
|
|
|
<div class="search-confirm-wrap">
|
|
|
|
|
<div class="search-wrap">
|
|
|
|
|
<div class="search-item">
|
|
|
|
|
<div class="search-label search-label_1">日期</div>
|
|
|
|
|
<div class="filter_input_wraper filter_input_wraper_1">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="date"
|
|
|
|
|
type="daterange"
|
|
|
|
|
range-separator="-"
|
|
|
|
|
start-placeholder="开始日期"
|
|
|
|
|
end-placeholder="结束日期">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="search-item">
|
|
|
|
|
<div class="search-label">单据号</div>
|
|
|
|
|
<div class="filter_input_wraper">
|
2023-06-30 17:36:57 +08:00
|
|
|
<input type="text" class="filter-input" v-model="val1">
|
2023-06-28 18:09:04 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="search-item">
|
|
|
|
|
<div class="search-label">物料</div>
|
|
|
|
|
<div class="filter_input_wraper">
|
2023-06-30 17:36:57 +08:00
|
|
|
<input type="text" class="filter-input" v-model="val2">
|
2023-06-28 18:09:04 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-07-03 15:55:27 +08:00
|
|
|
<div class="search-item flexend spesite">
|
2023-06-30 17:36:57 +08:00
|
|
|
<button class="button button--primary" @click="_getMaterial">快速查询</button>
|
|
|
|
|
<button class="button button--primary" @click="toSure">确定</button>
|
2023-07-03 17:19:13 +08:00
|
|
|
<button class="button button--primary" @click="clearUp">清空</button>
|
|
|
|
|
<button class="button button--primary" @click="colseUp">关闭</button>
|
2023-06-28 18:09:04 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-07-03 17:19:13 +08:00
|
|
|
<div class="grid_wraper" v-infinite-scroll="loadMore" infinite-scroll-disabled="busy" infinite-scroll-distance="0" infinite-scroll-immediate-check="false">
|
2023-06-28 18:09:04 +08:00
|
|
|
<table class="filter-table">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
2023-07-03 17:19:13 +08:00
|
|
|
<th>选择</th>
|
2023-06-28 18:09:04 +08:00
|
|
|
<th>序号</th>
|
|
|
|
|
<th>日期</th>
|
|
|
|
|
<th>单据号</th>
|
|
|
|
|
<th>客户</th>
|
|
|
|
|
<th>箱号</th>
|
|
|
|
|
<th>物料编码</th>
|
|
|
|
|
<th>物料名称</th>
|
|
|
|
|
<th>数量</th>
|
|
|
|
|
<th>单位</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
2023-07-03 17:19:13 +08:00
|
|
|
<tr v-for="(e, i) 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>
|
2023-06-30 17:36:57 +08:00
|
|
|
<td>{{i + 1}}</td>
|
|
|
|
|
<td>{{e.create_time}}</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>
|
2023-07-03 11:32:50 +08:00
|
|
|
<td>{{e.sale_qty | numeric(3)}}</td>
|
2023-06-30 17:36:57 +08:00
|
|
|
<td>{{e.qty_unit_name}}</td>
|
2023-06-28 18:09:04 +08:00
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2023-06-30 17:36:57 +08:00
|
|
|
import { getMaterial } from '../../../config/getData1.js'
|
2023-07-03 11:32:50 +08:00
|
|
|
import {dateTimeFtt} from '@config/utils.js'
|
2023-06-28 18:09:04 +08:00
|
|
|
export default {
|
|
|
|
|
data () {
|
|
|
|
|
return {
|
2023-07-03 17:19:13 +08:00
|
|
|
page: 1,
|
|
|
|
|
size: '30',
|
|
|
|
|
busy: false,
|
|
|
|
|
desc: '',
|
2023-06-30 17:36:57 +08:00
|
|
|
val1: '',
|
|
|
|
|
val2: '',
|
2023-07-03 11:32:50 +08:00
|
|
|
date: [new Date((new Date().getTime() - 6 * 24 * 60 * 60 * 1000)), new Date((new Date().getTime()))],
|
2023-07-03 17:19:13 +08:00
|
|
|
dataList: [{sale_code: '030301010037', checked: false}, {sale_code: '030301010038', checked: false}],
|
|
|
|
|
checkArr: []
|
2023-06-30 17:36:57 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created () {
|
|
|
|
|
this._getMaterial()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
2023-07-03 17:19:13 +08:00
|
|
|
// grid
|
2023-06-30 17:36:57 +08:00
|
|
|
async _getMaterial () {
|
2023-07-03 17:19:13 +08:00
|
|
|
this.page = 1
|
|
|
|
|
this.busy = false
|
|
|
|
|
this.desc = ''
|
2023-07-03 11:32:50 +08:00
|
|
|
let res = await getMaterial(this.date !== null ? dateTimeFtt(this.date[0]) : '', this.date !== null ? dateTimeFtt(this.date[1]) : '', this.val1, this.val2)
|
2023-07-03 17:19:13 +08:00
|
|
|
this.dataList = []
|
|
|
|
|
res.data.map(el => {
|
|
|
|
|
this.$set(el, 'checked', false)
|
|
|
|
|
})
|
2023-06-30 17:36:57 +08:00
|
|
|
this.dataList = [...res.data]
|
2023-07-03 17:19:13 +08:00
|
|
|
if (res.data.length < 30) {
|
|
|
|
|
this.busy = true
|
|
|
|
|
this.desc = '已加载全部数据'
|
|
|
|
|
}
|
2023-06-30 17:36:57 +08:00
|
|
|
},
|
2023-07-03 17:19:13 +08:00
|
|
|
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
|
|
|
|
|
}
|
2023-06-30 17:36:57 +08:00
|
|
|
},
|
2023-07-03 17:19:13 +08:00
|
|
|
colseUp () {
|
2023-06-30 17:36:57 +08:00
|
|
|
this.$router.push('/finishedinstore')
|
|
|
|
|
},
|
2023-07-03 17:19:13 +08:00
|
|
|
toSure () {
|
|
|
|
|
if (this.checkArr.length === 0) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.$store.dispatch('setMaterArr', this.checkArr)
|
|
|
|
|
this.colseUp()
|
2023-06-30 17:36:57 +08:00
|
|
|
},
|
2023-07-03 17:19:13 +08:00
|
|
|
clearUp () {
|
|
|
|
|
this.checkArr = []
|
|
|
|
|
},
|
|
|
|
|
toRadio (e) {
|
|
|
|
|
e.checked = !e.checked
|
|
|
|
|
this.checkArr = this.dataList.filter(i => { return i.checked === true })
|
2023-06-28 18:09:04 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
|
|
|
|
.grid_wraper
|
|
|
|
|
height calc(100% - 95px)
|
|
|
|
|
.filter_input_wraper_1
|
|
|
|
|
width calc(100% - 45px)
|
|
|
|
|
.search-label_1
|
|
|
|
|
width 45px
|
2023-07-03 15:55:27 +08:00
|
|
|
.spesite
|
|
|
|
|
position relative
|
|
|
|
|
left 68%
|
2023-06-28 18:09:04 +08:00
|
|
|
</style>
|