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

修复部分bug

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