Pārlūkot izejas kodu

Merge branch 'master' of http://git.cc-lotus.info/Consumables/admin-cms-two

YY 2 gadi atpakaļ
vecāks
revīzija
40c8a64290

+ 0 - 3
src/views/menu/apply/index.vue

@@ -31,19 +31,16 @@ export default {
   },
   data: function () {
     return {
-      // 数据项
       fields: [
         { label: '联系人', prop: 'user_name', filter: true },
         { label: '联系电话', prop: 'user_phone', filter: true },
         { label: '审核时间', prop: 'examine_date' },
         { label: '审核状态', prop: 'status_name' },
       ],
-      //操作项
       opera: [
         { label: '详情', method: 'view' },
         { label: '领取确定', method: 'receive', type: 'success', confirm: true, display: (i) => i.status == '2' },
       ],
-      //表格数据
       list: [
         {
           id: '111',

+ 23 - 10
src/views/menu/apply_examine/index.vue

@@ -3,7 +3,20 @@
     <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">
+          <data-table
+            @query="search"
+            :fields="fields"
+            :opera="opera"
+            :data="list"
+            :total="total"
+            @view="toView"
+            :select="true"
+            :selected="selected"
+            @handleSelect="handleSelect"
+          >
+            <template #selfbtn>
+              <el-button type="primary" size="mini" @click="toExport()">导出</el-button>
+            </template>
             <template #options="{ item }">
               <template v-if="item.prop == 'status_name'">
                 <el-option v-for="item in statusList" :key="item.label" :label="item.label" :value="item.label"></el-option>
@@ -35,18 +48,12 @@ export default {
   },
   data: function () {
     return {
-      // 数据项
       fields: [
         { label: '联系电话', prop: 'user_phone', filter: true },
         { label: '审核时间', prop: 'examine_date', filter: true },
         { label: '审核状态', prop: 'status_name', filter: 'select' },
       ],
-      //操作项
-      opera: [
-        { label: '详细信息', method: 'view' },
-        { label: '导出数据', method: 'export', type: 'success' },
-      ],
-      //表格数据
+      opera: [{ label: '详情', method: 'view' }],
       list: [
         {
           id: '111',
@@ -61,6 +68,8 @@ export default {
       ],
       // 列表数据总数
       total: 0,
+      // 多选值
+      selected: [],
       //弹框
       dialog: { title: '详细信息', show: false, type: '1' },
       form: { order: [] },
@@ -79,9 +88,13 @@ export default {
       this.$set(this, `form`, data);
       this.dialog = { title: '详细信息', show: true, type: '2', widths: '40%' };
     },
+    // 多选
+    handleSelect(data) {
+      this.$set(this, `selected`, data);
+    },
     //导出数据
-    async toExport({ data }) {
-      this.dialog = { title: '导出条件', show: true, type: '1', widths: '40%' };
+    async toExport() {
+      console.log(this.selected);
     },
     // 提交保存,创建/修改
     async toSave({ data }) {

+ 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 }) {

+ 2 - 1
src/views/menu/payment/index.vue

@@ -3,7 +3,7 @@
     <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" @confirm="toConfirm">
+          <data-table @query="search" :fields="fields" :opera="opera" :data="list" :total="total" @view="toView">
             <template #options="{ item }">
               <template v-if="item.prop == 'status_name'">
                 <el-option v-for="item in statusList" :key="item.label" :label="item.label" :value="item.label"></el-option>
@@ -59,6 +59,7 @@ export default {
           money: '3344',
           receive_user_phone: '98765432109',
           receive_address: '翻斗大街翻斗花园2号楼1001室',
+          order: [],
         },
         {
           order_num: 'Hgj4757945hdFueu',