change
This commit is contained in:
@@ -37,6 +37,15 @@
|
|||||||
<search-box v-model="val2"/>
|
<search-box v-model="val2"/>
|
||||||
</view>
|
</view>
|
||||||
</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>
|
||||||
<view class="zd_wrapper grid-wraper">
|
<view class="zd_wrapper grid-wraper">
|
||||||
<view class="slide_new">
|
<view class="slide_new">
|
||||||
@@ -108,6 +117,7 @@
|
|||||||
dupWeight: '',
|
dupWeight: '',
|
||||||
orgWeight: '',
|
orgWeight: '',
|
||||||
standError: '',
|
standError: '',
|
||||||
|
isChecked: false,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
statusMap: {
|
statusMap: {
|
||||||
'1': '未生产',
|
'1': '未生产',
|
||||||
@@ -240,11 +250,13 @@
|
|||||||
toChek (e) {
|
toChek (e) {
|
||||||
this.pkId = this.pkId === e.workorder_id ? '' : e.workorder_id
|
this.pkId = this.pkId === e.workorder_id ? '' : e.workorder_id
|
||||||
this.pkObj = this.pkId === e.workorder_id ? e : {}
|
this.pkObj = this.pkId === e.workorder_id ? e : {}
|
||||||
|
this.getWeight()
|
||||||
},
|
},
|
||||||
clearUp () {
|
clearUp () {
|
||||||
this.index2 = ''
|
this.index2 = ''
|
||||||
this.val2 = ''
|
this.val2 = ''
|
||||||
this.val3 = ''
|
this.val3 = ''
|
||||||
|
this.isChecked = false
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
this.pageNum = 1
|
this.pageNum = 1
|
||||||
this.pkId = ''
|
this.pkId = ''
|
||||||
@@ -277,11 +289,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
xlconfirm () {
|
xlconfirm () {
|
||||||
|
console.log(1)
|
||||||
|
console.log(this.flag, 'flag')
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!this.index2 || !this.val3 || !this.val2 || !this.pkId) {
|
// if (!this.index2 || !this.val3 || !this.val2 || !this.pkId) {
|
||||||
this.disabled = false
|
// this.disabled = false
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
if (this.flag === '2') {
|
if (this.flag === '2') {
|
||||||
let chazhi = Number(this.val3) - Number(this.orgWeight)
|
let chazhi = Number(this.val3) - Number(this.orgWeight)
|
||||||
if ( chazhi > Number(this.standError)) {
|
if ( chazhi > Number(this.standError)) {
|
||||||
@@ -298,6 +312,7 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
console.log(2)
|
||||||
this._downMaterial()
|
this._downMaterial()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -323,7 +338,8 @@
|
|||||||
},
|
},
|
||||||
async _downMaterial () {
|
async _downMaterial () {
|
||||||
try {
|
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') {
|
if (res.code === '200') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
@@ -340,6 +356,9 @@
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
setWStatus () {
|
||||||
|
this.isChecked = !this.isChecked
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -161,9 +161,9 @@ export const getWeight = (pcode, wid) => request({
|
|||||||
data: {point_code: pcode, workorder_id: wid}
|
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',
|
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({
|
export const jbGetVehicleCode = (pcode) => request({
|
||||||
|
|||||||
Reference in New Issue
Block a user