2
3
فهرست منبع

Merge remote-tracking branch 'origin/develop' into develop

wlin1 5 سال پیش
والد
کامیت
603f769470

+ 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)
 }

+ 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('|')

+ 16 - 7
src/dashoo.cn/frontend_web/src/components/oilsupplier/goodslist2.vue

@@ -5,7 +5,11 @@
            class="clearfix">
         <span style="font-weight: bold">准入范围</span>
         <span style="float: right;">
-          <el-button style="float: right; padding: 3px 0px"
+          <el-button type="primary" size="mini" style="float: right;margin-left: 25px" @click="commitAudit()"
+                     v-if="canadd && IsCompanyUser == 0">
+          提交审批
+        </el-button>
+          <el-button style="float: right; padding: 3px 0px;"
                      type="text"
                      @click="deletedata()"
                      v-if="candelete">删除</el-button>
@@ -218,15 +222,16 @@
         default: ''
       }
     },
-    created () {
-      // this.initData2019()
-    },
-    /*
     computed: {
       ...mapGetters({
-        session: 'session'
+        session: 'session',
+        authUser: 'authUser'
       })
-    }, */
+    },
+    created () {
+      this.IsCompanyUser = this.authUser.Profile.IsCompanyUser
+      // this.initData2019()
+    },
     watch: {
       filterText (val) {
         this.$refs.orgmanagetree.filter(val)
@@ -234,6 +239,7 @@
     },
     data () {
       return {
+        IsCompanyUser: '',
         loading: false,
         tableloading:false,
         keyword: '',
@@ -422,6 +428,9 @@
         } else {
         }
       },
+      commitAudit () {
+        this.$emit('commitAudit')
+      },
       handleSelectionChange (val) {
         this.Ids = []
         for (var i = 0; i < val.length; i++) {

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

@@ -0,0 +1,288 @@
+<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=""
+                         :manufacturerlist="manufacturerList"
+                         ref="refuploadattach"
+                         :http-request="uploadrequest"
+                         class="attach-uploader">
+                <i class="el-icon-plus attach-uploader-icon"></i>
+              </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
+      },
+      visible: {
+        type: Boolean,
+        default: false
+      }
+    },
+    created () {
+    },
+    computed: {
+      ...mapGetters({
+        session: 'session'
+      })
+    },
+    data () {
+      return {
+        // visible: false,
+        SupplierCertId: '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.FileUrl) {
+              this.$message.error('有附件未成功上传!不能保存数据')
+              return false;
+            }
+            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
+                uploadajax(option)
+              } else {
+                _this.$message({
+                  type: 'warning',
+                  message: '未上传成功!请刷新界面重新上传!'
+                })
+              }
+            })
+        }
+      },
+
+      showDialog () {
+        this.Title = '代理制造商'
+        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
+      },
+
+      handleSizeChange (value) {
+        this.size = value
+        this.currentPage = 1
+        this.initData()
+      },
+      handleCurrentChange (value) {
+        this.currentPage = value
+        this.initData()
+      },
+    }
+  }
+</script>
+
+<style>
+
+
+</style>

+ 9 - 8
src/dashoo.cn/frontend_web/src/components/oilsupplier/subfilelist2.vue

@@ -3,10 +3,10 @@
     <el-card class="box-card" style="margin-top: 10px;">
       <div slot="header" class="clearfix">
         <span style="font-weight: bold"> 企业资质</span>
-        <el-button type="primary" size="mini" style="float: right;margin-right: 3px" @click="nextStep()"
+        <!--<el-button type="primary" size="mini" style="float: right;margin-right: 3px" @click="nextStep()"
                    v-if="canadd && IsCompanyUser == 0">
           提交审批
-        </el-button>
+        </el-button>-->
         <el-button style="float: right; padding: 6px 25px" type="text" @click="showDialog" v-if="canadd || newcanadd">添加</el-button>
       </div>
       <el-table :data="subfileList" border size="mini">
@@ -34,12 +34,12 @@
             </div> -->
             <viewer :images="scope.row.FileUrlList">
                     <div  v-for="(tmpUrl,index) in scope.row.FileUrlList" :key="index" style="vertical-align: middle;	text-align: center;">
-                    
+
                       <el-link :href="'http://'+fileurlcut(scope.row.FileUrl, index)" target="_blank" type="primary"
-                        v-if="scope.row.FileUrl==''?false:imgFormat(scope.row.FileUrl, index)" 
+                        v-if="scope.row.FileUrl==''?false:imgFormat(scope.row.FileUrl, index)"
                       >
                       {{scope.row.FileName.split('$')[index]}}</el-link>
-                      <img 
+                      <img
                         v-if="scope.row.FileUrl==''?false:!imgFormat(scope.row.FileUrl, index)"
                         class="photoStyle" alt=""
                         :src="'http://'+fileurlcut(scope.row.FileUrl, index)"
@@ -92,7 +92,7 @@
                 <div slot="tip" class="el-upload__tip" v-if="SubfileForm.NeedFileType ==yasuoname">请上传压缩文件
                 </div>
               </el-upload>  -->
-              <el-upload 
+              <el-upload
                 :multiple="false" style="margin-top: 10px;" class="attach-uploader"
                 action=""
                 :before-upload="beforeAvatarUpload"
@@ -102,7 +102,7 @@
                 :file-list="fileList"
                 :on-remove="filremove"
                 :http-request="uploadrequest"
-                limit = "5"
+                :limit="5"
                 :on-exceed="uploadExceed">
                 <i class="el-icon-plus"></i>
                 <div slot="tip" class="el-upload__tip" v-if="SubfileForm.NeedFileType !=yasuoname">请上传图片(大小为512KB-5MB),最多可上传五张图片
@@ -417,7 +417,8 @@
                 }
                 _this.getattachissuccess()
                 _this.addSubfile()
-              } else {
+              }
+              else {
                 _this.$message({
                   type: 'warning',
                   message: '请上传文件!'

+ 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
   },

+ 14 - 34
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/goodsedit.vue

@@ -22,15 +22,7 @@
         <span>
           <i class="icon icon-table2"></i> 信息
         </span>
-        <span style="float: right;">
-          <!--<el-button
-            plain
-            icon="el-icon-right"
-            size="mini"
-            style="margin-right: 5px"
-            @click="nextTab"
-          >下一步</el-button>-->
-          <el-popover>
+        <el-popover>
             <el-steps :active="formData.Step"
                       direction="vertical"
                       align-center
@@ -47,6 +39,7 @@
                        size="mini"
                        style="margin-right: 5px">查看进度</el-button> -->
           </el-popover>
+        <span style="float: right;">
           <!--<el-button type="primary" plain size="mini" style="margin-right:3px" v-if="formDataCert.Status == 8"
             @click="annaudit">
             年审申请</el-button>
@@ -320,6 +313,7 @@
                       :Grade="formData.Grade"
                       height="360px"
                       @tab-click="tabclick()"
+                      @commitAudit="commitAudit"
                       style="margin-top: 20px"></goods-list2>
         </el-tab-pane>
 
@@ -530,7 +524,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'
@@ -737,7 +730,6 @@ export default {
         ProcessKey: '',
         AccessCardNo: ''
       },
-
       formDataCert: {
         InStyle: '1',
         WorkerTotal: 0,
@@ -936,6 +928,9 @@ export default {
         })
     },
     orgunitChange (val) {
+      if (!val) {
+        return false
+      }
       let deptid = val
       let auditstepcode = 'SUB_OFFICE_WZ'
       api.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
@@ -1174,6 +1169,7 @@ export default {
           console.error(err)
         })
     },
+
     equipmentdialog () {
       this.$refs['equipmentList'].showDialog()
     },
@@ -1243,6 +1239,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,
@@ -1403,7 +1402,7 @@ export default {
       api.getDictListByStatus(params, this.$axios).then(res => {
         this.dictData = res.data.items
         this.orgtreelist = window.toolfun_gettreejson(res.data.items['ProOrgList'], 'id', 'pId', 'id,name')
-        
+
 
         var selectID = res.data.items['Register'].CheckUnitId;
         var item     = res.data.items['UnitOrgList'].find(n=>n.Id == selectID)
@@ -1601,28 +1600,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) {
@@ -1700,6 +1677,9 @@ export default {
         this.dialogVisibleCom = true
       }
     },
+    commitAudit () {
+      this.$refs['subfileList'].nextStep()
+    },
     // chooseAuditorShow () {
     //   this.$refs['chooseAuditor'].getorgtreelist(
     //     this.formData.SupplierTypeCode