548 lines
18 KiB
Vue
548 lines
18 KiB
Vue
<template>
|
|
<XdPageContainer class="app-container">
|
|
<SearchForm slot="pageHeader" :model="queryParams" ref="queryForm" size="mini" :maxShow="30" label-width="68px" v-show="showSearch" @search="handleQuery" @reset="resetQuery">
|
|
<el-form-item label="月份" prop="billMonth">
|
|
<el-date-picker size="mini" style="width:100%" v-model="queryParams.billMonth" type="month" placeholder="月份" value-format="yyyy-MM"></el-date-picker>
|
|
</el-form-item>
|
|
<el-form-item label="提成员工" prop="empName">
|
|
<EmpNamePicker :placeholder="$t('提成员工')" v-model="queryParams.empName" ></EmpNamePicker>
|
|
</el-form-item>
|
|
</SearchForm>
|
|
|
|
<XdTable
|
|
|
|
slot="pageContent"
|
|
slot-scope="slotProps"
|
|
:height="(slotProps.contentHeight)+'px'"
|
|
|
|
v-loading="loading"
|
|
border stripe
|
|
size="mini"
|
|
:data="emisCommissionProfitList"
|
|
|
|
ref="refTable"
|
|
storageName="emisCommissionProfitList_main_2"
|
|
|
|
|
|
:showSearch.sync="showSearch"
|
|
:queryParams="queryParams"
|
|
:total="total"
|
|
@queryTable="getList"
|
|
@selection-change="handleSelectionChange"
|
|
@sort-change="handleSortChange"
|
|
>
|
|
|
|
<div slot="toolbar">
|
|
<el-row :gutter="10" class="mb8">
|
|
<!-- <el-col :span="1.5">
|
|
<el-button
|
|
type="primary"
|
|
plain
|
|
icon="el-icon-plus"
|
|
size="mini"
|
|
@click="handleAdd"
|
|
v-hasPermi="['emis:emisCommissionProfit:add']"
|
|
>新增</el-button>
|
|
</el-col> -->
|
|
<!--
|
|
<el-col :span="1.5">
|
|
<el-button
|
|
type="success"
|
|
plain
|
|
icon="el-icon-edit"
|
|
size="mini"
|
|
:disabled="single"
|
|
@click="handleUpdate"
|
|
v-hasPermi="['emis:emisCommissionProfit:edit']"
|
|
>修改</el-button>
|
|
</el-col> -->
|
|
<!-- <el-col :span="1.5">
|
|
<el-button
|
|
type="danger"
|
|
plain
|
|
icon="el-icon-delete"
|
|
size="mini"
|
|
:disabled="multiple"
|
|
@click="handleDelete"
|
|
v-hasPermi="['emis:emisCommissionProfit:remove']"
|
|
>删除</el-button>
|
|
</el-col> -->
|
|
<el-col :span="1.5">
|
|
<el-button
|
|
type="warning"
|
|
plain
|
|
icon="el-icon-download"
|
|
size="mini"
|
|
@click="handleExport"
|
|
v-hasPermi="['emis:emisCommissionProfit:export']"
|
|
>导出</el-button>
|
|
</el-col>
|
|
</el-row>
|
|
</div>
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
<!-- <el-table-column :label="$t('提成编号')" align="center" prop="profitNo" min-width="100" /> -->
|
|
<!-- <el-table-column :label="$t('提成名称')" align="center" prop="profitName" min-width="100" /> -->
|
|
|
|
<el-table-column :label="$t('员工名称')" align="center" prop="empName" width="100" />
|
|
<el-table-column :label="$t('月份')" align="center" prop="billMonth" width="100" />
|
|
<el-table-column :label="$t('现金提成')" align="center" prop="money" width="100" >
|
|
<template slot-scope="scope">
|
|
<div class="link-type" @click="handleShowDtlList(scope.row,'1,3,6')">{{ scope.row.money }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column :label="$t('月结提成')" align="center" prop="monthMoney" width="100" >
|
|
<template slot-scope="scope">
|
|
<div class="link-type" @click="handleShowDtlList(scope.row,'2,4,5')">{{ scope.row.monthMoney }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column :label="$t('创建时间')" align="center" prop="createTime" width="170" />
|
|
<el-table-column :label="$t('更新时间')" align="center" prop="updateTime" width="170" />
|
|
|
|
<!-- <el-table-column :label="$t('结算开始时间')" align="center" prop="startDate" min-width="100" /> -->
|
|
<!-- <el-table-column :label="$t('结算结束时间')" align="center" prop="endDate" min-width="100" /> -->
|
|
<!-- <el-table-column :label="$t('员工编号')" align="center" prop="empCode" min-width="100" /> -->
|
|
<!-- <el-table-column :label="$t('是否已提')" align="center" prop="blHasProfit" min-width="100" /> -->
|
|
<!-- <el-table-column :label="$t('审核状态')" align="center" prop="blAudit" min-width="100" />
|
|
<el-table-column :label="$t('财务确认日期')" align="center" prop="auditDate" min-width="100" />
|
|
<el-table-column :label="$t('财务确认备注')" align="center" prop="auditNote" min-width="100" />
|
|
<el-table-column :label="$t('财务确认人')" align="center" prop="auditManCode" min-width="100" /> -->
|
|
<!-- <el-table-column :label="$t('总票数')" align="center" prop="sendPieceSum" min-width="100" /> -->
|
|
<!-- <el-table-column :label="$t('总件数')" align="center" prop="pieceNumber" min-width="100" /> -->
|
|
<!-- <el-table-column :label="$t('总重量')" align="center" prop="feeWeight" min-width="100" /> -->
|
|
<!-- <el-table-column :label="$t('销售回款人')" align="center" prop="payee" min-width="100" /> -->
|
|
<!-- <el-table-column :label="$t('销售联系人')" align="center" prop="salesmen" min-width="100" /> -->
|
|
<!-- <el-table-column :label="$t('财务确认状态')" align="center" prop="blConfirmCenter" min-width="100" />
|
|
<el-table-column :label="$t('财务确认日期')" align="center" prop="confirmCenterDate" min-width="100" />
|
|
<el-table-column :label="$t('财务确认备注')" align="center" prop="confirmCenterNote" min-width="100" />
|
|
<el-table-column :label="$t('财务确认人')" align="center" prop="confirmCenterManCode" min-width="100" />
|
|
<el-table-column :label="$t('财务确认站点')" align="center" prop="confirmCenterCode" min-width="100" />
|
|
<el-table-column :label="$t('站点确认状态')" align="center" prop="blConfirmSite" min-width="100" />
|
|
<el-table-column :label="$t('站点确认日期')" align="center" prop="confirmSiteDate" min-width="100" />
|
|
<el-table-column :label="$t('站点确认人')" align="center" prop="confirmSiteManCode" min-width="100" />
|
|
<el-table-column :label="$t('网点确认备注')" align="center" prop="confirmSiteNote" min-width="100" />
|
|
<el-table-column :label="$t('确认网点代码')" align="center" prop="confirmSiteCode" min-width="100" />
|
|
<el-table-column :label="$t('备注')" align="center" prop="remark" min-width="100" /> -->
|
|
|
|
</XdTable>
|
|
|
|
<el-dialog :title="titleForm" :visible.sync="openForm" width="50%" :destroy-on-close="true" v-dialogDrag append-to-body>
|
|
<emisCommissionProfitForm :id="currentId" @on-changed="handleFormChanged" @on-cancel="cancelForm"></EmisCommissionProfitForm>
|
|
</el-dialog>
|
|
|
|
|
|
<!--
|
|
<el-dialog :title="titleView" :visible.sync="openView" width="60%" :close-on-click-modal="false" v-dialogDrag append-to-body>
|
|
<emisCommissionProfitView :id="id" ></EmisCommissionProfitView>
|
|
</el-dialog>
|
|
-->
|
|
|
|
</XdPageContainer>
|
|
</template>
|
|
|
|
<script>
|
|
import { listEmisCommissionProfit, getEmisCommissionProfit, delEmisCommissionProfit, addEmisCommissionProfit, updateEmisCommissionProfit } from "@/api/emis/emisCommissionProfit";
|
|
import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
|
|
// import emisCommissionProfitView from '@/views/emis/emisCommissionProfit/emisCommissionProfitView';
|
|
import emisCommissionProfitForm from '@/views/emis/emisCommissionProfit/emisCommissionProfitForm';
|
|
import EmpNamePicker from '@/views/emis/EmisBaseTools/EmpNamePicker.vue';
|
|
|
|
|
|
export default {
|
|
name: "EmisCommissionProfit",
|
|
components: { elDateSimplePicker,emisCommissionProfitForm,EmpNamePicker },
|
|
dicts: [
|
|
],
|
|
data() {
|
|
return {
|
|
// 遮罩层
|
|
loading: true,
|
|
// 选中数组
|
|
ids: [],
|
|
// 非单个禁用
|
|
single: true,
|
|
// 非多个禁用
|
|
multiple: true,
|
|
// 显示搜索条件
|
|
showSearch: true,
|
|
// 创建时间搜索
|
|
dateTimeRange:[],
|
|
// 总条数
|
|
total: 0,
|
|
// 员工提成表表格数据
|
|
emisCommissionProfitList: [],
|
|
selectBillList:[],
|
|
|
|
currentId:null,
|
|
openForm: false,
|
|
titleForm: "",
|
|
|
|
// 弹出展示层
|
|
id:null,
|
|
titleView:"",
|
|
openView: false,
|
|
// 查询参数
|
|
queryParams: {
|
|
pageNum: 1,
|
|
pageSize: 20,
|
|
profitNo: null,
|
|
profitName: null,
|
|
settleType: null,
|
|
billMonth: null,
|
|
startDate: null,
|
|
endDate: null,
|
|
money: null,
|
|
empCode: null,
|
|
empName: null,
|
|
blHasProfit: null,
|
|
blAudit: null,
|
|
auditDate: null,
|
|
auditNote: null,
|
|
auditManCode: null,
|
|
sendPieceSum: null,
|
|
pieceNumber: null,
|
|
feeWeight: null,
|
|
payee: null,
|
|
salesmen: null,
|
|
blConfirmCenter: null,
|
|
confirmCenterDate: null,
|
|
confirmCenterNote: null,
|
|
confirmCenterManCode: null,
|
|
confirmCenterCode: null,
|
|
blConfirmSite: null,
|
|
confirmSiteDate: null,
|
|
confirmSiteManCode: null,
|
|
confirmSiteNote: null,
|
|
confirmSiteCode: null,
|
|
remark: null,
|
|
delFlag: null,
|
|
},
|
|
};
|
|
},
|
|
|
|
created() {
|
|
this.getList();
|
|
},
|
|
methods: {
|
|
|
|
initQueryParams(){
|
|
// this.queryParams=this.addDateRange(this.queryParams, this.dateTimeRange,"sendDate")
|
|
return this.queryParams;
|
|
},
|
|
|
|
/** 查询员工提成表列表 */
|
|
getList() {
|
|
this.loading = true;
|
|
listEmisCommissionProfit(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => {
|
|
this.emisCommissionProfitList = response.rows;
|
|
this.total = response.total;
|
|
this.loading = false;
|
|
});
|
|
},
|
|
|
|
handleShowDtlList(row,paymentType){
|
|
let item0=row;
|
|
this.$router.push(
|
|
{
|
|
path: '/Commission/EmisCommissionDtl',
|
|
query: {
|
|
action: "queryProfitDtl",
|
|
empName: item0.empName,
|
|
billMonth: item0.billMonth,
|
|
paymentType:paymentType,
|
|
'_t':(new Date()).getTime()
|
|
}
|
|
}
|
|
);
|
|
},
|
|
|
|
/** 搜索按钮操作 */
|
|
handleQuery() {
|
|
this.queryParams.pageNum = 1;
|
|
this.getList();
|
|
},
|
|
/** 重置按钮操作 */
|
|
resetQuery() {
|
|
this.resetForm("queryForm");
|
|
this.handleQuery();
|
|
},
|
|
// 多选框选中数据
|
|
handleSelectionChange(selection) {
|
|
this.ids = selection.map(item => item.id)
|
|
this.selectBillList=selection;
|
|
this.single = selection.length!==1
|
|
this.multiple = !selection.length
|
|
},
|
|
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
|
handleSortChange(column) {
|
|
this.queryParams.orderByColumn = column.prop;
|
|
this.queryParams.isAsc = column.order;
|
|
this.getList();
|
|
},
|
|
/** 新增按钮操作 */
|
|
handleAdd(row) {
|
|
this.currentId=null;
|
|
this.openForm= true;
|
|
this.titleForm = "新增";
|
|
},
|
|
handleShowMoreInput(){
|
|
this.moreInputVisible = !this.moreInputVisible;
|
|
},
|
|
/** 修改按钮操作 */
|
|
handleUpdate(row) {
|
|
this.currentId= row.id;
|
|
this.openForm = true;
|
|
this.titleForm = "修改";
|
|
},
|
|
handleView(row) {
|
|
this.id=row.id;
|
|
this.titleView="查看";
|
|
this.openView=true;
|
|
// this.router.push({ path: '/emis/emisCommissionProfit/viewDetail', query: { id: row.id }})
|
|
},
|
|
handleFormChanged(){
|
|
this.openForm = false;
|
|
this.getList();
|
|
},
|
|
cancelForm(){
|
|
this.openForm = false;
|
|
},
|
|
/** 删除按钮操作 */
|
|
handleDelete(row) {
|
|
const ids = row.id || this.ids;
|
|
this.$modal.confirm('是否确认删除').then(function() {
|
|
return delEmisCommissionProfit(ids);
|
|
}).then(() => {
|
|
this.getList();
|
|
this.$modal.msgSuccess("删除成功");
|
|
}).catch(() => {});
|
|
},
|
|
|
|
/** 导出按钮操作 */
|
|
handleExport() {
|
|
const loadingInstance = this.$loading({
|
|
text: '正在导出...'
|
|
})
|
|
|
|
if(this.selectBillList&&this.selectBillList.length>0){
|
|
this.exportData(this.selectBillList,loadingInstance);
|
|
}
|
|
else{
|
|
let qExportParam=this.initQueryParams();
|
|
qExportParam.pageNum=1;
|
|
qExportParam.pageSize=100000;
|
|
|
|
listEmisCommissionProfit(qExportParam).then(response => {
|
|
if (response.code === 200) {
|
|
this.exportData(response.rows,loadingInstance);
|
|
}
|
|
});
|
|
}
|
|
},
|
|
exportData(selData,loadingInstance){
|
|
const curList =selData
|
|
import('@/vendor/Export2Excel').then(excel => {
|
|
const exportParam=this.$refs.refTable.getExportParam();
|
|
const tHeader = exportParam.header;
|
|
const filterVal = exportParam.filter;
|
|
const data = this.formatJson(filterVal, curList, selData)
|
|
excel.export_json_to_excel({
|
|
header: tHeader,
|
|
data,
|
|
filename: '提成导出',
|
|
autoWidth: true
|
|
})
|
|
loadingInstance.close()
|
|
})
|
|
},
|
|
formatJson(filterVal, jsonData, resData) {
|
|
let index = 0
|
|
return jsonData.map(v => filterVal.map(j => {
|
|
|
|
console.log("===>1111===>",v);
|
|
|
|
if (j === 'index') {
|
|
return ++index
|
|
}
|
|
if (j === 'kjlx') {
|
|
return v['waybillDetail']['sendSiteName']+'--'+v['waybillDetail']['dispatchUnderlingSiteName'];
|
|
}
|
|
if (j === 'fjr') {
|
|
return v['sendName']+'--'+v['receiveName'];
|
|
}
|
|
|
|
if (j === 'waybillDetail.sendSiteName') {
|
|
return v['waybillDetail']['sendSiteName'];
|
|
}
|
|
|
|
|
|
if (j === 'waybillDetail.sendDate') {
|
|
return v['waybillDetail']['sendDate'];
|
|
}
|
|
|
|
if (j === 'waybillDetail.sendCompany') {
|
|
return v['waybillDetail']['sendCompany'];
|
|
}
|
|
|
|
if (j === 'waybillDetail.transLineTypeName') {
|
|
return v['waybillDetail']['transLineTypeName'];
|
|
}
|
|
|
|
if (j === 'waybillDetail.productTypeName') {
|
|
return v['waybillDetail']['productTypeName'];
|
|
}
|
|
|
|
|
|
if (j === 'waybillDetail.sendName') {
|
|
return v['waybillDetail']['sendName'];
|
|
}
|
|
|
|
if (j === 'waybillDetail.parcelQty') {
|
|
return v['waybillDetail']['parcelQty'];
|
|
}
|
|
|
|
if (j === 'waybillDetail.billWeight') {
|
|
return v['waybillDetail']['billWeight'];
|
|
}
|
|
|
|
if (j === 'waybillDetail.volumeWeight') {
|
|
return v['waybillDetail']['volumeWeight'];
|
|
}
|
|
|
|
if (j === 'waybillDetail.totalVolume') {
|
|
return v['waybillDetail']['totalVolume'];
|
|
}
|
|
|
|
if (j === 'waybillDetail.settlementWeight') {
|
|
return v['waybillDetail']['settlementWeight'];
|
|
}
|
|
|
|
if (j === 'waybillDetail.freight') {
|
|
return v['waybillDetail']['freight'];
|
|
}
|
|
|
|
if (j === 'waybillDetail.realFee') {
|
|
return v['waybillDetail']['realFee'];
|
|
}
|
|
|
|
if (j === 'waybillDetail.remark') {
|
|
return v['waybillDetail']['remark'];
|
|
}
|
|
|
|
if (j === 'waybillDetail.feeRemark') {
|
|
return v['waybillDetail']['feeRemark'];
|
|
}
|
|
|
|
if (j === 'waybillDetail.salesmen') {
|
|
return v['waybillDetail']['salesmen'];
|
|
}
|
|
|
|
if (j === 'waybillDetail.payee') {
|
|
return v['waybillDetail']['payee'];
|
|
}
|
|
|
|
if (j === 'waybillDetail.payee') {
|
|
return v['waybillDetail']['payee'];
|
|
}
|
|
|
|
if (j === 'waybillDetail.problemTypeName') {
|
|
return v['waybillDetail']['problemTypeName'];
|
|
}
|
|
|
|
if (j === 'waybillDetail.problemCause') {
|
|
return v['waybillDetail']['problemCause'];
|
|
}
|
|
|
|
if (j === 'waybillDetail.sendMobile') {
|
|
return "";
|
|
}
|
|
|
|
if (j === 'waybillDetail.calcFeeType') {
|
|
return this.selectDictLabel(this.dict.type.emis_calc_fee_type,v['waybillDetail']['calcFeeType']);
|
|
}
|
|
|
|
if (j === 'waybillDetail.paymentStatus') {
|
|
return this.selectDictLabel(this.dict.type.emis_payment_status,v['waybillDetail']['paymentStatus']);
|
|
}
|
|
|
|
if (j === 'waybillDetail.pickupMethod') {
|
|
return this.selectDictLabel(this.dict.type.emis_qujian_fangshi,v['waybillDetail']['pickupMethod']);
|
|
}
|
|
if (j === 'waybillDetail.customsEclaration') {
|
|
return this.selectDictLabel(this.dict.type.emis_declare_mode,v['waybillDetail']['customsEclaration']);
|
|
}
|
|
if (j === 'waybillDetail.customsClear') {
|
|
return this.selectDictLabel(this.dict.type.emis_customs_clear,v['waybillDetail']['customsClear']);
|
|
}
|
|
if (j === 'waybillDetail.packType') {
|
|
return this.selectDictLabels(this.dict.type.emis_tab_packing_type,v['waybillDetail']['packType']);
|
|
}
|
|
|
|
if (j === 'waybillDetail.dispatchMethod') {
|
|
if(v['waybillDetail']['dispatchMethod'] == 1){
|
|
return '派送';
|
|
}else{
|
|
return '自提';
|
|
}
|
|
}
|
|
|
|
if (j === 'settleType') {
|
|
if(v['settleType'] == 1){
|
|
return '现金';
|
|
}else{
|
|
return '月结';
|
|
}
|
|
}
|
|
|
|
if (j === 'waybillDetail.blMessage') {
|
|
if(v['waybillDetail']['blMessage'] == 1){
|
|
return '发送';
|
|
}else{
|
|
return '不发送';
|
|
}
|
|
}
|
|
if (j === 'waybillDetail.blAcceptMessage') {
|
|
if(v['waybillDetail']['blAcceptMessage'] == 1){
|
|
return '发送';
|
|
}else{
|
|
return '不发送';
|
|
}
|
|
}
|
|
if (j === 'waybillDetail.blSign') {
|
|
if(v['waybillDetail']['blSign'] == 1){
|
|
return '已签收';
|
|
}else{
|
|
return '未签收';
|
|
}
|
|
}
|
|
if (j === 'waybillDetail.paymentType') {
|
|
return this.selectDictLabel(this.dict.type.emis_payment_type,v['waybillDetail']['paymentType']);
|
|
}
|
|
return v[j]
|
|
}))
|
|
},
|
|
|
|
/** 列索引函数 */
|
|
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>
|