This commit is contained in:
2026-05-25 17:52:06 +08:00
parent 79dc601fda
commit dcc74fdd2c
2 changed files with 26 additions and 7 deletions

View File

@@ -37,6 +37,15 @@
<search-box v-model="val2"/>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">人工转运</span>
</view>
<view class="relative zd-col-24">
<switch :checked="isChecked" color="#4e6ef2" style="transform:scale(0.8); transform-origin: left;"/>
<text @tap="setWStatus" style="position: absolute;display: inline-block;width: 52px; height: 32px;left: 0;"></text>
</view>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
@@ -108,6 +117,7 @@
dupWeight: '',
orgWeight: '',
standError: '',
isChecked: false,
disabled: false,
statusMap: {
'1': '未生产',
@@ -240,11 +250,13 @@
toChek (e) {
this.pkId = this.pkId === e.workorder_id ? '' : e.workorder_id
this.pkObj = this.pkId === e.workorder_id ? e : {}
this.getWeight()
},
clearUp () {
this.index2 = ''
this.val2 = ''
this.val3 = ''
this.isChecked = false
this.dataList = []
this.pageNum = 1
this.pkId = ''
@@ -277,11 +289,13 @@
}
},
xlconfirm () {
console.log(1)
console.log(this.flag, 'flag')
this.disabled = true
if (!this.index2 || !this.val3 || !this.val2 || !this.pkId) {
this.disabled = false
return
}
// if (!this.index2 || !this.val3 || !this.val2 || !this.pkId) {
// this.disabled = false
// return
// }
if (this.flag === '2') {
let chazhi = Number(this.val3) - Number(this.orgWeight)
if ( chazhi > Number(this.standError)) {
@@ -298,6 +312,7 @@
}
})
} else {
console.log(2)
this._downMaterial()
}
}
@@ -323,7 +338,8 @@
},
async _downMaterial () {
try {
let res = await downMaterial(this.pkId, 'DDJBQ', this.val3, this.index2, this.val1, this.val2)
let check = this.isChecked ? '1' : '0'
let res = await downMaterial(this.pkId, 'DDJBQ', this.val3, this.index2, this.val1, this.val2, check)
if (res.code === '200') {
uni.showToast({
title: res.message,
@@ -340,6 +356,9 @@
} catch (e) {
this.disabled = false
}
},
setWStatus () {
this.isChecked = !this.isChecked
}
}
}

View File

@@ -161,9 +161,9 @@ export const getWeight = (pcode, wid) => request({
data: {point_code: pcode, workorder_id: wid}
})
// 下料
export const downMaterial = (wid, area, weight, pcode, tcode, lcode) => request({
export const downMaterial = (wid, area, weight, pcode, tcode, lcode, type) => request({
url:'api/pda/jb/downMaterial',
data: {workorder_id: wid, area: area, weight: weight, point_code: pcode, tp_code: tcode, lt_code: lcode}
data: {workorder_id: wid, area: area, weight: weight, point_code: pcode, tp_code: tcode, lt_code: lcode, type: type}
})
// 获取解包点位的托盘编码
export const jbGetVehicleCode = (pcode) => request({