管芯备货

This commit is contained in:
2025-07-01 16:26:53 +08:00
parent bdd392402f
commit b3c057e541
2 changed files with 21 additions and 6 deletions

View File

@@ -34,6 +34,7 @@
<table> <table>
<thead> <thead>
<tr> <tr>
<th>{{$t('grid.select')}}</th>
<th>{{$t('grid.number')}}</th> <th>{{$t('grid.number')}}</th>
<th class="th_2">{{$t('filter.pallet-number')}}</th> <th class="th_2">{{$t('filter.pallet-number')}}</th>
<th>{{$t('grid.coretype')}}</th> <th>{{$t('grid.coretype')}}</th>
@@ -46,7 +47,8 @@
</tr> </tr>
</thead> </thead>
<tbody> <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}">&#xe66b;</span></td>
<td>{{Number(i) + 1}}</td> <td>{{Number(i) + 1}}</td>
<td class="td_2">{{e.vehicle_code}}</td> <td class="td_2">{{e.vehicle_code}}</td>
<td>{{e.material_code}}</td> <td>{{e.material_code}}</td>
@@ -96,6 +98,7 @@
options2: [], options2: [],
index2: '', index2: '',
disabled: false, disabled: false,
checkArr: [],
dataList: [] dataList: []
}; };
}, },
@@ -130,9 +133,13 @@
selectChange2(e) { selectChange2(e) {
this.index2 = 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) { toCheck (e) {
this.pkId = this.pkId === e.material_code ? '' : e.material_code e.checked = !e.checked
this.pkObj = this.pkId === e.material_code ? e : {} this.checkArr = this.dataList.filter(i => { return i.checked })
}, },
async _paperQueryPaperMaterial () { async _paperQueryPaperMaterial () {
let res = await paperQueryPaperMaterial() let res = await paperQueryPaperMaterial()
@@ -150,7 +157,7 @@
async _moveStock () { async _moveStock () {
this.disabled = true this.disabled = true
try { try {
let res = await moveStock(this.pkObj) let res = await moveStock(this.checkArr)
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
icon: 'none' icon: 'none'
@@ -177,6 +184,14 @@
let res = await showPapervehicleView(this.index1, this.index2, this.val1) let res = await showPapervehicleView(this.index1, this.index2, this.val1)
if (res) { if (res) {
this.dataList = [...res.rows] 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
}
})
}
} }
} }
} }

View File

@@ -12,9 +12,9 @@ export const showPapervehicleView = (area, code, qty) => request({
} }
}) })
// 管芯备货-备货 // 管芯备货-备货
export const moveStock = (obj) => request({ export const moveStock = (data) => request({
url:'api/pda/stockingivt/moveStock', url:'api/pda/stockingivt/moveStock',
data: obj data: data
}) })
// 管芯备货-区域下拉框 // 管芯备货-区域下拉框
export const queryProductArea = () => request({ export const queryProductArea = () => request({