md
This commit is contained in:
parent
6f9cc6e7b6
commit
a793ec4c0a
@ -127,9 +127,9 @@
|
|||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column :label="$t('运单号')" align="center" prop="billCode" min-width="130" />
|
<el-table-column :label="$t('运单号')" align="center" prop="billCode" min-width="130" />
|
||||||
<!-- <el-table-column :label="$t('标准费')" align="center" prop="standardFee" min-width="100" /> -->
|
<!-- <el-table-column :label="$t('标准费')" align="center" prop="standardFee" min-width="100" /> -->
|
||||||
<el-table-column :label="$t('运单费用')" align="center" prop="billFee" min-width="100" />
|
<el-table-column :label="$t('运单费用')" align="center" prop="billFee" min-width="110" :sortable="true"/>
|
||||||
<el-table-column :label="$t('运输成本')" align="center" prop="costFee" min-width="100" />
|
<el-table-column :label="$t('运输成本')" align="center" prop="costFee" min-width="110" :sortable="true"/>
|
||||||
<el-table-column :label="$t('运单利润')" align="center" prop="billProfit" min-width="100" />
|
<el-table-column :label="$t('运单利润')" align="center" prop="billProfit" min-width="110" :sortable="true"/>
|
||||||
<!-- <el-table-column :label="$t('运单号')" align="center" prop="billCode" min-width="130" :sortable="true" /> -->
|
<!-- <el-table-column :label="$t('运单号')" align="center" prop="billCode" min-width="130" :sortable="true" /> -->
|
||||||
<el-table-column :label="$t('快件类型')" align="center" prop="kjlx" width="180" :show-overflow-tooltip="true">
|
<el-table-column :label="$t('快件类型')" align="center" prop="kjlx" width="180" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -143,7 +143,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('月结客户')" align="center" prop="custName" min-width="150" :sortable="true" :show-overflow-tooltip="true">
|
<el-table-column :label="$t('月结客户')" align="center" prop="custName" min-width="150" :sortable="true" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="['2','4','5'].includes(scope.row.waybillDetail.paymentType)" type="normal">{{ scope.row.custName }}</span>
|
<span v-if="['2','4','5'].includes(scope.row.waybillDetail.paymentType)" type="normal">{{ scope.row.waybillDetail.custName }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
@ -525,11 +525,40 @@ export default {
|
|||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
},
|
},
|
||||||
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
||||||
handleSortChange(column) {
|
getProperty(obj, str) {
|
||||||
this.queryParams.orderByColumn = column.prop;
|
str = str.replace(/\[(\w+)\]/g, ".$1"); // 处理数组下标
|
||||||
this.queryParams.isAsc = column.order;
|
let arr = str.split(".");
|
||||||
this.getList();
|
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.emisTmsCostProfitList = this.emisTmsCostProfitList.sort(
|
||||||
|
this.sortFun(column.prop, column.order === 'ascending')
|
||||||
|
);
|
||||||
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd(row) {
|
handleAdd(row) {
|
||||||
this.currentId=null;
|
this.currentId=null;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user