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