收货确认
This commit is contained in:
@@ -204,8 +204,9 @@
|
||||
import ScanInput from '@/components/ScanInput.vue'
|
||||
import Pagination from '@/components/Pagination.vue'
|
||||
import GridDetail from '@/components/GridDetail.vue'
|
||||
import {getWarehouseInfo, getOrganizationInfo, receiptPage, receiptBillDetailPage, receiptBillUpdateUpdate, receiptBillUpdate, viewAssignDtl, warehouseAssignLocation} from '@/utils/mork2.js'
|
||||
import {updateAssignDtl, stIvtstIvtaddAssignDtl, receiptBillConfirm, receiptBillDetailUpdate, receiptBillDetailSetStor} from '@/utils/getData2.js'
|
||||
// import {getOrganizationInfo, getWarehouseInfo, receiptPage, receiptBillDetailPage, viewAssignDtl, warehouseAssignLocation} from '@/utils/mork2.js'
|
||||
// import {updateAssignDtl, receiptBillDetailUpdate, receiptBillDetailSetStor, stIvtaddAssignDtl, receiptBillConfirm} from '@/utils/getData2.js'
|
||||
import {getOrganizationInfo, getWarehouseInfo, receiptPage, receiptBillDetailPage, viewAssignDtl, warehouseAssignLocation, updateAssignDtl, receiptBillDetailUpdate, receiptBillDetailSetStor, stIvtaddAssignDtl, receiptBillConfirm} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -226,7 +227,6 @@
|
||||
},
|
||||
currentPage1: 1,
|
||||
dataList: [], // 一级表格数据
|
||||
subData: [], // 二级表格数据
|
||||
subCheckData: [], // 二级表格多选数组
|
||||
popData: [], // 二级表格点击物料编码弹出弹窗
|
||||
popdisabled: false,
|
||||
@@ -368,49 +368,19 @@
|
||||
},
|
||||
showPop (type, e, obj) {
|
||||
this.type = type
|
||||
if (type === 0) {
|
||||
if (type === 0) { // 修改二级表格单行收货仓库
|
||||
this.show = true
|
||||
this.popObj = {id: e.djid, iid: obj.id}
|
||||
} else if (type === 1) {
|
||||
} else if (type === 1) { // 点击二级表格行中的物料编号显示弹窗
|
||||
this._viewAssignDtl(e, obj)
|
||||
} else if (type === 2) {
|
||||
} else if (type === 2) { // 点击库位分配按钮显示弹窗
|
||||
if (!this.subCheckData.length) return
|
||||
this._warehouseAssignLocation()
|
||||
} else if (type === 3) {
|
||||
} else if (type === 3) { // 点击一键设置仓库按钮
|
||||
if (!this.subCheckData.length) return
|
||||
this.show = true
|
||||
}
|
||||
},
|
||||
// 修改调出仓库确定
|
||||
modalConfirm () {
|
||||
if (this.value2 === '') {
|
||||
uni.showToast({
|
||||
title: '请设置收货仓库',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
let mc = ''
|
||||
this.range2.map(el => {
|
||||
if (el.value === this.value2) {
|
||||
mc = el.text
|
||||
}
|
||||
})
|
||||
let arr = []
|
||||
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 = mc
|
||||
arr.push(el)
|
||||
this.show = false
|
||||
this._receiptBillDetailUpdate(arr)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 点击二级表格行中的物料编号,弹窗加载表格
|
||||
async _viewAssignDtl (e, obj) {
|
||||
let res = await viewAssignDtl(obj)
|
||||
@@ -443,22 +413,92 @@
|
||||
this.popdisabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await updateAssignDtl(this.popData)
|
||||
if (res.code === 1) {
|
||||
this.show = false
|
||||
this._easOutInBillDetailPage(this.popObj)
|
||||
try {
|
||||
let res = await updateAssignDtl(this.popData)
|
||||
if (res.code === 1) {
|
||||
this.show = false
|
||||
this._receiptBillDetailPage(this.popObj)
|
||||
}
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
this.popdisabled = false
|
||||
} catch (e) {
|
||||
this.popdisabled = false
|
||||
}
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
this.popdisabled = false
|
||||
} catch (e) {
|
||||
this.popdisabled = false
|
||||
}
|
||||
},
|
||||
// 一键设置仓库弹窗
|
||||
// 分配库位弹窗表格
|
||||
async _warehouseAssignLocation () {
|
||||
let res = await warehouseAssignLocation(this.subCheckData)
|
||||
if (res.code ===1) {
|
||||
this.popData = [...res.result]
|
||||
this.sortArr(this.popData)
|
||||
this.show = true
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
// 修改二级表格单行收货数量
|
||||
updateNumkw (e) {
|
||||
let arr = []
|
||||
arr.push(e)
|
||||
this._receiptBillDetailUpdate(arr)
|
||||
},
|
||||
// 修改调出仓库确定
|
||||
modalConfirm () {
|
||||
if (this.value2 === '') {
|
||||
uni.showToast({
|
||||
title: '请设置收货仓库',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
let mc = ''
|
||||
this.range2.map(el => {
|
||||
if (el.value === this.value2) {
|
||||
mc = el.text
|
||||
}
|
||||
})
|
||||
let arr = []
|
||||
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 = mc
|
||||
arr.push(el)
|
||||
this.show = false
|
||||
this._receiptBillDetailUpdate(arr)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 二级表格单行收货数量和收货仓库接口
|
||||
async _receiptBillDetailUpdate (e) {
|
||||
try {
|
||||
let res = await receiptBillDetailUpdate(e)
|
||||
if (res.code === 1) {
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
this.value2 = ''
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
// 一键设置仓库弹窗确定按钮
|
||||
async _receiptBillDetailSetStor () {
|
||||
if (this.value2 === '') {
|
||||
uni.showToast({
|
||||
@@ -478,20 +518,6 @@
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
// 分配库位弹窗表格
|
||||
async _warehouseAssignLocation () {
|
||||
let res = await warehouseAssignLocation(this.subCheckData)
|
||||
if (res.code ===1) {
|
||||
this.popData = [...res.result]
|
||||
this.sortArr(this.popData)
|
||||
this.show = true
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
// 分配库位弹窗表格 -> 点击确定按钮
|
||||
async _stIvtaddAssignDtl () {
|
||||
this.popdisabled = true
|
||||
@@ -541,42 +567,6 @@
|
||||
this.disabled1 = false
|
||||
}
|
||||
},
|
||||
// 收货数量和收货库位名称单行修改
|
||||
updateNumkw (e) {
|
||||
let arr = []
|
||||
arr.push(e)
|
||||
this._receiptBillDetailUpdate(arr)
|
||||
},
|
||||
// 二级表格详情修改接口
|
||||
async _receiptBillDetailUpdate (e) {
|
||||
try {
|
||||
let res = await receiptBillDetailUpdate(e)
|
||||
if (res.code === 1) {
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
// 修改调出仓库弹窗
|
||||
checkWarehouse (type, title, e) {
|
||||
if (type === 1) {
|
||||
this.modalObj = {type: type, title: title, id: e.flid}
|
||||
this.value = e.ckbm
|
||||
this.show = true
|
||||
} else if (type === 2 && this.checkArr.length > 0) {
|
||||
this.modalObj = {type: type, title: title}
|
||||
this.show = true
|
||||
}
|
||||
},
|
||||
// 详情弹窗
|
||||
getDetails (type,e) {
|
||||
this.delShow = !this.delShow
|
||||
|
||||
Reference in New Issue
Block a user