@@ -116,6 +116,12 @@
ViewSettlementInformation(slotProps.scope)"> 结算信息
ViewTransactionInformation(slotProps.scope)"> 异常信息
+ handleConfirmCustomer(slotProps.scope)"
+ >
+ 确认结算
+
@@ -158,7 +164,7 @@ import {
getopenOrderAdvancePageList,
postOpenOrderFreezeByAdvanceIds,
} from '@/api/waybill/TemporaryStorageList';
-import { postPageList } from '@/api/finance/CustomerSettlement';
+import { postPageList, postEnterBalance } from '@/api/finance/CustomerSettlement';
import {
downloadXls,
setNodeHeight,
@@ -242,8 +248,6 @@ const details = reactive
({
pageSize: 30,
total: 0,
},
- /** 列表Dom节点 */
- listNode: '',
form: {},
});
@@ -251,25 +255,13 @@ const tableNodeRef = ref();
const { search, query, shortcuts, selectionList, drawerShow, page, defaultTime2 } = toRefs(details);
-/** vuex */
-const permission = computed(() => mapGetters(['permission', 'tagWel', 'tagList']));
-console.log('permission :>> ', permission);
-
-onMounted(() => {
- const timer = setTimeout(() => {
- details.listNode = document.querySelector('.maboxhi');
- details.listNode.style.transition = 'all .5s ease-out';
- clearTimeout(timer);
- }, 100);
-});
-
/** 请求页面数据 */
const onLoad = async (params = {}) => {
try {
// 开启列表loading动画
details.loadingObj.list = true;
const queryCopy = { ...details.query };
- await TimeProcessing(queryCopy);
+ TimeProcessing(queryCopy);
const submitData = { ...queryCopy, ...params, ...details.page };
// 获取暂存单列表
const res = await postPageList(submitData);
@@ -409,6 +401,25 @@ const ViewTransactionInformation = ({ row }) => {
query: { balanceOrderInfoId: row.id, backPath: '/finance/CustomerSettlement' },
});
};
+
+const handleConfirmCustomer = ({ row }) => {
+ ElMessageBox.confirm(`【 ${row.balanceOrderNo} 】 确认结算`, '提示', {
+ type: 'warning',
+ }).then(async () => {
+ try {
+ details.loadingObj.pageLoading = true;
+ const res = await postEnterBalance({ balanceOrderInfoId: row.id });
+ const { code, msg } = res.data;
+ if (code !== 200) return;
+ msg && ElMessage.success(msg);
+ onLoad();
+ } catch (error) {
+ console.log('error :>> ', error);
+ } finally {
+ details.loadingObj.pageLoading = false;
+ }
+ });
+};