md
This commit is contained in:
parent
b4aefc6b71
commit
3881312311
339
src/views/oms/baseOperator/BindMonthPay.vue
Normal file
339
src/views/oms/baseOperator/BindMonthPay.vue
Normal file
@ -0,0 +1,339 @@
|
||||
<template>
|
||||
<XdPageContainer class="app-container">
|
||||
<XdTable
|
||||
slot="pageContent"
|
||||
slot-scope="slotProps"
|
||||
:height="(slotProps.contentHeight)+'px'"
|
||||
|
||||
border
|
||||
|
||||
v-loading="loading"
|
||||
size="small"
|
||||
storageName="privSalesmen_main"
|
||||
:data="dataList"
|
||||
:showSearch.sync="showSearch"
|
||||
:total="total"
|
||||
@queryTable="getList"
|
||||
:queryParams="queryParams"
|
||||
@selection-change="handleSelectionChange"
|
||||
@sort-change="handleSortChange"
|
||||
:showRightButton="true"
|
||||
:showOperateButton="true"
|
||||
:showCustomizeTpl="false"
|
||||
>
|
||||
<div slot="toolbar">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="handleNewBind"
|
||||
>绑定新月结账号</el-button>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleUnbind"
|
||||
>解除绑定</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" align="center" width="60">
|
||||
<template slot-scope="scope">
|
||||
<span v-text="getIndex(scope.$index)"> </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="月结账号" align="left" prop="custNo" width="100" />
|
||||
<el-table-column label="月结名称" align="left" prop="custName" min-width="100" :show-overflow-tooltip="true" />
|
||||
<!-- <el-table-column label="是否默认" align="center" prop="defaultFlag" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.defaultFlag"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
@change="handleDefaultFlagChange(scope.row)"
|
||||
></el-switch>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
|
||||
|
||||
</XdTable>
|
||||
|
||||
<el-dialog title="绑定月结账号" :visible.sync="openForm" width="40%">
|
||||
<el-form ref="form" :model="form" size="small" :rules="rules" label-width="100px" >
|
||||
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
|
||||
<el-col :span="16">
|
||||
<el-form-item label="月结卡号" prop="monthPayCode">
|
||||
<el-input
|
||||
auto-complete="new-password"
|
||||
v-model="form.monthPayCode"
|
||||
:placeholder="$t('月结卡号')"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-button
|
||||
style="margin-left: 10px;"
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon="el-icon-search"
|
||||
@click="handelApplyBind"
|
||||
>查询卡号</el-button>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div style="padding: 20px;color: red;font-weight: 600;background: #f8f8f8;border-radius: 10px;margin-bottom:20px">
|
||||
{{ verifyMessage }}
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="16" v-if="blInputVerifyCode">
|
||||
<el-form-item label="月结密码" prop="code">
|
||||
<el-input
|
||||
auto-complete="new-password"
|
||||
type="password"
|
||||
v-model="form.code"
|
||||
:placeholder="$t('输入月结密码')"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer" v-if="blInputVerifyCode" style="text-align: center;margin-bottom:20px">
|
||||
<el-button type="primary" size="mini" @click="submitBind">申请绑定</el-button>
|
||||
<el-button size="mini" @click="cancelForm">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</XdPageContainer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listSimpleEmisMonthpayAccount,verifyBindMonthPayCode,bindMonthPayCode } from "@/api/oms/emisMonthpayAccount";
|
||||
//import { getSalemanList,listBindSalesmen,queryNewSalesmen,bindSalesmen,deleteBindSalemen,setDefaultBindSalesmen } from "@/api/oms/emisStaff";
|
||||
export default {
|
||||
name: "BindMonthPay",
|
||||
components: {
|
||||
},
|
||||
dicts: [
|
||||
'sys_normal_disable',
|
||||
'emis_take_weight_method',
|
||||
'emis_biz_shipping_method',
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
tableHeight: 200,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
currentId:null,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 创建时间搜索
|
||||
dateTimeRange:[],
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 运输产品类型表格数据
|
||||
dataList: [],
|
||||
|
||||
currentEmpCode:null,
|
||||
|
||||
|
||||
selectList: [],
|
||||
countryName:null,
|
||||
|
||||
salesmanList:[],
|
||||
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
|
||||
openForm: false,
|
||||
titleForm: "",
|
||||
|
||||
blInputVerifyCode:false,
|
||||
verifyMessage:null,
|
||||
|
||||
titleEmisTransProduct: "",
|
||||
openEmisTransProduct: false,
|
||||
|
||||
// 显示编辑框更多
|
||||
moreInputVisible: false,
|
||||
|
||||
|
||||
// 弹出展示层
|
||||
id:null,
|
||||
titleView:"",
|
||||
openView: false,
|
||||
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
searchValue: null,
|
||||
},
|
||||
|
||||
querySearchParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
searchValue: null,
|
||||
},
|
||||
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "label"
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
handleSortChange(column) {
|
||||
this.queryParams.orderByColumn = column.prop;//查询字段是表格中字段名字
|
||||
this.queryParams.isAsc = column.order;//动态取值排序顺序
|
||||
this.getList();
|
||||
},
|
||||
reset(){
|
||||
this.form={
|
||||
monthPayCode:null,
|
||||
code:null
|
||||
}
|
||||
},
|
||||
/** 查询运输产品类型列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listSimpleEmisMonthpayAccount(this.queryParams).then(response => {
|
||||
this.dataList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
handelApplyBind(){
|
||||
if(this.form.monthPayCode==null){
|
||||
this.$modal.msgError("请输入月结账号");
|
||||
return;
|
||||
}
|
||||
|
||||
let that=this;
|
||||
|
||||
bindMonthPayCode({monthPayCode:this.form.monthPayCode}).then(response => {
|
||||
that.verifyMessage = response.msg+" | 月结公司:" + response.data;
|
||||
that.blInputVerifyCode=true;
|
||||
});
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.selectList=selection;
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
handleNewBind() {
|
||||
this.reset();
|
||||
this.blInputVerifyCode=false;
|
||||
this.openForm=true;
|
||||
},
|
||||
handleUnbind(row) {
|
||||
if(this.selectList&&this.selectList.length>0){
|
||||
this.selectList.forEach(item=>{
|
||||
deleteBindSalemen({empCode:item.empCode}).then(response => {
|
||||
this.handleQuery();
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
submitBind() {
|
||||
if(this.form.monthPayCode==null){
|
||||
this.$modal.msgError("请输入月结账号");
|
||||
return;
|
||||
}
|
||||
|
||||
verifyBindMonthPayCode({monthPayCode:this.form.monthPayCode,code:this.form.code}).then(response => {
|
||||
this.$modal.msgSuccess(response.msg);
|
||||
this.openForm=false;
|
||||
this.handleQuery();
|
||||
});
|
||||
},
|
||||
handleSetDefaultFlag(row){
|
||||
|
||||
},
|
||||
handleDefaultFlagChange(row){
|
||||
setDefaultBindSalesmen({empCode:row.empCode,defaultFlag:row.defaultFlag}).then(response => {
|
||||
this.$modal.msgSuccess(response.msg);
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
handleFormChanged(){
|
||||
this.openForm = false;
|
||||
this.getList();
|
||||
},
|
||||
cancelForm(){
|
||||
this.openForm = false;
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除').then(function() {
|
||||
return delEmisTransProduct(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
|
||||
/** 列索引函数 */
|
||||
getIndex($index) {
|
||||
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
|
||||
},
|
||||
/** 时间搜索响应函数 */
|
||||
dateTimeChange(value){
|
||||
this.dateTimeRange=value;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-divider{
|
||||
margin-top: 0px;
|
||||
background: 0 0;
|
||||
border-top: 1px solid #E6EBF5;
|
||||
}
|
||||
.el-divider__text {
|
||||
color: #0955ee;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
321
src/views/oms/baseOperator/PrivSalesmen.vue
Normal file
321
src/views/oms/baseOperator/PrivSalesmen.vue
Normal file
@ -0,0 +1,321 @@
|
||||
<template>
|
||||
<XdPageContainer class="app-container">
|
||||
<XdTable
|
||||
slot="pageContent"
|
||||
slot-scope="slotProps"
|
||||
:height="(slotProps.contentHeight)+'px'"
|
||||
|
||||
border
|
||||
|
||||
v-loading="loading"
|
||||
size="small"
|
||||
storageName="privSalesmen_main"
|
||||
:data="dataList"
|
||||
:showSearch.sync="showSearch"
|
||||
:total="total"
|
||||
@queryTable="getList"
|
||||
:queryParams="queryParams"
|
||||
@selection-change="handleSelectionChange"
|
||||
@sort-change="handleSortChange"
|
||||
:showRightButton="true"
|
||||
:showOperateButton="true"
|
||||
:showCustomizeTpl="false"
|
||||
>
|
||||
<div slot="toolbar">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="handleNewBind"
|
||||
>绑定专属业务员</el-button>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleUnbind"
|
||||
>解绑</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" align="center" width="60">
|
||||
<template slot-scope="scope">
|
||||
<span v-text="getIndex(scope.$index)"> </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工号" align="left" prop="empCode" width="100" />
|
||||
<el-table-column label="姓名" align="center" prop="empName" width="100" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="所属网点" align="center" prop="ownerSiteName" min-width="100" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="是否默认" align="center" prop="defaultFlag" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.defaultFlag"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
@change="handleDefaultFlagChange(scope.row)"
|
||||
></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
</XdTable>
|
||||
|
||||
<el-dialog title="绑定专属业务员" :visible.sync="openForm" width="40%">
|
||||
<el-form ref="form" :model="form" size="small" :rules="rules" label-width="100px" >
|
||||
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
|
||||
<el-col :span="16">
|
||||
<el-form-item label="搜索业务员" prop="searchValue">
|
||||
<el-input
|
||||
v-model="querySearchParams.searchValue"
|
||||
:placeholder="$t('搜索取件业务员工号和手机号')"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-button
|
||||
style="margin-left: 10px;"
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon="el-icon-search"
|
||||
@click="handelQuerySalesmen"
|
||||
|
||||
>查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
style="width: 100%;"
|
||||
:data="salesmanList"
|
||||
>
|
||||
<el-table-column label="工号" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-radio :label="scope.row.empCode" v-model="currentEmpCode"><span>{{ scope.row.empCode }}</span></el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="工号" align="left" prop="empCode" min-width="100" /> -->
|
||||
<el-table-column label="姓名" align="center" prop="empName" min-width="100" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="所属网点" align="center" prop="ownerSiteName" min-width="100" :show-overflow-tooltip="true" />
|
||||
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer" style="text-align: center;margin-bottom:20px">
|
||||
<el-button type="primary" size="mini" @click="submitBind">确认绑定</el-button>
|
||||
<el-button size="mini" @click="cancelForm">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</XdPageContainer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getSalemanList,listBindSalesmen,queryNewSalesmen,bindSalesmen,deleteBindSalemen,setDefaultBindSalesmen } from "@/api/oms/emisStaff";
|
||||
export default {
|
||||
name: "PrivSalesmen",
|
||||
components: {
|
||||
},
|
||||
dicts: [
|
||||
'sys_normal_disable',
|
||||
'emis_take_weight_method',
|
||||
'emis_biz_shipping_method',
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
tableHeight: 200,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
currentId:null,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 创建时间搜索
|
||||
dateTimeRange:[],
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 运输产品类型表格数据
|
||||
dataList: [],
|
||||
|
||||
currentEmpCode:null,
|
||||
|
||||
|
||||
selectList: [],
|
||||
countryName:null,
|
||||
|
||||
salesmanList:[],
|
||||
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
|
||||
openForm: false,
|
||||
titleForm: "",
|
||||
|
||||
titleEmisTransProduct: "",
|
||||
openEmisTransProduct: false,
|
||||
|
||||
// 显示编辑框更多
|
||||
moreInputVisible: false,
|
||||
|
||||
// 弹出展示层
|
||||
id:null,
|
||||
titleView:"",
|
||||
openView: false,
|
||||
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
searchValue: null,
|
||||
},
|
||||
|
||||
querySearchParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
searchValue: null,
|
||||
},
|
||||
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "label"
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
handleSortChange(column) {
|
||||
this.queryParams.orderByColumn = column.prop;//查询字段是表格中字段名字
|
||||
this.queryParams.isAsc = column.order;//动态取值排序顺序
|
||||
this.getList();
|
||||
},
|
||||
/** 查询运输产品类型列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listBindSalesmen(this.queryParams).then(response => {
|
||||
this.dataList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
handelQuerySalesmen(){
|
||||
let qParams = {searchValue:this.querySearchParams.searchValue}
|
||||
queryNewSalesmen(qParams).then(response => {
|
||||
this.salesmanList = response.data;
|
||||
});
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.selectList=selection;
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
handleNewBind() {
|
||||
|
||||
this.currentEmpCode=null;
|
||||
this.openForm=true;
|
||||
},
|
||||
handleUnbind(row) {
|
||||
if(this.selectList&&this.selectList.length>0){
|
||||
this.selectList.forEach(item=>{
|
||||
deleteBindSalemen({empCode:item.empCode}).then(response => {
|
||||
this.handleQuery();
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
submitBind() {
|
||||
if(this.currentEmpCode==null){
|
||||
this.$modal.msgError("请先选择业务员");
|
||||
return;
|
||||
}
|
||||
bindSalesmen({empCode:this.currentEmpCode}).then(response => {
|
||||
this.$modal.msgSuccess(response.msg);
|
||||
this.openForm=false;
|
||||
this.handleQuery();
|
||||
});
|
||||
},
|
||||
handleSetDefaultFlag(row){
|
||||
|
||||
},
|
||||
handleDefaultFlagChange(row){
|
||||
setDefaultBindSalesmen({empCode:row.empCode,defaultFlag:row.defaultFlag}).then(response => {
|
||||
this.$modal.msgSuccess(response.msg);
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
handleFormChanged(){
|
||||
this.openForm = false;
|
||||
this.getList();
|
||||
},
|
||||
cancelForm(){
|
||||
this.openForm = false;
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除').then(function() {
|
||||
return delEmisTransProduct(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
|
||||
/** 列索引函数 */
|
||||
getIndex($index) {
|
||||
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
|
||||
},
|
||||
/** 时间搜索响应函数 */
|
||||
dateTimeChange(value){
|
||||
this.dateTimeRange=value;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-divider{
|
||||
margin-top: 0px;
|
||||
background: 0 0;
|
||||
border-top: 1px solid #E6EBF5;
|
||||
}
|
||||
.el-divider__text {
|
||||
color: #0955ee;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user