Pārlūkot izejas kodu

企管法规处已入库的准入范围可删除
Signed-off-by: lijunqing <lijunqing@dashoo.cn>

lijunqing 6 gadi atpakaļ
vecāks
revīzija
44fc643cb4

+ 15 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/supplier.go

@@ -1978,3 +1978,18 @@ func (this *OilSupplierController) GetAuditerByDeptAndNoLogin() {
 	this.Data["json"] = &datainfo
 	this.ServeJSON()
 }
+
+
+
+// @Title
+// @Description
+// @router /getjurisdiction [get]
+func (this *OilSupplierController) GetJurisdiction() {
+	svcPerm := permission.GetPermissionService(utils.DBE)
+	isauth := svcPerm.IsAuthorized(this.User.Id, "oil_delete")
+
+	var datainfo ErrorDataInfo
+	datainfo.Item = isauth
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}

+ 6 - 0
src/dashoo.cn/frontend_web/src/api/oilsupplier/supplier.js

@@ -148,5 +148,11 @@ export default {
       method: 'GET',
       params: params
     })
+  },
+  getJurisdiction (myAxios) {
+    return myAxios({
+      url: '/supplier/getjurisdiction',
+      method: 'GET'
+    })
   }
 }

+ 12 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstore/_opera/basisedit.vue

@@ -177,7 +177,7 @@
 
         <el-tab-pane label="准入范围" :disabled="!certId">
           <business-list ref="businessList" :data.sync="businessList" @close="getbuslist" :canadd="add_flat"
-            height="360px" style="margin-top: 20px"></business-list>
+            height="360px" style="margin-top: 20px" :candelete="delete_flat"></business-list>
         </el-tab-pane>
         <el-tab-pane label="企业资质" :disabled="!certId">
           <subfile-list ref="subfileList" :data.sync="subfileList" :canadd="add_flat" @close="selectAuditOrg"
@@ -300,6 +300,7 @@
 
     data() {
       return {
+        delete_flat:true,
         activeName: '0',
         chooseAuditorVisible: false,
         showReturn: 1,
@@ -473,8 +474,18 @@
       } else {
         this.initDatas()
       }
+      this.Jurisdiction()
     },
     methods: {
+       Jurisdiction(){
+        api.getJurisdiction(this.$axios).then(res => {
+            if(!res.data.item){
+              this.delete_flat=false
+            }
+        }).catch(err => {
+          console.error(err)
+        })
+      },
       confirm () {
         this.$confirm('确认提交入库','提示',{
           confirmButtonText: '确认',

+ 14 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstore/_opera/goodsedit.vue

@@ -178,7 +178,7 @@
 
         <el-tab-pane label="准入范围" :disabled="!certId">
           <goods-list ref="goodsList" :data.sync="goodsList" @close="getbuslist" :canadd="add_flat" height="360px"
-            style="margin-top: 20px"></goods-list>
+            style="margin-top: 20px" :candelete="delete_flat"></goods-list>
         </el-tab-pane>
         <el-tab-pane label="企业资质" :disabled="!certId">
           <subfile-list ref="subfileList" :data.sync="subfileList" :canadd="add_flat" @close="selectAuditOrg"
@@ -278,6 +278,7 @@
 
     data () {
       return {
+        delete_flat:true,
         activeName: '0',
         chooseAuditorVisible: false,
         showReturn: 1,
@@ -451,8 +452,20 @@
       } else {
         this.initDatas()
       }
+      this.Jurisdiction()
     },
     methods: {
+      Jurisdiction(){
+        api.getJurisdiction(this.$axios).then(res => {
+          console.log("qwewqe")
+          console.log(res.data.item)
+            if(!res.data.item){
+              this.delete_flat=false
+            }
+        }).catch(err => {
+          console.error(err)
+        })
+      },
       printbtn () {
         this.dialogVisible = true
       },

+ 12 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstore/_opera/techedit.vue

@@ -185,7 +185,7 @@
         </el-tab-pane>
         <el-tab-pane name="3" label="准入范围" :disabled="!certId">
           <tech-list ref="techList" :data.sync="techList" @close="getbuslist" :canadd="add_flat" height="360px"
-            style="margin-top: 20px"></tech-list>
+            style="margin-top: 20px" :candelete="delete_flat"></tech-list>
         </el-tab-pane>
         <el-tab-pane name="4" label="企业资质" :disabled="!certId">
           <subfile-list ref="subfileList" :data.sync="subfileList" :canadd="add_flat" @close="selectAuditOrg"
@@ -308,6 +308,7 @@
 
     data() {
       return {
+        delete_flat:true,
         activeName: '1',
         chooseAuditorVisible: false,
         showReturn: 1,
@@ -481,8 +482,18 @@
       } else {
         this.initDatas()
       }
+       this.Jurisdiction()
     },
     methods: {
+       Jurisdiction(){
+        api.getJurisdiction(this.$axios).then(res => {
+            if(!res.data.item){
+              this.delete_flat=false
+            }
+        }).catch(err => {
+          console.error(err)
+        })
+      },
       confirm () {
         this.$confirm('确认提交入库','提示',{
           confirmButtonText: '确认',