Kaynağa Gözat

不良记录

lining 5 yıl önce
ebeveyn
işleme
217a657ba8

+ 27 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/badrecord.go

@@ -244,6 +244,15 @@ func (this *BadRecordController) AddBadRecord() {
 				supplierCert.InFlag=rmodel.Status
 				cols := []string{ "InFlag"}
 				err=svc.UpdateEntityBywheretbl(OilSupplierCertName,&supplierCert, cols,"SupplierId='"+companyCode+"' and SupplierTypeCode='01'")
+				var badhis BadRecord.BadRecordHistory
+				badhis.SupplierId, _ = strconv.Atoi(companyCode)
+				badhis.Createuserid, _ = strconv.Atoi(this.User.Id)
+				badhis.Createon = time.Now()
+				badhis.Createby = this.User.Realname
+				badhis.SupplierTypeCode = "01"
+				badhis.CertSubStatus = model.Wzstatus
+				badhis.BackReason = model.Wzrecord
+				svc.InsertEntity(&badhis)
 			}else{
 				model.Wzstatus=""
 			}
@@ -255,6 +264,15 @@ func (this *BadRecordController) AddBadRecord() {
 				supplierCert.InFlag = rmodel.Status
 				cols := []string{"InFlag"}
 				err = svc.UpdateEntityBywheretbl(OilSupplierCertName, &supplierCert, cols, "SupplierId='"+companyCode+"' and SupplierTypeCode='02'")
+				var badhis BadRecord.BadRecordHistory
+				badhis.SupplierId, _ = strconv.Atoi(companyCode)
+				badhis.Createuserid, _ = strconv.Atoi(this.User.Id)
+				badhis.Createon = time.Now()
+				badhis.Createby = this.User.Realname
+				badhis.SupplierTypeCode = "02"
+				badhis.CertSubStatus = model.Jjstatus
+				badhis.BackReason = model.Jjrecord
+				svc.InsertEntity(&badhis)
 			}else{
 				model.Jjstatus=""
 			}
@@ -266,6 +284,15 @@ func (this *BadRecordController) AddBadRecord() {
 				supplierCert.InFlag = rmodel.Status
 				cols := []string{"InFlag"}
 				err = svc.UpdateEntityBywheretbl(OilSupplierCertName, &supplierCert, cols, "SupplierId='"+companyCode+"' and SupplierTypeCode='03'")
+				var badhis BadRecord.BadRecordHistory
+				badhis.SupplierId, _ = strconv.Atoi(companyCode)
+				badhis.Createuserid, _ = strconv.Atoi(this.User.Id)
+				badhis.Createon = time.Now()
+				badhis.Createby = this.User.Realname
+				badhis.SupplierTypeCode = "03"
+				badhis.CertSubStatus = model.Jfstatus
+				badhis.BackReason = model.Jfrecord
+				svc.InsertEntity(&badhis)
 			}else{
 				model.Jfstatus=""
 			}

+ 25 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/badrecord/index.vue

@@ -380,7 +380,7 @@
                     </el-select>
                   </el-form-item>
                 </el-col>
-                <el-col :span="24">
+                <el-col :span="24" style="margin-top: 10px">
                   <el-form-item label="不良行为" prop="Record">
                     <el-input type="textarea"
                               size="mini"
@@ -1564,6 +1564,10 @@ export default {
       this.entityForm.CompanyName = row.Companyname
       this.badForm.CompanyCode = row.Companycode
       this.badForm.CompanyName = row.Companyname
+      this.badForm.Record = ''
+      this.badForm.Status = ''
+      this.badForm.Type = ''
+
       this.serachCertType(row.Companycode)
       this.serachCertByCompany(row.Companycode)
 
@@ -1674,7 +1678,7 @@ export default {
                   message: res.data.message
                 })
                 // 清空添加表
-                this.clearEntityForm()
+                // this.clearEntityForm()
                 this.addShowTitle = '添加不良行为'
               } else {
                 this.$message({
@@ -1750,16 +1754,33 @@ export default {
       this.goodsList = []
       this.basisList = []
       this.tcList = []
+
+      this.wzList = []
+      this.jjList = []
+      this.jfList = []
+
+      this.wzSize = 10
+      this.jjSize = 10
+      this.jfSize = 10
+
       // this.certNames = ''
       this.goodsSize = 10
       this.basisSize = 10
       this.tcSize = 10
 
+      this.wzCurrentPage = 1
+      this.jjCurrentPage = 1
+      this.jfCurrentPage = 1
+
       // this.entityForm.CompanyName = ''
       this.currentGoodsPage = 1
       this.currentBasisPage = 1
       this.currentTCPage = 1
 
+      this.wzCurrentItemCount = 0
+      this.jjCurrentItemCount = 0
+      this.jfCurrentItemCount = 0
+
       this.currentGoodsItemCount = 0
       this.currentBasisItemCount = 0
       this.currentTCItemCount = 0
@@ -1769,6 +1790,8 @@ export default {
       this.entityForm.CompanyCode = ''
       this.entityForm.CompanyName = ''
       this.clearEntityForm()
+      this.badForm.CompanyCode = ''
+      this.badForm.CompanyName = ''
       this.isChooseDisable = false
       this.addshow = true
     },