管芯备货
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{$t('grid.select')}}</th>
|
||||
<th>{{$t('grid.number')}}</th>
|
||||
<th class="th_2">{{$t('filter.pallet-number')}}</th>
|
||||
<th>{{$t('grid.coretype')}}</th>
|
||||
@@ -46,7 +47,8 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.material_code === pkId}">
|
||||
<tr v-for="(e, i) in dataList" :key="i" :class="{'checked': e.checked}" @tap="toCheck(e)">
|
||||
<td><span class="iconfont icon_unchecked" :class="{'icon_checked': e.checked}"></span></td>
|
||||
<td>{{Number(i) + 1}}</td>
|
||||
<td class="td_2">{{e.vehicle_code}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
@@ -96,6 +98,7 @@
|
||||
options2: [],
|
||||
index2: '',
|
||||
disabled: false,
|
||||
checkArr: [],
|
||||
dataList: []
|
||||
};
|
||||
},
|
||||
@@ -130,9 +133,13 @@
|
||||
selectChange2(e) {
|
||||
this.index2 = e
|
||||
},
|
||||
// toCheck (e) {
|
||||
// this.pkId = this.pkId === e.material_code ? '' : e.material_code
|
||||
// this.pkObj = this.pkId === e.material_code ? e : {}
|
||||
// },
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.material_code ? '' : e.material_code
|
||||
this.pkObj = this.pkId === e.material_code ? e : {}
|
||||
e.checked = !e.checked
|
||||
this.checkArr = this.dataList.filter(i => { return i.checked })
|
||||
},
|
||||
async _paperQueryPaperMaterial () {
|
||||
let res = await paperQueryPaperMaterial()
|
||||
@@ -150,7 +157,7 @@
|
||||
async _moveStock () {
|
||||
this.disabled = true
|
||||
try {
|
||||
let res = await moveStock(this.pkObj)
|
||||
let res = await moveStock(this.checkArr)
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
@@ -177,6 +184,14 @@
|
||||
let res = await showPapervehicleView(this.index1, this.index2, this.val1)
|
||||
if (res) {
|
||||
this.dataList = [...res.rows]
|
||||
if (this.dataList.length) {
|
||||
this.dataList.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
if (el.sign_num > 0) {
|
||||
el.checked = true
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user