Commit 11e2405a by zhangquan

接口联调50%

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