Commit e3f6a863 by zhu_yu_dan

fix:太平鸟集团后台积分策略硬编码限定

parent e604c21b
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>GIC-集团后台</title><link href=./static/css/main.22334b87072e652200dce73b1be4ea5c.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.06.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/group-people.2.0.08.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-group.2.0.06.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/input.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.02.js></script><script type=text/javascript src=./static/js/manifest.ed90ceecf5a7b42e7e71.js></script><script type=text/javascript src=./static/js/vendor.1e64e812438b0a3af88f.js></script><script type=text/javascript src=./static/js/main.ebf48f57e93e8e9c7cb7.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/main.5bd82012ce0acf56482ac840a2b0e27a.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.06.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/group-people.2.0.08.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-group.2.0.06.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/input.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.02.js></script><script type=text/javascript src=./static/js/manifest.3fabd88fccd61ea18123.js></script><script type=text/javascript src=./static/js/vendor.1e64e812438b0a3af88f.js></script><script type=text/javascript src=./static/js/main.ebf48f57e93e8e9c7cb7.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.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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(f,r,t){for(var o,d,b,i=0,u=[];i<f.length;i++)d=f[i],a[d]&&u.push(a[d][0]),a[d]=0;for(o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);for(c&&c(f,r,t);u.length;)u.shift()();if(t)for(i=0;i<t.length;i++)b=n(n.s=t[i]);return b};var f={},a={40:0};function n(c){if(f[c])return f[c].exports;var a=f[c]={i:c,l:!1,exports:{}};return e[c].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.e=function(e){var c=a[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var f=new Promise(function(f,n){c=a[e]=[f,n]});c[2]=f;var r=document.getElementsByTagName("head")[0],t=document.createElement("script");t.type="text/javascript",t.charset="utf-8",t.async=!0,t.timeout=12e4,n.nc&&t.setAttribute("nonce",n.nc),t.src=n.p+"static/js/"+e+"."+{0:"08fb0d5f0434f8bf1a3e",1:"7022ec098f28856d54d4",2:"06984e75209b3ac2131d",3:"2ad9744fc945a86b15c6",4:"6f32962990c4f47b6b8a",5:"299374ef57c52933e3fe",6:"fa0b3cbce6811a485ff8",7:"4fec8739e76a3f34d874",8:"f253c806c0ae6effc39e",9:"5999e2286ab73a7f96a9",10:"169e4ad17e4ff631e4de",11:"a6800fdb0c0b1c69c00c",12:"668c99115fcb37fe30a1",13:"f33b586c30e59c45c7cc",14:"9d7866da23eae6beb141",15:"b2c8d912367a079fd91e",16:"c07857a2765d09cef9bb",17:"1a8636077b786a984423",18:"28ef221553603ed7ddcf",19:"0f382a583054f3167b3c",20:"6caf4733f6235b86c902",21:"1e46fdf5628c2ea199ac",22:"4dcc7f42a2940d2cfaaa",23:"9b9915c61ee9b5dc37ec",24:"2007b52ae4ed232d464a",25:"2757e7d76d8f6fef6fd2",26:"9f6788921b154bb28665",27:"05b1f553520b490c6be4",28:"9899b74c2257c5425799",29:"e6574cd5ad31292b8181",30:"29fc655ef81ad3f4b9fe",31:"5b98389d3ccc9a0294b7",32:"d6f295c90effdc17795c",33:"b8088f86fd677aea9cdd",34:"b78ea9446b213201043b",35:"b9f00764b65c553a53f8",36:"6c49aba9959f62a4a729",37:"a3f757e35216656052bd"}[e]+".js";var o=setTimeout(d,12e4);function d(){t.onerror=t.onload=null,clearTimeout(o);var c=a[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),a[e]=void 0)}return t.onerror=t.onload=d,r.appendChild(t),f},n.m=e,n.c=f,n.d=function(e,c,f){n.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:f})},n.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(c,"a",c),c},n.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},n.p="./",n.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.ed90ceecf5a7b42e7e71.js.map
\ No newline at end of file
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(f,r,t){for(var o,d,b,i=0,u=[];i<f.length;i++)d=f[i],a[d]&&u.push(a[d][0]),a[d]=0;for(o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);for(c&&c(f,r,t);u.length;)u.shift()();if(t)for(i=0;i<t.length;i++)b=n(n.s=t[i]);return b};var f={},a={40:0};function n(c){if(f[c])return f[c].exports;var a=f[c]={i:c,l:!1,exports:{}};return e[c].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.e=function(e){var c=a[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var f=new Promise(function(f,n){c=a[e]=[f,n]});c[2]=f;var r=document.getElementsByTagName("head")[0],t=document.createElement("script");t.type="text/javascript",t.charset="utf-8",t.async=!0,t.timeout=12e4,n.nc&&t.setAttribute("nonce",n.nc),t.src=n.p+"static/js/"+e+"."+{0:"08fb0d5f0434f8bf1a3e",1:"7022ec098f28856d54d4",2:"06984e75209b3ac2131d",3:"2ad9744fc945a86b15c6",4:"6f32962990c4f47b6b8a",5:"299374ef57c52933e3fe",6:"757d0534ee41575596f2",7:"955b966d611ad2222aac",8:"b475bf47ec953d03b58c",9:"871513f8c9bc4e125cff",10:"780304d27afe459ee3f4",11:"a6800fdb0c0b1c69c00c",12:"668c99115fcb37fe30a1",13:"f33b586c30e59c45c7cc",14:"9d7866da23eae6beb141",15:"b2c8d912367a079fd91e",16:"c07857a2765d09cef9bb",17:"1a8636077b786a984423",18:"28ef221553603ed7ddcf",19:"0f382a583054f3167b3c",20:"6caf4733f6235b86c902",21:"1e46fdf5628c2ea199ac",22:"4dcc7f42a2940d2cfaaa",23:"9b9915c61ee9b5dc37ec",24:"2007b52ae4ed232d464a",25:"2757e7d76d8f6fef6fd2",26:"9f6788921b154bb28665",27:"05b1f553520b490c6be4",28:"9899b74c2257c5425799",29:"e6574cd5ad31292b8181",30:"29fc655ef81ad3f4b9fe",31:"5b98389d3ccc9a0294b7",32:"d6f295c90effdc17795c",33:"b8088f86fd677aea9cdd",34:"b78ea9446b213201043b",35:"b9f00764b65c553a53f8",36:"6c49aba9959f62a4a729",37:"a3f757e35216656052bd"}[e]+".js";var o=setTimeout(d,12e4);function d(){t.onerror=t.onload=null,clearTimeout(o);var c=a[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),a[e]=void 0)}return t.onerror=t.onload=d,r.appendChild(t),f},n.m=e,n.c=f,n.d=function(e,c,f){n.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:f})},n.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(c,"a",c),c},n.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},n.p="./",n.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.3fabd88fccd61ea18123.js.map
\ No newline at end of file
......@@ -15,7 +15,6 @@
<el-option v-for="item in applyObjOption" :key="item.value" :label="item.label" :value="item.value"> </el-option>
</el-select>
</el-form-item>
<el-form-item label="人群定向" v-if="ruleForm.useCrowd == 2" prop="" class="padding-0">
<el-button @click="showPeople">已设置{{ selectCount }}项筛选</el-button>
</el-form-item>
......@@ -85,7 +84,7 @@
</el-form-item>
<el-form-item>
<el-row>
<el-button type="primary" @click="submitForm('ruleForm')">保 存</el-button>
<el-button :disabled="tpnEditBool" type="primary" @click="submitForm('ruleForm')">保 存</el-button>
<el-button @click="goBack">返 回</el-button>
</el-row>
</el-form-item>
......@@ -262,7 +261,10 @@ export default {
goodsTreeOptionsWx: [],
valueWx: [],
goodsTreeOptionsLine: [],
valueLine: []
valueLine: [],
// 太平鸟标识
tpnEditBool: false,
tpnEnterpriseId: 'ff808081671d3ceb01672adebf4e6149'
};
},
created() {
......@@ -276,6 +278,7 @@ export default {
// 保存
submitForm(formName) {
let that = this;
if (!that.tpnEditBool) {
let data = JSON.parse(JSON.stringify(that.ruleForm));
this.$refs[formName].validate(valid => {
if (valid) {
......@@ -284,12 +287,10 @@ export default {
showMsg.showmsg('请填写策略名称', 'error');
return;
}
// if (!data.channelList[0].enterpriseRelationIdArr.length) {
// showMsg.showmsg('请填写选择商户','error')
// return;
// }
if (!data.channelList[0].enterpriseRelationIdArr.length) {
showMsg.showmsg('请选择商户', 'error');
return;
}
if (data.channelList[0].integralUseDiscountControl == 2) {
let flagA = Number(data.channelList[0].integralUseDiscountControlLower) >= Number(data.channelList[0].integralUseDiscountControlUpper);
......@@ -302,12 +303,6 @@ export default {
return;
}
}
// if (data.channelList[0].integralUseDiscountControl==2 &&(!data.channelList[0].integralUseDiscountControlLower||!data.channelList[0].integralUseDiscountControlUpper||Number(data.channelList[0].integralUseDiscountControlLower)>=Number(data.channelList[0].integralUseDiscountControlUpper))) {
// showMsg.showmsg('折扣率格式不正确','error')
// return;
// }
let flag = !data.integralUse.fee || String(data.integralUse.integral) == '';
if (data.integralUseStatus == 1 && flag) {
that.$message.error('请填写抵现规则');
......@@ -379,6 +374,7 @@ export default {
return false;
}
});
}
},
// 保存数据
......@@ -683,7 +679,7 @@ export default {
that.mechantOption = data;
// showMsg.showmsg('设置成功','success')
// 默认选择商户
that.ruleForm.channelList[0].enterpriseRelationIdArr = [data[0].enterpriseId];
// that.ruleForm.channelList[0].enterpriseRelationIdArr = [data[0].enterpriseId];
return;
}
errMsg.errorMsg(resData);
......@@ -691,6 +687,25 @@ export default {
.catch(function(error) {
log(error);
});
},
// 判断是否是太平鸟
getLoginInfo() {
let that = this;
let param = {};
postRequest('/api-auth/get-login-user-info', param)
.then(res => {
let resData = res.data;
if (resData.errorCode == 0) {
if (resData.result.enterpriseId == that.tpnEnterpriseId) {
that.tpnEditBool = true;
}
} else {
errMsg.errorMsg(resData);
}
})
.catch(function(error) {
log(error);
});
}
},
components: {
......@@ -703,6 +718,7 @@ export default {
this.getGoodsBrand();
// 获取商户
this.getCliqueInfo();
this.getLoginInfo();
}
};
</script>
......
......@@ -143,7 +143,7 @@
<el-form-item label="积分冻结期" v-if="ruleForm.integralGetStatus == 1"> <el-input v-model="ruleForm.integralGetFreezeDays" @keyup.native="formatInputNum($event)"></el-input><label></label> </el-form-item>
<el-form-item label="积分有效期" v-if="ruleForm.integralGetStatus == 1"> <el-input v-model="ruleForm.integralGetEffectiveDays" @keyup.native="formatInputNum($event)"></el-input><label></label> </el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm('ruleForm')">保 存</el-button>
<el-button :disabled="tpnEditBool" type="primary" @click="submitForm('ruleForm')">保 存</el-button>
<el-button @click="goBack">返 回</el-button>
</el-form-item>
</el-form>
......@@ -456,7 +456,10 @@ export default {
searchParams: '',
hasSearchData: '', // 当前页回显的数据(接口返回)
toggleTag: false,
selectCount: 0
selectCount: 0,
// 太平鸟标识
tpnEditBool: false,
tpnEnterpriseId: 'ff808081671d3ceb01672adebf4e6149'
};
},
......@@ -527,6 +530,7 @@ export default {
// 保存
submitForm(formName) {
let that = this;
if (!that.tpnEditBool) {
this.$refs[formName].validate(valid => {
if (valid) {
// 处理数据
......@@ -601,6 +605,7 @@ export default {
return false;
}
});
}
},
// 保存数据
......@@ -977,8 +982,27 @@ export default {
.catch(err => {
log(err);
});
}
},
/* end */
// 判断是否是太平鸟
getLoginInfo() {
let that = this;
let param = {};
postRequest('/api-auth/get-login-user-info', param)
.then(res => {
let resData = res.data;
if (resData.errorCode == 0) {
if (resData.result.enterpriseId == that.tpnEnterpriseId) {
that.tpnEditBool = true;
}
} else {
errMsg.errorMsg(resData);
}
})
.catch(function(error) {
log(error);
});
}
},
components: {
topNavNew,
......@@ -999,6 +1023,7 @@ export default {
// 获取门店分组
that.getStoreGroup();
that.getLoginInfo();
}
};
</script>
......
......@@ -95,7 +95,7 @@
</el-form-item>
<el-form-item>
<el-row>
<el-button :disabled="contactBool" type="primary" @click="submitForm('ruleForm')">保 存</el-button>
<el-button :disabled="tpnEditBool" type="primary" @click="submitForm('ruleForm')">保 存</el-button>
<el-button @click="goBack">返 回</el-button>
</el-row>
</el-form-item>
......@@ -126,14 +126,6 @@
</el-row>
</span>
</el-dialog>
<!-- 是否关联集团的提示 -->
<el-dialog title="提示" :visible.sync="contactDialog" width="500px">
<span>已关联集团,此页面只能查看不能编辑保存。</span>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="contactDialog = false">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
......@@ -153,9 +145,7 @@ export default {
name: 'addIntegralSytem',
data() {
return {
contactBool: false, // 是否关联集团的标识
contactDialog: false,
repProjectName: 'gic-web',
repProjectName: 'gic-clique',
navpath: [
{
name: '集团管理',
......@@ -284,7 +274,10 @@ export default {
goodsTreeOptionsWx: [],
valueWx: [],
goodsTreeOptionsLine: [],
valueLine: []
valueLine: [],
// 太平鸟标识
tpnEditBool: false,
tpnEnterpriseId: 'ff808081671d3ceb01672adebf4e6149'
};
},
created() {
......@@ -300,34 +293,9 @@ export default {
// 商品品牌
that.getGoodsBrand();
// 是否关联集团
that.getContact();
that.getLoginInfo();
},
methods: {
getContact() {
// 是否关联集团
let para = {};
getRequest('/api-auth/is-relevance-clique', para)
.then(res => {
let resData = res.data;
// log(resData);
if (resData.errorCode == 0) {
this.contactBool = resData.result;
this.contactDialog = resData.result;
} else {
errMsg.errorMsg(resData);
}
})
.catch(function(error) {
log(error);
this.$message.error({
duration: 1000,
message: error.message
});
});
},
// 返回
goBack() {
this.$router.go(-1);
......@@ -335,25 +303,22 @@ export default {
// 保存
submitForm(formName) {
let that = this;
if (!that.tpnEditBool) {
this.$refs[formName].validate(valid => {
if (valid) {
// log(that.ruleForm);
let data = JSON.parse(JSON.stringify(that.ruleForm));
// 非空验证
if (!data.strategyName) {
showMsg.showmsg('请填写策略名称', 'error');
return;
}
if (!data.channelList[0].enterpriseRelationIdArr.length) {
showMsg.showmsg('请填写选择商户', 'error');
showMsg.showmsg('请选择商户', 'error');
return;
}
if (data.channelList[0].integralUseDiscountControl == 2) {
let flagA = Number(data.channelList[0].integralUseDiscountControlLower) >= Number(data.channelList[0].integralUseDiscountControlUpper);
if (!data.channelList[0].integralUseDiscountControlLower || !data.channelList[0].integralUseDiscountControlUpper) {
that.$message.error('折扣控制中的折扣不能为空');
return;
......@@ -437,6 +402,7 @@ export default {
return false;
}
});
}
},
// 保存数据
......@@ -465,11 +431,6 @@ export default {
})
.catch(function(error) {
log(error);
// that.updateData()
that.$message.error({
duration: 1000,
message: error.message
});
});
},
......@@ -545,7 +506,7 @@ export default {
// 商户列表
let prise = res.data.result.enterpriseList;
prise.forEach(function(ele, index) {
ele.label = ele.enterpriseName;
ele.label = ele.brandName;
ele.value = ele.enterpriseId;
});
that.mechantOption = prise;
......@@ -854,6 +815,25 @@ export default {
}
});
}
},
// 判断是否是太平鸟
getLoginInfo() {
let that = this;
let param = {};
postRequest('/api-auth/get-login-user-info', param)
.then(res => {
let resData = res.data;
if (resData.errorCode == 0) {
if (resData.result.enterpriseId == that.tpnEnterpriseId) {
that.tpnEditBool = true;
}
} else {
errMsg.errorMsg(resData);
}
})
.catch(function(error) {
log(error);
});
}
},
components: {
......
......@@ -200,7 +200,7 @@
<el-form-item label="积分冻结期" v-if="ruleForm.integralGetStatus == 1"> <el-input v-model="ruleForm.integralGetFreezeDays" @keyup.native="formatInputNum($event)"></el-input><label></label> </el-form-item>
<el-form-item label="积分有效期" v-if="ruleForm.integralGetStatus == 1"> <el-input v-model="ruleForm.integralGetEffectiveDays" @keyup.native="formatInputNum($event)"></el-input><label></label> </el-form-item>
<el-form-item>
<el-button type="primary" @click.stop="submitForm('ruleForm')">保 存</el-button>
<el-button :disabled="tpnEditBool" type="primary" @click.stop="submitForm('ruleForm')">保 存</el-button>
<el-button @click="goBack">返 回</el-button>
</el-form-item>
</el-form>
......@@ -436,7 +436,10 @@ export default {
uuid: '', // 新增传空,编辑必传,
options: [0, 1, 2, 3, 4, 5], // 0 全部 1 门店类型 2门店标签 3 门店区域 4 门店分组 5 部分门店
isAdd: true,
scencs: 'integral'
scencs: 'integral',
// 太平鸟标识
tpnEditBool: false,
tpnEnterpriseId: 'ff808081671d3ceb01672adebf4e6149'
};
},
......@@ -520,6 +523,7 @@ export default {
// 保存
submitForm(formName) {
let that = this;
if (!that.tpnEditBool) {
this.$refs[formName].validate(valid => {
if (valid) {
// 处理数据
......@@ -592,6 +596,7 @@ export default {
return false;
}
});
}
},
// 保存数据
......@@ -1116,8 +1121,27 @@ export default {
.catch(err => {
log(err);
});
}
},
/* end */
// 判断是否是太平鸟
getLoginInfo() {
let that = this;
let param = {};
postRequest('/api-auth/get-login-user-info', param)
.then(res => {
let resData = res.data;
if (resData.errorCode == 0) {
if (resData.result.enterpriseId == that.tpnEnterpriseId) {
that.tpnEditBool = true;
}
} else {
errMsg.errorMsg(resData);
}
})
.catch(function(error) {
log(error);
});
}
},
components: {
topNavNew,
......@@ -1137,6 +1161,7 @@ export default {
// 获取门店分组
that.getStoreGroup();
that.getLoginInfo();
}
};
</script>
......
......@@ -19,7 +19,7 @@
<div class="flex-lable">设置除通用积分获取规则以外的特殊策略</div>
</div>
</div>
<div class="fr btn-r-wrap"><el-button type="primary" @click="handleAdd('point')">新增策略</el-button></div>
<div class="fr btn-r-wrap"><el-button :disabled="tpnEditBool" type="primary" @click="handleAdd('point')">新增策略</el-button></div>
<!-- table border-->
<div class="table-contain">
<el-table class="table-no-line-wrap" :data="achieveTableData" style="width: 100%">
......@@ -88,7 +88,7 @@
<div class="flex-lable">设置消费时使用积分抵现的规则(仅用于微信商城结算)</div>
</div>
</div>
<div class="fr btn-r-wrap"><el-button type="primary" @click="handleAdd('integ')">新增策略</el-button></div>
<div class="fr btn-r-wrap"><el-button :disabled="tpnEditBool" type="primary" @click="handleAdd('integ')">新增策略</el-button></div>
<!-- table -->
<div class="table-contain">
<el-table :data="exchangeTableData" style="width: 100%">
......@@ -170,11 +170,13 @@ export default {
// form
pointInfo: {},
bodyHtml: '', //富文本 tinymce 值
// table 获取
achieveTableData: [],
// table 抵现
exchangeTableData: []
exchangeTableData: [],
// 太平鸟标识
tpnEditBool: false,
tpnEnterpriseId: 'ff808081671d3ceb01672adebf4e6149'
};
},
created() {
......@@ -183,11 +185,13 @@ export default {
methods: {
// 新增
handleAdd(flag) {
if (!this.tpnEditBool) {
if (flag == 'point') {
this.$router.push('/addPointSystem');
} else {
this.$router.push('/addIntegralSytem');
}
}
},
// 删除
handleDelClick(index, row, ArrData) {
......@@ -291,6 +295,25 @@ export default {
integralStrategyId: row.integralStrategyId
}
});
},
// 判断是否是太平鸟
getLoginInfo() {
let that = this;
let param = {};
postRequest('/api-auth/get-login-user-info', param)
.then(res => {
let resData = res.data;
if (resData.errorCode == 0) {
if (resData.result.enterpriseId == that.tpnEnterpriseId) {
that.tpnEditBool = true;
}
} else {
errMsg.errorMsg(resData);
}
})
.catch(function(error) {
log(error);
});
}
},
components: {
......@@ -300,6 +323,7 @@ export default {
mounted() {
let that = this;
that.getPointInfo();
that.getLoginInfo();
}
};
</script>
......
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