Преглед изворни кода

增加各组件筛选条件

shihang пре 6 година
родитељ
комит
36c1a45e43

+ 14 - 13
src/dashoo.cn/backend/api/business/oilsupplier/majorequip/majorequip.go

@@ -5,17 +5,18 @@ import (
 )
 
 type OilEnterpriseMajorEquipment struct {
-	Id             int       `xorm:"not null pk autoincr INT(10)"`
-	SupplierCertId int       `xorm:"INT(10)"`
-	MainEquipment  string    `xorm:"VARCHAR(100)"`
-	Specifications string    `xorm:"VARCHAR(100)"`
-	Number         string    `xorm:"CHAR(10)"`
-	Remark         string    `xorm:"VARCHAR(500)"`
-	IsDelete       int       `xorm:"INT(10)"`
-	CreateOn       time.Time `xorm:"DATETIME created"` //创建时间
-	CreateUserId   int       `xorm:"INT(10)"`
-	CreateBy       string    `xorm:"VARCHAR(50)"` //创建人
-	ModifiedOn     time.Time `xorm:"DATETIME updated"`
-	ModifiedUserId int       `xorm:"INT(10)"`
-	ModifiedBy     string    `xorm:"VARCHAR(50)"`
+	Id               int       `xorm:"not null pk autoincr INT(10)"`
+	SupplierCertId   int       `xorm:"INT(10)"`
+	SupplierTypeCode string    `xorm:"VARCHAR(5)"`
+	MainEquipment    string    `xorm:"VARCHAR(100)"`
+	Specifications   string    `xorm:"VARCHAR(100)"`
+	Number           string    `xorm:"CHAR(10)"`
+	Remark           string    `xorm:"VARCHAR(500)"`
+	IsDelete         int       `xorm:"INT(10)"`
+	CreateOn         time.Time `xorm:"DATETIME created"` //创建时间
+	CreateUserId     int       `xorm:"INT(10)"`
+	CreateBy         string    `xorm:"VARCHAR(50)"` //创建人
+	ModifiedOn       time.Time `xorm:"DATETIME updated"`
+	ModifiedUserId   int       `xorm:"INT(10)"`
+	ModifiedBy       string    `xorm:"VARCHAR(50)"`
 }

+ 1 - 0
src/dashoo.cn/backend/api/business/oilsupplier/patent/patent.go

@@ -5,6 +5,7 @@ import "time"
 type OilPatentStatistical struct {
 	Id                int       `xorm:"not null pk autoincr INT(10)"`
 	SupplierCertId    int       `xorm:"INT(10)"`
+	SupplierTypeCode  string    `xorm:"VARCHAR(5)"`
 	Name              string    `xorm:"VARCHAR(100)"`
 	Content           string    `xorm:"VARCHAR(100)"`
 	ApprovalAuthority string    `xorm:"VARCHAR(50)"`

+ 17 - 16
src/dashoo.cn/backend/api/business/oilsupplier/performance/performance.go

@@ -3,20 +3,21 @@ package performance
 import "time"
 
 type OilThreeYearsPerformance struct {
-	Id             int       `xorm:"not null pk autoincr INT(10)"`
-	SupplierCertId int       `xorm:"INT(10)"`
-	ProjectName    string    `xorm:"VARCHAR(100)"`
-	BearContent    string    `xorm:"VARCHAR(100)"`
-	OwnerUnit      string    `xorm:"VARCHAR(100)"`
-	StartTime      time.Time `xorm:"DATETIME"`
-	StopTime       time.Time `xorm:"DATETIME"`
-	Tudge          string    `xorm:"VARCHAR(50)"`
-	Remark         string    `xorm:"VARCHAR(500)"`
-	IsDelete       int       `xorm:"INT(10)"`
-	CreateOn       time.Time `xorm:"DATETIME created"` //创建时间
-	CreateUserId   int       `xorm:"INT(10)"`
-	CreateBy       string    `xorm:"VARCHAR(50)"` //创建人
-	ModifiedOn     time.Time `xorm:"DATETIME updated"`
-	ModifiedUserId int       `xorm:"INT(10)"`
-	ModifiedBy     string    `xorm:"VARCHAR(50)"`
+	Id               int       `xorm:"not null pk autoincr INT(10)"`
+	SupplierCertId   int       `xorm:"INT(10)"`
+	SupplierTypeCode string    `xorm:"VARCHAR(5)"`
+	ProjectName      string    `xorm:"VARCHAR(100)"`
+	BearContent      string    `xorm:"VARCHAR(100)"`
+	OwnerUnit        string    `xorm:"VARCHAR(100)"`
+	StartTime        time.Time `xorm:"DATETIME"`
+	StopTime         time.Time `xorm:"DATETIME"`
+	Tudge            string    `xorm:"VARCHAR(50)"`
+	Remark           string    `xorm:"VARCHAR(500)"`
+	IsDelete         int       `xorm:"INT(10)"`
+	CreateOn         time.Time `xorm:"DATETIME created"` //创建时间
+	CreateUserId     int       `xorm:"INT(10)"`
+	CreateBy         string    `xorm:"VARCHAR(50)"` //创建人
+	ModifiedOn       time.Time `xorm:"DATETIME updated"`
+	ModifiedUserId   int       `xorm:"INT(10)"`
+	ModifiedBy       string    `xorm:"VARCHAR(50)"`
 }

+ 14 - 13
src/dashoo.cn/backend/api/business/oilsupplier/winning/winning.go

@@ -3,17 +3,18 @@ package winning
 import "time"
 
 type OilWinningProject struct {
-	Id             int       `xorm:"not null pk autoincr INT(10)"`
-	SupplierCertId int       `xorm:"INT(10)"`
-	AwardName      string    `xorm:"VARCHAR(100)"`
-	Authorities    string    `xorm:"VARCHAR(100)"`
-	WinningTime    time.Time `xorm:"DATETIME"`
-	Remark         string    `xorm:"VARCHAR(500)"`
-	IsDelete       int       `xorm:"INT(10)"`
-	CreateOn       time.Time `xorm:"DATETIME created"` //创建时间
-	CreateUserId   int       `xorm:"INT(10)"`
-	CreateBy       string    `xorm:"VARCHAR(50)"` //创建人
-	ModifiedOn     time.Time `xorm:"DATETIME updated"`
-	ModifiedUserId int       `xorm:"INT(10)"`
-	ModifiedBy     string    `xorm:"VARCHAR(50)"`
+	Id               int       `xorm:"not null pk autoincr INT(10)"`
+	SupplierCertId   int       `xorm:"INT(10)"`
+	SupplierTypeCode string    `xorm:"VARCHAR(5)"`
+	AwardName        string    `xorm:"VARCHAR(100)"`
+	Authorities      string    `xorm:"VARCHAR(100)"`
+	WinningTime      time.Time `xorm:"DATETIME"`
+	Remark           string    `xorm:"VARCHAR(500)"`
+	IsDelete         int       `xorm:"INT(10)"`
+	CreateOn         time.Time `xorm:"DATETIME created"` //创建时间
+	CreateUserId     int       `xorm:"INT(10)"`
+	CreateBy         string    `xorm:"VARCHAR(50)"` //创建人
+	ModifiedOn       time.Time `xorm:"DATETIME updated"`
+	ModifiedUserId   int       `xorm:"INT(10)"`
+	ModifiedBy       string    `xorm:"VARCHAR(50)"`
 }

+ 5 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/majorequip.go

@@ -36,9 +36,14 @@ func (this *MajorequipController) MajorequipList() {
 		}
 	}
 	SupplierCertId := this.GetString("SupplierCertId")
+	SupplierTypeCode := this.GetString("SupplierTypeCode")
 	if SupplierCertId != "" {
 		where = where + " and SupplierCertId = '" + SupplierCertId + "'"
 	}
+	if SupplierTypeCode != "" {
+		where = where + " and SupplierTypeCode = '" + SupplierTypeCode + "'"
+	}
+
 	total := svc.GetPagingEntitiesWithoutAccCode(page.CurrentPage, page.Size, orderby, asc, &list, where)
 	var datainfo DataInfo
 	datainfo.Items = list

+ 5 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/patent.go

@@ -36,9 +36,14 @@ func (this *PatentController) PatentList() {
 		}
 	}
 	SupplierCertId := this.GetString("SupplierCertId")
+	SupplierTypeCode := this.GetString("SupplierTypeCode")
 	if SupplierCertId != "" {
 		where = where + " and SupplierCertId = '" + SupplierCertId + "'"
 	}
+	if SupplierTypeCode != "" {
+		where = where + " and SupplierTypeCode = '" + SupplierTypeCode + "'"
+	}
+
 	total := svc.GetPagingEntitiesWithoutAccCode(page.CurrentPage, page.Size, orderby, asc, &list, where)
 	var datainfo DataInfo
 	datainfo.Items = list

+ 5 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/performance.go

@@ -36,9 +36,14 @@ func (this *PerformanceController) PerformanceList() {
 		}
 	}
 	SupplierCertId := this.GetString("SupplierCertId")
+	SupplierTypeCode := this.GetString("SupplierTypeCode")
 	if SupplierCertId != "" {
 		where = where + " and SupplierCertId = '" + SupplierCertId + "'"
 	}
+	if SupplierTypeCode != "" {
+		where = where + " and SupplierTypeCode = '" + SupplierTypeCode + "'"
+	}
+
 	total := svc.GetPagingEntitiesWithoutAccCode(page.CurrentPage, page.Size, orderby, asc, &list, where)
 	var datainfo DataInfo
 	datainfo.Items = list

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

@@ -42,7 +42,7 @@ func (this *OilSupplierCertSubController) GetEntityList() {
 	Id := this.GetString("Id")
 	SupplierId := this.GetString("SupplierId")
 	SupplierCertId := this.GetString("SupplierCertId")
-	SupplierTypeCode := this.GetString("SubClassId")
+	SupplierTypeCode := this.GetString("SupplierTypeCode")
 	Code := this.GetString("Code")
 	Name := this.GetString("Name")
 	Remark := this.GetString("Remark")

+ 5 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/winning.go

@@ -36,9 +36,14 @@ func (this *WinningController) WinningList() {
 		}
 	}
 	SupplierCertId := this.GetString("SupplierCertId")
+	SupplierTypeCode := this.GetString("SupplierTypeCode")
 	if SupplierCertId != "" {
 		where = where + " and SupplierCertId = '" + SupplierCertId + "'"
 	}
+	if SupplierTypeCode != "" {
+		where = where + " and SupplierTypeCode = '" + SupplierTypeCode + "'"
+	}
+
 	total := svc.GetPagingEntitiesWithoutAccCode(page.CurrentPage, page.Size, orderby, asc, &list, where)
 	var datainfo DataInfo
 	datainfo.Items = list

+ 7 - 2
src/dashoo.cn/frontend_web/src/components/oilsupplier/equipmentlist.vue

@@ -4,8 +4,8 @@
       <el-table-column label="操作" width="150" align="center" fixed>
         <template slot-scope="scope">
           <el-button type="primary" plain size="mini" title="编辑" @click="openDialog(scope.row)">编辑</el-button>
-            <el-button type="primary" plain size="mini" title="删除" style="margin-left:3px"
-              @click="deletedata(scope.row)">删除</el-button>
+          <el-button type="primary" plain size="mini" title="删除" style="margin-left:3px" @click="deletedata(scope.row)">
+            删除</el-button>
         </template>
       </el-table-column>
       <el-table-column prop="MainEquipment" label="设备名称" show-overflow-tooltip></el-table-column>
@@ -63,6 +63,10 @@
         type: String,
         default: '0'
       },
+      SupplierTypeCode: {
+        type: String,
+        default: '0'
+      },
       visible: {
         type: Boolean,
         default: false
@@ -99,6 +103,7 @@
         let _this = this
         const params = {
           SupplierCertId: this.SupplierCertId,
+          SupplierTypeCode: this.SupplierTypeCode,
           _currentPage: this.currentPage,
           _size: this.size,
         }

+ 5 - 0
src/dashoo.cn/frontend_web/src/components/oilsupplier/patentlist.vue

@@ -76,6 +76,10 @@
         type: String,
         default: '0'
       },
+      SupplierTypeCode: {
+        type: String,
+        default: '0'
+      },
       visible: {
         type: Boolean,
         default: false
@@ -114,6 +118,7 @@
         // request
         const params = {
           SupplierCertId: this.SupplierCertId,
+          SupplierTypeCode: this.SupplierTypeCode,
           _currentPage: this.currentPage,
           _size: this.size,
         }

+ 5 - 0
src/dashoo.cn/frontend_web/src/components/oilsupplier/performancelist.vue

@@ -100,6 +100,10 @@
         type: String,
         default: '0'
       },
+      SupplierTypeCode: {
+        type: String,
+        default: '0'
+      },
       visible: {
         type: Boolean,
         default: false
@@ -139,6 +143,7 @@
         let _this = this
         const params = {
           SupplierCertId: this.SupplierCertId,
+          SupplierTypeCode: this.SupplierTypeCode,
           _currentPage: this.currentPage,
           _size: this.size,
         }

+ 5 - 0
src/dashoo.cn/frontend_web/src/components/oilsupplier/winninglist.vue

@@ -67,6 +67,10 @@
         type: String,
         default: '0'
       },
+      SupplierTypeCode: {
+        type: String,
+        default: '0'
+      },
       visible: {
         type: Boolean,
         default: false
@@ -104,6 +108,7 @@
         // request
         const params = {
           SupplierCertId: this.SupplierCertId,
+          SupplierTypeCode: this.SupplierTypeCode,
           _currentPage: this.currentPage,
           _size: this.size,
         }

+ 24 - 21
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/techedit.vue

@@ -15,7 +15,8 @@
           <!--v-if="formData.Step>=5"-->
           <el-button type="primary" plain size="mini">增项申请</el-button>
           <router-link :to="'/oilsupplier/supplier/techlist'">
-            <el-button type="primary" size="mini" style="margin-left: 8px" v-if="authUser.Profile.IsCompanyUser != 1">返回</el-button>
+            <el-button type="primary" size="mini" style="margin-left: 8px" v-if="authUser.Profile.IsCompanyUser != 1">返回
+            </el-button>
           </router-link>
         </span>
       </div>
@@ -37,7 +38,9 @@
                 <el-button type="primary" size="mini" @click="saveEntity">保存基本信息</el-button>
               </span>
             </div>
-            <tech-info ref="TechInfo" :formData.sync="formData" :dictData.sync="dictData" :authUser="authUser" :canUpdateSupplier="canUpdateSupplier" @selectcompany="changeFormData" @inputcompany="inputCompany"></tech-info>
+            <tech-info ref="TechInfo" :formData.sync="formData" :dictData.sync="dictData" :authUser="authUser"
+              :canUpdateSupplier="canUpdateSupplier" @selectcompany="changeFormData" @inputcompany="inputCompany">
+            </tech-info>
           </el-card>
         </el-tab-pane>
 
@@ -130,8 +133,8 @@
               <span>企业主要装备情况</span>
               <el-button style="float: right; padding: 3px 0" type="text" @click="equipmentdialog">添加</el-button>
             </div>
-            <equipment-list ref="equipmentList" :data="equipmentList" :SupplierCertId="certId" height="360px"
-              style="margin-top: 20px"></equipment-list>
+            <equipment-list ref="equipmentList" :data="equipmentList" :SupplierCertId="certId"
+              :SupplierTypeCode="classId" height="360px" style="margin-top: 20px"></equipment-list>
           </el-card>
 
           <el-card class="box-card" style="margin-top: 10px;">
@@ -139,8 +142,8 @@
               <span>近三年主要工程业绩</span>
               <el-button style="float: right; padding: 3px 0" type="text" @click="performancedialog">添加</el-button>
             </div>
-            <performance-list ref="performanceList" :data="performanceList" :SupplierCertId="certId" height="360px"
-              style="margin-top: 20px"></performance-list>
+            <performance-list ref="performanceList" :data="performanceList" :SupplierCertId="certId"
+              :SupplierTypeCode="classId" height="360px" style="margin-top: 20px"></performance-list>
           </el-card>
 
           <el-card class="box-card" style="margin-top: 10px;">
@@ -148,8 +151,8 @@
               <span>拥有专利、专有技术及工法</span>
               <el-button style="float: right; padding: 3px 0" type="text" @click="patentdialog">添加</el-button>
             </div>
-            <patent-list ref="patentList" :data="patentList" :SupplierCertId="certId" height="360px"
-              style="margin-top: 20px">
+            <patent-list ref="patentList" :data="patentList" :SupplierCertId="certId" :SupplierTypeCode="classId"
+              height="360px" style="margin-top: 20px">
             </patent-list>
           </el-card>
 
@@ -158,8 +161,8 @@
               <span>近三年获得省部级及以上主要技术、管理成果、获奖项目</span>
               <el-button style="float: right; padding: 3px 0" type="text" @click="winningdialog">添加</el-button>
             </div>
-            <winning-list ref="winningList" :data="winningList" :SupplierCertId="certId" height="360px"
-              style="margin-top: 20px">
+            <winning-list ref="winningList" :data="winningList" :SupplierCertId="certId" :SupplierTypeCode="classId"
+              height="360px" style="margin-top: 20px">
             </winning-list>
           </el-card>
         </el-tab-pane>
@@ -225,7 +228,7 @@
     },
     name: 'oilsupplierEdit',
 
-    data () {
+    data() {
       return {
         canUpdateSupplier: true,
         dictData: null,
@@ -340,7 +343,7 @@
         },
       }
     },
-    created () {
+    created() {
       this.serviceId = this.$route.params.opera + ''
       if (this.$route.query.certid) {
         this.certId = this.$route.query.certid + ''
@@ -354,7 +357,7 @@
       this.initDatas()
     },
     methods: {
-      inputCompany (val) {
+      inputCompany(val) {
         if (!this.certId) {
           api.getEntityByName(val, this.$axios).then(res => {
             if (res.data && res.data.Id) {
@@ -365,12 +368,12 @@
           })
         }
       },
-      changeFormData (fdata) {
+      changeFormData(fdata) {
         if (!this.certId) {
           this.SetFormData(fdata)
         }
       },
-      SetFormData (fdata) {
+      SetFormData(fdata) {
         this.isCanUpdateSupplier(fdata.Id)
         this.formData.Id = fdata.Id
         this.formData.SupplierName = fdata.SupplierName
@@ -432,7 +435,7 @@
         }
       },
 
-      isCanUpdateSupplier (supplierId) {
+      isCanUpdateSupplier(supplierId) {
         api.isCanUpdateSupplier(supplierId, this.$axios).then(res => {
           this.canUpdateSupplier = (res.data.code === 0)
         }).catch(err => {
@@ -452,7 +455,7 @@
         this.$refs["winningList"].showDialog()
       },
 
-      initDatas () {
+      initDatas() {
         this.isCanUpdateSupplier(this.formData.Id)
         if (this.formData.Id) {
           api.getEntityAndCert(this.certId, this.$axios).then(res => {
@@ -494,7 +497,7 @@
         }
       },
 
-      getDictOptions () {
+      getDictOptions() {
         api.getDictList(this.$axios).then(res => {
           this.dictData = res.data.items
           /*this.UnitRelationOptions = res.data.items['UnitRelation']
@@ -512,7 +515,7 @@
       },*/
 
       //保存信息
-      saveEntity () {
+      saveEntity() {
         this.$refs['TechInfo'].$refs['EntityForm'].validate((valid) => {
           if (valid) {
             if (!this.formData.SetupTime) {
@@ -538,7 +541,7 @@
         this.$refs['SupplierCertEditCompoment'].saveEntity()
       },
 
-      addEntity () {
+      addEntity() {
         this.formData.SupplierTypeCode = '03'
         this.formData.SupplierTypeName = '技术服务类'
         api.addEntity(this.formData, this.$axios).then(res => {
@@ -563,7 +566,7 @@
         });
       },
 
-      updateEntity () {
+      updateEntity() {
         api.updateEntity(this.formData.Id, this.formData, this.$axios).then(res => {
           if (res.data.code === 0) {
             //保存成功后,初始化数据,变成修改