Commit 2300a307 by zhangmeng

积分商城

parent 35e535ad
......@@ -11,35 +11,14 @@
"publish": "publish.bat"
},
"dependencies": {
"@antv/data-set": "^0.8.9",
"@antv/g2": "^3.2.6",
"@gic-test/vue-gic-aside-menu": "^1.1.45",
"@gic-test/vue-gic-card": "^1.0.35",
"@gic-test/vue-gic-confirm-people": "^1.0.2",
"@gic-test/vue-gic-footer": "^1.0.9",
"@gic-test/vue-gic-header": "^1.3.30",
"@gic-test/vue-gic-people": "^1.2.8",
"@gic-test/vue-gic-store": "^1.0.38",
"@gic-test/vue-gic-store-group": "^1.0.4",
"@gic-test/vue-gic-store-linkage": "^1.0.6",
"@riophae/vue-treeselect": "^0.0.36",
"@tinymce/tinymce-vue": "^1.0.8",
"axios": "^0.18.0",
"echarts": "^4.1.0",
"element-ui": "^2.4.1",
"packele": "^1.0.3",
"packele": "^1.0.5",
"scriptjs": "^2.5.8",
"tinymce": "^4.8.2",
"v-charts": "^1.17.8",
"viser-vue": "^2.2.5",
"vue": "^2.5.2",
"vue-axios": "^2.1.1",
"vue-photo-preview": "^1.0.9",
"vue-qr": "^1.3.8",
"vue-router": "^3.0.1",
"vue-ueditor-wrap": "^1.3.4",
"vue2-editor": "^2.5.0",
"vuedraggable": "^2.16.0",
"vuex": "^3.0.1"
},
"devDependencies": {
......
......@@ -2,7 +2,7 @@
<section class="sms-lib">
<div :class="pbSize">
<span class="pr10">选择卡券(共{{total}}条)</span>
<el-input v-model="listParams.searchParam" class="w200" clearable placeholder="请输入卡券名称" @change="getCardList"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-input :disabled="disabled" v-model="listParams.searchParam" class="w200" clearable placeholder="请输入卡券名称" @change="getCardList"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<span class="fz12 gray pl20">领取限制 < 100的卡券不支持选择,系统已自动过滤</span>
</div>
<el-table tooltipEffect="light" :data="tableList" :height="tableHeight" style="width: 100%" v-loading="loading" @row-click="chooseCard">
......@@ -108,6 +108,7 @@ export default {
},
async getCardList() {
this.loading = true;
this.listParams.coupCardId = this.activeId;
let res = await getCardList(this.listParams);
this.tableList = res.result.rows || [];
this.total = res.result.total;
......
......@@ -50,7 +50,11 @@ export default {
res = await updateIntegralCostService({proId:this.model.integralMallProId,cost:this.model.inputValue});
}
if (res.errorCode === 0) {
this.$tips({type:'success',message: '更新成功'});
if (this.theType === 'virtualStock') {
this.$tips({type:'success',message: '积分商城修改库存时,请同步修改对应卡券的库存'});
} else {
this.$tips({type:'success',message: '更新成功'});
}
this.$emit('refresh');
} else {
this.$tips({type:'error',message: '更新失败'});
......
......@@ -69,10 +69,12 @@ export default {
this.isLimitTimes = (val > 0);
},
},
methods:{
async getIntegralMallProInfo() {
let res = await getIntegralMallProInfo({integralMallProId:this.$route.params.id});
if (res.errorCode === 0) {
const result = res.result;
this.form.integralMallProId = result.integralMallProId || '';
this.form.proReferId = result.proReferId || '';
......@@ -120,6 +122,9 @@ export default {
}
this.isLimitTimes = this.form.limitTimes > 0;
this.$nextTick(_ => {
this.$refs.cardTemp.getCardList();
})
}
},
//门店分组回执方法
......
......@@ -2,7 +2,7 @@
<el-form class="dm-wrap" :model="form" ref="form" :rules="rules" label-width="120px">
<div class="border-radius2" style="padding:15px;margin-bottom:20px;">
<card-temp :disabled="isEdit || isInfo" pbSize="pb15" :activeId.sync="form.proReferId" @emitActiveObj="getCardActiveObjFun" :showPagination="false" :cardLimitType="3"></card-temp>
<card-temp ref="cardTemp" :disabled="isEdit || isInfo" pbSize="pb15" :activeId.sync="form.proReferId" @emitActiveObj="getCardActiveObjFun" :showPagination="false" :cardLimitType="3"></card-temp>
</div>
<el-form-item prop="integralCost" label="积分费用">
<el-input-number controls-position="right" :disabled="isEdit || isInfo" v-model="form.integralCost" class="w300" :precision="0" :min="0"></el-input-number>
......
......@@ -171,13 +171,9 @@ export default {
this.form.limitTimeBegin = result.limitTimeBegin || '';
this.form.weChatVirtualStock = this.form.virtualStock = result.virtualStock || 0;
// result.showStore = 2;
this.sendChildData.storeType = result.showStore || 0;
if (result.showStore === 1) {
this.sendChildData.storeGroupIds = result.storeGroupIds || '';
} else if (result.showStore === 2) {
......@@ -190,9 +186,6 @@ export default {
this.sendChildData.storeIds = list;
}
console.log(this.sendChildData)
if (this.form.exchangeTimeType === 2 && result.timeZones) {
let list = result.timeZones.split('#').filter(v => v);
list.map((v,i)=> {
......@@ -200,9 +193,12 @@ export default {
this.$set(this.timeRangeList,i,{timeRange:[arr[0],arr[1]]})
});
}
this.isLimitTimes = this.form.limitTimes > 0;
console.log(this.form)
this.$nextTick(_ => {
debugger;
this.$refs.cardTemp.getCardList();
})
}
},
//门店分组回执方法
......
<template>
<el-form class="dm-wrap" :model="form" ref="form" :rules="rules" label-width="120px">
<el-form-item prop="proName" label="礼品标题">
<span slot="label">
测试Label
<el-tooltip class="item" effect="dark" content="Top Left 提示文字" placement="top-start">
<i class="el-icon-warning"></i>
</el-tooltip>
</span>
<dm-input controls-position="right" placeholder="请输入礼品标题" :disabled="isInfo" v-model="form.proName" class="w300" :maxlength="20"></dm-input>
</el-form-item>
<el-form-item label="礼品主图" class="is-required">
......@@ -119,8 +127,8 @@
</div>
</el-radio-group>
</el-form-item>
<div v-show="form.changeType === 1" class="border-radius2" style="padding:15px;margin-bottom:20px;">
<card-temp pbSize="pb15" :activeId.sync="form.proReferId" @emitActiveObj="getCardActiveObjFun" :showPagination="false" :cardLimitType="3"></card-temp>
<div v-show="!(form.changeType !== 1 || isInfo || isEdit)" class="border-radius2" style="padding:15px;margin-bottom:20px;">
<card-temp ref="cardTemp" pbSize="pb15" :activeId.sync="form.proReferId" @emitActiveObj="getCardActiveObjFun" :showPagination="false" :cardLimitType="3"></card-temp>
</div>
<div class="btn-wrap_fixed" :class="{'on':asideShow}">
<el-button type="primary" @click="submit('form')" v-if="!isInfo">{{isAdd?'确认新增':'确认编辑'}}</el-button>
......
......@@ -179,7 +179,13 @@ export default {
inputPlaceholder:'请输入取消原因',
inputErrorMessage:'原因不能为空',
inputValidator:function(value) {
return !!value;
if (!value) {
return false;
} else if (value.replace(/[^\x00-\xff]/gi, "--").length > 100) {
return '中文限制50字,数字字母限制100字符'
} else {
return true;
}
}
}).then(({ value }) => {
orderOptService({optType:2,integralMallProExchangeId:row.integralMallProExchangeId,cancelReason:value}).then(res => {
......@@ -193,38 +199,51 @@ export default {
console.log(err);
});
},
// 发货
sendOrder(row) {
if(row.changeType === 2) {
this.sendOrderOutline(row);
} else if (row.changeType === 3) {
this.sendOrderOnline(row);
}
},
// 在线发货
sendOrderOnline(row) {
this.$prompt(`
<p>确认取消订单吗?</p><p>积分将会实时返回给会员。相应礼品的库存会归还</p>
`, '取消订单', {
this.$prompt('请输入发货内容', '在线发货', {
dangerouslyUseHTMLString: true,
showCancelButton: true,
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType:'textarea',
inputPlaceholder:'请输入取消原因',
inputErrorMessage:'原因不能为空',
inputPlaceholder:'请输入发货内容',
inputErrorMessage:'发货内容不能为空',
inputValidator:function(value) {
return !!value;
if (!value) {
return false;
} else if (value.replace(/[^\x00-\xff]/gi, "--").length > 200) {
return '中文限制100字,数字字母限制200字符'
} else {
return true;
}
}
}).then(({ value }) => {
orderOptService({optType:2,integralMallProExchangeId:row.integralMallProExchangeId,cancelReason:value}).then(res => {
orderOptService({optType:1,integralMallProExchangeId:row.integralMallProExchangeId,deliveryContent:value}).then(res => {
if (res.errorCode === 0) {
this.$tips({type:'success',message:'取消订单成功'});
this.$tips({type:'success',message:'发货成功'});
} else {
this.$tips({type:'error',message:'取消订单失败'});
this.$tips({type:'error',message:'发货失败'});
}
})
}).catch(err => {
console.log(err);
});
},
// 发货
sendOrder(row) {
// 快递发货
sendOrderOutline(row) {
this.sendGoodsShow = true;
this.expressId = row.integralMallProExchangeId;
},
// 查看快递
queryExpress(row,flag) {
this.expressShow = true;
......
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