|
@@ -1,49 +1,20 @@
|
|
|
-import { QueryWareHouse } from '@/services/go/ermcp/warehouse-info/index';
|
|
|
|
|
-import { ErmcpWareHouseInfo } from '@/services/go/ermcp/warehouse-info/interface';
|
|
|
|
|
-import { message } from 'ant-design-vue';
|
|
|
|
|
|
|
+import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
|
|
|
|
|
+import { queryAccountInOutApply } from '@/services/go/ermcp/qhj';
|
|
|
|
|
+import { QhjAccountOutInApply } from '@/services/go/ermcp/qhj/interface';
|
|
|
import { ref } from 'vue';
|
|
import { ref } from 'vue';
|
|
|
|
|
|
|
|
-// export function queryTableList(type: 'in' | 'out') {
|
|
|
|
|
-// // 加载状态
|
|
|
|
|
-// const loading = ref<boolean>(false);
|
|
|
|
|
-// // 表格数据
|
|
|
|
|
-// const tableList = ref<QhjAccountOutInApply[]>([]);
|
|
|
|
|
-// function queryTable() {
|
|
|
|
|
-// queryResultLoadingAndInfo(queryAccountInOutApply, loading)
|
|
|
|
|
-// .then(res => {
|
|
|
|
|
-// //申请类型 - 1:出金 2:入金 3: 单边账调整:入金; 4:单边账调整:出金 5:外部母账户调整:入金 6:外部母账户调整:出金 7:外部子账户:入金 8:外部子账户:出金
|
|
|
|
|
-// const arr = type === 'in' ? [1, 3, 5, 7] : [2, 4, 6, 8]
|
|
|
|
|
-// tableList.value = res.filter((e: QhjAccountOutInApply) => arr.includes(e.executetype)).map((e: QhjAccountOutInApply, i: number) => {
|
|
|
|
|
-// return { ...e, key: String(i) };
|
|
|
|
|
-// });
|
|
|
|
|
-// })
|
|
|
|
|
-// }
|
|
|
|
|
-// return { loading, tableList, queryTable }
|
|
|
|
|
-// }
|
|
|
|
|
-
|
|
|
|
|
-/**
|
|
|
|
|
- * 获取表格列表数据
|
|
|
|
|
- * @param type
|
|
|
|
|
- * @returns
|
|
|
|
|
- */
|
|
|
|
|
-export function queryTableList(type: string) {
|
|
|
|
|
|
|
+export function queryTableList(type: 'in' | 'out') {
|
|
|
// 加载状态
|
|
// 加载状态
|
|
|
const loading = ref<boolean>(false);
|
|
const loading = ref<boolean>(false);
|
|
|
// 表格数据
|
|
// 表格数据
|
|
|
- const tableList = ref<ErmcpWareHouseInfo[]>([]);
|
|
|
|
|
|
|
+ const tableList = ref<QhjAccountOutInApply[]>([]);
|
|
|
function queryTable() {
|
|
function queryTable() {
|
|
|
- QueryWareHouse('1')
|
|
|
|
|
- .then((res) => {
|
|
|
|
|
- tableList.value = res.map((e, i) => {
|
|
|
|
|
- return { ...e, key: String(i) };
|
|
|
|
|
- });
|
|
|
|
|
- loading.value = false;
|
|
|
|
|
- console.log('查询列表', tableList);
|
|
|
|
|
|
|
+ queryResultLoadingAndInfo(queryAccountInOutApply, loading)
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ //申请类型 - 1:出金 2:入金 3: 单边账调整:入金; 4:单边账调整:出金 5:外部母账户调整:入金 6:外部母账户调整:出金 7:外部子账户:入金 8:外部子账户:出金
|
|
|
|
|
+ const arr = type === 'in' ? [1, 3, 5, 7] : [2, 4, 6, 8]
|
|
|
|
|
+ tableList.value = res.filter((e: QhjAccountOutInApply) => arr.includes(e.executetype))
|
|
|
})
|
|
})
|
|
|
- .catch((err) => {
|
|
|
|
|
- message.error(err);
|
|
|
|
|
- loading.value = false;
|
|
|
|
|
- });
|
|
|
|
|
}
|
|
}
|
|
|
return { loading, tableList, queryTable }
|
|
return { loading, tableList, queryTable }
|
|
|
-}
|
|
|
|
|
|
|
+}
|