接口
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]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,17 +11,9 @@ export const showPapervehicleView = (area, code) => request({
|
||||
}
|
||||
})
|
||||
// 管芯备货-备货
|
||||
export const moveStock = (vcode, mcode, mname, tnum, pcode, parea, pareaname) => request({
|
||||
export const moveStock = (obj) => request({
|
||||
url:'api/pda/stockingivt/moveStock',
|
||||
data: {
|
||||
vehicle_code: vcode,
|
||||
material_code: mcode,
|
||||
material_name: mname,
|
||||
total_num: tnum,
|
||||
point_code: pcode,
|
||||
product_area: parea,
|
||||
product_area_name: pareaname
|
||||
}
|
||||
data: obj
|
||||
})
|
||||
// 管芯备货-区域下拉框
|
||||
export const queryProductArea = () => request({
|
||||
|
||||
Reference in New Issue
Block a user