Commit da7567be by 前端

上传部分功能代码

1 parent cc201344
...@@ -26,6 +26,18 @@ export function listByMerchantIdAndYear(data) { ...@@ -26,6 +26,18 @@ export function listByMerchantIdAndYear(data) {
return request(data) return request(data)
} }
// 查询4s店关联各场景园区店
export function listYqRef(data) {
data.method = `${path}scenemerchantref.listYqRef`
return request(data)
}
// 查询4s店关联各场景园区店账户中心配置
export function listYqRefConfig(data) {
data.method = `${path}scenemerchantref.listYqRefConfig`
return request(data)
}
// 查询员工分页列表 // 查询员工分页列表
export function findStaffByPage(data) { export function findStaffByPage(data) {
data.method = `merchants.api.staff.findStaffByPage` data.method = `merchants.api.staff.findStaffByPage`
...@@ -33,7 +45,13 @@ export function findStaffByPage(data) { ...@@ -33,7 +45,13 @@ export function findStaffByPage(data) {
} }
// 根据商户名称和渠道类型查询商户列表 // 根据商户名称和渠道类型查询商户列表
export function findMerchantList(data) { export function findMerchantListByPage(data) {
data.method = `merchants.api.open.findMerchantList` data.method = `merchants.api.open.findMerchantListByPage`
return request(data)
}
// 查询字典数据列表
export function findDictData(data) {
data.method = `merchants.api.menu.findDictData`
return request(data) return request(data)
} }
...@@ -109,7 +109,7 @@ export const rangePickerOptions_year = { ...@@ -109,7 +109,7 @@ export const rangePickerOptions_year = {
// console.log(date.getFullYear()) // console.log(date.getFullYear())
// console.log(new Date()) // console.log(new Date())
if (date.getFullYear() >= new Date().getFullYear()) { if (date.getFullYear() > new Date().getFullYear()) {
return true return true
} }
return false return false
......
...@@ -121,7 +121,7 @@ import { Util, deepClone } from '@/common/util' ...@@ -121,7 +121,7 @@ import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex' import { mapActions, mapState } from 'vuex'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { downLoadFile } from '@/common/util' import { downLoadFile } from '@/common/util'
import { shopSettingList } from '@/api/shopConfig.js' import { shopSettingList, listYqRef } from '@/api/shopConfig.js'
import { merchantOutputValueTargetExport } from '@api/index' import { merchantOutputValueTargetExport } 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'
...@@ -512,13 +512,15 @@ export default { ...@@ -512,13 +512,15 @@ export default {
// 人员管理 // 人员管理
handlePersonnelManage(row) { handlePersonnelManage(row) {
listYqRef({ merchantId: row.merchantId }).then((result) => {
this.close({ tagName: "/shopConfig" }) this.close({ tagName: "/shopConfig" })
this.$router.push({ this.$router.push({
name: 'personnelManagement', name: 'personnelManagement',
params: { params: {
info: row merchants: result
} }
}) })
})
}, },
handleShopSet(row) { handleShopSet(row) {
......
...@@ -9,7 +9,38 @@ ...@@ -9,7 +9,38 @@
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">
<el-select v-model="searchForm.department"
filterable
remote
reserve-keyword
placeholder="请输入关键字"
:remote-method="remoteMethod_department"
:loading="loading">
<el-option v-for="(opt, optIndex) in baseData.departments"
:key="optIndex"
:label="opt.merchantName+'/'+opt.merchantNo"
:value="opt.merchantNo">
</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"> <div class="up-btns">
<el-button :id="tableParams.btnId" <el-button :id="tableParams.btnId"
size="small" size="small"
...@@ -43,7 +74,7 @@ ...@@ -43,7 +74,7 @@
<script> <script>
import { Util, deepClone } from '@/common/util' import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex' import { mapActions, mapState } from 'vuex'
import { findStaffByPage, findMerchantList } from '@/api/shopConfig.js' import { findStaffByPage, findMerchantListByPage, findDictData } from '@/api/shopConfig.js'
import { sceneForShop, staffBusinessType } from '@/common/constants.js' import { sceneForShop, staffBusinessType } from '@/common/constants.js'
export default { export default {
name: 'PersonnelManagement', name: 'PersonnelManagement',
...@@ -54,68 +85,65 @@ export default { ...@@ -54,68 +85,65 @@ export default {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
searchForm: { searchForm: {
merchantName: '', merchantNoList: this.$route.params?.merchants,
partnerMerchantName: '', status: 0,
staffName: '',
staffPhone: '',
merchantId: '', merchantId: '',
sence: '', roleName: '',
businessType: '', department: '',
reviewStatus: '' staffLabel: ''
}, },
searchFormSearch: {}, searchFormSearch: {},
showFormData: [{ showFormData: [{
label: '联系人/员工', label: '员工',
name: 'merchantName', name: 'staffName',
type: 'input', type: 'input',
maxlength: '20', maxlength: '20',
isClear: true isClear: true
}, },
{ {
label: '手机号', label: '手机号',
name: 'partnerMerchantName', name: 'staffPhone',
type: 'input', type: 'input',
inputType: "number", inputType: "number",
maxlength: '11', maxlength: '11',
isClear: true isClear: true
}, { }, {
label: '场景标签', label: '角色',
name: 'sence', name: 'roleName',
type: 'input',
maxlength: '20',
isClear: true
}, {
label: '部门',
name: 'department',
type: 'select', type: 'select',
optionList: [], optionList: [],
optionId: 'confId', optionId: 'dictValue',
optionLabel: 'confValue', optionLabel: 'dictLabel',
optionsName: 'sceneForShop' optionsName: 'departments'
}, }, {
{
label: '来源商户', label: '来源商户',
name: 'merchantId', addHtml: 'sourceMerchant'
}, {
label: '场景标签',
name: 'staffLabel',
type: 'select', type: 'select',
optionList: [], optionList: [],
optionId: 'confId', optionId: 'confId',
optionLabel: 'confValue', optionLabel: 'confValue',
optionsName: 'sceneForShop' optionsName: 'sceneForShop'
}, },
{ // {
label: '商户号', // label: '商户号',
name: 'partnerMerchantName', // name: 'partnerMerchantName',
type: 'input', // type: 'input',
inputType: "number", // inputType: "number",
maxlength: '9', // maxlength: '9',
isClear: true // isClear: true
}, { // },
label: '类型', ],
name: 'businessType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'staffBusinessType'
}, {
label: '角色',
name: 'reviewStatus',
type: 'input',
maxlength: '20',
isClear: true
}],
getListApi: findStaffByPage, getListApi: findStaffByPage,
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
...@@ -123,19 +151,19 @@ export default { ...@@ -123,19 +151,19 @@ export default {
tableOption: true, tableOption: true,
tableColumns: [{ tableColumns: [{
label: '员工', label: '员工',
prop: 'merchantName', prop: 'staffName',
width: '200px' width: '200px'
}, { }, {
label: '手机号', label: '手机号',
prop: 'phone', prop: 'staffPhone',
width: '120px' width: '120px'
}, { }, {
label: '角色', label: '角色',
prop: 'contactName', prop: 'roleName',
width: '150px' width: '150px'
}, { }, {
label: '部门', label: '部门',
prop: 'contactName', prop: 'departmentName',
width: '150px' width: '150px'
}, },
// { // {
...@@ -151,28 +179,29 @@ export default { ...@@ -151,28 +179,29 @@ export default {
// }, // },
{ {
label: '来源商户', label: '来源商户',
prop: 'yqMerchantName', prop: 'merchantName',
width: '150px' width: '150px'
}, { }, {
label: '业务场景标签', label: '业务场景标签',
prop: 'partnerMerchantName', prop: 'staffLabel',
width: '150px' width: '150px'
}, { }, {
label: '更新时间', label: '更新时间',
prop: 'createdDate', prop: 'updatedTime',
width: '150px', width: '150px',
formatter: (cellValue) => { // formatter: (cellValue) => {
return cellValue.createdDate ? Util.dateFormate(cellValue.createdDate, 'YYYY-MM-DD HH:mm:ss') : '' // return cellValue.createdDate ? Util.dateFormate(cellValue.createdDate, 'YYYY-MM-DD HH:mm:ss') : ''
} // }
} }
] ]
}, },
baseData: { baseData: {
sceneForShop: sceneForShop, sceneForShop: deepClone(sceneForShop),
// staffBusinessType: staffBusinessType, // staffBusinessType: staffBusinessType,
merchantList: [] merchantList: [],
departments: []
}, },
loading: false,
} }
}, },
computed: { computed: {
...@@ -181,7 +210,7 @@ export default { ...@@ -181,7 +210,7 @@ export default {
}) })
}, },
mounted() { mounted() {
this.findMerchantList() this.getDepartment()
this.getBaseData() this.getBaseData()
}, },
...@@ -221,13 +250,42 @@ export default { ...@@ -221,13 +250,42 @@ export default {
} }
}) })
}, },
//来源商户 //来源商户
findMerchantList() { remoteMethod_merchant(queryString) {
findMerchantList({ if (queryString) {
channelType: 1 this.loading = true
}).then(res => { setTimeout(() => {
this.merchantList = res || [] this.loading = false
let _params = { channelType: 1, pageNum: 1, pageSize: 100, merchantNoOrName: queryString }
findMerchantListByPage(_params).then(res => {
this.baseData.merchantList = res.data || []
console.log(this.baseData.merchantList);
})
}, 200)
} else {
this.baseData.merchantList = []
}
},
//部门
// remoteMethod_department(queryString) {
// if (queryString) {
// this.loading = true
// setTimeout(() => {
// this.loading = false
// let _params = { dictType: 'staff_department', pageNum: 1, pageSize: 100, dictName: queryString }
// findDictData(_params).then(res => {
// this.baseData.departments = res.data || []
// })
// }, 200)
// } else {
// this.baseData.departments = []
// }
// },
getDepartment() {
let _params = { dictType: 'staff_department', pageNum: 1, pageSize: 100 }
findDictData(_params).then(res => {
this.baseData.departments = res.data || []
this.getOptionsList()
}) })
}, },
...@@ -236,9 +294,12 @@ export default { ...@@ -236,9 +294,12 @@ export default {
}, },
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
merchantName: '', staffName: '',
partnerMerchantName: '', staffPhone: '',
reviewStatus: '' merchantId: '',
roleName: '',
department: '',
staffLabel: ''
} }
this.$refs.recordTable.refreshTable() this.$refs.recordTable.refreshTable()
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!