接口
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i">
|
||||
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.material_code === pkId}">
|
||||
<td>{{Number(i) + 1}}</td>
|
||||
<td class="td_2">{{e.vehicle_code}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
@@ -72,6 +72,8 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
// val3: '',
|
||||
title: '',
|
||||
top: 0,
|
||||
@@ -114,6 +116,10 @@
|
||||
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 : {}
|
||||
},
|
||||
async _paperQueryPaperMaterial () {
|
||||
let res = await paperQueryPaperMaterial()
|
||||
this.dataList = [...res.rows]
|
||||
@@ -125,12 +131,15 @@
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await moveStock(this.index1)
|
||||
let res = await moveStock(this.pkObj)
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
this.pkId = ''
|
||||
this.pkObj = {}
|
||||
this.dataList = []
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
@@ -148,7 +157,7 @@
|
||||
async _showPapervehicleView () {
|
||||
let res = await showPapervehicleView(this.index1, this.index2)
|
||||
if (res) {
|
||||
this.dataList = [...res]
|
||||
this.dataList = [...res.rows]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user