Commit 7d4ab6ea by 前端

Merge branch 'v2.9.0' into 'master'

V2.9.0  UI表单版本  ----》 master

See merge request !13
2 parents 404c79d4 8a3b02cd
This diff could not be displayed because it is too large.
......@@ -13,7 +13,7 @@
"el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5",
"glsx-common": "^1.4.6",
"glsx-components": "^1.3.7",
"glsx-components": "^1.5.2",
"lodash": "^4.17.21",
"vue": "^2.6.10",
"vue-router": "^3.1.3",
......
......@@ -30,7 +30,7 @@ export default {
line-height: 36px;
}
#app {
background: #f4f5fa;
// background: #f4f5fa;
// padding: 0px 20px 20px 20px;
position: absolute;
box-sizing: border-box;
......
......@@ -70,4 +70,14 @@ const getMenberType = params => {
})
}
export default { getExpertList, getDepartment, saveExpert, delExpert, editExpert, expertDetail, getMenberType }
const getOtherNumber = params => {
params.method = 'entmicro.api.code.getCodeStaffList'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getExpertList, getDepartment, saveExpert, delExpert, editExpert, expertDetail, getMenberType, getOtherNumber }
......@@ -161,6 +161,14 @@
flex-direction: column;
}
.tableTopButton {
display: flex;
align-items: center;
justify-content: flex-end;
margin-bottom: 10px;
margin-right: 2px;
}
.el-message {
z-index: 3000 !important;
}
......@@ -201,11 +209,13 @@
background-color: #fff;
border-color: #5850ff;
}
.el-button--primary.is-plain:hover {
color: #7973ff;
background-color: #fff;
border-color: #7973ff;
}
.el-button--primary.is-plain:active {
color: #3a32e1;
background-color: #fff;
......@@ -213,12 +223,60 @@
}
}
.loadingClass{
.el-icon-loading{
.loadingClass {
.el-icon-loading {
font-size: 22px;
}
.el-icon-loading,
.el-loading-text{
color: #fff!important;
.el-loading-text {
color: #fff !important;
}
}
.my-circule-tips {
position: relative !important;
}
.my-circule-tips::before {
position: absolute;
top: 0;
right: -6px;
display: inline-block;
height: 6px;
width: 6px;
content: '';
border-radius: 100%;
background-color: red;
}
.newListPage {
margin-top: 17px;
.wrap {
background-color: #fff;
padding: 20px;
}
}
.my-footer-btn {
width: 100%;
display: flex;
justify-content: center;
}
.page-btm-btn {
display: flex;
justify-content: center;
margin-top: 16px;
}
.my-nav-tabs {
position: fixed;
top: 200px;
background-color: #fff;
right: 74px;
.el-tabs__item {
padding: 0 6px;
height: 24px;
line-height: 24px;
font-size: 12px;
}
}
......@@ -27,7 +27,29 @@ function limitPrice(newValue, oldValue, intergerDigit, pointDigit, minValue, max
}
}
const liveStatusList = [{
function downloadIamge(imgsrc, name = new Date().getTime()) {
//下载图片地址和图片名
var image = new Image()
// 解决跨域 Canvas 污染问题
image.setAttribute('crossOrigin', 'anonymous')
image.onload = function() {
var canvas = document.createElement('canvas')
canvas.width = image.width
canvas.height = image.height
var context = canvas.getContext('2d')
context.drawImage(image, 0, 0, image.width, image.height)
var url = canvas.toDataURL('image/png') //得到图片的base64编码数据
var a = document.createElement('a') // 生成一个a元素
var event = new MouseEvent('click') // 创建一个单击事件
a.download = name || 'photo' // 设置图片名称
a.href = url // 将生成的URL设置为a.href属性
a.dispatchEvent(event) // 触发a的单击事件
}
image.src = imgsrc
}
const liveStatusList = [
{
confId: '101',
confName: '直播中'
},
......@@ -57,7 +79,8 @@ const liveStatusList = [{
}
]
const auditStatusList = [{
const auditStatusList = [
{
confId: 0,
confName: '未审核'
},
......@@ -75,4 +98,4 @@ const auditStatusList = [{
}
]
export { limitPrice, liveStatusList, auditStatusList }
\ No newline at end of file
export { limitPrice, liveStatusList, auditStatusList, downloadIamge }
<!-- 搜索 -->
<template>
<div class="glsx-combi-form">
<el-form @submit.native.prevent :ref="formRef" :inline="true" :model="formObj" :rules="formRules" size="small" class="glsx-combi-form-block">
<el-form @submit.native.prevent :ref="formRef" :inline="isInline" :model="formObj" :rules="formRules" size="small" class="glsx-combi-form-block">
<template v-for="(item, index) in formData">
<el-form-item v-if="!item.isHide" :key="index" :id="item.name" :labelWidth="isEdit ? '144px' : labelWidth" :class="{ 'no-label': !item.label, isBlock: isBlock }" :style="{ 'margin-bottom': isEdit ? '24px' : '', 'margin-right': isEdit ? '0px' : '30px', ...item.style }" :label="item.label" :prop="item.name">
<el-form-item v-if="!item.isHide" :key="index" :id="item.name" :labelWidth="isEdit ? '144px' : labelWidth" :class="{ 'no-label': !item.label, isBlock: isBlock }" :style="{ 'margin-bottom': isEdit ? '24px' : '', 'margin-right': isEdit ? '0px' : '30px', ...item.style }" :label="item.label ? item.label + ':' : ''" :prop="item.name">
<span v-if="!item.isHide && item.tips" class="tips-block" slot="label">
<span class="tips-label">{{ item.label }}</span>
<span class="tips-label">{{ item.label ? item.label + ':' : '' }}</span>
<el-tooltip popper-class="tooltip-class" effect="dark" :content="item.tips" :placement="item.placement || 'top'">
<span class="tips-icon"></span>
</el-tooltip>
{{ item.label }}
{{ item.label ? item.label + ':' : '' }}
</span>
<span v-else-if="!item.isHide && item.label" slot="label">
<span class="combi-form-label" :style="{ width: item.labelWidth ? item.labelWidth + labelPaddingRight + 'px' : '', 'padding-right': isEdit ? '12px' : labelPaddingRight + 'px' }">{{ item.label }}</span>
<span class="combi-form-label" :style="{ width: item.labelWidth ? item.labelWidth + labelPaddingRight + 'px' : '', 'padding-right': isEdit ? '12px' : labelPaddingRight + 'px' }">{{ item.label ? item.label + ':' : '' }}</span>
</span>
<slot v-if="item.addHtml" :name="item.addHtml" :scope="item"></slot>
<span v-else-if="item.type === 'showTxt'">{{ formObj[item.name] }}</span>
<div v-else-if="item.type === 'input'">
<el-input :placeholder="item.placeholder || '请输入' + item.label" v-model.trim="formObj[item.name]" :disabled="item.isDisabled" :maxlength="item.maxlength" :clearable="item.isClear || false" :type="item.inputType || 'text'" :rows="item.rows || 2" :style="{ width: item.width || defaultWidth }" :show-word-limit="item.showLimit || false" :show-password="item.showPass || false" @keydown.native="e => handleInputDown(e, item)" @blur="e => handleInputBlur(e, item)">
<el-input :placeholder="item.placeholder || '请输入' + item.label" v-model.trim="formObj[item.name]" :disabled="item.isDisabled" :maxlength="item.maxlength" :clearable="item.isClear || false" :type="item.inputType || 'text'" :rows="item.rows || 3" :style="{ width: item.width || defaultWidth }" :show-word-limit="item.showLimit || false" :show-password="item.showPass || false" @keydown.native="e => handleInputDown(e, item)" @blur="e => handleInputBlur(e, item)">
<span v-if="item.prepend" slot="prepend">{{ item.prepend }}</span>
<span v-if="item.append" slot="append">{{ item.append }}</span>
</el-input>
......@@ -158,7 +159,7 @@ export default {
},
labelPaddingRight: {
type: Number,
default: 15
default: 8
},
formData: {
type: Array,
......@@ -180,6 +181,10 @@ export default {
searchSelectObj: {
type: Object,
default: () => {}
},
isInline: {
type: Boolean,
default: true
}
},
......
<!-- 弹窗 -->
<template>
<div>
<el-dialog :title="title" :visible.sync="isVisible" :show-close="showClose" :before-close="handleClose" :close-on-click-modal="false" :width="width">
<GLDialog :bigTitle="bigTitle" :mode="mode" :title="title" :visible.sync="isVisible" :show-close="showClose" :before-close="handleClose" :close-on-click-modal="false">
<span slot="title">
{{ title }}
<span class="dialog-sub-title">
......@@ -11,11 +11,11 @@
<slot></slot>
<div slot="footer">
<slot name="btn-start"></slot>
<el-button type="primary" :size="btnSize" @click="handleConfirm">{{ btnOkLabel }}</el-button>
<el-button v-if="!noCancel" :size="btnSize" @click="handleClose">取消</el-button>
<el-button type="primary" size="small" @click="handleConfirm">{{ btnOkLabel }}</el-button>
<el-button v-if="!noCancel" size="small" @click="handleClose">取消</el-button>
<slot name="btn-middle"></slot>
</div>
</el-dialog>
</GLDialog>
</div>
</template>
......@@ -46,13 +46,17 @@ export default {
type: Boolean,
default: false
},
width: {
btnSize: {
type: String,
default: '580px'
default: 'small'
},
btnSize: {
mode:{
type: String,
default: 'mini'
default: 'mid'
},
bigTitle:{
type: String,
default: ''
}
},
......
......@@ -2,7 +2,7 @@ import Vue from 'vue'
import ElementUI from 'element-ui'
import { message, messageBox } from '@/plugins/element.js'
import { fetchConfig } from '@/config'
import { GLButton, GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { GLButton, GLTable, GLCombiForm, GLTableButton,GLDialog } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router'
import render from './render'
import 'glsx-components/dist/glsx-components.css'
......@@ -12,15 +12,18 @@ let router = null
let instance = null
Vue.use(GLTable)
Vue.use(ElementUI)
Vue.use(GLCombiForm)
Vue.use(GLTableButton)
Vue.use(GLDialog)
// Vue.use(Table)
// Vue.use(TableColumn)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, request_brand, request_common, request_merchant, sign_common, sign, secret } = await fetchConfig()
// 本地切换域名,不需要Mock上面改动 const => let
// request.baseURL = 'https://scrm.test.glsx.com.cn'
// request_brand.baseURL = 'https://scrm.test.glsx.com.cn'
// request_common.baseURL = 'https://scrm.test.glsx.com.cn'
// request_merchant.baseURL = 'https://rop-merchant.test.glsx.com.cn'
// request.baseURL = 'http://scrm.dev.glsx.com.cn'
// request_brand.baseURL = 'http://scrm.dev.glsx.com.cn'
// request_common.baseURL = 'http://scrm.dev.glsx.com.cn'
// request_merchant.baseURL = 'http://rop-merchant.dev.glsx.com.cn'
// request.baseURL = 'http://192.168.1.78:8064'
// request_brand.baseURL = 'http://192.168.1.78:8064'
Vue.prototype.$history = history
......@@ -34,6 +37,11 @@ export async function bootstrap({ history, common, messenger, globalState, route
Vue.prototype.$http_brand = new common.Http({ response, request: request_brand, 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.$request_merchant = new common.Http({ response, request: request_merchant, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
// const mytken = 'scrm-base-56485521-8ce0-4648-9809-8386f39243d6-rop'
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: mytken } })
// Vue.prototype.$http_brand = new common.Http({ response, request: request_brand, sign, secret, alert: message.error, headers: { token: mytken } })
// Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: mytken } })
// Vue.prototype.$request_merchant = new common.Http({ response, request: request_merchant, sign, secret, alert: message.error, headers: { token: mytken } })
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: 'scrm-base-c13d1275-bc81-4a5f-b909-72c60316945b-rop' } })
// Vue.prototype.$http_brand = new common.Http({ response, request: request_brand, sign, secret, alert: message.error, headers: { token: 'scrm-base-c13d1275-bc81-4a5f-b909-72c60316945b-rop' } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
......
......@@ -253,7 +253,7 @@ export default {
.top_play_wrap {
height: 360px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
// box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
box-sizing: border-box;
padding-right: 50px;
.text_wrap {
......@@ -305,10 +305,10 @@ export default {
}
}
.mid_wrapper {
margin-top: 10px;
margin-top: 16px;
height: 513px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
// box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
box-sizing: border-box;
padding: 21px 21px 20px 19px;
.title_label {
......@@ -380,10 +380,10 @@ export default {
}
}
.case_wrapper {
margin-top: 10px;
margin-top: 16px;
min-height: 400px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
// box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
.case_box {
width: 50%;
height: 100%;
......@@ -468,10 +468,10 @@ export default {
}
}
.step_wrapper {
margin-top: 10px;
margin-top: 16px;
padding: 20px 20px 20px 19px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
// box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
.nodata_tip_3 {
font-size: 18px;
font-weight: bold;
......
......@@ -2,27 +2,27 @@
<template>
<div class="before-sale edit-equity">
<!-- 车辆信息 -->
<div class="container">
<div class="container" id="cardInfo">
<p class="edit-title">车辆信息</p>
<glsx-combi-form class="edit-form-container" ref="editFormRefCar" :isEdit="true" defaultWidth="320px" formRef="editChildRefCar" :formObj.sync="editForm.vehicle" :formData="editFormDataCar.slice(0, 7)" :formRules="editRuleCar"></glsx-combi-form>
<glsx-combi-form ref="editFormRefBrand" :isEdit="true" defaultWidth="215px" formRef="editChildRefBrand" :formObj.sync="editForm.vehicle" :formData="editFormDataCar.slice(7)" :formRules="editRuleCar">
<glsx-combi-form :isInline="false" class="edit-form-container" ref="editFormRefCar" labelWidth="154px" defaultWidth="432px" formRef="editChildRefCar" :formObj.sync="editForm.vehicle" :formData="editFormDataCar.slice(0, 7)" :formRules="editRuleCar"></glsx-combi-form>
<glsx-combi-form class="vehicleForm" ref="editFormRefBrand" labelWidth="154px" defaultWidth="432px" formRef="editChildRefBrand" :formObj.sync="editForm.vehicle" :formData="editFormDataCar.slice(7)" :formRules="editRuleCar">
<template slot="vehicleBrandId" slot-scope="scope">
<el-select v-model="editForm.vehicle.vehicleBrandId" class="m-r-10" placeholder="请选择品牌" filterable @change="handleChangeBrand(editForm.vehicle.vehicleBrandId)" style="width: 160px" :disabled="scope.scope.isDisabled">
<el-select v-model="editForm.vehicle.vehicleBrandId" placeholder="请选择品牌" filterable @change="handleChangeBrand(editForm.vehicle.vehicleBrandId)" style="width: 136px" :disabled="scope.scope.isDisabled">
<el-option v-for="item in baseData.carBrandOptions" :key="item.id" :value="item.id" :label="item.name" />
</el-select>
</template>
<template slot="vehicleSubBrandId" slot-scope="scope">
<el-select v-model="editForm.vehicle.vehicleSubBrandId" class="m-r-10" placeholder="请选择子品牌" filterable @change="getCarSeriesList()" style="width: 160px" :disabled="scope.scope.isDisabled">
<el-select v-model="editForm.vehicle.vehicleSubBrandId" placeholder="请选择子品牌" filterable @change="getCarSeriesList()" style="width: 136px" :disabled="scope.scope.isDisabled">
<el-option v-for="item in baseData.carChildOptions" :key="item.id" :value="item.id" :label="item.name" />
</el-select>
</template>
<template slot="vehicleSeriesId" slot-scope="scope">
<el-select v-model="editForm.vehicle.vehicleSeriesId" class="m-r-10" filterable placeholder="请选择车系" @change="getCarTypeList(editForm.vehicle.vehicleSeriesId)" style="width: 215px" :disabled="scope.scope.isDisabled">
<el-select v-model="editForm.vehicle.vehicleSeriesId" filterable placeholder="请选择车系" @change="getCarTypeList(editForm.vehicle.vehicleSeriesId)" style="width: 136px" :disabled="scope.scope.isDisabled">
<el-option v-for="item in baseData.carSeriesOptions" :key="item.id" :value="item.id" :label="item.name" />
</el-select>
</template>
<template slot="vehicleShapeId" slot-scope="scope">
<el-select v-model="editForm.vehicle.vehicleShapeId" filterable placeholder="请选择车型" style="width: 215px" :disabled="scope.scope.isDisabled">
<el-select v-model="editForm.vehicle.vehicleShapeId" filterable placeholder="请选择车型" style="width: 136px" :disabled="scope.scope.isDisabled">
<el-option v-for="item in baseData.carTypeOptions" :key="item.id" :value="item.id" :label="item.name" />
</el-select>
</template>
......@@ -30,13 +30,13 @@
</div>
<!-- 客户信息 -->
<div class="container m-t-10">
<div class="container m-t-10" id="customerInfo">
<p class="edit-title">客户信息</p>
<glsx-combi-form class="edit-form-container" ref="editFormRefUser" :isEdit="true" defaultWidth="320px" formRef="editChildRefUser" :formObj="editForm" :formData="editFormDataUser" :formRules="editRuleUser"></glsx-combi-form>
<glsx-combi-form :isInline="false" class="edit-form-container" ref="editFormRefUser" labelWidth="154px" defaultWidth="432px" formRef="editChildRefUser" :formObj="editForm" :formData="editFormDataUser" :formRules="editRuleUser"></glsx-combi-form>
</div>
<!-- 选择产品 -->
<div class="container m-t-10">
<div class="container m-t-10" id="productInfo">
<p class="edit-title">选择产品</p>
<div class="edit_product_radio_wrap flex_sc">
<el-radio v-if="productList.length" :disabled="disabled || leftDisable" v-model="equityRadio" :label="1">自选权益</el-radio>
......@@ -51,49 +51,50 @@
<div style="padding-left: 73px">
<el-checkbox @change="changeCheckBox($event, item)" :disabled="item.disabled" :label="item.packageName"></el-checkbox>
</div>
<!-- 属性 -->
<template v-for="(ele, indexs) in curSelectPro">
<div v-if="ele == item.packageName" :key="indexs" class="child_wrap">
<div class="child_wrap_pannel" v-for="(attr, attrindex) in item.groupAttributeList" :key="attrindex">
<div class="attr_wrapper flex_sc">
<div class="attr_label h13_title">
<span v-if="attr.required == 1" style="color: red">*</span>
{{ attr.attributeDesc }}
</div>
<div class="arrt_pannel">
<template v-if="attr.attributeType == 'input'">
<el-input class="arrt_pannel" :disabled="disabled || attr.disabled || (attr.attributeName == 'compensation_name' && compensationNameDisable)" @input="getCurChangeInput($event, item, attr, index, attrindex)" v-model="productModal[item.idName][attr.attributeName]" size="small" :maxlength="attr.maxLength" clearable :placeholder="'请输入' + attr.attributeDesc"></el-input>
</template>
<template v-if="attr.attributeType == 'select'">
<el-select class="arrt_pannel" :disabled="disabled || attr.disabled" size="small" @change="getCurChangeSelect($event, item, attr)" v-model="productModal[item.idName][attr.attributeName]" clearable :placeholder="'请选择' + attr.attributeDesc">
<el-option v-for="option in attr.optionList" :key="option.value" :label="option.label" :value="option.value"></el-option>
</el-select>
</template>
<template v-if="attr.attributeType == 'datePicker'">
<el-date-picker class="arrt_pannel" :picker-options="attr.attributeName == 'additional_date' ? pickerOptions2 : pickerOptions" :disabled="disabled || attr.disabled" @change="getCurChangeDate($event, item, attr)" v-model="productModal[item.idName][attr.attributeName]" size="small" type="date" :placeholder="'请选择' + attr.attributeDesc"></el-date-picker>
</template>
<div class="customer-form">
<!-- 属性 -->
<template v-for="(ele, indexs) in curSelectPro">
<div v-if="ele == item.packageName" :key="indexs" class="child_wrap">
<div class="child_wrap_pannel" v-for="(attr, attrindex) in item.groupAttributeList" :key="attrindex">
<div class="attr_wrapper flex_sc">
<div class="attr_label h13_title">
<span v-if="attr.required == 1" style="color: red">*</span>
{{ attr.attributeDesc }}
</div>
<div class="arrt_pannel">
<template v-if="attr.attributeType == 'input'">
<el-input class="arrt_pannel" :disabled="disabled || attr.disabled || (attr.attributeName == 'compensation_name' && compensationNameDisable)" @input="getCurChangeInput($event, item, attr, index, attrindex)" v-model="productModal[item.idName][attr.attributeName]" size="small" :maxlength="attr.maxLength" clearable :placeholder="'请输入' + attr.attributeDesc"></el-input>
</template>
<template v-if="attr.attributeType == 'select'">
<el-select class="arrt_pannel" :disabled="disabled || attr.disabled" size="small" @change="getCurChangeSelect($event, item, attr)" v-model="productModal[item.idName][attr.attributeName]" clearable :placeholder="'请选择' + attr.attributeDesc">
<el-option v-for="option in attr.optionList" :key="option.value" :label="option.label" :value="option.value"></el-option>
</el-select>
</template>
<template v-if="attr.attributeType == 'datePicker'">
<el-date-picker class="arrt_pannel" :picker-options="attr.attributeName == 'additional_date' ? pickerOptions2 : pickerOptions" :disabled="disabled || attr.disabled" @change="getCurChangeDate($event, item, attr)" v-model="productModal[item.idName][attr.attributeName]" size="small" type="date" :placeholder="'请选择' + attr.attributeDesc"></el-date-picker>
</template>
</div>
</div>
</div>
</div>
</div>
</template>
</template>
<!-- 方案 -->
<div v-if="item.packageName.includes('碰撞') && curSelectPro.includes(item.packageName)" class="table_case_wrap">
<div class="case_title">方案</div>
<div class="case_table">
<div class="table_th flex_sc">
<div class="th_item flex_cc" style="width: 89px">方案</div>
<div class="th_item flex_cc border-lr">车险定损金额</div>
<div class="th_item flex_cc max" style="width: 291px">津贴标准(累计及每次事故赔偿限额)</div>
</div>
<div class="table_tr flex_sc">
<div class="tr_item flex_cc min">方案</div>
<div class="tr_sec_item_wrap">
<div v-for="(caseItem, caseindex) in caseTable" :key="caseindex" class="tr_sec_item flex_sc">
<div class="sec_item flex_sc h9_title" :class="{ noborder: caseindex == caseTable.length - 1 }">{{ caseItem.money_one }}</div>
<div class="sec_item flex_sc max h9_title" :class="{ noborder: caseindex == caseTable.length - 1 }" style="width: 291px">{{ caseItem.money_two }}</div>
<!-- 方案 -->
<div v-if="item.packageName.includes('碰撞') && curSelectPro.includes(item.packageName)" class="table_case_wrap">
<div class="case_title">方案</div>
<div class="case_table">
<div class="table_th flex_sc">
<div class="th_item flex_cc" style="width: 89px">方案</div>
<div class="th_item flex_cc border-lr">车险定损金额</div>
<div class="th_item flex_cc max" style="width: 291px">津贴标准(累计及每次事故赔偿限额)</div>
</div>
<div class="table_tr flex_sc">
<div class="tr_item flex_cc min">方案</div>
<div class="tr_sec_item_wrap">
<div v-for="(caseItem, caseindex) in caseTable" :key="caseindex" class="tr_sec_item flex_sc">
<div class="sec_item flex_sc h9_title" :class="{ noborder: caseindex == caseTable.length - 1 }">{{ caseItem.money_one }}</div>
<div class="sec_item flex_sc max h9_title" :class="{ noborder: caseindex == caseTable.length - 1 }" style="width: 291px">{{ caseItem.money_two }}</div>
</div>
</div>
</div>
</div>
......@@ -111,7 +112,7 @@
<el-radio @change="changeRaido($event, item)" :disabled="item.disabled" :label="item.packageName"></el-radio>
<p class="h20_title product_intro">包括服务项目:{{ item.serviceItems }}</p>
</div>
<div v-if="curSelectCustomPro == item.packageName" :key="indexs" class="child_wrap">
<div v-if="curSelectCustomPro == item.packageName" :key="indexs" class="child_wrap custom-made">
<div class="child_wrap_pannel" v-for="(attr, attrindex) in item.groupAttributeList" :key="attrindex">
<div class="attr_wrapper flex_sc">
<div class="attr_label h13_title">
......@@ -176,41 +177,39 @@
</div>
<!-- 其他信息 -->
<div class="container m-t-10">
<div class="container m-t-10" id="otherInfo">
<p class="edit-title">其他信息</p>
<glsx-combi-form class="edit-form-container" ref="editFormRefOther" :isEdit="true" defaultWidth="320px" formRef="editChildRefOther" :formObj="editForm" :formData="editFormDataOther" :formRules="editRuleOther"></glsx-combi-form>
<glsx-combi-form :isInline="false" class="edit-form-container" ref="editFormRefOther" labelWidth="154px" defaultWidth="432px" formRef="editChildRefOther" :formObj="editForm" :formData="editFormDataOther" :formRules="editRuleOther"></glsx-combi-form>
</div>
<!-- 店面信息 -->
<div class="container m-t-10">
<div class="container m-t-10" id="merchantInfo">
<p class="edit-title">店面信息</p>
<glsx-combi-form class="edit-form-container" ref="editFormRefShop" :isEdit="true" defaultWidth="320px" formRef="editChildRefShop" :formObj="editForm" :formData="editFormDataShop" :formRules="editRuleShop"></glsx-combi-form>
<glsx-combi-form :isInline="false" class="edit-form-container" ref="editFormRefShop" labelWidth="154px" defaultWidth="432px" formRef="editChildRefShop" :formObj="editForm" :formData="editFormDataShop" :formRules="editRuleShop"></glsx-combi-form>
</div>
<!-- 底部固定按钮 -->
<div style="height: 78px"></div>
<div
class="fixed_bottom"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<div class="ma_top"></div>
<!-- <div style="height: 78px"></div> -->
<div class="fixed_bottom">
<!-- <div class="ma_top"></div> -->
<div class="flex_cc ma_bot">
<el-button v-if="![3, 5].includes(routeInfo.addOrEdit)" size="small" class="custom_black" @click="handleReset">重置</el-button>
<el-button class="btn-three" plain v-if="![3, 5].includes(routeInfo.addOrEdit)" @click="handleReset">重置</el-button>
<div class="mar-10"></div>
<el-button class="custom_blue" v-if="![3, 5].includes(routeInfo.addOrEdit)" size="small" @click="handleDraft">草稿</el-button>
<el-button plain v-if="![3, 5].includes(routeInfo.addOrEdit)" @click="handleDraft">草稿</el-button>
<div class="mar-10"></div>
<el-button v-if="routeInfo.addOrEdit != '5'" type="primary" size="small" @click="handleConfirm">{{ routeInfo.addOrEdit != '3' ? '提单' : '确定' }}</el-button>
<el-button v-if="routeInfo.addOrEdit != '5'" type="primary" @click="handleConfirm">{{ routeInfo.addOrEdit != '3' ? '提单' : '确定' }}</el-button>
<div class="mar-10"></div>
<el-button v-if="routeInfo.addOrEdit != 5" size="small" @click="handleCancel">返回</el-button>
<el-button v-else size="small" type="primary" @click="handleCancel">返回</el-button>
</div>
</div>
<!-- 二维码 -->
<qrCode :bottom="320" phone="400 6123 886" phoneTitle="提单及服务咨询" :codeUrl="qrcodUrl"></qrCode>
<div class="my-nav-tabs">
<el-tabs tab-position="right" v-model="curDom" @tab-click="changeArea">
<el-tab-pane v-for="item in tabsList" :key="item.name" :label="item.label" :name="item.name"></el-tab-pane>
</el-tabs>
</div>
</div>
</template>
......@@ -228,12 +227,18 @@ export default {
size: 'small',
submit: false,
isBlock: true,
curDom: 'cardInfo',
tabsList: [
{ label: '车辆信息', name: 'cardInfo' },
{ label: '客户信息', name: 'customerInfo' },
{ label: '选择产品', name: 'productInfo' },
{ label: '其他信息', name: 'otherInfo' },
{ label: '店面信息', name: 'merchantInfo' }
],
serviceObj: {
PC0005: '',
PC0007: ''
},
footerLeft: '0',
footerWidth: '0',
editCarChildRef: 'editChildRef',
disabled: false,
successDisable: false,
......@@ -326,10 +331,10 @@ export default {
maxlength: 16
},
{
label: '车辆价格',
label: '车辆价格/元',
name: 'invoicePrice',
type: 'input',
append: '元',
placeholder: '请输入车辆价格',
maxlength: 11,
inputBlur: () => {
this.packageToPrice()
......@@ -532,7 +537,7 @@ export default {
type: 'input',
inputType: 'textarea',
isDisabled: true,
rows: 6
rows: 3
}
],
// 店面信息
......@@ -734,8 +739,6 @@ export default {
},
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
const urlParam = this.$route.params
this.routeInfo = JSON.parse(decodeURIComponent(urlParam.id))
this.disabled = this.routeInfo.addOrEdit == '5'
......@@ -748,9 +751,28 @@ export default {
this.getOptionsList('editFormDataOther', false)
this.disabled && this.setDisabled()
this.successDisable && this.setDisabled(['invoicePrice', 'billingDate', 'packageCode', 'actualSalesPrice', 'servicePeriod', 'effectiveDate', 'merchantName', 'merchantPhone', 'merchantAddress'])
window.addEventListener('scroll', this.handleScroll, true)
},
methods: {
changeArea({ name }) {
document.getElementById(name) && document.getElementById(name).scrollIntoView()
},
handleScroll(e) {
try {
if (e.target.scrollTop < document.getElementById('cardInfo').scrollHeight - 20) {
this.curDom = 'cardInfo'
} else if (e.target.scrollTop < document.getElementById('cardInfo').scrollHeight + document.getElementById('customerInfo').scrollHeight - 20) {
this.curDom = 'customerInfo'
} else if (e.target.scrollTop < document.getElementById('cardInfo').scrollHeight + document.getElementById('customerInfo').scrollHeight + document.getElementById('productInfo').scrollHeight / 2 - 20) {
this.curDom = 'productInfo'
} else {
this.curDom = 'otherInfo'
}
} catch (err) {
console.log(err)
}
},
// 查找服务热线
getHotline() {
if (this.routeInfo.addOrEdit == 3) {
......@@ -1802,25 +1824,26 @@ export default {
}
// }
})
},
handleCancel() {
// if (this.submit) {
// return true
// }
this.$router.push({
path: '/beforeSale/checkSet'
})
}
// handleCancel() {
// // if (this.submit) {
// // return true
// // }
// this.$router.back()
// }
},
beforeDestroy() {
window.removeEventListener('scroll', this.handleScroll)
}
}
</script>
<style lang="scss" scoped>
.edit-equity {
margin-top: 17px;
}
// .edit-equity {
// margin-top: 17px;
// }
.before-sale .container {
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
// box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
}
.container /deep/ .el-radio__label {
font-weight: 600;
......@@ -1832,8 +1855,35 @@ export default {
margin-bottom: 84px;
}
.vehicleForm {
/deep/ .el-form-item {
margin-right: 12px !important;
margin-bottom: 32px;
}
}
#customerInfo,
#otherInfo,
#merchantInfo {
.edit-form-container {
padding-bottom: 12px;
}
}
#productInfo .sub-el-form {
.edit-form-container {
margin-top: 10px;
}
}
#otherInfo {
/deep/ .el-textarea__inner {
width: 580px;
height: 75px;
}
}
.before-sale .edit-form-container {
margin-top: 20px;
margin-top: 32px;
}
.before-sale .txt-center {
......@@ -1877,16 +1927,22 @@ export default {
padding: 0 0 32px 0px;
.product_wrapper {
margin-top: 16px;
.customer-form {
background: #f9f9f9;
width: fit-content;
margin-left: 73px;
}
.product_intro {
margin-top: 5px;
margin-left: 24px;
}
.child_wrap {
padding: 16px 0 0 0px;
padding: 20px 50px 20px 20px;
display: flex;
flex-wrap: wrap;
flex-direction: column;
.child_wrap_pannel {
position: relative;
// display: block;
.err_message {
position: absolute;
left: 160px;
......@@ -1894,26 +1950,39 @@ export default {
font-size: 12px;
color: #f56c6c;
}
&:last-child {
.attr_wrapper {
margin-bottom: 0;
}
}
}
.attr_wrapper {
margin-bottom: 28px;
margin-bottom: 20px;
margin-right: 30px;
.attr_label {
width: 160px;
width: 154px;
white-space: nowrap;
text-align: right;
box-sizing: border-box;
padding-right: 12px;
}
.arrt_pannel {
width: 320px;
width: 432px;
}
}
}
.custom-made {
background: #f9f9f9;
margin: 10px 0 0 73px;
width: fit-content;
padding-right: 50px;
}
.table_case_wrap {
display: flex;
padding-right: 80px;
padding-bottom: 20px;
.case_title {
width: 160px;
width: 154px;
height: 54px;
white-space: nowrap;
text-align: right;
......@@ -2081,37 +2150,31 @@ export default {
margin-right: 10px;
}
.fixed_bottom {
position: fixed;
width: 100%;
bottom: 0px;
height: 82px;
// position: fixed;
// width: 100%;
// bottom: 0px;
// height: 82px;
// display: flex;
// align-items: center;
// justify-content: center;
background: #ffffff;
z-index: 999;
// background: #ffffff;
// z-index: 999;
// box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
.ma_top {
height: 4px;
background: #f4f5fa;
}
// .ma_top {
// height: 4px;
// background: #f4f5fa;
// }
.ma_bot {
box-sizing: border-box;
padding: 0 20px 0 40px;
height: 78px;
.custom_black {
background: #ffffff;
color: #333333;
border: 1px solid #333333;
}
.custom_blue {
background: #ffffff;
color: #5850ff;
border: 1px solid #5850ff;
}
padding-top: 16px;
// height: 78px;
.mar-10 {
width: 20px;
}
}
}
.reset-btn {
background-color: transparent;
}
</style>
......@@ -3,32 +3,25 @@
<div class="before-sale">
<div class="flex m-b-10">
<!-- <el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新增权益</el-button> -->
<GLButton :size="size" fn="新增权益" icon="el-icon-plus" type="primary" @click="handleEdit(1)">新增权益</GLButton>
<GLButton :size="size" fn="新增权益" icon="el-icon-plus" type="primary" @click="handleEdit(1)">新增权益</GLButton>
<!-- <div class="table-top-tips"><span class="el-icon-warning"></span>请注意:订单列表还有{{countNoData}}单未上传客户凭证等资料,若发生事故无法获得补偿,请尽快在列表操作-上传资料中完善。</div> -->
</div>
<div class="container">
<div class="find_wrap">
<glsx-combi-form ref="showSearch" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData"></glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData2">
<span slot="footer" class="footer-btns">
<el-button :size="size" class="resetBtn" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" @click="handleExport">导出</el-button>
</span>
</glsx-combi-form>
<GLCombiForm ref="showSearch" :formObj="searchForm" :searchSelectObj="searchSelectObj" @handleOk="handleSearch" @handleRest="handleReset" :formData="searchFormData"></GLCombiForm>
</div>
<!-- 表格区域 开始 -->
<div class="table_wrapper">
<GLTable ref="equityRef" :pageSizes="sizeList" :paginationattrs="paginationattrs" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<el-button plain :size="size" style="float:right;margin-bottom:10px;" @click="handleExport">导出</el-button>
<GLTable ref="equityRef" :pageSizes="sizeList" :paginationattrs="paginationattrs" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="table-btns" slot-scope="scope">
<GLButton v-if="[2, 4, 5].includes(scope.scope.orderStatus)" fn="查看" type="text" @click="handleEdit(5, scope.scope)">查看</GLButton>
<!-- <el-button v-if="[2, 4, 5].includes(scope.scope.orderStatus)" type="text" @click="handleEdit(5, scope.scope)">查看</el-button> -->
<!-- <GLButton v-if="[2, 4, 5].includes(scope.scope.orderStatus)" fn="查看" type="text" @click="handleEdit(5, scope.scope)">查看</GLButton>
<el-button v-if="[2].includes(scope.scope.orderStatus)" type="text" @click="handlePdf(scope.scope)">打印</el-button>
<GLButton v-if="[0].includes(scope.scope.orderStatus)" fn="编辑" type="text" @click="handleEdit(2, scope.scope)">编辑</GLButton>
<GLButton v-if="[2].includes(scope.scope.orderStatus)" fn="修改" type="text" @click="handleEdit(3, scope.scope)">修改</GLButton>
<el-button v-if="[2].includes(scope.scope.orderStatus)" type="text" @click="handleBack(scope.scope)">退单</el-button>
<GLButton v-if="[3, 4, 5].includes(scope.scope.orderStatus)" fn="重新提单" type="text" @click="handleEdit(4, scope.scope)">重新提单</GLButton>
<GLButton v-if="[3, 4, 5].includes(scope.scope.orderStatus)" fn="重新提单" type="text" @click="handleEdit(4, scope.scope)">重新提单</GLButton> -->
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
</div>
......@@ -62,7 +55,6 @@
<script>
import * as dayjs from 'dayjs'
import glsxCombiForm from '@/components/glsx-combi-form'
import glsxDialog from '@/components/glsx-dialog'
import pdfDialog from './pdfDialog'
import utils from '../../util/util'
......@@ -71,9 +63,105 @@ export default {
data() {
return {
// :page-size="100"
paginationattrs:{
'page-size':5
paginationattrs: {
'page-size': 5
},
buttonList: [
{
type: 'GLButton',
name: row => {
return '查看'
},
condition: row => {
return [2, 4, 5].includes(row.scope.orderStatus)
},
attrs: {
type: 'text',
fn: '查看'
},
listeners: {
click: row => this.handleEdit(5, row.scope)
}
},
{
type: 'el-button',
name: row => {
return '打印'
},
condition: row => {
return [2].includes(row.scope.orderStatus)
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.handlePdf(row.scope)
}
},
{
type: 'GLButton',
name: row => {
return '编辑'
},
condition: row => {
return [0].includes(row.scope.orderStatus)
},
attrs: {
type: 'text',
fn: '编辑'
},
listeners: {
click: row => this.handleEdit(2, row.scope)
}
},
{
type: 'GLButton',
name: row => {
return '修改'
},
condition: row => {
return [2].includes(row.scope.orderStatus)
},
attrs: {
type: 'text',
fn: '修改'
},
listeners: {
click: row => this.handleEdit(3, row.scope)
}
},
{
type: 'el-button',
name: row => {
return '退单'
},
condition: row => {
return [2].includes(row.scope.orderStatus)
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.handleBack(row.scope)
}
},
{
type: 'GLButton',
name: row => {
return '重新提单'
},
condition: row => {
return [3, 4, 5].includes(row.scope.orderStatus)
},
attrs: {
type: 'text',
fn: '重新提单'
},
listeners: {
click: row => this.handleEdit(4, row.scope)
}
}
],
size: 'small',
noCancel: true,
isBlock: true,
......@@ -166,6 +254,20 @@ export default {
optionId: 'packageCode',
optionLabel: 'packageName',
optionsName: 'goodsStatusList'
},
{
label: '提单成功时间',
name: 'successDate',
type: 'datePicker',
labelWidth: 95,
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
},
{
label: '生效时间',
name: 'effectiveDate',
type: 'datePicker',
isClear: true
}
],
searchFormData2: [
......@@ -202,14 +304,14 @@ export default {
{
label: '合同号',
prop: 'contractNo',
width: '200px',
width: '250px',
formatter: cellValue => {
return [2, 4, 5].includes(cellValue.orderStatus) ? cellValue.contractNo || '-' : '-'
}
},
{
label: '提单成功时间',
width: '200px',
width: '200px',
prop: 'successDate',
formatter: cellValue => {
return cellValue.successDate ? dayjs(cellValue.successDate).format('YYYY-MM-DD HH:mm:ss') : '-'
......@@ -283,9 +385,10 @@ export default {
}
},
{
label: '无忧保障服务费',
label: '无忧保障服务费/元',
prop: 'actualSalesPrice',
width: '200px',
align: 'right',
formatter: cellValue => {
return cellValue.actualSalesPrice ? (cellValue.actualSalesPrice / 100).toFixed(2) : '-'
}
......@@ -396,7 +499,7 @@ export default {
}
]
},
sizeList:[5,10,20,30,40],
sizeList: [5, 10, 20, 30, 40],
pageConf: { pageSize: 'pageCount', pageNum: 'pageSize', totalCount: 'total' },
// 公共数据
baseData: {
......@@ -452,7 +555,6 @@ export default {
},
components: {
glsxCombiForm,
// glsxDialog,
pdfDialog
},
......@@ -597,10 +699,10 @@ export default {
this.$apis[this.secondObj.apiModule][this.secondObj.apiName](this.secondObj.apiParams).then(res => {
// this.handleSecondCancel()
// this.isTipVisible = true
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
this.editNotify = res
// clearTimeout(this.timer)
// this.timer = setTimeout(
......@@ -623,9 +725,9 @@ export default {
handleEdit(addOrEdit, row) {
if (addOrEdit == 3 && !this.userInfo.admin && new Date(new Date().setDate(new Date().getDate() - 7)) > new Date(row.successDate)) {
const h = this.$createElement
const tip = addOrEdit==3?'修改申请':'退单申请'
const tip = addOrEdit == 3 ? '修改申请' : '退单申请'
this.$message({
message: h('p', null, [h('p', { style: 'text-align: center; line-height: 20px; color: #F56C6C;' }, '为保障客户权益,请邮件主送:operation@didihu.com.cn,抄送:liuqm@didihu.com.cn,jiangfj@didihu.com.cn提交'+tip)]),
message: h('p', null, [h('p', { style: 'text-align: center; line-height: 20px; color: #F56C6C;' }, '为保障客户权益,请邮件主送:service@didihu.com.cn,提交修改申请 ,邮件标题:门店名称+合同号+修改内容,并备注门店接待姓名+电话')]),
type: 'error',
customClass: 'customMessage'
})
......@@ -638,7 +740,7 @@ export default {
}
const title = this.jumpTitle(addOrEdit)
const urlpara = encodeURIComponent(JSON.stringify(paraFormat))
this.$router.push({path:'/beforeSale/editEquity/' + urlpara,query:{$title:title}})
this.$router.push({ path: '/beforeSale/editEquity/' + urlpara, query: { $title: title } })
// addOrEdit == 1 ? this.$router.push('/beforeSale/editEquity/' + urlpara) : this.$router.push('/beforeSale/editEquity/' + urlpara)
},
......@@ -673,7 +775,7 @@ export default {
this.$apis.beforeSale.getPriteApi({ contractNo: row.contractNo }).then(res => {
this.pdfUrl = res
this.handlePdfClose()
loading.close();
loading.close()
})
},
......@@ -710,7 +812,7 @@ export default {
handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result
const targetNameList = file.name.split('.')
const base64 = targetNameList[targetNameList.length-1] + '@' + imgFile.split(',')[1]
const base64 = targetNameList[targetNameList.length - 1] + '@' + imgFile.split(',')[1]
var imgUrl = ''
this.$apis.beforeSale.uploadImgApi({ file: base64, fileType: 'image' }).then(res => {
this.uploadFile(res, targetItem)
......@@ -752,7 +854,7 @@ export default {
if (!this.userInfo.admin && new Date(new Date().setDate(new Date().getDate() - 7)) > new Date(row.successDate)) {
const h = this.$createElement
this.$message({
message: h('p', null, [h('p', { style: 'text-align: center; line-height: 20px; color: #F56C6C;' }, '为保障客户权益,请邮件主送:operation@didihu.com.cn,抄送:liuqm@didihu.com.cn,jiangfj@didihu.com.cn提交退单申请 ')]),
message: h('p', null, [h('p', { style: 'text-align: center; line-height: 20px; color: #F56C6C;' }, '为保障客户权益,请邮件主送:service@didihu.com.cn,提交退单申请 ,邮件标题:门店名称+合同号+退单原因,并备注门店接待姓名+电话')]),
type: 'error',
customClass: 'customMessage'
})
......@@ -818,22 +920,22 @@ export default {
switch (addOrEdit) {
case 1:
title = '新增权益'
break;
break
case 2:
title = '编辑'
break;
break
case 3:
title = '修改'
break;
break
case 4:
title = '重新提单'
break;
break
case 5:
title = '查看'
break;
break
default:
title = '新增权益'
break;
break
}
return title
}
......@@ -842,15 +944,15 @@ export default {
</script>
<style lang="scss" scoped>
.before-sale {
margin-top: 17px;
}
// .before-sale {
// margin-top: 17px;
// }
.before-sale .flex {
display: flex;
}
.find_wrap {
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
// box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px 20px 2px 20px;
.resetBtn {
background: #ffffff;
......@@ -864,8 +966,8 @@ export default {
.table_wrapper {
// margin-top: 10px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
// box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 0 20px 20px;
}
.before-sale .m-b-10 {
......@@ -912,11 +1014,11 @@ export default {
.before-sale .el-table .cell {
line-height: 16px;
}
.before-sale .table-btns {
display: grid;
grid-template-columns: repeat(auto-fill, 33.33%);
grid-row-gap: 10px;
}
// .before-sale .table-btns {
// display: grid;
// grid-template-columns: repeat(auto-fill, 33.33%);
// grid-row-gap: 10px;
// }
.before-sale .table-btns .el-button {
// padding: 0 0 0 5px;
border-radius: 0;
......
......@@ -13,23 +13,31 @@
</div>
</div>
<div class="mid_wrapper">
<div class="content_one flex_sc">
<div class="title left">
<span>您提供的</span>
<i class="el-icon-caret-right"></i>
</div>
<div class="title right">
<span>您将获得的</span>
<div class="icon_point"></div>
<div class="step_wrap_widget flex_sc">
<div class="left box">
<div class="title">您提供的</div>
<div class="line flex_sc">
<i class="el-icon-caret-right"></i>
</div>
<div class="box_item_wrap flex_cc">
<img :src="localList[0].icon" />
<div class="box_title">{{ localList[0].title }}</div>
</div>
</div>
</div>
<div class="content_two flex_scb">
<template v-for="(item, index) in localList">
<div :key="index" class="box_item_wrap flex_cc">
<img :src="item.icon" />
<div class="box_title">{{ item.title }}</div>
<div class="right box">
<div class="title">您将获得的</div>
<div class="line flex_sc">
<div class="icon_point"></div>
</div>
</template>
<div class="box_line flex_scb">
<template v-for="(item, index) in localList">
<div v-if="index" :key="index" class="box_item_wrap flex_cc">
<img :src="item.icon" />
<div class="box_title">{{ item.title }}</div>
</div>
</template>
</div>
</div>
</div>
<div class="label_title">无忧案例</div>
<div class="content_three">
......@@ -76,7 +84,7 @@ export default {
return {
videoShow: false,
code: 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/wangdy.png',
phone:'134 8079 2980',
phone: '134 8079 2980',
localList: [
{
icon: 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/before_icon_1.png',
......@@ -118,7 +126,7 @@ export default {
},
mounted() {
// let [href] = window.location.href.split('/#/')
let href = window.location.host;
let href = window.location.host
// 从域名判断是不是广汇的
let gxurl1 = 'http://scrm.cgacar.com'
let gxurl2 = 'https://scrm.cgacar.com'
......@@ -135,13 +143,13 @@ export default {
}
</script>
<style lang="scss" scoped>
.introduct_container {
margin-top: 17px;
}
// .introduct_container {
// margin-top: 17px;
// }
.top_play_wrap {
height: 360px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
// box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
box-sizing: border-box;
padding-right: 50px;
.text_wrap {
......@@ -194,64 +202,70 @@ export default {
}
.mid_wrapper {
background: #ffffff;
margin-top: 20px;
margin-top: 16px;
box-sizing: border-box;
padding: 20px;
.content_one {
box-sizing: border-box;
padding: 20px 0 14px 0;
border-bottom: 1px solid #e8e8e8;
.title {
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 18px;
position: relative;
}
.step_wrap_widget {
padding: 20px 0 0 0;
.left {
width: 376px;
> i {
color: #5850ff;
width: 6px;
height: 6px;
position: absolute;
bottom: -11px;
left: -7px;
}
width: 33.33%;
}
.right {
// width: calc(100% - 376px);
.icon_point {
width: 7px;
height: 7px;
background: #5850ff;
border-radius: 50%;
position: absolute;
bottom: -18px;
left: 0px;
}
width: 66.67%;
}
}
.content_two {
margin-top: 15px;
.box_item_wrap {
width: 32%;
height: 80px;
background: #f7f6fd;
box-sizing: border-box;
padding: 19px 20px;
> img {
width: 42px;
height: 42px;
.box {
.title {
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 18px;
}
.line {
width: 100%;
height: 1px;
background: #d4d2f3;
position: relative;
margin-top: 14px;
> i {
color: #5850ff;
width: 6px;
height: 6px;
position: absolute;
top: -8px;
left: -6px;
}
.icon_point {
width: 7px;
height: 7px;
background: #5850ff;
border-radius: 50%;
position: absolute;
top: -3px;
left: 2px;
}
}
.box_item_wrap {
width: calc(100% - 15px);
height: 80px;
background: #f7f6fd;
box-sizing: border-box;
margin-top: 15px;
padding: 19px 20px;
> img {
width: 42px;
height: 42px;
}
.box_title {
width: calc(100% - 82px);
font-size: 14px;
font-weight: 400;
color: #3a3a3a;
line-height: 20px;
margin-left: 10px;
}
}
.box_title {
width: calc(100% - 82px);
font-size: 14px;
font-weight: 400;
color: #3a3a3a;
line-height: 20px;
margin-left: 10px;
.box_line >.box_item_wrap{
width: calc(50% - 7.5px);
}
}
}
......@@ -319,16 +333,16 @@ export default {
}
}
}
::v-deep .video-dialog{
.el-dialog__header{
::v-deep .video-dialog {
.el-dialog__header {
border-bottom: none;
background-color: #000;
.el-dialog__headerbtn{
top:15px;
.el-dialog__headerbtn {
top: 15px;
font-size: 24px;
}
}
.el-dialog__body{
.el-dialog__body {
padding: 0;
display: flex;
}
......
......@@ -4,15 +4,15 @@
<template v-if="showPage == 1">
<div class="edit-container">
<p class="edit-title">{{ title }}</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="140px" :isBlock="isBlock" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"></glsx-combi-form>
<glsx-combi-form ref="editFormRefBrand" labelWidth="140px" defaultWidth="320px" formRef="editChildRefBrand" :formObj.sync="editForm" :formData="editFormDataCar">
<glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="154px" defaultWidth="432px" :isBlock="isBlock" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"></glsx-combi-form>
<glsx-combi-form ref="editFormRefBrand" labelWidth="154px" defaultWidth="432px" formRef="editChildRefBrand" :formObj.sync="editForm" :formData="editFormDataCar">
<template slot="vehicleBrandId">
<el-select v-model="editForm.vehicleBrandId" placeholder="请选择品牌" filterable @change="handleChangeBrand(editForm.vehicleBrandId)" style="width: 320px" clearable>
<el-select v-model="editForm.vehicleBrandId" placeholder="请选择品牌" filterable @change="handleChangeBrand(editForm.vehicleBrandId)" style="width: 136px" clearable>
<el-option v-for="item in baseData.carBrandOptions" :key="item.id" :value="item.id" :label="item.name" />
</el-select>
</template>
<template slot="vehicleSubBrandId">
<el-select v-model="editForm.vehicleSubBrandId" placeholder="请选择子品牌" filterable style="width: 320px" clearable>
<el-select v-model="editForm.vehicleSubBrandId" placeholder="请选择子品牌" filterable style="width: 136px" clearable>
<el-option v-for="item in baseData.carChildOptions" :key="item.id" :value="item.id" :label="item.name" />
</el-select>
</template>
......@@ -58,14 +58,8 @@
</div>
</div>
</div>
<div
class="fixed_bottom"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<el-button size="small" type="primary" @click="handleConfirm">确定</el-button>
<div class="fixed_bottom flex_cc">
<el-button type="primary" @click="handleConfirm">确定</el-button>
</div>
</template>
<template v-if="showPage == 2">
......@@ -77,8 +71,8 @@
</div>
</div>
</template>
<el-dialog width="60%" height="50%" :visible.sync="dialogTableVisible">
<div slot="title" class="customTitle">
<GLDialog mode="big" bigTitle="选择渠道活码" :visible.sync="dialogTableVisible">
<div slot="custombigtitle" class="customTitle">
<div class="title1">选择渠道活码</div>
<span class="h9_title">仅查询自动回复中活动类型为“无忧服务”的活码</span>
</div>
......@@ -105,12 +99,12 @@
<div v-if="!scope.scope.taggingList || (scope.scope.taggingList && scope.scope.taggingList.length == 0)">--</div>
</div>
</GLTable>
<span slot="footer" class="dialog-footer flex_cc">
<span slot="footer" class="dialog-footer">
<span v-if="!tableData.length" @click="jumpToCreated" class="created_btn">创建活码</span>
<el-button size="mini" @click="dialogTableVisible = false">取消</el-button>
<el-button size="mini" type="primary" @click="toConfimActived">确定</el-button>
<el-button plain size="small" class="btn-three" @click="dialogTableVisible = false">取消</el-button>
<el-button size="small" type="primary" @click="toConfimActived">确定</el-button>
</span>
</el-dialog>
</GLDialog>
</div>
</template>
......@@ -123,8 +117,6 @@ export default {
size: 'small',
isBlock: true,
title: '店面服务设置',
footerLeft: '0',
footerWidth: '0',
editChildRef: 'editChildRef',
editForm: {
hotline: '',
......@@ -138,14 +130,13 @@ export default {
{
label: '服务热线',
name: 'hotline',
width: '320px',
type: 'input',
maxlength: 20
}
],
editFormDataCar: [
{
label: '品牌',
label: '主营品牌',
name: 'vehicleBrandId',
addHtml: 'vehicleBrandId'
},
......@@ -228,7 +219,7 @@ export default {
},
created() {
let clientHeight = document.documentElement.clientHeight
this.nodataHeight = clientHeight * 0.8
this.nodataHeight = clientHeight * 0.86
const openStatus = localStorage.getItem('preSetStatus')
if (openStatus == 2) {
this.showPage = 2
......@@ -242,8 +233,6 @@ export default {
mounted() {
this.getHotline()
this.getActiveCode()
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
},
methods: {
......@@ -401,20 +390,24 @@ export default {
}
</script>
<style lang="scss" scoped>
.edit-equity {
margin-top: 17px;
width: 100%;
// height: calc(100% - 108px);
}
// .edit-equity {
// // margin-top: 17px;
// // width: 100%;
// }
.edit-container {
width: 100%;
height: 76vh;
height: calc(100vh - 195px);
// height: 76vh;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
// box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
}
.edit-container /deep/ .el-form--inline .el-form-item {
margin-right: 10px;
}
/deep/ #vehicleBrandId {
margin-right: 12px !important;
}
/* .before-sale .edit-equity{
height: 100vh;
}
......@@ -554,19 +547,20 @@ export default {
}
}
.fixed_bottom {
position: fixed;
width: 100%;
bottom: 0px;
height: 78px;
display: flex;
align-items: center;
justify-content: center;
background: #ffffff;
z-index: 999;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
margin-top: 16px;
// position: fixed;
// width: 100%;
// bottom: 0px;
// height: 78px;
// display: flex;
// align-items: center;
// justify-content: center;
// background: #ffffff;
// z-index: 999;
// box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
}
.nodata_widget {
margin-top: 17px;
// margin-top: 17px;
.wrapper {
width: 100%;
background: #ffffff;
......@@ -642,6 +636,13 @@ export default {
}
.dialog-footer {
position: relative;
display: flex;
align-items: center;
justify-content: flex-end;
.btn-three {
border-color: #c8c8c8;
color: #666;
}
.created_btn {
position: absolute;
left: 0px;
......@@ -658,4 +659,8 @@ export default {
.edit-equity /deep/ .el-dialog__body {
height: 520px;
}
/deep/ .combi-form-label {
color: #333;
}
</style>
<template>
<div class="member-wrapper">
<div class="member-left">
<!-- <div class="member-title">
预选
<span>仅筛选有外部客户联系人的成员</span>
</div> -->
<div class="member-content">
<el-form :inline="true" class="member-form" :model="searchForm" @submit.native.prevent>
<el-form-item label="所在门店/部门" style="margin-bottom: 0;">
<el-popover ref="popover" placement="bottom" width="215" trigger="click" v-model="popoverVisible" @show="onShowPopover" @hide="onHidePopover">
<el-tree class="select-tree" :data="treeData" :props="defaultProps" default-expand-all @node-click="handleNodeClick"></el-tree>
<el-input v-model="searchForm.department" slot="reference" :size="size" readonly placeholder="请选择所在门店/部门" :class="{ rotate: popoverVisible }" suffix-icon="el-icon-arrow-down" @keyup.enter.native="search"></el-input>
</el-popover>
</el-form-item>
<el-form-item label="姓名" style="margin-bottom: 0;">
<el-input :size="size" v-model.trim="searchForm.name" @keyup.enter.native="search" clearable placeholder="请输入姓名搜索"></el-input>
</el-form-item>
<!-- <el-form-item>
<el-checkbox v-model="searchForm.checked">仅看跟进专员</el-checkbox>
</el-form-item>-->
<el-form-item style="margin-bottom: 0;padding-top: 1px;">
<el-button type="primary" :size="size" @click="search">查询</el-button>
</el-form-item>
</el-form>
<div class="table-content" style="max-height: 456px;">
<GLTable v-loading="loading" ref="empTable" :tableData="tableEmpData" :tableParams="tableParams" :hasNum="false" :hasPage="false" :noDataImg="url" @row-click="rowClick">
<div slot="radio" slot-scope="scope">
<el-radio v-model="selectPerson" :label="scope.scope">&nbsp;</el-radio>
</div>
<div slot="staffName" slot-scope="scope">
<span>{{ scope.scope.staffName }}</span>
<span class="staff-title" v-show="scope.scope.staffTitle">{{ scope.scope.staffTitle }}</span>
</div>
</GLTable>
<template v-if="showTab">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="本企业员工" name="1"></el-tab-pane>
<el-tab-pane label="外部企业员工" name="2"></el-tab-pane>
</el-tabs>
</template>
<selectOtherMembrt v-show="activeName == 2" v-model="otherPersonal"></selectOtherMembrt>
<div v-show="activeName == 1">
<div class="member-content">
<el-form :inline="true" class="member-form" :model="searchForm" @submit.native.prevent>
<el-form-item class="department" label="所在门店/部门" style="margin-bottom: 0;">
<el-popover ref="popover" placement="bottom" width="215" trigger="click" v-model="popoverVisible" @show="onShowPopover" @hide="onHidePopover">
<el-tree class="select-tree" :data="treeData" :props="defaultProps" default-expand-all @node-click="handleNodeClick"></el-tree>
<el-input v-model="searchForm.department" slot="reference" :size="size" readonly placeholder="请选择所在门店/部门" :class="{ rotate: popoverVisible }" suffix-icon="el-icon-arrow-down" @keyup.enter.native="search"></el-input>
</el-popover>
</el-form-item>
<el-form-item class="personName" label="姓名" style="margin-bottom: 0;">
<el-input :size="size" v-model.trim="searchForm.name" @keyup.enter.native="search" clearable placeholder="请输入姓名"></el-input>
</el-form-item>
<el-form-item style="margin-bottom: 0;">
<el-button type="primary" :size="size" @click="search">查询</el-button>
</el-form-item>
</el-form>
<div class="table-content" style="max-height: 456px;">
<GLTable v-loading="loading" ref="empTable" :tableData="tableEmpData" :tableParams="tableParams" :hasNum="false" :hasPage="false" :noDataImg="url" @row-click="rowClick">
<div slot="radio" slot-scope="scope">
<el-radio v-model="selectPerson" :label="scope.scope">&nbsp;</el-radio>
</div>
<div slot="staffName" slot-scope="scope">
<span>{{ scope.scope.staffName }}</span>
<span class="staff-title" v-show="scope.scope.staffTitle">{{ scope.scope.staffTitle }}</span>
</div>
</GLTable>
</div>
</div>
</div>
<div class="member-checked">
<div class="name">
已选择:{{ selectPerson && selectPerson.staffName }}
<span v-if="selectPerson && selectPerson.staffTitle" style="font-size:12px;">|&nbsp;{{ selectPerson && selectPerson.staffTitle }}</span>
<div class="member-checked">
<div class="name">
已选择:{{ selectPerson && selectPerson.staffName }}
<span v-if="selectPerson && selectPerson.staffTitle" style="font-size:12px;">|&nbsp;{{ selectPerson && selectPerson.staffTitle }}</span>
</div>
<el-checkbox v-model="checked" @change="checkChange">仅看跟进专员</el-checkbox>
</div>
<el-checkbox v-model="checked" @change="checkChange">仅看跟进专员</el-checkbox>
</div>
</div>
<!-- <div class="member-right">
<div class="member-title">已选</div>
<div class="member-name">成员名称({{ innerTags.length }}项)</div>
<div class="input-tag-wrapper">
<div class="tag-box">
<el-tag v-for="(tag, idx) in innerTags" :key="idx" type="info" closable :disable-transitions="false" @close="remove(tag)">
<i class="el-icon-user-solid"></i>
{{ tag.staffName }}
</el-tag>
</div>
</div>
</div> -->
</div>
</template>
<script>
import url from '@/assets/empty.png'
import selectOtherMembrt from './selectOtherMembrt'
export default {
name: 'SelectMember',
props: ['selectData'],
components: {
selectOtherMembrt
},
watch: {
selectPerson(nVal, oVal) {
if (nVal && nVal.staffId) {
this.otherPersonal = null
}
},
otherPersonal(nVal, oVal) {
if (nVal && nVal.id) {
this.selectPerson = null
}
}
},
data() {
return {
url: url,
size: 'small',
activeName: '1',
showTab:false,
otherPersonal: null,
selectPerson: null,
searchForm: {},
checked: '',
......@@ -119,10 +128,16 @@ export default {
}
},
mounted() {
console.log(123456)
const {session} = this.$globalState
const target = session.loginList.find(item=>item.active)
this.showTab = target && target.accounttypeId == 7
this.listDepartmentTree(false)
},
methods: {
//切换tab栏
handleClick() {
console.log(this.otherPersonal, 99)
},
selectionTable(val) {
this.innerTags = val
// this.$emit('selectTable', val)
......@@ -259,6 +274,26 @@ export default {
.el-input.el-input--suffix.rotate .el-input__suffix .el-icon-arrow-down {
transform: rotate(-180deg);
}
/deep/ .el-tabs__header {
margin-bottom: 0;
}
.department {
margin-right: 0 !important;
/deep/ .el-form-item__label {
width: 105px;
text-align: left;
}
}
.personName {
/deep/.el-form-item__label {
width: 105px;
padding-right: 15px;
}
}
/deep/.el-tabs__nav-wrap::after {
height: 1px;
background-color: #e5e5e5;
}
.select-tree {
max-height: 400px;
overflow-y: scroll;
......@@ -297,7 +332,7 @@ export default {
}
}
.member-left {
width: 800px;
width: 100%;
.member-content {
.member-form {
......@@ -305,14 +340,11 @@ export default {
/deep/ .el-input__inner {
height: 32px;
}
/deep/.el-button--primary {
padding: 8px 20px;
}
}
.table-content {
max-height: 456px;
overflow: auto;
border: 1px solid #eee;
border: 1px solid transparent;
}
}
.member-checked {
......@@ -320,6 +352,7 @@ export default {
justify-content: space-between;
font-size: 14px;
margin-top: 12px;
height: 20px;
.name {
display: flex;
align-items: center;
......
<template>
<div class="">
<div class="wrap">
<div class="search-wrap">
<glsxCombiForm ref="showSearch" labelWidth="105px" defaultWidth="215px" :formObj="batchListSearch" :formData="productFormData">
<span slot="footer" class="footer-btns">
<!-- <el-button :size="size" class="resetBtn" @click="handleReset">重置</el-button> -->
<el-button type="primary" :size="size" @click="handleSearch">查询</el-button>
</span>
</glsxCombiForm>
</div>
<GLTable ref="productTable" :hasNum="false" :hasPage="false" :tableData="tableData" :searchForm="searchForm" :tableParams="batchTableParams" @row-click="rowClick">
<div slot="radio" slot-scope="scope">
<el-radio v-model="personal" :label="scope.scope">&nbsp;</el-radio>
</div>
<div slot="qrCode" slot-scope="scope">
<el-popover placement="bottom" width="240" trigger="click">
<img :src="scope.scope.qrCode" style="width: 200px; height: 200px" />
<img :src="scope.scope.qrCode" style="width: 36px; height: 36px" slot="reference" />
</el-popover>
</div>
</GLTable>
<div class="member-checked">
<span class="name">
<img :src="tips" alt="" />
<span style="color:#666;">选择一个渠道活码,将该员工设定为客户加微对象。</span>
</span>
</div>
</div>
</div>
</template>
<script type="text/ecmascript-6">
import util from '@/util/util'
import glsxCombiForm from '@/components/glsx-combi-form'
import { converterApi } from '@/api/modules/converter'
import tips from '@/assets/tips.png'
export default {
name: 'writeOffList',
components: {
glsxCombiForm
},
model: {
prop: 'personal',
event: 'changePerson'
},
props:['personal'],
data() {
return {
tips,
size:'small',
tableData: [],
getListApi: this.$apis.expert.getOtherNumber,
batchListSearch: {
staffName: '',
merchant:''
},
searchForm: {},
productFormData: [
{
label: '所在门店/部门',
name: 'merchant',
type: 'select',
optionList: [],
optionId: 'merchantId',
optionLabel: 'merchantName',
isClear:true
},
{
label: '姓名',
name: 'staffName',
type: 'input',
isClear: true
}
],
batchTableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '',
prop: 'radio',
addHtml: 'radio',
width: '50'
},
{
label: '渠道活码',
prop: '',
addHtml: 'qrCode'
},
{
label: '渠道名称',
prop: 'codeName'
},
{
label: '员工姓名',
prop: 'staffName'
},
{
label: '所在部门',
prop: 'departmentName'
},
{
label: '所属企业微信',
prop: 'entmicroName'
}
]
}
}
},
created(){
},
mounted() {
this.getPersonList()
this.getTableData()
},
methods: {
rowClick(row) {
this.personal = row
this.$emit('changePerson',this.personal)
},
getPersonList(){
const params = {routerMethod:'dj.smartcarlife.api.partnerMerchant.listYqAndShop'}
converterApi(params).then(res => {
if(res){
let target = this.productFormData.find(item => item.name =='merchant')
target.optionList = res
}
})
},
getParams() {
let params = {...this.batchListSearch}
return params
},
getTableData(){
this.$apis.expert.getOtherNumber(this.getParams()).then(res=>{
if(res){
this.tableData = res
}
})
},
handleSearch() {
this.getTableData()
},
handleReset(type) {
this.batchListSearch = {
packageCode: '',
createTime: '',
updatedTime:''
}
this.$refs.productTable.refreshTable()
},
}
}
</script>
<style lang="scss" scoped>
.wrap {
margin-top: 20px;
/deep/ .combi-form-label {
white-space: nowrap;
}
/deep/ #merchant {
margin-right: 0 !important;
}
}
.member-checked {
display: flex;
justify-content: space-between;
font-size: 14px;
margin-top: 12px;
height: 20px;
.name {
display: flex;
align-items: center;
color: #5850ff;
}
img {
width: 14px;
height: 14px;
margin-right: 8px;
}
/deep/ .el-checkbox__label {
font-size: 14px;
color: #333333;
}
}
</style>
......@@ -45,13 +45,15 @@
<div class="btn-group">
<div class="add-btn" v-for="item in btnList" :key="item.id">
<!-- <i class="el-icon-circle-plus-outline"></i> -->
<img :src="require(`@/assets/guestCustom/add-${item.type}.png`)" alt v-if="item.id == 1" @click="selectEmotion" />
<img :src="require(`@/assets/guestCustom/add-${item.type}.png`)" v-else alt />
<span v-if="item.id == 1" @click.stop="selectEmotion">{{ item.name }}</span>
<span v-else>{{ item.name }}</span>
<input v-if="item.type == 'img'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input upload-img" :accept="item.accept || 'image/png, image/jpeg, image/jpg'" @change="e => handleImgChange(e, item)" />
<input v-else-if="item.type == 'video'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input" :accept="item.accept || 'video/*'" @change="e => handleVideoChange(e, item)" />
<el-link v-else-if="item.type == 'link' || item.type == 'nickname' || item.type == 'acivity'" style="opacity: 0" @click="handleFun(item.funName)">{{ item.name }}</el-link>
<template v-if="!item.isHide">
<img :src="require(`@/assets/guestCustom/add-${item.type}.png`)" alt v-if="item.id == 1" @click="selectEmotion" />
<img :src="require(`@/assets/guestCustom/add-${item.type}.png`)" v-else alt />
<span v-if="item.id == 1" @click.stop="selectEmotion">{{ item.name }}</span>
<span v-else>{{ item.name }}</span>
<input v-if="item.type == 'img'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input upload-img" :accept="item.accept || 'image/png, image/jpeg, image/jpg'" @change="e => handleImgChange(e, item)" />
<input v-else-if="item.type == 'video'" type="file" style="opacity: 0" :id="item.name + 'file'" ref="file" class="welcome-input" :accept="item.accept || 'video/*'" @change="e => handleVideoChange(e, item)" />
<el-link v-else-if="item.type == 'link' || item.type == 'nickname' || item.type == 'acivity'" style="opacity: 0" @click="handleFun(item.funName)">{{ item.name }}</el-link>
</template>
</div>
</div>
</div>
......
<template>
<div class="expert-detail">
<div class="header">
<span class="title">基础信息</span>
<span class="tip">该配置页面用于配置「精品升级」小程序质保卡客户拉新,配置订单类型后,客户扫码质保卡活码即可添加员工企微号。</span>
</div>
<div class="detail-wrap">
<el-form class="form" ref="form" :model="basicForm" label-width="112px">
<el-form-item label="客户类型:">
<span class="client">{{ clientType }}</span>
</el-form-item>
<el-form-item required label="轻改专家:">
<span v-if="selectPerson && selectPerson.staffName" class="tag-info">
<i class="el-icon-user-solid person"></i>
<span class="client name">{{ selectPerson && selectPerson.staffName }}</span>
<i class="el-icon-close del" @click="delPerson"></i>
</span>
<el-button class="checkNumber" v-else size="small" icon="el-icon-plus" @click="openMembers">
选择成员
</el-button>
<span v-if="selectPerson && selectPerson.departmentName" class="depart-name">{{ selectPerson && selectPerson.departmentName }}</span>
</el-form-item>
<el-form-item label="欢迎语:">
<!-- <label slot="label" class="required">群发内容</label> -->
<WelcomeWords ref="welcome" :btnList="btnList" :eventBus="eventBus"></WelcomeWords>
<div class="tips-text">
<p>当「精品升级」小程序提交升级订单时,</p>
<p>
客户扫描订单质保码添加
<span style="color:#409eff">{{ ' ' }}{{ (selectPerson && selectPerson.staffName) || '待选择' }}</span>
,
</p>
<p>客户添加成功自动推送欢迎语,建议插入质保链接。</p>
<div>
<div class="expert-detail">
<div class="header">
<span class="title">基础信息</span>
<span class="tip">该配置页面用于配置「精品升级」小程序质保卡客户拉新,配置订单类型后,客户扫码质保卡活码即可添加员工企微号。</span>
</div>
<div class="detail-wrap">
<glsx-combi-form class="form" ref="form" :formRules="basicRule" labelWidth="154px" defaultWidth="432px" :formObj="basicForm" :formData="basicFormData">
<div slot="staffSlot">
<span v-if="selectPerson.staffName" class="tag-info">
<i class="el-icon-user-solid person"></i>
<span class="client name">{{ selectPerson.staffName }}</span>
<i class="el-icon-close del" @click="delPerson"></i>
</span>
<el-button class="checkNumber" v-else size="small" icon="el-icon-plus" @click="openMembers">
选择成员
</el-button>
<span v-if="selectPerson.departmentName" class="depart-name">{{ selectPerson.departmentName }}</span>
</div>
<div slot="welcomeSlot">
<WelcomeWords ref="welcome" :btnList="btnList" :eventBus="eventBus"></WelcomeWords>
<div class="tips-text">
<p>当「精品升级」小程序提交升级订单时,</p>
<p>
客户扫描订单质保码添加
<span style="color:#409eff">{{ ' ' }}{{ selectPerson.staffName || '待选择' }}</span>
,
</p>
<p>客户添加成功自动推送欢迎语,建议插入质保链接。</p>
</div>
</div>
</el-form-item>
</el-form>
</glsx-combi-form>
</div>
<glsx-dialog mode="big" bigTitle="选择成员" btnSize="small" :isVisible="membersVisible" @confirmDialog="handleConfirm" @closeDialog="membersVisible = !membersVisible">
<SelectMember ref="membersForm" v-if="membersVisible" :selectData="selectData"></SelectMember>
</glsx-dialog>
</div>
<glsx-dialog class="numberDialog" :title="'选择成员'" btnSize="small" :width="'850px'" :isVisible="membersVisible" @confirmDialog="handleConfirm" @closeDialog="membersVisible = !membersVisible">
<SelectMember ref="membersForm" v-if="membersVisible" :selectData="selectData"></SelectMember>
</glsx-dialog>
<div class="my-footer btn-box box">
<el-button size="small" type="primary" @click="handleSave">提交</el-button>
<el-button type="default" size="small" @click="handleCancel">取消</el-button>
<div class="operate-btn flex_cc">
<el-button style="background-color:transparent" @click="handleCancel">取消</el-button>
<el-button type="primary" @click="handleSave">提交</el-button>
</div>
</div>
</template>
......@@ -51,20 +49,28 @@ import emoji from '@/util/emo'
import WelcomeWords from './components/welcomeWords.vue'
import SelectMember from './components/selectMember.vue'
import glsxDialog from '@/components/glsx-dialog/index.vue'
// import glsxCombiForm from '@/components/glsx-combi-form'
import glsxCombiForm from '@/components/glsx-combi-form'
export default {
name: 'expert_detail',
components: {
WelcomeWords,
SelectMember,
glsxDialog
glsxDialog,
glsxCombiForm
},
data() {
return {
size: 'small',
eventBus: new Vue(),
clientType: '升级客户',
expertId: '',
merchantId: '',
routeInfo: {},
expertTypeList: [],
basicRule: {
businessType: [{ required: true, message: '请选择客户类型', trigger: 'change' }],
staffId: [{ required: true, message: '请选择指定成员', trigger: 'change' }],
expertType: [{ required: true, message: '请选择专家类型', trigger: 'change' }]
},
btnList: [
{
id: 1,
......@@ -91,43 +97,90 @@ export default {
name: '活动',
type: 'acivity',
funName: 'activity'
}
},
// {
// id: 5,
// name: '模板',
// type: 'nickname',
// funName: 'message'
// },
// {
// id: 6,
// name: '插入质保链接',
// type: 'link',
// funName: 'link'
// }
{
id: 6,
name: '插入质保链接',
type: 'link',
funName: 'link',
isHide: true
}
],
membersVisible: false,
selectData: [],
basicForm: {},
selectPerson: null,
numberTypeList: []
basicForm: {
businessType: 1,
staffId: '',
expertType: 1,
staffUserId: ''
},
selectPerson: {},
numberTypeList: [],
basicFormData: [
{
label: '专家类型',
name: 'expertType',
type: 'select',
optionList: [],
optionId: 'dictValue',
optionLabel: 'dictLabel',
isClear: true
},
{
label: '客户类型',
name: 'businessType',
type: 'select',
optionList: [],
optionId: 'dictValue',
optionLabel: 'dictLabel',
isClear: true,
isDisabled: false
},
{
label: '指定成员',
name: 'staffId',
addHtml: 'staffSlot'
},
{
label: '欢迎语',
name: '',
addHtml: 'welcomeSlot'
}
]
}
},
watch: {
'basicForm.businessType': {
handler(nVal) {
if (nVal) {
this.btnList.find(item => item.id == 6).isHide = nVal != 1
}
},
immediate: true
},
selectPerson: {
handler(val) {
console.log(val)
this.basicForm.staffId = val.staffId || ''
this.basicForm.staffUserId = val.userId || ''
},
deep: true
}
},
created() {},
mounted() {
const urlParam = this.$route.params
let param = JSON.parse(urlParam.id)
this.clientType = param.clientType
if (this.clientType == '升级客户') {
let obj = {
id: 6,
name: '插入质保链接',
type: 'link',
funName: 'link'
}
this.btnList.push(obj)
}
if (param.expertId) {
this.expertId = param.expertId
this.getDetail(param.expertId)
this.routeInfo = JSON.parse(urlParam.id)
if (this.routeInfo.expertId) {
this.getDetail(this.routeInfo.expertId)
let target = this.basicFormData.find(item => item.name === 'businessType')
target.isDisabled = true
}
this.getTypeList()
},
......@@ -136,6 +189,15 @@ export default {
this.$apis.expert.getMenberType({ dictType: 'operation_type' }).then(res => {
if (res) {
this.numberTypeList = res
let target = this.basicFormData.find(item => item.name === 'businessType')
target.optionList = res
}
})
this.$apis.expert.getMenberType({ dictType: 'expert_type' }).then(res => {
if (res) {
this.expertTypeList = res
let target = this.basicFormData.find(item => item.name === 'expertType')
target.optionList = res
}
})
},
......@@ -144,17 +206,25 @@ export default {
if (res?.id) {
this.selectPerson = res
this.$refs.welcome.setDetail(res.welcomeInfo)
this.clientType = res.businessTypeName
this.basicForm.businessType = res.businessType
this.basicForm.expertType = res.expertType
this.merchantId = res.merchantId
}
})
},
delPerson() {
this.selectPerson = null
this.selectPerson = {}
this.merchantId = ''
},
// 成员弹窗
handleConfirm() {
if (this.$refs.membersForm.selectPerson) {
this.selectPerson = this.$refs.membersForm.selectPerson
let selectPerson = this.$refs.membersForm.activeName == 1 ? this.$refs.membersForm.selectPerson : this.$refs.membersForm.otherPersonal
if (selectPerson) {
this.selectPerson = { ...selectPerson }
if (this.$refs.membersForm.activeName == 2) {
this.selectPerson.staffId = selectPerson.id
}
this.merchantId = this.$refs.membersForm.activeName == 2 ? selectPerson.merchantId : ''
this.openMembers()
} else {
this.$message({
......@@ -176,45 +246,61 @@ export default {
})
},
handleSave() {
if (!this.selectPerson?.staffId) {
return this.$message.error('请选择轻改专家')
}
let preList = [...this.$refs.welcome.previewList]
preList.forEach(item => {
if (item.attType == 1 && !item.attContent.trim()) {
item.attContent = '\n'
} else if (item.attType == 1) {
item.attContent = item.attContent.replaceAll('@昵称', '[@昵称]')
}
if (item.attType == 7) {
item.attContent = JSON.stringify(item.attContent)
}
})
const typeItem = preList.find(item => {
return item.attType == 1
})
if (!typeItem) {
preList.unshift({ attType: '1', attContent: '\n' })
}
const targetItem = this.numberTypeList.find(item => {
return item.dictLabel == this.clientType
})
let params = {
businessType: targetItem.dictValue,
staffId: this.selectPerson.staffId,
// welcomeInfo: this.$refs.welcome.previewList
welcomeInfo: preList
}
let API = this.expertId ? this.$apis.expert.editExpert : this.$apis.expert.saveExpert
if (this.expertId) params.id = this.expertId
API(params).then(res => {
if (res) {
this.$message({
type: 'success',
message: '提交成功'
this.$refs.form.$refs.formRef.validate(valid => {
if (valid) {
let preList = [...this.$refs.welcome.previewList]
preList.forEach(item => {
if (item.attType == 1 && !item.attContent.trim()) {
item.attContent = '\n' //欢迎语textArea为空时传换行符
} else if (item.attType == 1) {
item.attContent = item.attContent.replaceAll('@昵称', '[@昵称]')
}
if (item.attType == 7) {
item.attContent = JSON.stringify(item.attContent)
}
})
this.$router.push({
path: '/expert/index'
const typeItem = preList.find(item => {
return item.attType == 1
})
if (!typeItem) {
preList.unshift({ attType: '1', attContent: '\n' }) //欢迎语textArea为空时传换行符
}
// const targetItem = this.numberTypeList.find(item => {
// return item.dictLabel == this.clientType
// })
// let params = {
// businessType: targetItem.dictValue,
// staffId: this.selectPerson.staffId,
// // welcomeInfo: this.$refs.welcome.previewList
// welcomeInfo: preList
// }
let params = { ...this.basicForm }
params.welcomeInfo = preList
if (this.merchantId) params.merchant = this.merchantId
console.log(params, 'params')
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
let API = this.routeInfo.expertId ? this.$apis.expert.editExpert : this.$apis.expert.saveExpert
if (this.routeInfo.expertId) {
params.id = this.routeInfo.expertId
params.businessUuid = this.routeInfo.businessUuid
params.configId = this.routeInfo.configId
}
API(params).then(res => {
loading.close()
if (res) {
this.$message({
type: 'success',
message: '提交成功'
})
this.$router.push({
path: '/expert/index'
})
}
})
}
})
......@@ -228,10 +314,15 @@ export default {
}
</script>
<style lang="scss" scoped>
/deep/ .gl-dialog-wrap .el-dialog__body {
padding-top: 0;
}
.operate-btn {
margin-top: 16px;
}
.expert-detail {
background-color: #fff;
min-height: calc(100vh - 144px);
margin-bottom: 64px;
/deep/ .checkNumber {
padding: 8px 12px;
& > span {
......@@ -315,11 +406,7 @@ export default {
}
.form {
/deep/.el-form-item {
&:nth-child(-n + 2) {
height: 36px;
}
// height: 36px;
line-height: 36px;
display: block;
margin-bottom: 20px;
& > .el-form-item__label {
padding: 0;
......
......@@ -2,20 +2,16 @@
<div class="expert-container">
<div v-if="userType != 2">
<div class="btn-area">
<GLButton id="clientBtn" :size="size" fn="新增配置" type="primary" @click.stop="addConfig('top')">
<GLButton :size="size" icon="el-icon-plus" fn="新增配置" type="primary" @click.stop="addConfig()">
新增配置
<i class="el-icon-arrow-down"></i>
</GLButton>
<ul v-if="showClientType" class="client">
<li v-for="item in numberTypeList" :key="item.dictValue" @click.stop="selectClientType(item.dictLabel)">{{ item.dictLabel }}</li>
</ul>
</div>
<span class="btnTip">配置门店轻改专家,形成业务活码,客户可通过「精品升级」订单扫码来添加该员工。</span>
</div>
<div class="expert-wrap">
<glsx-combi-form ref="expertRef" labelWidth="112px" defaultWidth="215px" :formObj="batchListSearch" :formData="expertForm">
<GLCombiForm ref="expertRef" :rowNumber="1" @handleOk="handleSearch" @handleRest="handleReset" :formObj="batchListSearch" :formData="expertForm">
<div slot="department">
<el-cascader clearable popper-class="expert-cascader" ref="cascaderRef" @change="getCurDepartment" placeholder="请选择门店" :show-all-levels="false" v-model="batchListSearch.departmentId" :props="mypropParam1" :options="departmentList" size="small" style="width: 215px" separator=" " filterable>
<el-cascader clearable popper-class="expert-cascader" ref="cascaderRef" @change="getCurDepartment" placeholder="请选择门店" :show-all-levels="false" v-model="batchListSearch.departmentId" :props="mypropParam1" :options="departmentList" size="small" separator=" " filterable>
<template slot-scope="{ data }">
<el-tooltip popper-class="myToolTipClass" style="border: none" :disabled="data.departmentName.length > 12 ? false : true" class="item" effect="light" :content="data.departmentName" placement="top-end">
<div class="limitText" style="width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis">{{ data.departmentName }}</div>
......@@ -23,34 +19,40 @@
</template>
</el-cascader>
</div>
<span slot="footer" class="footer-btns" style="display: inline-flex;padding-top: 1px;margin-bottom:20px;">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" class="resetBtn" @click="handleReset">重置</el-button>
</span>
</glsx-combi-form>
</GLCombiForm>
<div>
<GLTable :noDataImg="url" :class="[{ hasDataTable: !hasData }]" ref="expertTable" :hasNum="false" :pageConf="batchPageConf" :searchForm="batchListSearch" :tableParams="batchTableParams" :getListApi="getListApi">
<div slot="staffName" slot-scope="scope">
<span>{{ scope.scope.staffName }}</span>
<span style="font-size:12px;color:#999999;">&nbsp;|&nbsp;{{ scope.scope.departmentName }}</span>
</div>
<div slot="qrCode" slot-scope="scope">
<span v-if="!scope.scope.qrCode">无</span>
<!-- <img v-else style="height:36px;width:36px;" :src="scope.scope.qrCode" alt="" /> -->
<el-popover v-else placement="bottom" width="240" trigger="click">
<img :src="scope.scope.qrCode" style="width: 200px; height: 200px" />
<img :src="scope.scope.qrCode" style="width: 36px; height: 36px" slot="reference" />
</el-popover>
</div>
<span slot="status" slot-scope="scope">
<!-- <el-switch :value="scope.scope.status == 0" active-color="#5850ff" inactive-color="#eee" @change="changStatus(scope.scope.status, scope.scope.id)"></el-switch>
{{ scope.scope.status == 0 ? '启用' : '停用' }} -->
<GLButton v-if="userType != 2" class="switch" mode="el-switch" fn="禁用" :value="scope.scope.status == 0" active-color="#5850ff" inactive-color="#eee" :active-text="scope.scope.status == 0 ? '启用' : '停用'" @change="changStatus(scope.scope.status, scope.scope.id)">{{ scope.scope.status == 0 ? '启用' : '停用' }}</GLButton>
</span>
<div class="table-btns" slot="table-btns" slot-scope="scope">
<GLButton v-if="userType != 2" fn="编辑" type="text" @click="selectClientType(scope.scope.businessTypeName, scope.scope.id)">编辑</GLButton>
<!-- <GLButton v-if="userType != 2" fn="编辑" type="text" @click="addConfig(scope.scope.businessTypeName, scope.scope.id)">编辑</GLButton>
<GLButton v-if="userType != 2" fn="删除" type="text" @click="handleDel(scope.scope)">删除</GLButton>
<GLButton v-if="userType != 2" fn="下载活码" type="text" @click="handleDel(scope.scope)">下载活码</GLButton> -->
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
<div v-if="!hasData" class="default-box">
<img class="default-img" :src="imagBaseURL + 'serviceser.png'" alt="" />
<span class="tip">用于「精品升级」客户线上化,配置轻改专家成员,可通过精品升级的质保卡活码拉新。</span>
<div v-if="userType != 2" class="btn-area my-search-btn">
<GLButton id="clientBtn" plain :size="size" fn="新增配置" type="primary" @click.stop="addConfig('center')">
<GLButton plain :size="size" icon="el-icon-plus" fn="新增配置" type="primary" @click.stop="addConfig()">
新增配置
<i class="el-icon-arrow-down"></i>
</GLButton>
<ul v-if="showCenterClientType" class="client">
<li v-for="item in numberTypeList" :key="item.dictValue" @click.stop="selectClientType(item.dictLabel)">{{ item.dictLabel }}</li>
</ul>
</div>
</div>
</div>
......@@ -61,9 +63,9 @@
<script>
const imagBaseURL = 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/'
// import imagBaseURL from '@/assets/notExpert.png'
import glsxCombiForm from '@/components/glsx-combi-form'
import util from '@/util/util'
import url from '@/assets/empty.png'
import { downloadIamge } from '@/common/constant'
export default {
name: 'expert_index',
data() {
......@@ -83,7 +85,6 @@ export default {
hasData: true,
size: 'small',
getListApi: this.$apis.expert.getExpertList,
showClientType: false,
showCenterClientType: false,
batchPageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
batchListSearch: {
......@@ -91,6 +92,56 @@ export default {
staffName: '',
businessType: ''
},
buttonList: [
{
type: 'GLButton',
name: row => {
return '编辑'
},
condition: row => {
return this.userType != 2
},
attrs: {
type: 'text',
fn: '编辑'
},
listeners: {
click: row => this.addConfig(row.scope)
}
},
{
type: 'GLButton',
name: row => {
return '删除'
},
condition: row => {
return this.userType != 2
},
attrs: {
type: 'text',
fn: '删除'
},
listeners: {
click: row => this.handleDel(row.scope)
}
},
{
type: 'GLButton',
name: row => {
return '下载活码'
},
condition: row => {
return this.userType != 2 && row.scope.qrCode
},
attrs: {
type: 'text',
fn: '下载活码'
},
listeners: {
click: row => this.downloadQrcode(row.scope.qrCode)
}
}
],
expertForm: [
{
label: '门店',
......@@ -120,52 +171,45 @@ export default {
tableColumns: [
{
label: '编号',
prop: 'stateId',
formatter: cellValue => {
return cellValue.stateId || '-'
}
prop: 'stateId'
},
{
label: '所属门店/部门',
prop: 'departmentName',
width: '200',
formatter: cellValue => {
return cellValue.departmentName || '-'
}
label: '渠道活码',
prop: '',
addHtml: 'qrCode',
width: 200
},
{
label: '员工',
prop: 'staffName',
formatter: cellValue => {
return cellValue.staffName || '-'
}
prop: '',
addHtml: 'staffName',
width: 200
},
{
label: '专家类型',
prop: 'expertTypeName',
width: 200
},
{
label: '客户类型',
prop: 'businessTypeName',
width: 200,
formatter: cellValue => {
return cellValue.businessTypeName || '-'
}
width: 200
},
{
label: '欢迎语',
prop: 'isWelcomeWord',
width: 200,
formatter: cellValue => {
return cellValue.isWelcomeWord == -1 ? '无' : '有'
}
label: '所属企业微信',
prop: 'entmicroName',
width: 200
},
{
label: '状态',
prop: 'status',
addHtml: 'status',
width: '100'
width: 200
},
{
label: '操作',
prop: '',
width: '100px',
width: 200,
fixed: 'right',
addHtml: 'table-btns'
}
......@@ -173,23 +217,16 @@ export default {
}
}
},
components: {
glsxCombiForm
},
computed: {},
created() {
this.getDepartmentList()
this.isEmptyTable()
},
mounted() {
document.getElementById('app').addEventListener('click', this.setClientType)
this.getTypeList()
const { session } = this.$globalState || {}
this.userType = session.userType
},
beforeDestroy() {
document.getElementById('app').removeEventListener('click', this.setClientType)
},
methods: {
// 获取当前选择的商户
getCurDepartment(val) {
......@@ -209,14 +246,17 @@ export default {
}
})
},
handleDel({ id }) {
downloadQrcode(url) {
downloadIamge(url)
},
handleDel({ id, businessUuid, configId }) {
this.$confirm('是否确认删除?', '退单', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
customClass: 'customConfirm'
}).then(() => {
this.$apis.expert.delExpert({ id }).then(res => {
this.$apis.expert.delExpert({ id, businessUuid, configId }).then(res => {
if (res) {
this.handleSearch()
this.isEmptyTable()
......@@ -268,10 +308,6 @@ export default {
})
return arr
},
setClientType() {
if (this.showClientType) this.showClientType = false
if (this.showCenterClientType) this.showCenterClientType = false
},
changStatus(status, id) {
this.$apis.expert.editExpert({ id, status: status == 0 ? -1 : 0 }).then(res => {
if (res) {
......@@ -279,40 +315,19 @@ export default {
}
})
},
addConfig(area) {
if (area == 'top') {
this.showClientType = true
} else {
this.showCenterClientType = true
addConfig(row) {
let paraFormat = {}
if (row && row.id) {
paraFormat.expertId = row.id
paraFormat.businessUuid = row.businessUuid
paraFormat.configId = row.configId
}
const urlpara = JSON.stringify(paraFormat)
this.$router.push({ path: '/expert/detail/' + urlpara, query: { $title: row ? '编辑' : '新增配置' } })
},
goDetail() {
this.$router.push({ path: '/expert/detail/5' })
},
selectClientType(type, id) {
this.showCenterClientType = false
this.showClientType = false
let paraFormat = {
clientType: type
}
if (id) {
paraFormat.expertId = id
}
const urlpara = JSON.stringify(paraFormat)
this.$router.push({ path: '/expert/detail/' + urlpara, query: { $title: id ? '编辑' : '新增配置' } })
},
// beforeSearchFn() {
// return new Promise((resolve, reject) => {
// this.batchListSearch = { ...this.setParams() }
// resolve()
// })
// },
// setParams() {
// const params = {}
// params.searchText = 'dasda'
// return params
// },
handleSearch() {
this.$refs.expertTable.refreshTable()
},
......@@ -335,10 +350,6 @@ export default {
}
}
/deep/ .el-form-item {
margin-right: 12px !important;
}
.btn-area {
display: inline-block;
position: relative;
......
<!-- 编辑权益 -->
<template>
<div class="before-sale edit-equity edit-order">
<div style="padding: 17px 0 55px;">
<div>
<!-- <div class="help-service">
<img class="service-img" src="./image/code.png" />
<p>提单及服务咨询</p>
<p class="service-hotline">服务热线</p>
<p class="service-phone">18938907441</p>
</div> -->
<div class="container">
<div class="container" id="cardInfo">
<p class="edit-title">车辆信息</p>
<glsx-combi-form class="edit-form-container" ref="editFormRefCar" labelWidth="144px" defaultWidth="320px" formRef="editChildRefCar" :formObj.sync="editForm.vehicle" :formData="editFormDataCar.slice(0, 7)" :formRules="editRuleCar"></glsx-combi-form>
<glsx-combi-form ref="editFormRefBrand" labelWidth="144px" defaultWidth="215px" formRef="editChildRefBrand" :formObj.sync="editForm.vehicle" :formData="editFormDataCar.slice(7)" :formRules="editRuleCar">
<glsx-combi-form class="edit-form-container" :isInline="false" ref="editFormRefCar" labelWidth="154px" defaultWidth="432px" formRef="editChildRefCar" :formObj.sync="editForm.vehicle" :formData="editFormDataCar.slice(0, 7)" :formRules="editRuleCar"></glsx-combi-form>
<glsx-combi-form ref="editFormRefBrand" class="vehicleForm" labelWidth="154px" defaultWidth="432px" formRef="editChildRefBrand" :formObj.sync="editForm.vehicle" :formData="editFormDataCar.slice(7)" :formRules="editRuleCar">
<template slot="vehicleBrandId" slot-scope="scope">
<el-select v-model="editForm.vehicle.vehicleBrandId" placeholder="请选择品牌" filterable @change="handleChangeBrand(editForm.vehicle.vehicleBrandId)" style="width:144px;" :disabled="scope.scope.isDisabled">
<el-select v-model="editForm.vehicle.vehicleBrandId" placeholder="请选择品牌" filterable @change="handleChangeBrand(editForm.vehicle.vehicleBrandId)" style="width:136px;" :disabled="scope.scope.isDisabled">
<el-option v-for="item in baseData.carBrandOptions" :key="item.id" :value="item.id" :label="item.name" />
</el-select>
</template>
<template slot="vehicleSubBrandId" slot-scope="scope">
<el-select v-model="editForm.vehicle.vehicleSubBrandId" placeholder="请选择子品牌" filterable @change="getCarSeriesList()" style="width:144px;" :disabled="scope.scope.isDisabled">
<el-select v-model="editForm.vehicle.vehicleSubBrandId" placeholder="请选择子品牌" filterable @change="getCarSeriesList()" style="width:136px;" :disabled="scope.scope.isDisabled">
<el-option v-for="item in baseData.carChildOptions" :key="item.id" :value="item.id" :label="item.name" />
</el-select>
</template>
<template slot="vehicleSeriesId" slot-scope="scope">
<el-select v-model="editForm.vehicle.vehicleSeriesId" filterable placeholder="请选择车系" @change="getCarTypeList(editForm.vehicle.vehicleSeriesId)" style="width:215px;" :disabled="scope.scope.isDisabled">
<el-select v-model="editForm.vehicle.vehicleSeriesId" filterable placeholder="请选择车系" @change="getCarTypeList(editForm.vehicle.vehicleSeriesId)" style="width:136px;" :disabled="scope.scope.isDisabled">
<el-option v-for="item in baseData.carSeriesOptions" :key="item.id" :value="item.id" :label="item.name" />
</el-select>
</template>
<template slot="vehicleShapeId" slot-scope="scope">
<el-select v-model="editForm.vehicle.vehicleShapeId" filterable placeholder="请选择车型" style="width:215px;" :disabled="scope.scope.isDisabled">
<el-select v-model="editForm.vehicle.vehicleShapeId" filterable placeholder="请选择车型" style="width:136px;" :disabled="scope.scope.isDisabled">
<el-option v-for="item in baseData.carTypeOptions" :key="item.id" :value="item.id" :label="item.name" />
</el-select>
</template>
</glsx-combi-form>
</div>
<div class="container">
<div class="container" id="customerInfo">
<p class="edit-title">客户信息</p>
<glsx-combi-form class="edit-form-container" ref="editFormRefUser" labelWidth="144px" defaultWidth="320px" formRef="editChildRefUser" :formObj="editForm" :formData="editFormDataUser" :formRules="editRuleUser"></glsx-combi-form>
<glsx-combi-form :isInline="false" class="edit-form-container" ref="editFormRefUser" labelWidth="154px" defaultWidth="432px" formRef="editChildRefUser" :formObj="editForm" :formData="editFormDataUser" :formRules="editRuleUser"></glsx-combi-form>
</div>
<div class="container select-product">
<div class="container select-product" id="productInfo">
<p class="edit-title">选择产品</p>
<!-- <glsx-combi-form class="edit-form-container" ref="editFormRefPro" labelWidth="144px" formRef="editChildRefPro" :formObj="editForm" :formData="editFormDataPro" :formRules="editRulePro"> -->
<glsx-combi-form class="edit-form-container" labelWidth="144px" defaultWidth="320px" :formObj="editForm" :formData="editFormDataPro">
......@@ -49,7 +49,7 @@
<div class="radio-add-block" @click.stop.prevent="e => handleCancelBubble(e)">
<p class="package-subtitle">{{ subItem.serviceItems }}</p>
<div class="sub-el-form" v-if="editForm.packageCode == subItem[scope.scope.optionId]">
<glsx-combi-form class="edit-form-container" ref="editFormRefPro" labelWidth="160px" defaultWidth="320px" formRef="editChildRefPro" :isBlock="isBlock" :formObj="editFormPro" :formData="subItem.editFormData" :formRules="editRulePro">
<glsx-combi-form class="edit-form-container" ref="editFormRefPro" labelWidth="154px" defaultWidth="432px" formRef="editChildRefPro" :isBlock="isBlock" :formObj="editFormPro" :formData="subItem.editFormData" :formRules="editRulePro">
<template slot="table" slot-scope="scope">
<table style="marginLeft: 160px" class="table-style">
<tbody>
......@@ -76,22 +76,25 @@
</template>
</glsx-combi-form>
</div>
<div class="container">
<div class="container" id="otherInfo">
<p class="edit-title">其他信息</p>
<glsx-combi-form class="edit-form-container" ref="editFormRefOther" labelWidth="144px" defaultWidth="320px" formRef="editChildRefOther" :formObj="editForm" :formData="editFormDataOther" :formRules="editRuleOther"></glsx-combi-form>
<glsx-combi-form :isInline="false" class="edit-form-container" ref="editFormRefOther" labelWidth="154px" defaultWidth="432px" formRef="editChildRefOther" :formObj="editForm" :formData="editFormDataOther" :formRules="editRuleOther"></glsx-combi-form>
</div>
</div>
<!-- <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> -->
<div class="footer operate-btn">
<el-button size="small" class="reset-btn" v-show="routeInfo.addOrEdit == '1'" @click="handleReset">重置</el-button>
<el-button size="small" v-show="!['3', '5'].includes(routeInfo.addOrEdit)" class="plain" @click="handleDraft(2)">草稿</el-button>
<el-button size="small" v-show="routeInfo.addOrEdit != '5'" type="primary" @click="handleConfirm(1)">{{ routeInfo.addOrEdit != '3' ? '提单' : '确定' }}</el-button>
<el-button v-if="routeInfo.addOrEdit != 5" size="small" @click="handleCancel">返回</el-button>
<el-button v-else size="small" type="primary" @click="handleCancel">返回</el-button>
<div class="operate-btn flex_cc">
<el-button v-show="routeInfo.addOrEdit == '1'" plain class="btn-three" @click="handleReset">重置</el-button>
<el-button v-show="!['3', '5'].includes(routeInfo.addOrEdit)" plain @click="handleDraft(2)">草稿</el-button>
<el-button v-show="routeInfo.addOrEdit != '5'" type="primary" @click="handleConfirm(1)">{{ routeInfo.addOrEdit != '3' ? '提单' : '确定' }}</el-button>
</div>
<qrCode :bottom="320" :codeUrl="qrcodUrl" phoneTitle="提单及服务咨询" phone="189 3890 7441"></qrCode>
<div class="my-nav-tabs">
<el-tabs tab-position="right" v-model="curDom" @tab-click="changeArea">
<el-tab-pane v-for="item in tabsList" :key="item.name" :label="item.label" :name="item.name"></el-tab-pane>
</el-tabs>
</div>
</div>
</template>
......@@ -105,18 +108,23 @@ export default {
name: 'editEquity',
data() {
return {
tabsList: [
{ label: '车辆信息', name: 'cardInfo' },
{ label: '客户信息', name: 'customerInfo' },
{ label: '选择产品', name: 'productInfo' },
{ label: '其他信息', name: 'otherInfo' }
],
qrcodUrl: 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/preSale_qrCode.png' + '?time=' + new Date(),
size: 'small',
submit: false,
isBlock: true,
curDom: 'cardInfo',
// title: '新增权益',
// titleObj: {
// 1: '新增权益',
// 2: '编辑权益',
// 3: '查看权益'
// },
// footerLeft: '0',
// footerWidth: '0',
editCarChildRef: 'editChildRef',
disabled: false,
successDisable: false,
......@@ -209,10 +217,10 @@ export default {
maxlength: 16
},
{
label: '发票价格',
label: '发票价格/元',
name: 'invoicePrice',
type: 'input',
append: '元',
placeholder: '请输入发票价格',
maxlength: 11,
inputBlur: () => {
this.packageToPrice()
......@@ -281,10 +289,11 @@ export default {
},
{
validator: (rule, value, callback) => {
let reg = (this.editForm.cardType == 1|| this.editForm.cardType == 2) ? (/[a-zA-Z0-9]{18}/).test(value) : (/\S\s{0,18}/).test(value)
let tip = (this.editForm.cardType == 1|| this.editForm.cardType == 2) ? '请输入18位数字或字母' :'请输入证件号码'
let reg = this.editForm.cardType == 1 || this.editForm.cardType == 2 ? /[a-zA-Z0-9]{18}/.test(value) : /\S\s{0,18}/.test(value)
let tip = this.editForm.cardType == 1 || this.editForm.cardType == 2 ? '请输入18位数字或字母' : '请输入证件号码'
return reg ? callback() : callback(new Error(tip))
}, trigger: 'change'
},
trigger: 'change'
}
],
customerPhone: [
......@@ -294,7 +303,7 @@ export default {
let phoneReg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/
return phoneReg.test(value) ? callback() : callback(new Error('请输入正确的联系号码'))
},
trigger: 'change'
trigger: 'change'
}
],
customerAddress: [{ required: true, message: '请输入联系地址', trigger: 'change' }]
......@@ -382,23 +391,23 @@ export default {
}
],
servicePeriod: [{ required: true, message: '请选择服务期限', trigger: 'change' }],
effectiveDate: [{ required: true, message: '请选择生效日期', trigger: 'change' }],
effectiveDate: [{ required: true, message: '请选择生效日期', trigger: 'change' }]
// actualSalesPersonId: [{ required: true, message: '请输入实际销售人', trigger: 'change' }]
},
editFormDataOther: [
{
label: '建议销售价',
label: '建议销售价/元',
name: 'suggestedSellingPrice',
type: 'input',
append: '元',
placeholder: '请输入建议销售价',
isDisabled: true,
maxlength: 11
},
{
label: '实际销售价',
label: '实际销售价/元',
name: 'actualSalesPrice',
type: 'input',
append: '元',
placeholder: '请输入实际销售价',
maxlength: 11
},
{
......@@ -586,8 +595,6 @@ export default {
},
mounted() {
// this.footerLeft = document.querySelector('.base-container-right').offsetLeft
// this.footerWidth = document.documentElement.clientWidth - this.footerLeft
// this.routeInfo = this.$route.params
const urlParam = this.$route.params
this.routeInfo = JSON.parse(decodeURIComponent(urlParam.id))
......@@ -598,8 +605,8 @@ export default {
if (!this.routeInfo.isSuper) {
this.successDisable = this.routeInfo.addOrEdit == '3'
}
if(!this.routeInfo.isSuper || this.routeInfo.addOrEdit==1){
this.$set(this.editRuleOther,'actualSalesPersonId',{ required: true, message: '请输入实际销售人', trigger: 'change' })
if (!this.routeInfo.isSuper || this.routeInfo.addOrEdit == 1) {
this.$set(this.editRuleOther, 'actualSalesPersonId', { required: true, message: '请输入实际销售人', trigger: 'change' })
}
this.getOptionsList('editFormDataCar', false)
this.getOptionsList('editFormDataUser', false)
......@@ -609,6 +616,7 @@ export default {
// this.title = this.titleObj[this.routeInfo.addOrEdit]
// 获取套餐列表
// this.getPackageList()
window.addEventListener('scroll', this.handleScroll, true)
},
methods: {
......@@ -628,6 +636,24 @@ export default {
}
})
},
changeArea({ name }) {
document.getElementById(name) && document.getElementById(name).scrollIntoView()
},
handleScroll(e) {
try {
if (e.target.scrollTop < document.getElementById('cardInfo').scrollHeight - 20) {
this.curDom = 'cardInfo'
} else if (e.target.scrollTop < document.getElementById('cardInfo').scrollHeight + document.getElementById('customerInfo').scrollHeight - 20) {
this.curDom = 'customerInfo'
} else if (e.target.scrollTop < document.getElementById('cardInfo').scrollHeight + document.getElementById('customerInfo').scrollHeight + document.getElementById('productInfo').scrollHeight / 2 - 20) {
this.curDom = 'productInfo'
} else {
this.curDom = 'otherInfo'
}
} catch (err) {
console.log(err)
}
},
setDisabled(partDisabledList = []) {
var list = ['Car', 'User', 'Pro', 'Other']
var flag = true
......@@ -1029,14 +1055,15 @@ export default {
} else {
params.contractNo = ''
}
this.updateEquity(params,commitType)
this.updateEquity(params, commitType)
},
updateEquity(params,commitType) {
let text = '',time = 0;
if(commitType==1){
text ='订单待审核中,请等待1-2分钟后刷新页面。若一直待审核,请主动联系erp项目组。'
updateEquity(params, commitType) {
let text = '',
time = 0
if (commitType == 1) {
text = '订单待审核中,请等待1-2分钟后刷新页面。若一直待审核,请主动联系erp项目组。'
time = 5000
}else{
} else {
text = '正在Loding...'
}
const loading = this.$loading({
......@@ -1044,7 +1071,7 @@ export default {
text: text,
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.5)',
customClass:'loadingClass'
customClass: 'loadingClass'
})
this.$apis.ghBeforeSale.updateEquityApi(params).then(res => {
this.submit = false
......@@ -1056,15 +1083,14 @@ export default {
type: 'error'
})
} else {
setTimeout(()=>{
setTimeout(() => {
loading.close()
this.$router.push({
path: '/ghPreSale/equityList',
// name: 'beforeSale',
params: res
})
},time)
}, time)
}
})
},
......@@ -1104,7 +1130,7 @@ export default {
}
this.$apis.ghBeforeSale.checkOrderApi({ vin: this.editForm.vehicle.vin, contractNo: this.routeInfo.contractNo || '' }).then(res => {
if (res.code == '0') {
this.updateEquity(params,commitType)
this.updateEquity(params, commitType)
} else {
this.submit = false
this.$confirm(res.message, '提示', {
......@@ -1114,7 +1140,7 @@ export default {
callback: action => {
if (action == 'confirm') {
this.submit = true
this.updateEquity(params,commitType)
this.updateEquity(params, commitType)
}
}
})
......@@ -1160,15 +1186,10 @@ export default {
}
// }
})
},
handleCancel() {
if (this.submit) {
return true
}
this.$router.push({
path: '/ghPreSale/equityList'
})
}
},
beforeDestroy() {
window.removeEventListener('scroll', this.handleScroll)
}
}
</script>
......@@ -1189,6 +1210,13 @@ export default {
box-shadow: 0px 3px 6px -4px rgba(0, 0, 0, 0.12);
}
.vehicleForm {
/deep/ .el-form-item {
margin-right: 12px !important;
margin-bottom: 32px;
}
}
.edit-order {
padding-top: 0 !important;
height: 100%;
......@@ -1214,7 +1242,7 @@ export default {
/* 客服 - end */
.edit-order .container {
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
// box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 0 !important;
margin-bottom: 10px;
}
......@@ -1227,25 +1255,50 @@ export default {
text-align: center;
}
.before-sale .footer {
width: 100%;
position: fixed;
bottom: 0;
height: 64px;
left: 0;
text-align: center;
line-height: 64px;
background: #ffffff;
z-index: 0;
// .before-sale .footer {
// // margin-top: 16px;
// // width: 100%;
// // position: fixed;
// // bottom: 0;
// // height: 78px;
// // left: 0;
// // text-align: center;
// // line-height: 78px;
// // background: #ffffff;
// // z-index: 0;
// }
.operate-btn {
margin-top: 16px;
// width: 88px;
// margin-left: 20px;
}
/* .operate-btn .el-button{
width: 88px;
margin-left: 20px;
} */
.before-sale .edit-form-container {
margin-top: 20px;
margin-top: 32px;
}
#customerInfo,
#otherInfo {
.edit-form-container {
padding-bottom: 12px;
}
}
#productInfo .sub-el-form {
width: fit-content;
margin-left: 73px;
padding: 20px 50px 20px 20px;
background: #f9f9f9;
.glsx-combi-form {
margin-top: 0 !important;
/deep/ .el-form-item:last-child {
margin-bottom: 0;
}
}
.edit-form-container {
// padding: 20px 0 1px 20px;
margin-top: 10px;
// background: #f9f9f9;
// margin-left: 25px;
}
}
.before-sale .flex {
......@@ -1297,7 +1350,7 @@ export default {
/* 选择套餐产品 */
.before-sale .package-code {
display: block;
margin-bottom: 20px;
margin-bottom: 16px;
}
/deep/ .select-product {
......@@ -1382,17 +1435,9 @@ export default {
cursor: pointer;
}
.plain {
border: 1px solid #5850ff;
color: #5850ff;
}
.reset-btn {
border: 1px solid #909090;
color: #333333;
}
.sub-el-form {
margin-left: 50px;
}
/* 表格 */
</style>
<!-- 权益订单列表 -->
<template>
<div class="before-sale" :class="{noPaddngTop:showPage==2}">
<template v-if="showPage==2">
<div class="before-sale" :class="{ noPaddngTop: showPage == 2 }">
<template v-if="showPage == 2">
<introduct></introduct>
</template>
<template v-if="showPage==1">
<template v-if="showPage == 1">
<div class="add-benefit">
<!-- <el-button fn="新增权益" :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新增权益</el-button> -->
<GLButton :size="size" fn="新增权益" icon="el-icon-plus" type="primary" @click="handleEdit(1)">新增权益</GLButton>
<div class="top-tips"><span class="el-icon-warning"></span>请注意:订单列表还有{{countNoData}}单未上传客户凭证等资料,若发生事故无法获得补偿,请尽快在列表操作-上传资料中完善。</div>
<GLButton :size="size" fn="新增权益" icon="el-icon-plus" type="primary" @click="handleEdit(1)">新增权益</GLButton>
<div class="top-tips">
<span class="el-icon-warning"></span>
请注意:订单列表还有{{ countNoData }}单未上传客户凭证等资料,若发生事故无法获得补偿,请尽快在列表操作-上传资料中完善。
</div>
</div>
<div class="container">
<div class="number">
<glsx-combi-form ref="showSearch" labelWidth="100px" defaultWidth="210px" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData">
<span slot="footer" class="footer-btns">
<el-button :size="size" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" @click="handleExport">导出</el-button>
</span>
</glsx-combi-form>
<GLCombiForm ref="showSearch" @handleOk="handleSearch" @handleRest="handleReset" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData" :rowNumber="2"></GLCombiForm>
</div>
<!-- 表格区域 开始 -->
<el-button :size="size" plain style="float:right;margin-bottom:10px;" @click="handleExport">导出</el-button>
<GLTable ref="equityRef" :pageSizes="sizeList" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="table-btns" slot-scope="scope">
<GLButton v-if="[2, 4, 5,7,8,9,10,11,12].includes(scope.scope.orderStatus)" fn="查看" type="text" @click="handleEdit(5, scope.scope)">查看</GLButton>
<!-- <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,8,10,11,12].includes(scope.scope.orderStatus)" type="text" @click="handlePdf(scope.scope)">打印</el-button>
<el-button v-if="[2,7,8,9,10,11,12].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> -->
<GLButton v-if="[0].includes(scope.scope.orderStatus)" fn="编辑" type="text" @click="handleEdit(2, scope.scope)">编辑</GLButton>
<GLButton v-if="[2,8,10,11].includes(scope.scope.orderStatus)&&(!scope.scope.hasPrint || userInfo.admin)" fn="修改" type="text" @click="handleEdit(3, scope.scope)">修改</GLButton>
<el-button v-if="[2,8,10,11].includes(scope.scope.orderStatus)" type="text" @click="handleBack(scope.scope)">退单</el-button>
<GLButton v-if="[1,3, 4, 5].includes(scope.scope.orderStatus)" fn="重新提单" type="text" @click="handleEdit(4, scope.scope)">重新提单</GLButton>
<el-button v-if="userInfo.admin" type="text" @click="showFailModal(scope.scope)">失败</el-button>
<GLButton v-if="[2, 4, 5, 7, 8, 9, 10, 11, 12].includes(scope.scope.orderStatus)" fn="查看" type="text" @click="handleEdit(5, scope.scope)">查看</GLButton>
<el-button v-if="[2, 8, 10, 11, 12].includes(scope.scope.orderStatus)" type="text" @click="handlePdf(scope.scope)">打印</el-button>
<el-button v-if="[2, 7, 8, 9, 10, 11, 12].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>
<GLButton v-if="[0].includes(scope.scope.orderStatus)" fn="编辑" type="text" @click="handleEdit(2, scope.scope)">编辑</GLButton>
<GLButton v-if="[2, 8, 10, 11].includes(scope.scope.orderStatus) && (!scope.scope.hasPrint || userInfo.admin)" fn="修改" type="text" @click="handleEdit(3, scope.scope)">修改</GLButton>
<el-button v-if="[2, 8, 10, 11].includes(scope.scope.orderStatus)" type="text" @click="handleBack(scope.scope)">退单</el-button>
<GLButton v-if="[1, 3, 4, 5].includes(scope.scope.orderStatus)" fn="重新提单" type="text" @click="handleEdit(4, scope.scope)">重新提单</GLButton>
<el-button v-if="userInfo.admin" type="text" @click="showFailModal(scope.scope)">失败</el-button>
<!-- <GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton> -->
</div>
<!-- s -->
</GLTable>
<!-- 表格区域 end -->
</div>
<pdf-dialog :isVisible="isPdfVisible" title="合同" :pdfUrl="pdfUrl" @closeDialog="handlePdfClose"></pdf-dialog>
<glsx-dialog class="upload-dialog" title="上传资料" :isVisible.sync="isFileVisible" width="750px" :noCancel="noCancel" btnOkLabel="关闭" @confirmDialog="handleUploadFileClose" @closeDialog="handleUploadFileClose">
<glsx-dialog class="upload-dialog" title="上传资料" :isVisible.sync="isFileVisible" mode="mid" :noCancel="noCancel" btnOkLabel="关闭" @confirmDialog="handleUploadFileClose" @closeDialog="handleUploadFileClose">
<div class="upload-wrap" style="height: 284px; overflow-y: scroll;">
<glsx-combi-form labelWidth="300px" :isBlock="isBlock" @handleImgDelete="handleDelImg(arguments)" ref="uploadFormRef" formRef="uploadChildRef" :formRules="uploadRule" :formObj.sync="uploadForm" :formData="uploadFormData">
<span class="upload-slot" slot="uploadSlot" slot-scope="item">
上传
<input class="upload-input" type="file" :id="item.scope.name + 'file'" :ref="item.scope.name+'file'" accept="image/png, image/jpeg, image/gif, image/jpg" @change="e => handleUploadChange(e, item)" />
<input class="upload-input" type="file" :id="item.scope.name + 'file'" :ref="item.scope.name + 'file'" accept="image/png, image/jpeg, image/gif, image/jpg" @change="e => handleUploadChange(e, item)" />
</span>
</glsx-combi-form>
</div>
......@@ -55,13 +54,13 @@
<div class="f-size">
<i v-show="editNotify.code == '0'" class="el-icon-success"></i>
<i v-show="editNotify.code != '0'" class="el-icon-error"></i>
<span>{{editNotify.code == '0' ? '操作成功' : editNotify.message}}</span>
<span>{{ editNotify.code == '0' ? '操作成功' : editNotify.message }}</span>
</div>
</el-dialog>
<el-dialog :visible.sync="isSecondVisible" width="400px" class="tips-dialog" top="30%" :title="secondObj.title">
<div class="f-size">
<i class="el-icon-warning"></i>
<span>{{secondObj.txt}}</span>
<span>{{ secondObj.txt }}</span>
</div>
<span slot="footer" class="dialog-footer">
<el-button :size="size" @click="handleSecondCancel">取 消</el-button>
......@@ -71,13 +70,8 @@
<el-dialog :visible.sync="isShowFail" width="400px" class="tips-dialog" title="失败原因">
<div class="dialog_modal">
<span class="dialog_title">失败原因</span>
<el-select v-model="failValue" clearable placeholder="请选择">
<el-option
v-for="item in failList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
<el-select v-model="failValue" clearable placeholder="请选择">
<el-option v-for="item in failList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
<span slot="footer" class="dialog-footer">
......@@ -95,25 +89,158 @@ import glsxCombiForm from '@/components/glsx-combi-form'
import glsxDialog from '@/components/glsx-dialog'
import pdfDialog from './pdfDialog'
import utils from '../../util/util'
import introduct from "./introduct.vue"
import introduct from './introduct.vue'
export default {
name: 'equityList',
data() {
return {
failValue:'',
failList:[{
value: 1,
label: 'ERP出单失败'
},{
value: 2,
label: 'ERP修改失败'
},{
value: 3,
label: 'ERP退单失败'
},],
isShowFail:false,
showPage:0,
openCostPrice:0,//是否展示门店成本
failValue: '',
failList: [
{
value: 1,
label: 'ERP出单失败'
},
{
value: 2,
label: 'ERP修改失败'
},
{
value: 3,
label: 'ERP退单失败'
}
],
buttonList: [
{
type: 'GLButton',
name: row => {
return '查看'
},
condition: row => {
return [2, 4, 5, 7, 8, 9, 10, 11, 12].includes(row.scope.orderStatus)
},
attrs: {
type: 'text',
fn: '查看'
},
listeners: {
click: row => this.handleEdit(5, row.scope)
}
},
{
type: 'el-button',
name: row => {
return '打印'
},
condition: row => {
return [2, 8, 10, 11, 12].includes(row.scope.orderStatus)
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.handlePdf(row.scope)
}
},
{
type: 'el-button',
name: row => {
return '上传资料'
},
condition: row => {
return [2, 7, 8, 9, 10, 11, 12].includes(row.scope.orderStatus)
},
attrs: {
type: 'text',
class: row => {
return row.scope.dataPerfection == 0 ? 'el-button el-button--text my-circule-tips' : 'el-button el-button--text'
}
},
listeners: {
click: row => this.handleUpload(row.scope)
}
},
{
type: 'GLButton',
name: row => {
return '编辑'
},
condition: row => {
return [0].includes(row.scope.orderStatus)
},
attrs: {
type: 'text',
fn: '编辑'
},
listeners: {
click: row => this.handleEdit(2, row.scope)
}
},
{
type: 'GLButton',
name: row => {
return '修改'
},
condition: row => {
return [2, 8, 10, 11].includes(row.scope.orderStatus) && (!row.scope.hasPrint || this.userInfo.admin)
},
attrs: {
type: 'text',
fn: '修改'
},
listeners: {
click: row => this.handleEdit(3, row.scope)
}
},
{
type: 'el-button',
name: row => {
return '退单'
},
condition: row => {
return [2, 8, 10, 11].includes(row.scope.orderStatus)
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.handleBack(row.scope)
}
},
{
type: 'GLButton',
name: row => {
return '重新提单'
},
condition: row => {
return [1, 3, 4, 5].includes(row.scope.orderStatus)
},
attrs: {
type: 'text',
fn: '重新提单'
},
listeners: {
click: row => this.handleEdit(4, row.scope)
}
},
{
type: 'el-button',
name: row => {
return '失败'
},
condition: row => {
return this.userInfo.admin
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.showFailModal(row.scope)
}
}
],
isShowFail: false,
showPage: 0,
openCostPrice: 0, //是否展示门店成本
size: 'small',
noCancel: true,
isBlock: true,
......@@ -139,6 +266,7 @@ export default {
orderStatus: '',
packageCode: '',
merchantId: '',
completionStatus: '',
dqtId: '',
pqId: '',
mdId: '',
......@@ -165,27 +293,31 @@ export default {
}
},
searchFormData: [
{
type: 'selectInput',
selectName: 'nameOrNoOrVin',
isClear: true,
inputWidth: '320px',
selectWidth: '110px',
selectOption: [{
label: '客户姓名',
name: 'customerName'
}, {
label: '合同号',
name: 'contractNo'
}, {
label: '车架号',
name: 'vin'
}],
handleSelectChange: (value) => {
this.searchSelectObj.nameOrNoOrVin.value = ''
}
},
{
{
type: 'selectInput',
selectName: 'nameOrNoOrVin',
isClear: true,
inputWidth: '320px',
selectWidth: '110px',
selectOption: [
{
label: '客户姓名',
name: 'customerName'
},
{
label: '合同号',
name: 'contractNo'
},
{
label: '车架号',
name: 'vin'
}
],
handleSelectChange: value => {
this.searchSelectObj.nameOrNoOrVin.value = ''
}
},
{
label: '服务状态',
name: 'orderStatus',
type: 'select',
......@@ -195,6 +327,15 @@ export default {
optionsName: 'orderStatusList'
},
{
label: '完成状态',
name: 'completionStatus',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'completList'
},
{
label: '产品名称',
name: 'packageCode',
type: 'select',
......@@ -248,7 +389,7 @@ export default {
this.searchFormData[idx].isHide = false
this.searchForm[this.levelToShow['2']] = ''
var tempIdx = ''
for(var i = 3; i <= 4; i++) {
for (var i = 3; i <= 4; i++) {
tempIdx = this.searchFormData.findIndex(item => item.name == this.levelToShow[i + ''])
this.searchFormData[tempIdx].isHide = true
this.searchForm[this.levelToShow[i + '']] = ''
......@@ -318,6 +459,16 @@ export default {
dqList: [],
pqList: [],
mdList: [],
completList: [
{
confId: 2,
confName: '提单成功'
},
{
confId: 4,
confName: '已退单'
}
],
orderStatusList: [
{
confId: 0,
......@@ -342,7 +493,7 @@ export default {
{
confId: 5,
confName: '已过期'
},
},
{
confId: 7,
confName: '退单审核中'
......@@ -389,7 +540,7 @@ export default {
}
]
},
isAdmin:false
isAdmin: false
}
},
components: {
......@@ -398,11 +549,10 @@ export default {
pdfDialog,
introduct
},
created(){
created() {
this.isOpenSettin()
},
mounted() {
// this.editNotify = this.$route.params
// if(this.isFirst && this.editNotify.hasOwnProperty('code')) {
// this.isFirst = false
......@@ -429,18 +579,21 @@ export default {
methods: {
// 根据是否开通配置来是否请求数据
controlHttp(){
if(this.showPage==2){
controlHttp() {
if (this.showPage == 2) {
return
}
this.editNotify = this.$route.params
if(this.isFirst && this.editNotify.hasOwnProperty('code')) {
if (this.isFirst && this.editNotify.hasOwnProperty('code')) {
this.isFirst = false
this.isTipVisible = true
clearTimeout(this.timer)
this.timer = setTimeout(() => {
this.isTipVisible = false
}, this.editNotify.code == '0' ? 1500 : 3000)
this.timer = setTimeout(
() => {
this.isTipVisible = false
},
this.editNotify.code == '0' ? 1500 : 3000
)
}
this.$apis.ghBeforeSale.getProListApi({}).then(res => {
this.baseData.goodsStatusList = res
......@@ -449,28 +602,28 @@ export default {
this.getCountNoData()
this.$apis.ghBeforeSale.getUserInfoApi({}).then(res => {
this.userInfo = res
if(res.merchantAccountLevel != 4) {
if (res.merchantAccountLevel != 4) {
var idx = this.searchFormData.findIndex(item => item.name == this.levelToShow[this.userInfo.admin ? res.merchantAccountLevel : res.merchantAccountLevel + 1])
this.searchFormData[idx].isHide = false
this.getMerchantList('', '', this.searchFormData[idx].name, this.searchFormData[idx].optionsName)
}
})
},
handleUploadChange(e, item){
handleUploadChange(e, item) {
this.$refs.uploadFormRef.handleUploadChange(e, item.scope)
},
handleDelImg(event){
handleDelImg(event) {
const params = {
contractNo: this.uploadForm.contractNo,
attachmentFile : event[1]
attachmentFile: event[1]
}
this.$apis.ghBeforeSale.delImgApi(params).then(res => {
this.$message({
message: res.code == '0' ? '删除成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if(event[0].name && this.$refs[event[0].name+'file']){
this.$refs[event[0].name+'file'].value = null;
if (event[0].name && this.$refs[event[0].name + 'file']) {
this.$refs[event[0].name + 'file'].value = null
}
})
},
......@@ -506,8 +659,8 @@ export default {
...tempParams
}
// 商户-merchantId
for(var i = 1; i <= 4; i++) {
if(this.searchForm[this.levelToShow[i]]) {
for (var i = 1; i <= 4; i++) {
if (this.searchForm[this.levelToShow[i]]) {
params.merchantId = this.searchForm[this.levelToShow[i]]
params.accountLevel = i
}
......@@ -584,7 +737,7 @@ export default {
this.$apis.ghBeforeSale[this.secondObj.apiName](this.secondObj.apiParams).then(res => {
// this.handleSecondCancel()
// this.isTipVisible = true
if(res.code != '0'){
if (res.code != '0') {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
......@@ -609,9 +762,9 @@ export default {
handleEdit(addOrEdit, row) {
if (addOrEdit == 3 && !this.userInfo.admin && new Date(new Date().setDate(new Date().getDate() - 7)) > new Date(row.successDate)) {
const h = this.$createElement
const tip = addOrEdit==3?'修改申请':'退单申请'
const tip = addOrEdit == 3 ? '修改申请' : '退单申请'
this.$message({
message: h('p', null, [h('p', { style: 'text-align: center; line-height: 20px; color: #F56C6C;' }, '为保障客户权益,请邮件主送:operation@didihu.com.cn,抄送:liuqm@didihu.com.cn,jiangfj@didihu.com.cn提交'+tip)]),
message: h('p', null, [h('p', { style: 'text-align: center; line-height: 20px; color: #F56C6C;' }, '为保障客户权益,请邮件主送:service@didihu.com.cn,提交修改申请 ,邮件标题:门店名称+合同号+修改内容,并备注门店接待姓名+电话')]),
type: 'error',
customClass: 'customMessage'
})
......@@ -625,7 +778,7 @@ export default {
const title = this.jumpTitle(addOrEdit)
const urlpara = encodeURIComponent(JSON.stringify(paraFormat))
// this.$router.push('/ghPreSale/editEquity/' + urlpara)
this.$router.push({path:'/ghPreSale/editEquity/' + urlpara,query:{$title:title}})
this.$router.push({ path: '/ghPreSale/editEquity/' + urlpara, query: { $title: title } })
},
handlePdfClose() {
......@@ -648,7 +801,8 @@ export default {
// return true
this.$confirm('财务未审核,合同无法打印', {
confirmButtonText: '确定',
showCancelButton:false
showCancelButton: false,
type: 'error'
})
return true
}
......@@ -659,18 +813,18 @@ export default {
background: 'rgba(0, 0, 0, 0.3)'
})
this.$apis.ghBeforeSale.getPriteApi({ contractNo: row.contractNo }).then(res => {
const {code,data,message} = res
if(code==0){
const { code, data, message } = res
if (code == 0) {
this.pdfUrl = data
this.handlePdfClose()
this.handleSearch()
}else{
} else {
this.$message({
message:message,
message: message,
type: 'error'
})
}
loading.close();
loading.close()
})
},
......@@ -686,8 +840,8 @@ export default {
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if(this.$refs[targetItem.name+'file']){
this.$refs[targetItem.name+'file'].value = null;
if (this.$refs[targetItem.name + 'file']) {
this.$refs[targetItem.name + 'file'].value = null
}
if (res.code == '0') {
this.uploadForm[targetItem.name].push(imgUrl)
......@@ -703,16 +857,16 @@ export default {
this.packageList.forEach(item => {
this.$set(this.uploadForm, item.attachmentCode, [])
this.uploadFormData.push({
label: item.attachmentName+':',
label: item.attachmentName + ':',
name: item.attachmentCode,
type: 'upload',
limitSize: 20,
maxPhotoNum: 4,
suffixSlot:'uploadSlot',
suffixSlot: 'uploadSlot',
handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result
const targetNameList = file.name.split('.')
const base64 = targetNameList[targetNameList.length-1] + '@' + imgFile.split(',')[1]
const base64 = targetNameList[targetNameList.length - 1] + '@' + imgFile.split(',')[1]
var imgUrl = ''
this.$apis.ghBeforeSale.uploadImgApi({ file: base64, fileType: 'image' }).then(res => {
this.uploadFile(res, targetItem)
......@@ -733,7 +887,7 @@ export default {
},
handleUploadFileClose() {
this.isFileVisible = !this.isFileVisible
if(!this.isFileVisible){
if (!this.isFileVisible) {
this.handleSearch()
}
},
......@@ -757,7 +911,7 @@ export default {
if (!this.userInfo.admin && new Date(new Date().setDate(new Date().getDate() - 7)) > new Date(row.successDate)) {
const h = this.$createElement
this.$message({
message: h('p', null, [h('p', { style: 'text-align: center; line-height: 20px; color: #F56C6C;' }, '为保障客户权益,请邮件主送:operation@didihu.com.cn,抄送:liuqm@didihu.com.cn,jiangfj@didihu.com.cn提交退单申请 ')]),
message: h('p', null, [h('p', { style: 'text-align: center; line-height: 20px; color: #F56C6C;' }, '为保障客户权益,请邮件主送:service@didihu.com.cn,提交退单申请 ,邮件标题:门店名称+合同号+退单原因,并备注门店接待姓名+电话')]),
type: 'error',
customClass: 'customMessage'
})
......@@ -770,7 +924,7 @@ export default {
handleExport() {
var params = this.getParams()
this.$apis.ghBeforeSale.getExportApi(params).then(res => {
// window.open(res)
// window.open(res)
let tempaa = utils.getExplorer()
if (tempaa == 'QQ') {
window.open(res)
......@@ -785,6 +939,7 @@ export default {
handleSearch() {
this.$refs.equityRef.refreshTable()
this.$refs.equityRef.componentKey = Date.now()
},
handleReset() {
......@@ -808,8 +963,8 @@ export default {
}
var tempIdx = ''
var addNum = this.userInfo.admin ? 1 : 2
if(this.userInfo.merchantAccountLevel != 4) {
for(var i = this.userInfo.merchantAccountLevel + addNum; i <= 4; i++) {
if (this.userInfo.merchantAccountLevel != 4) {
for (var i = this.userInfo.merchantAccountLevel + addNum; i <= 4; i++) {
tempIdx = this.searchFormData.findIndex(item => item.name == this.levelToShow[i + ''])
this.searchFormData[tempIdx].isHide = true
this.searchForm[this.levelToShow[i + '']] = ''
......@@ -823,30 +978,30 @@ export default {
switch (addOrEdit) {
case 1:
title = '新增权益'
break;
break
case 2:
title = '编辑'
break;
break
case 3:
title = '修改'
break;
break
case 4:
title = '重新提单'
break;
break
case 5:
title = '查看'
break;
break
default:
title = '新增权益'
break;
break
}
return title
},
// 判断是否开通
// 判断是否开通
isOpenSettin() {
localStorage.removeItem('preSetStatus')
const { merchantId } = this.$globalState.session
this.$apis.ghBeforeSale.judgeSetting({ merchantId,channel:2 }).then(res => {
this.$apis.ghBeforeSale.judgeSetting({ merchantId, channel: 2 }).then(res => {
// data != null 且data.openFlag == 1 为开通,其他的都是未开通
const { code, data } = res
if (code == 0 && data != null && data.openFlag == 1) {
......@@ -860,534 +1015,585 @@ export default {
})
},
// 表格列的数据
tableColData(status){
tableColData(status) {
const tableColumns = [
{
label: '车主姓名',
prop: 'customerName',
line: 1,
width: '200px',
formatter: cellValue => {
return cellValue.customerName || '-'
}
},
{
label: '合同号',
prop: 'contractNo',
width: '200px',
formatter: cellValue => {
return [2, 4, 5,7,8,9,10,11].includes(cellValue.orderStatus) ? (cellValue.contractNo || '-') : '-'
}
},
{
label: '提单成功时间',
prop: 'successDate',
width: '200px',
line: 1,
formatter: cellValue => {
return cellValue.successDate ? dayjs(cellValue.successDate).format('YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
label: '新车开票日期',
prop: 'billingDate',
width: '160px',
line: 1,
formatter: cellValue => {
return cellValue.billingDate ? dayjs(cellValue.billingDate).format('YYYY-MM-DD') : '-'
}
},
{
label: '店面名称',
prop: 'merchantName',
width: '200px',
formatter: cellValue => {
return cellValue.merchantName || '-'
}
},
{
label: '车品牌',
prop: 'vehicleBrandName',
width: '160px',
line: 1,
formatter: cellValue => {
return cellValue.vehicleBrandName || '-'
}
},
{
label: '车系',
prop: 'vehicleSeriesName',
line: 1,
width: '160px',
formatter: cellValue => {
return cellValue.vehicleSeriesName || '-'
}
},
{
label: '车架',
prop: 'vin',
line: 1,
width: '200px',
formatter: cellValue => {
return cellValue.vin || '-'
}
},
{
label: '电话',
prop: 'customerPhone',
width: '160px',
line: 1,
formatter: cellValue => {
return cellValue.customerPhone || '-'
}
},
{
label: '产品名称',
prop: 'packageName',
line: 1,
width: '200px',
formatter: cellValue => {
return cellValue.packageName || '-'
}
},
{
label: '实际销售价',
prop: 'actualSalesPrice',
width: '160px',
formatter: cellValue => {
return cellValue.actualSalesPrice ? (cellValue.actualSalesPrice / 100).toFixed(2) : '-'
}
},
{
label: '服务期限',
prop: 'servicePeriod',
line: 1,
width: '200px',
formatter: cellValue => {
return cellValue.servicePeriod ? '1年' : '-'
}
},
{
label: '生效时间',
prop: 'effectiveDate',
width: '200px',
line: 1,
formatter: cellValue => {
return cellValue.effectiveDate ? dayjs(cellValue.effectiveDate).format('YYYY-MM-DD') : '-'
}
},
{
label: '状态',
prop: 'orderStatus',
width: '120px',
formatter: cellValue => {
return this.baseData.orderStatusList.map(item => item.confId).includes(cellValue.orderStatus) ? this.baseData.orderStatusList.find(item => item.confId == cellValue.orderStatus).confName : '-'
}
},
{
label: '状态描述',
prop: 'erpErrorMsg',
width: '300px',
formatter: cellValue => {
return cellValue.erpErrorMsg ? cellValue.erpErrorMsg: '-'
}
},
{
label: '审核状态',
prop: 'auditStatus',
width: '100px',
line: 1,
formatter: cellValue => {
var auditStatusTxt = '-'
if([2, 4, 5,7,8,9,10,11].includes(cellValue.orderStatus)) {
auditStatusTxt = this.baseData.auditStatusList.map(item => item.confId).includes(cellValue.auditStatus) ? this.baseData.auditStatusList.find(item => item.confId == cellValue.auditStatus).confName : '-'
}
return auditStatusTxt
}
},
{
label: '审核日期',
prop: 'auditDate',
width: '200px',
formatter: cellValue => {
return cellValue.auditDate ? dayjs(cellValue.auditDate).format('YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
label: '审核人',
prop: 'auditBy',
width: '140px',
line: 1,
formatter: cellValue => {
return cellValue.auditBy || '-'
}
},
{
label: '首续保',
prop: 'insuranceType',
width: '110px',
formatter: cellValue => {
return cellValue.insuranceType=='i'?'无忧卡首保':'无忧卡续保'
}
},
{
label: '价格区间',
prop: 'pricePeriod',
width: '160px',
formatter: cellValue => {
return cellValue.pricePeriod ? cellValue.pricePeriod : '-'
}
},
{
label: '门店编码',
prop: 'sap',
line: 1,
formatter: cellValue => {
return cellValue.sap || '-'
}
},
{
label: '实际销售人员',
prop: 'actualSalesPerson',
width: '160',
line: 1,
formatter: cellValue => {
return cellValue.actualSalesPerson || '-'
}
},
{
label: '大区',
prop: 'provinceMerchantName',
width: '200',
formatter: cellValue => {
return cellValue.provinceMerchantName || '-'
}
},
{
label: '片区',
prop: 'cityMerchantName',
width: '200',
formatter: cellValue => {
return cellValue.cityMerchantName || '-'
}
},
{
label: '操作人',
prop: 'updatedBy',
width: '140px',
line: 1,
formatter: cellValue => {
return cellValue.updatedBy || '-'
{
label: '车主姓名',
prop: 'customerName',
line: 1,
width: '200px',
formatter: cellValue => {
return cellValue.customerName || '-'
}
},
{
label: '合同号',
prop: 'contractNo',
width: '250px',
formatter: cellValue => {
return [2, 4, 5, 7, 8, 9, 10, 11].includes(cellValue.orderStatus) ? cellValue.contractNo || '--' : '--'
}
},
{
label: '提单成功时间',
prop: 'successDate',
width: '200px',
line: 1,
formatter: cellValue => {
return cellValue.successDate ? dayjs(cellValue.successDate).format('YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
label: '新车开票日期',
prop: 'billingDate',
width: '160px',
line: 1,
formatter: cellValue => {
return cellValue.billingDate ? dayjs(cellValue.billingDate).format('YYYY-MM-DD') : '-'
}
},
{
label: '店面名称',
prop: 'merchantName',
width: '200px',
formatter: cellValue => {
return cellValue.merchantName || '-'
}
},
{
label: '车品牌',
prop: 'vehicleBrandName',
width: '160px',
line: 1,
formatter: cellValue => {
return cellValue.vehicleBrandName || '-'
}
},
{
label: '车系',
prop: 'vehicleSeriesName',
line: 1,
width: '160px',
formatter: cellValue => {
return cellValue.vehicleSeriesName || '-'
}
},
{
label: '车架',
prop: 'vin',
line: 1,
width: '200px',
formatter: cellValue => {
return cellValue.vin || '-'
}
},
{
label: '电话',
prop: 'customerPhone',
width: '160px',
line: 1,
formatter: cellValue => {
return cellValue.customerPhone || '-'
}
},
{
label: '产品名称',
prop: 'packageName',
line: 1,
width: '200px',
formatter: cellValue => {
return cellValue.packageName || '-'
}
},
{
label: '实际销售价/元',
prop: 'actualSalesPrice',
width: '160px',
align: 'right',
formatter: cellValue => {
return cellValue.actualSalesPrice ? (cellValue.actualSalesPrice / 100).toFixed(2) : '-'
}
},
{
label: '服务期限',
prop: 'servicePeriod',
line: 1,
width: '200px',
formatter: cellValue => {
return cellValue.servicePeriod ? '1年' : '-'
}
},
{
label: '生效时间',
prop: 'effectiveDate',
width: '200px',
line: 1,
formatter: cellValue => {
return cellValue.effectiveDate ? dayjs(cellValue.effectiveDate).format('YYYY-MM-DD') : '-'
}
},
{
label: '退单时间',
prop: 'rollbackTime',
width: 200,
formatter: cellValue => {
return cellValue.rollbackTime ? dayjs(cellValue.rollbackTime).format('YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
label: '退单金额/元',
prop: 'rollbackAmount',
width: '160px',
align: 'right',
formatter: cellValue => {
return cellValue.rollbackAmount ? (cellValue.rollbackAmount / 100).toFixed(2) : '-'
}
},
{
label: '状态',
prop: 'orderStatus',
width: '120px',
formatter: cellValue => {
return this.baseData.orderStatusList.map(item => item.confId).includes(cellValue.orderStatus) ? this.baseData.orderStatusList.find(item => item.confId == cellValue.orderStatus).confName : '-'
}
},
{
label: '完成状态',
prop: 'orderStatus',
width: '120px',
formatter: cellValue => {
return this.baseData.completList.map(item => item.confId).includes(cellValue.completionStatus) ? this.baseData.completList.find(item => item.confId == cellValue.completionStatus).confName : '-'
}
},
{
label: '状态描述',
prop: 'erpErrorMsg',
width: '300px',
formatter: cellValue => {
return cellValue.erpErrorMsg ? cellValue.erpErrorMsg : '-'
}
},
{
label: '审核状态',
prop: 'auditStatus',
width: '100px',
line: 1,
formatter: cellValue => {
var auditStatusTxt = '-'
if ([2, 4, 5, 7, 8, 9, 10, 11].includes(cellValue.orderStatus)) {
auditStatusTxt = this.baseData.auditStatusList.map(item => item.confId).includes(cellValue.auditStatus) ? this.baseData.auditStatusList.find(item => item.confId == cellValue.auditStatus).confName : '-'
}
},
{
label: '操作',
prop: '',
width: '200px',
fixed: 'right',
addHtml: 'table-btns'
return auditStatusTxt
}
},
{
label: '审核日期',
prop: 'auditDate',
width: '200px',
formatter: cellValue => {
return cellValue.auditDate ? dayjs(cellValue.auditDate).format('YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
label: '审核人',
prop: 'auditBy',
width: '140px',
line: 1,
formatter: cellValue => {
return cellValue.auditBy || '-'
}
},
{
label: '首续保',
prop: 'insuranceType',
width: '110px',
formatter: cellValue => {
return cellValue.insuranceType == 'i' ? '无忧卡首保' : '无忧卡续保'
}
},
{
label: '价格区间',
prop: 'pricePeriod',
width: '160px',
formatter: cellValue => {
return cellValue.pricePeriod ? cellValue.pricePeriod : '-'
}
},
{
label: '门店编码',
prop: 'sap',
width: 150,
formatter: cellValue => {
return cellValue.sap || '-'
}
},
{
label: '实际销售人员',
prop: 'actualSalesPerson',
width: '160',
line: 1,
formatter: cellValue => {
return cellValue.actualSalesPerson || '-'
}
},
{
label: '大区',
prop: 'provinceMerchantName',
width: '200',
formatter: cellValue => {
return cellValue.provinceMerchantName || '-'
}
},
{
label: '片区',
prop: 'cityMerchantName',
width: '200',
formatter: cellValue => {
return cellValue.cityMerchantName || '-'
}
},
{
label: '操作人',
prop: 'updatedBy',
width: '140px',
line: 1,
formatter: cellValue => {
return cellValue.updatedBy || '-'
}
},
{
label: '操作',
prop: '',
width: '200px',
fixed: 'right',
addHtml: 'table-btns'
}
]
const tableColumnsCost = [
{
label: '车主姓名',
prop: 'customerName',
line: 1,
width: '200px',
formatter: cellValue => {
return cellValue.customerName || '-'
}
},
{
label: '合同号',
prop: 'contractNo',
width: '200px',
formatter: cellValue => {
return [2, 4, 5,7,8,9,10,11].includes(cellValue.orderStatus) ? (cellValue.contractNo || '-') : '-'
}
},
{
label: '提单成功时间',
prop: 'successDate',
width: '200px',
line: 1,
formatter: cellValue => {
return cellValue.successDate ? dayjs(cellValue.successDate).format('YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
label: '新车开票日期',
prop: 'billingDate',
width: '160px',
line: 1,
formatter: cellValue => {
return cellValue.billingDate ? dayjs(cellValue.billingDate).format('YYYY-MM-DD') : '-'
}
},
{
label: '店面名称',
prop: 'merchantName',
width: '200px',
formatter: cellValue => {
return cellValue.merchantName || '-'
}
},
{
label: '车品牌',
prop: 'vehicleBrandName',
width: '160px',
line: 1,
formatter: cellValue => {
return cellValue.vehicleBrandName || '-'
}
},
{
label: '车系',
prop: 'vehicleSeriesName',
line: 1,
width: '160px',
formatter: cellValue => {
return cellValue.vehicleSeriesName || '-'
}
},
{
label: '车架',
prop: 'vin',
line: 1,
width: '200px',
formatter: cellValue => {
return cellValue.vin || '-'
}
},
{
label: '电话',
prop: 'customerPhone',
width: '160px',
line: 1,
formatter: cellValue => {
return cellValue.customerPhone || '-'
}
},
{
label: '产品名称',
prop: 'packageName',
line: 1,
width: '200px',
formatter: cellValue => {
return cellValue.packageName || '-'
}
},
{
label: '实际销售价',
prop: 'actualSalesPrice',
width: '160px',
formatter: cellValue => {
return cellValue.actualSalesPrice ? (cellValue.actualSalesPrice / 100).toFixed(2) : '-'
}
},
{
label: '门店成本',
prop: 'costPrice',
width: '160px',
formatter: cellValue => {
return cellValue.costPrice ? (cellValue.costPrice / 100).toFixed(2) : '-'
}
},
{
label: '服务期限',
prop: 'servicePeriod',
line: 1,
width: '200px',
formatter: cellValue => {
return cellValue.servicePeriod ? '1年' : '-'
}
},
{
label: '生效时间',
prop: 'effectiveDate',
width: '200px',
line: 1,
formatter: cellValue => {
return cellValue.effectiveDate ? dayjs(cellValue.effectiveDate).format('YYYY-MM-DD') : '-'
}
},
{
label: '状态',
prop: 'orderStatus',
width: '120px',
formatter: cellValue => {
return this.baseData.orderStatusList.map(item => item.confId).includes(cellValue.orderStatus) ? this.baseData.orderStatusList.find(item => item.confId == cellValue.orderStatus).confName : '-'
}
},
{
label: '状态描述',
prop: 'erpErrorMsg',
width: '200px',
formatter: cellValue => {
return cellValue.erpErrorMsg ? cellValue.erpErrorMsg: '-'
}
},
{
label: '审核状态',
prop: 'auditStatus',
width: '100px',
line: 1,
formatter: cellValue => {
var auditStatusTxt = '-'
if([2, 4, 5,7,8,9,10,11].includes(cellValue.orderStatus)) {
auditStatusTxt = this.baseData.auditStatusList.map(item => item.confId).includes(cellValue.auditStatus) ? this.baseData.auditStatusList.find(item => item.confId == cellValue.auditStatus).confName : '-'
}
return auditStatusTxt
}
},
{
label: '审核日期',
prop: 'auditDate',
width: '200px',
formatter: cellValue => {
return cellValue.auditDate ? dayjs(cellValue.auditDate).format('YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
label: '审核人',
prop: 'auditBy',
width: '140px',
line: 1,
formatter: cellValue => {
return cellValue.auditBy || '-'
}
},
{
label: '首续保',
prop: 'insuranceType',
width: '110px',
formatter: cellValue => {
return cellValue.insuranceType=='i'?'无忧卡首保':'无忧卡续保'
}
},
{
label: '价格区间',
prop: 'pricePeriod',
width: '160px',
formatter: cellValue => {
return cellValue.pricePeriod ? cellValue.pricePeriod : '-'
}
},
{
label: '门店编码',
prop: 'sap',
line: 1,
formatter: cellValue => {
return cellValue.sap || '-'
}
},
{
label: '实际销售人员',
prop: 'actualSalesPerson',
width: '160',
line: 1,
formatter: cellValue => {
return cellValue.actualSalesPerson || '-'
}
},
{
label: '大区',
prop: 'provinceMerchantName',
width: '200',
formatter: cellValue => {
return cellValue.provinceMerchantName || '-'
}
},
{
label: '片区',
prop: 'cityMerchantName',
width: '200',
formatter: cellValue => {
return cellValue.cityMerchantName || '-'
}
},
{
label: '操作人',
prop: 'updatedBy',
width: '140px',
line: 1,
formatter: cellValue => {
return cellValue.updatedBy || '-'
{
label: '车主姓名',
prop: 'customerName',
line: 1,
width: '200px',
formatter: cellValue => {
return cellValue.customerName || '-'
}
},
{
label: '合同号',
prop: 'contractNo',
width: '250px',
formatter: cellValue => {
return [2, 4, 5, 7, 8, 9, 10, 11].includes(cellValue.orderStatus) ? cellValue.contractNo || '-' : '-'
}
},
{
label: '提单成功时间',
prop: 'successDate',
width: '200px',
line: 1,
formatter: cellValue => {
return cellValue.successDate ? dayjs(cellValue.successDate).format('YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
label: '新车开票日期',
prop: 'billingDate',
width: '160px',
line: 1,
formatter: cellValue => {
return cellValue.billingDate ? dayjs(cellValue.billingDate).format('YYYY-MM-DD') : '-'
}
},
{
label: '店面名称',
prop: 'merchantName',
width: '200px',
formatter: cellValue => {
return cellValue.merchantName || '-'
}
},
{
label: '车品牌',
prop: 'vehicleBrandName',
width: '160px',
line: 1,
formatter: cellValue => {
return cellValue.vehicleBrandName || '-'
}
},
{
label: '车系',
prop: 'vehicleSeriesName',
line: 1,
width: '160px',
formatter: cellValue => {
return cellValue.vehicleSeriesName || '-'
}
},
{
label: '车架',
prop: 'vin',
line: 1,
width: '200px',
formatter: cellValue => {
return cellValue.vin || '-'
}
},
{
label: '电话',
prop: 'customerPhone',
width: '160px',
line: 1,
formatter: cellValue => {
return cellValue.customerPhone || '-'
}
},
{
label: '产品名称',
prop: 'packageName',
width: '200px',
formatter: cellValue => {
return cellValue.packageName || '-'
}
},
{
label: '实际销售价',
prop: 'actualSalesPrice',
width: '160px',
align: 'right',
formatter: cellValue => {
return cellValue.actualSalesPrice ? (cellValue.actualSalesPrice / 100).toFixed(2) : '-'
}
},
{
label: '退单时间',
prop: 'rollbackTime',
width: '160px',
formatter: cellValue => {
return cellValue.rollbackTime ? dayjs(cellValue.rollbackTime).format('YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
label: '退单金额',
prop: 'rollbackAmount',
width: '160px',
align: 'right',
formatter: cellValue => {
return cellValue.rollbackAmount ? (cellValue.rollbackAmount / 100).toFixed(2) : '-'
}
},
{
label: '门店成本',
prop: 'costPrice',
width: '160px',
align: 'right',
formatter: cellValue => {
return cellValue.costPrice ? (cellValue.costPrice / 100).toFixed(2) : '-'
}
},
{
label: '服务期限',
prop: 'servicePeriod',
line: 1,
width: '200px',
formatter: cellValue => {
return cellValue.servicePeriod ? '1年' : '-'
}
},
{
label: '生效时间',
prop: 'effectiveDate',
width: '200px',
line: 1,
formatter: cellValue => {
return cellValue.effectiveDate ? dayjs(cellValue.effectiveDate).format('YYYY-MM-DD') : '-'
}
},
{
label: '状态',
prop: 'orderStatus',
width: '120px',
formatter: cellValue => {
return this.baseData.orderStatusList.map(item => item.confId).includes(cellValue.orderStatus) ? this.baseData.orderStatusList.find(item => item.confId == cellValue.orderStatus).confName : '-'
}
},
{
label: '完成状态',
prop: 'orderStatus',
width: '120px',
formatter: cellValue => {
return this.baseData.completList.map(item => item.confId).includes(cellValue.completionStatus) ? this.baseData.completList.find(item => item.confId == cellValue.completionStatus).confName : '-'
}
},
{
label: '状态描述',
prop: 'erpErrorMsg',
width: '200px',
formatter: cellValue => {
return cellValue.erpErrorMsg ? cellValue.erpErrorMsg : '-'
}
},
{
label: '审核状态',
prop: 'auditStatus',
width: '100px',
line: 1,
formatter: cellValue => {
var auditStatusTxt = '-'
if ([2, 4, 5, 7, 8, 9, 10, 11].includes(cellValue.orderStatus)) {
auditStatusTxt = this.baseData.auditStatusList.map(item => item.confId).includes(cellValue.auditStatus) ? this.baseData.auditStatusList.find(item => item.confId == cellValue.auditStatus).confName : '-'
}
},
{
label: '操作',
prop: '',
width: '200px',
fixed: 'right',
addHtml: 'table-btns'
return auditStatusTxt
}
},
{
label: '审核日期',
prop: 'auditDate',
width: '200px',
formatter: cellValue => {
return cellValue.auditDate ? dayjs(cellValue.auditDate).format('YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
label: '审核人',
prop: 'auditBy',
width: '140px',
line: 1,
formatter: cellValue => {
return cellValue.auditBy || '-'
}
},
{
label: '首续保',
prop: 'insuranceType',
width: '110px',
formatter: cellValue => {
return cellValue.insuranceType == 'i' ? '无忧卡首保' : '无忧卡续保'
}
},
{
label: '价格区间',
prop: 'pricePeriod',
width: '160px',
formatter: cellValue => {
return cellValue.pricePeriod ? cellValue.pricePeriod : '-'
}
},
{
label: '门店编码',
prop: 'sap',
line: 1,
formatter: cellValue => {
return cellValue.sap || '-'
}
},
{
label: '实际销售人员',
prop: 'actualSalesPerson',
width: '160',
line: 1,
formatter: cellValue => {
return cellValue.actualSalesPerson || '-'
}
},
{
label: '大区',
prop: 'provinceMerchantName',
width: '200',
formatter: cellValue => {
return cellValue.provinceMerchantName || '-'
}
},
{
label: '片区',
prop: 'cityMerchantName',
width: '200',
formatter: cellValue => {
return cellValue.cityMerchantName || '-'
}
},
{
label: '操作人',
prop: 'updatedBy',
width: '140px',
line: 1,
formatter: cellValue => {
return cellValue.updatedBy || '-'
}
},
{
label: '操作',
prop: '',
width: '200px',
fixed: 'right',
addHtml: 'table-btns'
}
]
this.tableParams = {
listName: 'list',
tableOption: false,
tableColumns: status==1?tableColumnsCost:tableColumns
tableColumns: status == 1 ? tableColumnsCost : tableColumns
}
},
// 展示失败弹框选择
showFailModal(row){
showFailModal(row) {
this.currentContractNo = row.contractNo
this.isShowFail = true
},
handleFailConfirm(){
if(!this.failValue){
this.$message({
message:'请选择失败原因',
type: 'error'
})
handleFailConfirm() {
if (!this.failValue) {
this.$message({
message: '请选择失败原因',
type: 'error'
})
return
}
let para = {
contractNo:this.currentContractNo,
businessType:this.failValue
contractNo: this.currentContractNo,
businessType: this.failValue
}
this.$apis.ghBeforeSale.failHttpByAdmin(para).then(res => {
this.isShowFail = false
this.handleSearch()
this.isShowFail = false
this.handleSearch()
})
},
handleFailCancel(){
this.isShowFail = false
handleFailCancel() {
this.isShowFail = false
}
},
}
}
</script>
<style lang="scss" scoped>
.before-sale{
padding-top: 17px;
}
// .before-sale {
// padding-top: 17px;
// }
.before-sale .flex {
display: flex;
}
/deep/ .add-benefit .el-button span{
/deep/ .add-benefit .el-button span {
margin-left: 5px;
}
/deep/ .number{
.el-form-item:first-child{
.input-with-select{
width: 286px!important;
/deep/ .number {
.el-form-item:first-child {
.input-with-select {
width: 286px !important;
margin-left: 24px;
}
.el-select--small{
width: 120px!important;
.el-select--small {
width: 120px !important;
}
}
.footer-btns{
float: none!important;
.footer-btns {
float: none !important;
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
.el-button:first-child{
.el-button:first-child {
border: 1px solid #5850ff;
color: #5850ff;
}
......@@ -1397,13 +1603,13 @@ export default {
.before-sale .container {
padding: 0px 20px 20px 40px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
// box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
}
.before-sale .top-tips {
box-sizing: border-box;
margin: 10px 0;
margin: 16px 0;
width: 100%;
height: 40px;
display: flex;
......@@ -1412,15 +1618,15 @@ export default {
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
background-color: #E6E9FF;
border: 1px solid #5850FF;
background-color: #e6e9ff;
border: 1px solid #5850ff;
padding: 0 10px;
border-radius: 4px;
}
.before-sale .top-tips .el-icon-warning {
font-size: 16px;
color: #5850FF;
color: #5850ff;
margin-right: 8px;
}
......@@ -1484,29 +1690,30 @@ export default {
padding: 10px 15px 20px !important;
}
/deep/ .upload-dialog{
.upload-wrap{
/deep/ .upload-dialog {
.upload-wrap {
.glsx-combi-form .isBlock {
display: flex !important;
display: flex !important;
}
.el-form-item__label{
.el-form-item__label {
height: 32px;
white-space: nowrap;
}
.el-form-item__content{
.el-form-item__content {
padding-left: 60px;
.activity-img{
.activity-img {
display: none;
}
&:last-child{
&:last-child {
width: 330px;
.img-btns, img{
.img-btns,
img {
width: 64px;
height: 64px;
}
}
}
.upload-slot{
.upload-slot {
position: absolute;
top: 0;
height: 32px;
......@@ -1514,7 +1721,7 @@ export default {
color: #5f5efb;
white-space: nowrap;
cursor: pointer;
.upload-input{
.upload-input {
opacity: 0;
position: absolute;
width: 100%;
......@@ -1524,20 +1731,14 @@ export default {
}
}
}
.el-dialog__footer{
&>div{
display: flex;
justify-content: center;
}
}
}
// .dialog_modal{
// height: 150px;
// }
.dialog_title{
margin-right:15px;
.dialog_title {
margin-right: 15px;
}
.noPaddngTop{
.noPaddngTop {
padding-top: 0;
}
</style>
......@@ -13,23 +13,31 @@
</div>
</div>
<div class="mid_wrapper">
<div class="content_one flex_sc">
<div class="title left">
<span>您提供的</span>
<i class="el-icon-caret-right"></i>
</div>
<div class="title right">
<span>您将获得的</span>
<div class="icon_point"></div>
<div class="step_wrap_widget flex_sc">
<div class="left box">
<div class="title">您提供的</div>
<div class="line flex_sc">
<i class="el-icon-caret-right"></i>
</div>
<div class="box_item_wrap flex_cc">
<img :src="localList[0].icon" />
<div class="box_title">{{ localList[0].title }}</div>
</div>
</div>
</div>
<div class="content_two flex_scb">
<template v-for="(item, index) in localList">
<div :key="index" class="box_item_wrap flex_cc">
<img :src="item.icon" />
<div class="box_title">{{ item.title }}</div>
<div class="right box">
<div class="title">您将获得的</div>
<div class="line flex_sc">
<div class="icon_point"></div>
</div>
</template>
<div class="box_line flex_scb">
<template v-for="(item, index) in localList">
<div v-if="index" :key="index" class="box_item_wrap flex_cc">
<img :src="item.icon" />
<div class="box_title">{{ item.title }}</div>
</div>
</template>
</div>
</div>
</div>
<div class="label_title">无忧案例</div>
<div class="content_three">
......@@ -76,7 +84,7 @@ export default {
return {
videoShow: false,
code: 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/wangdy.png',
phone:'134 8079 2980',
phone: '134 8079 2980',
localList: [
{
icon: 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/before_icon_1.png',
......@@ -137,13 +145,13 @@ export default {
}
</script>
<style lang="scss" scoped>
.introduct_container {
margin-top: 17px;
}
// .introduct_container {
// margin-top: 17px;
// }
.top_play_wrap {
height: 360px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
// box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
box-sizing: border-box;
padding-right: 50px;
.text_wrap {
......@@ -196,64 +204,70 @@ export default {
}
.mid_wrapper {
background: #ffffff;
margin-top: 20px;
margin-top: 16px;
box-sizing: border-box;
padding: 20px;
.content_one {
box-sizing: border-box;
padding: 20px 0 14px 0;
border-bottom: 1px solid #e8e8e8;
.title {
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 18px;
position: relative;
}
.step_wrap_widget {
padding: 20px 0 0 0;
.left {
width: 376px;
> i {
color: #5850ff;
width: 6px;
height: 6px;
position: absolute;
bottom: -11px;
left: -7px;
}
width: 33.33%;
}
.right {
// width: calc(100% - 376px);
.icon_point {
width: 7px;
height: 7px;
background: #5850ff;
border-radius: 50%;
position: absolute;
bottom: -18px;
left: 0px;
}
width: 66.67%;
}
}
.content_two {
margin-top: 15px;
.box_item_wrap {
width: 32%;
height: 80px;
background: #f7f6fd;
box-sizing: border-box;
padding: 19px 20px;
> img {
width: 42px;
height: 42px;
.box {
.title {
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 18px;
}
.line {
width: 100%;
height: 1px;
background: #d4d2f3;
position: relative;
margin-top: 14px;
> i {
color: #5850ff;
width: 6px;
height: 6px;
position: absolute;
top: -8px;
left: -6px;
}
.icon_point {
width: 7px;
height: 7px;
background: #5850ff;
border-radius: 50%;
position: absolute;
top: -3px;
left: 2px;
}
}
.box_item_wrap {
width: calc(100% - 15px);
height: 80px;
background: #f7f6fd;
box-sizing: border-box;
margin-top: 15px;
padding: 19px 20px;
> img {
width: 42px;
height: 42px;
}
.box_title {
width: calc(100% - 82px);
font-size: 14px;
font-weight: 400;
color: #3a3a3a;
line-height: 20px;
margin-left: 10px;
}
}
.box_title {
width: calc(100% - 82px);
font-size: 14px;
font-weight: 400;
color: #3a3a3a;
line-height: 20px;
margin-left: 10px;
.box_line > .box_item_wrap {
width: calc(50% - 7.5px);
}
}
}
......@@ -321,16 +335,16 @@ export default {
}
}
}
::v-deep .video-dialog{
.el-dialog__header{
::v-deep .video-dialog {
.el-dialog__header {
border-bottom: none;
background-color: #000;
.el-dialog__headerbtn{
top:15px;
.el-dialog__headerbtn {
top: 15px;
font-size: 24px;
}
}
.el-dialog__body{
.el-dialog__body {
padding: 0;
display: flex;
}
......
......@@ -4,15 +4,15 @@
<template v-if="showPage == 1">
<div class="container edit-container mall-server-box">
<p class="edit-title">{{ title }}</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="144px" :isBlock="isBlock" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"></glsx-combi-form>
<glsx-combi-form ref="editFormRefBrand" labelWidth="144px" defaultWidth="215px" formRef="editChildRefBrand" :formObj.sync="editForm" :formData="editFormDataCar">
<glsx-combi-form class="edit-form-container" ref="editFormRef" labelWidth="154px" defaultWidth="432px" :isBlock="isBlock" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"></glsx-combi-form>
<glsx-combi-form ref="editFormRefBrand" labelWidth="154px" defaultWidth="432px" formRef="editChildRefBrand" :formObj.sync="editForm" :formData="editFormDataCar">
<template slot="vehicleBrandId">
<el-select v-model="editForm.vehicleBrandId" placeholder="请选择品牌" filterable @change="handleChangeBrand(editForm.vehicleBrandId)" style="width:320px;" clearable>
<el-select v-model="editForm.vehicleBrandId" placeholder="请选择品牌" filterable @change="handleChangeBrand(editForm.vehicleBrandId)" style="width:136px;" clearable>
<el-option v-for="item in baseData.carBrandOptions" :key="item.id" :value="item.id" :label="item.name" />
</el-select>
</template>
<template slot="vehicleSubBrandId">
<el-select v-model="editForm.vehicleSubBrandId" placeholder="请选择子品牌" filterable style="width:320px;" clearable>
<el-select v-model="editForm.vehicleSubBrandId" placeholder="请选择子品牌" filterable style="width:136px;" clearable>
<el-option v-for="item in baseData.carChildOptions" :key="item.id" :value="item.id" :label="item.name" />
</el-select>
</template>
......@@ -61,9 +61,8 @@
<img style="margin-top: 20px;" class="qrcodeImg" :src="qrcodeUrl" />
</div> -->
</div>
<div class="fixed_bottom" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<!-- <div class="footer"> -->
<el-button size="small" type="primary" @click="handleConfirm">确定</el-button>
<div class="fixed_bottom flex_cc">
<el-button type="primary" @click="handleConfirm">确定</el-button>
</div>
</template>
<template v-if="showPage == 2">
......@@ -75,8 +74,8 @@
</div>
</div>
</template>
<el-dialog width="60%" height="50%" :visible.sync="dialogTableVisible">
<div slot="title" class="customTitle">
<GLDialog mode="big" bigTitle="选择渠道活码" :visible.sync="dialogTableVisible">
<div slot="custombigtitle" class="customTitle">
<div class="title1">选择渠道活码</div>
<span class="h9_title">仅查询自动回复中活动类型为“无忧服务”的活码</span>
</div>
......@@ -103,12 +102,12 @@
<div v-if="!scope.scope.taggingList || (scope.scope.taggingList && scope.scope.taggingList.length == 0)">--</div>
</div>
</GLTable>
<span slot="footer" class="dialog-footer flex_cc">
<span slot="footer" class="dialog-footer">
<span v-if="!tableData.length" @click="jumpToCreated" class="created_btn">创建活码</span>
<el-button size="mini" @click="dialogTableVisible = false">取消</el-button>
<el-button size="mini" type="primary" @click="toConfimActived">确定</el-button>
<el-button plain size="small" class="btn-three" @click="dialogTableVisible = false">取消</el-button>
<el-button size="small" type="primary" @click="toConfimActived">确定</el-button>
</span>
</el-dialog>
</GLDialog>
</div>
</template>
......@@ -121,8 +120,6 @@ export default {
size: 'small',
isBlock: true,
title: '店面服务设置',
footerLeft: '0',
footerWidth: '0',
editChildRef: 'editChildRef',
qrcodeUrl: '',
editForm: {
......@@ -137,7 +134,6 @@ export default {
{
label: '服务热线',
name: 'hotline',
width: '320px',
type: 'input',
maxlength: 20
}
......@@ -211,7 +207,7 @@ export default {
created() {
let clientHeight = document.documentElement.clientHeight
this.nodataHeight = clientHeight * 0.8
this.nodataHeight = clientHeight * 0.86
const openStatus = localStorage.getItem('preSetStatus')
if (openStatus == 2) {
this.showPage = 2
......@@ -228,8 +224,6 @@ export default {
}
this.getHotline()
this.getActiveCode()
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
// this.getDefaultCarbrand()
},
......@@ -391,17 +385,12 @@ export default {
.before-sale .container {
padding: 0 !important;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
height: 76vh;
height: calc(100vh - 195px);
}
.before-sale {
padding-top: 17px;
}
.before-sale .edit-container {
margin-bottom: 84px;
/deep/ #vehicleBrandId {
margin-right: 12px !important;
}
.before-sale .edit-form-container {
......@@ -484,7 +473,7 @@ export default {
height: 100%;
}
.nodata_widget {
margin-top: 17px;
// margin-top: 17px;
.wrapper {
width: 100%;
background: #ffffff;
......@@ -509,16 +498,17 @@ export default {
}
}
.fixed_bottom {
position: fixed;
width: 100%;
bottom: 0px;
height: 78px;
display: flex;
align-items: center;
justify-content: center;
background: #ffffff;
z-index: 999;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
margin-top: 16px;
// position: fixed;
// width: 100%;
// bottom: 0px;
// height: 78px;
// display: flex;
// align-items: center;
// justify-content: center;
// background: #ffffff;
// z-index: 999;
// box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
}
.new_container {
box-sizing: border-box;
......@@ -643,6 +633,13 @@ export default {
}
.dialog-footer {
position: relative;
display: flex;
align-items: center;
justify-content: flex-end;
.btn-three {
border-color: #c8c8c8;
color: #666;
}
.created_btn {
position: absolute;
left: 0px;
......@@ -659,4 +656,7 @@ export default {
.edit-equity /deep/ .el-dialog__body {
height: 520px;
}
/deep/ .combi-form-label {
color: #333;
}
</style>
<template>
<div id="writeOff" class="writeOff">
<template v-if="!isSavePage">
<div class="header">客户信息</div>
<div class="main box">
<glsx-combi-form ref="writeOff" :formRules="checkRule" labelWidth="128px" defaultWidth="308px" :formObj="batchListSearch" :formData="writeOffForm"></glsx-combi-form>
<div class="signal-img">
<p>核销码示意图</p>
<img :src="url" alt="" />
<div class="box">
<div class="header">客户信息</div>
<div class="main">
<glsx-combi-form ref="writeOff" :formRules="checkRule" labelWidth="154px" defaultWidth="432px" :formObj="batchListSearch" :formData="writeOffForm"></glsx-combi-form>
<div class="signal-img">
<p>核销码示意图</p>
<img :src="url" alt="" />
</div>
</div>
</div>
</template>
......@@ -14,22 +16,20 @@
<div class="custom box">
<div class="header">报案信息(客户提交)</div>
<div class="custom-info">
<span class="code label">核销码:</span>
<span class="code">{{ customObj.writeOffCode }}</span>
<glsx-combi-form ref="customRef" :formRules="customRule" labelWidth="160px" defaultWidth="300px" :formObj="customObj" :formData="customForm"></glsx-combi-form>
<span class="code">核销码:{{ customObj.writeOffCode }}</span>
<glsx-combi-form ref="customRef" :isInline="false" :formRules="customRule" labelWidth="154px" defaultWidth="432px" :formObj="customObj" :formData="customForm"></glsx-combi-form>
</div>
</div>
<div class="handler box" style="margin-top: 10px">
<div class="handler box" style="margin-top:16px;">
<div class="header">报案信息(店面补充)</div>
<div class="handler-info">
<glsx-combi-form ref="handlerRef" :formRules="customRule" labelWidth="160px" defaultWidth="300px" :formObj="customObj" :formData="handlerForm"></glsx-combi-form>
<glsx-combi-form ref="handlerRef" :isInline="false" :formRules="customRule" labelWidth="154px" defaultWidth="432px" :formObj="customObj" :formData="handlerForm"></glsx-combi-form>
</div>
</div>
</template>
<div class="my-footer btn-box box">
<el-button v-if="!isSavePage" size="small" type="primary" @click="handleNextStep">下一步</el-button>
<el-button v-else size="small" type="primary" @click="handleSave">提交</el-button>
<el-button type="default" size="small" @click="handleCancel">取消</el-button>
<div class="page-btm-btn">
<el-button v-if="!isSavePage" type="primary" @click="handleNextStep">下一步</el-button>
<el-button v-else type="primary" @click="handleSave">提交</el-button>
</div>
<qrCode :bottom="320" :codeUrl="serviceImg" phoneTitle="提单及服务咨询" phone="189 3890 7441"></qrCode>
</div>
......@@ -344,19 +344,19 @@ export default {
</script>
<style lang="scss" scoped>
.writeOff {
margin-top: 17px;
// height: calc(100vh - 206px);
margin-bottom: 64px;
background-color: #fff;
.box {
background-color: #fff;
}
.header {
height: 60px;
line-height: 60px;
height: 58px;
line-height: 58px;
padding: 0 20px;
border-bottom: 1px solid #eeeeee;
font-family: PingFangSC-Medium;
font-size: 14px;
font-family: PingFangSC-Medium, PingFang SC;
font-size: 16px;
color: #333333;
font-weight: 700;
font-weight: 600;
box-sizing: border-box;
}
/deep/ .el-form-item__label {
padding: 0;
......@@ -365,25 +365,22 @@ export default {
margin-right: 0;
}
.custom-info {
padding: 30px 0;
padding: 20px;
box-sizing: border-box;
.code {
color: #666;
padding: 0 20px;
margin-bottom: 20px;
display: block;
height: 36px;
width: 100%;
background: #f9f9f9;
color: #333;
font-size: 14px;
display: inline-block;
width: 160px;
height: 32px;
line-height: 32px;
margin-bottom: 10px;
box-sizing: border-box;
}
.label {
text-align: right;
line-height: 36px;
}
}
.handler-info {
height: 437px;
padding: 30px 0;
padding: 30px 20px;
box-sizing: border-box;
/deep/ #serviceCodes {
display: block;
......@@ -396,6 +393,15 @@ export default {
margin-right: 20px;
margin-left: 0;
display: inline-block;
&.is-bordered.is-checked {
border-color: #5850ff;
}
.el-checkbox__label {
font-size: 14px;
}
.el-checkbox__input {
padding-top: 2px;
}
}
}
.main {
......@@ -416,10 +422,5 @@ export default {
}
}
}
// .btn-box {
// display: flex;
// justify-content: center;
// align-items: center;
// }
}
</style>
<template>
<div class="writeOff">
<div class="box">
<div class="header title" style="height: 53px; line-height: 53px">
<span style="height: 53px; cursor: pointer; display: flex; align-items: center" @click="back">
<i class="el-icon-arrow-left" style="font-size: 18px"></i>
返回
</span>
<div class="header title">
报案信息(客户提交)
</div>
<div class="custom-info">
<p class="title" style="margin-bottom: 20px">报案信息(客户提交)</p>
<div class="info">
<span class="item" v-for="(val, key) in customObj" :key="key">
<span class="label">{{ val ? val + ':' : '' }}</span>
{{ info[key] }}
</span>
<div class="main">
<div class="writeOff-wrap">
<span>核销码:</span>
<span>{{ info.writeOffCode }}</span>
</div>
<glsx-combi-form labelWidth="154px" defaultWidth="432px" formRef="customRef" :formObj="info" :formData="customData" :formRules="infoRule"></glsx-combi-form>
</div>
</div>
<div class="box" style="margin-top: 10px">
<div class="box" style="margin-top: 16px">
<div class="header title">报案信息(店面补充)</div>
<div class="handler-info">
<span class="item" v-for="(val, key) in handlerObj" :key="key">
<span class="label">{{ val ? val + ':' : '' }}</span>
{{ info[key] }}
</span>
<div class="item service">
<span class="label">申请核赔服务:</span>
<div class="sevice-box">
<div class="main">
<glsx-combi-form labelWidth="154px" defaultWidth="432px" formRef="handlerRef" :formObj="info" :formData="handlerData" :formRules="infoRule"></glsx-combi-form>
<glsx-combi-form labelWidth="154px" defaultWidth="432px" formRef="handlerRef" :formObj="info" :formData="serviceData" :formRules="infoRule">
<div class="sevice-box" slot="serviceList">
<div v-for="(item, index) in info.serviceItemsList" :key="index" class="service-item">
{{ item.serviceItemName }}
</div>
</div>
</div>
</glsx-combi-form>
</div>
</div>
</div>
</template>
<script type="text/ecmascript-6">
import glsxCombiForm from '@/components/glsx-combi-form'
import util from '@/util/util'
export default {
name: 'writeOffDetail',
data() {
return {
info: {},
customObj: {
writeOffCode: '核销码',
nullval: '',
reporterName: '报案人',
reporterPhone: '报案人联系号码',
reporterDate: '报案日期',
reimbursementDate: '出险日期'
info: {
writeOffCode: '',
reporterName: '',
reporterPhone: '',
reporterDate: '',
reimbursementDate: '',
handlerName: '',
handlerPhone: '',
serviceItemsList:[]
},
handlerObj: {
handlerName: '经办人',
handlerPhone: '经办人联系号码'
}
infoRule:{
reporterName: { required: true, message: '', trigger: 'change' },
reporterPhone: { required: true, message: '', trigger: 'change' },
reporterDate: { required: true, message: '', trigger: 'change' },
reimbursementDate: { required: true, message: '', trigger: 'change' },
handlerName: { required: true, message: '', trigger: 'change' },
handlerPhone: { required: true, message: '', trigger: 'change' },
serviceItemsList:{ required: true, message: '', trigger: 'change' }
},
writeOffData: [
{
label: '核销码:',
name: 'writeOffCode',
type: 'showTxt'
}
],
customData:[
{
label: '报案人:',
name: 'reporterName',
type: 'showTxt'
},
{
label: '报案人联系号码:',
name: 'reporterPhone',
type: 'showTxt'
},
{
label: '报案日期:',
name: 'reporterDate',
type: 'showTxt'
},
{
label: '出险日期:',
name: 'reimbursementDate',
type: 'showTxt'
}
],
handlerData:[
{
label: '经办人:',
name: 'handlerName',
type: 'showTxt'
},
{
label: '经办人联系号码:',
name: 'handlerPhone',
type: 'showTxt'
}
],
serviceData:[
{
label: '申请核赔服务:',
name: 'serviceItemsList',
addHtml:'serviceList'
}
]
}
},
components: {
glsxCombiForm
},
mounted() {
this.getDetail(this.$route.params)
},
......@@ -67,54 +116,31 @@ export default {
this.info = res.data
}
})
},
back() {
this.$router.push({
path: '/ghPreSale/writeOff/writeOffList'
})
}
}
}
</script>
<style lang="scss" scoped>
.writeOff {
margin-top: 17px;
.box {
background-color: #fff;
}
p {
margin: 0;
}
.item {
width: 350px;
padding: 15px 0;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #6c6f71;
line-height: 17px;
display: inline-block;
margin-right: 120px;
.label {
width: 140px;
text-align: right;
display: inline-block;
}
}
.service {
margin-right: 0 !important;
display: flex;
width: 100%;
.label {
.main {
padding: 20px;
.writeOff-wrap {
width: 100%;
font-size: 14px;
margin-bottom: 12px;
padding: 0 20px;
background: #f9f9f9;
height: 36px;
line-height: 36px;
white-space: nowrap;
}
.sevice-box {
width: 800px;
.service-item {
width: 240px;
height: 36px;
height: 32px;
background: #f7f7f7;
border: 1px solid #e9e9e9;
display: inline-flex;
......@@ -129,6 +155,14 @@ export default {
margin: 0 20px 20px 0;
}
}
/deep/.el-form {
.combi-form-label {
padding-right: 0 !important;
}
.el-form-item__content {
width: 300px;
}
}
}
.title {
font-family: PingFangSC-Medium;
......@@ -143,16 +177,5 @@ export default {
line-height: 60px;
padding: 0 20px;
}
.custom-info {
height: 220px;
padding: 20px;
box-sizing: border-box;
.info {
width: 950px;
}
}
.handler-info {
padding: 20px;
}
}
</style>
......@@ -3,18 +3,9 @@
<GLButton size="small" style="margin-bottom: 10px;" fn="新增核赔" class="el-icon-plus" type="primary" @click="addWriteOff(1)">新增核赔</GLButton>
<div class="contain equity-wrap">
<div class="search-wrap">
<glsx-combi-form ref="showSearch" labelWidth="100px" defaultWidth="230px" :formObj="batchListSearch" :formData="writeOffForm">
<!-- <span slot="footer" class="footer-btns">
<el-button size="small" type="primary" @click="handleSearch">查询</el-button>
<el-button size="small" @click="handleReset('reset')">重置</el-button>
</span> -->
</glsx-combi-form>
</div>
<div class="my-search-btn" style="float: right; margin-right: 0; margin-bottom: 20px">
<el-button plain type="primary" size="small" @click="handleReset('reset')">重置</el-button>
<el-button size="small" type="primary" @click="handleSearch">查询</el-button>
<el-button size="small" @click="handleExport" class="selectBtn">导出</el-button>
<GLCombiForm :rowNumber="1" ref="showSearch" @handleOk="handleSearch" @handleRest="handleReset('reset')" labelWidth="100px" defaultWidth="230px" :formObj="batchListSearch" :formData="writeOffForm"></GLCombiForm>
</div>
<el-button size="small" plain style="float:right;margin-bottom:10px;" @click="handleExport" class="selectBtn">导出</el-button>
<GLTable ref="writeOffTable" :pageSizes="sizeList" :searchForm="searchForm" :tableParams="batchTableParams" :getListApi="getListApi" :pageConf="batchPageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="table-btns" slot-scope="scope">
<GLButton fn="查看" type="text" @click="handleView(scope.scope)">查看</GLButton>
......@@ -25,7 +16,6 @@
</template>
<script type="text/ecmascript-6">
import glsxCombiForm from '@/components/glsx-combi-form'
import util from '@/util/util'
export default {
name: 'writeOffList',
......@@ -63,7 +53,6 @@ export default {
{
label: '核销码',
prop: 'writeOffCode',
width: 120,
formatter: cellValue => {
return cellValue.writeOffCode || '-'
}
......@@ -71,7 +60,6 @@ export default {
{
label: '客户名',
prop: 'reporterName',
width: 200,
formatter: cellValue => {
return cellValue.reporterName || '-'
}
......@@ -79,7 +67,6 @@ export default {
{
label: '合同号',
prop: 'contractNo',
width: 200,
formatter: cellValue => {
return cellValue.contractNo || '-'
}
......@@ -87,7 +74,6 @@ export default {
{
label: '价格区间',
prop: 'priceSection',
width: 200,
formatter: cellValue => {
return cellValue.priceSection || '-'
}
......@@ -95,7 +81,6 @@ export default {
{
label: '门店提交时间',
prop: 'commitTime',
width: 200,
formatter: cellValue => {
return cellValue.commitTime ? util.dateFormat(cellValue.commitTime, 'YYYY-MM-DD HH:mm:ss') : '-'
}
......@@ -110,7 +95,7 @@ export default {
{
label: '操作',
prop: '',
width: '100px',
width: '70px',
fixed: 'right',
addHtml: 'table-btns'
}
......@@ -119,9 +104,6 @@ export default {
batchPageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }
}
},
components: {
glsxCombiForm
},
mounted() {},
methods: {
handleView({ writeOffCode }) {
......@@ -177,12 +159,10 @@ export default {
</script>
<style lang="scss" scoped>
.writeOff {
margin-top: 17px;
.equity-wrap {
background-color: #fff;
padding: 20px;
.search-wrap {
margin-top: 20px;
// padding: 20px 20px 0;
}
}
......
......@@ -73,8 +73,7 @@
</div>
</div>
<qrCode phone="138 2651 0577" :codeUrl="code" :bottom="182" v-if="nodata == 0 && noList == 0"></qrCode>
<el-dialog :visible.sync="computeShow" width="50%" :before-close="handleClose">
<div slot="title" class="dialogTitle">分润计算说明</div>
<GLDialog title="分润计算说明" :visible.sync="computeShow" mode="mid" :hasFooter="false" :before-close="handleClose">
<div class="dialogContent">
<div class="wrap">
<div class="line_tip">
......@@ -126,7 +125,7 @@
</div>
</div>
</div>
</el-dialog>
</GLDialog>
</div>
</template>
......@@ -136,7 +135,6 @@ import { getRulesData, getRulesListData } from '../../api/modules/rules'
import ruleTable from './ruleTable.vue'
import utils from '../../util/util'
import qrCode from '../../components/qr-code/index.vue'
import util from '../../util/util'
export default {
name: '',
components: {
......@@ -182,7 +180,7 @@ export default {
this.getRuleNote(merchantId)
}
let clientHeight = document.documentElement.clientHeight
this.nodataHeight = clientHeight * 0.5
this.nodataHeight = clientHeight * 0.49
this.stepHeight = clientHeight - clientHeight * 0.5 - 133
},
methods: {
......@@ -325,9 +323,9 @@ export default {
width: 100%;
// min-height: 520px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
margin-top: 17px;
padding-bottom: 15px;
// box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
// margin-top: 17px;
// padding-bottom: 15px;
.tip_line {
box-sizing: border-box;
padding: 22px 20px 25px 20px;
......@@ -368,9 +366,9 @@ export default {
}
}
.list_wrapper {
margin-top: 26px;
// margin-top: 26px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
// box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
box-sizing: border-box;
padding: 20px 19px 17px 20px;
.find_wrap {
......@@ -564,16 +562,14 @@ export default {
padding: 20px 0;
}
.nodata_widget {
margin-top: 17px;
.wrapper {
width: 100%;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
// box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
// padding: 150px 0 145px 0;
overflow: hidden;
.nodata_tip_1 {
font-size: 18px;
......@@ -591,7 +587,7 @@ export default {
.step_wrap {
width: 100%;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
// box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
margin-top: 10px;
display: flex;
flex-direction: column;
......
<template>
<div class="order-container">
<div class="find_wrap">
<div class="left_widget">
<div class="cell_wrapper flex_sc">
<div class="cell_label h13_title">客户姓名</div>
<el-input size="mini" class="find_width" clearable placeholder="请输入" suffix-icon="el-icon-search" v-model="customName"></el-input>
</div>
<div class="cell_wrapper flex_sc">
<div class="cell_label h13_title">核销状态</div>
<el-select class="find_width" clearable size="mini" v-model="hxstatus" placeholder="请选择">
<el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
<div class="cell_wrapper flex_sc">
<div class="cell_label h13_title">领用时间</div>
<el-date-picker :picker-options="pickerOptions" class="find_width" clearable size="mini" v-model="dateBetween" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</div>
<div class="cell_wrapper customselect flex_sc">
<my-drop-menu :options="employeeNameList" @getValue="changeEmploy">
<div slot="right_con">
<el-select class="find_width" clearable size="mini" v-model="employeeName" placeholder="请选择">
<el-option v-for="item in employeeNameData" :key="item" :label="item" :value="item"></el-option>
</el-select>
</div>
</my-drop-menu>
</div>
<div class="cell_wrapper flex_sc">
<div class="cell_label h13_title">手机号</div>
<el-input class="find_width" clearable size="mini" placeholder="请输入" suffix-icon="el-icon-search" v-model="phoneNum"></el-input>
</div>
<div class="cell_wrapper flex_sc">
<div class="cell_label h13_title">核销时间</div>
<el-date-picker class="find_width" :picker-options="pickerOptions" clearable size="mini" v-model="hxdateBetween" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</div>
</div>
<div v-if="!showNewLine" class="right_widget">
<div class="cell_wrapper flex_sc flex_esc">
<el-button size="mini" @click="toshowDialog">查看礼券</el-button>
<!-- <el-button size="mini" @click="toExport">导出数据</el-button> -->
<GLButton size="mini" fn="导出礼券" @click="toExport">导出数据</GLButton>
</div>
<div style="height: 2px"></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="toHandlerFindParam">查询</el-button>
</div>
</div>
<div class="pannel">
<GLCombiForm ref="showSearch" :searchSelectObj="searchSelectObj" :formObj="searchForm" :formData="searchFormData" @handleOk="toHandlerFindParam" @handleRest="handleRestFn"></GLCombiForm>
</div>
<div v-if="showNewLine" class="find_wrap flex_wrap_new">
<el-button size="mini" @click="toshowDialog">查看礼券</el-button>
<el-button size="mini" @click="toExport">导出数据</el-button>
<el-button class="cell_btn" size="mini" @click="clearFind">重置</el-button>
<el-button class="cell_btn" size="mini" type="primary" @click="toHandlerFindParam">查询</el-button>
<div class="pannel tableTopButton">
<el-button size="small" type="primary" plain @click="toshowDialog">查看礼券</el-button>
<GLButton size="small" fn="导出礼券" @click="toExport">导出</GLButton>
</div>
<div class="table_wrap">
<GLTable ref="table" :hasNum="false" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="toGetCouponsList"></GLTable>
<GLTable ref="table" :tableData="tableData" :tableTotal="tableTotal" :tableParams="tableParams" @refreshTable="toGetCouponsList"></GLTable>
</div>
<el-dialog width="60%" :visible.sync="dialogTableVisible">
<div slot="title" class="customTitle">
<GLDialog :visible.sync="dialogTableVisible" bigTitle="111" mode="big" :hasFooter="false">
<div slot="custombigtitle" class="customTitle">
<div class="title1">共计{{ tabletotal1 }}条数据</div>
<span class="h9_title">门店新车精品礼券由</span>
<span class="title2">专属顾问</span>
<span class="h9_title">进行配置,如需新增详情请联系管理员。</span>
</div>
<GLTable ref="table1" :layout="layout1" :pageConf="pageConf1" :tableTotal="tabletotal1" :hasNum="false" :tableData="tableData1" :tableParams="tableParams1" @refreshTable="toOpenCoupons"></GLTable>
</el-dialog>
<GLTable ref="table1" :tableTotal="tabletotal1" :hasNum="false" :tableData="tableData1" :tableParams="tableParams1" @refreshTable="toOpenCoupons"></GLTable>
</GLDialog>
</div>
</template>
<script>
import myDropMenu from '../../components/down-menu/index.vue'
import { findCoupons, checkCoupons, exportCoupons, getEmployName } from '../../api/modules/rules'
import { converterApi } from '../../api/modules/converter'
import utils from '../../util/util'
export default {
name: '',
components: {
'my-drop-menu': myDropMenu
},
data() {
return {
layout: 'sizes, prev, pager, next, jumper, ->, total',
layout1: 'sizes, prev, pager, next, jumper, ->, total',
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
pageConf1: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
tableOption: false,
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: '领用时间',
prop: 'createdDate'
prop: 'createdDate',
width: '180'
},
{
label: '客户姓名',
prop: 'customerName'
prop: 'customerName',
width: '280'
},
{
label: '手机号',
prop: 'customerPhone'
prop: 'customerPhone',
width: '150'
},
{
label: '礼券名称',
prop: 'couponName'
prop: 'couponName',
width: '280px'
},
{
label: '发券人',
prop: 'employeeName'
prop: 'employeeName',
width: '120px'
},
{
label: '核销状态',
prop: 'status',
width: '100px'
prop: 'status'
},
{
label: '转化人',
prop: 'sellerName'
prop: 'sellerName',
width: '280'
},
{
label: '核销时间',
prop: 'usedTime'
prop: 'usedTime',
width: '180'
}
]
},
......@@ -141,11 +95,13 @@ export default {
},
{
label: '总数',
prop: 'amount'
prop: 'amount',
width: '120px'
},
{
label: '余量',
prop: 'remainAmount'
prop: 'remainAmount',
width: '120px'
},
{
label: '发放',
......@@ -154,7 +110,8 @@ export default {
},
{
label: '核销',
prop: 'usedAmount'
prop: 'usedAmount',
width: '100px'
},
{
label: '配置时间',
......@@ -166,62 +123,98 @@ export default {
tableData1: [],
tableTotal: 0,
tabletotal1: 0,
statusList: [
employeeNameData: [],
dialogTableVisible: false,
/**新加搜索栏参数 */
searchSelectObj: {
columType: {
attr: 1,
value: ''
}
},
searchForm: {
customName: '',
hxstatus: '',
dateBetween: '',
phoneNum: '',
hxdateBetween: '',
employeeName: ''
},
searchFormData: [
{
value: 'Y',
label: '已核销'
label: '客户姓名',
name: 'customName',
type: 'input',
isClear: true
},
{
value: 'N',
label: '待核销'
}
],
employeeNameList: [
label: '核销状态',
name: 'hxstatus',
type: 'select',
optionId: 'confId',
optionLabel: 'confName',
isClear: true,
noFilter: true,
optionList: [
{
confId: 'Y',
confName: '已核销'
},
{
confId: 'N',
confName: '待核销'
}
]
},
{
label: '发券人',
value: '1'
label: '领用时间',
name: 'dateBetween',
type: 'datePicker',
isClear: true
},
{
label: '转化人',
value: '2'
}
],
employeeNameData: [],
dialogTableVisible: false,
currentPage1: 1,
pageSize1: 10,
// 查询条件
customName: '',
hxstatus: '',
dateBetween: '',
columType: 0,
hxdateBetween: '',
phoneNum: '',
employeeName: '',
// 日期限制
pickerOptions: {},
screenWidth: document.body.clientWidth,
showNewLine: false
}
},
watch: {
screenWidth: {
immediate: true,
handler(newValue) {
if (newValue < 1400) {
this.showNewLine = true
} else {
this.showNewLine = false
type: 'doubleSelect',
selectName: 'columType',
isClear: true,
selectOption: [
{
label: '发券人',
name: 1
},
{
label: '转化人',
name: 2
}
],
name: 'employeeName',
optionId: 'confId',
optionLabel: 'confName',
optionList: [],
handleSelectChange: value => {
this.getEmployNameList(value)
}
},
{
label: '手机号',
name: 'phoneNum',
type: 'input',
isClear: true,
maxlength: '11'
},
{
label: '核销时间',
name: 'hxdateBetween',
type: 'datePicker',
isClear: true
}
}
]
}
},
created() {
// this.pickerOptions = this.setDateLimit()
},
created() {},
mounted() {
this.toGetCouponsList()
this.toOpenCoupons()
this.getEmployNameList(1)
let that = this
window.addEventListener('resize', () => {
let width = document.body.clientWidth
......@@ -229,71 +222,56 @@ export default {
})
},
methods: {
// 设置日期组件时间范围
setDateLimit() {
let openInfo = JSON.parse(localStorage.getItem('openInfo'))
let startdate = utils.dateFormat(openInfo.openDate)
let obj = {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date(startdate).getTime()
}
handleRestFn() {
this.searchForm = {
customName: '',
hxstatus: '',
dateBetween: '',
phoneNum: '',
hxdateBetween: '',
employeeName: ''
}
return obj
},
// 发券人切换
changeEmploy(e) {
this.columType = e
this.getEmployNameList(e)
},
clearFind() {
let params = {}
this.customName = ''
this.hxstatus = ''
this.dateBetween = ''
this.columType = ''
this.hxdateBetween = ''
this.phoneNum = ''
this.employeeName = ''
this.toGetCouponsList(params)
this.newCurrentHttpParma = {}
this.toGetCouponsList()
},
// 处理查询条件
toHandlerFindParam() {
let params = {}
if (this.customName) {
if (this.searchForm.customName) {
//客户姓名
params.customerName = this.customName
params.customerName = this.searchForm.customName
}
if (this.hxstatus) {
if (this.searchForm.hxstatus) {
//核销状态
params['usedFlagList[0]'] = this.hxstatus
params['usedFlagList[0]'] = this.searchForm.hxstatus
}
if (this.dateBetween) {
if (this.searchForm.dateBetween) {
//领用时间
let startDate = utils.dateFormat(this.dateBetween[0], 'YYYY-MM-DD 00:00:00')
let endDate = utils.dateFormat(this.dateBetween[1], 'YYYY-MM-DD 23:59:59')
let startDate = utils.dateFormat(this.searchForm.dateBetween[0], 'YYYY-MM-DD 00:00:00')
let endDate = utils.dateFormat(this.searchForm.dateBetween[1], 'YYYY-MM-DD 23:59:59')
params.startDate = startDate
params.endDate = endDate
}
//发券人
if (this.employeeName && this.columType) {
if (this.searchForm.employeeName != '' && this.columType) {
params.columType = this.columType
let name = this.columType == 1 ? 'employeeNameList[0]' : 'sellerNameList[0]'
params[name] = this.employeeName
params[name] = this.employeeNameData[this.searchForm.employeeName]
}
if (this.hxdateBetween) {
if (this.searchForm.hxdateBetween) {
// 核销时间
let startDate = utils.dateFormat(this.hxdateBetween[0], 'YYYY-MM-DD 00:00:00')
let endDate = utils.dateFormat(this.hxdateBetween[1], 'YYYY-MM-DD 23:59:59')
let startDate = utils.dateFormat(this.searchForm.hxdateBetween[0], 'YYYY-MM-DD 00:00:00')
let endDate = utils.dateFormat(this.searchForm.hxdateBetween[1], 'YYYY-MM-DD 23:59:59')
params.startUsedTime = startDate
params.endUsedTime = endDate
}
if (this.phoneNum) {
if (this.searchForm.phoneNum) {
// 手机号
params.customerPhone = this.phoneNum
params.customerPhone = this.searchForm.phoneNum
}
this.newCurrentHttpParma = params
this.$refs.table.page.pageNum = 1
this.newHttpParam = params
this.toGetCouponsList(true)
this.toGetCouponsList()
},
toshowDialog() {
this.dialogTableVisible = true
......@@ -304,17 +282,13 @@ export default {
routerMethod: method,
currentPage: this.$refs.table.page.pageNum,
pageSize: this.$refs.table.page.pageSize,
...this.newHttpParam
...this.newCurrentHttpParma
}
converterApi(para).then(res => {
this.httpParam = {
currentPage: this.$refs.table.page.pageNum,
pageSize: this.$refs.table.page.pageSize,
...this.newHttpParam
}
if (!res) {
return
}
res.list.length ? (this.$refs.table.tableHeightValues = '') : this.$refs.table.setTableHeightFun()
this.tableData = res.list.map(item => {
item.createdDate = utils.dateFormat(item.createdDate, 'YYYY-MM-DD HH:mm:ss')
item.usedTime = item.usedTime ? utils.dateFormat(item.usedTime, 'YYYY-MM-DD HH:mm:ss') : '--'
......@@ -324,6 +298,11 @@ export default {
return item
})
this.tableTotal = res.total
this.exportHttp = {
currentPage: this.$refs.table.page.pageNum,
pageSize: this.$refs.table.page.pageSize,
...this.newCurrentHttpParma
}
})
},
toOpenCoupons() {
......@@ -350,7 +329,7 @@ export default {
let method = exportCoupons()
let para = {
routerMethod: method,
...this.httpParam
...this.exportHttp
}
converterApi(para).then(res => {
let tempaa = utils.getExplorer()
......@@ -366,6 +345,7 @@ export default {
},
// 获取发券人和转化人列表
getEmployNameList(type) {
this.columType = type
let method = getEmployName()
let para = {
routerMethod: method,
......@@ -375,90 +355,27 @@ export default {
}
converterApi(para).then(res => {
this.employeeNameData = res
let arr = []
res.forEach((item, index) => {
arr.push({
confId: index,
confName: item
})
})
this.searchFormData[3].optionList = arr
})
}
}
}
</script>
<style lang="scss" scoped>
.find_wrap {
box-sizing: border-box;
padding: 9px 0px;
display: flex;
position: relative;
.left_widget {
flex: 3;
display: flex;
align-items: center;
flex-wrap: wrap;
box-sizing: border-box;
}
.right_widget {
flex: 0.2;
box-sizing: border-box;
padding-right: 15px;
}
.cell_wrapper {
box-sizing: border-box;
display: flex;
align-items: center;
margin-bottom: 18px;
.cell_label {
text-align: right;
padding-right: 15px;
white-space: nowrap;
width: 80px;
}
.cell_btn {
width: 78px;
}
.cell_btn_max {
width: 156px;
}
}
.flex_esc {
display: flex;
justify-content: flex-end;
}
.customselect /deep/ .el-select .el-input--mini .el-input__inner {
// border-left: none;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.find_width {
width: 215px;
}
.cell_position {
position: absolute;
bottom: 9px;
right: 15px;
}
.cell_position_next {
position: absolute;
bottom: -18px;
right: 15px;
}
.cell_position_export {
position: absolute;
bottom: 56px;
right: 15px;
}
}
.flex_wrap_new {
display: flex;
align-items: center;
justify-content: flex-end;
box-sizing: border-box;
padding-right: 15px;
.cell_btn {
width: 78px;
}
.pannel {
padding: 0 15px;
}
.table_wrap {
padding: 0 15px;
padding-bottom: 10px;
}
.customTitle {
display: flex;
align-items: center;
......@@ -474,11 +391,4 @@ export default {
color: #5850ff;
}
}
// .table_wrap /deep/ .el-table--enable-row-hover .el-table__body tr:hover{
// background: #f4f3ff !important;
// }
// .table_wrap /deep/ .el-table tbody tr:hover >td{
// background: #f4f3ff !important;
// }
</style>
......@@ -100,8 +100,8 @@ export default {
width: 100%;
// height: calc(100% - 17px);
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
margin-top: 17px;
// box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
// margin-top: 17px;
}
.top_tip_title {
width: 100%;
......
......@@ -257,7 +257,7 @@ export default {
width: 100%;
height: 360px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
// box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
box-sizing: border-box;
padding-right: 50px;
.text_wrap {
......@@ -313,8 +313,8 @@ export default {
.wrap_con_mid {
// height: 270px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
margin-top: 10px;
// box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
margin-top: 16px;
padding: 20px 20px 0 20px;
.first_con {
display: flex;
......@@ -404,10 +404,10 @@ export default {
}
}
.wrap_con_foot {
height: 300px;
margin-top: 10px;
// height: 300px;
margin-top: 16px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
// box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
.title {
box-sizing: border-box;
font-size: 18px;
......
......@@ -7,72 +7,17 @@
<p class="h14_title">其他因素导致未分账成功的,在线下对账中查看,统一下个月月初结算上个月订单。</p>
</div>
<div class="tip_btn flex_scb">
<el-button size="mini" :type="curDivisionType == 2 ? 'primary' : ''" @click="changDivisionType(2)">线上分账</el-button>
<el-button size="mini" :type="curDivisionType == 1 ? 'primary' : ''" @click="changDivisionType(1)">线下对账</el-button>
<el-button size="small" :type="curDivisionType == 2 ? 'primary' : ''" @click="changDivisionType(2)">线上分账</el-button>
<el-button size="small" :type="curDivisionType == 1 ? 'primary' : ''" @click="changDivisionType(1)">线下对账</el-button>
</div>
</div>
<div class="tip_wrap_line"></div>
<div class="find_wrap">
<div class="left_widget">
<div v-if="curDivisionType == 2" class="cell_wrapper flex_sc">
<div class="cell_label h13_title">分账时间</div>
<el-date-picker class="find_width" :picker-options="pickerOptions" size="mini" clearable v-model="divisionTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</div>
<div class="cell_wrapper flex_sc">
<div class="cell_label h13_title">支付时间</div>
<el-date-picker class="find_width" :picker-options="pickerOptions" size="mini" clearable v-model="payTime" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</div>
<div v-if="accountLevel == 4 && curDivisionType == 2" class="cell_wrapper flex_sc">
<div class="cell_label h13_title">分账状态</div>
<el-select class="find_width" clearable size="mini" v-model="divisionTypeStatus" placeholder="请选择">
<el-option v-for="item in disivionOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
<div v-if="accountLevel == 3" class="cell_wrapper flex_sc">
<div class="cell_label h13_title">商户名</div>
<el-select class="find_width" clearable size="mini" v-model="storeId" placeholder="请选择">
<el-option v-for="item in list" :key="item.id" :label="item.merchantName" :value="item.id"></el-option>
</el-select>
</div>
<div class="cell_wrapper flex_sc">
<div class="cell_label h13_title">主订单编号</div>
<el-input class="find_width" size="mini" clearable placeholder="请输入" suffix-icon="el-icon-search" v-model="orderNum"></el-input>
</div>
<div v-if="accountLevel != 4 && curDivisionType == 2" class="cell_wrapper flex_sc">
<div class="cell_label h13_title">分账状态</div>
<el-select class="find_width" clearable size="mini" v-model="divisionTypeStatus" placeholder="请选择">
<el-option v-for="item in disivionOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
<div v-if="accountLevel == 4" class="cell_wrapper flex_sc">
<div class="cell_label h13_title">商品名称</div>
<el-input class="find_width" size="mini" clearable placeholder="请输入" suffix-icon="el-icon-search" v-model="goodsName"></el-input>
</div>
</div>
<div class="right_widget">
<div class="cell_wrapper flex_sc">
<!-- <el-button class="cell_btn_max" size="mini" @click="toExport">导出数据</el-button> -->
<GLButton class="cell_btn_max" size="mini" fn="导出分账订单" @click="toExport">导出数据</GLButton>
</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>
</div>
<div v-if="curDivisionType == 2" class="pannel">
<GLCombiForm ref="showSearch1" :key="refreshKey1" :formObj="searchForm" :formData="searchFormData1" @handleOk="handleOkFn" @handleRest="handleRestFn"></GLCombiForm>
</div>
<div v-if="accountLevel < 3" class="find_wrap new_find_wrapper">
<div class="left_widget">
<div class="cell_wrapper flex_sc" style="margin-right: 5px">
<!-- <div v-if="accountLevel == 2" class="cell_label h13_title">市级经销商</div>
<div v-if="accountLevel == 1 && !isAdmin" class="cell_label h13_title">省级经销商</div>
<div v-if="accountLevel == 1 && isAdmin" class="cell_label h13_title">工厂</div> -->
<div class="cell_label h13_title">商户名</div>
<el-select class="find_width" clearable size="mini" filterable v-model="curMerchantNo" placeholder="请选择" @change="selectCurMechant">
<el-option v-for="item in list" :key="item.id" :label="item.merchantName" :value="item.merchantNo"></el-option>
</el-select>
</div>
<selectSearch ref="myNewSelect" :show="curMerchantNo ? true : false" @getId="getCurStoreId"></selectSearch>
</div>
<div v-if="curDivisionType == 1" class="pannel">
<GLCombiForm ref="showSearch2" :key="refreshKey2" :formObj="searchForm" :formData="searchFormData2" @handleOk="handleOkFn" @handleRest="handleRestFn"></GLCombiForm>
</div>
<div class="tipper flex_scb">
<div class="tip_text">
......@@ -95,79 +40,40 @@
<span>元)。</span>
</template>
</div>
<!-- <div class="right_select">
<el-select class="myfindWidth" size="mini" collapse-tags multiple clearable v-model="fieldListData" placeholder="请选择要展示的字段">
<el-option v-for="item in fieldList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div> -->
<GLButton size="small" plain fn="导出分账订单" @click="toExport">导出数据</GLButton>
</div>
<!-- 线上分账 -->
<div :hidden="curDivisionType == 1" class="table_wrap">
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="tableRefreshData"></GLTable>
<!-- <GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams1" @refreshTable="toGetMyDivision"></GLTable> -->
<GLTable ref="table2" :tableData="tableData" :tableTotal="tableTotal" :tableParams="tableParams" @refreshTable="toGetMyDivision"></GLTable>
</div>
<!-- 线下对账 -->
<div :hidden="curDivisionType == 2" class="table_wrap">
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams1" @refreshTable="tableRefreshData"></GLTable>
<GLTable ref="table1" :tableData="tableData" :tableTotal="tableTotal" :tableParams="tableParams1" @refreshTable="toGetMyDivision"></GLTable>
</div>
</div>
</template>
<script>
import { mydivision, exportMydivision, myAccountTotalNumOfJT } from '../../api/modules/rules'
import { mydivision, exportMydivision, myAccountTotalNumOfJT, getMerchantList } from '../../api/modules/rules'
import { converterApi } from '../../api/modules/converter'
import utils from '../../util/util'
const divistionStatus = ['待分账', '分账中', '分账成功', '分账失败']
import selectSearch from '../../components/search-select/index.vue'
const SERCH_GOODSNAME = {
label: '商品名称',
name: 'goodsName',
type: 'input',
isClear: true
}
export default {
name: '',
components: {
selectSearch
},
props: {
list: Array
},
data() {
return {
timeOptions: [
{
value: 1,
label: '分账时间'
},
{
value: 2,
label: '支付时间'
}
],
timeChangeName: '分账时间',
disivionOptions: [
{
value: 1,
label: '待分账'
},
{
value: 2,
label: '分账中'
},
{
value: 3,
label: '分账成功'
},
{
value: 4,
label: '分账失败'
}
],
numOptions: [
{
value: 1,
label: '主订单编号'
},
{
value: 2,
label: '交易参考号'
}
],
orderNumName: '主订单编号',
layout: 'sizes, prev, pager, next, jumper, ->, total',
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
refreshKey1: new Date(),
refreshKey2: new Date() + 1,
tableTotal: 0,
tableParams2: {
tableOption: false,
......@@ -178,20 +84,20 @@ export default {
prop: 'orderCode',
width: '200px'
},
{
label: '子订单编号',
prop: 'subOrderCode',
width: '200px'
},
// {
// label: '子订单编号',
// prop: 'subOrderCode',
// width: '200px'
// },
{
label: '客户姓名',
prop: 'customerName',
width: '110px'
width: '180px'
},
{
label: '车架号',
prop: 'standNo',
width: '160px'
width: '180px'
},
{
label: '分账账户',
......@@ -199,8 +105,9 @@ export default {
width: '200px'
},
{
label: '总分账金额(元)',
label: '总分账金额/元',
prop: 'divisionMoney',
align: 'right',
width: '150px'
},
{
......@@ -210,7 +117,7 @@ export default {
},
{
label: '园区店名',
prop: 'sellerMerchantName',
prop: 'yqMerchantName',
width: '200px'
},
{
......@@ -254,20 +161,20 @@ export default {
prop: 'orderCode',
width: '200px'
},
{
label: '子订单编号',
prop: 'subOrderCode',
width: '200px'
},
// {
// label: '子订单编号',
// prop: 'subOrderCode',
// width: '200px'
// },
{
label: '客户姓名',
prop: 'customerName',
width: '110px'
width: '180px'
},
{
label: '车架号',
prop: 'standNo',
width: '110px'
width: '180px'
},
{
label: '分账账户',
......@@ -277,7 +184,8 @@ export default {
{
label: '总分账金额(元)',
prop: 'divisionMoney',
width: '110px'
width: '150px',
align: 'right'
},
{
label: '导流方名称',
......@@ -286,7 +194,7 @@ export default {
},
{
label: '园区店名',
prop: 'sellerMerchantName',
prop: 'yqMerchantName',
width: '200px'
},
{
......@@ -297,7 +205,7 @@ export default {
{
label: '支付时间',
prop: 'successDate',
width: '110px'
width: '200px'
},
{
label: '商品编号',
......@@ -316,7 +224,6 @@ export default {
tableParams: {},
// 查询参数
storeId: '',
timeChangeType: 1,
divisionTime: '',
payTime: '',
divisionTypeStatus: '',
......@@ -329,7 +236,80 @@ export default {
},
curMerchantNo: '',
isAdmin: false,
pickerOptions: {}
pickerOptions: {},
/**新版搜索栏参数 */
searchForm: {
divisionTime: '',
payTime: '',
divisionTypeStatus: '',
orderNum: '',
goodsName: '',
merchantIds: '',
merchantIdss: '',
merchantIdsss: ''
},
searchFormData1: [
{
label: '分账时间',
name: 'divisionTime',
type: 'datePicker',
isClear: true
},
{
label: '支付时间',
name: 'payTime',
type: 'datePicker',
isClear: true
},
{
label: '分账状态',
name: 'divisionTypeStatus',
type: 'select',
optionId: 'confId',
optionLabel: 'confName',
isClear: true,
noFilter: true,
optionList: [
{
confId: 1,
confName: '待分账'
},
{
confId: 2,
confName: '分账中'
},
{
confId: 3,
confName: '分账成功'
},
{
confId: 4,
confName: '分账失败'
}
]
},
{
label: '主订单编号',
name: 'orderNum',
type: 'input',
isClear: true
}
],
searchFormData2: [
{
label: '支付时间',
name: 'payTime',
type: 'datePicker',
isClear: true
},
{
label: '主订单编号',
name: 'orderNum',
type: 'input',
isClear: true
}
],
sizeList: [5, 10, 20, 30, 40]
}
},
created() {
......@@ -337,139 +317,227 @@ export default {
const { session } = this.$globalState
this.accountLevel = session.accountLevel
this.isAdmin = session.admin
// this.pickerOptions = this.setDateLimit()
// 1.工厂 2省代 3市代 4门店
if (session.accountLevel < 4) {
this.getMerchanListData(session.accountLevel)
} else {
this.searchFormData1.push(SERCH_GOODSNAME)
this.searchFormData2.push(SERCH_GOODSNAME)
this.refreshComponent()
}
},
mounted() {
let params = this.resetTime()
this.toGetMyDivision(params)
this.newHttpParam = this.resetTime()
this.toGetMyDivision()
},
methods: {
/**获取商户列表 */
getMerchanListData(accountLevel) {
let merchantForm = {}
getMerchantList({}).then(res => {
this.merchants = res
const levelName = ['工厂商户号', '省代商户号', '市代商户号', '门店商户号']
merchantForm = {
label: levelName[accountLevel],
name: 'merchantIds',
type: 'select',
optionList: res,
optionId: 'id',
optionLabel: 'merchantName',
isClear: true
}
if (accountLevel < 3) {
merchantForm.changeAttr = (val, targetItem) => {
let child = targetItem.optionList.filter(item => item.id == val)
let newForm = {
label: levelName[accountLevel + 1],
name: 'merchantIdss',
type: 'select',
optionList: child[0] && child[0].children ? child[0].children : [],
optionId: 'id',
optionLabel: 'merchantName',
isClear: true
}
if (accountLevel == 1) {
newForm.changeAttr = (va, targetIte) => {
let child2 = targetIte.optionList.filter(item => item.id == va)
let newForm2 = {
label: levelName[accountLevel + 2],
name: 'merchantIdsss',
type: 'select',
optionList: child2[0] && child2[0].children ? child2[0].children : [],
optionId: 'id',
optionLabel: 'merchantName',
isClear: true
}
const isAdd1 = this.judgeAdd(newForm2, this.searchFormData1, 'name')
const isAdd2 = this.judgeAdd(newForm2, this.searchFormData2, 'name')
if (!isAdd1) {
this.searchFormData1.push(newForm2)
}
if (!isAdd2) {
this.searchFormData2.push(newForm2)
}
// this.searchFormData1.push(newForm2)
// this.searchFormData2.push(newForm2)
this.refreshComponent()
}
}
this.rowNumber = 3
const isAdd1 = this.judgeAdd(newForm, this.searchFormData1, 'name')
const isAdd2 = this.judgeAdd(newForm, this.searchFormData2, 'name')
if (!isAdd1) {
this.searchFormData1.push(newForm)
}
if (!isAdd2) {
this.searchFormData2.push(newForm)
}
// this.searchFormData1.push(newForm)
// this.searchFormData2.push(newForm)
this.refreshComponent()
}
}
this.searchFormData1.push(merchantForm)
this.searchFormData2.push(merchantForm)
this.refreshComponent()
})
},
refreshComponent() {
this.refreshKey1 = Date.now()
this.refreshKey2 = Date.now() + 1
},
// 判断是否需要添加下拉框
judgeAdd(obj, objList, tag) {
let flag = false
objList.forEach(item => {
if (item[tag] == obj[tag]) {
flag = true
}
})
return flag
},
handleOkFn() {
this.handlerParams()
},
handleRestFn() {
this.searchForm = {
divisionTime: '',
payTime: '',
divisionTypeStatus: '',
orderNum: '',
goodsName: '',
merchantIds: '',
merchantIdss: '',
merchantIdsss: ''
}
this.$refs[`table${this.curDivisionType}`].page.pageNum = 1
this.newHttpParam = this.resetTime()
this.toGetMyDivision()
},
// 重置时间
resetTime() {
let params = {}
let openInfo = JSON.parse(localStorage.getItem('openInfo'))
let startdate = utils.dateFormat(openInfo.openDate, 'YYYY-MM-DD 00:00:00')
let endDate = utils.dateFormat(new Date(), 'YYYY-MM-DD 23:59:59')
params.successDateStartDate = startdate
params.successDateEndDate = endDate
params.paySuccessDateStartDate = startdate
params.paySuccessDateEndDate = endDate
return params
},
// 设置日期组件时间范围
setDateLimit() {
let openInfo = JSON.parse(localStorage.getItem('openInfo'))
let startdate = utils.dateFormat(openInfo.openDate)
let obj = {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date(startdate).getTime()
}
}
return obj
},
getCurStoreId(e) {
this.storeId = e
},
selectCurMechant(e) {
this.$refs.myNewSelect.selectCurMechant(e)
},
changeNOFind(e) {
this.orderNumType = e
this.orderNumName = e == 1 ? '主订单编号' : '交易参考号'
this.orderNum = ''
},
clearFind() {
this.divisionTime = ''
this.payTime = ''
this.divisionTypeStatus = ''
this.orderNum = ''
this.goodsName = ''
this.storeId = ''
this.$refs.table.page.pageNum = 1
this.curMerchantNo = ''
let params = this.resetTime()
this.toGetMyDivision(params)
},
// clearFind() {
// this.divisionTime = ''
// this.payTime = ''
// this.divisionTypeStatus = ''
// this.orderNum = ''
// this.goodsName = ''
// this.storeId = ''
// this.$refs.table.page.pageNum = 1
// this.curMerchantNo = ''
// let params = this.resetTime()
// this.toGetMyDivision(params)
// },
handlerParams() {
let params = {}
this.$refs.table.page.pageNum = 1
if (this.divisionTime) {
let startDate = utils.dateFormat(this.divisionTime[0], 'YYYY-MM-DD 00:00:00')
let endDate = utils.dateFormat(this.divisionTime[1], 'YYYY-MM-DD 23:59:59')
this.$refs[`table${this.curDivisionType}`].page.pageNum = 1
if (this.searchForm.divisionTime) {
let startDate = utils.dateFormat(this.searchForm.divisionTime[0], 'YYYY-MM-DD 00:00:00')
let endDate = utils.dateFormat(this.searchForm.divisionTime[1], 'YYYY-MM-DD 23:59:59')
params.divisionStartDate = startDate
params.divisionEndDate = endDate
} else {
delete params.divisionStartDate
delete params.divisionEndDate
}
if (this.payTime) {
let startDate = utils.dateFormat(this.payTime[0], 'YYYY-MM-DD 00:00:00')
let endDate = utils.dateFormat(this.payTime[1], 'YYYY-MM-DD 23:59:59')
params.successDateStartDate = startDate
params.successDateEndDate = endDate
if (this.searchForm.payTime) {
let startDate = utils.dateFormat(this.searchForm.payTime[0], 'YYYY-MM-DD 00:00:00')
let endDate = utils.dateFormat(this.searchForm.payTime[1], 'YYYY-MM-DD 23:59:59')
params.paySuccessDateStartDate = startDate
params.paySuccessDateEndDate = endDate
} else {
delete params.successDateStartDate
delete params.successDateEndDate
delete params.paySuccessDateStartDate
delete params.paySuccessDateEndDate
}
if (!this.divisionTime && !this.payTime) {
if (!this.searchForm.divisionTime && !this.searchForm.payTime) {
params = this.resetTime()
}
if (this.divisionTypeStatus) {
params.divisionStatus = this.divisionTypeStatus
if (this.searchForm.divisionTypeStatus) {
params.divisionStatus = this.searchForm.divisionTypeStatus
} else {
delete params.divisionStatus
}
//主订单编号---交易参考号
if (this.orderNum) {
params.orderCode = this.orderNum
if (this.searchForm.orderNum) {
params.orderCode = this.searchForm.orderNum
} else {
delete params.orderCode
}
if (this.tradeNum) {
params.tradeNo = this.orderNum
if (this.searchForm.tradeNum) {
params.tradeNo = this.searchForm.orderNum
} else {
delete params.tradeNo
}
if (this.goodsName) {
params.upgradeGoodsName = this.goodsName
if (this.searchForm.goodsName) {
params.upgradeGoodsName = this.searchForm.goodsName
} else {
delete params.upgradeGoodsName
}
if (this.storeId) {
params['merchantIdList[0]'] = this.storeId
if (this.searchForm.merchantIdsss || this.searchForm.merchantIdss || this.searchForm.merchantIds) {
params['merchantIdList[0]'] = this.searchForm.merchantIdsss || this.searchForm.merchantIdss || this.searchForm.merchantIds
} else {
delete params['merchantIdList[0]']
}
this.toGetMyDivision(params)
},
timeChange(e) {
this.timeChangeType = e
this.timeChangeName = e == 1 ? '分账时间' : '支付时间'
this.newHttpParam = params
this.toGetMyDivision()
},
changDivisionType(type) {
this.curDivisionType = type
this.tableParams = type == 1 ? this.tableParams1 : this.tableParams2
this.clearFind()
// this.toGetMyDivision()
this.handleRestFn()
},
toGetMyDivision(params = {}) {
// const { session } = this.$globalState
toGetMyDivision() {
let method = mydivision()
let para = {
routerMethod: method,
currentPage: this.$refs.table.page.pageNum,
pageSize: this.$refs.table.page.pageSize,
currentPage: this.$refs[`table${this.curDivisionType}`].page.pageNum,
pageSize: this.$refs[`table${this.curDivisionType}`].page.pageSize,
divisionType: this.curDivisionType,
...params
// channelType
...this.newHttpParam
}
converterApi(para).then(res => {
res.list.map(item => {
item.sellerMerchantName = item.goodsOrder.sellerMerchantName
item.divisionTypeName = item.divisionType == 1 ? '线下对账' : '线上对账'
item.successDate = item.payOrder.successDate ? utils.dateFormat(item.payOrder.successDate, 'YYYY-MM-DD HH:mm:ss') : '--'
item.divisionDate = item.orderDivision.divisionDate ? utils.dateFormat(item.orderDivision.divisionDate, 'YYYY-MM-DD HH:mm:ss') : '--'
item.upgradeGoodsCommodityCode = item.goodsSubOrder.upgradeGoodsCommodityCode
item.upgradeGoodsName = item.goodsSubOrder.upgradeGoodsName
item.divisionStatusName = divistionStatus[item.orderDivision.divisionStatus - 1]
item.divisionTypeName = item.divisionType == 1 ? '线下对账' : '线上分账'
item.successDate = item.paySuccessDate ? utils.dateFormat(item.paySuccessDate, 'YYYY-MM-DD HH:mm:ss') : '--'
item.divisionDate = item.divisionDate ? utils.dateFormat(item.divisionDate, 'YYYY-MM-DD HH:mm:ss') : '--'
item.upgradeGoodsCommodityCode = this.toJoinString(item.goods, 'code')
item.upgradeGoodsName = this.toJoinString(item.goods, 'name')
item.divisionStatusName = divistionStatus[item.divisionStatus - 1]
item.customerName = item.customerName || '--'
item.standNo = item.standNo || '--'
item.divisionMoney = item.divisionMoney || '--'
......@@ -478,14 +546,25 @@ export default {
this.tableData = res.list
this.tableTotal = res.total
this.httpParam = {
currentPage: this.$refs.table.page.pageNum,
pageSize: this.$refs.table.page.pageSize,
currentPage: this.$refs[`table${this.curDivisionType}`].page.pageNum,
pageSize: this.$refs[`table${this.curDivisionType}`].page.pageSize,
divisionType: this.curDivisionType,
...params
...this.newHttpParam
}
this.getMyTotalData(this.httpParam)
})
},
toJoinString(arr, type) {
if (!arr) return ''
let temp1 = [],
temp2 = []
arr.forEach(item => {
temp1.push(item.upgradeGoodsName)
temp2.push(item.upgradeGoodsCommodityCode)
})
if (type == 'code') return temp2.join('/')
if (type == 'name') return temp1.join('/')
},
// 表格分页获取数据
tableRefreshData() {
let temp = this.httpParam
......@@ -511,8 +590,8 @@ export default {
let method = exportMydivision()
let para = {
routerMethod: method,
currentPage: this.$refs.table.page.pageNum,
pageSize: this.$refs.table.page.pageSize,
currentPage: this.$refs[`table${this.curDivisionType}`].page.pageNum,
pageSize: this.$refs[`table${this.curDivisionType}`].page.pageSize,
...this.httpParam
}
converterApi(para).then(res => {
......@@ -531,64 +610,10 @@ export default {
}
</script>
<style lang="scss" scoped>
// 精品礼券
.find_wrap {
box-sizing: border-box;
padding: 9px 0px 0px 15px;
display: flex;
position: relative;
.left_widget {
flex: 3;
display: flex;
align-items: center;
flex-wrap: wrap;
box-sizing: border-box;
}
.right_widget {
flex: 0.2;
box-sizing: border-box;
padding-right: 15px;
}
.cell_wrapper {
box-sizing: border-box;
display: flex;
align-items: center;
margin-bottom: 18px;
.cell_label {
text-align: right;
padding-right: 15px;
white-space: nowrap;
width: 80px;
}
.cell_btn {
width: 78px;
}
.cell_btn_max {
width: 156px;
}
}
.find_width {
width: 215px;
}
.cell_position {
position: absolute;
bottom: 9px;
right: 15px;
}
.cell_position_next {
position: absolute;
bottom: -9px;
right: 15px;
}
}
.new_find_wrapper {
// padding: 0;
padding: 0 0 0 15px;
}
.tipper {
width: 100%;
box-sizing: border-box;
padding: 15px 20px;
padding: 10px 15px;
.tip_text {
font-size: 12px;
font-weight: 400;
......@@ -616,11 +641,7 @@ export default {
background: #e8e8ea;
margin-bottom: 20px;
}
// 表格悬浮样式
// .table_wrap /deep/ .el-table--enable-row-hover .el-table__body tr:hover {
// background: #f4f3ff !important;
// }
// .table_wrap /deep/ .el-table tbody tr:hover > td {
// background: #f4f3ff !important;
// }
.pannel {
padding: 0 15px;
}
</style>
......@@ -138,8 +138,8 @@ export default {
width: 100%;
// height: 360px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
margin-top: 17px;
// box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
// margin-top: 17px;
position: relative;
display: flex;
align-items: center;
......@@ -192,9 +192,9 @@ export default {
width: 100%;
height: 100px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
// box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
box-sizing: border-box;
margin: 10px 0;
margin: 16px 0;
padding: 0 20px;
display: flex;
align-items: center;
......@@ -260,7 +260,7 @@ export default {
// min-height: 344px;
padding: 20px 0;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
// box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
}
.wrapper {
box-sizing: border-box;
......@@ -351,11 +351,10 @@ export default {
}
}
.step_wrap {
width: 100%;
padding: 20px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
margin-top: 10px;
// box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
margin-top: 16px;
display: flex;
flex-direction: column;
align-items: center;
......
......@@ -104,11 +104,11 @@
</div>
<div class="box_bg_wrap mini_margin">
<div class="tab_wrap">
<!-- <div class="tab_line flex_sc" :style="accountLevel == 4 ? 'width:48%' : 'width:32%'"> -->
<div class="tab_line flex_sc" :style="accountLevel == 4 ? 'width:32%' : 'width:16%'">
<div class="tab_line flex_sc" :style="accountLevel == 4 ? 'width:48%' : 'width:32%'">
<!-- <div class="tab_line flex_sc" :style="accountLevel == 4 ? 'width:32%' : 'width:16%'"> -->
<template v-for="(item, index) in tabList">
<!-- <div :key="index" class="tab_element_wrap" :style="accountLevel == 4 ? 'width:33.33%' : 'width:50%'" @click="changeTab(index)"> -->
<div :key="index" class="tab_element_wrap" :style="accountLevel == 4 ? 'width:50%' : 'width:100%'" @click="changeTab(index)">
<div :key="index" class="tab_element_wrap" :style="accountLevel == 4 ? 'width:33.33%' : 'width:50%'" @click="changeTab(index)">
<!-- <div :key="index" class="tab_element_wrap" :style="accountLevel == 4 ? 'width:50%' : 'width:100%'" @click="changeTab(index)"> -->
<div class="tab_item h13_title flex_cc" :class="curTabIndex == index ? 'tab_item_active' : ''">{{ item }}</div>
</div>
</template>
......@@ -121,17 +121,17 @@
<template v-if="curTabIndex == 1">
<upgrade-order></upgrade-order>
</template>
<!-- <template v-if="curTabIndex == 2">
<template v-if="curTabIndex == 2">
<my-fashionable-order></my-fashionable-order>
</template> -->
</template>
</template>
<template v-if="accountLevel != 4">
<template v-if="curTabIndex == 0">
<upgrade-order :list="storeList"></upgrade-order>
</template>
<!-- <template v-if="curTabIndex == 1">
<template v-if="curTabIndex == 1">
<my-fashionable-order :list="storeList"></my-fashionable-order>
</template> -->
</template>
</template>
</div>
</div>
......@@ -172,8 +172,8 @@ export default {
dateType: 'date',
dateplaceholder: '选择日期',
showMore: true,
// tabList: ['精品礼券领取订单', '精品升级订单', '我的分账'],
tabList: ['精品礼券领取订单', '精品升级订单'],
tabList: ['精品礼券领取订单', '精品升级订单', '我的分账'],
// tabList: ['精品礼券领取订单', '精品升级订单'],
curTabIndex: 0,
customName: '',
hxstatus: '',
......@@ -198,9 +198,9 @@ export default {
const { session } = this.$globalState
this.accountLevel = session.accountLevel
if (session.accountLevel != 4) {
// this.tabList = ['订单明细', '分账明细']
this.tabList = ['订单明细']
this.toGet4SStore()
this.tabList = ['订单明细', '分账明细']
// this.tabList = ['订单明细']
// this.toGet4SStore()
}
// 获取上一次打开的状态
let lastOpenStatus = localStorage.getItem(`showMore${session.merchantId}`)
......@@ -366,27 +366,27 @@ export default {
}
})
},
toGet4SStore() {
const { session } = this.$globalState
let level = this.accountLevel
let para = {
currentPage: 1,
pageSize: 200000
}
let temp = level + 1
if (session.admin) {
temp = 1
}
para = {
...para,
'merchantAccountLevelList[0]': temp
}
get4SList(para).then(res => {
if (res) {
this.storeList = res.list || []
}
})
}
// toGet4SStore() {
// const { session } = this.$globalState
// let level = this.accountLevel
// let para = {
// currentPage: 1,
// pageSize: 200000
// }
// let temp = level + 1
// if (session.admin) {
// temp = 1
// }
// para = {
// ...para,
// 'merchantAccountLevelList[0]': temp
// }
// get4SList(para).then(res => {
// if (res) {
// this.storeList = res.list || []
// }
// })
// }
}
}
</script>
......@@ -394,11 +394,11 @@ export default {
.box_bg_wrap {
width: 100%;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
margin-top: 17px;
// box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
// margin-top: 17px;
}
.mini_margin {
margin-top: 10px;
margin-top: 16px;
}
.top_widget {
width: 100%;
......
<template>
<div ref="orderContainer" class="order-container">
<div class="find_wrap">
<div class="left_widget">
<div class="cell_wrapper flex_sc">
<div class="cell_label h13_title">支付时间</div>
<el-date-picker class="find_width" :picker-options="pickerOptions" size="mini" v-model="dateBetween" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</div>
<div class="cell_wrapper flex_sc">
<div class="cell_label h13_title">支付方式</div>
<el-select class="find_width" size="mini" clearable v-model="payType" placeholder="请选择">
<el-option v-for="item in payTypesList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
<div v-if="accountLevel == 4" class="cell_wrapper flex_sc">
<div class="cell_label h13_title">分账类型</div>
<el-select class="find_width" clearable size="mini" v-model="divisionType" placeholder="请选择">
<el-option v-for="item in disivionOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
<div v-if="accountLevel == 3" class="cell_wrapper flex_sc">
<div class="cell_label h13_title">商户名</div>
<el-select class="find_width" clearable size="mini" v-model="storeId" placeholder="请选择">
<el-option v-for="item in list" :key="item.id" :label="item.merchantName" :value="item.merchantNo"></el-option>
</el-select>
</div>
<div v-if="accountLevel < 3" class="cell_wrapper flex_sc">
<div class="cell_label h13_title">主订单编号</div>
<el-input class="find_width" size="mini" clearable placeholder="请输入" suffix-icon="el-icon-search" v-model="orderNum"></el-input>
</div>
<div v-if="accountLevel > 2" class="cell_wrapper flex_sc">
<div class="cell_label h13_title">主订单编号</div>
<el-input class="find_width" size="mini" clearable placeholder="请输入" suffix-icon="el-icon-search" v-model="orderNum"></el-input>
</div>
<div class="cell_wrapper flex_sc">
<div class="cell_label h13_title">交易参考号</div>
<el-input class="find_width" size="mini" clearable placeholder="请输入" suffix-icon="el-icon-search" v-model="tradeNum"></el-input>
</div>
<div v-if="accountLevel == 4" class="cell_wrapper flex_sc">
<div class="cell_label h13_title">商品名称</div>
<el-input class="find_width" size="mini" clearable placeholder="请输入" suffix-icon="el-icon-search" v-model="goodsName"></el-input>
</div>
<div v-if="accountLevel != 4" class="cell_wrapper flex_sc">
<div class="cell_label h13_title">分账类型</div>
<el-select class="find_width" clearable size="mini" v-model="divisionType" placeholder="请选择">
<el-option v-for="item in disivionOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
<!-- <div v-if="accountLevel < 3" class="cell_wrapper flex_sc">
<div class="cell_label h13_title">商户名</div>
<div v-if="accountLevel == 2" class="cell_label h13_title">商户名</div>
<div v-if="accountLevel == 1 && !isAdmin" class="cell_label h13_title">省级经销商</div>
<div v-if="accountLevel == 1 && isAdmin" class="cell_label h13_title">工厂</div>
<el-select class="find_width" clearable size="mini" filterable v-model="curMerchantNo" placeholder="请选择" @change="selectCurMechant">
<el-option v-for="item in list" :key="item.id" :label="item.merchantName" :value="item.merchantNo"></el-option>
</el-select>
</div>
<selectSearch ref="mySelectCon" :show="curMerchantNo ? true : false" @getId="getCurStoreId"></selectSearch> -->
</div>
<!-- :style="'flex:'+flexWidth" -->
<div class="right_widget">
<div class="cell_wrapper flex_sc">
<!-- <el-button class="cell_btn_max" size="mini" @click="toExport">导出数据</el-button> -->
<GLButton class="cell_btn_max" size="mini" fn="导出精品升级订单" @click="toExport">导出数据</GLButton>
</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="handleParam">查询</el-button>
</div>
</div>
<div class="pannel">
<GLCombiForm :key="refreshKey" ref="showSearch" :rowNumber="rowNumber" :formObj="searchForm" :formData="searchFormData" @handleOk="handleOkFn" @handleRest="handleRestFn"></GLCombiForm>
</div>
<div v-if="accountLevel < 3" class="find_wrap new_find_wrapper">
<div class="left_widget">
<div class="cell_wrapper flex_sc" style="margin-right: 5px">
<div class="cell_label h13_title">商户名</div>
<!-- <div v-if="accountLevel == 2" class="cell_label h13_title">商户名</div> -->
<!-- <div v-if="accountLevel == 1 && !isAdmin" class="cell_label h13_title">省级经销商</div>
<div v-if="accountLevel == 1 && isAdmin" class="cell_label h13_title">工厂</div> -->
<el-select class="find_width" clearable size="mini" filterable v-model="curMerchantNo" placeholder="请选择" @change="selectCurMechant">
<el-option v-for="item in list" :key="item.id" :label="item.merchantName" :value="item.merchantNo"></el-option>
</el-select>
</div>
<selectSearch ref="mySelectCon" :show="curMerchantNo ? true : false" @getId="getCurStoreId"></selectSearch>
</div>
</div>
<!-- <div class="find_wrap">
<div class="find_line">
<div class="cell_wrapper flex_sc">
<div class="cell_label h13_title">支付时间</div>
<el-date-picker class="find_width" :picker-options="pickerOptions" size="mini" v-model="dateBetween" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</div>
<div class="cell_wrapper flex_sc">
<div class="cell_label h13_title">支付方式</div>
<el-select class="find_width" size="mini" clearable v-model="payType" placeholder="请选择">
<el-option v-for="item in payTypesList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
<div v-if="accountLevel == 4" class="cell_wrapper flex_sc">
<div class="cell_label h13_title">分账类型</div>
<el-select class="find_width" clearable size="mini" v-model="divisionType" placeholder="请选择">
<el-option v-for="item in disivionOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
<div v-if="accountLevel == 3" class="cell_wrapper flex_sc">
<div class="cell_label h13_title">4S店</div>
<el-select class="find_width" clearable size="mini" v-model="storeId" placeholder="请选择">
<el-option v-for="item in list" :key="item.id" :label="item.merchantName" :value="item.merchantNo"></el-option>
</el-select>
</div>
<div v-if="accountLevel < 3" class="cell_wrapper flex_sc">
<div class="cell_label h13_title">主订单编号</div>
<el-input class="find_width" size="mini" clearable placeholder="请输入" suffix-icon="el-icon-search" v-model="orderNum"></el-input>
</div>
<div class="cell_wrapper flex_sc">
<el-button class="cell_btn_max" size="mini" @click="toExport">导出数据</el-button>
</div>
</div>
<div class="find_line">
<div v-if="accountLevel > 2" class="cell_wrapper flex_sc">
<div class="cell_label h13_title">主订单编号</div>
<el-input class="find_width" size="mini" clearable placeholder="请输入" suffix-icon="el-icon-search" v-model="orderNum"></el-input>
</div>
<div class="cell_wrapper flex_sc">
<div class="cell_label h13_title">交易参考号</div>
<el-input class="find_width" size="mini" clearable placeholder="请输入" suffix-icon="el-icon-search" v-model="tradeNum"></el-input>
</div>
<div v-if="accountLevel == 4" class="cell_wrapper flex_sc">
<div class="cell_label h13_title">商品名称</div>
<el-input class="find_width" size="mini" clearable placeholder="请输入" suffix-icon="el-icon-search" v-model="goodsName"></el-input>
</div>
<div v-if="accountLevel != 4" class="cell_wrapper flex_sc">
<div class="cell_label h13_title">分账类型</div>
<el-select class="find_width" clearable size="mini" v-model="divisionType" placeholder="请选择">
<el-option v-for="item in disivionOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
<div v-if="accountLevel < 3" class="cell_wrapper flex_sc">
<div v-if="accountLevel == 2" class="cell_label h13_title">市级经销商</div>
<div v-if="accountLevel == 1 && !isAdmin" class="cell_label h13_title">省级经销商</div>
<div v-if="accountLevel == 1 && isAdmin" class="cell_label h13_title">工厂</div>
<el-select class="find_width" clearable size="mini" filterable v-model="curMerchantNo" placeholder="请选择" @change="selectCurMechant">
<el-option v-for="item in list" :key="item.id" :label="item.merchantName" :value="item.merchantNo"></el-option>
</el-select>
</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="handleParam">查询</el-button>
</div>
</div>
<selectSearch ref="mySelectCon" :show="curMerchantNo ? true : false" @getId="getCurStoreId"></selectSearch>
</div> -->
<div v-if="accountLevel == 1 && !isAdmin" style="height: 18px"></div>
<div class="tipper flex_scb">
<div class="tip_text">
......@@ -164,44 +18,22 @@
<span>元</span>
</div>
<div class="right_select">
<el-select class="myfindWidth" size="mini" collapse-tags multiple @removeTag="removeTag" v-model="tableCoulumList" @change="changTableCoulum" placeholder="请选择要展示的字段">
<el-select class="myfindWidth" size="small" collapse-tags multiple @removeTag="removeTag" v-model="tableCoulumList" @change="changTableCoulum" placeholder="请选择要展示的字段">
<el-option v-for="item in fieldList" :disabled="item.disabled" :key="item.value" :label="item.label" :value="item"></el-option>
</el-select>
<GLButton style="margin-left: 8px;" size="small" fn="导出精品升级订单" @click="toExport">导出数据</GLButton>
</div>
</div>
<div class="table_wrap">
<el-table ref="subTable" id="initTable" class="hightline" :data="tableData">
<!-- //实现高亮竖线 -->
<el-table-column fixed="left" width="5">
<template slot-scope="scope">
<span :scope="scope"></span>
</template>
</el-table-column>
<el-table-column label="序号" align="center" width="100px" type="index" :index="index => index + (currentPage - 1) * pageSize + 1"></el-table-column>
<el-table-column label="订单信息" align="center">
<template v-for="(ele, index) in tableCoulumList">
<el-table-column v-if="ele.level == 1" :key="index" :width="ele.width" :prop="ele.value" :label="ele.label" align="center"></el-table-column>
</template>
</el-table-column>
<el-table-column label="支付信息" align="center">
<template v-for="(ele, index) in tableCoulumList">
<el-table-column v-if="ele.level == 2" :key="index" :width="ele.width" :prop="ele.value" :label="ele.label" align="center"></el-table-column>
</template>
</el-table-column>
<el-table-column label="导流方利润" align="center">
<template v-for="(ele, index) in tableCoulumList">
<el-table-column v-if="ele.level == 3" :key="index" :width="ele.width" :prop="ele.value" :label="ele.label" align="center"></el-table-column>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="120">
<template slot-scope="scope">
<div class="spanbtn h16_title" @click="openDetail(scope.row)">查看明细</div>
</template>
</el-table-column>
</el-table>
<el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="pageSize" :total="tableTotal" :layout="layout"></el-pagination>
<GLTable v-if="dynamicTableShow" ref="subTable" :tableData="tableData" :tableTotal="tableTotal" :tableParams="newTableParams" @refreshTable="toGetCouponsList">
<div class="table-btns" slot="table-btns" slot-scope="scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
</div>
<el-dialog title="订单详情" :visible.sync="dialogVisible" width="60%">
<GLDialog bigTitle="订单详情" mode="big" :visible.sync="dialogVisible">
<div v-if="orderDetail" class="dialog_content">
<div class="wrapper">
<div class="title h18_title">
......@@ -356,16 +188,15 @@
</div>
</div>
</div>
<span slot="footer" class="dialog-footer flex_cc">
<el-button size="mini" type="primary" @click="dialogVisible = false">返回</el-button>
<span slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="dialogVisible = false">返回</el-button>
</span>
</el-dialog>
</GLDialog>
</div>
</template>
<script>
import selectSearch from '../../components/search-select/index.vue'
import { findupGradeOrder, exportUpgrade, checkDetail, orderTotalNumOfJT } from '../../api/modules/rules'
import { findupGradeOrder, exportUpgrade, checkDetail, orderTotalNumOfJT, getMerchantList } from '../../api/modules/rules'
import { converterApi } from '../../api/modules/converter'
import utils from '../../util/util'
const logTypeList = ['预录用户', '用户下单', '用户付款', '完成服务']
......@@ -373,53 +204,105 @@ const orderStatusList = ['待升级', '未升级', '待支付', '已支付', '
export default {
name: '',
components: {
selectSearch
},
props: {
list: Array
},
data() {
return {
orderStatusList,
payChangeName: '支付时间',
payTypesList: [
dynamicTableShow: true,
rowNumber: 2,
refreshKey: Date.now(),
/**新版搜索栏组件 */
searchForm: {
dateBetween: '',
payType: '',
divisionType: '',
orderNum: '',
tradeNum: '',
goodsName: '',
merchantIds: '',
merchantIdss: '',
merchantIdsss: ''
},
searchFormData: [
{
value: 0,
label: '不升级'
label: '支付时间',
name: 'dateBetween',
type: 'datePicker',
isClear: true
},
{
value: 1,
label: '微信支付'
label: '支付方式',
name: 'payType',
type: 'select',
optionId: 'confId',
optionLabel: 'confName',
isClear: true,
noFilter: true,
optionList: [
{
confId: 0,
confName: '不升级'
},
{
confId: 1,
confName: '微信支付'
},
{
confId: 2,
confName: '线下收款'
},
{
confId: 3,
confName: 'POS机'
}
]
},
{
value: 2,
label: '线下收款'
label: '分账类型',
name: 'divisionType',
type: 'select',
optionId: 'confId',
optionLabel: 'confName',
isClear: true,
noFilter: true,
optionList: [
{
confId: 1,
confName: '线下对账'
},
{
confId: 2,
confName: '线上分账'
}
]
},
{
value: 3,
label: 'POS机'
}
],
disivionOptions: [
label: '主订单编号',
name: 'orderNum',
type: 'input',
isClear: true
},
{
value: 1,
label: '线下对账'
label: '交易参考号',
name: 'tradeNum',
type: 'input',
isClear: true
},
{
value: 2,
label: '线上分账'
label: '商品名称',
name: 'goodsName',
type: 'input',
isClear: true
}
],
layout: 'sizes, prev, pager, next, jumper, ->, total',
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
orderStatusList,
tableData: [],
tableTotal: 0,
currentPage: 1,
pageSize: 10,
payTypeChange: 1,
// 查询参数
storeId: '',
dateBetween: '',
payType: '',
divisionType: '',
......@@ -437,11 +320,15 @@ export default {
tableColumns: [
{
label: '商品ID',
prop: 'codeId'
prop: 'codeId',
width: 150,
line: 1
},
{
label: '商品名称',
prop: 'goodsName'
prop: 'goodsName',
width: 150,
line: 1
},
{
label: '商品分类',
......@@ -449,23 +336,27 @@ export default {
},
{
label: '品牌商',
prop: 'plateName'
prop: 'plateName',
width: 150,
line: 1
},
{
label: '商品售价',
prop: 'saleprice'
label: '商品售价/元',
prop: 'saleprice',
align: 'right'
},
{
label: '质保年限',
prop: 'upgradeWarrantyPeriodName'
},
{
label: '数量(件)',
label: '数量/件',
prop: 'number'
},
{
label: '支付金额',
prop: 'totalPrice'
label: '支付金额/元',
prop: 'totalPrice',
align: 'right'
}
]
},
......@@ -529,90 +420,94 @@ export default {
label: '商品成本',
level: 1,
width: '110',
align: 'right',
disabled: false
},
{
value: 'customerName',
label: '客户姓名',
level: 1,
width: '110',
width: '200',
disabled: false
},
{
value: 'customerPhone',
label: '客户手机号',
level: 2,
width: '110',
width: '200',
disabled: false
},
{
value: 'sellerName',
label: '转化员姓名',
level: 2,
width: '110',
width: '200',
disabled: false
},
{
value: 'employeeName',
label: '销售顾问',
level: 2,
width: '110',
width: '200',
disabled: false
},
{
value: 'paySuccessDate',
label: '支付时间',
level: 2,
width: '160',
width: '200',
disabled: false
},
{
value: 'payTypeName',
label: '支付方式',
level: 3,
width: '110',
width: '200',
disabled: false
},
{
value: 'subTotalPrice',
label: '支付金额',
label: '支付金额/元',
level: 3,
width: '110',
align: 'right',
disabled: true
},
{
value: 'actualIncomeMoney',
label: '总分账金额',
label: '总分账金额/元',
level: 3,
width: '110',
width: '150',
align: 'right',
disabled: true
},
{
value: 'shopMerchantName',
label: '分账对象',
level: 3,
width: '110',
width: '200',
disabled: false
},
{
value: 'rule',
label: '分账规则',
level: 3,
width: '80',
width: '200',
disabled: false
},
{
value: 'shopProfitMoney',
label: '分账金额',
label: '分账金额/元',
level: 3,
width: '110',
align: 'right',
disabled: true
},
{
value: 'divisionTypeName',
label: '分账类型',
level: 3,
width: '110',
width: '200',
disabled: false
}
],
......@@ -629,23 +524,153 @@ export default {
detailImage: '',
detailImageList: [],
pickerOptions: {},
flexWidth: 1,
screenWidth: document.body.clientWidth
screenWidth: document.body.clientWidth,
/**新版表格组件传参 */
newTableParams: {
tableOption: false,
tableColumns: [
{
label: '订单信息',
align: 'center',
children: [
{
label: '主订单编号',
prop: 'orderCode',
width: '200'
},
{
label: '交易参考号',
prop: 'tradeNo',
width: '200'
},
{
label: '子订单编号',
prop: 'subOrderCode',
width: '200'
},
{
label: '商品名称',
prop: 'upgradeGoodsName',
width: '200'
},
{
label: '商品编号',
prop: 'upgradeGoodsCommodityCode',
width: '200'
},
{
label: '商品成本',
prop: 'goodsCost',
width: '110',
align: 'right'
},
{
label: '客户姓名',
prop: 'customerName',
width: '200'
}
]
},
{
label: '支付信息',
align: 'center',
children: [
{
label: '客户手机号',
prop: 'customerPhone',
width: '200'
},
{
label: '转化员姓名',
prop: 'sellerName',
width: '200'
},
{
label: '销售顾问',
prop: 'employeeName',
width: '200'
},
{
label: '支付时间',
prop: 'paySuccessDate',
width: '200'
}
]
},
{
label: '导流方利润',
align: 'center',
children: [
{
label: '支付方式',
prop: 'payTypeName',
width: '200'
},
{
label: '支付金额/元',
prop: 'subTotalPrice',
width: '110',
align: 'right'
},
{
label: '总分账金额/元',
prop: 'actualIncomeMoney',
width: '150',
align: 'right'
},
{
label: '分账对象',
prop: 'shopMerchantName',
width: '200'
},
{
label: '分账规则',
prop: 'rule',
width: '200'
},
{
label: '分账金额/元',
prop: 'shopProfitMoney',
width: '110',
align: 'right'
},
{
label: '分账类型',
prop: 'divisionTypeName',
width: '200'
}
]
},
{
label: '操作',
prop: '',
width: '120px',
fixed: 'right',
addHtml: 'table-btns'
}
]
},
buttonList: [
{
type: 'el-button',
name: row => {
return '查看明细'
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.openDetail(row.scope)
}
}
]
}
},
watch: {
tableCoulumList: function(newvalue, oldvalue) {
this.handlerNewTableCoulum(newvalue)
}
},
// watch: {
// screenWidth: {
// immediate: true,
// handler(newValue) {
// // if (newValue < 1400) {
// // this.flexWidth = 0.2
// // } else {
// // this.flexWidth = 1
// // }
// // console.log(this.flexWidth);
// }
// }
// },
created() {
const { session } = this.$globalState
this.accountLevel = session.accountLevel
......@@ -657,12 +682,14 @@ export default {
} else {
this.tableCoulumList = this.fieldList
}
// this.pickerOptions = this.setDateLimit()
// 1.工厂 2省代 3市代 4门店
if (session.accountLevel < 4) {
this.getMerchanListData(session.accountLevel)
}
},
mounted() {
let openInfo = JSON.parse(localStorage.getItem('openInfo'))
let startDate = utils.dateFormat(openInfo.openDate)
// let startDate = this.$defaultStartDate
let endDate = utils.dateFormat(new Date())
this.openCount = openInfo.openCount || 0
let params = {
......@@ -671,24 +698,142 @@ export default {
}
this.defaultStart = utils.dateFormat(startDate, 'YYYY-MM-DD 00:00:00')
this.defaultEnd = utils.dateFormat(endDate, 'YYYY-MM-DD 23:59:59')
this.toGetCouponsList(params)
// let that = this
// window.addEventListener('resize', () => {
// let width = document.body.clientWidth
// that.screenWidth = width
// })
this.newHttpParam = params
this.toGetCouponsList()
},
methods: {
// 设置日期组件时间范围
setDateLimit() {
let openInfo = JSON.parse(localStorage.getItem('openInfo'))
let startdate = utils.dateFormat(openInfo.openDate)
let obj = {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date(startdate).getTime()
/**获取商户列表 */
getMerchanListData(accountLevel) {
let merchantForm = {}
getMerchantList({}).then(res => {
this.merchants = res
const levelName = ['工厂商户号', '省代商户号', '市代商户号', '门店商户号']
merchantForm = {
label: levelName[accountLevel],
name: 'merchantIds',
type: 'select',
optionList: res,
optionId: 'id',
optionLabel: 'merchantName',
isClear: true
}
if (accountLevel < 3) {
merchantForm.changeAttr = (val, targetItem) => {
let child = targetItem.optionList.filter(item => item.id == val)
let newForm = {
label: levelName[accountLevel + 1],
name: 'merchantIdss',
type: 'select',
optionList: child[0] && child[0].children ? child[0].children : [],
optionId: 'id',
optionLabel: 'merchantName',
isClear: true
}
if (accountLevel == 1) {
newForm.changeAttr = (va, targetIte) => {
let child2 = targetIte.optionList.filter(item => item.id == va)
let newForm2 = {
label: levelName[accountLevel + 2],
name: 'merchantIdsss',
type: 'select',
optionList: child2[0] && child2[0].children ? child2[0].children : [],
optionId: 'id',
optionLabel: 'merchantName',
isClear: true
}
const isAdd = this.judgeAdd(newForm2, this.searchFormData, 'name')
if (!isAdd) {
this.searchFormData.push(newForm2)
}
this.refreshKey = Date.now()
}
}
this.rowNumber = 3
const isAdd = this.judgeAdd(newForm, this.searchFormData, 'name')
if (!isAdd) {
this.searchFormData.push(newForm)
}
this.refreshKey = Date.now()
}
}
this.searchFormData.push(merchantForm)
this.refreshKey = Date.now()
})
},
// 判断是否需要添加下拉框
judgeAdd(obj, objList, tag) {
let flag = false
objList.forEach(item => {
if (item[tag] == obj[tag]) {
flag = true
}
})
return flag
},
/**处理新表格动态刷新列方法 */
handlerNewTableCoulum(fieldList) {
this.dynamicTableShow = false
let newTableParams = {
tableOption: false,
tableColumns: [
{
label: '订单信息',
align: 'center',
children: []
},
{
label: '支付信息',
align: 'center',
children: []
},
{
label: '导流方利润',
align: 'center',
children: []
},
{
label: '操作',
prop: '',
width: '120px',
fixed: 'right',
addHtml: 'table-btns'
}
]
}
return obj
fieldList.forEach(item => {
let obj = {
label: item.label,
prop: item.value,
width: item.width
}
if (item.align) {
obj.align = item.align
}
newTableParams.tableColumns[item.level - 1].children.push(obj)
})
this.newTableParams = newTableParams
this.$refs.subTable.componentKey = Date.now()
this.$nextTick(() => {
this.dynamicTableShow = true
})
},
handleOkFn() {
this.handleParam()
},
handleRestFn() {
this.searchForm = {
dateBetween: '',
payType: '',
divisionType: '',
orderNum: '',
tradeNum: '',
goodsName: '',
merchantIds: '',
merchantIdss: '',
merchantIdsss: ''
}
this.newHttpParam = {}
this.toGetCouponsList()
},
reloadImg(item) {
let index = 0
......@@ -707,93 +852,70 @@ export default {
this.$set(this.detailImageList, index, 'err' + item)
}
},
getCurStoreId(e) {
this.storeId = e
},
selectCurMechant(e) {
this.$refs.mySelectCon.selectCurMechant(e)
},
changTableCoulum(e) {
const { session } = this.$globalState
localStorage.setItem(`menuList${session.merchantId}`, JSON.stringify(e))
this.$nextTick(() => {
this.$refs.subTable.doLayout()
})
},
// 查看明细
openDetail(item) {
this.getDetailInfo(item.orderCode)
},
clearFind() {
let params = {
payStartDateStr: this.httpParam.payStartDateStr,
payEndDateStr: this.httpParam.payEndDateStr
}
this.dateBetween = ''
this.payType = ''
this.divisionType = ''
this.orderNum = ''
this.tradeNum = ''
this.goodsName = ''
this.storeId = ''
this.currentPage = 1
this.curMerchantNo = ''
this.toGetCouponsList(params)
},
handleParam() {
let params = {
...this.httpParam
}
if (this.dateBetween) {
let params = {}
if (this.searchForm.dateBetween) {
//支付时间
let startDate = utils.dateFormat(this.dateBetween[0], 'YYYY-MM-DD 00:00:00')
let endDate = utils.dateFormat(this.dateBetween[1], 'YYYY-MM-DD 23:59:59')
let startDate = utils.dateFormat(this.searchForm.dateBetween[0], 'YYYY-MM-DD 00:00:00')
let endDate = utils.dateFormat(this.searchForm.dateBetween[1], 'YYYY-MM-DD 23:59:59')
params.payStartDateStr = startDate
params.payEndDateStr = endDate
} else {
params.payStartDateStr = this.defaultStart
params.payEndDateStr = this.defaultEnd
}
if (this.payType || this.payType == 0) {
if (this.searchForm.payType || this.searchForm.payType === 0) {
//支付方式
params.payType = this.payType
params.payType = this.searchForm.payType
}
if (this.divisionType) {
if (this.searchForm.divisionType) {
//分账类型
params.divisionType = this.divisionType
params.divisionType = this.searchForm.divisionType
} else {
delete params.divisionType
}
if (this.orderNum) {
params.orderCode = this.orderNum
if (this.searchForm.orderNum) {
params.orderCode = this.searchForm.orderNum
} else {
delete params.orderCode
}
if (this.tradeNum) {
params.tradeNo = this.tradeNum
if (this.searchForm.tradeNum) {
params.tradeNo = this.searchForm.tradeNum
} else {
delete params.tradeNo
}
if (this.goodsName) {
params.upgradeGoodsName = this.goodsName
if (this.searchForm.goodsName) {
params.upgradeGoodsName = this.searchForm.goodsName
} else {
delete params.upgradeGoodsName
}
if (this.storeId) {
params['merchantIdList[0]'] = this.storeId
if (this.searchForm.merchantIdsss || this.searchForm.merchantIdss || this.searchForm.merchantIds) {
params['merchantIdList[0]'] = this.searchForm.merchantIdsss || this.searchForm.merchantIdss || this.searchForm.merchantIds
} else {
delete params['merchantIdList[0]']
}
this.currentPage = 1
this.toGetCouponsList(params)
this.newHttpParam = params
this.$refs.subTable.page.pageNum = 1
this.toGetCouponsList()
},
toGetCouponsList(params = {}) {
toGetCouponsList() {
let method = findupGradeOrder()
let para = {
routerMethod: method,
pageNum: this.currentPage,
pageSize: this.pageSize,
...params
pageNum: this.$refs.subTable.page.pageNum,
pageSize: this.$refs.subTable.page.pageSize,
...this.newHttpParam
}
converterApi(para).then(res => {
this.tableData = res.list.map((item, index) => {
......@@ -806,10 +928,11 @@ export default {
})
this.tableTotal = res.total
this.httpParam = {
pageNum: this.currentPage,
pageSize: this.pageSize,
...params
pageNum: this.$refs.subTable.page.pageNum,
pageSize: this.$refs.subTable.page.pageSize,
...this.newHttpParam
}
this.$refs.subTable.componentKey = Date.now()
this.getTotalOfJT(this.httpParam)
})
},
......@@ -828,28 +951,6 @@ export default {
}
})
},
// 每页条数
handleSizeChange(value) {
this.pageSize = value
let params = {
...this.httpParam
// payStartDateStr: this.httpParam.payStartDateStr,
// payEndDateStr: this.httpParam.payEndDateStr,
// divisionType: this.httpParam.divisionType
}
this.toGetCouponsList(params)
},
// 页码
handleCurrentChange(value) {
this.currentPage = value
let params = {
...this.httpParam
// payStartDateStr: this.httpParam.payStartDateStr,
// payEndDateStr: this.httpParam.payEndDateStr,
// divisionType: this.httpParam.divisionType
}
this.toGetCouponsList(params)
},
toExport() {
let method = exportUpgrade()
let para = {
......@@ -904,69 +1005,10 @@ export default {
}
</script>
<style lang="scss" scoped>
.find_wrap {
box-sizing: border-box;
padding: 9px 0 0px 15px;
display: flex;
.left_widget {
flex: 3;
display: flex;
align-items: center;
flex-wrap: wrap;
}
.right_widget {
flex: 0.2;
box-sizing: border-box;
padding-right: 15px;
display: flex;
flex-direction: column;
align-items: flex-end;
}
.cell_wrapper {
box-sizing: border-box;
display: flex;
align-items: center;
margin-bottom: 18px;
.cell_label {
text-align: right;
padding-right: 15px;
white-space: nowrap;
width: 80px;
}
.cell_btn {
width: 73px;
}
.cell_btn_max {
width: 156px;
}
}
.find_width {
width: 215px;
}
.cell_position {
position: absolute;
bottom: 9px;
right: 15px;
}
.cell_position_next {
position: absolute;
bottom: -18px;
right: 15px;
}
.cell_position_export {
position: absolute;
bottom: 56px;
right: 15px;
}
}
.new_find_wrapper {
// padding: 9px 0 9px 15px;
padding: 0 0 0 15px;
}
.tipper {
width: 100%;
box-sizing: border-box;
padding: 6px 20px 15px 20px;
padding: 0px 16px 10px 20px;
.tip_text {
font-size: 12px;
font-weight: 400;
......@@ -979,6 +1021,9 @@ export default {
overflow: hidden;
}
}
.pannel {
padding: 0 15px;
}
.table_wrap {
padding: 0 15px;
padding-bottom: 10px;
......@@ -987,7 +1032,7 @@ export default {
cursor: pointer;
}
.dialog_content {
height: 400px;
// height: 400px;
overflow-y: scroll;
.wrapper {
width: 100%;
......@@ -1072,7 +1117,7 @@ export default {
.table_wrap /deep/ .el-table__row > td {
border-right: none;
}
.table_wrap /deep/ .el-table th.is-leaf:first-child {
border-right: none;
}
// .table_wrap /deep/ .el-table th.is-leaf:first-child {
// border-right: none;
// }
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!