Commit fb729fff by 前端

Merge branch 'v3.6.0' into 'master'

V3.6.0

See merge request !52
2 parents b6f70c97 d7fc0ffc
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-01-09 18:24:21
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-03-11 18:05:07
* @FilePath: \scrm-micro-battles\src\App.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template> <template>
<div id="app"> <div id="app">
<!-- <h2> <!-- <h2>
...@@ -61,5 +69,7 @@ export default { ...@@ -61,5 +69,7 @@ export default {
// overflow-y: auto; // overflow-y: auto;
height: 100%; height: 100%;
} }
.el-message {
z-index: 9999 !important;
}
</style> </style>
>
...@@ -170,8 +170,7 @@ const orderVerfication = params => { ...@@ -170,8 +170,7 @@ const orderVerfication = params => {
url: '/rop-scrm-shopmall/router', url: '/rop-scrm-shopmall/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true
returnAll: false
}) })
} }
...@@ -211,4 +210,5 @@ const finishOrderStatus = params => { ...@@ -211,4 +210,5 @@ const finishOrderStatus = params => {
}) })
} }
export default { getInstallInfo, orderVerfication, signerOrder, getListApi, getCountApi, getOrderDetailApi, orderExportApi, writeOffApi, crowdFundWriteOffApi, crowdFundRefundApi, addDeliveryApi, examineDetailApi, examineAllowApi, confirmReceiptGoodsApi, updateOrderType, batchRefundOrder, importCrowdFundingOrder, finishOrderStatus } export default { getInstallInfo, orderVerfication, signerOrder, getListApi, getCountApi, getOrderDetailApi, orderExportApi, writeOffApi, crowdFundWriteOffApi, crowdFundRefundApi, addDeliveryApi, examineDetailApi, examineAllowApi, confirmReceiptGoodsApi, updateOrderType, batchRefundOrder, importCrowdFundingOrder, finishOrderStatus }
...@@ -292,6 +292,18 @@ const getCrowdfundingParams = params => { ...@@ -292,6 +292,18 @@ const getCrowdfundingParams = params => {
sign: true sign: true
}) })
} }
/**获取众筹活动名称&门店 */
const getCrowdGoldParams = params => {
params.method = 'scrm.api.shopmall.crowdfunding.activity.parameter.list'
/**1秒杀 2直播间活动 3众筹 4膨胀金 */
params.marketingType = 5
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
/**众筹活动直播视频列表 */ /**众筹活动直播视频列表 */
const getTencentcloudmediaList = params => { const getTencentcloudmediaList = params => {
...@@ -304,4 +316,4 @@ const getTencentcloudmediaList = params => { ...@@ -304,4 +316,4 @@ const getTencentcloudmediaList = params => {
}) })
} }
export default { getPayListApi, getPayMerchatListApi, liveroomDetailexport, liveroomDetailpage, liveroomOverview, getActivityPageApi, getCrowdfundListApi, exportCrowdfundApi, getBrowseListApi, exportBrowseApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi, getCrowdSharedApi, getLiveListApi, getRankListApi, exportRankListApi, getDataBoardApi, getVisitorListApi, getSharedListApi, getDailyOrderQuantityStatistics, exportDailyOrderQuantityStatistics, getCrowdfundingParams, getTencentcloudmediaList } export default { getCrowdGoldParams, getPayListApi, getPayMerchatListApi, liveroomDetailexport, liveroomDetailpage, liveroomOverview, getActivityPageApi, getCrowdfundListApi, exportCrowdfundApi, getBrowseListApi, exportBrowseApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi, getCrowdSharedApi, getLiveListApi, getRankListApi, exportRankListApi, getDataBoardApi, getVisitorListApi, getSharedListApi, getDailyOrderQuantityStatistics, exportDailyOrderQuantityStatistics, getCrowdfundingParams, getTencentcloudmediaList }
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-01-04 16:41:09
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-01-11 17:18:05
* @FilePath: \scrm-micro-battles\src\views\battle\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- 专区管理 -->
<template> <template>
<div class="activity"> <div class="activity">
<GLTabs v-model="activeName" :tabPaneList="tabPaneList" @tab-click="handleClick"></GLTabs> <GLTabs v-model="activeName" :tabPaneList="tabPaneList" @tab-click="handleClick"></GLTabs>
...@@ -54,23 +45,21 @@ ...@@ -54,23 +45,21 @@
<GLFull :label="tag.staffName" :identi="`${tag.id}`" labelWidth="110" textType="user" :haveClose="true" v-for="(tag, idx) in userList" :key="idx" @handleRemove="removeStaff(idx)"></GLFull> <GLFull :label="tag.staffName" :identi="`${tag.id}`" labelWidth="110" textType="user" :haveClose="true" v-for="(tag, idx) in userList" :key="idx" @handleRemove="removeStaff(idx)"></GLFull>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="战报配置:">
<div class="config-pannel">
<div class="config-item">
<!-- 战报自动发送 --> <!-- 战报自动发送 -->
<el-form-item class="select-wrap" label="战报自动发送:"> <el-form-item class="select-wrap" label="战报自动发送:">
<div class="common el-form-item__content"> <div class="common el-form-item__content">
<div class="el-input" ref="automaticRef"> <div class="el-input" ref="automaticRef">
<div class="el-input__inner" @click="openAutomatic"> <div class="el-input__inner" @click="openMenu(1)">
<span v-if="wechat.automaticName == ''" class="placeholder">选择成员</span> <span v-if="!wechat.battleStaffName" class="placeholder">选择成员</span>
{{ wechat.automaticName }} {{ wechat.battleStaffName }}
</div> </div>
<span class="el-input__suffix" @click="openAutomatic"> <span class="el-input__suffix" @click="openMenu(1)">
<span class="el-input__suffix-inner"><i :class="['el-select__caret', 'el-input__icon', 'el-icon-arrow-up', isAutomatic ? 'is-reverse' : '']"></i></span> <span class="el-input__suffix-inner"><i :class="['el-select__caret', 'el-input__icon', 'el-icon-arrow-up', menuIndex != 1 ? 'is-reverse' : '']"></i></span>
</span> </span>
</div> </div>
<div class="empty-btn" @click="clearWechat(1)">清空</div>
</div> </div>
<transition name="el-zoom-in-top" v-if="!isAutomatic"> <transition name="el-zoom-in-top" v-if="menuIndex == 1">
<gl-select-menu :domEl="automaticEl" @changeStatu="hideSelect"> <gl-select-menu :domEl="automaticEl" @changeStatu="hideSelect">
<el-form-item class="search-groomname"> <el-form-item class="search-groomname">
<el-input placeholder="请输入搜索关键词" v-model="filterText"></el-input> <el-input placeholder="请输入搜索关键词" v-model="filterText"></el-input>
...@@ -84,20 +73,48 @@ ...@@ -84,20 +73,48 @@
</gl-select-menu> </gl-select-menu>
</transition> </transition>
</el-form-item> </el-form-item>
<!-- 喜报自动发送 -->
<el-form-item class="select-wrap" label="喜报自动发送:">
<div class="common el-form-item__content">
<div class="el-input" ref="happyRef">
<div class="el-input__inner" @click="openMenu(2)">
<span v-if="!wechat.goodStaffName" class="placeholder">选择成员</span>
{{ wechat.goodStaffName }}
</div>
<span class="el-input__suffix" @click="openMenu(2)">
<span class="el-input__suffix-inner"><i :class="['el-select__caret', 'el-input__icon', 'el-icon-arrow-up', menuIndex != 2 ? 'is-reverse' : '']"></i></span>
</span>
</div>
<div class="empty-btn" @click="clearWechat(2)">清空</div>
</div>
<transition name="el-zoom-in-top" v-if="menuIndex == 2">
<gl-select-menu :domEl="happyEl" @changeStatu="hideSelect">
<el-form-item class="search-groomname">
<el-input placeholder="请输入搜索关键词" v-model="filterTextH"></el-input>
</el-form-item>
<div class="el-select-dropdown__wrap el-scrollbar__wrap">
<template v-if="automaticData.length > 0">
<el-tree class="filter-tree" :data="automaticData" node-key="id" :default-expanded-keys="expandedKeys" :props="defaultProps" default-expand-all :filter-node-method="filterNode" ref="treeH" @node-click="handleNodeClick"></el-tree>
</template>
<div class="empty" v-else>暂无数据</div>
</div>
</gl-select-menu>
</transition>
</el-form-item>
<!-- 关联群 --> <!-- 关联群 -->
<el-form-item class="select-wrap" label="关联群:"> <el-form-item class="select-wrap" label="关联群:">
<div class="common el-form-item__content"> <div class="common el-form-item__content">
<div class="el-input" ref="groupRef"> <div class="el-input" ref="groupRef">
<div class="el-input__inner" @click="openGroup"> <div class="el-input__inner" @click="openMenu(3)">
<span class="placeholder" v-if="wechat.roomName == ''">选择选择群</span> <span class="placeholder" v-if="wechat.roomName == ''">选择选择群</span>
{{ wechat.roomName }} {{ wechat.roomName }}
</div> </div>
<span class="el-input__suffix" @click="openGroup"> <span class="el-input__suffix" @click="openMenu(3)">
<span class="el-input__suffix-inner"><i :class="['el-select__caret', 'el-input__icon', 'el-icon-arrow-up', isgroup ? 'is-reverse' : '']"></i></span> <span class="el-input__suffix-inner"><i :class="['el-select__caret', 'el-input__icon', 'el-icon-arrow-up', menuIndex != 3 ? 'is-reverse' : '']"></i></span>
</span> </span>
</div> </div>
</div> </div>
<transition name="el-zoom-in-top" v-if="!isgroup"> <transition name="el-zoom-in-top" v-if="menuIndex == 3">
<gl-select-menu :domEl="domEl" @changeStatu="hideSelect"> <gl-select-menu :domEl="domEl" @changeStatu="hideSelect">
<el-form-item class="search-groomname"> <el-form-item class="search-groomname">
<el-input placeholder="请输入搜索关键词" prefix-icon="el-icon-search" v-model="roomName"></el-input> <el-input placeholder="请输入搜索关键词" prefix-icon="el-icon-search" v-model="roomName"></el-input>
...@@ -115,10 +132,6 @@ ...@@ -115,10 +132,6 @@
</gl-select-menu> </gl-select-menu>
</transition> </transition>
</el-form-item> </el-form-item>
</div>
<div class="clear-btn" @click="clearWechat">清空</div>
</div>
</el-form-item>
</el-form> </el-form>
</div> </div>
</GLDialog> </GLDialog>
...@@ -127,7 +140,6 @@ ...@@ -127,7 +140,6 @@
</GLDialog> </GLDialog>
</div> </div>
</template> </template>
<script> <script>
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
...@@ -143,6 +155,7 @@ export default { ...@@ -143,6 +155,7 @@ export default {
return { return {
isgroup: true, isgroup: true,
isAutomatic: true, isAutomatic: true,
menuIndex: 0,
merchantId: '', merchantId: '',
merchantName: '', merchantName: '',
activeName: 'first', activeName: 'first',
...@@ -152,6 +165,7 @@ export default { ...@@ -152,6 +165,7 @@ export default {
battlestaffVisible: false, battlestaffVisible: false,
url: url, url: url,
setectList: [], setectList: [],
setectEditList: [],
merchantList: [], merchantList: [],
groupList: [], groupList: [],
tabPaneList: [ tabPaneList: [
...@@ -202,7 +216,6 @@ export default { ...@@ -202,7 +216,6 @@ export default {
// 表格 // 表格
userList: [], userList: [],
selectArray: [], selectArray: [],
getListApi: this.$apis.battle.getActivitylist, getListApi: this.$apis.battle.getActivitylist,
tableParams: { tableParams: {
// btnId: new Date().getTime() + parseInt(Math.random() * 1000), // btnId: new Date().getTime() + parseInt(Math.random() * 1000),
...@@ -217,7 +230,6 @@ export default { ...@@ -217,7 +230,6 @@ export default {
label: '活动名称', label: '活动名称',
prop: 'activityName' prop: 'activityName'
}, },
{ {
label: '活动门店', label: '活动门店',
prop: 'merchantName' prop: 'merchantName'
...@@ -252,6 +264,7 @@ export default { ...@@ -252,6 +264,7 @@ export default {
}, },
expandedKeys: [], expandedKeys: [],
filterText: '', filterText: '',
filterTextH: '',
automaticData: [], automaticData: [],
stageList: [], stageList: [],
roomName: '', roomName: '',
...@@ -260,7 +273,8 @@ export default { ...@@ -260,7 +273,8 @@ export default {
staffType: '2' staffType: '2'
}, },
wechat: { wechat: {
automaticName: '', battleStaffName: '',
goodStaffName: '',
roomName: '' roomName: ''
}, },
baseData: { baseData: {
...@@ -271,7 +285,6 @@ export default { ...@@ -271,7 +285,6 @@ export default {
} }
} }
}, },
mounted() { mounted() {
this.getOptionsList('searchFormData') this.getOptionsList('searchFormData')
this.getCrowdfundingParams() this.getCrowdfundingParams()
...@@ -283,6 +296,9 @@ export default { ...@@ -283,6 +296,9 @@ export default {
}, },
automaticEl() { automaticEl() {
return this.$refs.automaticRef return this.$refs.automaticRef
},
happyEl() {
return this.$refs.happyRef
} }
}, },
watch: { watch: {
...@@ -307,6 +323,9 @@ export default { ...@@ -307,6 +323,9 @@ export default {
filterText(val) { filterText(val) {
this.$refs.tree.filter(val) this.$refs.tree.filter(val)
}, },
filterTextH(val) {
this.$refs.treeH.filter(val)
},
roomName(val) { roomName(val) {
this.filterRoomName(val) this.filterRoomName(val)
} }
...@@ -339,26 +358,29 @@ export default { ...@@ -339,26 +358,29 @@ export default {
}, },
async getCrowdfundingParams() { async getCrowdfundingParams() {
/**参数类型 1:众筹活动名称(返回类型String),2:众筹活动门店 */ /**参数类型 1:众筹活动名称(返回类型String),2:众筹活动门店 */
const activity = await this.$apis.seckillActivity.getCrowdfundingParams({ const funding = await this.$apis.seckillActivity.getCrowdfundingParams({
parameterType: 1
})
const gold = await this.$apis.seckillActivity.getCrowdGoldParams({
parameterType: 1 parameterType: 1
}) })
const activity = [...funding?.parameters, ...gold?.parameters]
let activityNameList = [] let activityNameList = []
if (activity?.parameters && activity.parameters.length) { activity.map(e => {
activity.parameters.map(e => {
activityNameList.push({ activityNameList.push({
confId: e, confId: e,
confName: e confName: e
}) })
}) })
}
this.$set(this.searchFormData[1], 'optionList', this.$common.utils.deepClone(activityNameList)) this.$set(this.searchFormData[1], 'optionList', this.$common.utils.deepClone(activityNameList))
}, },
clearData() { clearData() {
this.setectList = [] // this.setectList = []
this.config.merchantId = this.merchantId this.config.merchantId = this.merchantId
this.config.staffType = '2' this.config.staffType = '2'
this.wechat = { this.wechat = {
automaticName: '', battleStaffName: '',
goodStaffName: '',
roomName: '' roomName: ''
} }
this.hideSelect() this.hideSelect()
...@@ -375,28 +397,51 @@ export default { ...@@ -375,28 +397,51 @@ export default {
}) })
}, },
handleNodeClick(data) { handleNodeClick(data) {
this.setSendName(data.name, data.staffId)
// this.wechat.roomName = ''
this.hideSelect() this.hideSelect()
this.wechat.automaticName = data.name },
this.wechat.staffId = data.staffId setSendName(name, staffId, isClear, i) {
console.log(staffId, this.wechat.battleStaffId, i)
if (this.menuIndex == 1 || i == 1) {
if (staffId == this.wechat.battleStaffId && staffId) return
Object.assign(this.wechat, { battleStaffName: name, battleStaffId: staffId })
}
if (this.menuIndex == 2 || i == 2) {
if (staffId == this.wechat.goodStaffId && staffId) return
Object.assign(this.wechat, { goodStaffName: name, goodStaffId: staffId })
}
console.log(this.wechat)
if (isClear && !this.wechat.battleStaffName && !this.wechat.goodStaffName) {
this.wechat.roomName = '' this.wechat.roomName = ''
this.getGroupList(this.wechat.staffId) this.groupList = []
return
}
if (isClear && (this.wechat.battleStaffName || this.wechat.goodStaffName)) return
this.wechat.roomName = ''
this.getGroupList()
}, },
hideSelect() { hideSelect() {
this.isgroup = true this.menuIndex = 0
this.isAutomatic = true
}, },
selectGroup(data) { selectGroup(data) {
this.hideSelect() this.hideSelect()
this.wechat.roomName = data.roomName this.wechat.roomName = data.roomName
this.wechat.groupId = data.roomChatId const { goodStaffId, battleStaffId } = this.wechat
}, if (!data.staffInfoList) return
openGroup(e) { if (this.wechat.battleStaffName) {
this.isAutomatic = true const staffCloudId = data.staffInfoList.find(i => i.staffId == battleStaffId)?.staffCloudId
this.isgroup = !this.isgroup this.wechat.battleGroupId = staffCloudId + '_' + data.roomIdOnly
}
if (this.wechat.goodStaffName) {
const staffCloudId = data.staffInfoList.find(i => i.staffId == goodStaffId)?.staffCloudId
this.wechat.goodGroupId = staffCloudId + '_' + data.roomIdOnly
}
// this.wechat.groupId = data.roomChatId
}, },
openAutomatic() { openMenu(e) {
this.isgroup = true if (e == this.menuIndex) return (this.menuIndex = 0)
this.isAutomatic = !this.isAutomatic this.menuIndex = e
}, },
removeStaff(index) { removeStaff(index) {
this.userList.splice(index, 1) this.userList.splice(index, 1)
...@@ -436,10 +481,10 @@ export default { ...@@ -436,10 +481,10 @@ export default {
this.activityOpen(scope) this.activityOpen(scope)
}) })
.catch(() => { .catch(() => {
this.$message({ // this.$message({
type: 'info', // type: 'info',
message: '已取消' // message: '已取消'
}) // })
}) })
}, },
activityOpen(scope) { activityOpen(scope) {
...@@ -464,6 +509,7 @@ export default { ...@@ -464,6 +509,7 @@ export default {
}) })
return return
} }
this.getDepartmentTree()
this.userList = [] this.userList = []
// this.editStatus = false // this.editStatus = false
this.battleVisible = true this.battleVisible = true
...@@ -495,7 +541,7 @@ export default { ...@@ -495,7 +541,7 @@ export default {
}) })
return return
} }
if (this.wechat.automaticName !== '' && this.wechat.roomName == '') { if (this.wechat.battleStaffName !== '' && this.wechat.roomName == '') {
this.$message({ this.$message({
message: '请选择关联群', message: '请选择关联群',
type: 'error' type: 'error'
...@@ -513,14 +559,19 @@ export default { ...@@ -513,14 +559,19 @@ export default {
userId: item.userId userId: item.userId
}) })
}) })
this.setectList.forEach(item => { const setectList = this.setectEditList.length ? this.setectEditList : this.setectList
setectList.forEach(item => {
let autoStaff = {} let autoStaff = {}
if (Object.keys(this.wechat).length) { if (Object.keys(this.wechat).length) {
const { battleStaffId, battleStaffName, battleGroupId, goodStaffName, roomName, goodGroupId, goodStaffId } = this.wechat
autoStaff = { autoStaff = {
autoStaffId: this.wechat.staffId, battleStaffId,
autoStaffName: this.wechat.automaticName, battleStaffName,
autoGroupId: this.wechat.groupId, battleGroupId,
autoGroupName: this.wechat.roomName, goodGroupId,
goodStaffName,
goodStaffId,
autoGroupName: roomName,
autoGroupMerchantId: this.$merchantId autoGroupMerchantId: this.$merchantId
} }
} }
...@@ -530,7 +581,6 @@ export default { ...@@ -530,7 +581,6 @@ export default {
staffRequestList staffRequestList
}) })
}) })
this.$apis.battle.insertStaff({ batchstaffRequestList, staffType: this.config.staffType }).then(res => { this.$apis.battle.insertStaff({ batchstaffRequestList, staffType: this.config.staffType }).then(res => {
this.$message({ this.$message({
message: res.code == '0' ? '配置成功' : res.message, message: res.code == '0' ? '配置成功' : res.message,
...@@ -546,28 +596,27 @@ export default { ...@@ -546,28 +596,27 @@ export default {
}, },
handlebattleClose() { handlebattleClose() {
this.clearData() this.clearData()
this.setectEditList = []
this.battleVisible = false this.battleVisible = false
}, },
handleDetails() {}, handleDetails() {},
handlebattleOn(data, sign) { handlebattleOn(data, sign) {
this.setectList = [] this.setectEditList = []
this.userList = [] this.userList = []
this.wechat = { this.wechat = {
automaticName: '', battleStaffName: '',
roomName: '' roomName: '',
goodStaffName: ''
} }
this.setectList.push(data) this.setectEditList.push(data)
this.battleVisible = true this.battleVisible = true
if (sign) { if (sign) {
this.getStaffList(data) this.getStaffList(data)
} }
this.getDepartmentTree() this.getDepartmentTree()
}, },
clearWechat() { clearWechat(i) {
this.wechat = { this.setSendName('', '', true, i)
automaticName: '',
roomName: ''
}
}, },
//获取编辑 //获取编辑
getStaffList(data) { getStaffList(data) {
...@@ -577,16 +626,31 @@ export default { ...@@ -577,16 +626,31 @@ export default {
this.merchantName = res.staffs[0].merchantName this.merchantName = res.staffs[0].merchantName
this.userList = res.staffs this.userList = res.staffs
this.config.staffType = res.staffType + '' this.config.staffType = res.staffType + ''
this.wechat.staffId = res.autoStaffId // this.wechat.staffId = res.autoStaffId
this.wechat.automaticName = res.autoStaffName // this.wechat.battleStaffName = res.autoStaffName
this.wechat.groupId = res.autoGroupId // this.wechat.groupId = res.autoGroupId
this.wechat.roomName = res.autoGroupName // this.wechat.roomName = res.autoGroupName
const { goodStaffId, goodStaffName, battleStaffId, battleStaffName, goodGroupId, battleGroupId, autoGroupName, autoGroupMerchantId } = res
this.wechat = {
goodStaffId,
goodStaffName,
battleStaffId,
battleStaffName,
goodGroupId,
battleGroupId,
roomName: autoGroupName,
autoGroupMerchantId
}
this.getGroupList(this.wechat.staffId) this.getGroupList(this.wechat.staffId)
}) })
}, },
getGroupList(id) { getGroupList(id) {
this.$apis.battle.getGroupList({ msgStaffIdList: id }).then(res => { const { battleStaffId, goodStaffId } = this.wechat
if (res.code == 0) this.groupList = res.data const msgStaffIdList = [battleStaffId, goodStaffId]
this.$apis.battle.getGroupList({ msgStaffIdList, unionRoom: true }).then(res => {
if (res.code == 0) {
this.groupList = res.data
}
}) })
}, },
handleSetting() { handleSetting() {
...@@ -612,12 +676,10 @@ export default { ...@@ -612,12 +676,10 @@ export default {
resolve() resolve()
}) })
}, },
setTableFinishFun() { setTableFinishFun() {
//接收到的数据为空 //接收到的数据为空
this.$refs.battleRef.data.length ? (this.$refs.battleRef.tableHeightValues = '') : this.$refs.battleRef.setTableHeightFun() this.$refs.battleRef.data.length ? (this.$refs.battleRef.tableHeightValues = '') : this.$refs.battleRef.setTableHeightFun()
}, },
handleSearch() { handleSearch() {
this.$refs.battleRef.refreshTable() this.$refs.battleRef.refreshTable()
}, },
...@@ -676,13 +738,15 @@ export default { ...@@ -676,13 +738,15 @@ export default {
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.activity { .activity {
/deep/ { /deep/ {
.el-select .el-tag { .el-select .el-tag {
max-width: 60% !important; max-width: 60% !important;
} }
.el-form-item__content {
overflow: inherit !important;
}
} }
.container { .container {
margin-top: 16px; margin-top: 16px;
...@@ -698,6 +762,13 @@ export default { ...@@ -698,6 +762,13 @@ export default {
} }
} }
} }
.empty-btn {
position: absolute;
right: -40px;
top: 0px;
font-size: 14px;
color: #5850ff;
}
.config-pannel { .config-pannel {
background: #f9f9f9; background: #f9f9f9;
width: 520px; width: 520px;
......
...@@ -19,13 +19,12 @@ ...@@ -19,13 +19,12 @@
v-model="searchForm.requestSource" v-model="searchForm.requestSource"
@tab-click="handleTabClick" @tab-click="handleTabClick"
> >
<template v-for="(i,index) in requestSourceList">
<el-tab-pane <el-tab-pane
:label="i" :label="i"
:name="index" :name="index"
:key="index" :key="index"
v-for="(i,index) in requestSourceList"
></el-tab-pane> ></el-tab-pane>
</template>
</el-tabs> </el-tabs>
</div> </div>
<div class="btn-group"> <div class="btn-group">
...@@ -363,13 +362,23 @@ ...@@ -363,13 +362,23 @@
<GLDialog <GLDialog
v-if="writeOffApprovalVisible" v-if="writeOffApprovalVisible"
title="核销审批" title="核销审批"
width="400px" mode="mid"
:width="approvalInfo.verificationVoucher ? '':'400px'"
:visible.sync="writeOffApprovalVisible" :visible.sync="writeOffApprovalVisible"
@onCancel="handleApprovalClose" @onCancel="handleApprovalClose"
@onOk="handleApprovalComfirm" @onOk="handleApprovalConfirm"
:okText="approvalInfo.verificationVoucher ? '审批通过': '确定'"
:cancelText="approvalInfo.verificationVoucher ? '不通过': '取消'"
:orderCode="orderCode" :orderCode="orderCode"
> >
<ul> <ul v-if="approvalInfo.verificationVoucher" class="approvalWrap">
<li v-for="item in userInfo" :key="item.key" class="approvalInfoItem">
{{ item.label }}
<span v-if="item.key!='verificationVoucher'">{{ approvalInfo[item.key] || '--' }}</span>
<el-image v-else style="width: 100px; height: 100px" :src="approvalInfo[item.key]" :preview-src-list="[approvalInfo[item.key]]"></el-image>
</li>
</ul>
<ul v-else>
<li class="approvalInfoTips"> <li class="approvalInfoTips">
<img <img
class="tips-img" class="tips-img"
...@@ -381,6 +390,16 @@ ...@@ -381,6 +390,16 @@
<li class="approvalInfoItem">提交时间: {{ approvalInfo.confirmInstallTime }}</li> <li class="approvalInfoItem">提交时间: {{ approvalInfo.confirmInstallTime }}</li>
</ul> </ul>
</GLDialog> </GLDialog>
<GLDialog title="审批不通过" mode="mid" :visible.sync="isCancelVisible" @onOk="confirmNoPass(1)" @onCancel="closePassDialog">
<div class="noPassDialog">
<span class="tip">请输入审批不通过的原因</span>
<el-form class="form" ref="cancelRef" label-width="154px" :rules="cancelRules" :model="cancelForm">
<el-form-item label="原因说明:" prop="reasonsForFailure">
<el-input style="width: 432px;" :size="size" type="textarea" v-model="cancelForm.reasonsForFailure" placeholder="请输入审批不通过说明" maxlength="50" rows="3" show-word-limit></el-input>
</el-form-item>
</el-form>
</div>
</GLDialog>
<!-- :selectedCrowdList="JSON.parse(JSON.stringify(customerDataList[0].list))" --> <!-- :selectedCrowdList="JSON.parse(JSON.stringify(customerDataList[0].list))" -->
<!-- <GLDialog :bigTitle="'选择成员'" <!-- <GLDialog :bigTitle="'选择成员'"
mode="big" mode="big"
...@@ -543,8 +562,31 @@ ...@@ -543,8 +562,31 @@
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import { utils } from 'glsx-common' import { utils } from 'glsx-common'
import { dateFormat } from '../../utils/index'
import selectStaff from './components/selectStaff.vue' import selectStaff from './components/selectStaff.vue'
import { businessType, orderManageStatusList, afterSaleStatusList, orderSourceList, deliveryTypeList, exportFn } from '@/common/constant' import { businessType, orderManageStatusList, afterSaleStatusList, orderSourceList, deliveryTypeList, exportFn } from '@/common/constant'
const userInfo = [
{
label: '员工名称:',
key: 'confirmInstallStaffName'
},
{
label: '提交时间:',
key: 'confirmInstallTime'
},
{
label: '活动名称:',
key: 'activityName'
},
{
label: '应付尾款:',
key: 'tailPrice'
},
{
label: '尾款凭证:',
key: 'verificationVoucher'
},
]
export default { export default {
name: 'orderManage', name: 'orderManage',
components: { components: {
...@@ -553,6 +595,26 @@ export default { ...@@ -553,6 +595,26 @@ export default {
}, },
data () { data () {
return { return {
userInfo,
isCancelVisible: false,
cancelForm: {
reasonsForFailure: ''
},
cancelRules: {
reasonsForFailure: [
{
required: true,
validator: (rule, value, callback) => {
if (!value || (value && !value.trim())) {
return callback(new Error('请输入审批不通过说明'))
} else {
return callback()
}
},
trigger: 'change'
}
]
},
isStaffVisible: false, isStaffVisible: false,
size: 'small', size: 'small',
url: url, url: url,
...@@ -698,7 +760,8 @@ export default { ...@@ -698,7 +760,8 @@ export default {
fn: '退款' fn: '退款'
}, },
condition: row => { condition: row => {
return row.orderSource == 4 && [2, 6, 21].includes(+row.orderStatus) && row.isOffline != 0 // return row.orderSource == 4 && [2, 6, 21, 22].includes(+row.orderStatus) && row.isOffline != 0
return row.showRefund == 1 //是否展示退款按钮 1:是 0:否
}, },
listeners: { listeners: {
click: row => { click: row => {
...@@ -720,7 +783,8 @@ export default { ...@@ -720,7 +783,8 @@ export default {
fn: '订单核销' fn: '订单核销'
}, },
condition: row => { condition: row => {
return (row.deliveryType == 1 && row.orderStatus == 21) || (row.afterSaleType == 2 && [2, 4, 5, 6, 7, 9, 10].includes(row.orderStatus)) // return (row.deliveryType == 1 && row.orderStatus == 21) || (row.afterSaleType == 2 && [2, 4, 5, 6, 7, 9, 10].includes(row.orderStatus))
return row.showVerf == 1 //是否展示核销按钮 1:是 0:否
}, },
listeners: { listeners: {
click: this.handleWriteOff click: this.handleWriteOff
...@@ -806,7 +870,8 @@ export default { ...@@ -806,7 +870,8 @@ export default {
// checkSelectKey: 'orderStatus', // checkSelectKey: 'orderStatus',
// checkSelectVal: [9, 10, 11, 22], // checkSelectVal: [9, 10, 11, 22],
checkSelectable: row => { checkSelectable: row => {
return [9, 10, 11, 22].indexOf(row.orderStatus) == -1 && row.isOffline != '0' && row?.paymentModel != 3 // return [9, 10, 11, 22].indexOf(row.orderStatus) == -1 && row.isOffline != '0' && row?.paymentModel != 3
return row.showRefund == 1 && row?.paymentModel != 3 //v3.6.0修改批量退款
}, },
listName: 'list', listName: 'list',
tableOption: true, tableOption: true,
...@@ -1418,28 +1483,74 @@ export default { ...@@ -1418,28 +1483,74 @@ export default {
}) })
} }
}, },
//取消弹框,如果没有凭证,直接关闭
handleApprovalClose () { handleApprovalClose () {
this.writeOffApprovalVisible = !this.writeOffApprovalVisible if(this.approvalInfo.verificationVoucher){
this.openPassDialog()
}else{
this.writeOffApprovalVisible = false
}
},
// 确认不通过审批
confirmNoPass(){
this.$refs?.cancelRef?.validate(valid => {
if(valid) this.handleApprovalConfirm(1)
})
}, },
handleApprovalComfirm () { // 确认通过审批
this.$apis.orderManage.orderVerfication({ orderCode: this.orderCode }).then(result => { handleApprovalConfirm (type) {
this.handleApprovalClose() let params = { orderCode: this.orderCode }
if(type==1) {
params.reasonsForFailure = this.cancelForm.reasonsForFailure
params.failureflag = true
}
this.$apis.orderManage.orderVerfication(params).then(result => {
this.writeOffApprovalVisible = false
this.closePassDialog()
this.handleSearch() this.handleSearch()
}) })
}, },
//关闭不通过弹窗
closePassDialog() {
this.isCancelVisible = false
this.cancelForm = {
reasonsForFailure: ''
}
},
// 打开不通过弹窗
openPassDialog() {
this.$refs?.cancelRef?.clearValidate()
this.writeOffApprovalVisible = false
this.isCancelVisible = true
},
// 核销审批 // 核销审批
handleWriteOffApproval (val) { handleWriteOffApproval (val) {
// val.orderCode = 'S2110081902337632'
this.orderCode = val.orderCode this.orderCode = val.orderCode
this.$apis.orderManage this.$apis.orderManage
.getInstallInfo({ .getOrderDetailApi({
subOrderCode: val.orderCode orderCode: val.orderCode
// subOrderCode: 'S2211111603132050'
}) })
.then(result => { .then(result => {
if(result){
if(result.verificationVoucher){
result.confirmInstallTime = result.confirmInstallTime ? dateFormat(result.confirmInstallTime) : ''
result.crowdFundingPrice = result.crowdFundingPrice || 0
result.payPrice = result.payPrice || 0
result.tailPrice = (result.crowdFundingPrice - result.payPrice) + '元'
this.approvalInfo = result
this.writeOffApprovalVisible = true
}else{
this.$apis.orderManage
.getInstallInfo({
subOrderCode: val.orderCode
}).then(result => {
this.approvalInfo = result this.approvalInfo = result
// console.log(result) this.writeOffApprovalVisible = true
})
}
}
}) })
this.handleApprovalClose()
}, },
// 订单指派 // 订单指派
handlerAssign (item) { handlerAssign (item) {
...@@ -1473,7 +1584,7 @@ export default { ...@@ -1473,7 +1584,7 @@ export default {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
callback: action => { callback: utils.debounce((action) => {
if (action == 'confirm') { if (action == 'confirm') {
this.$apis[apiModule][apiName](apiParams).then(res => { this.$apis[apiModule][apiName](apiParams).then(res => {
this.$message({ this.$message({
...@@ -1487,7 +1598,7 @@ export default { ...@@ -1487,7 +1598,7 @@ export default {
} }
}) })
} }
} }, 500)
}) })
}, },
...@@ -1946,6 +2057,7 @@ export default { ...@@ -1946,6 +2057,7 @@ export default {
.approvalInfoItem { .approvalInfoItem {
margin-left: 20px; margin-left: 20px;
margin-bottom: 10px; margin-bottom: 10px;
display: flex;
} }
.refund-dialog { .refund-dialog {
.refund-item { .refund-item {
...@@ -2003,4 +2115,27 @@ export default { ...@@ -2003,4 +2115,27 @@ export default {
margin-left: 8px; margin-left: 8px;
} }
} }
.approvalWrap{
margin-left: 84px;
}
.noPassDialog{
.tip{
margin-left: 72px;
width: 522px;
font-weight: 400;
font-size: 14px;
color: #666666;
}
.form{
margin-top: 16px;
.el-form-item__label{
height: 32px;
line-height: 32px;
padding-right: 10px;
}
.el-textarea__inner{
font-family: auto;
}
}
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!