lining 6 anni fa
parent
commit
4221d7ca00

+ 1 - 1
src/dashoo.cn/backend/api/business/oilsupplier/supplier/oilsupplierService.go

@@ -72,7 +72,7 @@ func (s *OilSupplierService) CheckRepeatApplyInfo(supplierTableName, supplierCer
 
 
 
-	where2 := " b.SupplierTypeCode = '" + typeCode + "'"
+	where2 := " b.SupplierTypeCode = '" + typeCode + "' AND b.InFlag != '4'"
 
 	where := ""
 	if SupplierName != "" {

+ 1 - 1
src/dashoo.cn/backend/api/business/oilsupplier/suppliercert/oilsuppliercertService.go

@@ -123,7 +123,7 @@ func (s *OilSupplierCertService) IsCanApplyByExtOrganizeUser(applyType, commerci
 	if extOrganizeId == departmentId {*/
 	if isCompanyUser == 1 {
 		var tempMap []map[string]string
-		sql:= "select 1 from OilSupplier a left join OilSupplierCert b on a.Id=b.SupplierId where b.SupplierTypeCode = '" + applyType + "' and (b.CreateUserId = '" + userId + "' or a.CommercialNo='"+commercialNo+"')"
+		sql:= "select 1 from OilSupplier a left join OilSupplierCert b on a.Id=b.SupplierId where b.SupplierTypeCode = '" + applyType + "' and (b.CreateUserId = '" + userId + "' or a.CommercialNo='"+commercialNo+"') and b.InFlag != '4'"
 		tempMap,_=s.DBE.QueryString(sql)
 		if tempMap!=nil && tempMap[0]["1"] !="" {
 			return false

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

@@ -463,7 +463,8 @@ func (this *PaymentInfoController) ReceiveMoneyBillList() {
 				//更新准入表时间
 				var certmodel suppliercert.OilSupplierCert
 				certmodel.ApplyTime = annualentities[0].ApplyTime.AddDate(1, 0, 0)
-				svc.UpdateEntityByIdCols(strconv.Itoa(payItem.SupplierCertId), &certmodel, []string{"ApplyTime"})
+				certmodel.InFlag = "1"
+				svc.UpdateEntityByIdCols(strconv.Itoa(payItem.SupplierCertId), &certmodel, []string{"ApplyTime", "InFlag"})
 			}
 		} else if payItem.PayType == "3" { //增项
 			appsvc := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)

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

@@ -410,6 +410,8 @@ func (this *OilSupplierController) GetJoinCertEntityList() {
 	RegCapital2 := this.GetString("RegCapital2")
 	BusinessScope := this.GetString("BusinessScope")
 
+	where = where + " and b.InFlag != '4'"
+
 	if SupplierName != "" {
 		where = where + " and a.SupplierName like '%" + SupplierName + "%'"
 	}
@@ -1440,7 +1442,7 @@ func (this *OilSupplierController) GetEntityAndCert() {
 	//svc.GetEntityByIdBytbl(OilSupplierName, Id, &model)
 
 	var sql string
-	sql = `select a.*, b.Id as CertId, b.AccessCardNo, b.SupplierTypeCode, b.SupplierTypeName, b.Step, b.WorkerTotal, b.ContractNum, b.UniversityNum, b.TechnicalNum, b.AboveProfNum, 
+	sql = `select a.*, b.Id as CertId, b.AccessCardNo, b.SupplierTypeCode, b.SupplierTypeName, b.Step, b.WorkerTotal, b.ContractNum, b.UniversityNum, b.TechnicalNum, b.AboveProfNum, b.InFlag,
          b.MiddleProfNum, b.NationalRegNum, b.NationalCertTotal, b.DesignerTotal, b.SkillerTotal, b.InStyle, b.WorkflowId, b.Status, b.ThirdAudit, b.BusinessKey, b.AuditIndex ,b.ProcessKey from ` + OilSupplierName + ` a `
 	sql += ` left join ` + OilSupplierCertName + " b on b.SupplierId = a.Id"
 	sql += ` where b.Id ='` + Id + `'`

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

@@ -1690,14 +1690,58 @@ func (this *OilSupplierCertController) ChangeSupplierStatus() {
 			"InFlag",
 		}
 		sert.InFlag = "2"
-		where := "SupplierId=" + strconv.Itoa(item.Id)
+		where := "SupplierId=" + strconv.Itoa(item.Id) + " AND b.InFlag = '1'"
 		svcsupp.UpdateEntityBywheretbl(OilSupplierCertName, &sert, cols, where)
 	}
 
 
 }
 
+// @Title 更新Inflag状态
+// @Description 企业入库
+// @Success	200	{object} controllers.Request
+// @router /reinput/:id [post]
+func (this *OilSupplierCertController) ReInput() {
+	id := this.Ctx.Input.Param(":id")
+	inFlag := this.GetString("InFlag")
+
+	var errinfo ErrorInfo
+	if id == "" {
+		errinfo.Message = "操作失败!请求信息不完整"
+		errinfo.Code = -2
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+
+	var model suppliercert.OilSupplierCert
+	svc := suppliercert.GetOilSupplierCertService(utils.DBE)
+	model.InFlag = inFlag
+	model.IsDelete = 1
+	model.ModifiedOn = time.Now()
+	model.ModifiedBy = this.User.Realname
+	model.ModifiedUserId, _ = utils.StrTo(this.User.Id).Int()
+	cols := []string{
+		"IsDelete",
+		"InFlag",
+		"ModifiedOn",
+		"ModifiedUserId",
+		"ModifiedBy",
+	}
+	err := svc.UpdateEntityBytbl(OilSupplierCertName, id, &model, cols)
+	if err == nil {
+		errinfo.Message = "提交成功!"
+		errinfo.Code = 0
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	} else {
+		errinfo.Message = "提交失败!" + utils.AlertProcess(err.Error())
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	}
 
+}
 
 
 

+ 7 - 0
src/dashoo.cn/frontend_web/src/api/oilsupplier/suppliercert.js

@@ -104,5 +104,12 @@ export default {
       url: '/suppliercert/saveaccesscardno/' + Id + '?AccessCardNo=' + AccessCardNo + '&SupplierCertId=' + SupplierCertId + '&typeCode=' + type,
       method: 'GET'
     })
+  },
+  reInput (entityId, params, myAxios) {
+    return myAxios({
+      url: '/suppliercert/reinput/' + entityId,
+      method: 'post',
+      params: params
+    })
   }
 }

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

@@ -430,7 +430,6 @@
 <script>
 import { mapGetters } from 'vuex'
 import api from '@/api/oilsupplier/supplier'
-import certApi from '@/api/oilsupplier/suppliercert'
 
 export default {
   computed: {

+ 27 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstore/_opera/basisedit.vue

@@ -11,6 +11,7 @@
           <i class="icon icon-table2"></i> 信息
         </span>
         <span style="float: right;">
+          <el-button type="primary" size="mini" style="margin-right: 5px" @click="reInput" v-if="formData.InFlag == '3'">确认重新准入</el-button>
           <el-button plain icon="el-icon-right" size="mini" style="margin-right: 5px" @click="nextTab">下一步</el-button>
           <el-popover>
             <el-steps :active="formData.Step" direction="vertical" align-center finish-status="success">
@@ -404,6 +405,7 @@
           DesignerTotal: 0,
           SkillerTotal: 0,
           Remark: '',
+          InFlag: '',
           IsDelete: '',
           CreateOn: '',
           CreateUserId: '',
@@ -478,6 +480,31 @@
       this.Jurisdiction()
     },
     methods: {
+      reInput () {
+        this.$confirm('确认可以重新提交准入申请', '提示', {
+          confirmButtonText: '确认',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          let params = {
+            InFlag: '4'
+          }
+          apiCert.reInput(this.certId, params, this.$axios).then(res => {
+            if (res.data.code === 0) {
+              this.initDatas()
+              this.$message({
+                type: 'success',
+                message: res.data.message
+              })
+            } else {
+              this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+        })
+      },
       Jurisdiction () {
         api.getJurisdiction(this.$axios).then(res => {
           if (!res.data.item) {

+ 28 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstore/_opera/goodsedit.vue

@@ -11,6 +11,7 @@
           <i class="icon icon-table2"></i> 信息
         </span>
         <span style="float: right;">
+          <el-button type="primary" size="mini" style="margin-right: 5px" @click="reInput" v-if="formData.InFlag == '3'">确认重新准入</el-button>
           <el-button plain icon="el-icon-right" size="mini" style="margin-right: 5px" @click="nextTab">下一步</el-button>
           <el-popover>
             <el-steps :active="formData.Step" direction="vertical" align-center finish-status="success">
@@ -381,6 +382,7 @@
           DesignerTotal: 0,
           SkillerTotal: 0,
           Remark: '',
+          InStyle: '',
           IsDelete: '',
           CreateOn: '',
           CreateUserId: '',
@@ -456,6 +458,31 @@
       this.Jurisdiction()
     },
     methods: {
+      reInput () {
+        this.$confirm('确认可以重新提交准入申请', '提示', {
+          confirmButtonText: '确认',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          let params = {
+            InFlag: '4'
+          }
+          apiCert.reInput(this.certId, params, this.$axios).then(res => {
+            if (res.data.code === 0) {
+              this.initDatas()
+              this.$message({
+                type: 'success',
+                message: res.data.message
+              })
+            } else {
+              this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+        })
+      },
       Jurisdiction () {
         api.getJurisdiction(this.$axios).then(res => {
           if (!res.data.item) {
@@ -613,6 +640,7 @@
         this.isCanUpdateSupplier(this.formData.Id)
         if (this.formData.Id) {
           api.getEntityAndCert(this.certId, this.$axios).then(res => {
+            console.log(res, '================')
             this.formData = res.data
             this.formDataCert.WorkerTotal = this.formData.WorkerTotal
             this.formDataCert.ContractNum = this.formData.ContractNum

+ 27 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstore/_opera/techedit.vue

@@ -11,6 +11,7 @@
           <i class="icon icon-table2"></i> 信息
         </span>
         <span style="float: right;">
+          <el-button type="primary" size="mini" style="margin-right: 5px" @click="reInput" v-if="formData.InFlag == '3'">确认重新准入</el-button>
           <el-button plain icon="el-icon-right"  size="mini" style="margin-right: 5px" @click="nextTab">下一步</el-button>
           <el-popover>
             <el-steps :active="formData.Step" direction="vertical" align-center finish-status="success">
@@ -411,6 +412,7 @@
           DesignerTotal: 0,
           SkillerTotal: 0,
           Remark: '',
+          InFlag: '',
           IsDelete: '',
           CreateOn: '',
           CreateUserId: '',
@@ -486,6 +488,31 @@
       this.Jurisdiction()
     },
     methods: {
+      reInput () {
+        this.$confirm('确认可以重新提交准入申请', '提示', {
+          confirmButtonText: '确认',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          let params = {
+            InFlag: '4'
+          }
+          apiCert.reInput(this.certId, params, this.$axios).then(res => {
+            if (res.data.code === 0) {
+              this.initDatas()
+              this.$message({
+                type: 'success',
+                message: res.data.message
+              })
+            } else {
+              this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+        })
+      },
       Jurisdiction () {
         api.getJurisdiction(this.$axios).then(res => {
           if (!res.data.item) {