Commit da7567be by 前端

上传部分功能代码

1 parent cc201344
......@@ -26,6 +26,18 @@ export function listByMerchantIdAndYear(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) {
data.method = `merchants.api.staff.findStaffByPage`
......@@ -33,7 +45,13 @@ export function findStaffByPage(data) {
}
// 根据商户名称和渠道类型查询商户列表
export function findMerchantList(data) {
data.method = `merchants.api.open.findMerchantList`
export function findMerchantListByPage(data) {
data.method = `merchants.api.open.findMerchantListByPage`
return request(data)
}
// 查询字典数据列表
export function findDictData(data) {
data.method = `merchants.api.menu.findDictData`
return request(data)
}
......@@ -109,7 +109,7 @@ export const rangePickerOptions_year = {
// console.log(date.getFullYear())
// console.log(new Date())
if (date.getFullYear() >= new Date().getFullYear()) {
if (date.getFullYear() > new Date().getFullYear()) {
return true
}
return false
......
......@@ -121,7 +121,7 @@ import { Util, deepClone } from '@/common/util'
import { mapActions, mapState } from 'vuex'
import dayjs from 'dayjs'
import { downLoadFile } from '@/common/util'
import { shopSettingList } from '@/api/shopConfig.js'
import { shopSettingList, listYqRef } from '@/api/shopConfig.js'
import { merchantOutputValueTargetExport } from '@api/index'
import { businessNature, storeType } from '@/common/constants.js'
import qrcodeDialog from './components/qRcodeDialog'
......@@ -512,12 +512,14 @@ export default {
// 人员管理
handlePersonnelManage(row) {
this.close({ tagName: "/shopConfig" })
this.$router.push({
name: 'personnelManagement',
params: {
info: row
}
listYqRef({ merchantId: row.merchantId }).then((result) => {
this.close({ tagName: "/shopConfig" })
this.$router.push({
name: 'personnelManagement',
params: {
merchants: result
}
})
})
},
......
......@@ -9,7 +9,38 @@
class="show-search"
labelWidth="100px"
: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">
<el-button :id="tableParams.btnId"
size="small"
......@@ -43,7 +74,7 @@
<script>
import { Util, deepClone } from '@/common/util'
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'
export default {
name: 'PersonnelManagement',
......@@ -54,68 +85,65 @@ export default {
return {
userInfo: this.$store.state.d2admin.user.info,
searchForm: {
merchantName: '',
partnerMerchantName: '',
merchantNoList: this.$route.params?.merchants,
status: 0,
staffName: '',
staffPhone: '',
merchantId: '',
sence: '',
businessType: '',
reviewStatus: ''
roleName: '',
department: '',
staffLabel: ''
},
searchFormSearch: {},
showFormData: [{
label: '联系人/员工',
name: 'merchantName',
label: '员工',
name: 'staffName',
type: 'input',
maxlength: '20',
isClear: true
},
{
label: '手机号',
name: 'partnerMerchantName',
name: 'staffPhone',
type: 'input',
inputType: "number",
maxlength: '11',
isClear: true
}, {
label: '场景标签',
name: 'sence',
label: '角色',
name: 'roleName',
type: 'input',
maxlength: '20',
isClear: true
}, {
label: '部门',
name: 'department',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'sceneForShop'
},
{
optionId: 'dictValue',
optionLabel: 'dictLabel',
optionsName: 'departments'
}, {
label: '来源商户',
name: 'merchantId',
addHtml: 'sourceMerchant'
}, {
label: '场景标签',
name: 'staffLabel',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'sceneForShop'
},
{
label: '商户号',
name: 'partnerMerchantName',
type: 'input',
inputType: "number",
maxlength: '9',
isClear: true
}, {
label: '类型',
name: 'businessType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'staffBusinessType'
}, {
label: '角色',
name: 'reviewStatus',
type: 'input',
maxlength: '20',
isClear: true
}],
// {
// label: '商户号',
// name: 'partnerMerchantName',
// type: 'input',
// inputType: "number",
// maxlength: '9',
// isClear: true
// },
],
getListApi: findStaffByPage,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
......@@ -123,19 +151,19 @@ export default {
tableOption: true,
tableColumns: [{
label: '员工',
prop: 'merchantName',
prop: 'staffName',
width: '200px'
}, {
label: '手机号',
prop: 'phone',
prop: 'staffPhone',
width: '120px'
}, {
label: '角色',
prop: 'contactName',
prop: 'roleName',
width: '150px'
}, {
label: '部门',
prop: 'contactName',
prop: 'departmentName',
width: '150px'
},
// {
......@@ -151,28 +179,29 @@ export default {
// },
{
label: '来源商户',
prop: 'yqMerchantName',
prop: 'merchantName',
width: '150px'
}, {
label: '业务场景标签',
prop: 'partnerMerchantName',
prop: 'staffLabel',
width: '150px'
}, {
label: '更新时间',
prop: 'createdDate',
prop: 'updatedTime',
width: '150px',
formatter: (cellValue) => {
return cellValue.createdDate ? Util.dateFormate(cellValue.createdDate, 'YYYY-MM-DD HH:mm:ss') : ''
}
// formatter: (cellValue) => {
// return cellValue.createdDate ? Util.dateFormate(cellValue.createdDate, 'YYYY-MM-DD HH:mm:ss') : ''
// }
}
]
},
baseData: {
sceneForShop: sceneForShop,
sceneForShop: deepClone(sceneForShop),
// staffBusinessType: staffBusinessType,
merchantList: []
merchantList: [],
departments: []
},
loading: false,
}
},
computed: {
......@@ -181,7 +210,7 @@ export default {
})
},
mounted() {
this.findMerchantList()
this.getDepartment()
this.getBaseData()
},
......@@ -221,13 +250,42 @@ export default {
}
})
},
//来源商户
findMerchantList() {
findMerchantList({
channelType: 1
}).then(res => {
this.merchantList = res || []
remoteMethod_merchant(queryString) {
if (queryString) {
this.loading = true
setTimeout(() => {
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 {
},
handleReset() {
this.searchForm = {
merchantName: '',
partnerMerchantName: '',
reviewStatus: ''
staffName: '',
staffPhone: '',
merchantId: '',
roleName: '',
department: '',
staffLabel: ''
}
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!