Commit 47e82381 by 前端

Merge branch 'v3.23.0' into 'master'

V3.23.0

See merge request !49
2 parents 4dd209b8 c805d36a
This diff could not be displayed because it is too large.
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
"lint": "vue-cli-service lint" "lint": "vue-cli-service lint"
}, },
"dependencies": { "dependencies": {
"@wangeditor/editor": "^5.1.23",
"@wangeditor/editor-for-vue": "^1.0.2",
"core-js": "^3.4.4", "core-js": "^3.4.4",
"dayjs": "^1.10.7", "dayjs": "^1.10.7",
"el-tree-transfer": "^2.2.6", "el-tree-transfer": "^2.2.6",
...@@ -35,6 +37,7 @@ ...@@ -35,6 +37,7 @@
"number-precision": "^1.6.0", "number-precision": "^1.6.0",
"prettier": "^1.19.1", "prettier": "^1.19.1",
"sass-loader": "^8.0.0", "sass-loader": "^8.0.0",
"snabbdom": "^3.5.1",
"vue-cli-plugin-element": "^1.0.1", "vue-cli-plugin-element": "^1.0.1",
"vue-quill-editor": "^3.0.6", "vue-quill-editor": "^3.0.6",
"vue-template-compiler": "^2.6.10" "vue-template-compiler": "^2.6.10"
......
...@@ -172,6 +172,18 @@ const getPackageListApi = params => { ...@@ -172,6 +172,18 @@ const getPackageListApi = params => {
}) })
} }
// 获取无忧卡套餐列表(新接口) 编辑新增调取新接口,查看调用久接口
const getNewPackageListApi = params => {
params.method = `scrm.api.equity.service.package.dj.list.without.tire`
// params.method = `scrm.api.equity.service.package.list.get`
return http({
url: 'rop-scrm-equity/router',
method: 'GET',
data: params,
sign: true
})
}
const getEquityApi = params => { const getEquityApi = params => {
params.method = `scrm.api.equity.service.channel.order.detail` params.method = `scrm.api.equity.service.channel.order.detail`
return http({ return http({
...@@ -402,4 +414,4 @@ const getSummaryExportApi = params => { ...@@ -402,4 +414,4 @@ const getSummaryExportApi = params => {
}) })
} }
export default { getOrdersummary, getSummaryPackage, getSummaryExportApi, 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 } export default { getOrdersummary, getSummaryPackage, getSummaryExportApi, getUserInfoApi, getCountNoDataApi, getListApi, getMerchantApi, getExportApi, getPriteApi, getCarBrandListApi, getCarChildListApi, getCarTypeListApi, getCarSeriesListApi, getHotlineApi, getDefaultCarbrandApi, updateHotlineApi, updateCarBrandApi, getProListApi, getPackageListApi, getNewPackageListApi, getEquityApi, updateEquityApi, createCodeApi, getOrderAttrApi, getAllOrderValueApi, verifyOrderApi, checkOrderApi, updateOrderApi, uploadImgApi, backOrderApi, aduitOrderApi, judgeSetting, spaAgressData, merchantInfo, dateBycarNo, activeCodeList, updateActiveCode }
...@@ -2,95 +2,117 @@ import { http } from '@/main' ...@@ -2,95 +2,117 @@ import { http } from '@/main'
const CUR_BASE_URL = 'rop-scrm-equity/router' const CUR_BASE_URL = 'rop-scrm-equity/router'
const getContractListApi = params => { const getContractListApi = params => {
params.method = `scrm.api.equity.service.contract.template.list` params.method = `scrm.api.equity.service.contract.template.list`
return http({ return http({
url: CUR_BASE_URL, url: CUR_BASE_URL,
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
}) })
} }
const saveContractTemplateApi = params => { const saveContractTemplateApi = params => {
params.method = `scrm.api.equity.service.contract.template.update` params.method = `scrm.api.equity.service.contract.template.update`
return http({ return http({
url: CUR_BASE_URL, url: CUR_BASE_URL,
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
}) })
} }
const getContractDetailApi = params => { const getContractDetailApi = params => {
params.method = `scrm.api.equity.service.contract.template.detail` params.method = `scrm.api.equity.service.contract.template.detail`
return http({ return http({
url: CUR_BASE_URL, url: CUR_BASE_URL,
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
}) })
} }
const printContractApi = params => { const printContractApi = params => {
params.method = `scrm.api.equity.service.contract.template.printTest` params.method = `scrm.api.equity.service.contract.template.printTest`
return http({ return http({
url: CUR_BASE_URL, url: CUR_BASE_URL,
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
}) })
} }
const copyTemplateApi = params => { const copyTemplateApi = params => {
params.method = `scrm.api.equity.service.contract.template.copyTemplate` params.method = `scrm.api.equity.service.contract.template.copyTemplate`
return http({ return http({
url: CUR_BASE_URL, url: CUR_BASE_URL,
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
}) })
} }
//批量变更合同模板 //批量变更合同模板
const babchCopyTemplateApi = params => { const babchCopyTemplateApi = params => {
params.method = `scrm.api.equity.service.contract.template.batch.copyTemplate` params.method = `scrm.api.equity.service.contract.template.batch.copyTemplate`
return http({ return http({
url: CUR_BASE_URL, url: CUR_BASE_URL,
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
}) })
} }
//批量初始化合同模板 //批量初始化合同模板
const babchInitTemplateApi = params => { const babchInitTemplateApi = params => {
params.method = `scrm.api.equity.service.contract.template.batch.initTemplate` params.method = `scrm.api.equity.service.contract.template.batch.initTemplate`
return http({ return http({
url: CUR_BASE_URL, url: CUR_BASE_URL,
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
}) })
} }
const exportContractApi = params => { const exportContractApi = params => {
params.method = `scrm.api.equity.service.contract.template.list.export` params.method = `scrm.api.equity.service.contract.template.list.export`
return http({ return http({
url: CUR_BASE_URL, url: CUR_BASE_URL,
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
}) })
}
const getProdContractListApi = params => {
params.method = `scrm.api.equity.service.base.package.list.page`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
//产品列表导出
const exportProdContractApi = params => {
params.method = `scrm.api.equity.service.base.package.export`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
} }
export default { export default {
getContractListApi,
saveContractTemplateApi,
getContractDetailApi,
printContractApi,
copyTemplateApi,
babchCopyTemplateApi,
babchInitTemplateApi,
exportContractApi
}
\ No newline at end of file \ No newline at end of file
getContractListApi,
saveContractTemplateApi,
getContractDetailApi,
printContractApi,
copyTemplateApi,
babchCopyTemplateApi,
babchInitTemplateApi,
exportContractApi,
getProdContractListApi,
exportProdContractApi
}
import { http } from '@/main' import { http } from '@/main'
const defaultPath = 'scrm.api.equity.' const defaultPath = 'scrm.api.equity.'
const getConfigList = params => { const getConfigList = params => {
params.method = `${defaultPath}service.merchant.config.pagination.list.get` params.method = `${defaultPath}service.merchant.config.pagination.list.get`
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params
}) })
} }
const openConfigs = params => { const openConfigs = params => {
params.method = `${defaultPath}service.merchant.config.batch.open` params.method = `${defaultPath}service.merchant.config.batch.open`
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params,
returnAll:true returnAll: true
}) })
} }
const closeConfigs = params => { const closeConfigs = params => {
params.method = `${defaultPath}service.merchant.config.batch.close` params.method = `${defaultPath}service.merchant.config.batch.close`
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params,
returnAll:true returnAll: true
})
})
} }
// 跳转后获取配置 // 跳转后获取配置
const getConfig = params => { const getConfig = params => {
params.method = `${defaultPath}service.merchant.config.get` params.method = `${defaultPath}service.merchant.config.get`
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params
}) })
} }
// 配置导出 // 配置导出
const exportConfig = params => { const exportConfig = params => {
params.method = `${defaultPath}service.merchant.config.export` params.method = `${defaultPath}service.merchant.config.export`
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params
}) })
} }
//修改配置 //修改配置
const modifyConfig = params => { const modifyConfig = params => {
params.method = `${defaultPath}service.merchant.config.update` params.method = `${defaultPath}service.merchant.config.update`
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params,
returnAll:true returnAll: true
}) })
} }
//创建配置 //创建配置
const addConfig = params => { const addConfig = params => {
params.method = `${defaultPath}service.merchant.config.create` params.method = `${defaultPath}service.merchant.config.create`
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params,
returnAll:true returnAll: true
}) })
} }
//分页获取商户配置 //分页获取商户配置
const getStoreConfig = params => { const getStoreConfig = params => {
params.method = `${defaultPath}service.merchant.config.pagination.list.get` params.method = `${defaultPath}service.merchant.config.pagination.list.get`
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params
}) })
} }
//查询商户配置 //查询商户配置
const selStoreConfig = params => { const selStoreConfig = params => {
params.method = `scrm.api.equity.service.merchant.pagination.list.get` params.method = `scrm.api.equity.service.merchant.pagination.list.get`
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
data: params, data: params,
returnAll:true returnAll: true
}) })
}
//批量开通销售模式
const batchOpenSaleModeApi = params => {
params.method = `${defaultPath}service.merchant.config.batch.open`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params
})
} }
export default { export default {
getConfigList, getConfigList,
openConfigs, openConfigs,
closeConfigs, closeConfigs,
getConfig, getConfig,
exportConfig, exportConfig,
modifyConfig, modifyConfig,
getStoreConfig, getStoreConfig,
addConfig, addConfig,
selStoreConfig selStoreConfig,
batchOpenSaleModeApi
} }
export function attachmentToHtml(elem, childrenHtml) {
// JS 语法
// 获取附件元素的数据
const { key = '', name = '' } = elem
// 生成 HTML 代码
const html = `<span data-w-e-type="text" data-key="${key}" data-name="${name}">${name}</span>`
return html
}
export function parseAttachmentHtml(domElem, children, editor) {
const key = domElem.getAttribute('data-key') || ''
const name = domElem.getAttribute('data-name') || ''
// 生成“附件”元素(按照此前约定的数据结构)
const myResume = {
type: 'text',
name,
key,
children: [{ text: '' }]
}
return myResume
}
import { h } from 'snabbdom'
/**
* 渲染“附件”元素到编辑器
* @param elem 附件元素,即上文的 myResume
* @param children 元素子节点,void 元素可忽略
* @param editor 编辑器实例
* @returns vnode 节点(通过 snabbdom.js 的 h 函数生成)
*/
export function renderAttachment(elem, children, editor) {
const { name = '' } = elem
const Vnode = h(
'span',
{
props: { contentEditable: false },
style: { color: '#5f5efb' }
},
// 子节点
[name]
)
return Vnode
}
import { DomEditor } from '@wangeditor/editor'
export function withBreakAndDelete(editor) {
const { isInline, isVoid } = editor
const newEditor = editor
newEditor.isInline = elem => {
const type = DomEditor.getNodeType(elem)
if (type === 'text') return true
return isInline(elem)
}
newEditor.isVoid = elem => {
const type = DomEditor.getNodeType(elem)
if (type === 'text') return true
return isVoid(elem)
}
return newEditor // 返回 newEditor ,重要!!!
}
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
let cfg = require('./conf.js') let cfg = require('./conf.js')
let timeout = 30000 //超时时间 let timeout = 30000 //超时时间
import { Http } from 'glsx-common' import { Http } from 'glsx-common'
export const fetchConfig = function (common) { export const fetchConfig = function(common) {
// console.log(common); // console.log(common);
// console.log(utils); // 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 } } } // 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 } } }
...@@ -31,4 +31,4 @@ export const config = { ...@@ -31,4 +31,4 @@ export const config = {
install(vue, cfg) { install(vue, cfg) {
vue.prototype.$config = cfg vue.prototype.$config = cfg
} }
}
\ No newline at end of file \ No newline at end of file
}
...@@ -4,33 +4,33 @@ ...@@ -4,33 +4,33 @@
<div class="main"> <div class="main">
<div class="edit-bar"> <div class="edit-bar">
<FoldFrame :name="item.title" v-for="item in contentList" :key="item.key"> <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.type == 'img'" class="bar-content">
<div v-if="item.key=='electronicSealUrl'" class="input-content"> <div v-if="item.key == 'electronicSealUrl'" class="input-content">
<label class="required-field" for="">服务主体:</label> <label class="required-field" for="">服务主体:</label>
<el-input size="small" type="text" v-model="contentObj.serviceSubject" ></el-input> <el-input size="small" type="text" v-model="contentObj.serviceSubject"></el-input>
</div> </div>
<Upload :required="true" @uploadSuccess="uploadSuccess" @delImage="delImage" class="upload" :name="item.label+':'" :attr="item.key" :url="contentObj[item.key]" :defaultStyle="{width:'208px'}"></Upload> <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> <span class="upload-tip">建议高度:48px</span>
</div> </div>
<div v-if="item.type=='richText'" class="bar-content"> <div v-if="item.type == 'richText'" class="bar-content">
<div v-if="item.key=='contractIntroduce'" class="input-content"> <div v-if="item.key == 'contractIntroduce'" class="input-content">
<label class="required-field" for="">合同标题:</label> <label class="required-field" for="">合同标题:</label>
<el-input size="small" type="text" v-model="contentObj.contractTitle"></el-input> <el-input size="small" type="text" v-model="contentObj.contractTitle"></el-input>
</div> </div>
<Editor :required="true" :ref="item.key+'Ref'" :operateList="item.key=='useConditions' ? placeholderList : []" :label="item.label" v-model="contentObj[item.key]"></Editor> <Editor :required="true" :ref="item.key + 'Ref'" :operateList="item.key == 'useConditions' ? placeholderList : []" :label="item.label" v-model="contentObj[item.key]"></Editor>
</div> </div>
</FoldFrame> </FoldFrame>
</div> </div>
<div class="footer-btn-wrap"> <div class="footer-btn-wrap">
<el-button @click="handelCancel">取消</el-button> <el-button @click="handelCancel">取消</el-button>
<el-button type="primary" @click="commitTemplate('preview')">预览</el-button> <el-button type="primary" @click="commitTemplate('preview')">预览</el-button>
<el-button type="primary" @click="commitTemplate">提交</el-button> <el-button type="primary" @click="commitTemplate">提交</el-button>
</div> </div>
</div> </div>
<pdf-dialog :isVisible="isPdfVisible" title="合同" :pdfUrl="pdfUrl" @closeDialog="handlePdfClose"></pdf-dialog> <pdf-dialog :isVisible="isPdfVisible" title="合同" :pdfUrl="pdfUrl" @closeDialog="handlePdfClose"></pdf-dialog>
</div> </div>
</template> </template>
<script> <script>
const errorTipObj = { const errorTipObj = {
contractTitle: '合同标题', contractTitle: '合同标题',
...@@ -49,7 +49,7 @@ import Editor from '@/components/Editor' ...@@ -49,7 +49,7 @@ import Editor from '@/components/Editor'
import pdfDialog from '@/views/beforeSale/pdfDialog' import pdfDialog from '@/views/beforeSale/pdfDialog'
export default { export default {
name: 'AddTmpl', name: 'AddTmpl',
components:{ components: {
Editor, Editor,
Upload, Upload,
FoldFrame, FoldFrame,
...@@ -59,8 +59,9 @@ export default { ...@@ -59,8 +59,9 @@ export default {
return { return {
isPdfVisible: false, isPdfVisible: false,
pdfUrl: '', pdfUrl: '',
routerInfo: {},
placeholderList: [], placeholderList: [],
pdfObj :{ pdfObj: {
merchantId: '', merchantId: '',
packageCode: '' packageCode: ''
}, },
...@@ -138,12 +139,13 @@ export default { ...@@ -138,12 +139,13 @@ export default {
label: '电子章图片', label: '电子章图片',
key: 'electronicSealUrl', key: 'electronicSealUrl',
type: 'img' type: 'img'
}, }
] ]
} }
}, },
created(){ created() {
this.routerInfo = JSON.parse(decodeURIComponent(this.$route.params.id))
}, },
mounted() { mounted() {
...@@ -152,49 +154,59 @@ export default { ...@@ -152,49 +154,59 @@ export default {
methods: { methods: {
getContractDetail() { getContractDetail() {
this.$apis.contractManager.getContractDetailApi({id: this.$route.params.id}).then(res => { this.$apis.contractManager.getContractDetailApi({ id: this.routerInfo.id }).then(res => {
if(res && res.templateConfig){ if (res && res.templateConfig) {
this.placeholderList = res.placeholderList this.placeholderList = res.placeholderList
for(const key in this.contentObj){ for (const key in this.contentObj) {
this.contentObj[key] = res.templateConfig[key] if (key != 'useConditions') {
this.contentObj[key] = res.templateConfig[key]
} else {
for (var i = 0; i < res.placeholderList.length; i++) {
var placeholder = res.placeholderList[i]
let targetStr = `<span data-w-e-type="text" data-key="${placeholder.key}" data-name="${placeholder.name}">${placeholder.name}</span>`
res.templateConfig.useConditions = res.templateConfig.useConditions.replace(new RegExp(placeholder.key, 'g'), targetStr)
}
this.contentObj.useConditions = res.templateConfig.useConditions
}
} }
this.pdfObj = { this.pdfObj = {
merchantId: res.templateConfig.merchantId, merchantId: res.templateConfig.merchantId,
packageCode: res.templateConfig.packageCode packageCode: res.templateConfig.packageCode
}, }
this.$nextTick(()=>{
this.$refs.useConditionsRef[0].replaceText()
})
} }
}) })
}, },
handelCancel(){ handelCancel() {
this.$router.push('/ContractManager/index') this.$router.push('/ContractManager/index')
}, },
getParams(){ getParams() {
let params = this.$common.utils.deepClone(this.contentObj) let params = this.$common.utils.deepClone(this.contentObj)
let errorTip = ''; let errorTip = ''
params.useConditions = params.useConditions?.replace(/<span.*?class.*?keyname="(.*?)".*?<\/span>/g,'$1') params.useConditions = params.useConditions?.replace(/<span.*?data-w-e-type.*?data-key="(.*?)".*?<\/span>/g, '$1')
for(const key in params){ for (const key in params) {
if(key!='id' && !params[key]){ if (key != 'id' && !params[key]) {
if(key == 'electronicSealUrl' || key == 'logoUrl'){ if (key == 'electronicSealUrl' || key == 'logoUrl') {
errorTip = `请上传${key == 'logoUrl' ? 'Logo图': '电子章图片'}` errorTip = `请上传${key == 'logoUrl' ? 'Logo图' : '电子章图片'}`
}else{ } else {
errorTip = `${errorTipObj[key]}不能为空` errorTip = `${errorTipObj[key]}不能为空`
} }
} }
} }
if(errorTip) return {status: -1, errorTip} if (errorTip) return { status: -1, errorTip }
return params return params
}, },
commitTemplate(type){ commitTemplate(type) {
const params = this.getParams() const params = this.getParams()
if(params.status == -1) return this.$message.error(params.errorTip) if (params.status == -1) return this.$message.error(params.errorTip)
this.$apis.contractManager.saveContractTemplateApi({...params}).then(res => { const _targetParam = {
if(res){ ...params
if(type=='preview'){ }
if (this.routerInfo.skuId) _targetParam.skuId = this.routerInfo.skuId
this.$apis.contractManager.saveContractTemplateApi(_targetParam).then(res => {
if (res) {
if (type == 'preview') {
this.handlePdf() this.handlePdf()
}else{ } else {
this.$message.success('编辑成功') this.$message.success('编辑成功')
this.$router.push('/ContractManager/index') this.$router.push('/ContractManager/index')
} }
...@@ -211,27 +223,32 @@ export default { ...@@ -211,27 +223,32 @@ export default {
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)' background: 'rgba(0, 0, 0, 0.3)'
}) })
this.$apis.contractManager.printContractApi({ packageCode : this.pdfObj.packageCode , merchantId: this.pdfObj.merchantId }).then(res => { const params = {
packageCode: this.pdfObj.packageCode,
baseFlag: this.routerInfo.skuId ? 1 : 0
}
if (!this.routerInfo.skuId) params.merchantId = this.pdfObj.merchantId
this.$apis.contractManager.printContractApi(params).then(res => {
this.pdfUrl = res this.pdfUrl = res
this.handlePdfClose() this.handlePdfClose()
loading.close() loading.close()
}) })
}, },
uploadSuccess(e){ uploadSuccess(e) {
this.contentObj[e.attr] = e.url this.contentObj[e.attr] = e.url
}, },
delImage(e){ delImage(e) {
this.contentObj[e.attr] = '' this.contentObj[e.attr] = ''
}, }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.container{ .container {
background-color: #fff; background-color: #fff;
margin-bottom: 60px; margin-bottom: 60px;
.footer-btn-wrap{ .footer-btn-wrap {
width: 100%; width: 100%;
height: 60px; height: 60px;
line-height: 60px; line-height: 60px;
...@@ -243,15 +260,15 @@ export default { ...@@ -243,15 +260,15 @@ export default {
right: 0; right: 0;
box-shadow: 0 -2px 10px 0 #7a7a7a33; box-shadow: 0 -2px 10px 0 #7a7a7a33;
} }
.footer-btn{ .footer-btn {
text-align: center; text-align: center;
margin-top: 16px; margin-top: 16px;
} }
.input-content{ .input-content {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 24px; margin-bottom: 24px;
label{ label {
flex-shrink: 0; flex-shrink: 0;
width: 154px; width: 154px;
white-space: nowrap; white-space: nowrap;
...@@ -260,24 +277,24 @@ export default { ...@@ -260,24 +277,24 @@ export default {
font-size: 14px; font-size: 14px;
color: #333333; color: #333333;
} }
/deep/ .el-input__inner{ /deep/ .el-input__inner {
width: 342px; width: 342px;
} }
} }
.main{ .main {
padding: 10px 20px 32px; padding: 10px 20px 32px;
.edit-bar{ .edit-bar {
.bar-content{ .bar-content {
background: #F9F9F9; background: #f9f9f9;
padding: 20px; padding: 20px;
margin-bottom: 10px; margin-bottom: 10px;
/deep/ .editor{ /deep/ .editor {
width: 935px!important; width: 935px !important;
} }
.upload{ .upload {
display: inline-block; display: inline-block;
} }
.upload-tip{ .upload-tip {
height: 20px; height: 20px;
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 14px;
...@@ -290,4 +307,3 @@ export default { ...@@ -290,4 +307,3 @@ export default {
} }
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
<!-- 权益订单 --> <!-- 权益订单 -->
<template> <template>
<div> <div>
<report :key="comKey" :renewDisable="orderStatus!=0" @toSearchOrderDetail="toSearchOrderDetail" ref="reportRef" :isGH="routeInfo.isGH" :pageType="pageType" :editForm.sync="editForm"></report> <report :key="comKey" :renewDisable="orderStatus != 0" @toSearchOrderDetail="toSearchOrderDetail" ref="reportRef" :isGH="routeInfo.isGH" :pageType="pageType" :editForm.sync="editForm"></report>
<repair :renewDisable="orderStatus!=0" ref="repairRef" @changeObjectType="changeObjectType" :isGH="routeInfo.isGH" :pageType="pageType" :serviceItemsList.sync="serviceItemsList" :totalPrice.sync="totalPrice" :accountForm.sync="accountForm"></repair> <repair :renewDisable="orderStatus != 0" ref="repairRef" :isXB="true" @changeObjectType="changeObjectType" :isGH="routeInfo.isGH" :pageType="pageType" :serviceItemsList.sync="serviceItemsList" :totalPrice.sync="totalPrice" :accountForm.sync="accountForm"></repair>
<material :renewDisable="orderStatus!=0" :isXB="true" ref="materialRef" :pageType="pageType" :materialForm.sync="materialForm"></material> <material :renewDisable="orderStatus != 0" :isXB="true" ref="materialRef" :pageType="pageType" :materialForm.sync="materialForm"></material>
<!-- 案件说明 --> <!-- 案件说明 -->
<caseDesc :supplementList="supplementList"></caseDesc> <caseDesc :supplementList="supplementList"></caseDesc>
<!-- 定损记录 --> <!-- 定损记录 -->
...@@ -153,7 +153,7 @@ export default { ...@@ -153,7 +153,7 @@ export default {
}, },
computed: { computed: {
totalPrice() { totalPrice() {
let total = this.serviceItemsList.reduce(function (prev, cur) { let total = this.serviceItemsList.reduce(function(prev, cur) {
return prev + +(cur.approveAmount * 100).toFixed(0) return prev + +(cur.approveAmount * 100).toFixed(0)
}, 0) }, 0)
return total / 100 return total / 100
...@@ -200,18 +200,18 @@ export default { ...@@ -200,18 +200,18 @@ export default {
// 以下是文件数据 // 以下是文件数据
res.files.forEach(item => { res.files.forEach(item => {
let obj = { url: item.fileUrl, fileType: item.fileType, name: item.fileName, progress: 100, mark: item.mark, fileCode: item.fileCode } let obj = { url: item.fileUrl, fileType: item.fileType, name: item.fileName, progress: 100, mark: item.mark, fileCode: item.fileCode }
if (item.fileCode == '1'&&item.fileUrl) { if (item.fileCode == '1' && item.fileUrl) {
if (this.materialForm.idCard.length === 0) { if (this.materialForm.idCard.length === 0) {
this.materialForm.idCard.push(obj) this.materialForm.idCard.push(obj)
} else { } else {
this.materialForm.idCardBack.push(obj) this.materialForm.idCardBack.push(obj)
} }
} else if (item.fileCode == '31'&&item.fileUrl) { } else if (item.fileCode == '31' && item.fileUrl) {
this.materialForm.billInfo.push(obj) this.materialForm.billInfo.push(obj)
} else if (item.fileCode == '4'&&item.fileUrl) { } else if (item.fileCode == '4' && item.fileUrl) {
this.materialForm.otherInfo.push(obj) this.materialForm.otherInfo.push(obj)
} }
console.log(this.materialForm); console.log(this.materialForm)
}) })
// 案件说明 // 案件说明
res.supplementList.forEach(el => { res.supplementList.forEach(el => {
...@@ -343,10 +343,15 @@ export default { ...@@ -343,10 +343,15 @@ export default {
} }
params.approveAmounts = '' params.approveAmounts = ''
let tagetObj = {} let tagetObj = {}
let lossAssessmentTarget = {}
this.serviceItemsList.forEach(item => { this.serviceItemsList.forEach(item => {
tagetObj[item.serviceItemCode] = item.approveAmount tagetObj[item.serviceItemCode] = item.approveAmount
if (item.lossAssessmentFlag) {
lossAssessmentTarget[item.serviceItemCode] = item.lossAssessmentAmount
}
}) })
params.approveAmounts = JSON.stringify(tagetObj) params.approveAmounts = JSON.stringify(tagetObj)
params.lossAssessmentAmounts = JSON.stringify(lossAssessmentTarget)
delete params.reimbursementAddress delete params.reimbursementAddress
params.fileList = [] params.fileList = []
for (let key in this.materialForm) { for (let key in this.materialForm) {
...@@ -402,8 +407,8 @@ export default { ...@@ -402,8 +407,8 @@ export default {
this.renewalAudit({ approveAmounts: JSON.stringify(sc_obg) }, 4) this.renewalAudit({ approveAmounts: JSON.stringify(sc_obg) }, 4)
}, },
renewalAudit(params, operation) { renewalAudit(params, operation) {
const {equityOrderDetail} = this.detailInfo const { equityOrderDetail } = this.detailInfo
if(equityOrderDetail&&equityOrderDetail.vehicle){ if (equityOrderDetail && equityOrderDetail.vehicle) {
params.carNumber = equityOrderDetail.vehicle.licensePlate params.carNumber = equityOrderDetail.vehicle.licensePlate
} }
this.$apis.claims.renewalAudit({ ...this.editForm, operation, id: this.routeInfo.orderId, ...this.accountForm, ...params }).then(res => { this.$apis.claims.renewalAudit({ ...this.editForm, operation, id: this.routeInfo.orderId, ...this.accountForm, ...params }).then(res => {
...@@ -454,7 +459,7 @@ export default { ...@@ -454,7 +459,7 @@ export default {
renewGR(params, operation) { renewGR(params, operation) {
params.equitySource = 1 params.equitySource = 1
this.$apis.claims.commitClaimsOrder({ ...this.editForm, operation, id: this.routeInfo.orderId, ...this.accountForm, ...params }).then(res => { this.$apis.claims.commitClaimsOrder({ ...this.editForm, operation, id: this.routeInfo.orderId, ...this.accountForm, ...params }).then(res => {
if (res) { if (res) {
this.$message({ this.$message({
message: '提交成功', message: '提交成功',
type: 'success' type: 'success'
......
...@@ -863,7 +863,8 @@ export default { ...@@ -863,7 +863,8 @@ export default {
let paraFormat = { let paraFormat = {
addOrEdit, addOrEdit,
contractNo: addOrEdit == 1 ? -1 : row.contractNo, contractNo: addOrEdit == 1 ? -1 : row.contractNo,
isSuper: this.userInfo.admin isSuper: this.userInfo.admin,
successDate: row?.successDate ? dayjs(row.successDate).format('YYYY-MM-DD HH:mm:ss') : ''
} }
const urlpara = encodeURIComponent(JSON.stringify(paraFormat)) const urlpara = encodeURIComponent(JSON.stringify(paraFormat))
addOrEdit == 1 ? this.$router.push('/beforeSale/editEquity/' + urlpara) : this.$router.push('/beforeSale/editEquity/' + urlpara) addOrEdit == 1 ? this.$router.push('/beforeSale/editEquity/' + urlpara) : this.$router.push('/beforeSale/editEquity/' + urlpara)
......
...@@ -28,8 +28,14 @@ ...@@ -28,8 +28,14 @@
</el-checkbox-group> </el-checkbox-group>
</div> </div>
<div class="unit-price" :class="[{ nopt20: item.serviceItemCode == 'SC0006' || item.serviceItemCode == 'SC0003' }]"> <div class="unit-price" :class="[{ nopt20: item.serviceItemCode == 'SC0006' || item.serviceItemCode == 'SC0003' }]">
<label class="required" for="">预估损失金额/元:</label> <div>
<el-input maxlength="10" @input="validPrice($event, index)" @blur="changePrice($event, index)" placeholder="请输入预估损失金额" v-model="item.applyAmount"></el-input> <label class="required" for="">预估损失金额/元:</label>
<el-input maxlength="10" @input="validPrice($event, index, 'applyAmount')" @blur="changePrice($event, index, 'applyAmount')" placeholder="请输入预估损失金额" v-model="item.applyAmount"></el-input>
</div>
<div v-if="item.lossAssessmentFlag" style="margin-top: 10px;">
<label class="required" for="">保险公司定损金额/元:</label>
<el-input :disabled="!item.applyAmount" maxlength="10" @input="validPrice($event, index, 'lossAssessmentAmount')" @blur="changePrice($event, index, 'lossAssessmentAmount')" placeholder="请输入保险定损金额" v-model="item.lossAssessmentAmount"></el-input>
</div>
</div> </div>
</div> </div>
<div class="lump-sum"> <div class="lump-sum">
...@@ -242,8 +248,8 @@ export default { ...@@ -242,8 +248,8 @@ export default {
const Item = this.editFormData.find(item => item.name === key) const Item = this.editFormData.find(item => item.name === key)
this.$set(Item.customPickerOptions, 'selectableRange', limitTime) this.$set(Item.customPickerOptions, 'selectableRange', limitTime)
}, },
validPrice(e, id) { validPrice(e, id, key) {
let checkPlan = '' + this.itemList[id].applyAmount let checkPlan = '' + this.itemList[id][key]
checkPlan = checkPlan checkPlan = checkPlan
.replace(/[^\d.]/g, '') .replace(/[^\d.]/g, '')
.replace(/\.{2,}/g, '.') .replace(/\.{2,}/g, '.')
...@@ -256,23 +262,23 @@ export default { ...@@ -256,23 +262,23 @@ export default {
} else if (checkPlan.indexOf('.') >= 0) { } else if (checkPlan.indexOf('.') >= 0) {
checkPlan = checkPlan.replace(/^()*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数 checkPlan = checkPlan.replace(/^()*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数
} }
this.$set(this.itemList[id], 'applyAmount', checkPlan) this.$set(this.itemList[id], key, checkPlan)
this.getTotal() this.getTotal()
}, },
changePrice(e, id) { changePrice(e, id, key) {
if (!e.target.value) return if (!e.target.value) return
const len = e.target.value.length const len = e.target.value.length
let lastStr = e.target.value.charAt(len - 1) let lastStr = e.target.value.charAt(len - 1)
if (lastStr === '.') { if (lastStr === '.') {
this.$set(this.itemList[id], 'applyAmount', e.target.value.substr(0, len - 1)) this.$set(this.itemList[id], key, e.target.value.substr(0, len - 1))
} }
const minPrice = 1 const minPrice = 1
if (Number(e.target.value) < minPrice) { if (Number(e.target.value) < minPrice) {
this.$set(this.itemList[id], 'applyAmount', 1) this.$set(this.itemList[id], key, 1)
} }
const maxPrice = 200000 const maxPrice = 200000
if (Number(e.target.value) > maxPrice) { if (Number(e.target.value) > maxPrice) {
this.$set(this.itemList[id], 'applyAmount', maxPrice) this.$set(this.itemList[id], key, maxPrice)
} }
this.getTotal() this.getTotal()
}, },
...@@ -327,11 +333,12 @@ export default { ...@@ -327,11 +333,12 @@ export default {
.unit-price { .unit-price {
background: #f9f9f9; background: #f9f9f9;
padding: 20px; padding: 20px;
display: flex; // display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
margin-bottom: 10px; margin-bottom: 10px;
.required { .required {
width: 154px; width: 154px;
display: inline-block;
text-align: right; text-align: right;
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 14px;
......
...@@ -30,6 +30,10 @@ ...@@ -30,6 +30,10 @@
<div class="ms_lab">预估损失金额/元:</div> <div class="ms_lab">预估损失金额/元:</div>
<el-input @input="validPrice($event, index, 'applyAmount')" @blur="changePrice($event, index, 'applyAmount')" v-model="item.applyAmount" size="mini" class="w432" maxlength="10"></el-input> <el-input @input="validPrice($event, index, 'applyAmount')" @blur="changePrice($event, index, 'applyAmount')" v-model="item.applyAmount" size="mini" class="w432" maxlength="10"></el-input>
</div> </div>
<div v-if="item.lossAssessmentFlag" class="ma20 ms flex_sc">
<div class="ms_lab">保险公司定损金额/元:</div>
<el-input @input="validPrice($event, index, 'lossAssessmentAmount')" @blur="changePrice($event, index, 'lossAssessmentAmount')" v-model="item.lossAssessmentAmount" size="mini" class="w432" maxlength="10"></el-input>
</div>
<div class="ms flex_sc ma20"> <div class="ms flex_sc ma20">
<div class="ms_lab">定损批准金额/元:</div> <div class="ms_lab">定损批准金额/元:</div>
<el-input @input="validPrice($event, index, 'approveAmount')" @blur="changePrice($event, index, 'approveAmount')" v-model="item.approveAmount" size="mini" class="w432" maxlength="10"></el-input> <el-input @input="validPrice($event, index, 'approveAmount')" @blur="changePrice($event, index, 'approveAmount')" v-model="item.approveAmount" size="mini" class="w432" maxlength="10"></el-input>
...@@ -415,9 +419,9 @@ export default { ...@@ -415,9 +419,9 @@ export default {
} }
} }
} }
.ms_txt{ .ms_txt {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #666666; color: #666666;
} }
</style> </style>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div> <div>
<div v-if="isGH" class="report-components gl-form-page"> <div v-if="isGH" class="report-components gl-form-page">
<div class="title">报案信息(店面补充)</div> <div class="title">报案信息(店面补充)</div>
<glsx-combi-form :labelPaddingRight="0" :isInline="false" class="edit-form-container" ref="handlerRef" :formRules="accountRule" labelWidth="154px" defaultWidth="432px" :formObj="accountForm" :formData="handlerForm"> <glsx-combi-form :labelPaddingRight="0" :isInline="false" class="edit-form-container" ref="handlerRef" :formRules="accountRule" labelWidth="154px" defaultWidth="432px" :formObj="accountForm" :formData="handlerForm">
<!-- <div slot="serviceApply" class="serviceApply_container"> <!-- <div slot="serviceApply" class="serviceApply_container">
<template v-for="(item, index) in serviceItemsList"> <template v-for="(item, index) in serviceItemsList">
<div :key="index" class="wrapper"> <div :key="index" class="wrapper">
...@@ -26,8 +26,12 @@ ...@@ -26,8 +26,12 @@
<div class="service-item" v-for="(item, index) in serviceItemsList" :key="item.serviceItemCode"> <div class="service-item" v-for="(item, index) in serviceItemsList" :key="item.serviceItemCode">
<p class="name">{{ item.serviceItemName }}</p> <p class="name">{{ item.serviceItemName }}</p>
<div class="price-wrap"> <div class="price-wrap">
<label for="">定损批准金额:</label> <label class="label" for="">定损批准金额:</label>
<el-input :disabled="pageType == 2 || renewDisable" 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, 'approveAmount')" @blur="changePrice($event, index, 'approveAmount')" placeholder="请输入" v-model="item.approveAmount"></el-input>
</div>
<div v-if="!isXB && item.lossAssessmentFlag" class="price-wrap">
<label class="label" for="">保险公司定损金额:</label>
<el-input :disabled="pageType == 2 || renewDisable || !item.approveAmount" maxlength="10" @input="validPrice($event, index, 'lossAssessmentAmount')" @blur="changePrice($event, index, 'lossAssessmentAmount')" placeholder="请输入" v-model="item.lossAssessmentAmount"></el-input>
</div> </div>
</div> </div>
</template> </template>
...@@ -69,6 +73,7 @@ export default { ...@@ -69,6 +73,7 @@ export default {
serviceItemsList: Array, serviceItemsList: Array,
totalPrice: Number, totalPrice: Number,
isGH: Boolean, isGH: Boolean,
isXB: Boolean,
pageType: { pageType: {
type: Number, type: Number,
default: 1 // 1.新增 2.查看 3.重新提交 4.去处理 default: 1 // 1.新增 2.查看 3.重新提交 4.去处理
...@@ -305,8 +310,8 @@ export default { ...@@ -305,8 +310,8 @@ export default {
IDCardTypeList.optionList = res.cardType IDCardTypeList.optionList = res.cardType
}) })
}, },
validPrice(e, id) { validPrice(e, id, key) {
let checkPlan = '' + this.serviceItemsList[id].approveAmount let checkPlan = '' + this.serviceItemsList[id][key]
checkPlan = checkPlan checkPlan = checkPlan
.replace(/[^\d.]/g, '') .replace(/[^\d.]/g, '')
.replace(/\.{2,}/g, '.') .replace(/\.{2,}/g, '.')
...@@ -319,22 +324,22 @@ export default { ...@@ -319,22 +324,22 @@ export default {
} else if (checkPlan.indexOf('.') >= 0) { } else if (checkPlan.indexOf('.') >= 0) {
checkPlan = checkPlan.replace(/^()*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数 checkPlan = checkPlan.replace(/^()*(\d+)\.(\d\d).*$/, '$1$2.$3') // 只能输入两个小数
} }
this.$set(this.serviceItemsList[id], 'approveAmount', checkPlan) this.$set(this.serviceItemsList[id], key, checkPlan)
}, },
changePrice(e, id) { changePrice(e, id, key) {
if (!e.target.value) return if (!e.target.value) return
const len = e.target.value.length const len = e.target.value.length
let lastStr = e.target.value.charAt(len - 1) let lastStr = e.target.value.charAt(len - 1)
if (lastStr === '.') { if (lastStr === '.') {
this.$set(this.serviceItemsList[id], 'approveAmount', e.target.value.substr(0, len - 1)) this.$set(this.serviceItemsList[id], key, e.target.value.substr(0, len - 1))
} }
const minPrice = 1 const minPrice = 1
if (Number(e.target.value) < minPrice) { if (Number(e.target.value) < minPrice) {
this.$set(this.serviceItemsList[id], 'approveAmount', 1) this.$set(this.serviceItemsList[id], key, 1)
} }
const maxPrice = 2000000 const maxPrice = 2000000
if (Number(e.target.value) > maxPrice) { if (Number(e.target.value) > maxPrice) {
this.$set(this.serviceItemsList[id], 'approveAmount', maxPrice) this.$set(this.serviceItemsList[id], key, maxPrice)
} }
} }
} }
...@@ -400,7 +405,8 @@ export default { ...@@ -400,7 +405,8 @@ export default {
height: 16px; height: 16px;
} }
.service-item { .service-item {
width: 264px; width: 294px;
box-sizing: border-box;
padding: 10px; padding: 10px;
background: #ffffff; background: #ffffff;
border-radius: 4px; border-radius: 4px;
...@@ -409,17 +415,25 @@ export default { ...@@ -409,17 +415,25 @@ export default {
margin-bottom: 20px; margin-bottom: 20px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.name { .name {
font-weight: 600; font-weight: 600;
flex: 1; height: 20px;
margin-bottom: 16px; line-height: 20px;
} }
.price-wrap { .price-wrap {
&:first-child {
margin-top: 0;
}
margin-top: 10px;
display: flex; display: flex;
align-items: center; align-items: baseline;
flex: 1; flex: 1;
label { label {
white-space: nowrap; white-space: nowrap;
display: inline-block;
width: 130px;
flex-shrink: 0;
} }
/deep/ .el-input__inner { /deep/ .el-input__inner {
height: 32px; height: 32px;
......
...@@ -33,6 +33,10 @@ ...@@ -33,6 +33,10 @@
<span>预估损失金额/元:</span> <span>预估损失金额/元:</span>
<span class="price">{{ item.applyAmount || 0 }}</span> <span class="price">{{ item.applyAmount || 0 }}</span>
</div> </div>
<div v-if="item.lossAssessmentFlag" class="ms">
<span>保险公司定损金额/元:</span>
<span class="price">{{ item.lossAssessmentAmount || 0 }}</span>
</div>
<div class="ms"> <div class="ms">
<span>定损批准金额:</span> <span>定损批准金额:</span>
<span class="price">{{ item.approveAmount || 0 }}</span> <span class="price">{{ item.approveAmount || 0 }}</span>
...@@ -561,9 +565,9 @@ export default { ...@@ -561,9 +565,9 @@ export default {
.text_wrap { .text_wrap {
white-space: pre-wrap !important; white-space: pre-wrap !important;
} }
.ms_txt{ .ms_txt {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #666666; color: #666666;
} }
</style> </style>
...@@ -282,6 +282,7 @@ export default { ...@@ -282,6 +282,7 @@ export default {
res.itemsList.map(item => { res.itemsList.map(item => {
item.applyAmount = item.applyAmount ? (item.applyAmount / 100).toFixed(2) : item.applyAmount item.applyAmount = item.applyAmount ? (item.applyAmount / 100).toFixed(2) : item.applyAmount
item.approveAmount = item.approveAmount ? (item.approveAmount / 100).toFixed(2) : item.approveAmount item.approveAmount = item.approveAmount ? (item.approveAmount / 100).toFixed(2) : item.approveAmount
item.lossAssessmentAmount = item.lossAssessmentAmount ? (item.lossAssessmentAmount / 100).toFixed(2) : item.lossAssessmentAmount
item.lossTypeList = [] item.lossTypeList = []
if (item.serviceItemCode == 'SC0006' && item.lossType) { if (item.serviceItemCode == 'SC0006' && item.lossType) {
item.lossTypeList = item.lossType.split(',') item.lossTypeList = item.lossType.split(',')
...@@ -404,6 +405,8 @@ export default { ...@@ -404,6 +405,8 @@ export default {
// 通过订单 // 通过订单
toPassOrder() { toPassOrder() {
this.isSave = false this.isSave = false
const _target = this.itemList?.find(item => item.applyAmount && item.lossAssessmentFlag && !item.lossAssessmentAmount)
if(_target) return this.$message.error(`请输入${_target.serviceItemName}的保险公司定损金额`)
if (this.orderMsg.status == 12 || this.orderMsg.status == 2) { if (this.orderMsg.status == 12 || this.orderMsg.status == 2) {
const isPass = this.verifyImages(this.claimsAttachmentConfigs) const isPass = this.verifyImages(this.claimsAttachmentConfigs)
if (!isPass) { if (!isPass) {
...@@ -737,6 +740,7 @@ export default { ...@@ -737,6 +740,7 @@ export default {
let contractNo = `itemsList[${index}].contractNo` let contractNo = `itemsList[${index}].contractNo`
let approveAmount = `itemsList[${index}].approveAmount` let approveAmount = `itemsList[${index}].approveAmount`
let applyAmount = `itemsList[${index}].applyAmount` let applyAmount = `itemsList[${index}].applyAmount`
let lossAssessmentAmount = `itemsList[${index}].lossAssessmentAmount`
let claimsId = `itemsList[${index}].claimsId` let claimsId = `itemsList[${index}].claimsId`
let lossType = `itemsList[${index}].lossType` let lossType = `itemsList[${index}].lossType`
let temp = { let temp = {
...@@ -747,6 +751,7 @@ export default { ...@@ -747,6 +751,7 @@ export default {
[contractNo]: this.repotData.contractNo, [contractNo]: this.repotData.contractNo,
[approveAmount]: item.approveAmount ? (Number(item.approveAmount) * 10 * 10).toFixed(0) : 0, [approveAmount]: item.approveAmount ? (Number(item.approveAmount) * 10 * 10).toFixed(0) : 0,
[applyAmount]: item.applyAmount ? (Number(item.applyAmount) * 10 * 10).toFixed(0) : 0, [applyAmount]: item.applyAmount ? (Number(item.applyAmount) * 10 * 10).toFixed(0) : 0,
[lossAssessmentAmount]: item.lossAssessmentAmount ? (Number(item.lossAssessmentAmount) * 10 * 10).toFixed(0) : 0,
[claimsId]: this.orderMsg.id, [claimsId]: this.orderMsg.id,
[lossType]: item.serviceItemCode == 'SC0006' ? item.lossTypeList.join(',') : item.lossType [lossType]: item.serviceItemCode == 'SC0006' ? item.lossTypeList.join(',') : item.lossType
} }
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<span>核赔不通过:{{ noPassMap[reasonForFailureCode] }},{{ reasonForFailure }}</span> <span>核赔不通过:{{ noPassMap[reasonForFailureCode] }},{{ reasonForFailure }}</span>
</div> </div>
<report @toSearchOrderDetail="toSearchOrderDetail" ref="reportRef" :isGH="routeInfo.isGH" :pageType="pageType" :editForm.sync="editForm"></report> <report @toSearchOrderDetail="toSearchOrderDetail" ref="reportRef" :isGH="routeInfo.isGH" :pageType="pageType" :editForm.sync="editForm"></report>
<!-- 维修信息 -->
<repair ref="repairRef" @changeObjectType="changeObjectType" :isGH="routeInfo.isGH" :pageType="pageType" :serviceItemsList.sync="serviceItemsList" :totalPrice.sync="totalPrice" :accountForm.sync="accountForm"></repair> <repair ref="repairRef" @changeObjectType="changeObjectType" :isGH="routeInfo.isGH" :pageType="pageType" :serviceItemsList.sync="serviceItemsList" :totalPrice.sync="totalPrice" :accountForm.sync="accountForm"></repair>
<material ref="materialRef" :pageType="pageType" :materialForm.sync="materialForm"></material> <material ref="materialRef" :pageType="pageType" :materialForm.sync="materialForm"></material>
<wraning :isWatchOrder="isWatchOrder" @getWarningData="getWarningData" v-if="accountMatchResultList.length && detailOrderStatus != 2" :list="accountMatchResultList"></wraning> <wraning :isWatchOrder="isWatchOrder" @getWarningData="getWarningData" v-if="accountMatchResultList.length && detailOrderStatus != 2" :list="accountMatchResultList"></wraning>
...@@ -182,7 +183,7 @@ export default { ...@@ -182,7 +183,7 @@ export default {
}, },
computed: { computed: {
totalPrice() { totalPrice() {
let total = this.serviceItemsList.reduce(function (prev, cur) { let total = this.serviceItemsList.reduce(function(prev, cur) {
return prev + +(cur.approveAmount * 100).toFixed(0) return prev + +(cur.approveAmount * 100).toFixed(0)
}, 0) }, 0)
return total / 100 return total / 100
...@@ -213,7 +214,7 @@ export default { ...@@ -213,7 +214,7 @@ export default {
imgFlag = true imgFlag = true
curImgIndex = index curImgIndex = index
} }
if (el.accountVerifyImagesList&&el.accountVerifyImagesList.length) { if (el.accountVerifyImagesList && el.accountVerifyImagesList.length) {
el.accountVerifyImagesList.forEach((k, i) => { el.accountVerifyImagesList.forEach((k, i) => {
if (!k.verifyImage) { if (!k.verifyImage) {
imgFlag = true imgFlag = true
...@@ -248,10 +249,15 @@ export default { ...@@ -248,10 +249,15 @@ export default {
} }
params.approveAmounts = '' params.approveAmounts = ''
let tagetObj = {} let tagetObj = {}
let lossAssessmentTarget = {}
this.serviceItemsList.forEach(item => { this.serviceItemsList.forEach(item => {
tagetObj[item.serviceItemCode] = item.approveAmount tagetObj[item.serviceItemCode] = item.approveAmount
if (item.lossAssessmentFlag) {
lossAssessmentTarget[item.serviceItemCode] = item.lossAssessmentAmount
}
}) })
params.approveAmounts = JSON.stringify(tagetObj) params.approveAmounts = JSON.stringify(tagetObj)
params.lossAssessmentAmounts = JSON.stringify(lossAssessmentTarget)
delete params.reimbursementAddress delete params.reimbursementAddress
params.fileList = [] params.fileList = []
for (let key in this.materialForm) { for (let key in this.materialForm) {
...@@ -283,20 +289,27 @@ export default { ...@@ -283,20 +289,27 @@ export default {
this.showNoPassDialog = true this.showNoPassDialog = true
this.noPass_operation = operation this.noPass_operation = operation
} else { } else {
const _target = this.serviceItemsList?.find(item => item.approveAmount && item.lossAssessmentFlag && !item.lossAssessmentAmount)
if (_target) return this.$message.error(`请输入${_target.serviceItemName}的保险公司定损金额`)
const allEmpty = this.serviceItemsList?.find(item => item.approveAmount)
if (!allEmpty) return this.$message.error(`请至少输入一项定损批准金额`)
const _approveTarget = this.serviceItemsList?.find(item => !item.approveAmount && item.lossAssessmentFlag && item.lossAssessmentAmount)
if (_approveTarget) return this.$message.error(`请输入${_approveTarget.serviceItemName}的定损批准金额`)
this.toCheckOrder(operation) this.toCheckOrder(operation)
} }
}, },
toCheckOrder(operation, addQuery = {}) { toCheckOrder(operation, addQuery = {}) {
let claimsQuery = {},_accountMatchResultList = [] let claimsQuery = {},
_accountMatchResultList = []
claimsQuery = this.handlerClaimsQueryForCheck() claimsQuery = this.handlerClaimsQueryForCheck()
if (operation == 20) { if (operation == 20) {
const flag = this.verifyWarningImage() const flag = this.verifyWarningImage()
if (!flag) return if (!flag) return
} }
if(this.queryList&&this.queryList.length>0){ if (this.queryList && this.queryList.length > 0) {
const _temArr = JSON.stringify(this.queryList) const _temArr = JSON.stringify(this.queryList)
_accountMatchResultList = JSON.parse(_temArr) _accountMatchResultList = JSON.parse(_temArr)
_accountMatchResultList.forEach(el=>{ _accountMatchResultList.forEach(el => {
delete el.matchType delete el.matchType
}) })
} }
...@@ -333,7 +346,7 @@ export default { ...@@ -333,7 +346,7 @@ export default {
id: el.id, id: el.id,
verifyResultDesc: el.verifyResultDesc, verifyResultDesc: el.verifyResultDesc,
accountVerifyImagesList: el.accountVerifyImagesList, accountVerifyImagesList: el.accountVerifyImagesList,
matchType:el.matchType matchType: el.matchType
} }
arr.push(obj) arr.push(obj)
}) })
...@@ -375,6 +388,8 @@ export default { ...@@ -375,6 +388,8 @@ export default {
} }
if (this.accountForm.accountType !== 1) this.accountForm.accountType = 0 if (this.accountForm.accountType !== 1) this.accountForm.accountType = 0
this.serviceItemsList = serviceItemsList || [] this.serviceItemsList = serviceItemsList || []
console.log(this.serviceItemsList, ' this.serviceItemsList ')
// 以下是文件数据 // 以下是文件数据
res.files.forEach(item => { res.files.forEach(item => {
let obj = { url: item.fileUrl, fileType: item.fileType, name: item.fileName, progress: 100 } let obj = { url: item.fileUrl, fileType: item.fileType, name: item.fileName, progress: 100 }
...@@ -477,15 +492,31 @@ export default { ...@@ -477,15 +492,31 @@ export default {
}) })
if (!valid) return valid if (!valid) return valid
let requirePrice = true let requirePrice = true
let lossAssTipItem = null
let approItem = null
this.serviceItemsList.forEach(item => { this.serviceItemsList.forEach(item => {
if (item.approveAmount > 0) { if (item.approveAmount > 0) {
requirePrice = false requirePrice = false
} }
if (item.approveAmount && item.lossAssessmentFlag && !item.lossAssessmentAmount) {
lossAssTipItem = item
}
if (!item.approveAmount && item.lossAssessmentFlag && item.lossAssessmentAmount) {
approItem = item
}
}) })
if (requirePrice) { if (requirePrice) {
this.$message.error('至少输入一项服务的定损批准金额') this.$message.error('至少输入一项服务的定损批准金额')
return false return false
} }
if (approItem) {
this.$message.error(`请输入${approItem.serviceItemName}的定损批准金额`)
return false
}
if (lossAssTipItem) {
this.$message.error(`请输入${lossAssTipItem.serviceItemName}的保险公司定损金额`)
return false
}
let fileTip = false let fileTip = false
for (let key in this.materialForm) { for (let key in this.materialForm) {
if (this.materialForm[key].length < 1 && !fileTip) { if (this.materialForm[key].length < 1 && !fileTip) {
...@@ -531,10 +562,15 @@ export default { ...@@ -531,10 +562,15 @@ export default {
} }
params.approveAmounts = '' params.approveAmounts = ''
let tagetObj = {} let tagetObj = {}
let lossAssessmentTarget = {}
this.serviceItemsList.forEach(item => { this.serviceItemsList.forEach(item => {
tagetObj[item.serviceItemCode] = item.approveAmount tagetObj[item.serviceItemCode] = item.approveAmount
if (item.lossAssessmentFlag) {
lossAssessmentTarget[item.serviceItemCode] = item.lossAssessmentAmount
}
}) })
params.approveAmounts = JSON.stringify(tagetObj) params.approveAmounts = JSON.stringify(tagetObj)
params.lossAssessmentAmounts = JSON.stringify(lossAssessmentTarget)
delete params.reimbursementAddress delete params.reimbursementAddress
params.fileList = [] params.fileList = []
for (let key in this.materialForm) { for (let key in this.materialForm) {
...@@ -556,14 +592,15 @@ export default { ...@@ -556,14 +592,15 @@ export default {
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)' background: 'rgba(0, 0, 0, 0.3)'
}) })
if(!this.routeInfo.isGH){ if (!this.routeInfo.isGH) {
params.equitySource = 2 params.equitySource = 2
} }
console.log(params, 'params')
this.$apis.claims.commitClaimsOrder(params).then(res => { this.$apis.claims.commitClaimsOrder(params).then(res => {
loading.close() loading.close()
if (res) { if (res) {
if (res.accountMatchResultList && res.accountMatchResultList.length) { if (res.accountMatchResultList && res.accountMatchResultList.length) {
res.accountMatchResultList.forEach(el=>{ res.accountMatchResultList.forEach(el => {
el.accountVerifyImagesList = el.accountVerifyImagesList || [] el.accountVerifyImagesList = el.accountVerifyImagesList || []
}) })
this.accountMatchResultList = res.accountMatchResultList || [] this.accountMatchResultList = res.accountMatchResultList || []
......
...@@ -19,6 +19,13 @@ ...@@ -19,6 +19,13 @@
<el-checkbox style="display: block; margin-left: 30px;" v-model="costPrice" @change="checkCostPrice">门店成本</el-checkbox> <el-checkbox style="display: block; margin-left: 30px;" v-model="costPrice" @change="checkCostPrice">门店成本</el-checkbox>
</el-form-item> </el-form-item>
</template> </template>
<div class="sale-mode">
<label class="label" for="">销售模式:</label>
<el-radio-group v-model="saleMode">
<el-radio :label="1">批发销售</el-radio>
<el-radio :label="2">驻店零售</el-radio>
</el-radio-group>
</div>
<template v-if="!showGh"> <template v-if="!showGh">
<el-form-item size="small" label="配置可见产品及产品属性"></el-form-item> <el-form-item size="small" label="配置可见产品及产品属性"></el-form-item>
<el-form-item> <el-form-item>
...@@ -91,7 +98,7 @@ ...@@ -91,7 +98,7 @@
<el-checkbox v-model="carefree">优享版</el-checkbox> <el-checkbox v-model="carefree">优享版</el-checkbox>
</el-form-item> </el-form-item>
<el-form-item v-for="item in newPackageList" :key="item.packageCode"> <el-form-item v-for="item in newPackageList" :key="item.packageCode">
<el-checkbox v-model="item.isChecked">{{item.packageName}}</el-checkbox> <el-checkbox v-model="item.isChecked">{{ item.packageName }}</el-checkbox>
<div> <div>
<el-checkbox v-model="item.cardName" true-label="card" false-label="">卡输入</el-checkbox> <el-checkbox v-model="item.cardName" true-label="card" false-label="">卡输入</el-checkbox>
</div> </div>
...@@ -103,7 +110,6 @@ ...@@ -103,7 +110,6 @@
<el-row slot> <el-row slot>
<el-form :model="searchForm" ref="relate" :inline="true" label-width="90px" class="configDialog"> <el-form :model="searchForm" ref="relate" :inline="true" label-width="90px" class="configDialog">
<el-form-item> <el-form-item>
<el-input placeholder="请输入内容" v-model="searchForm.selectInput" class="input-with-select" size="small"> <el-input placeholder="请输入内容" v-model="searchForm.selectInput" class="input-with-select" size="small">
<el-select v-model="searchForm.select" slot="prepend" placeholder="请选择"> <el-select v-model="searchForm.select" slot="prepend" placeholder="请选择">
<el-option label="商户名称" value="1"></el-option> <el-option label="商户名称" value="1"></el-option>
...@@ -140,6 +146,7 @@ export default { ...@@ -140,6 +146,7 @@ export default {
configTitle:'', configTitle:'',
selectedTable: false, selectedTable: false,
checkPosition: false, checkPosition: false,
saleMode: 1,
tableData: [], tableData: [],
merchantIds: [], merchantIds: [],
selectedList: [], selectedList: [],
...@@ -310,10 +317,11 @@ export default { ...@@ -310,10 +317,11 @@ export default {
merchantId merchantId
} }
if(this.showGh){ if(this.showGh){
para.channel = 2 para.channel = 2
} }
this.$apis.openconfig.getConfig(para).then(res => { this.$apis.openconfig.getConfig(para).then(res => {
res = res || {} res = res || {}
this.saleMode = res.saleMode
this.costPrice = res.openCostPrice == 1 this.costPrice = res.openCostPrice == 1
this.storeSelParams = res this.storeSelParams = res
this.id = res.id this.id = res.id
...@@ -447,7 +455,8 @@ export default { ...@@ -447,7 +455,8 @@ export default {
}) })
let targetParams = { let targetParams = {
openCostPrice : this.costPrice ? 1 : 0, openCostPrice : this.costPrice ? 1 : 0,
createDetailRequests: params createDetailRequests: params,
saleMode: this.saleMode
} }
if(this.showGh){ if(this.showGh){
delete targetParams.createDetailRequests delete targetParams.createDetailRequests
...@@ -678,6 +687,27 @@ export default { ...@@ -678,6 +687,27 @@ export default {
} }
} }
.sale-mode {
height: 32px;
line-height: 32px;
display: flex;
align-items: center;
.label {
// width: 154px;
display: inline-block;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 14px;
color: #333333;
text-align: right;
&::before {
content: '*';
color: #f56c6c;
margin-right: 4px;
}
}
}
.special-config { .special-config {
margin-bottom: 0 !important; margin-bottom: 0 !important;
} }
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<!-- <el-button size="small" @click="toggleAll">全选</el-button> --> <!-- <el-button size="small" @click="toggleAll">全选</el-button> -->
<!-- <el-checkbox v-model="checkbox" @change="toggleAll" style="margin-left:20px">全选</el-checkbox> --> <!-- <el-checkbox v-model="checkbox" @change="toggleAll" style="margin-left:20px">全选</el-checkbox> -->
<div style="float: right;" class="primary_plain_btn"> <div style="float: right;" class="primary_plain_btn">
<el-button size="small" plain @click="batchOpenSale()">批量开通驻店零售</el-button>
<el-button size="small" plain @click="batchOperation(1)">批量开通</el-button> <el-button size="small" plain @click="batchOperation(1)">批量开通</el-button>
<el-button size="small" @click="batchOperation(2)">批量关闭</el-button> <el-button size="small" @click="batchOperation(2)">批量关闭</el-button>
<el-button size="small" @click="exportTable">导出</el-button> <el-button size="small" @click="exportTable">导出</el-button>
...@@ -150,6 +151,13 @@ export default { ...@@ -150,6 +151,13 @@ export default {
prop: 'merchantId' prop: 'merchantId'
}, },
{ {
label: '销售模式',
prop: 'saleMode',
formatter: cell => {
return cell.saleMode == 1 ? '批发销售' : '驻店零售'
}
},
{
label: '状态', label: '状态',
prop: 'openFlag', prop: 'openFlag',
formatter: cell => { formatter: cell => {
...@@ -259,6 +267,26 @@ export default { ...@@ -259,6 +267,26 @@ export default {
this.searchForm[this.searchSelectObj.idOrName.attr] = this.searchSelectObj.idOrName.value this.searchForm[this.searchSelectObj.idOrName.attr] = this.searchSelectObj.idOrName.value
this.$refs.table.refreshTable() this.$refs.table.refreshTable()
}, },
batchOpenSale(){
const data = this.$refs.table?.mutiSelectArr?.[this.tableParams.mutiSelectName] || []
if(!data?.length) return this.$message.error('请选择需要开通的商户')
this.$confirm('确定批量开通驻店零售吗', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: action => {
if (action == 'confirm') {
const ids = data.map(item => item.id)
this.$apis.openconfig.batchOpenSaleModeApi({ids, saleMode: 2}).then(res => {
if(res){
this.$message.success('操作成功')
this.$refs.table.refreshTable()
}
})
}
}
})
},
// ['开通', '关闭'] // // ['开通', '关闭'] //
batchOperation(status) { batchOperation(status) {
let { configIndexMutiTable } = this.$refs.table.$refs let { configIndexMutiTable } = this.$refs.table.$refs
...@@ -285,8 +313,7 @@ export default { ...@@ -285,8 +313,7 @@ export default {
this.$confirm(content[status], '提示', { this.$confirm(content[status], '提示', {
confirmButtonText: '是', confirmButtonText: '是',
cancelButtonText: '否', cancelButtonText: '否',
type: 'warning', type: 'warning'
center: true
}) })
.then(() => { .then(() => {
let target = 'openConfigs' let target = 'openConfigs'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!