|
@@ -132,7 +132,7 @@
|
|
|
:disabled="spinning"
|
|
|
type="primary"
|
|
|
class="button-primary"
|
|
|
- @click="handleSubmit()"
|
|
|
+ @click="submitResult()"
|
|
|
id="productInfoList-handleSubmit">提交</a-button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -143,12 +143,12 @@
|
|
|
@close="closeProductModal"
|
|
|
@addProduct="insterProduct"></chooseProduct>
|
|
|
<!-- 价格更新弹窗 -->
|
|
|
- <setPriceModal
|
|
|
+ <!-- <setPriceModal
|
|
|
:show="priceUpdateModal"
|
|
|
:totalRealAmount="updataData.totalRealAmount"
|
|
|
:totalAmount="updataData.totalAmount"
|
|
|
@ok="updatePrice"
|
|
|
- @cancel="priceUpdateModal=false"></setPriceModal>
|
|
|
+ @cancel="priceUpdateModal=false"></setPriceModal> -->
|
|
|
<!-- 新活动窗口 -->
|
|
|
<newPromoModal
|
|
|
:show="showNewActiveModal"
|
|
@@ -192,7 +192,7 @@ export default {
|
|
|
totalRealAmount: '',
|
|
|
totalAmount: ''
|
|
|
},
|
|
|
- priceUpdateModal: false, // 价格更新弹窗
|
|
|
+ // priceUpdateModal: false, // 价格更新弹窗
|
|
|
showDetail: false, // 显示详细基本信息
|
|
|
showCpModal: false, // 添加产品弹框
|
|
|
cpCurRefId: '', // 当前操作的活动id
|
|
@@ -433,53 +433,32 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- // 价格变更,需要选择价格类型 并更新价格
|
|
|
- updatePrice (type) {
|
|
|
- const ajax_data = {
|
|
|
- salesBillSn: this.salesBillSn,
|
|
|
- productPriceChangeFlag: type
|
|
|
- }
|
|
|
- if (type == 0) {
|
|
|
- this.submitResult(ajax_data)
|
|
|
- } else {
|
|
|
- // 批量更新价格
|
|
|
- updateBatch(this.updataData.detailList).then(res => {
|
|
|
- this.priceUpdateModal = false
|
|
|
- if (res.status == 200) {
|
|
|
- // 刷新详情统计
|
|
|
- this.spinning = true
|
|
|
- this.getOrderDetail(false, () => {
|
|
|
- this.submitResult(ajax_data)
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
- // 提交销售单
|
|
|
- handleSubmit () {
|
|
|
- // 先不提交,先判断是否有价格更新 (下级创建时判断)
|
|
|
- if (this.detailData && this.detailData.salesBillSource == 'PURCHASE') {
|
|
|
- submitCheck({ salesBillSn: this.salesBillSn }).then(res => {
|
|
|
- if (res.status == 200) {
|
|
|
- // 如果有价格变更记录
|
|
|
- if (res.data.detailList.length > 0) {
|
|
|
- this.updataData = res.data
|
|
|
- this.$nextTick(() => {
|
|
|
- // 打开变更价格弹框
|
|
|
- this.priceUpdateModal = true
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.submitResult({ salesBillSn: this.salesBillSn })
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.submitResult({ salesBillSn: this.salesBillSn })
|
|
|
- }
|
|
|
- },
|
|
|
+ // // 价格变更,需要选择价格类型 并更新价格
|
|
|
+ // updatePrice (type) {
|
|
|
+ // const ajax_data = {
|
|
|
+ // salesBillSn: this.salesBillSn,
|
|
|
+ // productPriceChangeFlag: type
|
|
|
+ // }
|
|
|
+ // if (type == 0) {
|
|
|
+ // this.submitResult(ajax_data)
|
|
|
+ // } else {
|
|
|
+ // // 批量更新价格
|
|
|
+ // updateBatch(this.updataData.detailList).then(res => {
|
|
|
+ // this.priceUpdateModal = false
|
|
|
+ // if (res.status == 200) {
|
|
|
+ // // 刷新详情统计
|
|
|
+ // this.spinning = true
|
|
|
+ // this.getOrderDetail(false, () => {
|
|
|
+ // this.submitResult(ajax_data)
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // },
|
|
|
// 提交销售单
|
|
|
- async submitResult (data) {
|
|
|
+ async submitResult () {
|
|
|
const _this = this
|
|
|
+ const data = { salesBillSn: _this.salesBillSn }
|
|
|
// 校验活动规则
|
|
|
const vaildActive = await salesPromoValidaSubmit({ salesBillSn: this.salesBillSn }).then(res => res.data)
|
|
|
const a = vaildActive.filter(item => item.type == 1) // 不可提交
|