Browse Source

没有权限上锁修改

huahaiyan 6 years ago
parent
commit
009d0459d7
17 changed files with 110 additions and 31 deletions
  1. 8 4
      src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertappend.go
  2. 4 1
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/basisdataopera.vue
  3. 4 1
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/goodsdataopera.vue
  4. 4 1
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/techdataopera.vue
  5. 7 2
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/basicindex.vue
  6. 7 3
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/goodsindex.vue
  7. 7 2
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/index.vue
  8. 7 2
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/techindex.vue
  9. 7 2
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochangech/index.vue
  10. 7 2
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/qualchange/index.vue
  11. 4 1
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/basisdataopera.vue
  12. 4 1
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/goodsdataopera.vue
  13. 4 1
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/techdataopera.vue
  14. 9 2
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/basislist.vue
  15. 9 2
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/goodslist.vue
  16. 9 2
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/index.vue
  17. 9 2
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/techlist.vue

+ 8 - 4
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertappend.go

@@ -146,14 +146,18 @@ func (this *OilSupplierCertAppendController) GetEntityById() {
 // @Title 获取公司信息
 // @Description 根据创建用户Id和增项类别号获取公司信息
 // @Success 200 {object} []suppliercertappend.OilSupplierCertAppend
-// @router /getsupplier/:id [get]
+// @router /getsupplier [get]
 func (this *OilSupplierCertAppendController) GetSupplier() {
-	Id := this.Ctx.Input.Param(":id")
-	where := " WHERE b.Id is NOT NULL AND a.SupplierTypeCode = '" + Id + "' and a.InFlag='1'"
+	SuppTypeCode := this.GetString("SuppTypeCode")
+	where := "1=1 "
+	if SuppTypeCode != "" {
+		where = " WHERE b.Id is NOT NULL AND a.SupplierTypeCode = '" + SuppTypeCode + "' and a.InFlag='1'"
+	}else {
+		where = " WHERE b.Id is NOT NULL AND a.InFlag='1'"
+	}
 	if this.User.IsCompanyUser == 1 {
 		where = where + " and b.CreateUserId = '" + this.User.Id + "'"
 	}
-
 	svc := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
 	sqlStr := "SELECT b.Id AS SupplierId, a.Id AS SupplierCertId, b.SupplierName AS SupplierName FROM OilSupplierCert AS a LEFT JOIN OilSupplier AS b ON a.SupplierId = b.Id "
 	sqlStr = sqlStr + where

+ 4 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/basisdataopera.vue

@@ -421,7 +421,10 @@
       //获取供应方公司列表
       getSupplierList() {
         let _this = this
-        _this.$axios.get('/suppliercertappend/getsupplier/' + '02', {})
+        let params = {
+          SuppTypeCode: '02',
+        }
+        _this.$axios.get('/suppliercertappend/getsupplier', {params})
           .then(res => {
             _this.supplierList = res.data
           })

+ 4 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/goodsdataopera.vue

@@ -432,7 +432,10 @@
       //获取供应方公司列表
       getSupplierList() {
         let _this = this
-        _this.$axios.get('/suppliercertappend/getsupplier/' + '01', {})
+        let params = {
+          SuppTypeCode: '01',
+        }
+        _this.$axios.get('/suppliercertappend/getsupplier', {params})
           .then(res => {
             _this.supplierList = res.data
           })

+ 4 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/techdataopera.vue

@@ -445,7 +445,10 @@
       //获取供应方公司列表
       getSupplierList() {
         let _this = this
-        _this.$axios.get('/suppliercertappend/getsupplier/' + '03', {})
+        let params = {
+          SuppTypeCode: '03',
+        }
+        _this.$axios.get('/suppliercertappend/getsupplier', {params})
           .then(res => {
             _this.supplierList = res.data
           })

+ 7 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/basicindex.vue

@@ -328,7 +328,7 @@
         },
         IsCompanyUser: 0,
         supplierList: [],
-        suplen: 0,
+        suplen: 1,
         certId:'',
       }
     },
@@ -374,11 +374,16 @@
       getSupplierList() {
         let _this = this
         _this.supplierList = []
-        _this.$axios.get('/suppliercertappend/getsupplier/' + '02', {})
+        let params = {
+          SuppTypeCode: '02',
+        }
+        _this.$axios.get('/suppliercertappend/getsupplier', {params})
           .then(res => {
             _this.supplierList = res.data
             if (_this.supplierList) {
               _this.suplen = _this.supplierList.length
+            }else{
+              _this.suplen = 0
             }
             if (_this.IsCompanyUser == 1 && _this.supplierList) {
               _this.entityForm.SupplierId = parseInt(_this.supplierList[0].SupplierId)

+ 7 - 3
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/goodsindex.vue

@@ -330,7 +330,7 @@
         },
         IsCompanyUser: 0,
         supplierList: [],
-        suplen: 0,
+        suplen: 1,
         certId:'',
       }
     },
@@ -376,13 +376,17 @@
       getSupplierList() {
         let _this = this
         _this.supplierList = []
-        _this.$axios.get('/suppliercertappend/getsupplier/' + '01', {})
+        let params = {
+          SuppTypeCode: '01',
+        }
+        _this.$axios.get('/suppliercertappend/getsupplier', {params})
           .then(res => {
             _this.supplierList = res.data
             if (_this.supplierList) {
               _this.suplen = _this.supplierList.length
+            }else{
+              _this.suplen = 0
             }
-            console.log("---_this.supplierList-",_this.supplierList)
             if (_this.IsCompanyUser == 1 && _this.supplierList) {
               _this.entityForm.SupplierId = parseInt(_this.supplierList[0].SupplierId)
               _this.entityForm.SupplierName = _this.supplierList[0].SupplierName

+ 7 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/index.vue

@@ -327,7 +327,7 @@
         },
         IsCompanyUser: 0,
         supplierList: [],
-        suplen: 0,
+        suplen: 1,
       }
     },
     created() {
@@ -372,11 +372,16 @@
       getSupplierList() {
         let _this = this
         _this.supplierList = []
-        _this.$axios.get('/suppliercertappend/getsupplier/' + '02', {})
+        let params = {
+          SuppTypeCode: '02',
+        }
+        _this.$axios.get('/suppliercertappend/getsupplier', {params})
           .then(res => {
             _this.supplierList = res.data
             if (_this.supplierList) {
               _this.suplen = _this.supplierList.length
+            }else{
+              _this.suplen = 0
             }
             if (_this.IsCompanyUser == 1 && _this.supplierList) {
               _this.entityForm.SupplierId = parseInt(_this.supplierList[0].SupplierId)

+ 7 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/techindex.vue

@@ -328,7 +328,7 @@
         },
         IsCompanyUser: 0,
         supplierList: [],
-        suplen: 0,
+        suplen: 1,
         certId:'',
       }
     },
@@ -374,11 +374,16 @@
       getSupplierList() {
         let _this = this
         _this.supplierList = []
-        _this.$axios.get('/suppliercertappend/getsupplier/' + '03', {})
+        let params = {
+          SuppTypeCode: '03',
+        }
+        _this.$axios.get('/suppliercertappend/getsupplier', {params})
           .then(res => {
             _this.supplierList = res.data
             if (_this.supplierList) {
               _this.suplen = _this.supplierList.length
+            }else{
+              _this.suplen = 0
             }
             if (_this.IsCompanyUser == 1 && _this.supplierList) {
               _this.entityForm.SupplierId = parseInt(_this.supplierList[0].SupplierId)

+ 7 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochangech/index.vue

@@ -310,7 +310,7 @@
         ],
         IsCompanyUser: 0,
         supplierList: [],
-        suplen: 0,
+        suplen: 1,
       }
     },
     created() {
@@ -354,11 +354,16 @@
       getSupplierList() {
         let _this = this
         _this.supplierList = []
-        _this.$axios.get('/suppliercertappend/getsupplier/' + '02', {})
+        let params = {
+          SuppTypeCode: '',
+        }
+        _this.$axios.get('/suppliercertappend/getsupplier', {params})
           .then(res => {
             _this.supplierList = res.data
             if (_this.supplierList) {
               _this.suplen = _this.supplierList.length
+            }else{
+              _this.suplen = 0
             }
           })
           .catch(err => {

+ 7 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/qualchange/index.vue

@@ -234,7 +234,7 @@
         },
         IsCompanyUser: 0,
         supplierList: [],
-        suplen: 0,
+        suplen: 1,
       }
     },
     created() {
@@ -280,11 +280,16 @@
       getSupplierList() {
         let _this = this
         _this.supplierList = []
-        _this.$axios.get('/suppliercertappend/getsupplier/' + '02', {})
+        let params = {
+          SuppTypeCode: '',
+        }
+        _this.$axios.get('/suppliercertappend/getsupplier', {params})
           .then(res => {
             _this.supplierList = res.data
             if (_this.supplierList) {
               _this.suplen = _this.supplierList.length
+            }else{
+              _this.suplen = 0
             }
           })
           .catch(err => {

+ 4 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/basisdataopera.vue

@@ -749,7 +749,10 @@
       //获取供应方公司列表
       getSupplierList() {
         let _this = this
-        _this.$axios.get('/suppliercertappend/getsupplier/' + '02', {})
+        let params = {
+          SuppTypeCode: '02',
+        }
+        _this.$axios.get('/suppliercertappend/getsupplier', {params})
           .then(res => {
             _this.supplierList = res.data
           })

+ 4 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/goodsdataopera.vue

@@ -581,7 +581,10 @@
       //获取供应方公司列表
       getSupplierList() {
         let _this = this
-        _this.$axios.get('/suppliercertappend/getsupplier/' + '01', {})
+        let params = {
+          SuppTypeCode: '01',
+        }
+        _this.$axios.get('/suppliercertappend/getsupplier', {params})
           .then(res => {
             _this.supplierList = res.data
           })

+ 4 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/techdataopera.vue

@@ -538,7 +538,10 @@
       //获取供应方公司列表
       getSupplierList() {
         let _this = this
-        _this.$axios.get('/suppliercertappend/getsupplier/' + '03', {})
+        let params = {
+          SuppTypeCode: '03',
+        }
+        _this.$axios.get('/suppliercertappend/getsupplier', {params})
           .then(res => {
             _this.supplierList = res.data
           })

+ 9 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/basislist.vue

@@ -241,7 +241,7 @@
         },
         IsCompanyUser: 0,
         supplierList:[],
-        suplen:0,
+        suplen:1,
         appendformData: {
           Id: '',
           Step: 1,
@@ -330,11 +330,18 @@
       getSupplierList() {
         let _this = this
         _this.supplierList = []
-        _this.$axios.get('/suppliercertappend/getsupplier/' + '02', {})
+        let params = {
+          SuppTypeCode: '02',
+        }
+        _this.$axios.get('/suppliercertappend/getsupplier', {params})
           .then(res => {
             _this.supplierList = res.data
             if (_this.supplierList) {
               _this.suplen = _this.supplierList.length
+            }else{
+              _this.suplen = 0
+            }
+            if (_this.IsCompanyUser == 1 && _this.supplierList) {
               _this.appendformData.SupplierId = parseInt(_this.supplierList[0].SupplierId)
               _this.appendformData.SupplierCertId = parseInt(_this.supplierList[0].SupplierCertId)
               _this.appendformData.SupplierName = _this.supplierList[0].SupplierName

+ 9 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/goodslist.vue

@@ -241,7 +241,7 @@
         },
         IsCompanyUser: 0,
         supplierList:[],
-        suplen:0,
+        suplen:1,
         appendformData: {
           Id: '',
           Step: 1,
@@ -330,11 +330,18 @@
       getSupplierList() {
         let _this = this
         _this.supplierList = []
-        _this.$axios.get('/suppliercertappend/getsupplier/' + '01', {})
+        let params = {
+          SuppTypeCode: '01',
+        }
+        _this.$axios.get('/suppliercertappend/getsupplier', {params})
           .then(res => {
             _this.supplierList = res.data
             if (_this.supplierList) {
               _this.suplen = _this.supplierList.length
+            }else{
+              _this.suplen = 0
+            }
+            if (_this.IsCompanyUser == 1 && _this.supplierList) {
               _this.appendformData.SupplierId = parseInt(_this.supplierList[0].SupplierId)
               _this.appendformData.SupplierCertId = parseInt(_this.supplierList[0].SupplierCertId)
               _this.appendformData.SupplierName = _this.supplierList[0].SupplierName

+ 9 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/index.vue

@@ -250,7 +250,7 @@
         },
         IsCompanyUser: 0,
         supplierList:[],
-        suplen:0,
+        suplen:1,
         appendformData: {
           Id: '',
           Step: 1,
@@ -338,11 +338,18 @@
       getSupplierList() {
         let _this = this
         _this.supplierList = []
-        _this.$axios.get('/suppliercertappend/getsupplier/' + '01', {})
+        let params = {
+          SuppTypeCode: '',
+        }
+        _this.$axios.get('/suppliercertappend/getsupplier', {params})
           .then(res => {
             _this.supplierList = res.data
             if (_this.supplierList) {
               _this.suplen = _this.supplierList.length
+            }else{
+              _this.suplen = 0
+            }
+            if (_this.IsCompanyUser == 1 && _this.supplierList) {
               _this.appendformData.SupplierId = parseInt(_this.supplierList[0].SupplierId)
               _this.appendformData.SupplierCertId = parseInt(_this.supplierList[0].SupplierCertId)
               _this.appendformData.SupplierName = _this.supplierList[0].SupplierName

+ 9 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/techlist.vue

@@ -244,7 +244,7 @@
         },
         IsCompanyUser: 0,
         supplierList: [],
-        suplen: 0,
+        suplen: 1,
         appendformData: {
           Id: '',
           Step: 1,
@@ -333,11 +333,18 @@
       getSupplierList() {
         let _this = this
         _this.supplierList = []
-        _this.$axios.get('/suppliercertappend/getsupplier/' + '03', {})
+        let params = {
+          SuppTypeCode: '03',
+        }
+        _this.$axios.get('/suppliercertappend/getsupplier', {params})
           .then(res => {
             _this.supplierList = res.data
             if (_this.supplierList) {
               _this.suplen = _this.supplierList.length
+            }else{
+              _this.suplen = 0
+            }
+            if (_this.IsCompanyUser == 1 && _this.supplierList) {
               _this.appendformData.SupplierId = parseInt(_this.supplierList[0].SupplierId)
               _this.appendformData.SupplierCertId = parseInt(_this.supplierList[0].SupplierCertId)
               _this.appendformData.SupplierName = _this.supplierList[0].SupplierName