shish vor 1 Jahr
Ursprung
Commit
09fe935110
1 geänderte Dateien mit 31 neuen und 13 gelöschten Zeilen
  1. 31 13
      ghs/src/views/order/list.vue

+ 31 - 13
ghs/src/views/order/list.vue

@@ -13,13 +13,6 @@
         </el-tabs>
       </template>
 
-      <template #table-column-orderSn="{scope}">
-        <el-link
-            :underline="true"
-            style="font-size:12px;display:inline-block;"
-        >{{ scope.row.orderSn }}</el-link>
-      </template>
-
       <template #table-column-customName="{scope}">
         <div>
           {{ scope.row.customName }}
@@ -169,6 +162,15 @@
 				<el-button type="primary" size="mini" style="margin-left:30px;" @click="exportData()">导出数据</el-button>
 			</template>
 
+			<template #slot-more-do-btn>
+				<el-dropdown size="medium" split-button type="primary" @click="batchDown" @command="bottomDoMore($event,scope.row)">
+				批量下载
+				<el-dropdown-menu slot="dropdown">
+					<el-dropdown-item command="batchAllDown">批量全下载</el-dropdown-item>
+				</el-dropdown-menu>
+				</el-dropdown>
+			</template>
+
     </x-crud>
 
     <arrival ref="arrivalRef" :arrivalData="arrivalData" @addNewItem="addNewItem" @refreshData="refreshData" />
@@ -328,7 +330,8 @@ export default {
       refundRecordData:{},
       currentKdStaffName:'',
       currentKdStaffId:0,
-      staffList:[]
+      staffList:[],
+      selectedIds:[]
     };
   },
   created() {
@@ -357,10 +360,22 @@ export default {
 
 	},
   methods: {
+		batchDown(){
+			let that = this
+			if (this.$util.isEmpty(this.selectedIds)) {
+				this.$message.error('请选要下载项')
+				return false
+			}
+		},
 		getKdStaff(e){
 			this.currentKdStaffId = e
       this.refreshData()
 		},
+    bottomDoMore(cmd,data){
+      if(cmd == 'batchAllDown'){
+
+      }
+    },
     doMore(cmd,data){
       if(cmd == 'cancel'){
         this.$message.error('开发中')
@@ -577,6 +592,11 @@ export default {
       ctx.service(this.$service.order)
           .set('table', {
             columns: [
+              {
+                type: 'selection',
+                align: 'center',
+                width: '40'
+              },
               {
                 prop: 'orderSn',
                 label: '单号',
@@ -688,10 +708,8 @@ export default {
               }
             ],
             on: {
-              'row-click': (row, column) => {
-                if(column.property == 'orderSn'){
-                  this.detailShowFn(row)
-                }
+              'selection-change': selection => {
+                this.selectedIds = selection.map(e => e.id)
               }
             },
             props: {
@@ -715,7 +733,7 @@ export default {
             ['slot-tabs'],
             ['slot-search-option','slot-export-order'],
             ['data-table'],
-            ['flex1', 'pagination']
+            ['slot-more-do-btn','flex1', 'pagination']
           ])
           .on('refresh', async (params, { next }) => {
             this.name = params.name?params.name:''