Commit 010b6e5f by 前端

Merge branch 'SAAS+V5.1.0' into 'master'

上线合并

See merge request !6
2 parents 307bf51c 87846541
......@@ -4,6 +4,7 @@
"description": "A Vue.js project",
"private": true,
"scripts": {
"dev": "vue-cli-service serve --open",
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
......
<!-- 备注 -->
<template>
<GLDialog bigTitle="备注"
:visible.sync="dialogShow"
class="accountDailog"
width="600px"
mode="big"
:close-on-click-modal="false"
:before-close="handleClose"
@onOk="handleAddConfirm"
@onCancel="dialogShow = false">
<el-form label-width="120px"
:model="infoForm"
ref="formRef"
:rules="formRules"
:inline="true">
<el-form-item label="备注:"
prop="yqMerchantId">
<el-input type="textarea"
class="default-width"
placeholder="请输入内容"
v-model="infoForm.remark"
maxlength="15"
:rows="4"
show-word-limit></el-input>
</el-form-item>
</el-form>
<GLDialog
bigTitle="备注"
:visible.sync="dialogShow"
class="accountDailog"
width="720px"
mode="big"
:close-on-click-modal="false"
:before-close="handleClose"
@onOk="handleAddConfirm"
@onCancel="dialogShow = false"
>
<!-- 表格区域 开始 -->
<GLTable
:tableData="infoForm.remarks"
:tableParams="tableParams"
:hasPage="false"
>
<template
slot="ramark"
slot-scope="scope"
>
<template v-if="isEdit && scope.index == 0">
<el-input
v-model="scope.scope.remark"
type="text"
placeholder="请输入内容"
maxlength="15"
size="small"
></el-input>
</template>
<template v-else>
{{ scope.scope.remark || '-'}}
</template>
</template>
<template
slot="auth-button"
slot-scope="scope"
>
<template v-if="scope.index == 0">
<template v-if="isEdit">
<el-button
type="text"
size="mini"
@click="cancel"
>
取消
</el-button>
</template>
<template v-else>
<el-button
type="text"
size="mini"
@click="handleRamrk(scope.scope.remark)"
>
编辑备注
</el-button>
</template>
</template>
<template v-else>
-
</template>
</template>
</GLTable>
</GLDialog>
</template>
<script>
import * as dayjs from 'dayjs'
export default {
name: 'RemarkDialog',
data() {
data () {
return {
infoForm: {
remark: ''
remarks: []
},
dialogConfig: {
title: '备注',
width: '600px'
title: '跟进记录',
width: '720px'
},
rejectRef: 'rejectRef',
formRules: {
// remark: [{ required: true, message: '请输入驳回原因', trigger: 'blur' }]
originData: '',
isEdit: false,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: {
width: '120px'
},
tableColumns: [
{
label: '跟进时间',
formatter: (cellValue) => {
return dayjs(cellValue.updatedDate).format("YYYY-MM-DD HH:mm:ss")
},
width: '170',
}, {
label: '跟进人',
prop: "userName",
width: '80',
}, {
label: '事件',
width: '100',
formatter: (cellValue) => {
return {
1: "车主领券",
2: "车主预约",
3: "预约时间",
4: "修改时间",
5: "取消预约",
}[cellValue.eventType] || '-'
}
}, {
label: '备注',
prop: 'remark',
addHtml: 'ramark'
}
]
},
editFormData: [
{
label: '备注',
name: 'remark',
type: 'input',
maxlength: 15,
inputType: 'textarea',
showLimit: true,
rows: 4
}
],
baseData: {}
}
},
......@@ -71,36 +132,47 @@ export default {
},
computed: {
dialogShow: {
get() {
get () {
return this.visible
},
set(newVal) {
set (newVal) {
this.$emit('dialogClose', { flag: newVal })
}
}
},
mounted() {
mounted () {
console.log('paramsObj', this.paramsObj)
this.infoForm.remark = this.$common.utils.deepClone(this.paramsObj.remark)
this.isEdit = false
this.originData = ''
this.infoForm.remarks = this.$common.utils.deepClone(this.paramsObj.remarks)
},
methods: {
handleAddConfirm() {
this.$refs.formRef.validate(valid => {
if (valid) {
var params = {}
params.remark = this.infoForm.remark
params.inviteFollowRecordId = this.paramsObj.inviteFollowRecordId
this.$apis.invitation.followRecordUpdate(params).then(res => {
this.$notify({
type: 'success',
title: '操作成功'
})
this.dialogShow = true
})
handleRamrk (e) {
this.originData = e
this.isEdit = true
},
cancel () {
this.isEdit = false
this.infoForm.remarks[0].remark = this.originData
},
handleAddConfirm () {
let { remark } = this.infoForm.remarks[0],
{ inviteFollowRecordId } = this.paramsObj,
params = {
remark,
inviteFollowRecordId
}
if (!remark) {
return this.dialogShow = true
}
this.$apis.invitation.followRecordUpdate(params).then(res => {
this.$notify({
type: 'success',
title: '操作成功'
})
this.dialogShow = true
})
}
}
......
<template>
<div>
<GLDialog bigTitle="预约时间" :visible.sync="dialogShow" class="detail-content-warn" width="620px" mode="big"
:close-on-click-modal="false" :before-close="handleClose" @onOk="handleAddConfirm" @onCancel="dialogShow = false">
<GLDialog
bigTitle="预约时间"
:visible.sync="dialogShow"
class="detail-content-warn"
width="620px"
mode="big"
:close-on-click-modal="false"
:before-close="handleClose"
@onOk="handleAddConfirm"
@onCancel="dialogShow = false"
>
<div v-loading="loading">
<div class="form_div">
<div class="tipsDiv">
......@@ -9,24 +18,72 @@
{{ paramsObj.customer.customerName + ' | ' + paramsObj.customer.customerPhone }}
</div>
</div>
<el-form label-width="100px" :model="infoForm" ref="editRef" :rules="formRules">
<el-form-item label="预约时间:" required>
<el-form
label-width="100px"
:model="infoForm"
ref="editRef"
:rules="formRules"
>
<el-form-item label="流量有效性:">
<el-form-item>
<el-select
v-model="infoForm.trafficEffectiveness"
placeholder="请选择"
class="select-width"
:disabled="trafficEffectivenessDisabled"
>
<el-option
v-for="(item, key) in trafficEffectivenessOpt"
:key="key"
:label="item.confValue"
:value="item.confId"
>
</el-option>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label="预约时间:"
required
>
<el-col :span="10">
<el-form-item prop="dateTime">
<el-date-picker v-model="infoForm.dateTime" :clearable="false" type="date" class="default-width"
placeholder="选择日期" value-format="yyyy-MM-dd" @change="inviteStatMerchantList(true)"
:picker-options="datePickerOptions"></el-date-picker>
<el-date-picker
v-model="infoForm.dateTime"
:clearable="false"
type="date"
class="default-width"
placeholder="选择日期"
value-format="yyyy-MM-dd"
@change="inviteStatMerchantList(true)"
:picker-options="datePickerOptions"
></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="1"></el-col>
<el-col :span="13">
<el-form-item prop="times">
<el-select v-model="infoForm.times" filterable placeholder="请选择" class="default-width">
<el-option v-for="(item, key) in timesOpt" :key="key" :label="item.confValue" :value="item.confId"
:disabled="item.disabled"></el-option>
<el-select
v-model="infoForm.times"
filterable
placeholder="请选择"
class="default-width"
>
<el-option
v-for="(item, key) in timesOpt"
:key="key"
:label="item.confValue"
:value="item.confId"
:disabled="item.disabled"
></el-option>
</el-select>
<el-button type="text" size="small" class="timesSle" v-if="paramsObj.inviteDate"
@click="cancelInvite">取消预约</el-button>
<el-button
type="text"
size="small"
class="timesSle"
v-if="paramsObj.inviteDate"
@click="cancelInvite"
>取消预约</el-button>
</el-form-item>
</el-col>
</el-form-item>
......@@ -54,20 +111,25 @@ export default {
},
computed: {
dialogShow: {
get() {
get () {
return this.visible
},
set(val) {
set (val) {
this.$emit('dialogClose', { flag: val })
}
},
trafficEffectivenessDisabled () {
let { orderStatus } = this.paramsObj
//已支付4、已施工、已失效11、已撤销9、已评价6、已关闭10、战败2 不支持编辑
return [4, 11, 9, 6, 10, 2].includes(orderStatus)
}
},
mounted() {
mounted () {
this.loading = false
console.log('this.paramsObj', this.paramsObj)
this.inviteDatePush()
},
data() {
data () {
// var validateDateTime = {
// validator: (rule, value, callback) => {
// if (!value) {
......@@ -86,7 +148,8 @@ export default {
return {
infoForm: {
dateTime: '',
times: ''
times: '',
trafficEffectiveness: ''
},
editChildRef: 'editChildRef',
formRules: {
......@@ -122,13 +185,19 @@ export default {
{ confId: '13:00', confValue: '13:00', disabled: false },
{ confId: '14:30', confValue: '14:30', disabled: false },
{ confId: '16:00', confValue: '16:00', disabled: false }
]
],
trafficEffectivenessOpt: [
{ confId: 1, confValue: "有效客户" },
{ confId: 2, confValue: "无效客户" },
],
}
},
methods: {
inviteDatePush() {
if (this.paramsObj.inviteDate) {
const dateTimeStr = dayjs(this.paramsObj.inviteDate).format('YYYY-MM-DD HH:mm:ss')
inviteDatePush () {
let { trafficEffectiveness, inviteDate } = this.paramsObj
if (trafficEffectiveness) this.infoForm.trafficEffectiveness = trafficEffectiveness
if (inviteDate) {
const dateTimeStr = dayjs(inviteDate).format('YYYY-MM-DD HH:mm:ss')
// 截取年月日(空格前)
this.infoForm.dateTime = dateTimeStr.split(' ')[0]
......@@ -138,7 +207,7 @@ export default {
}
},
inviteStatMerchantList(flag) {
inviteStatMerchantList (flag) {
if (flag) {
this.infoForm.times = ''
}
......@@ -177,7 +246,7 @@ export default {
})
},
handleAddConfirm() {
handleAddConfirm () {
this.$refs.editRef.validate(valid => {
if (valid) {
var params = this.$common.utils.deepClone(this.infoForm)
......@@ -203,7 +272,7 @@ export default {
})
},
cancelInvite() {
cancelInvite () {
this.$confirm('请确认是否要执行当前操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
......@@ -266,5 +335,8 @@ export default {
.timesSle {
padding-left: 10px;
}
.select-width {
width: calc(100% - 110px);
}
}
</style>
......@@ -2,63 +2,85 @@
<template>
<div class="purchase">
<div class="container">
<GLCombiForm ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="showFormData"
@handleOk="handleSearch"
@handleRest="handleReset"></GLCombiForm>
<GLCombiForm
ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="showFormData"
@handleOk="handleSearch"
@handleRest="handleReset"
></GLCombiForm>
<div class="table-header">
<el-tabs v-model="activeName"
type="card"
@tab-click="handleClick">
<el-tab-pane v-for="(item, index) in tabPaneList"
:label="item.label + '(' + item.count + ')'"
:name="item.name"
:key="index"></el-tab-pane>
<el-tabs
v-model="activeName"
type="card"
@tab-click="handleClick"
>
<el-tab-pane
v-for="(item, index) in tabPaneList"
:label="item.label + '(' + item.count + ')'"
:name="item.name"
:key="index"
></el-tab-pane>
</el-tabs>
<div class="btn">
<el-button type="primary"
size="small"
@click="handleSet">工位设置</el-button>
<el-button
type="primary"
size="small"
@click="handleSet"
>工位设置</el-button>
</div>
</div>
<!-- 表格区域 开始 -->
<GLTable ref="recordListTable"
:getListApi="getListApi"
:noDataImg="url"
:searchForm="searchFormSearch"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn">
<div class="table-btns"
slot="auth-button"
slot-scope="scope">
<el-button type="text"
@click="handleReservation(scope.scope)"
v-if="[1, 2, 3, 5].includes(scope.scope.inviteStatus)">预约时间</el-button>
<el-button type="text"
@click="handleRamrk(scope.scope)">备注</el-button>
<GLTable
ref="recordListTable"
:getListApi="getListApi"
:noDataImg="url"
:searchForm="searchFormSearch"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
>
<div
class="table-btns"
slot="auth-button"
slot-scope="scope"
>
<el-button
type="text"
@click="handleReservation(scope.scope)"
v-if="[1, 2, 3, 5].includes(scope.scope.inviteStatus)"
>预约时间</el-button>
<el-button
type="text"
@click="handleRamrk(scope.scope)"
>跟进记录</el-button>
</div>
</GLTable>
<!-- 表格区域 end -->
</div>
<!-- 工单设置 -->
<workSetDialog :visible="workSetVisible"
v-if="workSetVisible"
:params-obj="recordInfo"
@dialogClose="workSetDialogClose" />
<workSetDialog
:visible="workSetVisible"
v-if="workSetVisible"
:params-obj="recordInfo"
@dialogClose="workSetDialogClose"
/>
<!-- 预约时间 -->
<reservation-dialog :visible="reservationVisible"
v-if="reservationVisible"
:params-obj="recordInfo"
@dialogClose="reservationDialogClose" />
<!-- 备注 -->
<remark-dialog :visible="remarkVisible"
v-if="remarkVisible"
:params-obj="recordInfo"
@dialogClose="remarkDialogClose" />
<reservation-dialog
:visible="reservationVisible"
v-if="reservationVisible"
:params-obj="recordInfo"
@dialogClose="reservationDialogClose"
/>
<!-- 跟进记录 -->
<remark-dialog
:visible="remarkVisible"
v-if="remarkVisible"
:params-obj="recordInfo"
@dialogClose="remarkDialogClose"
/>
</div>
</template>
......@@ -72,7 +94,7 @@ import * as dayjs from 'dayjs'
export default {
name: 'Scheduling',
props: {},
data() {
data () {
return {
tabPaneList: [
{
......@@ -97,7 +119,8 @@ export default {
couponDate: '',
toShopDate: '',
merchantId: '',
inviteMode: ''
inviteMode: '',
trafficEffectiveness: ''
},
searchFormSearch: {},
showFormData: [
......@@ -131,6 +154,15 @@ export default {
optionId: 'merchantId',
optionLabel: 'merchantName',
optionsName: 'merchantList'
},
{
label: '流量有效性',
name: 'trafficEffectiveness',
type: 'select',
optionList: [],
optionId: 'value',
optionLabel: 'name',
optionsName: 'trafficEffectivenessList'
}
],
getListApi: this.$apis.invitation.queryInviteRecord,
......@@ -181,6 +213,16 @@ export default {
}
},
{
label: '流量有效性',
width: '120',
formatter: cellValue => {
return {
1: '有效客户',
2: '无效客户'
}[cellValue.trafficEffectiveness] || '-'
}
},
{
label: '到店时间',
prop: 'inviteDate',
width: '150',
......@@ -201,7 +243,17 @@ export default {
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
baseData: {
scheduling_inviteStatus: this.$common.utils.deepClone(scheduling_inviteStatus),
merchantList: []
merchantList: [],
trafficEffectivenessList: [
{
value: '1',
name: '有效客户'
},
{
value: '2',
name: '无效客户'
},
]
},
detailVisible: false,
handleVisible: false,
......@@ -221,17 +273,17 @@ export default {
workSetDialog
},
computed: {},
mounted() {
mounted () {
this.getBaseData()
},
methods: {
async getBaseData() {
async getBaseData () {
this.getInviteMerchant()
this.getOptionsList()
// this.getOptionsList()
},
beforeSearchFn() {
beforeSearchFn () {
return new Promise(resolve => {
this.searchFormSearch = this.$common.utils.deepClone(this.searchForm)
if (this.searchFormSearch.couponDate) {
......@@ -252,7 +304,7 @@ export default {
resolve()
})
},
handleClick() {
handleClick () {
if (this.activeName !== '0') {
this.searchForm.inviteMode = this.activeName
} else {
......@@ -260,38 +312,39 @@ export default {
}
this.$refs.recordListTable.refreshTable()
},
inviteRecordCount() {
inviteRecordCount () {
const params = this.$common.utils.deepClone(this.searchFormSearch)
delete params.inviteMode
this.$apis.invitation.inviteRecordCount(params).then(res => {
this.tabPaneList[0].count = res.inviteCount || 0
this.tabPaneList[1].count = res.hadInvitedCount || 0
this.tabPaneList[2].count = res.notInvitedCount || 0
this.tabPaneList[0].count = res?.inviteCount || 0
this.tabPaneList[1].count = res?.hadInvitedCount || 0
this.tabPaneList[2].count = res?.notInvitedCount || 0
})
},
getInviteMerchant() {
getInviteMerchant () {
this.$apis.invitation.getInviteMerchant({ currentPage: 1, pageSize: 99999 }).then(res => {
this.baseData.merchantList = res.list
this.baseData.merchantList = res?.list
this.getOptionsList()
})
},
handleSearch() {
handleSearch () {
this.$refs.recordListTable.refreshTable()
},
handleReset() {
handleReset () {
this.searchForm = {
customerName: '',
couponDate: '',
toShopDate: '',
merchantId: '',
inviteMode: ''
inviteMode: this.searchForm.inviteMode,
trafficEffectiveness: ''
}
this.$refs.recordListTable.refreshTable()
},
getOptionsList() {
getOptionsList () {
this.showFormData.forEach((item, index) => {
if (item.type === 'select') {
if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部' && item.label != '门店品牌') {
if (this.baseData[item.optionsName]?.length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部' && item.label != '门店品牌') {
const temp = {}
temp[this.showFormData[index].optionId] = ''
temp[this.showFormData[index].optionLabel] = '全部'
......@@ -302,24 +355,24 @@ export default {
})
},
handleRamrk(row) {
handleRamrk (row) {
this.recordInfo = row
this.remarkVisible = !this.remarkVisible
},
remarkDialogClose(obj) {
remarkDialogClose (obj) {
this.remarkVisible = !this.remarkVisible
if (obj.flag) {
this.$refs.recordListTable.refreshTable()
}
},
handleReservation(row) {
handleReservation (row) {
this.recordInfo = row
this.reservationVisible = !this.reservationVisible
},
reservationDialogClose(obj) {
reservationDialogClose (obj) {
console.log('aaa')
this.reservationVisible = !this.reservationVisible
if (obj.flag) {
......@@ -327,11 +380,11 @@ export default {
}
},
handleSet() {
handleSet () {
this.workSetVisible = !this.workSetVisible
},
workSetDialogClose(obj) {
workSetDialogClose (obj) {
this.workSetVisible = !this.workSetVisible
if (obj.flag) {
this.$refs.recordListTable.refreshTable()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!