md
This commit is contained in:
parent
3b1de98b2e
commit
c830f5fcc7
@ -142,6 +142,40 @@ export default {
|
||||
},
|
||||
|
||||
methods: {
|
||||
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.emisSettleSubBillList = this.emisSettleSubBillList.sort(
|
||||
this.sortFun(column.prop, column.order === 'ascending')
|
||||
);
|
||||
},
|
||||
initData() {
|
||||
|
||||
if(this.id !=null) {
|
||||
|
||||
@ -48,7 +48,7 @@
|
||||
|
||||
|
||||
ref="refTable"
|
||||
storageName="emisCreditCustomerList_main_250309"
|
||||
storageName="emisCreditCustomerList_main_250310"
|
||||
|
||||
v-loading="loading"
|
||||
border stripe
|
||||
@ -112,13 +112,8 @@
|
||||
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column :label="$t('额度编号')" align="center" prop="accCode" min-width="150" />
|
||||
<el-table-column :label="$t('月结客户')" align="center" prop="customerName" min-width="170" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('固定额度')" align="center" prop="creditMoney" min-width="100" />
|
||||
<el-table-column :label="$t('运输方式')" align="center" prop="transType" min-width="200" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.emis_biz_shipping_method" :value="scope.row.transType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('月结客户')" align="center" prop="customerName" min-width="170" :sortable="true" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('固定额度')" align="center" prop="creditMoney" min-width="120" :sortable="true"/>
|
||||
<!-- <el-table-column label="状态" align="center" prop="blOpen" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
@ -129,19 +124,24 @@
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column :label="$t('剩余额度')" align="center" prop="curMoney" min-width="100" >
|
||||
<el-table-column :label="$t('剩余额度')" align="center" prop="curMoney" min-width="120" :sortable="true" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.creditMoney - scope.row.useMoney }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('已使用额度')" align="center" prop="useMoney" min-width="100" >
|
||||
<el-table-column :label="$t('已使用额度')" align="center" prop="useMoney" min-width="120" :sortable="true">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.useMoney }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('剩余比例(%)')" align="center" prop="curMoneyRate" min-width="100" >
|
||||
<el-table-column :label="$t('剩余比例(%)')" align="center" prop="curMoneyRate" min-width="130" :sortable="true">
|
||||
<template slot-scope="scope">
|
||||
{{ ( ((scope.row.creditMoney - scope.row.useMoney)/scope.row.creditMoney)*100 ).toFixed(2) }}
|
||||
{{ ( ((scope.row.creditMoney - scope.row.useMoney)/scope.row.creditMoney)*100 ).toFixed(2) }}%
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('运输方式')" align="center" prop="transType" min-width="200" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.emis_biz_shipping_method" :value="scope.row.transType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('开始日期')" align="center" prop="startDate" min-width="170" />
|
||||
@ -270,6 +270,41 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
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.emisSettleSubBillList = this.emisSettleSubBillList.sort(
|
||||
this.sortFun(column.prop, column.order === 'ascending')
|
||||
);
|
||||
},
|
||||
|
||||
switchChange(row){
|
||||
let form={id:row.id,blOpen:row.blOpen}
|
||||
updateEmisCreditCustomer(form).then(response => {
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
<XdTable v-loading="loading"
|
||||
|
||||
ref="refTable"
|
||||
storageName="emisCreditSalesmenList_main_250309"
|
||||
storageName="emisCreditSalesmenList_main_250310"
|
||||
|
||||
border stripe
|
||||
size="small"
|
||||
@ -101,13 +101,9 @@
|
||||
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column :label="$t('额度编号')" align="center" prop="accCode" min-width="150" />
|
||||
<el-table-column :label="$t('员工姓名')" align="center" prop="salesmen" min-width="100" />
|
||||
<el-table-column :label="$t('固定额度')" align="center" prop="creditMoney" min-width="100" />
|
||||
<el-table-column :label="$t('运输方式')" align="center" prop="transType" min-width="200" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.emis_biz_shipping_method" :value="scope.row.transType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('员工姓名')" align="center" prop="salesmen" min-width="120" :sortable="true"/>
|
||||
<el-table-column :label="$t('固定额度')" align="center" prop="creditMoney" min-width="120" :sortable="true" />
|
||||
|
||||
<!-- <el-table-column label="状态" align="center" prop="blOpen" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
@ -118,19 +114,24 @@
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column :label="$t('剩余额度')" align="center" prop="curMoney" min-width="100" >
|
||||
<el-table-column :label="$t('剩余额度')" align="center" prop="curMoney" min-width="120" :sortable="true">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.creditMoney - scope.row.useMoney }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('已使用额度')" align="center" prop="useMoney" min-width="100" >
|
||||
<el-table-column :label="$t('已使用额度')" align="center" prop="useMoney" min-width="120" :sortable="true">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.useMoney }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('剩余比例(%)')" align="center" prop="curMoneyRate" min-width="100" >
|
||||
<el-table-column :label="$t('剩余比例(%)')" align="center" prop="curMoneyRate" min-width="130" >
|
||||
<template slot-scope="scope">
|
||||
{{ ( ((scope.row.creditMoney - scope.row.useMoney)/scope.row.creditMoney)*100 ).toFixed(2) }}
|
||||
{{ ( ((scope.row.creditMoney - scope.row.useMoney)/scope.row.creditMoney)*100 ).toFixed(2) }}%
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('运输方式')" align="center" prop="transType" min-width="200" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.emis_biz_shipping_method" :value="scope.row.transType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('开始日期')" align="center" prop="startDate" min-width="170" />
|
||||
|
||||
@ -838,7 +838,7 @@ export default {
|
||||
this.queryParams.paymentType='1,3';
|
||||
}
|
||||
|
||||
this.queryParams.transType=this.$route.query.transType;
|
||||
this.queryParams.carryType=this.$route.query.transType;
|
||||
|
||||
this.queryParams.paymentStatus='0,2';
|
||||
this.queryParams.params.problemQueryType=2;
|
||||
@ -869,7 +869,7 @@ export default {
|
||||
this.queryParams.paymentType='1,3';
|
||||
}
|
||||
|
||||
this.queryParams.transType=this.$route.query.transType;
|
||||
this.queryParams.carryType=this.$route.query.transType;
|
||||
|
||||
this.queryParams.paymentStatus='0,2';
|
||||
this.queryParams.params.problemQueryType=2;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user