Commit ca368d35 by 胡悦
2 parents fc295ad9 2e6b58b3
...@@ -48,6 +48,28 @@ const getVerificationListApi = params => { ...@@ -48,6 +48,28 @@ const getVerificationListApi = params => {
}) })
} }
//领取记录列表
const getListReceiveRecordApi = params => {
params.method = `${defaultPath}listReceiveRecordByCouponId`
return http({
url: 'rop-scrm-coupon/router',
method: 'GET',
data: params,
sign: true
})
}
//导出领取记录列表
const exportReceiveRecordApi = params => {
params.method = `${defaultPath}exportReceiveRecordByCouponId`
return http({
url: 'rop-scrm-coupon/router',
method: 'GET',
data: params,
sign: true
})
}
//查看优惠券 //查看优惠券
const getCouponDetailApi = params => { const getCouponDetailApi = params => {
params.method = `${defaultPath}detail` params.method = `${defaultPath}detail`
...@@ -107,4 +129,4 @@ const getAllGoodsApi = params => { ...@@ -107,4 +129,4 @@ const getAllGoodsApi = params => {
} }
export default { getMerchantListApi, getVerificationListApi, effectiveCouponApi, codeVerificationApi, getCouponDetailApi, deleteCouponApi, createCouponApi, updateCouponApi, getAllGoodsApi } export default { getMerchantListApi, getVerificationListApi, effectiveCouponApi, codeVerificationApi, getCouponDetailApi, deleteCouponApi, createCouponApi, updateCouponApi, getAllGoodsApi, getListReceiveRecordApi, exportReceiveRecordApi }
import { http } from '@/main'
const defaultPath = 'scrm.api.shopmall.'
const getListApi = params => {
params.method = `${defaultPath}orderGoodsComment.page`
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
// 发布/撤销评论
const changeCommentStatusApi = params => {
params.method = `${defaultPath}orderGoodsComment.changeStatus`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 删除评论
const deleteCommentApi = params => {
params.method = `${defaultPath}orderGoodsComment.remove`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
const commentDetailApi = params => {
params.method = `${defaultPath}orderGoodsComment.detail`
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
export default { getListApi, changeCommentStatusApi, deleteCommentApi, commentDetailApi }
\ No newline at end of file \ No newline at end of file
...@@ -77,4 +77,28 @@ const examineDetailApi = params => { ...@@ -77,4 +77,28 @@ const examineDetailApi = params => {
}) })
} }
export default { getListApi, getCountApi, getOrderDetailApi, orderExportApi, writeOffApi, addDeliveryApi, examineDetailApi }
\ No newline at end of file \ No newline at end of file
// 退款审核 - 提交
const examineAllowApi = params => {
params.method = `${defaultPath}orderRefund.allow`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 确认收货
const confirmReceiptGoodsApi = params => {
params.method = `${defaultPath}order.refund.confirmReceiptGoods`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { getListApi, getCountApi, getOrderDetailApi, orderExportApi, writeOffApi, addDeliveryApi, examineDetailApi, examineAllowApi, confirmReceiptGoodsApi }
\ No newline at end of file \ No newline at end of file
...@@ -78,7 +78,7 @@ html { ...@@ -78,7 +78,7 @@ html {
.marketing .wechat-container { .marketing .wechat-container {
width: 375px; width: 375px;
margin-right: 45px; margin-left: 32px;
background: #ffffff; background: #ffffff;
position: relative; position: relative;
} }
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
<template> <template>
<div> <div>
<el-dialog :title="title" :visible.sync="isVisible" :show-close="showClose" :before-close="handleClose" :close-on-click-modal="false" :modal-append-to-body="false" :width="width"> <el-dialog :title="title" :visible.sync="isVisible" :show-close="showClose" :before-close="handleClose" :close-on-click-modal="false" :modal-append-to-body="false" :width="width">
<el-scrollbar v-if="hasScroll"> <div style="height:60vh;overflow:auto">
<el-scrollbar v-if="hasScroll">
<span slot="title"> <span slot="title">
<span class="main-title">{{ title }}</span> <span class="main-title">{{ title }}</span>
<span class="dialog-sub-title"> <span class="dialog-sub-title">
...@@ -20,6 +21,8 @@ ...@@ -20,6 +21,8 @@
</span> </span>
<slot></slot> <slot></slot>
</template> </template>
</div>
<div slot="footer"> <div slot="footer">
<slot name="btn-start"></slot> <slot name="btn-start"></slot>
...@@ -90,7 +93,7 @@ export default { ...@@ -90,7 +93,7 @@ export default {
btnSize: { btnSize: {
type: String, type: String,
default: 'mini' default: 'mini'
} },
}, },
methods: { methods: {
...@@ -113,4 +116,8 @@ export default { ...@@ -113,4 +116,8 @@ export default {
// border-bottom: 1px solid #e6e6e6; // border-bottom: 1px solid #e6e6e6;
// padding: 20px 25px; // padding: 20px 25px;
// } // }
.el-dialog-div {
height: 60vh;
overflow: auto;
}
</style> </style>
...@@ -139,6 +139,13 @@ export default { ...@@ -139,6 +139,13 @@ export default {
handleMutiSelectConfirm() { handleMutiSelectConfirm() {
var selectedData = this.$refs.mutiProRef.mutiSelectArr[this.tableParams.mutiSelectName] var selectedData = this.$refs.mutiProRef.mutiSelectArr[this.tableParams.mutiSelectName]
console.log(selectedData) console.log(selectedData)
if(!selectedData){
this.$message({
message: '未选择商品',
type: 'error'
})
return
}
this.$emit('handleMutiSelectConfirm', selectedData) this.$emit('handleMutiSelectConfirm', selectedData)
}, },
handleMutiSelectClose() { handleMutiSelectClose() {
......
<!-- 编辑代金券 --> <!-- 编辑代金券 -->
<template> <template>
<div class="edit-share marketing p-t-20"> <div class="edit-share marketing p-t-20">
<div class="container edit-container"> <div class="container edit-container" style="position: relative;">
<div class="right_show"> <div class="right_show">
<div class="card-top"></div> <div class="card-top"></div>
<div class="card-middle"> <div class="card-middle">
...@@ -24,10 +24,10 @@ ...@@ -24,10 +24,10 @@
</div> </div>
</div> </div>
<p class="edit-title">{{ title }}代金券</p> <p class="edit-title">{{ title }}代金券</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="144px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"> <glsx-combi-form class="edit-form-container" style="min-height: 570px;" ref="editFormRef" labelWidth="144px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="useChannelHtml"> <template slot="useChannelHtml">
<el-radio v-model="editForm.useChannel" label="1" :disabled="apear!='couponAdd'">线上商品</el-radio> <el-radio v-model="editForm.useChannel" label="1" :disabled="apear!='couponAdd'">线上商品</el-radio>
<el-radio v-model="editForm.useChannel" label="2" :disabled="apear!='couponAdd'" @change="clickUseChannel">到店核销</el-radio> <el-radio v-model="editForm.useChannel" label="2" :disabled="apear!='couponAdd'">到店核销</el-radio>
</template> </template>
<template slot="effectiveHtml"> <template slot="effectiveHtml">
<el-radio v-model="editForm.effectiveType" label="3" :disabled="apear!='couponAdd'">无有效期</el-radio><br> <el-radio v-model="editForm.effectiveType" label="3" :disabled="apear!='couponAdd'">无有效期</el-radio><br>
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
</el-form-item> </el-form-item>
</template> </template>
<template slot="denominationHtml"> <template slot="denominationHtml">
<el-input v-model="editForm.denomination" style="width: 150px" :disabled="apear!='couponAdd'" @blur.native.capture="denominationBlur"> <el-input v-model="editForm.denomination" style="width: 150px" :disabled="apear!='couponAdd'" @blur.native.capture="editForm.useChannel == 1 && denominationBlur($event)">
<span slot="append">元</span> <span slot="append">元</span>
</el-input> </el-input>
<span style="color:red;margin-left:15px" v-if="priceFlag">存在零售价低于代金券的商品</span> <span style="color:red;margin-left:15px" v-if="priceFlag">存在零售价低于代金券的商品</span>
...@@ -71,7 +71,8 @@ ...@@ -71,7 +71,8 @@
<el-button type="primary" v-if="editForm.goods == 2" @click="chooseGoods">选择商品</el-button> <el-button type="primary" v-if="editForm.goods == 2" @click="chooseGoods">选择商品</el-button>
</el-radio> </el-radio>
</template> </template>
<div slot="proTable" class="select-pro"> <div slot="proTable" class="select-pro" v-if="editForm.useChannel == 1">
<div style="height:110px" v-if="editForm.goodsRefList.length"></div>
<GLTable v-show="editForm.goodsRefList.length" :hasPage="false" :tableParams="tableParams" :tableData="editForm.goodsRefList"> <GLTable v-show="editForm.goodsRefList.length" :hasPage="false" :tableParams="tableParams" :tableData="editForm.goodsRefList">
<template slot="goodsImage" slot-scope="scope"> <template slot="goodsImage" slot-scope="scope">
<img class="img-60" :src="scope.scope.goodsImage"/> <img class="img-60" :src="scope.scope.goodsImage"/>
...@@ -86,47 +87,6 @@ ...@@ -86,47 +87,6 @@
</template> </template>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
<!-- <div class="view pull-left">
<img src="@/images/wechat_top.png">
<div class='view-box'>
<div class='coupon-img'>
<img src="@/images/wechatCoupon.png">
<div class="conpon-left">
<div>
<b style="font-weight: normal;font-size:20px">{{editForm.denomination}}</b><span>元</span>
<p>{{editForm.useBarriers==1?'无限制':'满'+ editForm.full + '可用'}}</p>
</div>
</div>
<div class="conpon-right">
<div class="coupon_name text-ellipsis">{{editForm.couponName}}</div>
<div class="text-ellipsis" v-if='editForm.effectiveType == 1'>有效期:领取后{{editForm.effectiveDays||0}}天</div>
<div class="text-ellipsis" v-if='editForm.effectiveType == 2'>有效期:{{couponTime}}</div>
</div>
</div>
<div class="mt3">
<div style="border-bottom: 1px solid #EEEEEE;">
<div style='padding:0 0 12px 0;'>使用说明</div>
<div style="margin-top: 8px;padding: 0;color: #999999;font-size: 12px;word-wrap:break-word;" v-for="(item,index) in remarksView" :key="index">{{item}}</div>
</div>
<div>
<div style='padding:0 0 12px 0;'>适用门店</div>
<div class="user" style='margin-top: -8px;'>
<img src="@/images/test.png" style="margin-left: -20px;" />
</div>
<div style='margin-top: 8px;padding: 0;color: #999999;font-size: 12px;word-wrap:break-word;'></div>
<div style='margin-top: 8px;padding: 0;color: #999999;font-size: 12px;word-wrap:break-word;'>营业时间:</div>
<div style='margin-top: 8px;padding: 0;color: #999999;font-size: 12px;word-wrap:break-word;'>联系电话:</div>
</div>
</div>
</div>
<div class="view-btn">
<div>
<img src="@/images/wechat_home.png">
<div>首页</div>
</div>
<div>立即领取</div>
</div>
</div> -->
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="default" v-if="apear!='couponSee'" @click="handleCancel">取消</el-button> <el-button type="default" v-if="apear!='couponSee'" @click="handleCancel">取消</el-button>
<el-button type="primary" v-if="apear!='couponSee'" @click="handleConfirm">确定</el-button> <el-button type="primary" v-if="apear!='couponSee'" @click="handleConfirm">确定</el-button>
...@@ -263,7 +223,8 @@ export default { ...@@ -263,7 +223,8 @@ export default {
{ {
label: '适用商品', label: '适用商品',
name: 'goods', name: 'goods',
addHtml: 'goodsHtml' addHtml: 'goodsHtml',
isHide: false
}, },
{ {
// label: '门店', // label: '门店',
...@@ -328,7 +289,17 @@ export default { ...@@ -328,7 +289,17 @@ export default {
if(newValue){ if(newValue){
this.remarksView = newValue.split('\n') this.remarksView = newValue.split('\n')
} }
} },
'editForm.useChannel'(newValue, oldValue){
console.log(newValue);
if(newValue == 1){
this.editFormData[6].isHide = false
}else{
this.editForm.useBarriers = '1'
this.editForm.full = ''
this.editFormData[6].isHide = true
}
},
}, },
methods: { methods: {
...@@ -405,6 +376,7 @@ export default { ...@@ -405,6 +376,7 @@ export default {
}, },
denominationBlur(event){ denominationBlur(event){
console.log('111');
if(event.target.value*100 > this.minPirce){ if(event.target.value*100 > this.minPirce){
this.priceFlag = true this.priceFlag = true
}else{ }else{
...@@ -433,13 +405,14 @@ export default { ...@@ -433,13 +405,14 @@ export default {
this.editForm.goodsRefList.push(good) this.editForm.goodsRefList.push(good)
}) })
} }
this.tableParams.tableOption = false this.tableParams.tableOption = false //去掉操作栏
}) })
}, },
//选择到店核销使用限制默认无使用门槛 //选择到店核销使用限制默认无使用门槛
clickUseChannel(){ clickUseChannel(){
this.editForm.useBarriers = '1' this.editForm.useBarriers = '1'
this.editFormData[6].isHide = true
}, },
validateRules(){ validateRules(){
...@@ -510,11 +483,13 @@ export default { ...@@ -510,11 +483,13 @@ export default {
//有效期或者间隔天数使用次数 //有效期或者间隔天数使用次数
obj.useAmount = 1 obj.useAmount = 1
//适用商品 if(form.useChannel == 1){//使用途径选择线上商品才需要对应的商品
if(form.goods == 1){//全部商品 //适用商品
obj.goodsIdList = this.selectedAllProList.length ? this.selectedAllProList.map(item => item.id) : [] if(form.goods == 1){//全部商品
}else{//指定商品 obj.goodsIdList = this.selectedAllProList.length ? this.selectedAllProList.map(item => item.id) : []
obj.goodsIdList = form.goodsRefList.length ? form.goodsRefList.map(item => item.id) : [] }else{//指定商品
obj.goodsIdList = form.goodsRefList.length ? form.goodsRefList.map(item => item.id) : []
}
} }
} }
//使用描述 //使用描述
...@@ -531,7 +506,7 @@ export default { ...@@ -531,7 +506,7 @@ export default {
} }
var params = this.getCouponInfoParams() var params = this.getCouponInfoParams()
console.log(params); console.log(params);
if(this.apear == 'couponAdd' && !params.goodsIdList.length){ if(this.apear == 'couponAdd' && params.useChannel == 1 && !params.goodsIdList.length){
this.$message({ this.$message({
message: '未选择商品', message: '未选择商品',
type: 'error' type: 'error'
......
<!-- 编辑代金券 --> <!-- 编辑代金券 -->
<template> <template>
<div class="edit-share marketing p-t-20"> <div class="edit-share marketing p-t-20">
<div class="container edit-container" style="height: 630px;"> <div class="container edit-container" style="height: 630px;position: relative;">
<div class="right_show"> <div class="right_show">
<div class="card-top"></div> <div class="card-top"></div>
<div class="card-middle"> <div class="card-middle">
......
<!-- 编辑代金券 --> <!-- 编辑代金券 -->
<template> <template>
<div class="edit-share marketing p-t-20"> <div class="edit-share marketing p-t-20">
<div class="container edit-container"> <div class="container edit-container" style="height: 630px;position: relative;">
<div class="right_show"> <div class="right_show">
<div class="card-top"></div> <div class="card-top"></div>
<div class="card-middle"> <div class="card-middle">
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<el-button v-if="scope.scope.status == '2' || scope.scope.status == '3'" type="text" @click="handleEdit(3,scope.scope)">查看</el-button> <el-button v-if="scope.scope.status == '2' || scope.scope.status == '3'" type="text" @click="handleEdit(3,scope.scope)">查看</el-button>
<el-button v-if="scope.scope.status == '1' || scope.scope.status == '3'" type="text" @click="del(scope.scope)">删除</el-button> <el-button v-if="scope.scope.status == '1' || scope.scope.status == '3'" type="text" @click="del(scope.scope)">删除</el-button>
<el-button type="text" @click="writeOffDetail(scope.scope)">核销详情</el-button> <el-button type="text" @click="writeOffDetail(scope.scope)">核销详情</el-button>
<el-button type="text" @click="receiveDetail(scope.scope)">领取详情</el-button>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -65,7 +66,6 @@ export default { ...@@ -65,7 +66,6 @@ export default {
label: '名称', label: '名称',
name: 'couponName', name: 'couponName',
type: 'input', type: 'input',
width: '215px',
maxlength: 20 maxlength: 20
}, },
// { // {
...@@ -79,7 +79,6 @@ export default { ...@@ -79,7 +79,6 @@ export default {
label: '优惠券类型', label: '优惠券类型',
name: 'discountType', name: 'discountType',
type: 'select', type: 'select',
width: '215px',
optionList: [], optionList: [],
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
...@@ -89,7 +88,6 @@ export default { ...@@ -89,7 +88,6 @@ export default {
label: '优惠券状态', label: '优惠券状态',
name: 'status', name: 'status',
type: 'select', type: 'select',
width: '215px',
optionList: [], optionList: [],
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
...@@ -248,6 +246,11 @@ export default { ...@@ -248,6 +246,11 @@ export default {
this.$router.push('/couponManage/writeOffDetail/' + row.id) this.$router.push('/couponManage/writeOffDetail/' + row.id)
}, },
//领取记录
receiveDetail(row){
this.$router.push('/couponManage/receiveDetail/' + row.id)
},
//删除 //删除
del(row){ del(row){
var params = {} var params = {}
......
<!-- 领取详情 -->
<template>
<div class="marketing pro-group p-t-20">
<div class="container">
<div>
<glsx-combi-form ref="showSearch" labelWidth="100px" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns">
<el-button :size="size" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="exportExcel">导出</el-button>
<el-button :size="size" @click="goback">返回</el-button>
</span>
</glsx-combi-form>
</div>
<div class="icon-tips icon-green" style="width: 98%;display: inline-block; margin-bottom: 20px;">
<img src="../../images/comment.png" />
<span>优惠券名称:<i>{{coupon.couponName}}</i></span>
<span>发行总量:<i>{{coupon.stock}}</i></span>
<span>领取量:<i>{{coupon.getAmount}}</i></span>
<span>有效期:<i>{{effective}}</i></span>
<span>使用限制:<i>{{useB}}</i></span>
</div>
<!-- 表格区域 开始 -->
<GLTable ref="receiveList" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
</GLTable>
<!-- 表格区域 end -->
</div>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
export default {
name: 'receiveDetail',
data() {
return {
size: 'small',
coupon: {
couponName: '',
stock: '',
getAmount: ''
},
effective: '',
useB: '',
// 表格
searchForm: {
phone: ''
},
tableSearchForm: {},
// 搜索
searchFormData: [
{
label: '手机号',
name: 'phone',
type: 'input',
maxlength: 11
}
],
// 表格
getListApi: this.$apis.couponManage.getListReceiveRecordApi,
tableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '手机号',
prop: 'phone'
},
{
label: '领取时间',
prop: 'createdDate',
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
baseData: {
},
exportLoading: false
}
},
components: {
},
mounted() {
this.getOptionsList('searchFormData')
this.getInfo(this.$route.params.id)
},
methods: {
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
params.couponId = this.$route.params.id
return params
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
resolve()
})
},
getInfo(couponId) {
var params = {}
params.couponId = couponId
this.$apis.couponManage.getCouponDetailApi(params).then(res => {
this.coupon = res
this.effective = ''
this.useB = ''
var coupon = res
//有效期
if(coupon.effectiveType == 1){//固定天数,领取后计算
this.effective = coupon.effectiveDays + '天'
}else if(coupon.effectiveType == 2){//时间段
this.effective = coupon.effectiveStartTime + ' - ' + coupon.effectiveEndTime
}else if(coupon.effectiveType == 3){//无有效期
this.effective = '无有效期'
}
if(coupon.discountType == 3){//代金券
//使用限制
if(coupon.useBarriers == 1){//无限制
this.useB = '无限制'
}else if(coupon.useBarriers == 2){//满减
this.useB = '满' + coupon.full + '元可用'
}
}
if(coupon.discountType == 7){//会员服务
//使用限制
if(coupon.useType == 0){//无限制
this.useB = '无限制'
}else if(coupon.useType == 1){//有效期内可使用次数
this.useB = '有效期内可使用' + coupon.useAmount + '次'
}else if(coupon.useType == 2){//有效期内多少天内可使用次数
this.useB = '有效期内' + coupon.useLimitDays + '天可使用' + coupon.usedAmount + '次'
}
}
})
},
writeOff(){
this.writeOffVisible = !this.writeOffVisible
},
/**导出excel */
exportExcel(){
this.exportLoading = true
var params = this.getParams()
this.$apis.couponManage.exportReceiveRecordApi(params).then(res => {
this.exportLoading = false
window.location.href = res
})
},
//返回
goback(){
this.$router.push('/couponManage/index')
},
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle)
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
} else {
this[formName].forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName].length) {
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
}
})
}
},
handleSearch() {
this.$refs.receiveList.refreshTable()
},
handleReset() {
this.searchForm = {
phone: ''
}
this.handleSearch()
}
}
}
</script>
<style scoped>
.modal-title span {
font-size: 12px;
font-weight: 400;
}
.icon-green {
background-color: rgba(3,153,69,.2);
border: 1px solid rgba(3,153,69,.2);
}
.icon-tips {
border-radius: 2px;
font-size: 12px;
color: #333;
line-height: 30px;
padding: 0 10px 0 30px;
position: relative;
}
.icon-tips span {
margin-right: 10px;
}
.icon-tips i {
font-style: normal;
color: #ff3f3f;
margin: 0 3px;
}
.icon-tips img {
position: absolute;
top: 8px;
left: 10px;
}
</style>
<!-- 商品管理-门店 --> <!-- 核销详情 -->
<template> <template>
<div class="marketing pro-group p-t-20"> <div class="marketing pro-group p-t-20">
<div class="container"> <div class="container">
...@@ -166,7 +166,7 @@ export default { ...@@ -166,7 +166,7 @@ export default {
}else if(coupon.useType == 1){//有效期内可使用次数 }else if(coupon.useType == 1){//有效期内可使用次数
this.useB = '有效期内可使用' + coupon.useAmount + '次' this.useB = '有效期内可使用' + coupon.useAmount + '次'
}else if(coupon.useType == 2){//有效期内多少天内可使用次数 }else if(coupon.useType == 2){//有效期内多少天内可使用次数
this.useB = '有效期内' + coupon.useLimitDays + '天可使用' + coupon.usedAmount + '次' this.useB = '有效期内' + coupon.useLimitDays + '天可使用' + coupon.useAmount + '次'
} }
} }
}) })
......
...@@ -2,12 +2,6 @@ ...@@ -2,12 +2,6 @@
<template> <template>
<div class="home-set marketing p-t-20"> <div class="home-set marketing p-t-20">
<div class="container edit-container flex"> <div class="container edit-container flex">
<div class="wechat-container">
<div class="wechat-box">
<img class="w-100-per" src="./images/home-set-head.png" />
<img class="w-100-per" src="./images/home-set-footer.png" />
</div>
</div>
<div class="home-set-form flex-grow"> <div class="home-set-form flex-grow">
<div v-for="(item, index) in externalFormList" :key="index"> <div v-for="(item, index) in externalFormList" :key="index">
<p class="edit-sub-title">{{ item.title }}</p> <p class="edit-sub-title">{{ item.title }}</p>
...@@ -67,6 +61,12 @@ ...@@ -67,6 +61,12 @@
</glsx-combi-form> </glsx-combi-form>
</div> </div>
</div> </div>
<div class="wechat-container">
<div class="wechat-box">
<img class="w-100-per" src="./images/home-set-head.png" />
<img class="w-100-per" src="./images/home-set-footer.png" />
</div>
</div>
</div> </div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" @click="handleConfirm">确定</el-button> <el-button type="primary" @click="handleConfirm">确定</el-button>
......
<!-- 评论详情 --> <!-- 评论详情 -->
<template> <template>
<div class="edit-share marketing"> <div class="comment-detail marketing">
<div class="container edit-container"> <div class="container edit-container">
<p class="edit-title">{{ title }}</p> <p class="edit-title">{{ title }}</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="140px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"></glsx-combi-form> <div class="comment-container">
<div class="flex">
<img class="img-100" :src="commentInfo.customerImg" />
<span class="good-name">{{commentInfo.goodsName}}</span>
</div>
<div class="flex m-t-24">
<span class="comment-label">评分星级:</span>
<img v-for="(item, index) in starList" :key="index" class="icon-star" src="@/assets/icon-star.png"/>
</div>
<div class="flex m-t-24">
<span class="comment-label">评价内容:</span>
<span class="comment-txt">{{commentInfo.commentContent || '-'}}</span>
</div>
<div v-show="commentInfo.imgUrls" class="m-t-24">
<span class="comment-label">图片:</span>
<div class="flex" style="flex-wrap: wrap;">
<img class="img-100 comment-img" v-for="(item, index) in commentInfo.imgUrls" :key="index" :src="item"/>
</div>
</div>
</div>
</div> </div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" @click="handleConfirm">确定</el-button> <el-button type="default" @click="handleCancel">返回</el-button>
<el-button type="default" @click="handleCancel">取消</el-button>
</div> </div>
</div> </div>
</template> </template>
...@@ -23,47 +41,10 @@ export default { ...@@ -23,47 +41,10 @@ export default {
footerWidth: '0', footerWidth: '0',
editChildRef: 'editChildRef', editChildRef: 'editChildRef',
routeInfo: { routeInfo: {
// 1-新增;2-编辑;3-查看
addOrEdit: 1,
id: '' id: ''
}, },
editForm: { starList : [],
// 专区类型(1发现频道,2商城专区) commentInfo: {}
zoneType: '2',
zoneName: '',
zoneImg: '',
merchantList: []
},
editRule: {
zoneName: [{ required: true, message: '请输入专区名称', trigger: 'change' }],
zoneImg: [{ required: true, message: '请选择专区图片', trigger: 'change' }],
merchantList: [{ required: true, message: '请选择门店', trigger: 'change' }]
},
editFormData: [
{
label: '专区名称',
name: 'zoneName',
width: '320px',
type: 'input',
maxlength: 20
},
{
label: '专区图片',
name: 'zoneImg',
type: 'upload',
width: '320px',
limitSize: 10,
maxPhotoNum: 1,
handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
this.$apis.common.uploadImgApi({ file: base64, fileType: 'image' }).then(res => {
this.editForm[targetItem.name] = res
this.$refs.editFormRef.$refs[this.editChildRef].validateField(targetItem.name)
})
}
}
]
} }
}, },
...@@ -76,32 +57,9 @@ export default { ...@@ -76,32 +57,9 @@ export default {
methods: { methods: {
getInfo() { getInfo() {
// this.$apis.zoneList.getZoneInfoApi({ id: this.routeInfo.id }).then(res => { this.$apis.orderComment.commentDetailApi({ id: this.routeInfo.id }).then(res => {
// this.editForm.zoneName = res.zoneName this.commentInfo = res || {}
// this.editForm.zoneImg = res.zoneImg this.starList = new Array(this.commentInfo.starLevel)
// this.editForm.merchantList = res.merchantRefList
// this.editForm.merchantList.forEach(item => {
// item.merchantNo = item.merchantId
// })
// })
},
handleConfirm() {
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var params = this.$common.utils.deepClone(this.editForm)
if (this.routeInfo.addOrEdit == 2) {
params.id = this.routeInfo.id
}
// this.$apis.zoneList.insertZoneApi(params).then(res => {
// this.$message({
// message: res.code == '0' ? '操作成功' : '操作失败',
// type: res.code == '0' ? 'success' : 'error'
// })
// if (res.code == '0') {
// this.handleCancel()
// }
// })
}
}) })
}, },
handleCancel() { handleCancel() {
...@@ -112,4 +70,39 @@ export default { ...@@ -112,4 +70,39 @@ export default {
} }
} }
</script> </script>
<style scoped></style> <style>
.comment-detail .comment-container {
padding: 32px 52px;
color: #333333;
font-size: 14px;
}
.comment-detail .comment-container .flex {
justify-content: flex-start;
}
.comment-detail .comment-container .m-t-24 {
margin-top: 24px;
}
.comment-detail .comment-label {
display: inline-block;
width: 80px;
line-height: 20px;
flex-shrink: 0;
}
.comment-detail .comment-txt {
line-height: 20px;
word-break: break-all;
}
.comment-detail .good-name {
padding-left: 20px;
font-size: 16px;
font-weight: 500;
}
.comment-detail .icon-star {
width: 20px;
height: 20px;
}
.comment-detail .comment-img {
margin-top: 10px;
margin-right: 20px;
}
</style>
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="commentRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="commentRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button v-if="scope.scope.shareStatus == 0" type="text" @click="handleRevoke(scope.scope)">发布</el-button> <el-button v-if="scope.scope.commentStatus == '0'" type="text" @click="handleRevoke(scope.scope)">发布</el-button>
<el-button v-if="scope.scope.shareStatus == 1" type="text" @click="handleRevoke(scope.scope)">撤回</el-button> <el-button v-if="scope.scope.commentStatus == '1'" type="text" @click="handleRevoke(scope.scope)">撤回</el-button>
<el-button type="text" @click="handleDetail(scope.scope)">查看</el-button> <el-button type="text" @click="handleDetail(scope.scope)">查看</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button> <el-button type="text" @click="handleDelete(scope.scope)">删除</el-button>
</div> </div>
...@@ -57,7 +57,7 @@ export default { ...@@ -57,7 +57,7 @@ export default {
} }
], ],
// 表格 // 表格
getListApi: this.$apis.orderShare.getListApi, getListApi: this.$apis.orderComment.getListApi,
tableParams: { tableParams: {
listName: 'list', listName: 'list',
tableOption: true, tableOption: true,
...@@ -65,24 +65,26 @@ export default { ...@@ -65,24 +65,26 @@ export default {
{ {
label: '评价日期', label: '评价日期',
prop: 'createdDate', prop: 'createdDate',
width: '180', // width: '180',
formatter: cellValue => { formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss') return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
} }
}, },
{ {
label: '评价状态', label: '评价状态',
prop: 'shareSource' prop: 'commentStatus',
// formatter: cellValue => { line: 1,
// return this.baseData.sourceList.find(item => item.confId == cellValue.shareSource).confName formatter: cellValue => {
// } return this.baseData.commentStatusList.find(item => item.confId == cellValue.commentStatus).confName
}
}, },
{ {
label: '评论人', label: '评论人',
prop: 'shareStatus' prop: 'customerName',
// formatter: cellValue => { line: 1,
// return this.baseData.statusList.find(item => item.confId == cellValue.shareStatus).confName formatter: cellValue => {
// } return cellValue.customerName || '-'
}
} }
] ]
}, },
...@@ -110,8 +112,8 @@ export default { ...@@ -110,8 +112,8 @@ export default {
getParams() { getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm)) var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.createDate.length) { if (this.searchForm.createDate.length) {
params.createStartDate = new Date(this.searchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00' params.createStartDateStr = new Date(this.searchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.createEndDate = new Date(this.searchForm.createDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59' params.createEndDateStr = new Date(this.searchForm.createDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
} }
delete params.createDate delete params.createDate
return params return params
...@@ -131,36 +133,34 @@ export default { ...@@ -131,36 +133,34 @@ export default {
type: 'warning', type: 'warning',
callback: action => { callback: action => {
if (action == 'confirm') { if (action == 'confirm') {
// this.$apis[apiModule][apiName](apiParams).then(res => { this.$apis[apiModule][apiName](apiParams).then(res => {
// this.$message({ this.$message({
// message: res.code == '0' ? '操作成功' : res.message, message: res.code == '0' ? '操作成功' : res.message,
// type: res.code == '0' ? 'success' : 'error' type: res.code == '0' ? 'success' : 'error'
// }) })
// if (res.code == '0') { if (res.code == '0') {
// fn && fn() fn && fn()
// this.handleSearch() this.handleSearch()
// } }
// }) })
} }
} }
}) })
}, },
// 1-新增;2-编辑
// handleEdit(addOrEdit, row) {
// addOrEdit == 1 ? this.$router.push('/orderShare/editShare/' + addOrEdit) : this.$router.push('/orderShare/editShare/' + addOrEdit + '/' + row.id)
// },
// 查看 // 查看
handleDetail(row) { handleDetail(row) {
this.$router.push('/orderComment/commentDetail/' + row.id) this.$router.push('/orderComment/commentDetail/' + row.id)
}, },
// 发布/撤回 // 发布/撤回
handleRevoke(row) { handleRevoke(row) {
this.secondConfirm('撤回', '是否确认撤回该评论?', 'orderShare', 'revokeShareRecordApi', { id: row.id }) var txt = row.commentStatus == '0' ? '发布' : '撤回'
this.secondConfirm(txt, '是否确认'+ txt +'该评论?', 'orderComment', 'changeCommentStatusApi', { id: row.id, commentStatus: row.commentStatus == '0' ? 1 : 0 })
}, },
handleDelete(row) { handleDelete(row) {
this.secondConfirm('删除', '是否确认删除该评论?', 'orderShare', 'deleteShareRecordApi', { id: row.id }) this.secondConfirm('删除', '是否确认删除该评论?', 'orderComment', 'deleteCommentApi', { id: row.id })
}, },
getOptionsList(formName, hasAll = true, refreshSigle) { getOptionsList(formName, hasAll = true, refreshSigle) {
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<el-form label-width="100px" :inline="true"> <el-form label-width="100px" :inline="true">
<el-row v-for="(item, index) in afterInfoDataRow" :key="index"> <el-row v-for="(item, index) in afterInfoDataRow" :key="index">
<el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label"> <el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label">
<span class="detail-txt ellipsis-1" :title="orderRefund[subItem.name]">{{orderRefund[subItem.name]}}</span> <span class="detail-txt ellipsis-1" :title="orderRefund[subItem.name]">{{orderRefund[subItem.name] || '-'}}</span>
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
...@@ -178,7 +178,7 @@ export default { ...@@ -178,7 +178,7 @@ export default {
this.detailForm = res this.detailForm = res
this.orderRefund = res.orderRefund || null this.orderRefund = res.orderRefund || null
if(this.orderRefund) { if(this.orderRefund) {
this.orderRefund.refundTypeName = this.baseData.refundTypeList.map(item => item.confId).includes(res.refundType + '') ? this.baseData.refundTypeList.find(item => item.confId == res.refundType).confName : '-' this.orderRefund.refundTypeName = this.baseData.refundTypeList.map(item => item.confId).includes(res.orderRefund.refundType + '') ? this.baseData.refundTypeList.find(item => item.confId == res.orderRefund.refundType).confName : '-'
this.orderRefund.createdDateStr = dayjs(this.orderRefund.createdDate).format('YYYY-MM-DD HH:mm:ss') this.orderRefund.createdDateStr = dayjs(this.orderRefund.createdDate).format('YYYY-MM-DD HH:mm:ss')
} }
this.orderGoods = res.orderGoods || [] this.orderGoods = res.orderGoods || []
...@@ -202,6 +202,9 @@ export default { ...@@ -202,6 +202,9 @@ export default {
.marketing.order-detail .el-form--inline .el-form-item__content { .marketing.order-detail .el-form--inline .el-form-item__content {
height: 30px; height: 30px;
} }
.marketing.order-detail .flex {
justify-content: flex-start;
}
.detail-txt { .detail-txt {
display: inline-block; display: inline-block;
width: 220px; width: 220px;
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
end-placeholder="结束日期" end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
:picker-options="pickerOptions" :picker-options="pickerOptions"
:default-time="['00:00:00', '23:59:59']"
:disabled="isDisabled" clearable> :disabled="isDisabled" clearable>
</el-date-picker> </el-date-picker>
<!-- </el-form-item> --> <!-- </el-form-item> -->
......
...@@ -187,6 +187,7 @@ export default { ...@@ -187,6 +187,7 @@ export default {
merchantAccountLevel: item.merchantAccountLevel merchantAccountLevel: item.merchantAccountLevel
}) })
}) })
console.log(params)
this.$apis.zoneList.insertZoneApi(params).then(res => { this.$apis.zoneList.insertZoneApi(params).then(res => {
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : '操作失败', message: res.code == '0' ? '操作成功' : '操作失败',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!