盘点数据
This commit is contained in:
@@ -339,7 +339,7 @@
|
||||
let res = await allocationBillDetailUpdate(el)
|
||||
if (res.code === 1) {
|
||||
setTimeout(() => {
|
||||
this._allocationPage(e)
|
||||
this._allocationBillDetail(e)
|
||||
}, 1500)
|
||||
} else {
|
||||
this.dataList.map(ele => {
|
||||
|
||||
@@ -46,9 +46,9 @@
|
||||
<view v-if="e.subData.length > 0" class="zd-sec-wraper">
|
||||
<view class="search-confirm-wrap_2">
|
||||
<view class="zd-row jcflexend">
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': !e.subOneChecked}" :disabled="disabled1" @tap="_stIvtCheckdtlCheckFinish(e)">盘点完成</button>
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': !e.subOneChecked}" :disabled="disabled1" @tap="_stIvtCheckdtlReally(e)">实物为准</button>
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': !e.subOneChecked}" :disabled="disabled1" @tap="_stIvtCheckdtlBasedOnFinance(e)">财务为准</button>
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': !e.subOneChecked || !e.subStatus1}" :disabled="disabled1" @tap="_stIvtCheckdtlCheckFinish(e)">盘点完成</button>
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': !e.subOneChecked || !e.subStatus2}" :disabled="disabled1" @tap="_stIvtCheckdtlReally(e)">实物为准</button>
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': !e.subOneChecked || !e.subStatus2}" :disabled="disabled1" @tap="_stIvtCheckdtlBasedOnFinance(e)">财务为准</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="table-wrap table-wrap_1">
|
||||
@@ -85,8 +85,8 @@
|
||||
<td>{{el.struct_name}}</td>
|
||||
<td>{{el.material_code}}</td>
|
||||
<td>{{el.material_name}}</td>
|
||||
<td><input class="td_input" type="number" confirm-type="go" v-model="el.qty" @focus="focusInput(e, el)" @blur="updateNum(e, el)" /></td>
|
||||
<td>{{el.fac_qty}}</td>
|
||||
<td>{{el.qty}}</td>
|
||||
<td><input class="td_input" type="number" confirm-type="go" v-model="el.fac_qty" @focus="focusInput(e, el)" @blur="updateNum(e, el)" @confirm="updateNum(e, el)"/></td>
|
||||
<td>{{el.unit}}</td>
|
||||
<td>{{el.check_result}}</td>
|
||||
<td>{{el.status}}</td>
|
||||
@@ -141,6 +141,9 @@
|
||||
},
|
||||
onLoad () {
|
||||
this.toSearch()
|
||||
setTimeout(() => {
|
||||
this._getWarehouseInfo()
|
||||
}, 3000)
|
||||
},
|
||||
methods: {
|
||||
// 仓库下拉框
|
||||
@@ -164,7 +167,7 @@
|
||||
this._stIvtCheckdtlCheckPage()
|
||||
},
|
||||
// 一级表格接口
|
||||
async _stIvtCheckdtlCheckPage () {
|
||||
async _stIvtCheckdtlCheckPage (e) {
|
||||
let res = await stIvtCheckdtlCheckPage(this.val1, this.value1, this.queryParams1.pageNum + '', this.queryParams1.pageSize + '')
|
||||
if (res.code === 200) {
|
||||
res.content.map(el => {
|
||||
@@ -172,18 +175,22 @@
|
||||
this.$set(el, 'subData', [])
|
||||
this.$set(el, 'subAllChecked', false)
|
||||
this.$set(el, 'subOneChecked', false)
|
||||
this.$set(el, 'subStatus1', false)
|
||||
this.$set(el, 'subStatus2', false)
|
||||
})
|
||||
this.dataList = [...res.content]
|
||||
this.totalCount1 = Number(res.totalElements)
|
||||
this.queryParams1.pageSize = Number(this.queryParams1.pageSize + '')
|
||||
this.queryParams1.pageNum = Number(this.queryParams1.pageNum + '')
|
||||
if (e) {
|
||||
this._checkDtlByCheckCode(e)
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
this._getWarehouseInfo()
|
||||
},
|
||||
// 一级表格切换分页
|
||||
handlePageChange1(page) {
|
||||
@@ -200,6 +207,8 @@
|
||||
}
|
||||
e.subAllChecked = false
|
||||
e.subOneChecked = false
|
||||
e.subStatus1 = false
|
||||
e.subStatus2 = false
|
||||
},
|
||||
// 二级表格接口
|
||||
async _checkDtlByCheckCode (e) {
|
||||
@@ -220,6 +229,10 @@
|
||||
e.subData.map(el => {
|
||||
el.checked = e.subAllChecked
|
||||
})
|
||||
let arr = e.subData.filter(el => el.check_result === '正常')
|
||||
let arr1 = e.subData.filter(el => el.check_result !== '正常')
|
||||
e.subStatus1 = e.subAllChecked && e.subData.length > 0 && e.subData.length === arr.length
|
||||
e.subStatus2 = e.subAllChecked && e.subData.length > 0 && e.subData.length === arr1.length
|
||||
},
|
||||
// 二级表格多选
|
||||
toSubCheckbox (e,el) {
|
||||
@@ -231,6 +244,10 @@
|
||||
let arr = e.subData.filter(ele => ele.checked === true)
|
||||
e.subAllChecked = arr.length === e.subData.length
|
||||
e.subOneChecked = arr.length > 0
|
||||
let arr1 = arr.filter(el => el.check_result === '正常')
|
||||
let arr2 = arr.filter(el => el.check_result !== '正常')
|
||||
e.subStatus1 = arr.length > 0 && arr.length === arr1.length
|
||||
e.subStatus2 = arr.length > 0 && arr.length === arr2.length
|
||||
},
|
||||
// 副表格单行数量获取焦点
|
||||
focusInput (e, el) {
|
||||
@@ -244,13 +261,17 @@
|
||||
async _stIvtCheckdtlUpdateDtl (e, el, type) {
|
||||
try {
|
||||
let res = await stIvtCheckdtlUpdateDtl(el)
|
||||
if (res.code !== 1) {
|
||||
if (res.code === 1) {
|
||||
setTimeout(() => {
|
||||
this._checkDtlByCheckCode(e)
|
||||
}, 1500)
|
||||
} else {
|
||||
this.dataList.map(ele => {
|
||||
if (e.id === ele.id) {
|
||||
e.subData.map(elem => {
|
||||
if (elem.id === el.id) {
|
||||
if (type === 'sl') {
|
||||
elem.qty = this.raw
|
||||
elem.fac_qty = this.raw
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -268,7 +289,7 @@
|
||||
// 盘点完成按钮
|
||||
async _stIvtCheckdtlCheckFinish (e) {
|
||||
this.disabled1 = true
|
||||
if (!e.subOneChecked) {
|
||||
if (!e.subOneChecked || !e.subStatus1) {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
@@ -276,7 +297,7 @@
|
||||
try {
|
||||
let res = await stIvtCheckdtlCheckFinish(arr)
|
||||
if (res.code === 1) {
|
||||
this._checkDtlByCheckCode(e)
|
||||
this._stIvtCheckdtlCheckPage(e)
|
||||
}
|
||||
this.disabled1 = false
|
||||
uni.showToast({
|
||||
@@ -290,7 +311,7 @@
|
||||
// 实物为准按钮
|
||||
async _stIvtCheckdtlReally (e) {
|
||||
this.disabled1 = true
|
||||
if (!e.subOneChecked) {
|
||||
if (!e.subOneChecked || !e.subStatus2) {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
@@ -298,7 +319,7 @@
|
||||
try {
|
||||
let res = await stIvtCheckdtlReally(arr)
|
||||
if (res.code === 1) {
|
||||
this._checkDtlByCheckCode(e)
|
||||
this._stIvtCheckdtlCheckPage(e)
|
||||
}
|
||||
this.disabled1 = false
|
||||
uni.showToast({
|
||||
@@ -312,7 +333,7 @@
|
||||
// 财务为准
|
||||
async _stIvtCheckdtlBasedOnFinance (e) {
|
||||
this.disabled1 = true
|
||||
if (!e.subOneChecked) {
|
||||
if (!e.subOneChecked || !e.subStatus2) {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
@@ -320,7 +341,7 @@
|
||||
try {
|
||||
let res = await stIvtCheckdtlBasedOnFinance(arr)
|
||||
if (res.code === 1) {
|
||||
this._checkDtlByCheckCode(e)
|
||||
this._stIvtCheckdtlCheckPage(e)
|
||||
}
|
||||
this.disabled1 = false
|
||||
uni.showToast({
|
||||
|
||||
@@ -258,7 +258,7 @@
|
||||
let res = await stIvtMoveinvUpdateDtl(el)
|
||||
if (res.code === 1) {
|
||||
setTimeout(() => {
|
||||
this._stIvtMoveinvMovePage(e)
|
||||
this._moveDtlByMoveId(e)
|
||||
}, 1500)
|
||||
} else {
|
||||
this.dataList.map(ele => {
|
||||
|
||||
Reference in New Issue
Block a user