收货确认
This commit is contained in:
@@ -99,7 +99,9 @@
|
||||
<td>{{el.bcshsl}}</td>
|
||||
<td>{{el.zzmc}}</td>
|
||||
<td>{{['否', '是'][Number(el.sfzj)]}}</td>
|
||||
<td><input class="td_input" type="number" confirm-type="go" v-model="el.shsl" @blur="updateNumkw(e)" @confirm="updateNumkw(e)"/></td>
|
||||
<td>
|
||||
<input class="td_input" type="number" confirm-type="go" v-model="el.shsl" @focus="focusInput(e, el)" @blur="updateNumkw(e, el)" @confirm="updateNumkw(e, el)"/>
|
||||
</td>
|
||||
<td @tap.stop="showPop(2, e, el)">
|
||||
<view class="zd-row td_change">
|
||||
<uni-icons type="shop" size="16" color="#fff"></uni-icons>
|
||||
@@ -148,7 +150,7 @@
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import Pagination from '@/components/Pagination.vue'
|
||||
import GridDetail from '@/components/GridDetail.vue'
|
||||
import {getOrganizationInfo, getWarehouseInfo, receiptPage, receiptBillDetailPage, receiptBillDetailUpdate, receiptBillDetailSetStor, receiptBillConfirm} from '@/utils/getData2.js'
|
||||
import {getOrganizationInfo, getWarehouseInfo, receiptPage, receiptBillDetailPage, receiptBillDetailUpdate, receiptBillDetailSetStor, receiptBillConfirm} from '@/utils/mork2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -177,7 +179,9 @@
|
||||
detailObj: {}, // 详情弹窗
|
||||
disabled1: false,
|
||||
value2: '', // 收货仓库信息
|
||||
range2: []
|
||||
range2: [],
|
||||
raw: '', // 副表格修改前输入框数据
|
||||
rawObj: {} // 副表格修改前行数据
|
||||
}
|
||||
},
|
||||
onLoad () {
|
||||
@@ -299,9 +303,13 @@
|
||||
e.subOneChecked = false
|
||||
this._receiptBillDetailPage(e)
|
||||
},
|
||||
// 副表格单行收货数量获取焦点
|
||||
focusInput (e, el) {
|
||||
this.raw = el.shsl
|
||||
},
|
||||
// 修改副表格单行收货数量
|
||||
updateNumkw (e) {
|
||||
this._receiptBillDetailUpdate(e)
|
||||
updateNumkw (e, el) {
|
||||
this._receiptBillDetailUpdate(e, el, 'sl')
|
||||
},
|
||||
showPop (type, e, obj) {
|
||||
this.popData = []
|
||||
@@ -315,7 +323,8 @@
|
||||
this.show = true
|
||||
} else if (type === 2) { // 修改副表格单行收货仓库弹窗
|
||||
this.show = true
|
||||
this.popObj = {id: e.djid, iid: obj.id}
|
||||
this.popObj = e
|
||||
this.rawObj = obj
|
||||
}
|
||||
},
|
||||
// 一键设置仓库弹窗->确定
|
||||
@@ -356,25 +365,41 @@
|
||||
text = el.text
|
||||
}
|
||||
})
|
||||
this.dataList.map(e => {
|
||||
if (e.djid === this.popObj.id) {
|
||||
e.subData.map(el => {
|
||||
if (el.id === this.popObj.iid) {
|
||||
el.ckbm = this.value2
|
||||
el.ckmc = text
|
||||
}
|
||||
})
|
||||
this.show = false
|
||||
this._receiptBillDetailUpdate(e)
|
||||
}
|
||||
})
|
||||
let obj = Object.assign({}, this.rawObj)
|
||||
obj.ckbm = this.value2
|
||||
obj.ckmc = text
|
||||
this._receiptBillDetailUpdate(this.popObj, obj, 'ck')
|
||||
this.show = false
|
||||
},
|
||||
// 副表格单行收货数量和收货仓库接口
|
||||
async _receiptBillDetailUpdate (e) {
|
||||
async _receiptBillDetailUpdate (e, el, type) {
|
||||
try {
|
||||
let res = await receiptBillDetailUpdate(e.subData)
|
||||
let res = await receiptBillDetailUpdate(el)
|
||||
if (res.code === 1) {
|
||||
this._receiptBillDetailPage(e)
|
||||
this.dataList.map(ele => {
|
||||
if (e.id === ele.id) {
|
||||
e.subData.map(elem => {
|
||||
if (elem.id === el.id) {
|
||||
if (type === 'ck') {
|
||||
elem.ckbm = el.ckbm
|
||||
elem.ckmc = el.ckmc
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.dataList.map(ele => {
|
||||
if (e.id === ele.id) {
|
||||
e.subData.map(elem => {
|
||||
if (elem.id === el.id) {
|
||||
if (type === 'sl') {
|
||||
elem.shsl = this.raw
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
|
||||
@@ -2323,7 +2323,7 @@ export const moveDtlByMoveId = () => {
|
||||
|
||||
export const receiptBillDetailUpdate = () => {
|
||||
let res = {
|
||||
code: '1',
|
||||
code: 1,
|
||||
desc: 'ok'
|
||||
}
|
||||
return res
|
||||
|
||||
@@ -65,10 +65,10 @@ const request = (params) => {
|
||||
content: `${res[1].data.message}`,
|
||||
showCancel: false
|
||||
})
|
||||
store.dispatch('delUserInfo', '')
|
||||
uni.redirectTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
// store.dispatch('delUserInfo', '')
|
||||
// uni.redirectTo({
|
||||
// url: '/pages/login/login'
|
||||
// })
|
||||
} else if (res[1] && res[1].statusCode === 200) {
|
||||
uni.hideLoading();
|
||||
let {
|
||||
|
||||
Reference in New Issue
Block a user