snow 8 months ago
parent
commit
0492f893dc

BIN
dist-zip/build.zip


+ 73 - 6
src/views/InvoiceSales/inspectTicketBill/config/search.config.ts

@@ -1,9 +1,10 @@
 import { FormConfig } from "/@/components/PageSearch";
-import {
-  xs_inv_type_list,
-  useTypeOptions,
-  invoiceTypeList
-} from "/@/utils/status";
+import dayjs from "dayjs"
+import quarterOfYear from 'dayjs/plugin/quarterOfYear'
+
+dayjs.extend(quarterOfYear)
+const start = dayjs().startOf('month').format('YYYY-MM-DD')
+const end = dayjs().endOf('month').format('YYYY-MM-DD')
 
 const searchFormConfig: FormConfig = {
   formItems: [
@@ -12,12 +13,78 @@ const searchFormConfig: FormConfig = {
       type: "date_picker",
       span: 7,
       label:' 账单日期',
+      defaultValue: [start, end],
       otherOptions: {
         type: "daterange",
         startProp: "start",
         endProp: "end",
         startPlaceholder: "开始时间",
-        endPlaceholder: "结束时间"
+        endPlaceholder: "结束时间",
+        shortcuts: [
+          {
+            text:'本月',
+            value(){
+              const start = dayjs().startOf('month').format('YYYY-MM-DD')
+              const end = dayjs().endOf('month').format('YYYY-MM-DD')
+              return [start, end]
+            }
+          },
+          {
+            text:'上月',
+            value(){
+              const start = dayjs().add(-1, 'month').startOf('month').format('YYYY-MM-DD')
+              const end = dayjs().add(-1, 'month').endOf('month').format('YYYY-MM-DD')
+              return [start, end]
+            }
+          },
+          {
+            text:'当前季度',
+            value(){
+              const date = dayjs();
+              const y = date.year();
+              const q = date.quarter();
+              const mStart = q * 3 - 2;
+              const mEnd = q * 3;
+              const start = dayjs(`${y}-${mStart}`).startOf('month').format('YYYY-MM-DD');
+              const end = dayjs(`${y}-${mEnd}`).endOf('month').format('YYYY-MM-DD');
+              return [start, end]            
+            }
+          },
+          {
+            text:'上一季度',
+            value(){
+              const date = dayjs();
+              const y = date.year();
+              const q = date.quarter();
+              let start = '';
+              let end = '';
+             
+              if (q < 2) {
+                start = dayjs(`${y - 1}-${10}`)
+                  .startOf('month')
+                  .format('YYYY-MM-DD');
+                end = dayjs(`${y - 1}-${12}`)
+                  .endOf('month')
+                  .format('YYYY-MM-DD');
+              } else {
+                const mStart = (q - 1) * 3 - 2;
+                const mEnd = (q - 1) * 3;
+                start = dayjs(`${y}-${mStart}`).startOf('month').format('YYYY-MM-DD');
+                end = dayjs(`${y}-${mEnd}`).endOf('month').format('YYYY-MM-DD');
+              }
+             
+              return [start, end];
+            }
+          },
+          {
+            text:'本年',
+            value(){
+              const start = dayjs().startOf('year').format('YYYY-MM-DD')
+              const end = dayjs().endOf('year').format('YYYY-MM-DD')
+              return [start, end]
+            }
+          }
+        ]
       }
     }
   ]

+ 1 - 0
src/views/InvoiceSales/supplierPayRelive/component/choose-modal.vue

@@ -43,6 +43,7 @@ async function requestPaymentList() {
 
   const { code, message, data } = await httpList({
     status: "4",
+    is_comon: '1',
     [currentKey.value]: currentValue,
     companyNo: currentCompany.value.companyNo,
     startTime: timer[0],

+ 1 - 1
src/views/InvoiceSales/supplierPayRelive/detail.vue

@@ -49,7 +49,7 @@ const { run: payDetailRun, data: payDetailData } = useAsync<
 });
 
 const { run: create } = useAsync({
-  success: () => push("/purchase/purchPayRelive")
+  success: () => push("/InvoiceSales/supplierPayRelive")
 });
 
 const { run: approval } = useAsync({

+ 1 - 1
src/views/purchase/purchPayRelive/component/choose-modal.vue

@@ -153,7 +153,7 @@ defineExpose({
           <div w-full flex justify-between>
 
           <el-col :span="8">
-            <el-select v-model="formData.is_comon" style="width: 155px" placeholder="业务类型">
+            <el-select v-model="formData.is_comon" style="width: 155px" placeholder="业务类型" @change="() => handleSearch(false)">
                <el-option 
                 v-for="option in orderTypeCgOptions" 
                 :label="option.label" 

+ 1 - 1
src/views/purchase/ticketReturnRelive/components/choose-modal.vue

@@ -157,7 +157,7 @@ defineExpose({
         </el-col>
 
         <el-col :span="6">
-          <el-select v-model="formData.is_comon" style="width: 155px" placeholder="业务类型">
+          <el-select v-model="formData.is_comon" style="width: 155px" placeholder="业务类型" @change="() => handleSearch(false)">
             <el-option v-for="option in orderTypeCgOptions_2" :label="option.label" :value="option.value" />
           </el-select>
         </el-col>

+ 1 - 1
src/views/supply/purchPayRelive/component/choose-modal.vue

@@ -136,7 +136,7 @@ defineExpose({
         </el-col>
 
         <el-col :span="6">
-          <el-select v-model="formData.is_comon" style="width: 155px" placeholder="业务类型">
+          <el-select v-model="formData.is_comon" style="width: 155px" placeholder="业务类型" @change="() => handleSearch(false)">
             <el-option v-for="option in orderTypeCgOptions_2" :label="option.label" :value="option.value" />
           </el-select>
         </el-col>

+ 1 - 1
src/views/supply/ticketReturnRelive/components/choose-modal.vue

@@ -181,7 +181,7 @@ defineExpose({
         </el-col>
 
         <el-col :span="6">
-            <el-select v-model="formData.is_comon" style="width: 155px" placeholder="业务类型">
+            <el-select v-model="formData.is_comon" style="width: 155px" placeholder="业务类型" @change="() => handleSearch(false)">
                <el-option 
                 v-for="option in orderTypeCgOptions_2" 
                 :label="option.label"