This commit is contained in:
linfso 2024-08-21 07:18:47 +08:00
parent f1e0b160e9
commit b6eaeb1dd6
9 changed files with 518 additions and 718 deletions

View File

@ -4,7 +4,10 @@
<div class="tab-container">
<el-tabs v-model="activeTab" class="center-tabs" @tab-click="handleTabsClick" @tab-remove="removeTab">
<el-tab-pane label="现金账单列表" name="billList" >
<ChargeBillMoneyPanel key="billList" @onSelect="onSelectBill"> </ChargeBillMoneyPanel>
<ChargeBillMoneyPanel key="billList" @onSelect="onSelectBill" @onPayInput="onPayInput"> </ChargeBillMoneyPanel>
</el-tab-pane>
<el-tab-pane :label="'收/退款:'+currentSettleBillNo" name="payRecordInput" v-if="currentSettleBillNo">
<PayRecordInput :settleBillNo="currentSettleBillNo" settleType="1" @on-changed="handleFormChanged" @on-cancel="cancelForm"></PayRecordInput>
</el-tab-pane>
<el-tab-pane v-for="(item, index) in billTabs" :key="index" :name="item.settleBillNo" :label="'账单:'+item.settleBillNo" closable >
<BillDetailPanelReadOnly :key="'Detail_'+index" :settleBillNo="item.settleBillNo"></BillDetailPanelReadOnly>
@ -12,21 +15,21 @@
</el-tabs>
</div>
</div>
</template>
<script>
import ChargeBillMoneyPanel from '@/views/emis/emisSettleBill/panel/ChargeBillMoneyPanel.vue';
import BillDetailPanelReadOnly from '@/views/emis/emisSettleBill/panel/BillDetailPanelReadOnly.vue';
import PayRecordInput from '@/views/emis/emisSettlePayRecord/panel/PayRecordInput.vue';
export default {
name: "ChargeBillMoneyList",
components: {
ChargeBillMoneyPanel,
BillDetailPanelReadOnly
BillDetailPanelReadOnly,
PayRecordInput
},
dicts: [
],
@ -34,6 +37,7 @@ export default {
return {
activeTab:'billList',
billTabs:[],
currentSettleBillNo:null,
};
},
created() {
@ -42,7 +46,21 @@ export default {
handleTabsClick(){
},
onPayInput(settleBillNo){
this.currentSettleBillNo=settleBillNo;
this.activeTab="payRecordInput";
},
handleFormChanged(){
this.currentSettleBillNo=null;
this.activeTab="billList";
},
cancelForm(){
this.currentSettleBillNo=null;
this.activeTab="billList";
},
onSelectBill(item) {
let old=this.billTabs.find(mItem=>mItem.settleBillNo==item.settleBillNo);
if(old){
this.activeTab=item.settleBillNo;

View File

@ -539,8 +539,10 @@ export default {
handlePayRecord(){
// this.currentId= row.id || this.ids;
this.openForm = true;
this.titleForm = "收/退款:"+this.currentSettleBillNo;
// this.openForm = true;
// this.titleForm = "收/退款:"+this.currentSettleBillNo;
this.$emit("onPayInput",this.currentSettleBillNo);
},
handleCharge(row) {
const ids = row.id || this.ids;

View File

@ -429,7 +429,7 @@ export default {
phone: null,
realTaxType: null,
origOpenMoney: null,
addTaxRate: null,
addTaxRate: 0,
addOpenMoney: null,
openMoneyMax: null,
openMoney: null,

View File

@ -1,6 +1,6 @@
<template>
<div >
<el-form ref="form" :model="form" size="mini" :rules="rules" label-width="80px">
<el-form ref="form" v-if="settleBillItem!=null" :model="form" size="mini" :rules="rules" label-width="80px">
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
<el-col :span="12">
<el-form-item label="" prop="recType" label-width="100px">
@ -16,6 +16,7 @@
<el-col :span="8">
<span style="font-size: 14px;font-weight: 500;color: #000000;">
已收款:<span style="color: blue;">{{ settleBillItem.recedMoney }}</span>
已退款:<span style="color: blue;">{{ settleBillItem.refundMoney }}</span>
待收款:<span style="color: red;">{{ settleBillItem.recMoney-settleBillItem.recedMoney }}</span>
</span>
</el-col>
@ -229,11 +230,18 @@
<span style="color: red">退款方式</span>
</span>
<el-select v-model="form.refundMode" placeholder="退款方式" clearable filterable style="width:100%">
<el-option label="对公账户" :value="4"></el-option>
<!-- <el-option label="对公账户" :value="4"></el-option>
<el-option label="微信支付" :value="1"></el-option>
<el-option label="支付宝" :value="2"></el-option>
<el-option label="其他" :value="5"></el-option>
<el-option label="其他" :value="5"></el-option> -->
<el-option
v-for="dict in dict.type.emis_settlebill_pay_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6" v-if="form.recType==2">

View File

@ -18,34 +18,54 @@
<span v-text="getIndex(scope.$index)"> </span>
</template>
</el-table-column>
<el-table-column :label="$t('交易时间')" align="center" prop="tradeDate" width="170" :show-overflow-tooltip="true" />
<el-table-column :label="$t('交易时间')" align="center" prop="tradeDate" width="170" :show-overflow-tooltip="true" >
<template slot-scope="scope">
<span v-if="scope.row.recType == '1'">{{ scope.row.tradeDate }}</span>
<span v-if="scope.row.recType == '2'">{{ scope.row.refundDate }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('流水号')" align="center" prop="payId" width="170" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('收款来源')" align="center" prop="settleType" width="80" >
<template slot-scope="scope">
<span v-if="scope.row.recType == '1'">
<el-tag type="success" v-if="scope.row.settleType == '1'">现金收款</el-tag>
<el-tag type="success" v-if="scope.row.settleType == '2'">月结收款</el-tag>
</template>
</span>
<span v-if="scope.row.recType == '1'">
<el-tag type="success" v-if="scope.row.settleType == '1'">现金退款</el-tag>
<el-tag type="success" v-if="scope.row.settleType == '2'">月结退款</el-tag>
</span>
</template>
</el-table-column>
<el-table-column :label="$t('缴款客户')" align="center" prop="payMan" width="150" :show-overflow-tooltip="true" />
<el-table-column :label="$t('缴款人/退款人')" align="center" prop="payMan" width="150" :show-overflow-tooltip="true" />
<!-- <el-table-column :label="$t('月结编号')" align="center" prop="payManCode" width="100" :show-overflow-tooltip="true"/> -->
<el-table-column :label="$t('支付类型')" align="center" prop="payType" width="100" >
<el-table-column :label="$t('支付/退款 类型')" align="center" prop="payType" width="150" >
<template slot-scope="scope">
<dict-tag :options="dict.type.emis_settlebill_pay_type" :value="scope.row.payType"/>
<dict-tag v-if="scope.row.recType == '1'" :options="dict.type.emis_settlebill_pay_type" :value="scope.row.payType"/>
<dict-tag v-if="scope.row.recType == '2'" :options="dict.type.emis_settlebill_pay_type" :value="scope.row.refundMode"/>
</template>
</el-table-column>
<el-table-column :label="$t('收付类型')" align="center" prop="recType" width="80" >
<template slot-scope="scope">
<span v-if="scope.row.recType == '1'">收款</span>
<span v-if="scope.row.recType == '2'">退款</span>
<el-tag type="success" v-if="scope.row.recType == '1'">收款</el-tag>
<el-tag type="danger" v-if="scope.row.recType == '2'">退款</el-tag>
</template>
</el-table-column>
<el-table-column :label="$t('支付状态')" align="center" prop="payStatus" width="100" >
<template slot-scope="scope">
<el-tag type="info" v-if="scope.row.payStatus == '0' || scope.row.payStatus==null">未支付</el-tag>
<el-tag type="warning" v-if="scope.row.payStatus == '1'">支付中</el-tag>
<el-tag type="success" v-if="scope.row.payStatus == '2'">支付成功</el-tag>
<el-tag type="error" v-if="scope.row.payStatus == '3'">支付失败 </el-tag>
<span v-if="scope.row.recType == '1'">
<el-tag type="info" v-if="scope.row.payStatus == '0' || scope.row.payStatus==null">未支付</el-tag>
<el-tag type="warning" v-if="scope.row.payStatus == '1'">支付中</el-tag>
<el-tag type="success" v-if="scope.row.payStatus == '2'">支付成功</el-tag>
<el-tag type="error" v-if="scope.row.payStatus == '3'">支付失败 </el-tag>
</span>
<span v-if="scope.row.recType == '2'">
<el-tag type="info" v-if="scope.row.payStatus == '0' || scope.row.payStatus==null">未处理</el-tag>
<el-tag type="warning" v-if="scope.row.payStatus == '1'">退款中</el-tag>
<el-tag type="success" v-if="scope.row.payStatus == '2'">退款成功</el-tag>
<el-tag type="error" v-if="scope.row.payStatus == '3'">退款失败 </el-tag>
</span>
</template>
</el-table-column>
<el-table-column :label="$t('失败原因')" align="center" prop="payStatusDesc" width="100" :show-overflow-tooltip="true"/>
@ -62,6 +82,15 @@
<el-table-column :label="$t('抵扣原因')" align="center" prop="deductionReason" width="100" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('其他原因')" align="center" prop="otherReason" width="100" :show-overflow-tooltip="true" />
<el-table-column :label="$t('退款人')" align="center" prop="refundManName" width="100" :show-overflow-tooltip="true"/>
<!-- <el-table-column :label="$t('退款模式')" align="center" prop="refundMode" min-width="100" /> -->
<el-table-column :label="$t('退款金额')" align="center" prop="refundMoney" width="100" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('退款原因')" align="center" prop="refundReason" width="100" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('退款备注')" align="center" prop="refundRemark" width="100" :show-overflow-tooltip="true"/>
<!-- <el-table-column :label="$t('退款操作人')" align="center" prop="refundOpManCode" min-width="100" /> -->
<!-- <el-table-column :label="$t('退款登记站点')" align="center" prop="refundRegisterSiteCode" min-width="100" /> -->
<!-- <el-table-column :label="$t('退款登记人')" align="center" prop="refundRegisterManCode" min-width="100" /> -->
<el-table-column :label="$t('备注')" align="center" prop="remark" width="100" :show-overflow-tooltip="true"/>
<el-table-column label="登记人" align="center" prop="createByName" width="80" :show-overflow-tooltip="true"/>
<el-table-column label="登记网点" align="center" prop="createSiteName" width="80" :show-overflow-tooltip="true"/>

View File

@ -129,6 +129,8 @@
@queryTable="getList"
@selection-change="handleSelectionChange"
@sort-change="handleSortChange"
:row-style="tableRowClassName"
highlight-current-row
@ -302,8 +304,8 @@
</template>
</el-table-column>
<el-table-column :label="$t('录单备注')" align="center" prop="waybillDetail.remark" min-width="80" :show-overflow-tooltip="true" />
<el-table-column :label="$t('回款联系人')" align="center" prop="waybillDetail.payee" min-width="100" :sortable="true" />
<el-table-column :label="$t('销售联系人')" align="center" prop="waybillDetail.salesmen" min-width="100" :sortable="true" />
<el-table-column :label="$t('回款联系人')" align="center" prop="waybillDetail.payee" min-width="120" :sortable="true" />
<el-table-column :label="$t('销售联系人')" align="center" prop="waybillDetail.salesmen" min-width="120" :sortable="true" />
<el-table-column :label="$t('问题件')" align="center" prop="waybillDetail.blIsQuestion" min-width="150" >
<template slot-scope="scope">
@ -984,11 +986,39 @@ export default {
this.billName=null;
}
},
getProperty(obj, str) {
str = str.replace(/\[(\w+)\]/g, ".$1"); // 处理数组下标
let arr = str.split(".");
for (let i in arr) {
obj = obj[arr[i]] || "";
}
return obj;
},
sortFun: function (attr, rev) {
//第一个参数传入info里的prop表示排的是哪一列,第二个参数是升还是降排序
if (rev == undefined||rev==null) {
rev = 1;
} else {
rev = (rev) ? 1 : -1;
}
let that=this;
return function (a, b) {
a = that.getProperty(a,attr);
b = that.getProperty(b,attr);
if (a < b) {
return rev * -1;
}
if (a > b) {
return rev * 1;
}
return 0;
}
},
// 排序 查询字段是表格中字段名字 动态取值排序顺序
handleSortChange(column) {
this.queryParams.orderByColumn = column.prop;
this.queryParams.isAsc = column.order;
this.getList();
this.emisSettleSubBillList = this.emisSettleSubBillList.sort(
this.sortFun(column.prop, column.order === 'ascending')
);
},
/** 修改按钮操作 */

View File

@ -2,7 +2,6 @@
<XdPageContainer class="app-container">
<div slot="pageHeader" >
<el-tabs v-model="activeTab" class="center-tabs" @tab-click="handleClick">
<el-tab-pane label="月结汇总" name="monthSum" />
<el-tab-pane label="全部" name="all" />
<el-tab-pane label="未确认" name="waitConfirm" />
<el-tab-pane label="已确认" name="hasConfirm" />
@ -12,7 +11,7 @@
</el-tabs>
<SearchForm slot="pageTabs" :model="queryParams" ref="queryForm"
<SearchForm :model="queryParams" ref="queryForm"
size="mini" :maxShow="12" label-width="100px"
v-show="showSearch"
@search="handleQuery"
@ -74,7 +73,7 @@
</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>
<EmisMonthpayAccountPicker v-model="queryParams.custNo"></EmisMonthpayAccountPicker>
</el-form-item>
<el-form-item label="付款方式" prop="params.paymentType" >
<el-select v-if="actionType==1" clearable v-model="queryParams.params.paymentType" placeholder="请选择">
@ -128,274 +127,244 @@
</div>
<!-- v-if="activeTab=='monthSum'" -->
<XdTable
<XdTable
slot="pageContent"
slot-scope="slotProps"
:height="(slotProps.contentHeight)+'px'"
slot="pageContent"
slot-scope="slotProps"
:height="(slotProps.contentHeight)+'px'"
v-loading="loading"
border
size="mini"
ref="refTableSum"
row-key="id"
storageName="SubBillConfirmByMonthList_summary_main"
:data="sumBillList"
:queryParams="queryParams"
:total="totalSum"
@queryTable="getSumList"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('月结客户')" align="left" prop="custName" min-width="150" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('总票数')" align="center" prop="totalNum" min-width="80" />
<el-table-column :label="$t('总件数')" align="center" prop="parcelQty" min-width="80" />
<el-table-column :label="$t('总重量')" align="center" prop="totalBillWeight" min-width="80" />
<el-table-column :label="$t('总体积')" align="center" prop="totalVolume" min-width="80" />
<el-table-column :label="$t('总体积重量')" align="center" prop="totalVolumeWeight" min-width="80" />
<el-table-column :label="$t('结算重量')" align="center" prop="totalSettlementWeight" min-width="120" :sortable="true" />
<el-table-column :label="$t('运费')" align="center" prop="totalFreight" min-width="80" />
</XdTable>
<XdTable
v-if="activeTab!='monthSum'"
slot="pageContent"
slot-scope="slotProps"
:height="(slotProps.contentHeight)+'px'"
v-loading="loading"
border
size="mini"
ref="refTable"
row-key="id"
storageName="SubBillConfirmByMonthList_main"
:data="emisSettleSubBillList"
:showSearch.sync="showSearch"
:queryParams="queryParams"
:total="total"
@queryTable="getList"
@selection-change="handleSelectionChange"
:row-style="tableRowClassName"
highlight-current-row
show-summary :summary-method="getSummaries"
>
<div slot="toolbar" >
<el-row :gutter="10" class="mb8">
<el-col :span="1.5" v-if="activeTab=='waitConfirm'">
<el-button
type="primary"
plain
size="mini"
:disabled="multiple"
@click="handleConfirmByCenter"
v-hasPermi="['emis:emisSettleSubBill:confirmBillByCenter']"
>批量确认</el-button>
</el-col>
<el-col :span="1.5" v-if="activeTab=='waitConfirm'">
<el-button
type="primary"
plain
size="mini"
:disabled="multiple"
@click="handleConfirmNoBillByCenter"
v-hasPermi="['emis:emisSettleSubBill:confirmNoBillByCenter']"
>确认不出账</el-button>
</el-col>
<el-col :span="1.5" v-if="activeTab=='waitConfirm'">
<el-button
type="primary"
plain
size="mini"
:disabled="multiple"
@click="handleSetBillErrorByCenter"
v-hasPermi="['emis:emisSettleSubBill:setBillErrorByCenter']"
>置账单异常</el-button>
</el-col>
<el-col :span="1.5" v-if="activeTab!='waitConfirm'">
<el-button
type="danger"
plain
size="mini"
:disabled="multiple"
@click="handleCancelConfirmByCenter"
v-hasPermi="['emis:emisSettleSubBill:cancelConfirmBillByCenter']"
>取消确认</el-button>
</el-col>
<!-- <el-col :span="1.5">
<el-button
type="primary"
plain
size="mini"
:disabled="single"
@click="handleSplit"
v-hasPermi="['emis:emisSettleSubBill:splitSubBill']"
>拆分子账单</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:emisSettleSubBill:export']"
>导出</el-button>
</el-col>
</el-row>
</div>
<div slot="statInfo" style="font-size: 13px;">
总票数:<span class="statInfoValue">{{total}}</span>,
总运费:<span class="statInfoValue">{{queryStatInfoMap?queryStatInfoMap.totalBillFee:0}}</span>
</div>
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="expand">
<template slot-scope="scope">
<div style="padding: 8px 50px;background:white">
<div style="display:inline-flex;padding: 15px 0px;" >
<div style="font-weight:500">总费用(CNY):<span>{{scope.row.billFee}}</span></div>
<div>
<el-button
type="text"
v-loading="loading"
border
size="mini"
style="padding: 2px 10px;font-size: 13px;border: 1px solid #e1e1e1;"
@click="handleShowTraceInfo(scope.row)"
>运单详情</el-button>
</div>
</div>
<div style="font-weight:500">费用备注:<span>{{scope.row.waybillDetail.feeRemark}}</span></div>
<div style="width: 500px;">
<BillFeeListPanel :key="'feeitem_'+scope.$index" :feeitemList="scope.row.feeitemList"></BillFeeListPanel>
ref="refTable"
row-key="id"
storageName="SubBillConfirmByMonthList_main"
:data="emisSettleSubBillList"
:showSearch.sync="showSearch"
:queryParams="queryParams"
:total="total"
@queryTable="getList"
@selection-change="handleSelectionChange"
@sort-change="handleSortChange"
:row-style="tableRowClassName"
highlight-current-row
show-summary :summary-method="getSummaries"
>
<div slot="toolbar" >
<el-row :gutter="10" class="mb8">
<el-col :span="1.5" v-if="activeTab=='waitConfirm'">
<el-button
type="primary"
plain
size="mini"
:disabled="multiple"
@click="handleConfirmByCenter"
v-hasPermi="['emis:emisSettleSubBill:confirmBillByCenter']"
>批量确认</el-button>
</el-col>
<el-col :span="1.5" v-if="activeTab=='waitConfirm'">
<el-button
type="primary"
plain
size="mini"
:disabled="multiple"
@click="handleConfirmNoBillByCenter"
v-hasPermi="['emis:emisSettleSubBill:confirmNoBillByCenter']"
>确认不出账</el-button>
</el-col>
<el-col :span="1.5" v-if="activeTab=='waitConfirm'">
<el-button
type="primary"
plain
size="mini"
:disabled="multiple"
@click="handleSetBillErrorByCenter"
v-hasPermi="['emis:emisSettleSubBill:setBillErrorByCenter']"
>置账单异常</el-button>
</el-col>
<el-col :span="1.5" v-if="activeTab!='waitConfirm'">
<el-button
type="danger"
plain
size="mini"
:disabled="multiple"
@click="handleCancelConfirmByCenter"
v-hasPermi="['emis:emisSettleSubBill:cancelConfirmBillByCenter']"
>取消确认</el-button>
</el-col>
<!-- <el-col :span="1.5">
<el-button
type="primary"
plain
size="mini"
:disabled="single"
@click="handleSplit"
v-hasPermi="['emis:emisSettleSubBill:splitSubBill']"
>拆分子账单</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:emisSettleSubBill:export']"
>导出</el-button>
</el-col>
</el-row>
</div>
</div>
</template>
</el-table-column>
<div slot="statInfo" style="font-size: 13px;">
总票数:<span class="statInfoValue">{{total}}</span>,
总运费:<span class="statInfoValue">{{queryStatInfoMap?queryStatInfoMap.totalBillFee:0}}</span>
</div>
<el-table-column :label="$t('运单号')" align="center" prop="billCode" min-width="130" :sortable="true" />
<el-table-column :label="$t('子账单')" align="center" prop="billNo" width="130" :show-overflow-tooltip="true"/>
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="expand">
<template slot-scope="scope">
<div style="padding: 8px 50px;background:white">
<div style="display:inline-flex;padding: 15px 0px;" >
<div style="font-weight:500">总费用(CNY):<span>{{scope.row.billFee}}</span></div>
<div>
<el-button
type="text"
size="mini"
style="padding: 2px 10px;font-size: 13px;border: 1px solid #e1e1e1;"
@click="handleShowTraceInfo(scope.row)"
>运单详情</el-button>
</div>
</div>
<div style="font-weight:500">费用备注:<span>{{scope.row.waybillDetail.feeRemark}}</span></div>
<el-table-column :label="$t('预警提示')" align="center" prop="waybillDetail.blSpecialQuote" width="150" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.blConfirmCenter=='0'" style="color:red;font-weight:500">财务未确认,</span>
<span v-if="scope.row.blConfirmSite=='0'" style="color:red;font-weight:500">业务未确认</span>
</template>
</el-table-column>
<el-table-column :label="$t('快件类型')" align="center" prop="kjlx" width="180" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ scope.row.waybillDetail.sendSiteName }}--{{ scope.row.waybillDetail.dispatchUnderlingSiteName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('特殊报价')" align="center" prop="waybillDetail.blSpecialQuote" width="80" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.waybillDetail.blSpecialQuote==1">是</span>
<span v-else>否</span>
</template>
</el-table-column>
<el-table-column :label="$t('计费方式')" align="center" prop="waybillDetail.calcFeeType" width="80" :show-overflow-tooltip="true">
<template slot-scope="scope">
<dict-tag :options="dict.type.emis_calc_fee_type" :value="scope.row.waybillDetail.calcFeeType"/>
</template>
</el-table-column>
<el-table-column :label="$t('寄件日期')" align="center" prop="waybillDetail.sendDate" min-width="170" :sortable="true" :show-overflow-tooltip="true"/>
<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" :sortable="true" :show-overflow-tooltip="true"/>
<div style="width: 500px;">
<BillFeeListPanel :key="'feeitem_'+scope.$index" :feeitemList="scope.row.feeitemList"></BillFeeListPanel>
</div>
<!-- <el-table-column :label="$t('月结编号')" align="center" prop="customerName" min-width="150" :sortable="true" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="['2','4','5'].includes(scope.row.waybillDetail.paymentType)" type="normal">{{ scope.row.custNo }}</span>
</template>
</el-table-column> -->
</div>
</template>
</el-table-column>
<el-table-column :label="$t('月结客户')" align="center" prop="custName" min-width="150" :sortable="true" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="['2','4','5'].includes(scope.row.waybillDetail.paymentType)" type="normal">{{ scope.row.custName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('运单号')" align="center" prop="billCode" min-width="130" :sortable="true" />
<el-table-column :label="$t('子账单')" align="center" prop="billNo" width="130" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('预警提示')" align="center" prop="waybillDetail.blSpecialQuote" width="150" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.blConfirmCenter=='0'" style="color:red;font-weight:500">财务未确认,</span>
<span v-if="scope.row.blConfirmSite=='0'" style="color:red;font-weight:500">业务未确认</span>
</template>
</el-table-column>
<el-table-column :label="$t('快件类型')" align="center" prop="kjlx" width="180" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ scope.row.waybillDetail.sendSiteName }}--{{ scope.row.waybillDetail.dispatchUnderlingSiteName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('特殊报价')" align="center" prop="waybillDetail.blSpecialQuote" width="80" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.waybillDetail.blSpecialQuote==1">是</span>
<span v-else>否</span>
</template>
</el-table-column>
<el-table-column :label="$t('计费方式')" align="center" prop="waybillDetail.calcFeeType" width="80" :show-overflow-tooltip="true">
<template slot-scope="scope">
<dict-tag :options="dict.type.emis_calc_fee_type" :value="scope.row.waybillDetail.calcFeeType"/>
</template>
</el-table-column>
<el-table-column :label="$t('寄件日期')" align="center" prop="waybillDetail.sendDate" min-width="170" :sortable="true" :show-overflow-tooltip="true"/>
<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" :sortable="true" :show-overflow-tooltip="true"/>
<!-- <el-table-column :label="$t('月结编号')" align="center" prop="customerName" min-width="150" :sortable="true" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="['2','4','5'].includes(scope.row.waybillDetail.paymentType)" type="normal">{{ scope.row.custNo }}</span>
</template>
</el-table-column> -->
<el-table-column :label="$t('月结客户')" align="center" prop="custName" min-width="150" :sortable="true" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="['2','4','5'].includes(scope.row.waybillDetail.paymentType)" type="normal">{{ scope.row.custName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('线路')" align="center" prop="waybillDetail.transLineTypeName" min-width="80" :sortable="true" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('线路')" align="center" prop="waybillDetail.transLineTypeName" min-width="80" :sortable="true" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('产品类型')" align="center" prop="waybillDetail.productTypeName" min-width="120" :sortable="true" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span >{{scope.row.waybillDetail.productTypeName}}({{scope.row.waybillDetail.timeType}})</span>
</template>
</el-table-column>
<el-table-column :label="$t('产品类型')" align="center" prop="waybillDetail.productTypeName" min-width="120" :sortable="true" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span >{{scope.row.waybillDetail.productTypeName}}({{scope.row.waybillDetail.timeType}})</span>
</template>
</el-table-column>
<el-table-column :label="$t('寄件人')" align="center" prop="waybillDetail.sendName" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('件数')" align="center" prop="waybillDetail.parcelQty" min-width="80" />
<el-table-column :label="$t('实际重量')" align="center" prop="waybillDetail.billWeight" min-width="80" />
<el-table-column :label="$t('体积')" align="center" prop="waybillDetail.totalVolume" min-width="80" />
<el-table-column :label="$t('体积重量')" align="center" prop="waybillDetail.volumeWeight" min-width="80" />
<el-table-column :label="$t('结算重量')" align="center" prop="waybillDetail.settlementWeight" min-width="120" :sortable="true" />
<el-table-column :label="$t('运费')" align="center" prop="waybillDetail.freight" min-width="80" >
<template slot-scope="scope">
<span style="color: red;font-weight: 500" v-if="scope.row.waybillDetail.realFee!=scope.row.waybillDetail.freight">{{scope.row.waybillDetail.freight}}</span>
<span v-else>{{scope.row.waybillDetail.freight}}</span>
</template>
</el-table-column>
<el-table-column :label="$t('标准报价')" align="center" prop="waybillDetail.realFee" min-width="80" />
<el-table-column :label="$t('费用备注')" align="center" prop="waybillDetail.feeRemark" min-width="80" :show-overflow-tooltip="true" />
<el-table-column :label="$t('支付类型')" align="center" prop="waybillDetail.paymentType" min-width="80" :show-overflow-tooltip="true" >
<template slot-scope="scope">
<dict-tag :options="dict.type.emis_payment_type" :value="scope.row.waybillDetail.paymentType" />
</template>
</el-table-column>
<el-table-column :label="$t('录单备注')" align="center" prop="waybillDetail.remark" min-width="80" :show-overflow-tooltip="true" />
<el-table-column :label="$t('回款联系人')" align="center" prop="waybillDetail.payee" min-width="100" :sortable="true" />
<el-table-column :label="$t('销售联系人')" align="center" prop="waybillDetail.salesmen" min-width="100" :sortable="true" />
<el-table-column :label="$t('寄件人')" align="center" prop="waybillDetail.sendName" min-width="80" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('件数')" align="center" prop="waybillDetail.parcelQty" min-width="80" />
<el-table-column :label="$t('实际重量')" align="center" prop="waybillDetail.billWeight" min-width="80" />
<el-table-column :label="$t('体积')" align="center" prop="waybillDetail.totalVolume" min-width="80" />
<el-table-column :label="$t('体积重量')" align="center" prop="waybillDetail.volumeWeight" min-width="80" />
<el-table-column :label="$t('结算重量')" align="center" prop="waybillDetail.settlementWeight" min-width="120" :sortable="true" />
<el-table-column :label="$t('运费')" align="center" prop="waybillDetail.freight" min-width="80" >
<template slot-scope="scope">
<span style="color: red;font-weight: 500" v-if="scope.row.waybillDetail.realFee!=scope.row.waybillDetail.freight">{{scope.row.waybillDetail.freight}}</span>
<span v-else>{{scope.row.waybillDetail.freight}}</span>
</template>
</el-table-column>
<el-table-column :label="$t('标准报价')" align="center" prop="waybillDetail.realFee" min-width="80" />
<el-table-column :label="$t('费用备注')" align="center" prop="waybillDetail.feeRemark" min-width="80" :show-overflow-tooltip="true" />
<el-table-column :label="$t('支付类型')" align="center" prop="waybillDetail.paymentType" min-width="80" :show-overflow-tooltip="true" >
<template slot-scope="scope">
<dict-tag :options="dict.type.emis_payment_type" :value="scope.row.waybillDetail.paymentType" />
</template>
</el-table-column>
<el-table-column :label="$t('录单备注')" align="center" prop="waybillDetail.remark" min-width="80" :show-overflow-tooltip="true" />
<el-table-column :label="$t('回款联系人')" align="center" prop="waybillDetail.payee" min-width="120" :sortable="true" />
<el-table-column :label="$t('销售联系人')" align="center" prop="waybillDetail.salesmen" min-width="120" :sortable="true" />
<el-table-column :label="$t('问题件')" align="center" prop="waybillDetail.blIsQuestion" min-width="150" >
<template slot-scope="scope">
<el-tag v-if="scope.row.waybillDetail.blIsQuestion==1" type="danger">是</el-tag>
<span v-else >/</span>
</template>
</el-table-column>
<el-table-column :label="$t('问题件类型')" align="center" prop="waybillDetail.problemTypeName" width="150" :show-overflow-tooltip="true" :sortable="true" />
<el-table-column :label="$t('问题件原因')" align="center" prop="waybillDetail.problemCause" width="150" :show-overflow-tooltip="true" />
<el-table-column :label="$t('问题件')" align="center" prop="waybillDetail.blIsQuestion" min-width="150" >
<template slot-scope="scope">
<el-tag v-if="scope.row.waybillDetail.blIsQuestion==1" type="danger">是</el-tag>
<span v-else >/</span>
</template>
</el-table-column>
<el-table-column :label="$t('问题件类型')" align="center" prop="waybillDetail.problemTypeName" width="150" :show-overflow-tooltip="true" :sortable="true" />
<el-table-column :label="$t('问题件原因')" align="center" prop="waybillDetail.problemCause" width="150" :show-overflow-tooltip="true" />
<el-table-column :label="$t('财务确认状态')" align="center" prop="blConfirmCenter" min-width="120" >
<template slot-scope="scope">
<span v-if="scope.row.blConfirmCenter=='0'" >未确认</span>
<el-tag v-if="scope.row.blConfirmCenter=='1'" type="success">已确认</el-tag>
<el-tag v-if="scope.row.blConfirmCenter=='2'" type="error">确认不出账</el-tag>
<el-tag v-if="scope.row.blConfirmCenter=='3'" type="error">账单异常</el-tag>
</template>
</el-table-column>
<el-table-column :label="$t('财务确认人')" align="center" prop="confirmCenterManName" min-width="100" />
<el-table-column :label="$t('财务确认时间')" align="center" prop="confirmCenterDate" min-width="170" />
<el-table-column :label="$t('财务备注')" align="center" prop="confirmCenterNote" min-width="100" />
<el-table-column :label="$t('财务确认状态')" align="center" prop="blConfirmCenter" min-width="120" >
<template slot-scope="scope">
<span v-if="scope.row.blConfirmCenter=='0'" >未确认</span>
<el-tag v-if="scope.row.blConfirmCenter=='1'" type="success">已确认</el-tag>
<el-tag v-if="scope.row.blConfirmCenter=='2'" type="error">确认不出账</el-tag>
<el-tag v-if="scope.row.blConfirmCenter=='3'" type="error">账单异常</el-tag>
</template>
</el-table-column>
<el-table-column :label="$t('财务确认人')" align="center" prop="confirmCenterManName" min-width="100" />
<el-table-column :label="$t('财务确认时间')" align="center" prop="confirmCenterDate" min-width="170" />
<el-table-column :label="$t('财务备注')" align="center" prop="confirmCenterNote" min-width="100" />
<el-table-column :label="$t('业务确认状态')" align="center" prop="blConfirmSite" min-width="120" >
<template slot-scope="scope">
<span v-if="scope.row.blConfirmSite=='0'" >未确认</span>
<el-tag v-if="scope.row.blConfirmSite=='1'" type="success">已确认</el-tag>
<el-tag v-if="scope.row.blConfirmSite=='2'" type="error">确认不出账</el-tag>
<el-tag v-if="scope.row.blConfirmSite=='3'" type="error">账单异常</el-tag>
</template>
</el-table-column>
<el-table-column :label="$t('业务确认时间')" align="center" prop="confirmSiteDate" min-width="170" />
<el-table-column :label="$t('业务确认人')" align="center" prop="confirmSiteManName" min-width="100" />
<el-table-column :label="$t('业务备注')" align="center" prop="confirmSiteNote" min-width="100" />
<el-table-column :label="$t('出账日期')" align="center" prop="createTime" min-width="170" />
<el-table-column :label="$t('业务确认状态')" align="center" prop="blConfirmSite" min-width="120" >
<template slot-scope="scope">
<span v-if="scope.row.blConfirmSite=='0'" >未确认</span>
<el-tag v-if="scope.row.blConfirmSite=='1'" type="success">已确认</el-tag>
<el-tag v-if="scope.row.blConfirmSite=='2'" type="error">确认不出账</el-tag>
<el-tag v-if="scope.row.blConfirmSite=='3'" type="error">账单异常</el-tag>
</template>
</el-table-column>
<el-table-column :label="$t('业务确认时间')" align="center" prop="confirmSiteDate" min-width="170" />
<el-table-column :label="$t('业务确认人')" align="center" prop="confirmSiteManName" min-width="100" />
<el-table-column :label="$t('业务备注')" align="center" prop="confirmSiteNote" min-width="100" />
<el-table-column :label="$t('出账日期')" align="center" prop="createTime" min-width="170" />
</XdTable>
</XdTable>
<el-dialog :title="titleMergeForm" :visible.sync="openMergeForm" width="80%" :destroy-on-close="true" v-dialogDrag append-to-body>
<MergeBillForm :settleBillNo="currentSettleBillNo" @on-changed="handleFormChanged" @on-cancel="cancelForm"></MergeBillForm>
@ -462,7 +431,7 @@ import BillFeeListPanel from '@/views/emis/emisSettleSubBill/panel/BillFeeListPa
import MergeBillForm from '@/views/emis/emisSettleBill/MergeBillForm.vue';
import { parseTime,genJsSeqNo } from "@/utils/custom";
import {timeFormat} from '@/utils/dateUtils'
export default {
name: "SettleSubBillConfirmMonthList",
@ -511,6 +480,7 @@ export default {
// 结算子账单表格数据
emisSettleSubBillList: [],
totalSum:0,
sumBillList:[],
actionType:null,
@ -732,56 +702,74 @@ export default {
},
};
},
watch: {
$route () {
if(this.$route.query.custNo!=null){
this.queryParams.blConfirmCenter='0';
this.queryParams.blConfirmSite=this.$route.query.blConfirmSite;
let startTime=this.$route.query.startTime;
let endTime=this.$route.query.endTime;
this.dateTimeRange=[startTime, endTime]
this.actionType=this.$route.query.actionType;
this.queryParams.custNo=this.$route.query.custNo;
this.initData();
}
}
},
created() {
this.queryParams.blConfirmCenter='0';
this.queryParams.blConfirmCenter='0';
const end = new Date()
const start = new Date()
start.setDate(1)
start.setHours(0,0,0,0)
end.setHours(23,59,59,0)
this.dateTimeRange=[timeFormat(start), timeFormat(end)]
// this.queryParams.blConfirmSite='1';
this.actionType=this.$route.query.actionType;
this.queryParams.custNo=this.$route.query.custNo;
this.initData();
this.getList();
},
methods: {
initData(){
this.storageName="SubBillConfirmByMonthList_main";
this.queryParams.blConfirmCenter=0;
this.getList();
},
handleClick(tab, event) {
console.log("===>activeTab==>",this.activeTab,tab, event);
this.queryParams.blConfirmSite=null;
this.queryParams.blConfirmCenter=null;
if (tab.name == 'monthSum') {
this.getSumList();
}
if (tab.name == 'all') {
this.queryParams.blConfirmCenter=null;
this.getList();
}
else if (tab.name == 'waitConfirm') {
this.queryParams.blConfirmCenter='0';
this.getList();
}
else if (tab.name == 'hasConfirm') {
this.queryParams.blConfirmCenter='1';
this.getList();
}
else if (tab.name == 'confirmNotBill') {
this.queryParams.blConfirmCenter='2';
this.getList();
}
else if (tab.name == 'billError') {
this.queryParams.blConfirmCenter='3';
this.getList();
}
else if (tab.name == 'siteBillError') {
this.queryParams.blConfirmSite='3';
this.getList();
}
console.log("===>activeTab==>",this.activeTab,tab, event);
this.queryParams.blConfirmSite=null;
this.queryParams.blConfirmCenter=null;
if (tab.name == 'all') {
this.queryParams.blConfirmCenter=null;
this.getList();
}
else if (tab.name == 'waitConfirm') {
this.queryParams.blConfirmCenter='0';
this.getList();
}
else if (tab.name == 'hasConfirm') {
this.queryParams.blConfirmCenter='1';
this.getList();
}
else if (tab.name == 'confirmNotBill') {
this.queryParams.blConfirmCenter='2';
this.getList();
}
else if (tab.name == 'billError') {
this.queryParams.blConfirmCenter='3';
this.getList();
}
else if (tab.name == 'siteBillError') {
this.queryParams.blConfirmSite='3';
this.getList();
}
},
tableRowClassName({row, rowIndex}) {
if (row.blConfirmCenter=='0') {
return {};
@ -805,25 +793,13 @@ export default {
this.queryParams=this.addDateRange(this.queryParams, this.dateTimeRange,"sendDate")
return this.queryParams;
},
getSumList(){
this.loading = true;
this.initQueryParams();
listEmisSettleSubBill(this.queryParams).then(response => {
this.sumBillList = response.rows;
this.totalSum = response.total;
this.loading = false;
});
},
getList() {
this.loading = true;
this.initQueryParams();
getMonthBillStatInfoMapList(this.queryParams).then(response => {
this.subBillList = response.rows;
listEmisSettleSubBill(this.queryParams).then(response => {
this.emisSettleSubBillList = response.rows;
this.total = response.total;
this.loading = false;
});
@ -1070,22 +1046,57 @@ export default {
this.billName=null;
}
},
getProperty(obj, str) {
str = str.replace(/\[(\w+)\]/g, ".$1"); // 处理数组下标
let arr = str.split(".");
for (let i in arr) {
obj = obj[arr[i]] || "";
}
return obj;
},
sortFun: function (attr, rev) {
//第一个参数传入info里的prop表示排的是哪一列,第二个参数是升还是降排序
if (rev == undefined||rev==null) {
rev = 1;
} else {
rev = (rev) ? 1 : -1;
}
let that=this;
return function (a, b) {
a = that.getProperty(a,attr);
b = that.getProperty(b,attr);
if (a < b) {
return rev * -1;
}
if (a > b) {
return rev * 1;
}
return 0;
}
},
// 排序 查询字段是表格中字段名字 动态取值排序顺序
handleSortChange(column) {
// this.queryParams.orderByColumn = column.prop;
// this.queryParams.isAsc = column.order;
console.log("==column.prop==>",column.prop);
if(column.prop=='billCode'){
this.queryParams.params.orderByColumn = 'a.billCode';
}
else if(column.prop=='waybillDetail.sendDate'){
this.queryParams.params.orderByColumn = 'sendDate';
}
this.getList();
this.emisSettleSubBillList = this.emisSettleSubBillList.sort(
this.sortFun(column.prop, column.order === 'ascending')
);
},
// // 排序 查询字段是表格中字段名字 动态取值排序顺序
// handleSortChange(column) {
// // this.queryParams.orderByColumn = column.prop;
// // this.queryParams.isAsc = column.order;
// console.log("==column.prop==>",column.prop);
// if(column.prop=='billCode'){
// this.queryParams.params.orderByColumn = 'a.billCode';
// }
// else if(column.prop=='waybillDetail.sendDate'){
// this.queryParams.params.orderByColumn = 'sendDate';
// }
// this.getList();
// },
/** 修改按钮操作 */
handleUpdate(row) {
this.currentId= row.id;

View File

@ -155,9 +155,12 @@
@queryTable="getList"
@selection-change="handleSelectionChange"
@sort-change="handleSortChange"
:row-style="tableRowClassName"
highlight-current-row
show-summary :summary-method="getSummaries"
show-summary
:summary-method="getSummaries"
>
<!-- @sort-change="handleSortChange" -->
@ -319,8 +322,8 @@
<el-table-column :label="$t('费用备注')" align="center" prop="waybillDetail.feeRemark" min-width="80" :show-overflow-tooltip="true" />
<el-table-column :label="$t('录单备注')" align="center" prop="waybillDetail.remark" min-width="80" :show-overflow-tooltip="true" />
<el-table-column :label="$t('回款联系人')" align="center" prop="waybillDetail.payee" min-width="100" :sortable="true" />
<el-table-column :label="$t('销售联系人')" align="center" prop="waybillDetail.salesmen" min-width="100" :sortable="true" />
<el-table-column :label="$t('回款联系人')" align="center" prop="waybillDetail.payee" min-width="120" :sortable="true" />
<el-table-column :label="$t('销售联系人')" align="center" prop="waybillDetail.salesmen" min-width="120" :sortable="true" />
<el-table-column :label="$t('问题件')" align="center" prop="waybillDetail.blIsQuestion" min-width="150" >
<template slot-scope="scope">
@ -888,7 +891,7 @@ export default {
sums[index];
}
});
console.log(sums);
// console.log(sums);
return sums
},
@ -1030,58 +1033,39 @@ export default {
this.billName=null;
}
},
sortFun: function (attr, rev) {
//第一个参数传入info里的prop表示排的是哪一列,第二个参数是升还是降排序
if (rev == undefined) {
rev = 1;
} else {
rev = (rev) ? 1 : -1;
}
return function (a, b) {
a = a[attr];
b = b[attr];
if (a < b) {
return rev * -1;
}
if (a > b) {
return rev * 1;
}
return 0;
}
getProperty(obj, str) {
str = str.replace(/\[(\w+)\]/g, ".$1"); // 处理数组下标
let arr = str.split(".");
for (let i in arr) {
obj = obj[arr[i]] || "";
}
return obj;
},
sortFun: function (attr, rev) {
//第一个参数传入info里的prop表示排的是哪一列,第二个参数是升还是降排序
if (rev == undefined||rev==null) {
rev = 1;
} else {
rev = (rev) ? 1 : -1;
}
let that=this;
return function (a, b) {
a = that.getProperty(a,attr);
b = that.getProperty(b,attr);
if (a < b) {
return rev * -1;
}
if (a > b) {
return rev * 1;
}
return 0;
}
},
// 排序 查询字段是表格中字段名字 动态取值排序顺序
handleSortChange(column) {
console.log(column)
this.currentPage = 1 // return to the first page after sorting
if (column.prop === 'billCode') {
this.emisSettleSubBillList = this.emisSettleSubBillList.sort(this.sortFun(column.prop, column.order === 'ascending'));
console.log(this.emisSettleSubBillList);
} else if (column.prop === 'waybillDetail.sendDate') {
this.emisSettleSubBillList = this.emisSettleSubBillList.sort(
this.emisSettleSubBillList = this.emisSettleSubBillList.sort(
this.sortFun(column.prop, column.order === 'ascending')
);
console.log(this.emisSettleSubBillList);
}else if (column.prop === 'priority') {
this.emisSettleSubBillList = this.emisSettleSubBillList.sort(this.sortFun(column.prop, column.order === 'ascending'));
console.log(this.emisSettleSubBillList);
}
// this.showed_data = this.emisSettleSubBillList.slice(0, this.pageSize) // 排序完显示到第一页
console.log('Finished')
// console.log(this.showed_data)
// console.log("==column.prop==>",column.prop);
// if(column.prop=='billCode'){
// this.queryParams.params.orderByColumn = 'billCode';
// }
// else if(column.prop=='waybillDetail.sendDate'){
// this.queryParams.params.orderByColumn = 'sendDate';
// }
// this.queryParams.isAsc = column.order;
// this.getList();
);
},
/** 修改按钮操作 */

View File

@ -8,116 +8,29 @@
@reset="resetQuery"
:isShowSearchBtn="true"
>
<el-form-item label="运单号" prop="billCode">
<XdTextareaInput
v-model="queryParams.billCode"
:placeholder="$t('多个流水号逗号或换行隔开')"
clearable
:rows="1"
/>
</el-form-item>
<el-form-item label="寄件日期" prop="sendDate">
<elDateAdvPicker v-model="dateTimeRange" ></elDateAdvPicker>
</el-form-item>
<el-form-item label="寄件网点" prop="params.sendSiteCode">
<EmisSiteSimplePicker1 v-model="queryParams.params.sendSiteCode" ></EmisSiteSimplePicker1>
</el-form-item>
<el-form-item label="目的网点" prop="params.dispatchUnderlingSiteCode">
<EmisSiteSimplePicker2 v-model="queryParams.params.dispatchUnderlingSiteCode" ></EmisSiteSimplePicker2>
</el-form-item>
<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 label="是否特殊报价" prop="params.blSpecialQuote">
<el-select clearable v-model="queryParams.params.blSpecialQuote" placeholder="">
<el-option key="1" label="是" value="1"></el-option>
<el-option key="0" label="否" value="0"></el-option>
</el-select>
<el-form-item label="月结客户" prop="custNo">
<EmisMonthpayAccountPicker v-model="queryParams.custNo"></EmisMonthpayAccountPicker>
</el-form-item>
<el-form-item label="业务确认状态" prop="blConfirmSite">
<el-select clearable v-model="queryParams.blConfirmSite" placeholder="">
<el-select clearable v-model="queryParams.blConfirmSite" placeholder="业务确认状态">
<el-option key="0" label="业务未确认" value="0"></el-option>
<el-option key="1" label="业务已确认" value="1"></el-option>
</el-select>
</el-form-item>
<el-form-item label="线路" prop="params.transLineType">
<TransLinePicker v-model="queryParams.params.transLineType" isInitiated="true" @onChange="handleQuery"></TransLinePicker>
</el-form-item>
<el-form-item label="产品类型" prop="productType">
<TransProductPicker placeholder="产品类型" v-model="queryParams.params.productType" :transLineCode="queryParams.params.transLineType" @onChange="handleQuery"></TransProductPicker>
</el-form-item>
<el-form-item label="计费方式" prop="params.calcFeeType">
<el-select clearable v-model="queryParams.params.calcFeeType" placeholder="请选择">
<el-option
v-for="dict in dict.type.emis_calc_fee_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></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" >
<el-select v-if="actionType==1" clearable v-model="queryParams.params.paymentType" placeholder="请选择">
<el-option
v-for="dict in dict.type.emis_payment_type.filter(item=>['1','3','6'].includes(item.value))"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
<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"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('回款联系人')" prop="params.payee">
<PayeePicker :placeholder="$t('回款联系人')" v-model="queryParams.params.payee" ></PayeePicker>
</el-form-item>
<el-form-item :label="$t('销售联系人')" prop="params.salesmen">
<SalemanPicker :placeholder="$t('销售联系人')" v-model="queryParams.params.salesmen" :disabled="actionType==3" ></SalemanPicker>
</el-form-item>
<el-form-item label="寄件公司" prop="params.sendCompany">
<el-input
v-model="queryParams.params.sendCompany"
:placeholder="$t('寄件公司')"
clearable
@keyup.enter.native="handleQuery"
/>
<el-form-item label="寄件日期" prop="sendDate">
<elDateAdvPicker v-model="dateTimeRange" ></elDateAdvPicker>
</el-form-item>
<el-form-item label="收件公司" prop="params.receiveCompany">
<el-input
v-model="queryParams.params.receiveCompany"
:placeholder="$t('收件公司')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="问题件类型" prop="problemType">
<ProblemTypePicker v-model="queryParams.params.problemType" ></ProblemTypePicker>
</el-form-item>
</SearchForm>
<XdTable
slot="pageContent"
slot-scope="slotProps"
:height="(slotProps.contentHeight)+'px'"
:height="(slotProps.contentHeight+40)+'px'"
v-loading="loading"
border
@ -126,24 +39,28 @@
ref="refTable"
row-key="id"
storageName="SubBillConfirmByMonthList_summary_main"
:showRightButton="false"
:showOperateButton="false"
:data="emisSettleSubBillList"
:showSearch.sync="showSearch"
:queryParams="queryParams"
:total="total"
@queryTable="getList"
@selection-change="handleSelectionChange"
@row-dblclick="handleSumDblClick"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('月结客户')" align="left" prop="custName" min-width="150" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('总票数')" align="center" prop="totalNum" min-width="80" />
<el-table-column :label="$t('总件数')" align="center" prop="parcelQty" min-width="80" />
<el-table-column :label="$t('总重量')" align="center" prop="totalBillWeight" min-width="80" />
<el-table-column :label="$t('总体积')" align="center" prop="totalVolume" min-width="80" />
<el-table-column :label="$t('总体积重量')" align="center" prop="totalVolumeWeight" min-width="80" />
<el-table-column :label="$t('结算重量')" align="center" prop="totalSettlementWeight" min-width="120" :sortable="true" />
<el-table-column :label="$t('运费')" align="center" prop="totalFreight" min-width="80" />
<el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('月结客户')" align="left" prop="custName" width="150" :sortable="true" :show-overflow-tooltip="true"/>
<el-table-column :label="$t('总票数')" align="center" prop="totalNum" width="100" :sortable="true" />
<el-table-column :label="$t('总件数')" align="center" prop="parcelQty" width="100" :sortable="true" />
<el-table-column :label="$t('总重量')" align="center" prop="totalBillWeight" width="100" :sortable="true" />
<el-table-column :label="$t('总体积')" align="center" prop="totalVolume" width="100" :sortable="true" />
<el-table-column :label="$t('总体积重量')" align="center" prop="totalVolumeWeight" width="120" :sortable="true" />
<el-table-column :label="$t('结算重量')" align="center" prop="totalSettlementWeight" width="120" :sortable="true" />
<el-table-column :label="$t('运费')" align="center" prop="totalFreight" width="100" :sortable="true" />
</XdTable>
@ -193,10 +110,11 @@ import BillFeeListPanel from '@/views/emis/emisSettleSubBill/panel/BillFeeListPa
import MergeBillForm from '@/views/emis/emisSettleBill/MergeBillForm.vue';
import { parseTime,genJsSeqNo } from "@/utils/custom";
import {timeDiffTime,timeFormat} from '@/utils/dateUtils'
export default {
name: "SettleSubBillConfirmMonthList",
name: "SubBillMonthSumList",
components: {
BillFeeListPanel,
elDateSimplePicker,emisSettleSubBillForm,
@ -463,33 +381,27 @@ export default {
},
created() {
this.queryParams.blConfirmCenter='0';
// this.queryParams.blConfirmSite='1';
this.queryParams.blConfirmSite='1';
this.actionType=this.$route.query.actionType;
const end = new Date()
const start = new Date()
start.setDate(1)
start.setHours(0,0,0,0)
end.setHours(23,59,59,0)
this.dateTimeRange=[timeFormat(start), timeFormat(end)]
this.initData();
this.getList();
},
methods: {
initData(){
this.storageName="SubBillConfirmByMonthList_main";
this.queryParams.blConfirmCenter=0;
},
tableRowClassName({row, rowIndex}) {
if (row.blConfirmCenter=='0') {
return {};
}
else if (row.blConfirmCenter=='1') {
return {};
}
else if (row.blConfirmCenter=='2') {
return {"text-decoration":"line-through","color":"gray"};
}
else if (row.blConfirmCenter=='3' || row.blConfirmSite=='3') {
return {"color": "red !important"}
}
return '';
},
/** 查询结算子账单列表 */
@ -510,105 +422,21 @@ export default {
this.total = response.total;
this.loading = false;
});
// 查询统计
// getQueryStatInfoMap(this.queryParams).then(response => {
// this.queryStatInfoMap = response.data;
// });
},
//指定列求和
// getSummaries(param) {
// const { columns, data } = param;
// // console.log("===>getSummaries==>",param)
// const sums = [];
// columns.forEach((column, index) => {
// if (index === 0) {
// sums[index] = '合计';
// return;
// }
// if (
// column.property === 'waybillDetail.billWeight'
// ) {
// const values = data.map(item => Number(item.waybillDetail.billWeight));
// sums[index] = values.reduce((prev, curr) => {
// const value = Number(curr);
// if (!isNaN(value)) {
// return prev + curr;
// } else {
// return prev;
// }
// }, 0);
// sums[index] = sums[index].toFixed(2); //保留2位小数
// }
handleSumDblClick(row){
this.$router.push({ path: '/ruyERj/SettleSubBillConfirmMonthList',
query: {
actionType: "2",
custNo: row.custNo,
blConfirmSite:this.queryParams.blConfirmSite,
startTime:this.dateTimeRange[0],
endTime:this.dateTimeRange[1],
}
// else if (
// column.property === 'waybillDetail.volumeWeight'
// ) {
// const values = data.map(item => Number(item.waybillDetail.volumeWeight));
// sums[index] = values.reduce((prev, curr) => {
// const value = Number(curr);
// if (!isNaN(value)) {
// return prev + curr;
// } else {
// return prev;
// }
// }, 0);
// sums[index] = sums[index].toFixed(2); //保留2位小数
// }
// else if (
// column.property === 'waybillDetail.freight'
// ) {
// const values = data.map(item => Number(item.waybillDetail.freight));
// sums[index] = values.reduce((prev, curr) => {
// const value = Number(curr);
// if (!isNaN(value)) {
// return prev + curr;
// } else {
// return prev;
// }
// }, 0);
// sums[index] = sums[index].toFixed(2); //保留2位小数
// }
// else if (
// column.property === 'waybillDetail.totalVolume'
// ) {
// const values = data.map(item => Number(item.waybillDetail.totalVolume));
// sums[index] = values.reduce((prev, curr) => {
// const value = Number(curr);
// if (!isNaN(value)) {
// return prev + curr;
// } else {
// return prev;
// }
// }, 0);
// sums[index] = sums[index].toFixed(5); //保留2位小数
// }
// else if(
// column.property === 'waybillDetail.parcelQty'
// ){
// const values = data.map(item => Number(item.waybillDetail.parcelQty));
// sums[index] = values.reduce((prev, curr) => {
// const value = Number(curr);
// if (!isNaN(value)) {
// return prev + curr;
// } else {
// return prev;
// }
// }, 0);
// sums[index];
// }
// });
// console.log(sums);
// return sums
// },
})
},
handleShowTraceInfo(row){
this.openTraceInfoTitle="运单详情【"+row.billCode+"】";
@ -617,96 +445,7 @@ export default {
this.openTraceInfo=true;
},
handleMergeBill(){
if(!this.billName){
this.$modal.msgError("账单名称不能为空!");
return;
}
if(!this.billMonth){
this.$modal.msgError("账单月不能为空!");
return;
}
this.$confirm("确定合账吗?", "提示", {
cancelButtonText: "否",
confirmButtonText: "确定",
type: "warning",
distinguishCancelAndClose: true,
closeOnClickModal: false
}).then(() => {
this.currentSettleBillNo=genJsSeqNo();
let startDate = new Date(this.billMonth+"-01 00:00:00");
let endDate= this.getMonthLast(startDate);
endDate.setHours(23,59,59,0)
let settleBillForm={
settleBillNo: this.currentSettleBillNo,
settleBillName: this.billName,
billMonth: this.billMonth,
settleStartDate:parseTime(startDate),
settleEndDate:parseTime(endDate),
subBillList:this.selectBillList,
}
// 生成合账单号
addEmisSettleBill(settleBillForm).then(response => {
this.$modal.msgSuccess("合并成功");
this.$emit("on-changed");
// this.titleMergeForm="账单-"+this.currentSettleBillNo;
// this.openMergeForm=true;
});
}).catch(() => {});
},
handleAutoMergeBill(){
if(!this.billMonth){
this.$modal.msgError("账单月不能为空!");
return;
}
this.$confirm("确定自动合账吗?", "提示", {
cancelButtonText: "否",
confirmButtonText: "确定",
type: "warning",
distinguishCancelAndClose: true,
closeOnClickModal: false
}).then(() => {
this.currentSettleBillNo=genJsSeqNo();
let startDate = new Date(this.billMonth+"-01 00:00:00");
let endDate= this.getMonthLast(startDate);
endDate.setHours(23,59,59,0)
let settleBillForm={
settleBillNo: this.currentSettleBillNo,
settleBillName: this.billName,
billMonth: this.billMonth,
settleStartDate:parseTime(startDate),
settleEndDate:parseTime(endDate),
subBillList:this.selectBillList,
}
// 生成合账单号
addEmisSettleBill(settleBillForm).then(response => {
this.$modal.msgSuccess("合并成功");
this.$emit("on-changed");
this.titleMergeForm="账单-"+this.currentSettleBillNo;
this.openMergeForm=true;
});
}).catch(() => {});
},
// 获取当前月的最后一天
getMonthLast(date) {
@ -717,9 +456,6 @@ export default {
return new Date(nextMonthFirstDay - oneDay)
},
handleSplit(){
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
@ -740,28 +476,10 @@ export default {
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) {
// this.queryParams.orderByColumn = column.prop;
// this.queryParams.isAsc = column.order;
console.log("==column.prop==>",column.prop);
if(column.prop=='billCode'){
this.queryParams.params.orderByColumn = 'a.billCode';
}
else if(column.prop=='waybillDetail.sendDate'){
this.queryParams.params.orderByColumn = 'sendDate';
}
this.getList();
},
/** 修改按钮操作 */