Bläddra i källkod

销售管理,增值服务增加按钮权限控制

pengyh 1 år sedan
förälder
incheckning
0678371416
26 ändrade filer med 851 tillägg och 764 borttagningar
  1. 73 59
      src/views/mallManagement/activity/coupon_index/index.vue
  2. 51 46
      src/views/mallManagement/activity/seckill_index/index_1.vue
  3. 33 32
      src/views/mallManagement/activity/seckill_index/index_2.vue
  4. 1 1
      src/views/mallManagement/activity/special_index/index.vue
  5. 3 3
      src/views/mallManagement/brand/index.vue
  6. 3 1
      src/views/mallManagement/configCenter/annunciationConfig/index.vue
  7. 55 49
      src/views/mallManagement/configCenter/business_type/index.vue
  8. 57 51
      src/views/mallManagement/configCenter/chargingStandard/index.vue
  9. 73 64
      src/views/mallManagement/configCenter/faultSelfExamination/index.vue
  10. 0 2
      src/views/mallManagement/configCenter/mallConfig/index.vue
  11. 5 5
      src/views/mallManagement/configCenter/serviceProduct/index.vue
  12. 3 0
      src/views/mallManagement/configCenter/slideshowConfig/index.vue
  13. 57 56
      src/views/mallManagement/freight/index.vue
  14. 5 5
      src/views/mallManagement/goods/classify_index/index.vue
  15. 60 59
      src/views/mallManagement/goods/explain_index/index.vue
  16. 9 9
      src/views/mallManagement/goods/goods_index/index.vue
  17. 71 61
      src/views/mallManagement/goods/newclassify_index/index.vue
  18. 48 47
      src/views/mallManagement/goods/watermark/index.vue
  19. 12 12
      src/views/mallManagement/order/order_list/index.vue
  20. 9 9
      src/views/mallManagement/order/order_refund/index.vue
  21. 31 27
      src/views/mallManagement/settlement/index.vue
  22. 42 39
      src/views/mallManagement/storage/index.vue
  23. 20 17
      src/views/valueAddedService/extendedWarrantyWork/index.vue
  24. 21 19
      src/views/valueAddedService/orderBranchAccount/index.vue
  25. 81 68
      src/views/valueAddedService/orderSettleManag/index.vue
  26. 28 23
      src/views/valueAddedService/valueAddedConfig/index.vue

+ 73 - 59
src/views/mallManagement/activity/coupon_index/index.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
   <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
     :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
     :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-    :operation="operation" :exportList="exportList">
+    :operation="operation()" :exportList="exportList">
     <el-dialog title="" width="1000px" custom-class="diy-dialog" append-to-body :modal="true" :visible.sync="formDialog"
     <el-dialog title="" width="1000px" custom-class="diy-dialog" append-to-body :modal="true" :visible.sync="formDialog"
       :show-close="true" :close-on-click-modal="false" :modal-append-to-body="false" :before-close="formCancel">
       :show-close="true" :close-on-click-modal="false" :modal-append-to-body="false" :before-close="formCancel">
       <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
       <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
@@ -33,23 +33,12 @@ import selectMember from "@/components/selectComponent/selectMember.vue"
 import selectGoods from "@/components/selectComponent/selectGoods.vue"
 import selectGoods from "@/components/selectComponent/selectGoods.vue"
 import { MEMBER_CURRENT_TYPE_FILTER } from "@/filters/index.js"
 import { MEMBER_CURRENT_TYPE_FILTER } from "@/filters/index.js"
 import ImageUpload from '@/components/file-upload'
 import ImageUpload from '@/components/file-upload'
+import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
 export default {
   components: { TemplatePage, selectMember, selectGoods, ImageUpload },
   components: { TemplatePage, selectMember, selectGoods, ImageUpload },
-  mixins: [import_mixin],
+  mixins: [import_mixin,operation_mixin],
   data() {
   data() {
     return {
     return {
-      // 事件组合
-      optionsEvensGroup: [
-        [
-          [
-            {
-              name: '新增优惠券',
-              isRole: true,
-              click: this.addData
-            }
-          ],
-        ],
-      ],
       // 表格属性
       // 表格属性
       tableAttributes: {
       tableAttributes: {
         // 启用勾选列
         // 启用勾选列
@@ -92,6 +81,20 @@ export default {
     }
     }
   },
   },
   computed: {
   computed: {
+	// 事件组合
+	optionsEvensGroup() {
+		return [
+			[
+				[
+					this.optionsEvensAuth("add", {
+						click: () => {
+							this.addData
+						}
+					})
+				],
+			]
+		]
+	},
     isService() {
     isService() {
       if (this.formData.receiveCrowd == 3) {
       if (this.formData.receiveCrowd == 3) {
         return true;
         return true;
@@ -467,51 +470,62 @@ export default {
     selectionChange(data) {
     selectionChange(data) {
       this.recordSelected = data
       this.recordSelected = data
     },
     },
-    // 表格操作列
-    operation(h, { row, index, column }) {
-      return (
-        <div class='operation-btns'>
-          <el-button type="text" onClick={() => {
-            getCouponDetail({ couponId: row.couponId }).then(res => {
-              Object.assign(this.formData, res.data, {
-                receiveDate: res.data.obtainStartTime ? [res.data.obtainStartTime, res.data.obtainEndTime] : [],
-                activeDate: res.data.activeStartTime ? [res.data.activeStartTime, res.data.activeEndTime] : [],
-                imgSrc: res.data.imgSrc ? [{ url: res.data.imgSrc }] : [],
-              })
-              this.formDialogType = 2
-              this.openForm()
-            })
-          }}>查看</el-button>
-          {row.releaseFlag === 'WAIT' ? <el-button type="text" onClick={() => {
-            getCouponDetail({ couponId: row.couponId }).then(res => {
-              Object.assign(this.formData, res.data, {
-                receiveDate: res.data.obtainStartTime ? [res.data.obtainStartTime, res.data.obtainEndTime] : [],
-                activeDate: res.data.activeStartTime ? [res.data.activeStartTime, res.data.activeEndTime] : [],
-                imgSrc: res.data.imgSrc ? [{ url: res.data.imgSrc }] : [],
-              })
-              this.formDialogType = 1
-              this.openForm()
-            })
-          }}>编辑</el-button> : null}
-          {row.releaseFlag === 'START' ? <el-popconfirm
-            title="确定取消吗?"
-            onConfirm={() => {
-              changeFlag(row.couponId)
-            }}
-          >
-            <el-button type="text" slot="reference">取消</el-button>
-          </el-popconfirm> : null}
-          {row.releaseFlag === 'START' ? <el-popconfirm
-            title="确定补发业务员优惠券吗?"
-            onConfirm={() => {
-              reissueCoupon(row.couponId)
-            }}
-          >
-            <el-button type="text" slot="reference">补发业务员优惠券</el-button>
-          </el-popconfirm> : null}
-        </div>
-      )
-    },
+	// 表格操作列
+	operation() {
+		return this.operationBtn({
+			detail: {
+				btnType: 'text',
+				click: ({ row, index, column }) => {
+					getCouponDetail({ couponId: row.couponId }).then(res => {
+						Object.assign(this.formData, res.data, {
+							receiveDate: res.data.obtainStartTime ? [res.data.obtainStartTime, res.data.obtainEndTime] : [],
+							activeDate: res.data.activeStartTime ? [res.data.activeStartTime, res.data.activeEndTime] : [],
+							imgSrc: res.data.imgSrc ? [{ url: res.data.imgSrc }] : [],
+						})
+						this.formDialogType = 2
+						this.openForm()
+					})
+				}
+				},
+			edit: {
+				btnType: 'text',
+				conditions: ({ row, index, column }) => {
+					return row.releaseFlag === 'WAIT'
+				},
+				click: ({ row, index, column }) => {
+					getCouponDetail({ couponId: row.couponId }).then(res => {
+						Object.assign(this.formData, res.data, {
+							receiveDate: res.data.obtainStartTime ? [res.data.obtainStartTime, res.data.obtainEndTime] : [],
+							activeDate: res.data.activeStartTime ? [res.data.activeStartTime, res.data.activeEndTime] : [],
+							imgSrc: res.data.imgSrc ? [{ url: res.data.imgSrc }] : [],
+						})
+						this.formDialogType = 1
+						this.openForm()
+					})
+				}
+			},
+			cancel: {
+				btnType: 'text',
+				prompt: '确定取消吗?',
+				conditions: ({ row, index, column }) => {
+					return row.releaseFlag === 'START'
+				},
+				click: ({ row, index, column }) => {
+					changeFlag(row.couponId)
+				}
+			},
+			reissue: {
+				btnType: 'text',
+				prompt:  '确定补发业务员优惠券吗?',
+				conditions: ({ row, index, column }) => {
+					return row.releaseFlag === 'START'
+				},
+				click: ({ row, index, column }) => {
+					reissueCoupon(row.couponId)
+				}
+			},
+		})
+	},
     addData() {
     addData() {
       this.formDialogType = 0
       this.formDialogType = 0
       this.openForm()
       this.openForm()

+ 51 - 46
src/views/mallManagement/activity/seckill_index/index_1.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
   <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
     :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
     :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-    :operation="operation" :exportList="exportList">
+    :operation="operation()" :exportList="exportList">
     <div slot="moreSearch">
     <div slot="moreSearch">
       <el-radio-group v-model="type" size="mini" @change="changeType">
       <el-radio-group v-model="type" size="mini" @change="changeType">
         <el-radio-button label="">全部</el-radio-button>
         <el-radio-button label="">全部</el-radio-button>
@@ -17,31 +17,14 @@
 import TemplatePage from '@/components/template/template-page-1.vue'
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import import_mixin from '@/components/template/import_mixin.js'
 import { closeActivityStatus, openActivityStatus, secKillGoodsActivityListPageV2, secKillGoodsActivityListPageV2Export } from '@/api/seckill'
 import { closeActivityStatus, openActivityStatus, secKillGoodsActivityListPageV2, secKillGoodsActivityListPageV2Export } from '@/api/seckill'
-
+import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
 export default {
   components: { TemplatePage },
   components: { TemplatePage },
-  mixins: [import_mixin],
+  mixins: [import_mixin,operation_mixin],
   data() {
   data() {
     return {
     return {
       type: "",
       type: "",
       statistics: {},
       statistics: {},
-      // 事件组合
-      optionsEvensGroup: [
-        [
-          [
-            {
-              name: '添加秒杀活动',
-              isRole: true,
-              click: () => {
-                this.$router.push({
-                  name: "seckill_add",
-                  query: {}
-                })
-              }
-            }
-          ],
-        ],
-      ],
       // 表格属性
       // 表格属性
       tableAttributes: {
       tableAttributes: {
         // 启用勾选列
         // 启用勾选列
@@ -56,6 +39,23 @@ export default {
     }
     }
   },
   },
   computed: {
   computed: {
+	// 事件组合
+	optionsEvensGroup() {
+		return [
+			[
+				[
+					this.optionsEvensAuth("add", {
+						click: () => {
+							this.$router.push({
+							  name: "seckill_add",
+							  query: {}
+							})
+						}
+					})
+				],
+			]
+		]
+	},
     // 更多参数
     // 更多参数
     moreParameters() {
     moreParameters() {
       return []
       return []
@@ -91,32 +91,37 @@ export default {
     selectionChange(data) {
     selectionChange(data) {
       this.recordSelected = data
       this.recordSelected = data
     },
     },
-    // 表格操作列
-    operation(h, { row, index, column }) {
-      return (
-        <div class='operation-btns'>
-          <el-popconfirm
-            title={`是否确定${row.status ? "关闭" : "开启"}?`}
-            onConfirm={() => {
-              (row.status ? closeActivityStatus : openActivityStatus)({ secKillId: row.secKillId }).then(res => {
-                this.$message({ type: 'success', message: `${row.status ? "关闭" : "开启"}成功!` })
-                this.$refs.pageRef.refreshList()
-              })
-            }}
-          >
-            <el-button type="text" slot="reference">{row.status ? "关闭" : "开启"}</el-button>
-          </el-popconfirm>
-          <el-button type="text" onClick={() => {
-            this.$router.push({
-              name: "seckill_add",
-              query: {
-                id: row.secKillId
-              }
-            })
-          }}>编辑</el-button>
-        </div>
-      )
-    },
+	// 表格操作列
+	operation() {
+		return this.operationBtn({
+		  edit: {
+			btnType: 'text',
+		    click: ({ row, index, column }) => {
+		      this.$router.push({
+		        name: "seckill_add",
+		        query: {
+		          id: row.secKillId
+		        }
+		      })
+		    }
+		  },
+		  status: {
+				btnType: 'text',
+				name: ({ row, index, column }) => {
+					return row.status ? "关闭" : "开启"
+				},
+					prompt:  ({ row, index, column }) => {
+					return `是否确定${row.status ? "关闭" : "开启"}?`
+				},
+		    click: ({ row, index, column }) => {
+		      (row.status ? closeActivityStatus : openActivityStatus)({ secKillId: row.secKillId }).then(res => {
+		        this.$message({ type: 'success', message: `${row.status ? "关闭" : "开启"}成功!` })
+		        this.$refs.pageRef.refreshList()
+		      })
+		    }
+		  },
+		})
+	},
   }
   }
 }
 }
 </script>
 </script>

+ 33 - 32
src/views/mallManagement/activity/seckill_index/index_2.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
   <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
     :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
     :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-    :operation="operation" :exportList="exportList">
+    :operation="operation()" :exportList="exportList">
     <div slot="moreSearch">
     <div slot="moreSearch">
       <el-radio-group v-model="type" size="mini" @change="changeType">
       <el-radio-group v-model="type" size="mini" @change="changeType">
         <el-radio-button label="">全部</el-radio-button>
         <el-radio-button label="">全部</el-radio-button>
@@ -17,10 +17,10 @@
 import TemplatePage from '@/components/template/template-page-1.vue'
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import import_mixin from '@/components/template/import_mixin.js'
 import { secKillGoodsSpecListPageV2, secKillGoodsSpecListPageV2Export, closeGoodsStatus, openGoodsStatus, deleteGoods } from '@/api/seckill'
 import { secKillGoodsSpecListPageV2, secKillGoodsSpecListPageV2Export, closeGoodsStatus, openGoodsStatus, deleteGoods } from '@/api/seckill'
-
+import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
 export default {
   components: { TemplatePage },
   components: { TemplatePage },
-  mixins: [import_mixin],
+  mixins: [import_mixin,operation_mixin],
   data() {
   data() {
     return {
     return {
       type: "",
       type: "",
@@ -83,35 +83,36 @@ export default {
     selectionChange(data) {
     selectionChange(data) {
       this.recordSelected = data
       this.recordSelected = data
     },
     },
-    // 表格操作列
-    operation(h, { row, index, column }) {
-      return (
-        <div class='operation-btns'>
-          <el-popconfirm
-            title={`是否确定${row.status ? "关闭" : "开启"}?`}
-            onConfirm={() => {
-              (row.status ? closeGoodsStatus : openGoodsStatus)({ secKillSpecId: row.secKillSpecId }).then(res => {
-                this.$message({ type: 'success', message: `${row.status ? "关闭" : "开启"}成功!` })
-                this.$refs.pageRef.refreshList()
-              })
-            }}
-          >
-            <el-button type="text" slot="reference">{row.status ? "关闭" : "开启"}</el-button>
-          </el-popconfirm>
-          <el-popconfirm
-            title={`是否确定删除?`}
-            onConfirm={() => {
-              deleteGoods({ secKillSpecId: row.secKillSpecId }).then(res => {
-                this.$message({ type: 'success', message: `删除成功!` })
-                this.$refs.pageRef.refreshList()
-              })
-            }}
-          >
-            <el-button type="text" slot="reference">删除</el-button>
-          </el-popconfirm>
-        </div>
-      )
-    },
+	// 表格操作列
+	operation() {
+		return this.operationBtn({
+		  del: {
+		  	btnType: 'text',
+		  	prompt: '确定删除吗?',
+		    click: ({ row, index, column }) => {
+		      deleteGoods({ secKillSpecId: row.secKillSpecId }).then(res => {
+		        this.$message({ type: 'success', message: `删除成功!` })
+		        this.$refs.pageRef.refreshList()
+		      })
+		    }
+		  },
+		  status: {
+				btnType: 'text',
+				name: ({ row, index, column }) => {
+					return row.status ? "关闭" : "开启"
+				},
+					prompt:  ({ row, index, column }) => {
+					return `是否确定${row.status ? "关闭" : "开启"}?`
+				},
+		    click: ({ row, index, column }) => {
+		      (row.status ? closeGoodsStatus : openGoodsStatus)({ secKillSpecId: row.secKillSpecId }).then(res => {
+		        this.$message({ type: 'success', message: `${row.status ? "关闭" : "开启"}成功!` })
+		        this.$refs.pageRef.refreshList()
+		      })
+		    }
+		  },
+		})
+	},
   }
   }
 }
 }
 </script>
 </script>

+ 1 - 1
src/views/mallManagement/activity/special_index/index.vue

@@ -14,7 +14,7 @@
       >
       >
         <el-table-column align="center" label="操作" width="200" fixed="right">
         <el-table-column align="center" label="操作" width="200" fixed="right">
           <template slot-scope="scope">
           <template slot-scope="scope">
-            <el-button type="text" @click="toConfigure(scope.row)">配置</el-button>
+            <el-button v-if="$restrict('set')" type="text" @click="toConfigure(scope.row)">配置</el-button>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
         <el-table-column
         <el-table-column

+ 3 - 3
src/views/mallManagement/brand/index.vue

@@ -3,7 +3,7 @@
     <div class="mymain-container">
     <div class="mymain-container">
       <div class="btn-group clearfix">
       <div class="btn-group clearfix">
         <div class="fl">
         <div class="fl">
-          <el-button size="small" type="primary" icon="el-icon-plus" @click="addOrEdit('add')">添加品牌</el-button>
+          <el-button v-if="$restrict('add')" size="small" type="primary" icon="el-icon-plus" @click="addOrEdit('add')">添加品牌</el-button>
         </div>
         </div>
       </div>
       </div>
 
 
@@ -30,8 +30,8 @@
           <el-table-column align="center" label="修改时间" prop="updateTime" min-width="160"></el-table-column>
           <el-table-column align="center" label="修改时间" prop="updateTime" min-width="160"></el-table-column>
           <el-table-column align="center" label="操作" fixed="right" width="120">
           <el-table-column align="center" label="操作" fixed="right" width="120">
             <template slot-scope="scope">
             <template slot-scope="scope">
-              <el-button type="text" @click="addOrEdit('edit', scope.row.id)">编辑</el-button>
-              <el-popconfirm style="margin-left: 10px;" title="确定删除吗?" @confirm="handleDelete(scope.row.id)">
+              <el-button type="text" v-if="$restrict('edit')" @click="addOrEdit('edit', scope.row.id)">编辑</el-button>
+              <el-popconfirm v-if="$restrict('del')" style="margin-left: 10px;" title="确定删除吗?" @confirm="handleDelete(scope.row.id)">
                 <el-button slot="reference" type="text">删除</el-button>
                 <el-button slot="reference" type="text">删除</el-button>
               </el-popconfirm>
               </el-popconfirm>
             </template>
             </template>

+ 3 - 1
src/views/mallManagement/configCenter/annunciationConfig/index.vue

@@ -16,7 +16,7 @@
     </div>
     </div>
     <div class="page-footer">
     <div class="page-footer">
       <div class="footer" :class="classObj">
       <div class="footer" :class="classObj">
-        <el-button type="primary" @click="submitMainForm">保存</el-button>
+        <el-button v-if="$restrict('save')" type="primary" @click="submitMainForm">保存</el-button>
       </div>
       </div>
     </div>
     </div>
   </div>
   </div>
@@ -25,8 +25,10 @@
 <script>
 <script>
 import { mapGetters } from 'vuex'
 import { mapGetters } from 'vuex'
 import { getNotice, addNotice, editNotice } from '@/api/setting'
 import { getNotice, addNotice, editNotice } from '@/api/setting'
+import operation_mixin from '@/components/template/operation_mixin.js'
 
 
 export default {
 export default {
+	mixins: [operation_mixin],
   data() {
   data() {
     return {
     return {
       mainData: {
       mainData: {

+ 55 - 49
src/views/mallManagement/configCenter/business_type/index.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
   <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
     :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
     :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-    :operation="operation">
+    :operation="operation()">
     <el-dialog title="" width="500px" custom-class="diy-dialog" append-to-body :modal="true" :visible.sync="formDialog"
     <el-dialog title="" width="500px" custom-class="diy-dialog" append-to-body :modal="true" :visible.sync="formDialog"
       :show-close="true" :close-on-click-modal="false" :modal-append-to-body="false" :before-close="formCancel">
       :show-close="true" :close-on-click-modal="false" :modal-append-to-body="false" :before-close="formCancel">
       <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
       <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
@@ -23,23 +23,12 @@ import import_mixin from '@/components/template/import_mixin.js'
 import { required, mobileRequired, mobile } from '@/components/template/rules_verify.js'
 import { required, mobileRequired, mobile } from '@/components/template/rules_verify.js'
 import { chargingStandardTypeList2, getTypeList, getTypeDetail, saveType, deleteType } from "@/api/miniapp";
 import { chargingStandardTypeList2, getTypeList, getTypeDetail, saveType, deleteType } from "@/api/miniapp";
 import ImageUpload from '@/components/file-upload'
 import ImageUpload from '@/components/file-upload'
+import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
 export default {
   components: { TemplatePage, ImageUpload },
   components: { TemplatePage, ImageUpload },
-  mixins: [import_mixin],
+  mixins: [import_mixin,operation_mixin],
   data() {
   data() {
     return {
     return {
-      // 事件组合
-      optionsEvensGroup: [
-        [
-          [
-            {
-              name: '添加业务类型',
-              isRole: true,
-              click: this.addData
-            }
-          ],
-        ],
-      ],
       // 表格属性
       // 表格属性
       tableAttributes: {
       tableAttributes: {
         // 启用勾选列
         // 启用勾选列
@@ -62,6 +51,20 @@ export default {
     }
     }
   },
   },
   computed: {
   computed: {
+	// 事件组合
+	optionsEvensGroup() {
+		return [
+			[
+				[
+					this.optionsEvensAuth("add", {
+						click: () => {
+							this.addData
+						}
+					})
+				],
+			]
+		]
+	},
     // 更多参数
     // 更多参数
     moreParameters() {
     moreParameters() {
       return []
       return []
@@ -107,41 +110,44 @@ export default {
     selectionChange(data) {
     selectionChange(data) {
       this.recordSelected = data
       this.recordSelected = data
     },
     },
-    // 表格操作列
-    operation(h, { row, index, column }) {
-      return (
-        <div class='operation-btns'>
-          <el-button type="text" onClick={() => {
-            getTypeDetail({ id: row.id }).then(res => {
-              Object.assign(this.formData, res.data)
-              this.formDialogType = 2
-              this.openForm()
-            })
-          }}>查看</el-button>
-          <el-button type="text" onClick={() => {
-            getTypeDetail({ id: row.id }).then(res => {
-              Object.assign(this.formData, res.data)
-              this.formDialogType = 1
-              this.openForm()
-            })
-          }}>编辑</el-button>
-          <el-popconfirm
-            title="确定删除吗?"
-            onConfirm={() => {
-              deleteType({ id: row.id }).then(res => {
-                this.$message({
-                  type: 'success',
-                  message: `删除成功!`,
-                })
-                this.$refs.pageRef.refreshList()
-              })
-            }}
-          >
-            <el-button type="text" slot="reference">删除</el-button>
-          </el-popconfirm>
-        </div>
-      )
-    },
+	// 表格操作列
+	operation() {
+		return this.operationBtn({
+			detail: {
+				btnType: 'text',
+				click: ({ row, index, column }) => {
+					getTypeDetail({ id: row.id }).then(res => {
+					  Object.assign(this.formData, res.data)
+					  this.formDialogType = 2
+					  this.openForm()
+					})
+				}
+			},
+			edit: {
+				btnType: 'text',
+				click: ({ row, index, column }) => {
+					getTypeDetail({ id: row.id }).then(res => {
+					  Object.assign(this.formData, res.data)
+					  this.formDialogType = 1
+					  this.openForm()
+					})
+				}
+			},
+			del: {
+				btnType: 'text',
+				prompt: '确定删除吗?',
+				click: ({ row, index, column }) => {
+					deleteType({ id: row.id }).then(res => {
+					  this.$message({
+					    type: 'success',
+					    message: `删除成功!`,
+					  })
+					  this.$refs.pageRef.refreshList()
+					})
+				}
+			}
+		})
+	},
     addData() {
     addData() {
       this.formDialogType = 0
       this.formDialogType = 0
       this.openForm()
       this.openForm()

+ 57 - 51
src/views/mallManagement/configCenter/chargingStandard/index.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
   <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
     :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
     :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-    :operation="operation">
+    :operation="operation()">
     <el-dialog title="" width="500px" custom-class="diy-dialog" append-to-body :modal="true" :visible.sync="formDialog"
     <el-dialog title="" width="500px" custom-class="diy-dialog" append-to-body :modal="true" :visible.sync="formDialog"
       :show-close="true" :close-on-click-modal="false" :modal-append-to-body="false" :before-close="formCancel">
       :show-close="true" :close-on-click-modal="false" :modal-append-to-body="false" :before-close="formCancel">
       <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
       <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
@@ -24,23 +24,12 @@ import { required, mobileRequired, mobile } from '@/components/template/rules_ve
 import { chargingStandardList2, getMainList, getMainDetail, saveMain, deleteMain, getTypeList, getBrandList } from "@/api/miniapp";
 import { chargingStandardList2, getMainList, getMainDetail, saveMain, deleteMain, getTypeList, getBrandList } from "@/api/miniapp";
 import { getClassifyList } from '@/api/goods'
 import { getClassifyList } from '@/api/goods'
 import ImageUpload from '@/components/file-upload'
 import ImageUpload from '@/components/file-upload'
+import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
 export default {
   components: { TemplatePage, ImageUpload },
   components: { TemplatePage, ImageUpload },
-  mixins: [import_mixin],
+  mixins: [import_mixin,operation_mixin],
   data() {
   data() {
     return {
     return {
-      // 事件组合
-      optionsEvensGroup: [
-        [
-          [
-            {
-              name: '添加收费标准',
-              isRole: true,
-              click: this.addData
-            }
-          ],
-        ],
-      ],
       // 表格属性
       // 表格属性
       tableAttributes: {
       tableAttributes: {
         // 启用勾选列
         // 启用勾选列
@@ -71,6 +60,20 @@ export default {
     }
     }
   },
   },
   computed: {
   computed: {
+		// 事件组合
+		optionsEvensGroup() {
+			return [
+				[
+					[
+						this.optionsEvensAuth("add", {
+							click: () => {
+								this.addData
+							}
+						})
+					],
+				]
+			]
+		},
     // 更多参数
     // 更多参数
     moreParameters() {
     moreParameters() {
       return []
       return []
@@ -193,43 +196,46 @@ export default {
       this.recordSelected = data
       this.recordSelected = data
     },
     },
     // 表格操作列
     // 表格操作列
-    operation(h, { row, index, column }) {
-      return (
-        <div class='operation-btns'>
-          <el-button type="text" onClick={() => {
-            getMainDetail({ id: row.id }).then(res => {
-              Object.assign(this.formData, res.data, {
-                imageUrl: res.data.imageUrl ? [{ url: res.data.imageUrl }] : [],
-              })
-              this.formDialogType = 2
-              this.openForm()
-            })
-          }}>查看</el-button>
-          <el-button type="text" onClick={() => {
-            getMainDetail({ id: row.id }).then(res => {
-              Object.assign(this.formData, res.data, {
-                imageUrl: res.data.imageUrl ? [{ url: res.data.imageUrl }] : [],
-              })
-              this.formDialogType = 1
-              this.openForm()
-            })
-          }}>编辑</el-button>
-          <el-popconfirm
-            title="确定删除吗?"
-            onConfirm={() => {
-              deleteMain({ id: row.id }).then(res => {
-                this.$message({
-                  type: 'success',
-                  message: `删除成功!`,
-                })
-                this.$refs.pageRef.refreshList()
-              })
-            }}
-          >
-            <el-button type="text" slot="reference">删除</el-button>
-          </el-popconfirm>
-        </div>
-      )
+    operation() {
+		return this.operationBtn({
+			detail: {
+				btnType: 'text',
+			  click: ({ row, index, column }) => {
+			    getMainDetail({ id: row.id }).then(res => {
+			      Object.assign(this.formData, res.data, {
+			        imageUrl: res.data.imageUrl ? [{ url: res.data.imageUrl }] : [],
+			      })
+			      this.formDialogType = 2
+			      this.openForm()
+			    })
+			  }
+			},
+		  edit: {
+				btnType: 'text',
+		    click: ({ row, index, column }) => {
+		      getMainDetail({ id: row.id }).then(res => {
+		        Object.assign(this.formData, res.data, {
+		          imageUrl: res.data.imageUrl ? [{ url: res.data.imageUrl }] : [],
+		        })
+		        this.formDialogType = 1
+		        this.openForm()
+		      })
+		    }
+		  },
+		  del: {
+				btnType: 'text',
+				prompt: '确定删除吗?',
+		    click: ({ row, index, column }) => {
+		      deleteMain({ id: row.id }).then(res => {
+		        this.$message({
+		          type: 'success',
+		          message: `删除成功!`,
+		        })
+		        this.$refs.pageRef.refreshList()
+		      })
+		    }
+		  }
+		})
     },
     },
     addData() {
     addData() {
       this.formDialogType = 0
       this.formDialogType = 0

+ 73 - 64
src/views/mallManagement/configCenter/faultSelfExamination/index.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
   <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
     :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
     :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-    :operation="operation" :exportList="exportList">
+    :operation="operation()" :exportList="exportList">
     <div slot="moreSearch">
     <div slot="moreSearch">
       <el-radio-group v-model="type" size="mini" @change="changeType">
       <el-radio-group v-model="type" size="mini" @change="changeType">
         <el-radio-button :label="''">全部</el-radio-button>
         <el-radio-button :label="''">全部</el-radio-button>
@@ -32,39 +32,13 @@ import { required, mobileRequired, mobile } from '@/components/template/rules_ve
 import { chargingStandardList3, chargingStandardList3PageExport, chargingStandardImport, getMainList, getMainDetail, saveMain, deleteMain, getBrandList } from "@/api/miniapp";
 import { chargingStandardList3, chargingStandardList3PageExport, chargingStandardImport, getMainList, getMainDetail, saveMain, deleteMain, getBrandList } from "@/api/miniapp";
 import { getClassifyList } from '@/api/goods'
 import { getClassifyList } from '@/api/goods'
 import { downloadFiles } from '@/utils/util'
 import { downloadFiles } from '@/utils/util'
+import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
 export default {
   components: { TemplatePage },
   components: { TemplatePage },
-  mixins: [import_mixin],
+  mixins: [import_mixin,operation_mixin],
   data() {
   data() {
     return {
     return {
       type: "",
       type: "",
-      // 事件组合
-      optionsEvensGroup: [
-        [
-          [
-            {
-              name: '下载导入模板',
-              click: this.handleDownload
-            }
-          ],
-          [
-            {
-              name: '导入模板',
-              render: () => {
-                return this.importButton(chargingStandardImport, '导入模板')
-              }
-            }
-          ],
-        ],
-        [
-          [
-            {
-              name: '添加',
-              click: this.addData
-            }
-          ],
-        ]
-      ],
       // 表格属性
       // 表格属性
       tableAttributes: {
       tableAttributes: {
         // 启用勾选列
         // 启用勾选列
@@ -94,6 +68,38 @@ export default {
     }
     }
   },
   },
   computed: {
   computed: {
+	// 事件组合
+	optionsEvensGroup() {
+		return [
+			[
+				[
+					this.optionsEvensAuth("add", {
+						click: () => {
+							this.addData
+						}
+					})
+				],
+			],
+			[
+				[
+					this.optionsEvensAuth("template", {
+						click: () => {
+							this.handleDownload
+						}
+					})
+				],
+			],
+			[
+				[
+					this.optionsEvensAuth("imp", {
+						render: () => {
+						  return this.importButton(chargingStandardImport, '导入模板')
+						}
+					})
+				],
+			]
+		]
+	},
     // 更多参数
     // 更多参数
     moreParameters() {
     moreParameters() {
       return []
       return []
@@ -216,41 +222,44 @@ export default {
     selectionChange(data) {
     selectionChange(data) {
       this.recordSelected = data
       this.recordSelected = data
     },
     },
-    // 表格操作列
-    operation(h, { row, index, column }) {
-      return (
-        <div class='operation-btns'>
-          <el-button type="text" onClick={() => {
-            getMainDetail({ id: row.id }).then(res => {
-              Object.assign(this.formData, res.data)
-              this.formDialogType = 2
-              this.openForm()
-            })
-          }}>查看</el-button>
-          <el-button type="text" onClick={() => {
-            getMainDetail({ id: row.id }).then(res => {
-              Object.assign(this.formData, res.data)
-              this.formDialogType = 1
-              this.openForm()
-            })
-          }}>编辑</el-button>
-          <el-popconfirm
-            title="确定删除吗?"
-            onConfirm={() => {
-              deleteMain({ id: row.id }).then(res => {
-                this.$message({
-                  type: 'success',
-                  message: `删除成功!`,
-                })
-                this.$refs.pageRef.refreshList()
-              })
-            }}
-          >
-            <el-button type="text" slot="reference">删除</el-button>
-          </el-popconfirm>
-        </div>
-      )
-    },
+	// 表格操作列
+	operation() {
+		return this.operationBtn({
+			detail: {
+				btnType: 'text',
+				click: ({ row, index, column }) => {
+					getMainDetail({ id: row.id }).then(res => {
+					  Object.assign(this.formData, res.data)
+					  this.formDialogType = 2
+					  this.openForm()
+					})
+				}
+			},
+			edit: {
+				btnType: 'text',
+				click: ({ row, index, column }) => {
+					getMainDetail({ id: row.id }).then(res => {
+					  Object.assign(this.formData, res.data)
+					  this.formDialogType = 1
+					  this.openForm()
+					})
+				}
+			},
+			del: {
+				btnType: 'text',
+				prompt: '确定删除吗?',
+				click: ({ row, index, column }) => {
+					deleteMain({ id: row.id }).then(res => {
+					  this.$message({
+					    type: 'success',
+					    message: `删除成功!`,
+					  })
+					  this.$refs.pageRef.refreshList()
+					})
+				}
+			}
+		})
+	},
     addData() {
     addData() {
       this.formDialogType = 0
       this.formDialogType = 0
       this.openForm()
       this.openForm()

+ 0 - 2
src/views/mallManagement/configCenter/mallConfig/index.vue

@@ -378,9 +378,7 @@
 import { getToken, getUserid } from '@/utils/auth';
 import { getToken, getUserid } from '@/utils/auth';
 import { getTemplate, editAccount, editTemplate, getDetail } from "@/api/merchant";
 import { getTemplate, editAccount, editTemplate, getDetail } from "@/api/merchant";
 import { getInfo } from '@/api/user'
 import { getInfo } from '@/api/user'
-import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
 export default {
-	mixins: [operation_mixin],
   data() {
   data() {
     return {
     return {
       isAdmin: JSON.parse(localStorage.getItem("greemall_user")).type === 2,
       isAdmin: JSON.parse(localStorage.getItem("greemall_user")).type === 2,

+ 5 - 5
src/views/mallManagement/configCenter/serviceProduct/index.vue

@@ -3,7 +3,7 @@
     <div class="mymain-container">
     <div class="mymain-container">
       <div class="btn-group clearfix">
       <div class="btn-group clearfix">
         <div class="fl">
         <div class="fl">
-          <el-button size="small" type="primary" icon="el-icon-plus" @click="addOrEditParent('add')">添加分类</el-button>
+          <el-button v-if="$restrict('add')" size="small" type="primary" icon="el-icon-plus" @click="addOrEditParent('add')">添加分类</el-button>
         </div>
         </div>
         <div class="fr">
         <div class="fr">
           <el-input placeholder="请输入分类名称进行搜索" v-model="screenForm.keyword" size="small" style="width: 240px;" clearable>
           <el-input placeholder="请输入分类名称进行搜索" v-model="screenForm.keyword" size="small" style="width: 240px;" clearable>
@@ -35,10 +35,10 @@
           </el-table-column>
           </el-table-column>
           <el-table-column align="right" label="操作" width="150" fixed="right">
           <el-table-column align="right" label="操作" width="150" fixed="right">
             <template slot-scope="scope">
             <template slot-scope="scope">
-              <el-button type="primary" size="mini" icon="el-icon-plus" v-if="scope.row.level == 1" @click="addOrEditChild('add', scope.row.categoryId)"></el-button>
-              <el-button type="primary" size="mini" icon="el-icon-edit" v-if="scope.row.level == 1" @click="addOrEditParent('edit', scope.row.categoryId)"></el-button>
-              <el-button type="primary" size="mini" icon="el-icon-edit" v-if="scope.row.level == 2" @click="addOrEditChild('edit', scope.row.categoryId)"></el-button>
-              <el-popconfirm style="margin-left: 10px;" title="确定删除吗?" @confirm="handleDelete(scope.row.categoryId)" >
+              <el-button type="primary" size="mini" icon="el-icon-plus" v-if="scope.row.level == 1 && $restrict('add')" @click="addOrEditChild('add', scope.row.categoryId)"></el-button>
+              <el-button type="primary" size="mini" icon="el-icon-edit" v-if="scope.row.level == 1 && $restrict('edit')" @click="addOrEditParent('edit', scope.row.categoryId)"></el-button>
+              <el-button type="primary" size="mini" icon="el-icon-edit" v-if="scope.row.level == 2 && $restrict('edit')" @click="addOrEditChild('edit', scope.row.categoryId)"></el-button>
+              <el-popconfirm v-if="$restrict('del')" style="margin-left: 10px;" title="确定删除吗?" @confirm="handleDelete(scope.row.categoryId)" >
                 <el-button slot="reference" size="mini" icon="el-icon-delete"></el-button>
                 <el-button slot="reference" size="mini" icon="el-icon-delete"></el-button>
               </el-popconfirm>
               </el-popconfirm>
 
 

+ 3 - 0
src/views/mallManagement/configCenter/slideshowConfig/index.vue

@@ -226,6 +226,7 @@ export default {
     operation() {
     operation() {
 		return this.operationBtn({
 		return this.operationBtn({
 		  edit: {
 		  edit: {
+			btnType: 'text',
 		    click: ({ row, index, column }) => {
 		    click: ({ row, index, column }) => {
 		      getBannerDetail({ id: row.id }).then(res => {
 		      getBannerDetail({ id: row.id }).then(res => {
 		        Object.assign(this.formData, res.data, {
 		        Object.assign(this.formData, res.data, {
@@ -237,6 +238,7 @@ export default {
 		    }
 		    }
 		  },
 		  },
 		  del: {
 		  del: {
+			btnType: 'text',
 			prompt: '确定删除吗?',
 			prompt: '确定删除吗?',
 		    click: ({ row, index, column }) => {
 		    click: ({ row, index, column }) => {
 		      deleteBanner({ carouselMapId: row.id }).then(() => {
 		      deleteBanner({ carouselMapId: row.id }).then(() => {
@@ -246,6 +248,7 @@ export default {
 		    }
 		    }
 		  },
 		  },
 		  status: {
 		  status: {
+			btnType: 'text',
 			name: ({ row, index, column }) => {
 			name: ({ row, index, column }) => {
 				return row.state ? '隐藏' : '显示'
 				return row.state ? '隐藏' : '显示'
 			},
 			},

+ 57 - 56
src/views/mallManagement/freight/index.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
   <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
     :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
     :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-    :operation="operation" :exportList="exportList">
+    :operation="operation()" :exportList="exportList">
     <el-dialog title="" width="1165px" custom-class="diy-dialog" append-to-body :modal="true" :visible.sync="formDialog"
     <el-dialog title="" width="1165px" custom-class="diy-dialog" append-to-body :modal="true" :visible.sync="formDialog"
       :show-close="true" :close-on-click-modal="false" :modal-append-to-body="false" :before-close="formCancel">
       :show-close="true" :close-on-click-modal="false" :modal-append-to-body="false" :before-close="formCancel">
       <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
       <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
@@ -34,23 +34,12 @@ import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import import_mixin from '@/components/template/import_mixin.js'
 import { required, mobileRequired, mobile } from '@/components/template/rules_verify.js'
 import { required, mobileRequired, mobile } from '@/components/template/rules_verify.js'
 import { freightListPageV2, freightPageExport, deleteFreight, addOrEditFreight, getFreightDetail, getRegionTree, changeFreightStatus } from "@/api/freight";
 import { freightListPageV2, freightPageExport, deleteFreight, addOrEditFreight, getFreightDetail, getRegionTree, changeFreightStatus } from "@/api/freight";
+import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
 export default {
   components: { TemplatePage },
   components: { TemplatePage },
-  mixins: [import_mixin],
+  mixins: [import_mixin,operation_mixin],
   data() {
   data() {
     return {
     return {
-      // 事件组合
-      optionsEvensGroup: [
-        [
-          [
-            {
-              name: '新建',
-              isRole: true,
-              click: this.addData
-            }
-          ],
-        ],
-      ],
       // 表格属性
       // 表格属性
       tableAttributes: {
       tableAttributes: {
         // 启用勾选列
         // 启用勾选列
@@ -76,6 +65,20 @@ export default {
     }
     }
   },
   },
   computed: {
   computed: {
+	// 事件组合
+	optionsEvensGroup() {
+		return [
+			[
+				[
+					this.optionsEvensAuth("add", {
+						click: () => {
+							this.addData
+						}
+					})
+				],
+			]
+		]
+	},
     // 更多参数
     // 更多参数
     moreParameters() {
     moreParameters() {
       return []
       return []
@@ -215,48 +218,46 @@ export default {
     selectionChange(data) {
     selectionChange(data) {
       this.recordSelected = data
       this.recordSelected = data
     },
     },
-    // 表格操作列
-    operation(h, { row, index, column }) {
-      return (
-        <div class='operation-btns'>
-          <el-button type="text" onClick={() => {
-            getFreightDetail({ freightTemplateId: row.freightTemplateId }).then(res => {
-              Object.assign(this.formData, res.data)
-              this.formDialogType = 1
-              this.openForm()
-            })
-          }}>编辑</el-button>
-          {row.status ? <el-popconfirm style="margin-right: 10px;" title="确定禁用吗?"
-            onConfirm={() => {
-              changeFreightStatus({ freightTemplateId: row.freightTemplateId, status: false }).then(res => {
-                this.$message({ type: 'success', message: '禁用成功!' })
-                this.$refs.pageRef.refreshList()
-              })
-            }}>
-            <el-button slot="reference" type="text">禁用</el-button>
-          </el-popconfirm> : <el-popconfirm style="margin-right: 10px;" title="确定启用吗?"
-            onConfirm={() => {
-              changeFreightStatus({ freightTemplateId: row.freightTemplateId, status: true }).then(res => {
-                this.$message({ type: 'success', message: '启用成功!' })
-                this.$refs.pageRef.refreshList()
-              })
-            }}>
-            <el-button slot="reference" type="text">启用</el-button>
-          </el-popconfirm>}
-          <el-popconfirm
-            title="确定删除吗?"
-            onConfirm={() => {
-              deleteFreight({ freightTemplateId: row.freightTemplateId }).then(() => {
-                this.$message({ type: 'success', message: '删除成功!' })
-                this.$refs.pageRef.refreshList()
-              })
-            }}
-          >
-            <el-button type="text" slot="reference">删除</el-button>
-          </el-popconfirm>
-        </div>
-      )
-    },
+	// 表格操作列
+	operation() {
+		return this.operationBtn({
+			edit: {
+				btnType: 'text',
+				click: ({ row, index, column }) => {
+					getFreightDetail({ freightTemplateId: row.freightTemplateId }).then(res => {
+					  Object.assign(this.formData, res.data)
+					  this.formDialogType = 1
+					  this.openForm()
+					})
+				}
+			},
+			del: {
+				btnType: 'text',
+				prompt: '确定删除吗?',
+				click: ({ row, index, column }) => {
+					deleteFreight({ freightTemplateId: row.freightTemplateId }).then(() => {
+					  this.$message({ type: 'success', message: '删除成功!' })
+					  this.$refs.pageRef.refreshList()
+					})
+				}
+			},
+			status: {
+				name: ({ row, index, column }) => {
+					return row.status?'禁用':'启用'
+				},
+				btnType: 'text',
+				prompt: ({ row, index, column }) => {
+					return `是否${row.status?'禁用':'启用'}?`
+				},
+				click: ({ row, index, column }) => {
+					changeFreightStatus({ freightTemplateId: row.freightTemplateId, status: !row.status }).then(res => {
+					  this.$message({ type: 'success', message: `${row.status?'禁用':'启用'}成功!` })
+					  this.$refs.pageRef.refreshList()
+					})
+				}
+			},
+		})
+	},
     addData() {
     addData() {
       this.formDialogType = 0
       this.formDialogType = 0
       this.openForm()
       this.openForm()

+ 5 - 5
src/views/mallManagement/goods/classify_index/index.vue

@@ -3,7 +3,7 @@
     <div class="mymain-container">
     <div class="mymain-container">
       <div class="btn-group clearfix">
       <div class="btn-group clearfix">
         <div class="fl">
         <div class="fl">
-          <el-button size="small" type="primary" icon="el-icon-plus" @click="addOrEditParent('add')">添加分类</el-button>
+          <el-button v-if="$restrict('add')" size="small" type="primary" icon="el-icon-plus" @click="addOrEditParent('add')">添加分类</el-button>
         </div>
         </div>
         <div class="fr">
         <div class="fr">
           <el-input placeholder="请输入分类名称进行搜索" v-model="screenForm.keyword" size="small" style="width: 240px;" clearable>
           <el-input placeholder="请输入分类名称进行搜索" v-model="screenForm.keyword" size="small" style="width: 240px;" clearable>
@@ -35,10 +35,10 @@
           </el-table-column>
           </el-table-column>
           <el-table-column align="right" label="操作" width="150" fixed="right">
           <el-table-column align="right" label="操作" width="150" fixed="right">
             <template slot-scope="scope">
             <template slot-scope="scope">
-              <el-button type="primary" size="mini" icon="el-icon-plus" v-if="scope.row.level == 1" @click="addOrEditChild('add', scope.row.categoryId)"></el-button>
-              <el-button type="primary" size="mini" icon="el-icon-edit" v-if="scope.row.level == 1" @click="addOrEditParent('edit', scope.row.categoryId)"></el-button>
-              <el-button type="primary" size="mini" icon="el-icon-edit" v-if="scope.row.level == 2" @click="addOrEditChild('edit', scope.row.categoryId)"></el-button>
-              <el-popconfirm style="margin-left: 10px;" title="确定删除吗?" @confirm="handleDelete(scope.row.categoryId)" >
+              <el-button type="primary" size="mini" icon="el-icon-plus" v-if="scope.row.level == 1 && $restrict('add')" @click="addOrEditChild('add', scope.row.categoryId)"></el-button>
+              <el-button type="primary" size="mini" icon="el-icon-edit" v-if="scope.row.level == 1 && $restrict('edit')" @click="addOrEditParent('edit', scope.row.categoryId)"></el-button>
+              <el-button type="primary" size="mini" icon="el-icon-edit" v-if="scope.row.level == 2 && $restrict('edit')" @click="addOrEditChild('edit', scope.row.categoryId)"></el-button>
+              <el-popconfirm v-if="$restrict('del')" style="margin-left: 10px;" title="确定删除吗?" @confirm="handleDelete(scope.row.categoryId)" >
                 <el-button slot="reference" size="mini" icon="el-icon-delete"></el-button>
                 <el-button slot="reference" size="mini" icon="el-icon-delete"></el-button>
               </el-popconfirm>
               </el-popconfirm>
 
 

+ 60 - 59
src/views/mallManagement/goods/explain_index/index.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
   <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
     :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
     :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-    :operation="operation" :exportList="exportList">
+    :operation="operation()" :exportList="exportList">
   </template-page>
   </template-page>
 </template>
 </template>
 
 
@@ -9,40 +9,12 @@
 import TemplatePage from '@/components/template/template-page-1.vue'
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import import_mixin from '@/components/template/import_mixin.js'
 import { deleteModule, templateListPageV2, templatePageExport } from '@/api/goods'
 import { deleteModule, templateListPageV2, templatePageExport } from '@/api/goods'
+import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
 export default {
   components: { TemplatePage },
   components: { TemplatePage },
-  mixins: [import_mixin],
+  mixins: [import_mixin,operation_mixin],
   data() {
   data() {
     return {
     return {
-      // 事件组合
-      optionsEvensGroup: [
-        [
-          [
-            {
-              name: '添加模块',
-              isRole: true,
-              click: () => {
-                this.$router.push({
-                  name: "explain_add",
-                  query: {}
-                })
-              }
-            }
-          ],
-          [
-            {
-              name: '编辑公共模块',
-              isRole: true,
-              click: () => {
-                this.$router.push({
-                  name: "explain_common",
-                  query: {}
-                })
-              }
-            }
-          ],
-        ],
-      ],
       // 表格属性
       // 表格属性
       tableAttributes: {
       tableAttributes: {
         // 启用勾选列
         // 启用勾选列
@@ -57,6 +29,35 @@ export default {
     }
     }
   },
   },
   computed: {
   computed: {
+	// 事件组合
+	optionsEvensGroup() {
+		return [
+			[
+				[
+					this.optionsEvensAuth("add", {
+						click: () => {
+							this.$router.push({
+							  name: "explain_add",
+							  query: {}
+							})
+						}
+					})
+				],
+			],
+			[
+				[
+					this.optionsEvensAuth("explain_common", {
+						click: () => {
+							this.$router.push({
+							  name: "explain_common",
+							  query: {}
+							})
+						}
+					})
+				],
+			]
+		]
+	},
     // 更多参数
     // 更多参数
     moreParameters() {
     moreParameters() {
       return []
       return []
@@ -78,34 +79,34 @@ export default {
     selectionChange(data) {
     selectionChange(data) {
       this.recordSelected = data
       this.recordSelected = data
     },
     },
-    // 表格操作列
-    operation(h, { row, index, column }) {
-      return (
-        <div class='operation-btns'>
-          <el-button type="text" onClick={() => {
-            this.$router.push({
-              name: "explain_add",
-              query: {
-                id: row.commonTemplateId
-              }
-            })
-          }}>编辑</el-button>
-          <el-popconfirm
-            title="确定删除吗?"
-            onConfirm={() => {
-              deleteModule({
-                commonTemplateId: row.commonTemplateId
-              }).then(res => {
-                this.$message({ type: 'success', message: '删除成功!' })
-                this.$refs.pageRef.refreshList()
-              })
-            }}
-          >
-            <el-button type="text" slot="reference">删除</el-button>
-          </el-popconfirm>
-        </div>
-      )
-    },
+	// 表格操作列
+	operation() {
+		return this.operationBtn({
+		  edit: {
+			btnType: 'text',
+		    click: ({ row, index, column }) => {
+		      this.$router.push({
+		        name: "explain_add",
+		        query: {
+		          id: row.commonTemplateId
+		        }
+		      })
+		    }
+		  },
+		  del: {
+			btnType: 'text',
+			prompt: '确定删除吗?',
+		    click: ({ row, index, column }) => {
+		      deleteModule({
+		        commonTemplateId: row.commonTemplateId
+		      }).then(res => {
+		        this.$message({ type: 'success', message: '删除成功!' })
+		        this.$refs.pageRef.refreshList()
+		      })
+		    }
+		  }
+		})
+	},
   }
   }
 }
 }
 </script>
 </script>

+ 9 - 9
src/views/mallManagement/goods/goods_index/index.vue

@@ -73,11 +73,11 @@
     <div class="mymain-container">
     <div class="mymain-container">
       <div class="btn-group clearfix">
       <div class="btn-group clearfix">
         <div class="fl">
         <div class="fl">
-          <el-button type="primary" icon="el-icon-plus" size="small" @click="addOrEdit('add')">添加商品</el-button>
-          <el-button size="small" @click="batchOperation('on')">批量上架</el-button>
-          <el-button size="small" @click="batchOperation('off')">批量下架</el-button>
-          <el-button size="small" @click="batchOperation('module')">批量设置模块</el-button>
-          <el-button size="small" @click="batchOperation('freight')">批量设置运费</el-button>
+          <el-button v-if="$restrict('add')" type="primary" icon="el-icon-plus" size="small" @click="addOrEdit('add')">添加商品</el-button>
+          <el-button v-if="$restrict('batchLaunch')" size="small" @click="batchOperation('on')">批量上架</el-button>
+          <el-button v-if="$restrict('batchRemova')" size="small" @click="batchOperation('off')">批量下架</el-button>
+          <el-button v-if="$restrict('batchSet')" size="small" @click="batchOperation('module')">批量设置模块</el-button>
+          <el-button v-if="$restrict('batchSetfreight')" size="small" @click="batchOperation('freight')">批量设置运费</el-button>
         </div>
         </div>
       </div>
       </div>
 
 
@@ -167,12 +167,12 @@
                 </el-popconfirm>
                 </el-popconfirm>
               </template> -->
               </template> -->
 
 
-              <el-button type="primary" size="mini" @click="addOrEdit('edit', scope.row.goodsId)">编辑</el-button>
-              <el-popconfirm style="margin-left: 10px; margin-right: 10px" title="确定克隆吗?" @confirm="clone(scope.row.goodsId)" >
+              <el-button v-if="$restrict('edit')" type="primary" size="mini" @click="addOrEdit('edit', scope.row.goodsId)">编辑</el-button>
+              <el-popconfirm v-if="$restrict('clone')" style="margin-left: 10px; margin-right: 10px" title="确定克隆吗?" @confirm="clone(scope.row.goodsId)" >
                 <el-button slot="reference" type="primary" size="mini">克隆</el-button>
                 <el-button slot="reference" type="primary" size="mini">克隆</el-button>
               </el-popconfirm>
               </el-popconfirm>
-              <el-button type="primary" size="mini" class="tag-read" @click="copy(scope.row.goodsId)" :data-clipboard-text="scope.row.goodsId">复制链接</el-button>
-              <el-popconfirm style="margin-left: 10px;" title="确定删除吗?" @confirm="delItem(scope.row.goodsId, scope.row.goodsSpecId)" >
+              <el-button v-if="$restrict('copyLink')" type="primary" size="mini" class="tag-read" @click="copy(scope.row.goodsId)" :data-clipboard-text="scope.row.goodsId">复制链接</el-button>
+              <el-popconfirm v-if="$restrict('del')" style="margin-left: 10px;" title="确定删除吗?" @confirm="delItem(scope.row.goodsId, scope.row.goodsSpecId)" >
                 <el-button slot="reference" size="mini">删除</el-button>
                 <el-button slot="reference" size="mini">删除</el-button>
               </el-popconfirm>
               </el-popconfirm>
             </template>
             </template>

+ 71 - 61
src/views/mallManagement/goods/newclassify_index/index.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
   <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
     :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
     :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-    :operation="operation" :exportList="exportList" :operationColumnWidth="160">
+    :operation="operation()" :exportList="exportList" :operationColumnWidth="160">
     <el-dialog title="" width="500px" custom-class="diy-dialog" append-to-body :modal="true" :visible.sync="formDialog"
     <el-dialog title="" width="500px" custom-class="diy-dialog" append-to-body :modal="true" :visible.sync="formDialog"
       :show-close="true" :close-on-click-modal="false" :modal-append-to-body="false" :before-close="formCancel">
       :show-close="true" :close-on-click-modal="false" :modal-append-to-body="false" :before-close="formCancel">
       <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
       <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
@@ -30,23 +30,12 @@ import {
   changeNewclassify,
   changeNewclassify,
   deleteNewclassify
   deleteNewclassify
 } from "@/api/goods";
 } from "@/api/goods";
+import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
 export default {
   components: { TemplatePage },
   components: { TemplatePage },
-  mixins: [import_mixin],
+  mixins: [import_mixin,operation_mixin],
   data() {
   data() {
     return {
     return {
-      // 事件组合
-      optionsEvensGroup: [
-        [
-          [
-            {
-              name: '新建',
-              isRole: true,
-              click: this.addData
-            }
-          ],
-        ],
-      ],
       // 表格属性
       // 表格属性
       tableAttributes: {
       tableAttributes: {
         // 启用勾选列
         // 启用勾选列
@@ -71,6 +60,20 @@ export default {
     }
     }
   },
   },
   computed: {
   computed: {
+		// 事件组合
+		optionsEvensGroup() {
+			return [
+				[
+					[
+						this.optionsEvensAuth("add", {
+							click: () => {
+								this.addData
+							}
+						})
+					]
+				]
+			]
+		},
     // 更多参数
     // 更多参数
     moreParameters() {
     moreParameters() {
       return []
       return []
@@ -137,53 +140,60 @@ export default {
     selectionChange(data) {
     selectionChange(data) {
       this.recordSelected = data
       this.recordSelected = data
     },
     },
-    // 表格操作列
-    operation(h, { row, index, column }) {
-      return (
-        <div class='operation-btns'>
-          <el-button type="text" onClick={() => {
-            this.$router.push({
-              name: "newclassify_set",
-              query: {
-                item: row
-              },
-            });
-          }}>配置</el-button>
-          <el-button type="text" onClick={() => {
-            getNewclassifyDetail({ newsCategoryId: row.goodsNewsCategoryId }).then(res => {
-              Object.assign(this.formData, res.data)
-              this.formDialogType = 1
-              this.openForm()
-            })
-          }}>编辑</el-button>
-          <el-popconfirm
-            title={`是否确定${Number(row.status) ? "关闭" : "开启"}?`}
-            onConfirm={() => {
-              changeNewclassify({
-                goodsNewsCategoryId: row.goodsNewsCategoryId,
-                status: Number(row.status) ? 0 : 1,
-              }).then(res => {
-                this.$message({ type: 'success', message: `${Number(row.status) ? "关闭" : "开启"}成功!` })
-                this.$refs.pageRef.refreshList()
-              })
-            }}
-          >
-            <el-button type="text" slot="reference">{Number(row.status) ? "关闭" : "开启"}</el-button>
-          </el-popconfirm>
-          <el-popconfirm
-            title="确定删除吗?"
-            onConfirm={() => {
-              deleteNewclassify({ goodsNewsCategoryId: row.goodsNewsCategoryId }).then(() => {
-                this.$message({ type: 'success', message: '删除成功!' })
-                this.$refs.pageRef.refreshList()
-              })
-            }}
-          >
-            <el-button type="text" slot="reference">删除</el-button>
-          </el-popconfirm>
-        </div>
-      )
-    },
+	// 表格操作列
+	operation() {
+		return this.operationBtn({
+			disposition: {
+				btnType: 'text',
+				click: ({ row, index, column }) => {
+					this.$router.push({
+						name: "newclassify_set",
+						query: {
+							item: row
+						},
+					});
+				}
+			},
+			edit: {  
+				btnType: 'text',
+				click: ({ row, index, column }) => {
+					getNewclassifyDetail({ newsCategoryId: row.goodsNewsCategoryId }).then(res => {
+						Object.assign(this.formData, res.data)
+						this.formDialogType = 1
+						this.openForm()
+					})
+				}
+			},
+			del: {
+				btnType: 'text',
+				prompt: '确定删除吗?',
+				click: ({ row, index, column }) => {
+					deleteNewclassify({ goodsNewsCategoryId: row.goodsNewsCategoryId }).then(() => {
+						this.$message({ type: 'success', message: '删除成功!' })
+						this.$refs.pageRef.refreshList()
+					})
+				}
+			},
+			status: {
+				btnType: 'text',
+				name: ({ row, index, column }) => {
+					return Number(row.status) ? "关闭" : "开启"
+				},
+				prompt:  ({ row, index, column }) => {
+					return `是否确定${Number(row.status) ? "关闭" : "开启"}?`
+				},
+				click: ({ row, index, column }) => {
+					changeNewclassify({
+						goodsNewsCategoryId: row.goodsNewsCategoryId,
+						status: Number(row.status) ? 0 : 1,
+					}).then(res => {
+						this.$message({ type: 'success', message: `${Number(row.status) ? "关闭" : "开启"}成功!` })
+						this.$refs.pageRef.refreshList()
+					})
+				}
+			},
+		})
+	},
     addData() {
     addData() {
       this.formDialogType = 0
       this.formDialogType = 0
       this.openForm()
       this.openForm()

+ 48 - 47
src/views/mallManagement/goods/watermark/index.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
   <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
     :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
     :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-    :operation="operation" :exportList="exportList">
+    :operation="operation()" :exportList="exportList">
   </template-page>
   </template-page>
 </template>
 </template>
 
 
@@ -9,28 +9,12 @@
 import TemplatePage from '@/components/template/template-page-1.vue'
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import import_mixin from '@/components/template/import_mixin.js'
 import { deleteModule, templateListPageV2, templatePageExport } from '@/api/goods'
 import { deleteModule, templateListPageV2, templatePageExport } from '@/api/goods'
+import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
 export default {
   components: { TemplatePage },
   components: { TemplatePage },
-  mixins: [import_mixin],
+  mixins: [import_mixin,operation_mixin],
   data() {
   data() {
     return {
     return {
-      // 事件组合
-      optionsEvensGroup: [
-        [
-          [
-            {
-              name: '添加水印',
-              isRole: true,
-              click: () => {
-                this.$router.push({
-                  name: "watermark_add",
-                  query: {}
-                })
-              }
-            }
-          ],
-        ],
-      ],
       // 表格属性
       // 表格属性
       tableAttributes: {
       tableAttributes: {
         // 启用勾选列
         // 启用勾选列
@@ -45,6 +29,23 @@ export default {
     }
     }
   },
   },
   computed: {
   computed: {
+	// 事件组合
+	optionsEvensGroup() {
+		return [
+			[
+				[
+					this.optionsEvensAuth("add", {
+						click: () => {
+							this.$router.push({
+							  name: "watermark_add",
+							  query: {}
+							})
+						}
+					})
+				],
+			]
+		]
+	},
     // 更多参数
     // 更多参数
     moreParameters() {
     moreParameters() {
       return []
       return []
@@ -66,34 +67,34 @@ export default {
     selectionChange(data) {
     selectionChange(data) {
       this.recordSelected = data
       this.recordSelected = data
     },
     },
-    // 表格操作列
-    operation(h, { row, index, column }) {
-      return (
-        <div class='operation-btns'>
-          <el-button type="text" onClick={() => {
-            this.$router.push({
-              name: "watermark_add",
-              query: {
-                id: row.commonTemplateId
-              }
-            })
-          }}>编辑</el-button>
-          <el-popconfirm
-            title="确定删除吗?"
-            onConfirm={() => {
-              deleteModule({
-                commonTemplateId: row.commonTemplateId
-              }).then(res => {
-                this.$message({ type: 'success', message: '删除成功!' })
-                this.$refs.pageRef.refreshList()
-              })
-            }}
-          >
-            <el-button type="text" slot="reference">删除</el-button>
-          </el-popconfirm>
-        </div>
-      )
-    },
+	// 表格操作列
+	operation() {
+		return this.operationBtn({
+		  edit: {
+			btnType: 'text',
+		    click: ({ row, index, column }) => {
+		      this.$router.push({
+		        name: "watermark_add",
+		        query: {
+		          id: row.commonTemplateId
+		        }
+		      })
+		    }
+		  },
+		  del: {
+			btnType: 'text',
+			prompt: '确定删除吗?',
+		    click: ({ row, index, column }) => {
+		      deleteModule({
+		        commonTemplateId: row.commonTemplateId
+		      }).then(res => {
+		        this.$message({ type: 'success', message: '删除成功!' })
+		        this.$refs.pageRef.refreshList()
+		      })
+		    }
+		  }
+		})
+	},
   }
   }
 }
 }
 </script>
 </script>

+ 12 - 12
src/views/mallManagement/order/order_list/index.vue

@@ -113,13 +113,13 @@
           <el-tab-pane label="已关闭" name="CLOSE"></el-tab-pane>
           <el-tab-pane label="已关闭" name="CLOSE"></el-tab-pane>
           <el-tab-pane label="已超时" name="TIMEOUT"></el-tab-pane>
           <el-tab-pane label="已超时" name="TIMEOUT"></el-tab-pane>
         </el-tabs>
         </el-tabs>
-        <el-button class="fl" type="primary" size="small" @click="batchRemark">批量备注</el-button>
+        <el-button v-if="$restrict('batchNote')" class="fl" type="primary" size="small" @click="batchRemark">批量备注</el-button>
         <el-button class="fl" type="primary" size="small" @click="batchShipmentVisible = true"
         <el-button class="fl" type="primary" size="small" @click="batchShipmentVisible = true"
-          v-show="tabCurrent == 'DFH'">批量发货</el-button>
-        <el-button class="fl" size="small" @click="downloadTemplate" v-show="tabCurrent == 'DFH'">下载批量发货模版</el-button>
+          v-show="tabCurrent == 'DFH' && $restrict('batchDelivery')">批量发货</el-button>
+        <el-button class="fl" size="small" @click="downloadTemplate" v-show="tabCurrent == 'DFH' && $restrict('template')">下载批量发货模版</el-button>
       </div>
       </div>
       <div class="fr">
       <div class="fr">
-        <el-button size="small" type="primary" @click="handleExport">导出报表</el-button>
+        <el-button v-if="$restrict('exp')" size="small" type="primary" @click="handleExport">导出报表</el-button>
       </div>
       </div>
     </div>
     </div>
     <div class="order-main-container">
     <div class="order-main-container">
@@ -147,8 +147,8 @@
           <span><b>商户</b>:{{ order.companyWechatName || '无' }}</span>
           <span><b>商户</b>:{{ order.companyWechatName || '无' }}</span>
           <span><b>网点</b>:{{ order.websitName || '无' }}</span>
           <span><b>网点</b>:{{ order.websitName || '无' }}</span>
           <div class="fr">
           <div class="fr">
-            <el-link type="primary" :underline="false" @click="showRemark(order.orderId, order.remark)">订单备注</el-link>
-            <el-link type="primary" :underline="false" @click="queryDetail(order.orderId)">查看详情</el-link>
+            <el-link type="primary" v-if="$restrict('orderNote')" :underline="false" @click="showRemark(order.orderId, order.remark)">订单备注</el-link>
+            <el-link type="primary" v-if="$restrict('detail')" :underline="false" @click="queryDetail(order.orderId)">查看详情</el-link>
             <!-- <el-link type="primary" :underline="false" @click="queryWorkOrder(order.orderId)">订单工单</el-link> -->
             <!-- <el-link type="primary" :underline="false" @click="queryWorkOrder(order.orderId)">订单工单</el-link> -->
           </div>
           </div>
         </div>
         </div>
@@ -236,25 +236,25 @@
               <div class="col-item">
               <div class="col-item">
                 <div class="operate">
                 <div class="operate">
                   <el-popconfirm title="确定取消订单吗?" @confirm="cancelOrder(order.orderId)"
                   <el-popconfirm title="确定取消订单吗?" @confirm="cancelOrder(order.orderId)"
-                    v-if="order.orderStatus === 'NOPAY'">
+                    v-if="order.orderStatus === 'NOPAY' && $restrict('cancelOrder')">
                     <el-button slot="reference" type="text" size="small">取消订单</el-button>
                     <el-button slot="reference" type="text" size="small">取消订单</el-button>
                   </el-popconfirm>
                   </el-popconfirm>
-                  <el-button type="text" size="small" v-if="order.orderStatus === 'DFH'"
+                  <el-button type="text" size="small" v-if="order.orderStatus === 'DFH' && $restrict('deliver')"
                     @click="showLogistics(order, 'add')">发货</el-button>
                     @click="showLogistics(order, 'add')">发货</el-button>
-                  <el-button type="text" size="small" v-if="order.orderStatus === 'DFH'"
+                  <el-button type="text" size="small" v-if="order.orderStatus === 'DFH' && $restrict('changeShippingaddress')"
                     @click="openAddressForm(order)">修改收货地址</el-button>
                     @click="openAddressForm(order)">修改收货地址</el-button>
                   <el-button type="text" size="small"
                   <el-button type="text" size="small"
-                    v-if="order.orderStatus === 'YFH' && order.orderDetails.some(i => i.workOrderType === 'INSTALL')"
+                    v-if="order.orderStatus === 'YFH' && $restrict('changeDeliverynumber') && order.orderDetails.some(i => i.workOrderType === 'INSTALL')"
                     @click="showLogistics(order, 'edit')">
                     @click="showLogistics(order, 'edit')">
                     修改快递单号
                     修改快递单号
                   </el-button>
                   </el-button>
                   <el-button type="text" size="small"
                   <el-button type="text" size="small"
-                    v-if="(order.orderStatus === 'YFH' || order.orderStatus === 'OVER') && order.orderDetails.some(i => i.workOrderType === 'INSTALL')"
+                    v-if="(order.orderStatus === 'YFH' || order.orderStatus === 'OVER') && $restrict('viewLogistics') && order.orderDetails.some(i => i.workOrderType === 'INSTALL')"
                     @click="queryLogistics(order.logisticsNo, order.companyCode)">
                     @click="queryLogistics(order.logisticsNo, order.companyCode)">
                     查看物流
                     查看物流
                   </el-button>
                   </el-button>
                   <!-- toWorkOrderDetail(order.orderId) -->
                   <!-- toWorkOrderDetail(order.orderId) -->
-                  <el-button type="text" size="small" v-if="order.toWorkOrder"
+                  <el-button type="text" size="small" v-if="order.toWorkOrder && $restrict('workOrder_detail')"
                     @click="queryWorkOrder(order.orderId)">查看工单</el-button>
                     @click="queryWorkOrder(order.orderId)">查看工单</el-button>
                 </div>
                 </div>
               </div>
               </div>

+ 9 - 9
src/views/mallManagement/order/order_refund/index.vue

@@ -90,7 +90,7 @@
         </el-tabs>
         </el-tabs>
       </div>
       </div>
       <div class="fr">
       <div class="fr">
-        <el-button size="small" type="primary" @click="handleExport">导出报表</el-button>
+        <el-button v-if="$restrict('exp')" size="small" type="primary" @click="handleExport">导出报表</el-button>
       </div>
       </div>
     </div>
     </div>
     <div class="order-main-container">
     <div class="order-main-container">
@@ -115,8 +115,8 @@
               <span><b>发货状态</b>:{{order.logisticsNo ? '已发货' : '未发货'}}</span>
               <span><b>发货状态</b>:{{order.logisticsNo ? '已发货' : '未发货'}}</span>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="24" :lg="4" style="text-align: right;">
             <el-col :xs="24" :sm="24" :lg="4" style="text-align: right;">
-              <el-link type="primary" :underline="false" @click="showRemark(order.orderRefundId, order.remark)">订单备注</el-link>
-              <el-link type="primary" :underline="false" @click="showDetail(index)">查看详情</el-link>
+              <el-link type="primary" v-if="$restrict('orderNote')" :underline="false" @click="showRemark(order.orderRefundId, order.remark)">订单备注</el-link>
+              <el-link type="primary" v-if="$restrict('detail')" :underline="false" @click="showDetail(index)">查看详情</el-link>
               <!-- <el-link type="primary" :underline="false" @click="queryWorkOrder(order.orderId)">订单工单</el-link> -->
               <!-- <el-link type="primary" :underline="false" @click="queryWorkOrder(order.orderId)">订单工单</el-link> -->
             </el-col>
             </el-col>
           </el-row>
           </el-row>
@@ -192,27 +192,27 @@
               <div class="col-item">
               <div class="col-item">
                 <div class="operate" v-if="order.orderStatus === 'DSJCL'">
                 <div class="operate" v-if="order.orderStatus === 'DSJCL'">
                   <div>
                   <div>
-                    <el-button slot="reference" type="text" size="small" @click="changeExamineStatus(order.orderRefundId,'OK')">同意</el-button>
+                    <el-button v-if="$restrict('agree')" slot="reference" type="text" size="small" @click="changeExamineStatus(order.orderRefundId,'OK')">同意</el-button>
                   </div>
                   </div>
                   <div>
                   <div>
-                    <el-button slot="reference" type="text" size="small" @click="changeExamineStatus(order.orderRefundId,'FAIL')">拒绝</el-button>
+                    <el-button v-if="$restrict('reject')" slot="reference" type="text" size="small" @click="changeExamineStatus(order.orderRefundId,'FAIL')">拒绝</el-button>
                   </div>
                   </div>
                   <div>
                   <div>
                     <!-- toWorkOrderDetail(order.orderId) -->
                     <!-- toWorkOrderDetail(order.orderId) -->
-                    <el-button type="text" size="small" v-if="order.toWorkOrder" @click="queryWorkOrder(order.orderId)">查看工单</el-button>
+                    <el-button type="text" size="small" v-if="order.toWorkOrder && $restrict('workOrder_detail')" @click="queryWorkOrder(order.orderId)">查看工单</el-button>
                   </div>
                   </div>
                 </div>
                 </div>
                 <div class="operate" v-if="order.orderStatus === 'DSJSH'">
                 <div class="operate" v-if="order.orderStatus === 'DSJSH'">
-                  <div>
+                  <div v-if="$restrict('confirmReceipt')">
                     <el-popconfirm title="确定要收货吗?" @confirm="receiveProd(order.orderRefundId)">
                     <el-popconfirm title="确定要收货吗?" @confirm="receiveProd(order.orderRefundId)">
                       <el-button slot="reference" type="text" size="small">确认收货</el-button>
                       <el-button slot="reference" type="text" size="small">确认收货</el-button>
                     </el-popconfirm>
                     </el-popconfirm>
                   </div>
                   </div>
-                  <div v-if="order.logisticsNo">
+                  <div v-if="order.logisticsNo && $restrict('viewLogistics')">
                     <el-button type="text" size="small" @click="queryLogistics(order.logisticsNo)">查看物流</el-button>
                     <el-button type="text" size="small" @click="queryLogistics(order.logisticsNo)">查看物流</el-button>
                   </div>
                   </div>
                   <div>
                   <div>
-                    <el-button type="text" size="small" v-if="order.toWorkOrder" @click="toWorkOrderDetail(order.orderId)">查看工单</el-button>
+                    <el-button type="text" size="small" v-if="order.toWorkOrder && $restrict('workOrder_detail')" @click="toWorkOrderDetail(order.orderId)">查看工单</el-button>
                   </div>
                   </div>
                 </div>
                 </div>
               </div>
               </div>

+ 31 - 27
src/views/mallManagement/settlement/index.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
   <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
     :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
     :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-    :operation="operation" :exportList="exportList">
+    :operation="operation()" :exportList="exportList">
     <el-dialog title="" width="500px" custom-class="diy-dialog" append-to-body :modal="true" :visible.sync="formDialog"
     <el-dialog title="" width="500px" custom-class="diy-dialog" append-to-body :modal="true" :visible.sync="formDialog"
       :show-close="true" :close-on-click-modal="false" :modal-append-to-body="false" :before-close="formCancel">
       :show-close="true" :close-on-click-modal="false" :modal-append-to-body="false" :before-close="formCancel">
       <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
       <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
@@ -22,9 +22,10 @@ import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import import_mixin from '@/components/template/import_mixin.js'
 import { required, mobileRequired, mobile } from '@/components/template/rules_verify.js'
 import { required, mobileRequired, mobile } from '@/components/template/rules_verify.js'
 import { orderShareListPageV2, orderSharePageExport, settlement, saveRemark } from "@/api/settlement";
 import { orderShareListPageV2, orderSharePageExport, settlement, saveRemark } from "@/api/settlement";
+import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
 export default {
   components: { TemplatePage },
   components: { TemplatePage },
-  mixins: [import_mixin],
+  mixins: [import_mixin,operation_mixin],
   data() {
   data() {
     return {
     return {
       // 事件组合
       // 事件组合
@@ -81,31 +82,34 @@ export default {
     selectionChange(data) {
     selectionChange(data) {
       this.recordSelected = data
       this.recordSelected = data
     },
     },
-    // 表格操作列
-    operation(h, { row, index, column }) {
-      return (
-        <div class='operation-btns'>
-          <el-button type="text" onClick={() => {
-            Object.assign(this.formData, row)
-            this.formDialogType = 0
-            this.openForm()
-          }}>备注</el-button>
-          {row.orderStatus == 'OVER' && ~["EXCEPTION", "ING"].indexOf(row.status) ? <el-popconfirm
-            title="是否确定结算?"
-            onConfirm={() => {
-              settlement({
-                orderId: row.orderId
-              }).then(res => {
-                this.$message({ type: 'success', message: `结算成功!` })
-                this.$refs.pageRef.refreshList()
-              })
-            }}
-          >
-            <el-button type="text" slot="reference">结算</el-button>
-          </el-popconfirm> : null}
-        </div>
-      )
-    },
+	// 表格操作列
+	operation() {
+		return this.operationBtn({
+			remark: {
+				btnType: 'text',
+				click: ({ row, index, column }) => {
+					Object.assign(this.formData, row)
+					this.formDialogType = 0
+					this.openForm()
+				}
+			},
+			account: {
+				conditions: ({ row, index, column }) => {
+					return row.orderStatus === 'OVER' && ~["EXCEPTION", "ING"].indexOf(row.status)
+				},
+				btnType: 'text',
+				prompt: '是否确定结算?',
+					click: ({ row, index, column }) => {
+						settlement({
+							orderId: row.orderId
+						}).then(res => {
+							this.$message({ type: 'success', message: `结算成功!` })
+							this.$refs.pageRef.refreshList()
+						})
+					}
+				},
+		})
+	},
     openForm() {
     openForm() {
       this.formDialog = true;
       this.formDialog = true;
     },
     },

+ 42 - 39
src/views/mallManagement/storage/index.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
   <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
     :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
     :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-    :operation="operation" :exportList="exportList">
+    :operation="operation()" :exportList="exportList">
     <el-dialog title="" width="500px" custom-class="diy-dialog" append-to-body :modal="true" :visible.sync="formDialog"
     <el-dialog title="" width="500px" custom-class="diy-dialog" append-to-body :modal="true" :visible.sync="formDialog"
       :show-close="true" :close-on-click-modal="false" :modal-append-to-body="false" :before-close="formCancel">
       :show-close="true" :close-on-click-modal="false" :modal-append-to-body="false" :before-close="formCancel">
       <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
       <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
@@ -22,23 +22,12 @@ import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import import_mixin from '@/components/template/import_mixin.js'
 import { required, mobileRequired, mobile } from '@/components/template/rules_verify.js'
 import { required, mobileRequired, mobile } from '@/components/template/rules_verify.js'
 import { storageListPageV2, storagePageExport, addStorage, deleteStorage, editStorage, getStorageDetail } from "@/api/storage";
 import { storageListPageV2, storagePageExport, addStorage, deleteStorage, editStorage, getStorageDetail } from "@/api/storage";
+import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
 export default {
   components: { TemplatePage },
   components: { TemplatePage },
-  mixins: [import_mixin],
+  mixins: [import_mixin,operation_mixin],
   data() {
   data() {
     return {
     return {
-      // 事件组合
-      optionsEvensGroup: [
-        [
-          [
-            {
-              name: '新建',
-              isRole: true,
-              click: this.addData
-            }
-          ],
-        ],
-      ],
       // 表格属性
       // 表格属性
       tableAttributes: {
       tableAttributes: {
         // 启用勾选列
         // 启用勾选列
@@ -62,6 +51,20 @@ export default {
     }
     }
   },
   },
   computed: {
   computed: {
+	// 事件组合
+	optionsEvensGroup() {
+		return [
+			[
+				[
+					this.optionsEvensAuth("add", {
+						click: () => {
+							this.addData
+						}
+					})
+				],
+			]
+		]
+	},
     // 更多参数
     // 更多参数
     moreParameters() {
     moreParameters() {
       return []
       return []
@@ -113,31 +116,31 @@ export default {
     selectionChange(data) {
     selectionChange(data) {
       this.recordSelected = data
       this.recordSelected = data
     },
     },
-    // 表格操作列
-    operation(h, { row, index, column }) {
-      return (
-        <div class='operation-btns'>
-          <el-button type="text" onClick={() => {
-            getStorageDetail({ id: row.storageId }).then(res => {
-              Object.assign(this.formData, res.data)
-              this.formDialogType = 1
-              this.openForm()
-            })
-          }}>编辑</el-button>
-          <el-popconfirm
-            title="确定删除吗?"
-            onConfirm={() => {
-              deleteStorage({ storageId: row.storageId }).then(() => {
-                this.$message({ type: 'success', message: '删除成功!' })
-                this.$refs.pageRef.refreshList()
-              })
-            }}
-          >
-            <el-button type="text" slot="reference">删除</el-button>
-          </el-popconfirm>
-        </div>
-      )
-    },
+	// 表格操作列
+	operation() {
+		return this.operationBtn({
+			edit: {
+				btnType: 'text',
+				click: ({ row, index, column }) => {
+					getStorageDetail({ id: row.storageId }).then(res => {
+					  Object.assign(this.formData, res.data)
+					  this.formDialogType = 1
+					  this.openForm()
+					})
+				}
+			},
+			del: {
+				btnType: 'text',
+				prompt: '确定删除吗?',
+				click: ({ row, index, column }) => {
+					deleteStorage({ storageId: row.storageId }).then(() => {
+					  this.$message({ type: 'success', message: '删除成功!' })
+					  this.$refs.pageRef.refreshList()
+					})
+				}
+			}
+		})
+	},
     addData() {
     addData() {
       this.formDialogType = 0
       this.formDialogType = 0
       this.openForm()
       this.openForm()

+ 20 - 17
src/views/valueAddedService/extendedWarrantyWork/index.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-  <template-page ref="pageRef" :getList="getList" :operation="operation" :exportList="exportList"
+  <template-page ref="pageRef" :getList="getList" :operation="operation()" :exportList="exportList"
     :columnParsing="columnParsing" :tableAttributes="tableAttributes" :tableEvents="tableEvents"
     :columnParsing="columnParsing" :tableAttributes="tableAttributes" :tableEvents="tableEvents"
     :screeningAnalysis="screeningAnalysis" :filterMethod="filterMethod" :replaceOrNotMap="true">
     :screeningAnalysis="screeningAnalysis" :filterMethod="filterMethod" :replaceOrNotMap="true">
   </template-page>
   </template-page>
@@ -11,11 +11,12 @@ import import_mixin from '@/components/template/import_mixin.js'
 import { orderBaseList, orderBaseListExport } from "@/api/workOrderPool.js"
 import { orderBaseList, orderBaseListExport } from "@/api/workOrderPool.js"
 import ywgdjs from "@/assets/ywgdjs.png"
 import ywgdjs from "@/assets/ywgdjs.png"
 import yjs from "@/assets/yjs.png"
 import yjs from "@/assets/yjs.png"
+import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
 export default {
   components: {
   components: {
     TemplatePage,
     TemplatePage,
   },
   },
-  mixins: [import_mixin],
+  mixins: [import_mixin,operation_mixin],
   data() {
   data() {
     return {
     return {
       // 表格属性
       // 表格属性
@@ -104,21 +105,23 @@ export default {
     selectionChange(data) {
     selectionChange(data) {
       this.recordSelected = data
       this.recordSelected = data
     },
     },
-
-    operation(h, { row, index, column }) {
-      return (
-        <div class='operation-btns'>
-          <el-button type="text" onClick={() => {
-            this.$router.push({
-              name: "workOrderPool",
-              query: {
-                id: row.id,
-              }
-            })
-          }}>详情</el-button>
-        </div>
-      )
-    },
+		
+	// 表格操作列
+	operation() {
+		return this.operationBtn({
+			detail: {
+				btnType: 'text',
+				click: ({ row, index, column }) => {
+					this.$router.push({
+					  name: "workOrderPool",
+					  query: {
+					    id: row.id,
+					  }
+					})
+				}
+			}
+		})
+	},
   }
   }
 }
 }
 </script>
 </script>

+ 21 - 19
src/views/valueAddedService/orderBranchAccount/index.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
   <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
     :options-evens-group="optionsEvensGroup" :more-parameters="moreParameters" :column-parsing="columnParsing"
     :options-evens-group="optionsEvensGroup" :more-parameters="moreParameters" :column-parsing="columnParsing"
-    :operation="operation" :exportList="exportList">
+    :operation="operation()" :exportList="exportList">
     <div class="cartographer">
     <div class="cartographer">
       <el-dialog title="明细" width="100%" :modal="false" :visible.sync="formDialog"
       <el-dialog title="明细" width="100%" :modal="false" :visible.sync="formDialog"
         :before-close="() => { formDialog = false }">
         :before-close="() => { formDialog = false }">
@@ -14,6 +14,7 @@
 <script>
 <script>
 import TemplatePage from '@/components/template/template-page-1.vue'
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import import_mixin from '@/components/template/import_mixin.js'
+import operation_mixin from '@/components/template/operation_mixin.js'
 import {
 import {
   increOrderSettleCountList,
   increOrderSettleCountList,
   increOrderSettleCountListExport
   increOrderSettleCountListExport
@@ -21,7 +22,7 @@ import {
 import { increOrderSettleList } from "@/api/orderSettleManag.js"
 import { increOrderSettleList } from "@/api/orderSettleManag.js"
 export default {
 export default {
   components: { TemplatePage },
   components: { TemplatePage },
-  mixins: [import_mixin],
+  mixins: [import_mixin,operation_mixin],
   data() {
   data() {
     return {
     return {
       // 事件组合
       // 事件组合
@@ -63,23 +64,24 @@ export default {
     selectionChange(data) {
     selectionChange(data) {
       this.recordSelected = data
       this.recordSelected = data
     },
     },
-    // 操作按钮
-    operation(h, { row, index, column }) {
-      return (
-        <div class="operation-btns">
-          <el-button type="text" onClick={() => {
-            this.detailParams = [...this.detailParams.filter(item => item.param === "a.pay_time"), {
-              param: "a.websit_id",
-              compare: "=",
-              value: row.websitId
-            }];
-            this.$nextTick(() => {
-              this.formDialog = true
-            })
-          }}>明细</el-button>
-        </div>
-      )
-    },
+	// 表格操作列
+	operation() {
+		return this.operationBtn({
+			detail: {
+				btnType: 'text',
+				click: ({ row, index, column }) => {
+					this.detailParams = [...this.detailParams.filter(item => item.param === "a.pay_time"), {
+					  param: "a.websit_id",
+					  compare: "=",
+					  value: row.websitId
+					}];
+					this.$nextTick(() => {
+					  this.formDialog = true
+					})
+				}
+			}
+		})
+	},
     // 明细列表
     // 明细列表
     getList2(p) {
     getList2(p) {
       var pam = JSON.parse(JSON.stringify(p))
       var pam = JSON.parse(JSON.stringify(p))

+ 81 - 68
src/views/valueAddedService/orderSettleManag/index.vue

@@ -1,6 +1,6 @@
 <template>
 <template>
   <template-page ref="pageRef" :get-list="getList" :exportList="exportList" :table-attributes="tableAttributes"
   <template-page ref="pageRef" :get-list="getList" :exportList="exportList" :table-attributes="tableAttributes"
-    :table-events="tableEvents" :moreParameters="moreParameters" :column-parsing="columnParsing" :operation="operation"
+    :table-events="tableEvents" :moreParameters="moreParameters" :column-parsing="columnParsing" :operation="operation()"
     :operationColumnWidth="200" :optionsEvensGroup="optionsEvensGroup">
     :operationColumnWidth="200" :optionsEvensGroup="optionsEvensGroup">
     <div class="cartographer">
     <div class="cartographer">
       <el-dialog :title="formTypeName[formType]" width="100%" :modal="false" :visible.sync="formDialog"
       <el-dialog :title="formTypeName[formType]" width="100%" :modal="false" :visible.sync="formDialog"
@@ -30,6 +30,7 @@ import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import import_mixin from '@/components/template/import_mixin.js'
 import { increOrderSettleList, increOrderSettleListExport, increOrderSettleDetail, increOrderSettleConfirm, increOrderSettleRefund } from "@/api/orderSettleManag.js"
 import { increOrderSettleList, increOrderSettleListExport, increOrderSettleDetail, increOrderSettleConfirm, increOrderSettleRefund } from "@/api/orderSettleManag.js"
 import ImageUpload from '@/components/file-upload'
 import ImageUpload from '@/components/file-upload'
+import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
 export default {
   props: {
   props: {
     storageType: {
     storageType: {
@@ -38,27 +39,9 @@ export default {
     }
     }
   },
   },
   components: { TemplatePage, ImageUpload },
   components: { TemplatePage, ImageUpload },
-  mixins: [import_mixin],
+  mixins: [import_mixin,operation_mixin],
   data() {
   data() {
     return {
     return {
-      // 事件组合
-      optionsEvensGroup: [[
-        [
-          {
-            name: '批量结算',
-            click: () => {
-              if (this.recordSelected.length === 0) {
-                this.$message.warning('请勾选订单')
-                return
-              }
-              increOrderSettleConfirm(this.recordSelected.map(item => item.id)).then(res => {
-                this.$message({ type: 'success', message: `成功!` })
-                this.$refs.pageRef.refreshList()
-              })
-            }
-          },
-        ]
-      ]],
       // 表格属性
       // 表格属性
       tableAttributes: {
       tableAttributes: {
         // 启用勾选列
         // 启用勾选列
@@ -80,6 +63,27 @@ export default {
     }
     }
   },
   },
   computed: {
   computed: {
+	// 事件组合
+	optionsEvensGroup() {
+		return [
+			[
+				[
+					this.optionsEvensAuth("bulkSettlemen", {
+						click: () => {
+							if (this.recordSelected.length === 0) {
+							  this.$message.warning('请勾选订单')
+							  return
+							}
+							increOrderSettleConfirm(this.recordSelected.map(item => item.id)).then(res => {
+							  this.$message({ type: 'success', message: `成功!` })
+							  this.$refs.pageRef.refreshList()
+							})
+						}
+					})
+				],
+			]
+		]
+	},
     // 更多参数
     // 更多参数
     moreParameters() {
     moreParameters() {
       return []
       return []
@@ -336,54 +340,63 @@ export default {
     selectionChange(data) {
     selectionChange(data) {
       this.recordSelected = data
       this.recordSelected = data
     },
     },
-    // 操作按钮
-    operation(h, { row, index, column }) {
-
-      return (
-        <div class='operation-btns'>
-          <el-button type="text" onClick={() => {
-            this.formType = 0
-            this.getDetail(row.id)
-          }}>查看</el-button>
-          {["PAID", "REFUND"].includes(row.payStatus) ? (
-            <el-button type="text" onClick={() => {
-              this.$router.push({
-                name: "workOrderPool",
-                query: {
-                  pgIncreItemId: row.id,
-                }
-              })
-            }}>服务单明细</el-button>
-          ) : null}
-          {["PAID"].includes(row.payStatus) && ["ING"].includes(row.settleStatus) && (() => {
-            var currentDate = new Date(row.payTime);
-            currentDate.setDate(currentDate.getDate() + 7);
-            currentDate.setHours(23);
-            currentDate.setMinutes(59);
-            currentDate.setSeconds(59);
-            return currentDate > new Date() 
-          })() ? (
-            <el-popconfirm
-              title={`是否确定退款?`}
-              onConfirm={() => {
-                increOrderSettleRefund({ id: row.id }).then(res => {
-                  this.$message({ type: 'success', message: `退款成功!` })
-                  this.$refs.pageRef.refreshList()
-                })
-              }}
-            >
-              <el-button type="text" slot="reference">退款</el-button>
-            </el-popconfirm>
-          ) : null}
-          {["PAID"].includes(row.payStatus) && ["ING"].includes(row.settleStatus) ? (
-            <el-button type="text" onClick={() => {
-              this.formType = 1
-              this.getDetail(row.id)
-            }}>结算</el-button>
-          ) : null}
-        </div>
-      )
-    },
+	// 表格操作列
+	operation() {
+		return this.operationBtn({
+			detail: {
+				btnType: 'text',
+				click: ({ row, index, column }) => {
+					this.formType = 0
+					this.getDetail(row.id)
+				}
+			},
+			orderDetail: {
+				btnType: 'text',
+				conditions: ({ row, index, column }) => {
+					return ["PAID", "REFUND"].includes(row.payStatus)
+				},
+				click: ({ row, index, column }) => {
+					this.$router.push({
+					  name: "workOrderPool",
+					  query: {
+					    pgIncreItemId: row.id,
+					  }
+					})
+				}
+			},
+			refund: {
+				btnType: 'text',
+				prompt: '是否确定退款?',
+				conditions: ({ row, index, column }) => {
+					return ["PAID"].includes(row.payStatus) && ["ING"].includes(row.settleStatus) && (() => {
+						var currentDate = new Date(row.payTime);
+						currentDate.setDate(currentDate.getDate() + 7);
+						currentDate.setHours(23);
+						currentDate.setMinutes(59);
+						currentDate.setSeconds(59);
+						return currentDate > new Date() 
+					})()
+				},
+				click: ({ row, index, column }) => {
+					increOrderSettleRefund({ id: row.id }).then(res => {
+					  this.$message({ type: 'success', message: `退款成功!` })
+					  this.$refs.pageRef.refreshList()
+					})
+				}
+			},
+			settlement: {
+				btnType: 'text',
+				prompt: '是否确定结算?',
+				conditions: ({ row, index, column }) => {
+					return ["PAID"].includes(row.payStatus) && ["ING"].includes(row.settleStatus)
+				},
+				click: ({ row, index, column }) => {
+					this.formType = 1
+					this.getDetail(row.id)
+				}
+			},
+		})
+	},
     getDetail(id) {
     getDetail(id) {
       increOrderSettleDetail({ id }).then(res => {
       increOrderSettleDetail({ id }).then(res => {
         Object.assign(this.formData, res.data)
         Object.assign(this.formData, res.data)

+ 28 - 23
src/views/valueAddedService/valueAddedConfig/index.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <template-page ref="pageRef" :get-list="getList" :exportList="exportList" :table-attributes="tableAttributes"
   <template-page ref="pageRef" :get-list="getList" :exportList="exportList" :table-attributes="tableAttributes"
     :table-events="tableEvents" :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters"
     :table-events="tableEvents" :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters"
-    :column-parsing="columnParsing" :operation="operation" :replaceOrNotMap="false">
+    :column-parsing="columnParsing" :operation="operation()" :replaceOrNotMap="false">
     <div class="cartographer">
     <div class="cartographer">
       <el-dialog title="增值服务配置" width="100%" :modal="false" :visible.sync="formDialog" :before-close="formCancel">
       <el-dialog title="增值服务配置" width="100%" :modal="false" :visible.sync="formDialog" :before-close="formCancel">
         <zj-form-container v-if="formDialog" ref="formRef" :form-data="formData" :styleSwitch="false">
         <zj-form-container v-if="formDialog" ref="formRef" :form-data="formData" :styleSwitch="false">
@@ -25,6 +25,7 @@ import { increConfigList, increConfigListExport, increConfigDetail, increConfigA
 import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
 import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
 import { getClassifyList } from '@/api/goods'
 import { getClassifyList } from '@/api/goods'
 import { getDataDictionary } from '@/api/dataDictionary.js'
 import { getDataDictionary } from '@/api/dataDictionary.js'
+import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
 export default {
   props: {
   props: {
     storageType: {
     storageType: {
@@ -33,20 +34,9 @@ export default {
     }
     }
   },
   },
   components: { TemplatePage },
   components: { TemplatePage },
-  mixins: [import_mixin],
+  mixins: [import_mixin,operation_mixin],
   data() {
   data() {
     return {
     return {
-      // 事件组合
-      optionsEvensGroup: [[
-        [
-          {
-            name: '新增',
-            click: () => {
-              this.openForm()
-            }
-          },
-        ]
-      ]],
       // 表格属性
       // 表格属性
       tableAttributes: {
       tableAttributes: {
         // 启用勾选列
         // 启用勾选列
@@ -77,6 +67,20 @@ export default {
     }
     }
   },
   },
   computed: {
   computed: {
+		// 事件组合
+		optionsEvensGroup() {
+			return [
+				[
+					[
+						this.optionsEvensAuth("add", {
+							click: () => {
+								this.openForm()
+							}
+						})
+					],
+				]
+			]
+		},
     // 更多参数
     // 更多参数
     moreParameters() {
     moreParameters() {
       return []
       return []
@@ -474,16 +478,17 @@ export default {
     selectionChange(data) {
     selectionChange(data) {
       this.recordSelected = data
       this.recordSelected = data
     },
     },
-    // 操作按钮
-    operation(h, { row, index, column }) {
-      return (
-        <div class='operation-btns'>
-          <el-button type="text" onClick={() => {
-            this.getDetail(row.id)
-          }}>详情</el-button>
-        </div>
-      )
-    },
+	// 表格操作列
+	operation() {
+		return this.operationBtn({
+			detail: {
+				btnType: 'text',
+				click: ({ row, index, column }) => {
+					this.getDetail(row.id)
+				}
+			}
+		})
+	},
     panduancp() {
     panduancp() {
       try {
       try {
         this.formData.pgIncreItems.map((row, index) => {
         this.formData.pgIncreItems.map((row, index) => {