add 托盘混料组盘,修改时间11月28日
This commit is contained in:
@@ -29,7 +29,20 @@
|
||||
<th>仓库编码</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody v-if="check === 'all'">
|
||||
<tr v-for="(e, i) in dataList" :class="{'checked': e.checked}" @tap="allCheck(e)">
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.material_spec}}</td>
|
||||
<td>{{e.unit_id}}</td>
|
||||
<td>{{e.single_weight}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.qty}}</td>
|
||||
<td>{{e.vehicle_code}}</td>
|
||||
<td>{{e.stor_code}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody v-else>
|
||||
<tr v-for="(e, i) in dataList" :key="i" :class="{'checked': e.material_id === pkId}" @tap="toCheck(e)">
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
@@ -50,7 +63,8 @@
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
|
||||
<button class="zd-col-8 button-primary" @tap="searchList">查询</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !pkId}" @tap="toSure">确认</button>
|
||||
<button v-if="check === 'all'" class="zd-col-8 button-primary" :class="{'button-info': !checkData.length}" @tap="toSure1">确认</button>
|
||||
<button v-else class="zd-col-8 button-primary" :class="{'button-info': !pkId}" @tap="toSure">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -66,6 +80,8 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
check: null,
|
||||
checkData: [],
|
||||
title: '',
|
||||
val1: '',
|
||||
dataList: [],
|
||||
@@ -85,6 +101,7 @@
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
this.check = options.check
|
||||
},
|
||||
methods: {
|
||||
searchList () {
|
||||
@@ -98,6 +115,11 @@
|
||||
this.totalCount = res.totalElements
|
||||
if (res.totalElements > 0) {
|
||||
const dataMap = res.content
|
||||
if (this.check === 'all') {
|
||||
dataMap.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
})
|
||||
}
|
||||
this.dataList = this.reload ? dataMap : this.dataList.concat(dataMap)
|
||||
this.reload = false
|
||||
} else {
|
||||
@@ -124,11 +146,22 @@
|
||||
this.pkId = this.pkId === e.material_id ? '' : e.material_id
|
||||
this.pkObj = this.pkId === e.material_id ? e : {}
|
||||
},
|
||||
allCheck (e) {
|
||||
e.checked = !e.checked
|
||||
this.checkData = this.dataList.filter(el => {return el.checked})
|
||||
},
|
||||
toEmpty () {
|
||||
this.val1 = ''
|
||||
this.dataList = []
|
||||
this.pageNum = 1
|
||||
this.pkId = ''
|
||||
this.checkData = []
|
||||
},
|
||||
toSure1 () {
|
||||
if (this.checkData.length > 0) {
|
||||
this.$store.dispatch('setPublicArr', this.checkData)
|
||||
uni.navigateBack()
|
||||
}
|
||||
},
|
||||
toSure () {
|
||||
if (this.pkId) {
|
||||
|
||||
Reference in New Issue
Block a user