Commit ff49f661 by 前端

Merge branch 'chenwq_dev_v2.5.0' into 'v2.5.0'

Chenwq dev v2.5.0 to v2.5.0

See merge request !194
2 parents 89c41ee8 29c46baf
......@@ -13,7 +13,7 @@
"el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5",
"glsx-common": "^1.4.6",
"glsx-components": "^1.3.9",
"glsx-components": "^1.4.2",
"lodash": "^4.17.21",
"node-sass": "^4.0.0",
"vue": "^2.6.10",
......
......@@ -183,4 +183,16 @@ const getAllGoodsApi = params => {
})
}
export default { getCouponListApi, couponExportApi, couponGroupExportApi, couponStoreExportApi, getPackageListApi, getVerificationListApi, verificationExportApi, effectiveCouponApi, codeVerificationApi, getCouponDetailApi, deleteCouponApi, createCouponApi, updateCouponApi, getAllGoodsApi, getListReceiveRecordApi, exportReceiveRecordApi }
// 优惠券-作废
const couponUserCancelApi = params => {
params.method = `scrm.api.coupon.user.cancel`
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { getCouponListApi, couponExportApi, couponGroupExportApi, couponStoreExportApi, getPackageListApi, getVerificationListApi, verificationExportApi, effectiveCouponApi, codeVerificationApi, getCouponDetailApi, deleteCouponApi, createCouponApi, updateCouponApi, getAllGoodsApi, getListReceiveRecordApi, exportReceiveRecordApi, couponUserCancelApi }
......@@ -67,7 +67,7 @@ export default {
{
label: '创建日期',
prop: 'createdDate',
width: '180',
// width: '180',
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
......
......@@ -166,6 +166,7 @@ export default {
{
label: '使用途径',
name: 'useChannel',
width: 160,
formatter: cellValue => {
var useChannel = '-'
if (cellValue.useChannel) {
......
......@@ -17,15 +17,7 @@
</div>
</div>
<div class="container">
<div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData"></glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormDataTwo">
<span slot="footer" class="footer-btns">
<el-button :size="size" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</span>
</glsx-combi-form>
</div>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="flex m-b-10 w-100-percent">
<span class="table-title">领取详情列表</span>
......@@ -37,6 +29,9 @@
<span :class="['table-circle', 'm-r-8', scope.scope.userStatus == 1 ? 'back-green' : scope.scope.userStatus == 2 ? 'back-red' : 'back-grey']"></span>
<span>{{ baseData.userStatusList.find(item => item.confId == scope.scope.userStatus).confName }}</span>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
<!-- 表格区域 end -->
</div>
......@@ -44,6 +39,15 @@
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" :size="size" @click="goback">返回</el-button>
</div>
<!-- 作废 -->
<glsx-dialog title="作废确认" :isVisible.sync="isCancelVisible" @confirmDialog="handleCancelConfirm" @closeDialog="handleCancelClose">
<p>请先和客户沟通在确认,避免引起客诉,作废后客户将不可使用该礼包下所有优惠卷</p>
<el-form ref="cancelRef" label-width="100px" :rules="cancelRules" :model="cancelForm">
<el-form-item label="作废原因" prop="cancelReason">
<el-input :size="size" v-model="cancelForm.cancelReason" placeholder="请输入作废原因" maxlength="50"></el-input>
</el-form-item>
</el-form>
</glsx-dialog>
</div>
</template>
......@@ -58,6 +62,15 @@ export default {
footerLeft: '0',
footerWidth: '0',
url: url,
// 作废
isCancelVisible: false,
cancelForm: {
userCouponId: '',
cancelReason: ''
},
cancelRules: {
cancelReason: [{ required: true, message: '请输入作废原因', trigger: 'change' }]
},
coupon: {
couponName: '',
stock: '',
......@@ -113,6 +126,26 @@ export default {
name: 'usedAmount'
}
],
// 表格按钮
tableButtonList: [
{
type: 'el-button',
name: '作废',
attrs: {
type: 'text'
// disabled: (row, condition) => {
// return +row.userStatus != 1
// }
},
condition: row => {
return +row.userStatus == 1
// return true
},
listeners: {
click: this.handleCancel
}
}
],
// 表格
searchForm: {
userInfo: '',
......@@ -146,9 +179,7 @@ export default {
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'userStatusList'
}
],
searchFormDataTwo: [
},
{
label: '领取日期',
name: 'daterange',
......@@ -161,7 +192,7 @@ export default {
getListApi: this.$apis.couponManage.getListReceiveRecordApi,
tableParams: {
listName: 'list',
tableOption: false,
tableOption: true,
tableColumns: [
{
label: '领取用户',
......@@ -197,10 +228,6 @@ export default {
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
baseData: {
userStatusList: [
// {
// confId: '0',
// confName: '未领取'
// },
{
confId: '1',
confName: '未使用'
......@@ -212,6 +239,10 @@ export default {
{
confId: '3',
confName: '已失效'
},
{
confId: '4',
confName: '已作废'
}
],
wechatUserFlagList: [
......@@ -322,8 +353,39 @@ export default {
})
},
writeOff() {
this.writeOffVisible = !this.writeOffVisible
handleCancel(row) {
this.cancelForm.userCouponId = row.id
this.cancelVisibleChange()
},
cancelVisibleChange() {
this.$refs.cancelRef && this.$refs.cancelRef.clearValidate()
this.isCancelVisible = !this.isCancelVisible
},
handleCancelClose() {
this.cancelVisibleChange()
this.cancelForm = {
userCouponId: '',
cancelReason: ''
}
},
handleCancelConfirm() {
this.$refs.cancelRef.validate(valid => {
if (valid) {
this.$apis.couponManage.couponUserCancelApi(this.cancelForm).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
this.handleCancelClose()
this.handleSearch()
}
})
}
})
},
/**导出excel */
......
......@@ -26,6 +26,12 @@
<template slot="discountType" slot-scope="scope">
<img :src="require(`@/assets/coupon/icon-${attrToIcon[scope.scope.discountType]}.png`)" />
</template>
<template slot="packageName" slot-scope="scope">
<span v-if="$isGroupUp">{{ scope.scope.packageId ? scope.scope.packageName : scope.scope.directionalGiftId ? scope.scope.directionalGiftName : '-' }}</span>
<div v-else>
<p>{{ packageNameTxtObj[scope.scope.receiveWay] }}</p>
</div>
</template>
<span slot="orderCodeHtml" slot-scope="scope">
<span class="cursor-pointer" @click="couponNameHandleDetail(scope.scope)" v-if="scope.scope.directionalGiftId">{{ scope.scope.directionalGiftName }}</span>
<span class="cursor-pointer" @click="orderCodeHandleDetail(scope.scope)" v-else>{{ scope.scope.orderCode }}</span>
......@@ -167,6 +173,7 @@ export default {
{
label: '用户信息',
prop: 'userName',
width: 220,
formatter: cellValue => {
return cellValue.userName + ' ' + cellValue.phone
}
......@@ -186,6 +193,7 @@ export default {
{
label: '剩余核销次数',
prop: 'residueAmount',
width: 120,
formatter: cellValue => {
return cellValue.residueAmount || cellValue.residueAmount == 0 ? cellValue.residueAmount : '不限制次数'
}
......@@ -201,6 +209,8 @@ export default {
{
label: '券来源',
prop: 'packageName',
addHtml: 'packageName',
width: 200,
formatter: cellValue => {
let txt = ''
if (this.$isGroupUp) {
......@@ -223,6 +233,7 @@ export default {
{
label: '核销日期',
prop: 'verificationTime',
width: 200,
formatter: cellValue => {
return dateFormat(cellValue.verificationTime)
}
......@@ -235,6 +246,16 @@ export default {
4: 'exchange',
7: 'service'
},
packageNameTxtObj: {
'': '-',
1: '营销活动',
2: '营销活动',
3: '会员服务套餐',
4: '营销活动',
5: '关联商品购买',
6: '通过集团套餐赠送',
7: '通过定向礼包赠送'
},
baseData: {
discountTypeList: [
{
......
......@@ -113,6 +113,11 @@ export default {
}
return false
}
},
{
label: '推荐人:',
prop: 'shareStaffName',
span: 8
}
],
basicParams: [
......
......@@ -100,6 +100,10 @@ export default {
name: 'customerPhone'
},
{
label: '推荐人',
name: 'shareStaffName'
},
{
label: '车架号',
name: 'vin'
},
......
......@@ -5,9 +5,7 @@
<GLButton :size="size" type="primary" fn="新建商品" class="el-icon-plus" @click="handleEdit(1)">新建商品</GLButton>
</div>
<div class="container">
<div>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
</div>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- 表格区域 开始 -->
<GLTable ref="proGroupRef" class="table-img" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
......@@ -18,11 +16,12 @@
</el-popover>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleUpOrDown(scope.scope)">{{ scope.scope.goodsStatus ? '下架' : '上架' }}</el-button>
<!-- <el-button type="text" @click="handleUpOrDown(scope.scope)">{{ scope.scope.goodsStatus ? '下架' : '上架' }}</el-button>
<GLButton v-if="!scope.scope.goodsStatus" type="text" fn="编辑" @click="handleEdit(2, scope.scope)">编辑</GLButton>
<GLButton v-if="scope.scope.goodsStatus" type="text" fn="查看" @click="handleEdit(3, scope.scope)">查看</GLButton>
<el-button type="text" @click="handleTop(scope.scope)">置顶</el-button>
<el-button type="text" @click="handleShare(scope.scope)">分享</el-button>
<el-button type="text" @click="handleShare(scope.scope)">分享</el-button> -->
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
<!-- 表格区域 end -->
......@@ -95,6 +94,69 @@ export default {
optionsName: 'goodsStatusList'
}
],
// 表格按钮
tableButtonList: [
{
type: 'el-button',
name: row => {
return row.goodsStatus ? '下架' : '上架'
},
attrs: {
type: 'text'
},
listeners: {
click: this.handleUpOrDown
}
},
{
type: 'GLButton',
name: '编辑',
attrs: {
type: 'text',
fn: '编辑'
},
condition: row => {
return !row.goodsStatus
},
listeners: {
click: row => this.handleEdit(2, row)
}
},
{
type: 'GLButton',
name: '查看',
attrs: {
type: 'text',
fn: '查看'
},
condition: row => {
return row.goodsStatus
},
listeners: {
click: row => this.handleEdit(3, row)
}
},
{
type: 'el-button',
name: '置顶',
attrs: {
type: 'text'
},
listeners: {
click: this.handleTop
}
},
{
type: 'el-button',
name: '分享',
attrs: {
type: 'text'
},
listeners: {
click: this.handleShare
}
}
],
// 表格
getListApi: this.$apis.proManage.getListApi,
tableParams: {
......
......@@ -6,9 +6,7 @@
<GLButton :size="size" type="primary" fn="新建商品" class="el-icon-plus" @click="handleEdit(1)">新建商品</GLButton>
</div>
<div class="container">
<div>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
</div>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- 表格区域 开始 -->
<GLTable ref="proGroupRef" class="table-img" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
......@@ -19,18 +17,17 @@
</el-popover>
</template>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<!-- <el-button v-if="!scope.scope.goodsStatus" type="text" @click="handleEdit(2, scope.scope)">编辑</el-button> -->
<GLButton v-if="!scope.scope.goodsStatus && scope.scope.goodsSource == 1" type="text" fn="自建编辑" @click="handleEdit(2, scope.scope)">编辑</GLButton>
<!-- <GLButton v-if="!scope.scope.goodsStatus && scope.scope.goodsSource == 1" type="text" fn="自建编辑" @click="handleEdit(2, scope.scope)">编辑</GLButton>
<GLButton v-if="!scope.scope.goodsStatus && scope.scope.goodsSource == 2 && scope.scope.takeType == '1'" type="text" fn="带货编辑" @click="handleEditDh(2, scope.scope)">编辑</GLButton>
<el-button v-if="!scope.scope.goodsStatus && (scope.scope.goodsSource == 1 || (scope.scope.goodsSource == 2 && scope.scope.originGoodsStatus))" type="text" @click="handleUpOrDown(scope.scope)">上架</el-button>
<el-button v-if="!scope.scope.goodsStatus && scope.scope.goodsSource == 2 && !scope.scope.originGoodsStatus && scope.scope.offReason" type="text" @click="handleDwonNotice(scope.scope)">下架通知</el-button>
<el-button v-if="scope.scope.goodsStatus" type="text" @click="handleUpOrDown(scope.scope)">下架</el-button>
<el-button v-if="!scope.scope.goodsStatus && scope.scope.goodsSource == 2" type="text" @click="handleTakeGood(scope.scope)">取消带货</el-button>
<el-button v-if="!scope.scope.goodsStatus && scope.scope.goodsSource == 1" type="text" @click="handleTop(scope.scope)">置顶</el-button>
<!-- <el-button v-if="scope.scope.goodsStatus" type="text" @click="handleEdit(3, scope.scope)">查看</el-button> -->
<GLButton v-if="scope.scope.goodsStatus && scope.scope.goodsSource == 1" type="text" fn="自建查看" @click="handleEdit(3, scope.scope)">查看</GLButton>
<GLButton v-if="scope.scope.goodsStatus && scope.scope.goodsSource == 2" type="text" fn="带货查看" @click="handleEditDh(3, scope.scope)">查看</GLButton>
<el-button v-if="scope.scope.goodsStatus" type="text" @click="handleShare(scope.scope)">分享</el-button>
<el-button v-if="scope.scope.goodsStatus" type="text" @click="handleShare(scope.scope)">分享</el-button> -->
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
<!-- 表格区域 end -->
......@@ -104,6 +101,143 @@ export default {
optionsName: 'goodsStatusList'
}
],
// 表格按钮
tableButtonList: [
{
type: 'GLButton',
name: '编辑',
attrs: {
type: 'text',
fn: '自建编辑'
},
condition: row => {
return !row.goodsStatus && row.goodsSource == 1
},
listeners: {
click: row => this.handleEdit(2, row)
}
},
{
type: 'GLButton',
name: '编辑',
attrs: {
type: 'text',
fn: '带货编辑'
},
condition: row => {
return !row.goodsStatus && row.goodsSource == 2 && row.takeType == '1'
},
listeners: {
click: row => this.handleEditDh(2, row)
}
},
{
type: 'el-button',
name: '上架',
attrs: {
type: 'text'
},
condition: row => {
return !row.goodsStatus && (row.goodsSource == 1 || (row.goodsSource == 2 && row.originGoodsStatus))
},
listeners: {
click: this.handleUpOrDown
}
},
{
type: 'el-button',
name: '下架通知',
attrs: {
type: 'text'
},
condition: row => {
return !row.goodsStatus && row.goodsSource == 2 && !row.originGoodsStatus && row.offReason
},
listeners: {
click: this.handleDwonNotice
}
},
{
type: 'el-button',
name: '下架',
attrs: {
type: 'text'
},
condition: row => {
return row.goodsStatus
},
listeners: {
click: this.handleUpOrDown
}
},
{
type: 'el-button',
name: '取消带货',
attrs: {
type: 'text'
},
condition: row => {
return !row.goodsStatus && row.goodsSource == 2
},
listeners: {
click: this.handleTakeGood
}
},
{
type: 'el-button',
name: '置顶',
attrs: {
type: 'text'
},
condition: row => {
return !row.goodsStatus && row.goodsSource == 1
},
listeners: {
click: this.handleTop
}
},
{
type: 'GLButton',
name: '查看',
attrs: {
type: 'text',
fn: '自建查看'
},
condition: row => {
return row.goodsStatus && row.goodsSource == 1
},
listeners: {
click: row => this.handleEdit(3, row)
}
},
{
type: 'GLButton',
name: '查看',
attrs: {
type: 'text',
fn: '带货查看'
},
condition: row => {
return row.goodsStatus && row.goodsSource == 2
},
listeners: {
click: row => this.handleEditDh(3, row)
}
},
{
type: 'el-button',
name: '分享',
attrs: {
type: 'text'
},
condition: row => {
return row.goodsStatus
},
listeners: {
click: this.handleShare
}
}
],
// 表格
getListApi: this.$apis.proManage.getListApi,
tableParams: {
......@@ -291,7 +425,7 @@ export default {
handleDwonNotice(row) {
this.$alert('你带货的' + row.goodsName + '商品现已下架,下架原因:' + row.offReason, '商品下架通知', {
confirmButtonText: '确定',
callback: action => {}
callback: action => { }
})
},
handleUpOrDown(row) {
......
......@@ -2,14 +2,7 @@
<template>
<div class="marketing take-good p-t-20">
<div class="container">
<div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="default" @click="handleReset">重置</el-button>
</span>
</glsx-combi-form>
</div>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<el-button :size="size" class="default-blue-btn f-right m-b-10" type="default" @click="handleTakeGood()">一键带货</el-button>
......@@ -22,10 +15,9 @@
</el-popover>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button v-if="!scope.scope.taked" type="text" @click="handleSingleTakeGood(scope.scope)">带货</el-button>
<!-- <GLButton v-if="!scope.scope.taked" fn="带货" type="text" @click="handleSingleTakeGood(scope.scope)">带货</GLButton> -->
<!-- <el-button type="text" @click="handleDetail(scope.scope)">详情</el-button> -->
<GLButton type="text" fn="详情" @click="handleDetail(scope.scope)">详情</GLButton>
<!-- <el-button v-if="!scope.scope.taked" type="text" @click="handleSingleTakeGood(scope.scope)">带货</el-button>
<GLButton type="text" fn="详情" @click="handleDetail(scope.scope)">详情</GLButton> -->
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
<!-- 表格区域 end -->
......@@ -64,6 +56,33 @@ export default {
pickerOptions: 'beforeRangePickerOptions'
}
],
// 表格按钮
tableButtonList: [
{
type: 'el-button',
name: '带货',
attrs: {
type: 'text'
},
condition: row => {
return !row.taked
},
listeners: {
click: this.handleSingleTakeGood
}
},
{
type: 'GLButton',
name: '详情',
attrs: {
type: 'text',
fn: '详情'
},
listeners: {
click: this.handleDetail
}
}
],
// 表格
getListApi: this.$apis.takeGood.getListApi,
tableParams: {
......
......@@ -65,7 +65,7 @@ export default {
{
label: '创建日期',
prop: 'createdDate',
width: '180',
// width: '180',
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!