ソースを参照

fix: 客户账期

lyc 1 日 前
コミット
24f70b4735

+ 8 - 0
src/api/usermoneysum/apiUserMoneySum.ts

@@ -19,6 +19,7 @@ enum Api {
     downloadRecharge = '/api/userMoneyReport/downloadRecharge',//充值记录导出
     refundMoney ='/api/UserMoneyDetail/refundMoney',//退款
     sumMoneytDownload = '/api/userMoneySumReport/sumMoneytDownload', //客户总账导出
+    getAccountPeriod = '/api/accountPeriod/getAccountPeriod',//客户账期
 }
 
 /**
@@ -146,4 +147,11 @@ export const api_downloadMoneyRecharge = async (parms: UserMoneyDetailParam) =>
  */
 export const api_sumMoneytDownload = async (parms: UserMoneySumParam) => {
     return await http.download(Api.sumMoneytDownload, parms)
+}
+
+/**
+ * 客户总账查询
+ */
+export const api_getAccountPeriod = async (parms: { customerId: number }) => {
+    return await http.get(Api.getAccountPeriod, parms)
 }

+ 12 - 5
src/composables/userMoneySumDetail/userMoneySumDetail.ts

@@ -1,4 +1,4 @@
-import { api_deOverseasReportdownload, api_DownloadCompanyProfit, api_FangCangMoneyReportdownload, api_jianAiMoneyReportdownload, api_UserBalance, api_UserMoneyDetail, api_xbAndKpReportdownload, api_XiKeMoneyReportdownload, api_YingChiMoneyReportdownload } from '@/api/usermoneysum/apiUserMoneySum';
+import { api_deOverseasReportdownload, api_DownloadCompanyProfit, api_FangCangMoneyReportdownload, api_getAccountPeriod, api_jianAiMoneyReportdownload, api_UserBalance, api_UserMoneyDetail, api_xbAndKpReportdownload, api_XiKeMoneyReportdownload, api_YingChiMoneyReportdownload } from '@/api/usermoneysum/apiUserMoneySum';
 import { UserMoneyDetailParam } from '@/api/usermoneysum/apiUserMoneySumModel';
 import { ActionOptions } from '@/components/DropDownButtons/type';
 import { BasicTableProps } from '@/components/VxeTable';
@@ -65,8 +65,8 @@ function userMoneySumDetailList(usermoneyGridOptions: BasicTableProps) {
         endDate: undefined,//结束时间
         billDate: undefined,//账单时间
         reportQueryDateType: 0,//时间类型 1 充值时间 0 创建时间
-        salesmanId: undefined,//账期类型
-        accountPeriod: undefined,//业务员
+        salesmanId: undefined,//业务员
+        accountPeriod: undefined,//账期类型
         reportBatchQuery: false,//报表账单分批查询
         lastCycleOrder: false,//上周期收货订单
         consumeFlag: 1,
@@ -152,9 +152,16 @@ function userMoneySumDetailList(usermoneyGridOptions: BasicTableProps) {
         }
     })
     // 获取客户名称
-    const hanleCustomer = (val) => {
-        const findObj = unref(customertList).find(item => item.value === val)
+    const hanleCustomer = (customerId) => {
+        const findObj = unref(customertList).find(item => item.value === customerId)
         queryUserMoneySumDetailForm.customerName = findObj?.label
+        if (customerId) {
+            api_getAccountPeriod({ customerId }).then((res) => {
+                if (res.data) {
+                    queryUserMoneySumDetailForm.accountPeriod = res.data.accountPeriod
+                }
+            })
+        }
     }
     // 分公司名称
     const changeBranchCompanyName = (val) => {

+ 1 - 1
src/views/userMoneyDetail/userMoneyDetailList.vue

@@ -88,7 +88,7 @@
           >
             <BaseSelect
               v-model:modelValue="queryUserMoneySumDetailForm.accountPeriod"
-              :clearable="true"
+              :clearable="false"
               class="define-select"
               :filterable="false"
               :options="accountPeriodTypeList"