2
3
ws 5 лет назад
Родитель
Сommit
7c33a3752c
18 измененных файлов с 635 добавлено и 68 удалено
  1. 9 0
      src/dashoo.cn/backend/api/business/oilsupplier/manufacturer/manufacturer.go
  2. 42 0
      src/dashoo.cn/backend/api/business/oilsupplier/manufacturer/manufacturerService.go
  3. 11 11
      src/dashoo.cn/backend/api/controllers/base.go
  4. 132 0
      src/dashoo.cn/backend/api/controllers/oilsupplier/manufacturer.go
  5. 6 0
      src/dashoo.cn/backend/api/routers/router.go
  6. BIN
      src/dashoo.cn/backend/api/static/limsdoc/dataentry/template/word/tmp_1594195851.docx
  7. BIN
      src/dashoo.cn/backend/api/static/limsdoc/dataentry/template/word/tmp_1594195852.docx
  8. BIN
      src/dashoo.cn/backend/api/static/limsdoc/dataentry/template/word/tmp_1594195861.docx
  9. BIN
      src/dashoo.cn/backend/api/static/limsdoc/dataentry/template/word/tmp_1594200573.docx
  10. BIN
      src/dashoo.cn/backend/api/static/limsdoc/dataentry/template/word/tmp_1594200574.docx
  11. BIN
      src/dashoo.cn/backend/api/static/limsdoc/dataentry/template/word/tmp_1594205638.docx
  12. BIN
      src/dashoo.cn/backend/api/static/limsdoc/dataentry/template/word/tmp_1594272757.docx
  13. BIN
      src/dashoo.cn/backend/api/static/limsdoc/dataentry/template/word/tmp_1594463783.docx
  14. 1 0
      src/dashoo.cn/frontend_web/src/components/oilsupplier/businesslist.vue
  15. 107 33
      src/dashoo.cn/frontend_web/src/components/oilsupplier/goodsinfo.vue
  16. 322 0
      src/dashoo.cn/frontend_web/src/components/oilsupplier/manufacturerlist.vue
  17. 1 1
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/basisedit.vue
  18. 4 23
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/goodsedit.vue

+ 9 - 0
src/dashoo.cn/backend/api/business/oilsupplier/manufacturer/manufacturer.go

@@ -0,0 +1,9 @@
+package manufacturer
+
+type Manufacturer struct {
+	Id             int    `xorm:"not null pk autoincr INT(11) 'Id'"`
+	AgentName      string `xorm:"comment('代理商名称') VARCHAR(100) 'AgentName'"`
+	Remark         string `xorm:"comment('备注') VARCHAR(500) 'Remark'"`
+	SupplierCertId int    `xorm:"comment('供应商准入表ID') INT(11) 'SupplierCertId'"`
+	FileUrl        string `xorm:"comment('图片') VARCHAR(2000) 'FileUrl'"`
+}

+ 42 - 0
src/dashoo.cn/backend/api/business/oilsupplier/manufacturer/manufacturerService.go

@@ -0,0 +1,42 @@
+package manufacturer
+
+import (
+	//"fmt"
+	//"strconv"
+
+	. "dashoo.cn/backend/api/mydb"
+	//"dashoo.cn/utils"
+	//. "dashoo.cn/utils/db"
+	"github.com/go-xorm/xorm"
+)
+
+type ManufacturerService struct {
+	MyServiceBase
+}
+
+func GetmanufacturerService(xormEngine *xorm.Engine) *ManufacturerService {
+	s := new(ManufacturerService)
+	s.DBE = xormEngine
+	return s
+}
+// 所代理制造商名称列表查询
+func (s *ManufacturerService) GetManufacturerList(currentPage, size int64, order, prop, supplierCertId string, list *[]Manufacturer) int64 {
+
+
+	where := " 1=1"
+	orderby := "Id"
+	asc := false
+	if order != "" && prop != "" {
+		orderby = prop
+		if order == "asc" {
+			asc = true
+		}
+	}
+	if supplierCertId != "" {
+		where = where + " and SupplierCertId = '" + supplierCertId + "'"
+	}
+
+	total := s.GetPagingEntitiesWithoutAccCode(currentPage, size, orderby, asc, list, where)
+	return total
+}
+

+ 11 - 11
src/dashoo.cn/backend/api/controllers/base.go

@@ -175,7 +175,7 @@ var (
 	ControlInfoDetailName                    string = "ControlInfoDetail"
 	ControlInfoDetailAttachmentName          string = "ControlInfoDetailAttachment"
 	ControlTraceName                         string = "ControlTrace"                //制备信息溯源表
-	DocumentInfoName                         string = "s5OVEDocumentInfo"                //文档
+	DocumentInfoName                         string = "s5OVEDocumentInfo"           //文档
 	DocumentHistoryName                      string = "DocumentHistory"             //历史文档
 	SamplesCustomorName                      string = "SamplesCustomor"             //样本库客户信息表
 	SamplesCommunicationName                 string = "SamplesCommunication"        //样本库客户交流记录表
@@ -277,16 +277,16 @@ var (
 	Tmp_OilGoodsAptitudeClassName            string = "tmp_OilGoodsAptitudeClass"
 	TmpOilSupplierCertSubName                string = "tmp_OilSupplierCertSub"
 	TmpOilBasisBuildName                     string = "Tmp_OilBasisBuild"
-	OilSupplierSceneFileName                 string = "OilSupplierSceneFile" // 现场考察报告
-	OilCatalogSubName                        string = "OilCatalogSub" // 目录提交审核的主表
-	OilAppendChangeItemName                  string = "OilAppendChangeItem" // 增项信息变更的表
-	OilAppendChangeDetailName                string = "OilAppendChangeDetail" // 增项资质变更
-	OilAnnualChangeDetailName                string = "OilAnnualChangeDetail"             //年审资质变更表
-	Tmp_TechnologyName                       string = "Tmp_OilTechnologyService"             //技术服务资质编码临时表
-	Tmp_TechnologyClassName                  string = "Tmp_OilTechnologyServiceClass"             //
-	ImportTechsrvDetailViewName              string = "import_techsrv_detail_view" //技术服务
-	ImportTechsrvClassViewName               string = "import_techsrv_class_view"  //技术服务
-
+	OilSupplierSceneFileName                 string = "OilSupplierSceneFile"          // 现场考察报告
+	OilCatalogSubName                        string = "OilCatalogSub"                 // 目录提交审核的主表
+	OilAppendChangeItemName                  string = "OilAppendChangeItem"           // 增项信息变更的表
+	OilAppendChangeDetailName                string = "OilAppendChangeDetail"         // 增项资质变更
+	OilAnnualChangeDetailName                string = "OilAnnualChangeDetail"         //年审资质变更表
+	Tmp_TechnologyName                       string = "Tmp_OilTechnologyService"      //技术服务资质编码临时表
+	Tmp_TechnologyClassName                  string = "Tmp_OilTechnologyServiceClass" //
+	ImportTechsrvDetailViewName              string = "import_techsrv_detail_view"    //技术服务
+	ImportTechsrvClassViewName               string = "import_techsrv_class_view"     //技术服务
+	ManufacturerName                         string = "Manufacturer"
 )
 
 //分页信息及数据

+ 132 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/manufacturer.go

@@ -0,0 +1,132 @@
+package oilsupplier
+
+import (
+	"encoding/json"
+	//"strings"
+
+	//"time"
+	//"fmt"
+
+	"dashoo.cn/backend/api/business/oilsupplier/manufacturer"
+	. "dashoo.cn/backend/api/controllers"
+	"dashoo.cn/utils"
+)
+
+type ManufacturerController struct {
+	BaseController
+}
+
+// @Title 代理商情况
+// @Description get user by token
+// @Success 200 {object} models.Userblood
+// @router /manufacturerlist [get]
+func (this *ManufacturerController) ManufacturerList() {
+	page := this.GetPageInfoForm()
+	order := this.GetString("Order")
+	prop := this.GetString("Prop")
+	supplierCertId := this.GetString("SupplierCertId")
+
+	svc := manufacturer.GetmanufacturerService(utils.DBE)
+	var list []manufacturer.Manufacturer
+	total := svc.GetManufacturerList(page.CurrentPage, page.Size, order, prop, supplierCertId, &list)
+
+	var datainfo DataInfo
+	datainfo.Items = list
+	datainfo.CurrentItemCount = total
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 添加代理商
+// @Description 添加代理商情况
+// @Success	200	{object} controllers.Request
+// @router /addmanufacturer [post]
+func (this *ManufacturerController) AddManufacturer() {
+	var model manufacturer.Manufacturer
+	var jsonblob = this.Ctx.Input.RequestBody
+	json.Unmarshal(jsonblob, &model)
+	svc := manufacturer.GetmanufacturerService(utils.DBE)
+	_, err := svc.InsertEntityBytbl(ManufacturerName, &model)
+	var errinfo ErrorDataInfo
+	if err == nil {
+		errinfo.Message = "操作成功!"
+		errinfo.Code = 0
+		errinfo.Item = model.Id
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	} else {
+		errinfo.Message = "操作失败!" + utils.AlertProcess(err.Error())
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	}
+}
+
+// @Title 更新代理商
+// @Description 更新代理商
+// @Param	id	path	string	true
+// @Success	200	{object}
+// @router /editmanufacturer/:id [put]
+func (this *ManufacturerController) EditManufacturer() {
+	id := this.Ctx.Input.Param(":id")
+	var errinfo ErrorInfo
+	if id == "" {
+		errinfo.Message = "操作失败!请求信息不完整"
+		errinfo.Code = -2
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+	var model manufacturer.Manufacturer
+	var jsonblob = this.Ctx.Input.RequestBody
+	json.Unmarshal(jsonblob, &model)
+	var entity manufacturer.Manufacturer
+
+	svc := manufacturer.GetmanufacturerService(utils.DBE)
+	opdesc := "编辑制造商-" + model.AgentName
+	var cols []string = []string{"AgentName", "Remark"}
+	err := svc.UpdateOperationAndWriteLogBytbl(ManufacturerName, BaseOperationLogName, id, &model, &entity, cols, utils.ToStr(this.User.Id), this.User.Username, opdesc, this.User.AccCode, "装备情况")
+
+	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()
+	}
+}
+
+// @Title 删除代理商
+// @Description
+// @Success 200 {object} ErrorInfo
+// @Failure 403 :id 为空
+// @router /manufacturerdelete/:Id [delete]
+func (this *ManufacturerController) ManufacturerDelete() {
+	Id := this.Ctx.Input.Param(":Id")
+	var errinfo ErrorInfo
+	if Id == "" {
+		errinfo.Message = "操作失败!请求信息不完整"
+		errinfo.Code = -2
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+	where := " Id= " + Id
+	svc := manufacturer.GetmanufacturerService(utils.DBE)
+	err := svc.DeleteEntityBytbl(ManufacturerName, where)
+	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()
+	}
+}

+ 6 - 0
src/dashoo.cn/backend/api/routers/router.go

@@ -432,6 +432,12 @@ func init() {
 				&oilsupplier.OilCatalogSubController{},
 			),
 		),
+		//代理制造商
+		beego.NSNamespace("/manufacturer",
+			beego.NSInclude(
+				&oilsupplier.ManufacturerController{},
+			),
+		),
 	)
 	beego.AddNamespace(ns)
 }

BIN
src/dashoo.cn/backend/api/static/limsdoc/dataentry/template/word/tmp_1594195851.docx


BIN
src/dashoo.cn/backend/api/static/limsdoc/dataentry/template/word/tmp_1594195852.docx


BIN
src/dashoo.cn/backend/api/static/limsdoc/dataentry/template/word/tmp_1594195861.docx


BIN
src/dashoo.cn/backend/api/static/limsdoc/dataentry/template/word/tmp_1594200573.docx


BIN
src/dashoo.cn/backend/api/static/limsdoc/dataentry/template/word/tmp_1594200574.docx


BIN
src/dashoo.cn/backend/api/static/limsdoc/dataentry/template/word/tmp_1594205638.docx


BIN
src/dashoo.cn/backend/api/static/limsdoc/dataentry/template/word/tmp_1594272757.docx


BIN
src/dashoo.cn/backend/api/static/limsdoc/dataentry/template/word/tmp_1594463783.docx


+ 1 - 0
src/dashoo.cn/frontend_web/src/components/oilsupplier/businesslist.vue

@@ -131,6 +131,7 @@
     mapGetters
   } from 'vuex'
 
+
   export default {
     name: 'EquipmentList',
     components: {},

+ 107 - 33
src/dashoo.cn/frontend_web/src/components/oilsupplier/goodsinfo.vue

@@ -618,16 +618,7 @@
                       type="textarea"></el-input>
           </el-form-item>
         </el-col>
-        <el-col :span="8">
-          <el-form-item label="所代理制造商名称">
-            <el-input v-model="formData.MaunAgent"
-                      maxlength="100"
-                      :readonly="this.formData.Status > '0'"
-                      placeholder="请输入"
-                      type="textarea">
-            </el-input>
-          </el-form-item>
-        </el-col>
+
 
         <!-- <el-col :span="8">
           <el-form-item label="中石油物资供应商证书" >
@@ -682,7 +673,8 @@
                       style="width: 100%"></el-input>
           </el-form-item>
         </el-col>
-        <el-col :span="16">
+
+        <el-col :span="24">
           <el-form-item label="备注">
             <el-input v-model="formData.Remark"
                       maxlength="500"
@@ -693,31 +685,53 @@
             </el-input>
           </el-form-item>
         </el-col>
+
       </el-row>
     </el-form>
+    <el-card class="box-card mycard"
+             style="margin-top: 10px;">
+      <div slot="header"
+           class="clearfix">
+        <span style="padding:3px 20px">所代理制造商名称</span>
+        <el-button style="float: right; padding: 3px 10px"
+                   type="text"
+                   @click="manufacturerdialog"
+                   v-if="formDataCert.Status <= 0"
+        >添加</el-button>
+      </div>
+      <manufacturer-list ref="manufacturerList"
+                         :data.sync="manufacturerList"
+                         :SupplierCertId="certId+''"
+                         :canadd="true"
+                         height="360px"
+                         style="margin-top: 20px"></manufacturer-list>
+    </el-card>
     <!--打印内容结束-->
     <!--endprint1-->
-    <el-row v-if="(isInvestigate) && (formData.InStyle != '2')" >
-      <el-col :span="4">
-        <span>现场考察报告</span>
-        <el-button type="primary" style="margin-left: 10px;" plain size="mini" title="上传" @click="openDialog()" >上传
-        </el-button>
-        <!--<el-upload multiple style="margin-top: 10px;" action="" ref="refuploadattach"-->
-        <!--:http-request="uploadrequest" class="attach-uploader" :before-upload="beforeAvatarUpload">-->
-        <!--<i class="el-icon-plus attach-uploader-icon"></i>-->
-        <!--&lt;!&ndash;<div slot="tip" class="el-upload__tip" v-if="SubfileForm.NeedFileType !=yasuoname">请上传图片(大小为512KB-5MB),可上传多张图片&ndash;&gt;-->
-        <!--&lt;!&ndash;</div>&ndash;&gt;-->
-        <!--&lt;!&ndash;<div slot="tip" class="el-upload__tip" v-if="SubfileForm.NeedFileType ==yasuoname">请上传压缩文件&ndash;&gt;-->
-        <!--&lt;!&ndash;</div>&ndash;&gt;-->
-        <!--</el-upload>-->
-      </el-col>
-      <el-col :span="4">
-        <div v-for="(tmpUrl, index) in scenefileurllist">
-          <el-link :href="'http://'+fileurlcut(scenefile.FileUrl, index)" target="_blank" type="primary">
-            {{scenefile.FileName.split('$')[index]}}</el-link>
-        </div>
-      </el-col>
-    </el-row>
+    <el-card v-if="(isInvestigate) && (formData.InStyle != '2')">
+      <el-row>
+        <el-col :span="4">
+          <span>现场考察报告</span>
+          <el-button type="primary" style="margin-left: 10px;" plain size="mini" title="上传" @click="openDialog()" >上传
+          </el-button>
+          <!--<el-upload multiple style="margin-top: 10px;" action="" ref="refuploadattach"-->
+          <!--:http-request="uploadrequest" class="attach-uploader" :before-upload="beforeAvatarUpload">-->
+          <!--<i class="el-icon-plus attach-uploader-icon"></i>-->
+          <!--&lt;!&ndash;<div slot="tip" class="el-upload__tip" v-if="SubfileForm.NeedFileType !=yasuoname">请上传图片(大小为512KB-5MB),可上传多张图片&ndash;&gt;-->
+          <!--&lt;!&ndash;</div>&ndash;&gt;-->
+          <!--&lt;!&ndash;<div slot="tip" class="el-upload__tip" v-if="SubfileForm.NeedFileType ==yasuoname">请上传压缩文件&ndash;&gt;-->
+          <!--&lt;!&ndash;</div>&ndash;&gt;-->
+          <!--</el-upload>-->
+        </el-col>
+        <el-col :span="4">
+           <div v-for="(tmpUrl, index) in scenefileurllist" :key="index">
+            <el-link :href="'http://'+fileurlcut(scenefile.FileUrl, index)" target="_blank" type="primary">
+              {{scenefile.FileName.split('$')[index]}}</el-link>
+          </div>
+        </el-col>
+      </el-row>
+    </el-card>
+
     <el-dialog title="现场考察报告" :visible.sync="visible" top="5vh" width="900px">
       <el-form :model="SubfileForm" label-width="100px">
         <el-row>
@@ -735,6 +749,7 @@
             </el-form-item>
           </el-col>
         </el-row>
+
       </el-form>
       <div slot="footer" class="dialog-footer" style="margin-top:-30px;">
         <el-button @click="visible = false">取 消</el-button>
@@ -747,8 +762,12 @@
 <script>
 import axios from 'axios'
 import uploadajax from '../../assets/js/uploadajax.js'
+import ManufacturerList from '@/components/oilsupplier/manufacturerlist'
 
 export default {
+
+
+
   name: 'goodsinfo',
   props: {
     formData: {
@@ -780,6 +799,9 @@ export default {
       default: false
     }
   },
+  components: {
+    ManufacturerList
+  },
   data () {
     var checkemail = (rule, value, callback) => {
       if (value) {
@@ -893,6 +915,23 @@ export default {
     }
 
     return {
+       manufacturerList: [],
+       certId: '0',
+      formDataCert: {
+        InStyle: '1',
+        WorkerTotal: 0,
+        ContractNum: 0,
+        UniversityNum: 0,
+        TechnicalNum: 0,
+        AboveProfNum: 0,
+        MiddleProfNum: 0,
+        NationalRegNum: 0,
+        NationalCertTotal: 0,
+        DesignerTotal: 0,
+        SkillerTotal: 0,
+        Status: 0
+      },
+
       visible: false,
       address: [],
       linkaddress: [],
@@ -1105,7 +1144,6 @@ export default {
     // }
   },
   mounted () {
-    // this.getSupplierSceneFile()
   },
   watch: {
     dictData: {
@@ -1121,6 +1159,42 @@ export default {
     }
   },
   methods: {
+     updatemanufacturers () {
+      let _this = this
+      if (_this.formData.OperType !== '制造商') {
+        let IsManufacturer = 1
+        this.$axios.get('suppliercertsub/updatemanufacturers/'+ _this.formData.Id + '/' + IsManufacturer + '', {}).then(res => {
+          _this.goodsloading = false
+          if (res.data.code === 0) {
+            _this.$message({
+              type: 'success',
+              message: '更改成功'
+            })
+          }
+          _this.$refs['goodsList'].initData()
+        })
+          .catch(err => {
+            _this.goodsloading = false
+            console.error(err)
+          })
+      } else {
+        _this.goodsloading = false
+      }
+    },
+
+    initMaunfactureList (certid) {
+      this.certId = certid
+      this.$refs['manufacturerList'].getvalue(
+        this.certId
+      )
+    },
+
+    manufacturerdialog () {
+      this.$refs['manufacturerList'].showDialog()
+    },
+
+
+
     fileurlcut (val, index) {
       let fileurlall = val.split('$')[index]
       let fileurl = fileurlall.split('|')

+ 322 - 0
src/dashoo.cn/frontend_web/src/components/oilsupplier/manufacturerlist.vue

@@ -0,0 +1,322 @@
+<template>
+  <div>
+    <el-table :data="manufacturerList" border size="mini">
+      <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)" :disabled="!canadd">
+            编辑</el-button>
+          <el-button type="primary" plain size="mini" title="删除" style="margin-left:3px" @click="deletedata(scope.row)"
+                     :disabled="!canadd">删除</el-button>
+        </template>
+      </el-table-column>
+      <el-table-column prop="AgentName" label="代理商名称" show-overflow-tooltip></el-table-column>
+
+      <el-table-column prop="FileUrl" label="资质文件" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <el-link :href="scope.row.FileUrl" target="_blank" type="primary">
+            {{scope.row.FileUrl}}
+          </el-link>
+        </template>
+      </el-table-column>
+
+      <el-table-column prop="Remark" label="备注" show-overflow-tooltip></el-table-column>
+    </el-table>
+    <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+                   :page-sizes="[10, 15, 20, 25]" :page-size="size" layout="total, sizes, prev, pager, next, jumper"
+                   :total="currentItemCount">
+    </el-pagination>
+
+    <el-dialog :title="Title" :visible.sync="visible">
+      <el-form ref="refPerformance" :model="ManufacturerForm" label-width="110px" :rules="rulesform">
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="代理商名称" prop="AgentName">
+              <el-input v-model="ManufacturerForm.AgentName"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="备注信息">
+              <el-input v-model="ManufacturerForm.Remark" type="textarea" :rows=3 placeholder="请输入备注信息"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="24">
+            <el-form-item label="资质文件">
+              <el-upload action="" ref="refuploadattach"
+                          :http-request="uploadrequest" class="attach-uploader"  >
+                <i class="el-icon-plus attach-uploader-icon"></i>
+                <div slot="tip" class="el-upload__tip" v-if="ManufacturerForm.NeedFileType !=yasuoname">请上传图片(大小为512KB-5MB),可上传多张图片
+                </div>
+                <div slot="tip" class="el-upload__tip" v-if="ManufacturerForm.NeedFileType ==yasuoname">请上传压缩文件
+                </div>
+              </el-upload>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <div slot="footer" class="dialog-footer" style="margin-top:-30px;">
+        <el-button @click="visible = false">取 消</el-button>
+        <el-button type="primary" @click="savedata()">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+
+</template>
+
+<script>
+  import axios from 'axios'
+  import uploadajax from '@/assets/js/uploadajax.js'
+  import {
+    mapGetters
+  } from 'vuex'
+  export default {
+    name: 'ManufacturerList',
+    props: {
+
+      canadd: {
+        type: Boolean,
+        default: false
+      }
+    },
+    created () {
+    },
+    computed: {
+      ...mapGetters({
+        session: 'session'
+      })
+    },
+    data () {
+      return {
+        visible: false,
+        yasuoname: '',
+        SupplierCertId: '0',
+        status: '0',
+        manufacturerList: [],
+        manufacturer:[],
+        Title: '',
+        ManufacturerForm:{
+          Id: '',
+          AgentName:'',
+          Remark: '',
+          FileUrl: '',
+          SupplierCertId: '',
+        },
+        currentPage: 1, // 分页
+        size: 10,
+        currentItemCount: 0,
+        rulesform: {
+          AgentName: [{
+            required: true,
+            message: '请输入代理商名称',
+            trigger: 'change'
+          }]
+        }  
+
+
+      }
+    },
+    methods: {
+      getvalue  (certId ) {
+        this.SupplierCertId = certId
+        this.initData()
+      },
+      initData () {
+        let _this = this
+        const params = {
+          SupplierCertId: this.SupplierCertId,
+          _currentPage: this.currentPage,
+          _size: this.size
+        }
+        this.$axios.get('manufacturer/manufacturerlist', {params})
+          .then(res => {
+            _this.manufacturerList = res.data.items
+            _this.currentItemCount = res.data.currentItemCount
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
+      },
+      savedata () {
+        this.$refs['refPerformance'].validate((valid) => {
+          if (valid) {
+            if (!this.ManufacturerForm.Id) {
+              this.addManufacturer()
+            } else {
+              this.editManufacturer()
+            }
+          }
+        })
+      },
+      addManufacturer () {
+        let _this = this
+        _this.ManufacturerForm.SupplierCertId = parseInt(_this.ManufacturerForm.SupplierCertId)
+        _this.$axios.post('/manufacturer/addmanufacturer/', _this.ManufacturerForm)
+          .then(res => {
+            if (res.data.code === 0) {
+              _this.$message({
+                type: 'success',
+                message: res.data.message
+              })
+              this.visible = false
+              this.initData()
+            } else {
+              _this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+      editManufacturer () {
+        let _this = this
+        _this.ManufacturerForm.SupplierCertId = parseInt(_this.ManufacturerForm.SupplierCertId)
+        _this.$axios.put('/manufacturer/editmanufacturer/' + _this.ManufacturerForm.Id, _this.ManufacturerForm)
+          .then(res => {
+            if (res.data.code === 0) {
+              _this.$message({
+                type: 'success',
+                message: res.data.message
+              })
+              this.visible = false
+              this.initData()
+            } else {
+              _this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+      deletedata (val) {
+        let _this = this
+        _this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        })
+          .then(() => {
+            _this.$axios.delete('manufacturer/manufacturerdelete/' + val.Id, {})
+              .then(function (response) {
+                // response
+                if (response.data.code === 0) {
+                  _this.$message({
+                    type: 'success',
+                    message: response.data.message
+                  })
+                  _this.initData()
+                } else {
+                  _this.$message({
+                    type: 'warning',
+                    message: response.data.message
+                  })
+                }
+              })
+              .catch(function (error) {
+                console.log(error)
+              })
+          })
+          .catch(() => {})
+      },
+
+      uploadrequest (option) {
+        let _this = this
+        if (process.client) {
+          const myDomain = window.location.host
+          axios.post(process.env.upfilehost, {})
+            .then(function (res) {
+              if (res.data && res.data.fid && res.data.fid !== '') {
+                if (res.data.publicUrl.indexOf('/upfile') === 0) {
+                  option.action = `http://${myDomain}/${res.data.publicUrl}/${res.data.fid}`
+                } else {
+                  option.action = `http://${res.data.publicUrl}/${res.data.fid}`
+                }
+                _this.ManufacturerForm.FileUrl = res.data.publicUrl + '/' + res.data.fid
+                /*_this.waituploads.push({
+                  uid: option.file.uid,
+                  url: res.data.publicUrl,
+                  fid: res.data.fid
+                })*/
+                uploadajax(option)
+              } else {
+                _this.$message({
+                  type: 'warning',
+                  message: '未上传成功!请刷新界面重新上传!'
+                })
+              }
+            })
+            .catch(function (error) {
+              debugger
+              _this.$message({
+                type: 'warning',
+                message: '未上传成功!请重新上传!'
+              })
+            })
+        }
+      },
+
+
+      getDictOptions () {
+        api.getDictList(this.$axios).then(res => {
+          this.yasuoname = res.data.items['YaSuoName']
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      showDialog () {
+        this.Title = '代理制造商'
+        console.log(this.SupplierCertId,222222)
+        this.ManufacturerForm.SupplierCertId=this.SupplierCertId
+        this.ManufacturerForm.Id = 0
+        this.ManufacturerForm.AgentName=''
+        this.ManufacturerForm.Remark = ''
+        this.visible = true
+      },
+      openDialog (val) {
+        this.Title = '编辑代理制造商'
+        this.ManufacturerForm.SupplierCertId=val.SupplierCertId
+        this.ManufacturerForm.Id = val.Id
+       this.ManufacturerForm.AgentName=val.AgentName
+        this.ManufacturerForm.Remark = val.Remark
+        this.visible = true
+      },
+      seachdata () {
+        this.initData()
+      },
+      handleSizeChange (value) {
+        this.size = value
+        this.currentPage = 1
+        this.initData()
+      },
+      handleCurrentChange (value) {
+        this.currentPage = value
+        this.initData()
+      },
+
+      jstimehandle (val) {
+        if (val === '') {
+          return '----'
+        } else if (val === '0001-01-01T08:00:00+08:00') {
+          return '----'
+        } else if (val === '5000-01-01T23:59:59+08:00') {
+          return '永久'
+        } else {
+          val = val.replace('T', ' ')
+          return val.substring(0, 10)
+        }
+      }
+    }
+  }
+</script>
+
+<style>
+
+
+</style>

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

@@ -558,7 +558,7 @@ export default {
     WinningList, // 近三年省部级及以上获奖项目列表
     BusinessList, // 选择准入范围
     SubfileList, // 选择企业资质
-    BasisInfo,
+    BasisInfo
 
     // ChooseAuditor
   },

+ 4 - 23
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/goodsedit.vue

@@ -531,7 +531,6 @@ import WfMultiHistory from '@/components/workflow/wfmultihistory.vue'
 import WfBackHistory from '@/components/workflow/wfbackhistory.vue'
 import SupplierCertEdit from '@/components/oilsupplier/suppliercertedit.vue'
 import dataapi from '@/api/oilsupplier/dataentry'
-
 import EquipmentList from '@/components/oilsupplier/equipmentlist'
 import PerformanceList from '@/components/oilsupplier/performancelist'
 import PatentList from '@/components/oilsupplier/patentlist'
@@ -1178,6 +1177,7 @@ export default {
           console.error(err)
         })
     },
+
     equipmentdialog () {
       this.$refs['equipmentList'].showDialog()
     },
@@ -1247,6 +1247,9 @@ export default {
             if (this.certId && this.formDataCert.WorkflowId) {
               // this.$refs['WfHistory'].getHistoryTask() /* 刷新工作流 */
             }
+
+            this.$refs['GoodsInfo'].initMaunfactureList(this.certId)
+      
             this.$refs['equipmentList'].getvalue(
               this.formData.Id,
               this.formData.SupplierTypeCode,
@@ -1605,28 +1608,6 @@ export default {
           console.error(err)
         })
     },
-    updatemanufacturers () {
-      let _this = this
-      if (_this.formData.OperType !== '制造商') {
-        let IsManufacturer = 1
-        this.$axios.get('suppliercertsub/updatemanufacturers/'+ _this.formData.Id + '/' + IsManufacturer + '', {}).then(res => {
-          _this.goodsloading = false
-          if (res.data.code === 0) {
-            _this.$message({
-              type: 'success',
-              message: '更改成功'
-            })
-          }
-          _this.$refs['goodsList'].initData()
-        })
-          .catch(err => {
-            _this.goodsloading = false
-            console.error(err)
-          })
-      } else {
-        _this.goodsloading = false
-      }
-    },
 
     CheckCompanyBase () {
       if (!this.formData.Id) {