This commit is contained in:
linfso 2024-07-09 13:57:59 +08:00
parent 4cd072d9aa
commit 13cde325a1
3 changed files with 1231 additions and 1065 deletions

View File

@ -220,6 +220,19 @@
<div slot="toolbar" v-if="actionType==4">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5" v-if="activeTab=='waitMerge'">
<div style="display:inline-flex;">
<span>账单名称:</span>
<el-input
v-model="billName"
:placeholder="$t('账单名称')"
clearable
/>
<span>选择账期:</span>
<el-date-picker v-model="billMonth" type="month" placeholder="账期" value-format="yyyy-MM"></el-date-picker>
</div>
</el-col>
<el-col :span="1.5" v-if="activeTab=='waitMerge'">
<el-button
type="primary"
@ -383,6 +396,10 @@
</XdTable>
<el-dialog :title="titleMergeForm" :visible.sync="openMergeForm" width="80%" :destroy-on-close="true" v-dialogDrag append-to-body>
<MergeBillForm :selectBillList="selectBillList" @on-changed="handleFormChanged" @on-cancel="cancelForm"></MergeBillForm>
</el-dialog>
<el-dialog :title="openTraceInfoTitle" :visible.sync="openTraceInfo" width="80%" :close-on-click-modal="false" v-dialogDrag append-to-body>
<TraceWaybillDetailView :key="currentTraceBillCode" :scanBillCode="currentTraceBillCode" :billDetail="currentTraceBillItem"></TraceWaybillDetailView>
</el-dialog>
@ -437,6 +454,9 @@ import ProblemTypePicker from '@/views/emis/EmisBaseTools/ProblemTypePicker.vue'
import EmisMonthpayAccountPicker from '@/views/emis/EmisBaseTools/EmisMonthpayAccountPicker.vue';
import TraceWaybillDetailView from '@/views/emis/customerService/traceWaybillDetailView.vue';
import MergeBillForm from '@/views/emis/emisSettleSubBill/MergeBillForm.vue';
export default {
name: "SubBillConfirmByMoneyList",
// name: "SubBillConfirmByMonthList",
@ -457,8 +477,8 @@ export default {
EmisSiteSimplePicker2,
ProblemTypePicker,
TraceWaybillDetailView
TraceWaybillDetailView,
MergeBillForm
},
dicts: ['emis_qujian_fangshi','emis_declare_mode','emis_customs_clear',
'emis_tab_packing_type','emis_tab_dispatch_mode','emis_payment_type',
@ -487,11 +507,15 @@ export default {
actionType:null,
settleType:null,
billName:null,
billMonth:null,
titleMergeForm:null,
openMergeForm:false,
selectBillList:[],
storageName:null,
queryStatInfoMap:null,
@ -707,6 +731,10 @@ export default {
else if(this.actionType==3){
this.storageName="SubBillConfirmBySitehList_main";
}
else if(this.actionType==4){
this.storageName="subBillMergeMgnt_main";
this.activeTab='waitMerge';
}
},
handleClick(tab, event) {
// console.log(tab, event);

View File

@ -1,5 +1,5 @@
<template>
<div class="app-container">
<XdPageContainer class="app-container">
<SearchForm slot="pageHeader" :model="queryParams" ref="queryForm"
size="mini" :maxShow="12" label-width="100px"
v-show="showSearch"
@ -24,7 +24,13 @@
<el-form-item label="目的网点" prop="params.dispatchUnderlingSiteCode">
<EmisSiteSimplePicker2 v-model="queryParams.params.dispatchUnderlingSiteCode" ></EmisSiteSimplePicker2>
</el-form-item>
<el-form-item v-if="actionType==2 || actionType==3 " label="月结客户" prop="custNo">
<el-form-item label="账单类型" v-if="actionType==3 || actionType==4" prop="settleType">
<el-select clearable v-model="queryParams.settleType" placeholder="账单类型">
<el-option key="1" label="现金" value="1"></el-option>
<el-option key="2" label="月结" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item v-if="actionType==2 || actionType==3 || actionType==4" label="月结客户" prop="custNo">
<EmisMonthpayAccountPicker v-model="queryParams.custNo" @onChange="handleQuery"></EmisMonthpayAccountPicker>
</el-form-item>
<el-form-item label="付款方式" prop="params.paymentType" >
@ -37,7 +43,7 @@
></el-option>
</el-select>
<el-select v-if="actionType==2 || actionType==3 " clearable v-model="queryParams.params.paymentType" placeholder="请选择">
<el-select v-if="actionType==2 || actionType==3 || actionType==4" clearable v-model="queryParams.params.paymentType" placeholder="请选择">
<el-option
v-for="dict in dict.type.emis_payment_type.filter(item=>['2','4','5'].includes(item.value))"
:key="dict.value"
@ -72,8 +78,7 @@
</SearchForm>
<el-tabs v-if="actionType==1 || actionType==2 || actionType==3" v-model="activeTab" class="center-tabs" @tab-click="handleClick">
<el-tabs slot="pageTabs" v-if="actionType==1 || actionType==2 || actionType==3" v-model="activeTab" class="center-tabs" @tab-click="handleClick">
<el-tab-pane label="全部" name="all" />
<el-tab-pane label="未确认" name="waitConfirm" />
<el-tab-pane label="已确认" name="hasConfirm" />
@ -82,12 +87,17 @@
<el-tab-pane label="业务置账单异常" name="siteBillError" />
</el-tabs>
<el-tabs v-if="actionType==4" v-model="activeTab" class="center-tabs" @tab-click="handleClick">
<el-tabs slot="pageTabs" v-if="actionType==4" v-model="activeTab" class="center-tabs" @tab-click="handleClick">
<el-tab-pane label="待合账" name="waitMerge" />
<el-tab-pane label="已合账" name="hasMerge" />
</el-tabs>
<XdTable v-loading="loading"
<XdTable
slot="pageContent"
slot-scope="slotProps"
:height="(slotProps.contentHeight-60)+'px'"
v-loading="loading"
border
size="mini"
@ -206,7 +216,7 @@
plain
size="mini"
:disabled="multiple"
@click="handleCancelConfirmByCenter"
@click="handleCancelConfirmBySite"
v-hasPermi="['emis:emisSettleSubBill:cancelConfirmBillBySite']"
>取消确认</el-button>
</el-col>
@ -216,6 +226,21 @@
<div slot="toolbar" v-if="actionType==4">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5" v-if="activeTab=='waitMerge'">
<div style="display:inline-flex;font-size:13px;font-weight:bold;font-weight: bold;line-height: 30px;">
<span>账单名称:</span>
<el-input
size="mini"
style="width:280px"
v-model="billName"
:placeholder="$t('账单名称')"
clearable
/>
<span>账单月:</span>
<el-date-picker size="mini" style="width:120px" v-model="billMonth" type="month" placeholder="" value-format="yyyy-MM"></el-date-picker>
</div>
</el-col>
<el-col :span="1.5" v-if="activeTab=='waitMerge'">
<el-button
type="primary"
@ -223,6 +248,7 @@
size="mini"
:disabled="multiple"
@click="handleMergeBill"
v-hasPermi="['emis:emisSettleSubBill:mergeBillByCenter']"
>合账</el-button>
</el-col>
@ -273,6 +299,7 @@
>运单详情</el-button>
</div>
</div>
<div style="font-weight:500">费用备注:<span>{{scope.row.waybillDetail.feeRemark}}</span></div>
<div class="feeItem">
<ul class="th">
<li>费用名称</li>
@ -303,9 +330,9 @@
<el-table-column :label="$t('寄件网点')" align="center" prop="waybillDetail.sendSiteName" min-width="150" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('寄件公司')" align="center" prop="waybillDetail.sendCompany" min-width="150" :show-overflow-tooltip="true"/>
<el-table-column v-if="settleType!=1" :label="$t('月结客户')" align="center" prop="customerName" min-width="150" :show-overflow-tooltip="true">
<el-table-column v-if="actionType!=1" :label="$t('月结客户')" align="center" prop="customerName" min-width="150" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span type="normal">{{ scope.row.customerName }}</span>
<span v-if="['2','4','5'].includes(scope.row.waybillDetail.paymentType)" type="normal">{{ scope.row.customerName }}</span>
</template>
</el-table-column>
@ -377,12 +404,15 @@
</XdTable>
<el-dialog :title="titleMergeForm" :visible.sync="openMergeForm" width="80%" :destroy-on-close="true" v-dialogDrag append-to-body>
<MergeBillForm :selectBillList="selectBillList" @on-changed="handleFormChanged" @on-cancel="cancelForm"></MergeBillForm>
</el-dialog>
<el-dialog :title="openTraceInfoTitle" :visible.sync="openTraceInfo" width="80%" :close-on-click-modal="false" v-dialogDrag append-to-body>
<TraceWaybillDetailView :key="currentTraceBillCode" :scanBillCode="currentTraceBillCode" :billDetail="currentTraceBillItem"></TraceWaybillDetailView>
</el-dialog>
</div>
</XdPageContainer>
</template>
<script>
@ -399,6 +429,10 @@ import { listEmisSettleSubBill,
confirmNoBillBySite,
setBillErrorBySite
} from "@/api/emis/emisSettleSubBill";
import { listEmisSettleBill, addEmisSettleBill } from "@/api/emis/emisSettleBill";
import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
// import emisSettleSubBillView from '@/views/emis/emisSettleSubBill/emisSettleSubBillView';
import emisSettleSubBillForm from '@/views/emis/emisSettleSubBill/emisSettleSubBillForm';
@ -432,6 +466,11 @@ import ProblemTypePicker from '@/views/emis/EmisBaseTools/ProblemTypePicker.vue'
import EmisMonthpayAccountPicker from '@/views/emis/EmisBaseTools/EmisMonthpayAccountPicker.vue';
import TraceWaybillDetailView from '@/views/emis/customerService/traceWaybillDetailView.vue';
import MergeBillForm from '@/views/emis/emisSettleSubBill/MergeBillForm.vue';
import { parseTime,genJsSeqNo } from "@/utils/custom";
export default {
name: "SubBillConfirmByMoneyList",
// name: "SubBillConfirmByMonthList",
@ -452,8 +491,8 @@ export default {
EmisSiteSimplePicker2,
ProblemTypePicker,
TraceWaybillDetailView
TraceWaybillDetailView,
MergeBillForm
},
dicts: ['emis_qujian_fangshi','emis_declare_mode','emis_customs_clear',
'emis_tab_packing_type','emis_tab_dispatch_mode','emis_payment_type',
@ -482,11 +521,15 @@ export default {
actionType:null,
settleType:null,
billName:null,
billMonth:null,
titleMergeForm:null,
openMergeForm:false,
selectBillList:[],
storageName:null,
queryStatInfoMap:null,
@ -702,6 +745,16 @@ export default {
else if(this.actionType==3){
this.storageName="SubBillConfirmBySitehList_main";
}
else if(this.actionType==4){
var date = new Date();
var year = date.getFullYear();
var month = date.getMonth();
var toMonth = year + "-" + this.lpadZero(month + 1,2);
this.billMonth = toMonth;
this.storageName="subBillMergeMgnt_main";
this.activeTab='waitMerge';
}
},
handleClick(tab, event) {
// console.log(tab, event);
@ -726,7 +779,6 @@ export default {
else if (tab.name == 'siteBillError') {
this.queryParams.blSiteConfirm='3';
}
}
else if(this.actionType==3){
this.queryParams.blSiteConfirm=null;
@ -763,18 +815,18 @@ export default {
},
tableRowClassName({row, rowIndex}) {
// if (row.blConfirm=='0') {
// return {"color": "black !important"}
// }
// else if (row.blConfirm=='1') {
// return {};
// }
// else if (row.blConfirm=='2') {
// return {"color": "black !important"}
// }
// else if (row.blConfirm=='3') {
// return {"color": "black !important"}
// }
if (row.blConfirm=='0') {
return {};
}
else if (row.blConfirm=='1') {
return {};
}
else if (row.blConfirm=='2') {
return {"text-decoration":"line-through","color":"gray"};
}
else if (row.blConfirm=='3' || row.blSiteConfirm=='3') {
return {"color": "red !important"}
}
return '';
},
@ -810,7 +862,7 @@ export default {
//指定列求和
getSummaries(param) {
const { columns, data } = param;
console.log("===>getSummaries==>",param)
// console.log("===>getSummaries==>",param)
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
@ -908,8 +960,34 @@ export default {
},
handleMergeBill(){
this.titleMergeForm="合并账单";
this.openMergeForm=true;
this.$confirm("确定合账吗?", "提示", {
cancelButtonText: "否",
confirmButtonText: "确定",
type: "warning",
distinguishCancelAndClose: true,
closeOnClickModal: false
}).then(() => {
this.form.tplCode=genJsSeqNo();
let settleBillForm={
settleBillNo: null,
settleBillName: null,
billMonth: null,
}
// 生成合账单号
addEmisSettleBill(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.$emit("on-changed");
});
}).catch(() => {});
// this.titleMergeForm="合并账单";
// this.openMergeForm=true;
// titleMergeForm:null,
// openMergeForm:false,
@ -929,11 +1007,23 @@ export default {
this.resetForm("queryForm");
this.handleQuery();
},
lpadZero(val,len) {
return (new Array(len + 1).join('0') + val).slice(-len);
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
this.selectBillList=selection;
if(this.selectBillList&&this.selectBillList.length>0){
const item0=this.selectBillList[0];
this.billName=item0.waybillDetail.customerName+"账单-"+this.billMonth;
}else{
this.billName=null;
}
},
// 排序 查询字段是表格中字段名字 动态取值排序顺序
handleSortChange(column) {
@ -1118,6 +1208,7 @@ export default {
.feeItem{
border: 1px solid #dfe6ec;
margin-bottom:50px;
ul{
list-style: none;
@ -1140,7 +1231,7 @@ export default {
}
.statInfoValue{
.statInfoValue{
color: red;
font-size: 13px;
font-weight: 500;

View File

@ -263,11 +263,58 @@ export default {
}).catch(() => {});
},
/** 导出按钮操作 */
// handleExport() {
// this.download('monitor/logininfor/export', {
// ...this.queryParams
// }, `logininfor_${new Date().getTime()}.xlsx`)
// }
/** 导出按钮操作 */
handleExport() {
this.download('monitor/logininfor/export', {
...this.queryParams
}, `logininfor_${new Date().getTime()}.xlsx`)
// this.download('system/sysLogininfor/export', {
// ...this.queryParams
// }, `sysLogininfor_${new Date().getTime()}.xlsx`)
const loadingInstance = this.$loading({
text: '正在导出...'
})
var qParam = {...this.queryParams};
qParam.pageNum=1;
qParam.pageSize=5000;
list(qParam).then(response => {
this.downloadLoading = false
if (response.code === 200) {
const curList = response.rows
import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['访问ID','登录账号','用户名称','登录IP地址','登录地点','浏览器类型','操作系统','登录状态(0成功','提示消息','访问时间','创建者','创建时间','创建站点','data_from','登录网点名称','登录网点编码',];
const filterVal = ['infoId','userName','nickName','ipaddr','loginLocation','browser','os','status','msg','loginTime','createBy','createTime','createSite','dataFrom','loginSiteName','loginSiteCode',];
const data = this.formatJson(filterVal, curList, response.rows)
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 => {
if (j === 'index') {
return ++index
}
if (j === 'status') {
var statusStr='成功'
if(v[j] == 1){
statusStr='失败'
}
return statusStr;
}
return v[j]
}))
},
}
};
</script>