Commit d6ae5a8e authored by dragondean@qq.com's avatar dragondean@qq.com

修复部分bug

parent 7a0c98e1
......@@ -53,7 +53,8 @@ export default {
return []
}
},
showAll: Boolean
showAll: Boolean,
isall: Boolean
},
data() {
return {
......@@ -97,6 +98,9 @@ export default {
},
defaultIds(){
this.loadDefaultProds()
},
isall(isall){
this.isAllProduct = isall
}
},
created() {
......@@ -104,7 +108,7 @@ export default {
getProductAttrList().then(res => this.attrList = res.data)
this.reLoad()
this.ids = this.defaultIds //数据回显
this.isAllProduct = this.isall
// 如果有默认商品则获取内容供回显
if(this.defaultIds.length){
this.loadDefaultProds()
......
......@@ -189,7 +189,7 @@
v-if="form.type != 1"
>
<!-- <dict-selector :type="DICT_TYPE.ECW_SUITABLE_PROD_TYPE" v-model="form.suitableProdType" /> -->
<products-selector v-model="form.prodIds" :default-ids="form.prodIds" />
<products-selector v-model="form.prodIds" :default-ids="form.prodIds" show-all @setall="isAllProduct=$event" :isall="isAllProduct" />
</el-form-item>
<el-form-item
:label="$t('订单属性')"
......@@ -287,7 +287,8 @@ export default {
1: [],
2: [],
3: []
}
},
isAllProduct: false, // 是否全部商品
};
},
computed:{
......@@ -395,6 +396,11 @@ export default {
if (this.$route.query.id) {
getCoupon(this.$route.query.id).then((res) => {
this.form = res.data
// 没有商品则表示全部
if(!this.form.prodIds){
this.isAllProduct = true
}
if(this.form.couponIds){
let couponIds = this.form.couponIds.split(',').filter(item => item && item != '')
console.log({couponIds})
......@@ -516,6 +522,11 @@ export default {
data.costType = 3
}
// 没勾选全部就需要选择商品
if(!this.isAllProduct && !this.form.prodIds){
return this.$message.error('请选择商品')
}
// 修改的提交
if (data.couponId != null) {
updateCoupon(data).then((response) => {
......
......@@ -209,8 +209,7 @@
<!-- 费用申请 -->
<template v-if="
exclude(scope.row.status, [0]) &&
exclude(scope.row.abnormalState, [1 ,99 ,2 ,3 ,4 ,9 ,10 ,11 ,12 ,14]) &&
exclude(scope.row.shipmentState, [320,322,323])
exclude(scope.row.abnormalState, [1 ,99 ,2 ,3 ,4 ,9 ,10 ,11 ,12 ,14])
">
<el-dropdown-item @click.native="feeApplicationBol = true; orderId = scope.row.orderId" >{{$t('费用申请')}}</el-dropdown-item>
</template>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment