2
3
فهرست منبع

不良记录 目录

lining 5 سال پیش
والد
کامیت
1a63f983a6

+ 26 - 14
src/dashoo.cn/backend/api/controllers/oilsupplier/badrecord.go

@@ -573,6 +573,7 @@ func (this *BadRecordController) SerachGoodsCertByCompany() {
 	size := this.GetString("_size")
 	certName := this.GetString("_certName")
 	certSubStatus := this.GetString("_certSubStatus")
+	badStatus := this.GetString("badStatus")
 
 	sqlAdd:=""
 	cwhere := ""
@@ -584,12 +585,15 @@ func (this *BadRecordController) SerachGoodsCertByCompany() {
 		sqlAdd= sqlAdd + " and (a.CertSubStatus = '"+certSubStatus+"')"
 		cwhere = cwhere + " and (CertSubStatus = '"+certSubStatus+"')"
 	}
+	if badStatus != "" {
+		sqlAdd = sqlAdd + " and b.Id is not null"
+	}
 	sizeIntPage,_:=strconv.Atoi(size)
 	currentIntPage,_:=strconv.Atoi(currentPage)
 	ye:=strconv.Itoa((currentIntPage-1)*sizeIntPage)
 
 	svc := BadRecord.GetBadRecordService(utils.DBE) //获得数据库引擎
-	var tempEntity suppliercertsub.OilSupplierCertSub
+	//var tempEntity suppliercertsub.OilSupplierCertSub
 
 	var goodslist []map[string]string
 	sql := "select a.*, b.CreateOn badCreateOn, b.BackReason from " + OilSupplierCertSubName + " a"
@@ -597,11 +601,11 @@ func (this *BadRecordController) SerachGoodsCertByCompany() {
 	sql = sql + " where a.SupplierId='"+companyId+"' and a.SupplierTypeCode='01' "+ sqlAdd +" order by a.CertSubStatus desc,a.Id asc limit "+ye+","+size+""
 	goodslist, _ = svc.DBE.QueryString(sql)
 
-	goodsTotal,_:=svc.GetCount(tempEntity,"SupplierId='"+companyId+"' and SupplierTypeCode='01' "+ cwhere +"")
-
+	//goodsTotal,_:=svc.GetCount(tempEntity,"SupplierId='"+companyId+"' and SupplierTypeCode='01' "+ cwhere +"")
+	goodsTotal := len(goodslist)
 	var datainfo DataInfo
 	datainfo.Items = goodslist
-	datainfo.CurrentItemCount = goodsTotal
+	datainfo.CurrentItemCount = int64(goodsTotal)
 	this.Data["json"] = &datainfo
 	this.ServeJSON()
 
@@ -617,6 +621,7 @@ func (this *BadRecordController) SerachBasisCertByCompany() {
 	size := this.GetString("_size")
 	certName := this.GetString("_certName")
 	certSubStatus := this.GetString("_certSubStatus")
+	badStatus := this.GetString("badStatus")
 	sqlAdd:=""
 	cwhere := ""
 	if certName!=""{
@@ -628,13 +633,15 @@ func (this *BadRecordController) SerachBasisCertByCompany() {
 		sqlAdd = sqlAdd + " and (a.CertSubStatus = '"+certSubStatus+"')"
 		cwhere = cwhere + " and (CertSubStatus = '"+certSubStatus+"')"
 	}
-
+	if badStatus != "" {
+		sqlAdd = sqlAdd + " and b.Id is not null"
+	}
 	sizeIntPage,_:=strconv.Atoi(size)
 	currentIntPage,_:=strconv.Atoi(currentPage)
 	ye:=strconv.Itoa((currentIntPage-1)*sizeIntPage)
 
 	svc := BadRecord.GetBadRecordService(utils.DBE) //获得数据库引擎
-	var tempEntity suppliercertsub.OilSupplierCertSub
+	//var tempEntity suppliercertsub.OilSupplierCertSub
 
 	var basislist []map[string]string
 	sql := "select a.*, b.CreateOn badCreateOn, b.BackReason from " + OilSupplierCertSubName + " a"
@@ -642,10 +649,13 @@ func (this *BadRecordController) SerachBasisCertByCompany() {
 	sql = sql + " where a.SupplierId='"+companyId+"' and a.SupplierTypeCode='02' "+ sqlAdd +" order by a.CertSubStatus desc,a.Id asc limit "+ye+","+size+""
 	basislist, _ = svc.DBE.QueryString(sql)
 
-	basisTotal,_:=svc.GetCount(tempEntity,"SupplierId='"+companyId+"' and SupplierTypeCode='02' "+ cwhere +"")
+	//basisTotal,_:=svc.GetCount(tempEntity,"SupplierId='"+companyId+"' and SupplierTypeCode='02' "+ cwhere +"")
+
+	basisTotal := len(basislist)
+
 	var datainfo DataInfo
 	datainfo.Items = basislist
-	datainfo.CurrentItemCount = basisTotal
+	datainfo.CurrentItemCount = int64(basisTotal)
 	this.Data["json"] = &datainfo
 	this.ServeJSON()
 
@@ -661,7 +671,7 @@ func (this *BadRecordController) SerachTCCertByCompany() {
 	size := this.GetString("_size")
 	certName := this.GetString("_certName")
 	certSubStatus := this.GetString("_certSubStatus")
-
+	badStatus := this.GetString("badStatus")
 	sqlAdd:=""
 	cwhere := ""
 	if certName!=""{
@@ -672,13 +682,15 @@ func (this *BadRecordController) SerachTCCertByCompany() {
 		sqlAdd = sqlAdd + " and (a.CertSubStatus = '"+certSubStatus+"')"
 		cwhere = cwhere + " and (CertSubStatus = '"+certSubStatus+"')"
 	}
-
+	if badStatus != "" {
+		sqlAdd = sqlAdd + " and b.Id is not null"
+	}
 	sizeIntPage,_:=strconv.Atoi(size)
 	currentIntPage,_:=strconv.Atoi(currentPage)
 	ye:=strconv.Itoa((currentIntPage-1)*sizeIntPage)
 
 	svc := BadRecord.GetBadRecordService(utils.DBE) //获得数据库引擎
-	var tempEntity suppliercertsub.OilSupplierCertSub
+	//var tempEntity suppliercertsub.OilSupplierCertSub
 
 	var tclist []map[string]string
 	sql := "select a.*, b.CreateOn badCreateOn, b.BackReason from " + OilSupplierCertSubName + " a"
@@ -686,11 +698,11 @@ func (this *BadRecordController) SerachTCCertByCompany() {
 	sql = sql + " where a.SupplierId='"+companyId+"' and a.SupplierTypeCode='03' "+ sqlAdd +" order by a.CertSubStatus desc,a.Id asc limit "+ye+","+size+""
 	tclist, _ = svc.DBE.QueryString(sql)
 
-	tcTotal,_:=svc.GetCount(tempEntity,"SupplierId='"+companyId+"' and SupplierTypeCode='03' "+ cwhere +"")
-
+	//tcTotal,_:=svc.GetCount(tempEntity,"SupplierId='"+companyId+"' and SupplierTypeCode='03' "+ cwhere +"")
+	tcTotal := len(tclist)
 	var datainfo DataInfo
 	datainfo.Items = tclist
-	datainfo.CurrentItemCount = tcTotal
+	datainfo.CurrentItemCount = int64(tcTotal)
 	this.Data["json"] = &datainfo
 	this.ServeJSON()
 

+ 11 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/badrecord/index.vue

@@ -1230,6 +1230,7 @@ export default {
               })
               this.innerVisible = false
               this.initCert()
+              this.addSupBad()
             }
           }).catch(err => {
             console.error(err)
@@ -1693,6 +1694,16 @@ export default {
         }
       })
     },
+    addSupBad () {
+      setapi
+        .addBadRecord(this.badForm, this.$axios)
+        .then(res => {
+          this.initDatas()
+        })
+        .catch(err => {
+          console.error(err)
+        })
+    },
 
     initCompany (event) {
       if (event != null) {

+ 74 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/oilcatalog/income.vue

@@ -77,10 +77,10 @@
                      :page-sizes="[10, 15, 20, 25]" :page-size="size" layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
       </el-pagination>
     </el-card>
-    <el-dialog title="收入业务"
+    <el-dialog :title="cardTitle"
                :visible.sync="addshow"
                width="60%">
-      <el-form label-width="135px" ref="EntityForm" :model="formData">
+      <el-form label-width="135px" ref="EntityForm" :model="formData" :rules="rules1">
         <el-row>
           <el-col :span="12">
             <el-form-item label="企业名称" prop="CompanyName">
@@ -155,6 +155,37 @@
           callback()
         }
       }
+      var checkLegalPersonId = (rule, value, callback) => {
+        if (value === '') {
+          callback(new Error('请输入身份证号'))
+        } else {
+          let re1 = /(^\d{18}$)|(^\d{17}(\d|X|x)$)/
+          if (!re1.test(this.formData.IDCode)) {
+            callback(new Error('请输入正确格式的法定代表人身份证号'))
+          } else {
+            callback()
+          }
+        }
+      }
+      var checkCommercialNo = (rule, value, callback) => {
+        if (value === '') {
+          callback(new Error('请输入统一社会信用代码'))
+        } else {
+          let re4 = /^[^_IOZSVa-z\W]{2}\d{6}[^_IOZSVa-z\W]{10}$/g
+          if (!re4.test(this.formData.USCCode)) {
+            callback(new Error('请填写正确的18位统一社会信用代码'))
+          } else {
+            callback()
+          }
+        }
+      }
+      var checkMoney = (rule, value, callback) => {
+        if (value < 0) {
+          callback(new Error('注册资金不能小于0'))
+        } else {
+          callback()
+        }
+      }
 
       return {
         btnName: '打开',
@@ -194,6 +225,30 @@
             trigger: 'blur'
           }]
         },
+        rules1: {
+          CompanyName: [
+            { required: true, message: '供方名称不能为空', trigger: 'blur' }
+          ],
+          LegalPerson: [
+            { required: true, message: '法人姓名不能为空', trigger: 'blur' }
+          ],
+          IDCode: [
+            { required: true, validator: checkLegalPersonId, trigger: 'change' }
+          ],
+          Address: [
+            { required: true, message: '注册地址不能为空', trigger: 'blur' }
+          ],
+          USCCode: [
+            { required: true, validator: checkCommercialNo, trigger: 'change' }
+          ],
+          RegCapital: [
+            { required: true, validator: checkMoney, trigger: 'change' },
+            { type: 'number', message: '只能输入数字', trigger: 'blur' }
+          ],
+          RecordScope: [
+            { required: true, message: '申请备案范围不能为空', trigger: 'blur' }
+          ]
+        },
         formData: {
           Id: '',
           SubId: '',
@@ -215,7 +270,24 @@
         }
       }
     },
+    watch: {
+      $route (val) {
+        this.formData.CatalogType = parseInt(val.query.catalogType)
+        if (val.query.catalogType === '6') {
+          this.cardTitle = '外部市场'
+        } else if (val.query.catalogType === '7') {
+          this.cardTitle = '收入业务'
+        }
+        this.initDatas()
+      }
+    },
     created () {
+      this.formData.CatalogType = parseInt(this.$route.query.catalogType)
+      if (this.$route.query.catalogType === '6') {
+        this.cardTitle = '外部市场'
+      } else if (this.$route.query.catalogType === '6') {
+        this.cardTitle = '收入业务'
+      }
       this.isAccess()
       this.initDatas()
     },

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/oilcatalog/index.vue

@@ -248,7 +248,7 @@
       } else if (this.$route.query.catalogType === '5') {
         this.cardTitle = '特殊业务'
       } else if (this.$route.query.catalogType === '6') {
-        this.cardTitle = '创收业务'
+        this.cardTitle = '外部市场'
       }
       this.initDatas()
     },

+ 6 - 3
src/dashoo.cn/frontend_web/src/pages/select/companyselect/index.vue

@@ -1503,7 +1503,8 @@ export default {
         _currentPage: this.currentGoodsPage,
         _companyId: this.companyId,
         _certName: this.certChooseName,
-        _certSubStatus: this.CertSubStatus
+        _certSubStatus: this.CertSubStatus,
+        badStatus: 'badStatus'
       }
       setapi
         .serachGoodsCertByCompany(params, this.$axios)
@@ -1529,7 +1530,8 @@ export default {
         _currentPage: this.currentBasisPage,
         _companyId: this.companyId,
         _certName: this.certChooseName,
-        _certSubStatus: this.CertSubStatus
+        _certSubStatus: this.CertSubStatus,
+        badStatus: 'badStatus'
       }
       setapi
         .serachBasisCertByCompany(params, this.$axios)
@@ -1554,7 +1556,8 @@ export default {
         _currentPage: this.currentTCPage,
         _companyId: this.companyId,
         _certName: this.certChooseName,
-        _certSubStatus: this.CertSubStatus
+        _certSubStatus: this.CertSubStatus,
+        badStatus: 'badStatus'
       }
       setapi
         .serachTCCertByCompany(params, this.$axios)