Переглянути джерело

Merge branch 'dev1.0' of http://192.168.0.200:3000/suf/front-end-BI into dev1.0

jiand 5 місяців тому
батько
коміт
afc039e8a5

+ 6 - 0
src/api/dataSource/businessLedger/index.ts

@@ -15,3 +15,9 @@ export function getDetail(params?) {
 export function submitBusines(data) {
   return http.post<any, AxiosResponseRes>('/business/standingBook/modify', { data })
 }
+
+
+// 其他业务修改 - 下载
+export function downloadFiles(data) {
+  return http.post<any, AxiosResponseRes>('/business/standingBook/downloadBusinessStandingBook', { data, responseType: 'arraybuffer' })
+}

+ 1 - 1
src/api/dataSource/receiveLendingLedger/index.ts

@@ -20,7 +20,7 @@ export function getOtherDetail(params) {
   return http.get<any, AxiosResponseRes>('/payColl/standingBook/other/detail', { params })
 }
 
-// 其他业务修改 - 详情
+// 其他业务修改 - 下载
 export function downloadFiles(data) {
   return http.post<any, AxiosResponseRes>('/payColl/standingBook/downloadPayCollStandingBook', { data, responseType: 'arraybuffer' })
 }

+ 4 - 4
src/views/dataSource/businessLedger/index.columns.tsx

@@ -5,9 +5,9 @@ import { forMatMoney } from '@utils'
 export function useColumns(search) {
   const router = useRouter()
   const columns: TableColumnList = [
-    {
-      type: 'selection',
-    },
+    // {
+    //   type: 'selection',
+    // },
     {
       label: '序号',
       type: 'index',
@@ -70,7 +70,7 @@ export function useColumns(search) {
     },
     {
       label: '操作',
-      width: '160',
+      width: '100',
       cellRenderer: ({ index, row }) => {
         const btnList = [
           {

+ 9 - 2
src/views/dataSource/businessLedger/index.vue

@@ -47,7 +47,7 @@
           <el-button
             icon="Download"
             v-power="'downloadBusinessStandingBook'"
-            @click="fetchData"
+            @click="downloadClick"
             >下载</el-button
           >
         </div>
@@ -66,9 +66,10 @@
 
 <script lang="ts" setup>
   import { ref, reactive, onMounted } from 'vue'
-  import { getList } from '@api/dataSource/businessLedger'
+  import { getList, downloadFiles } from '@api/dataSource/businessLedger'
   import { useColumns } from './index.columns'
   import { useDictStore } from '@/store/modules/dict'
+  import { exportFile } from '@utils'
 
   defineOptions({
     name: 'ReceiveLendingLedger'
@@ -114,6 +115,12 @@
     search.rows = pageParams.pageSize
     fetchData()
   }
+
+  const downloadClick = () => {
+    downloadFiles({ ...search }).then((res) => {
+      exportFile(res)
+    })
+  }
 </script>
 
 <style lang="scss" scoped></style>

+ 2 - 2
src/views/dataSource/financialStatement/components/AddContent.vue

@@ -60,8 +60,8 @@
         <el-date-picker
           v-model="ruleForm.reportMonth"
           type="month"
-          format="MM"
-          value-format="MM"
+          format="YYYY-MM"
+          value-format="YYYY-MM"
           placeholder="请选择报表月份"
         />
       </el-form-item>