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