Commit c7eb7a1c by chenwq

优化RecordTransfer组件,更新费用类别显示逻辑

1 parent 41e47121
......@@ -32,7 +32,7 @@
:label-width="labelWidth"
:search-form="searchForm">
<!-- 同步状态 -->
<div slot="jdSyncStatusHtml">
<!-- <div slot="jdSyncStatusHtml">
<el-select v-model="searchForm.jdSyncType"
placeholder="请选择"
style="width: 45%;margin-right: 10px;"
......@@ -45,12 +45,6 @@
:label="item.confValue"
:value="item.confId">
</el-option>
<!-- <el-option label="流水明细"
value="1"></el-option>
<el-option label="回单"
value="2"></el-option>
<el-option label="快照"
value="3"></el-option> -->
</el-select>
<el-select v-model="searchForm.jdSyncStatus"
placeholder="请选择"
......@@ -65,7 +59,7 @@
:value="item.confId">
</el-option>
</el-select>
</div>
</div> -->
<!-- 交易金额 -->
<div slot="transactionMoneyHtml">
<InputRange end-placeholder="最大金额"
......@@ -213,7 +207,7 @@ export default {
transactionTime: "",
receiptStatus: "",
receiptJdSync: "",
jdSyncType: "",
// jdSyncType: "",
jdSyncStatus: "",
dataSource: "",
uses: "",
......@@ -308,11 +302,12 @@ export default {
// optionLabel: 'confValue',
// optionsName: 'jdSyncOpt'
// },
// {
// label: "同步状态",
// name: "jdSyncStatus",
// addHtml: "jdSyncStatusHtml",
// },
{
label: "同步状态",
name: "jdSyncStatus",
addHtml: "jdSyncStatusHtml",
}, {
label: "交易时间",
name: "transactionTime",
// addHtml: "transactionTimeHtml"
......@@ -429,19 +424,6 @@ export default {
return this.baseData.receiptStatusOpt.find(item => item.confId === cellValue.receiptStatus)?.confValue;
},
}, {
label: "同步状态(快照)",
prop: "h5JdSync",
width: "150px",
formatter: (cellValue) => {
return this.baseData.jdSyncOpt.find(item => item.confId === cellValue.h5JdSync)?.confValue;
},
className: (cellValue) => {
return {
0: "redSpot",
1: "greenSpot",
}[cellValue.h5JdSync];
},
}, {
label: "数据来源",
prop: "dataSource",
width: "100px",
......@@ -574,25 +556,25 @@ export default {
delete this.searchFormSearch.amtMin;
delete this.searchFormSearch.amtMax;
}
if (this.searchFormSearch.jdSyncType == "1") {
this.searchFormSearch.jdSync = this.searchFormSearch.jdSyncStatus;
} else if (this.searchFormSearch.jdSyncType == "2") {
this.searchFormSearch.receiptJdSync = this.searchFormSearch.jdSyncStatus;
} else if (this.searchFormSearch.jdSyncType == "3") {
this.searchFormSearch.h5JdSync = this.searchFormSearch.jdSyncStatus;
} else {
if (this.searchFormSearch.jdSyncStatus == 0 || this.searchFormSearch.jdSyncStatus == 1) {
this.searchFormSearch.jdSync = this.searchFormSearch.jdSyncStatus;
this.searchFormSearch.receiptJdSync = this.searchFormSearch.jdSyncStatus;
this.searchFormSearch.h5JdSync = this.searchFormSearch.jdSyncStatus;
} else {
delete this.searchFormSearch.jdSync;
delete this.searchFormSearch.receiptJdSync;
delete this.searchFormSearch.h5JdSync;
}
}
delete this.searchFormSearch.jdSyncType;
delete this.searchFormSearch.jdSyncStatus;
// if (this.searchFormSearch.jdSyncType == "1") {
// this.searchFormSearch.jdSync = this.searchFormSearch.jdSyncStatus;
// } else if (this.searchFormSearch.jdSyncType == "2") {
// this.searchFormSearch.receiptJdSync = this.searchFormSearch.jdSyncStatus;
// } else if (this.searchFormSearch.jdSyncType == "3") {
// this.searchFormSearch.h5JdSync = this.searchFormSearch.jdSyncStatus;
// } else {
// if (this.searchFormSearch.jdSyncStatus == 0 || this.searchFormSearch.jdSyncStatus == 1) {
// this.searchFormSearch.jdSync = this.searchFormSearch.jdSyncStatus;
// this.searchFormSearch.receiptJdSync = this.searchFormSearch.jdSyncStatus;
// this.searchFormSearch.h5JdSync = this.searchFormSearch.jdSyncStatus;
// } else {
// delete this.searchFormSearch.jdSync;
// delete this.searchFormSearch.receiptJdSync;
// delete this.searchFormSearch.h5JdSync;
// }
// }
// delete this.searchFormSearch.jdSyncType;
// delete this.searchFormSearch.jdSyncStatus;
resolve();
});
},
......@@ -645,7 +627,7 @@ export default {
transactionTime: "",
receiptStatus: "",
receiptJdSync: "",
jdSyncType: "",
// jdSyncType: "",
jdSyncStatus: "",
dataSource: "",
uses: "",
......
......@@ -46,7 +46,7 @@
<span v-for="item in editData.expenseCategoryList"
:key="item.expenseCategoryId"
class="expense-category-item">
{{ item.expenseCategoryName }}
{{ getCategoryTxt(item) }}
</span>
</div>
</template>
......@@ -71,6 +71,9 @@
<script>
import { getTransferRecord } from "@api/accountManage";
import { deepClone, downLoadFile, Util } from "@/common/util";
import {
EXPENSE_CATEGORY_OPTIONS,
} from "../accountStateManage/marketTransfer";
export default {
name: "RecordTransfer",
......@@ -204,7 +207,7 @@ export default {
addHtml: "expenseCategoryHtml",
},
...(record.expenseCategoryList || []).map(item => ({
label: `${item.expenseCategoryName}金额`,
label: EXPENSE_CATEGORY_OPTIONS.find(i => i.id == item.expenseCategoryId).label + "金额",
name: `expenseAmount_${item.expenseCategoryId}`,
type: "showTxt",
formatter: row => row[`expenseAmount_${item.expenseCategoryId}`] ?? "",
......@@ -213,6 +216,7 @@ export default {
label: "收款账户",
name: "rcvBankName",
type: "showTxt",
formatter: row => row.rcvName + " / " + row.rcvAcc,
},
];
formData.splice(amountIndex, 0, ...expenseFields);
......@@ -251,6 +255,9 @@ export default {
this.logList = this.editData.logList || [];
});
},
getCategoryTxt(item) {
return EXPENSE_CATEGORY_OPTIONS.find(i => i.id == item.expenseCategoryId)?.label || item.expenseCategoryName;
},
dealTabList() {
const statusObj = {
1: "审批中",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!