Procházet zdrojové kódy

准入添加字段,年审bug修改

huahaiyan před 6 roky
rodič
revize
7e802f9efa

+ 2 - 0
src/dashoo.cn/backend/api/business/oilsupplier/supplier/oilsupplier.go

@@ -21,6 +21,8 @@ type OilSupplier struct {
 	CountryTaxNo        string    `xorm:"comment('税务登记证国税编号') VARCHAR(50)"`
 	LocalTaxNo          string    `xorm:"comment('税务登记证地税编号') VARCHAR(50)"`
 	Address             string    `xorm:"comment('单位地址') VARCHAR(500)"`
+	AllAddress          string    `xorm:"comment('注册地址') VARCHAR(500)"`
+	LinkAllAddress      string    `xorm:"comment('通信地址') VARCHAR(500)"`
 	Province            string    `xorm:"comment('省直辖市') VARCHAR(20)"`
 	City                string    `xorm:"comment('地市区县') VARCHAR(20)"`
 	Street              string    `xorm:"comment('街道') VARCHAR(20)"`

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

@@ -1,9 +1,9 @@
 package oilsupplier
 
 import (
-	msg2 "dashoo.cn/backend/api/business/msg"
 	"dashoo.cn/backend/api/business/audithistory"
 	"dashoo.cn/backend/api/business/baseUser"
+	msg2 "dashoo.cn/backend/api/business/msg"
 	"dashoo.cn/backend/api/business/oilsupplier/infochange"
 	"dashoo.cn/backend/api/business/oilsupplier/suppliercert"
 	"dashoo.cn/backend/api/business/organize"
@@ -296,6 +296,38 @@ func (this *AnnualAuditController) GetEntity() {
 	this.ServeJSON()
 }
 
+// @Title 获取公司信息
+// @Description 根据创建用户Id和增项类别号获取公司信息
+// @Success 200 {object}
+// @router /getsupplier [get]
+func (this *AnnualAuditController) GetSupplier() {
+	SuppTypeCode := this.GetString("SuppTypeCode")
+	svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
+	where := "1=1 "
+	if SuppTypeCode != "" {
+		where = " WHERE b.Id is NOT NULL AND a.SupplierTypeCode = '" + SuppTypeCode + "' and (a.InFlag='1' or a.InFlag='2')"
+	}else {
+		where = " WHERE b.Id is NOT NULL AND (a.InFlag='1' or a.InFlag='2')"
+	}
+	var registerUser register.OilCorporateInfo
+	sql := " UserName='" + this.User.Username + "'"
+	svc.GetEntity(&registerUser,sql)
+	//企业用户必须加创建人条件
+	if this.User.IsCompanyUser == 1 {
+		where = where + " and (b.CreateUserId = '" + this.User.Id + "' or b.CommercialNo='"+registerUser.CommercialNo+"')"
+		//if this.User.IsCompanyUser == 1 {
+		//	where = where + " and b.CreateUserId = '" + this.User.Id + "'"
+	}
+
+	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
+
+	model, _ := svc.DBE.QueryString(sqlStr)
+
+	this.Data["json"] = &model
+	this.ServeJSON()
+}
+
 // @Title 添加
 // @Description 直接新增年审
 // @Success	200	{object} controllers.Request

+ 8 - 2
src/dashoo.cn/frontend_web/src/components/oilsupplier/basisinfo.vue

@@ -101,7 +101,7 @@
           <el-form-item label="注册地址" prop="Province">
             <el-row>
               <el-col :span="10">
-                <el-cascader :options="countryoptions" :props="countryprops" :disabled="!canUpdateSupplier"
+                <el-cascader ref="cascaderAdd" :options="countryoptions" :props="countryprops" :disabled="!canUpdateSupplier"
                              :readonly="!canUpdateSupplier" placeholder="省市区" v-model="CityAry" style="width: 100%"
                              @change="handleAreaChange"></el-cascader>
               </el-col>
@@ -125,7 +125,7 @@
           <el-form-item label="通信地址" prop="LinkProvince">
             <el-row>
               <el-col :span="10">
-                <el-cascader :options="countryoptions" :props="countryprops" :disabled="!canUpdateSupplier"
+                <el-cascader ref="cascaderAddrLink" :options="countryoptions" :props="countryprops" :disabled="!canUpdateSupplier"
                              placeholder="省市区" v-model="LinkCityAry" style="width: 100%"
                              @change="handleLinkAreaChange">
                 </el-cascader>
@@ -536,6 +536,8 @@
           value: '3',
           label: '常规'
         }],
+        address:[],
+        linkaddress:[],
         companyReadonly: false,
         companynames: [],
         UnitRelationOptions: [],
@@ -817,12 +819,16 @@
         this.formData.City = value[1]
         this.formData.Street = value[2]
         //this.formData.ZipCode = value[2]
+        this.address = this.$refs['cascaderAdd'].currentLabels
+        this.formData.AllAddress= this.address[0]+'/'+this.address[1]+'/'+this.address[2]
       },
       handleLinkAreaChange(value) {
         this.formData.LinkProvince = value[0]
         this.formData.LinkCity = value[1]
         this.formData.LinkStreet = value[2]
         //this.formData.LinkZipCode = value[2]
+        this.linkaddress = this.$refs['cascaderAddrLink'].currentLabels
+        this.formData.LinkAllAddress= this.linkaddress[0]+'/'+this.linkaddress[1]+'/'+this.linkaddress[2]
       },
 
       formatDateTime(date) {

+ 8 - 2
src/dashoo.cn/frontend_web/src/components/oilsupplier/goodsinfo.vue

@@ -147,7 +147,7 @@
           <el-form-item label="注册地址" prop="Province">
             <el-row>
               <el-col :span="10">
-                <el-cascader :options="countryoptions" :props="countryprops" maxlength="20" :disabled="!canUpdateSupplier" placeholder="省市区"
+                <el-cascader ref="cascaderAdd" :options="countryoptions" :props="countryprops" maxlength="20" :disabled="!canUpdateSupplier" placeholder="省市区"
                              v-model="CityAry" style="width: 100%" @change="handleAreaChange">
                 </el-cascader>
               </el-col>
@@ -169,7 +169,7 @@
           <el-form-item label="通信地址" prop="LinkProvince" >
             <el-row>
               <el-col :span="10">
-                <el-cascader :options="countryoptions" :props="countryprops" :disabled="!canUpdateSupplier" placeholder="省市区"
+                <el-cascader ref="cascaderAddrLink" :options="countryoptions" :props="countryprops" :disabled="!canUpdateSupplier" placeholder="省市区"
                              v-model="LinkCityAry" maxlength="20" style="width: 100%" @change="handleLinkAreaChange">
                 </el-cascader>
               </el-col>
@@ -585,6 +585,8 @@
       };
 
       return {
+        address:[],
+        linkaddress:[],
         showorhidflag:'hid',
         selectoptions: [{
           value: '1',
@@ -908,12 +910,16 @@
         this.formData.City = value[1]
         this.formData.Street = value[2]
         //this.formData.ZipCode = value[2]
+        this.linkaddress = this.$refs['cascaderAddrLink'].currentLabels
+        this.formData.LinkAllAddress= this.linkaddress[0]+'/'+this.linkaddress[1]+'/'+this.linkaddress[2]
       },
       handleLinkAreaChange(value) {
         this.formData.LinkProvince = value[0]
         this.formData.LinkCity = value[1]
         this.formData.LinkStreet = value[2]
         //this.formData.LinkZipCode = value[2]
+        this.linkaddress = this.$refs['cascaderAddrLink'].currentLabels
+        this.formData.LinkAllAddress= this.linkaddress[0]+'/'+this.linkaddress[1]+'/'+this.linkaddress[2]
       },
 
       formatDateTime (date) {

+ 8 - 2
src/dashoo.cn/frontend_web/src/components/oilsupplier/techinfo.vue

@@ -100,7 +100,7 @@
           <el-form-item label="注册地址" prop="Province" >
             <el-row>
               <el-col :span="10">
-                <el-cascader :options="countryoptions" :props="countryprops" maxlength="20" placeholder="省市区"
+                <el-cascader ref="cascaderAdd"  :options="countryoptions" :props="countryprops" maxlength="20" placeholder="省市区"
                              v-model="CityAry" style="width: 100%" @change="handleAreaChange" :disabled="!canUpdateSupplier">
                 </el-cascader>
               </el-col>
@@ -122,7 +122,7 @@
           <el-form-item label="通信地址" prop="LinkProvince" >
             <el-row>
               <el-col :span="10">
-                <el-cascader :options="countryoptions" :props="countryprops" placeholder="省市区"
+                <el-cascader ref="cascaderAddrLink" :options="countryoptions" :props="countryprops" placeholder="省市区"
                              v-model="LinkCityAry" :disabled="!canUpdateSupplier" maxlength="20" style="width: 100%" @change="handleLinkAreaChange">
                 </el-cascader>
               </el-col>
@@ -506,6 +506,8 @@
         }
       };
       return {
+        address:[],
+        linkaddress:[],
          showorhidflag:'hid',
          selectoptions: [{
           value: '1',
@@ -800,12 +802,16 @@
         this.formData.City = value[1]
         this.formData.Street = value[2]
         //this.formData.ZipCode = value[2]
+        this.linkaddress = this.$refs['cascaderAddrLink'].currentLabels
+        this.formData.LinkAllAddress= this.linkaddress[0]+'/'+this.linkaddress[1]+'/'+this.linkaddress[2]
       },
       handleLinkAreaChange (value) {
         this.formData.LinkProvince = value[0]
         this.formData.LinkCity = value[1]
         this.formData.LinkStreet = value[2]
         //this.formData.LinkZipCode = value[2]
+        this.linkaddress = this.$refs['cascaderAddrLink'].currentLabels
+        this.formData.LinkAllAddress= this.linkaddress[0]+'/'+this.linkaddress[1]+'/'+this.linkaddress[2]
       },
 
       formatDateTime (date) {

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

@@ -381,7 +381,7 @@
         let params = {
           SuppTypeCode: '02',
         }
-        _this.$axios.get('/suppliercertappend/getsupplier', {
+        _this.$axios.get('/annualaudit/getsupplier', {
             params
           })
           .then(res => {

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

@@ -380,7 +380,7 @@
         let params = {
           SuppTypeCode: '01',
         }
-        _this.$axios.get('/suppliercertappend/getsupplier', {
+        _this.$axios.get('/annualaudit/getsupplier', {
             params
           })
           .then(res => {

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

@@ -375,7 +375,7 @@
         let params = {
           SuppTypeCode: '',
         }
-        _this.$axios.get('/suppliercertappend/getsupplier', {params})
+        _this.$axios.get('/annualaudit/getsupplier', {params})
           .then(res => {
             _this.supplierList = res.data
             if (_this.supplierList) {

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

@@ -379,7 +379,7 @@
         let params = {
           SuppTypeCode: '03',
         }
-        _this.$axios.get('/suppliercertappend/getsupplier', {
+        _this.$axios.get('/annualaudit/getsupplier', {
             params
           })
           .then(res => {

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

@@ -359,7 +359,7 @@
         let params = {
           SuppTypeCode: '',
         }
-        _this.$axios.get('/suppliercertappend/getsupplier', {
+        _this.$axios.get('/annualaudit/getsupplier', {
             params
           })
           .then(res => {

+ 3 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/basisedit.vue

@@ -456,6 +456,8 @@
         },
         formData: {
           Id: '',
+          AllAddress: '',
+          LinkAllAddress: '',
           SupplierName: '',
           CredentialFlag: '1',
           OilCertificateNo: '',
@@ -1024,6 +1026,7 @@
         }
 
         let valid = true
+        this
         if (this.formDataCert.Status <= 0 && this.activeName === '0') {
           valid = this.saveEntity()
         } else if (this.formDataCert.Status <= 0 && this.activeName === '1') {

+ 2 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/goodsedit.vue

@@ -459,6 +459,8 @@
         },
         formData: {
           Id: "",
+          AllAddress: '',
+          LinkAllAddress: '',
           SupplierName: "",
           CredentialFlag: '1',
           OilCertificateNo: "",

+ 2 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/techedit.vue

@@ -451,6 +451,8 @@
         },
         formData: {
           Id: '',
+          AllAddress: '',
+          LinkAllAddress: '',
           SupplierName: '',
           CredentialFlag: '1',
           OilCertificateNo: '',