一键设置

This commit is contained in:
2024-07-24 13:24:41 +08:00
parent 56db8b9993
commit d1679d8cbc
2 changed files with 34 additions and 17 deletions

View File

@@ -113,7 +113,7 @@
<view class="zd-checkbox" :class="{'zd-checkbox_active': checkArrActive}" @tap="selectAll"></view>
</view>
<button class="confirm-button" :class="{'confirm-button_disabled': checkArr2.length === 0}" @tap="kuwConfirm">{{crType === 'IN' ? '入库' : '出库'}}</button>
<button v-if="crType === 'IN'" class="confirm-button" @tap="onekeyUpdate">一键设置</button>
<button v-if="crType === 'IN'" :class="{'confirm-button_disabled': checkArr2.length === 0}" class="confirm-button" @tap="onekeyUpdate">一键设置</button>
<view class="zd-col-10">
<!-- <view class="zd-col-12 zd-row jcflexend">
<pagination :total="totalCount2" :page-size="queryParams2.pageSize" :current-page="currentPage2" @page-change="handlePageChange2" />
@@ -572,9 +572,11 @@
},
// 一键设置
onekeyUpdate () {
this.type = '3'
this.val3 = ''
this.show = true
if (this.checkArr2.length > 0) {
this.type = '3'
this.val3 = ''
this.show = true
}
},
async _updateBillDetail (e) {
try {
@@ -584,6 +586,11 @@
title: res.desc,
icon: 'none'
})
} else {
uni.showToast({
title: res.desc,
icon: 'none'
})
}
this.disabled2 = false
} catch (e) {
@@ -604,10 +611,12 @@
}
let arr = []
this.dataList2.map(e => {
e.kwbm = this.val3
let {djid, flid, kwbm} = {...e}
let obj = {djid, flid, kwbm}
arr.push(obj)
if (e.checked) {
e.kwbm = this.val3
let {djid, flid, kwbm} = {...e}
let obj = {djid, flid, kwbm}
arr.push(obj)
}
})
this.show = false
this._updateBillDetail(arr)

View File

@@ -52,7 +52,7 @@
<view class="zd-col-9"><search-box v-model="val2" :scanShow="false" placeholder="请输入物料信息" /></view>
</view>
<button class="confirm-button" @tap="toSearch2">查询</button>
<button v-if="pkObj.djzt !== '审核后'" class="confirm-button" @tap="checkWarehouse(2, '批量设置收货仓库/库位')">一键设置</button>
<button v-if="pkObj.djzt !== '审核后'" class="confirm-button" :class="{'confirm-button_disabled': checkArr.length === 0}" @tap="checkWarehouse(2, '批量设置收货仓库/库位')">一键设置</button>
<button v-if="pkObj.djzt !== '审核后'" class="confirm-button" :class="{'confirm-button_disabled': checkArr.length === 0}" :disabled="disabled" @tap="_receiptBillConfirm">确认收货</button>
</view>
</view>
@@ -368,6 +368,11 @@
title: res.desc,
icon: 'none'
})
} else {
uni.showToast({
title: res.desc,
icon: 'none'
})
}
} catch (e) {
console.log(e)
@@ -386,10 +391,11 @@
if (type === 1) {
this.modalObj = {type: type, title: title, id: e.flid}
this.value = e.ckbm
} else if (type === 2) {
this.show = true
} else if (type === 2 && this.checkArr.length > 0) {
this.modalObj = {type: type, title: title}
this.show = true
}
this.show = true
},
// 修改调出仓库确定
modalConfirm () {
@@ -426,12 +432,14 @@
})
} else if (this.modalObj.type === 2) {
this.dataList2.map(e => {
e.ckbm = this.value
e.ckmc = mc
e.kwmc = this.val3
let {flid, flxh, ywrq, shsl, zzbm, ckmc, ckbm, kwbm, kwmc, bz, btbz, djid, djbh} = {...e}
let obj = {flid, flxh, ywrq, shsl, zzbm, ckmc, ckbm, kwbm, kwmc, bz, btbz, djid, djbh}
arr.push(obj)
if (e.checked) {
e.ckbm = this.value
e.ckmc = mc
e.kwmc = this.val3
let {flid, flxh, ywrq, shsl, zzbm, ckmc, ckbm, kwbm, kwmc, bz, btbz, djid, djbh} = {...e}
let obj = {flid, flxh, ywrq, shsl, zzbm, ckmc, ckbm, kwbm, kwmc, bz, btbz, djid, djbh}
arr.push(obj)
}
})
}
this.show = false