Commit a1f5f986 by 前端

Merge branch 'zq_dev_v2.5.0' into 'v2.5.0'

0704定向礼包 提测合并

See merge request !201
2 parents 5b35a5c0 ff82c491
......@@ -88,14 +88,14 @@ const getDirectionalGiftListApi = params => {
}
const getghDirectionalGiftListApi = params => {
// params.method = 'scrm.api.coupon.directional.gift.coupon.list'
params.method = 'scrm.api.coupon.gh.group.equity.coupon.list'
params.method = 'scrm.api.coupon.gh.group.equity.coupon.list'
return http({
url: 'rop-scrm-coupon/router',
method: 'GET',
data: params,
sign: true
})
}
}
const insertGiftApi = params => {
params.method = 'scrm.api.coupon.directional.gift.create'
......@@ -119,4 +119,14 @@ const templateModal = params => {
})
}
export default { getFollowerStaffListApi, getListApi, giftExportApi, deleteGiftApi, getGiftInfoApi, getReceivedGiftInfoApi, exportGiftInfoApi, getDirectionalGiftListApi, insertGiftApi, templateModal ,getghDirectionalGiftListApi }
const toVoidGift = params => {
params.method = 'scrm.api.coupon.user.directional.gift.cancel'
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getFollowerStaffListApi, getListApi, giftExportApi, deleteGiftApi, getGiftInfoApi, getReceivedGiftInfoApi, exportGiftInfoApi, getDirectionalGiftListApi, insertGiftApi, templateModal, getghDirectionalGiftListApi, toVoidGift }
......@@ -580,3 +580,6 @@ html {
border-top-color: #e4e7ed !important;
}
/* tab */
.myMessage {
z-index: 4000 !important;
}
/*
* @Description:
* @Description:
* @Author: huyue
* @Date: 2022-01-20 18:06:46
* @LastEditors: huyue
......@@ -38,6 +38,12 @@ export async function bootstrap({ history, common, messenger, globalState, route
Vue.prototype.$http_merchant = new common.Http({ response, request: request_merchant, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
Vue.prototype.$http_xiaolong = new common.Http({ response, request: xiaolong_req, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
// const myToken = 'scrm-base-107ee03c-1214-48c3-a443-a2332e553b2f-rop'
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: myToken } })
// Vue.prototype.$http2 = new common.Http({ response, request: request2, sign, secret, alert: message.error, headers: { token: myToken } })
// Vue.prototype.$http_merchant = new common.Http({ response, request: request_merchant, sign, secret, alert: message.error, headers: { token: myToken } })
// Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: myToken } })
// Vue.prototype.$http_xiaolong = new common.Http({ response, request: xiaolong_req, sign, secret, alert: message.error, headers: { token: myToken } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
// Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
const routesData = common.utils.deepClone(globalState.routers)
......
......@@ -26,7 +26,8 @@
</div>
<div v-for="(item, index) in orderShow" :key="index">
<div class="gift-box" v-show="couponObj[item].list.length">
<div class="gift-label">{{ couponObj[item].label }}:</div>
<!-- <div class="gift-label">{{ couponObj[item].label }}:</div> -->
<img class="server-type" :src="require(`@/assets/coupon/icon-${item}.png`)" />
<div class="gift-content">
<div class="gift-item" v-for="(subItem, subIndex) in couponObj[item].list" :key="subIndex">
<span :class="['circle', subItem.status == '3' ? ' grey' : '']"></span>
......@@ -37,7 +38,12 @@
</div>
</div>
</div>
<div slot="receiveDetails">{{ editForm.receiveWay == '1' ? '指定手机号' : '指定车架号后6位' }}:{{ editForm.receiveDetails }}</div>
<div slot="receiveDetails">
<span style="border: 1px dashed #333;">{{ editForm.receiveWay == '1' ? '指定手机号' : '指定车架号后6位' }}:</span>
<div class="phone-wrap">
<span class="phone" v-for="(item,id) in receiveDetailList" :key="id">{{item}}</span>
</div>
</div>
<div slot="staffListBlock" class="sale-select" v-show="editForm.staffList && editForm.staffList.length != 0">
<div :key="key" class="el-input-tag input-tag-wrapper-detail">
<el-tag effect="plain" type="info" v-for="(tag, idx) in editForm.staffList" :key="idx" :disable-transitions="false" @close="handleStaffRemove(tag, idx)">
......@@ -80,6 +86,7 @@ export default {
footerWidth: '0',
loading: false,
editChildRef: 'editChildRef',
receiveDetailList:[],
routeInfo: {
// add-新增;edit-编辑;detail-详情
addOrEdit: 'add',
......@@ -194,6 +201,9 @@ export default {
res.data.createdDate = dayjs(res.data.createdDate).format('YYYY-MM-DD HH:mm:ss')
res.data.updatedDate = dayjs(res.data.updatedDate).format('YYYY-MM-DD HH:mm:ss')
this.editForm = res.data
let arr = []
res.data.receiveDetails && (arr=res.data.receiveDetails.split(','))
this.receiveDetailList = [...arr]
this.approvalStatus = res.data.approveStatus - 1
this.recoveryCoupon()
this.recoveryTotalPrice()
......@@ -268,6 +278,11 @@ export default {
.gift-box {
display: flex;
padding: 10px 0 10px 10px;
.server-type {
margin: 4px 12px 0 0;
height: 23px;
width: 58px;
}
.gift-label {
width: 70px;
color: #999999;
......@@ -299,6 +314,20 @@ export default {
}
}
}
.phone-wrap{
width: 878px;
background-color: #F9F9F9;
padding: 5px 10px;
line-height: 14px;
font-size: 14px;
box-sizing: border-box;
margin-top: 5px;
.phone{
display: inline-block;
margin:5px 16px 5px 0;
border: 1px dashed #333;
}
}
// 发放员工
.sale-select {
display: flex;
......
......@@ -11,17 +11,8 @@
</div>
<div class="container">
<div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer">
<el-button :size="size" type="default" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</span>
</glsx-combi-form>
<glsx-combi-form ref="showSearch">
<span slot="footer" class="footer-btns">
<GLButton :size="size" class="default-blue-btn" type="default" fn="导出" @click="handleExport">导出</GLButton>
</span>
</glsx-combi-form>
<GLCombiForm @handleOk="handleSearch" @handleRest="handleReset" ref="showSearch" :formObj="searchForm" :formData="searchFormData"></GLCombiForm>
<GLButton style="float:right;margin-bottom:10px;" :size="size" class="default-blue-btn" type="default" fn="导出" @click="handleExport">导出</GLButton>
</div>
<!-- 表格区域 开始 -->
......@@ -30,6 +21,7 @@
<div class="p-b-12">礼包明细</div>
<div class="gift-detail flex-wrap">
<div class="gift-item" v-for="(item, index) in scope.scope.couponList" :key="index">
<img :src="require(`@/assets/coupon/icon-${attrToIcon[item.discountType]}.png`)" />
<p :class="['gift-coupon-name', item.status == '3' ? ' txt-grey' : '']">{{ item.couponName }} × {{ item.couponAmount }}</p>
<p v-show="item.status == '3'" class="gift-tips">已失效</p>
</div>
......@@ -38,12 +30,12 @@
<div slot="name" slot-scope="scope">
<p class="cursor-pointer" @click="handleDetail(scope.scope)">{{ scope.scope.name }}</p>
</div>
<div slot="approveStatus" slot-scope="scope">
<span :style="{ color: approvalStatusColor[scope.scope.approveStatus - 1] }">{{ approvalStatusVal[scope.scope.approveStatus - 1] }}</span>
<div style="display: flex;align-items: center;" slot="approveStatus" slot-scope="scope">
<div class="approve-status" :style="{ 'background-color': approvalStatusColor[scope.scope.approveStatus - 1] }"></div>
<span>{{ approvalStatusVal[scope.scope.approveStatus - 1] }}</span>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLButton type="text" fn="编辑" @click="handleEdit('edit', scope.scope)">编辑</GLButton>
<GLButton type="text" fn="删除" @click="handleDelete(scope.scope)">删除</GLButton>
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
<!-- 表格区域 end -->
......@@ -59,6 +51,40 @@ export default {
name: 'giftList',
data() {
return {
attrToIcon: {
2: 'discount',
3: 'cash',
4: 'exchange',
7: 'service'
},
buttonList: [
{
type: 'GLButton',
name: row => {
return '编辑'
},
attrs: {
type: 'text',
fn: '编辑'
},
listeners: {
click: row => this.handleEdit('edit', row.scope)
}
},
{
type: 'GLButton',
name: row => {
return '删除'
},
attrs: {
type: 'text',
fn: '删除'
},
listeners: {
click: row => this.handleDelete(row.scope)
}
}
],
size: 'small',
url: url,
searchForm: {
......@@ -106,7 +132,10 @@ export default {
getListApi: this.$apis.giftBag.getListApi,
tableParams: {
listName: 'list',
tableOption: true,
tableOption: {
width:120,
align:'center'
},
tableColumns: [
{
label: '',
......@@ -130,11 +159,11 @@ export default {
{
label: '备注名称',
prop: 'remarkName',
width: '200'
width: 150
},
{
label: '预估成本/元',
width: 200,
width: 150,
prop: 'anticipatedCost',
formatter: cellValue => {
return (cellValue.anticipatedCost / 100).toFixed(2)
......@@ -143,12 +172,28 @@ export default {
{
label: '发放员工',
prop: 'staffList',
width: 200,
width: 150,
formatter: cellValue => {
return cellValue.staffList.map(item => item.staffName).join(',')
}
},
{
label: '已领取',
prop: 'stock',
width: 150,
formatter: cellValue => {
return cellValue.receivedStock || '0'
}
},
{
label: '待领取',
prop: '',
width: 150,
formatter: cellValue => {
return +cellValue.stock - +cellValue.receivedStock || '0'
}
},
{
label: '赠送原因',
width: 200,
prop: 'giveReason',
......@@ -158,13 +203,14 @@ export default {
},
{
label: '审批状态',
width: 150,
prop: 'approveStatus',
addHtml: 'approveStatus'
},
{
label: '创建时间',
prop: 'createdDate',
width: '180',
width: 180,
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
......@@ -204,7 +250,7 @@ export default {
},
// 1 审批中;2 审批通过; 3审批驳回 4审批撤销 5待审批
// 审批状态 0审批中 1审批通过 2审批驳回
approvalStatusColor: ['#FF6D00', '#2CCA74', '#EB4E4E', '#999999', '#999999'],
approvalStatusColor: ['#5850FF', '#2CCA74', '#EB4E4E', '#FDB757', '#FDB757'],
approvalStatusVal: ['审批中', '审批通过', '已驳回', '审批撤销', '待审批']
}
},
......@@ -294,6 +340,7 @@ export default {
$title: encodeURI(addOrEdit == 'add' ? '新增礼包' : '编辑礼包')
}
addOrEdit != 'add' && (params.id = row.id)
addOrEdit != 'add' && (params.receivedStock = row.receivedStock)
this.$router.push({
path: '/giftBag/editGift',
query: params
......@@ -354,12 +401,28 @@ export default {
<style lang="scss">
.p-b-12 {
margin-bottom: 14px;
font-weight: 500;
color: #333333;
}
.approve-status {
width: 6px;
height: 6px;
border-radius: 4px;
margin-right: 8px;
display: inline-block;
}
.gift-detail .gift-item {
margin-right: 80px;
display: flex;
align-items: center;
color: #333333;
img {
height: 23px;
width: 58px;
margin-right: 23px;
}
.gift-coupon-name {
display: inline-block;
margin-right: 7px;
}
.gift-tips {
display: inline-block;
......
......@@ -3,31 +3,36 @@
<div class="marketing">
<div class="container">
<div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData"></glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData1">
<GLCombiForm ref="showSearch" @handleOk="handleSearch" @handleRest="handleReset" :formObj="searchForm" :formData="searchFormData"></GLCombiForm>
<!-- <glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData1">
<span slot="footer">
<el-button :size="size" type="default" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</span>
</glsx-combi-form>
<glsx-combi-form ref="showSearch">
<span slot="footer" class="footer-btns">
<!-- <el-button :size="size" type="default" @click="handleExport">导出</el-button> -->
<GLButton :size="size" class="default-blue-btn" type="default" fn="已领取导出" @click="handleExport">导出</GLButton>
</glsx-combi-form> -->
<!-- <glsx-combi-form ref="showSearch">
<span slot="footer" class="footer-btns"> -->
<!-- <el-button :size="size" type="default" @click="handleExport">导出</el-button> -->
<!-- <GLButton :size="size" class="default-blue-btn" type="default" fn="已领取导出" @click="handleExport">导出</GLButton>
</span>
</glsx-combi-form>
</glsx-combi-form> -->
<GLButton style="float:right;margin-bottom:10px;" :size="size" class="default-blue-btn" type="default" fn="已领取导出" @click="handleExport">导出</GLButton>
</div>
<!-- 表格区域 开始 -->
<GLTable ref="receivedGiftListRef" :getListApi="getListApi" :hasNum="false" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<span slot="directionalGiftName" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">{{ scope.scope.directionalGiftName }}</el-button>
<span v-if="scope.scope.receiveStatus == 2" class="void-label">已作废</span>
<el-tooltip class="item" effect="dark" :content="scope.scope.cancelReason" placement="top-start">
<p class="void-reason" v-if="scope.scope.receiveStatus == 2">作废原因:{{ scope.scope.cancelReason || '--' }}</p>
</el-tooltip>
</span>
<div slot="giftInfo" slot-scope="scope">
<GLTable ref="giftListRef" :hasNum="false" :hasPage="false" :noDataImg="url" :tableParams="giftParams" :tableData="scope.scope | filterTable" @setTableFinishFun="setGiftTableFinishFun"></GLTable>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="toVoid(scope.scope)">作废</el-button>
<el-button :disabled="scope.scope.receiveStatus == 2" type="text" @click="toVoid(scope.scope)">作废</el-button>
</div>
</GLTable>
<!-- 表格区域 end -->
......@@ -36,8 +41,8 @@
<div class="wrap">
<p class="dialog-tip">请先和客户沟通在确认,避免引起客诉,作废后客户将不可使用该礼包下所有优惠卷</p>
<div style="display:flex;">
<label style="white-space:nowrap;" for="">作废原因:</label>
<el-input type="textarea" v-model="phone" placeholder="请输入作废原因"></el-input>
<label class="label" for="">作废原因:</label>
<el-input type="textarea" v-model="reason" maxlength="50" placeholder="请输入作废原因"></el-input>
</div>
</div>
</glsx-dialog>
......@@ -71,13 +76,16 @@ export default {
return {
size: 'small',
url: url,
curId: '',
reason: '',
voidDialogVisibity: false,
searchForm: {
nickName: '',
wechatUserFlag: '',
giftName: '',
staffName: '',
createDate: []
createDate: [],
receiveStatus: ''
},
tableSearchForm: {},
// 搜索
......@@ -103,9 +111,7 @@ export default {
optionLabel: 'Name',
optionsName: 'List',
placeholder: '请选择'
}
],
searchFormData1: [
},
{
label: '发放员工',
name: 'staffName',
......@@ -117,8 +123,32 @@ export default {
name: 'createDate',
type: 'datePicker',
pickerOptions: 'beforeRangePickerOptions'
},
{
label: '领取状态',
name: 'receiveStatus',
type: 'select',
optionList: [],
optionId: 'Id',
optionLabel: 'Name',
optionsName: 'statusList',
placeholder: '请选择'
}
],
// searchFormData1: [
// {
// label: '发放员工',
// name: 'staffName',
// type: 'input',
// placeholder: '请输入'
// },
// {
// label: '领取日期',
// name: 'createDate',
// type: 'datePicker',
// pickerOptions: 'beforeRangePickerOptions'
// }
// ],
baseData: {
List: [
{
......@@ -129,6 +159,16 @@ export default {
Id: '2',
Name: '是'
}
],
statusList: [
{
Id: '1',
Name: '正常使用'
},
{
Id: '2',
Name: '已作废'
}
]
},
//礼包详情
......@@ -172,7 +212,10 @@ export default {
getListApi: this.$apis.giftBag.getReceivedGiftInfoApi,
tableParams: {
listName: 'list',
tableOption: true,
tableOption: {
width:100,
align:'center'
},
tableColumns: [
{
label: '',
......@@ -195,12 +238,12 @@ export default {
{
label: '客户手机号',
prop: 'phone',
width: '110'
width: 150
},
{
label: '是否为企微客户',
prop: 'wechatUserFlag',
width: '200',
width: 150,
formatter: cellValue => {
if (cellValue.wechatUserFlag == 1) {
return '否'
......@@ -282,8 +325,27 @@ export default {
// 查看
handleVoidClose() {
this.voidDialogVisibity = false
this.curId = ''
this.reason = ''
},
handleVoidConfirm() {
if (!this.reason.trim()) {
return this.$message({
message: '请输入作废原因!',
type: 'error',
customClass: 'myMessage'
})
}
this.$apis.giftBag.toVoidGift({ userDirectionalGiftId: this.curId, cancelReason: this.reason }).then(res => {
if (res) {
this.handleVoidClose()
this.$message({
message: '操作成功',
type: 'success'
})
this.$refs.receivedGiftListRef.refreshTable()
}
})
this.handleVoidClose()
},
handleDetail(row) {
......@@ -294,7 +356,8 @@ export default {
}
})
},
toVoid(scope) {
toVoid(row) {
this.curId = row.id
this.voidDialogVisibity = true
},
getParams() {
......@@ -408,7 +471,8 @@ export default {
wechatUserFlag: '',
giftName: '',
staffName: '',
createDate: []
createDate: [],
receiveStatus: ''
}
this.handleSearch()
}
......@@ -426,14 +490,45 @@ export default {
.marketing /deep/ .el-table th div {
line-height: normal !important;
}
.void-label {
width: 44px;
height: 18px;
display: inline-block;
font-size: 12px;
color: #999999;
border-radius: 2px;
text-align: center;
line-height: 18px;
background: #eeeded;
margin-left: 4px;
}
.void-reason {
font-size: 10px;
color: #999999;
width: 180px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin: 4px 0 0;
}
.void-dialog {
/deep/ .el-dialog__body {
padding: 20px 80px;
.el-textarea__inner {
font-family: auto;
}
.wrap {
padding-bottom: 50px;
.dialog-tip {
margin-bottom: 20px;
}
.label {
white-space: nowrap;
margin-top: 6px;
}
.el-textarea__inner {
height: 72px;
}
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!