Commit a12fb374 by chenxin

fix: 卡券新建

parent c22d7395
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.
...@@ -19,11 +19,11 @@ let o2 = { ...@@ -19,11 +19,11 @@ let o2 = {
method: 'post', method: 'post',
useFormData: true, useFormData: true,
}, },
getRelationId: '/gift/get-gift-id', // 随机返回一个ID
}; };
// other // other
let other = { let other = {
getRelationId: '/notice-widget/generate-relation-id', // 获取relation临时id
getAppInfo: { getAppInfo: {
url: '/enterprise-serve-info', // 根据appCode获取应用信息 url: '/enterprise-serve-info', // 根据appCode获取应用信息
alertError: false, alertError: false,
......
...@@ -29,7 +29,6 @@ import { SUCCESS_CODE, origin } from '@/config'; ...@@ -29,7 +29,6 @@ import { SUCCESS_CODE, origin } from '@/config';
* @param {*} code ui目前只处理如下code * @param {*} code ui目前只处理如下code
*/ */
function handlerErr(code) { function handlerErr(code) {
return;
if (process.env['NODE_ENV'] === 'development') { // eslint-disable-line if (process.env['NODE_ENV'] === 'development') { // eslint-disable-line
return; return;
} }
......
...@@ -8,7 +8,7 @@ import resultDialog from './module/result-dialog'; ...@@ -8,7 +8,7 @@ import resultDialog from './module/result-dialog';
import sendPreview from './module/send-preview'; import sendPreview from './module/send-preview';
import importCode from './module/import-code'; import importCode from './module/import-code';
import commomApi from '@/api/common.js'; import commomApi from '@/api/common.js';
const { uploadUrl } = commomApi; const { uploadUrl, getRelationId } = commomApi;
const { addCard, copyCard, checkDemoCode, getMallShopList } = api; const { addCard, copyCard, checkDemoCode, getMallShopList } = api;
// 禁止回车 // 禁止回车
...@@ -384,6 +384,7 @@ export default { ...@@ -384,6 +384,7 @@ export default {
}, },
mounted() { mounted() {
if (this.currentAreaId) { if (this.currentAreaId) {
this.getRelationId(); // 生成主键
this.getMallShopList(); this.getMallShopList();
// this.handleGetSubAppByInfo(); // this.handleGetSubAppByInfo();
if (this.isCopy) { if (this.isCopy) {
...@@ -392,6 +393,11 @@ export default { ...@@ -392,6 +393,11 @@ export default {
} }
}, },
methods: { methods: {
getRelationId() {
getRelationId().then(res => {
this.couponId = res.result;
});
},
getMallShopList() { getMallShopList() {
getMallShopList().then(res => { getMallShopList().then(res => {
this.gicMallShopList = res.result || []; this.gicMallShopList = res.result || [];
...@@ -708,6 +714,7 @@ export default { ...@@ -708,6 +714,7 @@ export default {
} }
let params = { ...this.ruleForm1, ...this.ruleForm2, ...this.ruleForm3, goodsSearchId: this.goodsSearchId }; let params = { ...this.ruleForm1, ...this.ruleForm2, ...this.ruleForm3, goodsSearchId: this.goodsSearchId };
try { try {
params.couponId = this.couponId; // 主键在一进来页面的时候就已经确定
params.memberCardId = this.currentAreaId; params.memberCardId = this.currentAreaId;
// 处理数据 // 处理数据
params.getLimit = params.cardLimitRadio === 0 ? params.getLimit : params.cardLimitRadio; params.getLimit = params.cardLimitRadio === 0 ? params.getLimit : params.cardLimitRadio;
......
...@@ -84,8 +84,7 @@ ...@@ -84,8 +84,7 @@
</el-tooltip> </el-tooltip>
</el-radio> </el-radio>
<el-radio v-model="ruleForm1.customCodeFlag" :label="1">自定义号段</el-radio> <el-radio v-model="ruleForm1.customCodeFlag" :label="1">自定义号段</el-radio>
<!-- 20210203 后端 暂时隐藏 TODO: --> <el-radio v-model="ruleForm1.customCodeFlag" :label="2" @change="(v) => { if(v == 2) { importVisible = true } }">
<!-- <el-radio v-model="ruleForm1.customCodeFlag" :label="2" @change="(v) => { if(v == 2) { importVisible = true } }">
<span @click="ruleForm1.customCodeFlag = 2;importVisible = true">导入券码</span> <span @click="ruleForm1.customCodeFlag = 2;importVisible = true">导入券码</span>
<span class="gray03 cursor" v-if="fileList.length > 0"> <span class="gray03 cursor" v-if="fileList.length > 0">
<el-popover placement="top-start" title="已上传列表" width="250" trigger="hover"> <el-popover placement="top-start" title="已上传列表" width="250" trigger="hover">
...@@ -93,7 +92,7 @@ ...@@ -93,7 +92,7 @@
<i slot="reference" class="el-icon-document ml5"></i> <i slot="reference" class="el-icon-document ml5"></i>
</el-popover> </el-popover>
</span> </span>
</el-radio> --> </el-radio>
</el-form-item> </el-form-item>
<el-form-item prop="customCode" label="code号段" key="customCode" v-if="ruleForm1.customCodeFlag === 1"> <el-form-item prop="customCode" label="code号段" key="customCode" v-if="ruleForm1.customCodeFlag === 1">
<!-- @blur="checkInputNumber(ruleForm1.codeBegin, 'codeBegin')" --> <!-- @blur="checkInputNumber(ruleForm1.codeBegin, 'codeBegin')" -->
......
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