Commit dfada6f3 by 张权

连调自测完成

1 parent 072827ba
......@@ -60,4 +60,14 @@ const expertDetail = params => {
})
}
export default { getExpertList, getMerchantTree, saveExpert, delExpert, editExpert, expertDetail }
const getMenberType = params => {
params.method = 'merchants.api.menu.findAllDictData'
return http({
url: '/rop-merchants/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getExpertList, getMerchantTree, saveExpert, delExpert, editExpert, expertDetail, getMenberType }

1.11 KB | W: | H:

637 Bytes | W: | H:

src/assets/guestCustom/add-link.png
src/assets/guestCustom/add-link.png
src/assets/guestCustom/add-link.png
src/assets/guestCustom/add-link.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -1135,7 +1135,7 @@ export default {
// var idxPrice = this.editForm.attributeList.findIndex(i => i.attributeName == 'additional_price')
// this.editForm.attributeList[idxPrice].attributeValue = this.editForm.attributeList[idxPrice].attributeValue ? (this.editForm.attributeList[idxPrice].attributeValue / 100).toFixed(2) : ''
// }
this.editForm.vehicle.billingDate = this.editForm.vehicle.billingDate ? new Date(this.editForm.vehicle.billingDate) : ''
this.editForm.effectiveDate = this.editForm.effectiveDate ? new Date(this.editForm.effectiveDate) : ''
if ([2, 3, 4].includes(this.routeInfo.addOrEdit)) {
......@@ -1160,7 +1160,7 @@ export default {
}
this.editForm.packageCode && this.packageAttr(true, productArrData, res)
const spaItem = this.baseData.agreeList.find(item => item.id == this.editForm.specialAppointId)
if(spaItem){
if (spaItem) {
this.editForm.specialAppoint = spaItem.spaContent
}
})
......@@ -1194,7 +1194,7 @@ export default {
if (item.attributeName.includes('price')) {
item.attributeValue = item.attributeValue / 100
}
if(item.attributeName=="buy_car_type"&&item.attributeValue==1){
if (item.attributeName == 'buy_car_type' && item.attributeValue == 1) {
this.compensationNameDisable = true
}
this.productModal.vip[item.attributeName] = item.attributeValue
......@@ -1226,7 +1226,7 @@ export default {
} else if (item.attributeName == 'planId') {
this.getCase(parseInt(item.attributeValue))
}
if(item.attributeName=="buy_car_type"&&item.attributeValue==1){
if (item.attributeName == 'buy_car_type' && item.attributeValue == 1) {
this.compensationNameDisable = true
}
this.productModal[targetItem.idName][item.attributeName] = item.attributeValue
......@@ -1246,7 +1246,7 @@ export default {
if (ele.attributeName == 'effective_date') {
ele.disabled = true
}
if (ele.attributeName == 'buy_car_type'&&ele.attributeValue==1) {
if (ele.attributeName == 'buy_car_type' && ele.attributeValue == 1) {
ele.disabled = true
}
})
......@@ -1548,6 +1548,7 @@ export default {
if (!params.sn) {
delete params.sn
}
params.isOss = 0
this.$apis.beforeSale.updateEquityApi(params).then(res => {
this.submit = false
......
......@@ -26,7 +26,7 @@
<div class="table-content" style="max-height: 456px;">
<GLTable v-loading="loading" ref="empTable" :tableData="tableEmpData" :tableParams="tableParams" :hasNum="false" :hasPage="false" :noDataImg="url" @row-click="rowClick">
<div slot="radio" slot-scope="scope">
<el-radio v-model="selectPerson" :label="scope.scope">&nbsp;</el-radio>
<el-radio :disabled="scope.scope.isOperationConfig == 0" v-model="selectPerson" :label="scope.scope">&nbsp;</el-radio>
</div>
<div slot="staffName" slot-scope="scope">
<span>{{ scope.scope.staffName }}</span>
......@@ -243,8 +243,8 @@ export default {
this.$refs.empTable.$refs.salelistMutiTable.toggleRowSelection(item)
},
rowClick(row) {
console.log(row)
// this.$refs.empTable.$refs.salelistMutiTable.toggleRowSelection(row)
if (row.isOperationConfig === 0) return
this.selectPerson = row
},
checkChange(val) {
......
......@@ -121,14 +121,13 @@ export default {
node.id = this.getGuid()
this.insertNode(node)
let textarea = document.getElementsByClassName('w-textarea_input')
console.log(textarea[0].childNodes, textarea[0]?.childNodes?.length)
},
addCardLink() {
let textarea = document.getElementsByClassName('w-textarea_input')[0].innerHTML
let span = document.createElement('span')
// span.id = this.getGuid()
// span.setAttribute('style', '-webkit-user-modify: read-only !important;')
let text = '<br>车主朋友,您好!<br>我是您的福利官,欢迎您领取电子质保卡,<br>请点击下方链接进行领取及查看:<br><span style="color:#409eff;">https://dj.glsx.com.cn/dj-car-boutique-work-wechat/#/</span><br>祝您用车愉快!<br>'
span.innerHTML = text
var myText = document.createTextNode(textarea)
// console.log(textarea[0].childNodes, textarea[0]?.childNodes?.length)
// let pnode = document.createElement('span')
// let arr = ['车主朋友,您好!\n我是您的福利官,欢迎您领取电子质保卡,\n请点击下方链接进行领取及查看:\n', 'https://dj.glsx.com.cn/dj-car-boutique-work-wechat/#/', '\n祝您用车愉快!\n']
......@@ -247,7 +246,6 @@ export default {
let s = list[parseInt(str.split('.')[0]) - 1]
return `[${s}]`
})
console.log(replaceImg)
let Textnode = document.createElement('div')
Textnode.innerHTML = replaceImg
this.currentText = Textnode.innerText.substring(0, 600)
......@@ -274,7 +272,6 @@ export default {
// 即时更新数据
this.updateData(target.innerHTML)
let htm = target.innerHTML
console.log(htm)
const list = emoji.flat(Infinity)
const cutImg = htm.replaceAll('<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/', '')
const replaceImg = cutImg.replace(/(\d){3}.png">/g, function(str) {
......@@ -385,8 +382,7 @@ $textColor: #666;
position: relative;
&_input {
width: 100%;
height: 200px;
min-height: 100px;
min-height: 200px;
box-sizing: border-box;
padding: 10px;
line-height: 1.5;
......
......@@ -158,11 +158,22 @@ export default {
this.eventBus.$emit('update', this.previewList)
},
methods: {
setDetail(list) {
list.forEach(item => {
if (item.attType == 1) {
this.setTextarea(item.attContent)
} else {
if (item.attType == 7) {
item.attContent = JSON.parse(item.attContent)
}
this.previewList.push(item)
}
})
},
setTextarea(val) {
// let val = '[鄙视]@昵称@昵称[鄙视][做哼][ ]车主朋友,您好!我是您的福利官,欢迎您领取电子质保卡,请点击下方链接进行领取及查看:https://dj.glsx.com.cn/dj-car-boutique-work-wechat/#/祝您用车愉快!'
let reg1 = /\[(.+?)\]/gi
let arr = val.match(reg1) || []
console.log(arr, 456)
const list = emoji.flat(Infinity)
arr.forEach(item => {
let str = item.slice(1, item.length - 1)
......@@ -174,7 +185,6 @@ export default {
index = '0' + index
}
let img = `<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png">`
console.log(123456)
val = val.replaceAll(item, img)
}
})
......@@ -182,7 +192,6 @@ export default {
let welcomeStr = '车主朋友,您好!我是您的福利官,欢迎您领取电子质保卡,请点击下方链接进行领取及查看:https://dj.glsx.com.cn/dj-car-boutique-work-wechat/#/祝您用车愉快!'
let text = '<br>车主朋友,您好!<br>我是您的福利官,欢迎您领取电子质保卡,<br>请点击下方链接进行领取及查看:<br><span style="color:#409eff;">https://dj.glsx.com.cn/dj-car-boutique-work-wechat/#/</span><br>祝您用车愉快!<br>'
val = val.replaceAll(welcomeStr, text)
console.log(val)
let span = document.createElement('span')
span.innerHTML = val
this.$refs.textContent.insertNode(span)
......@@ -199,7 +208,6 @@ export default {
} else if (index >= 10 && index < 100) {
index = '0' + index
}
console.log(list, index, i)
this.$refs.textContent.addImg(`https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png`)
},
updateText(val) {
......
......@@ -113,7 +113,6 @@ export default {
},
mounted() {
const urlParam = this.$route.params
console.log(urlParam, 79)
let param = JSON.parse(urlParam.id)
this.clientType = param.clientType
......@@ -125,14 +124,9 @@ export default {
methods: {
getDetail(id) {
this.$apis.expert.expertDetail({ id }).then(res => {
console.log(res)
if (res?.id) {
this.selectPerson = res
res.welcomeInfo.forEach(item => {
if (item.attType == 1) {
this.$refs.welcome.setTextarea(item.attContent)
}
})
this.$refs.welcome.setDetail(res.welcomeInfo)
}
})
},
......@@ -141,7 +135,6 @@ export default {
},
// 成员弹窗
handleConfirm() {
console.log(this.$refs.membersForm.selectPerson)
if (this.$refs.membersForm.selectPerson) {
this.selectPerson = this.$refs.membersForm.selectPerson
this.openMembers()
......@@ -165,20 +158,24 @@ export default {
})
},
handleSave() {
console.log(this.selectPerson)
console.log(this.$refs.welcome.previewList)
if (!this.selectPerson?.staffId) {
return this.$message.error('请选择轻改专家')
}
let preList = [...this.$refs.welcome.previewList]
preList.forEach(item => {
if (item.attType == 7) {
item.attContent = JSON.stringify(item.attContent)
}
})
let params = {
businessType: this.clientType == 1 ? 0 : -1,
businessType: this.clientType,
staffId: this.selectPerson.staffId,
welcomeInfo: this.$refs.welcome.previewList
// welcomeInfo: this.$refs.welcome.previewList
welcomeInfo: preList
}
let API = this.expertId ? this.$apis.expert.editExpert : this.$apis.expert.saveExpert
if (this.expertId) params.id = this.expertId
API(params).then(res => {
console.log(res)
if (res) {
this.$message({
type: 'success',
......@@ -201,7 +198,8 @@ export default {
<style lang="scss" scoped>
.expert-detail {
background-color: #fff;
height: calc(100vh - 144px);
min-height: calc(100vh - 144px);
margin-bottom: 64px;
.numberDialog {
/deep/ .el-dialog__header {
height: 56px;
......@@ -249,7 +247,8 @@ export default {
display: inline-block;
border: 1px solid #e8e8ea !important;
border-radius: 4px;
width: 94px;
min-width: 78px;
padding: 0 8px;
height: 28px;
line-height: 28px;
text-align: center;
......
......@@ -32,11 +32,13 @@
<GLTable :class="[{ hasDataTable: !hasData }]" ref="expertTable" :hasNum="false" :pageConf="batchPageConf" :searchForm="batchListSearch" :tableParams="batchTableParams" :getListApi="getListApi">
<span slot="status" slot-scope="scope">
<el-switch :value="scope.scope.status == 0" active-color="#5850ff" inactive-color="#eee" @change="changStatus(scope.scope.status, scope.scope.id)"></el-switch>
{{ scope.scope.status == 0 ? '启用' : '禁用' }}
{{ scope.scope.status == 0 ? '启用' : '停用' }}
</span>
<div class="table-btns" slot="table-btns" slot-scope="scope">
<el-button fn="编辑" type="text" @click="selectClientType(scope.scope.businessType, scope.scope.id)">编辑</el-button>
<el-button fn="编辑" type="text" @click="handleDel(scope.scope)">删除</el-button>
<GLButton fn="编辑" type="text" @click="selectClientType(scope.scope.businessType, scope.scope.id)">编辑</GLButton>
<GLButton fn="删除" type="text" @click="handleDel(scope.scope)">删除</GLButton>
<!-- <el-button fn="编辑" type="text" @click="selectClientType(scope.scope.businessType, scope.scope.id)">编辑</el-button>
<el-button fn="删除" type="text" @click="handleDel(scope.scope)">删除</el-button> -->
</div>
</GLTable>
<div v-if="!hasData" class="default-box">
......@@ -59,6 +61,7 @@
<script>
const imagBaseURL = 'https://img01.glsx.com.cn/weapp/resource/saas/scrm/'
// import imagBaseURL from '@/assets/notExpert.png'
import glsxCombiForm from '@/components/glsx-combi-form'
import util from '@/util/util'
export default {
......@@ -108,11 +111,11 @@ export default {
memberName: '全部'
},
{
memberId: 0,
memberId: 1,
memberName: '升级'
},
{
memberId: -1,
memberId: 2,
memberName: '战败'
}
],
......@@ -135,6 +138,7 @@ export default {
{
label: '所属门店/部门',
prop: 'departmentName',
width: '200',
formatter: cellValue => {
return cellValue.departmentName || '-'
}
......@@ -151,7 +155,7 @@ export default {
prop: 'businessType',
width: 200,
formatter: cellValue => {
return cellValue.businessType == -1 ? '战败客户' : '升级客户'
return cellValue.businessType == 2 ? '战败客户' : '升级客户'
}
},
{
......@@ -185,6 +189,7 @@ export default {
created() {
this.getMerchantList()
this.isEmptyTable()
// this.getTypeList()
},
mounted() {
document.getElementById('app').addEventListener('click', this.setClientType)
......@@ -205,6 +210,11 @@ export default {
// }
// this.$refs.cascaderRef1.dropDownVisible = false
},
getTypeList() {
this.$apis.expert.getMenberType({}).then(res => {
console.log(res)
})
},
handleDel({ id }) {
this.$confirm('是否确认删除?', '退单', {
confirmButtonText: '确定',
......@@ -213,9 +223,9 @@ export default {
customClass: 'customConfirm'
}).then(() => {
this.$apis.expert.delExpert({ id }).then(res => {
console.log(res)
if (res) {
this.handleSearch()
this.isEmptyTable()
this.$message({
type: 'success',
message: '删除成功!'
......@@ -366,7 +376,7 @@ export default {
margin-top: 16px;
padding: 20px 20px 0;
background-color: #fff;
height: calc(100vh - 148px);
min-height: calc(100vh - 148px);
.select_wrapper {
display: flex;
align-items: center;
......
......@@ -275,13 +275,7 @@ export default {
{
required: true,
validator: (rule, value, callback) => {
return value ? callback() : callback(new Error('请输入' + (this.editForm.cardType == '1' ? '身份证' : '统一社会信息代码')))
},
trigger: 'change'
},
{
validator: (rule, value, callback) => {
return /[a-zA-Z0-9]{18}/.test(value) ? callback() : callback(new Error('请输入18位数字或字母'))
return value ? callback() : callback(new Error('请输入证件号码'))
},
trigger: 'change'
}
......@@ -335,7 +329,7 @@ export default {
label: '身份证',
name: 'cardNo',
type: 'input',
maxlength: 18
maxlength: 30
},
{
label: '联系号码',
......@@ -501,6 +495,22 @@ export default {
{
confId: 2,
confName: '企业'
},
{
confId: 3,
confName: '个人(港澳)'
},
{
confId: 4,
confName: '个人(台)'
},
{
confId: 5,
confName: '个人(军官)'
},
{
confId: 6,
confName: '其他'
}
],
cardTypeList: [
......@@ -511,6 +521,22 @@ export default {
{
confId: 2,
confName: '统一社会信息代码'
},
{
confId: 3,
confName: '港澳返乡证'
},
{
confId: 4,
confName: '台胞证'
},
{
confId: 5,
confName: '军官证'
},
{
confId: 6,
confName: '其他'
}
],
servicePeriodList: [
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!