Commit 11e2405a by zhangquan

接口联调50%

1 parent c2d8ed41
...@@ -10,6 +10,51 @@ const get4SList = params => { ...@@ -10,6 +10,51 @@ const get4SList = params => {
}) })
} }
// 获取权益列表
const getEquityList = params => {
params.method = 'scrm.api.equity.serviceterms.page'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const exportEquityApi = params => {
params.method = `scrm.api.equity.serviceterms.export`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const getServiceList = params => {
params.method = `scrm.api.equity.serviceterms.itemslist`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const craeteEquity = params => {
params.method = `scrm.api.equity.serviceterms.insertorupdate`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
export default { export default {
get4SList get4SList,
getEquityList,
exportEquityApi,
getServiceList,
craeteEquity
} }
\ No newline at end of file \ No newline at end of file
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
<div v-if="formObj.merchantName">{{ formObj.merchantName }}</div> <div v-if="formObj.merchantName">{{ formObj.merchantName }}</div>
</div> </div>
<div class="equity-class" slot="selectEquity"> <div class="equity-class" slot="selectEquity">
<div class="equity-area"> <div class="equity-area" v-for="item in serviceList" :key="item.serviceCode">
<el-checkbox v-model="checked1">备选项1</el-checkbox> <el-checkbox v-model="item.checked">{{item.serviceName}}</el-checkbox>
<div> <div v-if="item.checked">
<el-input class="desc" v-model="txt" placeholder="请输入概述"></el-input> <el-input class="desc" v-model="item.summary" placeholder="请输入概述"></el-input>
<quill-editor class="quill" v-model="txt" :options="editorOption"></quill-editor> <quill-editor class="quill" v-model="item.serviceContent" :options="editorOption"></quill-editor>
</div> </div>
</div> </div>
</div> </div>
...@@ -50,6 +50,7 @@ import 'quill/dist/quill.snow.css' ...@@ -50,6 +50,7 @@ import 'quill/dist/quill.snow.css'
return { return {
size: 'small', size: 'small',
txt: '', txt: '',
serviceList: [],
relateStoreVisible: false, relateStoreVisible: false,
selectedList: [], selectedList: [],
editorOption: { editorOption: {
...@@ -80,23 +81,45 @@ import 'quill/dist/quill.snow.css' ...@@ -80,23 +81,45 @@ import 'quill/dist/quill.snow.css'
] ]
} }
}, },
created() {
this.getServiceList()
},
mounted() { mounted() {
}, },
methods: { methods: {
getServiceList(){
this.$apis.serviceConfig.getServiceList({}).then(res => {
console.log(res)
if(res?.length){
this.serviceList = res.map(item => {
item.checked=false
item.serviceContent = ''
item.summary = ''
return item
})
}
})
},
selectMerchant(){ selectMerchant(){
this.relateStoreVisible = !this.relateStoreVisible this.relateStoreVisible = !this.relateStoreVisible
}, },
handleRelateStoreConfirm(e){ handleRelateStoreConfirm(e = {}){
console.log(e) this.formObj = {...e}
this.formObj = e
this.selectMerchant() this.selectMerchant()
}, },
submit(){ submit(){
let a = this.$refs.editArea let { merchantId, merchantName } = this.formObj
console.log(a.innerHTML) let serviceList = {...this.serviceList}
let params = {
merchantId,
merchantName,
serviceList: serviceList.map(item => item.checked)
}
this.$apis.serviceConfig.craeteEquity(params).then(res => {
console.log()
})
} }
} }
} }
......
...@@ -57,11 +57,11 @@ ...@@ -57,11 +57,11 @@
} }
], ],
searchForm: { searchForm: {
completionStatus: '', merchantName: '',
packageCode: '', serviceName: '',
channel: '', serviceContent: '',
successDate: [], createdDate: '',
effectiveDate: [] updatedDate: ''
}, },
tableSearchForm: {}, tableSearchForm: {},
searchFormData: [ searchFormData: [
...@@ -101,53 +101,48 @@ ...@@ -101,53 +101,48 @@
} }
], ],
// 表格 // 表格
getListApi: this.$apis.beforeSale.getOrdersummary, getListApi: this.$apis.serviceConfig.getEquityList,
tableParams: { tableParams: {
listName: 'list', listName: 'list',
tableOption: true, tableOption: true,
tableColumns: [ tableColumns: [
{ {
label: '服务名称', label: '服务名称',
prop: 'serveiceName', prop: 'serviceName',
line: 1,
width: 200 width: 200
}, },
{ {
label: '条款描述', label: '条款描述',
prop: 'description', prop: 'serviceContent',
}, },
{ {
label: '使用说明', label: '使用说明',
line: 1, prop: 'summary'
prop: 'useRemark'
}, },
{ {
label: '创建时间', label: '创建时间',
line: 1, prop: 'createDate',
prop: 'createdDate', width: 200,
width: 160,
formatter: cellValue => { formatter: cellValue => {
return cellValue.effectiveDate ? dayjs(cellValue.effectiveDate).format('YYYY-MM-DD') : '--' return cellValue.createDate ? dayjs(cellValue.createDate).format('YYYY-MM-DD HH:mm:ss') : '--'
} }
}, },
{ {
label: '更新时间', label: '更新时间',
line: 1, prop: 'updateDate',
prop: 'updatedDate', width: 200,
width: 160,
formatter: cellValue => { formatter: cellValue => {
return cellValue.effectiveDate ? dayjs(cellValue.effectiveDate).format('YYYY-MM-DD') : '--' return cellValue.updateDate ? dayjs(cellValue.updateDate).format('YYYY-MM-DD HH:mm:ss') : '--'
} }
}, },
{ {
label: '操作人', label: '操作人',
line: 1, prop: 'updateBy',
prop: 'updatedBy',
width: 140 width: 140
} }
] ]
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'pageCount', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
} }
}, },
...@@ -156,16 +151,19 @@ ...@@ -156,16 +151,19 @@
methods: { methods: {
getParams() { getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm)) let params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.successDate.length) { console.log(params,'params')
params.successStartDates = new Date(this.searchForm.successDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00' if (this.searchForm?.createdDate?.length) {
params.successEndDates = new Date(this.searchForm.successDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59' 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'
} }
if (this.searchForm.effectiveDate.length) { if (this.searchForm?.updatedDate?.length) {
params.effectiveStartDates = new Date(this.searchForm.effectiveDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00' params.minUpdateTime = new Date(this.searchForm.updatedDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.effectiveEndDates = new Date(this.searchForm.effectiveDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59' params.maxUpdateTime = new Date(this.searchForm.updatedDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
} }
return params delete params.createdDate
delete params.updatedDate
return {...params}
}, },
beforeSearchFn() { beforeSearchFn() {
...@@ -178,7 +176,7 @@ ...@@ -178,7 +176,7 @@
// 导出 // 导出
handleExport() { handleExport() {
var params = this.getParams() var params = this.getParams()
this.$apis.beforeSale.getSummaryExportApi(params).then(res => { this.$apis.serviceConfig.exportEquityApi(params).then(res => {
// window.open(res) // window.open(res)
let tempaa = utils.getExplorer() let tempaa = utils.getExplorer()
if (tempaa == 'QQ') { if (tempaa == 'QQ') {
...@@ -198,11 +196,11 @@ ...@@ -198,11 +196,11 @@
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
completionStatus: '', merchantName: '',
packageCode: '', serviceName: '',
channel: '', serviceContent: '',
successDate: [], createdDate: '',
effectiveDate: [] updatedDate: ''
} }
this.handleSearch() this.handleSearch()
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!