Commit c8d236e0 by zhangxw

Merge branch 'dev_v4.23.0' of http://192.168.3.233:8090/saas_plus/dj-car-life-sy…

…stem into zhangxw_dev_v4.23.0
2 parents b1366417 a21d915a
...@@ -717,15 +717,15 @@ export const routerName = { ...@@ -717,15 +717,15 @@ export const routerName = {
component: _import("systemConfig/ShopConfig/shopSet") component: _import("systemConfig/ShopConfig/shopSet")
}, },
9061909: { 9061909: {
path: "/personnelManagement", path: "/personnelManagementIndex",
name: "personnelManagement", name: "personnelManagementIndex",
meta: { meta: {
title: "人员管理", title: "人员设置",
authId: "9061909", authId: "9061909",
parentId: "9061908", parentId: "9061908",
cache: false, cache: false,
activePath: "/personnelManagement" activePath: "/personnelManagementIndex"
}, },
component: _import("systemConfig/ShopConfig/personnelManagement") component: _import("systemConfig/ShopConfig/personnelManagementIndex")
} }
} }
...@@ -2,22 +2,14 @@ ...@@ -2,22 +2,14 @@
<template> <template>
<div> <div>
<d2-container> <d2-container>
<div class="header" <div class="header" slot="header" style="padding: 10px 20px;">
slot="header" <d2-search ref="showSearch" class="show-search" label-width="100px" :search-form="searchForm"
style="padding: 10px 20px;"> :form-data="showFormData" />
<d2-search ref="showSearch"
class="show-search"
labelWidth="100px"
:search-form="searchForm"
:form-data="showFormData" />
<div class="up-btns"> <div class="up-btns">
<el-button :id="tableParams.btnId" <el-button :id="tableParams.btnId" size="small" type="primary">
size="small"
type="primary">
查询 查询
</el-button> </el-button>
<el-button size="small" <el-button size="small" @click="handleReset">
@click="handleReset">
重置 重置
</el-button> </el-button>
</div> </div>
...@@ -36,49 +28,30 @@ ...@@ -36,49 +28,30 @@
人员管理 人员管理
</el-button> --> </el-button> -->
</d2-table-header> </d2-table-header>
<d2-table ref="recordTable" <d2-table ref="recordTable" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams"
:get-list-api="getListApi" :before-search-fn="beforeSearchFn">
:search-form="searchFormSearch" <auth-button slot="auth-button" slot-scope="scope" :data="scope.scope" />
:table-params="tableParams"
:before-search-fn="beforeSearchFn">
<auth-button slot="auth-button"
slot-scope="scope"
:data="scope.scope" />
</d2-table> </d2-table>
</div> </div>
</d2-container> </d2-container>
<!-- 导入门店设置 --> <!-- 导入门店设置 -->
<d2-dialog :title="'上传文件'" <d2-dialog :title="'上传文件'" :is-visible="fileVisible" @closeDialog="handleImport" @confirmDialog="handleConfirmImport"
:is-visible="fileVisible" width="600px">
@closeDialog="handleImport"
@confirmDialog="handleConfirmImport"
width="600px">
<slot> <slot>
<div> <div>
<el-form :model="fileForm" <el-form :model="fileForm" :rules="fileRules" ref="fileRuleForm" label-width="120px">
:rules="fileRules" <el-form-item label="导入文件:" prop="fileName">
ref="fileRuleForm"
label-width="120px">
<el-form-item label="导入文件:"
prop="fileName">
<el-col :span="16"> <el-col :span="16">
<el-input readonly <el-input readonly v-model="fileForm.fileName" />
v-model="fileForm.fileName" />
</el-col> </el-col>
<el-col :span="4" <el-col :span="4" class="m-l-md">
class="m-l-md">
<el-button class="import-btn"> <el-button class="import-btn">
导入文件 导入文件
<input type="file" <input type="file" id="fileUpload" class="import-input"
id="fileUpload" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
class="import-input" @change="importFile($event)" />
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
@change="importFile($event)" />
<!-- href="https://img01.glsx.com.cn/weapp/resource/saas/scrm/xlsx/对账单模版.xlsx" --> <!-- href="https://img01.glsx.com.cn/weapp/resource/saas/scrm/xlsx/对账单模版.xlsx" -->
<el-link type="primary" <el-link type="primary" class="import-template" @click="downLoadTemplate" icon="el-icon-link">
class="import-template"
@click="downLoadTemplate"
icon="el-icon-link">
模版下载 模版下载
</el-link> </el-link>
</el-button> </el-button>
...@@ -109,20 +82,16 @@ ...@@ -109,20 +82,16 @@
</d2-dialog> </d2-dialog>
<!-- 收款码 --> <!-- 收款码 -->
<qrcode-dialog :q-rcode-visible="qRcodeVisible" <qrcode-dialog :q-rcode-visible="qRcodeVisible" :info="recordInfo" v-if="qRcodeVisible" @dialogClose="dialogClose" />
:info="recordInfo"
v-if="qRcodeVisible"
@dialogClose="dialogClose" />
</div> </div>
</template> </template>
<script> <script>
import { Util, deepClone } from '@/common/util' import { Util, deepClone, downLoadFile } from '@/common/util'
import { mapActions, mapState } from 'vuex' import { mapActions, mapState, mapMutations } from 'vuex'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { downLoadFile } from '@/common/util'
import { shopSettingList, listYqRef } from '@/api/shopConfig.js' import { shopSettingList, listYqRef } from '@/api/shopConfig.js'
import { merchantOutputValueTargetExport } from '@api/index' import { merchantOutputValueTargetExport, merchantOutputValueTargetImport } from '@api/index'
import { businessNature, storeType } from '@/common/constants.js' import { businessNature, storeType } from '@/common/constants.js'
import qrcodeDialog from './components/qRcodeDialog' import qrcodeDialog from './components/qRcodeDialog'
export default { export default {
...@@ -181,7 +150,7 @@ export default { ...@@ -181,7 +150,7 @@ export default {
isClear: true isClear: true
}, },
{ {
label: '驻点负责人', label: '驻店负责人',
name: 'residentManager', name: 'residentManager',
type: 'input', type: 'input',
maxlength: '20', maxlength: '20',
...@@ -266,7 +235,7 @@ export default { ...@@ -266,7 +235,7 @@ export default {
}, },
qRcodeVisible: false, qRcodeVisible: false,
testRow: { testRow: {
"merchantId": 44211653, merchantId: 44211653
// "merchantName": "晨星测试客户15", // "merchantName": "晨星测试客户15",
// "channelType": 1, // "channelType": 1,
} }
...@@ -274,9 +243,20 @@ export default { ...@@ -274,9 +243,20 @@ export default {
}, },
computed: { computed: {
...mapState({ ...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList dowloadList: (state) => state.d2admin.user.dowloadList,
updateList: (state) => state.d2admin.user.updateList,
updateRefesh: (state) => state.d2admin.user.updateRefesh
}) })
}, },
watch: {
updateRefesh(val) {
// console.log('val', val)
if (val == true) {
this.handleSearch()
this.setUpdateRefesh('false')
}
}
},
mounted() { mounted() {
this.getBaseData() this.getBaseData()
this.getProvinceList() this.getProvinceList()
...@@ -288,7 +268,7 @@ export default { ...@@ -288,7 +268,7 @@ export default {
close: 'd2admin/page/close' close: 'd2admin/page/close'
}), }),
...mapActions('d2admin/user', ['actionSetDownloadList']), ...mapActions('d2admin/user', ['actionSetDownloadList']),
...mapMutations('d2admin/user', ['setUpdateRefesh']),
async getBaseData() { async getBaseData() {
this.getOptionsList() this.getOptionsList()
}, },
...@@ -326,14 +306,14 @@ export default { ...@@ -326,14 +306,14 @@ export default {
}) })
AMap.plugin(['AMap.DistrictSearch'], () => { AMap.plugin(['AMap.DistrictSearch'], () => {
var opts = { var opts = {
subdistrict: 1, //返回下一级行政区 subdistrict: 1, // 返回下一级行政区
level: 'city', //查询的范围 level: 'city', // 查询的范围
showbiz: true //查询行政级别为 市 showbiz: true // 查询行政级别为 市
} }
var districtSearch = new AMap.DistrictSearch(opts) var districtSearch = new AMap.DistrictSearch(opts)
districtSearch.search('中国', (status, result) => { districtSearch.search('中国', (status, result) => {
this.baseData.provinceInfoList = result.districtList[0].districtList this.baseData.provinceInfoList = result.districtList[0].districtList
console.log(this.baseData.provinceInfoList); console.log(this.baseData.provinceInfoList)
this.getOptionsList() this.getOptionsList()
// com.getSelect({ // com.getSelect({
// id: 'startp', // id: 'startp',
...@@ -387,9 +367,9 @@ export default { ...@@ -387,9 +367,9 @@ export default {
}) })
}, },
// handleSearch() { handleSearch() {
// this.$refs.recordTable.refreshTable() this.$refs.recordTable.refreshTable()
// }, },
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
areaCode: '', areaCode: '',
...@@ -417,9 +397,9 @@ export default { ...@@ -417,9 +397,9 @@ export default {
this.actionSetDownloadList({ list, type: 'dowloadList' }) this.actionSetDownloadList({ list, type: 'dowloadList' })
}, },
handleImport() { // handleImport() {
this.fileVisible = true // this.fileVisible = true
}, // },
downLoadTemplate() { downLoadTemplate() {
merchantOutputValueTargetExport({ targetDate: this.nowMonth }).then((result) => { merchantOutputValueTargetExport({ targetDate: this.nowMonth }).then((result) => {
console.log(result, 'result') console.log(result, 'result')
...@@ -451,38 +431,25 @@ export default { ...@@ -451,38 +431,25 @@ export default {
this.$refs.fileRuleForm && this.$refs.fileRuleForm.resetFields() this.$refs.fileRuleForm && this.$refs.fileRuleForm.resetFields()
}, },
handleConfirmImport() { handleConfirmImport() {
const that = this
this.$refs.fileRuleForm.validate((valid) => { this.$refs.fileRuleForm.validate((valid) => {
if (valid) { if (valid) {
merchantOutputValueTargetImport({ file: this.fileInfo }).then((result) => { merchantOutputValueTargetImport({ file: this.fileInfo }).then((result) => {
console.log(result, 'result') console.log(result, 'result')
const { url, dataList } = result if (result) {
console.log(url, 'url') // debugger
if (url) { // 异步处理文件上传 把id传入处理轮询
this.$message.error('上传失败') const list = [...that.updateList, {
downLoadFile(url) name: that.fileForm.fileName,
} ifSuccess: false,
if (dataList) { uuid: result,
this.$message.success('上传成功') type: 'upload'
this.fileVisible = false // labelText: ''
this.hasPage = false }]
this.tableData = dataList.map((item) => { console.log(list, 'list')
item.dataMonth = this.search.targetDate that.actionSetDownloadList({ list, type: 'updateList' })
item.isEdit = true that.notice.okTips('上传成功')
item.areaSupervision = item.areaSupervision || {} that.handleImport()
item.residentManager = item.residentManager || {}
item.area = item.area || ''
if (item.residentManager) {
item.residentManagerOptionsList = [{
userId: item.residentManager.userId,
userName: item.residentManager.userName,
userNum: item.residentManager.userNum,
userType: item.residentManager.userType
}]
} else {
item.residentManagerOptionsList = []
}
return item
})
} }
}) })
} }
...@@ -515,14 +482,14 @@ export default { ...@@ -515,14 +482,14 @@ export default {
listYqRef({ merchantId: row.merchantId }).then((result) => { listYqRef({ merchantId: row.merchantId }).then((result) => {
this.close({ tagName: "/shopConfig" }) this.close({ tagName: "/shopConfig" })
this.$router.push({ this.$router.push({
name: 'personnelManagement', name: 'personnelManagementIndex',
params: { params: {
merchants: result merchants: result
} }
}) })
}) })
}, },
//店铺配置
handleShopSet(row) { handleShopSet(row) {
this.close({ tagName: "/shopConfig" }) this.close({ tagName: "/shopConfig" })
this.$router.push({ this.$router.push({
......
<!-- 人员管理 --> <!-- 人员管理 -->
<template> <template>
<div> <div>
<d2-container> <!-- <d2-container> -->
<div class="header" <div class="header"
slot="header" slot="header"
style="padding: 10px 20px;"> style="padding: 10px 20px;">
<d2-search ref="showSearch" <d2-search ref="showSearch"
class="show-search" class="show-search"
labelWidth="100px" labelWidth="100px"
:search-form="searchForm" :search-form="searchForm"
:form-data="showFormData"> :form-data="showFormData">
<!-- <div slot="departments"> <!-- <div slot="departments">
<el-select v-model="searchForm.department" <el-select v-model="searchForm.department"
filterable filterable
remote remote
...@@ -25,49 +25,49 @@ ...@@ -25,49 +25,49 @@
</el-option> </el-option>
</el-select> </el-select>
</div> --> </div> -->
<div slot="sourceMerchant"> <div slot="sourceMerchant">
<el-select v-model="searchForm.merchantId" <el-select v-model="searchForm.merchantId"
filterable filterable
remote remote
reserve-keyword reserve-keyword
placeholder="请输入关键字" placeholder="请输入关键字"
:remote-method="remoteMethod_merchant" :remote-method="remoteMethod_merchant"
:loading="loading"> :loading="loading">
<el-option v-for="(opt, optIndex) in baseData.merchantList" <el-option v-for="(opt, optIndex) in baseData.merchantList"
:key="optIndex" :key="optIndex"
:label="opt.merchantName + ' / ' + opt.merchantNo" :label="opt.merchantName + ' / ' + opt.merchantNo"
:value="opt.merchantNo"> :value="opt.merchantNo">
</el-option> </el-option>
</el-select> </el-select>
</div>
</d2-search>
<div class="up-btns">
<el-button :id="tableParams.btnId"
size="small"
type="primary">
查询
</el-button>
<el-button size="small"
@click="handleReset">
重置
</el-button>
</div> </div>
</d2-search>
<div class="up-btns">
<el-button :id="tableParams.btnId"
size="small"
type="primary">
查询
</el-button>
<el-button size="small"
@click="handleReset">
重置
</el-button>
</div> </div>
<div class="d2-container-content"> </div>
<d2-table-header> <div class="d2-container-content">
<auth-button category="Button" /> <d2-table-header>
</d2-table-header> <auth-button category="Button" />
<d2-table ref="recordTable" </d2-table-header>
:get-list-api="getListApi" <d2-table ref="recordTable"
:search-form="searchFormSearch" :get-list-api="getListApi"
:table-params="tableParams" :search-form="searchFormSearch"
:before-search-fn="beforeSearchFn"> :table-params="tableParams"
<auth-button slot="auth-button" :before-search-fn="beforeSearchFn">
slot-scope="scope" <auth-button slot="auth-button"
:data="scope.scope" /> slot-scope="scope"
</d2-table> :data="scope.scope" />
</div> </d2-table>
</d2-container> </div>
<!-- </d2-container> -->
</div> </div>
</template> </template>
...@@ -85,7 +85,7 @@ export default { ...@@ -85,7 +85,7 @@ export default {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
searchForm: { searchForm: {
merchantNoList: this.$route.params?.merchants, merchantNoList: merchantNoList,
status: 0, status: 0,
staffName: '', staffName: '',
staffPhone: '', staffPhone: '',
...@@ -209,7 +209,15 @@ export default { ...@@ -209,7 +209,15 @@ export default {
dowloadList: (state) => state.d2admin.user.dowloadList dowloadList: (state) => state.d2admin.user.dowloadList
}) })
}, },
props: {
merchantNoList: {
type: Array,
default: () => []
}
},
mounted() { mounted() {
console.log(this.merchantNoList);
this.getDepartment() this.getDepartment()
this.getBaseData() this.getBaseData()
}, },
......
<!-- 人员管理 -->
<template>
<d2-container class="personnelManagement">
<div class="header"
slot="header">
<el-tabs v-model="activeName">
<el-tab-pane label="员工列表"
name="person" />
<el-tab-pane label="商户管理员"
name="admini" />
</el-tabs>
</div>
<personnel-management v-show="activeName === 'person'"
:merchantNoList="merchantNoList" />
<!-- <service-online-list v-if="activeName === 'admini'" /> -->
</d2-container>
</template>
<script>
import personnelManagement from './personnelManagement'
// import offlineAccountList from './offlineAccountList'
export default {
name: 'PersonnelManagementIndex',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
activeName: 'person',
merchantNoList: this.$route.params?.merchants,
}
},
components: {
personnelManagement
},
mounted() {
console.log('merchantNoList', this.merchantNoList);
},
methods: {}
}
</script>
<style>
.personnelManagement .el-tabs__header {
margin: 0;
padding: 0 20px;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!