Commit 0eba552d by chenxin

fix: ui

parent 4989a1fe
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
<script src="//web-1251519181.file.myqcloud.com/components/preview-img.1.0.3.js"></script><!-- 图片预览 --> <script src="//web-1251519181.file.myqcloud.com/components/preview-img.1.0.3.js"></script><!-- 图片预览 -->
<script src="//web-1251519181.file.myqcloud.com/components/delete.1.1.4.js"></script><!-- 删除轻弹窗 --> <script src="//web-1251519181.file.myqcloud.com/components/delete.1.1.4.js"></script><!-- 删除轻弹窗 -->
<script src="//web-1251519181.file.myqcloud.com/components/input-number.1.0.10.js"></script><!-- 输入框 --> <script src="//web-1251519181.file.myqcloud.com/components/input-number.1.0.10.js"></script><!-- 输入框 -->
<script src="//web-1251519181.file.myqcloud.com/components/welfare-selector.0.0.1.js"></script><!-- 福利选择器 -->
<script src="//web-1251519181.file.myqcloud.com/components/acc-group-select.1.0.5.js"></script><!-- 账号分组组件 --> <script src="//web-1251519181.file.myqcloud.com/components/acc-group-select.1.0.5.js"></script><!-- 账号分组组件 -->
<script src="//web-1251519181.file.myqcloud.com/components/editor.1.1.13.js"></script><!-- 富文本编辑器 --> <script src="//web-1251519181.file.myqcloud.com/components/editor.1.1.13.js"></script><!-- 富文本编辑器 -->
</body> </body>
......
...@@ -118,11 +118,6 @@ body .damo-goods-selector{ ...@@ -118,11 +118,6 @@ body .damo-goods-selector{
.el-input-number__decrease { .el-input-number__decrease {
bottom: 2px !important; bottom: 2px !important;
} }
.hide-right {
.el-input-number__decrease, .el-input-number__increase {
display: none;
}
}
// 仿表格 // 仿表格
......
...@@ -9,9 +9,6 @@ export default [ ...@@ -9,9 +9,6 @@ export default [
{ {
path: 'list', path: 'list',
component: () => import(/* webpackChunkName: "gic-card" */'@/views/card/gic-card/card-list.vue'), component: () => import(/* webpackChunkName: "gic-card" */'@/views/card/gic-card/card-list.vue'),
// meta: {
// keepAlive: true,
// }
}, },
// 领取记录 // 领取记录
{ {
......
...@@ -37,13 +37,14 @@ ...@@ -37,13 +37,14 @@
<el-tooltip content="若添加的卡券为固定有效期,仅允许添加和有效期限时间重合的卡券" placement="bottom" slot="label" open-delay="200"> <el-tooltip content="若添加的卡券为固定有效期,仅允许添加和有效期限时间重合的卡券" placement="bottom" slot="label" open-delay="200">
<span class="tooltip-icon">添加卡券</span> <span class="tooltip-icon">添加卡券</span>
</el-tooltip> </el-tooltip>
<div v-loading="cardLoading"> <!-- <div v-loading="cardLoading">
<div class="mb10"> <div class="mb10">
卡券id:<el-input v-model="couponForm.couponId" style="width:200px" class="mr10" /> 卡券id:<el-input v-model="couponForm.couponId" style="width:200px" class="mr10" />
库存值:<el-input v-model="couponForm.stock" style="width:100px" /> 库存值:<el-input v-model="couponForm.stock" style="width:100px" />
<el-button type="text" @click="addCard" class="ml5">保存</el-button> <el-button type="text" @click="addCard" class="ml5">保存</el-button>
</div> </div>
</div> </div> -->
<el-button class="dashed" @click="showSelector = true">添加卡券</el-button>
<div class="imitation-table" v-if="couponList.length" style="width:100%;" v-loading="cardLoading"> <div class="imitation-table" v-if="couponList.length" style="width:100%;" v-loading="cardLoading">
<el-row class="thead"> <el-row class="thead">
<el-col :span="5">卡券信息</el-col> <el-col :span="5">卡券信息</el-col>
...@@ -58,7 +59,7 @@ ...@@ -58,7 +59,7 @@
<el-row> <el-row>
<el-col :span="5"> <el-col :span="5">
<el-tag class="mr5">{{ cardType[item.cardType].label }}</el-tag> <el-tag class="mr5">{{ cardType[item.cardType].label }}</el-tag>
<router-link target="_blank" :to="{path:'/gic-card/info',query:{ id: item.couponId }}">{{ item.cardName }}</router-link> <router-link target="_blank" :to="{path:'/gic-card/info',query:{ id: item.couponId }}" :title="item.couponId">{{ item.cardName }}</router-link>
</el-col> </el-col>
<el-col :span="5"><span v-html="effectiveDateFormate(item)"></span></el-col> <el-col :span="5"><span v-html="effectiveDateFormate(item)"></span></el-col>
<el-col :span="4">{{ item.activityRemainedStock }}</el-col> <el-col :span="4">{{ item.activityRemainedStock }}</el-col>
...@@ -81,7 +82,7 @@ ...@@ -81,7 +82,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="hidden"> <div class="hidden">
<dm-card-select :before-submit="beforeSubmit" ref="cardSelect" read-only :member-card-id="currentAreaId" @selectData="(val) => { selectData(val, idx) }" :min-stock="ruleForm.packageStock" fix-member-card :unuse-list="couponList" /> <dm-welfare-selector v-if="showSelector" model="coupon" type="coupon" :params="params" :disable-ids="couponList.map(v => v.couponId)" />
</div> </div>
</div> </div>
</template> </template>
...@@ -160,6 +161,7 @@ export default { ...@@ -160,6 +161,7 @@ export default {
return now.getTime() < Date.now() - 24 * 60 * 60 * 1000; return now.getTime() < Date.now() - 24 * 60 * 60 * 1000;
} }
}, },
showSelector: false, // 是否展示福利选择器
isAdd: this.$route.meta.type === 'add', isAdd: this.$route.meta.type === 'add',
isEdit: this.$route.meta.type === 'edit', isEdit: this.$route.meta.type === 'edit',
isInfo: this.$route.meta.type === 'info', isInfo: this.$route.meta.type === 'info',
...@@ -321,6 +323,15 @@ export default { ...@@ -321,6 +323,15 @@ export default {
}, },
}, },
computed: { computed: {
params() {
const params = {
memberCardId: this.currentAreaId,
startCreateTime: formatDateTimeByType(this.dateTime[0], 'yyyy-MM-dd'),
endCreateTime: formatDateTimeByType(this.dateTime[1], 'yyyy-MM-dd'),
minRemainedStock: this.ruleForm.packageStock
};
return params;
},
/** /**
* 1.过期卡券包无法修改 * 1.过期卡券包无法修改
* 2.有效期未开始,全都可以改,除了开始时间不能早于当前时间 * 2.有效期未开始,全都可以改,除了开始时间不能早于当前时间
......
...@@ -16,13 +16,13 @@ ...@@ -16,13 +16,13 @@
<sort-btn class="mr10" :sort-type="sortType1" /> <sort-btn class="mr10" :sort-type="sortType1" />
<el-date-picker class="mr10" v-model="dateTime" type="daterange" range-separator="~" start-placeholder="开始日期" end-placeholder="结束日期" @change="refresh" /> <el-date-picker class="mr10" v-model="dateTime" type="daterange" range-separator="~" start-placeholder="开始日期" end-placeholder="结束日期" @change="refresh" />
<label class="ml5 mr8">成本</label> <label class="ml5 mr8">成本</label>
<el-input-number class="prefix-amount hide-right w100" @change="refresh" v-model="listParams.costPriceBegin" controls-position="right" :precision="2" :min="listParams.costPriceBegin" :max="10000" placeholder="请输入" /> <el-input-number class="prefix-amount w100" @change="refresh" v-model="listParams.costPriceBegin" controls-position="right" :precision="2" :min="listParams.costPriceBegin" :max="10000" placeholder="请输入" />
<label class="ml5 mr5">-</label> <label class="ml5 mr5">-</label>
<el-input-number class="prefix-amount hide-right w100" @change="refresh" v-model="listParams.costPriceEnd" controls-position="right" :precision="2" :min="1" :max="100000" placeholder="请输入" /> <el-input-number class="prefix-amount w100" @change="refresh" v-model="listParams.costPriceEnd" controls-position="right" :precision="2" :min="1" :max="100000" placeholder="请输入" />
<label class="ml15 mr8">可占用库存</label> <label class="ml15 mr8">可占用库存</label>
<el-input-number class="hide-right w100" @change="refresh" v-model="listParams.remainedStockBegin" controls-position="right" :precision="0" :min="1" :max="10000" placeholder="请输入" /> <el-input-number class="w100" @change="refresh" v-model="listParams.remainedStockBegin" controls-position="right" :precision="0" :min="1" :max="10000" placeholder="请输入" />
<label class="ml5 mr5">-</label> <label class="ml5 mr5">-</label>
<el-input-number class="hide-right w100 mrAuto" @change="refresh" v-model="listParams.remainedStockEnd" controls-position="right" :precision="0" :min="listParams.remainedStockBegin" :max="100000" placeholder="请输入" /> <el-input-number class="w100 mrAuto" @change="refresh" v-model="listParams.remainedStockEnd" controls-position="right" :precision="0" :min="listParams.remainedStockBegin" :max="100000" placeholder="请输入" />
<dm-perm-button type="danger" class="specter" v-show="active === 'list'" :disabled="!multipleSelection.length" @click="mutiDel">批量删除</dm-perm-button> <dm-perm-button type="danger" class="specter" v-show="active === 'list'" :disabled="!multipleSelection.length" @click="mutiDel">批量删除</dm-perm-button>
</div> </div>
<el-table tooltip-effect="dark" :data="tableList" style="width:100%"> <el-table tooltip-effect="dark" :data="tableList" style="width:100%">
......
...@@ -384,6 +384,7 @@ export default { ...@@ -384,6 +384,7 @@ export default {
}, },
mounted() { mounted() {
if (this.currentAreaId) { if (this.currentAreaId) {
this.ruleForm1.cardType = Number(this.$route.query.type) || 0;
this.getRelationId(); // 生成主键 this.getRelationId(); // 生成主键
this.getMallShopList(); this.getMallShopList();
// this.handleGetSubAppByInfo(); // this.handleGetSubAppByInfo();
......
<template> <template>
<div class="p20" v-loading="loading"> <div class="p20" v-loading="loading">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="150px" style="min-height:400px;"> <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="150px" style="min-height:400px;">
<el-form-item label="转赠扣库存" prop="transferReduceFlag"> <el-form-item label="转赠扣库存" prop="transferReduceFlag">
<el-switch :active-value="1" :inactive-value="0" v-model="ruleForm.transferReduceFlag"></el-switch> <el-switch :active-value="1" :inactive-value="0" v-model="ruleForm.transferReduceFlag"></el-switch>
<div class="gray03 fz12">开启表示赠送领取成功后,该卡券库存将会从福利中心的可占用库存扣除数量,若福利中心卡券可占用库存为 0,该卡券不可被赠送。</div> <div class="gray03 fz12">开启表示赠送领取成功后,该卡券库存将会从福利中心的可占用库存扣除数量,若福利中心卡券可占用库存为 0,该卡券不可被赠送。</div>
</el-form-item> </el-form-item>
...@@ -34,7 +34,7 @@ export default { ...@@ -34,7 +34,7 @@ export default {
}; };
}, },
created() { created() {
this.$emit('updateBread', [ { breadName: '通用设置' } ]); this.$emit('updateBread', [ { breadName: '福利中心' }, { breadName: '通用设置' } ]);
}, },
mounted() { mounted() {
this.getDetail(); this.getDetail();
...@@ -59,7 +59,6 @@ export default { ...@@ -59,7 +59,6 @@ export default {
// 获取配置详情 // 获取配置详情
getDetail() { getDetail() {
checkCustomSetting().then(res => { checkCustomSetting().then(res => {
console.log(res);
this.ruleForm = { ...this.ruleForm, ...res.result }; this.ruleForm = { ...this.ruleForm, ...res.result };
}); });
} }
......
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