Commit d9970110 by member

商品选择器嵌入会员标签

parents 14c38960 02258dbd
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>GIC-会员标签</title><link href=./static/css/app.1177136f49ced3d0d981ee37c175f6e1.css rel=stylesheet></head><body style="background-color: #f0f2f5;min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.20.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-new.2.0.12.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/area-ab.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.02.js></script><script src=//web-1251519181.cos.ap-shanghai.myqcloud.com/components/selector.1.1.23.js></script><script type=text/javascript src=./static/js/manifest.93d98f29b6af7413e7da.js></script><script type=text/javascript src=./static/js/vendor.eb4fd5c01c3b98d7fcea.js></script><script type=text/javascript src=./static/js/app.e9b61258081113d58255.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>GIC-会员标签</title><link href=./static/css/app.4e2823fcbc7a29bdd5f252aac50c71b7.css rel=stylesheet></head><body style="background-color: #f0f2f5;min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.20.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-new.2.0.12.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/area-ab.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.02.js></script><script src=//web-1251519181.cos.ap-shanghai.myqcloud.com/components/selector.1.1.24.js></script><script type=text/javascript src=./static/js/manifest.5c7fe41fe2830e552889.js></script><script type=text/javascript src=./static/js/vendor.eb4fd5c01c3b98d7fcea.js></script><script type=text/javascript src=./static/js/app.e9b61258081113d58255.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(a,t,f){for(var o,b,d,i=0,u=[];i<a.length;i++)b=a[i],n[b]&&u.push(n[b][0]),n[b]=0;for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);for(c&&c(a,t,f);u.length;)u.shift()();if(f)for(i=0;i<f.length;i++)d=r(r.s=f[i]);return d};var a={},n={33:0};function r(c){if(a[c])return a[c].exports;var n=a[c]={i:c,l:!1,exports:{}};return e[c].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.e=function(e){var c=n[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var a=new Promise(function(a,r){c=n[e]=[a,r]});c[2]=a;var t=document.getElementsByTagName("head")[0],f=document.createElement("script");f.type="text/javascript",f.charset="utf-8",f.async=!0,f.timeout=12e4,r.nc&&f.setAttribute("nonce",r.nc),f.src=r.p+"static/js/"+e+"."+{0:"761fd45efa7fbdf2aa96",1:"1a66f3452cb905b67755",2:"01784f338bb843f827f5",3:"051ac3bcb06e09d7b34d",4:"5346be35fdb53a222936",5:"b90e111733583960642a",6:"31eb51419dea97959645",7:"f169140cbd6ad9f5611c",8:"fe61efcd1ccfc3412252",9:"ea583eedf0e8e01807bd",10:"49dc4ce10dca172e66e9",11:"089121d042e2ea4d5934",12:"ff49b3face62ef7aef5f",13:"5ff52df0201b9234fa89",14:"698cfa21b2f783438c71",15:"d92460353eb3e0bb9bf6",16:"77043b18784ab0e7f74a",17:"b43a253e53779917cbec",18:"9022ea0326694df97cda",19:"58217a281ee1178e0c5d",20:"519677922a687ccbe4d9",21:"e39e3461a16359f1196b",22:"f24920a6257c85f352de",23:"17397a079914e3c270ab",24:"590887b93345814f00ef",25:"fbc9d87dd52c837c39be",26:"c5f9e5a4bc2c63938b70",27:"2c48b10d124016d57c0b",28:"3493abb67f82d7dbc1cb",29:"a847856eb9171d0ce268",32:"a9aaa6e5d01423c1a780"}[e]+".js";var o=setTimeout(b,12e4);function b(){f.onerror=f.onload=null,clearTimeout(o);var c=n[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),n[e]=void 0)}return f.onerror=f.onload=b,t.appendChild(f),a},r.m=e,r.c=a,r.d=function(e,c,a){r.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:a})},r.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(c,"a",c),c},r.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},r.p="./",r.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(n,a,f){for(var o,b,d,i=0,u=[];i<n.length;i++)b=n[i],r[b]&&u.push(r[b][0]),r[b]=0;for(o in a)Object.prototype.hasOwnProperty.call(a,o)&&(e[o]=a[o]);for(c&&c(n,a,f);u.length;)u.shift()();if(f)for(i=0;i<f.length;i++)d=t(t.s=f[i]);return d};var n={},r={33:0};function t(c){if(n[c])return n[c].exports;var r=n[c]={i:c,l:!1,exports:{}};return e[c].call(r.exports,r,r.exports,t),r.l=!0,r.exports}t.e=function(e){var c=r[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var n=new Promise(function(n,t){c=r[e]=[n,t]});c[2]=n;var a=document.getElementsByTagName("head")[0],f=document.createElement("script");f.type="text/javascript",f.charset="utf-8",f.async=!0,f.timeout=12e4,t.nc&&f.setAttribute("nonce",t.nc),f.src=t.p+"static/js/"+e+"."+{0:"0cc527cf6c50948d2ff8",1:"1a66f3452cb905b67755",2:"01784f338bb843f827f5",3:"051ac3bcb06e09d7b34d",4:"5346be35fdb53a222936",5:"b90e111733583960642a",6:"31eb51419dea97959645",7:"f169140cbd6ad9f5611c",8:"fe61efcd1ccfc3412252",9:"ea583eedf0e8e01807bd",10:"49dc4ce10dca172e66e9",11:"089121d042e2ea4d5934",12:"ff49b3face62ef7aef5f",13:"5ff52df0201b9234fa89",14:"698cfa21b2f783438c71",15:"d92460353eb3e0bb9bf6",16:"77043b18784ab0e7f74a",17:"b43a253e53779917cbec",18:"9022ea0326694df97cda",19:"58217a281ee1178e0c5d",20:"519677922a687ccbe4d9",21:"e39e3461a16359f1196b",22:"f24920a6257c85f352de",23:"17397a079914e3c270ab",24:"590887b93345814f00ef",25:"fbc9d87dd52c837c39be",26:"c5f9e5a4bc2c63938b70",27:"2c48b10d124016d57c0b",28:"3493abb67f82d7dbc1cb",29:"a847856eb9171d0ce268",32:"a9aaa6e5d01423c1a780"}[e]+".js";var o=setTimeout(b,12e4);function b(){f.onerror=f.onload=null,clearTimeout(o);var c=r[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),r[e]=void 0)}return f.onerror=f.onload=b,a.appendChild(f),n},t.m=e,t.c=n,t.d=function(e,c,n){t.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(c,"a",c),c},t.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},t.p="./",t.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
......@@ -21,6 +21,6 @@
<script src="//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.02.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/area-ab.2.0.00.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/card.2.0.02.js"></script>
<script src="//web-1251519181.cos.ap-shanghai.myqcloud.com/components/selector.1.1.23.js"></script>
<script src="//web-1251519181.cos.ap-shanghai.myqcloud.com/components/selector.1.1.24.js"></script>
</body>
</html>
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -652,8 +652,12 @@
</div>
<!-- 嵌入商品选择器 -->
<div>
<div v-if="parent.templateCode == 'com022'">
<vue-gic-goods-selector ref="selector"></vue-gic-goods-selector>
<div class="gic-button">
<el-button type="primary" @click="confirmSelector" v-if="select.expends">确认</el-button>
<el-button @click="goback" v-else>返回</el-button>
</div>
</div>
</div>
......@@ -692,6 +696,9 @@ export default {
data() {
return {
select: {
expends: true
},
templateCode: null,
timeAfterChecked: '',
tagList: [],
......@@ -887,7 +894,11 @@ export default {
timeSelect: '1', // 最近/之后
timeInput: ''
},
// 商品选择器
com022: {
selectList: []
},
// 卡券选择器
com023: {
},
......@@ -910,6 +921,20 @@ export default {
},
methods: {
goback() {
this.select.expends = !this.select.expends;
this.$refs.selector[0].removeConditions();
},
// 获取商品选择器的缩略信息
confirmSelector() {
this.$refs.selector[0].collectConditions().then(res => {
this.select.expends = !res.filterAbbrInfo.length;
this.com022.selectList = res.conditions;
this.com022.abbrInfo = res.filterAbbrInfo;
this.com022.conditionsList = res.conditionList;
this.com022.finalId = res.id;
});
},
// 格式化输入的字符
handleNumRangeStart(eve) {
let value = eve.target.value;
......@@ -1056,17 +1081,12 @@ export default {
.then(res => {
if (res.errorCode == 1) {
let data = res.result;
// this.templateCode = data.templateCode;
for (let key in data) {
// this[data.templateCode] = Object.create(null);
if (data.templateCode == 'com023') {
// console.log(data);
this[data.templateCode][key] = data[key];
}
this[data.templateCode][key] = data[key];
}
// if (data.templateCode === 'com001') {
// }
// 如果是城市
if (data.templateCode === 'tag010') {
this.getcityData();
......@@ -1096,7 +1116,15 @@ export default {
}, 200);
return false;
}
this.templateData.push(this[data.templateCode]);
// 调整商品选择器顺序
if (data.templateCode == 'com022') {
setTimeout(_ => {
this.templateData.push(this[data.templateCode]);
}, 200);
} else {
this.templateData.push(this[data.templateCode]);
}
/**
* 这里处理编辑回显数据
......@@ -1383,8 +1411,6 @@ export default {
if (this.templateData[i].templateCode === 'tag015') {
let templateDate = tagParams.template[0];
this.templateData[i].radio = templateDate.radio; // 时段
// 判断是那个时间段
// 固定时段
if (this.templateData[i].radio == 1) {
if (templateDate.dateRangeValue && templateDate.dateRangeValue.length) {
this.templateData[i].dateRangeValue = templateDate.dateRangeValue;
......@@ -1585,6 +1611,12 @@ export default {
}
break;
case 'com022':
this.$refs.selector[0].conditions = tagParams.conditionList;
this.confirmSelector();
this.select.expends = false;
break;
// 卡券
case 'com023':
for (let i = 0; i < this.templateData.length; i++) {
......
......@@ -424,6 +424,27 @@ export default {
returnFlag = false;
}
}
/**
* 商品选择必选
*/
for (let i = 0; i < this.templateData.length; i++) {
// 商品选择器
if (this.templateData[i].templateCode == 'com022') {
if (!this.com022.selectList || !this.com022.selectList.length) {
this.$message.warning('商品选择器未选择条件!')
return false;
}
tagValue.val[0].data.compute = this[code].postCompute;
tagValue.val[0].data.key = this.currentKey;
tagValue.val[0].data.dealKey = 'goodsSeletor';
tagValue.val[0].data.value = this.com022.finalId;
let abbr = this.translateAbbrinfo(this.com022.abbrInfo);
this.postTemplateData.selectedVal.push(abbr.join(' '));
that.postTemplateData.conditionList = this.com022.conditionsList;
}
}
/* 年月日-年月日*/
if (code === 'tag016' && !that.templateData[0].dateRangeValue.length) {
that.$message.error({ message: '请选择时间' });
......@@ -938,6 +959,8 @@ export default {
this.postTemplateData.selectedVal = this.cardListData.map(el => el.cardName).join(' ');
}
}
// 门店参数修改
......@@ -947,7 +970,6 @@ export default {
}
});
//
if (this.templateData.length == 1) {
for (let i = 0; i < this.templateData.length; i++) {
if (this.templateData[i].templateCode == 'tag011') {
......@@ -967,6 +989,19 @@ export default {
return true;
},
// 保存商品选择器选择的条件
translateAbbrinfo(list) {
return list.map(el => {
el = el.map(item => {
let strNodes = item.childNames.join(',');
item = `${item.typeName}包含${strNodes}`
return item;
});
el = el.join('|');
return el;
});
},
/**
* 确定弹层---添加到暂存架 api
*/
......@@ -1100,9 +1135,9 @@ export default {
* 天/月/年 当天改变
*/
currentDayChange(e, parent) {
if (e) {
parent.timeInput = '';
}
// if (e) {
// parent.timeInput = '';
// }
},
/**
......
<template>
<div>
<!-- 添加标签、编辑标签 -->
<el-dialog :title="title" :visible.sync="showEditTagPop" width="600px" :before-close="handleClose" :close-on-click-modal="false" append-to-body>
<el-dialog :title="title" :visible.sync="showEditTagPop" width="700px" :before-close="handleClose" :close-on-click-modal="false" append-to-body>
<div class="dialog-box">
<p class="tag-name">
{{ tagDataAssgin.tagName }}
......
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