Bladeren bron

增项新增fix

baichengfei 5 jaren geleden
bovenliggende
commit
04767472de

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

@@ -234,7 +234,7 @@ func (this *OilSupplierCertAppendController) AddAppend() {
 		style, _ :=strconv.Atoi(modeltmp[0].InStyle)
 		if style != 6 {
 			id :=strconv.Itoa(modeltmp[0].SupplierId)
-			sqlCount := "select count(*) from OilSupplierCertAppend where SupplierId=" + id + " AND YEAR(CreateOn)=YEAR(NOW())"
+			sqlCount := "select count(*) from OilSupplierCertAppend where SupplierId=" + id + " AND YEAR(CreateOn)=YEAR(NOW()) AND AppendType = '" + model.AppendType + "'"
 			var countRes, _ = svc.DBE.Query(sqlCount)
 			if len(countRes) > 0 {
 				results := countRes[0]

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

@@ -360,7 +360,8 @@ import WfHistory from '@/components/workflow/wfhistory.vue'
           .then(() => {
             _this.appendformData.AppendType = '02'
             _this.appendformData.SupplierId = parseInt(_this.appendformData.SupplierId)
-            if (!_this.appendformData.SupplierId) {
+            console.log(_this.appendformData, '222')
+            if (!_this.appendformData.SupplierId && _this.IsCompanyUser == 0) {
               _this.appendformData.SupplierId = ''
               _this.$message({
                 type: 'warning',

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

@@ -371,7 +371,7 @@ import WfHistory from '@/components/workflow/wfhistory.vue'
           .then(() => {
             _this.appendformData.AppendType = '01'
             _this.appendformData.SupplierId = parseInt(_this.appendformData.SupplierId)
-            if (!_this.appendformData.SupplierId) {
+            if (!_this.appendformData.SupplierId && _this.IsCompanyUser == 0) {
               _this.appendformData.SupplierId = ''
               _this.$message({
                 type: 'warning',

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

@@ -363,7 +363,7 @@ import WfHistory from '@/components/workflow/wfhistory.vue'
           .then(() => {
             _this.appendformData.AppendType = '03'
             _this.appendformData.SupplierId = parseInt(_this.appendformData.SupplierId)
-            if (!_this.appendformData.SupplierId) {
+            if (!_this.appendformData.SupplierId && _this.IsCompanyUser == 0) {
               _this.appendformData.SupplierId = ''
               _this.$message({
                 type: 'warning',