This commit is contained in:
linfso 2024-11-15 06:15:25 +08:00
parent 41c18e4543
commit 36fdba5a8b
4 changed files with 235 additions and 58 deletions

View File

@ -13,11 +13,12 @@
:disabled="disabled" :disabled="disabled"
@blur="onBlur"
@change="onChange" @change="onChange"
@click.native="onClick" @click.native="onClick"
@visible-change="reverseArrow" @visible-change="reverseArrow"
> >
<!-- @blur="onBlur" -->
<el-option v-for="item in optionItems" :key="item.code" :label="item.name+'('+item.nameEn+')'" :value="item.code" ></el-option> <el-option v-for="item in optionItems" :key="item.code" :label="item.name+'('+item.nameEn+')'" :value="item.code" ></el-option>
</el-select> </el-select>
</template> </template>
@ -56,17 +57,16 @@
}, },
watch: { watch: {
value(newVal,oldVal) { value(newVal,oldVal) {
// 逻辑 有初始值先查询初值 // if(this.value){
// if(this.value!=null){ // this.svalue=this.value.split(",");
// this.queryData(null,this.svalue.join(","));
// this.svalue=this.value;
// this.queryData(null,this.svalue);
// } // }
}, },
}, },
created() { created() {
if(this.svalue!=null){ if(this.value){
this.queryData(null,this.svalue); this.svalue=this.value.split(",");
this.queryData(null,this.svalue.join(","));
} }
}, },
mounted(){ mounted(){
@ -83,7 +83,7 @@
} }
}, },
onBlur(val){ onBlur(val){
this.$emit("input", this.svalue); this.$emit("input", this.svalue.join(","));
this.dispatch('ElFormItem', 'el.form.blur'); this.dispatch('ElFormItem', 'el.form.blur');
}, },
onChange() { onChange() {
@ -110,7 +110,10 @@
name:val name:val
}; };
listSimpleEmisCountry(queryParams).then(response => { listSimpleEmisCountry(queryParams).then(response => {
let allCuntruny={code:'-1',name:'全部',nameEn:'all'};
this.optionItems =response.rows; this.optionItems =response.rows;
this.optionItems.unshift(allCuntruny);
// 初始值存储 // 初始值存储
if(key==null && val==null){ if(key==null && val==null){
this.defaultItems=[...this.optionItems] this.defaultItems=[...this.optionItems]

View File

@ -1,29 +1,27 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<SearchForm :model="queryParams" ref="queryForm" size="mini" :maxShow="30" label-width="68px" v-show="showSearch" @search="handleQuery" @reset="resetQuery"> <SearchForm :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-form-item label="月份" prop="billMonth">
<el-input <el-date-picker size="mini" style="width:100%" v-model="queryParams.billMonth" type="month" placeholder="月份" value-format="yyyy-MM"></el-date-picker>
v-model="queryParams.billMonth"
:placeholder="$t('月份')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item label="" prop="empName"> <el-form-item label="员工名称" prop="empName">
<el-input <el-input
v-model="queryParams.empName" v-model="queryParams.empName"
:placeholder="$t('员工名称')" :placeholder="$t('员工名称')"
clearable clearable
@keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
</SearchForm> </SearchForm>
<XdTable v-loading="loading" <XdTable v-loading="loading"
border stripe border stripe
size="mini" size="mini"
:data="emisCommissionProfitList" :data="emisCommissionProfitList"
ref="refTable"
storageName="emisCommissionProfitList_main"
:showSearch.sync="showSearch" :showSearch.sync="showSearch"
:queryParams="queryParams" :queryParams="queryParams"
:total="total" :total="total"
@ -84,12 +82,14 @@
<!-- <el-table-column :label="$t('提成编号')" align="center" prop="profitNo" min-width="100" /> --> <!-- <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="profitName" min-width="100" /> -->
<!-- <el-table-column :label="$t('提成类型')" align="center" prop="settleType" min-width="100" /> --> <!-- <el-table-column :label="$t('提成类型')" align="center" prop="settleType" min-width="100" /> -->
<el-table-column :label="$t('月份')" align="center" prop="billMonth" min-width="100" />
<el-table-column :label="$t('员工名称')" align="center" prop="empName" min-width="100" /> <el-table-column :label="$t('员工名称')" align="center" prop="empName" min-width="100" />
<el-table-column :label="$t('月份')" align="center" prop="billMonth" min-width="100" />
<el-table-column :label="$t('提成金额')" align="center" prop="money" min-width="100" />
<el-table-column :label="$t('创建日期')" align="center" prop="createTime" min-width="170" />
<!-- <el-table-column :label="$t('结算开始时间')" align="center" prop="startDate" min-width="100" /> --> <!-- <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="endDate" min-width="100" /> -->
<el-table-column :label="$t('提成金额')" align="center" prop="money" min-width="100" /> <!-- <el-table-column :label="$t('员工编号')" align="center" prop="empCode" 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="blHasProfit" min-width="100" /> -->
<!-- <el-table-column :label="$t('审核状态')" align="center" prop="blAudit" 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="auditDate" min-width="100" />
@ -157,6 +157,7 @@ export default {
total: 0, total: 0,
// 员工提成表表格数据 // 员工提成表表格数据
emisCommissionProfitList: [], emisCommissionProfitList: [],
selectBillList:[],
currentId:null, currentId:null,
openForm: false, openForm: false,
@ -222,6 +223,12 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
initQueryParams(){
// this.queryParams=this.addDateRange(this.queryParams, this.dateTimeRange,"sendDate")
return this.queryParams;
},
/** 查询员工提成表列表 */ /** 查询员工提成表列表 */
getList() { getList() {
this.loading = true; this.loading = true;
@ -245,6 +252,7 @@ export default {
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.id) this.ids = selection.map(item => item.id)
this.selectBillList=selection;
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
@ -292,53 +300,207 @@ export default {
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}).catch(() => {}); }).catch(() => {});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
// this.download('emis/emisCommissionProfit/export', { const loadingInstance = this.$loading({
// ...this.queryParams
// }, `emisCommissionProfit_${new Date().getTime()}.xlsx`)
const loadingInstance = this.$loading({
text: '正在导出...' text: '正在导出...'
}) })
var qParam = {...this.queryParams};
qParam.pageNum=1;
qParam.pageSize=5000;
listEmisCommissionProfit(this.addDateRange(qParam, this.dateTimeRange)).then(response => { if(this.selectBillList&&this.selectBillList.length>0){
this.downloadLoading = false this.exportData(this.selectBillList,loadingInstance);
if (response.code === 200) { }
const curList = response.rows else{
import('@/vendor/Export2Excel').then(excel => { let qExportParam=this.initQueryParams();
const tHeader = ['id','提成编号','提成名称','提成类型','月份','结算开始时间','结算结束时间','提成金额','员工编号','员工名称','是否已提','审核状态','财务确认日期','财务确认备注','财务确认人','总票数','总件数','总重量','销售回款人','销售联系人','财务确认状态','财务确认日期','财务确认备注','财务确认人','财务确认站点','站点确认状态','站点确认日期','站点确认人','网点确认备注','确认网点代码','备注','删除标志(0代表存在','创建者','创建时间','更新者','更新时间','创建站点','更新站点',]; qExportParam.pageNum=1;
const filterVal = ['id','profitNo','profitName','settleType','billMonth','startDate','endDate','money','empCode','empName','blHasProfit','blAudit','auditDate','auditNote','auditManCode','sendPieceSum','pieceNumber','feeWeight','payee','salesmen','blConfirmCenter','confirmCenterDate','confirmCenterNote','confirmCenterManCode','confirmCenterCode','blConfirmSite','confirmSiteDate','confirmSiteManCode','confirmSiteNote','confirmSiteCode','remark','delFlag','createBy','createTime','updateBy','updateTime','createSite','updateSite',]; qExportParam.pageSize=5000;
const data = this.formatJson(filterVal, curList, response.rows)
excel.export_json_to_excel({ listEmisCommissionProfit(qExportParam).then(response => {
header: tHeader, if (response.code === 200) {
data, this.exportData(response.rows,loadingInstance);
filename: '员工提成表', }
autoWidth: true });
}) }
loadingInstance.close() },
}) 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) { formatJson(filterVal, jsonData, resData) {
let index = 0 let index = 0
return jsonData.map(v => filterVal.map(j => { return jsonData.map(v => filterVal.map(j => {
console.log("===>1111===>",v);
if (j === 'index') { if (j === 'index') {
return ++index return ++index
} }
if (j === 'status') { if (j === 'kjlx') {
var statusStr='xxx' return v['waybillDetail']['sendSiteName']+'--'+v['waybillDetail']['dispatchUnderlingSiteName'];
if(v[j] == 10){ }
statusStr='xxx' 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 '自提';
} }
return statusStr; }
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] return v[j]
})) }))
}, },
/** 列索引函数 */ /** 列索引函数 */
getIndex($index) { getIndex($index) {
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1 return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1

View File

@ -286,7 +286,7 @@ export default {
}); });
}else{ }else{
this.reset(); this.reset();
this.form.blOpen="1"; this.form.blOpen=1;
} }
}, },
handelSelectStaff(){ handelSelectStaff(){

View File

@ -91,7 +91,7 @@
size="mini" size="mini"
:data="emisCommissionQuoteList" :data="emisCommissionQuoteList"
storageName="emisCommissionQuoteList_main_240702" storageName="emisCommissionQuoteList_main_241115"
:showSearch.sync="showSearch" :showSearch.sync="showSearch"
:queryParams="queryParams" :queryParams="queryParams"
@ -153,7 +153,7 @@
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column :label="$t('方案名称')" align="left" prop="quoteName" min-width="200" :show-overflow-tooltip="true"/> --> <!-- <el-table-column :label="$t('方案名称')" align="left" prop="quoteName" min-width="200" :show-overflow-tooltip="true"/> -->
<el-table-column :label="$t('方案名称')" align="left" prop="quoteName" :show-overflow-tooltip="true" width="350" > <el-table-column :label="$t('方案名称')" align="left" prop="quoteName" width="300" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="link-type" @click="handleUpdate(scope.row)"> <div class="link-type" @click="handleUpdate(scope.row)">
<span v-if="scope.row.blOpen==1">{{scope.row.quoteName}}</span> <span v-if="scope.row.blOpen==1">{{scope.row.quoteName}}</span>
@ -185,18 +185,30 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('起始国')" align="center" prop="fromCountryName" min-width="100" :show-overflow-tooltip="true"> <el-table-column :label="$t('起始国')" align="center" prop="fromCountryName" min-width="100" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.fromCountryName==''">全部</span> <span v-if="scope.row.fromCountry=='-1'">全部</span>
<span v-else>{{ scope.row.fromCountryName }}</span> <span v-else>{{ scope.row.fromCountryName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('目的国')" align="center" prop="countryName" min-width="100" :show-overflow-tooltip="true"> <el-table-column :label="$t('目的国')" align="center" prop="countryName" min-width="100" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.countryName==''">全部</span> <span v-if="scope.row.country=='-1'">全部</span>
<span v-else>{{ scope.row.countryName }}</span> <span v-else>{{ scope.row.countryName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('线路')" align="center" prop="transLine" min-width="100" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ scope.row.transLine }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('产品类型')" align="center" prop="prodName" min-width="100" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ scope.row.prodName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('岗位类型')" align="center" prop="postType" min-width="100" > <el-table-column :label="$t('岗位类型')" align="center" prop="postType" min-width="100" >
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.emis_commission_post" :value="scope.row.postType"/> <dict-tag :options="dict.type.emis_commission_post" :value="scope.row.postType"/>