Commit dc35dd51 by 前端

Merge branch 'v2.5.0' into 'develop'

V2.5.0

See merge request !213
2 parents 8a86fb8f bf803ed1
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
"el-tree-transfer": "^2.2.6", "el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5", "element-ui": "^2.4.5",
"glsx-common": "^1.4.6", "glsx-common": "^1.4.6",
"glsx-components": "^1.3.7", "glsx-components": "^1.4.3",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"node-sass": "^4.0.0", "node-sass": "^4.0.0",
"vue": "^2.6.10", "vue": "^2.6.10",
......
...@@ -183,4 +183,16 @@ const getAllGoodsApi = params => { ...@@ -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 }
...@@ -119,4 +119,15 @@ const templateModal = params => { ...@@ -119,4 +119,15 @@ 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,
returnAll: true
})
}
export default { getFollowerStaffListApi, getListApi, giftExportApi, deleteGiftApi, getGiftInfoApi, getReceivedGiftInfoApi, exportGiftInfoApi, getDirectionalGiftListApi, insertGiftApi, templateModal, getghDirectionalGiftListApi, toVoidGift }
...@@ -190,6 +190,7 @@ html { ...@@ -190,6 +190,7 @@ html {
.marketing .el-table .cell { .marketing .el-table .cell {
line-height: 16px; line-height: 16px;
padding: 0 16px !important;
} }
.marketing .table-btns .el-button { .marketing .table-btns .el-button {
...@@ -437,6 +438,7 @@ html { ...@@ -437,6 +438,7 @@ html {
background-color: rgba(242, 242, 242, 1); background-color: rgba(242, 242, 242, 1);
} }
.message-Z-zinde,
.marketing .message-Z-zinde { .marketing .message-Z-zinde {
z-index: 9999 !important; z-index: 9999 !important;
} }
...@@ -548,6 +550,9 @@ html { ...@@ -548,6 +550,9 @@ html {
color: #5850ff; color: #5850ff;
font-size: 16px; font-size: 16px;
} }
.marketing .text-10 {
font-size: 10px;
}
.marketing .text-14 { .marketing .text-14 {
font-size: 14px; font-size: 14px;
} }
...@@ -580,3 +585,16 @@ html { ...@@ -580,3 +585,16 @@ html {
border-top-color: #e4e7ed !important; border-top-color: #e4e7ed !important;
} }
/* tab */ /* tab */
.myMessage {
z-index: 4000 !important;
}
.loadingClass{
.el-icon-loading{
font-size: 22px;
}
.el-icon-loading,
.el-loading-text{
color: #5850ff!important;
}
}
\ No newline at end of file \ No newline at end of file
...@@ -317,6 +317,7 @@ export default { ...@@ -317,6 +317,7 @@ export default {
border-radius: 4px; border-radius: 4px;
height: 26px; height: 26px;
line-height: 26px; line-height: 26px;
margin-bottom: 10px;
} }
} }
.tag-panel { .tag-panel {
......
...@@ -20,6 +20,7 @@ export const fetchConfig = function (isEnv = true) { ...@@ -20,6 +20,7 @@ export const fetchConfig = function (isEnv = true) {
//return window.fetch('https://', {}).then(res => res.json()) //return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' }) // request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config') return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
// return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get('http://config-center-backend.test.glsx.com/glsxAdmin/config?moduleUrl=marketing').then(res => res.data)
// return new Http().get('https://oss-config.dev.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config') // return new Http().get('https://oss-config.dev.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
} }
export const config = { export const config = {
......
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
import Vue from 'vue' import Vue from 'vue'
import { message, messageBox } from '@/plugins/element.js' import { message, messageBox } from '@/plugins/element.js'
import { fetchConfig } from '@/config' import { fetchConfig } from '@/config'
import { GLButton, GLTable, GLFooter } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router'
import ElementUI from 'element-ui' import ElementUI from 'element-ui'
import { GLButton, GLTable, GLFooter, GLCombiForm, GLTableButton } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router'
import '@/assets/css/public.scss' import '@/assets/css/public.scss'
import render from './render' import render from './render'
// import 'glsx-components/src/theme/theme.scss' // import 'glsx-components/src/theme/theme.scss'
...@@ -21,6 +21,8 @@ let instance = null ...@@ -21,6 +21,8 @@ let instance = null
Vue.use(ElementUI) Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
Vue.use(GLFooter) Vue.use(GLFooter)
Vue.use(GLCombiForm)
Vue.use(GLTableButton)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) { export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, request2, sign, secret, sign_common, request_common, request_merchant, xiaolong_req } = await fetchConfig(false) const { response, request, request2, sign, secret, sign_common, request_common, request_merchant, xiaolong_req } = await fetchConfig(false)
Vue.prototype.$history = history Vue.prototype.$history = history
...@@ -36,6 +38,12 @@ export async function bootstrap({ history, common, messenger, globalState, route ...@@ -36,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_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_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 } }) 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.prototype.$setGlobalState = globalState.actions.setGlobalState
// Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) // 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) const routesData = common.utils.deepClone(globalState.routers)
......
...@@ -2,26 +2,17 @@ ...@@ -2,26 +2,17 @@
<template> <template>
<div class="marketing p-t-20"> <div class="marketing p-t-20">
<div class="m-b-20"> <div class="m-b-20">
<!-- <el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新建分类</el-button> -->
<GLButton :size="size" type="primary" fn="新建分类" class="el-icon-plus" @click="handleEdit(1)">新建分类</GLButton> <GLButton :size="size" type="primary" fn="新建分类" class="el-icon-plus" @click="handleEdit(1)">新建分类</GLButton>
</div> </div>
<div class="container"> <div class="container">
<div> <div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData"> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<span slot="footer" class="footer-btns">
<el-button :size="size" type="default" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</span>
</glsx-combi-form>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="classifyRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="classifyRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<!-- <el-button type="text" @click="handleEdit(2, scope.scope)">编辑</el-button> --> <GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
<GLButton type="text" fn="编辑" @click="handleEdit(2, scope.scope)">编辑</GLButton>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button>
<el-button type="text" @click="handleTop(scope.scope)">置顶</el-button>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -59,6 +50,40 @@ export default { ...@@ -59,6 +50,40 @@ export default {
pickerOptions: 'beforeRangePickerOptions' pickerOptions: 'beforeRangePickerOptions'
} }
], ],
// 表格按钮
tableButtonList: [
{
type: 'GLButton',
name: '编辑',
attrs: {
type: 'text',
fn: '编辑'
},
listeners: {
click: row => this.handleEdit(2, row)
}
},
{
type: 'el-button',
name: '删除',
attrs: {
type: 'text'
},
listeners: {
click: this.handleDelete
}
},
{
type: 'el-button',
name: '置顶',
attrs: {
type: 'text'
},
listeners: {
click: this.handleTop
}
}
],
// 表格 // 表格
getListApi: this.$apis.classifyList.getListApi, getListApi: this.$apis.classifyList.getListApi,
tableParams: { tableParams: {
...@@ -72,7 +97,7 @@ export default { ...@@ -72,7 +97,7 @@ 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')
} }
...@@ -83,7 +108,7 @@ export default { ...@@ -83,7 +108,7 @@ export default {
} }
}, },
mounted() {}, mounted() { },
methods: { methods: {
getParams() { getParams() {
......
...@@ -53,13 +53,11 @@ ...@@ -53,13 +53,11 @@
</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" :isEdit="true" :isBlock="true" <glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
:formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<!-- 库存,集团版集团账号-无限制库存;其他-输入框 --> <!-- 库存,集团版集团账号-无限制库存;其他-输入框 -->
<template slot="stock" slot-scope="scope"> <template slot="stock" slot-scope="scope">
<span v-if="$isGroupUp">无库存限制</span> <span v-if="$isGroupUp">无库存限制</span>
<el-input :disabled="apear != 'couponAdd'" v-else class="w-150" v-model="editForm[scope.scope.name]" <el-input :disabled="apear != 'couponAdd'" v-else class="w-150" v-model="editForm[scope.scope.name]" placeholder="请输入库存">
placeholder="请输入库存">
<span slot="suffix">张</span> <span slot="suffix">张</span>
</el-input> </el-input>
</template> </template>
...@@ -80,25 +78,19 @@ ...@@ -80,25 +78,19 @@
<template slot="effectiveHtml"> <template slot="effectiveHtml">
<el-form-item prop="effectiveTime" ref="effectiveTime" style="margin-top: 12px; display: block"> <el-form-item prop="effectiveTime" ref="effectiveTime" style="margin-top: 12px; display: block">
<el-radio v-model="editForm.effectiveType" label="2" :disabled="apear != 'couponAdd'" id="effectiveTime"> <el-radio v-model="editForm.effectiveType" label="2" :disabled="apear != 'couponAdd'" id="effectiveTime">
<el-date-picker v-model="editForm.effectiveTime" @change="haveChange" type="datetimerange" <el-date-picker v-model="editForm.effectiveTime" @change="haveChange" type="datetimerange" style="width: 340px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :default-time="defaultTime" :format="format" :picker-options="pickerOption" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'" clearable></el-date-picker>
style="width: 340px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss" :default-time="defaultTime" :format="format"
:picker-options="pickerOption" :disabled="editForm.effectiveType != 2 || apear != 'couponAdd'"
clearable></el-date-picker>
</el-radio> </el-radio>
</el-form-item> </el-form-item>
<el-form-item prop="effectiveDays" ref="effectiveDays" id="effectiveDays"> <el-form-item prop="effectiveDays" ref="effectiveDays" id="effectiveDays">
<el-radio v-model="editForm.effectiveType" label="1" :disabled="apear != 'couponAdd'"> <el-radio v-model="editForm.effectiveType" label="1" :disabled="apear != 'couponAdd'">
领取后 领取后
<el-input v-model="editForm.effectiveDays" style="width: 100px; margin-left: 5px; margin-right: 5px" <el-input v-model="editForm.effectiveDays" style="width: 100px; margin-left: 5px; margin-right: 5px" :disabled="apear != 'couponAdd' || editForm.effectiveType != 1" />
:disabled="apear != 'couponAdd' || editForm.effectiveType != 1" />
天内有效 天内有效
</el-radio> </el-radio>
</el-form-item> </el-form-item>
</template> </template>
<template slot="useDescriptionHtml"> <template slot="useDescriptionHtml">
<el-input type="textarea" v-model="editForm.useDescription" style="width: 320px" <el-input type="textarea" v-model="editForm.useDescription" style="width: 320px" :autosize="{ minRows: 2, maxRows: 4 }" maxlength="200" :disabled="userDisable" />
:autosize="{ minRows: 2, maxRows: 4 }" maxlength="200" :disabled="userDisable" />
</template> </template>
<template slot="editHtml"> <template slot="editHtml">
<el-button style="margin-left: 80px" @click="editMessage">编辑</el-button> <el-button style="margin-left: 80px" @click="editMessage">编辑</el-button>
...@@ -106,9 +98,7 @@ ...@@ -106,9 +98,7 @@
</glsx-combi-form> </glsx-combi-form>
<div v-if="$isGroupUp"> <div v-if="$isGroupUp">
<p class="edit-title">适用门店配置</p> <p class="edit-title">适用门店配置</p>
<glsx-combi-form class="edit-form-container" ref="merchantRef" :isEdit="true" :isBlock="true" <glsx-combi-form class="edit-form-container" ref="merchantRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="merchantEditFormData" :formRules="merchantRule"></glsx-combi-form>
:formRef="editChildRef" :formObj="editForm" :formData="merchantEditFormData" :formRules="merchantRule">
</glsx-combi-form>
</div> </div>
</div> </div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
...@@ -371,7 +361,8 @@ export default { ...@@ -371,7 +361,8 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.editStatus = false this.editStatus = false
}) })
}).finally(() => { })
.finally(() => {
this.loading = false this.loading = false
}) })
}, },
...@@ -497,7 +488,7 @@ export default { ...@@ -497,7 +488,7 @@ export default {
.then(() => { .then(() => {
this.cancelJump() this.cancelJump()
}) })
.catch(() => { }) .catch(() => {})
} else { } else {
this.cancelJump() this.cancelJump()
} }
......
...@@ -8,14 +8,7 @@ ...@@ -8,14 +8,7 @@
<GLButton :size="size" type="default" class="el-icon-plus default-blue-btn color-transparent" @click="addExchangeCoupon()" fn="新建兑换券" display="disabled" mode="el-button">新建兑换券</GLButton> <GLButton :size="size" type="default" class="el-icon-plus default-blue-btn color-transparent" @click="addExchangeCoupon()" fn="新建兑换券" display="disabled" mode="el-button">新建兑换券</GLButton>
</div> </div>
<div class="container"> <div class="container">
<div> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<glsx-combi-form ref="showSearch" :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>
</span>
</glsx-combi-form>
</div>
<div class="flex m-b-10 w-100-percent"> <div class="flex m-b-10 w-100-percent">
<span class="table-title">优惠券列表</span> <span class="table-title">优惠券列表</span>
...@@ -32,11 +25,7 @@ ...@@ -32,11 +25,7 @@
<span>{{ baseData.statusList.find(item => item.confId == scope.scope.status).confName }}</span> <span>{{ baseData.statusList.find(item => item.confId == scope.scope.status).confName }}</span>
</div> </div>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<GLButton v-if="scope.scope.status == '1'" type="text" @click="start(scope.scope)" fn="生效" display="disabled" mode="el-button">生效</GLButton> <GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
<el-button v-if="scope.scope.status == '2'" type="text" @click="end(scope.scope)">失效</el-button>
<GLButton v-if="scope.scope.status == '2' || scope.scope.status == '3'" type="text" @click="handleEdit(3, scope.scope)" :fn="scope.scope.discountType == 3 ? '查看代金券' : scope.scope.discountType == 7 ? '查看会员服务' : scope.scope.discountType == 2 ? '查看折扣券' : '查看兑换券'" mode="el-button">查看</GLButton>
<GLButton v-if="scope.scope.status == '1' || scope.scope.status == '3'" type="text" @click="del(scope.scope)" fn="删除" mode="el-button" display="disabled">删除</GLButton>
<GLButton type="text" @click="receiveDetail(scope.scope)" fn="领取详情" mode="el-button">领取详情</GLButton>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -67,6 +56,77 @@ export default { ...@@ -67,6 +56,77 @@ export default {
// 分享 // 分享
isShareVisible: false, isShareVisible: false,
shareForm: {}, shareForm: {},
// 表格按钮
tableButtonList: [
{
type: 'GLButton',
name: '生效',
attrs: {
type: 'text',
fn: '生效'
},
condition: row => {
return row.status == '1'
},
listeners: {
click: this.start
}
},
{
type: 'el-button',
name: '失效',
attrs: {
type: 'text'
},
condition: row => {
return row.status == '2'
},
listeners: {
click: this.end
}
},
{
type: 'GLButton',
name: '查看',
attrs: {
type: 'text',
fn: row => {
return row.discountType == 3 ? '查看代金券' : row.discountType == 7 ? '查看会员服务' : row.discountType == 2 ? '查看折扣券' : '查看兑换券'
}
},
condition: row => {
return row.status == '2' || row.status == '3'
},
listeners: {
click: row => this.handleEdit(3, row)
}
},
{
type: 'GLButton',
name: '删除',
attrs: {
type: 'text',
fn: '删除'
},
condition: row => {
return row.status == '1' || row.status == '3'
},
listeners: {
click: this.del
}
},
{
type: 'GLButton',
name: '领取详情',
attrs: {
type: 'text',
fn: '领取详情'
},
listeners: {
click: this.receiveDetail
}
}
],
// 表格 // 表格
searchForm: { searchForm: {
couponName: '', couponName: '',
...@@ -166,6 +226,7 @@ export default { ...@@ -166,6 +226,7 @@ export default {
{ {
label: '使用途径', label: '使用途径',
name: 'useChannel', name: 'useChannel',
width: 160,
formatter: cellValue => { formatter: cellValue => {
var useChannel = '-' var useChannel = '-'
if (cellValue.useChannel) { if (cellValue.useChannel) {
......
...@@ -17,15 +17,7 @@ ...@@ -17,15 +17,7 @@
</div> </div>
</div> </div>
<div class="container"> <div class="container">
<div> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<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>
<div class="flex m-b-10 w-100-percent"> <div class="flex m-b-10 w-100-percent">
<span class="table-title">领取详情列表</span> <span class="table-title">领取详情列表</span>
...@@ -34,8 +26,14 @@ ...@@ -34,8 +26,14 @@
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="receiveList" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="receiveList" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div slot="userStatus" slot-scope="scope"> <div slot="userStatus" slot-scope="scope">
<p>
<span :class="['table-circle', 'm-r-8', scope.scope.userStatus == 1 ? 'back-green' : scope.scope.userStatus == 2 ? 'back-red' : 'back-grey']"></span> <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> <span>{{ baseData.userStatusList.find(item => item.confId == scope.scope.userStatus).confName }}</span>
</p>
<p v-if="scope.scope.userStatus == 4">{{ scope.scope.cancelReason }}</p>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -44,6 +42,15 @@ ...@@ -44,6 +42,15 @@
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" :size="size" @click="goback">返回</el-button> <el-button type="primary" :size="size" @click="goback">返回</el-button>
</div> </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" class="m-t-20">
<el-input :size="size" type="textarea" v-model.trim="cancelForm.cancelReason" placeholder="请输入作废原因" maxlength="50" rows="3" show-word-limit></el-input>
</el-form-item>
</el-form>
</glsx-dialog>
</div> </div>
</template> </template>
...@@ -58,6 +65,15 @@ export default { ...@@ -58,6 +65,15 @@ export default {
footerLeft: '0', footerLeft: '0',
footerWidth: '0', footerWidth: '0',
url: url, url: url,
// 作废
isCancelVisible: false,
cancelForm: {
userCouponId: '',
cancelReason: ''
},
cancelRules: {
cancelReason: [{ required: true, message: '请输入作废原因', trigger: 'change' }]
},
coupon: { coupon: {
couponName: '', couponName: '',
stock: '', stock: '',
...@@ -113,6 +129,26 @@ export default { ...@@ -113,6 +129,26 @@ export default {
name: 'usedAmount' name: 'usedAmount'
} }
], ],
// 表格按钮
tableButtonList: [
{
type: 'el-button',
name: '作废',
attrs: {
type: 'text',
disabled: (row, condition) => {
var isDisabled = [2, 3, 4].includes(row.userStatus)
if (+row.userStatus == 2 && this.coupon.discountType == 7) {
isDisabled = false
}
return isDisabled
}
},
listeners: {
click: this.handleCancel
}
}
],
// 表格 // 表格
searchForm: { searchForm: {
userInfo: '', userInfo: '',
...@@ -146,9 +182,7 @@ export default { ...@@ -146,9 +182,7 @@ export default {
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
optionsName: 'userStatusList' optionsName: 'userStatusList'
} },
],
searchFormDataTwo: [
{ {
label: '领取日期', label: '领取日期',
name: 'daterange', name: 'daterange',
...@@ -161,7 +195,7 @@ export default { ...@@ -161,7 +195,7 @@ export default {
getListApi: this.$apis.couponManage.getListReceiveRecordApi, getListApi: this.$apis.couponManage.getListReceiveRecordApi,
tableParams: { tableParams: {
listName: 'list', listName: 'list',
tableOption: false, tableOption: true,
tableColumns: [ tableColumns: [
{ {
label: '领取用户', label: '领取用户',
...@@ -197,10 +231,6 @@ export default { ...@@ -197,10 +231,6 @@ export default {
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
baseData: { baseData: {
userStatusList: [ userStatusList: [
// {
// confId: '0',
// confName: '未领取'
// },
{ {
confId: '1', confId: '1',
confName: '未使用' confName: '未使用'
...@@ -212,6 +242,10 @@ export default { ...@@ -212,6 +242,10 @@ export default {
{ {
confId: '3', confId: '3',
confName: '已失效' confName: '已失效'
},
{
confId: '4',
confName: '已作废'
} }
], ],
wechatUserFlagList: [ wechatUserFlagList: [
...@@ -322,8 +356,39 @@ export default { ...@@ -322,8 +356,39 @@ export default {
}) })
}, },
writeOff() { handleCancel(row) {
this.writeOffVisible = !this.writeOffVisible 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 */ /**导出excel */
......
...@@ -4,19 +4,7 @@ ...@@ -4,19 +4,7 @@
<el-button :size="size" type="default" class="default-blue-btn color-transparent" @click="openDialog">核销优惠券</el-button> <el-button :size="size" type="default" class="default-blue-btn color-transparent" @click="openDialog">核销优惠券</el-button>
</div> </div>
<div class="container"> <div class="container">
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData"></glsx-combi-form> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormDataTwo">
<span v-if="!$isGroupUp" 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>
<glsx-combi-form v-if="$isGroupUp" ref="showSearch" :formObj="searchForm" :formData="searchFormDataThree">
<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 class="flex m-b-10 w-100-percent"> <div class="flex m-b-10 w-100-percent">
<span class="table-title"></span> <span class="table-title"></span>
...@@ -26,6 +14,13 @@ ...@@ -26,6 +14,13 @@
<template slot="discountType" slot-scope="scope"> <template slot="discountType" slot-scope="scope">
<img :src="require(`@/assets/coupon/icon-${attrToIcon[scope.scope.discountType]}.png`)" /> <img :src="require(`@/assets/coupon/icon-${attrToIcon[scope.scope.discountType]}.png`)" />
</template> </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>
<p v-if="scope.scope.receiveWay == 7 && scope.scope.receiveMethod" class="txt-grey text-10">指定{{ scope.scope.receiveMethod == 1 ? '手机号' : '车架号' }}:{{ scope.scope.receiveNumber }}</p>
</div>
</template>
<span slot="orderCodeHtml" slot-scope="scope"> <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="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> <span class="cursor-pointer" @click="orderCodeHandleDetail(scope.scope)" v-else>{{ scope.scope.orderCode }}</span>
...@@ -34,7 +29,6 @@ ...@@ -34,7 +29,6 @@
<glsx-dialog title="优惠券核销(请确保用户到店后核销,避免引起不必要问题)" :hasScroll="false" width="580px" btnCloseLabel="取消" :noClose="false" :noCancel="true" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleConfirm"> <glsx-dialog title="优惠券核销(请确保用户到店后核销,避免引起不必要问题)" :hasScroll="false" width="580px" btnCloseLabel="取消" :noClose="false" :noCancel="true" btnSize="small" :isVisible="isDialogVisible" :showClose="false" @closeDialog="handleClose" @confirmDialog="handleConfirm">
<div class="content-body"> <div class="content-body">
<el-form :rules="rules" ref="ruleForm" :model="ruleForm" label-width="80px"> <el-form :rules="rules" ref="ruleForm" :model="ruleForm" label-width="80px">
<!-- style="width: 440px" -->
<el-form-item size="small" label="核销码" prop="verficationCode" style="width: 380px"> <el-form-item size="small" label="核销码" prop="verficationCode" style="width: 380px">
<el-input size="small" v-model.trim="ruleForm.verficationCode" maxlength="50" placeholder="请输入核销码"></el-input> <el-input size="small" v-model.trim="ruleForm.verficationCode" maxlength="50" placeholder="请输入核销码"></el-input>
</el-form-item> </el-form-item>
...@@ -105,9 +99,7 @@ export default { ...@@ -105,9 +99,7 @@ export default {
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
optionsName: 'discountTypeList' optionsName: 'discountTypeList'
} },
],
searchFormDataTwo: [
{ {
label: '核销门店', label: '核销门店',
name: 'verificationMerchantName', name: 'verificationMerchantName',
...@@ -137,9 +129,7 @@ export default { ...@@ -137,9 +129,7 @@ export default {
type: 'datePicker', type: 'datePicker',
isClear: true, isClear: true,
pickerOptions: 'beforeRangePickerOptions' pickerOptions: 'beforeRangePickerOptions'
} },
],
searchFormDataThree: [
{ {
label: '券来源', label: '券来源',
name: 'packageId', name: 'packageId',
...@@ -167,6 +157,7 @@ export default { ...@@ -167,6 +157,7 @@ export default {
{ {
label: '用户信息', label: '用户信息',
prop: 'userName', prop: 'userName',
width: 220,
formatter: cellValue => { formatter: cellValue => {
return cellValue.userName + ' ' + cellValue.phone return cellValue.userName + ' ' + cellValue.phone
} }
...@@ -186,6 +177,7 @@ export default { ...@@ -186,6 +177,7 @@ export default {
{ {
label: '剩余核销次数', label: '剩余核销次数',
prop: 'residueAmount', prop: 'residueAmount',
width: 120,
formatter: cellValue => { formatter: cellValue => {
return cellValue.residueAmount || cellValue.residueAmount == 0 ? cellValue.residueAmount : '不限制次数' return cellValue.residueAmount || cellValue.residueAmount == 0 ? cellValue.residueAmount : '不限制次数'
} }
...@@ -201,28 +193,13 @@ export default { ...@@ -201,28 +193,13 @@ export default {
{ {
label: '券来源', label: '券来源',
prop: 'packageName', prop: 'packageName',
formatter: cellValue => { addHtml: 'packageName',
let txt = '' width: 240
if (this.$isGroupUp) {
txt = cellValue.packageId ? cellValue.packageName : cellValue.directionalGiftId ? cellValue.directionalGiftName : '-'
} else {
txt = {
'': '-',
1: '营销活动',
2: '营销活动',
3: '会员服务套餐',
4: '营销活动',
5: '关联商品购买',
6: '通过集团套餐赠送',
7: '通过定向礼包赠送'
}[cellValue.receiveWay]
}
return txt
}
}, },
{ {
label: '核销日期', label: '核销日期',
prop: 'verificationTime', prop: 'verificationTime',
width: 200,
formatter: cellValue => { formatter: cellValue => {
return dateFormat(cellValue.verificationTime) return dateFormat(cellValue.verificationTime)
} }
...@@ -235,6 +212,16 @@ export default { ...@@ -235,6 +212,16 @@ export default {
4: 'exchange', 4: 'exchange',
7: 'service' 7: 'service'
}, },
packageNameTxtObj: {
'': '-',
1: '营销活动',
2: '营销活动',
3: '会员服务套餐',
4: '营销活动',
5: '关联商品购买',
6: '通过集团套餐赠送',
7: '通过定向礼包赠送'
},
baseData: { baseData: {
discountTypeList: [ discountTypeList: [
{ {
...@@ -262,8 +249,8 @@ export default { ...@@ -262,8 +249,8 @@ export default {
if (this.$isGroupUp) { if (this.$isGroupUp) {
this.getPackageList() this.getPackageList()
} }
this.showOrHideAttr('searchFormDataTwo', this.$isGroupUp ? '核销人' : '核销门店', true) this.showOrHideAttr('searchFormData', this.$isGroupUp ? '核销人' : '核销门店', true)
!this.$isGroupUp && this.showOrHideAttr('searchFormDataThree', '券来源', true) !this.$isGroupUp && this.showOrHideAttr('searchFormData', '券来源', true)
this.deleteAttr(this.$isGroupUp ? ['核销人'] : ['核销门店']) this.deleteAttr(this.$isGroupUp ? ['核销人'] : ['核销门店'])
}, },
...@@ -285,7 +272,7 @@ export default { ...@@ -285,7 +272,7 @@ export default {
getPackageList() { getPackageList() {
this.$apis.couponManage.getPackageListApi({ pageNum: 1, pageSize: 9999 }).then(res => { this.$apis.couponManage.getPackageListApi({ pageNum: 1, pageSize: 9999 }).then(res => {
this.baseData.packageList = res.list this.baseData.packageList = res.list
this.getOptionsList('searchFormDataThree', true, 'packageId') this.getOptionsList('searchFormData', true, 'packageId')
}) })
}, },
// 跳转到礼包领取详情页 // 跳转到礼包领取详情页
...@@ -442,36 +429,4 @@ export default { ...@@ -442,36 +429,4 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/.el-input--small .el-input__inner {
width: 215px;
}
.el-range-editor.is-active,
.el-range-editor.is-active:hover {
border-color: #5850ff;
width: 215px;
}
.el-range-editor--small.el-input__inner {
width: 215px;
}
/deep/.el-dialog__header {
padding-top: 20px;
padding-bottom: 20px;
}
/deep/ .el-dialog__body {
// border-bottom: 1px solid #e6e6e6;
// border-top: 1px solid #e6e6e6;
padding: 30px 20px;
.content-body {
.el-input--small .el-input__inner {
width: 300px;
}
}
}
/deep/ .el-dialog__footer {
// text-align: center;
padding-top: 12px;
padding-bottom: 12px;
}
</style> </style>
...@@ -377,7 +377,10 @@ export default { ...@@ -377,7 +377,10 @@ export default {
this.key = new Date() this.key = new Date()
} }
if (this.basicForm.selectType == 3) { if (this.basicForm.selectType == 3) {
if (!this.basicForm.userList.length) this.basicForm.crowdList = [] if (!this.basicForm.userList.length) {
this.basicForm.crowdList = []
this.isSelectCrowd = false
}
} }
this.isUpdate = true this.isUpdate = true
}, },
......
...@@ -26,12 +26,12 @@ ...@@ -26,12 +26,12 @@
</span> </span>
</div> </div>
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<span v-if="scope.scope.status == -1 || scope.scope.status == 2" style="color: #EB4E4E;">创建失败</span> <!-- <span v-if="scope.scope.status == -1 || scope.scope.status == 2" style="color: #EB4E4E;">创建失败</span>
<span v-else> <span v-else>
<el-button type="text" :disabled="scope.scope.unsendUserNum == 0 || (scope.scope.unsendUserNum != 0 && scope.scope.isRemind == 1) || new Date(scope.scope.sendTime) > new Date()" @click="btnClick('remind', 1, scope.scope)">提醒发送</el-button> <el-button type="text" :disabled="scope.scope.unsendUserNum == 0 || (scope.scope.unsendUserNum != 0 && scope.scope.isRemind == 1) || new Date(scope.scope.sendTime) > new Date()" @click="btnClick('remind', 1, scope.scope)">提醒发送</el-button>
<GLButton type="text" fn="客户群发详情" @click="btnClick('detail', 1, scope.scope)">详情</GLButton> <GLButton type="text" fn="客户群发详情" @click="btnClick('detail', 1, scope.scope)">详情</GLButton>
<!-- <el-button type="text" @click="btnClick('detail', 1, scope.scope)">详情</el-button> --> </span> -->
</span> <GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -58,12 +58,12 @@ ...@@ -58,12 +58,12 @@
</span> </span>
</div> </div>
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<span v-if="scope.scope.status == -1" style="color: #EB4E4E;">创建失败</span> <!-- <span v-if="scope.scope.status == -1" style="color: #EB4E4E;">创建失败</span>
<span v-else> <span v-else>
<el-button type="text" :disabled="scope.scope.unsendUserNum == 0 || (scope.scope.unsendUserNum != 0 && scope.scope.isRemind == 1)" @click="btnClick('remind', 2, scope.scope)">提醒发送</el-button> <el-button type="text" :disabled="scope.scope.unsendUserNum == 0 || (scope.scope.unsendUserNum != 0 && scope.scope.isRemind == 1)" @click="btnClick('remind', 2, scope.scope)">提醒发送</el-button>
<GLButton type="text" fn="客户群群发详情" @click="btnClick('detail', 2, scope.scope)">详情</GLButton> <GLButton type="text" fn="客户群群发详情" @click="btnClick('detail', 2, scope.scope)">详情</GLButton>
<!-- <el-button type="text" @click="btnClick('detail', 2, scope.scope)">详情</el-button> --> </span> -->
</span> <GLTableButton :buttonList="groupTableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -84,6 +84,54 @@ export default { ...@@ -84,6 +84,54 @@ export default {
return { return {
ATT_TYPE, ATT_TYPE,
activeIndex: 1, activeIndex: 1,
// 表格按钮
tableButtonList: [
{
type: 'el-button',
name: row => {
return '<span style="color: #EB4E4E; cursor: auto;">创建失败</span>'
},
condition: row => {
return row.status == -1 || row.status == 2
},
attrs: {
type: 'text'
},
listeners: {
click: row => { }
}
},
{
type: 'el-button',
name: '提醒发送',
attrs: {
type: 'text',
disabled: row => {
return row.unsendUserNum == 0 || (row.unsendUserNum != 0 && row.isRemind == 1) || new Date(row.sendTime) > new Date()
}
},
condition: row => {
return ![-1, 2].includes(row.status)
},
listeners: {
click: row => this.btnClick('remind', 1, row)
}
},
{
type: 'GLButton',
name: '详情',
attrs: {
type: 'text',
fn: '客户群发详情'
},
condition: row => {
return ![-1, 2].includes(row.status)
},
listeners: {
click: row => this.btnClick('detail', 1, row)
}
}
],
gueastTableParams: { gueastTableParams: {
listName: 'data', listName: 'data',
tableOption: false, tableOption: false,
...@@ -146,6 +194,54 @@ export default { ...@@ -146,6 +194,54 @@ export default {
} }
] ]
}, },
// 表格按钮
groupTableButtonList: [
{
type: 'el-button',
name: row => {
return '<span style="color: #EB4E4E; cursor: auto;">创建失败</span>'
},
condition: row => {
return row.status == -1
},
attrs: {
type: 'text'
},
listeners: {
click: row => { }
}
},
{
type: 'el-button',
name: '提醒发送',
attrs: {
type: 'text',
disabled: row => {
return row.unsendUserNum == 0 || (row.unsendUserNum != 0 && row.isRemind == 1)
}
},
condition: row => {
return row.status != -1
},
listeners: {
click: row => this.btnClick('remind', 2, row)
}
},
{
type: 'GLButton',
name: '详情',
attrs: {
type: 'text',
fn: '客户群群发详情'
},
condition: row => {
return row.status != -1
},
listeners: {
click: row => this.btnClick('detail', 2, row)
}
}
],
gueastPageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' }, gueastPageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
customerList: this.$apis.customerTransform.customerList, customerList: this.$apis.customerTransform.customerList,
customerGroupList: this.$apis.customerTransform.customerGroupList, customerGroupList: this.$apis.customerTransform.customerGroupList,
...@@ -217,7 +313,7 @@ export default { ...@@ -217,7 +313,7 @@ export default {
}) })
}, },
mounted() { mounted() {
this.wxTips() // this.wxTips()
}, },
beforeDestroy() { beforeDestroy() {
this.$message.closeAll() this.$message.closeAll()
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<div>{{ item.attContent[0].marketingName }}</div> <div>{{ item.attContent[0].marketingName }}</div>
</div> </div>
</template> </template>
<template v-else-if="item.attType == 2" v-for="(imgItem, index) in item.attContent"> <template v-else-if="item.attType == 2 && !previewList.map(k => k.attType).includes(3)" v-for="(imgItem, index) in item.attContent">
<el-image style="width: 52px; height: 52px" class="img-list" :src="imgItem" fit="fit" :key="index" :preview-src-list="item.attContent"></el-image> <el-image style="width: 52px; height: 52px" class="img-list" :src="imgItem" fit="fit" :key="index" :preview-src-list="item.attContent"></el-image>
</template> </template>
<template v-else-if="item.attType == 3"> <template v-else-if="item.attType == 3">
......
...@@ -2,19 +2,19 @@ ...@@ -2,19 +2,19 @@
<template> <template>
<div class="marketing pro-group p-t-20"> <div class="marketing pro-group p-t-20">
<div class="m-b-20 friend-title"> <div class="m-b-20 friend-title">
<!-- <el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新建商品</el-button> -->
<GLButton :size="size" type="primary" fn="编辑朋友圈" @click="handleEdit(1)">发布朋友圈</GLButton> <GLButton :size="size" type="primary" fn="编辑朋友圈" @click="handleEdit(1)">发布朋友圈</GLButton>
<span>管理员可直接在后台为员工创建朋友圈,员工收到朋友圈新消息提醒后,可快捷将管理员创建的朋友圈发送到自己朋友圈中。</span> <span>管理员可直接在后台为员工创建朋友圈,员工收到朋友圈新消息提醒后,可快捷将管理员创建的朋友圈发送到自己朋友圈中。</span>
</div> </div>
<div class="container"> <div class="container">
<div> <!-- <div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData"> <glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns"> <span slot="footer" class="footer-btns">
<el-button :size="size" type="default" @click="handleReset">重置</el-button> <el-button :size="size" type="default" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</span> </span>
</glsx-combi-form> </glsx-combi-form>
</div> </div> -->
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable v-loading="loading" ref="proGroupRef" @refreshTable="handleSearch" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf"> <GLTable v-loading="loading" ref="proGroupRef" @refreshTable="handleSearch" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf">
...@@ -40,14 +40,15 @@ ...@@ -40,14 +40,15 @@
<span v-if="scope.scope.sendType == 1">立即发送</span> <span v-if="scope.scope.sendType == 1">立即发送</span>
</div> </div>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" disabled v-if="scope.scope.status == 2 || scope.scope.status == 1">创建中</el-button> <!-- <el-button type="text" disabled v-if="scope.scope.status == 2 || scope.scope.status == 1">创建中</el-button>
<el-button type="text" disabled v-if="scope.scope.status == -1">创建失败</el-button> <el-button type="text" disabled v-if="scope.scope.status == -1">创建失败</el-button>
<el-button type="text" disabled v-if="scope.scope.status == 4">取消发送</el-button> <el-button type="text" disabled v-if="scope.scope.status == 4">取消发送</el-button>
<el-button type="text" v-if="scope.scope.sendType == 2 && getTimeStatus(scope.scope.sendTime) && scope.scope.status != 4" @click="handleCancel(scope.scope)">取消发送</el-button> <el-button type="text" v-if="scope.scope.sendType == 2 && getTimeStatus(scope.scope.sendTime) && scope.scope.status != 4" @click="handleCancel(scope.scope)">取消发送</el-button>
<el-popover v-if="scope.scope.status == 0" placement="top" width="230" trigger="click" content="未到朋友圈发送时间,无法查看详情"> <el-popover v-if="scope.scope.status == 0" placement="top" width="230" trigger="click" content="未到朋友圈发送时间,无法查看详情">
<el-button slot="reference" type="text" style="color: #999999">详情</el-button> <el-button slot="reference" type="text" style="color: #999999">详情</el-button>
</el-popover> </el-popover>
<GLButton type="text" fn="详情" v-if="scope.scope.status == 3" @click="handleDetail(scope.scope)">详情</GLButton> <GLButton type="text" fn="详情" v-if="scope.scope.status == 3" @click="handleDetail(scope.scope)">详情</GLButton> -->
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -87,7 +88,6 @@ export default { ...@@ -87,7 +88,6 @@ export default {
// 分享 // 分享
isShareVisible: false, isShareVisible: false,
shareForm: {}, shareForm: {},
// 表格
searchForm: { searchForm: {
createdName: '', createdName: '',
createDate: [], createDate: [],
...@@ -125,6 +125,94 @@ export default { ...@@ -125,6 +125,94 @@ export default {
optionsName: 'modeStatusList' optionsName: 'modeStatusList'
} }
], ],
// 表格按钮
tableButtonList: [
{
type: 'el-button',
name: '创建中',
attrs: {
type: 'text',
disabled: true
},
condition: row => {
return row.status == 2 || row.status == 1
},
listeners: {
click: () => { }
}
},
{
type: 'el-button',
name: '创建失败',
attrs: {
type: 'text',
disabled: true
},
condition: row => {
return row.status == -1
},
listeners: {
click: () => { }
}
},
{
type: 'el-button',
name: '取消发送',
attrs: {
type: 'text',
disabled: true
},
condition: row => {
return row.status == 4
},
listeners: {
click: () => { }
}
},
{
type: 'el-button',
name: '取消发送',
attrs: {
type: 'text'
},
condition: row => {
return row.sendType == 2 && this.getTimeStatus(row.sendTime) && row.status != 4
},
listeners: {
click: this.handleCancel
}
},
{
type: 'el-button',
// name: '详情',
name: row => {
return '<span style="color: #999999">详情</span>'
},
attrs: {
type: 'text'
},
condition: row => {
return row.status == 0
},
listeners: {
click: this.handleDetailTips
}
},
{
type: 'GLButton',
name: '详情',
attrs: {
type: 'text',
fn: '详情'
},
condition: row => {
return row.status == 3
},
listeners: {
click: this.handleDetail
}
}
],
// 表格 // 表格
tableData: [], tableData: [],
tableParams: { tableParams: {
...@@ -319,6 +407,9 @@ export default { ...@@ -319,6 +407,9 @@ export default {
return false return false
} }
}, },
handleDetailTips() {
this.$message.error('未到朋友圈发送时间,无法查看详情')
},
handleCancel(row) { handleCancel(row) {
const time = new Date().getTime() const time = new Date().getTime()
const sendTime = new Date(row.sendTime).getTime() const sendTime = new Date(row.sendTime).getTime()
......
...@@ -26,7 +26,8 @@ ...@@ -26,7 +26,8 @@
</div> </div>
<div v-for="(item, index) in orderShow" :key="index"> <div v-for="(item, index) in orderShow" :key="index">
<div class="gift-box" v-show="couponObj[item].list.length"> <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-content">
<div class="gift-item" v-for="(subItem, subIndex) in couponObj[item].list" :key="subIndex"> <div class="gift-item" v-for="(subItem, subIndex) in couponObj[item].list" :key="subIndex">
<span :class="['circle', subItem.status == '3' ? ' grey' : '']"></span> <span :class="['circle', subItem.status == '3' ? ' grey' : '']"></span>
...@@ -37,7 +38,17 @@ ...@@ -37,7 +38,17 @@
</div> </div>
</div> </div>
</div> </div>
<div slot="receiveDetails">{{ editForm.receiveWay == '1' ? '指定手机号' : '指定车架号后6位' }}:{{ editForm.receiveDetails }}</div> <div slot="approveFlagBlock">
{{ editForm.approveFlag == 1 ? '赠送前需审批' : '无需审批' }}
</div>
<div slot="receiveDetails">
<span v-if="editForm.receiveRule != 1">{{ editForm.receiveRule == 2 ? '员工赠送时指定' : '直接领取' }}</span>
<span v-if="editForm.receiveRule == 2 && editForm.receiveWay">{{ `${editForm.receiveWay == '1' ? '手机号:' : '车架号后6位:'}${editForm.receiveDetails}` }}</span>
<span v-if="editForm.receiveRule == 1">{{ editForm.receiveWay == '1' ? '指定手机号' : '指定车架号后6位' }}:</span>
<div v-if="editForm.receiveRule == 1" class="phone-wrap">
<span :class="['phone',editForm.receiveWay==1?'realTel':'realNum']" 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 slot="staffListBlock" class="sale-select" v-show="editForm.staffList && editForm.staffList.length != 0">
<div :key="key" class="el-input-tag input-tag-wrapper-detail"> <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)"> <el-tag effect="plain" type="info" v-for="(tag, idx) in editForm.staffList" :key="idx" :disable-transitions="false" @close="handleStaffRemove(tag, idx)">
...@@ -80,6 +91,7 @@ export default { ...@@ -80,6 +91,7 @@ export default {
footerWidth: '0', footerWidth: '0',
loading: false, loading: false,
editChildRef: 'editChildRef', editChildRef: 'editChildRef',
receiveDetailList: [],
routeInfo: { routeInfo: {
// add-新增;edit-编辑;detail-详情 // add-新增;edit-编辑;detail-详情
addOrEdit: 'add', addOrEdit: 'add',
...@@ -135,8 +147,10 @@ export default { ...@@ -135,8 +147,10 @@ export default {
name: [{ required: true, message: '请输入礼包名称', trigger: 'change' }], name: [{ required: true, message: '请输入礼包名称', trigger: 'change' }],
remarkName: [{ required: true, message: '请输入备注名称', trigger: 'change' }], remarkName: [{ required: true, message: '请输入备注名称', trigger: 'change' }],
couponList: [{ required: true, message: '请选择礼包', trigger: 'change' }], couponList: [{ required: true, message: '请选择礼包', trigger: 'change' }],
receiveWay: [{ required: true, message: '请选择领取条件', trigger: 'change' }], receiveWay: [{ required: true, message: '请选择领取规则', trigger: 'change' }],
staffList: [{ required: true, message: '请选择发放员工', trigger: 'change' }] staffList: [{ required: true, message: '请选择发放员工', trigger: 'change' }],
approveFlag: [{ required: true, message: '请选择审批要求', trigger: 'change' }],
stock: [{ required: true, message: '请选择库存数量', trigger: 'change' }]
}, },
isEdit: true, isEdit: true,
editFormData: [ editFormData: [
...@@ -156,7 +170,17 @@ export default { ...@@ -156,7 +170,17 @@ export default {
addHtml: 'couponListBlock' addHtml: 'couponListBlock'
}, },
{ {
label: '领取条件', label: '库存数量',
name: 'stock',
type: 'showTxt'
},
{
label: '审批要求',
name: 'approveFlag',
addHtml: 'approveFlagBlock'
},
{
label: '领取规则',
name: 'receiveWay', name: 'receiveWay',
addHtml: 'receiveDetails' addHtml: 'receiveDetails'
}, },
...@@ -194,6 +218,9 @@ export default { ...@@ -194,6 +218,9 @@ export default {
res.data.createdDate = dayjs(res.data.createdDate).format('YYYY-MM-DD HH:mm:ss') 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') res.data.updatedDate = dayjs(res.data.updatedDate).format('YYYY-MM-DD HH:mm:ss')
this.editForm = res.data this.editForm = res.data
let arr = []
res.data.receiveDetails && (arr = res.data.receiveDetails.split(','))
this.receiveDetailList = [...arr]
this.approvalStatus = res.data.approveStatus - 1 this.approvalStatus = res.data.approveStatus - 1
this.recoveryCoupon() this.recoveryCoupon()
this.recoveryTotalPrice() this.recoveryTotalPrice()
...@@ -268,6 +295,11 @@ export default { ...@@ -268,6 +295,11 @@ export default {
.gift-box { .gift-box {
display: flex; display: flex;
padding: 10px 0 10px 10px; padding: 10px 0 10px 10px;
.server-type {
margin: 4px 12px 0 0;
height: 23px;
width: 58px;
}
.gift-label { .gift-label {
width: 70px; width: 70px;
color: #999999; color: #999999;
...@@ -299,6 +331,25 @@ export default { ...@@ -299,6 +331,25 @@ 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;
}
.realTel{
width: 120px;
}
.realNum{
width: 80px;
}
}
// 发放员工 // 发放员工
.sale-select { .sale-select {
display: flex; display: flex;
......
...@@ -11,17 +11,8 @@ ...@@ -11,17 +11,8 @@
</div> </div>
<div class="container"> <div class="container">
<div> <div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData"> <GLCombiForm @handleOk="handleSearch" @handleRest="handleReset" ref="showSearch" :formObj="searchForm" :formData="searchFormData"></GLCombiForm>
<span slot="footer"> <GLButton style="float:right;margin-bottom:10px;" :size="size" class="default-blue-btn" type="default" fn="导出" @click="handleExport">导出</GLButton>
<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>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
...@@ -30,6 +21,7 @@ ...@@ -30,6 +21,7 @@
<div class="p-b-12">礼包明细</div> <div class="p-b-12">礼包明细</div>
<div class="gift-detail flex-wrap"> <div class="gift-detail flex-wrap">
<div class="gift-item" v-for="(item, index) in scope.scope.couponList" :key="index"> <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 :class="['gift-coupon-name', item.status == '3' ? ' txt-grey' : '']">{{ item.couponName }} × {{ item.couponAmount }}</p>
<p v-show="item.status == '3'" class="gift-tips">已失效</p> <p v-show="item.status == '3'" class="gift-tips">已失效</p>
</div> </div>
...@@ -38,12 +30,12 @@ ...@@ -38,12 +30,12 @@
<div slot="name" slot-scope="scope"> <div slot="name" slot-scope="scope">
<p class="cursor-pointer" @click="handleDetail(scope.scope)">{{ scope.scope.name }}</p> <p class="cursor-pointer" @click="handleDetail(scope.scope)">{{ scope.scope.name }}</p>
</div> </div>
<div slot="approveStatus" slot-scope="scope"> <div style="display: flex;align-items: center;" slot="approveStatus" slot-scope="scope">
<span :style="{ color: approvalStatusColor[scope.scope.approveStatus - 1] }">{{ approvalStatusVal[scope.scope.approveStatus - 1] }}</span> <div class="approve-status" :style="{ 'background-color': approvalStatusColor[scope.scope.approveStatus - 1] }"></div>
<span>{{ approvalStatusVal[scope.scope.approveStatus - 1] }}</span>
</div> </div>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<GLButton type="text" fn="编辑" @click="handleEdit('edit', scope.scope)">编辑</GLButton> <GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
<GLButton type="text" fn="删除" @click="handleDelete(scope.scope)">删除</GLButton>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -59,6 +51,40 @@ export default { ...@@ -59,6 +51,40 @@ export default {
name: 'giftList', name: 'giftList',
data() { data() {
return { 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', size: 'small',
url: url, url: url,
searchForm: { searchForm: {
...@@ -106,7 +132,10 @@ export default { ...@@ -106,7 +132,10 @@ export default {
getListApi: this.$apis.giftBag.getListApi, getListApi: this.$apis.giftBag.getListApi,
tableParams: { tableParams: {
listName: 'list', listName: 'list',
tableOption: true, tableOption: {
width:120,
align:'center'
},
tableColumns: [ tableColumns: [
{ {
label: '', label: '',
...@@ -130,11 +159,11 @@ export default { ...@@ -130,11 +159,11 @@ export default {
{ {
label: '备注名称', label: '备注名称',
prop: 'remarkName', prop: 'remarkName',
width: '200' width: 150
}, },
{ {
label: '预估成本/元', label: '预估成本/元',
width: 200, width: 150,
prop: 'anticipatedCost', prop: 'anticipatedCost',
formatter: cellValue => { formatter: cellValue => {
return (cellValue.anticipatedCost / 100).toFixed(2) return (cellValue.anticipatedCost / 100).toFixed(2)
...@@ -143,12 +172,28 @@ export default { ...@@ -143,12 +172,28 @@ export default {
{ {
label: '发放员工', label: '发放员工',
prop: 'staffList', prop: 'staffList',
width: 200, width: 150,
formatter: cellValue => { formatter: cellValue => {
return cellValue.staffList.map(item => item.staffName).join(',') 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: '赠送原因', label: '赠送原因',
width: 200, width: 200,
prop: 'giveReason', prop: 'giveReason',
...@@ -158,13 +203,14 @@ export default { ...@@ -158,13 +203,14 @@ export default {
}, },
{ {
label: '审批状态', label: '审批状态',
width: 150,
prop: 'approveStatus', prop: 'approveStatus',
addHtml: 'approveStatus' addHtml: 'approveStatus'
}, },
{ {
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')
} }
...@@ -204,7 +250,7 @@ export default { ...@@ -204,7 +250,7 @@ export default {
}, },
// 1 审批中;2 审批通过; 3审批驳回 4审批撤销 5待审批 // 1 审批中;2 审批通过; 3审批驳回 4审批撤销 5待审批
// 审批状态 0审批中 1审批通过 2审批驳回 // 审批状态 0审批中 1审批通过 2审批驳回
approvalStatusColor: ['#FF6D00', '#2CCA74', '#EB4E4E', '#999999', '#999999'], approvalStatusColor: ['#5850FF', '#2CCA74', '#EB4E4E', '#FDB757', '#FDB757'],
approvalStatusVal: ['审批中', '审批通过', '已驳回', '审批撤销', '待审批'] approvalStatusVal: ['审批中', '审批通过', '已驳回', '审批撤销', '待审批']
} }
}, },
...@@ -294,6 +340,7 @@ export default { ...@@ -294,6 +340,7 @@ export default {
$title: encodeURI(addOrEdit == 'add' ? '新增礼包' : '编辑礼包') $title: encodeURI(addOrEdit == 'add' ? '新增礼包' : '编辑礼包')
} }
addOrEdit != 'add' && (params.id = row.id) addOrEdit != 'add' && (params.id = row.id)
addOrEdit != 'add' && (params.receivedStock = row.receivedStock)
this.$router.push({ this.$router.push({
path: '/giftBag/editGift', path: '/giftBag/editGift',
query: params query: params
...@@ -354,12 +401,28 @@ export default { ...@@ -354,12 +401,28 @@ export default {
<style lang="scss"> <style lang="scss">
.p-b-12 { .p-b-12 {
margin-bottom: 14px; 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 { .gift-detail .gift-item {
margin-right: 80px; margin-right: 80px;
display: flex;
align-items: center;
color: #333333;
img {
height: 23px;
width: 58px;
margin-right: 23px;
}
.gift-coupon-name { .gift-coupon-name {
display: inline-block; display: inline-block;
margin-right: 7px;
} }
.gift-tips { .gift-tips {
display: inline-block; display: inline-block;
......
...@@ -22,6 +22,7 @@ export default { ...@@ -22,6 +22,7 @@ export default {
// 表格组件 // 表格组件
userInfo: {}, userInfo: {},
staffList: [], staffList: [],
selectList:[],
fnCallBack: false, fnCallBack: false,
url: url, url: url,
loading: true, loading: true,
...@@ -72,6 +73,8 @@ export default { ...@@ -72,6 +73,8 @@ export default {
mounted() { mounted() {
this.userInfo = this.$globalState.session this.userInfo = this.$globalState.session
this.selectList = JSON.parse(JSON.stringify(this.selectedStaffList))
this.selectList.map(item => item.userOneId = item.staffUUID)
this.getList({}, true) this.getList({}, true)
}, },
...@@ -93,7 +96,9 @@ export default { ...@@ -93,7 +96,9 @@ export default {
this.loading = false this.loading = false
this.fnCallBack = true this.fnCallBack = true
this.$refs.mutiProRef.tableTotal = res.count this.$refs.mutiProRef.tableTotal = res.count
this.$nextTick(()=>{
this.recoverySelected() this.recoverySelected()
})
this.$refs.mutiProRef.tableHeightValues = '50vh' this.$refs.mutiProRef.tableHeightValues = '50vh'
}) })
}, },
...@@ -101,12 +106,24 @@ export default { ...@@ -101,12 +106,24 @@ export default {
if (this.selectedStaffList && this.selectedStaffList.length) { if (this.selectedStaffList && this.selectedStaffList.length) {
this.selectedStaffList.forEach(row => { this.selectedStaffList.forEach(row => {
row.userOneId = row.staffUUID row.userOneId = row.staffUUID
this.$refs.mutiProRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(row) this.$nextTick(()=>{
let idx = this.$refs.mutiProRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].data.findIndex(item=>item.userOneId==row.staffUUID)
if(idx>-1){
try{
this.$refs.mutiProRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.$refs.mutiProRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].data[idx],true)
let id = this.selectList.findIndex(item=>item.staffUUID==row.staffUUID)
if(id>-1) this.selectList.splice(id, 1)
}catch(err){
console.log(err)
}
}
})
}) })
} }
}, },
handleMutiSelectConfirm() { handleMutiSelectConfirm() {
var selectedData = this.$refs.mutiProRef.mutiSelectArr[this.tableParams.mutiSelectName] var selectedData = [...this.$refs.mutiProRef.mutiSelectArr[this.tableParams.mutiSelectName],...this.selectList]
this.$emit('handleMutiSelectConfirm', selectedData) this.$emit('handleMutiSelectConfirm', selectedData)
}, },
handleMutiSelectClose() { handleMutiSelectClose() {
......
...@@ -13,14 +13,15 @@ ...@@ -13,14 +13,15 @@
</span> </span>
<div class="container"> <div class="container">
<div class="search-form"> <div class="search-form">
<glsx-combi-form ref="materialFormRef1" :isEdit="isEdit" :formObj="searchForm" :formData="materialFormData" :inline="true"> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="materialFormData" @handleOk="getListApi" @handleRest="handleReset"></GLCombiForm>
<!-- <glsx-combi-form ref="materialFormRef1" :isEdit="isEdit" :formObj="searchForm" :formData="materialFormData" :inline="true">
<span slot="footer" slot-scope="scope"> <span slot="footer" slot-scope="scope">
<span class="select-pro"> <span class="select-pro">
<el-button type="primary" :size="size" @click="getListApi">查询</el-button> <el-button type="primary" :size="size" @click="getListApi">查询</el-button>
<el-button type="default" :size="size" @click="handleReset(scope)">重置</el-button> <el-button type="default" :size="size" @click="handleReset(scope)">重置</el-button>
</span> </span>
</span> </span>
</glsx-combi-form> </glsx-combi-form> -->
</div> </div>
<div class="tabelList"> <div class="tabelList">
<el-row :style="{ height: boxHeight }"> <el-row :style="{ height: boxHeight }">
...@@ -72,23 +73,7 @@ ...@@ -72,23 +73,7 @@
<span v-if="scope.scope.materialType == 3">图文</span> <span v-if="scope.scope.materialType == 3">图文</span>
</div> </div>
<span slot="auth-button" slot-scope="scope"> <span slot="auth-button" slot-scope="scope">
<!-- <el-button type="text" @click="handleDetail(scope.scope)">详情</el-button> --> <GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
<GLButton type="text" fn="详情" @click="handleDetail(scope.scope)">详情</GLButton>
<!-- <el-button type="text" @click="addMaterial(2, scope.scope)">编辑</el-button> -->
<GLButton :size="size" type="text" fn="编辑" @click="addMaterial(2, scope.scope)">编辑</GLButton>
<el-popover placement="right" trigger="click">
<ul>
<li>
<!-- <el-button :size="size" type="text" @click="handleForbid(scope.scope)">{{ scope.scope.status == 0 ? '禁用' : '启用' }}</el-button> -->
<GLButton :size="size" type="text" fn="禁用" @click="handleForbid(scope.scope)">{{ scope.scope.status == 0 ? '禁用' : '启用' }}</GLButton>
</li>
<li>
<!-- <el-button :size="size" type="text" @click="handleDelete(scope.scope)">删除</el-button> -->
<GLButton :size="size" type="text" fn="删除营销素材" @click="handleDelete(scope.scope)">删除</GLButton>
</li>
</ul>
<el-button type="text" slot="reference" class="btn-more">更多</el-button>
</el-popover>
</span> </span>
</GLTable> </GLTable>
</div> </div>
...@@ -144,7 +129,7 @@ export default { ...@@ -144,7 +129,7 @@ export default {
materialGroupName: '', materialGroupName: '',
materialFormData: [ materialFormData: [
{ {
label: '业务类型:', label: '业务类型',
name: 'businessType', name: 'businessType',
type: 'select', type: 'select',
placeholder: '全部', placeholder: '全部',
...@@ -154,7 +139,7 @@ export default { ...@@ -154,7 +139,7 @@ export default {
optionsName: 'businessName' optionsName: 'businessName'
}, },
{ {
label: '素材类型:', label: '素材类型',
name: 'materialType', name: 'materialType',
type: 'select', type: 'select',
placeholder: '全部', placeholder: '全部',
...@@ -181,7 +166,7 @@ export default { ...@@ -181,7 +166,7 @@ export default {
optionsName: 'optionLabel' optionsName: 'optionLabel'
}, },
{ {
label: '状态:', label: '状态',
name: 'status', name: 'status',
type: 'select', type: 'select',
placeholder: '全部', placeholder: '全部',
...@@ -208,20 +193,61 @@ export default { ...@@ -208,20 +193,61 @@ export default {
optionsName: 'optionLabel' optionsName: 'optionLabel'
}, },
{ {
label: '素材名称:', label: '素材名称',
name: 'materialName', name: 'materialName',
type: 'input', type: 'input',
placeholder: '请输入素材名称' placeholder: '请输入素材名称'
} }
], ],
// materialFormData2: [ // 表格按钮
// { tableButtonList: [
// label: '素材名称:', {
// name: 'materialName', type: 'GLButton',
// type: 'input', name: '详情',
// placeholder: '请输入素材名称' attrs: {
// } type: 'text',
// ], fn: '详情'
},
listeners: {
click: this.handleDetail
}
},
{
type: 'GLButton',
name: '编辑',
attrs: {
type: 'text',
fn: '编辑'
},
listeners: {
click: row => this.addMaterial(2, row)
}
},
{
type: 'GLButton',
name: row => {
return row.status == 0 ? '禁用' : '启用'
},
attrs: {
type: 'text',
fn: '禁用'
},
listeners: {
click: this.handleForbid
}
},
{
type: 'GLButton',
name: '删除',
attrs: {
type: 'text',
fn: '删除营销素材'
},
listeners: {
click: this.handleDelete
}
}
],
tableParams: { tableParams: {
listName: 'data', listName: 'data',
tableOption: true, tableOption: true,
......
<template> <template>
<div class="live-room marketing"> <div class="live-room marketing">
<div class="live-room container"> <div class="live-room container">
<div class="flex"> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- <div class="flex">
<el-form :inline="true" style="width: 100%" :model="searchForm" label-width="70px" label-position="right"> <el-form :inline="true" style="width: 100%" :model="searchForm" label-width="70px" label-position="right">
<el-row> <el-row>
<el-form-item size="small" label="订单编号"> <el-form-item size="small" label="订单编号">
...@@ -43,27 +44,26 @@ ...@@ -43,27 +44,26 @@
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
</div> </div> -->
<div class="choseRow m-b-10"> <div class="choseRow m-b-10">
<div class="choseItem" :class="{ active: currentIndex == index + 1 }" v-for="(item, index) in choseList" :key="index" @click="tabClick(index + 1)"> <div class="choseItem" :class="{ active: currentIndex == index + 1 }" v-for="(item, index) in choseList" :key="index" @click="tabClick(index + 1)">
{{ item }} {{ item }}
</div> </div>
</div> </div>
<GLTable ref="memberOrderRef" v-if="isReload" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="memberOrderRef" v-if="isReload" :noDataImg="url" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<template slot="orderType" slot-scope="scope"> <div slot="orderType" slot-scope="scope" style="width: 200px">
<template v-if="scope.scope.orderType == 1"> <template v-if="scope.scope.orderType == 1">
<span>{{ scope.scope.packageType == 1 ? '门店套餐' : '集团套餐' }}</span> <span>{{ scope.scope.packageType == 1 ? '门店套餐' : '集团套餐' }}</span>
</template> </template>
<template v-else> <template v-else>
<span>会员卡</span> <span>会员卡</span>
</template> </template>
</template> </div>
<span class="table-btns" slot="auth-button" slot-scope="scope" :data="scope.scope"> <span class="table-btns" slot="auth-button" slot-scope="scope" :data="scope.scope">
<!-- <el-button type="text" @click="handleDetail(scope.scope)" v-if="scope.scope.orderType == 1">详情</el-button> <!-- <GLButton @click="handleDetail(scope.scope)" fn="订单详情" type="text" v-if="scope.scope.orderType == 1">详情</GLButton>
<el-button type="text" style="color:#eee" v-else>详情</el-button> -->
<GLButton @click="handleDetail(scope.scope)" fn="订单详情" type="text" v-if="scope.scope.orderType == 1">详情</GLButton>
<GLButton style="color: #eee" fn="订单详情" type="text" v-else>详情</GLButton> <GLButton style="color: #eee" fn="订单详情" type="text" v-else>详情</GLButton>
<GLButton fn="退款" v-if="scope.scope.refundFlag == 1" type="text" @click="handleRefund(scope.scope)">退款</GLButton> <GLButton fn="退款" v-if="scope.scope.refundFlag == 1" type="text" @click="handleRefund(scope.scope)">退款</GLButton> -->
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</span> </span>
</GLTable> </GLTable>
</div> </div>
...@@ -90,11 +90,6 @@ export default { ...@@ -90,11 +90,6 @@ export default {
accountLevel: 0, //1,2,3,4工厂,省代,市代,门店 accountLevel: 0, //1,2,3,4工厂,省代,市代,门店
url: url, url: url,
isReload: true, isReload: true,
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
}
},
size: 'small', size: 'small',
searchForm: { searchForm: {
orderStatus: '', //默认查询全部 orderStatus: '', //默认查询全部
...@@ -102,21 +97,82 @@ export default { ...@@ -102,21 +97,82 @@ export default {
// daterange:'' // daterange:''
orderType: '' orderType: ''
}, },
// 搜索
searchFormData: [
{
label: '订单编号',
name: 'orderCode',
type: 'input',
maxlength: 100
},
{
label: '名称',
name: 'packageName',
type: 'input',
maxlength: 100
},
{
label: '类型',
name: 'orderType',
type: 'select',
optionList: [],
optionId: 'dictValue',
optionLabel: 'dictLabel',
optionsName: 'orderTypeList'
},
{
label: '用户信息',
name: 'userInfo',
type: 'input',
placeholder: '请输入用户名或手机号',
maxlength: 100
},
{
label: '下单时间',
name: 'daterange',
type: 'datePicker',
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
},
{
label: '开通门店',
name: 'merchantName',
type: 'input',
maxlength: 100
}
],
choseList: ['全部', '待收货', '已完成', '退款|售后'], choseList: ['全部', '待收货', '已完成', '退款|售后'],
currentIndex: 1, currentIndex: 1,
searchFormTable: {}, searchFormTable: {},
orderTypeList: [ // 表格按钮
tableButtonList: [
{ {
dictValue: '', type: 'GLButton',
dictLabel: '全部' name: '详情',
attrs: {
type: 'text',
fn: '订单详情',
disabled: row => {
return row.orderType != 1
}
}, },
{ listeners: {
dictValue: 1, click: this.handleDetail
dictLabel: '套餐' }
}, },
{ {
dictValue: 2, type: 'GLButton',
dictLabel: '会员卡' name: '退款',
attrs: {
type: 'text',
fn: '退款'
},
condition: row => {
return row.refundFlag == 1
},
listeners: {
click: this.handleRefund
}
} }
], ],
// 表格组件 // 表格组件
...@@ -137,7 +193,7 @@ export default { ...@@ -137,7 +193,7 @@ export default {
prop: 'orderType', prop: 'orderType',
addHtml: 'orderType' addHtml: 'orderType'
// formatter: cellValue => { // formatter: cellValue => {
// return this.baseDataList.orderTypesList.find(item => item.confId == cellValue.orderType).confName // return this.baseData.orderTypesList.find(item => item.confId == cellValue.orderType).confName
// } // }
}, },
{ {
...@@ -154,18 +210,18 @@ export default { ...@@ -154,18 +210,18 @@ export default {
prop: 'orderStatus', prop: 'orderStatus',
width: '80', width: '80',
formatter: cellValue => { formatter: cellValue => {
return this.baseDataList.orderStatusList.find(item => item.confId == cellValue.orderStatus).confName return this.baseData.orderStatusList.find(item => item.confId == cellValue.orderStatus).confName
} }
}, },
{ {
label: '下单时间', label: '下单时间',
prop: 'createDate', prop: 'createDate',
width: 160 width: 200
}, },
{ {
label: '开通门店', label: '开通门店',
prop: 'merchantName', prop: 'merchantName',
width: '180' width: 220
}, },
{ {
label: '推荐人', label: '推荐人',
...@@ -178,6 +234,7 @@ export default { ...@@ -178,6 +234,7 @@ export default {
{ {
label: '用户信息', label: '用户信息',
prop: 'accountName', prop: 'accountName',
width: 220,
formatter: cellValue => { formatter: cellValue => {
return cellValue.accountName + ' ' + cellValue.mobile return cellValue.accountName + ' ' + cellValue.mobile
} }
...@@ -185,13 +242,23 @@ export default { ...@@ -185,13 +242,23 @@ export default {
{ {
label: '订单号', label: '订单号',
prop: 'orderCode', prop: 'orderCode',
width: 190 width: 200
} }
] ]
}, },
baseDataList: { baseData: {
orderTypesList: orderTypesList, orderTypesList: orderTypesList,
orderStatusList: orderStatusList orderStatusList: orderStatusList,
orderTypeList: [
{
dictValue: 1,
dictLabel: '套餐'
},
{
dictValue: 2,
dictLabel: '会员卡'
}
],
} }
} }
}, },
...@@ -205,8 +272,36 @@ export default { ...@@ -205,8 +272,36 @@ export default {
this.tableParams.tableColumns.splice(idx, 1) this.tableParams.tableColumns.splice(idx, 1)
} }
}, },
mounted() { }, mounted() {
this.getOptionsList('searchFormData')
},
methods: { methods: {
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)
}
}
})
}
},
tabClick(index) { tabClick(index) {
this.currentIndex = index this.currentIndex = index
switch (index) { switch (index) {
...@@ -241,10 +336,8 @@ export default { ...@@ -241,10 +336,8 @@ export default {
getParams() { getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm)) var params = JSON.parse(JSON.stringify(this.searchForm))
if (params.daterange) { if (params.daterange) {
params.startTime = this.searchForm.daterange[0] + ' 00:00:00' params.startTime = new Date(this.searchForm.daterange[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.endTime = this.searchForm.daterange[1] + ' 23:59:59' params.endTime = new Date(this.searchForm.daterange[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
} else {
if (params.beginTime) delete params.beginTime && delete params.endTime
} }
delete params.daterange delete params.daterange
return params return params
...@@ -311,9 +404,10 @@ export default { ...@@ -311,9 +404,10 @@ export default {
handleReset() { handleReset() {
this.isReload = false this.isReload = false
this.currentIndex = 1 this.currentIndex = 1
this.searchForm = {} this.searchForm = {
this.searchForm.orderStatus = '' //默认查询全部 orderStatus: '',
this.searchForm.orderType = '' orderType: ''
}
// this.handleSearch() // this.handleSearch()
this.$nextTick(() => { this.$nextTick(() => {
this.isReload = true this.isReload = true
...@@ -324,9 +418,9 @@ export default { ...@@ -324,9 +418,9 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/.el-input--small .el-input__inner { // /deep/.el-input--small .el-input__inner {
width: 215px; // width: 215px;
} // }
.el-range-editor.is-active, .el-range-editor.is-active,
.el-range-editor.is-active:hover { .el-range-editor.is-active:hover {
border-color: #5850ff; border-color: #5850ff;
......
...@@ -113,6 +113,11 @@ export default { ...@@ -113,6 +113,11 @@ export default {
} }
return false return false
} }
},
{
label: '推荐人:',
prop: 'shareStaffName',
span: 8
} }
], ],
basicParams: [ basicParams: [
......
<template> <template>
<div class="marketing"> <div class="marketing">
<div class="btnWrap"> <div class="btnWrap">
<!-- <el-button :size="size" type="primary" @click="handleCreate" icon="el-icon-plus">创建套餐</el-button> -->
<GLButton type="primary" @click="handleCreate" size="small" icon="el-icon-plus" fn="创建套餐" mode="el-button">创建套餐</GLButton> <GLButton type="primary" @click="handleCreate" size="small" icon="el-icon-plus" fn="创建套餐" mode="el-button">创建套餐</GLButton>
<!-- <el-button :size="size" @click="showViewer = true">查看示例效果</el-button> --> <!-- <el-button :size="size" @click="showViewer = true">查看示例效果</el-button> -->
<el-image-viewer <el-image-viewer v-if="showViewer" :on-close="
v-if="showViewer"
:on-close="
() => { () => {
showViewer = false showViewer = false
} }
" " :url-list="srcList" style="padding:4%;" />
:url-list="srcList"
style="padding:4%;"
/>
</div> </div>
<tip-panel class="list-panel" panelMinHeight="40px" :panelContent="panelContent" v-if="isFirstShow" @closePanel="closePanel"></tip-panel> <tip-panel class="list-panel" panelMinHeight="40px" :panelContent="panelContent" v-if="isFirstShow" @closePanel="closePanel"></tip-panel>
<template v-if="accountLevel == 4 && merchantModel == 1"> <template v-if="accountLevel == 4 && merchantModel == 1">
...@@ -36,30 +30,23 @@ ...@@ -36,30 +30,23 @@
<span class="table-btns" slot="optionsFun" slot-scope="scope" :data="scope.scope"> <span class="table-btns" slot="optionsFun" slot-scope="scope" :data="scope.scope">
<template v-if="!(accountLevel == 4 && activetab == 1)"> <template v-if="!(accountLevel == 4 && activetab == 1)">
<template v-if="scope.scope.state === 0"> <!-- <template v-if="scope.scope.state === 0">
<!-- <el-button type="text" @click="handleEdit(scope.scope)">编辑</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button> -->
<GLButton type="text" @click="handleEdit(scope.scope)" fn="编辑套餐">编辑</GLButton> <GLButton type="text" @click="handleEdit(scope.scope)" fn="编辑套餐">编辑</GLButton>
<GLButton type="text" @click="handleUpOption(scope.scope)" fn="上架">上架</GLButton> <GLButton type="text" @click="handleUpOption(scope.scope)" fn="上架">上架</GLButton>
<GLButton type="text" @click="handleDelete(scope.scope)" fn="删除">删除</GLButton> <GLButton type="text" @click="handleDelete(scope.scope)" fn="删除">删除</GLButton>
</template> </template>
<template v-else-if="scope.scope.state === 1"> <template v-else-if="scope.scope.state === 1">
<!-- <el-button type="text" @click="handleDownOption(scope.scope)">下架</el-button>
<el-button type="text" @click="handleEdit(scope.scope)">编辑</el-button> -->
<GLButton type="text" @click="handleDownOption(scope.scope)" fn="下架">下架</GLButton> <GLButton type="text" @click="handleDownOption(scope.scope)" fn="下架">下架</GLButton>
<GLButton type="text" @click="handleEdit(scope.scope)" fn="编辑套餐">编辑</GLButton> <GLButton type="text" @click="handleEdit(scope.scope)" fn="编辑套餐">编辑</GLButton>
</template> </template>
<template v-else> <template v-else>
<!-- <el-button type="text" @click="handleEdit(scope.scope)">编辑</el-button>
<el-button type="text" @click="handleUpOption(scope.scope)">上架</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button> -->
<GLButton type="text" @click="handleEdit(scope.scope)" fn="编辑套餐">编辑</GLButton> <GLButton type="text" @click="handleEdit(scope.scope)" fn="编辑套餐">编辑</GLButton>
<GLButton type="text" @click="handleUpOption(scope.scope)" fn="上架">上架</GLButton> <GLButton type="text" @click="handleUpOption(scope.scope)" fn="上架">上架</GLButton>
<GLButton type="text" @click="handleDelete(scope.scope)" fn="删除">删除</GLButton> <GLButton type="text" @click="handleDelete(scope.scope)" fn="删除">删除</GLButton>
</template> </template>
<GLButton type="text" @click="handleUpdateToTop(scope.scope)" v-if="scope.scope.topFlag == 2 && accountLevel != 4" fn="置顶推荐">置顶推荐</GLButton> <GLButton type="text" @click="handleUpdateToTop(scope.scope)" v-if="scope.scope.topFlag == 2 && accountLevel != 4" fn="置顶推荐">置顶推荐</GLButton>
<el-button type="text" v-if="scope.scope.topFlag == 1 && accountLevel != 4">已置顶推荐</el-button> <el-button type="text" v-if="scope.scope.topFlag == 1 && accountLevel != 4">已置顶推荐</el-button> -->
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</template> </template>
</span> </span>
</GLTable> </GLTable>
...@@ -125,6 +112,86 @@ export default { ...@@ -125,6 +112,86 @@ export default {
} }
], ],
activetab: 0, activetab: 0,
// 表格按钮
tableButtonList: [
{
type: 'GLButton',
name: '编辑',
attrs: {
type: 'text',
fn: '编辑套餐'
},
listeners: {
click: this.handleEdit
}
},
{
type: 'GLButton',
name: '上架',
attrs: {
type: 'text',
fn: '上架'
},
condition: row => {
return row.state != 1
},
listeners: {
click: this.handleUpOption
}
},
{
type: 'GLButton',
name: '下架',
attrs: {
type: 'text',
fn: '下架'
},
condition: row => {
return row.state == 1
},
listeners: {
click: this.handleDownOption
}
},
{
type: 'GLButton',
name: '删除',
attrs: {
type: 'text',
fn: '删除'
},
condition: row => {
return row.state != 1
},
listeners: {
click: this.handleDelete
}
},
{
type: 'GLButton',
name: '置顶推荐',
attrs: {
type: 'text',
fn: '置顶推荐'
},
condition: row => {
return row.topFlag == 2 && this.accountLevel != 4
},
listeners: {
click: this.handleUpdateToTop
}
},
{
type: 'el-button',
name: '已置顶推荐',
attrs: {
type: 'text'
},
condition: row => {
return row.topFlag == 1 && this.accountLevel != 4
}
}
],
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数 // 表格参数
tableParams: { tableParams: {
...@@ -146,7 +213,8 @@ export default { ...@@ -146,7 +213,8 @@ export default {
}, },
{ {
label: '套餐售价/元', label: '套餐售价/元',
prop: 'packagePrice' prop: 'packagePrice',
width: 180
}, },
{ {
label: '说明', label: '说明',
...@@ -212,7 +280,7 @@ export default { ...@@ -212,7 +280,7 @@ export default {
this.dynamicFile() this.dynamicFile()
this.getLoginCountFun() this.getLoginCountFun()
}, },
mounted() {}, mounted() { },
methods: { methods: {
dynamicFile() { dynamicFile() {
let { activetab, accountLevel } = this let { activetab, accountLevel } = this
...@@ -333,7 +401,7 @@ export default { ...@@ -333,7 +401,7 @@ export default {
}) })
}, },
// 查看示例效果 // 查看示例效果
handleLook(row) {}, handleLook(row) { },
handleDelete(row) { handleDelete(row) {
this.$messageBox.confirm('是否删除该套餐?', '删除', { this.$messageBox.confirm('是否删除该套餐?', '删除', {
confirmButtonText: '确定', confirmButtonText: '确定',
......
...@@ -5,14 +5,7 @@ ...@@ -5,14 +5,7 @@
<!-- <GLButton :size="size" type="primary" fn="新增新车" class="el-icon-plus" @click="handleEdit(1)">新增新车</GLButton> --> <!-- <GLButton :size="size" type="primary" fn="新增新车" class="el-icon-plus" @click="handleEdit(1)">新增新车</GLButton> -->
</div> </div>
<div class="container"> <div class="container">
<div> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<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>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="newCarRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="newCarRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
......
...@@ -2,23 +2,12 @@ ...@@ -2,23 +2,12 @@
<template> <template>
<div class="marketing p-t-20"> <div class="marketing p-t-20">
<div class="container"> <div class="container">
<div> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns">
<el-button :size="size" type="default" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</span>
</glsx-combi-form>
</div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="commentRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="commentRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<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.commentStatus == '0'" type="text" @click="handleRevoke(scope.scope)">发布</el-button> <GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
<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> -->
<GLButton type="text" fn="评价详情" @click="handleDetail(scope.scope)">查看</GLButton>
<!-- <el-button type="text" @click="handleDelete(scope.scope)">删除</el-button> -->
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -67,6 +56,32 @@ export default { ...@@ -67,6 +56,32 @@ export default {
isClear: true isClear: true
} }
], ],
// 表格按钮
tableButtonList: [
{
type: 'el-button',
name: row => {
return row.commentStatus == '0' ? '发布' : '撤回'
},
attrs: {
type: 'text'
},
listeners: {
click: this.handleRevoke
}
},
{
type: 'GLButton',
name: '查看',
attrs: {
type: 'text',
fn: '评价详情'
},
listeners: {
click: this.handleDetail
}
}
],
// 表格 // 表格
getListApi: this.$apis.orderComment.getListApi, getListApi: this.$apis.orderComment.getListApi,
tableParams: { tableParams: {
......
...@@ -2,17 +2,7 @@ ...@@ -2,17 +2,7 @@
<template> <template>
<div class="marketing p-t-20 order-manage"> <div class="marketing p-t-20 order-manage">
<div class="container"> <div class="container">
<div> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData1"></glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData2"></glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData3"></glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData4">
<span slot="footer" class="footer-btns">
<el-button :size="size" type="default" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</span>
</glsx-combi-form>
</div>
<div class="flex"> <div class="flex">
<div class="flex-default"> <div class="flex-default">
...@@ -48,12 +38,7 @@ ...@@ -48,12 +38,7 @@
<span>{{ baseData.orderStatusList.map(item => item.confId).includes(scope.scope.orderStatus + '') ? baseData.orderStatusList.find(item => item.confId == scope.scope.orderStatus).confName : '-' }}</span> <span>{{ baseData.orderStatusList.map(item => item.confId).includes(scope.scope.orderStatus + '') ? baseData.orderStatusList.find(item => item.confId == scope.scope.orderStatus).confName : '-' }}</span>
</div> </div>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<!-- <el-button type="text" @click="handleDetail(scope.scope)">查看订单</el-button> --> <GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
<GLButton type="text" fn="查看订单" @click="handleDetail(scope.scope)">查看订单</GLButton>
<el-button v-if="scope.scope.deliveryType == 1 && scope.scope.orderStatus == 21" type="text" @click="handleWriteOff(scope.scope)">订单核销</el-button>
<el-button v-if="scope.scope.deliveryType == 2 && scope.scope.orderStatus == 6" type="text" @click="handleExpressInfo(scope.scope)">输入快递信息</el-button>
<el-button v-if="scope.scope.afterSaleStatus == 1" type="text" @click="handleExamine(scope.scope)">退款审核</el-button>
<el-button v-if="scope.scope.afterSaleStatus == 4" type="text" @click="handleReceiving(scope.scope)">确认收货</el-button>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 - 全部订单/售后订单 - end --> <!-- 表格区域 - 全部订单/售后订单 - end -->
...@@ -159,7 +144,7 @@ export default { ...@@ -159,7 +144,7 @@ export default {
refundTotal: '' refundTotal: ''
}, },
// 搜索 // 搜索
searchFormData1: [ searchFormData: [
{ {
label: '订单编号', label: '订单编号',
name: 'orderCode', name: 'orderCode',
...@@ -177,6 +162,7 @@ export default { ...@@ -177,6 +162,7 @@ export default {
changeAttr: (value, targetItem) => { changeAttr: (value, targetItem) => {
var isAdd = value.length > this.oldVal.orderStatuses.length var isAdd = value.length > this.oldVal.orderStatuses.length
var targetVal = value[value.length - 1] var targetVal = value[value.length - 1]
var formIdx = this.searchFormData.findIndex(item => item.label == '订单状态')
if (!isAdd) { if (!isAdd) {
for (var i = 0; i < this.oldVal.orderStatuses.length; i++) { for (var i = 0; i < this.oldVal.orderStatuses.length; i++) {
if (!value.includes(this.oldVal.orderStatuses[i])) { if (!value.includes(this.oldVal.orderStatuses[i])) {
...@@ -185,12 +171,12 @@ export default { ...@@ -185,12 +171,12 @@ export default {
} }
} }
} }
!targetVal && (this.searchForm.orderStatuses = isAdd ? this.searchFormData1[1].optionList.map(item => item.confId) : []) !targetVal && (this.searchForm.orderStatuses = isAdd ? this.searchFormData[formIdx].optionList.map(item => item.confId) : [])
if (targetVal) { if (targetVal) {
var idx = value.findIndex(item => item == '') var idx = value.findIndex(item => item == '')
if (idx != -1 && this.searchForm.orderStatuses.length < this.searchFormData1[1].optionList.length) { if (idx != -1 && this.searchForm.orderStatuses.length < this.searchFormData[formIdx].optionList.length) {
this.searchForm.orderStatuses.splice(idx, 1) this.searchForm.orderStatuses.splice(idx, 1)
} else if (idx == -1 && this.searchForm.orderStatuses.length == this.searchFormData1[1].optionList.length - 1) { } else if (idx == -1 && this.searchForm.orderStatuses.length == this.searchFormData[formIdx].optionList.length - 1) {
this.searchForm.orderStatuses.push('') this.searchForm.orderStatuses.push('')
} }
} }
...@@ -210,6 +196,7 @@ export default { ...@@ -210,6 +196,7 @@ export default {
changeAttr: (value, targetItem) => { changeAttr: (value, targetItem) => {
var isAdd = value.length > this.oldVal.afterSaleStatuses.length var isAdd = value.length > this.oldVal.afterSaleStatuses.length
var targetVal = value[value.length - 1] var targetVal = value[value.length - 1]
var formIdx = this.searchFormData.findIndex(item => item.label == '售后状态')
if (!isAdd) { if (!isAdd) {
for (var i = 0; i < this.oldVal.afterSaleStatuses.length; i++) { for (var i = 0; i < this.oldVal.afterSaleStatuses.length; i++) {
if (!value.includes(this.oldVal.afterSaleStatuses[i])) { if (!value.includes(this.oldVal.afterSaleStatuses[i])) {
...@@ -218,20 +205,18 @@ export default { ...@@ -218,20 +205,18 @@ export default {
} }
} }
} }
!targetVal && (this.searchForm.afterSaleStatuses = isAdd ? this.searchFormData1[2].optionList.map(item => item.confId) : []) !targetVal && (this.searchForm.afterSaleStatuses = isAdd ? this.searchFormData[formIdx].optionList.map(item => item.confId) : [])
if (targetVal) { if (targetVal) {
var idx = value.findIndex(item => item == '') var idx = value.findIndex(item => item == '')
if (idx != -1 && this.searchForm.afterSaleStatuses.length < this.searchFormData1[2].optionList.length) { if (idx != -1 && this.searchForm.afterSaleStatuses.length < this.searchFormData[formIdx].optionList.length) {
this.searchForm.afterSaleStatuses.splice(idx, 1) this.searchForm.afterSaleStatuses.splice(idx, 1)
} else if (idx == -1 && this.searchForm.afterSaleStatuses.length == this.searchFormData1[2].optionList.length - 1) { } else if (idx == -1 && this.searchForm.afterSaleStatuses.length == this.searchFormData[formIdx].optionList.length - 1) {
this.searchForm.afterSaleStatuses.push('') this.searchForm.afterSaleStatuses.push('')
} }
} }
this.oldVal.afterSaleStatuses = this.$common.utils.deepClone(this.searchForm.afterSaleStatuses) this.oldVal.afterSaleStatuses = this.$common.utils.deepClone(this.searchForm.afterSaleStatuses)
} }
} },
],
searchFormData2: [
{ {
label: '门店', label: '门店',
name: 'merchantName', name: 'merchantName',
...@@ -250,9 +235,7 @@ export default { ...@@ -250,9 +235,7 @@ export default {
labelWidth: 72, labelWidth: 72,
isClear: true, isClear: true,
pickerOptions: 'beforeRangePickerOptions' pickerOptions: 'beforeRangePickerOptions'
} },
],
searchFormData3: [
{ {
label: '订单类型', label: '订单类型',
name: 'orderSource', name: 'orderSource',
...@@ -276,9 +259,7 @@ export default { ...@@ -276,9 +259,7 @@ export default {
name: 'outTradeNo', name: 'outTradeNo',
type: 'input', type: 'input',
maxlength: 50 maxlength: 50
} },
],
searchFormData4: [
{ {
label: '车架号', label: '车架号',
name: 'vin', name: 'vin',
...@@ -380,6 +361,72 @@ export default { ...@@ -380,6 +361,72 @@ export default {
], ],
// 确认收获 // 确认收获
isReceivingVisible: false, isReceivingVisible: false,
// 表格按钮
tableButtonList: [
{
type: 'GLButton',
name: '查看订单',
attrs: {
type: 'text',
fn: '查看订单'
},
listeners: {
click: this.handleDetail
}
},
{
type: 'el-button',
name: '订单核销',
attrs: {
type: 'text'
},
condition: row => {
return row.deliveryType == 1 && row.orderStatus == 21
},
listeners: {
click: this.handleWriteOff
}
},
{
type: 'el-button',
name: '输入快递信息',
attrs: {
type: 'text'
},
condition: row => {
return row.deliveryType == 2 && row.orderStatus == 6
},
listeners: {
click: this.handleExpressInfo
}
},
{
type: 'el-button',
name: '退款审核',
attrs: {
type: 'text'
},
condition: row => {
return row.afterSaleStatus == 1
},
listeners: {
click: this.handleExamine
}
},
{
type: 'el-button',
name: '确认收货',
attrs: {
type: 'text'
},
condition: row => {
return row.afterSaleStatus == 4
},
listeners: {
click: this.handleReceiving
}
}
],
// 表格 // 表格
getListApi: this.$apis.orderManage.getListApi, getListApi: this.$apis.orderManage.getListApi,
tableParams: { tableParams: {
...@@ -446,13 +493,13 @@ export default { ...@@ -446,13 +493,13 @@ export default {
{ {
label: '门店信息', label: '门店信息',
prop: 'merchantName', prop: 'merchantName',
line: 2, line: 1,
width: 180 width: 280
}, },
{ {
label: '订单类型', label: '订单类型',
prop: 'orderSource', prop: 'orderSource',
width: '80', width: '100',
formatter: cellValue => { formatter: cellValue => {
return this.baseData.orderSourceList.map(item => item.confId).includes(cellValue.orderSource + '') ? this.baseData.orderSourceList.find(item => item.confId == cellValue.orderSource).confName : '-' return this.baseData.orderSourceList.map(item => item.confId).includes(cellValue.orderSource + '') ? this.baseData.orderSourceList.find(item => item.confId == cellValue.orderSource).confName : '-'
} }
...@@ -460,7 +507,7 @@ export default { ...@@ -460,7 +507,7 @@ export default {
{ {
label: '售后状态', label: '售后状态',
prop: 'afterSaleStatus', prop: 'afterSaleStatus',
width: '80', width: '100',
formatter: cellValue => { formatter: cellValue => {
return this.baseData.afterSaleStatusList.map(item => item.confId).includes(cellValue.afterSaleStatus + '') ? this.baseData.afterSaleStatusList.find(item => item.confId == cellValue.afterSaleStatus).confName : '-' return this.baseData.afterSaleStatusList.map(item => item.confId).includes(cellValue.afterSaleStatus + '') ? this.baseData.afterSaleStatusList.find(item => item.confId == cellValue.afterSaleStatus).confName : '-'
} }
...@@ -468,7 +515,7 @@ export default { ...@@ -468,7 +515,7 @@ export default {
{ {
label: '结算方式', label: '结算方式',
prop: 'deliveryType', prop: 'deliveryType',
width: '80', width: '100',
formatter: cellValue => { formatter: cellValue => {
return this.baseData.deliveryTypeList.map(item => item.confId).includes(cellValue.deliveryType + '') ? this.baseData.deliveryTypeList.find(item => item.confId == cellValue.deliveryType).confName : '-' return this.baseData.deliveryTypeList.map(item => item.confId).includes(cellValue.deliveryType + '') ? this.baseData.deliveryTypeList.find(item => item.confId == cellValue.deliveryType).confName : '-'
} }
...@@ -494,9 +541,7 @@ export default { ...@@ -494,9 +541,7 @@ export default {
mounted() { mounted() {
// this.getCount() // this.getCount()
this.getOptionsList('searchFormData1') this.getOptionsList('searchFormData')
this.getOptionsList('searchFormData2')
this.getOptionsList('searchFormData3')
}, },
methods: { methods: {
......
...@@ -100,6 +100,10 @@ export default { ...@@ -100,6 +100,10 @@ export default {
name: 'customerPhone' name: 'customerPhone'
}, },
{ {
label: '推荐人',
name: 'shareStaffName'
},
{
label: '车架号', label: '车架号',
name: 'vin' name: 'vin'
}, },
......
...@@ -5,14 +5,7 @@ ...@@ -5,14 +5,7 @@
<GLButton :size="size" type="primary" fn="新建商品" class="el-icon-plus" @click="handleEdit(1)">新建商品</GLButton> <GLButton :size="size" type="primary" fn="新建商品" class="el-icon-plus" @click="handleEdit(1)">新建商品</GLButton>
</div> </div>
<div class="container"> <div class="container">
<div> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns">
<el-button :size="size" type="default" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</span>
</glsx-combi-form>
</div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="proGroupRef" class="table-img" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="proGroupRef" class="table-img" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
...@@ -23,11 +16,7 @@ ...@@ -23,11 +16,7 @@
</el-popover> </el-popover>
</div> </div>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleUpOrDown(scope.scope)">{{ scope.scope.goodsStatus ? '下架' : '上架' }}</el-button> <GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
<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>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -100,6 +89,69 @@ export default { ...@@ -100,6 +89,69 @@ export default {
optionsName: 'goodsStatusList' 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, getListApi: this.$apis.proManage.getListApi,
tableParams: { tableParams: {
...@@ -109,6 +161,7 @@ export default { ...@@ -109,6 +161,7 @@ export default {
{ {
label: '商品名称', label: '商品名称',
prop: 'goodsName', prop: 'goodsName',
width: 220,
line: 2 line: 2
}, },
{ {
......
...@@ -2,18 +2,10 @@ ...@@ -2,18 +2,10 @@
<template> <template>
<div class="marketing pro-group p-t-20"> <div class="marketing pro-group p-t-20">
<div class="m-b-20"> <div class="m-b-20">
<!-- <el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新建商品</el-button> -->
<GLButton :size="size" type="primary" fn="新建商品" class="el-icon-plus" @click="handleEdit(1)">新建商品</GLButton> <GLButton :size="size" type="primary" fn="新建商品" class="el-icon-plus" @click="handleEdit(1)">新建商品</GLButton>
</div> </div>
<div class="container"> <div class="container">
<div> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns">
<el-button :size="size" type="default" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</span>
</glsx-combi-form>
</div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="proGroupRef" class="table-img" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="proGroupRef" class="table-img" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
...@@ -24,18 +16,7 @@ ...@@ -24,18 +16,7 @@
</el-popover> </el-popover>
</template> </template>
<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.goodsStatus" type="text" @click="handleEdit(2, scope.scope)">编辑</el-button> --> <GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
<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>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -109,6 +90,143 @@ export default { ...@@ -109,6 +90,143 @@ export default {
optionsName: 'goodsStatusList' 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, getListApi: this.$apis.proManage.getListApi,
tableParams: { tableParams: {
...@@ -118,6 +236,7 @@ export default { ...@@ -118,6 +236,7 @@ export default {
{ {
label: '商品名称', label: '商品名称',
prop: 'goodsName', prop: 'goodsName',
width: 220,
line: 2 line: 2
}, },
{ {
...@@ -256,11 +375,6 @@ export default { ...@@ -256,11 +375,6 @@ export default {
// groupOrStore:1-集团;2-门店 // groupOrStore:1-集团;2-门店
// goodsSource: 1-门店;2-带货 // goodsSource: 1-门店;2-带货
handleEdit(addOrEdit, row) { handleEdit(addOrEdit, row) {
// if (addOrEdit != 1 && row.goodsSource == 2) {
// this.$router.push('/productStore/editProductDh/' + addOrEdit + '/' + row.id)
// return true
// }
// addOrEdit == 1 ? this.$router.push('/productGroup/editProduct/' + addOrEdit + '/' + 2) : this.$router.push('/productGroup/editProduct/' + addOrEdit + '/' + 2 + '/' + row.id)
var titleObj = { var titleObj = {
1: '新建商品', 1: '新建商品',
2: '编辑商品', 2: '编辑商品',
......
...@@ -3,33 +3,20 @@ ...@@ -3,33 +3,20 @@
<div class="marketing pro-group p-t-20"> <div class="marketing pro-group p-t-20">
<div class="m-b-20"> <div class="m-b-20">
<GLButton :size="size" type="primary" class="el-icon-plus" @click="addActivity()" fn="新增秒杀活动" mode="el-button">新增秒杀活动</GLButton> <GLButton :size="size" type="primary" class="el-icon-plus" @click="addActivity()" fn="新增秒杀活动" mode="el-button">新增秒杀活动</GLButton>
<!-- <el-button :size="size" type="primary" class="el-icon-plus" @click="addActivity()">新增秒杀活动</el-button> -->
</div> </div>
<div class="container"> <div class="container">
<div> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<glsx-combi-form ref="showSearch" :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>
</span>
</glsx-combi-form>
</div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="activity" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="activity" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<template slot="activityImg" slot-scope="scope"> <template slot="activityImg" slot-scope="scope">
<img class="img-60" :src="scope.scope.activityImg" /> <el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block">
<img class="table-popover-img" :src="scope.scope.activityImg" />
<img class="img-60 pointer" slot="reference" :src="scope.scope.activityImg" />
</el-popover>
</template> </template>
<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.activityStatus == '1'" type="text" @click="start(scope.scope)">开始</el-button> <GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
<el-button v-if="scope.scope.activityStatus == '2'" type="text" @click="end(scope.scope)">结束</el-button>
<GLButton v-if="scope.scope.activityStatus == '1'" type="text" @click="handleEdit(2, scope.scope)" fn="编辑秒杀活动" mode="el-button">编辑</GLButton>
<!-- <el-button v-if="scope.scope.activityStatus == '1'" type="text" @click="handleEdit(2, scope.scope)">编辑</el-button> -->
<GLButton v-if="scope.scope.activityStatus == '2' || scope.scope.activityStatus == '3'" type="text" @click="handleEdit(3, scope.scope)" fn="编辑秒杀活动" mode="el-button">查看</GLButton>
<!-- <el-button v-if="scope.scope.activityStatus == '2' || scope.scope.activityStatus == '3'" type="text" @click="handleEdit(3, scope.scope)">查看</el-button> -->
<el-button v-if="scope.scope.activityStatus == '3'" type="text" @click="del(scope.scope)">删除</el-button>
<el-button type="text" @click="topping(scope.scope)">置顶</el-button>
<el-button v-if="scope.scope.activityStatus == '1' || scope.scope.activityStatus == '2'" type="text" @click="handleShare(scope.scope)">分享</el-button>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -57,7 +44,6 @@ export default { ...@@ -57,7 +44,6 @@ export default {
// 分享 // 分享
isShareVisible: false, isShareVisible: false,
shareForm: {}, shareForm: {},
// 表格
searchForm: { searchForm: {
activityName: '', activityName: '',
activityStatus: '' activityStatus: ''
...@@ -83,6 +69,94 @@ export default { ...@@ -83,6 +69,94 @@ export default {
optionsName: 'statusList' optionsName: 'statusList'
} }
], ],
// 表格按钮
tableButtonList: [
{
type: 'el-button',
name: '开始',
attrs: {
type: 'text'
},
condition: row => {
return row.activityStatus == '1'
},
listeners: {
click: this.start
}
},
{
type: 'el-button',
name: '结束',
attrs: {
type: 'text'
},
condition: row => {
return row.activityStatus == '2'
},
listeners: {
click: this.end
}
},
{
type: 'GLButton',
name: row => {
return row.activityStatus == '1' ? '编辑' : '查看'
},
attrs: {
type: 'text',
fn: '编辑秒杀活动'
},
condition: row => {
return row.activityStatus == '1' || row.activityStatus == '2' || row.activityStatus == '3'
},
listeners: {
click: row => {
var editOrDetail = {
1: 2,
2: 3,
3: 3
}[row.activityStatus]
return this.handleEdit(editOrDetail, row)
}
}
},
{
type: 'el-button',
name: '删除',
attrs: {
type: 'text'
},
condition: row => {
return row.activityStatus == '3'
},
listeners: {
click: this.del
}
},
{
type: 'el-button',
name: '置顶',
attrs: {
type: 'text'
},
listeners: {
click: this.topping
}
},
{
type: 'el-button',
name: '分享',
attrs: {
type: 'text'
},
condition: row => {
return row.activityStatus == '1' || row.activityStatus == '2'
},
listeners: {
click: this.handleShare
}
},
],
// 表格 // 表格
getListApi: this.$apis.seckillActivity.getActivityPageApi, getListApi: this.$apis.seckillActivity.getActivityPageApi,
tableParams: { tableParams: {
...@@ -91,7 +165,8 @@ export default { ...@@ -91,7 +165,8 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '活动名称', label: '活动名称',
prop: 'activityName' prop: 'activityName',
width: 220
}, },
{ {
label: '缩略图', label: '缩略图',
...@@ -101,7 +176,7 @@ export default { ...@@ -101,7 +176,7 @@ export default {
{ {
label: '浏览量(次)', label: '浏览量(次)',
prop: 'viewAmount', prop: 'viewAmount',
width: '110px' width: 140
}, },
{ {
label: '销量', label: '销量',
...@@ -110,7 +185,7 @@ export default { ...@@ -110,7 +185,7 @@ export default {
{ {
label: '秒杀价(元)', label: '秒杀价(元)',
name: 'activityPrice', name: 'activityPrice',
width: '110px', width: 140,
formatter: cellValue => { formatter: cellValue => {
// if (cellValue.activityPrice) { // if (cellValue.activityPrice) {
return (cellValue.activityPrice / 100).toFixed(2) return (cellValue.activityPrice / 100).toFixed(2)
...@@ -125,7 +200,7 @@ export default { ...@@ -125,7 +200,7 @@ export default {
{ {
label: '创建日期', label: '创建日期',
name: 'createdDate', name: 'createdDate',
width: '160px', width: 200,
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')
} }
......
...@@ -122,7 +122,8 @@ export default { ...@@ -122,7 +122,8 @@ export default {
if (!this.selectItem.id) { if (!this.selectItem.id) {
this.$message({ this.$message({
type: 'error', type: 'error',
message: '请选择活动' message: '请选择活动',
customClass: 'message-Z-zinde'
}) })
return return
} }
......
...@@ -221,6 +221,14 @@ export default { ...@@ -221,6 +221,14 @@ export default {
} }
}, },
handleMaterialConfirm() { handleMaterialConfirm() {
if (!this.selectItem.id) {
this.$message({
type: 'error',
message: '请选择素材',
customClass: 'message-Z-zinde'
})
return
}
this.$emit('handleMaterialConfirm', { this.$emit('handleMaterialConfirm', {
objectId: this.selectItem.id, objectId: this.selectItem.id,
objectType: 10, objectType: 10,
......
...@@ -123,6 +123,14 @@ export default { ...@@ -123,6 +123,14 @@ export default {
this.getModelList() this.getModelList()
}, },
handleNicknameConfirm() { handleNicknameConfirm() {
if (!this.selectItem.id) {
this.$message({
type: 'error',
message: '请选择朋友圈模板',
customClass: 'message-Z-zinde'
})
return
}
// activeName 0-纯文字,1-单图+文,2-多图+文,3-视频+文,4-链接+文 // activeName 0-纯文字,1-单图+文,2-多图+文,3-视频+文,4-链接+文
var valToType = { var valToType = {
0: 4, 0: 4,
......
...@@ -82,7 +82,7 @@ export default { ...@@ -82,7 +82,7 @@ export default {
{ {
label: '客户手机号', label: '客户手机号',
prop: 'customerPhone', prop: 'customerPhone',
width: '110px', width: '130px',
formatter: cellValue => { formatter: cellValue => {
return cellValue.customerPhone || '-' return cellValue.customerPhone || '-'
} }
...@@ -152,7 +152,7 @@ export default { ...@@ -152,7 +152,7 @@ export default {
mounted() { mounted() {
let clientHeight = document.documentElement.clientHeight let clientHeight = document.documentElement.clientHeight
this.heightBox = clientHeight - 0.15 * clientHeight - 425 this.heightBox = clientHeight - 0.15 * clientHeight - 370
this.selectedCustomerList = JSON.parse(JSON.stringify(this.parentSelectedCustomerList)) this.selectedCustomerList = JSON.parse(JSON.stringify(this.parentSelectedCustomerList))
}, },
...@@ -165,7 +165,8 @@ export default { ...@@ -165,7 +165,8 @@ export default {
this.tableList = this.$refs.customerRef.data this.tableList = this.$refs.customerRef.data
this.recoverySelected() this.recoverySelected()
//接收到的数据为空 //接收到的数据为空
this.$refs.customerRef.tableHeightValues = this.$refs.customerRef.data.length ? '' : '400px' // this.$refs.customerRef.tableHeightValues = this.$refs.customerRef.data.length ? '' : '400px'
this.$refs.customerRef.tableHeightValues = '400px'
}, },
recoverySelected() { recoverySelected() {
...@@ -220,8 +221,11 @@ export default { ...@@ -220,8 +221,11 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss">
.select-cutomer { .select-cutomer {
.el-table .el-table__row td {
height: auto !important;
}
.title { .title {
margin-bottom: 12px; margin-bottom: 12px;
} }
......
...@@ -6,22 +6,12 @@ ...@@ -6,22 +6,12 @@
<el-button class="sop-back-btn" :size="size" type="primary" @click="handleBack">返回</el-button> <el-button class="sop-back-btn" :size="size" type="primary" @click="handleBack">返回</el-button>
</div> </div>
<div class="container"> <div class="container">
<div> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer">
<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>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="sopListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="sopListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<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.sopStatus != 1" type="text" @click="handleJump('sopAnalysisList', scope.scope)">SOP分析</el-button> <GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
<el-button v-if="scope.scope.sopStatus == 2" type="text" @click="handleEnd(scope.scope)">结束</el-button>
<el-button v-if="scope.scope.sopStatus != 3" type="text" @click="handleEdit('edit', scope.scope)">编辑</el-button>
<el-button v-if="scope.scope.sopStatus == 1" type="text" @click="handleDelete(scope.scope)">删除</el-button>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -61,6 +51,61 @@ export default { ...@@ -61,6 +51,61 @@ export default {
optionsName: 'sopStatusList' optionsName: 'sopStatusList'
} }
], ],
// 表格按钮
tableButtonList: [
{
type: 'el-button',
name: 'SOP分析',
attrs: {
type: 'text'
},
condition: row => {
return row.sopStatus != 1
},
listeners: {
click: row => this.handleJump('sopAnalysisList', row)
}
},
{
type: 'el-button',
name: '结束',
attrs: {
type: 'text'
},
condition: row => {
return row.sopStatus == 2
},
listeners: {
click: this.handleEnd
}
},
{
type: 'el-button',
name: '编辑',
attrs: {
type: 'text'
},
condition: row => {
return row.sopStatus != 3
},
listeners: {
click: row => this.handleEdit('edit', row)
}
},
{
type: 'el-button',
name: '删除',
attrs: {
type: 'text'
},
condition: row => {
return row.sopStatus == 1
},
listeners: {
click: this.handleDelete
}
}
],
// 表格 // 表格
getListApi: this.$apis.sop.getSopInfoListApi, getListApi: this.$apis.sop.getSopInfoListApi,
tableParams: { tableParams: {
......
...@@ -2,14 +2,7 @@ ...@@ -2,14 +2,7 @@
<template> <template>
<div class="marketing take-good p-t-20"> <div class="marketing take-good p-t-20">
<div class="container"> <div class="container">
<div> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<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>
<el-button :size="size" class="default-blue-btn f-right m-b-10" type="default" @click="handleTakeGood()">一键带货</el-button> <el-button :size="size" class="default-blue-btn f-right m-b-10" type="default" @click="handleTakeGood()">一键带货</el-button>
...@@ -22,10 +15,7 @@ ...@@ -22,10 +15,7 @@
</el-popover> </el-popover>
</div> </div>
<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.taked" type="text" @click="handleSingleTakeGood(scope.scope)">带货</el-button> <GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
<!-- <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>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -64,6 +54,33 @@ export default { ...@@ -64,6 +54,33 @@ export default {
pickerOptions: 'beforeRangePickerOptions' 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, getListApi: this.$apis.takeGood.getListApi,
tableParams: { tableParams: {
......
...@@ -2,24 +2,15 @@ ...@@ -2,24 +2,15 @@
<template> <template>
<div class="marketing p-t-20"> <div class="marketing p-t-20">
<div class="m-b-20"> <div class="m-b-20">
<!-- <el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新建专区</el-button> -->
<GLButton :size="size" type="primary" fn="新建专区" class="el-icon-plus" @click="handleEdit(1)">新建专区</GLButton> <GLButton :size="size" type="primary" fn="新建专区" class="el-icon-plus" @click="handleEdit(1)">新建专区</GLButton>
</div> </div>
<div class="container"> <div class="container">
<div> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns">
<el-button :size="size" type="default" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
</span>
</glsx-combi-form>
</div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="zoneRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="zoneRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<GLButton type="text" fn="编辑" @click="handleEdit(2, scope.scope)">编辑</GLButton> <GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
<el-button type="text" fn="删除" @click="handleDelete(scope.scope)">删除</el-button>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -57,6 +48,30 @@ export default { ...@@ -57,6 +48,30 @@ export default {
pickerOptions: 'beforeRangePickerOptions' pickerOptions: 'beforeRangePickerOptions'
} }
], ],
// 表格按钮
tableButtonList: [
{
type: 'GLButton',
name: '编辑',
attrs: {
type: 'text',
fn: '编辑'
},
listeners: {
click: row => this.handleEdit(2, row)
}
},
{
type: 'el-button',
name: '删除',
attrs: {
type: 'text'
},
listeners: {
click: this.handleDelete
}
}
],
// 表格 // 表格
getListApi: this.$apis.zoneList.getZoneListApi, getListApi: this.$apis.zoneList.getZoneListApi,
tableParams: { tableParams: {
...@@ -70,7 +85,7 @@ export default { ...@@ -70,7 +85,7 @@ 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')
} }
...@@ -81,7 +96,7 @@ export default { ...@@ -81,7 +96,7 @@ export default {
} }
}, },
mounted() {}, mounted() { },
methods: { methods: {
getParams() { getParams() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!