Commit 4fe21850 by liuchenxi

update: 11月迭代积分商城内容

parent 3e958ffc
...@@ -11458,6 +11458,11 @@ ...@@ -11458,6 +11458,11 @@
"is-plain-obj": "^1.0.0" "is-plain-obj": "^1.0.0"
} }
}, },
"sortablejs": {
"version": "1.10.2",
"resolved": "https://registry.nlark.com/sortablejs/download/sortablejs-1.10.2.tgz",
"integrity": "sha1-bkA2TZE/mLhaFPZnj5K1wSIfUpA="
},
"source-list-map": { "source-list-map": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "http://registry.npm.taobao.org/source-list-map/download/source-list-map-2.0.0.tgz", "resolved": "http://registry.npm.taobao.org/source-list-map/download/source-list-map-2.0.0.tgz",
...@@ -12543,6 +12548,14 @@ ...@@ -12543,6 +12548,14 @@
"integrity": "sha1-3EJpcTMwLOMBdSQ1amxht7abShg=", "integrity": "sha1-3EJpcTMwLOMBdSQ1amxht7abShg=",
"dev": true "dev": true
}, },
"vuedraggable": {
"version": "2.24.3",
"resolved": "https://registry.nlark.com/vuedraggable/download/vuedraggable-2.24.3.tgz?cache=0&sync_timestamp=1629673509313&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fvuedraggable%2Fdownload%2Fvuedraggable-2.24.3.tgz",
"integrity": "sha1-Q8k4SbdGokzlA+Ej1bJZxwG6DRk=",
"requires": {
"sortablejs": "1.10.2"
}
},
"vuex": { "vuex": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "http://registry.npm.taobao.org/vuex/download/vuex-3.0.1.tgz", "resolved": "http://registry.npm.taobao.org/vuex/download/vuex-3.0.1.tgz",
......
...@@ -18,12 +18,13 @@ ...@@ -18,12 +18,13 @@
<div class="operate-top"> <div class="operate-top">
<div class="fl"> <div class="fl">
<div class="search-item m-r-10"> <div class="search-item m-r-10">
<el-input v-model.trim="searchValue" placeholder="请输入优惠券名称进行搜索" prefix-icon="el-icon-search" clearable class="w-280" @keyup.enter.native="getSearchList" @clear="getSearchList"></el-input> <el-input v-model.trim="searchValue" placeholder="请输入优惠券名称/创建人进行搜索" prefix-icon="el-icon-search" clearable class="w-300" @keyup.enter.native="getSearchList" @clear="getSearchList"></el-input>
</div> </div>
<div class="search-item m-r-10"> <div class="search-item m-r-10">
<el-select v-model="shelf" placeholder="上下架状态" clearable class="w-140" @change="getListCurr"> <el-select v-model="shelf" placeholder="上下架状态" clearable class="w-140" @change="getListCurr">
<el-option label="已上架" :value="2"></el-option> <el-option label="已上架" :value="2"></el-option>
<el-option label="已下架" :value="1"></el-option> <el-option label="已下架" :value="1"></el-option>
<el-option label="待上架" :value="3"></el-option>
</el-select> </el-select>
</div> </div>
<div class="search-item m-r-10"> <div class="search-item m-r-10">
...@@ -137,6 +138,9 @@ ...@@ -137,6 +138,9 @@
<span style="display:none">{{ refash }}</span> <span style="display:none">{{ refash }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed="right" prop="shelf " label="状态" min-width="110px">
<template slot-scope="scope">{{ scope.row.shelf ? (scope.row.shelf == 1 ? '已下架' : scope.row.shelf == 2 ? '已上架' : '待上架') : '--' }}</template>
</el-table-column>
<el-table-column fixed="right" label="操作" min-width="180px"> <el-table-column fixed="right" label="操作" min-width="180px">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
...@@ -675,8 +679,8 @@ export default { ...@@ -675,8 +679,8 @@ export default {
.m-r-10 { .m-r-10 {
margin-right: 10px; margin-right: 10px;
} }
.w-280 { .w-300 {
width: 280px; width: 300px;
} }
.w-140 { .w-140 {
width: 140px; width: 140px;
......
...@@ -167,8 +167,45 @@ ...@@ -167,8 +167,45 @@
</el-form-item> </el-form-item>
</div> </div>
<div class="section-content"> <div class="section-content">
<h3>兑换设置</h3> <h3>可见配置<span class="sub_title">该配置决定客户是否可见</span></h3>
<span style="display:none">{{ refash }}</span> <el-form-item label="上架时间" required>
<template>
<el-radio v-model="couponForm.releaseType" :label="1">立即上架</el-radio>
<el-radio v-model="couponForm.releaseType" :label="2">自定义上架时间段</el-radio>
</template>
</el-form-item>
<!-- 定时上架 -->
<el-form-item class="form-item-mt" v-if="couponForm.releaseType === 2" prop="limitTimeBegin">
<el-date-picker v-model="couponForm.limitTimeBegin" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions"></el-date-picker>
</el-form-item>
<el-form-item label="显示状态" required>
<el-radio-group v-model="couponForm.proShowStatus">
<el-radio :label="1">上架状态就显示</el-radio>
<el-radio :label="2">兑换状态下显示</el-radio>
</el-radio-group>
<div v-if="couponForm.proShowStatus == 1" style="margin-left:20px;">
<el-checkbox v-model="couponForm.isNewGuestVisible" :true-label="1" :false-label="0">非会员可见</el-checkbox>
<span class="tips">开启非会员可见,则未开卡客户可见该礼品</span>
</div>
</el-form-item>
<el-form-item label="展现门店" required style="position:relative" v-if="useNewStoreWidget === 0">
<el-tooltip class="tips-content" popper-class="store-tips" effect="dark" placement="top-start">
<div slot="content" style="line-height:18px">会员的门店(常规设置)满足展示门店设置,则在礼品/优惠券列表可见</div>
<i class="iconfont icon-xinxixianshi" style="color:#1890ff"></i>
</el-tooltip>
<vue-gic-store-linkage style="margin-left:10px" v-if="(mallProId && creatorId) || mallProId == -1" :creatorId="creatorId" :disabled="isInfo" @getDisGroupList="getDisGroupList" :msg="sendChildData" :openFlag="openFlag" ref="selectTree" @sendSelectGroupData="getSelectGroupData"></vue-gic-store-linkage>
<span v-if="sendChildData.storeType === 1" class="store-tip">若选中的父分组下有新增的门店分组,系统不会默认选中此新增门店分组,请重新确认选择并保存礼品</span>
</el-form-item>
<el-form-item label="展现门店" v-if="useNewStoreWidget === 1" class="store-card">
<el-tooltip class="tips-content" popper-class="store-tips" effect="dark" placement="top-start">
<div slot="content" style="line-height:18px">会员的门店(常规设置)满足展示门店设置,则在礼品/优惠券列表可见</div>
<i class="iconfont icon-xinxixianshi" style="color:#1890ff"></i>
</el-tooltip>
<vue-gic-store-card style="margin-left:10px" class="pt10" ref="storeCard" :uuid.sync="uuid" scenes="" />
</el-form-item>
</div>
<div class="section-content">
<h3>可兑换配置<span class="sub_title">该配置决定客户是否可以兑换</span></h3>
<el-form-item label="适用会员" prop="gradeType" v-if="cliqueStatus"> <el-form-item label="适用会员" prop="gradeType" v-if="cliqueStatus">
<el-radio-group v-model="couponForm.gradeType" @change="handleChange"> <el-radio-group v-model="couponForm.gradeType" @change="handleChange">
<el-radio :label="1">品牌卡</el-radio> <el-radio :label="1">品牌卡</el-radio>
...@@ -219,22 +256,6 @@ ...@@ -219,22 +256,6 @@
<vue-gic-store-linkage :disabled="isInfo" :msg="sendChildData" @getDisGroupList="getDisGroupList" :openFlag="openFlag" ref="selectTree" @sendSelectGroupData="getSelectGroupData"></vue-gic-store-linkage> <vue-gic-store-linkage :disabled="isInfo" :msg="sendChildData" @getDisGroupList="getDisGroupList" :openFlag="openFlag" ref="selectTree" @sendSelectGroupData="getSelectGroupData"></vue-gic-store-linkage>
<span v-if="sendChildData.storeType === 1" class="store-tip">若选中的门店分组下有新增的门店,系统不会默认选中此新增门店,请重新确认选择并保存礼品</span> <span v-if="sendChildData.storeType === 1" class="store-tip">若选中的门店分组下有新增的门店,系统不会默认选中此新增门店,请重新确认选择并保存礼品</span>
</el-form-item> --> </el-form-item> -->
<span style="display:none">{{ refash }}</span>
<el-form-item label="展现门店" required style="position:relative" v-if="useNewStoreWidget === 0">
<el-tooltip class="tips-content" popper-class="store-tips" effect="dark" placement="top-start">
<div slot="content" style="line-height:18px">会员的门店(常规设置)满足展示门店设置,则在礼品/优惠券列表可见</div>
<i class="iconfont icon-xinxixianshi" style="color:#1890ff"></i>
</el-tooltip>
<vue-gic-store-linkage style="margin-left:10px" v-if="(mallProId && creatorId) || mallProId == -1" :creatorId="creatorId" :disabled="isInfo" @getDisGroupList="getDisGroupList" :msg="sendChildData" :openFlag="openFlag" ref="selectTree" @sendSelectGroupData="getSelectGroupData"></vue-gic-store-linkage>
<span v-if="sendChildData.storeType === 1" class="store-tip">若选中的父分组下有新增的门店分组,系统不会默认选中此新增门店分组,请重新确认选择并保存礼品</span>
</el-form-item>
<el-form-item label="展现门店" v-if="useNewStoreWidget === 1" class="store-card">
<el-tooltip class="tips-content" popper-class="store-tips" effect="dark" placement="top-start">
<div slot="content" style="line-height:18px">会员的门店(常规设置)满足展示门店设置,则在礼品/优惠券列表可见</div>
<i class="iconfont icon-xinxixianshi" style="color:#1890ff"></i>
</el-tooltip>
<vue-gic-store-card style="margin-left:10px" class="pt10" ref="storeCard" :uuid.sync="uuid" scenes="" />
</el-form-item>
<el-form-item label="限兑"> <el-form-item label="限兑">
<el-checkbox v-model="couponForm.limitTimesStatus" @change="refashData()">每个会员限制兑换</el-checkbox> <el-checkbox v-model="couponForm.limitTimesStatus" @change="refashData()">每个会员限制兑换</el-checkbox>
<span v-if="couponForm.limitTimesStatus"><el-input-number controls-position="right" v-model="couponForm.limitTimes" :precision="0" :min="0" @change="limitTimeChange"></el-input-number></span> <span v-if="couponForm.limitTimesStatus"><el-input-number controls-position="right" v-model="couponForm.limitTimes" :precision="0" :min="0" @change="limitTimeChange"></el-input-number></span>
...@@ -284,26 +305,6 @@ ...@@ -284,26 +305,6 @@
<p style="font-size:12px;color:#909399;line-height:12px;margin-left:130px;">请使用24小时制输入时间,格式如11:00至14:30</p> <p style="font-size:12px;color:#909399;line-height:12px;margin-left:130px;">请使用24小时制输入时间,格式如11:00至14:30</p>
<p><el-button type="text" style="margin:8px 0 10px 130px" @click="addTimeRange">添加时间段</el-button></p> <p><el-button type="text" style="margin:8px 0 10px 130px" @click="addTimeRange">添加时间段</el-button></p>
</div> </div>
<el-form-item label="显示设置" required>
<el-radio-group v-model="couponForm.proShowStatus">
<el-radio :label="1">上架状态就显示</el-radio>
<el-radio :label="2">兑换状态下显示</el-radio>
</el-radio-group>
<div v-if="couponForm.proShowStatus == 1" style="margin-left:20px;">
<el-checkbox v-model="couponForm.isNewGuestVisible" :true-label="1" :false-label="0">新客可见</el-checkbox>
<span class="tips">开启新客可见,则无门店所属的游客满足会员等级均可见</span>
</div>
</el-form-item>
<el-form-item label="上架时间" required>
<template>
<el-radio v-model="couponForm.releaseType" :label="1">立即上架</el-radio>
<el-radio v-model="couponForm.releaseType" :label="2">定时上架</el-radio>
</template>
</el-form-item>
<!-- 定时上架 -->
<el-form-item class="form-item-mt" v-if="couponForm.releaseType === 2" prop="limitTimeBegin">
<el-date-picker v-model="couponForm.limitTimeBegin" type="datetime" placeholder="选择日期时间"> </el-date-picker>
</el-form-item>
</div> </div>
<div class="confim-btn" :style="{ width: fixedWidth + 'px' }"> <div class="confim-btn" :style="{ width: fixedWidth + 'px' }">
<el-form-item class="fix-btn"> <el-form-item class="fix-btn">
...@@ -403,7 +404,7 @@ export default { ...@@ -403,7 +404,7 @@ export default {
exchangeDateDayArr: [], exchangeDateDayArr: [],
exchangeDateWeekArr: [], exchangeDateWeekArr: [],
timeRangeList: [{ timeRange: '' }], //部分时段数组 timeRangeList: [{ timeRange: '' }], //部分时段数组
limitTimeBegin: '', limitTimeBegin: [],
timeZones: ['', ''], timeZones: ['', ''],
isNewGuestVisible: 0, // 0:新客不可见、1:新客可见 isNewGuestVisible: 0, // 0:新客不可见、1:新客可见
dataDialogueId: '', // 数据对话id dataDialogueId: '', // 数据对话id
...@@ -474,7 +475,12 @@ export default { ...@@ -474,7 +475,12 @@ export default {
isEdit: false, isEdit: false,
isCorrect: true, // 校验阶梯价的验证是否可以保存阶梯价 isCorrect: true, // 校验阶梯价的验证是否可以保存阶梯价
enterpriseId: '', // 商户id enterpriseId: '', // 商户id
specialOrder: false // 是否定制 specialOrder: false, // 是否定制
pickerOptions: {
disabledDate(time) {
return time.getTime() < Date.now() - 24 * 3600 * 1000;
}
}
}; };
}, },
mounted() { mounted() {
...@@ -850,9 +856,10 @@ export default { ...@@ -850,9 +856,10 @@ export default {
//上架时间 //上架时间
this.couponForm.releaseType = res.data.result.releaseType; this.couponForm.releaseType = res.data.result.releaseType;
if (this.couponForm.releaseType === 2) { if (this.couponForm.releaseType === 2) {
this.couponForm.limitTimeBegin = res.data.result.limitTimeBegin; this.couponForm.limitTimeBegin[0] = res.data.result.limitTimeBegin;
this.couponForm.limitTimeBegin[1] = res.data.result.limitTimeEnd;
} else { } else {
this.couponForm.limitTimeBegin = ''; this.couponForm.limitTimeBegin = [];
} }
// 数据对话id // 数据对话id
this.couponForm.dataDialogueId = res.data.result.dataDialogueId; this.couponForm.dataDialogueId = res.data.result.dataDialogueId;
...@@ -1137,6 +1144,13 @@ export default { ...@@ -1137,6 +1144,13 @@ export default {
arr[index1] = arr.splice(index2, 1, arr[index1])[0]; arr[index1] = arr.splice(index2, 1, arr[index1])[0];
return arr; return arr;
}, },
// 校验datePricker
vaidataDataPicker() {
const endTime = this.couponForm.limitTimeBegin[1];
const startTime = this.couponForm.limitTimeBegin[0];
const currentTime = new Date().getTime();
return endTime > currentTime && endTime > startTime;
},
// 提交数据 // 提交数据
async submitForm(couponForm) { async submitForm(couponForm) {
this.couponForm.detailDescription = this.$refs.tinymceWrap.tinymceHtml; this.couponForm.detailDescription = this.$refs.tinymceWrap.tinymceHtml;
...@@ -1234,11 +1248,14 @@ export default { ...@@ -1234,11 +1248,14 @@ export default {
exchangeTimeType: this.couponForm.exchangeTimeType, //兑换时段 exchangeTimeType: this.couponForm.exchangeTimeType, //兑换时段
proShowStatus: this.couponForm.proShowStatus, //显示状态 proShowStatus: this.couponForm.proShowStatus, //显示状态
releaseType: this.couponForm.releaseType, //上架状态 releaseType: this.couponForm.releaseType, //上架状态
limitTimeBegin: this.couponForm.releaseType === 2 ? this.getTimeAll(this.couponForm.limitTimeBegin) : '', //定时上架时间 limitTimeBegin: this.couponForm.releaseType === 2 ? this.getTimeAll(this.couponForm.limitTimeBegin[0]) : '', //定时上架开始时间
limitTimeEnd: this.couponForm.releaseType === 2 ? this.getTimeAll(this.couponForm.limitTimeBegin[1]) : '', //定时上架结束时间
isNewGuestVisible: this.couponForm.proShowStatus == 1 ? this.couponForm.isNewGuestVisible : 0, // 新客是否可见 0:新客不可见、1:新客可见' isNewGuestVisible: this.couponForm.proShowStatus == 1 ? this.couponForm.isNewGuestVisible : 0, // 新客是否可见 0:新客不可见、1:新客可见'
isDifferentialPricing: this.isDifferentialPricing, isDifferentialPricing: this.isDifferentialPricing,
differentialPricingJson: JSON.stringify(this.submitLadderList) differentialPricingJson: JSON.stringify(this.submitLadderList)
}; };
// 校验定时上架时间
if (!this.vaidataDataPicker()) return this.$message.error('定时上架结束时间必须大于当前时间和开始时间');
// 门店分类 // 门店分类
if (this.useNewStoreWidget === 0) { if (this.useNewStoreWidget === 0) {
if (this.sendChildData.storeType === 1) { if (this.sendChildData.storeType === 1) {
......
...@@ -21,12 +21,13 @@ ...@@ -21,12 +21,13 @@
<div class="search-wrap" style="display: flex;justify-content: space-between;margin-bottom: 20px;"> <div class="search-wrap" style="display: flex;justify-content: space-between;margin-bottom: 20px;">
<div class="left" style="display: flex;gap:10px;flex-wrap: wrap;"> <div class="left" style="display: flex;gap:10px;flex-wrap: wrap;">
<div class="search-content-item" style="height:32px;"> <div class="search-content-item" style="height:32px;">
<el-input v-model="searchValue" placeholder="请输入礼品名称/编码进行搜索" prefix-icon="el-icon-search" clearable class="w-280" @keyup.enter.native="getSearchList" @clear="getSearchList"></el-input> <el-input v-model="searchValue" placeholder="请输入礼品名称/编码/创建人进行搜索" prefix-icon="el-icon-search" clearable class="w-300" @keyup.enter.native="getSearchList" @clear="getSearchList"></el-input>
</div> </div>
<div class="search-content-item" style="height:32px;"> <div class="search-content-item" style="height:32px;">
<el-select v-model="shelf" placeholder="上下架状态" clearable class="w-140" @change="getListCurr"> <el-select v-model="shelf" placeholder="上下架状态" clearable class="w-140" @change="getListCurr">
<el-option label="已上架" :value="2"></el-option> <el-option label="已上架" :value="2"></el-option>
<el-option label="已下架" :value="1"></el-option> <el-option label="已下架" :value="1"></el-option>
<el-option label="待上架" :value="3"></el-option>
</el-select> </el-select>
</div> </div>
<div class="search-content-item" style="height:32px;"> <div class="search-content-item" style="height:32px;">
...@@ -147,6 +148,9 @@ ...@@ -147,6 +148,9 @@
<span style="display:none">{{ refash }}</span> <span style="display:none">{{ refash }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed="right" prop="shelf " label="状态" min-width="110px">
<template slot-scope="scope">{{ scope.row.shelf ? (scope.row.shelf == 1 ? '已下架' : scope.row.shelf == 2 ? '已上架' : '待上架') : '--' }}</template>
</el-table-column>
<el-table-column fixed="right" label="操作" min-width="220px"> <el-table-column fixed="right" label="操作" min-width="220px">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
...@@ -834,8 +838,8 @@ export default { ...@@ -834,8 +838,8 @@ export default {
margin: 24px; margin: 24px;
padding: 24px; padding: 24px;
} }
.w-280 { .w-300 {
width: 280px; width: 300px;
} }
.w-140 { .w-140 {
width: 140px; width: 140px;
......
...@@ -57,7 +57,6 @@ ...@@ -57,7 +57,6 @@
</el-option> </el-option>
</el-select> </el-select>
<el-button type="text" @click="createCategory">新建分类</el-button> <el-button type="text" @click="createCategory">新建分类</el-button>
<span style="display:none">{{ refash }}</span>
</el-form-item> </el-form-item>
<el-form-item label="数据对话"> <el-form-item label="数据对话">
<dm-activity-select :repProjectName="projectName" width="300" :actId.sync="giftForm.dataDialogueId" :showAdd="false"></dm-activity-select> <dm-activity-select :repProjectName="projectName" width="300" :actId.sync="giftForm.dataDialogueId" :showAdd="false"></dm-activity-select>
...@@ -125,7 +124,45 @@ ...@@ -125,7 +124,45 @@
</el-form-item> </el-form-item>
</div> </div>
<div class="section-content"> <div class="section-content">
<h3>兑换设置</h3> <h3>可见配置<span class="sub_title">该配置决定客户是否可见</span></h3>
<el-form-item label="上架时间" prop="releaseType">
<el-radio-group v-model="giftForm.releaseType">
<el-radio :label="1">立即上架</el-radio>
<el-radio :label="2">自定义上架时间段</el-radio>
</el-radio-group>
</el-form-item>
<!-- 定时上架 -->
<el-form-item class="form-item-mt" v-if="giftForm.releaseType === 2" prop="limitTimeBegin">
<el-date-picker v-model="giftForm.limitTimeBegin" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions"></el-date-picker>
</el-form-item>
<el-form-item label="显示状态" prop="proShowStatus">
<el-radio-group v-model="giftForm.proShowStatus">
<el-radio :label="1">上架状态就显示</el-radio>
<el-radio :label="2">兑换状态下显示</el-radio>
</el-radio-group>
<div v-if="giftForm.proShowStatus == 1" style="margin-left:20px;">
<el-checkbox v-model="giftForm.isNewGuestVisible" :true-label="1" :false-label="0">非会员可见</el-checkbox>
<span class="tips">开启非会员可见,则未开卡客户可见该礼品</span>
</div>
</el-form-item>
<el-form-item label="展现门店" required style="position:relative" v-if="useNewStoreWidget === 0">
<el-tooltip class="tips-content" effect="dark" popper-class="store-tips" placement="top-start">
<div slot="content" style="line-height:18px">会员的门店(常规设置)满足展示门店设置,则在礼品/优惠券列表可见</div>
<i class="iconfont icon-xinxixianshi" style="color:#1890ff"></i>
</el-tooltip>
<vue-gic-store-linkage style="margin-left:10px" v-if="(giftId && creatorId) || giftId == -1" :creatorId="creatorId" :disabled="isInfo" @getDisGroupList="getDisGroupList" :msg="sendChildData" :openFlag="openFlag" ref="selectTree" @sendSelectGroupData="getSelectGroupData"></vue-gic-store-linkage>
<span v-if="sendChildData.storeType === 1" class="store-tip">若选中的父分组下有新增的门店分组,系统不会默认选中此新增门店分组,请重新确认选择并保存礼品</span>
</el-form-item>
<el-form-item label="展现门店" v-if="useNewStoreWidget === 1" class="store-card">
<el-tooltip class="tips-content" effect="dark" popper-class="store-tips" placement="top-start">
<div slot="content" style="line-height:18px">会员的门店(常规设置)满足展示门店设置,则在礼品/优惠券列表可见</div>
<i class="iconfont icon-xinxixianshi" style="color:#1890ff"></i>
</el-tooltip>
<vue-gic-store-card style="margin-left:10px" class="pt10" ref="storeCard" :uuid.sync="uuid" scenes />
</el-form-item>
</div>
<div class="section-content">
<h3>可兑换配置<span class="sub_title">该配置决定客户是否可以兑换</span></h3>
<el-form-item label="适用会员" prop="gradeType" v-if="cliqueStatus"> <el-form-item label="适用会员" prop="gradeType" v-if="cliqueStatus">
<el-radio-group v-model="giftForm.gradeType" @change="handleChange"> <el-radio-group v-model="giftForm.gradeType" @change="handleChange">
<el-radio :label="1">品牌卡</el-radio> <el-radio :label="1">品牌卡</el-radio>
...@@ -194,22 +231,6 @@ ...@@ -194,22 +231,6 @@
</div> </div>
</div> </div>
</el-form-item>--> </el-form-item>-->
<span style="display:none">{{ refash }}</span>
<el-form-item label="展现门店" required style="position:relative" v-if="useNewStoreWidget === 0">
<el-tooltip class="tips-content" effect="dark" popper-class="store-tips" placement="top-start">
<div slot="content" style="line-height:18px">会员的门店(常规设置)满足展示门店设置,则在礼品/优惠券列表可见</div>
<i class="iconfont icon-xinxixianshi" style="color:#1890ff"></i>
</el-tooltip>
<vue-gic-store-linkage style="margin-left:10px" v-if="(giftId && creatorId) || giftId == -1" :creatorId="creatorId" :disabled="isInfo" @getDisGroupList="getDisGroupList" :msg="sendChildData" :openFlag="openFlag" ref="selectTree" @sendSelectGroupData="getSelectGroupData"></vue-gic-store-linkage>
<span v-if="sendChildData.storeType === 1" class="store-tip">若选中的父分组下有新增的门店分组,系统不会默认选中此新增门店分组,请重新确认选择并保存礼品</span>
</el-form-item>
<el-form-item label="展现门店" v-if="useNewStoreWidget === 1" class="store-card">
<el-tooltip class="tips-content" effect="dark" popper-class="store-tips" placement="top-start">
<div slot="content" style="line-height:18px">会员的门店(常规设置)满足展示门店设置,则在礼品/优惠券列表可见</div>
<i class="iconfont icon-xinxixianshi" style="color:#1890ff"></i>
</el-tooltip>
<vue-gic-store-card style="margin-left:10px" class="pt10" ref="storeCard" :uuid.sync="uuid" scenes />
</el-form-item>
<el-form-item label="限兑"> <el-form-item label="限兑">
<el-checkbox v-model="giftForm.limitTimesStatus" @change="refashData()">每个会员限制兑换</el-checkbox> <el-checkbox v-model="giftForm.limitTimesStatus" @change="refashData()">每个会员限制兑换</el-checkbox>
<span v-if="giftForm.limitTimesStatus"> <el-input-number controls-position="right" v-model="giftForm.limitTimes" :precision="0" :min="0" @change="limitTimeChange"></el-input-number></span> <span v-if="giftForm.limitTimesStatus"> <el-input-number controls-position="right" v-model="giftForm.limitTimes" :precision="0" :min="0" @change="limitTimeChange"></el-input-number></span>
...@@ -264,26 +285,6 @@ ...@@ -264,26 +285,6 @@
<el-button type="text" style="margin:8px 0 10px 180px" @click="addTimeRange">添加时间段</el-button> <el-button type="text" style="margin:8px 0 10px 180px" @click="addTimeRange">添加时间段</el-button>
</p> </p>
</div> </div>
<el-form-item label="显示状态" prop="proShowStatus">
<el-radio-group v-model="giftForm.proShowStatus">
<el-radio :label="1">上架状态就显示</el-radio>
<el-radio :label="2">兑换状态下显示</el-radio>
</el-radio-group>
<div v-if="giftForm.proShowStatus == 1" style="margin-left:20px;">
<el-checkbox v-model="giftForm.isNewGuestVisible" :true-label="1" :false-label="0">新客可见</el-checkbox>
<span class="tips">开启新客可见,则无门店所属的游客满足会员等级均可见</span>
</div>
</el-form-item>
<el-form-item label="上架时间" prop="releaseType">
<el-radio-group v-model="giftForm.releaseType">
<el-radio :label="1">立即上架</el-radio>
<el-radio :label="2">定时上架</el-radio>
</el-radio-group>
</el-form-item>
<!-- 定时上架 -->
<el-form-item class="form-item-mt" v-if="giftForm.releaseType === 2" prop="limitTimeBegin">
<el-date-picker v-model="giftForm.limitTimeBegin" type="datetime" placeholder="选择日期时间"></el-date-picker>
</el-form-item>
<!-- 实物礼品 --> <!-- 实物礼品 -->
<el-form-item label="配送方式" required v-if="giftType === 1" prop="changeTypeList"> <el-form-item label="配送方式" required v-if="giftType === 1" prop="changeTypeList">
<el-checkbox-group v-model="giftForm.changeTypeList" :disabled="editChangeTypeStatus"> <el-checkbox-group v-model="giftForm.changeTypeList" :disabled="editChangeTypeStatus">
...@@ -481,8 +482,8 @@ export default { ...@@ -481,8 +482,8 @@ export default {
detailDescription: '', //图文性情 detailDescription: '', //图文性情
proShowStatus: 1, //显示状态 proShowStatus: 1, //显示状态
releaseType: 1, //上架时间 releaseType: 1, //上架时间
limitTimeBegin: '', //上架时间具体 limitTimeBegin: [], //上架时间具体
changeType: 0, //配送方式T changeType: 3, //配送方式T
pickUpPointType: 1, pickUpPointType: 1,
pickUpPoint: [], pickUpPoint: [],
changeTypeList: [], //配东方式 changeTypeList: [], //配东方式
...@@ -610,7 +611,12 @@ export default { ...@@ -610,7 +611,12 @@ export default {
enterpriseId: '', // 商户id enterpriseId: '', // 商户id
specialOrder: false, // 是否定制 specialOrder: false, // 是否定制
dragging: false, dragging: false,
giftFormFileList: [] giftFormFileList: [],
pickerOptions: {
disabledDate(time) {
return time.getTime() < Date.now() - 24 * 3600 * 1000;
}
}
}; };
}, },
// watch: { // watch: {
...@@ -1190,9 +1196,10 @@ export default { ...@@ -1190,9 +1196,10 @@ export default {
//上架时间 //上架时间
this.giftForm.releaseType = res.data.result.releaseType; this.giftForm.releaseType = res.data.result.releaseType;
if (this.giftForm.releaseType === 2) { if (this.giftForm.releaseType === 2) {
this.giftForm.limitTimeBegin = res.data.result.limitTimeBegin; this.giftForm.limitTimeBegin[0] = res.data.result.limitTimeBegin;
this.giftForm.limitTimeBegin[1] = res.data.result.limitTimeEnd;
} else { } else {
this.giftForm.limitTimeBegin = ''; this.giftForm.limitTimeBegin = [];
} }
//配送方式 //配送方式
...@@ -1582,10 +1589,10 @@ export default { ...@@ -1582,10 +1589,10 @@ export default {
deteletDialogImageUrl(index) { deteletDialogImageUrl(index) {
this.uploadStatus = true; this.uploadStatus = true;
this.giftForm.images.splice(index, 1); this.giftForm.images.splice(index, 1);
this.$refs['giftFormUpload'].handleRemove() this.$refs['giftFormUpload'].handleRemove();
}, },
handleRemove(file, fileList) { handleRemove(file, fileList) {
this.giftFormFileList=[].concat(fileList) this.giftFormFileList = [].concat(fileList);
}, },
// 放大 // 放大
enlargeDialogImageUrl(index) { enlargeDialogImageUrl(index) {
...@@ -1768,7 +1775,7 @@ export default { ...@@ -1768,7 +1775,7 @@ export default {
if (val.length === 1 && val[0].length === 0) { if (val.length === 1 && val[0].length === 0) {
this.submitSkuJson = []; this.submitSkuJson = [];
this.stockDisabled = false; this.stockDisabled = false;
this.currentStock = 0 this.currentStock = 0;
return false; return false;
} }
this.skuList = val; this.skuList = val;
...@@ -1776,7 +1783,7 @@ export default { ...@@ -1776,7 +1783,7 @@ export default {
// return; // return;
this.handleSku(); this.handleSku();
if(this.isDifferentialPricing){ if (this.isDifferentialPricing) {
this.setLadder(); this.setLadder();
} }
this.submitLadderList = copy(this.list3); this.submitLadderList = copy(this.list3);
...@@ -1787,12 +1794,12 @@ export default { ...@@ -1787,12 +1794,12 @@ export default {
this.stockDisabled = true; this.stockDisabled = true;
} else { } else {
this.stockDisabled = false; this.stockDisabled = false;
this.currentStock = 0 this.currentStock = 0;
} }
} else { } else {
this.stockDisabled = false; this.stockDisabled = false;
this.giftForm.virtualStock = 0; this.giftForm.virtualStock = 0;
this.currentStock = 0 this.currentStock = 0;
} }
}, },
IsAgreeUpload(val) { IsAgreeUpload(val) {
...@@ -1800,8 +1807,8 @@ export default { ...@@ -1800,8 +1807,8 @@ export default {
this.IsAgreeUploadStatus = val; this.IsAgreeUploadStatus = val;
}, },
changeMinIntegral(val) { changeMinIntegral(val) {
this.giftForm.integralCost=val.integralCost||''; this.giftForm.integralCost = val.integralCost || '';
this.giftForm.cashCost=val.cashCost||''; this.giftForm.cashCost = val.cashCost || '';
}, },
//处理sku //处理sku
handleSku() { handleSku() {
...@@ -1840,7 +1847,7 @@ export default { ...@@ -1840,7 +1847,7 @@ export default {
giftProSkuId: skuPrice[j][5] ? skuPrice[j][5].valueName : '', giftProSkuId: skuPrice[j][5] ? skuPrice[j][5].valueName : '',
giftProSkuIntegral: skuPrice[j][0] ? skuPrice[j][0].valueName : '', //积分 giftProSkuIntegral: skuPrice[j][0] ? skuPrice[j][0].valueName : '', //积分
giftProSkuCash: skuPrice[j][1] ? skuPrice[j][1].valueName : '', //现金 giftProSkuCash: skuPrice[j][1] ? skuPrice[j][1].valueName : '', //现金
stock: this.isEdit ? (skuPrice[j][2] ? skuPrice[j][2].valueName - (skuPrice[j][2].currentStock || 0) : '') : (skuPrice[j][2] ? skuPrice[j][2].valueName : ''), //库存 stock: this.isEdit ? (skuPrice[j][2] ? skuPrice[j][2].valueName - (skuPrice[j][2].currentStock || 0) : '') : skuPrice[j][2] ? skuPrice[j][2].valueName : '', //库存
giftProSkuStandCode: skuPrice[j][3] ? skuPrice[j][3].valueName : '', //规格编码 giftProSkuStandCode: skuPrice[j][3] ? skuPrice[j][3].valueName : '', //规格编码
giftProGiftCode: skuPrice[j][4] ? skuPrice[j][4].valueName : '', //条形码 giftProGiftCode: skuPrice[j][4] ? skuPrice[j][4].valueName : '', //条形码
giftPropValues: skuSta[j] giftPropValues: skuSta[j]
...@@ -1933,6 +1940,12 @@ export default { ...@@ -1933,6 +1940,12 @@ export default {
} }
this.pickUpPointType = type; this.pickUpPointType = type;
}, },
vaidataDataPicker() {
const endTime= this.giftForm.limitTimeBegin[1];
const startTime= this.giftForm.limitTimeBegin[0];
const currentTime= new Date().getTime();
return endTime > currentTime && endTime > startTime;
},
// 保存 // 保存
async submitGoodsForm(form) { async submitGoodsForm(form) {
this.giftForm.detailDescription = this.$refs.tinymceWrap.tinymceHtml; this.giftForm.detailDescription = this.$refs.tinymceWrap.tinymceHtml;
...@@ -2089,9 +2102,7 @@ export default { ...@@ -2089,9 +2102,7 @@ export default {
} }
} }
} }
let hasWay = this.giftType let hasWay = this.giftType ? this.giftForm.changeTypeList.length : this.giftForm.changeType;
? this.giftForm.changeTypeList.length
: this.giftForm.changeType
if (!hasWay) { if (!hasWay) {
this.$message.error('请选择配送方式'); this.$message.error('请选择配送方式');
return false; return false;
...@@ -2133,7 +2144,8 @@ export default { ...@@ -2133,7 +2144,8 @@ export default {
timeZones: '', //部分时段 timeZones: '', //部分时段
proShowStatus: this.giftForm.proShowStatus, //显示状态 proShowStatus: this.giftForm.proShowStatus, //显示状态
releaseType: this.giftForm.releaseType, //上架状态 releaseType: this.giftForm.releaseType, //上架状态
limitTimeBegin: this.giftForm.releaseType === 2 ? this.getTimeAll(this.giftForm.limitTimeBegin) : '', //定时上架时间 limitTimeBegin: this.giftForm.releaseType === 2 ? this.getTimeAll(this.giftForm.limitTimeBegin[0]) : '', //定时上架开始时间
limitTimeEnd: this.giftForm.releaseType === 2 ? this.getTimeAll(this.giftForm.limitTimeBegin[1]) : '', //定时上架结束时间
changeType: this.giftType === 0 ? String(this.giftForm.changeType) : this.giftForm.changeTypeList.join(','), //配送方式 changeType: this.giftType === 0 ? String(this.giftForm.changeType) : this.giftForm.changeTypeList.join(','), //配送方式
// pickUpPoint:this.giftForm.pickUpPointType ===2?this.giftForm.pickUpPoint.join(','):'-1',//门店自提 // pickUpPoint:this.giftForm.pickUpPointType ===2?this.giftForm.pickUpPoint.join(','):'-1',//门店自提
refundType: this.giftForm.refundType, //售后 refundType: this.giftForm.refundType, //售后
...@@ -2148,6 +2160,8 @@ export default { ...@@ -2148,6 +2160,8 @@ export default {
if (this.pickUpPointType === 4) { if (this.pickUpPointType === 4) {
params.pickUpPoint = this.pickUpPointStr; params.pickUpPoint = this.pickUpPointStr;
} }
// 校验定时上架时间
if(!this.vaidataDataPicker()) return this.$message.error('定时上架结束时间必须大于当前时间和开始时间');
// 门店分类 // 门店分类
if (this.useNewStoreWidget === 0) { if (this.useNewStoreWidget === 0) {
if (this.sendChildData.storeType === 1) { if (this.sendChildData.storeType === 1) {
...@@ -2217,9 +2231,9 @@ export default { ...@@ -2217,9 +2231,9 @@ export default {
// } else { // } else {
// this.confirmDetail(params); // this.confirmDetail(params);
// } // }
if(this.isDifferentialPricing){ if (this.isDifferentialPricing) {
this.confirmDetail(params); this.confirmDetail(params);
}else{ } else {
this.submitLoading = true; this.submitLoading = true;
this.saveDeatail(params); this.saveDeatail(params);
} }
...@@ -2228,22 +2242,21 @@ export default { ...@@ -2228,22 +2242,21 @@ export default {
} }
}); });
}, },
confirmDetail(params){ confirmDetail(params) {
this.$confirm('<div>如更改规格或适用会员后,请先去设置阶梯价并保存,否则会使用原阶梯价,是否继续操作?</div>', '提示', { this.$confirm('<div>如更改规格或适用会员后,请先去设置阶梯价并保存,否则会使用原阶梯价,是否继续操作?</div>', '提示', {
closeOnClickModal: false, closeOnClickModal: false,
showClose: false, showClose: false,
type: 'warning', type: 'warning',
customClass: 'show-title', customClass: 'show-title',
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
confirmButtonText: '保存', confirmButtonText: '保存'
}) }).then(() => {
.then(() => { this.submitLoading = true;
this.submitLoading = true; this.saveDeatail(params);
this.saveDeatail(params); console.log('保存');
console.log('保存'); });
});
}, },
saveDeatail(params){ saveDeatail(params) {
request.post('/api-integral-mall/create-integral-pro', params).then(res => { request.post('/api-integral-mall/create-integral-pro', params).then(res => {
if (res.data.errorCode === 0) { if (res.data.errorCode === 0) {
this.$message.success('保存成功'); this.$message.success('保存成功');
...@@ -2320,7 +2333,7 @@ export default { ...@@ -2320,7 +2333,7 @@ export default {
}; };
</script> </script>
<style scoped> <style scoped>
.w-100{ .w-100 {
width: 100px; width: 100px;
} }
.section { .section {
...@@ -2394,7 +2407,7 @@ export default { ...@@ -2394,7 +2407,7 @@ export default {
color: #fff; color: #fff;
z-index: 2; z-index: 2;
} }
.drag-box-wrap{ .drag-box-wrap {
display: flex; display: flex;
text-align: center; text-align: center;
} }
...@@ -2552,12 +2565,12 @@ export default { ...@@ -2552,12 +2565,12 @@ export default {
position: absolute; position: absolute;
left: -10px; left: -10px;
} }
.set-ladder{ .set-ladder {
border-bottom:1px solid #1890ff; border-bottom: 1px solid #1890ff;
margin-left:15px; margin-left: 15px;
display:inline-block; display: inline-block;
position:absolute; position: absolute;
top:12px top: 12px;
} }
</style> </style>
<style> <style>
...@@ -2582,7 +2595,7 @@ export default { ...@@ -2582,7 +2595,7 @@ export default {
.tips { .tips {
font-size: 12px; font-size: 12px;
color: rgb(144, 147, 153); color: rgb(144, 147, 153);
margin-left:10px; margin-left: 10px;
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
line-height: 32px; line-height: 32px;
...@@ -2597,7 +2610,12 @@ export default { ...@@ -2597,7 +2610,12 @@ export default {
position: absolute; position: absolute;
left: -10px; left: -10px;
} }
.card-style.el-tabs--border-card{ .card-style.el-tabs--border-card {
box-shadow: none !important; box-shadow: none !important;
} }
.sub_title {
color: #909399;
font-size: 12px;
margin-left: 8px;
}
</style> </style>
...@@ -111,7 +111,18 @@ ...@@ -111,7 +111,18 @@
<memberInfo :memberObj="scope.row" :requestProject="requestProject" :placement="placement"></memberInfo> <memberInfo :memberObj="scope.row" :requestProject="requestProject" :placement="placement"></memberInfo>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="complete" label="交易状态" min-width="170px"> <el-table-column prop="memberCardStatus" label="会员状态" min-width="120px">
<template slot-scope="{ row }">
<span>{{ row.memberCardStatus == 1 ? '正常' : row.memberCardStatus == 2 ? '冻结' : '--' }}</span>
</template>
</el-table-column>
<el-table-column fixed="right" prop="saleNum" label="实付金额" min-width="120px">
<template slot-scope="scope">
<p style="line-height:18px">积分:{{ scope.row.unitCostIntegral }}</p>
<p style="line-height:18px">现金:¥{{ scope.row.payCost }}</p>
</template>
</el-table-column>
<el-table-column fixed="right" prop="complete" label="交易状态" min-width="170px">
<template slot-scope="scope"> <template slot-scope="scope">
<p style="line-height:18px"> <p style="line-height:18px">
<span v-if="scope.row.status <= 0">交易关闭</span> <span v-if="scope.row.status <= 0">交易关闭</span>
...@@ -123,13 +134,6 @@ ...@@ -123,13 +134,6 @@
</p> </p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed="right" prop="saleNum" label="实付金额" min-width="120px">
<template slot-scope="scope">
<p style="line-height:18px">积分:{{ scope.row.unitCostIntegral }}</p>
<p style="line-height:18px">现金:¥{{ scope.row.payCost }}</p>
</template>
</el-table-column>
<template slot="empty"> <template slot="empty">
<div class="no-data-wrap"> <div class="no-data-wrap">
<div class="no-data-icon"> <div class="no-data-icon">
......
...@@ -120,6 +120,11 @@ ...@@ -120,6 +120,11 @@
</p> --> </p> -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="memberCardStatus" label="会员状态" min-width="120px">
<template slot-scope="{ row }">
<span>{{ row.memberCardStatus == 1 ? '正常' : row.memberCardStatus == 2 ? '冻结' : '--' }}</span>
</template>
</el-table-column>
<el-table-column prop="refundStatus" label="售后" min-width="120px"> <el-table-column prop="refundStatus" label="售后" min-width="120px">
<template slot-scope="scope"> <template slot-scope="scope">
<p style="line-height:18px" v-if="scope.row.refundStatusNowLog === 0">退款中</p> <p style="line-height:18px" v-if="scope.row.refundStatusNowLog === 0">退款中</p>
...@@ -133,7 +138,13 @@ ...@@ -133,7 +138,13 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="creatorName" label="礼品创建人" min-width="120px"></el-table-column> <el-table-column prop="creatorName" label="礼品创建人" min-width="120px"></el-table-column>
<el-table-column prop="complete" label="交易状态" min-width="170px"> <el-table-column fixed="right" prop="saleNum" label="实付金额" min-width="120px">
<template slot-scope="scope">
<p style="line-height:18px">积分:{{ scope.row.unitCostIntegral }}</p>
<p style="line-height:18px">现金:¥{{ scope.row.payCost }}</p>
</template>
</el-table-column>
<el-table-column fixed="right" prop="complete" label="交易状态" min-width="170px">
<template slot-scope="scope"> <template slot-scope="scope">
<p style="line-height:18px"> <p style="line-height:18px">
<span v-if="scope.row.status === 11">待付款</span> <span v-if="scope.row.status === 11">待付款</span>
...@@ -156,13 +167,6 @@ ...@@ -156,13 +167,6 @@
</p> </p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed="right" prop="saleNum" label="实付金额" min-width="120px">
<template slot-scope="scope">
<p style="line-height:18px">积分:{{ scope.row.unitCostIntegral }}</p>
<p style="line-height:18px">现金:¥{{ scope.row.payCost }}</p>
</template>
</el-table-column>
<template slot="empty"> <template slot="empty">
<div class="no-data-wrap"> <div class="no-data-wrap">
<div class="no-data-icon"> <div class="no-data-icon">
......
...@@ -22,30 +22,49 @@ ...@@ -22,30 +22,49 @@
</el-form-item> --> </el-form-item> -->
<h2 class="icon-type-title"> <h2 class="icon-type-title">
<div class="mark"></div> <div class="mark"></div>
品设置 品设置
</h2> </h2>
<el-form-item prop="openAutoShelf" label="礼品无库存自动下架"> <el-form-item prop="openAutoShelf" label="无库存自动下架">
<el-switch v-model="form.openAutoShelf"></el-switch> <el-switch v-model="form.openAutoShelf"></el-switch>
</el-form-item> </el-form-item>
<el-form-item prop="showStoreType" label="礼品展示门店类型"> <el-form-item prop="showStoreType" label="展示门店类型">
<el-checkbox-group v-model="form.showStoreType"> <el-checkbox-group v-model="form.showStoreType">
<el-checkbox label="1">服务门店</el-checkbox> <el-checkbox label="1">服务门店</el-checkbox>
<el-checkbox label="2">协管门店</el-checkbox> <el-checkbox label="2">协管门店</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
<el-form-item prop="openAutoShelf" label="库存提示文案展示">
<!-- <el-radio-group v-model="form.stockShow">
<el-radio :label="0">不展示</el-radio>
<el-radio :label="1">展示</el-radio>
</el-radio-group> -->
<el-checkbox style="vertical-align: top;margin-right: 10px" v-model="form.stockShow" :true-label="1" :false-label="0"></el-checkbox><span class="stock_tip">展示</span>
<div v-show="form.stockShow" class="stock_tip">库存少于 <el-input-number v-model="form.stockShowAmount" class="stock_tip_ipt" controls-position="right" :min="1" />件,展示为【即将兑光】</div>
<div class="layout--tips">
开启后,库存提示文案将在积分商城商品列表页展示。
<el-popover placement="right" width="400" trigger="hover">
<img src="../../../static/img/tip.png" />
<el-button slot="reference" type="text">查看示例</el-button>
</el-popover>
</div>
</el-form-item>
<h2 class="icon-type-title" style="margin-top:40px"> <h2 class="icon-type-title" style="margin-top:40px">
<div class="mark"></div> <div class="mark"></div>
订单设置 订单设置
</h2> </h2>
<el-form-item prop="autoConfirmReceipt" label="自动确认收货"> <el-form-item prop="autoConfirmReceipt" label="发货后自动确认收货">
<el-switch v-model="form.autoConfirmReceipt" :active-value="1" :inactive-value="0" @change="form.autoConfirmReceiptDay = null"> </el-switch> <el-switch v-model="form.autoConfirmReceipt" :active-value="1" :inactive-value="0" @change="form.autoConfirmReceiptDay = null"> </el-switch>
</el-form-item> </el-form-item>
<el-form-item prop="autoConfirmReceiptDay" v-if="form.autoConfirmReceipt === 1" :rules="[{ required: true, message: '请选择自动收货天数' }]"> <el-form-item prop="autoConfirmReceiptDay" v-if="form.autoConfirmReceipt === 1" :rules="[{ required: true, message: '请选择自动收货天数' }]" label="自动确认收货时间">
<el-select v-model="form.autoConfirmReceiptDay" placeholder="请选择自动收货天数"> <div class="stock_tip">
<el-option label="7天后" :value="7"> </el-option> 发货后
<el-option label="15天后" :value="15"> </el-option> <el-select v-model="form.autoConfirmReceiptDay" placeholder="请选择" style="width: 115px;margin: 0 10px">
<el-option label="30天后" :value="30"> </el-option> <el-option label="7" :value="7"> </el-option>
</el-select> <el-option label="15" :value="15"> </el-option>
<el-option label="30" :value="30"> </el-option>
</el-select>
天,自动确认收货
</div>
</el-form-item> </el-form-item>
<div class="confim-btn" :style="{ width: fixedWidth + 'px' }"> <div class="confim-btn" :style="{ width: fixedWidth + 'px' }">
<el-form-item class="fix-btn"> <el-form-item class="fix-btn">
...@@ -71,7 +90,9 @@ export default { ...@@ -71,7 +90,9 @@ export default {
openAutoShelf: false, openAutoShelf: false,
showStoreType: [], showStoreType: [],
autoConfirmReceipt: 0, autoConfirmReceipt: 0,
autoConfirmReceiptDay: null autoConfirmReceiptDay: null,
stockShow: 0,
stockShowAmount: undefined
}, },
formRules: { formRules: {
cardType: [{ required: true, message: '请选择积分消耗卡', trigger: 'change' }], cardType: [{ required: true, message: '请选择积分消耗卡', trigger: 'change' }],
...@@ -94,12 +115,15 @@ export default { ...@@ -94,12 +115,15 @@ export default {
this.form.autoConfirmReceiptDay = res.data.result.autoConfirmReceiptDay || null; this.form.autoConfirmReceiptDay = res.data.result.autoConfirmReceiptDay || null;
this.form.openAutoShelf = res.data.result.openAutoShelf === 1 ? true : false; this.form.openAutoShelf = res.data.result.openAutoShelf === 1 ? true : false;
this.form.showStoreType = res.data.result.showStoreType ? res.data.result.showStoreType.split(',') : []; this.form.showStoreType = res.data.result.showStoreType ? res.data.result.showStoreType.split(',') : [];
this.form.stockShow = res.data.result.stockShow || 0;
this.form.stockShowAmount = res.data.result.stockShowAmount || undefined;
} else { } else {
this.$message.error(res.data.message); this.$message.error(res.data.message);
} }
}); });
}, },
handleSubmit(form) { handleSubmit(form) {
if (!this.form.stockShowAmount) return this.$message.warning('请输入库存提示文案数量限制');
this.$refs[form].validate(valid => { this.$refs[form].validate(valid => {
console.log(valid); console.log(valid);
if (valid) { if (valid) {
...@@ -107,7 +131,9 @@ export default { ...@@ -107,7 +131,9 @@ export default {
// cardType: this.form.cardType, // cardType: this.form.cardType,
autoConfirmReceipt: this.form.autoConfirmReceipt, autoConfirmReceipt: this.form.autoConfirmReceipt,
openAutoShelf: this.form.openAutoShelf ? 1 : 0, openAutoShelf: this.form.openAutoShelf ? 1 : 0,
showStoreType: this.form.showStoreType.join(',') showStoreType: this.form.showStoreType.join(','),
stockShow: this.form.stockShow,
stockShowAmount: this.form.stockShow ? this.form.stockShowAmount : null
}; };
if (params.autoConfirmReceipt === 1) params.autoConfirmReceiptDay = this.form.autoConfirmReceiptDay; if (params.autoConfirmReceipt === 1) params.autoConfirmReceiptDay = this.form.autoConfirmReceiptDay;
this.btnLoading = true; this.btnLoading = true;
...@@ -129,7 +155,7 @@ export default { ...@@ -129,7 +155,7 @@ export default {
components: {} components: {}
}; };
</script> </script>
<style scoped> <style scoped lang="less">
.section { .section {
background: #fff; background: #fff;
margin: 24px; margin: 24px;
...@@ -143,6 +169,8 @@ export default { ...@@ -143,6 +169,8 @@ export default {
font-size: 16px; font-size: 16px;
font-weight: 700; font-weight: 700;
margin-bottom: 20px; margin-bottom: 20px;
padding: 10px;
background: #f7f8fa;
} }
.icon-type-title .mark { .icon-type-title .mark {
width: 3px; width: 3px;
...@@ -164,4 +192,16 @@ export default { ...@@ -164,4 +192,16 @@ export default {
.fix-btn { .fix-btn {
margin-left: -100px; margin-left: -100px;
} }
.stock_tip {
color: #303133;
.stock_tip_ipt {
margin: 0 10px;
width: 115px;
}
}
.layout--tips {
margin-top: 10px;
font-size: 12px;
color: #909399;
}
</style> </style>
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