Commit a2942358 by 杨北旺

添加售前权益模块

1 parent ea71e2c8
......@@ -20,15 +20,15 @@ const staticRoutes = Object.freeze([{
meta: {}
},
{
name: 'beforeSale',
path: '/beforeSale/index',
component: resolve => require([`@/views/beforeSale/index.vue`], resolve),
name: 'serviceSet',
path: '/beforeSale/serviceSet',
component: resolve => require([`@/views/beforeSale/serviceSet.vue`], resolve),
meta: {}
},
{
name: 'editEquity',
path: '/beforeSale/editEquity/:addOrEdit/:contractNo',
component: resolve => require([`@/views/beforeSale/editEquity.vue`], resolve),
name: 'equityList',
path: '/beforeSale/equityList',
component: resolve => require([`@/views/beforeSale/equityList.vue`], resolve),
meta: {}
}, {
name: 'introduct',
......@@ -41,10 +41,16 @@ const staticRoutes = Object.freeze([{
component: resolve => require([`@/views/afterSales/index.vue`], resolve),
meta: {}
}, {
name: 'introduct',
path: '/beforeSale/introduct',
component: resolve => require([`@/views/beforeSale/introduct.vue`], resolve),
name: 'index',
path: '/beforeSale/index',
component: resolve => require([`@/views/beforeSale/index.vue`], resolve),
meta: {}
}
},
{
name: 'editEquity',
path: '/beforeSale/editEquity',
component: resolve => require([`@/views/beforeSale/editEquity.vue`], resolve),
meta: {}
},
])
export default staticRoutes
\ No newline at end of file
......@@ -909,6 +909,9 @@ export default {
</script>
<style>
/* 客服 - start */
.before-sale{
margin-top: 17px;
}
.before-sale .help-service {
position: fixed;
z-index: 9999;
......
......@@ -4,7 +4,7 @@
<div class="m-b-20">
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新增权益</el-button>
</div>
<div class="container">
<div class="backshadow container">
<div>
<glsx-combi-form ref="showSearch" labelWidth="110px" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns">
......@@ -15,13 +15,16 @@
</glsx-combi-form>
</div>
<div class="table-top-tips">请注意:订单列表还有{{countNoData}}单未上传客户凭证等资料,若发生事故无法获得补偿,请尽快在列表操作-上传资料中完善。</div>
<div class="table-top-tips">请注意:订单列表还有{{ countNoData }}单未上传客户凭证等资料,若发生事故无法获得补偿,请尽快在列表操作-上传资料中完善。</div>
<!-- 表格区域 开始 -->
<GLTable ref="equityRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button v-if="[2, 4, 5].includes(scope.scope.orderStatus)" type="text" @click="handleEdit(5, scope.scope)">查看</el-button>
<el-button v-if="[2].includes(scope.scope.orderStatus)" type="text" @click="handlePdf(scope.scope)">打印</el-button>
<el-button v-if="[2].includes(scope.scope.orderStatus)" style="position: relative;" type="text" @click="handleUpload(scope.scope)">上传资料<span v-show="scope.scope.dataPerfection == 0" class="circule-tips"></span></el-button>
<el-button v-if="[2].includes(scope.scope.orderStatus)" style="position: relative" type="text" @click="handleUpload(scope.scope)">
上传资料
<span v-show="scope.scope.dataPerfection == 0" class="circule-tips"></span>
</el-button>
<el-button v-if="[0].includes(scope.scope.orderStatus)" type="text" @click="handleEdit(2, scope.scope)">编辑</el-button>
<el-button v-if="[2].includes(scope.scope.orderStatus)" type="text" @click="handleEdit(3, scope.scope)">修改</el-button>
<el-button v-if="[2].includes(scope.scope.orderStatus)" type="text" @click="handleBack(scope.scope)">退保</el-button>
......@@ -179,7 +182,7 @@ export default {
prop: 'contractNo',
width: '200px',
formatter: cellValue => {
return [2, 4, 5].includes(cellValue.orderStatus) ? (cellValue.contractNo || '-') : '-'
return [2, 4, 5].includes(cellValue.orderStatus) ? cellValue.contractNo || '-' : '-'
}
},
{
......@@ -349,10 +352,12 @@ export default {
this.userInfo = res
var idx = this.searchFormData.findIndex(item => item.name == this.levelToShow[res.merchantAccountLevel])
this.searchFormData[idx].isHide = false
this.baseData[this.searchFormData[idx].optionsName] = [{
merchantNo: this.userInfo.merchantNo,
merchantName: this.userInfo.merchantName
}]
this.baseData[this.searchFormData[idx].optionsName] = [
{
merchantNo: this.userInfo.merchantNo,
merchantName: this.userInfo.merchantName
}
]
this.getOptionsList('searchFormData', false, this.searchFormData[idx].name)
// this.getMerchantList(this.userInfo.merchantNo, this.userInfo.merchantAccountLevel, this.searchFormData[idx].name, this.searchFormData[idx].optionsName)
})
......@@ -453,10 +458,10 @@ export default {
})
return true
}
if(addOrEdit == 4 && row.orderStatus == 3) {
if (addOrEdit == 4 && row.orderStatus == 3) {
addOrEdit = 2
}
addOrEdit == 1 ? this.$router.push('/beforeSale/editEquity/' + addOrEdit + '/' + -1) : this.$router.push('/beforeSale/editEquity/' + addOrEdit + '/' + row.contractNo)
addOrEdit == 1 ? this.$router.push('/beforeSale/editEquity') : this.$router.push('/beforeSale/editEquity/' + addOrEdit + '/' + row.contractNo)
},
handlePdfClose() {
......@@ -581,18 +586,19 @@ export default {
}
</script>
<style scoped>
.before-sale .container {
padding: 0px 20px 20px 40px;
<style lang="scss" scoped>
.before-sale {
margin-top: 17px;
}
.backshadow {
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
}
.before-sale .m-b-20 {
margin-bottom: 20px;
.container{
box-sizing: border-box;
padding: 20px;
margin-top: 10px;
}
.before-sale .table-top-tips {
/* position: relative; */
box-sizing: border-box;
......
<!-- 权益订单 -->
<template>
<div class="equity">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="其他权益订单" name="equityList">
<equity-list v-if="activeName == 'equityList'"></equity-list>
</el-tab-pane>
<el-tab-pane label="店面服务设置" name="serviceSet">
<service-set v-if="activeName == 'serviceSet'"></service-set>
</el-tab-pane>
</el-tabs>
</div>
<div class="equity"></div>
</template>
<script>
import equityList from './equityList'
import serviceSet from './serviceSet'
export default {
name: 'index',
data() {
......@@ -22,25 +11,13 @@ export default {
activeName: 'equityList'
}
},
components: {
equityList,
serviceSet
created() {
this.$router.push('/beforeSale/equityList')
},
mounted() {},
methods: {}
}
</script>
<style>
.equity .el-tabs__nav-wrap:after {
opacity: 0;
}
.equity .el-tabs__item {
height: 20px !important;
line-height: 10px !important;
font-weight: 400;
font-size: 16px;
}
</style>
<!-- 店面服务设置 -->
<template>
<div class="before-sale edit-equity">
<div class="container edit-container">
<p class="edit-title">{{ title }}</p>
<div class="before-sale">
<el-form ref="form" :rules="editRule" label-width="100px" :model="editForm">
<el-form-item label="服务热线" prop="hotline">
<el-input class="find_width" size="small" maxlength="20" clearable placeholder="请输入服务热线" v-model="editForm.hotline"></el-input>
</el-form-item>
<el-form-item label="品牌">
<el-col :span="5">
<el-select class="find_width_mini" size="small" clearable v-model="editForm.brand" placeholder="请选择品牌">
<el-option v-for="item in brandList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-col>
<el-col :span="5">
<el-select class="find_width_mini" size="small" clearable v-model="editForm.childBrand" placeholder="请选择子品牌">
<el-option v-for="item in childBrandList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-col>
</el-form-item>
<el-form-item size="small">
<el-button type="primary" @click="handleConfirm">确定</el-button>
</el-form-item>
</el-form>
<!-- <div class="container edit-container">
<glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="140px" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"></glsx-combi-form>
</div>
<!-- <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> -->
<div class="footer" :style="{ width: '100%' }">
<el-button type="primary" @click="handleConfirm">确定</el-button>
<!-- <el-button type="default" @click="handleCancel">取消</el-button> -->
</div>
</div> -->
</div>
</template>
<script>
import glsxCombiForm from '@/components/glsx-combi-form'
export default {
name: 'serviceSet',
data() {
return {
size: 'small',
title: '店面服务设置',
footerLeft: '0',
footerWidth: '0',
editChildRef: 'editChildRef',
editForm: {
hotline: ''
hotline: '',
brand: '',
childBrand: ''
},
editRule: {
hotline: [{ required: true, message: '请输入服务热线', trigger: 'change' }]
},
editFormData: [
{
label: '服务热线',
name: 'hotline',
width: '320px',
type: 'input',
maxlength: 20
}
]
brandList: [],
childBrandList: []
}
},
components: {
glsxCombiForm
},
mounted() {
this.getHotline()
// this.getHotline()
},
methods: {
......@@ -57,35 +57,36 @@ export default {
})
},
handleConfirm() {
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var params = this.$common.utils.deepClone(this.editForm)
this.$apis.beforeSale.updateHotlineApi(params).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : '操作失败',
type: res.code == '0' ? 'success' : 'error'
})
})
}
})
// this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
// if (valid) {
// var params = this.$common.utils.deepClone(this.editForm)
// this.$apis.beforeSale.updateHotlineApi(params).then(res => {
// this.$message({
// message: res.code == '0' ? '操作成功' : '操作失败',
// type: res.code == '0' ? 'success' : 'error'
// })
// })
// }
// })
}
}
}
</script>
<style scoped>
.before-sale .container {
padding: 0px 20px 20px 40px;
<style lang="scss" scoped>
.before-sale {
margin-top: 17px;
height: calc(100% - 17px);
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
box-sizing: border-box;
padding: 20px 0;
}
.before-sale .edit-container {
margin-bottom: 84px;
.find_width {
width: 320px;
}
.before-sale .edit-form-container {
margin-top: 20px;
.find_width_mini {
width: 215px;
}
.before-sale .txt-center {
......@@ -118,7 +119,7 @@ export default {
font-weight: bold;
height: 48px;
line-height: 48px;
border-bottom: 1px solid #E7EAEC;
border-bottom: 1px solid #e7eaec;
margin: 0 0;
}
......
......@@ -51,6 +51,9 @@
</div>
<div class="right_widget">
<div class="cell_wrapper flex_sc">
<el-button class="cell_btn_max" size="mini" @click="toExport">导出数据</el-button>
</div>
<div class="cell_wrapper flex_sc">
<el-button class="cell_btn" size="mini" @click="clearFind">重置</el-button>
<el-button class="cell_btn" size="mini" type="primary" @click="handlerParams">查询</el-button>
</div>
......@@ -337,7 +340,7 @@ export default {
// this.pickerOptions = this.setDateLimit()
},
mounted() {
let params = this.resetTime()
let params = this.resetTime()
this.toGetMyDivision(params)
},
methods: {
......@@ -382,7 +385,7 @@ export default {
this.storeId = ''
this.$refs.table.page.pageNum = 1
this.curMerchantNo = ''
let params = this.resetTime()
let params = this.resetTime()
this.toGetMyDivision(params)
},
handlerParams() {
......@@ -406,8 +409,8 @@ export default {
delete params.successDateStartDate
delete params.successDateEndDate
}
if(!this.divisionTime&&!this.payTime){
params = this.resetTime()
if (!this.divisionTime && !this.payTime) {
params = this.resetTime()
}
if (this.divisionTypeStatus) {
params.divisionStatus = this.divisionTypeStatus
......@@ -508,13 +511,20 @@ export default {
let method = exportMydivision()
let para = {
routerMethod: method,
currentPage: this.$refs.table.page.pageNum,
pageSize: this.$refs.table.page.pageSize,
...this.httpParam
}
converterApi(para).then(res => {
let iframe = document.createElement('iframe')
iframe.style.display = 'none'
iframe.src = res
document.body.appendChild(iframe)
let tempaa = utils.getExplorer()
if (tempaa == 'QQ') {
window.open(res)
} else {
let iframe = document.createElement('iframe')
iframe.style.display = 'none'
iframe.src = res
document.body.appendChild(iframe)
}
})
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!