Commit 85b75463 by 前端

创建盘点和调拨时修改提示弹窗逻辑

1 parent 11a86e2e
...@@ -423,29 +423,37 @@ export default { ...@@ -423,29 +423,37 @@ export default {
}, },
switchData(val, oldval, type) { switchData(val, oldval, type) {
this.$confirm('切换调出仓库和调出门店,自动重置已调拨内容;是否确定切换?', '提示', { if (this.chooseDataList && this.chooseDataList.length > 0) {//当盘存确认单有数据时提示
confirmButtonText: '确定', this.$confirm('切换调出仓库和调出门店,自动重置已调拨内容;是否确定切换?', '提示', {
cancelButtonText: '取消', confirmButtonText: '确定',
type: 'warning' cancelButtonText: '取消',
}) type: 'warning'
.then(() => {
if (type == 'yqMerchant') {
this.getServicemerchantrefList(val, 'out')
}
//更新调拨数据以及清空调拨确认单数据
this.$refs.allocationTable.refreshTable()
this.chooseDataList = []
})
.catch(err => {
console.log(err)
if (type == 'yqMerchant') {//调出仓库
this.editAllocationForm.callOutYqMerchantId = oldval
this.oldyqMerchantId = oldval
} else if (type == 'merchant') {//调出门店
this.editAllocationForm.callOutMerchantId = oldval
this.oldMerchantId = oldval
}
}) })
.then(() => {
if (type == 'yqMerchant') {
this.getServicemerchantrefList(val, 'out')
}
//更新调拨数据以及清空调拨确认单数据
this.$refs.allocationTable.refreshTable()
this.chooseDataList = []
})
.catch(err => {
console.log(err)
if (type == 'yqMerchant') {//调出仓库
this.editAllocationForm.callOutYqMerchantId = oldval
this.oldyqMerchantId = oldval
} else if (type == 'merchant') {//调出门店
this.editAllocationForm.callOutMerchantId = oldval
this.oldMerchantId = oldval
}
})
} else {
if (type == 'yqMerchant') {
this.getServicemerchantrefList(val, 'out')
}
//更新调拨数据
this.$refs.allocationTable.refreshTable()
}
}, },
changeCallInYqMerchant(merchantId) { changeCallInYqMerchant(merchantId) {
...@@ -492,7 +500,6 @@ export default { ...@@ -492,7 +500,6 @@ export default {
}, },
handleAddConfirm(data) { handleAddConfirm(data) {
this.$refs.editAllocationFormRef.validate(valid => { this.$refs.editAllocationFormRef.validate(valid => {
if (valid) { if (valid) {
if (this.chooseDataList.length == 0) { if (this.chooseDataList.length == 0) {
......
...@@ -347,29 +347,37 @@ export default { ...@@ -347,29 +347,37 @@ export default {
}, },
switchData(val, oldval, type) { switchData(val, oldval, type) {
this.$confirm('切换盘点仓库和盘点门店,自动重置已盘点内容;是否确定切换?', '提示', { if (this.chooseDataList && this.chooseDataList.length > 0) {//当盘存确认单有数据时提示
confirmButtonText: '确定', this.$confirm('切换盘点仓库和盘点门店,自动重置已盘点内容;是否确定切换?', '提示', {
cancelButtonText: '取消', confirmButtonText: '确定',
type: 'warning' cancelButtonText: '取消',
}) type: 'warning'
.then(() => {
if (type == 'yqMerchant') {
this.getServicemerchantrefList(val)
}
//更新盘存数据以及清空盘存确认单数据
this.$refs.recordTable.refreshTable()
this.chooseDataList = []
})
.catch(err => {
console.log(err)
if (type == 'yqMerchant') {
this.editCheckForm.yqMerchantId = oldval
this.oldyqMerchantId = oldval
} else if (type == 'merchant') {
this.editCheckForm.merchantId = oldval
this.oldMerchantId = oldval
}
}) })
.then(() => {
if (type == 'yqMerchant') {
this.getServicemerchantrefList(val)
}
//更新盘存数据以及清空盘存确认单数据
this.$refs.recordTable.refreshTable()
this.chooseDataList = []
})
.catch(err => {
console.log(err)
if (type == 'yqMerchant') {
this.editCheckForm.yqMerchantId = oldval
this.oldyqMerchantId = oldval
} else if (type == 'merchant') {
this.editCheckForm.merchantId = oldval
this.oldMerchantId = oldval
}
})
} else {
if (type == 'yqMerchant') {
this.getServicemerchantrefList(val)
}
//更新盘存数据
this.$refs.recordTable.refreshTable()
}
}, },
beforeSearchFn() { beforeSearchFn() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!