瀏覽代碼

基础资料 审批 新加权限 收付款结算新加字段

Qukatie 11 月之前
父節點
當前提交
1af2acbfb6

+ 102 - 126
src/views/approval/businessApprovalL/index.vue

@@ -1,40 +1,17 @@
 <template>
   <basic-container>
-    <avue-crud :option="option"
-               :data="dataList"
-               ref="crud"
-               v-model="form"
-               :page.sync="page"
-               :search.sync="search"
-               :table-loading="loading"
-               @search-change="searchChange"
-               @search-reset="searchReset"
-               @selection-change="selectionChange"
-               @current-change="currentChange"
-               @size-change="sizeChange"
-               @row-update="rowUpdate"
-               @refresh-change="refreshChange"
-               @on-load="onLoad">
+    <avue-crud :option="option" :data="dataList" ref="crud" v-model="form" :page.sync="page" :search.sync="search"
+      :table-loading="loading" @search-change="searchChange" @search-reset="searchReset"
+      @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
+      @row-update="rowUpdate" @refresh-change="refreshChange" @on-load="onLoad">
       <template slot-scope="scope" slot="menu">
-        <el-button
-          type="text"
-          size="small"
-          @click.stop="rowCell(scope.row,scope.index)"
-        >{{ scope.row.$cellEdit ? '保存' : '修改' }}
+        <el-button type="text" size="small" :disabled="!roleName.includes('admin')"
+          @click.stop="rowCell(scope.row, scope.index)">{{ scope.row.$cellEdit ? '保存' : '修改' }}
         </el-button>
       </template>
       <template slot="pathId" slot-scope="{row,index}">
-        <el-select v-if="row.$cellEdit"
-                    v-model="row.pathId"
-                    size="small"
-                     placeholder="请选择"
-                     clearable
-                     filterable>
-          <el-option v-for="(item,index) in pathIdDic"
-                     :key="index"
-                     :label="item.pathName"
-                     :value="item.id"
-          ></el-option>
+        <el-select v-if="row.$cellEdit" v-model="row.pathId" size="small" placeholder="请选择" clearable filterable>
+          <el-option v-for="(item, index) in pathIdDic" :key="index" :label="item.pathName" :value="item.id"></el-option>
         </el-select>
         <span v-else>{{ row.pathName }}</span>
       </template>
@@ -43,110 +20,109 @@
 </template>
 
 <script>
-  import option from "./config/mainList.json";
-  import { getList,getBusinList,businModify } from "@/api/approvalL/processConfig";
+import option from "./config/mainList.json";
+import { getList, getBusinList, businModify } from "@/api/approvalL/processConfig";
 
-  export default {
-    data() {
-      return {
-        loading : false,
-        form: {},
-        search:{},
-        show:true,
-        detailData:{},
-        option: option,
-        parentId:0,
-        dataList: [],
-        pathIdDic:[],
-        page: {
-          pageSize: 10,
-          pagerCount: 5,
-          total: 0,
-        },
-        query:{},
-      }
-    },
-    created() {
-      getList().then(res =>{
-        this.pathIdDic  = res.data.data.records
-      })
-    },
-    mounted() {
+export default {
+  data() {
+    return {
+      roleName: localStorage.getItem("roleName"),
+      loading: false,
+      form: {},
+      search: {},
+      show: true,
+      detailData: {},
+      option: option,
+      parentId: 0,
+      dataList: [],
+      pathIdDic: [],
+      page: {
+        pageSize: 10,
+        pagerCount: 5,
+        total: 0,
+      },
+      query: {},
+    }
+  },
+  created() {
+    getList().then(res => {
+      this.pathIdDic = res.data.data.records
+    })
+  },
+  mounted() {
 
-    },
+  },
 
-    methods: {
-      //新单打开
-      addReceipt(row){
+  methods: {
+    //新单打开
+    addReceipt(row) {
 
-      },
-      //编辑打开
-      editOpen(row, status){
+    },
+    //编辑打开
+    editOpen(row, status) {
 
-      },
-      rowDel(row, index, done) {
+    },
+    rowDel(row, index, done) {
 
-      },
-      rowUpdate(row, index, done) {
-        done(row);
-      },
-      rowCell(row, index) {
-        if(row.$cellEdit){
-          let data = []
-          data.push(row)
-          businModify(data).then(res =>{
-            if(res.data.success){
-              this.$message.success("保存成功!")
-              this.onLoad(this.page, this.search);
-            }
-          })
-        }
-        this.$refs.crud.rowCell(row, index)
-      },
-      //点击搜索按钮触发
-      searchChange(params, done) {
-        this.query = params;
-        this.page.currentPage = 1;
-        this.onLoad(this.page, params);
-        done()
-      },
-      searchReset() {
-        console.log('1')
-      },
-      selectionChange() {
-        console.log('1')
-      },
-      currentChange() {
-        console.log('1')
-      },
-      sizeChange() {
-        console.log('1')
-      },
-      refreshChange() {
-        this.onLoad(this.page, this.search);
-      },
-      onLoad(page, params = {}) {
-        this.loading = true;
-        params = {
-          ...params,
-          current: page.currentPage,
-          size: page.pageSize,
-        }
-        getBusinList(params).then(res=>{
-          this.dataList = res.data.data.records
-          this.page.total = res.data.data.total
-        }).finally(()=>{
-          this.loading = false;
+    },
+    rowUpdate(row, index, done) {
+      done(row);
+    },
+    rowCell(row, index) {
+      if (row.$cellEdit) {
+        let data = []
+        data.push(row)
+        businModify(data).then(res => {
+          if (res.data.success) {
+            this.$message.success("保存成功!")
+            this.onLoad(this.page, this.search);
+          }
         })
-      },
-      goBack() {
-        this.detailData=this.$options.data().detailData
-        this.show = true;
       }
+      this.$refs.crud.rowCell(row, index)
+    },
+    //点击搜索按钮触发
+    searchChange(params, done) {
+      this.query = params;
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done()
+    },
+    searchReset() {
+      console.log('1')
+    },
+    selectionChange() {
+      console.log('1')
+    },
+    currentChange() {
+      console.log('1')
+    },
+    sizeChange() {
+      console.log('1')
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.search);
+    },
+    onLoad(page, params = {}) {
+      this.loading = true;
+      params = {
+        ...params,
+        current: page.currentPage,
+        size: page.pageSize,
+      }
+      getBusinList(params).then(res => {
+        this.dataList = res.data.data.records
+        this.page.total = res.data.data.total
+      }).finally(() => {
+        this.loading = false;
+      })
+    },
+    goBack() {
+      this.detailData = this.$options.data().detailData
+      this.show = true;
     }
   }
+}
 </script>
 
-<style scoped>
-
-</style>
+<style scoped></style>

+ 4 - 0
src/views/approval/processConfigL/index.vue

@@ -28,6 +28,7 @@
             icon="el-icon-plus"
             size="small"
             @click.stop="addHandle"
+            :disabled="!roleName.includes('admin')"
           >创建单据</el-button>
         </template>
         <template slot-scope="scope" slot="menu">
@@ -35,6 +36,7 @@
             type="text"
             icon="el-icon-edit"
             size="small"
+            :disabled="!roleName.includes('admin')"
             @click.stop="editOpen(scope.row)"
           >编辑
           </el-button>
@@ -42,6 +44,7 @@
             type="text"
             icon="el-icon-delete"
             size="small"
+            :disabled="!roleName.includes('admin')"
             @click.stop="rowDel(scope.row, scope.index)"
           >删除
           </el-button>
@@ -231,6 +234,7 @@ export default {
   name: "index",
   data() {
     return {
+      roleName: localStorage.getItem("roleName"),
       institutionList: [],
       option: {},
       dataList: [],

+ 42 - 52
src/views/tirePartsMall/basicData/accountManagement/detailsPage.vue

@@ -10,9 +10,11 @@
         <!--        <el-button class="el-button&#45;&#45;small-yh" style="margin-right: 10px" type="primary" size="small" v-if="!editButton"-->
         <!--                   @click="confirmEditing">编辑-->
         <!--        </el-button>-->
-        <el-button class="el-button--small-yh" type="primary" size="small" @click="editCustomer">保存数据
+        <el-button class="el-button--small-yh" type="primary" size="small" @click="editCustomer"
+          :disabled="!roleName.includes('admin')">保存数据
         </el-button>
-        <el-button class="el-button--small-yh" :type="form.enableOrNot == 0?'primary':''" size="small" @click="enableNot" v-if="form.id">
+        <el-button class="el-button--small-yh" :type="form.enableOrNot == 0 ? 'primary' : ''" size="small"
+          @click="enableNot" v-if="form.id" :disabled="!roleName.includes('admin')">
           {{ form.enableOrNot == 0 ? '启用' : '禁用' }}
         </el-button>
       </div>
@@ -21,58 +23,41 @@
       <trade-card title="基础信息">
         <avue-form class="trading-form" :option="optionForm" v-model="form" ref="form">
           <template slot="accountBalance">
-            <el-link type="primary" @click="accountBalanceClick(form.accountBalance)">{{ form.accountBalance }}</el-link>
+            <el-link type="primary" @click="accountBalanceClick(form.accountBalance)">{{ form.accountBalance
+              }}</el-link>
           </template>
         </avue-form>
       </trade-card>
     </div>
 
-    <el-dialog
-      title="提示"
-      :visible.sync="dialogVisible"
-      :modal-append-to-body="false"
-      width="80%">
+    <el-dialog title="提示" :visible.sync="dialogVisible" :modal-append-to-body="false" width="80%">
 
       <el-tabs v-model="activeName" @tab-click="handleClick">
         <el-tab-pane label="收款" name="collection">
-          <el-table
-            :data="collectionData"
-            stripe
-            style="width: 100%">
-            <el-table-column prop="sysNo" label="单号"/>
-            <el-table-column prop="corpId" label="客户"/>
-            <el-table-column prop="settlementDate" label="结算日期"/>
-            <el-table-column prop="amount" label="金额"/>
-            <el-table-column prop="financeStatus" label="类型"/>
+          <el-table :data="collectionData" stripe style="width: 100%">
+            <el-table-column prop="sysNo" label="单号" />
+            <el-table-column prop="corpId" label="客户" />
+            <el-table-column prop="settlementDate" label="结算日期" />
+            <el-table-column prop="amount" label="金额" />
+            <el-table-column prop="financeStatus" label="类型" />
           </el-table>
-          <el-pagination
-            @size-change="collectionSizeChange"
-            @current-change="handleCurrentChange"
-            :current-page="collectionPagination.current"
-            :page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400]"
-            :page-size="collectionPagination.size"
-            layout="total, sizes, prev, pager, next, jumper"
+          <el-pagination @size-change="collectionSizeChange" @current-change="handleCurrentChange"
+            :current-page="collectionPagination.current" :page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400]"
+            :page-size="collectionPagination.size" layout="total, sizes, prev, pager, next, jumper"
             :total="collectionPagination.total">
           </el-pagination>
         </el-tab-pane>
         <el-tab-pane label="付款" name="payment">
-          <el-table
-            :data="paymentData"
-            stripe
-            style="width: 100%">
-            <el-table-column prop="sysNo" label="单号"/>
-            <el-table-column prop="corpId" label="供应商"/>
-            <el-table-column prop="settlementDate" label="结算日期"/>
-            <el-table-column prop="amount" label="金额"/>
-            <el-table-column prop="financeStatus" label="类型"/>
+          <el-table :data="paymentData" stripe style="width: 100%">
+            <el-table-column prop="sysNo" label="单号" />
+            <el-table-column prop="corpId" label="供应商" />
+            <el-table-column prop="settlementDate" label="结算日期" />
+            <el-table-column prop="amount" label="金额" />
+            <el-table-column prop="financeStatus" label="类型" />
           </el-table>
-          <el-pagination
-            @size-change="handleSizeChange"
-            @current-change="handleCurrentChange"
-            :current-page="paymentPagination.current"
-            :page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400]"
-            :page-size="paymentPagination.size"
-            layout="total, sizes, prev, pager, next, jumper"
+          <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+            :current-page="paymentPagination.current" :page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400]"
+            :page-size="paymentPagination.size" layout="total, sizes, prev, pager, next, jumper"
             :total="paymentPagination.total">
           </el-pagination>
         </el-tab-pane>
@@ -97,6 +82,7 @@ export default {
   name: "detailsPage",
   data() {
     return {
+      roleName: localStorage.getItem("roleName"),
       activeName: 'collection',
       khCorpList: [],
       gysCorpList: [],
@@ -147,7 +133,7 @@ export default {
           label: '公司名称',
           prop: "corporateName",
           type: 'select',
-            disabled: true,
+          disabled: true,
           dicUrl: "/api/blade-system/dept/lazy-list?parentId=",
           props: {
             label: "deptName",
@@ -193,11 +179,11 @@ export default {
   async created() {
     if (this.onLoad.id) {
       this.queryData(this.onLoad.id)
-    }else {
-        getUser(JSON.parse(localStorage.getItem('saber-userInfo')).content.user_id).then(res=>{
-            this.form.corporateName = res.data.data.deptName
-            this.form.corporateId = res.data.data.deptId
-        })
+    } else {
+      getUser(JSON.parse(localStorage.getItem('saber-userInfo')).content.user_id).then(res => {
+        this.form.corporateName = res.data.data.deptName
+        this.form.corporateId = res.data.data.deptId
+      })
     }
   },
   methods: {
@@ -236,7 +222,7 @@ export default {
       }
     },
     accountBalanceClick() {
-      corpsDescListAll({corpType: 'KH', enableOrNot: 1}).then(res => {
+      corpsDescListAll({ corpType: 'KH', enableOrNot: 1 }).then(res => {
         this.khCorpList = res.data.data
 
         this.activeName = 'collection'
@@ -263,7 +249,7 @@ export default {
         })
       })
 
-      corpsDescListAll({corpType: 'GYS', enableOrNot: 1}).then(res => {
+      corpsDescListAll({ corpType: 'GYS', enableOrNot: 1 }).then(res => {
         this.gysCorpList = res.data.data
       })
     },
@@ -334,10 +320,14 @@ export default {
       })
       detail({ id }).then(res => {
         this.form = res.data.data;
-        if (this.form.enableOrNot == 1) {
-            this.$set(this.optionForm,'disabled',true)
-        }else {
-            this.$set(this.optionForm,'disabled',false)
+        if (this.roleName.includes('admin')) {
+          if (this.form.enableOrNot == 1) {
+            this.$set(this.optionForm, 'disabled', true)
+          } else {
+            this.$set(this.optionForm, 'disabled', false)
+          }
+        }else{
+          this.$set(this.optionForm, 'disabled', true)
         }
         loading.close()
       }).finally(() => {

+ 9 - 5
src/views/tirePartsMall/basicData/accountManagement/index.vue

@@ -12,7 +12,8 @@
         </template>
         <template slot-scope="{type,size,row,index}" slot="menu">
           <el-button :size="size" :type="type" @click="check(row)">查看</el-button>
-          <el-button :size="size" :type="type" :disabled="row.enableOrNot" @click="$refs.crud.rowDel(row, index)">删除
+          <el-button :size="size" :type="type" :disabled="row.enableOrNot || !roleName.includes('admin')"
+            @click="$refs.crud.rowDel(row, index)">删除
           </el-button>
         </template>
         <template slot="status" slot-scope="{row,index,disabled}">
@@ -29,8 +30,10 @@
           <crop-select v-model="search.bookingAgentId" corpType="KH" :refresh="false"></crop-select>
         </template>
         <template slot-scope="{type,size,row,$index}" slot="menuLeft">
-          <el-button icon="el-icon-plus" type="primary" :size="size" @click="detailsOpen = true">新增</el-button>
-          <el-button type="primary" size="small" icon="el-icon-bottom" @click="excelBox = true">导入</el-button>
+          <el-button icon="el-icon-plus" type="primary" :size="size" @click="detailsOpen = true"
+            :disabled="!roleName.includes('admin')">新增</el-button>
+          <el-button type="primary" size="small" icon="el-icon-bottom" @click="excelBox = true"
+            :disabled="!roleName.includes('admin')">导入</el-button>
         </template>
       </avue-crud>
     </basic-container>
@@ -64,6 +67,7 @@ export default {
   },
   data() {
     return {
+      roleName: localStorage.getItem("roleName"),
       excelBox: false,
       excelForm: {},
       excelOption: {
@@ -154,7 +158,7 @@ export default {
           prop: "currency",
           search: true,
           overHidden: true,
-          type:"select",
+          type: "select",
           dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
           props: {
             label: "dictValue",
@@ -245,7 +249,7 @@ export default {
       });
     },
     searchChange(params, done) {
-        this.page.currentPage = 1
+      this.page.currentPage = 1
       done();
       this.onLoad(this.page, params)
     },

+ 12 - 12
src/views/tirePartsMall/basicData/brandPage/detailsPage.vue

@@ -10,10 +10,10 @@
         <!--        <el-button class="el-button&#45;&#45;small-yh" style="margin-right: 10px" type="primary" size="small" v-if="!editButton"-->
         <!--                   @click="confirmEditing">编辑-->
         <!--        </el-button>-->
-        <el-button class="el-button--small-yh" type="primary" size="small" @click="editCustomer">保存数据
+        <el-button class="el-button--small-yh" type="primary" size="small" @click="editCustomer" :disabled="!roleName.includes('admin')">保存数据
         </el-button>
         <el-button class="el-button--small-yh" :type="form.enableOrNot == 0 ? 'primary' : ''" size="small"
-          @click="enableNot" v-if="form.id">
+          @click="enableNot" v-if="form.id" :disabled="!roleName.includes('admin')">
           {{ form.enableOrNot == 0 ? '启用' : '禁用' }}
         </el-button>
       </div>
@@ -22,13 +22,8 @@
       <trade-card title="基础信息">
         <avue-form :option="optionForm" v-model="form" ref="form"></avue-form>
       </trade-card>
-      <trade-card :title="titleType==1?'规格型号1附件信息':'花纹附件信息'">
-        <c-upload basic :data="form.brandFigureList" :disabled="disabled"
-          deleteUrl="/api/blade-sales-part/brandfigure/remove" :enumerationValue="338" display />
-        <!-- <span style="font-size: 12px;">(图片文件像素推荐700X750,有且只允许有一张主图,其余均为副图)</span> -->
-      </trade-card>
       <trade-card title="附件信息">
-        <c-upload basic :data="form.brandFilesList" :disabled="disabled"
+        <c-upload basic :data="form.brandFilesList" :disabled="disabled||!roleName.includes('admin')"
           deleteUrl="/api/blade-sales-part/brandfiles/remove" :enumerationValue="272.1" display />
         <!-- <span style="font-size: 12px;">(图片文件像素推荐700X750,有且只允许有一张主图,其余均为副图)</span> -->
       </trade-card>
@@ -45,6 +40,7 @@ export default {
   name: "detailsPage",
   data() {
     return {
+      roleName: localStorage.getItem("roleName"),
       disabled: false,
       form: {
         brandFilesList: [],
@@ -109,10 +105,14 @@ export default {
       })
       getDetails({ id: id }).then(res => {
         this.form = res.data.data
-        if (this.form.enableOrNot == 1) {
+        if (this.roleName.includes('admin')) {
+          if (this.form.enableOrNot == 1) {
+            this.$set(this.optionForm, 'disabled', true)
+          } else {
+            this.$set(this.optionForm, 'disabled', false)
+          }
+        }else{
           this.$set(this.optionForm, 'disabled', true)
-        } else {
-          this.$set(this.optionForm, 'disabled', false)
         }
         loading.close();
       }).catch(() => {
@@ -216,7 +216,7 @@ export default {
     backToList(type) {
       this.$emit("backToList", type);
     }
-  }
+  },
 }
 </script>
 

+ 3 - 2
src/views/tirePartsMall/basicData/brandPage/index.vue

@@ -22,7 +22,7 @@
         </template>
         <template slot-scope="{type,size,row,index}" slot="menu">
           <!-- <el-button :size="size" :type="type" @click="check(row)">查看</el-button> -->
-          <el-button :size="size" :type="type" :disabled="row.enableOrNot" @click="$refs.crud.rowDel(row,index)">删除
+          <el-button :size="size" :type="type" :disabled="row.enableOrNot||!roleName.includes('admin')" @click="$refs.crud.rowDel(row,index)">删除
           </el-button>
         </template>
         <template slot-scope="{ row, index }" slot="cname">
@@ -32,7 +32,7 @@
           <crop-select v-model="search.corpId" corpType="KH" :refresh="false"></crop-select>
         </template>
         <template slot-scope="{type,size,row,$index}" slot="menuLeft">
-          <el-button icon="el-icon-plus" type="primary" :size="size" @click="detailsOpen = true">新增</el-button>
+          <el-button icon="el-icon-plus" type="primary" :size="size" @click="detailsOpen = true"  :disabled="!roleName.includes('admin')">新增</el-button>
         </template>
       </avue-crud>
     </basic-container>
@@ -52,6 +52,7 @@ export default {
   },
   data() {
     return {
+      roleName: localStorage.getItem("roleName"),
       detailsOpen: false,
       loading: false,
       search: {},

+ 31 - 19
src/views/tirePartsMall/basicData/commodityInformation/detailsPage.vue

@@ -9,13 +9,16 @@
                     </el-button>
                 </div>
                 <div class="add-customer-btn">
-                    <el-button v-if="form.enableOrNot == 0" size="small" @click="disabled(1)">
+                    <el-button v-if="form.enableOrNot == 0" size="small" @click="disabled(1)"
+                        :disabled="!roleName.includes('admin')">
                         启用
                     </el-button>
-                    <el-button v-if="form.enableOrNot == 1" size="small" @click="disabled(0)">
+                    <el-button v-if="form.enableOrNot == 1" size="small" @click="disabled(0)"
+                        :disabled="!roleName.includes('admin')">
                         禁用
                     </el-button>
-                    <el-button type="primary" size="small" @click="editCustomer">
+                    <el-button type="primary" size="small" @click="editCustomer"
+                        :disabled="!roleName.includes('admin')">
                         保存数据
                     </el-button>
                 </div>
@@ -24,32 +27,33 @@
                 <avue-form ref="form" class="trading-form" v-model="form" :option="option" :key="key">
                     <template slot="goodsTypeId" slot-scope="{disabled}">
                         <div style="display:flex;">
-                            <avue-cascader :disabled="disabled" :emit-path="false" check-strictly
-                                :show-all-levels="false" v-model="form.goodsTypeId" placeholder="请选择产品分类"
+                            <avue-cascader :disabled="disabled || !roleName.includes('admin')" :emit-path="false"
+                                check-strictly :show-all-levels="false" v-model="form.goodsTypeId" placeholder="请选择产品分类"
                                 :dic="goodsTypeList" :props="props"></avue-cascader>
-                            <i class="el-icon-circle-plus-outline"
+                            <i class="el-icon-circle-plus-outline" v-if="roleName.includes('admin')"
                                 style="font-size:18px;line-height: 32px;margin-left:4px"
                                 @click="goodsTypeVisible = true"></i>
                         </div>
                     </template>
                     <template slot="unit" slot-scope="{disabled}">
                         <div style="display:flex;">
-                            <avue-select :disabled="disabled" v-model="form.unit" filterable placeholder="请选择单位"
-                                :dic="unitList" :props="props2"></avue-select>
-                            <i class="el-icon-circle-plus-outline"
+                            <avue-select :disabled="disabled || !roleName.includes('admin')" v-model="form.unit"
+                                filterable placeholder="请选择单位" :dic="unitList" :props="props2"></avue-select>
+                            <i class="el-icon-circle-plus-outline" v-if="roleName.includes('admin')"
                                 style="font-size:18px;line-height: 32px;margin-left:4px"
                                 @click="$refs.dictbiz.open()"></i>
                         </div>
                     </template>
                     <template slot="whether" slot-scope="{disabled}">
                         <!--<el-switch v-model="form.whether" active-text="是" inactive-text="否" active-value="1" inactive-value="0" @change="whetherChange"/>-->
-                        <el-switch v-model="form.whether" :disabled="disabled || isWhether" active-text="是"
+                        <el-switch v-model="form.whether"
+                            :disabled="disabled || isWhether || !roleName.includes('admin')" active-text="是"
                             inactive-text="否" active-value="1" inactive-value="0" />
                     </template>
                     <template slot="whetherIntegral" slot-scope="{disabled}">
                         <!--<el-switch v-model="form.whetherIntegral" active-text="是" inactive-text="否" active-value="1" inactive-value="0" @change="whetherChange"/>-->
-                        <el-switch v-model="form.whetherIntegral" :disabled="disabled" active-text="是" inactive-text="否"
-                            active-value="1" inactive-value="0" />
+                        <el-switch v-model="form.whetherIntegral" :disabled="disabled || !roleName.includes('admin')"
+                            active-text="是" inactive-text="否" active-value="1" inactive-value="0" />
                     </template>
 
                     <template slot="explosionProof" slot-scope="{disabled}">
@@ -57,26 +61,26 @@
                         <!--    active-value="1" inactive-value="0" />-->
                         <!--<el-radio v-model="form.explosionProof"></el-radio>-->
                         <el-checkbox v-model="form.explosionProof" :checked="form.explosionProof == 1" :true-label="1"
-                            :false-label="0"></el-checkbox>
+                            :disabled="!roleName.includes('admin')" :false-label="0"></el-checkbox>
                     </template>
 
                     <template slot="originalFactory" slot-scope="{disabled}">
                         <!--<el-switch v-model="form.originalFactory" :disabled="disabled" active-text="是" inactive-text="否"-->
                         <!--           active-value="1" inactive-value="0" />-->
                         <el-checkbox v-model="form.originalFactory" :checked="form.originalFactory == 1" :true-label="1"
-                            :false-label="0"></el-checkbox>
+                            :disabled="!roleName.includes('admin')" :false-label="0"></el-checkbox>
                     </template>
                     <template slot="selfRecovery" slot-scope="{disabled}">
                         <!--<el-switch v-model="form.selfRecovery" :disabled="disabled" active-text="是" inactive-text="否"-->
                         <!--           active-value="1" inactive-value="0" />-->
                         <el-checkbox v-model="form.selfRecovery" :checked="form.selfRecovery == 1" :true-label="1"
-                            :false-label="0"></el-checkbox>
+                            :disabled="!roleName.includes('admin')" :false-label="0"></el-checkbox>
                     </template>
                 </avue-form>
             </trade-card>
             <containerTitle title="附件信息"></containerTitle>
             <c-upload :data="filesList" display deleteUrl="/api/blade-sales-part/goodsfiles/remove"
-                :enumerationValue="160.1" />
+                :disabled="!roleName.includes('admin')" :enumerationValue="160.1" />
             <el-dialog title="设置产品分类" v-dialogDrag :visible.sync="goodsTypeVisible" class="avue-dialog" width="80%"
                 append-to-body @closed="goodsTypeClosed">
                 <span>
@@ -133,6 +137,7 @@ export default {
     name: "index",
     data() {
         return {
+            roleName: localStorage.getItem("roleName"),
             loadingBtn: false,
             goodsTypeVisible: false,
             storageVisible: false,
@@ -802,15 +807,22 @@ export default {
                     }
                     this.isWhether = false
                 }
-                if (this.form.enableOrNot == 0) {
-                    for (let item of this.option.column) {
-                        this.$set(item, 'disabled', false)
+                if (this.roleName.includes('admin')) {
+                    if (this.form.enableOrNot == 0) {
+                        for (let item of this.option.column) {
+                            this.$set(item, 'disabled', false)
+                        }
+                    } else {
+                        for (let item of this.option.column) {
+                            this.$set(item, 'disabled', true)
+                        }
                     }
                 } else {
                     for (let item of this.option.column) {
                         this.$set(item, 'disabled', true)
                     }
                 }
+
                 this.key++
             }).finally(() => {
                 this.loadingBtn = false;

+ 6 - 5
src/views/tirePartsMall/basicData/commodityInformation/index.vue

@@ -18,13 +18,13 @@
             @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
             @resetColumn="resetColumn" :cell-style="cellStyle" @search-criteria-switch="searchCriteriaSwitch">
             <template slot="menuLeft">
-              <el-button type="primary" size="mini" @click.stop="newAdd()">新建产品
+              <el-button type="primary" size="mini" @click.stop="newAdd()" :disabled="!roleName.includes('admin')">新建产品
               </el-button>
-              <el-button type="primary" size="mini" icon="el-icon-bottom" @click="excelBox = true">导入
+              <el-button type="primary" size="mini" icon="el-icon-bottom" @click="excelBox = true" :disabled="!roleName.includes('admin')">导入
               </el-button>
-              <el-button type="primary" size="mini" icon="el-icon-top" @click="outExport">导出
+              <el-button type="primary" size="mini" icon="el-icon-top" @click="outExport" :disabled="!roleName.includes('admin')">导出
               </el-button>
-              <el-button type="primary" size="mini" icon="el-icon-top" @click="synchronization">同步商品信息
+              <el-button type="primary" size="mini" icon="el-icon-top" @click="synchronization" :disabled="!roleName.includes('admin')">同步商品信息
               </el-button>
             </template>
             <template slot="enableOrNot" slot-scope="{row,index,disabled}">
@@ -63,7 +63,7 @@
             删除
           </el-button> -->
               <el-button type="text" size="small" @click.stop="rowDel(row, index)" v-if="row.status != 0"
-                :disabled="row.enableOrNot">
+                :disabled="row.enableOrNot||!roleName.includes('admin')">
                 删除
               </el-button>
             </template>
@@ -113,6 +113,7 @@ export default {
   name: "index",
   data() {
     return {
+      roleName: localStorage.getItem("roleName"),
       goodsTypeVisible: false,
       src: '',
       key: 0,

+ 44 - 25
src/views/tirePartsMall/basicData/customerInformation/detailsPage.vue

@@ -8,11 +8,11 @@
           </el-button>
         </div>
         <div class="add-customer-btn">
-          <el-button type="primary" size="small" @click="editCustomer">
+          <el-button type="primary" size="small" @click="editCustomer" :disabled="!roleName.includes('admin')">
             保存数据
           </el-button>
-          <el-button class="el-button--small-yh" :type="form.enableOrNot == 0 ? 'primary' : ''" size="small" v-if="form.id"
-            @click="editEnable">
+          <el-button class="el-button--small-yh" :type="form.enableOrNot == 0 ? 'primary' : ''" size="small"
+            v-if="form.id" @click="editEnable" :disabled="!roleName.includes('admin')">
             {{ form.enableOrNot == 0 ? '启用' : '禁用' }}
           </el-button>
         </div>
@@ -21,11 +21,11 @@
         <avue-form ref="form" class="trading-form" v-model="form" :option="option">
           <template slot="corpsTypeId">
             <div style="display:flex;">
-              <avue-input-tree v-model="form.corpsTypeId" :disabled="option.disabled" placeholder="请选择客户分类"
-                :dic="corpTypeList" :props="props">
+              <avue-input-tree v-model="form.corpsTypeId" :disabled="option.disabled || !roleName.includes('admin')"
+                placeholder="请选择客户分类" :dic="corpTypeList" :props="props">
               </avue-input-tree>
               <i class="el-icon-circle-plus-outline" style="font-size:18px;line-height: 32px;margin-left:4px"
-                @click="corpTypeVisible = true"></i>
+                @click="corpTypeVisible = true" v-if="roleName.includes('admin')"></i>
             </div>
           </template>
           <!--<template slot="brandDesc">-->
@@ -36,18 +36,19 @@
           <!--</template>-->
           <template slot="deliveryWarehouseId">
             <div style="display:flex;">
-              <avue-input-tree v-model="form.deliveryWarehouseId" :disabled="option.disabled" placeholder="请选择发货仓库"
-                :dic="corpTypeListCk" :props="propsCk">
+              <avue-input-tree v-model="form.deliveryWarehouseId"
+                :disabled="option.disabled || !roleName.includes('admin')" placeholder="请选择发货仓库" :dic="corpTypeListCk"
+                :props="propsCk">
               </avue-input-tree>
               <i class="el-icon-circle-plus-outline" style="font-size:18px;line-height: 32px;margin-left:4px"
-                @click="dialogVisibleCK = true"></i>
+                @click="dialogVisibleCK = true" v-if="roleName.includes('admin')"></i>
             </div>
           </template>
           <template slot="limitAmount">
             <div style="display:flex;">
               <el-input v-model="form.limitAmount" disabled size="small" placeholder="请输入额度"></el-input>
               <i class="el-icon-circle-plus-outline" style="font-size:18px;line-height: 32px;margin-left:4px"
-                @click="limitPopupfun"></i>
+                @click="limitPopupfun" v-if="roleName.includes('admin')"></i>
             </div>
           </template>
         </avue-form>
@@ -55,32 +56,33 @@
       <trade-card title="客户联系人" v-loading="loadingBtn">
         <avue-crud ref="crudTwo" :option="customerContact" v-model="contactsForm" :data="contactsData"
           @saveColumn="saveColumnTwo" @resetColumn="resetColumnTwo" @row-save="rowSave" @row-update="rowUpdate"
-          @row-del="rowDelTwo">
+          @row-del="rowDelTwo" :permission="permission">
           <template slot-scope="{ type, size, row, disabled,index}" slot="menu">
-            <el-button :size="size" :disabled="disabled" :type="type"
+            <el-button :size="size" :disabled="disabled || !roleName.includes('admin')" :type="type"
               :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="$refs.crudTwo.rowEdit(row, index)">{{
                 row.$cellEdit ? '确认' : '修改' }}
             </el-button>
-            <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
-              @click="rowDelTwo(row, index)">删除
+            <el-button icon="el-icon-delete" :size="size" :disabled="disabled || !roleName.includes('admin')"
+              :type="type" @click="rowDelTwo(row, index)">删除
             </el-button>
-            <el-button icon="el-icon-check" :size="size" :type="type" @click="creatingUsers(row)">创建用户</el-button>
+            <el-button icon="el-icon-check" :size="size" :type="type" @click="creatingUsers(row)"
+              :disabled="!roleName.includes('admin')">创建用户</el-button>
           </template>
         </avue-crud>
       </trade-card>
       <trade-card title="地址信息" v-loading="loadingBtn">
         <avue-crud :option="option2" ref="crud" :data="data" @row-save="rowSave" @row-update="rowUpdate"
-          @saveColumn="saveColumn" @resetColumn="resetColumn">
+          @saveColumn="saveColumn" @resetColumn="resetColumn" :permission="permission">
           <template slot="headerSerial">
             <el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow"
-              :disabled="detailData.status == 1" circle></el-button>
+              :disabled="detailData.status == 1||!roleName.includes('admin')" circle></el-button>
           </template>
           <!-- <template slot="menuLeft">
                     <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="addRows">录入明细
                     </el-button>
                 </template> -->
           <template slot="menuLeft">
-            <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="addRow">录入明细
+            <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="addRow" :disabled="!roleName.includes('admin')">录入明细
             </el-button>
           </template>
           <template v-if="!row.$cellEdit" slot-scope="{type,size,row,index,disabled}" slot="menu">
@@ -105,7 +107,7 @@
       </trade-card>
       <containerTitle title="上传附件"></containerTitle>
       <c-upload v-loading="loadingBtn" typeUpload="CD" deleteUrl="/api/blade-sales-part/corpsfiles/remove"
-        :data="corpsFiles" display :enumerationValue="35.1" :disabled="detailData.status == 1"></c-upload>
+        :data="corpsFiles" display :enumerationValue="35.1" :disabled="detailData.status == 1||!roleName.includes('admin')"></c-upload>
       <el-dialog title="设置客户分类" v-dialogDrag :visible.sync="corpTypeVisible" class="avue-dialog" width="80%"
         append-to-body @closed="corpTypeClosed">
         <span>
@@ -137,7 +139,8 @@
       </span>
     </el-dialog>
     <el-dialog title="额度修改记录" :visible.sync="dialogVisibleED" append-to-body width="60%">
-      <limitrecord ref="limitrecord" :amountOld="form.limitAmount" :pid="form.id" @closefun="cancellationEDfun"></limitrecord>
+      <limitrecord ref="limitrecord" :amountOld="form.limitAmount" :pid="form.id" @closefun="cancellationEDfun">
+      </limitrecord>
       <span slot="footer" class="dialog-footer">
         <el-button @click="cancellationEDfun">取 消</el-button>
         <el-button type="primary" @click="limitrecordSubmitfun">确 定</el-button>
@@ -175,6 +178,8 @@ export default {
   name: "index",
   data() {
     return {
+      roleName: localStorage.getItem("roleName"),
+      permission: {},
       propsCk: {
         label: 'cname',
         value: 'id'
@@ -525,7 +530,7 @@ export default {
             type: "number",
             controls: false,
             precision: 2,
-            disabled:true,
+            disabled: true,
           },
           {
             label: "品牌",
@@ -679,7 +684,17 @@ export default {
     this.getAllWorkDicts()
     this.getCorpTypeCk()
     this.userObj = JSON.parse(localStorage.getItem("saber-userInfo")).content;
-
+    if (!this.roleName.includes('admin')) {
+      this.permission = {
+        addRowBtn: false,
+        menu: false,
+      }
+    } else {
+      this.permission = {
+        addRowBtn: true,
+        menu: true,
+      }
+    }
   },
   activated() {
 
@@ -850,10 +865,14 @@ export default {
       getDetails({ id: id })
         .then(res => {
           this.form = res.data.data;
-          if (this.form.enableOrNot == 1) {
-            this.$set(this.option, 'disabled', true)
+          if (this.roleName.includes('admin')) {
+            if (this.form.enableOrNot == 1) {
+              this.$set(this.optionForm, 'disabled', true)
+            } else {
+              this.$set(this.optionForm, 'disabled', false)
+            }
           } else {
-            this.$set(this.option, 'disabled', false)
+            this.$set(this.optionForm, 'disabled', true)
           }
           if (this.form.brandId == null || this.form.brandId === "") {
             this.form.brandId = "";

+ 8 - 7
src/views/tirePartsMall/basicData/customerInformation/index.vue

@@ -19,13 +19,13 @@
             @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
             @resetColumn="resetColumn" :cell-style="cellStyle" @search-criteria-switch="searchCriteriaSwitch">
             <template slot="menuLeft">
-              <el-button type="primary" size="mini" @click.stop="newAdd()">新建客户
+              <el-button type="primary" size="mini" @click.stop="newAdd()" :disabled="!roleName.includes('admin')">新建客户
               </el-button>
-              <el-button type="primary" size="mini" icon="el-icon-bottom" @click="excelBox = true">导入
+              <el-button type="primary" size="mini" icon="el-icon-bottom" @click="excelBox = true" :disabled="!roleName.includes('admin')">导入
               </el-button>
-              <el-button type="primary" size="mini" icon="el-icon-top" @click="outExport">导出
+              <el-button type="primary" size="mini" icon="el-icon-top" @click="outExport" :disabled="!roleName.includes('admin')">导出
               </el-button>
-                <el-button type="primary" size="mini" icon="el-icon-download" @click="brandBox = true">Excel更新品牌
+                <el-button type="primary" size="mini" icon="el-icon-download" @click="brandBox = true" :disabled="!roleName.includes('admin')">Excel更新品牌
                 </el-button>
             </template>
             <template slot="enableOrNot" slot-scope="{row,index,disabled}">
@@ -46,9 +46,9 @@
             </template>
             <template slot-scope="{type,size, row, index }" slot="menu">
               <!-- <el-button :size="size" :type="type" :disabled="!row.enableOrNot" @click="editOpen(row, 2)">编辑</el-button> -->
-                <el-button v-if="row.checkStatus == '提交' || row.checkStatus == '驳回'" :size="size" :type="type"  @click.stop="passThrough(row,'通过')">通过</el-button>
-                <el-button v-if="row.checkStatus == '提交' || row.checkStatus == '通过'" :size="size" :type="type"  @click.stop="passThrough(row,'驳回')">驳回</el-button>
-                <el-button :size="size" :type="type" :disabled="row.enableOrNot||!roleName.includes('基础资料')" @click.stop="rowDel(row)">删除</el-button>
+                <el-button v-if="row.checkStatus == '提交' || row.checkStatus == '驳回'" :size="size" :type="type"  @click.stop="passThrough(row,'通过')" :disabled="!roleName.includes('admin')">通过</el-button>
+                <el-button v-if="row.checkStatus == '提交' || row.checkStatus == '通过'" :size="size" :type="type"  @click.stop="passThrough(row,'驳回')" :disabled="!roleName.includes('admin')">驳回</el-button>
+                <el-button :size="size" :type="type" :disabled="row.enableOrNot||!roleName.includes('基础资料')||!roleName.includes('admin')" @click.stop="rowDel(row)" >删除</el-button>
             </template>
             <!-- <template slot="deliveryWarehouseName">
               <el-select v-model="search.deliveryWarehouseName" filterable clearable size="small" :disabled="disabled">
@@ -127,6 +127,7 @@ export default {
   name: "index",
   data() {
     return {
+      roleName: localStorage.getItem("roleName"),
       corpTypeVisible: false,
       excelForm: {},
       brandExcelForm: {},

+ 31 - 11
src/views/tirePartsMall/basicData/supplier/detailsPage.vue

@@ -10,10 +10,12 @@
         <!--        <el-button class="el-button&#45;&#45;small-yh" style="margin-right: 10px" type="primary" size="small" v-if="!editButton"-->
         <!--                   @click="confirmEditing">编辑-->
         <!--        </el-button>-->
-        <el-button class="el-button--small-yh" type="primary" size="small" @click="editCustomer">保存数据
+        <el-button class="el-button--small-yh" type="primary" size="small" @click="editCustomer"
+          :disabled="!roleName.includes('admin')">保存数据
         </el-button>
 
-        <el-button class="el-button--small-yh" :type="form.enableOrNot == 0?'primary':''" size="small" v-if="form.id" @click="editEnable">
+        <el-button class="el-button--small-yh" :type="form.enableOrNot == 0 ? 'primary' : ''" size="small"
+          v-if="form.id" @click="editEnable" :disabled="!roleName.includes('admin')">
           {{ form.enableOrNot == 0 ? '启用' : '禁用' }}
         </el-button>
       </div>
@@ -23,7 +25,8 @@
         <avue-form :option="optionForm" v-model="form" ref="form">
           <template slot="corpsTypeId" slot-scope="{ row }">
             <div style="display:flex;">
-              <avue-input-tree v-model="form.corpsTypeId" :disabled="optionForm.disabled" placeholder="请选择供货商分类" :dic="corpTypeList" :props="props">
+              <avue-input-tree v-model="form.corpsTypeId" :disabled="optionForm.disabled||!roleName.includes('admin')" placeholder="请选择供货商分类"
+                :dic="corpTypeList" :props="props">
               </avue-input-tree>
               <i class="el-icon-circle-plus-outline" style="font-size:18px;line-height: 32px;margin-left:4px"
                 @click="corpTypeVisible = true"></i>
@@ -33,7 +36,7 @@
       </trade-card>
       <trade-card title="联系人信息">
         <avue-crud :option="optionContacts" v-model="formContacts" ref="formContacts" :data="form.corpsAttnList"
-          @row-save="rowSave" @row-update="rowUpdate"
+          @row-save="rowSave" @row-update="rowUpdate" :permission="permission"
           @resetColumn="resetColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 262.1)"
           @saveColumn="saveColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 262.1)">
           <template slot-scope="{type,size,row,index,disabled}" slot="menu">
@@ -49,7 +52,7 @@
       </trade-card>
       <trade-card title="地址信息">
         <avue-crud :option="optionAddress" v-model="formAddress" ref="formAddress" :data="form.corpsAddrList"
-          @row-save="rowSave" @row-update="rowUpdate"
+          @row-save="rowSave" @row-update="rowUpdate" :permission="permission"
           @resetColumn="resetColumnTwo('formContacts', 'optionAddress', 'optionAddressBack', 262.2)"
           @saveColumn="saveColumnTwo('formContacts', 'optionAddress', 'optionAddressBack', 262.2)">>
           <template slot-scope="{type,size,row,index,disabled}" slot="menu">
@@ -57,19 +60,19 @@
               :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="$refs.formAddress.rowCell(row, index)">{{
                 row.$cellEdit ? '确认' : '修改' }}
             </el-button>
-            <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
+            <el-button icon="el-icon-delete" :size="size" :disabled="disabled||!roleName.includes('admin')" :type="type"
               @click="rowDelBox(row, index, 'rowDelBox2')">删除
             </el-button>
           </template>
           <template slot="defaultAddres" slot-scope="{row,index,disabled}">
-            <el-switch active-value="1" inactive-value="0" :disabled="disabled" v-model="row.defaultAddres"
+            <el-switch active-value="1" inactive-value="0" :disabled="disabled||!roleName.includes('admin')" v-model="row.defaultAddres"
               @change="addressUnique(row, index)">
             </el-switch>
           </template>
         </avue-crud>
       </trade-card>
       <trade-card title="附件信息">
-        <c-upload basic :data="form.corpsFilesList" :disabled="disabled"
+        <c-upload basic :data="form.corpsFilesList" :disabled="disabled||!roleName.includes('admin')"
           deleteUrl="/api/blade-sales-part/corpsfiles/remove" :enumerationValue="262.3" display />
       </trade-card>
     </div>
@@ -98,6 +101,8 @@ export default {
   name: "detailsPage",
   data() {
     return {
+      roleName: localStorage.getItem("roleName"),
+      permission: {},
       props: {
         label: 'title',
         value: 'value'
@@ -247,6 +252,17 @@ export default {
     }
     this.findObject(this.optionAddress.column, "belongtoarea").dicData = JSON.parse(localStorage.getItem('areaTypeTree'))
     this.getCorpType()
+    if (!this.roleName.includes('admin')) {
+      this.permission = {
+        addRowBtn: false,
+        menu: false,
+      }
+    } else {
+      this.permission = {
+        addRowBtn: true,
+        menu: true,
+      }
+    }
   },
   methods: {
     // 启用或禁用
@@ -270,11 +286,15 @@ export default {
       })
       getDetails({ id: id }).then(res => {
         this.form = res.data.data
+        if (this.roleName.includes('admin')) {
           if (this.form.enableOrNot == 1) {
-              this.$set(this.optionForm,'disabled',true)
-          }else {
-              this.$set(this.optionForm,'disabled',false)
+            this.$set(this.optionForm, 'disabled', true)
+          } else {
+            this.$set(this.optionForm, 'disabled', false)
           }
+        }else{
+          this.$set(this.optionForm, 'disabled', true)
+        }
         loading.close();
       }).catch(() => {
         loading.close();

+ 17 - 15
src/views/tirePartsMall/basicData/supplier/index.vue

@@ -7,8 +7,8 @@
             @save="corpTypeVisible = true">
             <template slot="addBtn">
               <el-tooltip class="item" effect="dark" content="新建分类" placement="top">
-              <i class="el-icon-setting"  style="font-size:18px;line-height: 30px;width: 20px;padding: 0 10px;"
-                @click="corpTypeVisible = true"></i>
+                <i class="el-icon-setting" style="font-size:18px;line-height: 30px;width: 20px;padding: 0 10px;"
+                  @click="corpTypeVisible = true"></i>
               </el-tooltip>
             </template>
           </avue-tree>
@@ -20,15 +20,15 @@
             @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 262)" :page.sync="page">
             <template slot-scope="{type,size,row,index}" slot="menu">
               <!-- <el-button  :size="size" :type="type" @click="check(row)">查看</el-button> -->
-              <el-button  :size="size" :type="type" :disabled="row.enableOrNot"
+              <el-button :size="size" :type="type" :disabled="row.enableOrNot || !roleName.includes('admin')"
                 @click="$refs.crud.rowDel(row, index)">删除</el-button>
             </template>
             <template slot-scope="{ row, index }" slot="cname">
               <span style="color: #409EFF;cursor: pointer" @click.stop="check(row)">{{ row.cname }}</span>
             </template>
             <template slot="enableOrNot" slot-scope="{row,index,disabled}">
-<!--              <el-switch active-value="1" inactive-value="0" :disabled="disabled" v-model="row.enableOrNot">-->
-<!--              </el-switch>-->
+              <!--              <el-switch active-value="1" inactive-value="0" :disabled="disabled" v-model="row.enableOrNot">-->
+              <!--              </el-switch>-->
               <div v-if="row.enableOrNot === 1">是</div>
               <div v-else style="color: red">否</div>
             </template>
@@ -42,8 +42,10 @@
               <crop-select v-model="search.bookingAgentId" corpType="KH" :refresh="false"></crop-select>
             </template>
             <template slot-scope="{type,size,row,$index}" slot="menuLeft">
-              <el-button icon="el-icon-plus" type="primary" :size="size" @click="detailsOpen = true">新增供应商</el-button>
-              <el-button type="primary" size="small" icon="el-icon-bottom" @click="excelBox = true">导入</el-button>
+              <el-button icon="el-icon-plus" type="primary" :size="size" @click="detailsOpen = true"
+                :disabled="!roleName.includes('admin')">新增供应商</el-button>
+              <el-button type="primary" size="small" icon="el-icon-bottom" @click="excelBox = true"
+                :disabled="!roleName.includes('admin')">导入</el-button>
             </template>
           </avue-crud>
         </el-col>
@@ -63,8 +65,8 @@
         温馨提示 第一次导入时请先下载模板
       </p>
     </el-dialog>
-    <el-dialog title="设置供应商分类" v-dialogDrag :visible.sync="corpTypeVisible" class="avue-dialog" width="80%" append-to-body
-      @closed="corpTypeClosed">
+    <el-dialog title="设置供应商分类" v-dialogDrag :visible.sync="corpTypeVisible" class="avue-dialog" width="80%"
+      append-to-body @closed="corpTypeClosed">
       <span>
         <corp-type corpType="GYS"></corp-type>
         <!-- <avue-form :key="reload" ref="corpType" v-model="form4" :option="option4" style="margin-top:20px">
@@ -95,6 +97,7 @@ export default {
   },
   data() {
     return {
+      roleName: localStorage.getItem("roleName"),
       treeData: [],
       corpTypeVisible: false,
       treeOption: {
@@ -270,11 +273,11 @@ export default {
       this.page.currentPage = 1;
       this.onLoad(this.page, this.search);
     },
-    refresh(){
+    refresh() {
       getCorpType({ corpType: 'GYS' }).then(res => {
-      console.log('看看');
-      this.treeData = res.data.data
-    });
+        console.log('看看');
+        this.treeData = res.data.data
+      });
     },
     derivation() {
       window.open(
@@ -327,7 +330,7 @@ export default {
       });
     },
     searchChange(params, done) {
-        this.page.currentPage = 1
+      this.page.currentPage = 1
       this.onLoad(this.page, params)
       done();
     },
@@ -386,5 +389,4 @@ export default {
 ::v-deep .el-input-group__append {
   padding: 0 0px !important;
 }
-
 </style>

+ 13 - 2
src/views/tirePartsMall/basicData/warehouse/index.vue

@@ -3,12 +3,12 @@
     <!-- <a-map></a-map> -->
     <avue-crud :option="option" :data="dataList" ref="crud" v-model="form" :page.sync="page" @row-del="rowDel"
       @row-update="rowUpdate" :before-open="beforeOpen" :before-close="beforeClose" @row-save="rowSave"
-      @search-change="searchChange" @search-reset="searchReset" @on-load="onLoad"
+      @search-change="searchChange" @search-reset="searchReset" @on-load="onLoad" :permission="permission"
       @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 264)"
       @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 264)" @search-criteria-switch="searchCriteriaSwitch"
       @tree-load="treeLoad">
       <template slot-scope="{type,size,row,$index}" slot="menuLeft">
-        <el-button icon="el-icon-plus" type="primary" :size="size" @click="handleAdd">新增</el-button>
+        <el-button icon="el-icon-plus" type="primary" :size="size" @click="handleAdd" :disabled="!roleName.includes('admin')">新增</el-button>
       </template>
       <template slot-scope="{type,disabled}" slot="positionerForm">
         <avue-input-map :params="params" placeholder="请选择地图" :disabled="disabled"
@@ -37,6 +37,8 @@ export default {
   name: "customerInformation",
   data() {
     return {
+      roleName: localStorage.getItem("roleName"),
+      permission: {},
       params: {
         zoom: 14,
         dialogClickModal: true,
@@ -241,6 +243,15 @@ export default {
     setTimeout(() => {
       this.flag = true
     }, 200)
+    if (!this.roleName.includes('admin')) {
+      this.permission = {
+        menu: false,
+      }
+    } else {
+      this.permission = {
+        menu: true,
+      }
+    }
   },
   methods: {
     //删除列表后面的删除按钮触发触发(row, index, done)

+ 62 - 32
src/views/tirePartsMall/financialManagement/collectionSettlement/detailsPage.vue

@@ -13,9 +13,10 @@
         <el-button class="el-button--small-yh" type="primary" size="small"
           :disabled="form.financeStatus == '已收款' || isSaveBtn" @click="editCustomer">保存数据
         </el-button>
-        <el-button class="el-button--small-yh" type="warning" :disabled="isFinanceBtn" size="small" @click="collection">{{
-          form.financeStatus ==
-          '已收款' ? '撤销收款' : '收款' }}
+        <el-button class="el-button--small-yh" type="warning" :disabled="isFinanceBtn" size="small"
+          @click="collection">{{
+            form.financeStatus ==
+              '已收款' ? '撤销收款' : '收款' }}
         </el-button>
         <!-- <el-button class="el-button--small-yh" type="primary" size="small" v-if="form.id">启用
         </el-button> -->
@@ -59,14 +60,21 @@
           </template>
           <template slot-scope="{ row, index }" slot="thisAmount">
             <el-input-number size="small" v-model="row.thisAmount" :precision="2" :controls="false"
-              v-if="row.$cellEdit && row.businesType == 'XS'" @change="thisAmountChange(row)" :max="row.accountsAmount-row.settlmentAmount"></el-input-number>
+              v-if="row.$cellEdit && row.businesType == 'XS'" @change="thisAmountChange(row)"
+              :max="row.accountsAmount - row.settlmentAmount"></el-input-number>
             <span v-else>{{ row.thisAmount }}</span>
           </template>
           <template slot-scope="{ row, index }" slot="thisRefundAmount">
             <el-input-number size="small" width="100" v-model="row.thisRefundAmount" :precision="2" :controls="false"
-              v-if="row.$cellEdit && row.businesType == 'TKXS'" @change="thisReAmountChange(row)" :max="row.accountsAmount-row.settlmentAmount"></el-input-number>
+              v-if="row.$cellEdit && row.businesType == 'TKXS'" @change="thisReAmountChange(row)"
+              :max="row.accountsAmount - row.settlmentAmount"></el-input-number>
             <span v-else>{{ row.thisRefundAmount }}</span>
           </template>
+          <template slot-scope="{ row, index }" slot="invoiceAmount">
+            <el-input-number size="small" style="width: 100%;" v-model="row.invoiceAmount" :precision="2" :controls="false"
+              v-if="row.$cellEdit" :max="row.accountsAmount"></el-input-number>
+            <span v-else>{{ row.invoiceAmount }}</span>
+          </template>
           <template slot-scope="{type,size,row,index,disabled}" slot="menu">
             <el-button :size="size" :disabled="form.financeStatus == '已收款' || isMenu" :type="type"
               :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="$refs.formContacts.rowCell(row, index)">{{
@@ -84,9 +92,9 @@
         deleteUrl="/api/trade-purchase/woodHarvestingCloud/removeByFileId" :data="filesList" display
         :enumerationValue="35.1"></c-upload>
     </div>
-    <el-dialog title="导入订单" v-if="billDetailDialog" append-to-body class="el-dialogDeep" :visible.sync="billDetailDialog"
-      width="80%" :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" top="10vh"
-      v-dialog-drag>
+    <el-dialog title="导入订单" v-if="billDetailDialog" append-to-body class="el-dialogDeep"
+      :visible.sync="billDetailDialog" width="80%" :close-on-click-modal="false" :destroy-on-close="true"
+      :close-on-press-escape="false" top="10vh" v-dialog-drag>
       <bill-detail :params="params" :billType="billType" :flag="1" @closeFun="closeBillDetail"
         @importProMent="importProMent">
       </bill-detail>
@@ -167,7 +175,7 @@ export default {
             trigger: "blur"
           }]
         }, {
-          label: '金额',
+          label: '实收金额',
           prop: "amount",
           disabled: true,
           rules: [{
@@ -249,11 +257,11 @@ export default {
             prop: 'contractNumber',
             cell: false
           }, {
-            label: '应收金额',
+            label: '合同金额',
             prop: 'accountsAmount',
             cell: false
           }, {
-            label: '结算金额',
+            label: '已收款',
             prop: 'settlmentAmount',
             cell: false,
             decimals: 2
@@ -265,7 +273,29 @@ export default {
             label: '本次退货金额',
             prop: 'thisRefundAmount',
             width: 140,
-          }, {
+          },
+          {
+            label: '发票金额',
+            prop: 'invoiceAmount',
+            width: 100,
+          },
+          {
+            label: '发票号',
+            prop: 'invoiceNo',
+            cell: true,
+            width: 100,
+          },
+          {
+            label: '发票日期',
+            prop: "invoiceDate",
+            disabled: false,
+            cell: true,
+            type: "date",
+            width: 140,
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd",
+          },
+          {
             label: '来源主表id',
             hide: true,
             showColumn: false,
@@ -379,22 +409,22 @@ export default {
     // this.corpIdData
   },
   methods: {
-    thisAmountChange(row){
-      let sum1=0
-      let sum2=0
-      this.form.settlementItemsList.forEach(e=>{
+    thisAmountChange(row) {
+      let sum1 = 0
+      let sum2 = 0
+      this.form.settlementItemsList.forEach(e => {
         sum1 += e.thisAmount ? Number(e.thisAmount) : 0;
         sum2 += e.thisRefundAmount ? Number(e.thisRefundAmount) : 0;
-        this.$set(this.form,'amount',sum1-sum2)
+        this.$set(this.form, 'amount', sum1 - sum2)
       })
     },
-    thisReAmountChange(row){
-      let sum1=0
-      let sum2=0
-      this.form.settlementItemsList.forEach(e=>{
+    thisReAmountChange(row) {
+      let sum1 = 0
+      let sum2 = 0
+      this.form.settlementItemsList.forEach(e => {
         sum1 += e.thisAmount ? Number(e.thisAmount) : 0;
         sum2 += e.thisRefundAmount ? Number(e.thisRefundAmount) : 0;
-        this.$set(this.form,'amount',sum1-sum2)
+        this.$set(this.form, 'amount', sum1 - sum2)
       })
     },
     rowDelBox(row, index) {
@@ -459,7 +489,7 @@ export default {
         actualPaymentStatus: '2'
       }
       this.billDetailDialog = true;
-
+      // this.form.settlementItemsList.push({ $cellEdit: true, accountsAmount: 100,businesType:'TKXS' })
       // this.$refs.formContacts.rowAdd()
     },
     //导入
@@ -473,15 +503,15 @@ export default {
       //     }
       //   }
       // }
-      let sum1=0
-      let sum2=0
+      let sum1 = 0
+      let sum2 = 0
       list.forEach((item, index) => {
         item.contractNumber = item.ordNo;
-        item.accountsAmount = item.bsType == "XS"?item.totalMoney:item.returnsAmount
+        item.accountsAmount = item.bsType == "XS" ? item.totalMoney : item.returnsAmount
         item.settlmentAmount = item.paymentAmountTl
-        item.businesType=item.bsType
-        this.$set(item,'thisAmount',item.bsType=="XS"?(Number(item.totalMoney) - Number(item.paymentAmountTl)):0)
-        this.$set(item,'thisRefundAmount',item.bsType=="TKXS"?(Number(item.returnsAmount) - Number(item.paymentAmountTl)):0)
+        item.businesType = item.bsType
+        this.$set(item, 'thisAmount', item.bsType == "XS" ? (Number(item.totalMoney) - Number(item.paymentAmountTl)) : 0)
+        this.$set(item, 'thisRefundAmount', item.bsType == "TKXS" ? (Number(item.returnsAmount) - Number(item.paymentAmountTl)) : 0)
         // item.thisAmount =item.bsType=="XS"?(Number(item.totalMoney) - Number(item.paymentAmountTl)):0
         // item.thisRefundAmount =item.bsType=="TKXS"? (Number(item.totalMoney) - Number(item.paymentAmountTl)):0
         item.srcParentId = item.id
@@ -492,9 +522,9 @@ export default {
         delete item.ordNo;
         this.$refs.formContacts.rowCellAdd(item);
         //计算主表金额
-        sum1+=item.bsType=="XS"?(Number(item.totalMoney) - Number(item.paymentAmountTl)):0
-        sum2+=item.bsType=="TKXS"? (Number(item.totalMoney) - Number(item.paymentAmountTl)):0
-        this.form.amount=sum1-sum2
+        sum1 += item.bsType == "XS" ? (Number(item.totalMoney) - Number(item.paymentAmountTl)) : 0
+        sum2 += item.bsType == "TKXS" ? (Number(item.totalMoney) - Number(item.paymentAmountTl)) : 0
+        this.form.amount = sum1 - sum2
       })
       //明细列表所有合同号 去重 加, 为主表合同号
       // this.$set(this.form,'srcOrderno',Array.from(new Set(this.dataList.map(item =>{ return item.srcOrderno}))).join(','))

+ 1 - 1
src/views/tirePartsMall/financialManagement/collectionSettlement/index.vue

@@ -163,7 +163,7 @@ export default {
           //   return res.data.records
           // }),
         }, {
-          label: '金额',
+          label: '实收金额',
           prop: "amount",
           // search: true,
           overHidden: true,

+ 52 - 6
src/views/tirePartsMall/financialManagement/paymentSettlement/detailsPage.vue

@@ -48,6 +48,11 @@
               v-if="row.$cellEdit && row.businesType == 'TKCG'" @change="thisReAmountChange(row)" :max="row.accountsAmount-row.settlmentAmount"></el-input-number>
             <span v-else>{{ row.thisRefundAmount }}</span>
           </template>
+          <template slot-scope="{ row, index }" slot="invoiceAmount">
+            <el-input-number size="small" style="width: 100%;" v-model="row.invoiceAmount" :precision="2" :controls="false"
+              v-if="row.$cellEdit" :max="row.accountsAmount"></el-input-number>
+            <span v-else>{{ row.invoiceAmount }}</span>
+          </template>
           <template slot-scope="{type,size,row,index,disabled}" slot="menu">
             <el-button :size="size" :type="type" :disabled="form.financeStatus == '已付款' || isMenu"
               :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="$refs.formContacts.rowCell(row, index)">{{
@@ -148,7 +153,7 @@ export default {
             trigger: "blur"
           }]
         }, {
-          label: '金额',
+          label: '实付金额',
           prop: "amount",
           disabled: true,
           rules: [{
@@ -229,22 +234,62 @@ export default {
             prop: 'contractNumber',
             cell: false
           }, {
-            label: '应付金额',
+            label: '合同金额',
             prop: 'accountsAmount',
             cell: false
           }, {
-            label: '结算金额',
+            label: '已付款',
             prop: 'settlmentAmount',
             cell: false
           }, {
             label: '本次金额',
             prop: 'thisAmount',
             width: 140,
-          }, {
+          }, 
+          {
             label: '本次退货金额',
             prop: 'thisRefundAmount',
             width: 140,
-          }, {
+          }, 
+          {
+            label: '发票金额',
+            prop: 'invoiceAmount',
+            width: 100,
+          },
+          {
+            label: '发票号',
+            prop: 'invoiceNo',
+            cell: true,
+            width: 100,
+          },
+          {
+            label: '发票日期',
+            prop: "invoiceDate",
+            disabled: false,
+            cell: true,
+            type: "date",
+            width: 140,
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd",
+          },{
+            label: '发票金额',
+            prop: 'invoiceAmount',
+            width: 140,
+          }, 
+          {
+            label: '发票号',
+            prop: 'invoiceNo',
+            width: 140,
+          }, 
+          {
+            label: '发票日期',
+            prop: "invoiceDate",
+            disabled: false,
+            type: "datetime",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd",
+          }, 
+          {
             label: '业务日期',
             prop: "businesDate",
             disabled: false,
@@ -258,7 +303,8 @@ export default {
                 trigger: "blur"
               }
             ]
-          }, {
+          }, 
+          {
             label: '备注',
             prop: 'remarks',
             cell: true

+ 1 - 1
src/views/tirePartsMall/financialManagement/paymentSettlement/index.vue

@@ -127,7 +127,7 @@ export default {
           //   return res.data.records
           // }),
         }, {
-          label: '金额',
+          label: '实付金额',
           prop: "amount",
           // search: true,
           overHidden: true,

+ 7 - 9
src/views/tirePartsMall/productionManagement/productionOrder/detailsPage.vue

@@ -16,13 +16,14 @@
                     :disabled="isSaveBtn" @click="submit">保 存
                 </el-button>
                 <el-button v-if="form.statusName == '生产中'" class="el-button--small-yh" style="margin-left: 6px;"
-                    type="warning" size="small" :disabled="editButton||isSaveBtn||form.statusName == '生产完成'" @click="completed">完 工
+                    type="warning" size="small" :disabled="editButton || isSaveBtn || form.statusName == '生产完成'"
+                    @click="completed">完 工
                 </el-button>
                 <el-button v-if="form.statusName == '生产完成'" class="el-button--small-yh" style="margin-left: 6px;"
-                    type="danger" size="small" :disabled="editButton||isSaveBtn" @click="revokeCompleted">撤销完工
+                    type="danger" size="small" :disabled="editButton || isSaveBtn" @click="revokeCompleted">撤销完工
                 </el-button>
                 <el-button class="el-button--small-yh" style="margin-left: 6px;" type="success" size="small"
-                    :disabled="editButton||isSaveBtn || form.statusName == '生产完成'" @click="generatePicking">领 料
+                    :disabled="editButton || isSaveBtn || form.statusName == '生产完成'" @click="generatePicking">领 料
                 </el-button>
                 <!-- <el-button class="el-button--small-yh" style="margin-left: 6px;" type="info" size="small"
                     :disabled="isSaveBtn" @click="selectPicking">查看领料
@@ -266,7 +267,7 @@ export default {
                         label: '产品数量',
                         prop: "goodsTotalNum",
                         type: 'number',
-                        precision: 3,
+                        precision: 2,
                         controls: false,
                         disabled: false,
                     },
@@ -424,11 +425,8 @@ export default {
                         label: '规格型号',
                         prop: 'propertyName',
                         overHidden: true,
-                    }, {
-                        label: '花纹',
-                        prop: 'pattern',
-                        overHidden: true,
-                    }, {
+                    },
+                    {
                         label: '商品描述',
                         prop: 'goodsDescription',
                         overHidden: true,

+ 11 - 8
src/views/tirePartsMall/productionManagement/productionPicking/detailsPage.vue

@@ -33,7 +33,7 @@
           <template slot-scope="{row,index}" slot="contacts">
             <el-select v-model="form.contacts" placeholder="请选择" size="small" style="width:60%" clearable filterable
               allow-create default-first-option @change="contactsChange($event)"
-              :disabled="editButton ||form.statusName == '已领料'">
+              :disabled="editButton || form.statusName == '已领料'">
               <el-option v-for="item in contactsOption" :key="item.id" :label="item.contacts" :value="item.contacts" />
             </el-select>
           </template>
@@ -45,8 +45,8 @@
           @resetColumn="resetColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 442)"
           @saveColumn="saveColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 442)">
           <template slot-scope="{scope,row}" slot="menuLeft">
-            <el-button type="primary" icon="el-icon-plus" size="small" :disabled="editButton || form.statusName == '已领料'"
-              @click="rowAdd(row, 1)">添加商品</el-button>
+            <el-button type="primary" icon="el-icon-plus" size="small"
+              :disabled="editButton || form.statusName == '已领料'" @click="rowAdd(row, 1)">添加商品</el-button>
             <el-popover placement="top" width="400" trigger="click" @show="inventoryShow2()">
               <avue-crud :data="inventoryList" :option="inventoryOption">
               </avue-crud>
@@ -63,14 +63,14 @@
             <span v-else>{{ row.goodsNum }}</span>
           </template>
           <template slot-scope="{type,size,row,index,disabled}" slot="menu">
-            <el-button v-if="!row.$cellEdit" :size="size" :disabled="editButton || form.statusName == '已领料'" :type="type"
-              icon="el-icon-edit" @click="rowCell(row, index)">编辑
+            <el-button v-if="!row.$cellEdit" :size="size" :disabled="editButton || form.statusName == '已领料'"
+              :type="type" icon="el-icon-edit" @click="rowCell(row, index)">编辑
             </el-button>
             <el-button v-else :size="size" :disabled="editButton || form.statusName == '已领料'" :type="type"
               icon="el-icon-plus" @click="rowSave(row, index)">保存
             </el-button>
-            <el-button icon="el-icon-delete" :size="size" :disabled="editButton || form.statusName == '已领料'" :type="type"
-              @click="rowDelBox(row, index, 'shipItemsList')">删除
+            <el-button icon="el-icon-delete" :size="size" :disabled="editButton || form.statusName == '已领料'"
+              :type="type" @click="rowDelBox(row, index, 'shipItemsList')">删除
             </el-button>
           </template>
         </avue-crud>
@@ -484,7 +484,7 @@ export default {
           props: {
             label: 'ordNo',
             value: 'ordNo',
-             res: 'data.records'
+            res: 'data.records'
           },
           dicUrl: '/api/blade-sales-part/productionPicking/selectPicking?statusName=生产中&bizTypeName=SCDD&ordNo={{key}}'
         },
@@ -630,6 +630,9 @@ export default {
   },
   async created() {
     this.optionContacts = await this.getColumnData(this.getColumnName(442), this.optionContactsBack);
+    isProcurement({ "param": "number.decimal" }).then(res => {
+      this.numberDecimal = res.data.data ? Number(res.data.data) : 0
+    })
     this.key++
     if (this.detailData.id) {
       this.editButton = true