Prechádzať zdrojové kódy

财务管理、协议管理增加按钮权限控制

@dongkboy 2 rokov pred
rodič
commit
b516cbd37c
26 zmenil súbory, kde vykonal 1736 pridanie a 1679 odobranie
  1. 159 197
      src/components/TemplateTable/index.vue
  2. 24 1
      src/http/moudules/login.js
  3. 259 0
      src/utils/md5.js
  4. 12 12
      src/views/AgreementManage/CarInsurance/AgreementEntry.vue
  5. 672 650
      src/views/AgreementManage/CarInsurance/AgreementExamine.vue
  6. 2 1
      src/views/AgreementManage/CarInsurance/SourceManagement.vue
  7. 9 4
      src/views/Core/KtButton.vue
  8. 9 6
      src/views/Core/KtCommonTable.vue
  9. 8 3
      src/views/FinancialManagement/CarInsurance/Verifytasks/Verifyintasks.vue
  10. 10 4
      src/views/FinancialManagement/CarInsurance/Verifytasks/Verifyuntasks.vue
  11. 13 21
      src/views/FinancialManagement/ExpenseManagement/ExpenseApplyFor.vue
  12. 137 322
      src/views/FinancialManagement/ExpenseManagement/ExpenseManagement.vue
  13. 46 92
      src/views/FinancialManagement/ExpenseManagement/ExpenseMessage.vue
  14. 12 27
      src/views/FinancialManagement/ExpenseManagement/PaymentManagement.vue
  15. 47 91
      src/views/FinancialManagement/ExpenseManagement/Profit.vue
  16. 38 52
      src/views/FinancialManagement/ExpenseManagement/ReportViewing.vue
  17. 6 14
      src/views/FinancialManagement/ExpenseManagement/TransferRecord.vue
  18. 15 16
      src/views/FinancialManagement/InsuranceData/InsuranceDataExport.vue
  19. 4 3
      src/views/FinancialManagement/ReconciliationSystem/ReceivablePayableCollection/AccountsReceivable.vue
  20. 6 10
      src/views/FinancialManagement/ReconciliationSystem/ReceivablePayableCollection/ChannelAccount.vue
  21. 6 12
      src/views/FinancialManagement/ReconciliationSystem/ReceivablePayableCollection/ReceivablePayableCollection.vue
  22. 7 1
      src/views/FinancialManagement/ReconciliationSystem/ReceivablePayableCollection/SettlementCollect.vue
  23. 14 9
      src/views/FinancialManagement/ReconciliationSystem/ReceivablePayableCollection/SettlementSource.vue
  24. 5 1
      src/views/FinancialManagement/ReconciliationSystem/ReceivablePayableCollection/SigningCollect.vue
  25. 21 14
      src/views/FinancialManagement/ReconciliationSystem/ReceivablePayableCollection/Source.vue
  26. 195 116
      src/views/Login.vue

+ 159 - 197
src/components/TemplateTable/index.vue

@@ -1,159 +1,121 @@
 <template>
   <div ref="commonTable">
     <!-- 搜索栏 -->
-    <el-form
-      v-if="formList.length > 0"
-      :inline="true"
-      :model="searchDataClone"
-      label-width="105px"
-      ref="searchDataClone"
-      id="commonTable"
-      class="demo-form-inline device-wrapper"
-    >
+    <el-form v-if="formList.length > 0" :inline="true" :model="searchDataClone" label-width="105px" ref="searchDataClone"
+      id="commonTable" class="demo-form-inline device-wrapper">
       <el-form-item v-for="f in formList" :key="f.prop" :label="f.label" :prop="f.prop">
         <template>
           <template v-if="f.type === 'input'">
-            <el-input clearable v-model.trim="searchDataClone[f.prop]" size="small" :placeholder="'请输入'+f.label"></el-input>
+            <el-input clearable v-model.trim="searchDataClone[f.prop]" size="small"
+              :placeholder="'请输入' + f.label"></el-input>
           </template>
           <template v-else-if="f.type === 'company'">
-            <el-select size="small" clearable  v-model="searchDataClone[f.prop]" :placeholder="'请输入'+f.label">
+            <el-select size="small" clearable v-model="searchDataClone[f.prop]" :placeholder="'请输入' + f.label">
               <el-option label="不限" value v-if="f.selectAuto"></el-option>
-              <el-option
-                v-for="(s, i) in InsCompanyList"
-                :key="i"
-                :label="s.name"
-                :value="s.id"
-              ></el-option>
+              <el-option v-for="(s, i) in InsCompanyList" :key="i" :label="s.name" :value="s.id"></el-option>
             </el-select>
           </template>
           <template v-else-if="f.type === 'companyCheck'">
-            <el-select class="selectLength" multiple collapse-tags size="small"   v-model="searchDataClone[f.prop]" :placeholder="'请输入'+f.label">
+            <el-select class="selectLength" multiple collapse-tags size="small" v-model="searchDataClone[f.prop]"
+              :placeholder="'请输入' + f.label">
               <el-option label="不限" value v-if="f.selectAuto"></el-option>
-              <el-option
-                v-for="(s, i) in InsCompanyList"
-                :key="i"
-                :label="s.name"
-                :value="s.id"
-              ></el-option>
+              <el-option v-for="(s, i) in InsCompanyList" :key="i" :label="s.name" :value="s.id"></el-option>
             </el-select>
           </template>
           <template v-else-if="f.type === 'select'">
-            <el-select size="small" clearable  v-model="searchDataClone[f.prop]" :placeholder="'请输入'+f.label">
+            <el-select size="small" clearable v-model="searchDataClone[f.prop]" :placeholder="'请输入' + f.label">
               <el-option label="不限" value v-if="f.selectAuto"></el-option>
-              <el-option
-                v-for="(s, i) in f.options"
-                :key="i"
-                :label="s.label||s.dictTag"
-                :value="s.value||s.dictValue"
-              ></el-option>
+              <el-option v-for="(s, i) in f.options" :key="i" :label="s.label || s.dictTag"
+                :value="s.value || s.dictValue"></el-option>
             </el-select>
           </template>
           <template v-else-if="f.type === 'datePicker'">
             <!-- 日期区间 -->
-            <el-date-picker
-              type="daterange"
-              size="small"
-              v-model="searchDataClone[f.prop]"
-              align="right"
-              unlink-panels
-              range-separator="至"
-              start-placeholder="开始时间"
-              end-placeholder="结束时间"
-              value-format="yyyy-MM-dd HH:mm:ss"
-              :default-time="['00:00:00', '23:59:59']"
-              :clearable="true"
-            ></el-date-picker>
+            <el-date-picker type="daterange" size="small" v-model="searchDataClone[f.prop]" align="right" unlink-panels
+              range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" value-format="yyyy-MM-dd HH:mm:ss"
+              :default-time="['00:00:00', '23:59:59']" :clearable="true"></el-date-picker>
           </template>
           <template v-else-if="f.type === 'date'">
             <!-- 一天 -->
-            <el-date-picker
-              type="date"
-              size="small"
-              v-model="searchDataClone[f.prop]"
-              placeholder="选择日期"
-              value-format="yyyy-MM-dd"
-            ></el-date-picker>
-            </template>
+            <el-date-picker type="date" size="small" v-model="searchDataClone[f.prop]" placeholder="选择日期"
+              value-format="yyyy-MM-dd"></el-date-picker>
+          </template>
           <template v-else-if="f.type === 'radio'">
-            <el-radio-group v-model="searchDataClone[f.prop]" :placeholder="'请输入'+f.label">
-                <el-radio  v-for="(r, i) in f.radioList" :key="i" :label="r.value" >{{r.label}}</el-radio>
-              </el-radio-group>
+            <el-radio-group v-model="searchDataClone[f.prop]" :placeholder="'请输入' + f.label">
+              <el-radio v-for="(r, i) in f.radioList" :key="i" :label="r.value">{{ r.label }}</el-radio>
+            </el-radio-group>
           </template>
           <template v-else-if="f.type === 'slot'">
-            <slot  show-overflow-tooltip :name="f.name"></slot>
+            <slot show-overflow-tooltip :name="f.name"></slot>
           </template>
         </template>
-       
+
       </el-form-item>
-      
-      
+
+
       <el-form-item>
         <el-button style="margin-left:30px" size="small" @click="resetForm('searchDataClone')">重置</el-button>
         <el-button type="primary" size="small" @click="handleSearchList()">查询</el-button>
-        <template v-if="btnGroup.length>0">
-          <span v-for="(val, idx) in btnGroup" :key="idx"  style="margin-left:10px">
+        <template v-if="btnGroup.length > 0">
+          <span v-for="(val, idx) in btnGroup" :key="idx" style="margin-left:10px">
             <slot v-if="val.slot" show-overflow-tooltip :name="val.name"></slot>
             <el-button v-else :type="val.type || 'primary'" size="small" @click="val.click()">{{ val.name }}</el-button>
           </span>
-      </template>
+        </template>
       </el-form-item>
       <!-- <el-form-item v-if="btnGroup.length>0" >
             <el-button v-for="(val, idx) in btnGroup" :key="idx" :type="val.type || 'primary'" size="small" @click="tabFun(val)">{{ val.name }}</el-button>
       </el-form-item> -->
     </el-form>
 
-      <!--表格-->
-    
-      <el-table 
-        :data="data"  
-        border
-        size="small"
-        style="width: 100%" 
-        :height="tableHeight"
-        v-loading="tableConfig.loading" 
-        element-loading-text="数据加载中" 
-        element-loading-spinner="el-icon-loading" 
-        @selection-change="handleSelectionChange"
-        :row-style="{ height: '55px' }"
-        :cell-style="{ padding: '0px' }"
-        :header-cell-style="{ background: '#F2F7FC', fontWeight: '700', color: '#606266' }"
-        :cell-class-name="rowClass"
-        >
-            <el-table-column type="selection" :width="tableConfig.selectionWidth || '50'" v-if="tableConfig.isCheckBox" align="center" />
-            <el-table-column type="index" :width="tableConfig.indexWidth || '50'" v-if="tableConfig.isShowIndex" align="center" label="序号" />
-            <template v-for="(item,index) in tableConfig.columns">
-                <!-- 日期内容 -->
-                <el-table-column v-if="item.type ==='date'" :align="'center'" :fixed="item.fixed" :width="item.width || 150"   show-overflow-tooltip :label="item.label"   :key="item.prop" >
-                    <template slot-scope="scope">
-                        <div>{{ scope.row[item.prop] | formateDate }}</div>
-                    </template>
-                </el-table-column>
-                <!-- 字典项 -->
-                <el-table-column v-if="item.type === 'dic'"  :align="'center'"  :width="item.width || ''"  :fixed="item.fixed" show-overflow-tooltip :label="item.label"  :key="item.prop"  :prop="item.prop">
-                    <template slot-scope="scope">
-                    <span>{{ selectDictLabel(dictData[item.dic], scope.row[item.prop]) }}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column v-if="item.type === 'statMap'"  :align="'center'"  :width="item.width || ''"  :fixed="item.fixed" show-overflow-tooltip :label="item.label"  :key="item.prop"  :prop="item.prop">
-                    <template slot-scope="scope">
-                    <span>  {{ statMaps(item.options)[scope.row[item.prop]] || '--' }}</span>
-                    </template>
-                </el-table-column>
-                <!-- 自定义内容 -->
-                <slot v-if="item.type ==='slot'" show-overflow-tooltip :name="item.name"></slot>
-                <!-- 常规文本内容 -->
-                <el-table-column v-if="item.type ==='text'" :align="'center'"  :width="item.width || ''"  :fixed="item.fixed"  :label="item.label"  :key="item.prop"  :prop="item.prop"></el-table-column>
+    <!--表格-->
+
+    <el-table :data="data" border size="small" style="width: 100%" :height="tableHeight" v-loading="tableConfig.loading"
+      element-loading-text="数据加载中" element-loading-spinner="el-icon-loading" @selection-change="handleSelectionChange"
+      :row-style="{ height: '55px' }" :cell-style="{ padding: '0px' }"
+      :header-cell-style="{ background: '#F2F7FC', fontWeight: '700', color: '#606266' }" :cell-class-name="rowClass">
+      <el-table-column type="selection" :width="tableConfig.selectionWidth || '50'" v-if="tableConfig.isCheckBox"
+        align="center" />
+      <el-table-column type="index" :width="tableConfig.indexWidth || '50'" v-if="tableConfig.isShowIndex" align="center"
+        label="序号" />
+      <template v-for="(item, index) in tableConfig.columns">
+        <!-- 日期内容 -->
+        <el-table-column v-if="item.type === 'date'" :align="'center'" :fixed="item.fixed" :width="item.width || 150"
+          show-overflow-tooltip :label="item.label" :key="item.prop">
+          <template slot-scope="scope">
+            <div>{{ scope.row[item.prop] | formateDate }}</div>
+          </template>
+        </el-table-column>
+        <!-- 字典项 -->
+        <el-table-column v-if="item.type === 'dic'" :align="'center'" :width="item.width || ''" :fixed="item.fixed"
+          show-overflow-tooltip :label="item.label" :key="item.prop" :prop="item.prop">
+          <template slot-scope="scope">
+            <span>{{ selectDictLabel(dictData[item.dic], scope.row[item.prop]) }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column v-if="item.type === 'statMap'" :align="'center'" :width="item.width || ''" :fixed="item.fixed"
+          show-overflow-tooltip :label="item.label" :key="item.prop" :prop="item.prop">
+          <template slot-scope="scope">
+            <span> {{ statMaps(item.options)[scope.row[item.prop]] || '--' }}</span>
+          </template>
+        </el-table-column>
+        <!-- 自定义内容 -->
+        <slot v-if="item.type === 'slot'" show-overflow-tooltip :name="item.name"></slot>
+        <!-- 常规文本内容 -->
+        <el-table-column v-if="item.type === 'text'" :align="'center'" :width="item.width || ''" :fixed="item.fixed"
+          :label="item.label" :key="item.prop" :prop="item.prop"></el-table-column>
 
-            </template>
-            <!-- <slot name="operate" :row="scope.row"></slot> -->
-            <!-- 自定义操作栏 -->
-            <el-table-column v-if="tableConfig.operateShow " label="操作" align="center" :min-width="tableConfig.operationWidth || '100'"  fixed="right">
-                <template slot-scope="scope">
-                <slot name="operate" :row="scope.row"></slot>
-                </template>
-            </el-table-column>  
-            <!-- 数组形式的操作栏,用于普通按钮 -->
-            <!-- // optBtns:[
+      </template>
+      <!-- <slot name="operate" :row="scope.row"></slot> -->
+      <!-- 自定义操作栏 -->
+      <el-table-column v-if="tableConfig.operateShow" label="操作" align="center"
+        :min-width="tableConfig.operationWidth || '100'" fixed="right">
+        <template slot-scope="scope">
+          <slot name="operate" :row="scope.row"></slot>
+        </template>
+      </el-table-column>
+      <!-- 数组形式的操作栏,用于普通按钮 -->
+      <!-- // optBtns:[
             //   {
             //     type:'primary',
             //     label:'修改',
@@ -163,35 +125,37 @@
             //     click:(row, index) => {return this.modifyFun(row)},
             //   }
             // ] -->
-            <el-table-column v-if="tableConfig.optBtns" :min-width="tableConfig.operationWidth || '100'" label="操作" fixed="right"   header-align="center" align="center" >
-                <template slot-scope="scope">
-                    <span v-for="(btn, index) in tableConfig.optBtns" :key="index">
-                        <el-button style="margin:0 10px" v-if="!btn.hide  ||(btn.hide &&btn.hide(scope.row))"  v-permission="btn.perm"    @click="btn.click(scope.row, index)" :type="btn.type ||'primary'" :icon="btn.icon" size="small">{{ btn.label }} </el-button>                   
-                   </span>
-                </template>
-              </el-table-column>
+      <el-table-column v-if="tableConfig.optBtns" :min-width="tableConfig.operationWidth || '100'" label="操作"
+        fixed="right" header-align="center" align="center">
+        <template slot-scope="scope">
+          <span v-for="(btn, index) in tableConfig.optBtns" :key="index">
+            <!-- <el-button style="margin:0 10px" v-if="!btn.hide || (btn.hide && btn.hide(scope.row))" v-permission="btn.perm"
+              @click="btn.click(scope.row, index)" :type="btn.type || 'primary'" :icon="btn.icon" size="small">{{
+                btn.label
+              }} </el-button> -->
+            <kt-button style="margin:0 10px" v-if="!btn.hide || (btn.hide && btn.hide(scope.row))" :icon="btn.icon" :label="btn.label"
+              :type="btn.type || 'primary'" size="small" :perms="btn.perm"  @click="btn.click(scope.row, index)" />
+          </span>
+        </template>
+      </el-table-column>
 
-        </el-table>
-      <!-- 分页 -->
-      <div class="block" ref="bottomFixed">
-        <el-pagination
-            v-if="tableConfig.isPaginationShow && pagination.totalSize"
-            style="margin-top: 10px"
-            :page-size="pagination.pageSize"
-            :current-page.sync="pagination.pageNum"
-            :total="pagination.totalSize"
-            layout="total, sizes,prev, pager, next,jumper"
-            :page-sizes="[10, 20, 50, 100]"
-            @size-change="handleSizeChange"
-            @current-change="handleCurrentChange"
-        />
-      </div>
+    </el-table>
+    <!-- 分页 -->
+    <div class="block" ref="bottomFixed">
+      <el-pagination v-if="tableConfig.isPaginationShow && pagination.totalSize" style="margin-top: 10px"
+        :page-size="pagination.pageSize" :current-page.sync="pagination.pageNum" :total="pagination.totalSize"
+        layout="total, sizes,prev, pager, next,jumper" :page-sizes="[10, 20, 50, 100]" @size-change="handleSizeChange"
+        @current-change="handleCurrentChange" />
+    </div>
   </div>
 </template>
-  
-  <script type="text/ecmascript-6">
 
+<script type="text/ecmascript-6">
+import KtButton from "@/views/Core/KtButton";
 export default {
+  components: {
+    KtButton,
+  },
   props: {
     formList: {
       type: Array,
@@ -218,27 +182,27 @@ export default {
     //   }
     // },
     pagination: {
-        type: Object,
-        default: () => ({
-            pageNum: 1,
-            pageSize: 10,
-            totalSize: 0,
-        }),
+      type: Object,
+      default: () => ({
+        pageNum: 1,
+        pageSize: 10,
+        totalSize: 0,
+      }),
     },
-    rowClass:{
-        type: Function,
-        default: ()=>'',
+    rowClass: {
+      type: Function,
+      default: () => '',
     },
-    data:{
-        type:Array,
-        default:()=> []
+    data: {
+      type: Array,
+      default: () => []
     },
   },
   data() {
     return {
-      tableHeight:0,
-      InsCompanyList:[],
-      searchDataClone:{}
+      tableHeight: 0,
+      InsCompanyList: [],
+      searchDataClone: {}
     };
   },
   created() {
@@ -246,22 +210,22 @@ export default {
   },
   mounted() {
     setTimeout(() => {
-      var divHg =0;
-      if(document.getElementById("commonTable")!=null){
+      var divHg = 0;
+      if (document.getElementById("commonTable") != null) {
         divHg = document.getElementById("commonTable").clientHeight
-      }else{
+      } else {
         divHg = 100
       }
       let bottomTop = this.$refs.bottomFixed.offsetTop;
-      this.tableHeight =window.innerHeight - bottomTop - divHg -80 + "px";
+      this.tableHeight = window.innerHeight - bottomTop - divHg - 80 + "px";
     }, 10);
   },
   filters: {
-        formateDate(val) {
-            return formatDateTime(val)
-        }
-    },
-  
+    formateDate(val) {
+      return formatDateTime(val)
+    }
+  },
+
   methods: {
     formatDateTime(date) {
       let d = new Date(date),
@@ -272,13 +236,13 @@ export default {
       if (day.length < 2) day = '0' + day;
       return [year, month, day].join('-');
     },
-    companyFun(){
-       this.$api.cost.gainTopList({type:1}).then(res => {
-          if (res.data) {
-              this.InsCompanyList = res.data;
-          }
+    companyFun() {
+      this.$api.cost.gainTopList({ type: 1 }).then(res => {
+        if (res.data) {
+          this.InsCompanyList = res.data;
+        }
       });
-        },
+    },
     statMaps(list) {
       if (!list) return;
       let obj = {};
@@ -287,38 +251,38 @@ export default {
       });
       return obj;
     },
-   
+
     selectDictLabel(dicts, value) {
-        if (value === undefined) {
-            return '';
-        }
-        if (dicts === undefined) {
-            return '';
-        }
-        const actions = [];
-        Object.keys(dicts).some((key) => {
-            if (dicts[key].value === `${value}`) {
-            actions.push(dicts[key].label);
-            return true;
-            }
-        });
-        if (actions.length === 0) {
-            actions.push(value);
+      if (value === undefined) {
+        return '';
+      }
+      if (dicts === undefined) {
+        return '';
+      }
+      const actions = [];
+      Object.keys(dicts).some((key) => {
+        if (dicts[key].value === `${value}`) {
+          actions.push(dicts[key].label);
+          return true;
         }
-        return actions.join('');
+      });
+      if (actions.length === 0) {
+        actions.push(value);
+      }
+      return actions.join('');
     },
     // 表格多选
     handleSelectionChange(currentRow) {
-        this.$emit('selectionChange', currentRow);
+      this.$emit('selectionChange', currentRow);
     },
 
     handleSizeChange(value) {
-        this.pagination.pageSize = value;
-        this.$emit('getList');
+      this.pagination.pageSize = value;
+      this.$emit('getList');
     },
     handleCurrentChange(val) {
-        this.pagination.pageNum = val;
-        this.$emit('getList');
+      this.pagination.pageNum = val;
+      this.$emit('getList');
     },
     // 搜索
     handleSearchList() {
@@ -329,18 +293,17 @@ export default {
     },
     // 重置
     resetForm(formName) {
-        this.searchDataClone={}
-        // this.$refs[formName].resetFields();
-        this.handleSearchList();
+      this.searchDataClone = {}
+      // this.$refs[formName].resetFields();
+      this.handleSearchList();
     },
-    handleOpt(row,index) {
-        this.$emit('handleOpt', row, index)
+    handleOpt(row, index) {
+      this.$emit('handleOpt', row, index)
     },
   }
 };
 </script>
 <style scoped>
-
 .selectLength /deep/ .el-select__tags-text {
   display: inline-block;
   max-width: 110px;
@@ -348,5 +311,4 @@ export default {
   text-overflow: ellipsis;
   white-space: nowrap;
 }
-
-</style>
+</style>

+ 24 - 1
src/http/moudules/login.js

@@ -1,6 +1,6 @@
 import axios from '../axios'
 
-/* 
+/*
  * 系统登录模块
  */
 
@@ -30,3 +30,26 @@ export const logout = () => {
         method: 'get'
     })
 }
+//获取二维码
+export const getQRCode = (id) => {
+  return axios({
+      url: '/getQrCode?uuid='+id,
+      method: 'get',
+  })
+}
+//扫描二维码
+export const scanQRCode = (data) => {
+  return axios({
+      url: '/scanQrCode',
+      method: 'post',
+      data
+  })
+}
+//扫码登录状态
+export const QrCodeStatusQuery = (data) => {
+  return axios({
+      url: '/getQrCodeStatus',
+      method: 'post',
+      data
+  })
+}

+ 259 - 0
src/utils/md5.js

@@ -0,0 +1,259 @@
+/*
+ * JavaScript MD5 1.0.1
+ * https://github.com/blueimp/JavaScript-MD5
+ *
+ * Copyright 2011, Sebastian Tschan
+ * https://blueimp.net
+ *
+ * Licensed under the MIT license:
+ * http://www.opensource.org/licenses/MIT
+ *
+ * Based on
+ * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
+ * Digest Algorithm, as defined in RFC 1321.
+ * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
+ * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+ * Distributed under the BSD License
+ * See http://pajhome.org.uk/crypt/md5 for more info.
+ */
+
+/*
+* Add integers, wrapping at 2^32. This uses 16-bit operations internally
+* to work around bugs in some JS interpreters.
+*/
+function safe_add(x, y) {
+  var lsw = (x & 0xFFFF) + (y & 0xFFFF),
+    msw = (x >> 16) + (y >> 16) + (lsw >> 16);
+  return (msw << 16) | (lsw & 0xFFFF);
+}
+
+/*
+* Bitwise rotate a 32-bit number to the left.
+*/
+function bit_rol(num, cnt) {
+  return (num << cnt) | (num >>> (32 - cnt));
+}
+
+/*
+* These functions implement the four basic operations the algorithm uses.
+*/
+function md5_cmn(q, a, b, x, s, t) {
+  return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b);
+}
+function md5_ff(a, b, c, d, x, s, t) {
+  return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
+}
+function md5_gg(a, b, c, d, x, s, t) {
+  return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
+}
+function md5_hh(a, b, c, d, x, s, t) {
+  return md5_cmn(b ^ c ^ d, a, b, x, s, t);
+}
+function md5_ii(a, b, c, d, x, s, t) {
+  return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
+}
+
+/*
+* Calculate the MD5 of an array of little-endian words, and a bit length.
+*/
+function binl_md5(x, len) {
+  /* append padding */
+  x[len >> 5] |= 0x80 << (len % 32);
+  x[(((len + 64) >>> 9) << 4) + 14] = len;
+
+  var i, olda, oldb, oldc, oldd,
+    a = 1732584193,
+    b = -271733879,
+    c = -1732584194,
+    d = 271733878;
+
+  for (i = 0; i < x.length; i += 16) {
+    olda = a;
+    oldb = b;
+    oldc = c;
+    oldd = d;
+
+    a = md5_ff(a, b, c, d, x[i], 7, -680876936);
+    d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);
+    c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);
+    b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);
+    a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);
+    d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);
+    c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);
+    b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);
+    a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);
+    d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);
+    c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);
+    b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);
+    a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);
+    d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);
+    c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);
+    b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);
+
+    a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);
+    d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);
+    c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);
+    b = md5_gg(b, c, d, a, x[i], 20, -373897302);
+    a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);
+    d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);
+    c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);
+    b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);
+    a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);
+    d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);
+    c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);
+    b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);
+    a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);
+    d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);
+    c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);
+    b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);
+
+    a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);
+    d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);
+    c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);
+    b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);
+    a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);
+    d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);
+    c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);
+    b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);
+    a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);
+    d = md5_hh(d, a, b, c, x[i], 11, -358537222);
+    c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);
+    b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);
+    a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);
+    d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);
+    c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);
+    b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);
+
+    a = md5_ii(a, b, c, d, x[i], 6, -198630844);
+    d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);
+    c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);
+    b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);
+    a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);
+    d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);
+    c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);
+    b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);
+    a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);
+    d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);
+    c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);
+    b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);
+    a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);
+    d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);
+    c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);
+    b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);
+
+    a = safe_add(a, olda);
+    b = safe_add(b, oldb);
+    c = safe_add(c, oldc);
+    d = safe_add(d, oldd);
+  }
+  return [a, b, c, d];
+}
+
+/*
+* Convert an array of little-endian words to a string
+*/
+function binl2rstr(input) {
+  var i,
+    output = '';
+  for (i = 0; i < input.length * 32; i += 8) {
+    output += String.fromCharCode((input[i >> 5] >>> (i % 32)) & 0xFF);
+  }
+  return output;
+}
+
+/*
+* Convert a raw string to an array of little-endian words
+* Characters >255 have their high-byte silently ignored.
+*/
+function rstr2binl(input) {
+  var i,
+    output = [];
+  output[(input.length >> 2) - 1] = undefined;
+  for (i = 0; i < output.length; i += 1) {
+    output[i] = 0;
+  }
+  for (i = 0; i < input.length * 8; i += 8) {
+    output[i >> 5] |= (input.charCodeAt(i / 8) & 0xFF) << (i % 32);
+  }
+  return output;
+}
+
+/*
+* Calculate the MD5 of a raw string
+*/
+function rstr_md5(s) {
+  return binl2rstr(binl_md5(rstr2binl(s), s.length * 8));
+}
+
+/*
+* Calculate the HMAC-MD5, of a key and some data (raw strings)
+*/
+function rstr_hmac_md5(key, data) {
+  var i,
+    bkey = rstr2binl(key),
+    ipad = [],
+    opad = [],
+    hash;
+  ipad[15] = opad[15] = undefined;
+  if (bkey.length > 16) {
+    bkey = binl_md5(bkey, key.length * 8);
+  }
+  for (i = 0; i < 16; i += 1) {
+    ipad[i] = bkey[i] ^ 0x36363636;
+    opad[i] = bkey[i] ^ 0x5C5C5C5C;
+  }
+  hash = binl_md5(ipad.concat(rstr2binl(data)), 512 + data.length * 8);
+  return binl2rstr(binl_md5(opad.concat(hash), 512 + 128));
+}
+
+/*
+* Convert a raw string to a hex string
+*/
+function rstr2hex(input) {
+  var hex_tab = '0123456789abcdef',
+    output = '',
+    x,
+    i;
+  for (i = 0; i < input.length; i += 1) {
+    x = input.charCodeAt(i);
+    output += hex_tab.charAt((x >>> 4) & 0x0F) +
+      hex_tab.charAt(x & 0x0F);
+  }
+  return output;
+}
+
+/*
+* Encode a string as utf-8
+*/
+function str2rstr_utf8(input) {
+  return unescape(encodeURIComponent(input));
+}
+
+/*
+* Take string arguments and return either raw or hex encoded strings
+*/
+function raw_md5(s) {
+  return rstr_md5(str2rstr_utf8(s));
+}
+function hex_md5(s) {
+  return rstr2hex(raw_md5(s));
+}
+function raw_hmac_md5(k, d) {
+  return rstr_hmac_md5(str2rstr_utf8(k), str2rstr_utf8(d));
+}
+function hex_hmac_md5(k, d) {
+  return rstr2hex(raw_hmac_md5(k, d));
+}
+
+export const md5 = (string, key, raw) => {
+  if (!key) {
+    if (!raw) {
+      return hex_md5(string);
+    }
+    return raw_md5(string);
+  }
+  if (!raw) {
+    return hex_hmac_md5(key, string);
+  }
+  return raw_hmac_md5(key, string);
+}

+ 12 - 12
src/views/AgreementManage/CarInsurance/AgreementEntry.vue

@@ -5,7 +5,7 @@
       <!-- 工具区域Start -->
       <el-form class="queryForm p-2 flex" ref="queryFormRef" :model="queryForm" :inline="true" label-width="100px">
         <el-form-item>
-          <el-button :size="overSize" type="success" @click="handleAdd">添加协议</el-button>
+          <kt-button label="添加协议" :size="overSize" type="success" perms="agreement:input:add" @click="handleAdd" />
         </el-form-item>
         <el-form-item label="录入时间">
           <el-date-picker value-format="yyyy-MM-dd" v-model="queryForm.date" style="width: 250px" :size="overSize"
@@ -30,7 +30,7 @@
           </el-select>
         </el-form-item>
         <el-form-item>
-          <el-button :size="overSize" type="primary" @click="queryEsmInfo">查询</el-button>
+          <kt-button label="查询" :size="overSize" type="primary" perms="agreement:input:query" @click="queryEsmInfo" />
         </el-form-item>
       </el-form>
       <el-table :size="overSize" :data="pageResult" height="680" border v-loading="loading" highlight-current-row stripe
@@ -63,10 +63,10 @@
         <el-table-column prop="modifiedBy" label="修改人" align="center" width="130"></el-table-column>
         <el-table-column label="操作" align="center" width="200" fixed="right">
           <template slot-scope="scope">
-            <el-button :size="overSize" type="text" @click="uplatequery(scope.$index, scope.row)"
-              style="color: #e6a23c">编辑</el-button>
-            <el-button :size="overSize" type="text" @click="deletequery(scope.$index, scope.row)"
-              style="color: #f56c6c">删除</el-button>
+            <kt-button label="编辑" :size="overSize" type="text" perms="agreement:input:update"
+              @click="uplatequery(scope.$index, scope.row)" style="color: #e6a23c !important " />
+              <kt-button label="删除" :size="overSize" type="text" perms="agreement:input:delete"
+              @click="deletequery(scope.$index, scope.row)" style="color: #f56c6c !important " />
             <el-button type="text" size="mini">
               <el-dropdown trigger="click">
                 <span class="el-dropdown-link" style="font-size: 12px">
@@ -74,16 +74,16 @@
                 </span>
                 <el-dropdown-menu slot="dropdown">
                   <el-dropdown-item>
-                    <el-button type="text" :size="overSize"
-                      @click="historyRecord(scope.$index, scope.row)">协议历史记录</el-button>
+                    <kt-button label="协议历史记录" :size="overSize" type="text" perms="agreement:input:historyRecord"
+              @click="historyRecord(scope.$index, scope.row)"  />
                   </el-dropdown-item>
                   <el-dropdown-item>
-                    <el-button type="text" :size="overSize" @click="productCost(scope.$index, scope.row)">产品费用</el-button>
+                    <kt-button label="产品费用" :size="overSize" type="text" perms="agreement:input:productCost"
+              @click="productCost(scope.$index, scope.row)"  />
                   </el-dropdown-item>
                   <el-dropdown-item>
-                    <el-button type="text" :size="overSize" @click="
-                      underwritingRulesButton(scope.$index, scope.row)
-                      ">承保规则</el-button>
+                    <kt-button label="承保规则" :size="overSize" type="text" perms="agreement:input:underwritingRules"
+              @click="underwritingRulesButton(scope.$index, scope.row)"  />
                   </el-dropdown-item>
                 </el-dropdown-menu>
               </el-dropdown>

+ 672 - 650
src/views/AgreementManage/CarInsurance/AgreementExamine.vue

@@ -1,25 +1,26 @@
 <template>
-	<div>
-
-		<el-main ref="elMain" style="padding: 0px;">
-		  <Split :gutterSize="2" style="height: calc(100vh - 120px);">
-		    <!-- 左侧树Start -->
-		    <SplitArea :size="leftSplitWidth" :minSize="200">
-		        <el-checkbox v-model="containsSubChecked">显示全部协议</el-checkbox>
-		        <el-divider></el-divider>
-		        <tree :setting="ztreeSetting" :nodes="ztreeNodes" @onClick="onZTreeClick" @onCreated="onZTreeCreated"/>
-		    </SplitArea>
-		    <!-- 左侧树End -->
-
-		    <!-- 右侧列表页面Start -->
-		    <SplitArea :size="rightSplitWidth">
-		      <!-- 工具区域Start -->
+  <div>
+
+    <el-main ref="elMain" style="padding: 0px;">
+      <Split :gutterSize="2" style="height: calc(100vh - 120px);">
+        <!-- 左侧树Start -->
+        <SplitArea :size="leftSplitWidth" :minSize="200">
+          <el-checkbox v-model="containsSubChecked">显示全部协议</el-checkbox>
+          <el-divider></el-divider>
+          <tree :setting="ztreeSetting" :nodes="ztreeNodes" @onClick="onZTreeClick" @onCreated="onZTreeCreated" />
+        </SplitArea>
+        <!-- 左侧树End -->
+
+        <!-- 右侧列表页面Start -->
+        <SplitArea :size="rightSplitWidth">
+          <!-- 工具区域Start -->
           <el-form class="queryForm" ref="queryFormRef" :model="queryForm" label-width="80px">
             <el-row style="margin-bottom: 15px;">
               <el-col :span="8">
                 <el-form-item label="录入时间">
-                  <el-date-picker v-model="queryForm.date" style="margin-left: 20px;width:90%" size="small" type="daterange" align="left"
-                     range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"> </el-date-picker>
+                  <el-date-picker v-model="queryForm.date" style="margin-left: 20px;width:90%" size="small"
+                    type="daterange" align="left" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
+                  </el-date-picker>
                 </el-form-item>
               </el-col>
               <el-col :span="4">
@@ -34,55 +35,62 @@
               </el-col>
               <el-col :span="4" style="display: flex;align-items: center;justify-content: center;">
                 <el-form-item>
-                  <el-button size="small" @click="queryEsmInfo">查询</el-button>
+                  <kt-button label="查询" perms="agreement:audit:query" @click="queryEsmInfo" />
                 </el-form-item>
               </el-col>
             </el-row>
-           </el-form>
-
-          <kt-common-table permsEdit="sys:user:edit" :data="pageResult" :columns="columns" :editButtonName="(pageRequest.columnFilters.status.value == '0')?'审核':'查看'" :showBatchDelete="false" @findPage="findPage" @handleEdit="handleTableEdit" ></kt-common-table>
+          </el-form>
 
-		    </SplitArea>
-		   </Split>
-		</el-main>
+          <kt-common-table permsEdit="agreement:audit:review" :data="pageResult" :columns="columns"
+            :editButtonName="(pageRequest.columnFilters.status.value == '0') ? '审核' : '查看'" :showBatchDelete="false"
+            @findPage="findPage" @handleEdit="handleTableEdit"></kt-common-table>
+        </SplitArea>
+      </Split>
+    </el-main>
 
     <!-- 新增协议的对话框 -->
-    <el-dialog :title="dialogTitle"  v-dialogDrag :visible.sync="dialogVisible" width="840px" :before-close="handleClose" @close="closeVisible">
+    <el-dialog :title="dialogTitle" v-dialogDrag :visible.sync="dialogVisible" width="840px" :before-close="handleClose"
+      @close="closeVisible">
 
-      <el-row style="margin-bottom: 10px;" v-if="addAgreementForm.agreestatus =='2'">
+      <el-row style="margin-bottom: 10px;" v-if="addAgreementForm.agreestatus == '2'">
         <el-col :span="4" style="text-align: right"><label style="margin-right: 10px;">退回修改原因:</label></el-col>
         <el-col :span="20" style="color: red;">
-          {{addAgreementForm.remark}}
+          {{ addAgreementForm.remark }}
         </el-col>
       </el-row>
 
       <!-- 内容主体区域 -->
-      <el-tabs  v-model="activeTabs" type="card"  >
+      <el-tabs v-model="activeTabs" type="card">
         <!-- 协议基本信息 -->
         <el-tab-pane label="协议信息" name="first">
-          <el-form disabled size="mini" :model="addAgreementForm" :rules="addAgreementRules" ref="addAgreementRef" label-width="130px">
+          <el-form disabled size="mini" :model="addAgreementForm" :rules="addAgreementRules" ref="addAgreementRef"
+            label-width="130px">
             <el-row>
               <el-col :span="12">
                 <el-form-item label="协议代码" prop="agreementcode">
-                  <el-input v-model="addAgreementForm.agreementcode" placeholder="请输入协议代码" style="width: 100%;"></el-input>
+                  <el-input v-model="addAgreementForm.agreementcode" placeholder="请输入协议代码"
+                    style="width: 100%;"></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="协议名称" prop="agreementname">
-                  <el-input v-model="addAgreementForm.agreementname" placeholder="请输入协议名称" style="width: 100%;"></el-input>
+                  <el-input v-model="addAgreementForm.agreementname" placeholder="请输入协议名称"
+                    style="width: 100%;"></el-input>
                 </el-form-item>
               </el-col>
             </el-row>
             <el-row>
               <el-col :span="12">
                 <el-form-item label="协议简称" prop="agreementshort">
-                  <el-input v-model="addAgreementForm.agreementshort" placeholder="请输入协议简称" style="width: 100%;"></el-input>
+                  <el-input v-model="addAgreementForm.agreementshort" placeholder="请输入协议简称"
+                    style="width: 100%;"></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="协议类型" prop="agreementtype">
                   <el-select v-model="addAgreementForm.agreementtype" placeholder="请选择协议类型" style="width: 100%;">
-                    <el-option v-for="item in agreementtypeoptions" :key="item.label" :label="item.label" :value="item.value"></el-option>
+                    <el-option v-for="item in agreementtypeoptions" :key="item.label" :label="item.label"
+                      :value="item.value"></el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
@@ -90,7 +98,8 @@
             <el-row>
               <el-col :span="12">
                 <el-form-item label="合作公司" prop="insure1">
-                  <el-cascader style="width: 100%;" v-model="addAgreementForm.insure1" :show-all-levels="false" :options="options" :props="optionProps" @change="handleChange" clearable></el-cascader>
+                  <el-cascader style="width: 100%;" v-model="addAgreementForm.insure1" :show-all-levels="false"
+                    :options="options" :props="optionProps" @change="handleChange" clearable></el-cascader>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
@@ -103,7 +112,8 @@
               <el-col :span="12">
                 <el-form-item label="合作渠道" prop="channel">
                   <el-select v-model="addAgreementForm.channel" placeholder="请选择投保渠道" style="width: 100%;">
-                    <el-option v-for="item in channeloptions" :key="item.label" :label="item.label" :value="item.value"></el-option>
+                    <el-option v-for="item in channeloptions" :key="item.label" :label="item.label"
+                      :value="item.value"></el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
@@ -125,7 +135,8 @@
               <el-col :span="12">
                 <el-form-item label="保单日期类型" prop="matchtype">
                   <el-select v-model="addAgreementForm.matchtype" placeholder="请选择保单日期类型" style="width: 100%;">
-                    <el-option v-for="item in matchtypeoptions" :key="item.label" :label="item.label" :value="item.value"></el-option>
+                    <el-option v-for="item in matchtypeoptions" :key="item.label" :label="item.label"
+                      :value="item.value"></el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
@@ -133,8 +144,8 @@
             <el-row>
               <el-col :span="12">
                 <el-form-item label="协议生效日期" prop="startdate">
-                  <el-date-picker style="width: 100%;" v-model="addAgreementForm.startdate" type="date" placeholder="选择协议生效日期"
-                    format="yyyy-MM-dd" value-format="yyyy-MM-dd">
+                  <el-date-picker style="width: 100%;" v-model="addAgreementForm.startdate" type="date"
+                    placeholder="选择协议生效日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd">
                   </el-date-picker>
                 </el-form-item>
               </el-col>
@@ -150,27 +161,30 @@
               <el-col :span="12">
                 <el-form-item label="佣金发放方式" prop="moneytype">
                   <el-select v-model="addAgreementForm.moneytype" placeholder="请选择佣金发放方式" style="width: 100%;">
-                    <el-option v-for="item in moneytypeoptions" :key="item.label" :label="item.label" :value="item.value"></el-option>
+                    <el-option v-for="item in moneytypeoptions" :key="item.label" :label="item.label"
+                      :value="item.value"></el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="结算周期" prop="moneytime">
                   <el-select v-model="addAgreementForm.moneytime" placeholder="请选择结算周期" style="width: 100%;">
-                    <el-option :label="'T+'+item"  :value="item" v-for="item of 60" :key="item"></el-option>
+                    <el-option :label="'T+' + item" :value="item" v-for="item of 60" :key="item"></el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
             </el-row>
           </el-form>
         </el-tab-pane>
-        <el-tab-pane label="承保规则"  name="second">
-          <el-form disabled size="mini" :model="rulesForm" :rules="agreementProdsRules" ref="rulesForm" label-width="120px">
+        <el-tab-pane label="承保规则" name="second">
+          <el-form disabled size="mini" :model="rulesForm" :rules="agreementProdsRules" ref="rulesForm"
+            label-width="120px">
             <el-row>
               <el-col :span="12">
                 <el-form-item label="费率类型" prop="feetype">
                   <el-select v-model="rulesForm.feetype" placeholder="请选择费率类型" style="width: 100%;">
-                    <el-option v-for="item in feetypeoptions" :key="item.label" :label="item.label" :value="item.value"></el-option>
+                    <el-option v-for="item in feetypeoptions" :key="item.label" :label="item.label"
+                      :value="item.value"></el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
@@ -188,99 +202,108 @@
               <el-col :span="12">
                 <el-form-item label="使用性质" prop="canusenature">
                   <el-select v-model="rulesForm.canusenature" placeholder="请选择使用性质" style="width: 100%;">
-                    <el-option v-for="item in canusenatureoptions" :key="item.label" :label="item.label" :value="item.value"></el-option>
+                    <el-option v-for="item in canusenatureoptions" :key="item.label" :label="item.label"
+                      :value="item.value"></el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="车辆种类" prop="cancarkind">
                   <el-select v-model="rulesForm.cancarkind" placeholder="请选择车辆种类" style="width: 100%;">
-                    <el-option v-for="item in cancarkindoptions" :key="item.label" :label="item.label" :value="item.value"></el-option>
+                    <el-option v-for="item in cancarkindoptions" :key="item.label" :label="item.label"
+                      :value="item.value"></el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24" v-if="carareaoptions.length>0 || operType=='ADD'">
+              <el-col :span="24" v-if="carareaoptions.length > 0 || operType == 'ADD'">
                 <el-form-item label="可承保地区" prop="cancity">
                   <el-select style="width: 100%;" v-model="rulesForm.cancity" multiple clearable placeholder="请选择可承保地区">
-                    <el-option v-for="item in carareaoptions" :key="item.code" :label="item.name" :value="item.code"></el-option>
+                    <el-option v-for="item in carareaoptions" :key="item.code" :label="item.name"
+                      :value="item.code"></el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
             </el-row>
           </el-form>
         </el-tab-pane>
-        <el-tab-pane :key="item.productid" v-for="(item, index) in productTabs" :label="item.product" :name="item.productid" >
-            <el-form disabled size="mini" :model="item" :rules="agreementProdsRules" ref="productRef" label-width="120px">
-              <el-row>
-                <el-col :span="12">
-                  <el-form-item label="产品佣金比例" prop="productrate">
-                    <el-input v-model="item.productrate" placeholder="请输入产品佣金比例" style="width: 100%;"></el-input>
-                  </el-form-item>
-                </el-col>
-                <el-col :span="12">
-                  <el-form-item label="费用形式" prop="feestyle">
-                    <el-select v-model="item.feestyle" placeholder="请选择费用形式" style="width: 100%;">
-                      <el-option label="百分比" value="百分比"></el-option>
-                      <el-option label="差价" value="差价"></el-option>
-                    </el-select>
-                  </el-form-item>
-                </el-col>
-              </el-row>
+        <el-tab-pane :key="item.productid" v-for="(item, index) in productTabs" :label="item.product"
+          :name="item.productid">
+          <el-form disabled size="mini" :model="item" :rules="agreementProdsRules" ref="productRef" label-width="120px">
+            <el-row>
+              <el-col :span="12">
+                <el-form-item label="产品佣金比例" prop="productrate">
+                  <el-input v-model="item.productrate" placeholder="请输入产品佣金比例" style="width: 100%;"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="费用形式" prop="feestyle">
+                  <el-select v-model="item.feestyle" placeholder="请选择费用形式" style="width: 100%;">
+                    <el-option label="百分比" value="百分比"></el-option>
+                    <el-option label="差价" value="差价"></el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
 
-              <el-row style="border-top: 1px solid #eee;margin-top: 0px;padding: 10px 0px;" >
-                <el-row style="margin-bottom: 10px;">
-                  <label style="margin-right: 15px;font-size: 16px;">管理费用设置</label>
-                </el-row>
-                <el-row style="margin: 10px 0px;background-color: #E4E7ED;padding: 8px 0;">
-                  <el-col :span="8" class="u-f-ajc">佣金入口:{{item.productrate}}</el-col>
-                  <el-col :span="8" class="u-f-ajc">公司预留佣金:{{item.keeprate}}</el-col>
-                  <el-col :span="8" class="u-f-ajc">佣金出口:{{item.feerate}}</el-col>
-                </el-row>
-                <el-row >
-                  <el-row style="margin: 5px 0px;" type="flex" justify="center">
-                    <el-col :span="4">机构等级</el-col>
-                    <el-col :span="8">管理费用</el-col>
-                    <el-col :span="8">追加费用</el-col>
-                  </el-row>
-                  <el-row style="margin: 5px 0px;" type="flex" justify="center" v-for="prodfeesItem in item.prodfees" :key="prodfeesItem.comlevel">
-                    <el-col :span="4">
-                      <label>{{prodfeesItem.comlevel}}</label>
-                    </el-col>
-                    <el-col :span="8">
-                      <el-input disabled size="mini" style="width:60%" type="number" @change="changeProdFee(index)" v-model="prodfeesItem.keeprate" ></el-input>
-                    </el-col>
-                    <el-col :span="8">
-                      <el-input disabled size="mini" type="number" style="width:60%" @change="changeProdFee(index)" v-model="prodfeesItem.addrate"></el-input>
-                    </el-col>
-                  </el-row>
-                </el-row>
+            <el-row style="border-top: 1px solid #eee;margin-top: 0px;padding: 10px 0px;">
+              <el-row style="margin-bottom: 10px;">
+                <label style="margin-right: 15px;font-size: 16px;">管理费用设置</label>
               </el-row>
-              <!-- 费用授权 -->
-              <el-row style="border-top: 1px solid #eee;margin-top: 20px;padding: 10px 0px;" v-if="operType=='EDIT'">
-                <el-row style="margin-bottom: 10px;">
-                  <label style="margin-right: 15px;font-size: 16px;">管理费用授权</label>
+              <el-row style="margin: 10px 0px;background-color: #E4E7ED;padding: 8px 0;">
+                <el-col :span="8" class="u-f-ajc">佣金入口:{{ item.productrate }}</el-col>
+                <el-col :span="8" class="u-f-ajc">公司预留佣金:{{ item.keeprate }}</el-col>
+                <el-col :span="8" class="u-f-ajc">佣金出口:{{ item.feerate }}</el-col>
+              </el-row>
+              <el-row>
+                <el-row style="margin: 5px 0px;" type="flex" justify="center">
+                  <el-col :span="4">机构等级</el-col>
+                  <el-col :span="8">管理费用</el-col>
+                  <el-col :span="8">追加费用</el-col>
                 </el-row>
-                <el-row>
-                  <el-tree disabled :ref="item.id" :data="companyListTree" :props="companyProps" show-checkbox  node-key="id" :accordion="true" :default-checked-keys="item.authcomcode" ></el-tree>
+                <el-row style="margin: 5px 0px;" type="flex" justify="center" v-for="prodfeesItem in item.prodfees"
+                  :key="prodfeesItem.comlevel">
+                  <el-col :span="4">
+                    <label>{{ prodfeesItem.comlevel }}</label>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-input disabled size="mini" style="width:60%" type="number" @change="changeProdFee(index)"
+                      v-model="prodfeesItem.keeprate"></el-input>
+                  </el-col>
+                  <el-col :span="8">
+                    <el-input disabled size="mini" type="number" style="width:60%" @change="changeProdFee(index)"
+                      v-model="prodfeesItem.addrate"></el-input>
+                  </el-col>
                 </el-row>
               </el-row>
-
-            </el-form>
-          </el-tab-pane>
-          <el-tab-pane label="审核意见" name="last"  v-if="addAgreementForm.agreestatus == '0'">
-            <el-row style="margin: 20px 0px;">
-              <el-col :span="2" style="text-align: right"><label style="margin-right: 10px;">备注:</label></el-col>
-              <el-col :span="22">
-                <el-input v-model="remarks" type="textarea" :autosize="{ minRows: 4, maxRows: 6}" placeholder="请输入内容" prop="agreementForm.remark" maxlength="200" show-word-limit ></el-input>
-              </el-col>
             </el-row>
-            <el-row style="text-align: center;margin-top: 30px;">
-              <el-button size="mini" type="primary" @click="submitForm(1)" >通过审核</el-button>
-              <el-button size="mini" type="danger"  @click="submitForm(2)" >退回修改</el-button>
+            <!-- 费用授权 -->
+            <el-row style="border-top: 1px solid #eee;margin-top: 20px;padding: 10px 0px;" v-if="operType == 'EDIT'">
+              <el-row style="margin-bottom: 10px;">
+                <label style="margin-right: 15px;font-size: 16px;">管理费用授权</label>
+              </el-row>
+              <el-row>
+                <el-tree disabled :ref="item.id" :data="companyListTree" :props="companyProps" show-checkbox node-key="id"
+                  :accordion="true" :default-checked-keys="item.authcomcode"></el-tree>
+              </el-row>
             </el-row>
-          </el-tab-pane>
+
+          </el-form>
+        </el-tab-pane>
+        <el-tab-pane label="审核意见" name="last" v-if="addAgreementForm.agreestatus == '0'">
+          <el-row style="margin: 20px 0px;">
+            <el-col :span="2" style="text-align: right"><label style="margin-right: 10px;">备注:</label></el-col>
+            <el-col :span="22">
+              <el-input v-model="remarks" type="textarea" :autosize="{ minRows: 4, maxRows: 6 }" placeholder="请输入内容"
+                prop="agreementForm.remark" maxlength="200" show-word-limit></el-input>
+            </el-col>
+          </el-row>
+          <el-row style="text-align: center;margin-top: 30px;">
+            <el-button size="mini" type="primary" @click="submitForm(1)">通过审核</el-button>
+            <el-button size="mini" type="danger" @click="submitForm(2)">退回修改</el-button>
+          </el-row>
+        </el-tab-pane>
       </el-tabs>
 
       <!-- 底部区域 -->
@@ -289,590 +312,589 @@
       </span>
     </el-dialog>
 
-	</div>
+  </div>
 </template>
 <script>
-  import Cookies from "js-cookie"
-	import tree from "@/components/ztree.vue";
-	import KtCommonTable from "@/views/Core/KtCommonTable.vue";//表格组件
-	import KtButton from "@/views/Core/KtButton";
-  import CommonUtil from "@/utils/comutil.js";
-  import citydata from "@/assets/js/citydata.js";
-  import { formatWithSeperator,format } from "@/utils/datetime.js";
-	export default {
-		components: {
-			tree,
-			KtCommonTable,
-			KtButton
-		},
-		data() {
-			return {
-        peopleid:"",
-        peopledeptid:"",
-
-        // 授权公司列表Start
-        companyList:[],
-        companyProps: {
-          label: 'name',
-          children: 'children'
-        },
-        companyDefKeys:[],// 默认选中的节点id值
-        // 授权公司列表End
-
-        remarks:"",
-        /**Split 开始 */
-        leftSplitWidth: 20,
-        rightSplitWidth: 80,
-        /**Split 结束 */
-
-        //----ztree begin---------
-        ztreeObj: null,
-        ztreeSetting: {
-          check: {
-            enable: false
-          },
-          data: {
-            simpleData: {
-              enable: true,
-              pIdKey: "parentId"
-            }
-          },
-          view: {
-            showIcon: false
-          }
-        },
-        ztreeNodes: [],
-        currentTreeNode: null,
-        //----ztree end---------
+import Cookies from "js-cookie"
+import tree from "@/components/ztree.vue";
+import KtCommonTable from "@/views/Core/KtCommonTable.vue";//表格组件
+import KtButton from "@/views/Core/KtButton";
+import CommonUtil from "@/utils/comutil.js";
+import citydata from "@/assets/js/citydata.js";
+import { formatWithSeperator, format } from "@/utils/datetime.js";
+export default {
+  components: {
+    tree,
+    KtCommonTable,
+    KtButton
+  },
+  data() {
+    return {
+      peopleid: "",
+      peopledeptid: "",
+
+      // 授权公司列表Start
+      companyList: [],
+      companyProps: {
+        label: 'name',
+        children: 'children'
+      },
+      companyDefKeys: [],// 默认选中的节点id值
+      // 授权公司列表End
 
-        // 右侧列表查询数据Start
-        queryForm:{
-          "status":"0"
-        },
-        containsSubChecked:true,
-        pageResult: {},
-        pageRequest: {  //查询的默认条件
-          pageNum: 1,
-          pageSize: 20,
-          columnFilters: {
-            "inscode": {
-              "name": "inscode",
-              "value": ""
-            },
-            "startdate": {
-              "name": "startdate",
-              "value": ""
-            },
-            "enddate": {
-              "name": "enddate",
-              "value": ""
-            },
-            "status": {
-              "name": "status",
-              "value": "0"
-            }
-          }
-        },
-        columns:[ //数据列
-          {prop: "id",label: "编号",minWidth: 180},
-          {prop: "agreementcode",label: "协议代码",minWidth: 130},
-          {prop: "agreementname",label: "协议名称",minWidth: 200},
-          {prop: "agreementtype",label: "协议类型",minWidth: 160,formatter: this.agreementtypeFormatter},
-          {prop: "startdate",label: "协议生效日期",minWidth: 130},
-          {prop: "enddate",label: "协议失效日期",minWidth: 130},
-          {prop: "matchtype",label: "匹配日期类型",minWidth: 130,formatter: this.matchtypeFormatter},
-          {prop: "moneytime",label: "结算周期",minWidth: 100,formatter: this.moneytimeFormatter},
-          {prop: "agreestatus",label: "状态",minWidth: 110,formatter: this.agreestatusFormatter },
-          {prop: "updatetime",label: "修改时间",minWidth: 150,formatter: this.updatetimeFormatter},
-          {prop: "updateby",label: "修改人",minWidth: 120},
-        ],
-        // 右侧列表查询数据End
-
-        optionProps: {  //公司下拉列表配置
-          checkStrictly: true,
-          value: "id",
-          label: "name",
-          children: "children"
-        },
-        options:[],  //保险公司下拉列表
-
-				activeTabs:'first',
-        operType: "ADD", //'ADD','EDIT'
-        dialogTitle: "新增协议",
-        dialogVisible: false, //控制对话框显示
-
-        addAgreementForm: { //新增协议的表单数据
-          id: "", //主键(用来标识是新增还是修改)
-          checkid:"",//checkid,id为空是新增  checkid 为空,id不为空是修改 checkid,id都不为空是退回修改
-          agreementcode: "", //协议代码
-          agreementname: "", //协议名称
-          agreementshort: "", //协议简称
-          agreementtype: "", //协议类型
-          insure1: "", //保险公司
-          insureshort: "", //合作保险简称
-          isvalid: "", //是否上线
-          channel: "", //投保渠道
-          withtax: "", //含增值税结算
-          startdate: "", //协议生效日期
-          enddate: "", //协议失效日期
-          matchtype: "", //保单匹配协议日期类型
-          moneytype: "", //佣金发放方式
-          cmpprice: "", //支持比价
-          moneytime: "", //结算周期
-          account:"",
-          password:"",
-          agreestatus: "1", //协议状态(1表示审核中)
-          comcode: "", //所属机构
-          agreementProds: [], //协议产品
-          remark:"" //备注
-        },
-        addAgreementRules: { //新增协议的表单验证规则对象
-          agreementcode: [{ required: true, message: '请输入协议代码', trigger: 'blur' }],
-          agreementname: [{required: true,message: '请输入协议名称',trigger: 'blur'}],
-          agreementshort: [{required: true,message: '请输入协议简称',trigger: 'blur'}],
-          agreementtype: [{required: true,message: '请选择协议类型',trigger: 'blur'}],
-          insure1: [{required: true,message: '请选择合作公司',trigger: 'blur'}],
-          channel: [{required: true,message: '请选择合作渠道',trigger: 'blur'}],
-          account: [{required: true,message: '请添加负责人',trigger: 'blur'}],
-          withtax: [{required: true,message: '请选择含增值税结算',trigger: 'blur'}],
-          startdate: [{required: true,message: '请输入协议生效日期',trigger: 'blur'}],
-          enddate: [{required: true,message: '请输入协议失效日期',trigger: 'blur'}],
-          matchtype: [{required: true,message: '请输入保单日期类型',trigger: 'blur'}],
-          moneytype: [{required: true,message: '请选择佣金发放方式',trigger: 'blur'}],
-          moneytime: [{required: true,message: '请选择结算周期',trigger: 'blur'}]
-        },
+      remarks: "",
+      /**Split 开始 */
+      leftSplitWidth: 20,
+      rightSplitWidth: 80,
+      /**Split 结束 */
 
-        //------------协议下拉框数据   begin-----------------
-        agreementtypeoptions: [], //协议类型
-        channeloptions: [], //合作渠道
-        matchtypeoptions: [], //保单匹配协议日期类型
-        moneytypeoptions: [], //佣金发放方式
-        feetypeoptions: [], //费率类型
-        cancarkindoptions:[],//可承保车辆种类
-        canusenatureoptions:[],//可承保使用性质
-        carareaoptions:[],//可承保地区
-        //------------协议下拉框数据   end-----------------
-
-        statusalloptions:[
-          {value:'0',label:"待审核"},
-          {value:'1',label:"审核通过"},
-          {value:'2',label:"退回修改"},
-          {value:'99',label:"已失效"},
-        ],
-
-        //承保规则表单
-        rulesForm:{
-          feetype: "", //费率类型
-          cancity: "", //可承保市
-          cancarkind: "", //车辆种类
-          canusenature: "", //使用性质
+      //----ztree begin---------
+      ztreeObj: null,
+      ztreeSetting: {
+        check: {
+          enable: false
         },
-
-        // 第二个弹框的数据Start
-        addProductId:"",
-        addProductName:"",
-        // 第二个弹框的数据End
-
-        productDialogVisible: false,
-        productTabsValue: '2',
-        productTabs:[],
-
-        agreementProdsRules: {
-          feetype: [{required: true,message: '请选择费率类型',trigger: 'blur'}],
-          productrate: [{required: true,message: '请选择产品佣金比例',trigger: 'blur'}],
-          feestyle: [{required: true,message: '请选择费用形式',trigger: 'blur'}],
-          cancity: [{required: true,message: '请选择可承保市',trigger: 'blur'}],
-          cancarkind: [{required: true,message: '请选择车辆种类',trigger: 'blur'}],
-          canusenature: [{required: true,message: '请选择使用性质',trigger: 'blur'}]
+        data: {
+          simpleData: {
+            enable: true,
+            pIdKey: "parentId"
+          }
         },
-        prodInsurance:[],
-
-			};
-		},
-    watch:{
-      containsSubChecked(val){
-        if(val){
-          this.pageRequest.columnFilters.inscode.value = '';
-          this.findPage();
-        }else{
-          this.pageRequest.columnFilters.inscode.value = this.currentTreeNode.id;
-          this.findPage();
+        view: {
+          showIcon: false
         }
-      }
-    },
-    computed: {
-      // 机构列表转属性数据
-      companyListTree(){
-        let cloneData = JSON.parse(JSON.stringify(this.companyList)); // 对源数据深度克隆
-        return cloneData.filter(father => {
-          // 循环所有项,并添加children属性
-          let branchArr = cloneData.filter(child => father.id == child.parentId); // 返回每一项的子级数组
-          branchArr.length > 0 ? (father.children = branchArr) : ""; //给父级添加一个children属性,并赋值
-          if((this.peopleid == 'admin') ||(this.peopledeptid =='99') ){
-            return father.parentId == 0; //返回第一层
-          }else{
-            return father.id == this.peopledeptid; //返回第一层
-          }
+      },
+      ztreeNodes: [],
+      currentTreeNode: null,
+      //----ztree end---------
 
-        });
-      }
-    },
-		created() {
-      this.peopleid = Cookies.get('user');
-      if(this.peopleid!='admin'){
-        this.peopledeptid = Cookies.get('user').split('D')[0];
-      }else{
-        this.peopledeptid = '9';
-      }
-        //获取所有下拉框数据
-        this.getDictItems("agreementtype");
-        this.getDictItems("channel");
-        this.getDictItems("matchtype");
-        this.getDictItems("moneytype");
-        this.getDictItems("feetype");
-        this.getDictItems("cancarkind");
-        this.getDictItems("canusenature");
-		},
-		mounted() {
-      this.findLeftTreeData();
-      this.getAllCompany();
-      //用像素初始化左边的split的宽度
-      this.changeTreeWidth(200);// 初始化树的宽度
-
-		},
-		methods: {
-
-      //获取所有机构列表Start
-      getAllCompany(){
-        this.companyList = [];
-        this.$api.dept.findLeftDeptTree(this.peopledeptid).then(res => {
-          for(let i=0;i<res.data.length;i++){
-            if((res.data[i].id.indexOf('D') < 0) ||((res.data[i].id.indexOf('D') > 0) && (res.data[i].id.indexOf('M') > 0) )){
-              this.companyList.push(res.data[i]);
-            }
+      // 右侧列表查询数据Start
+      queryForm: {
+        "status": "0"
+      },
+      containsSubChecked: true,
+      pageResult: {},
+      pageRequest: {  //查询的默认条件
+        pageNum: 1,
+        pageSize: 20,
+        columnFilters: {
+          "inscode": {
+            "name": "inscode",
+            "value": ""
+          },
+          "startdate": {
+            "name": "startdate",
+            "value": ""
+          },
+          "enddate": {
+            "name": "enddate",
+            "value": ""
+          },
+          "status": {
+            "name": "status",
+            "value": "0"
           }
-        });
+        }
       },
-      //获取所有机构列表End
-
-      /**Split 开始 */
-      changeTreeWidth(widthVal){
-        // 初始化树的宽度
-        this.leftSplitWidth = Math.ceil(widthVal/this.$refs.elMain.$el.clientWidth*100);
-        this.rightSplitWidth = 100-(this.leftSplitWidth)
+      columns: [ //数据列
+        { prop: "id", label: "编号", minWidth: 180 },
+        { prop: "agreementcode", label: "协议代码", minWidth: 130 },
+        { prop: "agreementname", label: "协议名称", minWidth: 200 },
+        { prop: "agreementtype", label: "协议类型", minWidth: 160, formatter: this.agreementtypeFormatter },
+        { prop: "startdate", label: "协议生效日期", minWidth: 130 },
+        { prop: "enddate", label: "协议失效日期", minWidth: 130 },
+        { prop: "matchtype", label: "匹配日期类型", minWidth: 130, formatter: this.matchtypeFormatter },
+        { prop: "moneytime", label: "结算周期", minWidth: 100, formatter: this.moneytimeFormatter },
+        { prop: "agreestatus", label: "状态", minWidth: 110, formatter: this.agreestatusFormatter },
+        { prop: "updatetime", label: "修改时间", minWidth: 150, formatter: this.updatetimeFormatter },
+        { prop: "updateby", label: "修改人", minWidth: 120 },
+      ],
+      // 右侧列表查询数据End
+
+      optionProps: {  //公司下拉列表配置
+        checkStrictly: true,
+        value: "id",
+        label: "name",
+        children: "children"
       },
-      /**Split 结束 */
-
-      //--tree begin-------
-      // 获取树数据
-      findLeftTreeData: function() {
-        this.$api.insCompany.findLeftInsTree().then(res => {
-          this.ztreeNodes = res.data;
-        });
+      options: [],  //保险公司下拉列表
+
+      activeTabs: 'first',
+      operType: "ADD", //'ADD','EDIT'
+      dialogTitle: "新增协议",
+      dialogVisible: false, //控制对话框显示
+
+      addAgreementForm: { //新增协议的表单数据
+        id: "", //主键(用来标识是新增还是修改)
+        checkid: "",//checkid,id为空是新增  checkid 为空,id不为空是修改 checkid,id都不为空是退回修改
+        agreementcode: "", //协议代码
+        agreementname: "", //协议名称
+        agreementshort: "", //协议简称
+        agreementtype: "", //协议类型
+        insure1: "", //保险公司
+        insureshort: "", //合作保险简称
+        isvalid: "", //是否上线
+        channel: "", //投保渠道
+        withtax: "", //含增值税结算
+        startdate: "", //协议生效日期
+        enddate: "", //协议失效日期
+        matchtype: "", //保单匹配协议日期类型
+        moneytype: "", //佣金发放方式
+        cmpprice: "", //支持比价
+        moneytime: "", //结算周期
+        account: "",
+        password: "",
+        agreestatus: "1", //协议状态(1表示审核中)
+        comcode: "", //所属机构
+        agreementProds: [], //协议产品
+        remark: "" //备注
       },
-      onZTreeClick: function(evt, treeId, treeNode) {
-        // 点击事件
-        this.containsSubChecked=false;
-        this.currentTreeNode = treeNode;
-        this.pageRequest.columnFilters.inscode.value = this.currentTreeNode.id;
-        this.findPage();
+      addAgreementRules: { //新增协议的表单验证规则对象
+        agreementcode: [{ required: true, message: '请输入协议代码', trigger: 'blur' }],
+        agreementname: [{ required: true, message: '请输入协议名称', trigger: 'blur' }],
+        agreementshort: [{ required: true, message: '请输入协议简称', trigger: 'blur' }],
+        agreementtype: [{ required: true, message: '请选择协议类型', trigger: 'blur' }],
+        insure1: [{ required: true, message: '请选择合作公司', trigger: 'blur' }],
+        channel: [{ required: true, message: '请选择合作渠道', trigger: 'blur' }],
+        account: [{ required: true, message: '请添加负责人', trigger: 'blur' }],
+        withtax: [{ required: true, message: '请选择含增值税结算', trigger: 'blur' }],
+        startdate: [{ required: true, message: '请输入协议生效日期', trigger: 'blur' }],
+        enddate: [{ required: true, message: '请输入协议失效日期', trigger: 'blur' }],
+        matchtype: [{ required: true, message: '请输入保单日期类型', trigger: 'blur' }],
+        moneytype: [{ required: true, message: '请选择佣金发放方式', trigger: 'blur' }],
+        moneytime: [{ required: true, message: '请选择结算周期', trigger: 'blur' }]
       },
-      onZTreeCreated: function(ztreeObj) {
-        this.ztreeObj = ztreeObj;
-        // onCreated 中操作ztreeObj对象展开第一个节点
-        ztreeObj.expandNode(ztreeObj.getNodes()[0], true);
-        this.currentTreeNode=ztreeObj.getNodes()[0];
 
-        this.options=ztreeObj.getNodes();
+      //------------协议下拉框数据   begin-----------------
+      agreementtypeoptions: [], //协议类型
+      channeloptions: [], //合作渠道
+      matchtypeoptions: [], //保单匹配协议日期类型
+      moneytypeoptions: [], //佣金发放方式
+      feetypeoptions: [], //费率类型
+      cancarkindoptions: [],//可承保车辆种类
+      canusenatureoptions: [],//可承保使用性质
+      carareaoptions: [],//可承保地区
+      //------------协议下拉框数据   end-----------------
+
+      statusalloptions: [
+        { value: '0', label: "待审核" },
+        { value: '1', label: "审核通过" },
+        { value: '2', label: "退回修改" },
+        { value: '99', label: "已失效" },
+      ],
+
+      //承保规则表单
+      rulesForm: {
+        feetype: "", //费率类型
+        cancity: "", //可承保市
+        cancarkind: "", //车辆种类
+        canusenature: "", //使用性质
       },
-      //-- tree end-------
-
-      //--数据字典 begin --
-      getDictItems: function(typeName) {
-        let that = this;
-        that.$api.dict.findByLableName(typeName)
-          .then(function(res) {
-            that[typeName + "options"] = res.data; // 把获取到的数据赋给this.data
-          })
-          .catch(function(error) {
-            that[typeName + "options"] = [];
-          });
+
+      // 第二个弹框的数据Start
+      addProductId: "",
+      addProductName: "",
+      // 第二个弹框的数据End
+
+      productDialogVisible: false,
+      productTabsValue: '2',
+      productTabs: [],
+
+      agreementProdsRules: {
+        feetype: [{ required: true, message: '请选择费率类型', trigger: 'blur' }],
+        productrate: [{ required: true, message: '请选择产品佣金比例', trigger: 'blur' }],
+        feestyle: [{ required: true, message: '请选择费用形式', trigger: 'blur' }],
+        cancity: [{ required: true, message: '请选择可承保市', trigger: 'blur' }],
+        cancarkind: [{ required: true, message: '请选择车辆种类', trigger: 'blur' }],
+        canusenature: [{ required: true, message: '请选择使用性质', trigger: 'blur' }]
       },
-      //--数据字典 end --
-
-      //通过查询条件查询分页数据Start
-      queryEsmInfo(){
-        if(this.queryForm.date != null ){
-          var startdate =formatWithSeperator(this.queryForm.date[0],'-',':').split(' ')[0];
-          var enddate = formatWithSeperator(this.queryForm.date[1],'-',':').split(' ')[0];
-          this.pageRequest.columnFilters.startdate.value = startdate;
-          this.pageRequest.columnFilters.enddate.value = enddate;
-        }else{
-          this.pageRequest.columnFilters.startdate.value = '';
-          this.pageRequest.columnFilters.enddate.value = '';
-        }
-        this.pageRequest.columnFilters.status.value = this.queryForm.status;
-        this.pageRequest.pageNum = 1;
+      prodInsurance: [],
+
+    };
+  },
+  watch: {
+    containsSubChecked(val) {
+      if (val) {
+        this.pageRequest.columnFilters.inscode.value = '';
         this.findPage();
-      },
-      //通过查询条件查询分页数据End
-
-      // 右侧列表的方法Start
-      findPage(data) {
-        // 获取分页数据
-       let that = this;
-       if(data && data.pageRequest){
-         this.pageRequest.pageNum = data.pageRequest.pageNum;
-         this.pageRequest.pageSize = data.pageRequest.pageSize;
-       }
-       if(this.pageRequest.columnFilters.status.value == '1'){
-           that.$api.esmagreement.findPage(that.pageRequest).then(res => {
-               console.log(res.data)
-               that.pageResult = res.data;
-             })
-             .then(data != null ? data.callback : "");
-        }else{
-          this.$api.esmagreement.findCheckPage(this.pageRequest).then((res) => {
-            this.pageResult = res.data;
-            console.log(res.data)
-          }).then(data != null ? data.callback : '')
+      } else {
+        this.pageRequest.columnFilters.inscode.value = this.currentTreeNode.id;
+        this.findPage();
+      }
+    }
+  },
+  computed: {
+    // 机构列表转属性数据
+    companyListTree() {
+      let cloneData = JSON.parse(JSON.stringify(this.companyList)); // 对源数据深度克隆
+      return cloneData.filter(father => {
+        // 循环所有项,并添加children属性
+        let branchArr = cloneData.filter(child => father.id == child.parentId); // 返回每一项的子级数组
+        branchArr.length > 0 ? (father.children = branchArr) : ""; //给父级添加一个children属性,并赋值
+        if ((this.peopleid == 'admin') || (this.peopledeptid == '99')) {
+          return father.parentId == 0; //返回第一层
+        } else {
+          return father.id == this.peopledeptid; //返回第一层
         }
-      },
-      // 右侧列表的方法End
 
-      //-- formatter begin--
-      agreementtypeFormatter(row, column) { //协议类型
-          let agreementtype = row.agreementtype;
-          return CommonUtil.getDataName({dataList: this.agreementtypeoptions, value: 'value', label: 'label', data: agreementtype})
-      },
-      matchtypeFormatter(row, column) { //匹配日期类型
-          let matchtype = row.matchtype;
-          return CommonUtil.getDataName({dataList: this.matchtypeoptions, value: 'value', label: 'label', data: matchtype})
-      },
-      moneytimeFormatter(row, column) { //结算周期
-          return 'T+'+row.moneytime;
-      },
-      agreestatusFormatter(row, column) { //状态
-          let endTime = new Date(row.enddate +' 23:59:59').getTime();
-          let currentTime = new Date().getTime();
-          if(currentTime>endTime){
-            return "已失效"
-          }else{
-            let agreestatus = row.agreestatus;
-            return CommonUtil.getDataName({dataList: this.statusalloptions, value: 'value', label: 'label', data: agreestatus})
-          }
-      },
-      updatetimeFormatter(row,column){
-        let updatetime = row.updatetime;
-        return format(updatetime);
-      },
-      //-- formatter end--
-
-      // 选择合作公司Start
-      handleChange(value) {
-        this.addAgreementForm.insure1 = value[(value.length-1)];
-        this.carareaoptions=[];
-        this.rulesForm.cancity=[];
-        if(value.length==0 || value.length==1){
-
-        }else{
-          for(let i=0;i<citydata.rawCitiesData.length;i++){
-            if(citydata.rawCitiesData[i].code.substring(0,2) == this.addAgreementForm.insure1.substring(6,8)){
-              this.carareaoptions = citydata.rawCitiesData[i].sub;
-            }
+      });
+    }
+  },
+  created() {
+    this.peopleid = Cookies.get('user');
+    if (this.peopleid != 'admin') {
+      this.peopledeptid = Cookies.get('user').split('D')[0];
+    } else {
+      this.peopledeptid = '9';
+    }
+    //获取所有下拉框数据
+    this.getDictItems("agreementtype");
+    this.getDictItems("channel");
+    this.getDictItems("matchtype");
+    this.getDictItems("moneytype");
+    this.getDictItems("feetype");
+    this.getDictItems("cancarkind");
+    this.getDictItems("canusenature");
+  },
+  mounted() {
+    this.findLeftTreeData();
+    this.getAllCompany();
+    //用像素初始化左边的split的宽度
+    this.changeTreeWidth(200);// 初始化树的宽度
+
+  },
+  methods: {
+
+    //获取所有机构列表Start
+    getAllCompany() {
+      this.companyList = [];
+      this.$api.dept.findLeftDeptTree(this.peopledeptid).then(res => {
+        for (let i = 0; i < res.data.length; i++) {
+          if ((res.data[i].id.indexOf('D') < 0) || ((res.data[i].id.indexOf('D') > 0) && (res.data[i].id.indexOf('M') > 0))) {
+            this.companyList.push(res.data[i]);
           }
         }
-        // 查找合作保险简称
-        this.$api.insCompany.getInsCompanyById(value[(value.length-1)]).then((res)=>{
-          this.addAgreementForm.insureshort = res.data.namesimple;
+      });
+    },
+    //获取所有机构列表End
+
+    /**Split 开始 */
+    changeTreeWidth(widthVal) {
+      // 初始化树的宽度
+      this.leftSplitWidth = Math.ceil(widthVal / this.$refs.elMain.$el.clientWidth * 100);
+      this.rightSplitWidth = 100 - (this.leftSplitWidth)
+    },
+    /**Split 结束 */
+
+    //--tree begin-------
+    // 获取树数据
+    findLeftTreeData: function () {
+      this.$api.insCompany.findLeftInsTree().then(res => {
+        this.ztreeNodes = res.data;
+      });
+    },
+    onZTreeClick: function (evt, treeId, treeNode) {
+      // 点击事件
+      this.containsSubChecked = false;
+      this.currentTreeNode = treeNode;
+      this.pageRequest.columnFilters.inscode.value = this.currentTreeNode.id;
+      this.findPage();
+    },
+    onZTreeCreated: function (ztreeObj) {
+      this.ztreeObj = ztreeObj;
+      // onCreated 中操作ztreeObj对象展开第一个节点
+      ztreeObj.expandNode(ztreeObj.getNodes()[0], true);
+      this.currentTreeNode = ztreeObj.getNodes()[0];
+
+      this.options = ztreeObj.getNodes();
+    },
+    //-- tree end-------
+
+    //--数据字典 begin --
+    getDictItems: function (typeName) {
+      let that = this;
+      that.$api.dict.findByLableName(typeName)
+        .then(function (res) {
+          that[typeName + "options"] = res.data; // 把获取到的数据赋给this.data
         })
-      },
-      // 选择合作公司end
-
-      handleClose(done) {
-        this.$confirm('确认关闭?')
-          .then(_ => {
-            done();
-          })
-          .catch(_ => {});
-      },
-      closeVisible(){
-        this.carareaoptions=[];
-        this.$refs.addAgreementRef.resetFields();
-        this.$refs.rulesForm.resetFields();
-        this.productTabs=[];
-        for (let key in this.rulesForm) {
-          this.rulesForm[key]="";
-        }
-        for (let key in this.addAgreementForm) {
-          if(key =='agreementProds'){
-            this.addAgreementForm[key] = [];
-          }else if(key =='prodfees'){
-            this.addAgreementForm[key] = [];
-          }else{
-            this.addAgreementForm[key] = "";
+        .catch(function (error) {
+          that[typeName + "options"] = [];
+        });
+    },
+    //--数据字典 end --
+
+    //通过查询条件查询分页数据Start
+    queryEsmInfo() {
+      if (this.queryForm.date != null) {
+        var startdate = formatWithSeperator(this.queryForm.date[0], '-', ':').split(' ')[0];
+        var enddate = formatWithSeperator(this.queryForm.date[1], '-', ':').split(' ')[0];
+        this.pageRequest.columnFilters.startdate.value = startdate;
+        this.pageRequest.columnFilters.enddate.value = enddate;
+      } else {
+        this.pageRequest.columnFilters.startdate.value = '';
+        this.pageRequest.columnFilters.enddate.value = '';
+      }
+      this.pageRequest.columnFilters.status.value = this.queryForm.status;
+      this.pageRequest.pageNum = 1;
+      this.findPage();
+    },
+    //通过查询条件查询分页数据End
+
+    // 右侧列表的方法Start
+    findPage(data) {
+      // 获取分页数据
+      let that = this;
+      if (data && data.pageRequest) {
+        this.pageRequest.pageNum = data.pageRequest.pageNum;
+        this.pageRequest.pageSize = data.pageRequest.pageSize;
+      }
+      if (this.pageRequest.columnFilters.status.value == '1') {
+        that.$api.esmagreement.findPage(that.pageRequest).then(res => {
+          console.log(res.data)
+          that.pageResult = res.data;
+        })
+          .then(data != null ? data.callback : "");
+      } else {
+        this.$api.esmagreement.findCheckPage(this.pageRequest).then((res) => {
+          this.pageResult = res.data;
+          console.log(res.data)
+        }).then(data != null ? data.callback : '')
+      }
+    },
+    // 右侧列表的方法End
+
+    //-- formatter begin--
+    agreementtypeFormatter(row, column) { //协议类型
+      let agreementtype = row.agreementtype;
+      return CommonUtil.getDataName({ dataList: this.agreementtypeoptions, value: 'value', label: 'label', data: agreementtype })
+    },
+    matchtypeFormatter(row, column) { //匹配日期类型
+      let matchtype = row.matchtype;
+      return CommonUtil.getDataName({ dataList: this.matchtypeoptions, value: 'value', label: 'label', data: matchtype })
+    },
+    moneytimeFormatter(row, column) { //结算周期
+      return 'T+' + row.moneytime;
+    },
+    agreestatusFormatter(row, column) { //状态
+      let endTime = new Date(row.enddate + ' 23:59:59').getTime();
+      let currentTime = new Date().getTime();
+      if (currentTime > endTime) {
+        return "已失效"
+      } else {
+        let agreestatus = row.agreestatus;
+        return CommonUtil.getDataName({ dataList: this.statusalloptions, value: 'value', label: 'label', data: agreestatus })
+      }
+    },
+    updatetimeFormatter(row, column) {
+      let updatetime = row.updatetime;
+      return format(updatetime);
+    },
+    //-- formatter end--
+
+    // 选择合作公司Start
+    handleChange(value) {
+      this.addAgreementForm.insure1 = value[(value.length - 1)];
+      this.carareaoptions = [];
+      this.rulesForm.cancity = [];
+      if (value.length == 0 || value.length == 1) {
+
+      } else {
+        for (let i = 0; i < citydata.rawCitiesData.length; i++) {
+          if (citydata.rawCitiesData[i].code.substring(0, 2) == this.addAgreementForm.insure1.substring(6, 8)) {
+            this.carareaoptions = citydata.rawCitiesData[i].sub;
           }
         }
-      },
+      }
+      // 查找合作保险简称
+      this.$api.insCompany.getInsCompanyById(value[(value.length - 1)]).then((res) => {
+        this.addAgreementForm.insureshort = res.data.namesimple;
+      })
+    },
+    // 选择合作公司end
 
-      //编辑协议
-      handleTableEdit(data){
-        let that = this;
-        this.activeTabs='first';
-        this.operType='EDIT';
-        this.dialogTitle= "协议信息";
-
-        if(this.pageRequest.columnFilters.status.value == '1'){
-          this.$api.esmagreement.findById(data.row.id).then(res => {
-            Object.assign(that.addAgreementForm, res.data);
-            for(let i=0;i<citydata.rawCitiesData.length;i++){
-              if(citydata.rawCitiesData[i].code.substring(0,2) == that.addAgreementForm.insure1.substring(6,8)){
-                that.carareaoptions = citydata.rawCitiesData[i].sub;
-              }
+    handleClose(done) {
+      this.$confirm('确认关闭?')
+        .then(_ => {
+          done();
+        })
+        .catch(_ => { });
+    },
+    closeVisible() {
+      this.carareaoptions = [];
+      this.$refs.addAgreementRef.resetFields();
+      this.$refs.rulesForm.resetFields();
+      this.productTabs = [];
+      for (let key in this.rulesForm) {
+        this.rulesForm[key] = "";
+      }
+      for (let key in this.addAgreementForm) {
+        if (key == 'agreementProds') {
+          this.addAgreementForm[key] = [];
+        } else if (key == 'prodfees') {
+          this.addAgreementForm[key] = [];
+        } else {
+          this.addAgreementForm[key] = "";
+        }
+      }
+    },
+
+    //编辑协议
+    handleTableEdit(data) {
+      let that = this;
+      this.activeTabs = 'first';
+      this.operType = 'EDIT';
+      this.dialogTitle = "协议信息";
+
+      if (this.pageRequest.columnFilters.status.value == '1') {
+        this.$api.esmagreement.findById(data.row.id).then(res => {
+          Object.assign(that.addAgreementForm, res.data);
+          for (let i = 0; i < citydata.rawCitiesData.length; i++) {
+            if (citydata.rawCitiesData[i].code.substring(0, 2) == that.addAgreementForm.insure1.substring(6, 8)) {
+              that.carareaoptions = citydata.rawCitiesData[i].sub;
             }
-            if(res.data.agreementProds.length>0){
-              that.rulesForm.feetype = res.data.agreementProds[0].feetype;
-              that.rulesForm.cancarkind = res.data.agreementProds[0].cancarkind;
-              that.rulesForm.canusenature = res.data.agreementProds[0].canusenature;
-              that.rulesForm.cancity = res.data.agreementProds[0].cancity.split(",");
-              that.productTabs = res.data.agreementProds;
-              Object.assign(that.productTabs,res.data.agreementProds)
-              for(let m=0;m<that.productTabs.length;m++){
-                let prodFeeParam = [];
-                if(!!that.productTabs[m].authcomcode){
-                  that.productTabs[m].authcomcode = that.productTabs[m].authcomcode.split(",");
-                }else{
-                  that.productTabs[m].authcomcode = [];
-                }
-                for(let n=0;n<res.data.prodfees.length;n++){
-                  if(that.productTabs[m].id == res.data.prodfees[n].agreeprodid){
-                    let mm = {};
-                    Object.assign(mm,res.data.prodfees[n])
-                    prodFeeParam.push(mm);
-                  }
-                }
-                this.$set(that.productTabs[m], 'prodfees', [])
-                for(let n=0;n<that.productTabs[m].prodfees.length;n++){
-                  console.log()
-                  this.$set(that.productTabs[m].prodfees[n], 'keeprate', '')
-                  this.$set(that.productTabs[m].prodfees[n], 'addrate', '')
+          }
+          if (res.data.agreementProds.length > 0) {
+            that.rulesForm.feetype = res.data.agreementProds[0].feetype;
+            that.rulesForm.cancarkind = res.data.agreementProds[0].cancarkind;
+            that.rulesForm.canusenature = res.data.agreementProds[0].canusenature;
+            that.rulesForm.cancity = res.data.agreementProds[0].cancity.split(",");
+            that.productTabs = res.data.agreementProds;
+            Object.assign(that.productTabs, res.data.agreementProds)
+            for (let m = 0; m < that.productTabs.length; m++) {
+              let prodFeeParam = [];
+              if (!!that.productTabs[m].authcomcode) {
+                that.productTabs[m].authcomcode = that.productTabs[m].authcomcode.split(",");
+              } else {
+                that.productTabs[m].authcomcode = [];
+              }
+              for (let n = 0; n < res.data.prodfees.length; n++) {
+                if (that.productTabs[m].id == res.data.prodfees[n].agreeprodid) {
+                  let mm = {};
+                  Object.assign(mm, res.data.prodfees[n])
+                  prodFeeParam.push(mm);
                 }
-                that.productTabs[m].prodfees=prodFeeParam;
               }
-            }
-            that.dialogVisible = true;
-          });
-        }else{
-          this.$api.esmagreement.findCheckById(data.row.checkid).then(res => {
-            Object.assign(that.addAgreementForm, res.data);
-            for(let i=0;i<citydata.rawCitiesData.length;i++){
-              if(citydata.rawCitiesData[i].code.substring(0,2) == that.addAgreementForm.insure1.substring(6,8)){
-                that.carareaoptions = citydata.rawCitiesData[i].sub;
+              this.$set(that.productTabs[m], 'prodfees', [])
+              for (let n = 0; n < that.productTabs[m].prodfees.length; n++) {
+                console.log()
+                this.$set(that.productTabs[m].prodfees[n], 'keeprate', '')
+                this.$set(that.productTabs[m].prodfees[n], 'addrate', '')
               }
+              that.productTabs[m].prodfees = prodFeeParam;
             }
-            if(res.data.agreementProds.length>0){
-              that.rulesForm.feetype = res.data.agreementProds[0].feetype;
-              that.rulesForm.cancarkind = res.data.agreementProds[0].cancarkind;
-              that.rulesForm.canusenature = res.data.agreementProds[0].canusenature;
-              that.rulesForm.cancity = res.data.agreementProds[0].cancity.split(",");
-              that.productTabs = res.data.agreementProds;
-              Object.assign(that.productTabs,res.data.agreementProds)
-              for(let m=0;m<that.productTabs.length;m++){
-                let prodFeeParam = [];
-                if(!!that.productTabs[m].authcomcode){
-                  that.productTabs[m].authcomcode = that.productTabs[m].authcomcode.split(",");
-                }else{
-                  that.productTabs[m].authcomcode = [];
-                }
-                for(let n=0;n<res.data.prodfees.length;n++){
-                  if(that.productTabs[m].id == res.data.prodfees[n].agreeprodid){
-                    let mm = {};
-                    Object.assign(mm,res.data.prodfees[n])
-                    prodFeeParam.push(mm);
-                  }
-                }
-                this.$set(that.productTabs[m], 'prodfees', [])
-                for(let n=0;n<that.productTabs[m].prodfees.length;n++){
-                  console.log()
-                  this.$set(that.productTabs[m].prodfees[n], 'keeprate', '')
-                  this.$set(that.productTabs[m].prodfees[n], 'addrate', '')
+          }
+          that.dialogVisible = true;
+        });
+      } else {
+        this.$api.esmagreement.findCheckById(data.row.checkid).then(res => {
+          Object.assign(that.addAgreementForm, res.data);
+          for (let i = 0; i < citydata.rawCitiesData.length; i++) {
+            if (citydata.rawCitiesData[i].code.substring(0, 2) == that.addAgreementForm.insure1.substring(6, 8)) {
+              that.carareaoptions = citydata.rawCitiesData[i].sub;
+            }
+          }
+          if (res.data.agreementProds.length > 0) {
+            that.rulesForm.feetype = res.data.agreementProds[0].feetype;
+            that.rulesForm.cancarkind = res.data.agreementProds[0].cancarkind;
+            that.rulesForm.canusenature = res.data.agreementProds[0].canusenature;
+            that.rulesForm.cancity = res.data.agreementProds[0].cancity.split(",");
+            that.productTabs = res.data.agreementProds;
+            Object.assign(that.productTabs, res.data.agreementProds)
+            for (let m = 0; m < that.productTabs.length; m++) {
+              let prodFeeParam = [];
+              if (!!that.productTabs[m].authcomcode) {
+                that.productTabs[m].authcomcode = that.productTabs[m].authcomcode.split(",");
+              } else {
+                that.productTabs[m].authcomcode = [];
+              }
+              for (let n = 0; n < res.data.prodfees.length; n++) {
+                if (that.productTabs[m].id == res.data.prodfees[n].agreeprodid) {
+                  let mm = {};
+                  Object.assign(mm, res.data.prodfees[n])
+                  prodFeeParam.push(mm);
                 }
-                that.productTabs[m].prodfees=prodFeeParam;
               }
+              this.$set(that.productTabs[m], 'prodfees', [])
+              for (let n = 0; n < that.productTabs[m].prodfees.length; n++) {
+                console.log()
+                this.$set(that.productTabs[m].prodfees[n], 'keeprate', '')
+                this.$set(that.productTabs[m].prodfees[n], 'addrate', '')
+              }
+              that.productTabs[m].prodfees = prodFeeParam;
             }
-            that.dialogVisible = true;
-          });
-        }
+          }
+          that.dialogVisible = true;
+        });
+      }
 
-      },
+    },
 
-      //提交
-      submitForm(statusType) {
-        if((this.remarks=="") && (statusType == 2)){
-          return this.$message({type: 'info',message: '请备注原因'});
-        }
+    //提交
+    submitForm(statusType) {
+      if ((this.remarks == "") && (statusType == 2)) {
+        return this.$message({ type: 'info', message: '请备注原因' });
+      }
 
-        this.$confirm('是否确认提交?', '提示', {}).then(() => {
-            var data={
-              checkid:this.addAgreementForm.checkid,
-              remark:this.remarks,
-              status:statusType
-            }
-            this.$api.esmagreement.checkAgreement(data).then(res => {
-              this.dialogVisible = false
-              this.findPage(null);
-              this.$message({
-                type: 'success',
-                message: '已提交'
-              });
-            });
-        }).catch(() => {
+      this.$confirm('是否确认提交?', '提示', {}).then(() => {
+        var data = {
+          checkid: this.addAgreementForm.checkid,
+          remark: this.remarks,
+          status: statusType
+        }
+        this.$api.esmagreement.checkAgreement(data).then(res => {
+          this.dialogVisible = false
+          this.findPage(null);
           this.$message({
-            type: 'info',
-            message: '已取消审核'
+            type: 'success',
+            message: '已提交'
           });
         });
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消审核'
+        });
+      });
 
-      },
+    },
 
 
-      // // 获取所有产品列表Start
-      // getAllProduct(){
-      //   this.$api.product.productTree('ZG').then(res => {
-      //     this.prodInsurance = res.data.splice(1);
-      //     console.log(this.prodInsurance)
-      //   });
-      // },
-      // //获取所有产品列表End
-      // 获取协议产品
-      findProductById(){
-       if(!this.addProductId){
-         return this.$message.error("请输入协议产品编码查询产品")
-       }
-       this.$api.product.productTree(this.addProductId).then(res => {
-         if(res.data.length>0){
-           this.addProductName = res.data[0].name;
-         }else{
-           this.addProductName = "";
-           return this.$message.error("请输入正确的产品编码")
-         }
-       });
-      },
+    // // 获取所有产品列表Start
+    // getAllProduct(){
+    //   this.$api.product.productTree('ZG').then(res => {
+    //     this.prodInsurance = res.data.splice(1);
+    //     console.log(this.prodInsurance)
+    //   });
+    // },
+    // //获取所有产品列表End
+    // 获取协议产品
+    findProductById() {
+      if (!this.addProductId) {
+        return this.$message.error("请输入协议产品编码查询产品")
+      }
+      this.$api.product.productTree(this.addProductId).then(res => {
+        if (res.data.length > 0) {
+          this.addProductName = res.data[0].name;
+        } else {
+          this.addProductName = "";
+          return this.$message.error("请输入正确的产品编码")
+        }
+      });
+    },
 
-		}
-	};
+  }
+};
 </script>
 
 
-<style scoped>
-  .el-divider{
-    margin: 10px 0px 15px!important;
-  }
-  .queryForm .el-row {
-    margin:0px;
-  }
+<style scoped>.el-divider {
+  margin: 10px 0px 15px !important;
+}
 
-  .queryForm .el-form-item {
-    margin-bottom: 0px;
-  }
-</style>
+.queryForm .el-row {
+  margin: 0px;
+}
+
+.queryForm .el-form-item {
+  margin-bottom: 0px;
+}</style>

+ 2 - 1
src/views/AgreementManage/CarInsurance/SourceManagement.vue

@@ -122,6 +122,7 @@ export default {
             type: "primary",
             label: "税源管理",
             type: "text",
+            perm:"agreement:taxSource:config",
             click: (row, index) => {
               return this.addSource(row);
             },
@@ -264,4 +265,4 @@ export default {
     },
   },
 };
-</script>
+</script>

+ 9 - 4
src/views/Core/KtButton.vue

@@ -1,6 +1,6 @@
 <template>
-  <el-button :size="size" :type="type" :icon="icon" 
-   :class="disabled?'buttonCursor:':''" :loading="loading" :disabled="disabled" @click="handleClick" v-if="hasPerms(perms)">
+  <el-button :size="size" :type="type" :icon="icon"
+   :class="disabled?'buttonCursor:':''" :plain="plain" :loading="loading" :disabled="disabled" @click="handleClick" v-if="hasPerms(perms)">
     <!-- :class="hasPerms(perms)?'buttonCursor:':''" :loading="loading" :disabled="!hasPerms(perms)" @click="handleClick"> -->
     {{label}}
   </el-button>
@@ -21,7 +21,7 @@ export default {
     },
     size: {  // 按钮尺寸
       type: String,
-      default: 'mini'
+      default: 'small'
     },
     type: {  // 按钮类型
       type: String,
@@ -31,6 +31,10 @@ export default {
       type: Boolean,
       default: false
     },
+    plain:{
+      type: Boolean,
+      default: false
+    },
     disabled: {  // 按钮是否禁用
       type: Boolean,
       default: false
@@ -50,8 +54,9 @@ export default {
       this.$emit('click', {})
     },
     hasPerms: function (perms) {
+      console.log(hasPermission(perms))
       // 根据权限标识和外部指示状态进行权限判断
-      return hasPermission(perms) & !this.disabled
+      return hasPermission(perms)
     }
   },
   mounted() {

+ 9 - 6
src/views/Core/KtCommonTable.vue

@@ -118,14 +118,12 @@
     <!--分页栏-->
     <!-- 底部分页 -->
     <div class="bottomFixed" ref="bottomFixed">
-      <kt-button class="debutton" :label="$t('action.batchDelete')" :perms="permsDelete" :size="size" type="danger"
+      <kt-button class="debutton" :label="deleteName" :perms="permsDelete" :size="size" type="danger"
         @click="handleBatchDelete()" :disabled="selections.length === 0" style="float: left"
         v-if="showBatchDelete & showOperation" />
-      <kt-button :label="settledName" :perms="permsDelete" :size="size" type="danger" @click="handleBatchSettled()"
+      <kt-button :label="settledName" :perms="permsSettled" :size="size" type="danger" @click="handleBatchSettled()"
         :disabled="selections.length === 0" style="float: left" v-if="showBatchSettled" />
-      <!-- <kt-button label="导出Excel" :perms="permsDelete" :size="size" type="danger" @click="handleBatchPrint()"
-        :disabled="selections.length === 0" style="float: left" v-if="showBatchPrint" /> -->
-      <kt-button label="导出Excel" :perms="permsDelete" :size="size" type="danger" @click="handleBatchPrint()"
+      <kt-button label="导出Excel" :perms="permsExcel" :size="size" type="danger" @click="handleBatchPrint()"
         style="float: left" v-if="showBatchPrint" />
       <el-pagination @size-change="handleSizeChange" layout="total, sizes, prev, pager, next, jumper"
         @current-change="refreshPageRequest" :current-page="data.pageNum" :page-size="data.pageSize"
@@ -164,6 +162,9 @@ export default {
       //批量按钮name
       type: String,
     },
+    deleteName:{
+      type:String,
+    },
     showBatchPrint: {
       //显示批量导出
       type: Boolean,
@@ -246,7 +247,9 @@ export default {
     columns: Array, // 表格列配置
     data: {}, // 表格分页数据
     permsEdit: String, // 编辑权限标识
-    permsDelete: String, // 删除权限标识
+    permsDelete: String, // 底部按钮标识
+    permsSettled:String,// 底部按钮标识
+    permsExcel:String,// 底部按钮标识
     size: {
       // 尺寸样式
       type: String,

+ 8 - 3
src/views/FinancialManagement/CarInsurance/Verifytasks/Verifyintasks.vue

@@ -55,7 +55,8 @@
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="3">
-          <el-button type="primary" size="small" @click="onSubmit">查询</el-button>
+          <kt-button label="查询" type="primary" perms="carInsurance:expenseVerification:approved:query"
+          @click="onSubmit" />
         </el-col>
       </el-row>
     </el-form>
@@ -89,8 +90,8 @@
       <el-table-column prop="createtime" label="录单日期" align="center" width="200"></el-table-column>
       <el-table-column label="操作" align="center" min-width="100" fixed="right">
         <template slot-scope="scope">
-          <el-button size="mini" type="text" @click="OrderDetails(scope.row, item)">查看详情
-          </el-button>
+          <kt-button label="查看详情" type="text" perms="carInsurance:expenseVerification:approved:details"
+          @click="OrderDetails(scope.row, item)" />
         </template>
       </el-table-column>
     </el-table>
@@ -368,10 +369,14 @@ import {
 } from '@/common/image-tools-base64.js';
 import html2Canvas from 'html2canvas'
 import CommonUtil from "@/utils/comutil.js";
+import KtButton from "@/views/Core/KtButton";//按钮权限组件
 import Cookies from "js-cookie";
 import QRCode from "qrcodejs2";
 
 export default {
+  components:{
+    KtButton
+  },
   data() {
     return {
       queryOrders:"",

+ 10 - 4
src/views/FinancialManagement/CarInsurance/Verifytasks/Verifyuntasks.vue

@@ -57,7 +57,9 @@
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="3">
-          <el-button type="primary" size="small" @click="onSubmit">查询</el-button>
+
+          <kt-button label="查询" type="primary" perms="carInsurance:expenseVerification:pendingReview:query"
+          @click="onSubmit" />
         </el-col>
       </el-row>
     </el-form>
@@ -91,8 +93,8 @@
       <el-table-column prop="createtime" label="录单日期" align="center" width="200"></el-table-column>
       <el-table-column label="操作" align="center" min-width="100" fixed="right">
         <template slot-scope="scope">
-          <el-button size="mini" type="text" @click="OrderDetails(scope.row)">审核
-          </el-button>
+          <kt-button label="审核" type="text" perms="carInsurance:expenseVerification:pendingReview:review"
+          @click="OrderDetails(scope.row)" />
         </template>
       </el-table-column>
     </el-table>
@@ -413,9 +415,13 @@ import {
 import html2Canvas from 'html2canvas'
 import CommonUtil from "@/utils/comutil.js";
 import Cookies from "js-cookie";
+import KtButton from "@/views/Core/KtButton";//按钮权限组件
 import QRCode from "qrcodejs2";
 
 export default {
+  components:{
+    KtButton
+  },
   data() {
     return {
       oldFeeInfo:[],//原始跟单费用比例
@@ -660,7 +666,7 @@ export default {
         } else {
           this.$message.error("订单获取失败");
         }
-        
+
       });
     },
     // 设置每页条数

+ 13 - 21
src/views/FinancialManagement/ExpenseManagement/ExpenseApplyFor.vue

@@ -62,38 +62,28 @@
           ></el-input>
         </el-form-item>
         <el-form-item>
-          <el-button type="primary" size="small" @click="queryStaffInfo"
-            >查询</el-button
-          >
+          <kt-button label="查询" type="primary"  perms="expenseManagement:expenseRequest:query"
+      @click="queryStaffInfo" />
         </el-form-item>
       </el-form>
     </el-row>
     <!-- 申请按钮 -->
-    <el-button
-      class="operation"
-      type="primary"
-      plain
-      size="medium"
-      @click="showExpense"
-      >资金使用申请单</el-button
-    >
-    <el-button
-      @click="expendDataup"
-      type="primary"
-      size="medium"
-      :disabled="!this.expentList.length"
-      >批量导出</el-button
-    >
+    <kt-button class="operation" label="资金使用申请单"  type="primary" :plain="true"  perms="expenseManagement:expenseRequest:add"
+      @click="showExpense" />
+      <kt-button  label="批量导出"  type="primary" :disabled="!this.expentList.length"   perms="expenseManagement:expenseRequest:excel"
+      @click="expendDataup" />
     <!-- 表格 -->
     <kt-common-table
       :operationWidth="operationWidth"
       class="ktTable"
-      permsEdit="sys:agent:view"
+      permsEdit="expenseManagement:expenseRequest:update"
       ref="dataTable"
       :data="pageResult"
       :columns="columns"
       editButtonName="编辑"
       button1Name="删除"
+      permsButton1="expenseManagement:expenseRequest:delete"
+      permsButton2="expenseManagement:expenseRequest:details"
       button2Name="查看"
       button2Background="#409eff"
       :showBatchDelete="false"
@@ -384,11 +374,13 @@
 <script>
 import ExpenseComponent from "./ExpenseComponent.vue"; //新增账户信息弹框
 // import ExpenseManagement from "./ExpenseManagement.vue"; //新增账户信息
+import KtButton from "@/views/Core/KtButton"; // 按钮权限组件
+
 import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
 import { toChies, convertPositive } from "../../../utils/moneyTransition";
 export default {
   name: "ExpenseApplyFor",
-  components: { KtCommonTable, ExpenseComponent },
+  components: { KtCommonTable, ExpenseComponent,KtButton },
   data() {
     //开票金额自定义校验
     let applyAmountRules = (rule, value, callback) => {
@@ -1183,4 +1175,4 @@ export default {
   overflow-y: auto;
   height: 500px;
 }
-</style>
+</style>

+ 137 - 322
src/views/FinancialManagement/ExpenseManagement/ExpenseManagement.vue

@@ -5,311 +5,139 @@
     <el-row class="top">
       <el-form v-model="queryFrom" size="small" label-width="95px" class="form">
         <el-form-item label="账户类别" label-width="95px" prop="outerFlag">
-          <el-select
-            v-model="queryFrom.outerFlag"
-            placeholder="请选择账户类别"
-            clearable
-          >
+          <el-select v-model="queryFrom.outerFlag" placeholder="请选择账户类别" clearable>
             <el-option label="内部账户" value="0"></el-option>
             <el-option label="外部账户" value="1"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="户名" label-width="95px" prop="invCompanyName">
-          <el-input
-            v-model="queryFrom.accountName"
-            placeholder="请输入户名"
-            class="widths"
-            clearable
-          ></el-input>
+          <el-input v-model="queryFrom.accountName" placeholder="请输入户名" class="widths" clearable></el-input>
         </el-form-item>
         <el-form-item label="银行卡号" label-width="95px" prop="invCompanyName">
-          <el-input
-            v-model="queryFrom.bankCardNum"
-            placeholder="请输入银行卡号"
-            class="widths"
-            clearable
-          ></el-input>
+          <el-input v-model="queryFrom.bankCardNum" placeholder="请输入银行卡号" class="widths" clearable></el-input>
         </el-form-item>
         <el-form-item>
-          <el-button type="primary" size="small" @click="queryStaffInfo"
-            >查询</el-button
-          >
+          <kt-button label="查询" type="primary" perms="expenseManagement:accountInformation:query"
+            @click="queryStaffInfo" />
         </el-form-item>
       </el-form>
     </el-row>
     <!-- 新增 -->
-    <el-button
-      class="operation"
-      type="primary"
-      plain
-      size="medium"
-      @click="addAmount"
-      >新增账户</el-button
-    >
-    <el-button
-      class="operation"
-      type="primary"
-      plain
-      size="medium"
-      @click="expentData"
-      >费用支出明细导出</el-button
-    >
-    <el-button
-      class="operation"
-      type="primary"
-      plain
-      size="medium"
-      @click="userInfoExpentData"
-      >账户信息导出</el-button
-    >
+    <kt-button label="新增账户" type="primary" :plain="true" perms="expenseManagement:accountInformation:add"
+      @click="addAmount" />
+    <kt-button class="operation" label="费用支出明细导出" type="primary" :plain="true"
+      perms="expenseManagement:accountInformation:expenseDetailsImport" @click="expentData" />
+    <kt-button class="operation" label="账户信息导出" type="primary" :plain="true"
+      perms="expenseManagement:accountInformation:accountInformationImport" @click="userInfoExpentData" />
     <!-- 表格 -->
-    <el-table
-      :data="accountData"
-      border
-      size="small"
-      ref="account"
-      :header-cell-style="{
-        background: '#F2F7FC',
-        fontWeight: '900',
-        color: '#606266',
-      }"
-      height="600px"
-      style="width: 100%; margin-top: 30px"
-      @expand-change="handleRowChange"
-    >
+    <el-table :data="accountData" border size="small" ref="account" :header-cell-style="{
+      background: '#F2F7FC',
+      fontWeight: '900',
+      color: '#606266',
+    }" height="600px" style="width: 100%; margin-top: 30px" @expand-change="handleRowChange">
       <el-table-column type="expand">
         <template slot-scope="scope">
-          <el-table
-            :data="scope.row.invAccountCardList"
-            size="small"
-            :header-cell-style="{
-              background: '#ccc',
-              fontWeight: '900',
-              color: '#606266',
-            }"
-            style="width: 100%"
-          >
-            <el-table-column
-              type="index"
-              width="50"
-              align="center"
-              label="序号"
-            >
+          <el-table :data="scope.row.invAccountCardList" size="small" :header-cell-style="{
+            background: '#ccc',
+            fontWeight: '900',
+            color: '#606266',
+          }" style="width: 100%">
+            <el-table-column type="index" width="50" align="center" label="序号">
             </el-table-column>
-            <el-table-column
-              v-for="(childItem, index) in childColums"
-              :key="'child' + index"
-              :prop="childItem.prop"
-              align="center"
-              :label="childItem.label"
-              :min-width="childItem.minWidth"
-            >
+            <el-table-column v-for="(childItem, index) in childColums" :key="'child' + index" :prop="childItem.prop"
+              align="center" :label="childItem.label" :min-width="childItem.minWidth">
             </el-table-column>
-            <el-table-column
-              fixed="right"
-              label="操作"
-              align="center"
-              width="300"
-            >
+            <el-table-column fixed="right" label="操作" align="center" width="300">
               <template slot-scope="scopes">
-                <el-button size="mini" @click="childEdit(scopes.row)"
-                  >编辑</el-button
-                >
-                <el-button
-                  size="mini"
-                  type="danger"
-                  @click="cardDelete(scopes.row)"
-                  >删除</el-button
-                >
-                <el-button
-                  size="mini"
-                  type="success"
-                  @click="handleTableIncome(scope.row, scopes.row)"
-                  >收入</el-button
-                >
-                <el-button
-                  size="mini"
-                  type="warning"
-                  @click="handleTableExpend(scopes.row)"
-                  >支出</el-button
-                >
+                <kt-button label="编辑" size="mini" perms="expenseManagement:accountInformation:bankCardUpdate"
+                  @click="childEdit(scopes.row)" />
+                <kt-button label="删除" type="danger" size="mini"
+                  perms="expenseManagement:accountInformation:bankCardDelete" @click="cardDelete(scopes.row)" />
+                <kt-button label="收入" type="success" size="mini"
+                  perms="expenseManagement:accountInformation:bankCardIncome"
+                  @click="handleTableIncome(scope.row, scopes.row)" />
+                <kt-button label="支出" type="warning" size="mini"
+                  perms="expenseManagement:accountInformation:bankCardExpenses" @click="handleTableExpend(scopes.row)" />
               </template>
             </el-table-column>
           </el-table>
         </template>
       </el-table-column>
-      <el-table-column
-        v-for="(dataItem, dataIndex) in columns"
-        :key="dataIndex"
-        :label="dataItem.label"
-        :prop="dataItem.prop"
-        :min-width="dataItem.minWidth"
-        align="center"
-      >
+      <el-table-column v-for="(dataItem, dataIndex) in columns" :key="dataIndex" :label="dataItem.label"
+        :prop="dataItem.prop" :min-width="dataItem.minWidth" align="center">
       </el-table-column>
       <el-table-column fixed="right" label="操作" align="center" width="240">
         <template slot-scope="scope">
-          <el-button
-            size="mini"
-            @click.native.prevent="handleTableEdit(scope.row, scope)"
-            >编辑</el-button
-          >
-          <el-button
-            size="mini"
-            type="danger"
-            @click.native.prevent="handleTableDelete(scope.row)"
-            >删除</el-button
-          >
-          <el-tooltip
-            class="item"
-            effect="dark"
-            content="新增卡信息"
-            placement="bottom-end"
-          >
-            <el-button
-              size="mini"
-              type="success"
-              @click.native.prevent="handleTableAdd(scope.row)"
-              >新增</el-button
-            >
+          <kt-button label="编辑" size="mini" perms="expenseManagement:accountInformation:update"
+            @click.native.prevent="handleTableEdit(scope.row, scope)" />
+          <kt-button label="删除" type="danger" size="mini" perms="expenseManagement:accountInformation:delete"
+            @click.native.prevent="handleTableDelete(scope.row)" />
+          <el-tooltip class="item" effect="dark" content="新增卡信息" placement="bottom-end">
+            <kt-button label="新增" type="success" size="mini" perms="expenseManagement:accountInformation:bankCardAdd"
+              @click.native.prevent="handleTableAdd(scope.row)" />
           </el-tooltip>
         </template>
       </el-table-column>
     </el-table>
-    <el-pagination
-      @size-change="handleSizeChange"
-      layout="total, sizes, prev, pager, next, jumper"
-      @current-change="refreshPageRequest"
-      :current-page="pageRequest.pageNo"
-      :page-size="pageRequest.pageSize"
-      :page-sizes="[20, 50, 100, 200, 300, 400, 500]"
-      :total="pageRequest.totalSize"
-      style="float: left; margin-left: 20px; margin-top: 20px"
-    >
+    <el-pagination @size-change="handleSizeChange" layout="total, sizes, prev, pager, next, jumper"
+      @current-change="refreshPageRequest" :current-page="pageRequest.pageNo" :page-size="pageRequest.pageSize"
+      :page-sizes="[20, 50, 100, 200, 300, 400, 500]" :total="pageRequest.totalSize"
+      style="float: left; margin-left: 20px; margin-top: 20px">
     </el-pagination>
     <!-- 新增修改弹框 -->
-    <expense-component
-      ref="expenseComponent"
-      :type="type"
-      :formData="type == 1 ? accountFormData : accountCardFormData"
-      :formDataId="formDataId"
-      :title="title"
-      :dialogFormVisible="dialogFormVisible"
-      :nature_businessData="nature_businessData"
-      @resetForm="resetForm"
-      @submitForm="submitForm"
-      @setDateInterval="setDateInterval"
-    ></expense-component>
+    <expense-component ref="expenseComponent" :type="type" :formData="type == 1 ? accountFormData : accountCardFormData"
+      :formDataId="formDataId" :title="title" :dialogFormVisible="dialogFormVisible"
+      :nature_businessData="nature_businessData" @resetForm="resetForm" @submitForm="submitForm"
+      @setDateInterval="setDateInterval"></expense-component>
     <!-- 支出弹框 -->
-    <el-dialog
-      class="dialog expendDialog"
-      title="支出信息"
-      :close-on-click-modal="false"
-      :before-close="expendResetForm"
-      :visible.sync="expendDialogVisible"
-      width="60%"
-    >
+    <el-dialog class="dialog expendDialog" title="支出信息" :close-on-click-modal="false" :before-close="expendResetForm"
+      :visible.sync="expendDialogVisible" width="60%">
       <!-- 支出表格 -->
-      <kt-common-table
-        :operationWidth="130"
-        class="ktTable expendTable"
-        ref="expendTable"
-        :data="expendPageResult"
-        :columns="expendColumns"
-        :showBatchDelete="false"
-        :showOperation="true"
-        :button1Name="expendButton1Name"
-        button2Background="#92D050"
-        button3Background="#f56c6c"
-        button1Icon="el-icon-s-finance"
-        @handleButton1="handleTableConfirm"
-        @findPage="getExpendData"
-        :isshowpagination="true"
-      ></kt-common-table>
+      <kt-common-table :operationWidth="130" class="ktTable expendTable" ref="expendTable" :data="expendPageResult"
+        :columns="expendColumns" :showBatchDelete="false" :showOperation="true" :button1Name="expendButton1Name"
+        button2Background="#92D050" button3Background="#f56c6c" button1Icon="el-icon-s-finance"
+        @handleButton1="handleTableConfirm" @findPage="getExpendData" :isshowpagination="true"></kt-common-table>
     </el-dialog>
     <!-- 收入弹框 -->
-    <el-dialog
-      class="dialog expendDialog"
-      title="收入信息"
-      :close-on-click-modal="false"
-      :before-close="incomeResetForm"
-      :visible.sync="incomeDialogVisible"
-      width="60%"
-    >
-      <el-form
-        :model="inComeFormData"
-        :rules="inComeFormRules"
-        ref="inComeFormData"
-        label-width="130px"
-        size="small"
-        class="inComeForm"
-      >
+    <el-dialog class="dialog expendDialog" title="收入信息" :close-on-click-modal="false" :before-close="incomeResetForm"
+      :visible.sync="incomeDialogVisible" width="60%">
+      <el-form :model="inComeFormData" :rules="inComeFormRules" ref="inComeFormData" label-width="130px" size="small"
+        class="inComeForm">
         <el-row>
           <el-col :span="12">
             <el-form-item label="转账方" prop="company">
-              <el-select
-                v-model="inComeFormData.company"
-                filterable
-                placeholder=""
-                @change="companyChange"
-              >
-                <el-option
-                  v-for="item in collectionData"
-                  :key="item.bankCardNum"
-                  :label="item.name"
-                  :value="item.nameValue"
-                >
+              <el-select v-model="inComeFormData.company" filterable placeholder="" @change="companyChange">
+                <el-option v-for="item in collectionData" :key="item.bankCardNum" :label="item.name"
+                  :value="item.nameValue">
                 </el-option>
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="收款方" prop="collectionMessage">
-              <el-input
-                disabled
-                v-model="inComeFormData.collectionMessage"
-                autocomplete="off"
-              ></el-input>
+              <el-input disabled v-model="inComeFormData.collectionMessage" autocomplete="off"></el-input>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row>
           <el-col :span="12">
             <el-form-item label="金额" prop="outerFlag">
-              <el-input-number
-                v-model="inComeFormData.applyAmount"
-                :min="0"
-                :precision="2"
-                @blur="chageAppl"
-                :max="99999999999999999"
-                label=""
-              ></el-input-number>
+              <el-input-number v-model="inComeFormData.applyAmount" :min="0" :precision="2" @blur="chageAppl"
+                :max="99999999999999999" label=""></el-input-number>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="大写金额" prop="bigApplyAmount">
-              <el-input
-                v-model="inComeFormData.bigApplyAmount"
-                disabled
-                autocomplete="off"
-              ></el-input>
+              <el-input v-model="inComeFormData.bigApplyAmount" disabled autocomplete="off"></el-input>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row class="collec">
           <el-col :span="24">
             <el-form-item label="资金流向" style="width: 100%">
-              <el-input
-                v-model="inComeFormData.company"
-                disabled
-                autocomplete="off"
-              ></el-input>
+              <el-input v-model="inComeFormData.company" disabled autocomplete="off"></el-input>
               <i class="el-icon-right"></i>
-              <el-input
-                disabled
-                v-model="inComeFormData.collectionMessage"
-                autocomplete="off"
-              ></el-input>
+              <el-input disabled v-model="inComeFormData.collectionMessage" autocomplete="off"></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12"> </el-col>
@@ -317,95 +145,57 @@
         <el-row>
           <el-col :span="12">
             <el-form-item label="支付方式" prop="payMethod">
-              <el-select
-                v-model="inComeFormData.payMethod"
-                multiple
-                placeholder=""
-              >
-                <el-option
-                  v-for="item in payment_methodsData"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                >
+              <el-select v-model="inComeFormData.payMethod" multiple placeholder="">
+                <el-option v-for="item in payment_methodsData" :key="item.value" :label="item.label" :value="item.value">
                 </el-option>
               </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="资金用途" prop="fundUse">
-              <el-cascader
-                v-model="inComeFormData.fundUse"
-                :show-all-levels="true"
-                :clearable="true"
-                :checkStrictly="true"
-                :emitPath="false"
-                placeholder=""
-                :options="fundFlowData"
-                filterable
-                :props="{
+              <el-cascader v-model="inComeFormData.fundUse" :show-all-levels="true" :clearable="true"
+                :checkStrictly="true" :emitPath="false" placeholder="" :options="fundFlowData" filterable :props="{
                   children: 'child',
                   label: 'category',
                   value: 'category',
                   checkStrictly: false,
-                }"
-              ></el-cascader>
+                }"></el-cascader>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row>
-          <el-col :span="12" style="text-align: center"
-            ><h3 style="margin-left: 120px">支出方资金归属</h3>
+          <el-col :span="12" style="text-align: center">
+            <h3 style="margin-left: 120px">支出方资金归属</h3>
           </el-col>
-          <el-col :span="12" style="text-align: center"
-            ><h3 style="margin-left: 120px">收入方资金归属</h3>
+          <el-col :span="12" style="text-align: center">
+            <h3 style="margin-left: 120px">收入方资金归属</h3>
           </el-col>
         </el-row>
         <el-row class="profit_box">
           <el-col :span="12">
-            <el-form-item
-              v-for="item in affiliationData2"
-              :key="item.profitId + 'sr'"
-              :label="item.profitName"
-              prop="entProfit"
-            >
-              <el-input-number
-                v-model="item.profit"
-                :min="0"
-                placeholder="请输入利润"
-                :max="99999999999999"
-                label=""
-              ></el-input-number>
+            <el-form-item v-for="item in affiliationData2" :key="item.profitId + 'sr'" :label="item.profitName"
+              prop="entProfit">
+              <el-input-number v-model="item.profit" :min="0" placeholder="请输入利润" :max="99999999999999"
+                label=""></el-input-number>
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item
-              v-for="item in affiliationData"
-              :key="item.profitId + 'zc'"
-              :label="item.profitName"
-              prop="entProfit"
-            >
-              <el-input-number
-                v-model="item.profit"
-                :min="0"
-                placeholder="请输入利润"
-                :max="99999999999999"
-                label=""
-              ></el-input-number>
+            <el-form-item v-for="item in affiliationData" :key="item.profitId + 'zc'" :label="item.profitName"
+              prop="entProfit">
+              <el-input-number v-model="item.profit" :min="0" placeholder="请输入利润" :max="99999999999999"
+                label=""></el-input-number>
             </el-form-item>
           </el-col>
         </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="incomeResetForm()" size="small">取 消</el-button>
-        <el-button type="primary" @click="submitIncomeForm()" size="small"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitIncomeForm()" size="small">确 定</el-button>
       </div>
     </el-dialog>
   </div>
 </template>
-  <script>
+<script>
 import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
 import KtButton from "@/views/Core/KtButton"; // 按钮权限组件
 import ExpenseComponent from "./ExpenseComponent.vue"; //新增账户信息弹框
@@ -420,7 +210,7 @@ export default {
     this.business("nature_business"); //营业性质字典
     this.getTreeList(); //获取资金用途字典
   },
-  mounted() {},
+  mounted() { },
   data() {
     return {
       type: 1, //1为账户信息,2为卡信息 账户和卡判断条件
@@ -1038,7 +828,7 @@ export default {
               }
             });
         })
-        .catch(() => {});
+        .catch(() => { });
     },
     //选择证书有效日期区间
     setDateInterval(e) {
@@ -1051,7 +841,7 @@ export default {
       }
     },
     //获取支出页面列表数据
-    expendFindPage(data) {},
+    expendFindPage(data) { },
     //获取页面列表数据
     findPage(data) {
       if (data && data.pageRequest) {
@@ -1142,7 +932,7 @@ export default {
             }
           });
         })
-        .catch(() => {});
+        .catch(() => { });
     },
     //账户删除数据事件
     handleTableDelete(row) {
@@ -1159,7 +949,7 @@ export default {
             }
           });
         })
-        .catch(() => {});
+        .catch(() => { });
     },
     //收入弹框取消重置
     incomeResetForm() {
@@ -1317,12 +1107,13 @@ export default {
   },
 };
 </script>
-  
-  <style scoped>
+
+<style scoped>
 .operation {
   margin-left: 14px !important;
-  margin-top: 15px !important ;
+  margin-top: 15px !important;
 }
+
 .form {
   display: flex;
   margin-top: 14px;
@@ -1330,19 +1121,24 @@ export default {
   margin-left: -12px;
   margin-bottom: 20px;
 }
+
 .el-pagination {
   font-weight: normal;
 }
+
 .el-card__body {
   padding: 12px !important;
 }
+
 .footer .footerdiv {
   display: flex;
   align-items: center;
 }
+
 .container .el-form-item {
   margin-bottom: -14px !important;
 }
+
 .form .el-form-item__label {
   font-size: 15px !important;
   font-weight: 600 !important;
@@ -1351,9 +1147,11 @@ export default {
 .ktTable {
   margin-top: 20px;
 }
+
 .el-row {
   margin-top: 18px;
 }
+
 .top {
   margin-top: 0px;
 }
@@ -1361,9 +1159,11 @@ export default {
 .el-date-editor--daterange.el-input__inner {
   width: 300px;
 }
+
 /deep/ .el-select--small {
   width: 100%;
 }
+
 .frame {
   width: 100%;
   background-color: #fff;
@@ -1378,10 +1178,12 @@ export default {
   -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
   box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
 }
+
 /deep/ .el-dialog__body {
   overflow-y: scroll;
   max-height: 500px;
 }
+
 .addremove-box {
   width: 100%;
   display: flex;
@@ -1393,58 +1195,71 @@ export default {
     bottom:0;
     left: 0; */
 }
-.addremove-box > i {
+
+.addremove-box>i {
   cursor: pointer;
 }
-.frame >>> .el-date-editor {
+
+.frame>>>.el-date-editor {
   width: 100%;
 }
+
 .frame .el-input-number--small {
   width: 200px;
 }
-.ktTable >>> .el-button span {
+
+.ktTable>>>.el-button span {
   margin-left: 0;
 }
-.expendTable >>> .bottomFixed {
+
+.expendTable>>>.bottomFixed {
   position: static;
   margin-top: 20px;
 }
-.expendTable >>> .el-table {
+
+.expendTable>>>.el-table {
   height: 400px !important;
 }
 
-.expendDialog >>> .el-dialog__body {
+.expendDialog>>>.el-dialog__body {
   overflow-y: auto;
   height: 500px;
 }
-.collec >>> .el-form-item__content {
+
+.collec>>>.el-form-item__content {
   display: flex;
   align-items: center;
 }
-.inComeForm >>> .el-input-number__decrease,
-.inComeForm >>> .el-input-number__increase {
+
+.inComeForm>>>.el-input-number__decrease,
+.inComeForm>>>.el-input-number__increase {
   display: none;
 }
-.inComeForm >>> .el-input-number,
-.inComeForm >>> .el-cascader {
+
+.inComeForm>>>.el-input-number,
+.inComeForm>>>.el-cascader {
   width: 100%;
 }
-.inComeForm >>> .el-input.is-disabled .el-input__inner {
+
+.inComeForm>>>.el-input.is-disabled .el-input__inner {
   background-color: #fff;
   color: #606266;
 }
+
 .el-icon-right {
   margin: 0 10px;
   font-size: 20px;
 }
-.ktTable >>> .cell .el-button {
+
+.ktTable>>>.cell .el-button {
   width: 80px;
 }
-.expendDialog >>> .cell .el-button {
+
+.expendDialog>>>.cell .el-button {
   width: auto;
 }
+
 .profit_box .el-form-item {
   margin-bottom: 15px !important;
 }
 </style>
-  

+ 46 - 92
src/views/FinancialManagement/ExpenseManagement/ExpenseMessage.vue

@@ -2,102 +2,44 @@
   <!--布局容器-->
   <div class="container" style="width: 99%; margin-top: 0px">
     <!-- 新增 -->
-    <el-button
-      class="operation"
-      type="primary"
-      plain
-      size="medium"
-      @click="addAmount"
-      >新增科目</el-button
-    >
-    <el-button
-      class="operation"
-      type="primary"
-      plain
-      size="medium"
-      @click="setexpandAll"
-      >全部展开/折叠</el-button
-    >
+    <kt-button class="operation" label="新增科目" type="primary" :plain="true" perms="expenseManagement:expenseDetails:add"
+      @click="addAmount" />
+    <el-button class="operation" type="primary" plain size="medium" @click="setexpandAll">全部展开/折叠</el-button>
 
     <!-- 表格 -->
-    <el-table
-      v-if="refTable"
-      class="expendtable"
-      :stripe="true"
-      :default-expand-all="expandStatus"
-      :header-cell-style="{
-        background: '#F2F7FC',
-        fontWeight: '900',
-        color: '#606266',
-      }"
-      :data="tableData"
-      style="width: 100%; margin-bottom: 20px; margin-top: 30px"
-      row-key="expensesId"
-      border
-      :tree-props="{ children: 'child', hasChildren: 'hasChildren' }"
-    >
+    <el-table v-if="refTable" class="expendtable" :stripe="true" :default-expand-all="expandStatus" :header-cell-style="{
+      background: '#F2F7FC',
+      fontWeight: '900',
+      color: '#606266',
+    }" :data="tableData" style="width: 100%; margin-bottom: 20px; margin-top: 30px" row-key="expensesId" border
+      :tree-props="{ children: 'child', hasChildren: 'hasChildren' }">
       <el-table-column prop="category" align="left" width="300" label="类目">
       </el-table-column>
       <el-table-column prop="remark" align="center" label="备注">
       </el-table-column>
       <el-table-column align="center" label="操作">
         <template slot-scope="scope">
-          <el-button
-            size="mini"
-            @click="handleTableEdit(scope.$index, scope.row)"
-            >编辑</el-button
-          >
-          <el-button
-            size="mini"
-            type="danger"
-            @click="handleDelete(scope.$index, scope.row)"
-            >删除</el-button
-          >
-          <el-button
-            size="mini"
-            type="success"
-            @click="addHandeFn(scope.$index, scope.row)"
-            >新增子类</el-button
-          >
+          <kt-button label="编辑" perms="expenseManagement:expenseDetails:update"
+            @click="handleTableEdit(scope.$index, scope.row)" />
+          <kt-button label="删除" type="danger" perms="expenseManagement:expenseDetails:delete"
+            @click="handleDelete(scope.$index, scope.row)" />
+          <kt-button label="新增子类" type="success" perms="expenseManagement:expenseDetails:classAdd"
+            @click="addHandeFn(scope.$index, scope.row)" />
         </template>
       </el-table-column>
     </el-table>
     <!-- 新增弹出框 -->
-    <el-dialog
-      class="dialog"
-      :title="title"
-      :close-on-click-modal="false"
-      :before-close="handleClose"
-      :visible.sync="dialogFormVisible"
-      width="50%"
-    >
-      <el-form
-        :model="formData"
-        :rules="rules"
-        ref="formData"
-        label-width="120px"
-        size="small"
-        class="frame"
-      >
+    <el-dialog class="dialog" :title="title" :close-on-click-modal="false" :before-close="handleClose"
+      :visible.sync="dialogFormVisible" width="50%">
+      <el-form :model="formData" :rules="rules" ref="formData" label-width="120px" size="small" class="frame">
         <el-row>
           <el-col :span="12">
-            <el-form-item
-              label="明细"
-              :label-width="formLabelWidth"
-              prop="category"
-            >
-              <el-input
-                v-model="formData.category"
-                autocomplete="off"
-              ></el-input>
+            <el-form-item label="明细" :label-width="formLabelWidth" prop="category">
+              <el-input v-model="formData.category" autocomplete="off"></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item
-              label="备注"
-              :label-width="formLabelWidth"
-              prop="remark"
-            >
+            <el-form-item label="备注" :label-width="formLabelWidth" prop="remark">
               <el-input v-model="formData.remark" autocomplete="off"></el-input>
             </el-form-item>
           </el-col>
@@ -105,14 +47,12 @@
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="resetForm('formData')" size="small">取 消</el-button>
-        <el-button type="primary" @click="submitForm('formData')" size="small"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitForm('formData')" size="small">确 定</el-button>
       </div>
     </el-dialog>
   </div>
 </template>
-  <script>
+<script>
 import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
 import KtButton from "@/views/Core/KtButton"; // 按钮权限组件
 
@@ -126,7 +66,7 @@ export default {
   },
   data() {
     return {
-      refTable:true,//表格重新渲染
+      refTable: true,//表格重新渲染
       expandStatus: false, //是否全部展开
       title: "新增明细",
       tableData: [], //表格数据
@@ -180,7 +120,7 @@ export default {
             }
           });
         })
-        .catch(() => {});
+        .catch(() => { });
     },
     //新建子类
     addHandeFn(index, row) {
@@ -279,12 +219,13 @@ export default {
   },
 };
 </script>
-  
-  <style scoped>
+
+<style scoped>
 .operation {
   margin-left: 14px !important;
-  margin-top: 15px !important ;
+  margin-top: 15px !important;
 }
+
 .form {
   display: flex;
   margin-top: 14px;
@@ -292,19 +233,24 @@ export default {
   margin-left: -12px;
   margin-bottom: 20px;
 }
+
 .el-pagination {
   font-weight: normal;
 }
+
 .el-card__body {
   padding: 12px !important;
 }
+
 .footer .footerdiv {
   display: flex;
   align-items: center;
 }
+
 .container .el-form-item {
   margin-bottom: -14px !important;
 }
+
 .form .el-form-item__label {
   font-size: 15px !important;
   font-weight: 600 !important;
@@ -313,9 +259,11 @@ export default {
 .ktTable {
   margin-top: 20px;
 }
+
 .el-row {
   margin-top: 18px;
 }
+
 .top {
   margin-top: 0px;
 }
@@ -323,9 +271,11 @@ export default {
 .el-date-editor--daterange.el-input__inner {
   width: 300px;
 }
+
 /deep/ .el-select--small {
   width: 100%;
 }
+
 .frame {
   width: 100%;
   background-color: #fff;
@@ -340,10 +290,12 @@ export default {
   -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
   box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
 }
+
 /deep/ .el-dialog__body {
   overflow-y: scroll;
   max-height: 500px;
 }
+
 .addremove-box {
   width: 100%;
   display: flex;
@@ -352,15 +304,17 @@ export default {
   font-size: 25px;
   margin-top: 10px;
 }
-.addremove-box > i {
+
+.addremove-box>i {
   cursor: pointer;
 }
-.frame >>> .el-date-editor {
+
+.frame>>>.el-date-editor {
   width: 100%;
 }
-.expendtable >>> .el-table__body-wrapper {
+
+.expendtable>>>.el-table__body-wrapper {
   overflow-y: auto;
   height: 600px;
 }
 </style>
-  

+ 12 - 27
src/views/FinancialManagement/ExpenseManagement/PaymentManagement.vue

@@ -64,31 +64,14 @@
           >
           </el-date-picker>
         </el-form-item>
-        <el-form-item
-          ><el-button
-            type="primary"
-            style="margin-left: 20px"
-            size="small"
-            @click="queryStaffInfo"
-            >查询</el-button
-          >
+        <el-form-item>
+          <kt-button  label="查询" type="primary"  perms="expenseManagement:invoiceManagement:query"
+      @click="queryStaffInfo" />
         </el-form-item>
-        <el-button
-          class="operation"
-          type="primary"
-          plain
-          size="medium"
-          @click="addPayment"
-          >开票新增</el-button
-        >
-        <el-button
-          class="operation"
-          type="primary"
-          plain
-          size="medium"
-          @click="expentData"
-          >导出</el-button
-        >
+        <kt-button class="operation"   label="开票新增" type="primary" :plain="true"  perms="expenseManagement:invoiceManagement:add"
+      @click="addPayment" />
+      <kt-button class="operation"   label="导出" type="primary" :plain="true"  perms="expenseManagement:invoiceManagement:excel"
+      @click="expentData" />
       </el-form>
       <!-- 合计 -->
       <div style="margin-top: 20px">
@@ -122,7 +105,7 @@
       element-loading-spinner="el-icon-loading"
       :operationWidth="operationWidth"
       class="ktTable"
-      permsEdit="sys:agent:view"
+      permsEdit="expenseManagement:invoiceManagement:income"
       ref="dataTable"
       :data="pageResult"
       :columns="columns"
@@ -132,6 +115,9 @@
       button3Name="撤销"
       button2Name="编辑"
       button4Name="记录"
+      permsButton2="expenseManagement:invoiceManagement:update"
+      permsButton3="expenseManagement:invoiceManagement:revoke"
+      permsButton4="expenseManagement:invoiceManagement:record"
       button3Icon="fa fa-trash"
       button4Icon="el-icon-s-order"
       button4Background="#67C23A"
@@ -1204,7 +1190,7 @@ export default {
   },
 };
 </script>
-        
+
   <style scoped>
 .operation {
   margin-left: 14px !important;
@@ -1320,4 +1306,3 @@ export default {
   margin-left: 0 !important;
 }
 </style>
-        

+ 47 - 91
src/views/FinancialManagement/ExpenseManagement/Profit.vue

@@ -2,31 +2,16 @@
   <!--布局容器-->
   <div class="container" style="width: 99%; margin-top: 0px">
     <!-- 新增 -->
-    <el-button
-      class="operation"
-      type="primary"
-      plain
-      size="medium"
-      @click="addAmount"
-      >新增利润</el-button
-    >
+    <kt-button class="operation" label="新增利润" type="primary" :plain="true" perms="expenseManagement:fundsOwnership:add"
+      @click="addAmount" />
 
     <!-- 表格 -->
-    <el-table
-      class="expendtable"
-      :stripe="true"
-      default-expand-all
-      :header-cell-style="{
-        background: '#F2F7FC',
-        fontWeight: '900',
-        color: '#606266',
-      }"
-      :data="tableData"
-      style="width: 100%; margin-bottom: 20px; margin-top: 30px"
-      row-key="expensesId"
-      border
-      :tree-props="{ children: 'child', hasChildren: 'hasChildren' }"
-    >
+    <el-table class="expendtable" :stripe="true" default-expand-all :header-cell-style="{
+      background: '#F2F7FC',
+      fontWeight: '900',
+      color: '#606266',
+    }" :data="tableData" style="width: 100%; margin-bottom: 20px; margin-top: 30px" row-key="expensesId" border
+      :tree-props="{ children: 'child', hasChildren: 'hasChildren' }">
       <el-table-column prop="profitId" align="center" label="归属id">
       </el-table-column>
       <el-table-column prop="profitEng" align="center" label="归属标识">
@@ -35,85 +20,42 @@
       </el-table-column>
       <el-table-column align="center" label="操作">
         <template slot-scope="scope">
-          <el-button
-            size="mini"
-            @click="handleTableEdit(scope.$index, scope.row)"
-            >编辑</el-button
-          >
-          <el-button
-            size="mini"
-            type="danger"
-            @click="handleDelete(scope.$index, scope.row)"
-            >删除</el-button
-          >
+          <kt-button label="编辑" perms="expenseManagement:fundsOwnership:update"
+            @click="handleTableEdit(scope.$index, scope.row)" />
+          <kt-button label="删除" type="danger" perms="expenseManagement:fundsOwnership:delete"
+            @click="handleDelete(scope.$index, scope.row)" />
         </template>
       </el-table-column>
     </el-table>
-    <el-pagination
-      @size-change="handleSizeChange"
-      @current-change="handleCurrentChange"
-      :current-page="searchParams.pageNo"
-      :page-sizes="[10, 200, 300, 400]"
-      :page-size="searchParams.pageSize"
-      layout="total, sizes, prev, pager, next, jumper"
-      :total="searchParams.totalSize"
-    >
+    <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+      :current-page="searchParams.pageNo" :page-sizes="[10, 200, 300, 400]" :page-size="searchParams.pageSize"
+      layout="total, sizes, prev, pager, next, jumper" :total="searchParams.totalSize">
     </el-pagination>
     <!-- 新增弹出框 -->
-    <el-dialog
-      class="dialog"
-      :title="title"
-      :close-on-click-modal="false"
-      :before-close="handleClose"
-      :visible.sync="dialogFormVisible"
-      width="50%"
-    >
-      <el-form
-        :model="formData"
-        :rules="rules"
-        ref="formData"
-        label-width="120px"
-        size="small"
-        class="frame"
-      >
+    <el-dialog class="dialog" :title="title" :close-on-click-modal="false" :before-close="handleClose"
+      :visible.sync="dialogFormVisible" width="50%">
+      <el-form :model="formData" :rules="rules" ref="formData" label-width="120px" size="small" class="frame">
         <el-row>
           <el-col :span="12">
-            <el-form-item
-              label="归属标识"
-              :label-width="formLabelWidth"
-              prop="profitEng"
-            >
-              <el-input
-                v-model="formData.profitEng"
-                autocomplete="off"
-                placeholder="请填写英文标识"
-              ></el-input>
+            <el-form-item label="归属标识" :label-width="formLabelWidth" prop="profitEng">
+              <el-input v-model="formData.profitEng" autocomplete="off" placeholder="请填写英文标识"></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item
-              label="归属名称"
-              :label-width="formLabelWidth"
-              prop="profitName"
-            >
-              <el-input
-                v-model="formData.profitName"
-                autocomplete="off"
-              ></el-input>
+            <el-form-item label="归属名称" :label-width="formLabelWidth" prop="profitName">
+              <el-input v-model="formData.profitName" autocomplete="off"></el-input>
             </el-form-item>
           </el-col>
         </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="resetForm('formData')" size="small">取 消</el-button>
-        <el-button type="primary" @click="submitForm('formData')" size="small"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitForm('formData')" size="small">确 定</el-button>
       </div>
     </el-dialog>
   </div>
 </template>
-    <script>
+<script>
 import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
 import KtButton from "@/views/Core/KtButton"; // 按钮权限组件
 
@@ -145,7 +87,7 @@ export default {
       rules: {
         profitEng: [
           { required: true, message: "归属标识不能为空", trigger: "blur" },
-          {pattern:/[a-zA-z]$/,message:'请输入英文'}
+          { pattern: /[a-zA-z]$/, message: '请输入英文' }
         ],
         profitName: [
           { required: true, message: "归属名称不能为空", trigger: "blur" },
@@ -188,7 +130,7 @@ export default {
             }
           });
         })
-        .catch(() => {});
+        .catch(() => { });
     },
     //获取列表数据
     findPage(data) {
@@ -283,12 +225,13 @@ export default {
   },
 };
 </script>
-    
-    <style scoped>
+
+<style scoped>
 .operation {
   margin-left: 14px !important;
-  margin-top: 15px !important ;
+  margin-top: 15px !important;
 }
+
 .form {
   display: flex;
   margin-top: 14px;
@@ -296,19 +239,24 @@ export default {
   margin-left: -12px;
   margin-bottom: 20px;
 }
+
 .el-pagination {
   font-weight: normal;
 }
+
 .el-card__body {
   padding: 12px !important;
 }
+
 .footer .footerdiv {
   display: flex;
   align-items: center;
 }
+
 .container .el-form-item {
   margin-bottom: -14px !important;
 }
+
 .form .el-form-item__label {
   font-size: 15px !important;
   font-weight: 600 !important;
@@ -317,9 +265,11 @@ export default {
 .ktTable {
   margin-top: 20px;
 }
+
 .el-row {
   margin-top: 18px;
 }
+
 .top {
   margin-top: 0px;
 }
@@ -327,9 +277,11 @@ export default {
 .el-date-editor--daterange.el-input__inner {
   width: 300px;
 }
+
 /deep/ .el-select--small {
   width: 100%;
 }
+
 .frame {
   width: 100%;
   background-color: #fff;
@@ -344,10 +296,12 @@ export default {
   -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
   box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
 }
+
 /deep/ .el-dialog__body {
   overflow-y: scroll;
   max-height: 500px;
 }
+
 .addremove-box {
   width: 100%;
   display: flex;
@@ -359,15 +313,17 @@ export default {
       bottom:0;
       left: 0; */
 }
-.addremove-box > i {
+
+.addremove-box>i {
   cursor: pointer;
 }
-.frame >>> .el-date-editor {
+
+.frame>>>.el-date-editor {
   width: 100%;
 }
-.expendtable >>> .el-table__body-wrapper {
+
+.expendtable>>>.el-table__body-wrapper {
   overflow-y: auto;
   height: 600px;
 }
 </style>
-    

+ 38 - 52
src/views/FinancialManagement/ExpenseManagement/ReportViewing.vue

@@ -3,56 +3,29 @@
   <div class="container" style="width: 99%; margin-top: 0px">
     <!-- 顶部查询 -->
     <el-row class="top">
-      <el-form
-        v-model="pageRequest"
-        size="small"
-        label-width="95px"
-        class="form"
-      >
+      <el-form v-model="pageRequest" size="small" label-width="95px" class="form">
         <el-form-item label="账户类别" label-width="95px" prop="outerFlag">
-          <el-select
-            v-model="pageRequest.outerFlag"
-            placeholder="请选择账户类别"
-            clearable
-          >
+          <el-select v-model="pageRequest.outerFlag" placeholder="请选择账户类别" clearable>
             <el-option label="内部账户" value="0"></el-option>
             <el-option label="外部账户" value="1"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="户名" label-width="95px" prop="invCompanyName">
-          <el-input
-            v-model="pageRequest.accountName"
-            placeholder="请输入户名"
-            class="widths"
-            clearable
-          ></el-input>
+          <el-input v-model="pageRequest.accountName" placeholder="请输入户名" class="widths" clearable></el-input>
         </el-form-item>
         <el-form-item>
-          <el-button type="primary" size="small" @click="queryStaffInfo"
-            >查询</el-button
-          >
+          <kt-button label="查询" type="primary" perms="expenseManagement:report:query" @click="queryStaffInfo" />
         </el-form-item>
       </el-form>
     </el-row>
     <!-- 表格 -->
-    <kt-common-table
-      v-loading="loading"
-      element-loading-text="玩命加载中~"
-      element-loading-spinner="el-icon-loading"
-      :operationWidth="operationWidth"
-      class="ktTable"
-      permsEdit="sys:agent:view"
-      ref="dataTable"
-      :data="pageResult"
-      :columns="columns"
-      :showBatchDelete="false"
-      :showOperation="false"
-      @findPage="findPage"
-      :isshowpagination="true"
-    ></kt-common-table>
+    <kt-common-table v-loading="loading" element-loading-text="玩命加载中~" element-loading-spinner="el-icon-loading"
+      :operationWidth="operationWidth" class="ktTable" permsEdit="sys:agent:view" ref="dataTable" :data="pageResult"
+      :columns="columns" :showBatchDelete="false" :showOperation="false" @findPage="findPage"
+      :isshowpagination="true"></kt-common-table>
   </div>
 </template>
-      <script>
+<script>
 import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
 import KtButton from "@/views/Core/KtButton"; // 按钮权限组件
 
@@ -62,7 +35,7 @@ export default {
   created() {
     this.business();
   },
-  mounted() {},
+  mounted() { },
   data() {
     return {
       showStatus: true,
@@ -88,7 +61,7 @@ export default {
      * 页面查询
      */
     queryStaffInfo() {
-      if(this.showStatus==false){
+      if (this.showStatus == false) {
         return
       }
       this.showStatus = false;
@@ -100,13 +73,13 @@ export default {
      * 获取页面数据
      */
     findPage(data) {
-      // 
+      //
       this.loading = true
       if (data && data.pageRequest) {
         this.pageRequest.pageNo = data.pageRequest.pageNum;
         this.pageRequest.pageSize = data.pageRequest.pageSize;
       }
-      
+
       this.$api.expense
         .invAccountLook(this.pageRequest)
         .then((res) => {
@@ -122,12 +95,12 @@ export default {
             });
             this.pageResult.content = res.data.maps;
             this.pageResult = {
-            content: res.data.maps,
-            pageNo: res.data.current,
-            pageSize: res.data.pageSize,
-            totalPages: res.data.pageNo,
-            totalSize: res.data.total,
-          };
+              content: res.data.maps,
+              pageNo: res.data.current,
+              pageSize: res.data.pageSize,
+              totalPages: res.data.pageNo,
+              totalSize: res.data.total,
+            };
           } else {
             this.$message.error(res.msg);
           }
@@ -148,12 +121,13 @@ export default {
   },
 };
 </script>
-      
-      <style scoped>
+
+<style scoped>
 .operation {
   margin-left: 14px !important;
-  margin-top: 15px !important ;
+  margin-top: 15px !important;
 }
+
 .form {
   display: flex;
   margin-top: 14px;
@@ -161,19 +135,24 @@ export default {
   margin-left: -12px;
   margin-bottom: 20px;
 }
+
 .el-pagination {
   font-weight: normal;
 }
+
 .el-card__body {
   padding: 12px !important;
 }
+
 .footer .footerdiv {
   display: flex;
   align-items: center;
 }
+
 .container .el-form-item {
   margin-bottom: -14px !important;
 }
+
 .form .el-form-item__label {
   font-size: 15px !important;
   font-weight: 600 !important;
@@ -182,9 +161,11 @@ export default {
 .ktTable {
   margin-top: 20px;
 }
+
 .el-row {
   margin-top: 18px;
 }
+
 .top {
   margin-top: 0px;
 }
@@ -192,9 +173,11 @@ export default {
 .el-date-editor--daterange.el-input__inner {
   width: 300px;
 }
+
 /deep/ .el-select--small {
   width: 100%;
 }
+
 .frame {
   width: 100%;
   background-color: #fff;
@@ -209,10 +192,12 @@ export default {
   -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
   box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
 }
+
 /deep/ .el-dialog__body {
   overflow-y: scroll;
   max-height: 500px;
 }
+
 .addremove-box {
   width: 100%;
   display: flex;
@@ -224,11 +209,12 @@ export default {
         bottom:0;
         left: 0; */
 }
-.addremove-box > i {
+
+.addremove-box>i {
   cursor: pointer;
 }
-.frame >>> .el-date-editor {
+
+.frame>>>.el-date-editor {
   width: 100%;
 }
 </style>
-      

+ 6 - 14
src/views/FinancialManagement/ExpenseManagement/TransferRecord.vue

@@ -36,29 +36,22 @@
           ></el-input>
         </el-form-item>
         <el-form-item>
-          <el-button type="primary" size="small" @click="findPage"
-            >查询</el-button
-          >
+          <kt-button  label="查询"  type="primary"   perms="expenseManagement:transferRecord:query"
+      @click="findPage" />
         </el-form-item>
       </el-form>
     </el-row>
-    <el-button
-      class="operation"
-      type="primary"
-      plain
-      size="medium"
-      @click="expentData"
-      >导出</el-button
-    >
+    <kt-button  class="operation"  label="导出"  type="primary" :plain="true"   perms="expenseManagement:transferRecord:excel"
+      @click="expentData" />
     <!-- 表格 -->
     <kt-common-table
       :operationWidth="operationWidth"
       class="ktTable"
-      permsEdit="sys:agent:view"
       ref="dataTable"
       :data="pageResult"
       :columns="columns"
       button3Name="撤销"
+      permsButton3="expenseManagement:transferRecord:revoke"
       button3Background="#f56c6c"
       @handleButton3="handleTableDelete"
       :showBatchDelete="false"
@@ -226,7 +219,7 @@ export default {
   },
 };
 </script>
-    
+
     <style scoped>
 .operation {
   margin-left: 14px !important;
@@ -309,4 +302,3 @@ export default {
   width: 100%;
 }
 </style>
-    

+ 15 - 16
src/views/FinancialManagement/InsuranceData/InsuranceDataExport.vue

@@ -34,7 +34,7 @@
     data() {
       return {
         queryForm:{},
-        permsDelete:"sys:user:delete",
+        permsDelete:"carInsurance:exportCarInsuranceData:excel",
         optionsStatus:[],
       };
     },
@@ -50,7 +50,7 @@
     })
     },
     mounted() {
-    
+
     },
     methods: {
         // 导出excel
@@ -76,7 +76,7 @@
             a.download = "导出订单.xlsx";
             a.click();
             // 5.释放这个临时的对象url
-            window.URL.revokeObjectURL(url);					
+            window.URL.revokeObjectURL(url);
           }else{
             this.$message.error(res.msg)
           }
@@ -89,44 +89,44 @@
   .el-divider {
     margin: 10px 0px 15px !important;
   }
-  
+
   .queryForm .el-row {
     margin: 0px;
   }
-  
+
   .queryForm .el-form-item {
     margin-bottom: 0px;
   }
-  
+
   .products {
-  
+
     // margin: 20px;
     .productCosts {
       text-align: center;
-  
+
       span {
         font-weight: bold;
       }
     }
   }
-  
+
   .ruleStyle{
     /deep/ .el-divider__text{
       color: red;
     }
   }
-  
+
   .products>div {
     margin: 5px;
   }
-  
+
   .productstitle {
     width: 100%;
     border-bottom: 2px solid #409eff;
     text-align: center;
-  
+
   }
-  
+
   .productstitle>div {
     width: 100px;
     height: 26px;
@@ -137,13 +137,13 @@
     padding: 2px;
     font-size: 12px;
   }
-  
+
   /deep/ {
     .el-button--warning {
       color: #fff;
       background-color: #ee7000;
       border-color: #ee7000;
-  
+
       &:hover {
         color: #fff;
         background-color: #ee6f00ce;
@@ -155,4 +155,3 @@
     min-width: 180px;
   }
   </style>
-  

+ 4 - 3
src/views/FinancialManagement/ReconciliationSystem/ReceivablePayableCollection/AccountsReceivable.vue

@@ -39,9 +39,8 @@
             </el-form-item>
           </el-col>
           <el-col :span="1">
-            <el-button type="primary" size="small" @click="Search"
-              >查询</el-button
-            >
+            <kt-button label="查询" type="primary" perms="reconciliation:recPay:receivableResult:query"
+          @click="Search" />
           </el-col>
           <el-col :span="1">
             <!-- <el-upload
@@ -90,12 +89,14 @@
 </template>
 <script>
 import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
+import KtButton from "@/views/Core/KtButton";
 import CommonUtil from "@/utils/comutil.js";
 import { searchkey } from "@/utils/validate.js";
 import { regionData, codeToText } from "element-china-area-data";
 export default {
   components: {
     KtCommonTable,
+    KtButton
   },
   data() {
     return {

+ 6 - 10
src/views/FinancialManagement/ReconciliationSystem/ReceivablePayableCollection/ChannelAccount.vue

@@ -39,12 +39,8 @@
             </el-form-item>
           </el-col>
           <el-col :span="6" >
-          <el-button type="primary" size="small" @click="Search"
-              >查询</el-button
-            >
-            <el-button type="primary" size="small" @click="handleAdd"
-              >数据录入</el-button
-            >
+            <kt-button    label="查询" type="primary" perms="reconciliation:recPay:channelAccount:query" @click="Search" />
+            <kt-button    label="数据录入" type="primary" perms="reconciliation:recPay:channelAccount:add" @click="handleAdd" />
           </el-col>
         </el-row>
       </el-form>
@@ -54,13 +50,9 @@
         :SerialShow="false"
         :operationWidth="150"
         :showOperation="true"
-        permsDelete="sys:user:delete"
         :showBatchDelete="false"
         :showBatchSettled="false"
         :showBatchPrint="false"
-        permsButton1="sys:user:edit"
-        permsButton2="sys:user:edit"
-        permsButton3="sys:user:edit"
         :data="pageResult"
         :columns="columns"
         @findPage="findPage"
@@ -70,10 +62,12 @@
         @handlePrint="handlePrint"
         button1Name="修改"
         button1Background="#E6A23C"
+        permsButton1="reconciliation:recPay:channelAccount:update"
         @handleButton1="accountUpdate"
         button1Icon=""
         button2Name="删除"
         button2Background="#F56C6C"
+        permsButton2="reconciliation:recPay:channelAccount:delete"
         @handleButton2="accountDelete"
         button2Icon=""
       >
@@ -172,12 +166,14 @@
 </template>
 <script>
 import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
+import KtButton from "@/views/Core/KtButton";//按钮权限组件
 import CommonUtil from "@/utils/comutil.js";
 import { searchkey } from "@/utils/validate.js";
 import { regionData, codeToText } from "element-china-area-data";
 export default {
   components: {
     KtCommonTable,
+    KtButton
   },
   data() {
     return {

+ 6 - 12
src/views/FinancialManagement/ReconciliationSystem/ReceivablePayableCollection/ReceivablePayableCollection.vue

@@ -190,7 +190,7 @@
                 v-model="revenueTime"
                 type="daterange"
                 @change="revenueTimeChange"
-                start-placeholder="开始日期"  
+                start-placeholder="开始日期"
                 end-placeholder="结束日期"
                 class="widths"
                 value-format="yyyy-MM-dd"
@@ -203,13 +203,8 @@
         </el-row>
       </el-form>
       <div class="flex j-end" style="margin-right: 100px">
-        <el-button
-          type="primary"
-          size="small"
-          @click="Search"
-          style="margin-right: 20px"
-          >查询</el-button
-        >
+        <kt-button label="查询" type="primary" perms="reconciliation:recPay:receivablePayable:query"
+          @click="Search" />
       </div>
     </div>
     <el-main ref="elMain" style="padding: 0px">
@@ -217,13 +212,10 @@
         :SerialShow="false"
         :operationWidth="150"
         :showOperation="false"
-        permsDelete="sys:user:delete"
+        permsExcel="reconciliation:recPay:receivablePayable:excel"
         :showBatchDelete="false"
         :showBatchSettled="false"
         :showBatchPrint="true"
-        permsButton1="sys:user:edit"
-        permsButton2="sys:user:edit"
-        permsButton3="sys:user:edit"
         :data="pageResult"
         :columns="columns"
         @findPage="findPage"
@@ -238,10 +230,12 @@
 </template>
 <script>
 import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
+import KtButton from "@/views/Core/KtButton";
 import CommonUtil from "@/utils/comutil.js";
 export default {
   components: {
     KtCommonTable,
+    KtButton
   },
   data() {
     return {

+ 7 - 1
src/views/FinancialManagement/ReconciliationSystem/ReceivablePayableCollection/SettlementCollect.vue

@@ -34,7 +34,8 @@
           </el-select>
         </el-form-item>
         <el-form-item>
-          <el-button type="primary" @click="formQuery">查询</el-button>
+          <kt-button label="查询" type="primary" perms="reconciliation:recPay:settlementSummary:query"
+          @click="formQuery" />
         </el-form-item>
       </el-form>
     </div>
@@ -145,7 +146,12 @@
 </template>
 <script>
 import CommonUtil from "@/utils/comutil.js";
+import KtButton from "@/views/Core/KtButton";
+
 export default {
+  components:{
+    KtButton
+  },
   data() {
     return {
       //地区编码数据

+ 14 - 9
src/views/FinancialManagement/ReconciliationSystem/ReceivablePayableCollection/SettlementSource.vue

@@ -72,21 +72,26 @@
         </el-row>
       </el-form>
       <div class="flex j-end" style="margin-right: 100px">
-        <el-button type="danger" size="small" @click="templateDownload" style="margin-right: 20px">下载模板</el-button>
-        <el-button type="primary" size="small" @click="Search" style="margin-right: 20px">查询</el-button>
+        <kt-button label="下载模板" type="danger" perms="reconciliation:recPay:importSettlement:template"
+          @click="templateDownload" />
+        <kt-button label="查询" type="primary" perms="reconciliation:recPay:importSettlement:query" @click="Search"
+          style="margin-right: 10px" />
         <el-upload class="upload-demo" :auto-upload="false" :on-change="writeOffUpload" action="###"
           :show-file-list="false">
-          <el-button size="small" type="primary">数据导入</el-button>
+          <kt-button label="数据导入" type="primary" perms="reconciliation:recPay:importSettlement:importAdd" @click="Search"
+            style="margin-right: 10px" />
         </el-upload>
       </div>
     </div>
     <el-main ref="elMain" style="padding: 0px">
-      <kt-common-table :SerialShow="false" :operationWidth="150" :showOperation="true" permsDelete="sys:user:delete"
-        :showBatchDelete="true" :showBatchSettled="true" :showBatchPrint="true" permsButton1="sys:user:edit"
-        permsButton2="sys:user:edit" permsButton3="sys:user:edit" :data="pageResult" :columns="columns"
-        @findPage="findPage" keyName="id" settledName="批量修改" @handleSettled="handleTableSettled"
-        @handlePrint="handlePrint" @handleDelete="handleDelete" button1Name="修改" button1Background="#E6A23C"
-        @handleButton1="sourceUpdate" button1Icon="">
+      <kt-common-table :SerialShow="false" :operationWidth="150" :showOperation="true"
+        permsSettled="reconciliation:recPay:importSettlement:batchUpdate"
+        permsDelete="reconciliation:recPay:importSettlement:batchDelete"
+        permsExcel="reconciliation:recPay:importSettlement:excel" :showBatchDelete="true" :showBatchSettled="true"
+        :showBatchPrint="true" :data="pageResult" :columns="columns" @findPage="findPage" keyName="id" settledName="批量修改" deleteName="批量删除"
+        @handleSettled="handleTableSettled" @handlePrint="handlePrint" @handleDelete="handleDelete" button1Name="修改"
+        button1Background="#E6A23C" @handleButton1="sourceUpdate" button1Icon=""
+        permsButton1="reconciliation:recPay:importSettlement:update">
       </kt-common-table>
     </el-main>
     <el-dialog title="信息修改" :visible.sync="dialogFormVisible" v-dialogDrag :close-on-click-modal="false" width="60%">

+ 5 - 1
src/views/FinancialManagement/ReconciliationSystem/ReceivablePayableCollection/SigningCollect.vue

@@ -38,7 +38,8 @@
           </el-form-item>
         </el-col>
         <el-form-item>
-          <el-button type="primary" @click="formQuery">查询</el-button>
+          <kt-button label="查询" type="primary" perms="reconciliation:recPay:signingSummary:query"
+          @click="formQuery" />
         </el-form-item>
       </el-form>
     </div>
@@ -68,10 +69,13 @@
 </template>
 <script>
 import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
+import KtButton from "@/views/Core/KtButton";
+
 import CommonUtil from "@/utils/comutil.js";
 export default {
   components: {
     KtCommonTable,
+    KtButton
   },
   data() {
     return {

+ 21 - 14
src/views/FinancialManagement/ReconciliationSystem/ReceivablePayableCollection/Source.vue

@@ -79,33 +79,38 @@
           </el-col>
           <el-col :span="6">
             <el-form-item label="导入日期">
-              <el-date-picker v-model="revenueTime" type="daterange" @change="revenueTimeChange"
-                start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" clearable style="width: 250px">
+              <el-date-picker v-model="revenueTime" type="daterange" @change="revenueTimeChange" start-placeholder="开始日期"
+                end-placeholder="结束日期" value-format="yyyy-MM-dd" clearable style="width: 250px">
               </el-date-picker>
             </el-form-item>
           </el-col>
         </el-row>
       </el-form>
       <div class="flex j-end" style="margin-right: 100px">
-        <el-button type="danger" size="small" @click="templateDownload" style="margin-right: 20px">下载模板</el-button>
-        <el-button type="success" size="small" @click="createOrUpdateVisible = true"
-          style="margin-right: 20px">新增数据</el-button>
-        <el-button type="primary" size="small" @click="Search" style="margin-right: 20px">查询</el-button>
-        <el-upload class="upload-demo" :auto-upload="false" :on-change="writeOffUpload" action="###"
+        <kt-button label="下载模板" type="danger" perms="reconciliation:recPay:importAccountsReceivable:template"
+          @click="templateDownload" />
+        <kt-button label="新增数据" type="success" perms="reconciliation:recPay:importAccountsReceivable:add"
+          @click="createOrUpdateVisible = true" />
+        <kt-button label="查询" type="primary" perms="reconciliation:recPay:importAccountsReceivable:query"
+          @click="Search" />
+        <el-upload class="upload-demo" :auto-upload="false" :on-change="writeOffUpload" action="###" style="margin-left: 10px;"
           :show-file-list="false">
-          <el-button size="small" type="primary">数据导入</el-button>
+          <kt-button label="数据导入" type="primary" perms="reconciliation:recPay:importAccountsReceivable:importAdd"
+            @click="Search" />
         </el-upload>
       </div>
     </div>
     <el-main ref="elMain" style="padding: 0px">
       <kt-common-table :SerialShow="false" :operationWidth="180" :showOperation="true" :showSummary="true"
         :showSummaryFieldList="['premium', 'nonCopying', 'receivable', 'jqPremiumTax', 'jqPremium', 'syPremiumTax', 'syPremium', 'nonCarPremiumTax', 'nonCarPremium', 'maxReceivable', 'subsidyAmount', 'totalReceivableAmount']"
-        permsDelete="sys:user:delete" :showBatchDelete="true" :showBatchSettled="true" :showBatchPrint="true"
-        permsButton1="sys:user:edit" permsButton2="sys:user:edit" permsButton3="sys:user:edit" :data="pageResult"
-        :columns="columns" @findPage="findPage" keyName="id" settledName="批量修改" @handleSettled="handleTableSettled"
-        @handlePrint="handlePrint" @handleDelete="handleDelete" button1Name="修改" button1Background="#E6A23C"
-        @handleButton1="sourceUpdate" button1Icon="" button2Name="删除" button2Background="#F56C6C"
-        @handleButton2="sourceDelete" button2Icon="">
+        permsSettled="reconciliation:recPay:importAccountsReceivable:batchUpdate" permsDelete="reconciliation:recPay:importAccountsReceivable:batchDelete"
+        permsExcel="reconciliation:recPay:importAccountsReceivable:excel"
+        :showBatchDelete="true" :showBatchSettled="true" :showBatchPrint="true"
+        :data="pageResult" :columns="columns" @findPage="findPage" keyName="id" settledName="批量修改" deleteName="批量删除"
+        @handleSettled="handleTableSettled" @handlePrint="handlePrint" @handleDelete="handleDelete" button1Name="修改"
+        button1Background="#E6A23C" @handleButton1="sourceUpdate" button1Icon=""
+        permsButton1="reconciliation:recPay:importAccountsReceivable:update" button2Name="删除" button2Background="#F56C6C"
+        permsButton2="reconciliation:recPay:importAccountsReceivable:delete" @handleButton2="sourceDelete" button2Icon="">
       </kt-common-table>
     </el-main>
     <el-dialog title="信息修改" :visible.sync="dialogFormVisible" v-dialogDrag :close-on-click-modal="false" width="80%">
@@ -299,10 +304,12 @@
 </template>
 <script>
 import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
+import KtButton from "@/views/Core/KtButton";//按钮权限组件
 import CommonUtil from "@/utils/comutil.js";
 export default {
   components: {
     KtCommonTable,
+    KtButton
   },
   data() {
     return {

+ 195 - 116
src/views/Login.vue

@@ -5,44 +5,49 @@
         <div class="log_on">
           <div class="left_content"></div>
           <div class="right_content">
-            <img v-if="qrCode" class="img1" src="../assets//image/log_code.png" alt="" @click="qrCode=!qrCode">
-            <img  v-else class="img1" src="../assets//image/QR_code.png" alt="" @click="qrCode=!qrCode">
+            <img v-if="toggleQrCode" class="img1" src="../assets//image/log_code.png" alt=""
+              @click="toggleQrCode = !toggleQrCode">
+            <img v-else class="img1" src="../assets//image/QR_code.png" alt="" @click="toggleQrCode = !toggleQrCode">
             <div style="padding:15% 20% ">
-            <img  class="img2" src="../assets//image/logo_img.png" alt="" >
-            <div v-if="qrCode" style="text-align: center;">
-              <img class="img3" src="../assets//image/erweima.png" alt="">
-              <p class="code_word">打开<b>客户端APP</b>扫描二维码</p>
+              <img class="img2" src="../assets//image/logo_img.png" alt="">
+              <div v-show="toggleQrCode" style="text-align: center;">
+                <div class="img3" id="qrcode" ref="qrcode"></div>
+                <el-button icon="el-icon-refresh-right" size="small" style="margin-top: 10px;" @click="refresh">刷新二维码</el-button>
+                <p class="code_word">打开<b>客户端APP</b>扫描二维码</p>
+              </div>
+              <el-form v-show="!toggleQrCode" size="medium" :model="loginForm" :rules="fieldRules" ref="loginForm"
+                label-position="left" label-width="0">
+                <el-form-item prop="account" label="">
+                  <el-input type="text" prefix-icon="el-icon-user" v-model="loginForm.account" auto-complete="off"
+                    placeholder="账号"></el-input>
+                </el-form-item>
+                <el-form-item prop="password" label="">
+                  <el-input type="password" prefix-icon="el-icon-lock" v-model="loginForm.password" auto-complete="off"
+                    placeholder="密码"></el-input>
+                </el-form-item>
+                <el-row>
+                  <el-col :span="14">
+                    <el-form-item prop="captcha" label="">
+                      <el-input type="test" prefix-icon="el-icon-success" v-model="loginForm.captcha" auto-complete="off"
+                        placeholder="验证码">
+                      </el-input>
+                    </el-form-item>
+                  </el-col>
+                  <el-col class="line" :span="1">&nbsp;</el-col>
+                  <el-col :span="9">
+                    <img style="width: 100%;height: 32px;margin: 2px;" class="pointer" :src="loginForm.src"
+                      @click="refreshCaptcha">
+                  </el-col>
+                </el-row>
+                <el-row style="width:100%;margin-top: 15px;">
+                  <el-button size="medium" type="primary" plain style="width:48%;float: left;"
+                    @click.native.prevent="reset">重
+                    置</el-button>
+                  <el-button size="medium" type="primary" style="width:48%;float: right;" @click.native.prevent="login"
+                    :loading="loading">登 录</el-button>
+                </el-row>
+              </el-form>
             </div>
-            <el-form v-else size="medium"  :model="loginForm" :rules="fieldRules" ref="loginForm" label-position="left"
-                  label-width="0">
-                  <el-form-item prop="account" label="">
-                    <el-input type="text"  prefix-icon="el-icon-user" v-model="loginForm.account" auto-complete="off" placeholder="账号"></el-input>
-                  </el-form-item>
-                  <el-form-item prop="password" label="">
-                    <el-input type="password"  prefix-icon="el-icon-lock" v-model="loginForm.password" auto-complete="off"
-                      placeholder="密码"></el-input>
-                  </el-form-item>
-                  <el-row>
-                    <el-col :span="14">
-                      <el-form-item prop="captcha" label="">
-                        <el-input type="test"  prefix-icon="el-icon-success" v-model="loginForm.captcha" auto-complete="off" placeholder="验证码">
-                        </el-input>
-                      </el-form-item>
-                    </el-col>
-                    <el-col class="line" :span="1">&nbsp;</el-col>
-                    <el-col :span="9">
-                      <img style="width: 100%;height: 32px;margin: 2px;" class="pointer" :src="loginForm.src"
-                        @click="refreshCaptcha">
-                    </el-col>
-                  </el-row>
-                  <el-row style="width:100%;margin-top: 15px;">
-                    <el-button size="medium" type="primary" plain style="width:48%;float: left;" @click.native.prevent="reset">重
-                      置</el-button>
-                    <el-button size="medium" type="primary" style="width:48%;float: right;" @click.native.prevent="login"
-                      :loading="loading">登 录</el-button>
-                  </el-row>
-            </el-form>
-          </div>
           </div>
         </div>
         <div class="L_footer">
@@ -59,18 +64,22 @@
 <script>
 import { mapState } from 'vuex'
 import Cookies from "js-cookie"
+import QRCode from "qrcodejs2";
+import { md5 } from "@/utils/md5"
 import ThemePicker from "@/components/ThemePicker"
 import LangSelector from "@/components/LangSelector"
 import { login } from '@/api/user'
 
 export default {
   name: 'Login',
+  inject: ["reload"],
   components: {
     ThemePicker,
     LangSelector
   },
   data() {
     return {
+      qrcode: null,
       rememberPassword: false,
       loading: false,
       loginForm: {
@@ -91,10 +100,12 @@ export default {
         ]
       },
       checked: true,
-      qrCode:false
+      toggleQrCode: false,
+      uuid: '',
     }
   },
   created() {
+    this.generateQrCode();
     // 记住密码
     if (Cookies.get('accountInfo')) {
       const accountInfo = JSON.parse(Cookies.get('accountInfo'));
@@ -105,11 +116,41 @@ export default {
     this.enterEvent()//初始化回车事件
   },
   methods: {
+    refresh(){
+      this.generateQrCode();
+    },
+    generateQrCode() {
+      let randnum = new Date().getTime();
+      let uuid = md5(randnum)
+      let url = process.env.BASE_URL + '/scanQrCode?uuid=' + uuid;
+      this.$nextTick(() => {
+        this.creatQrCode(url)
+        this.$api.login.getQRCode(uuid).then((res) => {
+          this.uuid=res.data.uuid;
+        });
+      })
+    },
+    //生成二维码
+    creatQrCode(text) {
+      if (this.qrcode) {
+        this.qrcode.clear();
+        this.qrcode.makeCode(text);
+      } else {
+        this.qrcode = new QRCode("qrcode", {
+          text: text,
+          width: 200,
+          height: 200,
+          colorDark: "#000000",
+          colorLight: "#ffffff",
+          correctLevel: QRCode.CorrectLevel.H
+        });
+      }
+    },
     enterEvent() {
       if (this.$route.name === '登录') {
         document.onkeydown = (e) => {
           const url = e.target.baseURI.match(/login/)
-          if (e.keyCode==13 &&  url.includes('login')) {
+          if (e.keyCode == 13 && url.includes('login')) {
             this.login();
           }
         }
@@ -121,9 +162,9 @@ export default {
         account: this.loginForm.account,
         password: this.loginForm.password,
         captcha: this.loginForm.captcha.toLowerCase(),
-        captchaId:this.loginForm.captchaId
+        captchaId: this.loginForm.captchaId
       }
-            
+
       // this.$store.dispatch('login', userInfo)
       //     .then(() => {
       //       if (this.rememberPassword) { //是否保存密码
@@ -140,7 +181,7 @@ export default {
       //   .catch(() => {
       //     this.loading = false
       //   })
-    
+
       this.$api.login.login2(userInfo).then((res) => {
         if (res.code != 200) {
           this.$message({
@@ -148,12 +189,12 @@ export default {
             type: 'error',
             duration: 2000
           })
-         if(res.code==500&&res.msg=='验证码不正确'){
+          if (res.code == 500 && res.msg == '验证码不正确') {
             this.refreshCaptcha()
-            }
+          }
         }
         else {
-         
+
           if (this.rememberPassword) { //是否保存密码
             Cookies.set('accountInfo', { 'account': this.loginForm.account, 'password': this.loginForm.password, })
           } else {
@@ -163,23 +204,23 @@ export default {
           Cookies.set('user', userInfo.account) // 放置token到Cookie
           this.getDictItems()
           this.$api.user.getLoginUser().then((response) => {
-            if(response.code==200){
+            if (response.code == 200) {
               //头像地址拼接
-              if(response.data.headSculpture!=''&&response.data.headSculpture!=null&&response.data.headSculpture!=undefined){
-                response.data.headSculpture = process.env.BASE_URL +response.data.headSculpture
+              if (response.data.headSculpture != '' && response.data.headSculpture != null && response.data.headSculpture != undefined) {
+                response.data.headSculpture = process.env.BASE_URL + response.data.headSculpture
               }
-              localStorage.setItem('user_data', JSON.stringify(response.data)) 
+              localStorage.setItem('user_data', JSON.stringify(response.data))
             }
-            else{
+            else {
               this.$message.error(response.msg)
             }
           })
           this.$api.role.findAll().then((res) => {
-            localStorage.setItem('find_all', JSON.stringify(res.data)) 
+            localStorage.setItem('find_all', JSON.stringify(res.data))
           })
-          localStorage.setItem('routerId', '420') 
+          localStorage.setItem('routerId', '420')
           sessionStorage.setItem('user', userInfo.account) /
-          this.$store.commit('menuRouteLoaded', false) // 要求重新加载导航菜单
+            this.$store.commit('menuRouteLoaded', false) // 要求重新加载导航菜单
           this.$router.push('/') // 登录成功,跳转到主页
         }
         this.loading = false
@@ -199,26 +240,26 @@ export default {
         .then((response) => {
           localStorage.setItem('sexOptions', JSON.stringify(response.data)) // 保存用户到本地会话
         })
-        // 状态
-        this.$api.dict
+      // 状态
+      this.$api.dict
         .findByLableName('user_status')
         .then((response) => {
           localStorage.setItem('user_statusoptions', JSON.stringify(response.data)) // 保存用户到本地会话
         })
     },
     // 用户信息
-    getUser(){
+    getUser() {
       this.$api.user.getLoginUser().then((response) => {
-      if(response.code==200){
-        this.$store.commit("SET_USER", response.data)
-        localStorage.setItem('user_data', JSON.stringify(response.data)) // 保存用户到本地会话
-      }
-    })
+        if (response.code == 200) {
+          this.$store.commit("SET_USER", response.data)
+          localStorage.setItem('user_data', JSON.stringify(response.data)) // 保存用户到本地会话
+        }
+      })
     },
     refreshCaptcha() {
-      let randnum =Math.floor(Math.random() * (1000000 - 1 + 1) ) + 1
-      this.loginForm.src = process.env.BASE_URL + "/captchaById?t=" + new Date().getTime()+'&captchaId='+randnum;
-      this.loginForm.captchaId=randnum
+      let randnum = Math.floor(Math.random() * (1000000 - 1 + 1)) + 1
+      this.loginForm.src = process.env.BASE_URL + "/captchaById?t=" + new Date().getTime() + '&captchaId=' + randnum;
+      this.loginForm.captchaId = randnum
 
     },
     reset() {
@@ -256,6 +297,37 @@ export default {
   overflow: auto;
 }
 
+.ORcode {
+  width: 100%;
+  height: auto;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  padding: 30px;
+  box-sizing: border-box;
+
+  &>div {
+    width: 176px;
+    height: 176px;
+    border: 1px solid var(--themeColor);
+    border-radius: 5px;
+  }
+}
+
+#qrCode {
+  display: inline-block;
+  margin: 0 auto;
+  position: relative;
+  top: 15%;
+
+  img {
+    width: 200px;
+    height: 200px;
+    background-color: #fff;
+    padding: 6px;
+  }
+}
+
 #Login {
   width: 100%;
   height: 100%;
@@ -266,71 +338,78 @@ export default {
   display: flex;
   align-items: center;
   flex-direction: column;
-.log_on{
-  width: 70%;
-  height: 80%;
-  margin: 80px 0 30px 0;
-  .left_content{
-    float: left;
-    width: 50%;
-    height: 100%;
-    background: url(../assets/image/leftImg.png) ;
-    background-size: 100% 100%;
-  }
-  .right_content{
-    float: right;
-    width: 50%;
-    height: 100%;
-    position: relative;
-    // display: flex;
-    // align-items: center;
-    // flex-direction: column;
-    // background: url(../assets/image/QR_code.png) top right  no-repeat #fff;
-    background-color: #fff;
-    .img1{
-      position: absolute;
-      right: 0;
-    }
-    .img2{
-      margin-bottom: 50px;
-      display: block; 
-      margin-left: auto; 
-      margin-right: auto; 
-    }
-    .img3{
-      width: 200px;
-      height: 200px;
-      padding: 15px;
-      display: block; 
-      margin-left: auto; 
-      margin-right: auto; 
-      border: 1px solid #EAEDF1;
-    }
-    .el-form-item{
-      margin-bottom: 30px
+
+  .log_on {
+    width: 70%;
+    height: 80%;
+    margin: 80px 0 30px 0;
+
+    .left_content {
+      float: left;
+      width: 50%;
+      height: 100%;
+      background: url(../assets/image/leftImg.png);
+      background-size: 100% 100%;
     }
-    .code_word{
-      font-size: 16px;
-      font-weight: bold;
-      margin-top: 20px;
-      b{
-        color: #B20404;
+
+    .right_content {
+      float: right;
+      width: 50%;
+      height: 100%;
+      position: relative;
+      // display: flex;
+      // align-items: center;
+      // flex-direction: column;
+      // background: url(../assets/image/QR_code.png) top right  no-repeat #fff;
+      background-color: #fff;
+
+      .img1 {
+        position: absolute;
+        right: 0;
+      }
+
+      .img2 {
+        margin-bottom: 50px;
+        display: block;
+        margin-left: auto;
+        margin-right: auto;
+      }
+
+      .img3 {
+        width: 200px;
+        height: 200px;
+        padding: 15px;
+        display: block;
+        margin-left: auto;
+        margin-right: auto;
+        border: 1px solid #EAEDF1;
+      }
+
+      .el-form-item {
+        margin-bottom: 30px
+      }
+
+      .code_word {
+        font-size: 16px;
+        font-weight: bold;
+        margin-top: 20px;
+
+        b {
+          color: #B20404;
+        }
       }
     }
   }
-}
+
   .L_footer {
     height: 64px;
     bottom: 0;
     color: #EAEDF1;
     font-size: 12px;
+
     p {
       margin: 0;
     }
   }
 }
-
-
-
-
 </style>