Commit cd2d3c11 by member

合并远程dev

parents 6794c069 fcf7a817
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -21,11 +21,11 @@
"xlsx": "^0.13.5"
},
"devDependencies": {
"@riophae/vue-treeselect": "0.0.29",
"@tinymce/tinymce-vue": "^1.0.8",
"@antv/data-set": "^0.8.9",
"@antv/g2": "^3.1.0",
"@gic-test/vue-gic-datepicker": "^1.3.8",
"@riophae/vue-treeselect": "0.0.29",
"@tinymce/tinymce-vue": "^1.0.8",
"autoprefixer": "^7.1.2",
"axios": "^0.18.0",
"babel-core": "^6.22.1",
......
......@@ -39,7 +39,7 @@
<el-select v-if="type" style="width:100px" v-model="cardTypes" placeholder="卡券类型" @change="handleChange">
<el-option v-for="item in cardTypesList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-date-picker v-if="type" v-model="date" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="handleChange"></el-date-picker>
<!-- <el-date-picker v-if="type" v-model="date" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="handleChange"></el-date-picker> -->
</div>
<div class="fr">
<!-- <el-button type="primary" @click="add">新建卡券</el-button> -->
......@@ -148,6 +148,9 @@ export default {
return [];
}
},
tagList: {
type: Array
},
type: {
type: Number,
default: 0 // 0:默认旧卡券弹窗 1:新卡券弹窗
......@@ -213,6 +216,7 @@ export default {
let row = this.middleSelection[index];
this.$refs.multipleTable.toggleRowSelection(row);
}
this.$emit('reciver-card-list', this.middleSelection);
},
// 切换的卡券
handleSelect(select, row) {
......@@ -228,6 +232,7 @@ export default {
this.middleSelection.splice(index, 1);
}
}
this.$emit('reciver-card-list', this.middleSelection);
},
handleSelectAll(val) {
// 如果是全选 就判断里面的元素是否在middleSelection
......@@ -248,6 +253,7 @@ export default {
}
});
}
this.$emit('reciver-card-list', this.middleSelection);
},
add() {
window.open('/marketing/#/card/add');
......@@ -350,6 +356,8 @@ export default {
ele.disabled = this.disabledList.indexOf(ele.coupCardId) >= 0;
});
this.cardData = resData.result.result;
} else {
this.cardData = [];
}
this.total = resData.result.totalCount;
} else {
......@@ -368,7 +376,7 @@ export default {
}
});
}
console.log(1);
this.$emit('reciver-card-list', this.middleSelection);
});
} else {
this.$message.error({ duration: 1000, message: resData.message });
......@@ -420,6 +428,12 @@ export default {
},
cardType(newData, oldData) {
this.cardTypes = newData;
},
tagList: {
immediate: true,
handler(newval) {
this.middleSelection = newval;
}
}
},
/* 接收数据 */
......
......@@ -10,7 +10,7 @@
</div>
<div class="checkboxOption-wrap__body__options border-box tag-options">
<!-- @change="handleCheckedChange($event, parent)" -->
<el-checkbox-group v-model="parent.checkeditems">
<el-checkbox-group v-model="parent.checkeditems" @change="handleCheckedCitiesChange">
<el-checkbox v-for="(item, index) in parent.options" :label="item.key" :key="item.key + index">{{ item.value }}</el-checkbox>
</el-checkbox-group>
</div>
......@@ -19,10 +19,9 @@
<!-- 2.数字范围 -->
<template v-if="parent.templateCode == 'tag003'">
<div class="m-b-20" :key="'tag2' + pindex">
<el-input v-model="parent.numRange[0]" class="select-wrap-input" style="width: 100px;margin-right: 0;" placeholder="请输入数字"></el-input
><!-- @keyup.native="(value) => toInputFrom(value)" -->
<el-input v-model="parent.numRange[0]" @keyup.native="handleNumRangeStart($event)" class="select-wrap-input" style="width: 100px;margin-right: 0;" placeholder="请输入数字"></el-input>
<label> - </label>
<el-input v-model="parent.numRange[1]" class="select-wrap-input" style="width: 100px;margin-right: 0;" placeholder="请输入数字"></el-input>
<el-input v-model="parent.numRange[1]" @keyup.native="handleNumRangeEnd($event)" class="select-wrap-input" style="width: 100px;margin-right: 0;" placeholder="请输入数字"></el-input>
<!-- <label class="label-tip">注:如果起始值为空则视为小于等于最大输入值;如果最大值为空则视为大于等于最小输入值!</label> -->
</div>
</template>
......@@ -317,7 +316,7 @@
</div>
<div class="checkboxOption-wrap__body__options border-box">
<!-- @change="handleCheckedChange($event, parent)" -->
<el-checkbox-group v-model="parent.checkeditems">
<el-checkbox-group v-model="parent.checkeditems" @change="handleCheckedCitiesChange">
<el-checkbox v-for="(item, index) in parent.options" :label="item.key" :key="item.key + index">{{ item.value }}</el-checkbox>
</el-checkbox-group>
</div>
......@@ -542,10 +541,13 @@
<!-- v-if="parent.templateCode == 'com023'" -->
<div v-if="parent.templateCode == 'com023'">
<vue-gic-card
@reciver-card-list="reciverCardList"
:disabledList="disabledList"
:cardLimit="cardLimit"
:cardType="cardType"
:type="1"> </vue-gic-card>
:tag-list="tagList"
:type="1">
</vue-gic-card>
</div>
</div>
</div>
......@@ -565,6 +567,8 @@ const templateCode = ['tag001', 'tag002', 'tag003', 'tag004', 'tag005', 'tag006'
*/
const templateCodeKeyWords = ['checkeditems', '', 'numRange', '', '', '', '', '', '', '', '', '', '', '', 'monthDayRange', '', '', ''];
const RegTest = /^\d+$/;
export default {
name: 'tag-config',
......@@ -581,6 +585,7 @@ export default {
data() {
return {
tagList: [],
// 卡券
disabledList: [],
cardLimit: [],
......@@ -813,7 +818,8 @@ export default {
},
com023: {
}
},
cardListData: []
};
},
watch: {
......@@ -832,10 +838,41 @@ export default {
},
methods: {
// 格式化输入的字符
handleNumRangeStart(eve) {
let value = eve.target.value;
if (!RegTest.test(value)) {
this.$message.warning({
message: '只能输出数字!'
})
eve.target.value = '';
}
},
handleNumRangeEnd(eve) {
let value = eve.target.value;
if (!RegTest.test(value)) {
this.$message.warning({
message: '只能输出数字!'
})
eve.target.value = '';
}
},
handleCheckedCitiesChange(value) {
this.templateData.forEach(item => {
if (item.templateCode == 'tag001') {
let checkedCount = value.length;
item.checkAll = checkedCount === item.options.length;
item.isIndeterminate = checkedCount > 0 && checkedCount < item.options.length;
}
});
},
// 卡券
selectCard(val) {
this.cardTags = val;
},
reciverCardList(list) {
this.cardListData = list;
},
async saveConfirm(id) {
await this.confirmPost(id);
......@@ -869,7 +906,9 @@ export default {
columnKey: data.columnKey,
template: data.template
};
console.log(data);
// syo 关键点 修改实时以及key
this.tagData.tagName = data.tagName;
this.currentKey = data.columnKey;
this.tagData.isActive = data.isActive;
if (!!this.templateObj.template) {
......@@ -942,7 +981,8 @@ export default {
for (let key in data) {
// this[data.templateCode] = Object.create(null);
if (data.templateCode == 'com023') {
console.log(data);
// console.log(data);
this[data.templateCode][key] = data[key];
}
this[data.templateCode][key] = data[key];
}
......@@ -1268,6 +1308,23 @@ export default {
this.templateData[i].timeAfter = afterDays;
}
}
break;
// 卡券
case 'com023':
for (let i = 0; i < this.templateData.length; i++) {
if (this.templateData[i].templateCode === 'com023') {
value = tagValue.val[0].data.value.split(' ');
selectVal = tagParams.selectedVal.split(' ');
selectVal.forEach((el, ix) => {
this.tagList.push({
cardName: el,
coupCardId: value[ix]
});
});
}
}
break;
}
}
},
......
......@@ -357,6 +357,7 @@ export default {
}
]
};
let code = that.templateData[0].templateCode;
/* 多选 */
if (code === 'tag001' && !that.templateData[0].checkeditems.length) {
......@@ -374,12 +375,12 @@ export default {
}
/* 数字区间 */
if (code === 'tag003' && (that.templateData[0].numRange[0] === '' || that.templateData[0].numRange[1] === '')) {
that.$message.error({ message: '请填写值' });
this.$message.error({ message: '请填写值' });
return false;
}
if (code === 'tag003' && that.templateData[0].numRange[0] > that.templateData[0].numRange[1]) {
that.$message.error({ message: '起始值必须小于等于最大值' });
return false;
if (code === 'tag003' && that.templateData[0].numRange[0] - that.templateData[0].numRange[1] > 0) {
this.$message.error({ message: '起始值必须小于等于最大值' });
return;
}
if (code === 'tag003' && that.templateData.length === 1) {
tagValue.val[0].data.compute = that.templateData[0].postCompute;
......@@ -709,6 +710,12 @@ export default {
}
// 数字区间
if (ele.templateCode === 'tag003') {
if (ele.numRange[0] < 0 || ele.numRange[1] < 0) {
this.$message.warning({
message: '数字区间不能小于0!'
});
return;
}
if (ele.numRange[0] === '' || ele.numRange[1] === '') {
returnFlag = false;
}
......@@ -717,6 +724,7 @@ export default {
}
tagValue.val[0].data.compute = ele.postCompute;
tagValue.val[0].data.value = ele.numRange.join(',');
console.log(this.tagData);
that.postTemplateData.selectedVal.push(`${ele.numRange[0]} <= ${that.tagData.tagName} <= ${ele.numRange[1]}`);
}
// 固定/最近
......@@ -820,6 +828,26 @@ export default {
that.$message.error({ message: '请完善标签值' });
return false;
}
/**
* 卡券
* 待领取卡券 pendingCard
* 已过期指定卡券 expiredCard
* 已领取卡券 receivedCard
* 已核销指定卡券 writeOffCard
*/
if (this.templateData.length) {
if (code === 'com023') {
tagValue.val[0].data.compute = this[code].postCompute;
tagValue.val[0].data.dealKey = "card";
tagValue.val[0].data.key = this.currentKey;
tagValue.val[0].data.value = this.cardListData.map(el => el.coupCardId).join(' ');
this.postTemplateData.selectedVal = this.cardListData.map(el => el.cardName).join(' ');
}
}
// 门店参数修改
that.templateData.forEach(function(ele, index) {
if (ele.templateCode == 'tag011') {
......
......@@ -81,6 +81,7 @@ export default {
},
handleSave() {
const ret = this.$refs.tagConfig.getTemplateData();
this.templateData = JSON.parse(JSON.stringify(ret));
this.tagId = this.tagDataAssgin.tagId;
this.$refs.tagConfig.saveConfirm().then(_ => {
......
......@@ -26,7 +26,7 @@
<el-dialog :title="title" :visible.sync="addGroupDialog" width="320px" top="30vh" :close-on-click-modal="false">
<div>
分组名称:
<el-input style="width: 200px;" placeholder="请输入分组名称" v-model="groupName" :maxlength="10" clearable></el-input>
<el-input style="width: 200px;" placeholder="请输入分组名称" v-model="groupName" :maxlength="8" clearable></el-input>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="addGroupDialog = false">取 消</el-button>
......@@ -148,6 +148,7 @@ export default {
message: '修改成功',
duration: 2000
});
}
});
},
......@@ -182,6 +183,7 @@ export default {
memberGroupModify(param).then(res => {
if (res.errorCode == 1) {
this.getMemberGroupList();
this.groupName = '';
this.addGroupDialog = false;
this.$message({
type: 'success',
......
......@@ -234,7 +234,12 @@ export default {
watch: {
tagSearch(newval) {
this.params.groupName = newval;
}
},
batchVisiable(newval) {
if (!newval) {
this.batchSelect = '';
}
}
},
filters: {
......@@ -372,7 +377,6 @@ export default {
*/
batchHandleSelect(val) {
this.operateNumber = val;
console.log(this.multipleSelection);
if (!this.multipleSelection.length) {
this.$message.warning({
message: '请先勾选分组',
......@@ -470,7 +474,6 @@ export default {
* 更新好办展示状态
*/
switchAppStatus(status, obj) {
console.log(status, obj);
const that = this;
that.loading = true;
// const appStatus = status ? 1 : 0;
......
......@@ -38,7 +38,7 @@
</div>
<!-- 我的标签 -->
<div class="my-pop-tagbox" v-if="groupListNumber > 0" @click="expendsGroupList">
<div class="my-pop-tagbox" @click="expendsGroupList">
<p class="txt">已选标签</p>
<p class="number-txt">{{ groupListNumber }}</p>
</div>
......@@ -95,11 +95,11 @@
</el-select>
</div>
</div>
<div class="fixed-btn">
<el-button type="primary" @click="createNewGroup">创建会员分组</el-button>
</div>
</div>
</el-collapseTransition>
<div class="fixed-btn">
<el-button type="primary" @click="createNewGroup">创建会员分组</el-button>
</div>
</div>
<edit-tag :showEditTagPop.sync="showEditTagPop" :tagData="tagData" :title="editPopType === 'add' ? '添加标签' : '编辑标签'" @returnTagData="returnTagData" @refersh="refersh"></edit-tag>
</div>
......@@ -280,6 +280,21 @@ export default {
json: JSON.stringify(this.selectedTags),
effectiveDateTmp: this.tagConfig.date
};
// 必填项目
if (param.groupName == '') {
this.$message.warning({ message: '会员分组名称不能为空!' })
return;
}
if (param.effectiveDateTmp == '') {
this.$message.warning({ message: '会员分组有效期不能为空!' })
return;
}
if (param.describle == '') {
this.$message.warning({ message: '会员分组描述不能为空!' })
return;
}
addNewGroup(param)
.then(res => {
if (res.errorCode == 1) {
......@@ -398,6 +413,12 @@ export default {
// 模糊查询会员标签
searchMemberList() {
if (this.memberTag) {
this.tagName = this.memberTag;
} else {
this.tagName = '全部标签';
}
this.loadMemberTagList({
searchName: this.memberTag
});
......@@ -595,7 +616,7 @@ export default {
position: absolute;
z-index: 2;
right: 40px;
bottom: 100px;
bottom: -15px;
height: 70px;
width: 70px;
color: #fff;
......@@ -654,10 +675,10 @@ export default {
}
}
.refresh-txt {
margin-left: 60px;
color: #606266;
}
.wapper {
height: 600px;
height: calc(100% - 130px);
padding: 10px;
overflow-y: auto;
.desc-labeltxt {
......@@ -678,6 +699,7 @@ export default {
bottom: 0px;
width: 100%;
text-align: center;
background-color: #fff;
box-shadow: 3px 0px 12px 2px rgba(220, 223, 230, 0.75);
}
}
......
......@@ -25,8 +25,8 @@
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button @click="handleEdit(scope.row, scope.$index)" type="text">{{ editText }}</el-button>
<el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
<el-button :disabled="scope.row.levelName == '未分类'" @click="handleEdit(scope.row, scope.$index)" type="text">{{ editText }}</el-button>
<el-button :disabled="scope.row.levelName == '未分类'" type="text" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
......@@ -185,7 +185,7 @@ export default {
});
this.getThirdTag();
this.dispatch('member-tag', 'refersh-member-list');
this.editVisiable = false;
// this.editVisiable = false;
}
})
.catch(err => {
......
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