md
This commit is contained in:
parent
97bd4c3811
commit
22d46ffe97
516
src/views/emis/emisSettleSubBill/SubBillListReadOnly.vue
Normal file
516
src/views/emis/emisSettleSubBill/SubBillListReadOnly.vue
Normal file
@ -0,0 +1,516 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
border
|
||||
size="mini"
|
||||
|
||||
ref="refTable"
|
||||
row-key="id"
|
||||
storageName="SubBillConfirmBySiteList_main_dtl12"
|
||||
:data="emisSettleSubBillList"
|
||||
:showSearch.sync="showSearch"
|
||||
:queryParams="queryParams"
|
||||
:total="total"
|
||||
@queryTable="getList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<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>
|
||||
|
||||
<div style="width: 500px;">
|
||||
<BillFeeListPanel :key="'feeitem_'+scope.$index" :feeitemList="scope.row.feeitemList"></BillFeeListPanel>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('运单号')" align="center" prop="billCode" min-width="130" />
|
||||
<el-table-column :label="$t('发件人')" align="center" prop="fjr" width="200" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.waybillDetail.sendName }}--{{ scope.row.waybillDetail.receiveName }}</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="paymentStatus" width="100" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.paymentStatus=='0'" type="error">未收款</el-tag>
|
||||
<el-tag v-if="scope.row.paymentStatus=='1'" type="success">已收款</el-tag>
|
||||
<el-tag v-if="scope.row.paymentStatus=='2'" type="warning">部分收款</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('开票状态')" align="center" prop="openBillStatus" width="100" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.openBillStatus=='0'" type="error">未开票</el-tag>
|
||||
<el-tag v-if="scope.row.openBillStatus=='1'" type="success">已开票</el-tag>
|
||||
<el-tag v-if="scope.row.openBillStatus=='2'" type="warning">部分开票</el-tag>
|
||||
<el-tag v-if="scope.row.openBillStatus=='3'" type="warning">不开票</el-tag>
|
||||
<el-tag v-if="scope.row.openBillStatus=='4'" type="success">已完成</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('已收款金额')" align="center" prop="recedMoney" width="120" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('已开票金额')" align="center" prop="invoicedMoney" width="120" :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.receiveProvinceName" min-width="80" :show-overflow-tooltip="true"/>
|
||||
|
||||
<el-table-column :label="$t('产品类型')" align="center" prop="waybillDetail.productTypeName" min-width="120" :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.sendDate" min-width="170" :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" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('月结客户')" align="center" prop="custName" min-width="150" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span type="normal">{{ scope.row.custName }} - {{ scope.row.custNo }}</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="80" />
|
||||
<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.remark" min-width="80" :show-overflow-tooltip="true" />
|
||||
<el-table-column :label="$t('回款联系人')" align="center" prop="waybillDetail.payee" min-width="100" />
|
||||
<el-table-column :label="$t('销售联系人')" align="center" prop="waybillDetail.salesmen" min-width="100" />
|
||||
</el-table >
|
||||
|
||||
<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>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEmisSettleSubBill,getQueryStatInfoMap,
|
||||
} from "@/api/emis/emisSettleSubBill";
|
||||
|
||||
import { listEmisSettleBill, addEmisSettleBill } from "@/api/emis/emisSettleBill";
|
||||
import TraceWaybillDetailView from '@/views/emis/customerService/traceWaybillDetailView.vue';
|
||||
|
||||
import { parseTime,genJsSeqNo } from "@/utils/custom";
|
||||
|
||||
export default {
|
||||
name: "SubBillConfirmBySiteList",
|
||||
props:{
|
||||
settleBillNo:{
|
||||
type:String
|
||||
}
|
||||
},
|
||||
components: {
|
||||
TraceWaybillDetailView,
|
||||
},
|
||||
dicts: ['emis_qujian_fangshi','emis_declare_mode','emis_customs_clear',
|
||||
'emis_tab_packing_type','emis_tab_dispatch_mode','emis_payment_type',
|
||||
'emis_calc_fee_type','emis_print_type','emis_payment_status','emis_waybill_status','emis_tab_dispatch_mode'
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
activeTab: "waitConfirm",
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 创建时间搜索
|
||||
dateTimeRange:[],
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 结算子账单表格数据
|
||||
emisSettleSubBillList: [],
|
||||
|
||||
actionType:null,
|
||||
settleType:null,
|
||||
|
||||
billName:null,
|
||||
billMonth:null,
|
||||
|
||||
titleMergeForm:null,
|
||||
openMergeForm:false,
|
||||
|
||||
currentSettleBillNo:null,
|
||||
selectBillList:[],
|
||||
|
||||
|
||||
storageName:null,
|
||||
|
||||
queryStatInfoMap:null,
|
||||
|
||||
currentId:null,
|
||||
openForm: false,
|
||||
titleForm: "",
|
||||
|
||||
openTraceInfo:false,
|
||||
openTraceInfoTitle:null,
|
||||
currentTraceBillItem:null,
|
||||
currentTraceBillCode:null,
|
||||
|
||||
// 时间搜索
|
||||
// 弹出展示层
|
||||
id:null,
|
||||
titleView:"",
|
||||
openView: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 5000,
|
||||
billNo: null,
|
||||
settleBillNo: this.settleBillNo,
|
||||
},
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
settleBillNo(newVal){
|
||||
this.settleBillNo=settleBillNo;
|
||||
this.queryParams.settleBillNo=settleBillNo
|
||||
this.initData();
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initData();
|
||||
},
|
||||
methods: {
|
||||
initData(){
|
||||
this.getList()
|
||||
},
|
||||
|
||||
/** 查询结算子账单列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listEmisSettleSubBill(this.queryParams).then(response => {
|
||||
this.emisSettleSubBillList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
|
||||
},
|
||||
//指定列求和
|
||||
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位小数
|
||||
}
|
||||
|
||||
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+"】";
|
||||
this.currentTraceBillCode=row.billCode;
|
||||
this.currentTraceBillItem=row.waybillDetail;
|
||||
this.openTraceInfo=true;
|
||||
},
|
||||
|
||||
|
||||
// 获取当前月的最后一天
|
||||
getMonthLast(date) {
|
||||
var currentMonth = date.getMonth()
|
||||
var nextMonth = ++currentMonth
|
||||
var nextMonthFirstDay = new Date(date.getFullYear(), nextMonth, 1)
|
||||
var oneDay = 1000 * 60 * 60 * 24
|
||||
return new Date(nextMonthFirstDay - oneDay)
|
||||
},
|
||||
|
||||
handleSplit(){
|
||||
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
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;
|
||||
}
|
||||
},
|
||||
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;
|
||||
}
|
||||
},
|
||||
|
||||
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
||||
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.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);
|
||||
}
|
||||
console.log('Finished')
|
||||
},
|
||||
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.currentId= row.id;
|
||||
this.openForm = true;
|
||||
this.titleForm = "修改";
|
||||
},
|
||||
handleConfirmByCenter(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认').then(function() {
|
||||
return confirmBillByCenter(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
handleCancelConfirmByCenter(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否取消确认').then(function() {
|
||||
return cancelConfirmBillByCenter(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
handleConfirmNoBillByCenter(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$prompt('请输入不出账原因', "操作确认", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
closeOnClickModal: false,
|
||||
inputPattern: /^.{1,30}$/,
|
||||
inputErrorMessage: "原因长度必须介于 1 和 30 之间"
|
||||
}).then(({ value }) => {
|
||||
confirmNoBillByCenter(ids,value).then(response => {
|
||||
this.$modal.msgSuccess("操作成功" );
|
||||
this.getList();
|
||||
});
|
||||
}).catch(() => {});
|
||||
},
|
||||
handleSetBillErrorByCenter(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$prompt('请输入账单异常原因', "操作确认", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
closeOnClickModal: false,
|
||||
inputPattern: /^.{1,30}$/,
|
||||
inputErrorMessage: "原因长度必须介于 1 和 30 之间"
|
||||
}).then(({ value }) => {
|
||||
setBillErrorByCenter(ids,value).then(response => {
|
||||
this.$modal.msgSuccess("操作成功" );
|
||||
this.getList();
|
||||
});
|
||||
}).catch(() => {});
|
||||
},
|
||||
|
||||
handleFormChanged(){
|
||||
this.openForm = false;
|
||||
this.getList();
|
||||
},
|
||||
cancelForm(){
|
||||
this.openForm = false;
|
||||
},
|
||||
|
||||
/** 列索引函数 */
|
||||
getIndex($index) {
|
||||
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
|
||||
},
|
||||
/** 时间搜索响应函数 */
|
||||
dateTimeChange(value){
|
||||
this.dateTimeRange=value;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.feeItem{
|
||||
|
||||
border: 1px solid #dfe6ec;
|
||||
margin-bottom:50px;
|
||||
|
||||
ul{
|
||||
list-style: none;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
width: 590px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
border: 1px solid #dfe6ec;
|
||||
border-top: 0px;
|
||||
font-size: 12px;
|
||||
|
||||
}
|
||||
ul li{
|
||||
display:block; width:33%; float:left;text-indent:2em
|
||||
}
|
||||
.th{
|
||||
background:#FFF; font-weight:bold; border-top:1px
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.statInfoValue{
|
||||
color: red;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user