Commit adde4322 by 前端

Merge branch 'master' into 'develop'

Master ===> develop

See merge request !7
2 parents 006ed4c3 6326d9a1
Showing 52 changed files with 1568 additions and 115 deletions
......@@ -163,7 +163,7 @@ const getProListApi = params => {
// 获取无忧卡套餐列表
const getPackageListApi = params => {
params.method = `scrm.api.equity.service.package.dj.list.get`
// params.method = `scrm.api.equity.service.package.list.get`
// params.method = `scrm.api.equity.service.package.list.get`
return http({
url: 'rop-scrm-equity/router',
method: 'GET',
......@@ -325,50 +325,106 @@ const spaAgressData = params => {
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true,
sign: true
})
}
// 店铺信息
const merchantInfo = params => {
params.method = 'scrm.api.equity.common.merchant.detail.det'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true,
})
}
// 卡号---获取期限
params.method = 'scrm.api.equity.common.merchant.detail.det'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 卡号---获取期限
const dateBycarNo = params => {
params.method = 'scrm.api.equity.service.cfc.get.by.seqno'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取活码列表-
const activeCodeList = params => {
params.method = 'entmicro.api.code.getFreeChannelCode'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
// 更新活码
const updateActiveCode = params => {
params.method = 'scrm.api.equity.service.merchant.qrcode.update'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const getWriteOffList = params => {
params.method = `scrm.api.equity.service.claims.list`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
// 导出核赔列表
const exportWriteOffData = params => {
params.method = `scrm.api.equity.service.claims.list.export`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 获取活码列表-
const activeCodeList = params => {
params.method = 'entmicro.api.code.getFreeChannelCode'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true,
})
}
// 更新活码
const updateActiveCode = params => {
params.method = 'scrm.api.equity.service.merchant.qrcode.update'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true,
})
}
export default { getUserInfoApi, getCountNoDataApi, getListApi, getMerchantApi, getExportApi, getPriteApi, getCarBrandListApi, getCarChildListApi, getCarTypeListApi, getCarSeriesListApi, getHotlineApi, getDefaultCarbrandApi, updateHotlineApi, updateCarBrandApi, getProListApi, getPackageListApi, getEquityApi, updateEquityApi, createCodeApi, getOrderAttrApi, getAllOrderValueApi, verifyOrderApi, checkOrderApi, updateOrderApi, uploadImgApi, backOrderApi, aduitOrderApi, judgeSetting, spaAgressData, merchantInfo, dateBycarNo,activeCodeList,updateActiveCode }
\ No newline at end of file
// 核赔判断并获取服务
const getWriteOffService = params => {
params.method = `scrm.api.equity.service.claims.create.before.init`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 获取核赔订单详情
const getWriteOffDetail = params => {
params.method = `scrm.api.equity.service.claims.detail`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 保存核赔订单
const saveWriteOff = params => {
params.method = `scrm.api.equity.service.claims.save`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { getUserInfoApi, getCountNoDataApi, getListApi, getMerchantApi, getExportApi, getPriteApi, getCarBrandListApi, getCarChildListApi, getCarTypeListApi, getCarSeriesListApi, getHotlineApi, getDefaultCarbrandApi, updateHotlineApi, updateCarBrandApi, getProListApi, getPackageListApi, getEquityApi, updateEquityApi, createCodeApi, getOrderAttrApi, getAllOrderValueApi, verifyOrderApi, checkOrderApi, updateOrderApi, uploadImgApi, backOrderApi, aduitOrderApi, judgeSetting, spaAgressData, merchantInfo, dateBycarNo, activeCodeList, updateActiveCode, getWriteOffList, exportWriteOffData, getWriteOffService, getWriteOffDetail, saveWriteOff }
import { http } from '@/main'
import { http, http_common } from '@/main'
const defaultPath = 'scrm.api.live.'
......@@ -43,4 +43,15 @@ const getZoneList = params => {
})
}
export { getGoodsList, uploadImg, getMerchantList, getZoneList }
const pictureUpload = params => {
params.method = 'glsx.accounts.biz.common.pictureUpload'
return http_common({
url: '/router?method=glsx.accounts.biz.common.pictureUpload',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
}
export { getGoodsList, uploadImg, getMerchantList, getZoneList, pictureUpload }
import { http, http2 } from '@/main'
const path = 'entmicro.api.mass.'
const URL = 'rop-scrm-entmicro/router'
const customerList = params => {
params.type = 1
params.method = `${path}page`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
const customerGroupList = params => {
params.type = 2
params.method = `${path}page`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
const insert = params => {
params.method = `${path}insert`
return http({
url: URL,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
const detail = params => {
params.type = 2
params.method = `${path}detail`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
const listDepartmentTree = params => {
params.method = 'entmicro.api.department.listDepartmentTree'
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
const findLordGroup = params => {
params.method = 'entmicro.api.staff.findLordGroup'
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
const querylabeltree = params => {
// params.method = 'scrm.api.datahub.label.querylabeltree'
params.method = 'scrm.api.datahub.labelgroup.queryLabelTree'
return http2({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
const groupList = params => {
params.method = 'entmicro.api.customer.group.list.by.merchant'
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
const customerCount = params => {
params.method = 'entmicro.api.mass.detail.customer.filter.count'
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
// 客户群发、客户群群发基本信息详情
const customerDetail = params => {
params.method = `${path}detail`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
// 客户群发统计
const detailStatistic = params => {
params.method = `${path}detail.statistic`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
// 客户群群发统计
const groupDetailStatistic = params => {
params.method = `${path}group.detail.statistic`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
// 客户群发员工列表
const staffList = params => {
params.method = `${path}staff.list`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
// 客户群发客户列表
const customerDetailList = params => {
params.method = `${path}customer.list`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
// 客户群群发列表
const groupDetailList = params => {
params.method = `${path}group.detail.sender.list`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
// 根据id提醒用户 ,列表
const listRemindOperate = params => {
params.method = `${path}listRemindOperate`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
// 详情页客户群提醒
const remindUserGroup = params => {
params.method = `${path}remindUserGroup`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
const getMerchant = params => {
params.method = 'scrm.api.coupon.list.merchant'
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true
})
}
const getCard = params => {
params.method = 'scrm.api.equity.open.card.price.list.by.merchantid'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const merchant = params => {
params.method = 'scrm.api.equity.open.card.price.list.by.merchantid'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const merchantOpen = params => {
params.method = 'scrm.api.equity.service.merchant.config.get'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const getCoupon = params => {
params.method = 'scrm.api.boutiquecoupon.coupon.page'
return http({
url: '/rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
const getPackage = params => {
params.method = 'scrm.api.equity.package.info.list.with.page'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const getActivity = params => {
params.method = 'scrm.api.shopmall.activity.page'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
const nameVaild = params => {
params.method = 'entmicro.api.one.template.name.valid'
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
const getStatus = params => {
params.method = 'scrm.api.work.wechat.access.status'
return http({
url: '/rop-scrm-wechat/router',
method: 'POST',
data: params,
sign: true
})
}
const templatePage = params => {
params.method = `${path}template.page.search`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
const templateSave = params => {
params.method = `${path}template.save`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
const templateUpdate = params => {
params.method = `${path}template.update`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
const createdNameList = params => {
params.method = `${path}template.created.name.list`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
const templateDetail = params => {
params.method = `${path}template.detail`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
const groupDetailUpdate = params => {
params.method = `${path}update.group.detail`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
const followerType = params => {
params.method = 'entmicro.api.staff.listEntFollowerType'
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
export default {
customerList,
customerGroupList,
insert,
detail,
remindUserGroup,
listRemindOperate,
listDepartmentTree,
querylabeltree,
groupList,
customerCount,
customerDetail,
detailStatistic,
groupDetailStatistic,
staffList,
customerDetailList,
groupDetailList,
getMerchant,
getCard,
getCoupon,
merchant,
merchantOpen,
getPackage,
getActivity,
nameVaild,
getStatus,
templatePage,
templateSave,
templateUpdate,
createdNameList,
templateDetail,
groupDetailUpdate,
findLordGroup,
followerType
}
import { http, http_brand, request_merchant } from '@/main'
const getExpertList = params => {
params.method = 'entmicro.api.operation.page'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const getDepartment = params => {
params.method = 'entmicro.api.department.listDepartmentTree'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const saveExpert = params => {
params.method = 'entmicro.api.operation.save'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const delExpert = params => {
params.method = 'entmicro.api.operation.delete'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const editExpert = params => {
params.method = 'entmicro.api.operation.update'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const expertDetail = params => {
params.method = 'entmicro.api.operation.detail'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const getMenberType = params => {
params.method = 'merchants.api.menu.findAllDictData'
return request_merchant({
url: '/rop-merchants/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getExpertList, getDepartment, saveExpert, delExpert, editExpert, expertDetail, getMenberType }
......@@ -7,7 +7,7 @@
::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius: 4px;
background-color: rgba(144, 147, 153, .3);
background-color: rgba(144, 147, 153, 0.3);
}
.h1_title {
......@@ -44,7 +44,7 @@
.h6_title {
font-size: 16px;
font-weight: 500;
color: #3A3A3A;
color: #3a3a3a;
}
.h7_title {
......@@ -56,7 +56,7 @@
.h8_title {
font-size: 24px;
font-weight: 600;
color: #3A3A3A;
color: #3a3a3a;
}
.h9_title {
......@@ -68,7 +68,7 @@
.h10_title {
font-size: 12px;
font-weight: 400;
color: #3A3A3A;
color: #3a3a3a;
}
.h11_title {
......@@ -92,19 +92,19 @@
.h14_title {
font-size: 14px;
font-weight: 400;
color: #37383A;
color: #37383a;
}
.h15_title {
font-size: 14px;
font-weight: 500;
color: #5850FF;
color: #5850ff;
}
.h16_title {
font-size: 12px;
font-weight: 500;
color: #5850FF;
color: #5850ff;
}
.h17_title {
......@@ -161,20 +161,64 @@
flex-direction: column;
}
.el-message{
z-index: 3000!important;
.el-message {
z-index: 3000 !important;
}
.customConfirm{
.customConfirm {
.el-message-box__btns button:nth-child(2) {
margin-left: 20px;
}
}
.el-message.el-message--error.customMessage{
&>p{
&>p{
.el-message.el-message--error.customMessage {
& > p {
& > p {
white-space: nowrap;
}
}
}
\ No newline at end of file
}
.my-footer {
width: 100%;
position: fixed;
bottom: 0;
height: 64px;
left: 0;
text-align: center;
line-height: 64px;
background: #ffffff;
z-index: 0;
}
.expert-cascader .el-cascader-menu {
max-height: 500px;
}
.my-search-btn {
.el-button--primary.is-plain {
color: #5850ff;
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;
border-color: #3a32e1;
}
}
.loadingClass{
.el-icon-loading{
font-size: 22px;
}
.el-icon-loading,
.el-loading-text{
color: #fff!important;
}
}
<!-- 搜索 -->
<template>
<div class="glsx-combi-form">
<el-form :ref="formRef" :inline="true" :model="formObj" :rules="formRules" size="small" class="glsx-combi-form-block">
<el-form @submit.native.prevent :ref="formRef" :inline="true" :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" :prop="item.name">
<span v-if="!item.isHide && item.tips" class="tips-block" slot="label">
<span class="tips-label">{{ item.label }}</span>
<el-tooltip popper-class="tooltip-class" effect="dark" :content="item.tips" :placement="item.placement || 'top'">
......@@ -12,11 +12,11 @@
{{ 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 }}</span>
</span>
<slot v-if="item.addHtml" :name="item.addHtml" :scope="item"></slot>
<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 || 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)">
<span v-if="item.prepend" slot="prepend">{{ item.prepend }}</span>
<span v-if="item.append" slot="append">{{ item.append }}</span>
</el-input>
......@@ -24,7 +24,7 @@
</div>
<!-- 选择-输入框 -->
<el-input v-else-if="item.type === 'selectInput'" :placeholder="'请输入' + item.selectOption.find(k => k.name === searchSelectObj[item.selectName].attr).label" :maxlength="item.maxlength" v-model.trim="searchSelectObj[item.selectName].value" :clearable="item.isClear || false" :style="{ width: item.inputWidth || defaultWidth }" class="input-with-select">
<el-select v-model="searchSelectObj[item.selectName].attr" :style="{ width: item.selectWidth || (labelWidth + 'px') }" slot="prepend" placeholder="请选择" @change="item.handleSelectChange">
<el-select v-model="searchSelectObj[item.selectName].attr" :style="{ width: item.selectWidth || labelWidth + 'px' }" slot="prepend" placeholder="请选择" @change="item.handleSelectChange">
<el-option v-for="(subItem, subIndex) in item.selectOption" :key="subIndex" :label="subItem.label" :value="subItem.name"></el-option>
</el-select>
</el-input>
......@@ -57,6 +57,11 @@
<el-radio v-for="subItem in item.optionList" :key="subItem[item.optionId]" :label="subItem[item.optionId]">{{ subItem[item.optionLabel] }}</el-radio>
</el-radio-group>
<el-date-picker v-else-if="item.type === 'datePicker'" :disabled="item.isDisabled" v-model="formObj[item.name]" :type="item.dateType || 'daterange'" :style="{ width: item.width || defaultWidth }" :clearable="item.isClear || false" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOption[item.pickerOptions]"></el-date-picker>
<!-- 当存在range-separato,start-placeholder,end-placeholder这几个属性时,日期可以限制,时间不可以限制 -->
<el-date-picker v-else-if="item.type === 'limitDatePicker'" :disabled="item.isDisabled" :value-format="item.valueFormat" :style="{ width: item.selectWidth || defaultWidth }" v-model="formObj[item.name]" :type="item.dateType || 'daterange'" :clearable="item.isClear || false" :placeholder="item.placeholder || '请选择' + item.label" :picker-options="item.customPickerOptions || pickerOption[item.pickerOptions]" @change="e => handleDateChange(e, item)" @focus="e => item.focus(e)"></el-date-picker>
<el-checkbox-group v-else-if="item.type === 'checkbox'" v-model="formObj[item.name]">
<el-checkbox v-for="subItem in item.optionList" :key="subItem[item.optionId]" :label="subItem[item.optionId]" :border="item.border">{{ subItem[item.optionLabel] }}</el-checkbox>
</el-checkbox-group>
<template v-else-if="item.type === 'upload'">
<p class="photo-top-tips">{{ item.topTips }}</p>
<div v-if="!item.isDisabled" :style="{ width: item.width || defaultWidth }">
......@@ -99,10 +104,10 @@
</template>
<slot name="footer"></slot>
</el-form>
<el-dialog v-if="isImgVisible" :append-to-body="true" :modal-append-to-body="true" title="查看" :visible.sync="isImgVisible">
<el-dialog v-if="isImgVisible" :append-to-body="true" :modal-append-to-body="true" title="查看" :visible.sync="isImgVisible">
<div class="dialog-look">
<video v-if="dialogObj.uploadType == 'video'" class="dialog-video" controls>
<source :src="dialogObj.url" type="video/mp4">
<source :src="dialogObj.url" type="video/mp4" />
</video>
<img v-else class="dialog-img" width="100%" :src="dialogObj.url" alt="" />
</div>
......@@ -111,7 +116,7 @@
</template>
<script>
import { beforeRangePickerOptions, afterRangePickerOptions,afterTodayRangePickerOptions } from './common'
import { beforeRangePickerOptions, afterRangePickerOptions, afterTodayRangePickerOptions } from './common'
export default {
name: 'glsx-combi-form',
data() {
......@@ -185,14 +190,17 @@ export default {
selectAddAttr(value, targetItem) {
targetItem.changeAttr && targetItem.changeAttr(value, targetItem)
},
remoteMethod(value){
console.log(value,111)
remoteMethod(value) {
console.log(value, 111)
},
handleInputDown(e, item) {
if (e.keyCode === 13 && item.hasOwnProperty('keyFn')) {
item.keyFn()
}
},
handleDateChange(value, targetItem) {
targetItem.handleDateChange && targetItem.handleDateChange(value, targetItem)
},
handleInputBlur(e, item) {
item.inputBlur && item.inputBlur(e, item)
},
......@@ -358,7 +366,7 @@ export default {
.glsx-combi-form .activity-img {
position: relative;
color: #999999;
background-color: #F7F7F7;
background-color: #f7f7f7;
border: 1px dotted #d9d9d9;
cursor: pointer;
}
......@@ -438,16 +446,16 @@ export default {
/* 图片上传 */
.glsx-combi-form .el-tag.el-tag--info .el-tag__close {
color: #E8E8EA;
color: #e8e8ea;
background-color: #5850ff !important;
}
.glsx-combi-form .el-tag.el-tag--info {
border-color: #5850ff;
}
.glsx-combi-form .el-tag--plain.el-tag--info .el-tag__close:hover {
background-color: #E8E8EA;
background-color: #e8e8ea;
}
.glsx-combi-form .el-tag.el-tag--info .el-tag__close:hover {
background-color: #E8E8EA;
background-color: #e8e8ea;
}
</style>
......@@ -18,11 +18,11 @@ export const fetchConfig = function(isEnv = true) {
// return Promise.resolve(cfg)
// }
return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get(' https://oss-config.test.glsx.com.cn/mock/618f5cc91072f92988f05a26/services/config')
//return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
//return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
}
export const config = {
install(vue, cfg) {
vue.prototype.$config = cfg
}
}
\ No newline at end of file
}
......@@ -19,3 +19,5 @@ start()
export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params)
export const http_brand = params => Vue.prototype.$http_brand(params)
export const http_common = params => Vue.prototype.$http_common(params)
export const request_merchant = params => Vue.prototype.$request_merchant(params)
const staticRoutes = Object.freeze([{
const staticRoutes = Object.freeze([
{
name: 'index',
path: '/inSale/index',
component: resolve => require([`@/views/inSale/index.vue`], resolve),
meta: {}
}, {
},
{
name: 'upgrade',
path: '/inSale/upgrade',
component: resolve => require([`@/views/inSale/upgrade.vue`], resolve),
meta: {}
}, {
},
{
name: 'guestComments',
path: '/inSale/guestComments',
component: resolve => require([`@/views/inSale/guestComments.vue`], resolve),
meta: {}
}, {
},
{
name: 'accountRules',
path: '/inSale/accountRules',
component: resolve => require([`@/views/inSale/accountRules.vue`], resolve),
......@@ -30,17 +34,20 @@ const staticRoutes = Object.freeze([{
path: '/beforeSale/equityList',
component: resolve => require([`@/views/beforeSale/equityList.vue`], resolve),
meta: {}
}, {
},
{
name: 'introduct',
path: '/inSale/introduct',
component: resolve => require([`@/views/inSale/introduct.vue`], resolve),
meta: {}
}, {
},
{
name: 'afterSales',
path: '/afterSales/index',
component: resolve => require([`@/views/afterSales/index.vue`], resolve),
meta: {}
}, {
},
{
name: 'index',
path: '/beforeSale/index',
component: resolve => require([`@/views/beforeSale/index.vue`], resolve),
......@@ -64,5 +71,35 @@ const staticRoutes = Object.freeze([{
component: resolve => require([`@/views/ghPreSale/index.vue`], resolve),
meta: {}
},
{
name: 'writeOffList',
path: '/ghPreSale/index',
component: resolve => require([`@/views/ghPreSale/writeOff/writeOffList`], resolve),
meta: {}
},
{
name: 'addwriteOff',
path: '/ghPreSale/writeOff/addwriteOff',
component: resolve => require([`@/views/ghPreSale/writeOff/addwriteOff`], resolve),
meta: {}
},
{
name: 'writeOffDetail',
path: '/ghPreSale/writeOff/writeOffDetail/:id',
component: resolve => require([`@/views/ghPreSale/writeOff/writeOffDetail`], resolve),
meta: {}
},
{
name: 'index',
path: '/expert/index',
component: resolve => require([`@/views/expert/index.vue`], resolve),
meta: {}
},
{
name: 'detail',
path: '/expert/detail/:id',
component: resolve => require([`@/views/expert/detail.vue`], resolve),
meta: {}
}
])
export default staticRoutes
\ No newline at end of file
export default staticRoutes
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' //权限按钮 (根据权限动态创建)
......@@ -10,13 +11,16 @@ let routes = []
let router = null
let instance = null
Vue.use(GLTable)
Vue.use(ElementUI)
// Vue.use(Table)
// Vue.use(TableColumn)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, request_brand, sign, secret } = await fetchConfig()
const { response, request, request_brand, request_common, request_merchant, sign_common, sign, secret } = await fetchConfig()
// 本地切换域名,不需要Mock上面改动 const => let
// request.baseURL = 'https://scrm.dev.glsx.com.cn'
// request_brand.baseURL = 'https://scrm.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
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
......@@ -26,8 +30,10 @@ export async function bootstrap({ history, common, messenger, globalState, route
Vue.prototype.$defaultStartDate = '2021-07-01'
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_brand = new common.Http({ response, request: request_brand, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: '3c50d4be-7211-45c1-a2c6-9792bbb3c0d9' } })
// Vue.prototype.$http_brand = new common.Http({ response, request: request_brand, sign, secret, alert: message.error, headers: { token: '3c50d4be-7211-45c1-a2c6-9792bbb3c0d9' } })
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 } })
// 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
const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData)
......@@ -51,4 +57,4 @@ function subscribe({ messenger }) {
messenger.subscribe(v => {
// console.log(`监听到子应用${v.from}发来消息:`, v)
})
}
\ No newline at end of file
}
const emoji = [
['微笑', '撇嘴', '色', '发呆', '得意', '流泪', '害羞', '闭嘴'],
['睡', '大哭', '尴尬', '发怒', '调皮', '呲牙', '惊讶', '难过'],
['酷', '囧', '抓狂', '吐', '微笑', '愉快', '白眼', '傲慢'],
['饥饿', '困', '惊恐', '流汗', '憨笑', '大兵', '奋斗', '咒骂'],
['疑问', '嘘', '晕', '折磨', '衰', '骷髅', '敲打', '再见'],
['擦汗', '抠鼻', '鼓掌', '糗大了', '坏笑', '左哼哼', '右哼哼', '哈欠'],
['鄙视', '委屈', '快哭了', '阴险', '亲亲', '吓', '可怜', '菜刀'],
['西瓜', '啤酒', '篮球', '乒乓', '咖啡', '饭', '猪头', '玫瑰'],
['凋谢', '示爱', '爱心', '心碎', '蛋糕', '闪电', '炸弹', '刀'],
['足球', '瓢虫', '便便', '月亮', '太阳', '礼物', '拥抱', '强'],
['弱', '握手', '胜利', '抱拳', '勾引', '拳头', '差劲', '爱你'],
['NO', 'OK', '爱情', '飞吻', '跳跳', '发抖', '怄火', '转圈'],
['磕头', '回头', '跳绳', '投降', '挥手', '激动', '街舞', '左太极'],
['右太极', '嘿哈', '捂脸', '奸笑', '机智', '皱眉', '耶', '社会社会'],
['让我看看', '666', '红包', '蜡烛', '烟花', '福', '庆祝', '爆竹']
]
export default emoji
......@@ -38,44 +38,51 @@ util.getDateStr = function(num) {
let now = new Date()
now.setDate(now.getDate() + num)
util.dateFormat(now)
// let y = now.getFullYear()
// let m = (now.getMonth() + 1) < 10 ? '0' + (now.getMonth() + 1) : (now.getMonth() + 1)
// let d = now.getDate() < 10 ? '0' + now.getDate() : now.getDate()
// let y = now.getFullYear()
// let m = (now.getMonth() + 1) < 10 ? '0' + (now.getMonth() + 1) : (now.getMonth() + 1)
// let d = now.getDate() < 10 ? '0' + now.getDate() : now.getDate()
// return y + "-" + m + "-" + d
return util.dateFormat(now)
}
util.getExplorer = function() {
var ua = navigator.userAgent.toLocaleLowerCase();
var browserType = null;
var ua = navigator.userAgent.toLocaleLowerCase()
var browserType = null
if (ua.match(/msie/) != null || ua.match(/trident/) != null) {
browserType = "IE";
browserType = 'IE'
} else if (ua.match(/firefox/) != null) {
browserType = "火狐";
browserType = '火狐'
} else if (ua.match(/ubrowser/) != null) {
browserType = "UC";
browserType = 'UC'
} else if (ua.match(/opera/) != null) {
browserType = "欧朋";
browserType = '欧朋'
} else if (ua.match(/bidubrowser/) != null) {
browserType = "百度";
browserType = '百度'
} else if (ua.match(/metasr/) != null) {
browserType = "搜狗";
browserType = '搜狗'
} else if (ua.match(/tencenttraveler/) != null || ua.match(/qqbrowse/) != null) {
browserType = "QQ";
browserType = 'QQ'
} else if (ua.match(/maxthon/) != null) {
browserType = "遨游";
browserType = '遨游'
} else {
browserType = '谷歌'
}
return browserType
}
util.debounce=(fn,timer)=> {
let timeout = null;
return function () {
clearTimeout(timeout);
timeout = setTimeout(() => {
fn.apply(this, arguments);
}, timer);
};
util.debounce = (fn, timer) => {
let timeout = null
return function() {
clearTimeout(timeout)
timeout = setTimeout(() => {
fn.apply(this, arguments)
}, timer)
}
}
util.openUrl = function(url) {
const link = document.createElement('a')
link.href = url
link.target = '_blank'
link.rel = 'opener'
link.click()
}
export default util
\ No newline at end of file
export default util
......@@ -295,7 +295,7 @@ export default {
}
],
invoicePrice: [{ required: true, message: '请输入车辆价格', trigger: 'change' }],
// vehicleColor: [{ required: true, message: '请输入车身颜色', trigger: 'change' }],
vehicleColor: [{ required: true, message: '请输入车身颜色', trigger: 'change' }],
vehicleBrandId: [{ required: true, message: '请选择车品牌', trigger: 'change' }],
vehicleSubBrandId: [{ required: true, message: '请选择车子品牌', trigger: 'change' }],
vehicleSeriesId: [{ required: true, message: '请选择车系', trigger: 'change' }],
......@@ -979,9 +979,9 @@ export default {
let arrt4 = `attributes[${blackArr[i][j].index}].attributeDTOList[${j}].sort`
let obj = {
[arrt1]: blackArr[i][j].value.attributeGroup,
[arrt2]: blackArr[i][j].value.attributeName,
[arrt2]: blackArr[i][j].value.attributeName == 'afterTireScale' ? 'tireScale' : blackArr[i][j].value.attributeName,
[arrt3]: this.priceFormat(blackArr[i][j].value.attributeName, blackArr[i][j].value.attributeValue),
[arrt4]: blackArr[i][j].value.sort
[arrt4]: blackArr[i][j].value.attributeName == 'afterTireScale' ? 1 : blackArr[i][j].value.sort
}
newParaArr.push(obj)
}
......@@ -992,7 +992,6 @@ export default {
concactArr.forEach(item => {
this.formatProduct = Object.assign(this.formatProduct, item)
})
// console.log(this.formatProduct, '自选权益')
} else {
concactArr.forEach(item => {
this.autoFormatProduct = Object.assign(this.autoFormatProduct, item)
......@@ -1135,7 +1134,7 @@ export default {
// var idxPrice = this.editForm.attributeList.findIndex(i => i.attributeName == 'additional_price')
// this.editForm.attributeList[idxPrice].attributeValue = this.editForm.attributeList[idxPrice].attributeValue ? (this.editForm.attributeList[idxPrice].attributeValue / 100).toFixed(2) : ''
// }
this.editForm.vehicle.billingDate = this.editForm.vehicle.billingDate ? new Date(this.editForm.vehicle.billingDate) : ''
this.editForm.effectiveDate = this.editForm.effectiveDate ? new Date(this.editForm.effectiveDate) : ''
if ([2, 3, 4].includes(this.routeInfo.addOrEdit)) {
......@@ -1160,13 +1159,29 @@ export default {
}
this.editForm.packageCode && this.packageAttr(true, productArrData, res)
const spaItem = this.baseData.agreeList.find(item => item.id == this.editForm.specialAppointId)
if(spaItem){
if (spaItem) {
this.editForm.specialAppoint = spaItem.spaContent
}
})
},
getPackageList() {
this.$apis.beforeSale.getPackageListApi({}).then(res => {
res.forEach((item, index) => {
let obj = null
let id = -1
item.groupAttributeList.forEach((e, idx) => {
if (e.groupName == 'tireScale') {
if (e?.attributeList && e?.attributeList[0]) {
e.attributeList[0].attributeDesc = '规格型号(前轮)'
obj = JSON.parse(JSON.stringify(e))
obj.attributeList[0].attributeDesc = '规格型号(后轮)'
obj.attributeList[0].attributeName = 'afterTireScale'
id = idx
}
}
})
if (id > -1) item.groupAttributeList.splice(id + 1, 0, obj)
})
this.toTestProductData(res)
})
},
......@@ -1194,7 +1209,10 @@ export default {
if (item.attributeName.includes('price')) {
item.attributeValue = item.attributeValue / 100
}
if(item.attributeName=="buy_car_type"&&item.attributeValue==1){
if (item.attributeName == 'tireScale' && item.sort == 1) {
item.attributeName = 'afterTireScale'
}
if (item.attributeName == 'buy_car_type' && item.attributeValue == 1) {
this.compensationNameDisable = true
}
this.productModal.vip[item.attributeName] = item.attributeValue
......@@ -1226,7 +1244,10 @@ export default {
} else if (item.attributeName == 'planId') {
this.getCase(parseInt(item.attributeValue))
}
if(item.attributeName=="buy_car_type"&&item.attributeValue==1){
if (item.attributeName == 'tireScale' && item.sort == 1) {
item.attributeName = 'afterTireScale'
}
if (item.attributeName == 'buy_car_type' && item.attributeValue == 1) {
this.compensationNameDisable = true
}
this.productModal[targetItem.idName][item.attributeName] = item.attributeValue
......@@ -1246,7 +1267,7 @@ export default {
if (ele.attributeName == 'effective_date') {
ele.disabled = true
}
if (ele.attributeName == 'buy_car_type'&&ele.attributeValue==1) {
if (ele.attributeName == 'buy_car_type' && ele.attributeValue == 1) {
ele.disabled = true
}
})
......
<template>
<div class="ly-emotion">
<slot></slot>
</div>
</template>
<script>
import emoji from '@/util/emo'
export default {
name: 'ly-emotion',
mounted() {
const name = this.$el.innerHTML
const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(name)) + 1
if (index < 10) {
index = '00' + index
} else if (index >= 10 && index < 100) {
index = '0' + index
}
let imgHTML = `<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png">`
this.$nextTick(() => {
this.$el.innerHTML = imgHTML
})
}
}
</script>
<style scoped>
.ly-emotion {
display: inline-block;
}
.ly-static-emotion {
width: 24px;
height: 24px;
display: inline-block;
}
</style>
<template>
<div>
<div class="emotion-box" :style="{ height: height + 'px' }">
<div class="emotion-box-line" v-for="(line, i) in list" :key="i">
<emotion class="emotion-item" v-for="(item, i) in line" :key="i" @click.native="clickHandler(item)">{{ item }}</emotion>
</div>
</div>
</div>
</template>
<script>
import emoji from '@/util/emo'
import Emotion from './Emotion'
export default {
props: {
height: {
type: Number,
default: 200
}
},
data() {
return {
list: emoji
}
},
methods: {
clickHandler(i) {
let emotion = `${i}`
this.$emit('emotion', emotion)
}
},
components: {
Emotion
}
}
</script>
<style scoped lang="scss">
.emotion-box {
z-index: 2004;
background-color: #fff;
border-radius: 2px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.15);
width: 300px;
box-sizing: border-box;
padding: 5px;
overflow: hidden;
overflow-y: auto;
}
.emotion-box-line {
display: flex;
}
.emotion-item {
flex: 1;
text-align: center;
cursor: pointer;
line-height: 23px;
/deep/ {
img {
width: 24px;
-webkit-user-select: none;
cursor: default;
pointer-events: none;
}
}
}
</style>
<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>
</el-form-item>
</el-form>
</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>
</div>
</template>
<script>
import Vue from 'vue'
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'
export default {
name: 'expert_detail',
components: {
WelcomeWords,
SelectMember,
glsxDialog
},
data() {
return {
size: 'small',
eventBus: new Vue(),
clientType: '升级客户',
expertId: '',
btnList: [
{
id: 1,
name: '表情',
funcName: '',
type: 'expression',
limitSize: 10
},
{
id: 2,
name: '图片',
funcName: '',
type: 'img',
limitSize: 10
},
{
id: 3,
name: '昵称',
type: 'nickname',
funName: 'nickname'
},
{
id: 4,
name: '活动',
type: 'acivity',
funName: 'activity'
}
// {
// id: 5,
// name: '模板',
// type: 'nickname',
// funName: 'message'
// },
// {
// id: 6,
// name: '插入质保链接',
// type: 'link',
// funName: 'link'
// }
],
membersVisible: false,
selectData: [],
basicForm: {},
selectPerson: null,
numberTypeList: []
}
},
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.getTypeList()
},
methods: {
getTypeList() {
this.$apis.expert.getMenberType({ dictType: 'operation_type' }).then(res => {
if (res) {
this.numberTypeList = res
}
})
},
getDetail(id) {
this.$apis.expert.expertDetail({ id }).then(res => {
if (res?.id) {
this.selectPerson = res
this.$refs.welcome.setDetail(res.welcomeInfo)
this.clientType = res.businessTypeName
}
})
},
delPerson() {
this.selectPerson = null
},
// 成员弹窗
handleConfirm() {
if (this.$refs.membersForm.selectPerson) {
this.selectPerson = this.$refs.membersForm.selectPerson
this.openMembers()
} else {
this.$message({
type: 'error',
message: '请选择成员'
})
}
},
openMembers() {
this.membersVisible = !this.membersVisible
},
edit() {
this.$apis.expert.editExpert().then(res => {
if (res) {
this.$router.push({
path: '/expert/index'
})
}
})
},
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'
}
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.$router.push({
path: '/expert/index'
})
}
})
},
handleCancel() {
this.$router.push({
path: '/expert/index'
})
}
}
}
</script>
<style lang="scss" scoped>
.expert-detail {
background-color: #fff;
min-height: calc(100vh - 144px);
margin-bottom: 64px;
/deep/ .checkNumber {
padding: 8px 12px;
& > span {
margin-left: 4px;
}
}
.numberDialog {
/deep/ .el-dialog__header {
height: 56px;
padding: 0 20px;
line-height: 56px;
font-size: 18px;
font-weight: 600;
color: #000000;
.el-dialog__headerbtn {
top: 17px;
}
}
/deep/ .el-dialog__body {
padding-top: 0;
}
/deep/ .el-dialog__footer > div {
display: flex;
flex-direction: row-reverse;
.el-button:first-child {
margin-left: 16px;
}
}
}
.header {
height: 56px;
font-size: 16px;
color: #333;
font-weight: 600;
border-bottom: 1px solid #d8d8d8;
line-height: 56px;
padding: 0 24px;
.tip {
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
margin-left: 8px;
}
}
.detail-wrap {
padding: 32px 20px;
min-height: 520px;
.client {
color: #333;
}
.tag-info {
display: inline-block;
border: 1px solid #e8e8ea !important;
border-radius: 4px;
min-width: 78px;
padding: 0 8px;
height: 28px;
line-height: 28px;
text-align: center;
.name {
margin: 0 5px;
}
.person {
color: #75acff;
}
.del {
cursor: pointer;
}
}
.depart-name {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
line-height: 20px;
margin-left: 8px;
}
.form {
/deep/.el-form-item {
&:nth-child(-n+2){
height: 36px;
}
// height: 36px;
line-height: 36px;
margin-bottom: 20px;
& > .el-form-item__label {
padding: 0;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333;
}
}
}
.tips-text {
margin-top: 8px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 24px;
}
}
}
</style>
......@@ -24,14 +24,14 @@
<!-- 表格区域 开始 -->
<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].includes(scope.scope.orderStatus)" fn="查看" type="text" @click="handleEdit(5, scope.scope)">查看</GLButton>
<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].includes(scope.scope.orderStatus)" type="text" @click="handlePdf(scope.scope)">打印</el-button>
<el-button v-if="[2,8,10,11].includes(scope.scope.orderStatus)" style="position: relative;" type="text" @click="handleUpload(scope.scope)">上传资料<span v-show="scope.scope.dataPerfection == 0" class="circule-tips"></span></el-button>
<el-button v-if="[2,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)" fn="修改" type="text" @click="handleEdit(3, 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>
......@@ -363,6 +363,10 @@ export default {
confId: 11,
confName: 'ERP修改失败'
},
{
confId: 12,
confName: 'ERP出单审核中'
}
],
dataPerfectionList: [
{
......@@ -580,10 +584,12 @@ export default {
this.$apis.ghBeforeSale[this.secondObj.apiName](this.secondObj.apiParams).then(res => {
// this.handleSecondCancel()
// this.isTipVisible = true
this.$message({
if(res.code != '0'){
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
}
this.editNotify = res
// clearTimeout(this.timer)
// this.timer = setTimeout(() => {
......
<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>
<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>
</div>
</div>
<div class="box" style="margin-top: 10px">
<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 v-for="(item, index) in info.serviceItemsList" :key="index" class="service-item">
{{ item.serviceItemName }}
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script type="text/ecmascript-6">
import util from '@/util/util'
export default {
name: 'writeOffDetail',
data() {
return {
info: {},
customObj: {
writeOffCode: '核销码',
nullval: '',
reporterName: '报案人',
reporterPhone: '报案人联系号码',
reporterDate: '报案日期',
reimbursementDate: '出险日期'
},
handlerObj: {
handlerName: '经办人',
handlerPhone: '经办人联系号码'
}
}
},
mounted() {
this.getDetail(this.$route.params)
},
methods: {
getDetail({ id }) {
this.$apis.beforeSale.getWriteOffDetail({ writeOffCode: id }).then(res => {
if (res.code == '0') {
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 {
height: 36px;
line-height: 36px;
white-space: nowrap;
}
.sevice-box {
width: 800px;
.service-item {
width: 240px;
height: 36px;
background: #f7f7f7;
border: 1px solid #e9e9e9;
display: inline-flex;
align-items: center;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #6c6f71;
line-height: 17px;
padding: 0 12px;
box-sizing: border-box;
margin: 0 20px 20px 0;
}
}
}
.title {
font-family: PingFangSC-Medium;
font-size: 16px;
color: #333333;
font-weight: 700;
}
.header {
border-bottom: 1px solid #eeeeee;
height: 60px;
background-color: #fff;
line-height: 60px;
padding: 0 20px;
}
.custom-info {
height: 220px;
padding: 20px;
box-sizing: border-box;
.info {
width: 950px;
}
}
.handler-info {
padding: 20px;
}
}
</style>
<template>
<div class="writeOff">
<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>
</div>
<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>
</div>
</GLTable>
</div>
</div>
</template>
<script type="text/ecmascript-6">
import glsxCombiForm from '@/components/glsx-combi-form'
import util from '@/util/util'
export default {
name: 'writeOffList',
data() {
return {
sizeList: [5, 10, 20, 30, 40],
getListApi: this.$apis.beforeSale.getWriteOffList,
batchListSearch: {
searchText: '',
activeTime: []
},
searchForm: {},
writeOffForm: [
{
label: '搜索内容',
name: 'searchText',
type: 'input',
placeholder: '请输入车主姓名、核销码、合同号',
isClear: true
},
{
label: '提交时间',
name: 'activeTime',
type: 'datePicker',
valueFormat: 'yyyy-MM-dd',
pickerOptions: 'beforeRangePickerOptions',
isClear: true
}
],
// 序号、核销码、客户名、合同号、价格区间、门店提交时间、服务名称、操作
batchTableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '核销码',
prop: 'writeOffCode',
width: 120,
formatter: cellValue => {
return cellValue.writeOffCode || '-'
}
},
{
label: '客户名',
prop: 'reporterName',
width: 200,
formatter: cellValue => {
return cellValue.reporterName || '-'
}
},
{
label: '合同号',
prop: 'contractNo',
width: 200,
formatter: cellValue => {
return cellValue.contractNo || '-'
}
},
{
label: '价格区间',
prop: 'priceSection',
width: 200,
formatter: cellValue => {
return cellValue.priceSection || '-'
}
},
{
label: '门店提交时间',
prop: 'commitTime',
width: 200,
formatter: cellValue => {
return cellValue.commitTime ? util.dateFormat(cellValue.commitTime, 'YYYY-MM-DD HH:mm:ss') : '-'
}
},
{
label: '服务名称',
prop: 'serviceName',
formatter: cellValue => {
return cellValue.serviceName || '-'
}
},
{
label: '操作',
prop: '',
width: '100px',
fixed: 'right',
addHtml: 'table-btns'
}
]
},
batchPageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }
}
},
components: {
glsxCombiForm
},
mounted() {},
methods: {
handleView({ writeOffCode }) {
this.$router.push(`/ghPreSale/writeOff/writeOffDetail/${writeOffCode}`)
},
beforeSearchFn() {
return new Promise((resolve, reject) => {
this.searchForm = { ...this.setParams() }
resolve()
})
},
setParams() {
const params = {}
if (Array.isArray(this.batchListSearch.activeTime) && this.batchListSearch.activeTime.length > 0) {
params.commitTimeStart = util.dateFormat(this.batchListSearch.activeTime[0]) + ' 00:00:00'
params.commitTimeEnd = util.dateFormat(this.batchListSearch.activeTime[1]) + ' 23:59:59'
}
params.searchText = this.batchListSearch.searchText
return params
},
handleExport() {
const parmas = { ...this.setParams() }
this.$apis.beforeSale.exportWriteOffData(parmas).then(({ code, data, message }) => {
if (code == '0') {
var a = document.createElement('a')
a.setAttribute('id', 'exportToExport')
a.setAttribute('href', data)
a.setAttribute('target', '_blank')
document.body.appendChild(a)
a.click()
} else {
this.$message.error(message)
}
})
},
handleSearch() {
this.$refs.writeOffTable.refreshTable()
},
handleReset(type) {
this.batchListSearch = {
searchText: '',
activeTime: []
}
if (type === 'reset') {
this.handleSearch()
}
},
addWriteOff(type) {
this.$router.push('/ghPreSale/writeOff/addwriteOff')
}
}
}
</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;
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!