zs 3 rokov pred
rodič
commit
080b3701a9
1 zmenil súbory, kde vykonal 23 pridanie a 6 odobranie
  1. 23 6
      src/views/menu/market_buy/index.vue

+ 23 - 6
src/views/menu/market_buy/index.vue

@@ -3,9 +3,21 @@
     <el-row>
       <el-col :span="24" class="main animate__animated animate__backInRight">
         <el-col :span="24" class="one">
-          <data-table @query="search" :fields="fields" :opera="opera" :data="list" :total="total" @view="toView" @export="toExport" @sign="toSign">
+          <data-table
+            @query="search"
+            :fields="fields"
+            :opera="opera"
+            :data="list"
+            :total="total"
+            @view="toView"
+            @sign="toSign"
+            :select="true"
+            :selected="selected"
+            @handleSelect="handleSelect"
+          >
             <template #selfbtn>
-              <el-button type="primary" size="mini" @click="toAdd()">添加采购申请</el-button>
+              <el-button type="primary" size="mini" @click="toAdd()">添加</el-button>
+              <el-button type="primary" size="mini" @click="toExport()">导出</el-button>
             </template>
             <template #options="{ item }">
               <template v-if="item.prop == 'status_name'">
@@ -47,9 +59,8 @@ export default {
       ],
       //操作项
       opera: [
-        { label: '详细信息', method: 'view' },
+        { label: '详', method: 'view' },
         { label: '订单签收', method: 'sign', type: 'success', confirm: true, display: (i) => i.status == '1' },
-        { label: '导出数据', method: 'export', type: 'success' },
       ],
       //表格数据
       list: [
@@ -88,6 +99,8 @@ export default {
       ],
       // 列表数据总数
       total: 0,
+      // 多选值
+      selected: [],
       //弹框
       dialog: { title: '详细信息', show: false, type: '1' },
       form: { order: [] },
@@ -107,8 +120,12 @@ export default {
       this.dialog = { title: '详细信息', show: true, type: '2', widths: '40%' };
     },
     //导出数据
-    async toExport({ data }) {
-      this.dialog = { title: '导出条件', show: true, type: '1', widths: '40%' };
+    async toExport() {
+      console.log(this.selected);
+    },
+    // 多选
+    handleSelect(data) {
+      this.$set(this, `selected`, data);
     },
     // 订单签收
     async toSign({ data }) {