dct 3 månader sedan
förälder
incheckning
0c5c8251b9

+ 33 - 6
src/pages/queryReport/checkQuery.vue

@@ -209,11 +209,11 @@
         >
           搜索
         </el-button>
-        <!-- <el-button
+        <el-button
           type="primary"
-          @click="dataExport">
+          @click="reportExport">
           导出
-        </el-button> -->
+        </el-button>
       </div>
     </el-form>
 
@@ -227,20 +227,20 @@
         v-loading="loading"
         :data="tableData">
         <el-table-column
-          width="150"
+          width="120"
           prop="otaSourceName"
           label="销售渠道"
         >
         </el-table-column>
         <el-table-column
-          width="240"
+          width="220"
           prop="orderNo"
           label="订单号"
         >
         </el-table-column>
         <el-table-column
           prop="ticketNo"
-          width="150"
+          width="160"
           label="票号"
         >
         </el-table-column>
@@ -440,6 +440,33 @@ export default {
       })
       this.reset()
     },
+    reportExport () {
+      this.$confirm(`是否要导出明细数据`, '确认提示', {
+        confirmButtonText: '是',
+        cancelButtonText: '否',
+        type: 'warning'
+      }).then(() => {
+        this.handleExport({
+          ...this.form,
+          export: true,
+          exportDetail: true
+        })
+      }).catch(() => {
+        this.handleExport({
+          ...this.form,
+          export: true,
+          exportDetail: false
+        })
+      })
+    },
+    handleExport (params) {
+      getCheckList(params).then(() => {
+        this.$message.success('导出成功。')
+        this.goToDownload()
+      }, () => {
+        this.$message.success('导出失败。')
+      })
+    },
     getList () {
       this.loading = true
 

+ 24 - 23
src/pages/queryReport/checkStatistic.vue

@@ -61,7 +61,7 @@
       </el-form-item>
       <!-- 新增分组筛选项 -->
 
-       <el-form-item
+      <el-form-item
         label="分组筛选"
         style="width:100%">
         <el-checkbox-group
@@ -129,7 +129,7 @@ import { totalRowClassName } from '@/utils'
 import moment from 'moment'
 import { getSaleChannelList } from '@/api/order'
 // import ReaderInput from '@/components/ReaderInput'
-// import draggable from 'vuedraggable'
+import draggable from 'vuedraggable'
 // import moment from 'moment'
 
 export default {
@@ -152,10 +152,11 @@ export default {
     }
   },
   components: {
+    draggable
   },
   data () {
     return {
-      groupKeys: [{ value: 'orderDateDay', label: '统计日期' },],
+      groupKeys: [{ value: 'orderDateDay', label: '统计日期' }],
       form: {
         checkTimeBegin: new Date(moment().startOf('day').subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss')),
         checkTimeEnd: new Date(moment().endOf('day').format('YYYY-MM-DD HH:mm:ss')),
@@ -165,14 +166,14 @@ export default {
         pageSize: 10
       },
       finalGroup: [
-      { prop: 'otaSourceName', label: '订单渠道',values:'otaSourceName' },
-      { prop: 'ticketTypeName', label: '票种名称',values:'ticketTypeName' },
-      { prop: 'unitPrice', label: '单价' ,values:'unitPrice'},
-      { prop: 'checkCount', label: '检票数量' ,values:'checkCount'},
-      { prop: 'checkNum', label: '检票人数',values:'checkNum' },
-      { prop: 'checkPrice', label: '检票金额' ,values:'checkPrice'},
-      { prop: 'orderDateDay', label: '统计日期',values:'orderDateDay' }
-    ],
+        { prop: 'otaSourceName', label: '订单渠道', values: 'otaSourceName' },
+        { prop: 'ticketTypeName', label: '票种名称', values: 'ticketTypeName' },
+        { prop: 'unitPrice', label: '单价', values: 'unitPrice' },
+        { prop: 'checkCount', label: '检票数量', values: 'checkCount' },
+        { prop: 'checkNum', label: '检票人数', values: 'checkNum' },
+        { prop: 'checkPrice', label: '检票金额', values: 'checkPrice' },
+        { prop: 'orderDateDay', label: '统计日期', values: 'orderDateDay' }
+      ],
       selectKeys: ['orderDateDay'], // 默认选中
       tableIndex: 1,
       OrderIndexArr: [],
@@ -234,20 +235,20 @@ export default {
       //   return this.selectKeys.includes(i.value)
       // })
 
-      if (this.selectKeys.length == 0) {
+      if (this.selectKeys.length === 0) {
         this.finalGroup = [
-      { prop: 'otaSourceName', label: '订单渠道',values:'otaSourceName' },
-      { prop: 'ticketTypeName', label: '票种名称',values:'ticketTypeName' },
-      { prop: 'unitPrice', label: '单价' ,values:'unitPrice'},
-      { prop: 'checkCount', label: '检票数量' ,values:'checkCount'},
-      { prop: 'checkNum', label: '检票人数',values:'checkNum' },
-      { prop: 'checkPrice', label: '检票金额' ,values:'checkPrice'},
-      { prop: 'orderDateDay', label: '统计日期',values:'orderDateDay' }
-    ]
+          { prop: 'otaSourceName', label: '订单渠道', values: 'otaSourceName' },
+          { prop: 'ticketTypeName', label: '票种名称', values: 'ticketTypeName' },
+          { prop: 'unitPrice', label: '单价', values: 'unitPrice' },
+          { prop: 'checkCount', label: '检票数量', values: 'checkCount' },
+          { prop: 'checkNum', label: '检票人数', values: 'checkNum' },
+          { prop: 'checkPrice', label: '检票金额', values: 'checkPrice' },
+          { prop: 'orderDateDay', label: '统计日期', values: 'orderDateDay' }
+        ]
       } else {
-         this.finalGroup = [...this.finalGroup].sort((a, b) => 
-        (this.selectKeys.includes(b.prop) ? 1 : 0) - (this.selectKeys.includes(a.prop) ? 1 : 0)
-);
+        this.finalGroup = [...this.finalGroup].sort((a, b) =>
+          (this.selectKeys.includes(b.prop) ? 1 : 0) - (this.selectKeys.includes(a.prop) ? 1 : 0)
+        )
       }
 
       if (this.form.checkTimeBegin) {

+ 2 - 1
src/pages/queryReport/ghSplitRecordStatistic.vue

@@ -150,7 +150,7 @@ import { totalRowClassName } from '@/utils'
 import moment from 'moment'
 import { getSaleChannelList } from '@/api/order'
 // import ReaderInput from '@/components/ReaderInput'
-// import draggable from 'vuedraggable'
+import draggable from 'vuedraggable'
 
 const groupKeys = [
   { value: 'team', label: '团体' }
@@ -176,6 +176,7 @@ export default {
     }
   },
   components: {
+    draggable
   },
   data () {
     return {

+ 28 - 1
src/pages/queryReport/salesQuery.vue

@@ -243,7 +243,7 @@
         </el-button>
         <el-button
           type="primary"
-          @click="dataExport">
+          @click="reportExport">
           导出
         </el-button>
       </div>
@@ -1787,6 +1787,33 @@ export default {
       })
       this.reset()
     },
+    reportExport () {
+      this.$confirm(`是否要导出明细数据`, '确认提示', {
+        confirmButtonText: '是',
+        cancelButtonText: '否',
+        type: 'warning'
+      }).then(() => {
+        this.handleExport({
+          ...this.form,
+          export: true,
+          exportDetail: true
+        })
+      }).catch(() => {
+        this.handleExport({
+          ...this.form,
+          export: true,
+          exportDetail: false
+        })
+      })
+    },
+    handleExport (params) {
+      apiOrderList(params).then(() => {
+        this.$message.success('导出成功。')
+        this.goToDownload()
+      }, () => {
+        this.$message.success('导出失败。')
+      })
+    },
     getOrderList (goFirst) {
       this.loading = true
       goFirst && (this.form.pageNum = 1)