Commit 3a144e91 by 前端

Merge branch 'v3.11.0' into 'master'

0607续保权益和无忧卡管理 版本V3.11.0

See merge request !32
2 parents 93152940 bb324e28
......@@ -12,11 +12,10 @@
"dayjs": "^1.10.7",
"el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5",
"glsx-common": "^1.4.6",
"glsx-common": "^2.1.0",
"glsx-components": "^1.5.2",
"lodash": "^4.17.21",
"vue": "^2.6.10",
"vue-quill-editor": "^3.0.6",
"vue-router": "^3.1.3",
"vuex": "^3.1.2"
},
......@@ -33,9 +32,11 @@
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-vue": "^5.0.0",
"node-sass": "^4.14.1",
"number-precision": "^1.6.0",
"prettier": "^1.19.1",
"sass-loader": "^8.0.0",
"vue-cli-plugin-element": "^1.0.1",
"vue-quill-editor": "^3.0.6",
"vue-template-compiler": "^2.6.10"
},
"browserslist": [
......
......@@ -25,8 +25,20 @@ const downLoads = params => {
data: params
})
}
const getTypelistApi = params => {
params.method =`${defaultPath}service.package.select.get`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getWorryBatcnList,
addCards,
downLoads
downLoads,
getTypelistApi
}
......@@ -259,7 +259,6 @@ const checkOrderApi = params => {
})
}
// 核赔审核
const checkClaimsOrderApi = params => {
params.method = 'scrm.api.equity.service.claims.audit'
......@@ -282,7 +281,6 @@ const cancelClaims = params => {
})
}
// 定损保存草稿
const saveCG = params => {
params.method = 'scrm.api.equity.service.claims.merchant.lossDeter.draft.or.commit'
......@@ -348,4 +346,15 @@ const getMerchantApi = params => {
sign: true
})
}
export default {getMerchantApi,getMidMerchantApi,getBigMerchantApi,saveSign,saveClaimsCG,saveCG,cancelClaims,checkClaimsOrderApi,checkOrderApi,getOrderOherInfo,uploadImgApi,getGHCountApi,getGHPhoneImageApi,getGHattachmentApi,getGHClaimsDetailApi,getGHhistoryListApi,checkGHClaimsListApi,exportGHClaimsListApi,getGHClaimFollowsListApi,addGHClaimFollowsListApi,getGHClaimsListApi,getclaimsList, getclaimsCount, resubmitOrder, commitClaimsOrder, getClaimsDetail, exportClaimsData, checkContractNo, getDetailByWOCode, getBankList, getCityList, getAccountInfo }
//广汇续保定损审核接口
const renewalAudit = params => {
params.method = 'scrm.api.equity.service.claims.renewal.audit'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
export default { renewalAudit, getMerchantApi, getMidMerchantApi, getBigMerchantApi, saveSign, saveClaimsCG, saveCG, cancelClaims, checkClaimsOrderApi, checkOrderApi, getOrderOherInfo, uploadImgApi, getGHCountApi, getGHPhoneImageApi, getGHattachmentApi, getGHClaimsDetailApi, getGHhistoryListApi, checkGHClaimsListApi, exportGHClaimsListApi, getGHClaimFollowsListApi, addGHClaimFollowsListApi, getGHClaimsListApi, getclaimsList, getclaimsCount, resubmitOrder, commitClaimsOrder, getClaimsDetail, exportClaimsData, checkContractNo, getDetailByWOCode, getBankList, getCityList, getAccountInfo }
import { http } from '@/main'
const CUR_BASE_URL = 'rop-scrm-equity/router'
const getContractListApi = params => {
params.method = `scrm.api.equity.service.contract.template.list`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
const saveContractTemplateApi = params => {
params.method = `scrm.api.equity.service.contract.template.update`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
const getContractDetailApi = params => {
params.method = `scrm.api.equity.service.contract.template.detail`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
const printContractApi = params => {
params.method = `scrm.api.equity.service.contract.template.printTest`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
export default {
getContractListApi,
saveContractTemplateApi,
getContractDetailApi,
printContractApi
}
\ No newline at end of file
import { http } from '@/main'
const CUR_BASE_URL = 'rop-scrm-equity/router'
const get4SList = params => {
params.method = `scrm.api.carlife.merchant.listWithPageByCurMerchant`
......@@ -71,6 +72,87 @@ const getEquityDetail = params => {
})
}
const getServicesItemsList = params => {
params.method = `scrm.api.equity.service.items.pages`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
const exportServicesItemsApi = params => {
params.method = `scrm.api.equity.service.items.pages.export`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const createCommonConfig = params => {
params.method = `scrm.api.equity.service.items.common.config.insert.or.update`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
const getCommonConfig = params => {
params.method = `scrm.api.equity.service.items.common.config.list`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
const addServicesProject = params => {
params.method = `scrm.api.equity.service.items.insert.or.update`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
const getServiceDetailApi = params => {
params.method = `scrm.api.equity.service.items.detail`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
const getSpecificaListApi = params => {
params.method = `scrm.api.equity.service.items.grade.list`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
const addGradeApi = params => {
params.method = `scrm.api.equity.service.items.grade.insert.or.update`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
export default {
get4SList,
getEquityList,
......@@ -78,5 +160,13 @@ export default {
getServiceList,
craeteEquity,
updateEquity,
getEquityDetail
getEquityDetail,
getServicesItemsList,
exportServicesItemsApi,
createCommonConfig,
getCommonConfig,
addServicesProject,
getServiceDetailApi,
getSpecificaListApi,
addGradeApi
}
\ No newline at end of file
......@@ -541,4 +541,20 @@
margin-left: 8px;
}
}
}
.global-title {
padding: 0 20px;
font-size: 20px;
font-weight: 600;
height: 60px;
line-height: 60px;
border-bottom: 1px solid #d8d8d8;
color: #333;
}
.required-field::before {
content: "*";
color: #f56c6c;
margin-right: 4px;
}
\ No newline at end of file
<template>
<div class="editor-ctnr">
<label v-if="label" for="" :class="['content-label', {'required-field': required}]">{{label}}</label>
<div :class="['editor',{'disabled-editor': disabled}]">
<quill-editor placeholder="请输入" ref="myQuillEditor" class="quill" v-model="value" :options="editorOption" @change="$emit('change', $event.html)"></quill-editor>
<div class="extend-bar" v-if="operateList && operateList.length">
<i v-for="item in operateList" :key="item.key" class="el-icon-circle-plus extend-icon" @click="insertContent(item.name, item.key, -1)">{{ item.name }}</i>
</div>
</div>
</div>
</template>
<script>
import { quillEditor, Quill } from 'vue-quill-editor'
import Label from '@/util/quillTool'
Quill.register(Label, true)
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import { cpSync } from 'fs'
export default {
name: 'FoldFrame',
components:{
quillEditor,
},
model: {
prop: 'value',
event: 'change'
},
props: {
required: {
type: Boolean,
default: false
},
value: {
type: Object
},
label:{
type: String,
default: '',
},
operateList: {
type: Array,
default: ()=>{
return []
},
},
disabled: {
type: Boolean,
default: false
},
editorOption: {
type: String,
default: ()=>{
return {
placeholder: '请输入内容',
modules: {
toolbar: {
container: [
['bold', 'italic', 'underline', 'strike'],
// [{ list: 'ordered' }],
// [{ script: 'sub' }, { script: 'super' }],
[{ color: [] }, { background: [] }],
[{'indent': '-1'}, {'indent': '+1'}],
// [{ align: [] }],
[{ size: ['small', false, 'large', 'huge'] }],
// ['clean']
// ['link', 'image']
],
}
}
}
}
}
},
data() {
return {
}
},
mounted(){
if(this.disabled) this.$refs.myQuillEditor.quill.enable(false);
},
methods: {
insertContent(name, key, index){
let quill = this.$refs.myQuillEditor.quill;
let length = index >-1 ? index : quill.selection.savedRange.index
quill.insertEmbed(length, 'label', {name, key});
quill.setSelection(length + 1);
},
compare (attr,rev) {
if(rev == undefined){
rev = 1;
}else{
rev = (rev) ? 1 : -1;
}
return (a,b) => {
a = a[attr];
b = b[attr];
if(a < b){
return rev * -1;
}
if(a > b){
return rev * 1;
}
return 0;
}
},
replaceText(){
let quill = this.$refs.myQuillEditor.quill;
if(!quill.container.innerText || !this.operateList?.length) return
let num = 0
const offsetArr = []
this.operateList.forEach(item => {
let subStr = item.key
let offset = 0;
do{
offset = quill.getText().indexOf(subStr, offset);
if(offset != -1){
// this.insertContent(item.name, subStr, offset)
// num = offsetArr.filter((item)=>{
// return item < offset
// }).length
/*** 为什么加num? 我也不知道,大概是插入一个自定义节点的话,就要加1,
所以在offset为100要插入节点时,就要判断(位置100)前面插入了多少自定义节点 ***/
// quill.updateContents([ //相当于replace内容
// { retain: offset + num },
// { delete: subStr.length },
// { insert: { label: {name: item.name, key: subStr} } }
// ]);
offsetArr.push({...item, offset})
offset += subStr.length
}
}while(offset != -1)
})
let arr = offsetArr.sort(this.compare('offset', true))
arr.forEach((item,index)=>{
let realOffset = item.offset - num + index
if(realOffset==0) {
quill.deleteText(0,item.key?.length || 0)
this.insertContent(item.name, item.key, 0)
}else{
quill.updateContents([
{ retain: realOffset },
{ delete: item.key.length },
{ insert: { label: {name: item.name, key: item.key} } }
]);
}
num += item.key.length
})
},
}
}
</script>
<style lang="scss" scoped>
.editor-ctnr{
width: 100%;
height: 100%;
display: flex;
.content-label{
flex-shrink: 0;
width: 154px;
display: inline-block;
vertical-align: top;
height: 20px;
font-weight: 400;
font-size: 14px;
color: #333333;
text-align: right;
line-height: 20px;
}
.editor{
display: inline-block;
background-color: #fff;
width: 100%;
height: 100%;
.quill{
width: 100%;
height: 100%;
background-color: #fff;
border-color: #E5E5E5;
/deep/ .ql-formats{
margin-right: 0;
display: inline-flex;
align-items: center;
&:nth-child(2){
margin-bottom: 6px;
}
&:nth-child(4){
.ql-picker-label{
display: flex;
align-items: center;
width: 80px;
}
}
}
/deep/ .ql-toolbar.ql-snow, /deep/ .ql-container.ql-snow{
border-color: #E5E5E5;
}
/deep/ .ql-label{
color: #26a2ff;
}
}
.extend-bar{
width: 100%;
padding: 0 20px;
line-height: 40px;
margin-top: -1px;
background: #FAFBFE;
border: 1px solid #E5E5E5;
box-sizing: border-box;
border-radius: 0 0 4px 4px;
border-top: none;
.extend-icon{
cursor: pointer;
margin-right: 10px;
&::before{
// font-size: 16px;
margin-right: 4px;
}
font-size: 14px;
color: #3f3b3b;
}
}
}
/deep/ .disabled-editor{
.ql-snow, .ql-editor, .ql-editor p, .ql-formats button{
background-color: #F5F7FA;
cursor: not-allowed;
}
}
}
</style>
\ No newline at end of file
<template>
<div class="upload-ctnr">
<label v-if="name" :class="['label',{'required-field': required}]" for="">{{name}}</label>
<div class="upload-wrap" :style="defaultStyle">
<img v-if="url" class="image" :src="url" alt="" />
<div v-else class="add-img">
<input type="file" class="file" id="file" ref="input" @change="upload" accept="image/png, image/jpeg, image/gif, image/jpg" />
<i class="el-icon-plus add"></i>
<p>上传照片</p>
</div>
<div class="operate" v-if="url">
<div class="btn-wrap">
<i class="el-icon-view" @click="handleLook"></i>
<i v-if="!disabled" class="el-icon-delete del-icon" @click="del"></i>
</div>
</div>
</div>
<el-dialog class="image-dialog" :visible.sync="dialogVisibleImg" width="30%">
<big-view ref="viewForm" v-if="dialogVisibleImg" :dialogSrc="url" dialogType="img"></big-view>
</el-dialog>
</div>
</template>
<script>
import bigView from '@/components/big-view'
export default {
name: 'Upload',
components: {
bigView
},
props: {
required: {
type: Boolean,
default: false
},
name: {
type: String,
default: ''
},
disabled: {
type: Boolean,
default: false
},
url: {
type: String,
default: ''
},
attr: {
type: String,
default: ''
},
defaultStyle: {
type: Object,
default: ()=>{
return {}
}
}
},
data() {
return {
dialogVisibleImg: false
}
},
methods: {
handleLook(){
this.dialogVisibleImg = true
},
upload(e) {
const file = e.target.files[0]
const reader = new FileReader()
reader.readAsDataURL(file)
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
const base64 = file.name.split('.').pop() + '@' + arrBase64[1]
this.$apis.claims.uploadImgApi({ file: base64, fileType: 'image' }).then(res => {
this.$emit('uploadSuccess', {attr : this.attr, url: res})
})
}
},
del(){
this.$emit('delImage', {attr : this.attr})
}
}
}
</script>
<style lang="scss" scoped>
.upload-ctnr{
display: flex;
.label{
display: inline-block;
vertical-align: top;
width: 154px;
height: 20px;
font-size: 14px;
color: #333333;
text-align: right;
line-height: 20px;
box-sizing: border-box;
}
.upload-wrap{
display: inline-flex;
border: 1px dashed #00000026;
box-sizing: border-box;
width: 104px;
height: 104px;
background: #0000000a;
border-radius: 4px;
position: relative;
&:hover{
.operate{
display: block;
}
}
.image{
width: 100%;
height: 100%;
z-index: 2;
position: relative;
}
.add-img{
width: 100%;
height: 100%;
cursor: pointer;
display: inline-flex;
flex-direction: column;
justify-content: center;
align-items: center;
color: #666666;
position: relative;
.file{
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1;
position: absolute;
opacity: 0;
}
.add {
font-size: 18px;
}
p {
height: 32px;
line-height: 32px;
}
}
.operate{
display: none;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.4);
border-radius: 4px;
z-index: 5;
.btn-wrap{
color: #fff;
position: absolute;
transform: translate(-50%, -50%);
top: 50%;
left: 50%;
.del-icon{
margin-left: 12px;
}
i{
font-size: 16px;
cursor: pointer;
}
}
}
}
}
</style>
\ No newline at end of file
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-11-28 10:12:36
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-11-28 10:25:09
* @FilePath: \live\src\components\big-view\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="view-panel">
<img :src="dialogSrc" width="100%" v-if="dialogType == 'img'" />
<video width="100%" autoplay controls :src="dialogSrc" v-else></video>
</div>
</template>
<script>
export default {
name: 'view',
data() {
return {
dialogVisibleImg: true
}
},
props: {
dialogType: String,
dialogSrc: String
},
methods: {
test() {
console.log('点击了按钮')
this.$messenger.send({ message: { from: 11, message: '11111' } })
}
}
}
</script>
......@@ -4,12 +4,12 @@
<el-form :ref="formRef" :disabled="formDisable" :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">
<span v-if="!item.isHide && item.tips" class="tips-block" slot="label">
<span v-if="!item.isHide && item.tips" class="tips-wrap" slot="label">
<span class="tips-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 }}
<el-popover :effect="item.effect ? item.effect : 'dark'" :placement="item.placement || 'top'" width="200" trigger="hover" :content="item.tips">
<img slot="reference" class="tips-icon" :src="require('@/assets/tip.png')" />
</el-popover>
:
</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>
......@@ -326,7 +326,7 @@ export default {
background-color: #fff;
}
/* 提示图标 */
.glsx-combi-form .tips-block {
.glsx-combi-form .tips-wrap {
position: relative;
}
.glsx-combi-form .tips-label {
......@@ -335,16 +335,15 @@ export default {
.glsx-combi-form .tips-icon {
position: absolute;
display: inline-block;
width: 12px;
height: 12px;
width: 14px;
height: 14px;
top: 3px;
right: 14px;
margin-right: 4px;
cursor: pointer;
border: 1px dotted #7f7f7f;
border-radius: 50%;
}
.glsx-combi-form .tips-icon::before {
/* .glsx-combi-form .tips-icon::before {
content: '?';
position: absolute;
width: 8px;
......@@ -352,7 +351,7 @@ export default {
top: -8px;
left: 1px;
font-size: 10px;
}
} */
/* .glsx-combi-form .tips {
margin: 0;
} */
......
......@@ -11,15 +11,20 @@
let cfg = require('./conf.js')
let timeout = 30000 //超时时间
import { Http } from 'glsx-common'
export const fetchConfig = function(isEnv = true) {
export const fetchConfig = function (common) {
// console.log(common);
// console.log(utils);
// let params = { moduleName: 'presale', mockUrl: 'https://oss-config.dev.glsx.com.cn/mock/618f5cc91072f92988f05a26/services/config',env:'test', httpOptions: { Headers: { refererurl: location.href }, request: { timeout: 30000 } } }
// return utils.getConfig(params)
// if (isEnv) {
// let { request } = cfg
// Object.assign(request, { timeout })
// 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' })
// return common.utils.getConfig(params)
}
export const config = {
install(vue, cfg) {
......
......@@ -112,6 +112,18 @@ const staticRoutes = Object.freeze([
path: '/addCode/index',
component: resolve => require([`@/views/addCode/index.vue`], resolve),
meta: {}
}
},
{
name: 'renew',
path: '/GH/Renew/renew',
component: resolve => require([`@/views/GH/Renew/renew.vue`], resolve),
meta: {}
},
{
name: 'detail',
path: '/GH/Renew/detail/:id',
component: resolve => require([`@/views/GH/Renew/detail.vue`], resolve),
meta: {}
},
])
export default staticRoutes
......@@ -11,9 +11,10 @@ let router = null
let instance = null
Vue.use(GLTable).use(GLCombiForm).use(GLTableButton).use(GLDialog)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, request_brand, sign, secret } = await fetchConfig()
let { response, request, request_brand, sign, secret } = await fetchConfig(common)
// request.baseURL = 'https://scrm.dev.glsx.com.cn'
// request_brand.baseURL = 'https://scrm.dev.glsx.com.cn'
// globalState.session.token = 'scrm-base-6358b874-c112-4753-ac00-ec0cce769751-rop'
// request.baseURL = 'http://192.168.1.53:7226'
// request_brand.baseURL = 'http://192.168.1.53:7226'
Vue.prototype.$history = history
......
import NP from 'number-precision'
const gradeObj = {
gradeConfigList: [
{
servicePeriod: '',
priceGrade: '0',
maxPrice: '15',
minPrice: '0',
priceCoefficient: '',
standardShelfCost: '',
standardSalesCost: ''
},
{
servicePeriod: '',
priceGrade: '1',
maxPrice: '30',
minPrice: '15',
priceCoefficient: '',
standardShelfCost: '',
standardSalesCost: ''
},
{
servicePeriod: '',
priceGrade: '2',
maxPrice: '200',
minPrice: '30',
priceCoefficient: '',
standardShelfCost: '',
standardSalesCost: ''
},
],
salePeriodData: [],
serviceGrade: 'A',
serviceOverview: '',
serviceDetail: ''
}
const deepClone = (obj)=> {
// Handle the 3 simple types, and null or undefined or function
if (obj == null || typeof obj !== 'object') return obj
// Handle Date
if (obj instanceof Date) {
const copy = new Date()
copy.setTime(obj.getTime())
return copy
}
// Handle Array or Object
if ((obj instanceof Array) | (obj instanceof Object)) {
const copy = obj instanceof Array ? [] : {}
for (var attr in obj) {
if (obj.hasOwnProperty(attr)) {
copy[attr] = deepClone(obj[attr])
}
}
return copy
}
throw new Error("Unable to clone obj! Its type isn't supported.")
}
export const addGradeItem = (grade='A' , salePeriodList=[])=>{
let _gradeObj = deepClone(gradeObj)
_gradeObj.serviceGrade = grade
salePeriodList = salePeriodList.sort(function(a,b){return a-b});
_gradeObj.salePeriodData = salePeriodList.map(item=>{
return { servicePeriod: item, standardShelfCost: '', standardSalesCost: ''}
})
console.log(_gradeObj)
return _gradeObj
}
export const handleGradeData = (dataFromApi, salePeriodList=[])=>{
console.log(dataFromApi)
const data = deepClone(dataFromApi)
let arr = []
data.forEach(element => {
const { serviceOverview, serviceDetail, serviceGrade, gradeConfigList, id } = element
let _gradeObj = {
id,
serviceOverview,
serviceDetail,
serviceGrade,
gradeConfigList: []
}
const gradeList = ['0','1','2'] //三个区间等级,后端定义的
gradeList.forEach(item => {
const _target = gradeConfigList.find(o => o.priceGrade == item)
let { id, servicePeriod, maxPrice, minPrice, priceCoefficient } = _target || {}
maxPrice = NP.divide(maxPrice || 0, 1000000)
minPrice = NP.divide(minPrice || 0, 1000000)
_gradeObj.gradeConfigList.push({ servicePeriod, priceGrade: item, maxPrice, minPrice, priceCoefficient, id })
})
salePeriodList = salePeriodList.sort(function(a,b){return a-b})
_gradeObj.salePeriodData = salePeriodList.map(item=>{
const _target = element.gradeConfigList.find( o => o.servicePeriod == item)
return { servicePeriod: item, standardShelfCost: NP.divide(_target?.standardShelfCost || 0, 100), standardSalesCost: NP.divide(_target?.standardSalesCost || 0, 100)}
})
arr.push(_gradeObj)
});
return arr
}
\ No newline at end of file
import { Quill } from 'vue-quill-editor'
const Parchment = Quill.imports.parchment;
const Delta = Quill.imports.delta;
class Label extends Parchment.Embed {
static create(value) {
const node = super.create(value.name);
node.setAttribute('keyName', value.key)
node.innerText = value.name;
node.contentEditable = 'false';
// this._addRemovalButton(node, value.key); //创建额外的标签,比如删除键
return node;
}
static value(node) {
return node.childNodes[0].textContent;
}
static _addRemovalButton(node, key) {
// const button = document.createElement('button');
// button.innerText = 'x';
// button.onclick = () => node.remove();
// button.contentEditable = 'false';
// node.appendChild(button);
// Extra span forces the cursor to the end of the label, otherwise it appears inside the removal button
const span = document.createElement('span');
span.setAttribute('keyName', key)
span.innerText = '';
node.appendChild(span);
}
}
Label.blotName = 'label';
Label.tagName = 'SPAN';
Label.className = 'ql-label';
export default Label
// Quill.register(Label);
\ No newline at end of file
<template>
<div class="container">
<div class="global-title">编辑</div>
<div class="main">
<div class="edit-bar">
<FoldFrame :name="item.title" v-for="item in contentList" :key="item.key">
<div v-if="item.type=='img'" class="bar-content">
<div v-if="item.key=='electronicSealUrl'" class="input-content">
<label class="required-field" for="">服务主体:</label>
<el-input size="small" type="text" v-model="contentObj.serviceSubject" ></el-input>
</div>
<Upload :required="true" @uploadSuccess="uploadSuccess" @delImage="delImage" class="upload" :name="item.label+':'" :attr="item.key" :url="contentObj[item.key]" :defaultStyle="{width:'208px'}"></Upload>
<span class="upload-tip">建议高度:48px</span>
</div>
<div v-if="item.type=='richText'" class="bar-content">
<div v-if="item.key=='contractIntroduce'" class="input-content">
<label class="required-field" for="">合同标题:</label>
<el-input size="small" type="text" v-model="contentObj.contractTitle"></el-input>
</div>
<Editor :required="true" :ref="item.key+'Ref'" :operateList="item.key=='useConditions' ? placeholderList : []" :label="item.label" v-model="contentObj[item.key]"></Editor>
</div>
</FoldFrame>
</div>
<div class="footer-btn">
<el-button @click="handelCancel">取消</el-button>
<el-button type="primary" @click="commitTemplate('preview')">预览</el-button>
<el-button type="primary" @click="commitTemplate">提交</el-button>
</div>
</div>
<pdf-dialog :isVisible="isPdfVisible" title="合同" :pdfUrl="pdfUrl" @closeDialog="handlePdfClose"></pdf-dialog>
</div>
</template>
<script>
const errorTipObj = {
contractTitle: '合同标题',
contractIntroduce: '合同介绍',
relevantDefinition: '相关定义',
useConditions: '使用条件',
serviceScope: '服务范围',
exclusionLiability: '除外责任',
serviceData: '服务所需资料',
specialStatement: '特别声明',
serviceSubject: '服务主体'
}
import FoldFrame from './components/FoldFrame'
import Upload from '@/components/Upload'
import Editor from '@/components/Editor'
import pdfDialog from '@/views/beforeSale/pdfDialog'
export default {
name: 'AddTmpl',
components:{
Editor,
Upload,
FoldFrame,
pdfDialog
},
data() {
return {
isPdfVisible: false,
pdfUrl: '',
placeholderList: [],
pdfObj :{
merchantId: '',
packageCode: ''
},
contentObj: {
id: '',
logoUrl: '',
contractTitle: '',
contractIntroduce: '',
relevantDefinition: '',
useConditions: '',
serviceScope: '',
exclusionLiability: '',
serviceData: '',
specialStatement: '',
serviceSubject: '',
electronicSealUrl: ''
},
contentList: [
{
title: 'Logo区域',
label: 'Logo图',
key: 'logoUrl',
type: 'img'
},
// {
// label: '合同标题区域',
// label: '合同标题',
// key: 'contractTitle',
// type: 'input'
// },
{
title: '合同介绍区域',
label: '合同介绍:',
key: 'contractIntroduce',
type: 'richText'
},
{
title: '相关定义区域',
label: '相关定义:',
key: 'relevantDefinition',
type: 'richText'
},
{
title: '使用条件区域',
label: '使用条件:',
key: 'useConditions',
type: 'richText'
},
{
title: '服务范围区域',
label: '服务范围:',
key: 'serviceScope',
type: 'richText'
},
{
title: '除外责任区域',
label: '除外责任:',
key: 'exclusionLiability',
type: 'richText'
},
{
title: '服务所需资料区域',
label: '服务所需资料:',
key: 'serviceData',
type: 'richText'
},
{
title: '特别声明区域',
label: '特别声明:',
key: 'specialStatement',
type: 'richText'
},
{
title: '电子章图片区域',
label: '电子章图片',
key: 'electronicSealUrl',
type: 'img'
},
]
}
},
created(){
},
mounted() {
this.getContractDetail()
},
methods: {
getContractDetail() {
this.$apis.contractManager.getContractDetailApi({id: this.$route.params.id}).then(res => {
if(res && res.templateConfig){
this.placeholderList = res.placeholderList
for(const key in this.contentObj){
this.contentObj[key] = res.templateConfig[key]
}
this.pdfObj = {
merchantId: res.templateConfig.merchantId,
packageCode: res.templateConfig.packageCode
},
this.$nextTick(()=>{
this.$refs.useConditionsRef[0].replaceText()
})
}
})
},
handelCancel(){
this.$router.push('/ContractManager/index')
},
getParams(){
let params = this.$common.utils.deepClone(this.contentObj)
let errorTip = '';
params.useConditions = params.useConditions?.replace(/<span.*?class.*?keyname="(.*?)".*?<\/span>/g,'$1')
for(const key in params){
if(key!='id' && !params[key]){
if(key == 'electronicSealUrl' || key == 'logoUrl'){
errorTip = `请上传${key == 'logoUrl' ? 'Logo图': '电子章图片'}`
}else{
errorTip = `${errorTipObj[key]}不能为空`
}
}
}
if(errorTip) return {status: -1, errorTip}
return params
},
commitTemplate(type){
const params = this.getParams()
if(params.status == -1) return this.$message.error(params.errorTip)
this.$apis.contractManager.saveContractTemplateApi({...params}).then(res => {
if(res){
if(type=='preview'){
this.handlePdf()
}else{
this.$message.success('编辑成功')
this.$router.push('/ContractManager/index')
}
}
})
},
handlePdfClose() {
this.isPdfVisible = !this.isPdfVisible
},
handlePdf() {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
this.$apis.contractManager.printContractApi({ packageCode : this.pdfObj.packageCode , merchantId: this.pdfObj.merchantId }).then(res => {
this.pdfUrl = res
this.handlePdfClose()
loading.close()
})
},
uploadSuccess(e){
this.contentObj[e.attr] = e.url
},
delImage(e){
this.contentObj[e.attr] = ''
},
}
}
</script>
<style lang="scss" scoped>
.container{
background-color: #fff;
.footer-btn{
text-align: center;
margin-top: 16px;
}
.input-content{
display: flex;
align-items: center;
margin-bottom: 24px;
label{
flex-shrink: 0;
width: 154px;
white-space: nowrap;
text-align: right;
font-weight: 400;
font-size: 14px;
color: #333333;
}
/deep/ .el-input__inner{
width: 342px;
}
}
.main{
padding: 10px 20px 32px;
.edit-bar{
.bar-content{
background: #F9F9F9;
padding: 20px;
margin-bottom: 10px;
/deep/ .editor{
width: 935px!important;
}
.upload{
display: inline-block;
}
.upload-tip{
height: 20px;
font-weight: 400;
font-size: 14px;
color: #999999;
vertical-align: bottom;
margin-left: 10px;
}
}
}
}
}
</style>
\ No newline at end of file
<template>
<div>
<div class="bar-title" @click="changeStatus()">
<i class="el-icon-caret-right btn" v-if="!isExpansion"></i>
<i class="el-icon-caret-bottom btn" v-else></i>
<span class="title">{{name}}</span>
</div>
<slot v-if="isExpansion"></slot>
</div>
</template>
<script>
export default {
name: 'FoldFrame',
props: {
name: {
type: String,
default: ''
}
},
data() {
return {
isExpansion: true
}
},
methods: {
changeStatus(){
this.isExpansion = !this.isExpansion
}
}
}
</script>
<style lang="scss" scoped>
.bar-title{
font-weight: 600;
font-size: 14px;
color: #000000d9;
height: 40px;
line-height: 40px;
padding: 0 20px;
cursor: pointer;
.btn{
margin-right: 9px;
font-size: 16px;
}
}
</style>
\ No newline at end of file
<template>
<div class="container">
<div class="find_wrap">
<GLCombiForm ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
</div>
<div class="table_wrapper">
<div class="operate_wrap">
<span class="table_title">合同列表</span>
<!-- <div class="operate_btn">
<el-button :size="size" @click="handleExport">导出</el-button>
</div> -->
</div>
<GLTable ref="equityRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div slot="serviceContent" slot-scope="scope">
<div v-html="scope.scope.serviceContent"></div>
</div>
<span slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</span>
</GLTable>
</div>
<pdf-dialog :isVisible="isPdfVisible" title="合同" :pdfUrl="pdfUrl" @closeDialog="handlePdfClose"></pdf-dialog>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import utils from '../../util/util'
import pdfDialog from '@/views/beforeSale/pdfDialog'
export default {
name: 'equityList',
components:{
pdfDialog
},
data() {
return {
size: 'small',
isPdfVisible: false,
buttonList: [
{
type: 'el-button',
name: row => {
return '打印'
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.handlePdf(row.scope)
}
},
{
type: 'el-button',
name: row => {
return '编辑'
},
attrs: {
type: 'text'
},
listeners: {
click: row => this.editContract(row.scope)
}
}
],
searchForm: {
merchantName: '',
createdDate: '',
updatedDate: ''
},
tableSearchForm: {},
searchFormData: [
{
label: '商户名称',
name: 'merchantName',
type: 'input',
isClear: true,
},
{
label: '创建时间',
name: 'createdDate',
type: 'datePicker',
labelWidth: 95,
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
},
{
label: '更新时间',
name: 'updatedDate',
type: 'datePicker',
labelWidth: 95,
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
}
],
// 表格
getListApi: this.$apis.contractManager.getContractListApi,
tableParams: {
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '合同编号',
prop: 'id',
},
{
label: '商户名称',
prop: 'merchantName'
},
{
label: '商品名称',
prop: 'packageName'
},
{
label: '创建时间',
prop: 'createdDate',
formatter: cellValue => {
return cellValue.createdDate ? dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss') : '--'
}
},
{
label: '更新时间',
prop: 'updatedDate',
formatter: cellValue => {
return cellValue.updatedDate ? dayjs(cellValue.updatedDate).format('YYYY-MM-DD HH:mm:ss') : '--'
}
},
{
label: '操作人',
prop: 'updatedBy',
width: 140
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
}
},
mounted() {
},
methods: {
getParams() {
let params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm?.createdDate?.length) {
params.beginCreateDate = new Date(this.searchForm.createdDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.endCreateDate = new Date(this.searchForm.createdDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
}
if (this.searchForm?.updatedDate?.length) {
params.beginUpdateDate = new Date(this.searchForm.updatedDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.endUpdateDate = new Date(this.searchForm.updatedDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
}
delete params.createdDate
delete params.updatedDate
return {...params}
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
resolve()
})
},
handlePdfClose() {
this.isPdfVisible = !this.isPdfVisible
},
// 打印
handlePdf(row) {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
this.$apis.contractManager.printContractApi({ packageCode : row.packageCode , merchantId: row.merchantId }).then(res => {
this.pdfUrl = res
this.handlePdfClose()
loading.close()
})
},
// 导出
handleExport() {
var params = this.getParams()
this.$apis.serviceConfig.exportEquityApi(params).then(res => {
// window.open(res)
let tempaa = utils.getExplorer()
if (tempaa == 'QQ') {
window.open(res)
} else {
let iframe = document.createElement('iframe')
iframe.style.display = 'none'
iframe.src = res
document.body.appendChild(iframe)
}
})
},
handleSearch() {
this.$refs.equityRef.refreshTable()
},
handleReset() {
this.searchForm = {
serviceName: '',
createdDate: '',
updatedDate: ''
}
this.handleSearch()
},
editContract(row) {
const { id, merchantId } = row || {}
let query = {
id
}
const queryStr = encodeURIComponent(JSON.stringify(query))
this.$router.push('/ContractManager/addTmpl/' + id)
}
}
}
</script>
<style lang="scss" scoped>
.find_wrap {
background: #ffffff;
padding: 20px 20px 2px 20px;
.resetBtn {
background: #ffffff;
color: #5850ff;
border: 1px solid #5850ff;
}
.m-r-l-20 {
margin: 0 20px;
}
}
.table_wrapper {
background: #ffffff;
padding: 0 20px 20px;
}
</style>
\ No newline at end of file
<template>
<div>
<div class="caseDesc-components">
<div class="title">案件补充说明</div>
<div class="list-wrap">
<template v-for="(item,index) in supplementList">
<div :key="index" class="cell">
<div class="widget">
<div class="label">案件说明:</div>
<div class="content">{{item.content}}</div>
</div>
<div class="widget">
<div class="label">提交时间:</div>
<div class="content">{{item.createdDate}}</div>
</div>
</div>
</template>
</div>
</div>
</div>
</template>
<script type="text/ecmascript-6">
export default {
name: 'caseDesc',
props: {
supplementList:Array
},
components: {},
data() {
return {}
},
created() {},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.caseDesc-components {
background: white;
margin-top: 20px;
.title {
padding: 0 20px;
font-size: 16px;
font-weight: bold;
height: 58px;
line-height: 58px;
border-bottom: 1px solid #d8d8d8;
margin: 0 0;
color: #333;
}
.list-wrap {
padding: 32px 20px;
.cell {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 16px;
.widget {
display: flex;
.label {
width: 154px;
height: 20px;
font-weight: 400;
font-size: 14px;
color: #666666;
text-align: right;
}
.content {
width: 408px;
height: 20px;
font-weight: 400;
font-size: 14px;
color: #333333;
}
}
}
}
}
</style>
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-28 09:34:05
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-30 21:17:21
* @FilePath: \scrm-micro-presale\src\views\GH\Renew\components\ClaimsNote\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div>
<div class="caseDesc-components">
<div class="title">定损记录</div>
<div class="list-wrap">
<el-timeline>
<el-timeline-item v-for="(activity, index) in recordList" :key="index" :color="index==recordList.length-1?'#5850FF':''" :timestamp="activity.createdDate">
<div class="inline">
<div class="content">{{ activity.content }}</div>
<div v-if="activity.operation" class="tip">{{ activity.operation }}</div>
</div>
</el-timeline-item>
</el-timeline>
</div>
</div>
</div>
</template>
<script type="text/ecmascript-6">
export default {
name: 'claimsNote',
props: {
recordList:Array
},
components: {},
data() {
return {
activities: [
{
content: '门店提交核赔',
timestamp: '2018-04-12 20:46',
color: '#5850FF',
extra: ''
},
{
content: '定损通过',
timestamp: '2018-04-03 20:46',
extra: '批准金额:1000.00元'
},
{
content: '定损不通过',
timestamp: '2018-04-03 20:46',
extra: '资料不全'
},
{
content: '门店上传发票',
timestamp: '2018-04-03 20:46',
extra: ''
}
]
}
},
created() {},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.caseDesc-components {
background: white;
margin-top: 20px;
.title {
padding: 0 20px;
font-size: 16px;
font-weight: bold;
height: 58px;
line-height: 58px;
border-bottom: 1px solid #d8d8d8;
margin: 0 0;
color: #333;
}
.list-wrap {
padding: 17px 40px;
.inline {
display: flex;
align-items: center;
.content {
font-weight: 400;
font-size: 14px;
color: #1d2129;
}
.tip {
display: inline;
font-weight: 400;
font-size: 14px;
color: #666666;
margin-left: 8px;
}
}
}
}
</style>
......@@ -115,29 +115,9 @@ export default {
label: '适用类型',
name: 'packageCode',
type: 'select',
optionList: [
{
value: 'PC0005',
label: '盗抢全损无忧'
},
{
value: 'PC0006',
label: '轮胎无忧'
},
{
value: 'PC0007',
label: '整车全损无忧'
},
{
value: 'PC0008',
label: '碰撞无忧'
}
],
optionId: 'value',
optionLabel: 'label',
changeAttr:(e)=>{
this.changePgCode(e)
}
optionList: [],
optionId: 'packageCode',
optionLabel: 'packageName'
},
{
type: 'input',
......@@ -169,6 +149,14 @@ export default {
{
value: '3',
label: '3年'
},
{
value: '4',
label: '4年'
},
{
value: '5',
label: '5年'
}
],
optionId: 'value',
......@@ -226,33 +214,43 @@ export default {
}
}
},
created() {
this.getTypelist()
},
mounted() {},
methods: {
changePgCode(e){
const arr = [{
value: '1',
label: '1年'
},
{
value: '2',
label: '2年'
},
{
value: '3',
label: '3年'
}]
const moreArr = [{
value: '4',
label: '4年'
},
{
value: '5',
label: '5年'
}]
const target = this.addDialogFormData.find(item => item.name=='servicePeriod')
target.optionList = (e=='PC0005' || e=='PC0007') ? [ ...arr, ...moreArr] : [...arr]
this.addDialogForm.servicePeriod = ''
getTypelist(){
this.$apis.addWorryFree.getTypelistApi({}).then(res => {
if(!res?.length) return;
let target = this.addDialogFormData.find(item => item.name == 'packageCode')
target.optionList = res
})
},
// changePgCode(e){
// const arr = [{
// value: '1',
// label: '1年'
// },
// {
// value: '2',
// label: '2年'
// },
// {
// value: '3',
// label: '3年'
// }]
// const moreArr = [{
// value: '4',
// label: '4年'
// },
// {
// value: '5',
// label: '5年'
// }]
// const target = this.addDialogFormData.find(item => item.name=='servicePeriod')
// target.optionList = (e=='PC0005' || e=='PC0007') ? [ ...arr, ...moreArr] : [...arr]
// this.addDialogForm.servicePeriod = ''
// },
//批量下载
download(e) {
this.$apis.addWorryFree.downLoads({ id: e.id }).then(res => {
......
......@@ -70,7 +70,7 @@
</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>
<el-input class="arrt_pannel" :disabled="disabled || attr.disabled || (attr.attributeName == 'compensation_name' && compensationNameDisable)" @input="getCurChangeInput($event, item, attr, index, attrindex,1)" 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">
......@@ -127,7 +127,7 @@
</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)" v-model="productModal[item.idName][attr.attributeName]" size="small" :maxlength="attr.maxLength" clearable :placeholder="'请输入' + attr.attributeDesc"></el-input>
<el-input class="arrt_pannel" :disabled="disabled || attr.disabled || (attr.attributeName == 'compensation_name' && compensationNameDisable)" @input="getCurChangeInput($event, item, attr,index, attrindex,2)" 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">
......@@ -973,7 +973,7 @@ export default {
this.compensationNameDisable = false
},
// 自选权益产品套餐处理参数---输入框
getCurChangeInput(e, pack, attr, faIndex, childIndex) {
getCurChangeInput(e, pack, attr, faIndex, childIndex,radio) {
if (!e) {
return
}
......@@ -986,7 +986,8 @@ export default {
}
}
if (attr.attributeName == 'card') {
this.productList[faIndex].groupAttributeList.map(el => {
let _tempArr = radio==2?this.customProductList[faIndex]:this.productList[faIndex]
_tempArr.groupAttributeList.map(el => {
if (el.attributeName == 'service_period') {
el.disabled = true
return el
......
......@@ -232,6 +232,10 @@ export default {
{
label: '卡号',
name: 'cardSeqNo'
},
{
label: '店面名称',
name: 'merchantName'
}
],
handleSelectChange: value => {
......@@ -477,6 +481,15 @@ export default {
return cellValue.effectiveDate ? dayjs(cellValue.effectiveDate).format('YYYY-MM-DD') : '--'
}
},
// {
// label: '退单时间',
// line: 1,
// prop: 'cancelDate',
// width: '130px',
// formatter: cellValue => {
// return cellValue.cancelDate ? dayjs(cellValue.cancelDate).format('YYYY-MM-DD') : '--'
// }
// },
{
label: '服务状态',
prop: 'orderStatus',
......
......@@ -190,6 +190,15 @@ export default {
return cellValue.effectiveDate ? dayjs(cellValue.effectiveDate).format('YYYY-MM-DD') : '--'
}
},
// {
// label: '退单时间',
// line: 1,
// prop: 'cancelDate',
// width: '130px',
// formatter: cellValue => {
// return cellValue.cancelDate ? dayjs(cellValue.cancelDate).format('YYYY-MM-DD') : '--'
// }
// },
{
label: '完成状态',
prop: 'completionStatus',
......
......@@ -4,36 +4,63 @@
<div class="material">
<div class="material-item" v-for="item in materialData" :key="item.name">
<label :class="{ require: item.label }">{{ item.label }}</label>
<el-upload :disabled="pageType == 2" :id="item.name" :ref="item.name + 'Ref'" :file-list="materialForm[item.name]" :list-type="item.listType ? item.listType : 'picture-card'" :class="[pageType == 2 || item.limit == materialForm[item.name].length ? 'hidePlusBtn' : '', 'upload-item']" :limit="item.limit" action="#" :before-upload="e => beforeAvatarUpload(e, item.name)" :on-preview="handlePictureCardPreview" :on-remove="e => handleRemove(e, item.name)" :http-request="e => httpRequest(e, item.name)">
<el-upload :disabled="pageType == 2 || renewDisable" :id="item.name" :ref="item.name + 'Ref'" :file-list="materialForm[item.name]" :list-type="item.listType ? item.listType : 'picture-card'" :class="[ pageType == 2 || item.limit == materialForm[item.name].length ? 'hidePlusBtn' : '', 'upload-item',{'renewDisable':renewDisable&&!materialForm[item.name].length}]" :limit="item.limit" action="#" :before-upload="e => beforeAvatarUpload(e, item.name)" :on-preview="handlePictureCardPreview" :on-remove="e => handleRemove(e, item.name)" :http-request="e => httpRequest(e, item.name)">
<!-- <i v-if="item.name == 'billInfo'" slot="default" class="el-icon-plus">
<p>上传图片</p>
</i> -->
<img v-if="item.name === 'billInfo'" slot="default" :src="upload_img" alt="" />
<img v-if="item.name === 'idCard'" slot="default" :src="idCard" alt="" />
<img v-if="item.name === 'idCardBack'" slot="default" :src="idCardBack" alt="" />
<el-button v-if="item.name == 'otherInfo'" slot="default" :disabled="pageType == 2 || item.limit == materialForm[item.name].length" size="small" class="el-icon-plus">上传文件</el-button>
<el-button v-if="item.name == 'otherInfo'" slot="default" :disabled="renewDisable || pageType == 2 || item.limit == materialForm[item.name].length" size="small" class="el-icon-plus">上传文件</el-button>
<div slot="tip" class="remark" v-if="item.name == 'idCard'">身份证人像面</div>
<div slot="tip" class="remark" v-if="item.name == 'idCardBack'">身份证国徽面</div>
<div slot="tip" class="file-box" v-if="item.name == 'otherInfo'">
<span class="file_tip">支持扩展名:.doc .docx .pdf .jpg .png .jpeg。图片类型大小不能超过9M,其他类型文件大小不能超过30M。</span>
<template>
<div class="bar_outer" v-for="(imgItem, imgId) in materialForm[item.name]" :key="imgId">
<el-progress
color="#F5F7FA"
text-inside
:format="
() => {
return imgItem.name
}
"
:percentage="imgItem.progress"
></el-progress>
<el-tooltip class="item" effect="dark" content="下载" placement="top">
<img v-if="imgItem.progress == 100" class="download" :src="download" alt="" @click="downloadFile(imgItem)" />
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<i v-if="imgItem.progress == 100 && pageType != 2" @click="handleRemove(imgItem.url, item.name)" class="el-icon-delete del_img"></i>
</el-tooltip>
<template v-if="!imgItem.mark">
<el-progress
color="#F5F7FA"
text-inside
:format="
() => {
return imgItem.name
}
"
:percentage="imgItem.progress"
></el-progress>
<el-tooltip class="item" effect="dark" content="下载" placement="top">
<img v-if="imgItem.progress == 100" class="download" :src="download" alt="" @click="downloadFile(imgItem)" />
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<i v-if="imgItem.progress == 100 && pageType != 2" @click="handleRemove(imgItem.url, item.name)" class="el-icon-delete del_img"></i>
</el-tooltip>
</template>
</div>
</template>
</div>
<!-- 续保图 -->
<div slot="tip" v-if="item.name == 'otherInfo' && isXB" class="file-box xuBao">
<template>
<div class="bar_outer" v-for="(imgItem, imgId) in materialForm[item.name]" :key="imgId">
<template v-if="imgItem.mark">
<el-progress
color="#F5F7FA"
text-inside
:format="
() => {
return markMapItem[imgItem.mark]
}
"
:percentage="imgItem.progress"
></el-progress>
<el-tooltip class="item" effect="dark" content="下载" placement="top">
<img v-if="imgItem.progress == 100" class="download" :src="download" alt="" @click="downloadFile(imgItem)" />
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<i v-if="imgItem.progress == 100 && pageType != 2&&!renewDisable" @click="handleRemove(imgItem.url, item.name)" class="el-icon-delete del_img"></i>
</el-tooltip>
</template>
</div>
</template>
</div>
......@@ -62,7 +89,9 @@ export default {
pageType: {
type: Number,
default: 1 // 1.新增 2.查看 3.重新提交 4.去处理
}
},
isXB: Boolean,
renewDisable:Boolean
},
data() {
return {
......@@ -100,7 +129,16 @@ export default {
listType: 'fileList',
limit: 20
}
]
],
markMapItem: {
drivingLicense: '驾驶证',
accident: '事故责任认定书或相关凭证',
vin: '车架号VIN照片',
carAndPeople: '45°车头角度全车照片及人车合照',
vehicleDamage: '车辆受损细节照片',
InsuranceLossStatement: '保险定损单',
repiare:'维修单'
}
}
},
methods: {
......@@ -220,6 +258,12 @@ export default {
display: none;
}
}
/deep/ .renewDisable {
.el-upload--picture-card {
display: block;
cursor: not-allowed;
}
}
// 上传闪屏问题
/deep/.el-upload-list__item.is-ready {
......@@ -394,6 +438,19 @@ export default {
position: absolute;
}
}
.imgTip {
font-weight: 400;
font-size: 14px;
color: #333333;
}
.wrapper {
display: inline-block;
}
.xbImg {
display: inline-block;
width: 104px;
height: 104px;
}
}
.require {
width: 118px;
......@@ -410,6 +467,14 @@ export default {
color: #f56c6c;
margin-right: 4px;
}
.xuBao {
margin-top: 22px;
width: 522px;
min-height: 24px;
}
}
.material-item:last-child {
display: flex;
}
}
}
......
......@@ -27,7 +27,7 @@
<p class="name">{{ item.serviceItemName }}</p>
<div class="price-wrap">
<label for="">定损批准金额:</label>
<el-input :disabled="pageType == 2" maxlength="10" @input="validPrice($event, index)" @blur="changePrice($event, index)" placeholder="请选择定损批准金额" v-model="item.approveAmount"></el-input>
<el-input :disabled="pageType == 2 || renewDisable" maxlength="10" @input="validPrice($event, index)" @blur="changePrice($event, index)" placeholder="请选择定损批准金额" v-model="item.approveAmount"></el-input>
</div>
</div>
</template>
......@@ -46,7 +46,7 @@
</div>
<div class="collecter">
<label class="require" for="">收款对象:</label>
<el-radio-group @change="changeObjectType" :disabled="pageType == 2" v-model="accountForm.objectType">
<el-radio-group @change="changeObjectType" :disabled="pageType == 2 || renewDisable" v-model="accountForm.objectType">
<el-radio :label="0">店面</el-radio>
<el-radio :label="1">其他</el-radio>
</el-radio-group>
......@@ -72,7 +72,8 @@ export default {
pageType: {
type: Number,
default: 1 // 1.新增 2.查看 3.重新提交 4.去处理
}
},
renewDisable:Boolean
},
components: {
glsxCombiForm
......@@ -98,7 +99,7 @@ export default {
optionLabel: 'confName',
isHide: true,
isClear: true,
isDisabled: this.pageType == 2
isDisabled: this.pageType == 2 || this.renewDisable
},
{
label: '开户行名称',
......@@ -108,7 +109,7 @@ export default {
optionId: 'code',
optionLabel: 'name',
isClear: true,
isDisabled: this.pageType == 2
isDisabled: this.pageType == 2 || this.renewDisable
},
{
label: '账户名称',
......@@ -116,7 +117,7 @@ export default {
type: 'input',
maxlength: 60,
isClear: true,
isDisabled: this.pageType == 2
isDisabled: this.pageType == 2 || this.renewDisable
},
{
label: '收款账号',
......@@ -124,7 +125,7 @@ export default {
type: 'input',
maxlength: 25,
isClear: true,
isDisabled: this.pageType == 2
isDisabled: this.pageType == 2 || this.renewDisable
},
{
label: '收款账号所在省市',
......@@ -135,7 +136,7 @@ export default {
optionId: 'code',
optionLabel: 'name',
isClear: true,
isDisabled: this.pageType == 2
isDisabled: this.pageType == 2 || this.renewDisable
},
{
label: '收款人证件类型',
......@@ -145,7 +146,7 @@ export default {
optionId: 'code',
optionLabel: 'name',
isClear: true,
isDisabled: this.pageType == 2
isDisabled: this.pageType == 2 || this.renewDisable
},
{
label: '收款人证件号码',
......@@ -153,7 +154,7 @@ export default {
type: 'input',
maxlength: 25,
isClear: true,
isDisabled: this.pageType == 2
isDisabled: this.pageType == 2 || this.renewDisable
},
{
label: '收款人联系电话',
......@@ -161,7 +162,7 @@ export default {
type: 'input',
maxlength: 15,
isClear: true,
isDisabled: this.pageType == 2
isDisabled: this.pageType == 2 || this.renewDisable
}
],
handlerForm: [
......@@ -171,7 +172,7 @@ export default {
type: 'input',
isClear: true,
maxlength: 100,
isDisabled: this.pageType == 2
isDisabled: this.pageType == 2 || this.renewDisable
},
{
label: '经办人联系号码:',
......@@ -179,7 +180,7 @@ export default {
type: 'input',
maxlength: 11,
isClear: true,
isDisabled: this.pageType == 2
isDisabled: this.pageType == 2 || this.renewDisable
},
// {
// label: '出险经过描述:',
......
<template>
<div class="report-components gl-form-page">
<div class="title">报案信息(客户提交)</div>
<template v-if="[1, 3, 4].includes(pageType)">
<template v-if="[1, 3, 4].includes(pageType)&&!renewDisable">
<glsxCombiForm :regionData="regionData" class="edit-form-container" ref="editFormRefReport" labelWidth="154px" defaultWidth="432px" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div v-if="pageType == 1" style="display: inline-block" slot="syncBtn">
<el-button style="margin: 0 12px" type="primary" @click="toSearchOrderDetail">同步</el-button>
......@@ -44,7 +44,8 @@ export default {
pageType: {
type: Number,
default: 1 // 1.新增 2.查看 3.重新提交 4.去处理
}
},
renewDisable:Boolean
},
data() {
return {
......
......@@ -716,7 +716,7 @@ export default {
isGH: true,
contractNo: editNo == 4 ? row.writeOffCode : '',
orderId: editNo == 4 ? row.id : '',
status: editNo == 4 ? row.status : '',
status: editNo == 4 ? row.status : ''
}
const temp = encodeURIComponent(JSON.stringify(urlParam))
this.$router.push({ path: '/claims/order/' + temp, query: { $title: title } })
......@@ -730,7 +730,11 @@ export default {
this.searchForm = {
searchText: '',
status: '',
commitDate: ''
commitDate: '',
shopDate: '',
cityMerchantId: '',
provinceMerchantId: '',
merchantId: ''
}
this.getTableData()
},
......@@ -746,7 +750,12 @@ export default {
params.commitTimeStart = dayjs(params.commitDate[0]).format('YYYY-MM-DD') + ' 00:00:00'
params.commitTimeEnd = dayjs(params.commitDate[1]).format('YYYY-MM-DD') + ' 23:59:59'
}
if (Array.isArray(params.shopDate) && params.shopDate.length > 0) {
params.merchantCommitStart = dayjs(params.shopDate[0]).format('YYYY-MM-DD') + ' 00:00:00'
params.merchantCommitEnd = dayjs(params.shopDate[1]).format('YYYY-MM-DD') + ' 23:59:59'
}
delete params.commitDate
delete params.shopDate
return params
},
getTableData() {
......
......@@ -558,7 +558,7 @@ export default {
reimbursementProvinceCode: this.repotData.reimbursementProvinceCode,
reimbursementAddr: this.repotData.reimbursementAddr,
reimbursementProcess: this.repotData.reimbursementProcess,
applyAmount: this.repotData.applyAmount ? Number(this.repotData.applyAmount) * 100 : 0,
applyAmount: this.repotData.applyAmount ? ((Number(this.repotData.applyAmount) * 10) *10).toFixed(0) : 0,
signatureAuth: this.repotData.signatureAuth || ''
}
......@@ -707,8 +707,8 @@ export default {
[serviceItemName]: item.serviceItemName,
[writeOffCode]: this.repotData.writeOffCode,
[contractNo]: this.repotData.contractNo,
[approveAmount]: item.approveAmount ? parseInt(Number(item.approveAmount) * 100) : 0,
[applyAmount]: item.applyAmount ? parseInt(Number(item.applyAmount) * 100) : 0,
[approveAmount]: item.approveAmount ? ((Number(item.approveAmount) * 10) *10).toFixed(0) : 0,
[applyAmount]: item.applyAmount ? ((Number(item.applyAmount) * 10) *10).toFixed(0) : 0,
[claimsId]: this.orderMsg.id,
[lossType]: item.serviceItemCode == 'SC0006' ? item.lossTypeList.join(',') : item.lossType
}
......@@ -741,9 +741,8 @@ export default {
reimbursementProvinceCode: this.repotData.reimbursementProvinceCode,
reimbursementAddr: this.repotData.reimbursementAddr,
reimbursementProcess: this.repotData.reimbursementProcess,
applyAmount: this.repotData.applyAmount ? parseInt(Number(this.repotData.applyAmount) * 100) : 0
applyAmount: this.repotData.applyAmount ? ((Number(this.repotData.applyAmount) * 10) *10).toFixed(0) : 0
}
let claims = {
operation,
...itemObj,
......
......@@ -92,6 +92,9 @@
</el-form-item>
<el-form-item v-for="item in newPackageList" :key="item.packageCode">
<el-checkbox v-model="item.isChecked">{{item.packageName}}</el-checkbox>
<div>
<el-checkbox v-model="item.cardName" true-label="card" false-label="">卡输入</el-checkbox>
</div>
</el-form-item>
</template>
</el-form>
......@@ -437,8 +440,8 @@ export default {
}
this.newPackageList.forEach(item=>{
if(item.isChecked){
let {packageCode, packageServicePeriod} = item
params.push({packageCode, servicePeriod: packageServicePeriod })
let {packageCode, packageServicePeriod, cardName} = item
params.push({packageCode, servicePeriod: packageServicePeriod, cardName})
}
})
let targetParams = {
......
<template>
<div class="table-wrap">
<table>
<tr>
<th rowspan="2">规格</th>
<th rowspan="2">价格区间(万元)</th>
<th rowspan="2">价格系数</th>
<th colspan="2" v-for="(item, index) in tableData.salePeriodData" :key="index">{{item.servicePeriod}}年版</th>
</tr>
<tr>
<template v-for="(item, index) in tableData.salePeriodData">
<th :key="index">上架成本
<!-- <el-tooltip class="item" effect="dark" content="提示待运营提供" placement="top">
<img class="tip" :src="require('@/assets/tip.png')" />
</el-tooltip> -->
</th>
<th :key="index">销售成本
<!-- <el-tooltip class="item" effect="dark" content="提示待运营提供" placement="top">
<img class="tip" :src="require('@/assets/tip.png')" />
</el-tooltip> -->
</th>
</template>
</tr>
<tr>
<td rowspan="4">{{ tableData.serviceGrade }}</td>
<td>标准</td>
<td>-</td>
<template v-for="(item, index) in tableData.salePeriodData">
<td :key="index"><el-input :placeholder="placeholder" @input="changePrice($event, item, 'standardShelfCost')" :disabled="disabled" v-model="item.standardShelfCost"></el-input></td>
<td :key="index"> <el-input :placeholder="placeholder" @input="changePrice($event, item, 'standardSalesCost')" :disabled="disabled" v-model="item.standardSalesCost"></el-input></td>
</template>
</tr>
<tr v-for="(item, index) in tableData.gradeConfigList" :key="index">
<td class="price">
<el-input :placeholder="placeholder" @input="changePrice($event, item, 'minPrice')" @blur="formatPrice($event, item, 'minPrice', 200)" :disabled="disabled" v-model="item.minPrice"></el-input>
<span class="sign">-</span>
<el-input :placeholder="placeholder" @input="changePrice($event, item, 'maxPrice')" @blur="formatPrice($event, item, 'maxPrice', 200)" :disabled="disabled" v-model="item.maxPrice"></el-input>
</td>
<td><el-input :placeholder="placeholder" @input="changePrice($event, item, 'priceCoefficient')" :disabled="disabled" @blur="formatPrice($event, item, 'priceCoefficient', 100)" v-model="item.priceCoefficient"></el-input></td>
<template v-for="(ele, eIdx) in tableData.salePeriodData">
<td :key="eIdx">{{calcPrice(ele.standardShelfCost, item.priceCoefficient)}}</td>
<td :key="eIdx">{{calcPrice(ele.standardSalesCost, item.priceCoefficient)}}</td>
</template>
</tr>
<tr class="desc-wrap">
<td class="desc-td" :colspan="tableData.salePeriodData.length*2 + 3">
<div class="desc">
<label for="">服务条款概述:</label>
<Editor :disabled="disabled" :editorOption="overviewOption" v-model="tableData.serviceOverview"></Editor>
</div>
</td>
</tr>
<tr class="desc-wrap">
<td class="desc-td" :colspan="tableData.salePeriodData.length*2+3">
<div class="desc">
<label for="">规格详细描述:</label>
<Editor :disabled="disabled" :editorOption="DetailOption" v-model="tableData.serviceDetail"></Editor>
</div>
</td>
</tr>
</table>
</div>
</template>
<script>
import Editor from '@/components/Editor'
export default {
name: 'ServicesTable',
components:{
Editor,
},
props: {
name: {
type: String,
default: ''
},
tableData: {
type: String,
default: ()=>{
return {}
}
},
disabled: {
type: Boolean,
default: false
},
url: {
type: String,
default: ''
},
key: {
type: String,
default: ''
}
},
data() {
return {
placeholder: '请输入',
overviewOption: {
placeholder: '请输入服务条款概述',
modules: {
toolbar: false,
clipboard: {
// 粘贴版,处理粘贴时候的自带样式
matchers: [[Node.ELEMENT_NODE, this.HandleCustomMatcher]],
},
}
},
DetailOption: {
placeholder: '请输入规格详细描述',
modules: {
toolbar: false,
clipboard: {
// 粘贴版,处理粘贴时候的自带样式
matchers: [[Node.ELEMENT_NODE, this.HandleCustomMatcher]],
},
}
}
}
},
methods: {
changePrice(value, item , key){
item[key] = value ? value.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/^\d{6}\d+(\.\d+)?/g, value.substr(0,6)).replace(/\.{2,}/g, '').replace('.', '$#$')
.replace(/\./g, '').replace('$#$', '.').replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3') : ''
},
formatPrice(e, item, key, maxNum){
let num = e.target.value
if(num>maxNum){
item[key] = maxNum
}
},
calcPrice(price1, price2){
price1 = price1 || 0
price2 = price2 || 0
return Number((price1 * price2).toFixed(2))
},
HandleCustomMatcher(node, Delta) {
// 文字、图片等,从别处复制而来,清除自带样式,转为纯文本
let ops = []
Delta.ops.forEach(op => {
if (op.insert && typeof op.insert === 'string') {
ops.push({
insert: op.insert,
})
}
})
Delta.ops = ops
return Delta
},
}
}
</script>
<style lang="scss" scoped>
.table-wrap{
.tip{
width: 14px;
vertical-align: middle;
margin-bottom: 2px;
cursor: pointer;
}
/deep/ .el-input__inner{
padding: 0 2px;
text-align: center;
}
th, td{
border: 1px solid #E5E5E5;
padding: 0 16px;
vertical-align: middle;
text-align: center;
}
th{
background: #F4F6FC;
font-weight: 600;
font-size: 14px;
color: #333333;
}
td{
font-weight: 400;
height: 56px;
font-size: 14px;
color: #666666;
}
.price{
width: 136px;
.sign{
margin: 0 6px;
}
.el-input{
width: 50px;
}
}
.desc-wrap{
height: 88px;
.desc-td{
padding: 12px 16px;
}
.desc{
display: flex;
height: 100%;
label{
white-space: nowrap;
}
/deep/ .editor-ctnr{
height: 100%;
.ql-container{
border-radius: 4px;
.ql-editor{
padding: 8px;
}
}
}
}
}
}
</style>
\ No newline at end of file
<template>
<div class="container">
<div class="find_wrap">
<GLCombiForm ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
</div>
<div class="table_wrapper">
<GLCombiForm ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="table-wrapper">
<div class="operate_wrap">
<span class="table_title">配置列表</span>
<div class="operate_btn">
......@@ -12,12 +10,13 @@
</div>
</div>
<GLTable ref="equityRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div slot="serviceContent" slot-scope="scope">
<div v-html="scope.scope.serviceContent"></div>
</div>
<span slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</span>
<div slot="statusSlot" slot-scope="scope">
<span class="statsu-circle" :style="{'background-color': scope.scope.serviceStatus == 0 ? '#FDB757' : '#2CCA74'}"></span>
<span>{{ scope.scope.serviceStatus == 0 ? '待配置': '已配置' }}</span>
</div>
<span slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</span>
</GLTable>
</div>
</div>
......@@ -60,30 +59,39 @@
}
],
searchForm: {
merchantName: '',
serviceName: '',
serviceContent: '',
serviceStatus: '',
createdDate: '',
updatedDate: ''
},
tableSearchForm: {},
searchFormData: [
{
label: '商户名称',
name: 'merchantName',
type: 'input',
isClear: true,
},
{
label: '服务名称',
name: 'serveiceName',
name: 'serviceName',
type: 'input',
isClear: true,
},
{
label: '条款描述',
name: 'serviceClause',
type: 'input',
label: '状态',
name: 'serviceStatus',
type: 'select',
optionList: [
{
id: '',
label: '全部'
},
{
id: '0',
label: '待配置'
},
{
id: '1',
label: '已配置'
}
],
optionId: 'id',
optionLabel: 'label',
isClear: true,
},
{
......@@ -104,46 +112,59 @@
}
],
// 表格
getListApi: this.$apis.serviceConfig.getEquityList,
getListApi: this.$apis.serviceConfig.getServicesItemsList,
tableParams: {
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '服务编号',
prop: 'serviceCode',
width: 200
},
{
label: '服务名称',
prop: 'serviceName',
width: 200
},
{
label: '条款描述',
label: '可销售服务年限',
minWidth: 280,
prop: 'serviceContent',
addHtml: 'serviceContent'
prop: 'salePeriod',
formatter: cellValue => {
return cellValue.salePeriod?.length ? cellValue.salePeriod.split(',').map(item => item = item+'年').join('、') : '--'
}
},
{
label: '使用说明',
label: '规格数量',
minWidth: 150,
prop: 'instruct'
prop: 'gradeCount'
},
{
label: '创建时间',
prop: 'createDate',
prop: 'createdDate',
width: 200,
formatter: cellValue => {
return cellValue.createDate ? dayjs(cellValue.createDate).format('YYYY-MM-DD HH:mm:ss') : '--'
return cellValue.createdDate ? dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss') : '--'
}
},
{
label: '更新时间',
prop: 'updateDate',
prop: 'updatedDate',
width: 200,
formatter: cellValue => {
return cellValue.updateDate ? dayjs(cellValue.updateDate).format('YYYY-MM-DD HH:mm:ss') : '--'
return cellValue.updatedDate ? dayjs(cellValue.updatedDate).format('YYYY-MM-DD HH:mm:ss') : '--'
}
},
{
label: '状态',
minWidth: 150,
prop: 'status',
addHtml: 'statusSlot'
},
{
label: '操作人',
prop: 'updateBy',
prop: 'updatedBy',
width: 140
}
]
......@@ -159,12 +180,12 @@
getParams() {
let params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm?.createdDate?.length) {
params.minCreateTime = new Date(this.searchForm.createdDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.maxCreateTime = new Date(this.searchForm.createdDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
params.beginCreateTime = new Date(this.searchForm.createdDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.endCreateTime = new Date(this.searchForm.createdDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
}
if (this.searchForm?.updatedDate?.length) {
params.minUpdateTime = new Date(this.searchForm.updatedDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.maxUpdateTime = new Date(this.searchForm.updatedDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
params.beginUpdateTime = new Date(this.searchForm.updatedDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.endUpdateTime = new Date(this.searchForm.updatedDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
}
delete params.createdDate
delete params.updatedDate
......@@ -181,7 +202,7 @@
// 导出
handleExport() {
var params = this.getParams()
this.$apis.serviceConfig.exportEquityApi(params).then(res => {
this.$apis.serviceConfig.exportServicesItemsApi(params).then(res => {
// window.open(res)
let tempaa = utils.getExplorer()
if (tempaa == 'QQ') {
......@@ -201,9 +222,8 @@
handleReset() {
this.searchForm = {
merchantName: '',
serviceName: '',
serviceContent: '',
serviceStatus: '',
createdDate: '',
updatedDate: ''
}
......@@ -212,37 +232,35 @@
addClause(type, row) {
// 1新增 2查看 3编辑
const { id, merchantId } = row || {}
const { id, serviceCode, serviceName } = row || {}
let query = {
type
}
if(type!=1){
query.id = id
query.merchantId = merchantId
query.serviceCode = serviceCode
query.serviceName = serviceName
}
const queryStr = encodeURIComponent(JSON.stringify(query))
this.$router.push('/serviceConfig/addClause/' + queryStr)
this.$router.push('/serviceConfig/addService/' + queryStr)
}
}
}
</script>
<style lang="scss" scoped>
.find_wrap {
background: #ffffff;
padding: 20px 20px 2px 20px;
.resetBtn {
background: #ffffff;
color: #5850ff;
border: 1px solid #5850ff;
.container{
background-color: #ffffff;
padding: 20px;
.statsu-circle{
display: inline-block;
width: 6px;
height: 6px;
border-radius: 50%;
background-color: #FDB757;
margin-right: 8px;
vertical-align: middle;
}
.m-r-l-20 {
margin: 0 20px;
}
}
.table_wrapper {
background: #ffffff;
padding: 0 20px 20px;
}
</style>
\ No newline at end of file
......@@ -52,6 +52,7 @@ export default {
},
data() {
return {
applyTypelist: [],
date_format,
buttonList: [
{
......@@ -83,7 +84,8 @@ export default {
packageCode: '',
servicePeriod: '',
actualPrice: '',
status: ''
status: '',
cardNumber: ''
},
detailFormData: [
{
......@@ -93,6 +95,12 @@ export default {
isClear: true
},
{
type: 'input',
label: '卡编号',
name: 'cardNumber',
isClear: true
},
{
label: '版本',
name: 'batchType',
type: 'select',
......@@ -118,30 +126,9 @@ export default {
name: 'packageCode',
type: 'select',
isClear: true,
optionList: [
{
confId: '',
confName: '全部'
},
{
confId: 'PC0005',
confName: '盗抢全损无忧'
},
{
confId: 'PC0006',
confName: '轮胎无忧'
},
{
confId: 'PC0007',
confName: '整车全损无忧'
},
{
confId: 'PC0008',
confName: '碰撞无忧'
}
],
optionId: 'confId',
optionLabel: 'confName'
optionList: [],
optionId: 'packageCode',
optionLabel: 'packageName'
},
{
label: '状态',
......@@ -234,29 +221,9 @@ export default {
label: '适用类型',
name: 'packageCode',
type: 'select',
optionList: [
{
value: 'PC0005',
label: '盗抢全损无忧'
},
{
value: 'PC0006',
label: '轮胎无忧'
},
{
value: 'PC0007',
label: '整车全损无忧'
},
{
value: 'PC0008',
label: '碰撞无忧'
}
],
optionId: 'value',
optionLabel: 'label',
changeAttr:(e)=>{
this.changePgCode(e)
}
optionList: [],
optionId: 'packageCode',
optionLabel: 'packageName'
},
{
type: 'input',
......@@ -281,6 +248,14 @@ export default {
{
value: '3',
label: '3年'
},
{
value: '4',
label: '4年'
},
{
value: '5',
label: '5年'
}
],
optionId: 'value',
......@@ -419,6 +394,11 @@ export default {
},
tableColumns: [
{
label: '卡编号',
prop: 'cardNumber',
width: 180
},
{
label: '序列号',
prop: 'seqNo',
width: 100
......@@ -448,14 +428,10 @@ export default {
label: '适用类型',
prop: 'packageCode',
formatter: cellValue => {
return {
PC0005: '盗抢全损无忧',
PC0006: '轮胎无忧',
PC0007: '整车全损无忧',
PC0008: '碰撞无忧'
}[cellValue.packageCode]
let targer = this.applyTypelist.find(item => item.packageCode == cellValue.packageCode)
return targer && targer.packageName ? targer.packageName : '--'
},
width: 220
width: 220
},
{
label: '使用时间',
......@@ -491,33 +467,44 @@ export default {
},
mounted() {
this.getTotal()
this.getTypelist()
},
methods: {
changePgCode(e){
const arr = [{
value: '1',
label: '1年'
},
{
value: '2',
label: '2年'
},
{
value: '3',
label: '3年'
}]
const moreArr = [{
value: '4',
label: '4年'
},
{
value: '5',
label: '5年'
}]
const target = this.addDialogFormData.find(item => item.name=='servicePeriod')
target.optionList = (e=='PC0005' || e=='PC0007') ? [ ...arr, ...moreArr] : [...arr]
this.detailDialogForm.servicePeriod = ''
getTypelist(){
this.$apis.addWorryFree.getTypelistApi({}).then(res => {
if(!res?.length) return;
let target = this.addDialogFormData.find(item => item.name == 'packageCode')
target.optionList = res
let serachTarget = this.detailFormData.find(item => item.name == 'packageCode')
serachTarget.optionList = [{packageCode: '',packageName: '全部'}, ...res]
this.applyTypelist = res
})
},
// changePgCode(e){
// const arr = [{
// value: '1',
// label: '1年'
// },
// {
// value: '2',
// label: '2年'
// },
// {
// value: '3',
// label: '3年'
// }]
// const moreArr = [{
// value: '4',
// label: '4年'
// },
// {
// value: '5',
// label: '5年'
// }]
// const target = this.addDialogFormData.find(item => item.name=='servicePeriod')
// target.optionList = (e=='PC0005' || e=='PC0007') ? [ ...arr, ...moreArr] : [...arr]
// this.detailDialogForm.servicePeriod = ''
// },
check() {
return new Promise((resolve, reject) => {
var reg = /^[+]{0,1}(\d+)$/g
......@@ -561,7 +548,7 @@ export default {
}
},
modify(e) {
this.changePgCode(e.packageCode)
// this.changePgCode(e.packageCode)
let obj = JSON.parse(JSON.stringify(e))
this.detailDialog = true
obj.servicePeriod = obj.servicePeriod +''
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!