Commit dc154ed5 by zhangquan

接口联调

1 parent 5d96362a
import { http } from '@/main' import { http } from '@/main'
const CUR_BASE_URL = 'rop-scrm-equity/router'
const get4SList = params => { const get4SList = params => {
params.method = `scrm.api.carlife.merchant.listWithPageByCurMerchant` params.method = `scrm.api.carlife.merchant.listWithPageByCurMerchant`
...@@ -71,6 +72,56 @@ const getEquityDetail = params => { ...@@ -71,6 +72,56 @@ 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 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 getSpecificaListApi = params => {
params.method = `scrm.api.equity.service.items.grade.list`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
export default { export default {
get4SList, get4SList,
getEquityList, getEquityList,
...@@ -78,5 +129,10 @@ export default { ...@@ -78,5 +129,10 @@ export default {
getServiceList, getServiceList,
craeteEquity, craeteEquity,
updateEquity, updateEquity,
getEquityDetail getEquityDetail,
getServicesItemsList,
createCommonConfig,
getCommonConfig,
addServicesProject,
getSpecificaListApi
} }
\ No newline at end of file \ No newline at end of file
...@@ -2,11 +2,13 @@ ...@@ -2,11 +2,13 @@
<div class="bar-content"> <div class="bar-content">
<label for="" class="content-label">{{label}}</label> <label for="" class="content-label">{{label}}</label>
<div class="editor"> <div class="editor">
<quill-editor ref="myQuillEditor" class="quill" v-model="content[key]" :options="editorOption"></quill-editor> <quill-editor ref="myQuillEditor" class="quill" v-model="obj[attr]" :options="editorOption" @change="onEditorChange($event)"></quill-editor>
<div class="extend-bar"> <div class="extend-bar">
<i class="el-icon-circle-plus extend-icon" @click="insertContent">购买条件</i> <i class="el-icon-circle-plus extend-icon" @click="insertContent">购买条件</i>
</div> </div>
</div> </div>
<el-input type="text" v-model="obj[attr]" name="" id=""></el-input>
<button @click="sss">ss</button>
</div> </div>
</template> </template>
...@@ -22,13 +24,10 @@ export default { ...@@ -22,13 +24,10 @@ export default {
quillEditor, quillEditor,
}, },
props: { props: {
content: { obj: {
type: Object, type: Object
default: ()=>{
return {}
},
}, },
key: { attr: {
type: String, type: String,
default: '', default: '',
}, },
...@@ -69,6 +68,12 @@ export default { ...@@ -69,6 +68,12 @@ export default {
let length = quill.selection.savedRange.index; let length = quill.selection.savedRange.index;
quill.insertEmbed(length, 'label', 132); quill.insertEmbed(length, 'label', 132);
quill.setSelection(length + 1); quill.setSelection(length + 1);
},
onEditorChange(e){
console.log(e)
},
sss(){
console.log(this.obj)
} }
} }
} }
......
<template> <template>
<div class="upload-ctnr"> <div class="upload-ctnr">
<label v-if="name" class="label" for="">{{name}}</label> <label v-if="name" class="label" for="">{{name}}</label>
<div :class="['upload-wrap']" :style="defaultStyle"> <div class="upload-wrap" :style="defaultStyle">
<img v-if="url" class="image" :src="url" alt="" /> <img v-if="url" class="image" :src="url" alt="" />
<div v-else class="add-img"> <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> <i class="el-icon-plus add"></i>
<p>上传照片</p> <p>上传照片</p>
</div> </div>
<div class="operate" v-if="url"> <div class="operate" v-if="url">
<div class="btn-wrap"> <div class="btn-wrap">
<i class="el-icon-view"></i> <i class="el-icon-view"></i>
<i class="el-icon-delete"></i> <i class="el-icon-delete" @click="del"></i>
</div> </div>
</div> </div>
</div> </div>
...@@ -29,7 +30,7 @@ ...@@ -29,7 +30,7 @@
type: String, type: String,
default: 'https://img02.glsx.com.cn/weapp/resource/saas/scrm/assets/glsx/logo_menu.png' default: 'https://img02.glsx.com.cn/weapp/resource/saas/scrm/assets/glsx/logo_menu.png'
}, },
key: { attr: {
type: String, type: String,
default: '' default: ''
}, },
...@@ -46,12 +47,28 @@ ...@@ -46,12 +47,28 @@
} }
}, },
methods: { methods: {
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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.upload-ctnr{ .upload-ctnr{
display: flex;
.label{ .label{
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
...@@ -66,7 +83,7 @@ ...@@ -66,7 +83,7 @@
.upload-wrap{ .upload-wrap{
display: inline-flex; display: inline-flex;
border: 1px dashed #00000026; border: 1px dashed #00000026;
// box-sizing: border-box; box-sizing: border-box;
width: 104px; width: 104px;
height: 104px; height: 104px;
background: #0000000a; background: #0000000a;
...@@ -92,6 +109,16 @@ ...@@ -92,6 +109,16 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
color: #666666; color: #666666;
position: relative;
.file{
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1;
position: absolute;
opacity: 0;
}
.add { .add {
font-size: 18px; font-size: 18px;
} }
......
...@@ -17,7 +17,7 @@ export const fetchConfig = function(isEnv = true) { ...@@ -17,7 +17,7 @@ export const fetchConfig = function(isEnv = true) {
// Object.assign(request, { timeout }) // Object.assign(request, { timeout })
// return Promise.resolve(cfg) // return Promise.resolve(cfg)
// } // }
return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get(' https://oss-config.dev.glsx.com.cn/mock/618f5cc91072f92988f05a26/services/config') 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()) //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' }) // request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</div> </div>
</FoldFrame> </FoldFrame>
<FoldFrame name="合同介绍区域"> <FoldFrame name="合同介绍区域">
<Editor label="标题和介绍:" :content="obj" key="content"></Editor> <Editor label="标题和介绍:" :obj="obj" attr="content"></Editor>
</FoldFrame> </FoldFrame>
</div> </div>
<div class="preview-area"> <div class="preview-area">
......
...@@ -4,14 +4,14 @@ ...@@ -4,14 +4,14 @@
<div class="base-info"> <div class="base-info">
<div class="global-title">基本信息</div> <div class="global-title">基本信息</div>
<div class="main-wrap"> <div class="main-wrap">
<glsx-combi-form ref="editFormRefCar" labelWidth="154px" :isInline="false" :formObj.sync="formObj" :formData="formData" :formRules="editRuleCar"> <glsx-combi-form ref="baseInfoRef" labelWidth="154px" defaultWidth="432px" :isInline="false" :formObj.sync="formObj" :formData="formData" :formRules="myRule">
<div slot="timeLimitSlot"> <div slot="timeLimitSlot">
<el-checkbox-group v-model="formObj.nianxian"> <el-checkbox-group v-model="formObj.salePeriod">
<el-checkbox v-for="city in cities" :label="city" :key="city">{{city}}</el-checkbox> <el-checkbox v-for="item in salePeriodList" :label="item.key" :key="item.key">{{ item.label }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
<div slot="logoSettingSlot" class="logo-setting"> <div slot="logoSettingSlot" class="logo-setting">
<Upload v-for="(item,idx) in formObj.logo" :key="idx" :name="item.name"></Upload> <Upload v-for="item in logoList" :url="formObj[item.key]" @delImage="delImage" @uploadSuccess="uploadSuccess" :attr="item.key" :key="item.key" :name="item.name"></Upload>
<span class="upload-tip">建议尺寸:88px*88px,图片格式为jpg,jpeg,png</span> <span class="upload-tip">建议尺寸:88px*88px,图片格式为jpg,jpeg,png</span>
</div> </div>
</glsx-combi-form> </glsx-combi-form>
...@@ -20,26 +20,34 @@ ...@@ -20,26 +20,34 @@
<div class="services-wrap"> <div class="services-wrap">
<div class="global-title">服务介绍</div> <div class="global-title">服务介绍</div>
<div class="main-wrap"> <div class="main-wrap">
<glsx-combi-form ref="editFormRefCar" labelWidth="154px" :isInline="false" :formObj.sync="formObj" :formData="servicesformData" :formRules="editRuleCar"> <glsx-combi-form ref="servicesRef" labelWidth="154px" defaultWidth="432px" :isInline="false" :formObj.sync="formObj" :formData="servicesformData" :formRules="myRule">
<div slot="buyConditionSlot" class="buy-condition"> <div slot="buyConditionSlot" class="buy-condition">
<el-checkbox-group v-model="formObj.nianxian"> <el-checkbox-group v-model="formObj.buyConditions">
<el-checkbox v-for="(city,index) in cities" :key="city"> <el-checkbox v-for="(item,index) in conditionList" :label="item.id" :key="index">
<span>条件{{index+1}}</span> <span class="sign">条件{{index+1}}</span>
<span class="condition"> <span v-if="!item.newItem" class="condition">{{item.contractContent}}</span>
asdasdasdasdasdasdasdasdasd <el-input v-else type="text" v-model="curEditCondition.value" @blur.stop="createConfig(0)"></el-input>
</span> <i v-if="!item.newItem" class="el-icon-edit-outline edit" @click.prevent="editCondition(item)"></i>
<i class="el-icon-delete del" @click.prevent="delCondition($event)"></i>
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
<div class="add-btn"> <div class="add-btn" @click="addCondition('conditionList')">
<i class="el-icon-circle-plus-outline"></i> <i class="el-icon-circle-plus-outline"></i>
新增条件 新增条件
</div> </div>
</div> </div>
<div slot="logoSettingSlot" class="logo-setting"> <div slot="responsibilitySlot" class="buy-condition">
<Upload v-for="(item,idx) in formObj.logo" :key="idx" :name="item.name"></Upload> <el-checkbox-group v-model="formObj.exclusionsResponsibility">
<span class="upload-tip">建议尺寸:88px*88px,图片格式为jpg,jpeg,png</span> <el-checkbox v-for="(item,index) in responsibilityList" :label="item.id" :key="index">
<span class="sign">责任{{index+1}}</span>
<span v-if="!item.newItem" class="condition">{{item.contractContent}}</span>
<el-input v-else type="text" v-model="curEditCondition.value" @blur.stop="createConfig(1)"></el-input>
<i v-if="!item.newItem" class="el-icon-edit-outline edit" @click.prevent="editCondition(item)"></i>
</el-checkbox>
</el-checkbox-group>
<div class="add-btn" @click="addCondition('responsibilityList')">
<i class="el-icon-circle-plus-outline"></i>
新增责任
</div>
</div> </div>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
...@@ -62,7 +70,7 @@ ...@@ -62,7 +70,7 @@
</div> </div>
</template> </template>
<div class="footer-btn"> <div class="footer-btn">
<el-button @click="addClause(1)">取消</el-button> <el-button @click="cancel">取消</el-button>
<el-button type="primary" @click="firstPage = true">上一步</el-button> <el-button type="primary" @click="firstPage = true">上一步</el-button>
<el-button type="primary" @click="nextStep">下一步</el-button> <el-button type="primary" @click="nextStep">下一步</el-button>
</div> </div>
...@@ -83,60 +91,129 @@ export default { ...@@ -83,60 +91,129 @@ export default {
data() { data() {
return { return {
firstPage: true, firstPage: true,
cities: ['上海', '北京', '广州', '深圳'], curEditCondition: {
formObj:{ id: '',
serviceName: '', value: ''
nianxian: '', },
logo:[ conditionList: [],
responsibilityList: [],
salePeriodList: [
{label: '1年' ,key: '1'},
{label: '2年' ,key: '2'},
{label: '3年' ,key: '3'},
{label: '4年' ,key: '4'},
{label: '5年' ,key: '5'},],
logoList: [
{ {
name: '未激活:', name: '未激活:',
url: '' url: '',
key: 'unactivatedLogo'
}, },
{ {
name: '已激活:', name: '已激活:',
url: '' url: '',
key: 'activatedLogo'
}, },
{ {
name: '详情页Logo:', name: '详情页Logo:',
url: '' url: '',
key: 'detailLogo'
} }
] ],
myRule: {
serviceName: [{ required: true, message: '请输入服务项目名称', trigger: 'change' }],
serviceShortName: [{ required: true, message: '请输入服务项目简称', trigger: 'change' }],
guorenCode: [{ required: true, message: '请输入国任理赔编码', trigger: 'change' }],
salePeriod: [{ required: true, message: '请选择销售年限', trigger: 'change' }],
logoUrl: [
{
required: true,
validator: (rule, value, callback) => {
if (!this.formObj.unactivatedLogo) {
callback(new Error('请上传未激活Logo图'))
} else if (!this.formObj.activatedLogo) {
callback(new Error('请上传已激活Logo图'))
} else if (!this.formObj.detailLogo) {
callback(new Error('请上传详情页Logo图'))
} else{
callback()
}
},
trigger: 'change'
}
],
buyConditions: [{ required: true, message: '请选择购买条件', trigger: 'change' }],
prerequisite: [{ required: true, message: '请输入前提条件', trigger: 'change' }],
exclusionsResponsibility: [{ required: true, message: '请选择除外责任', trigger: 'change' }],
serviceData: [{ required: true, message: '请输入服务资料', trigger: 'change' }],
},
formObj:{
serviceName: '',
serviceShortName: '',
guorenCode: '',
logoUrl: '',
unactivatedLogo: '',
activatedLogo: '',
detailLogo: '',
serviceData: '',
prerequisite: '',
exclusionsResponsibility: [],
salePeriod: [],
buyConditions: []
}, },
formData:[ formData:[
{ {
label: '服务项目名称:', label: '服务项目名称:',
name: 'serviceName', name: 'serviceName',
placeholder: '请输入服务项目名称',
type: 'input',
maxlength: 50
},
{
label: '服务项目简称:',
name: 'serviceShortName',
placeholder: '请输入服务项目简称',
type: 'input', type: 'input',
maxlength: 8 maxlength: 50
},
{
label: '国任理赔编码:',
name: 'guorenCode',
placeholder: '请输入国任理赔编码',
type: 'input',
maxlength: 50
}, },
{ {
label: '销售年限:', label: '销售年限:',
name: 'nianxian', name: 'salePeriod',
addHtml: 'timeLimitSlot' addHtml: 'timeLimitSlot'
}, },
{ {
label: 'Logo设置:', label: 'Logo设置:',
name: 'logoUrl',
addHtml: 'logoSettingSlot' addHtml: 'logoSettingSlot'
}, },
], ],
servicesformData: [ servicesformData: [
{ {
label: '购买条件:', label: '购买条件:',
name: 'buyCondition', name: 'buyConditions',
addHtml: 'buyConditionSlot' addHtml: 'buyConditionSlot'
}, },
{ {
label: '前提条件:', label: '前提条件:',
name: 'prerequisite',
type: 'input', type: 'input',
inputType: 'textarea' inputType: 'textarea'
}, },
{ {
label: '除外责任:', label: '除外责任:',
name: 'nianxian', name: 'exclusionsResponsibility',
addHtml: 'timeLimitSlot' addHtml: 'responsibilitySlot'
}, },
{ {
label: '服务资料:', label: '服务资料:',
name: 'serviceData',
type: 'input', type: 'input',
inputType: 'textarea' inputType: 'textarea'
}, },
...@@ -155,22 +232,90 @@ export default { ...@@ -155,22 +232,90 @@ export default {
name: 'nianxian', name: 'nianxian',
addHtml: 'specConfigSlot' addHtml: 'specConfigSlot'
}, },
] ],
} }
}, },
created() { created() {
this.getConfigList()
}, },
mounted() { mounted() {
}, },
methods: { methods: {
delCondition(){ editCondition(row){
console.log(123) this.curEditCondition = {
id: row.id,
value: row.contractContent
}
const target = this.conditionList.find(item => item.id==row.id)
this.$set(target, 'newItem', true)
},
addCondition(key){
this[key].push({newItem: true})
},
getSpecificaList(){
const params = { serviceCode: 'SC0027'}
this.$apis.serviceConfig.getSpecificaListApi(params).then(res => {
console.log(res)
})
},
cancel(){
this.getSpecificaList()
}, },
nextStep(){ nextStep(){
this.$refs.baseInfoRef.$refs.formRef.validate(bValid => {
this.$refs.servicesRef.$refs.formRef.validate(sValid => {
if(bValid && sValid){
console.log(this.formObj)
const params = JSON.parse(JSON.stringify(this.formObj))
params.exclusionsResponsibility = params.exclusionsResponsibility.join(',')
params.buyConditions = params.buyConditions.join(',')
params.salePeriod = params.salePeriod.join(',')
this.$apis.serviceConfig.addServicesProject(params).then(res => {
if(res) {
this.firstPage = false this.firstPage = false
} }
})
}
})
})
},
uploadSuccess(e){
console.log(e)
this.formObj[e.attr] = e.url
},
delImage(e){
this.formObj[e.attr] = ''
},
getConfigList() {
this.$apis.serviceConfig.getCommonConfig({}).then(res => {
this.conditionList = res.filter(item => item.contentType == 0)
this.responsibilityList = res.filter(item => item.contentType == 1)
})
},
createConfig(type){
const {id, value} = this.curEditCondition
if(!value) {
this.conditionList = this.conditionList.filter(item => item.contractContent)
this.$message.error(`${type==0 ? '购买条件' : '除外责任'}不能为空`)
return
}
const params = {
contentType: type,
contractContent: value
}
if(id) params.id = id
this.$apis.serviceConfig.createCommonConfig(params).then(res=>{
console.log(res)
if(res){
this.$message.success('操作成功')
this.getConfigList()
}
})
}
} }
} }
</script> </script>
...@@ -200,7 +345,7 @@ export default { ...@@ -200,7 +345,7 @@ export default {
width: 778px; width: 778px;
background: #F9F9F9; background: #F9F9F9;
padding: 20px 0; padding: 20px 0;
.upload-wrap{ .upload-ctnr{
margin-bottom: 20px; margin-bottom: 20px;
&:nth-child(3){ &:nth-child(3){
margin-bottom: 0; margin-bottom: 0;
...@@ -220,6 +365,12 @@ export default { ...@@ -220,6 +365,12 @@ export default {
margin-top: 20px; margin-top: 20px;
background-color: #fff; background-color: #fff;
.buy-condition{ .buy-condition{
.el-checkbox{
width: fit-content;
}
.sign{
margin-right: 8px;
}
.condition{ .condition{
height: 32px; height: 32px;
line-height: 32px; line-height: 32px;
...@@ -228,12 +379,11 @@ export default { ...@@ -228,12 +379,11 @@ export default {
padding: 0 12px; padding: 0 12px;
font-size: 14px; font-size: 14px;
color: #333333; color: #333333;
margin-left: 8px;
} }
.el-checkbox{ .el-checkbox{
display: block; display: block;
} }
.del{ .edit{
color: #C6C6C6; color: #C6C6C6;
margin-left: 8px; margin-left: 8px;
} }
......
<template> <template>
<div class="container"> <div class="container">
<div class="find_wrap">
<GLCombiForm ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
</div> <div class="table-wrapper">
<div class="table_wrapper">
<div class="operate_wrap"> <div class="operate_wrap">
<span class="table_title">配置列表</span> <span class="table_title">配置列表</span>
<div class="operate_btn"> <div class="operate_btn">
...@@ -12,8 +10,9 @@ ...@@ -12,8 +10,9 @@
</div> </div>
</div> </div>
<GLTable ref="equityRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="equityRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div slot="serviceContent" slot-scope="scope"> <div slot="statusSlot" slot-scope="scope">
<div v-html="scope.scope.serviceContent"></div> <span class="statsu-circle" :style="{'background-color': scope.scope.serviceStatus == 0 ? '#FDB757' : '#2CCA74'}"></span>
<span>{{ scope.scope.serviceStatus == 0 ? '待配置': '已配置' }}</span>
</div> </div>
<span slot="auth-button" slot-scope="scope" :data="scope.scope"> <span slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton> <GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
...@@ -61,7 +60,7 @@ ...@@ -61,7 +60,7 @@
], ],
searchForm: { searchForm: {
serviceName: '', serviceName: '',
status: '', serviceStatus: '',
createdDate: '', createdDate: '',
updatedDate: '' updatedDate: ''
}, },
...@@ -69,14 +68,30 @@ ...@@ -69,14 +68,30 @@
searchFormData: [ searchFormData: [
{ {
label: '服务名称', label: '服务名称',
name: 'serveiceName', name: 'serviceName',
type: 'input', type: 'input',
isClear: true, isClear: true,
}, },
{ {
label: '状态', label: '状态',
name: 'status', name: 'serviceStatus',
type: 'input', type: 'select',
optionList: [
{
id: '',
label: '全部'
},
{
id: '0',
label: '待配置'
},
{
id: '1',
label: '已配置'
}
],
optionId: 'id',
optionLabel: 'label',
isClear: true, isClear: true,
}, },
{ {
...@@ -97,14 +112,14 @@ ...@@ -97,14 +112,14 @@
} }
], ],
// 表格 // 表格
getListApi: this.$apis.serviceConfig.getEquityList, getListApi: this.$apis.serviceConfig.getServicesItemsList,
tableParams: { tableParams: {
listName: 'list', listName: 'list',
tableOption: true, tableOption: true,
tableColumns: [ tableColumns: [
{ {
label: '服务编号', label: '服务编号',
prop: 'sno', prop: 'serviceCode',
width: 200 width: 200
}, },
{ {
...@@ -115,39 +130,38 @@ ...@@ -115,39 +130,38 @@
{ {
label: '可销售服务年限', label: '可销售服务年限',
minWidth: 280, minWidth: 280,
prop: 'serviceContent', prop: 'serviceContent'
addHtml: 'serviceContent'
}, },
{ {
label: '规格数量', label: '规格数量',
minWidth: 150, minWidth: 150,
prop: 'instruct' prop: 'gradeCount'
}, },
{ {
label: '创建时间', label: '创建时间',
prop: 'createDate', prop: 'createdDate',
width: 200, width: 200,
formatter: cellValue => { 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: '更新时间', label: '更新时间',
prop: 'updateDate', prop: 'updatedDate',
width: 200, width: 200,
formatter: cellValue => { 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: '状态', label: '状态',
minWidth: 280, minWidth: 150,
prop: 'serviceContent', prop: 'status',
addHtml: 'serviceContent' addHtml: 'statusSlot'
}, },
{ {
label: '操作人', label: '操作人',
prop: 'updateBy', prop: 'updatedBy',
width: 140 width: 140
} }
] ]
...@@ -163,12 +177,12 @@ ...@@ -163,12 +177,12 @@
getParams() { getParams() {
let params = JSON.parse(JSON.stringify(this.searchForm)) let params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm?.createdDate?.length) { if (this.searchForm?.createdDate?.length) {
params.minCreateTime = new Date(this.searchForm.createdDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00' params.beginCreateTime = 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.endCreateTime = new Date(this.searchForm.createdDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
} }
if (this.searchForm?.updatedDate?.length) { if (this.searchForm?.updatedDate?.length) {
params.minUpdateTime = new Date(this.searchForm.updatedDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00' params.beginUpdateTime = 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.endUpdateTime = new Date(this.searchForm.updatedDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
} }
delete params.createdDate delete params.createdDate
delete params.updatedDate delete params.updatedDate
...@@ -206,7 +220,7 @@ ...@@ -206,7 +220,7 @@
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
serviceName: '', serviceName: '',
status: '', serviceStatus: '',
createdDate: '', createdDate: '',
updatedDate: '' updatedDate: ''
} }
...@@ -231,21 +245,18 @@ ...@@ -231,21 +245,18 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.find_wrap { .container{
background: #ffffff; background-color: #ffffff;
padding: 20px 20px 2px 20px; padding: 20px;
.resetBtn { .statsu-circle{
background: #ffffff; display: inline-block;
color: #5850ff; width: 6px;
border: 1px solid #5850ff; height: 6px;
} border-radius: 50%;
.m-r-l-20 { background-color: #FDB757;
margin: 0 20px; margin-right: 8px;
} vertical-align: middle;
} }
.table_wrapper {
background: #ffffff;
padding: 0 20px 20px;
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!