Commit 53cee225 by 陈羽

Merge branch 'feature/8月下迭代' of http://git.gicdev.com/integralMall/integral-mall

parents 42535f11 9a79020c
......@@ -15762,7 +15762,7 @@
color: #606266;
display: inline-block;
font-size: inherit;
height: 32px;
height: 32px !important;
line-height: 32px;
outline: none;
padding: 0 15px;
......@@ -49,12 +49,12 @@
<a class="singelinfo-jlitem">卡券记录 ({{ memberInfo.couponCount }})</a>
</div>
</div>
<div slot="reference" style="width:200px;">
<div slot="reference" style="width:100%;">
<a :href="'/member/#/wechatmemberDetail?memberId=' + memberObj.memberId" target="_blank" class="link-content">
<!-- <img class="vertical-middle table__avatar" :src="filterAvatar(memberObj.memberImgUrl)" width="60" height="60" alt="" srcset="" /> -->
<div class="table-info">
<p class="table-name--ellipsis">{{ memberObj.memberName || '--' }}</p>
<a :href="'/member/#/wechatmemberDetail?memberId=' + memberObj.memberId" target="_blank">{{ memberObj.cardNum }}</a>
<a class="link--ellipsis" :href="'/member/#/wechatmemberDetail?memberId=' + memberObj.memberId" target="_blank">{{ memberObj.cardNum }}</a>
</div>
</a>
</div>
......@@ -115,7 +115,7 @@ export default {
align-items: center;
}
.table-info {
width: 200px;
width: 100%;
margin-left: 5px;
}
.table-name--ellipsis {
......@@ -171,4 +171,10 @@ export default {
text-align: center;
flex: 1;
}
.link--ellipsis {
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>
......@@ -190,14 +190,8 @@ export default {
removeSelect(item, index) {
// item.disabled = false;
// this.$set(this.leftList, 'item', false);
this.selectRightList.splice(
copy(this.selectRightList).findIndex(i => i.storeGroupId === item.storeGroupId),
1
);
this.selectLeftList.splice(
this.selectLeftList.findIndex(i => i.storeGroupId === item.storeGroupId),
1
);
this.selectRightList.splice(copy(this.selectRightList).findIndex(i => i.storeGroupId === item.storeGroupId), 1);
this.selectLeftList.splice(this.selectLeftList.findIndex(i => i.storeGroupId === item.storeGroupId), 1);
this.selectIdList = [];
for (let item of this.selectLeftList) {
this.selectIdList.push(item.storeGroupId);
......
......@@ -186,10 +186,7 @@ export default {
// 移除
removeItem(item, index) {
this.selectRightList.splice(index, 1);
this.selectLeftList.splice(
this.selectLeftList.findIndex(i => i.integralMallPickUpPointId === item.integralMallPickUpPointId),
1
);
this.selectLeftList.splice(this.selectLeftList.findIndex(i => i.integralMallPickUpPointId === item.integralMallPickUpPointId), 1);
//取消表格选中数据
let obj = this.tableData.find(i => {
return i.integralMallPickUpPointId === item.integralMallPickUpPointId;
......
......@@ -120,7 +120,9 @@
</template>
</el-table-column>
<el-table-column label="原价" v-if="!isEdit">
<template slot-scope="{ row }">{{ row.integralCost }}积分+{{ row.cashCost }}</template>
<template slot-scope="{ row }"
>{{ row.integralCost }}积分+{{ row.cashCost }}</template
>
</el-table-column>
<el-table-column label="当前库存" v-if="!isEdit">
<template slot-scope="{ row }">{{ row.virtualStock }}</template>
......
......@@ -17,14 +17,14 @@
<div class="section">
<div class="operate-top">
<div class="fl">
<div class="search-item">
<div class="search-item m-r-10">
<el-select v-model="query.activityStatus" placeholder="所有活动状态" clearable class="w-160" @change="getSearchList('1')">
<el-option label="未开始" :value="0"></el-option>
<el-option label="进行中" :value="1"></el-option>
<el-option label="已结束" :value="2"></el-option>
</el-select>
</div>
<div class="search-item">
<div class="search-item m-r-10">
<el-input v-model.trim="query.activityName" placeholder="请输入关键词进行搜索" prefix-icon="el-icon-search" clearable class="w-300" @change="getSearchList('1')"></el-input>
</div>
<div class="search-item">
......@@ -38,14 +38,16 @@
<div v-loading="loading">
<el-table :data="tableData" style="width: 100%" @sort-change="sortChange">
<el-table-column label="活动名称" prop="activityName"></el-table-column>
<el-table-column label="活动时间" sortable="custom">
<el-table-column label="活动时间" sortable="custom" width="250px">
<template slot-scope="{ row }">
<div>{{ getTimeAll(row.beginTime) }}&nbsp;</div>
<div>{{ getTimeAll(row.endTime) }}</div>
</template>
</el-table-column>
<el-table-column label="状态" prop="activityStatus">
<template slot-scope="{ row }"> <span :class="[row.activityStatus === 0 ? 'dm-status--warning' : row.activityStatus === 1 ? 'dm-status--primary--flash' : 'dm-status--info']"> </span>{{ row.activityStatus === 0 ? '未开始' : row.activityStatus === 1 ? '进行中' : '已结束' }} </template>
<template slot-scope="{ row }">
<span :class="[row.activityStatus === 0 ? 'dm-status--warning' : row.activityStatus === 1 ? 'dm-status--primary--flash' : 'dm-status--info']"> </span>{{ row.activityStatus === 0 ? '未开始' : row.activityStatus === 1 ? '进行中' : '已结束' }}
</template>
</el-table-column>
<el-table-column label="商品数量">
<template slot-scope="{ row }">
......@@ -57,7 +59,7 @@
{{ row.memberSearchType === 1 ? '所有会员' : row.memberSearchType === 2 ? row.memberSearchParams.split(',').length + '个会员分组' : '部分会员' }}
</template>
</el-table-column>
<el-table-column label="创建时间">
<el-table-column label="创建时间" width="200px">
<template slot-scope="{ row }">{{ getTimeAll(row.createTime) }}</template>
</el-table-column>
<el-table-column label="操作">
......@@ -204,6 +206,9 @@ export default {
margin: 24px;
padding: 24px;
}
.m-r-10 {
margin-right: 10px;
}
.w-280 {
width: 280px;
}
......
......@@ -17,21 +17,21 @@
<div class="section">
<div class="operate-top">
<div class="fl">
<div class="search-item">
<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>
</div>
<div class="search-item">
<div class="search-item m-r-10">
<el-select v-model="shelf" placeholder="上下架状态" clearable class="w-140" @change="getListCurr">
<el-option label="已上架" :value="2"></el-option>
<el-option label="已下架" :value="1"></el-option>
</el-select>
</div>
<div class="search-item">
<div class="search-item m-r-10">
<el-checkbox v-model="showSelfStatus" label="仅看本人" border @change="getListCurr" v-if="showFlag"></el-checkbox>
</div>
</div>
<div class="fr">
<div class="search-item">
<div class="search-item m-r-10">
<el-select v-model="goodsType" placeholder="请选择批量操作" clearable @change="handleData">
<el-option label="批量上架" :value="0"></el-option>
<el-option label="批量下架" :value="1"></el-option>
......@@ -43,8 +43,8 @@
</div>
<div v-loading="loading">
<el-table ref="multipleTable" :data="tableDate" style="width: 100%" @sort-change="sortChange" @selection-change="handleSelectAll">
<el-table-column type="selection" width="50" :selectable="selectInit"></el-table-column>
<el-table-column label="礼品信息" min-width="260px">
<el-table-column fixed type="selection" width="50" :selectable="selectInit"></el-table-column>
<el-table-column fixed label="礼品信息" min-width="260px">
<template slot-scope="scope">
<div class="gift-info">
<!-- <p v-if="scope.row.cardType === 2" style="display:inline-block">
......@@ -137,7 +137,7 @@
<span style="display:none">{{ refash }}</span>
</template>
</el-table-column>
<el-table-column label="操作" min-width="180px">
<el-table-column fixed="right" label="操作" min-width="180px">
<template slot-scope="scope">
<div>
<el-button type="text" @click="getLink(scope.row)" v-if="scope.row.canEdit">推广</el-button>
......@@ -150,7 +150,7 @@
<!-- <dm-delete @confirm="deleteList(scope.row, 0, scope.$index)" tips="确定删除该商品吗?">
<el-button type="text" v-if="scope.row.canEdit">删除</el-button>
</dm-delete> -->
<el-dropdown style="margin-left:20px;" @command="command => handleCommand(command, scope.row, scope.$index)" placement="bottom-start">
<el-dropdown v-if="scope.row.isDifferentialPricing || scope.row.canEdit" style="margin-left:20px;" @command="command => handleCommand(command, scope.row, scope.$index)" placement="bottom-start">
<span class="el-dropdown-link" style="color:#1890ff;cursor: pointer;"> <i class="el-icon-more"></i> </span>
<el-dropdown-menu slot="dropdown" style="width:110px;">
<!-- <el-dropdown-item command="1" v-if="scope.row.changeType === '5' && scope.row.canEdit">券码</el-dropdown-item> -->
......@@ -671,6 +671,9 @@ export default {
margin: 24px;
padding: 24px;
}
.m-r-10 {
margin-right: 10px;
}
.w-280 {
width: 280px;
}
......
......@@ -46,7 +46,9 @@
</template>
</el-table-column>
<el-table-column label="领取限制">
<template slot-scope="scope"> {{ scope.row.cardLimit }}张/人 </template>
<template slot-scope="scope">
{{ scope.row.cardLimit }}张/人
</template>
</el-table-column>
<el-table-column label="适用门店">
<template slot-scope="scope">
......@@ -428,10 +430,7 @@ export default {
couponRules: {
integralCost: [{ required: true, message: '请输入积分费用', trigger: 'blur' }],
cashCost: [{ required: true, message: '请输入现金费用', trigger: 'blur' }],
virtualStock: [
{ required: true, message: '请输入库存', trigger: 'blur' },
{ validator: stockValidator, trigger: 'blur' }
],
virtualStock: [{ required: true, message: '请输入库存', trigger: 'blur' }, { validator: stockValidator, trigger: 'blur' }],
gradeType: [{ required: true, message: '请选择适用会员', trigger: 'change' }],
memberGrade: [{ required: true, message: '请选择适用会员', trigger: 'change' }],
exchangeFixDate: [{ required: true, message: '请选择时间', trigger: 'change' }],
......
......@@ -18,48 +18,53 @@
<!-- <div class="page-info">
<h3><i class="el-icon-info"></i>优惠券已支持主图和图文详情,如需再发布以“微信兑换券”来配送的礼品,请直接前往优惠券中设置</h3>
</div>-->
<div class="operate-top">
<div class="fl">
<div class="search-item">
<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="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>
</div>
<div class="search-item">
<div class="search-content-item" style="height:32px;">
<el-select v-model="shelf" placeholder="上下架状态" clearable class="w-140" @change="getListCurr">
<el-option label="已上架" :value="2"></el-option>
<el-option label="已下架" :value="1"></el-option>
</el-select>
</div>
<div class="search-item">
<div class="search-content-item" style="height:32px;">
<el-select v-model="stockStatus" placeholder="库存状态" clearable class="w-140" @change="getListCurr">
<el-option label="有库存" :value="1"></el-option>
<el-option label="无库存" :value="2"></el-option>
</el-select>
</div>
<div class="search-item">
<div class="search-content-item" style="height:32px;">
<el-select v-model="giftType" placeholder="礼品类型" clearable class="w-140" @change="getListCurr">
<el-option label="实物礼品" :value="1"></el-option>
<el-option label="虚拟礼品" :value="2"></el-option>
</el-select>
</div>
<div class="search-item">
<el-checkbox v-model="showSelfStatus" label="仅看本人" border @change="getListCurr" v-if="showFlag"></el-checkbox>
<div class="search-content-item" style="height:32px;">
<el-select v-model="category" placeholder="礼品分类" class="w-140" clearable @change="getListCurr">
<el-option v-for="(v, i) in categoryOptions" :key="i" :label="v.categoryName" :value="v.integralMallCategoryId">
<span class="fl">{{ v.categoryName }}</span>
</el-option> </el-select
><el-checkbox style="margin-left:10px;" v-model="showSelfStatus" label="仅看本人" border @change="getListCurr" v-if="showFlag"></el-checkbox>
</div>
<div class="search-content-item" style="height:32px;"></div>
</div>
<div class="fr">
<div class="search-item">
<el-select v-model="goodsType" placeholder="请选择批量操作" clearable @change="handleData">
<div class="right" style="display: flex;justify-content: space-between;width:322px;padding-left:10px;box-sizing: border-box;">
<div class="search-content-item" style="width:214px;">
<el-select v-model="goodsType" placeholder="请选择批量操作" clearable @change="handleData" style="width:214px;">
<el-option label="批量上架" :value="0"></el-option>
<el-option label="批量下架" :value="1"></el-option>
<el-option label="批量删除" :value="2"></el-option>
</el-select>
</div>
<el-button type="primary" @click="addGift">新增礼品</el-button>
<el-button type="primary" @click="addGift" style="height:32px;margin-left:10px;">新增礼品</el-button>
</div>
</div>
<div v-loading="loading">
<el-table ref="multipleTable" :data="tableDate" style="width: 100%" @sort-change="sortChange" @selection-change="handleSelectAll">
<el-table-column type="selection" width="50" :selectable="selectInit"></el-table-column>
<el-table-column label="礼品信息" min-width="300px">
<el-table-column fixed type="selection" width="50" :selectable="selectInit"></el-table-column>
<el-table-column fixed label="礼品信息" min-width="300px">
<template slot-scope="scope">
<div class="gift-info">
<img :src="scope.row.mainImageUrl" alt />
......@@ -77,6 +82,9 @@
</div>
</template>
</el-table-column>
<el-table-column prop="giftCategoryName" label="礼品分类" min-width="110px">
<template slot-scope="scope">{{ scope.row.giftCategoryName ? scope.row.giftCategoryName : '--' }}</template>
</el-table-column>
<el-table-column prop="integralCost" label="积分费用" sortable="custom" min-width="110px">
<template slot-scope="scope">
<p class="intergral-edit">
......@@ -139,7 +147,7 @@
<span style="display:none">{{ refash }}</span>
</template>
</el-table-column>
<el-table-column label="操作" min-width="220px">
<el-table-column fixed="right" label="操作" min-width="220px">
<template slot-scope="scope">
<div>
<el-button type="text" @click="getLink(scope.row)" v-if="scope.row.canEdit">推广</el-button>
......@@ -148,7 +156,7 @@
<el-button type="text" v-if="scope.row.status === 2 && scope.row.canEdit && scope.row.releaseType === 2 && scope.row.isShelves === 0" @click="deleteList(scope.row, 1)">下架</el-button>
<el-button type="text" v-if="scope.row.status === 1 && scope.row.canEdit" @click="deleteList(scope.row, 2)">上架</el-button>
<el-button type="text" @click="goAdd(scope.row)">编辑</el-button>
<el-dropdown style="margin-left:20px;" @command="command => handleCommand(command, scope.row, scope.$index)" placement="bottom-start">
<el-dropdown v-if="(scope.row.changeType === '5' && scope.row.canEdit) || scope.row.isDifferentialPricing || scope.row.canEdit" style="margin-left:20px;" @command="command => handleCommand(command, scope.row, scope.$index)" placement="bottom-start">
<span class="el-dropdown-link" style="color:#1890ff;cursor: pointer;"> <i class="el-icon-more"></i> </span>
<el-dropdown-menu slot="dropdown" style="width:110px;">
<el-dropdown-item command="1" v-if="scope.row.changeType === '5' && scope.row.canEdit">券码</el-dropdown-item>
......@@ -229,6 +237,7 @@ export default {
giftType: '', //商品类型
sortColumn: '',
sortType: '',
category: '', // 礼品分类
showSelfStatus: false,
showFlag: false,
openFlag: false,
......@@ -284,6 +293,7 @@ export default {
id: ''
// show: false
},
categoryOptions: [],
ladderDialogVisible: false,
stockDialog: false,
enterpriseId: '',
......@@ -307,6 +317,7 @@ export default {
this.getStatus();
this.getList();
this.getUserId();
this.getCategoryOptions();
},
methods: {
// 阶梯价定制,判断达摩测试环境与地素环境
......@@ -387,9 +398,10 @@ export default {
currentPage: this.currentPage,
pageSize: this.pageSize,
sortType: this.sortType,
sortColumn: this.sortColumn,
category: this.category,
giftName: this.searchValue.trim(),
giftType: this.giftType ? this.giftType : -1,
sortColumn: this.sortColumn,
shelf: this.shelf ? this.shelf : -1, //上架状态
stockStatus: this.stockStatus ? this.stockStatus : -1,
goodsType: this.goodsType, //商品类型
......@@ -788,6 +800,20 @@ export default {
},
selectInit(row, index) {
return row.canEdit;
},
//获取礼品分类数据
getCategoryOptions() {
request.post('/api-integral-mall/load-category').then(res => {
if (res.data.errorCode === 0) {
if (res.data.result) {
this.categoryOptions = res.data.result;
} else {
this.categoryOptions = [];
}
} else {
this.$message.error(res.data.message);
}
});
}
},
components: {
......
......@@ -337,7 +337,9 @@
</template>
</el-table-column>
<el-table-column label="领取限制">
<template slot-scope="scope">{{ scope.row.cardLimit }}张/人</template>
<template slot-scope="scope"
>{{ scope.row.cardLimit }}张/人</template
>
</el-table-column>
<el-table-column label="适用门店">
<template slot-scope="scope">{{ scope.row.storeMode === 0 ? '所有门店' : scope.row.storeMode === 1 ? '部分分组' : '部分门店' }}</template>
......
......@@ -59,14 +59,8 @@ export default {
refundPoint: '',
refundMoney: '',
modalRules: {
refundPoint: [
{ required: true, message: '请输入积分', trigger: 'blur' },
{ validator: refundPointValidator, trigger: 'blur' }
],
refundMoney: [
{ required: true, message: '请输入金额', trigger: 'blur' },
{ validator: refundMoneyValidator, trigger: 'blur' }
]
refundPoint: [{ required: true, message: '请输入积分', trigger: 'blur' }, { validator: refundPointValidator, trigger: 'blur' }],
refundMoney: [{ required: true, message: '请输入金额', trigger: 'blur' }, { validator: refundMoneyValidator, trigger: 'blur' }]
},
submitLoading: false //按钮禁止重复提交
};
......
......@@ -17,16 +17,16 @@
<div>
<div class="operate-top">
<div class="fl">
<div class="search-item">
<div class="search-item m-r-10">
<el-date-picker class="date-picker" @change="changeTime" v-model="dateValue" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</div>
<div class="search-item">
<div class="search-item m-r-10">
<el-select v-model="refundType" placeholder="退款方式" clearable class="w-140" @change="getListCurr">
<el-option label="仅退款" :value="1"></el-option>
<el-option label="退货退款" :value="2"></el-option>
</el-select>
</div>
<div class="search-item">
<div class="search-item m-r-10">
<el-input placeholder="请输入关键词搜索" v-model.trim="searchValue" style="width:280px;" clearable @keyup.enter.native="handleInputSearch(searchValue)" @clear="handleInputSearch(searchValue)">
<el-select v-model="searchType" slot="prepend" placeholder="请选择" style="width:100px;">
<el-option label="退款单编号" :value="1"></el-option>
......@@ -39,7 +39,9 @@
<!-- <el-input class="w-340" v-model.trim="searchValue" placeholder="请输入商品/会员/订单/退款编号进行搜索" prefix-icon="el-icon-search" clearable @keyup.enter.native="handleInputSearch(searchValue)" @clear="handleInputSearch(searchValue)"> </el-input> -->
</div>
<div class="search-item">
<el-checkbox v-model="showSelfStatus" label="仅看本人" border @change="getListCurr" v-if="showFlag"></el-checkbox>
<el-autocomplete prefix-icon="el-icon-search" popper-class="autocomplete-wrap" class="inline-input" :value="updaterName" :select-when-unmatched="true" @change.native="changeAuto" @select="selectCreator" :fetch-suggestions="querySearch" placeholder="请输入操作人" :trigger-on-focus="false">
<template slot-scope="{ item }">{{ item.creatorName }}</template>
</el-autocomplete>
</div>
</div>
</div>
......@@ -50,8 +52,8 @@
<el-tab-pane label="退款关闭" name="2" class="goods-table-content"> </el-tab-pane>
<div class="goods-list-content" v-loading="loading">
<el-table :data="tableData" ref="multipleTable" style="width: 100%" @sort-change="sortChange">
<el-table-column type="selection" width="50"> </el-table-column>
<el-table-column label="礼品信息" min-width="300px">
<el-table-column fixed type="selection" width="50"> </el-table-column>
<el-table-column fixed label="礼品信息" min-width="310px">
<template slot-scope="scope">
<div class="gift-info">
<img :src="scope.row.photoUrl" />
......@@ -113,7 +115,10 @@
</p> -->
</template>
</el-table-column>
<el-table-column prop="complete" label="退款状态" width="120px">
<el-table-column prop="updaterName" label="操作人" width="160px">
<template slot-scope="scope">{{ scope.row.refundStatus === 0 || status === '0' ? '--' : scope.row.updaterName }}</template>
</el-table-column>
<el-table-column fixed="right" prop="complete" label="退款状态" width="120px">
<template slot-scope="scope">
<p style="line-height:18px;margin-bottom:5px" v-if="scope.row.refundStatus === 0">待退款</p>
<p style="line-height:18px;" v-if="scope.row.refundStatus === 1">退款成功</p>
......@@ -186,6 +191,8 @@ export default {
total: 0,
loading: false,
tableData: [],
updaterId: '',
updaterName: '',
searchValue: '', //搜索字段
searchType: 1,
refundType: '', //退款方式
......@@ -226,7 +233,6 @@ export default {
shopIntegralMallProExchangeId: '', //门店自提订单id
writeOffCode: '', //核销码
submitLoading: false, //门店自提确认按钮
showSelfStatus: false,
showFlag: false
};
},
......@@ -235,6 +241,37 @@ export default {
this.getList();
},
methods: {
changeAuto(e) {
if (!e.target.value) {
this.updaterId = '';
this.updaterName = '';
}
},
selectCreator(v) {
this.updaterName = '';
this.$nextTick(() => {
this.updaterName = v.creatorName;
this.updaterId = v.creatorId;
this.handleInputSearch();
});
},
querySearch(v, cb) {
this.creatorLoading = true;
let params = {
creatorName: v
};
request.get('/api-integral-mall/list-creator', { params }).then(res => {
if (res.data.errorCode === 0) {
if (res.data.result) {
cb(res.data.result);
} else {
cb([]);
}
} else {
this.$message.error(res.data.message);
}
});
},
getStatus() {
request.post('/api-integral-mall/is-show-self ').then(res => {
if (res.data.errorCode === 0) {
......@@ -306,24 +343,26 @@ export default {
sort: this.sortType,
startTime: this.startTime,
endTime: this.endTime,
status: this.status === '-1' ? '' : this.status,
showSelfFlag: this.showSelfStatus ? 1 : 0
updaterId: this.updaterId,
status: this.status === '-1' ? '' : this.status
};
this.loading = true;
request.post('/api-integral-mall/page-refunds', qs.stringify(params)).then(res => {
if (res.data.errorCode === 0) {
if (res.data.result.result) {
this.tableData = res.data.result.result;
this.total = res.data.result.totalCount;
request
.post('/api-integral-mall/page-refunds', qs.stringify(params))
.then(res => {
if (res.data.errorCode === 0) {
if (res.data.result.result) {
this.tableData = res.data.result.result;
this.total = res.data.result.totalCount;
} else {
this.tableData = [];
this.total = 0;
}
} else {
this.tableData = [];
this.total = 0;
this.$message.error(res.data.message);
}
this.loading = false;
} else {
this.$message.error(res.data.message);
}
});
})
.finally(_ => (this.loading = false));
},
// 关闭退款
handleCloseRefund(item) {
......@@ -407,7 +446,9 @@ export default {
margin: 24px;
padding: 24px;
}
.m-r-10 {
margin-right: 10px;
}
.operate-top {
background: #fff;
height: 32px;
......
......@@ -20,6 +20,10 @@
<el-option label="品牌卡" :value="1"></el-option>
</el-select>
</el-form-item> -->
<h2 class="icon-type-title">
<div class="mark"></div>
礼品设置
</h2>
<el-form-item prop="openAutoShelf" label="礼品无库存自动下架">
<el-switch v-model="form.openAutoShelf"></el-switch>
</el-form-item>
......@@ -29,9 +33,25 @@
<el-checkbox label="2">协管门店</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSubmit('form')" :loading="btnLoading">确定</el-button>
<h2 class="icon-type-title" style="margin-top:40px">
<div class="mark"></div>
订单设置
</h2>
<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-form-item>
<el-form-item prop="autoConfirmReceiptDay" v-if="form.autoConfirmReceipt === 1" :rules="[{ required: true, message: '请选择自动收货天数' }]">
<el-select v-model="form.autoConfirmReceiptDay" placeholder="请选择自动收货天数">
<el-option label="7天后" :value="7"> </el-option>
<el-option label="15天后" :value="15"> </el-option>
<el-option label="30天后" :value="30"> </el-option>
</el-select>
</el-form-item>
<div class="confim-btn" :style="{ width: fixedWidth + 'px' }">
<el-form-item class="fix-btn">
<el-button type="primary" @click="handleSubmit('form')" :loading="btnLoading">保存</el-button>
</el-form-item>
</div>
</el-form>
</div>
</div>
......@@ -49,14 +69,17 @@ export default {
form: {
cardType: '',
openAutoShelf: false,
showStoreType: []
showStoreType: [],
autoConfirmReceipt: 0,
autoConfirmReceiptDay: null
},
formRules: {
cardType: [{ required: true, message: '请选择积分消耗卡', trigger: 'change' }],
openAutoShelf: [{ required: true, message: '请设置无库存自动下架', trigger: 'change' }],
showStoreType: [{ required: true, message: '请至少勾选一个门店类型', trigger: 'change' }]
},
btnLoading: false
btnLoading: false,
fixedWidth: document.documentElement.clientWidth - 200
};
},
created() {
......@@ -67,6 +90,8 @@ export default {
request.get('/api-integral-mall/get-card-config').then(res => {
if (res.data.errorCode === 0) {
this.form.cardType = res.data.result.cardType || '';
this.form.autoConfirmReceipt = res.data.result.autoConfirmReceipt || 0;
this.form.autoConfirmReceiptDay = res.data.result.autoConfirmReceiptDay || null;
this.form.openAutoShelf = res.data.result.openAutoShelf === 1 ? true : false;
this.form.showStoreType = res.data.result.showStoreType ? res.data.result.showStoreType.split(',') : [];
} else {
......@@ -76,12 +101,15 @@ export default {
},
handleSubmit(form) {
this.$refs[form].validate(valid => {
console.log(valid);
if (valid) {
let params = {
// cardType: this.form.cardType,
autoConfirmReceipt: this.form.autoConfirmReceipt,
openAutoShelf: this.form.openAutoShelf ? 1 : 0,
showStoreType: this.form.showStoreType.join(',')
};
if (params.autoConfirmReceipt === 1) params.autoConfirmReceiptDay = this.form.autoConfirmReceiptDay;
this.btnLoading = true;
request.get('/api-integral-mall/save-card-config', { params }).then(res => {
if (res.data.errorCode === 0) {
......@@ -107,4 +135,33 @@ export default {
margin: 24px;
padding: 24px;
}
.icon-type-title {
display: flex;
align-items: center;
height: 20px;
color: #303133;
font-size: 16px;
font-weight: 700;
margin-bottom: 20px;
}
.icon-type-title .mark {
width: 3px;
height: 14px;
margin-right: 8px;
background-color: #1890ff;
}
.confim-btn {
height: 32px;
padding: 12px 0;
position: fixed;
bottom: 0px;
left: 200px;
background: #fff;
z-index: 2;
text-align: center;
border-top: 1px solid #dcdfe6;
}
.fix-btn {
margin-left: -100px;
}
</style>
......@@ -32,8 +32,13 @@
<div v-show="pickStatus" style="padding:24px;">
<div class="operate-top">
<div class="fl">
<div class="search-item">
<el-input v-model="searchValue" placeholder="请输入自提点名称进行搜索" prefix-icon="el-icon-search" clearable class="w-280" @keyup.enter.native="getSearchList" @clear="getSearchList"> </el-input>
<div class="search-item m-r-10">
<el-input v-model="searchValue" placeholder="请输入自提点名称/code" prefix-icon="el-icon-search" clearable class="w-280" @keyup.enter.native="getSearchList" @clear="getSearchList"> </el-input>
</div>
<div class="search-item m-r-10">
<el-autocomplete prefix-icon="el-icon-search" popper-class="autocomplete-wrap" class="inline-input" :value="creatorName" :select-when-unmatched="true" @change.native="changeAuto" @select="selectCreator" :fetch-suggestions="querySearch" placeholder="请输入创建人" :trigger-on-focus="false">
<template slot-scope="{ item }">{{ item.creatorName }}</template>
</el-autocomplete>
</div>
<div class="search-item">
<el-select v-model="isValid" placeholder="自提点状态" clearable class="w-140" @change="getSearchList">
......@@ -43,18 +48,19 @@
</div>
</div>
<div class="fr">
<el-button plain @click="exportData"><i class="iconfont icon-icon_yunxiazai" style="margin-right:5px"></i>导出自提点</el-button>
<el-button plain @click="setPicked">自提设置</el-button>
<el-button type="primary" @click="addStore('-1')">新增自提点</el-button>
<el-button plain @click="exportData" style="margin:0 10px 0 0"><i class="iconfont icon-icon_yunxiazai" style="margin-right:5px"></i>导出自提点</el-button>
<el-button plain @click="setPicked" style="margin:0 10px 0 0">自提设置</el-button>
<el-button type="primary" @click="addStore('-1')" style="margin:0 ">新增自提点</el-button>
</div>
</div>
<div v-loading="loading">
<el-table ref="multipleTable" :data="tableDate" style="width: 100%" @selection-change="handleSelectAll">
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column prop="pickUpPointName" label="自提点名称" min-width="200px"> </el-table-column>
<el-table-column prop="storeCode" label="自提点code" min-width="100"> </el-table-column>
<el-table-column prop="pickUpPointAddress" label="自提点地址" min-width="200px"> </el-table-column>
<el-table-column prop="pickUpPointPhone" label="联系电话"> </el-table-column>
<el-table-column prop="canChooseTime" label="自提时间可选">
<el-table-column prop="canChooseTime" label="自提时间可选" min-width="150px">
<template slot-scope="scope">
<span>{{ scope.row.canChooseTime === 1 ? '是' : '否' }}</span>
</template>
......@@ -64,6 +70,7 @@
<span>{{ scope.row.isValid === 1 ? '正常' : '失效' }}</span>
</template>
</el-table-column>
<el-table-column prop="creatorName" label="创建人" min-width="150px"> </el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<div>
......@@ -116,6 +123,8 @@ export default {
return {
searchValue: '',
isValid: '',
creatorId: '',
creatorName: '',
currentPage: 1,
pageSizes: [20, 40, 60, 80],
pageSize: 20,
......@@ -125,11 +134,13 @@ export default {
loading: false,
selectList: [], //复选框选中的数据
tableDate: [],
creatorOptions: [],
pickedForm: {
dialogVisible: false,
selectIdList: [], //复选框选中的数据的id
list: [{ timeRange: [] }] //初始数据
},
creatorLoading: false,
enableAccessControl: false,
// 导出
dialogVisible: false,
......@@ -154,6 +165,39 @@ export default {
this.getStatus();
},
methods: {
changeAuto(e) {
if (!e.target.value) {
this.creatorId = '';
this.creatorName = '';
// this.getSearchList();
}
},
selectCreator(v) {
this.creatorName = '';
this.creatorId = '';
this.$nextTick(() => {
this.creatorName = v.creatorName;
this.creatorId = v.creatorId;
this.getSearchList();
});
},
querySearch(v, cb) {
this.creatorLoading = true;
let params = {
creatorName: v
};
request.get('/api-integral-mall/list-creator', { params }).then(res => {
if (res.data.errorCode === 0) {
if (res.data.result) {
cb(res.data.result);
} else {
cb([]);
}
} else {
this.$message.error(res.data.message);
}
});
},
getAccessControl() {
let params = {
requestProject: 'integral-mall'
......@@ -281,7 +325,8 @@ export default {
currentPage: this.currentPage,
pageSize: this.pageSize,
search: this.searchValue,
isValid: this.isValid
isValid: this.isValid,
creatorId: this.creatorId
};
this.loading = true;
request.post('/api-integral-mall/page-pick-up-points', qs.stringify(params)).then(res => {
......@@ -343,9 +388,15 @@ export default {
};
</script>
<style scoped>
.m-r-10 {
margin-right: 10px;
}
.w-140 {
width: 140px;
}
.w-280 {
width: 280px;
}
.section {
background: #fff;
margin: 24px;
......
......@@ -140,7 +140,6 @@
import request from '../../service/request.js';
import getInputVal from '../../utils/common.js';
// import stockModal from '../../../components/getSkuList';
import { confirmInfo } from '../../utils/user.js';
export default {
data() {
......@@ -277,14 +276,8 @@ export default {
timeHours: [{ validator: timeHoursValidator, trigger: 'blur' }],
timeMinuter: [{ validator: timeMinuterValidator, trigger: 'blur' }],
timeDay: [{ validator: timeDayValidator, trigger: 'blur' }],
orderTimeHours: [
{ required: true, message: '请输入时间', trigger: 'blur' },
{ validator: orderTimeHoursValidator, trigger: 'blur' }
],
overTime: [
{ required: true, message: '请输入提货有效期', trigger: 'blur' },
{ validator: overTimeValidator, trigger: 'blur' }
]
orderTimeHours: [{ required: true, message: '请输入时间', trigger: 'blur' }, { validator: orderTimeHoursValidator, trigger: 'blur' }],
overTime: [{ required: true, message: '请输入提货有效期', trigger: 'blur' }, { validator: overTimeValidator, trigger: 'blur' }]
},
validateTime,
// 门店控件
......@@ -534,11 +527,7 @@ export default {
this.$refs[form].validate(valid => {
if (valid) {
this.enableAccessControl = localStorage.getItem('enableAccessControl') == 'false' ? false : true;
if (this.enableAccessControl) {
confirmInfo(this.submitForm, form);
} else {
this.submitForm(form);
}
this.submitForm(form);
} else {
return false;
}
......
......@@ -218,14 +218,8 @@ export default {
timeHours: [{ validator: timeHoursValidator, trigger: 'blur' }],
timeMinuter: [{ validator: timeMinuterValidator, trigger: 'blur' }],
timeDay: [{ validator: timeDayValidator, trigger: 'blur' }],
orderTimeHours: [
{ required: true, message: '请输入时间', trigger: 'blur' },
{ validator: orderTimeHoursValidator, trigger: 'blur' }
],
overTime: [
{ required: true, message: '请输入提货有效期', trigger: 'blur' },
{ validator: overTimeValidator, trigger: 'blur' }
]
orderTimeHours: [{ required: true, message: '请输入时间', trigger: 'blur' }, { validator: orderTimeHoursValidator, trigger: 'blur' }],
overTime: [{ required: true, message: '请输入提货有效期', trigger: 'blur' }, { validator: overTimeValidator, trigger: 'blur' }]
},
submitLoading: false,
clearableBtn: false,
......
......@@ -16,7 +16,7 @@
<div>
<div class="operate-top">
<div class="fl">
<div class="search-item">
<div class="search-item" style="margin-right:10px">
<el-input v-model="searchValue" placeholder="请输入卡券名称/礼品名称/编码" prefix-icon="el-icon-search" clearable class="w-280" @keyup.enter.native="getSearchList" @clear="getSearchList"> </el-input>
</div>
<div class="search-item">
......
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