Explorar o código

完善总账导出功能

shaogen1995 %!s(int64=4) %!d(string=hai) anos
pai
achega
937d400aee
Modificáronse 2 ficheiros con 23 adicións e 2 borrados
  1. 11 1
      src/views/collect/collect0.vue
  2. 12 1
      src/views/holding/holding3.vue

+ 11 - 1
src/views/collect/collect0.vue

@@ -188,9 +188,19 @@ export default {
   // 方法集合
   methods: {
     // 点击查询
-    inquire () {
+    async inquire () {
       this.mydata.pageNum = 1
       this.getHolding3List(this.mydata)
+      // 根据查询条件得到所有符合条件的给导出
+      const res = await getHolding3List({ ...this.mydata, pageNum: 1, pageSize: 99999 })
+      this.json_data = res.data.list
+      this.json_data.forEach(v => {
+        v.numTypeId = this.mycategory(v.numTypeId)
+        if (v.amountType === 0) v.amountType = '单件'
+        else if (v.amountType === 1) v.amountType = '一套多件'
+        v.integrity = this.spoil(v.integrity)
+        v.repair = this.mySave(v.repair)
+      })
     },
     // 分页器
     currentChange (val) {

+ 12 - 1
src/views/holding/holding3.vue

@@ -147,6 +147,7 @@ export default {
         通高: 'height',
         具体质量: 'quality',
         完残程度: 'integrity',
+        完残状况: 'repairRemark',
         保存状态: 'repair',
         入藏时间范围: 'checkInScope'
       },
@@ -189,9 +190,19 @@ export default {
   // 方法集合
   methods: {
     // 点击查询
-    inquire () {
+    async inquire () {
       this.mydata.pageNum = 1
       this.getHolding3List(this.mydata)
+      // 根据查询条件得到所有符合条件的给导出
+      const res = await getHolding3List({ ...this.mydata, pageNum: 1, pageSize: 99999 })
+      this.json_data = res.data.list
+      this.json_data.forEach(v => {
+        v.numTypeId = this.mycategory(v.numTypeId)
+        if (v.amountType === 0) v.amountType = '单件'
+        else if (v.amountType === 1) v.amountType = '一套多件'
+        v.integrity = this.spoil(v.integrity)
+        v.repair = this.mySave(v.repair)
+      })
     },
     // 分页器
     currentChange (val) {