Commit 21459f54 by 前端

驻点

1 parent 8524cf02
...@@ -8,10 +8,8 @@ ...@@ -8,10 +8,8 @@
<div class="config-wrap gl-form-page"> <div class="config-wrap gl-form-page">
<el-form ref="form" :model="form" label-width="154px"> <el-form ref="form" :model="form" label-width="154px">
<el-form-item label="所属企业:"> <el-form-item label="所属企业:">
<el-select v-model="config.merchantId" placeholder="请选择" @change="handleMerchatChange" <el-select v-model="config.merchantId" placeholder="请选择" @change="handleMerchatChange" @visible-change="hideSelect">
@visible-change="hideSelect"> <el-option v-for="item in merchantList" :key="item.merchantId" :label="item.merchantName" :value="item.merchantId"></el-option>
<el-option v-for="item in merchantList" :key="item.merchantId" :label="item.merchantName"
:value="item.merchantId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- 推送人 --> <!-- 推送人 -->
...@@ -23,8 +21,7 @@ ...@@ -23,8 +21,7 @@
{{ wechat.automaticName }} {{ wechat.automaticName }}
</div> </div>
<span class="el-input__suffix" @click="openAutomatic"> <span class="el-input__suffix" @click="openAutomatic">
<span class="el-input__suffix-inner"><i <span class="el-input__suffix-inner"><i :class="['el-select__caret', 'el-input__icon', 'el-icon-arrow-up', isAutomatic ? 'is-reverse' : '']"></i></span>
:class="['el-select__caret', 'el-input__icon', 'el-icon-arrow-up', isAutomatic ? 'is-reverse' : '']"></i></span>
</span> </span>
</div> </div>
</div> </div>
...@@ -35,9 +32,7 @@ ...@@ -35,9 +32,7 @@
</el-form-item> </el-form-item>
<div class="el-select-dropdown__wrap el-scrollbar__wrap"> <div class="el-select-dropdown__wrap el-scrollbar__wrap">
<template v-if="automaticData.length > 0"> <template v-if="automaticData.length > 0">
<el-tree class="filter-tree" :data="automaticData" node-key="id" :default-expanded-keys="expandedKeys" <el-tree class="filter-tree" :data="automaticData" node-key="id" :default-expanded-keys="expandedKeys" :props="defaultProps" default-expand-all :filter-node-method="filterNode" ref="tree" @node-click="handleNodeClick"></el-tree>
:props="defaultProps" default-expand-all :filter-node-method="filterNode" ref="tree"
@node-click="handleNodeClick"></el-tree>
</template> </template>
<div class="empty" v-else>暂无数据</div> <div class="empty" v-else>暂无数据</div>
</div> </div>
...@@ -51,15 +46,13 @@ ...@@ -51,15 +46,13 @@
<div class="input-box" v-for="(i, k) in groupCofListInput[bulletin.storageList]" :key="k"> <div class="input-box" v-for="(i, k) in groupCofListInput[bulletin.storageList]" :key="k">
<!-- <el-input v-model="i.name" ></el-input> --> <!-- <el-input v-model="i.name" ></el-input> -->
<el-select v-model="i.name" :placeholder="'将' + bulletin.label + '推送至群聊'" filterable clearable> <el-select v-model="i.name" :placeholder="'将' + bulletin.label + '推送至群聊'" filterable clearable>
<el-option v-for="item in selectGroupName" :key="item.groupName" :label="item.groupName" <el-option v-for="item in selectGroupName" :key="item.groupName" :label="item.groupName" :value="item.groupName"></el-option>
:value="item.groupName"></el-option>
</el-select> </el-select>
<i class="el-icon-circle-plus" v-if="k == 0" <i class="el-icon-circle-plus" v-if="k == 0" @click="addGroup(groupCofListInput[bulletin.storageList])"></i>
@click="addGroup(groupCofListInput[bulletin.storageList])"></i>
<i class="el-icon-remove" v-else @click="delGroup(groupCofListInput[bulletin.storageList], k)"></i> <i class="el-icon-remove" v-else @click="delGroup(groupCofListInput[bulletin.storageList], k)"></i>
</div> </div>
</div> </div>
<span class="group-config-text" @click="openConfigDialog(bulletin.componentName)">配置</span> <span class="group-config-text" @click="openConfigDialog(bulletin.componentName)">{{ bulletin.text ? bulletin.text : '配置' }}</span>
</el-form-item> </el-form-item>
</template> </template>
</el-form> </el-form>
...@@ -69,8 +62,7 @@ ...@@ -69,8 +62,7 @@
<el-button @click="handlebattleClose" size="medium">取消</el-button> <el-button @click="handlebattleClose" size="medium">取消</el-button>
<el-button type="primary" @click="handlebattleConfirm" size="medium" :loading="loading">保存</el-button> <el-button type="primary" @click="handlebattleConfirm" size="medium" :loading="loading">保存</el-button>
</GLFooter> </GLFooter>
<component :is="dialogComponent" ref="componentRef" v-if="isDialogVisible" :isDialogVisible="isDialogVisible" <component :is="dialogComponent" ref="componentRef" v-if="isDialogVisible" :isDialogVisible="isDialogVisible" :switchList="switchList" @handlePreview="handlePreview" @handleClose="handleClose"></component>
:switchList="switchList" @handlePreview="handlePreview" @handleClose="handleClose"></component>
</div> </div>
</template> </template>
<script> <script>
...@@ -83,6 +75,7 @@ import dailyDialog from './components/dialogs/dailyDialog.vue' ...@@ -83,6 +75,7 @@ import dailyDialog from './components/dialogs/dailyDialog.vue'
import progressDialog from './components/dialogs/progressDialog.vue' import progressDialog from './components/dialogs/progressDialog.vue'
import replenishmentDialog from './components/dialogs/replenishmentDialog.vue' import replenishmentDialog from './components/dialogs/replenishmentDialog.vue'
import saasDialog from './components/dialogs/saasDialog.vue' import saasDialog from './components/dialogs/saasDialog.vue'
import viewDialog from './components/dialogs/viewDialog.vue'
export default { export default {
components: { components: {
GlSelectMenu, GlSelectMenu,
...@@ -93,7 +86,8 @@ export default { ...@@ -93,7 +86,8 @@ export default {
dailyDialog, dailyDialog,
progressDialog, progressDialog,
replenishmentDialog, replenishmentDialog,
saasDialog saasDialog,
viewDialog
}, },
data() { data() {
return { return {
...@@ -126,12 +120,14 @@ export default { ...@@ -126,12 +120,14 @@ export default {
saPerReport: [], saPerReport: [],
scheduleReport: [], scheduleReport: [],
wordReport: [], wordReport: [],
saasReport: [] saasReport: [],
viewReport: []
}, },
switchList: { switchList: {
// xiReport: [], // xiReport: [],
zhanReport: [{ switchType: 201, switchStatus: 'Y', actionReportType: 2 }], zhanReport: [{ switchType: 201, switchStatus: 'Y', actionReportType: 2 }],
orderReport: [], orderReport: [],
viewReport: [],
saReport: [ saReport: [
{ switchType: 401, switchStatus: 'Y', actionReportType: 4 }, { switchType: 401, switchStatus: 'Y', actionReportType: 4 },
{ switchType: 402, switchStatus: 'Y', actionReportType: 4 } { switchType: 402, switchStatus: 'Y', actionReportType: 4 }
...@@ -143,11 +139,12 @@ export default { ...@@ -143,11 +139,12 @@ export default {
{ switchType: 504, switchStatus: 'Y', actionReportType: 5, switchText: '' } { switchType: 504, switchStatus: 'Y', actionReportType: 5, switchText: '' }
], ],
scheduleReport: [{ switchType: 601, switchStatus: 'Y', actionReportType: 6 }], scheduleReport: [{ switchType: 601, switchStatus: 'Y', actionReportType: 6 }],
wordReport: [{ switchType: 701, switchStatus: 'Y', actionReportType: 7, switchText: '' }], wordReport: [{ switchType: 701, switchStatus: 'Y', actionReportType: 7, switchText: '' }]
}, },
groupCofListInput: { groupCofListInput: {
wordReportValue: [], wordReportValue: [],
orderReportValue: [], orderReportValue: [],
viewReportValue: [],
saReportValue: [], saReportValue: [],
saPerReportValue: [], saPerReportValue: [],
scheduleReportValue: [], scheduleReportValue: [],
...@@ -186,6 +183,10 @@ export default { ...@@ -186,6 +183,10 @@ export default {
{ {
attr: 'saasReport', attr: 'saasReport',
type: 8 type: 8
},
{
attr: 'viewReport',
type: 9
} }
], ],
buttetinList: [ buttetinList: [
...@@ -223,6 +224,12 @@ export default { ...@@ -223,6 +224,12 @@ export default {
label: '.补单通知', label: '.补单通知',
storageList: 'orderReportValue', storageList: 'orderReportValue',
componentName: 'replenishmentDialog' componentName: 'replenishmentDialog'
},
{
label: '.驻店日报',
text: '预览配置',
storageList: 'viewReportValue',
componentName: 'viewDialog'
} }
] ]
} }
...@@ -295,7 +302,7 @@ export default { ...@@ -295,7 +302,7 @@ export default {
this.idBefEncryption = data.idBefEncryption this.idBefEncryption = data.idBefEncryption
this.$apis.battle.activityreportWorktool({ cloudId: this.idBefEncryption }).then(res => { this.$apis.battle.activityreportWorktool({ cloudId: this.idBefEncryption }).then(res => {
this.selectGroupName = res.data.result || [] this.selectGroupName = res.data.result || []
this.groupCofListInput = { wordReportValue: [{ name: '' }], orderReportValue: [{ name: '' }], saReportValue: [{ name: '' }], saPerReportValue: [{ name: '' }], scheduleReportValue: [{ name: '' }], zhanReportValue: [{ name: '' }], saasReportValue: [{ name: '' }] } this.groupCofListInput = { wordReportValue: [{ name: '' }], orderReportValue: [{ name: '' }], viewReportValue: [{ name: '' }], saReportValue: [{ name: '' }], saPerReportValue: [{ name: '' }], scheduleReportValue: [{ name: '' }], zhanReportValue: [{ name: '' }], saasReportValue: [{ name: '' }] }
}) })
}, },
// 弹窗数据回显 // 弹窗数据回显
...@@ -328,6 +335,7 @@ export default { ...@@ -328,6 +335,7 @@ export default {
saPerReportValue: [], saPerReportValue: [],
scheduleReportValue: [], scheduleReportValue: [],
zhanReportValue: [], zhanReportValue: [],
viewReportValue: [],
saasReportValue: [] saasReportValue: []
} }
this.battleVisible = true this.battleVisible = true
...@@ -372,6 +380,7 @@ export default { ...@@ -372,6 +380,7 @@ export default {
// xiReportValue: [{ name: '' }], // xiReportValue: [{ name: '' }],
wordReportValue: [{ name: '' }], wordReportValue: [{ name: '' }],
orderReportValue: [{ name: '' }], orderReportValue: [{ name: '' }],
viewReportValue: [{ name: '' }],
saReportValue: [{ name: '' }], saReportValue: [{ name: '' }],
saPerReportValue: [{ name: '' }], saPerReportValue: [{ name: '' }],
scheduleReportValue: [{ name: '' }], scheduleReportValue: [{ name: '' }],
...@@ -388,6 +397,7 @@ export default { ...@@ -388,6 +397,7 @@ export default {
this.groupCofList = { this.groupCofList = {
zhanReport: [], zhanReport: [],
orderReport: [], orderReport: [],
viewReport: [],
saReport: [], saReport: [],
saPerReport: [], saPerReport: [],
scheduleReport: [], scheduleReport: [],
...@@ -411,6 +421,7 @@ export default { ...@@ -411,6 +421,7 @@ export default {
this.groupCofList = { this.groupCofList = {
zhanReport: [], zhanReport: [],
orderReport: [], orderReport: [],
viewReport: [],
saReport: [], saReport: [],
saPerReport: [], saPerReport: [],
scheduleReport: [], scheduleReport: [],
...@@ -487,6 +498,7 @@ export default { ...@@ -487,6 +498,7 @@ export default {
}) })
return true return true
} }
console.log(this.groupCofListInput, 'this.groupCofListInput')
let isGroupEmpty = Object.keys(this.groupCofList) let isGroupEmpty = Object.keys(this.groupCofList)
.map(item => this.groupCofList[item].length) .map(item => this.groupCofList[item].length)
.every(item => item == 0) .every(item => item == 0)
...@@ -514,7 +526,7 @@ export default { ...@@ -514,7 +526,7 @@ export default {
scene: 1 scene: 1
} }
let switchList = [] let switchList = []
let reportParams = ['saReport', 'zhanReport', 'orderReport', 'saPerReport', 'scheduleReport', 'wordReport'] let reportParams = ['saReport', 'zhanReport', 'orderReport', 'saPerReport', 'scheduleReport', 'wordReport', 'viewReport']
reportParams.forEach(item => { reportParams.forEach(item => {
switchList.push(...this.switchList[item]) switchList.push(...this.switchList[item])
}) })
...@@ -659,4 +671,5 @@ export default { ...@@ -659,4 +671,5 @@ export default {
.is-reverse { .is-reverse {
transform: rotate(180deg); transform: rotate(180deg);
}</style> }
</style>
<template>
<GLDialog :mode="mode" title="#8.驻店日报 预览配置显示字段" :before-close="handlebattleClose" :visible.sync="isDialogVisible" @onOk="handlebattleClose" @onCancel="handlebattleClose">
<div class="popup-wrap">
<div class="left-wrap">
<div class="img-wrap">
<img src="@/assets/buttetin/view.png" />
</div>
<p class="color-3 txt-center text-14">图示效果</p>
</div>
<div class="right-wrap">
<div class="empty">
<img src="@/assets/buttetin/empty.png" />
</div>
<p class="empty-text">暂无配置项</p>
<div class="explain">
<div class="color6 weight-6 font-14">
<i class="el-icon-warning"></i>
推送机制说明
</div>
<p class="mrp">驻店人员在驻店日报中填写日报内容时,填写的当日及昨日内容,会推送消息到指定群聊。服务商老板可在生意助手打开并回复批复内容。</p>
</div>
</div>
</div>
</GLDialog>
</template>
<script>
import dialog from './dialog'
export default {
mixins: [dialog],
data() {
return {
mode: 'big'
}
},
methods: {
initData() {},
handlebattleConfirm() {
this.isDialogVisible = false
// let switchList = []
// const params = ['vehicleType', 'goodsType', 'proceedsType', 'verbalType']
// params.forEach(data => {
// this[data].switchStatus = this[data].switchStatus ? 'Y' : 'N'
// switchList.push(this[data])
// })
// this.$emit('handlePreview',{key:'saPerReport',data:switchList})
}
}
}
</script>
<style lang="scss" scoped>
.popup-wrap {
display: flex;
padding: 0 72px;
.img-wrap {
width: 250px;
height: 560px;
margin-bottom: 14px;
img {
width: 100%;
height: 100%;
}
}
.right-wrap {
display: 1;
position: relative;
width: 100%;
margin-top: 12px;
/deep/.el-form-item {
margin-bottom: 0px;
}
.item-line {
margin-bottom: 20px;
}
.empty {
width: 420px;
height: 260px;
position: absolute;
top: 35%;
left: 50%;
transform: translate(-50%, -50%);
img {
width: 100%;
height: 100%;
}
}
.empty-text {
font-size: 16px;
color: #666666;
line-height: 20px;
position: absolute;
top: 45%;
left: 50%;
transform: translate(-50%, -50%);
}
.explain {
width: 486px;
background: #f4f6fc;
padding: 16px;
margin-left: 70px;
box-sizing: border-box;
position: absolute;
bottom: 30px;
.el-icon-warning {
width: 16px;
height: 16px;
margin-right: 4px;
}
.mrp {
margin: 8px 0 0 20px;
line-height: 22px;
}
}
}
.warn {
font-size: 12px;
color: #999999;
margin-left: 154px;
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!