|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
<template> |
|
|
|
|
<basic-container> |
|
|
|
|
<basic-container v-loading="loadingObj.pageLoading"> |
|
|
|
|
<div class="avue-crud"> |
|
|
|
|
<div class="avue-crud__header"> |
|
|
|
|
<!-- 头部左侧按钮模块 --> |
|
|
|
@ -127,8 +127,8 @@ export default {
|
|
|
|
|
this.loading = true; |
|
|
|
|
this.query.stockArticleId = this.$route.query.id; |
|
|
|
|
this.query.conditions = '1'; |
|
|
|
|
this.query.isLoading=0; |
|
|
|
|
this.query.isSigning=0; |
|
|
|
|
this.query.isLoading = 0; |
|
|
|
|
this.query.isSigning = 0; |
|
|
|
|
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
|
|
|
|
const data = res.data.data; |
|
|
|
|
this.page.total = data.total; |
|
|
|
@ -137,6 +137,9 @@ export default {
|
|
|
|
|
this.selectionClear(); |
|
|
|
|
}); |
|
|
|
|
}, 10), |
|
|
|
|
loadingObj: { |
|
|
|
|
pageLoading: false, |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
watch: { |
|
|
|
@ -165,31 +168,39 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
async handleTrade() { |
|
|
|
|
if (this.ids.length > 0) { |
|
|
|
|
const flag = this.selectionList.every(val => val.materialId); |
|
|
|
|
if (!flag) return this.$message.error('有订单物料信息未维护!!!'); |
|
|
|
|
try { |
|
|
|
|
this.loadingObj.pageLoading = true; |
|
|
|
|
|
|
|
|
|
console.log(this.$route); |
|
|
|
|
if (this.ids.length > 0) { |
|
|
|
|
const flag = this.selectionList.every(val => val.materialId); |
|
|
|
|
if (!flag) return this.$message.error('有订单物料信息未维护!!!'); |
|
|
|
|
|
|
|
|
|
let res = await addStockRow({ ids: this.ids }); |
|
|
|
|
const { code, msg } = res.data; |
|
|
|
|
if (code === 200) { |
|
|
|
|
this.$message({ |
|
|
|
|
type: 'success', |
|
|
|
|
message: msg, |
|
|
|
|
}); |
|
|
|
|
// 跳转回之前的页面 |
|
|
|
|
this.$router.go(-1); |
|
|
|
|
// 关闭页面标签 |
|
|
|
|
this.contextmenuFlag = false; |
|
|
|
|
this.$store.commit('DEL_TAG_CURRENT'); |
|
|
|
|
console.log(this.$route); |
|
|
|
|
|
|
|
|
|
let res = await addStockRow({ ids: this.ids }); |
|
|
|
|
const { code, msg } = res.data; |
|
|
|
|
if (code === 200) { |
|
|
|
|
this.$message({ |
|
|
|
|
type: 'success', |
|
|
|
|
message: msg, |
|
|
|
|
}); |
|
|
|
|
// 跳转回之前的页面 |
|
|
|
|
this.$router.go(-1); |
|
|
|
|
// 关闭页面标签 |
|
|
|
|
this.contextmenuFlag = false; |
|
|
|
|
this.$store.commit('DEL_TAG_CURRENT'); |
|
|
|
|
} |
|
|
|
|
// console.log('>>>>===', a.data); |
|
|
|
|
// if (a.data.success) { |
|
|
|
|
// this.onLoad(this.page); |
|
|
|
|
// } |
|
|
|
|
} else { |
|
|
|
|
this.$message.warning('请选择需要转的包件信息!!!'); |
|
|
|
|
} |
|
|
|
|
// console.log('>>>>===', a.data); |
|
|
|
|
// if (a.data.success) { |
|
|
|
|
// this.onLoad(this.page); |
|
|
|
|
// } |
|
|
|
|
} else { |
|
|
|
|
this.$message.warning('请选择需要转的包件信息!!!'); |
|
|
|
|
} catch (error) { |
|
|
|
|
console.log('error :>> ', error); |
|
|
|
|
} finally { |
|
|
|
|
this.loadingObj.pageLoading = false; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//数量校验 |
|
|
|
|