|
|
@@ -0,0 +1,1613 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <!--打印内容开始-->
|
|
|
+ <el-form class="formDataInfo"
|
|
|
+ label-width="137px"
|
|
|
+ ref="EntityForm"
|
|
|
+ :model="formData"
|
|
|
+ :rules="rulesform"
|
|
|
+ :disabled="disabled">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="16">
|
|
|
+ <el-form-item label="供方名称"
|
|
|
+ prop="SupplierName">
|
|
|
+ <el-input v-model="formData.SupplierName"
|
|
|
+ :maxlength="255"
|
|
|
+ placeholder="请输入"
|
|
|
+ style="width: 100%">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="准入编码">
|
|
|
+ <el-input v-model="formData.AccessCardNo"
|
|
|
+ placeholder="请输入"
|
|
|
+ style="width: 100%">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="供应商类型" prop="OperType">
|
|
|
+ <el-select ref="OperType"
|
|
|
+ v-model="formData.OperType"
|
|
|
+ placeholder="请选择"
|
|
|
+ style="width: 100%">
|
|
|
+ <el-option v-for="item in OperTypeOptions"
|
|
|
+ :key="item.Id"
|
|
|
+ :label="item.Key"
|
|
|
+ :value="item.Key">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="单位关系">
|
|
|
+ <el-select ref="SpecType"
|
|
|
+ v-model="formData.SpecTypeCode"
|
|
|
+ @change="currentSel"
|
|
|
+ placeholder="请选择"
|
|
|
+ style="width: 100%">
|
|
|
+ <el-option v-for="item in UnitRelationOptions"
|
|
|
+ :key="item.Id"
|
|
|
+ :label="item.Key"
|
|
|
+ :value="item.Value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="国家"
|
|
|
+ prop="Country">
|
|
|
+ <el-select v-model="formData.Country"
|
|
|
+ filterable
|
|
|
+ placeholder="请选择"
|
|
|
+ style="width: 100%">
|
|
|
+ <el-option v-for="item in countryListOptions"
|
|
|
+ :key="item.key"
|
|
|
+ :label="item.value"
|
|
|
+ :value="item.value">
|
|
|
+ <span style="float: left">{{ item.value }}</span>
|
|
|
+ <span style="float: right; color: #8492a6; font-size: 13px">{{ item.label }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="准入方式">
|
|
|
+ <el-select ref="inStyle"
|
|
|
+ v-model="formData.InStyle"
|
|
|
+ placeholder="请选择"
|
|
|
+ style="width: 100%"
|
|
|
+ @change="InStyleChange">
|
|
|
+ <el-option v-for="item in InOptions"
|
|
|
+ :key="item.Id"
|
|
|
+ :label="item.Key"
|
|
|
+ :value="item.Value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="中石油准入证编号">
|
|
|
+ <el-input v-model="formData.PACNumber"
|
|
|
+ maxlength="255"
|
|
|
+ style="width: 100%">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="级别" prop="Grade">
|
|
|
+ <el-select v-model="formData.Grade"
|
|
|
+ placeholder="请选择级别"
|
|
|
+ style="width: 100%"
|
|
|
+ @change="GradeChange">
|
|
|
+ <el-option
|
|
|
+ v-for="item in GradeOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="管理单位">
|
|
|
+ <el-select filterable
|
|
|
+ v-model="formData.MgrUnit"
|
|
|
+ maxlength="255"
|
|
|
+ clearable
|
|
|
+ placeholder="请输入"
|
|
|
+ style="width: 100%">
|
|
|
+ <el-option v-for="item in ManagementUnitOptions"
|
|
|
+ :key="item.Value"
|
|
|
+ :label="item.Key"
|
|
|
+ :value="item.Key"
|
|
|
+ :disabled="item.disabled">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="有效期">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="formData.ApplyTime"
|
|
|
+ :disabled="this.formData.Status == '8'"
|
|
|
+ type="date"
|
|
|
+ format="yyyy 年 MM 月 dd 日"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="选择有效期"
|
|
|
+ style="width: 100%">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="证件类型">
|
|
|
+ <el-select v-model="formData.CredentialFlag"
|
|
|
+ placeholder="请选择"
|
|
|
+ @change="showorhid"
|
|
|
+ style="width: 100%">
|
|
|
+ <el-option v-for="item in selectoptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="统一社会信用代码" prop="CommercialNo">
|
|
|
+ <el-input v-model="formData.CommercialNo"
|
|
|
+ maxlength="50"
|
|
|
+ placeholder="请输入"
|
|
|
+ style="width: 100%">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="税务登记证编号"
|
|
|
+ prop="CountryTaxNo"
|
|
|
+ v-if="showorhidflag=='show'">
|
|
|
+ <el-input v-model="formData.CountryTaxNo"
|
|
|
+ maxlength="50"
|
|
|
+ placeholder="请输入"
|
|
|
+ style="width: 100%">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="组织机构代码"
|
|
|
+ prop="OrganCode"
|
|
|
+ v-if="showorhidflag=='show'">
|
|
|
+ <el-input v-model="formData.OrganCode"
|
|
|
+ maxlength="50"
|
|
|
+ placeholder="请输入"
|
|
|
+ style="width: 100%">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <!--<el-col :span="8">
|
|
|
+ <el-form-item label="税务登记证地税编号">
|
|
|
+ <el-input v-model="formData.LocalTaxNo" placeholder="请输入" style="width: 100%"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>-->
|
|
|
+ <el-col :span="16">
|
|
|
+ <el-form-item label="注册地址"
|
|
|
+ prop="Province">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-cascader ref="cascaderAdd"
|
|
|
+ :options="countryoptions"
|
|
|
+ :props="countryprops"
|
|
|
+ maxlength="20"
|
|
|
+ placeholder="省市区"
|
|
|
+ v-model="CityAry"
|
|
|
+ style="width: 100%"
|
|
|
+ filterable
|
|
|
+ @change="handleAreaChange">
|
|
|
+ </el-cascader>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="14">
|
|
|
+ <el-input v-model="formData.Address"
|
|
|
+ maxlength="500"
|
|
|
+ placeholder="详细地址"
|
|
|
+ style="width: 100%">
|
|
|
+ </el-input>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="邮编"
|
|
|
+ prop="ZipCode">
|
|
|
+ <el-input v-model="formData.ZipCode"
|
|
|
+ maxlength="20"
|
|
|
+ placeholder="请输入"
|
|
|
+ style="width: 100%">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="16">
|
|
|
+ <el-form-item label="通信地址"
|
|
|
+ prop="LinkProvince">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-cascader ref="cascaderAddrLink"
|
|
|
+ :options="countryoptions"
|
|
|
+ :props="countryprops"
|
|
|
+ placeholder="省市区"
|
|
|
+ v-model="LinkCityAry"
|
|
|
+ maxlength="20"
|
|
|
+ style="width: 100%"
|
|
|
+ filterable
|
|
|
+ @change="handleLinkAreaChange">
|
|
|
+ </el-cascader>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="14">
|
|
|
+ <el-input v-model="formData.LinkAddress"
|
|
|
+ maxlength="500"
|
|
|
+ placeholder="详细地址"
|
|
|
+ style="width: 100%">
|
|
|
+ </el-input>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="邮编"
|
|
|
+ prop="LinkZipCode">
|
|
|
+ <el-input v-model="formData.LinkZipCode"
|
|
|
+ maxlength="20"
|
|
|
+ placeholder="请输入"
|
|
|
+ style="width: 100%">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <!--<el-col :span="8">
|
|
|
+ <el-form-item label="外地企业进津备案通知书">
|
|
|
+ <el-input v-model="formData.TJInNotify" placeholder="请输入" style="width: 100%"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>-->
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="法定代表人姓名"
|
|
|
+ prop="LegalPerson">
|
|
|
+ <el-input v-model="formData.LegalPerson"
|
|
|
+ maxlength="20"
|
|
|
+ placeholder="请输入"
|
|
|
+ style="width: 100%">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="公司类型"
|
|
|
+ prop="CompanyType">
|
|
|
+ <el-select v-model="formData.CompanyType"
|
|
|
+ maxlength="50"
|
|
|
+ filterable
|
|
|
+ allow-create
|
|
|
+ placeholder="请选择"
|
|
|
+ style="width: 100%;">
|
|
|
+ <el-option v-for="item in CompanyTypeOptions"
|
|
|
+ :key="item.Id"
|
|
|
+ :label="item.Key"
|
|
|
+ :value="item.Value"
|
|
|
+ style="width: 100%">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="成立时间" prop="SetupTime">
|
|
|
+ <el-date-picker v-model="formData.SetupTime"
|
|
|
+ type="date"
|
|
|
+ format="yyyy 年 MM 月 dd 日"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="选择日期"
|
|
|
+ style="width: 100%">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="注册资本"
|
|
|
+ prop="RegCapital">
|
|
|
+ <el-input type="number"
|
|
|
+ v-model.number="formData.RegCapital"
|
|
|
+ :min="1"
|
|
|
+ placeholder="请输入"
|
|
|
+ style="width: 100%">
|
|
|
+ <template slot="append">万元</template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="币种">
|
|
|
+ <el-select v-model="formData.Currency"
|
|
|
+ placeholder="请选择"
|
|
|
+ style="width: 100%;">
|
|
|
+ <el-option v-for="item in CurrencyOptions"
|
|
|
+ :key="item.Value"
|
|
|
+ :label="item.Key"
|
|
|
+ :value="item.Value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="开户银行"
|
|
|
+ prop="DepositBank">
|
|
|
+ <el-input v-model="formData.DepositBank"
|
|
|
+ maxlength="50"
|
|
|
+ placeholder="请输入"
|
|
|
+ style="width: 100%">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="联系人姓名"
|
|
|
+ prop="ContactName">
|
|
|
+ <el-input v-model="formData.ContactName"
|
|
|
+ maxlength="20"
|
|
|
+ placeholder="请输入"
|
|
|
+ style="width: 100%">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="移动电话"
|
|
|
+ prop="Mobile">
|
|
|
+ <el-input v-model="formData.Mobile"
|
|
|
+ maxlength="20"
|
|
|
+ placeholder="请输入"
|
|
|
+ style="width: 100%"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="银行账号"
|
|
|
+ prop="BankAccount">
|
|
|
+ <el-input v-model="formData.BankAccount"
|
|
|
+ maxlength="50"
|
|
|
+ placeholder="请输入"
|
|
|
+ style="width: 100%">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="固定电话"
|
|
|
+ prop="Telphone">
|
|
|
+ <el-input v-model="formData.Telphone"
|
|
|
+ maxlength="20"
|
|
|
+ placeholder="区号-0000000"
|
|
|
+ style="width: 100%">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="传真"
|
|
|
+ prop="Fax">
|
|
|
+ <el-input v-model="formData.Fax"
|
|
|
+ maxlength="20"
|
|
|
+ placeholder="区号-0000000"
|
|
|
+ style="width: 100%"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="财务电话"
|
|
|
+ prop="CompanyTel">
|
|
|
+ <el-input v-model="formData.CompanyTel"
|
|
|
+ placeholder="请输入"
|
|
|
+ maxlength="20"
|
|
|
+ style="width: 100%">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="电子邮箱"
|
|
|
+ prop="EMail">
|
|
|
+ <el-input v-model="formData.EMail"
|
|
|
+ maxlength="50"
|
|
|
+ placeholder="请输入"
|
|
|
+ style="width: 100%"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="银行信用等级">
|
|
|
+ <el-input v-model="formData.BankCreditRating"
|
|
|
+ maxlength="10"
|
|
|
+ placeholder="请输入"
|
|
|
+ style="width: 100%">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <el-form class="formDataInfo"
|
|
|
+ label-position="top"
|
|
|
+ ref="EntityFormCert"
|
|
|
+ :rules="rulesform"
|
|
|
+ :model="formData"
|
|
|
+ :disabled="disabled">
|
|
|
+ <el-row :gutter="60">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="质量管理体系认证证书编号及认证机构">
|
|
|
+ <el-input v-model="formData.QualitySystemCert"
|
|
|
+ maxlength="200"
|
|
|
+ placeholder="请输入"
|
|
|
+ type="textarea"
|
|
|
+ style="width: 100%"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="产品质量认证证书编号及认证机构">
|
|
|
+ <el-input v-model="formData.ProductQualityCert"
|
|
|
+ placeholder="请输入"
|
|
|
+ maxlength="200"
|
|
|
+ type="textarea"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="生产/制造许可证证书编号">
|
|
|
+ <el-input v-model="formData.MaunLicense"
|
|
|
+ placeholder="请输入"
|
|
|
+ maxlength="200"
|
|
|
+ type="textarea"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="安全生产许可证证书编号">
|
|
|
+ <el-input v-model="formData.SafetyLicense"
|
|
|
+ maxlength="200"
|
|
|
+ placeholder="请输入"
|
|
|
+ type="textarea"
|
|
|
+ style="width: 100%">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="行业特殊要求的认证证书编号">
|
|
|
+ <el-input v-model="formData.SpecIndustryCert"
|
|
|
+ placeholder="请输入"
|
|
|
+ maxlength="200"
|
|
|
+ type="textarea"
|
|
|
+ style="width: 100%">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="营业范围"
|
|
|
+ prop="BusinessScope">
|
|
|
+ <el-input v-model="formData.BusinessScope"
|
|
|
+ maxlength="1000"
|
|
|
+ placeholder="营业执照上的信息"
|
|
|
+ type="textarea"
|
|
|
+ style="width: 100%"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="备注">
|
|
|
+ <el-input v-model="formData.Remark"
|
|
|
+ maxlength="500"
|
|
|
+ placeholder="请输入"
|
|
|
+ type="textarea"
|
|
|
+ style="width: 100%">
|
|
|
+ </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"
|
|
|
+ >添加</el-button>
|
|
|
+ </div>
|
|
|
+ <manufacturer-list ref="manufacturerList"
|
|
|
+ :data.sync="manufacturerList"
|
|
|
+ :SupplierCertId="certId+''"
|
|
|
+ :canadd="true"
|
|
|
+ height="360px"
|
|
|
+ style="margin-top: 20px"></manufacturer-list>
|
|
|
+ </el-card>
|
|
|
+ <el-card class="box-card mycard"
|
|
|
+ style="margin-top: 35px;">
|
|
|
+ <div slot="header"
|
|
|
+ class="clearfix">
|
|
|
+ <span style="padding:3px 20px">现场考察报告</span>
|
|
|
+ <el-button type="primary" style="margin-left: 10px;" plain size="mini" title="上传" @click="openDialog()" >上传
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ <el-table :data="scenefileurllist" border size="mini" empty-text="暂无数据" style="margin-top: 30px;">
|
|
|
+ <el-table-column prop="FileUrlList" label="报告" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <viewer>
|
|
|
+ <div style="vertical-align: middle; text-align: center;">
|
|
|
+ <el-link :href="'http://'+fileurlcut(scope.row.FileUrl)" target="_blank" type="primary"
|
|
|
+ v-if="imgFormat(scope.row.FileUrl)" >
|
|
|
+ {{scope.row.FileUrl}}</el-link>
|
|
|
+ <img
|
|
|
+ v-else
|
|
|
+ class="photoStyle" alt=""
|
|
|
+ :src="'http://'+fileurlcut(scope.row.FileUrl)">
|
|
|
+ </div>
|
|
|
+ </viewer>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="FileUrlList" label="描述" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{scope.row.Remark}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" width="150" align="center" fixed>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="primary" plain size="mini" title="删除" style="margin-left:3px" @click="deletedata(scope.row.Id)">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-card>
|
|
|
+ <!--打印内容结束-->
|
|
|
+ <el-dialog title="现场考察报告" :visible.sync="visible" top="5vh" width="900px">
|
|
|
+ <el-form :model="SubfileForm" label-width="100px">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="现场考察报告">
|
|
|
+ <el-upload :limit="1" 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>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="描述">
|
|
|
+ <el-input v-model="SubfileForm.Remark" type="textarea" :rows=3 placeholder="请输入备注信息"></el-input>
|
|
|
+ </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="makesure()">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import axios from 'axios'
|
|
|
+ import api from '@/api/oilsupplier/supplier'
|
|
|
+ import uploadajax from '../../assets/js/uploadajax.js'
|
|
|
+ import ManufacturerList from '@/components/oilsupplier/manufacturerlist'
|
|
|
+
|
|
|
+ // v-viewer
|
|
|
+ import Vue from 'vue'
|
|
|
+ import Viewer from 'v-viewer'
|
|
|
+ import 'viewerjs/dist/viewer.css'
|
|
|
+ Vue.use(Viewer)
|
|
|
+ Viewer.setDefaults({
|
|
|
+ Options: { 'inline': true, 'button': true, 'navbar': true, 'title': true, 'toolbar': true, 'tooltip': true, 'movable': true, 'zoomable': true, 'rotatable': true, 'scalable': true, 'transition': true, 'fullscreen': true, 'keyboard': true, 'url': 'data-source' }
|
|
|
+ })
|
|
|
+
|
|
|
+ export default {
|
|
|
+ name: 'goodsinfo',
|
|
|
+ props: {
|
|
|
+ formData: {
|
|
|
+ type: Object,
|
|
|
+ default: null
|
|
|
+ },
|
|
|
+ dictData: {
|
|
|
+ type: Object,
|
|
|
+ default: {}
|
|
|
+ },
|
|
|
+ authUser: {
|
|
|
+ type: Object,
|
|
|
+ default: null
|
|
|
+ },
|
|
|
+ disabled: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false
|
|
|
+ },
|
|
|
+ canUpdateSupplier: {
|
|
|
+ type: Boolean,
|
|
|
+ default: true
|
|
|
+ },
|
|
|
+ appendStatus: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ components: {
|
|
|
+ ManufacturerList
|
|
|
+ },
|
|
|
+ data () {
|
|
|
+ var checkemail = (rule, value, callback) => {
|
|
|
+ if (value) {
|
|
|
+ let re = /^([a-zA-Z0-9]+[_|-|.|-]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|-|.|-]?)*[a-zA-Z0-9]+.[a-zA-Z]{2,3}$/
|
|
|
+ if (!re.test(value)) {
|
|
|
+ callback(new Error('请输入正确的邮箱地址'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ var checkCommercialNo = (rule, value, callback) => {
|
|
|
+ if (!value) {
|
|
|
+ callback(new Error('请输入统一社会信用代码'))
|
|
|
+ } else {
|
|
|
+ if (this.showorhidflag === 'hid') {
|
|
|
+ let re = /^[^_IOZSVa-z\W]{2}\d{6}[^_IOZSVa-z\W]{10}$/g
|
|
|
+ if (!re.test(value)) {
|
|
|
+ callback(new Error('请输入正确的统一社会信用代码'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 查找是否有公司信息,若有则补全信息。
|
|
|
+ var checkSupplierName = (rule, value, callback) => {
|
|
|
+ if (!value) {
|
|
|
+ callback(new Error('请输入供方名称'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 检查邮编格式
|
|
|
+ var checkZipCode = (rule, value, callback) => {
|
|
|
+ if (!value) {
|
|
|
+ callback(new Error('请输入邮编'))
|
|
|
+ } else {
|
|
|
+ let re = /^[0-9]{6}$/
|
|
|
+ if (!re.test(value)) {
|
|
|
+ callback(new Error('请输入正确的邮编'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 检查手机号
|
|
|
+ var checkMobile = (rule, value, callback) => {
|
|
|
+ if (!value) {
|
|
|
+ callback(new Error('请输入手机号码'))
|
|
|
+ } else {
|
|
|
+ let re = /^1[3456789]\d{9}$/
|
|
|
+ if (!re.test(value)) {
|
|
|
+ callback(new Error('请输入正确的手机号码'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 固话检验
|
|
|
+ var checkTelphone = (rule, value, callback) => {
|
|
|
+ if (!value) {
|
|
|
+ callback(new Error('请输入固话号码'))
|
|
|
+ } else {
|
|
|
+ let re = /^((0\d{2,3}-\d{7,8})|(1[35874]\d{9}))$/
|
|
|
+ if (!re.test(value)) {
|
|
|
+ callback(new Error('请输入正确的固话格式为:区号-0000000'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 注册资金限制
|
|
|
+ var checkMoney = (rule, value, callback) => {
|
|
|
+ if (value < 0) {
|
|
|
+ callback(new Error('注册资本不能小于0'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ // if (!value) {
|
|
|
+ // if (value !== 0) {
|
|
|
+ // return callback(new Error('注册资金不能为空*'))
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // if (value < 0) {
|
|
|
+ // callback(new Error('注册资金至少为0'))
|
|
|
+ // } else {
|
|
|
+ // callback()
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 传真检验
|
|
|
+ var checkFax = (rule, value, callback) => {
|
|
|
+ if (!value) {
|
|
|
+ callback()
|
|
|
+ } else {
|
|
|
+ let re = /^((0\d{2,3}-\d{7,8})|(1[35874]\d{9}))$/
|
|
|
+ if (!re.test(value)) {
|
|
|
+ callback(new Error('请输入正确的传真格式为:区号-0000000'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ var checkBankAccount = (rule, value, callback) => {
|
|
|
+ if (value === '') {
|
|
|
+ callback(new Error('请输入银行账号'))
|
|
|
+ } else {
|
|
|
+ if (value.length < 12) {
|
|
|
+ callback(new Error('请填写正确位数的银行账号'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return {
|
|
|
+ subfileList: [],
|
|
|
+ manufacturerList: [],
|
|
|
+ certId: 0,
|
|
|
+ visible: false,
|
|
|
+ isInvestigate: false,
|
|
|
+ address: [],
|
|
|
+ linkaddress: [],
|
|
|
+ checkStatus: ['1', '2', '3', '4', '5', '6', '7', '8', '10', '11'],
|
|
|
+ showorhidflag: 'hid',
|
|
|
+ selectoptions: [{
|
|
|
+ value: '1',
|
|
|
+ label: '三证合一'
|
|
|
+ }, {
|
|
|
+ value: '2',
|
|
|
+ label: '五证合一'
|
|
|
+ }, {
|
|
|
+ value: '3',
|
|
|
+ label: '常规'
|
|
|
+ }],
|
|
|
+ companyReadonly: false,
|
|
|
+ companynames: [],
|
|
|
+ ManagementUnitOptions: [],
|
|
|
+ GradeOptions: [{
|
|
|
+ value: '1',
|
|
|
+ label: '一级'
|
|
|
+ }, {
|
|
|
+ value: '2',
|
|
|
+ label: '二级'
|
|
|
+ }],
|
|
|
+ UnitRelationOptions: [],
|
|
|
+ OperTypeOptions: [],
|
|
|
+ InOptions: [],
|
|
|
+ CompanyTypeOptions: [],
|
|
|
+ CurrencyOptions: [],
|
|
|
+ UnitRelationAry: [],
|
|
|
+ countryoptions: [],
|
|
|
+ countryListOptions: [],
|
|
|
+ waituploads: [], // 等待上传的附件列表
|
|
|
+ scenefileurllist: [],
|
|
|
+ scenefile: {
|
|
|
+ FileUrl: '',
|
|
|
+ FileName: '',
|
|
|
+ Remark: ''
|
|
|
+ },
|
|
|
+ isscenefile: false,
|
|
|
+ countryprops: {
|
|
|
+ value: 'adcode',
|
|
|
+ label: 'name',
|
|
|
+ children: 'districts'
|
|
|
+ },
|
|
|
+ CityAry: [],
|
|
|
+ LinkCityAry: [],
|
|
|
+ // HSEOptions: [{
|
|
|
+ // value: '1',
|
|
|
+ // label: '是'
|
|
|
+ // }, {
|
|
|
+ // value: '0',
|
|
|
+ // label: '否'
|
|
|
+ // }],
|
|
|
+ SubfileForm: {
|
|
|
+ Id: '',
|
|
|
+ SupplierId: '',
|
|
|
+ NeedFileType: '',
|
|
|
+ NeedFileCode: '',
|
|
|
+ FileType: '',
|
|
|
+ FileExt: '',
|
|
|
+ FileName: '',
|
|
|
+ EffectDate: new Date(),
|
|
|
+ FileUrl: '',
|
|
|
+ OtherRemark: '',
|
|
|
+ Remark: '',
|
|
|
+ IsDelete: 0,
|
|
|
+ FileUrlList: []
|
|
|
+ },
|
|
|
+ rulesform: {
|
|
|
+ Mobile: [{
|
|
|
+ required: true,
|
|
|
+ validator: checkMobile,
|
|
|
+ trigger: 'change'
|
|
|
+ }],
|
|
|
+ Grade: [{
|
|
|
+ required: true,
|
|
|
+ message: '请选择级别',
|
|
|
+ trigger: 'change'
|
|
|
+ }],
|
|
|
+ OperType: [{
|
|
|
+ required: true,
|
|
|
+ message: '请选择供应商类型',
|
|
|
+ trigger: 'change'
|
|
|
+ }],
|
|
|
+ Telphone: [{
|
|
|
+ required: true,
|
|
|
+ validator: checkTelphone,
|
|
|
+ trigger: 'blur'
|
|
|
+ }],
|
|
|
+ Fax: [{
|
|
|
+ required: false,
|
|
|
+ validator: checkFax,
|
|
|
+ trigger: 'blur'
|
|
|
+ }],
|
|
|
+ BusinessScope: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入营业范围',
|
|
|
+ trigger: 'change'
|
|
|
+ }],
|
|
|
+ ZipCode: [{
|
|
|
+ required: true,
|
|
|
+ validator: checkZipCode,
|
|
|
+ trigger: 'change'
|
|
|
+ }],
|
|
|
+ LinkZipCode: [{
|
|
|
+ required: true,
|
|
|
+ validator: checkZipCode,
|
|
|
+ trigger: 'change'
|
|
|
+ }],
|
|
|
+ SupplierName: [{
|
|
|
+ required: true,
|
|
|
+ validator: checkSupplierName,
|
|
|
+ trigger: 'change'
|
|
|
+ }],
|
|
|
+ Country: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入国家',
|
|
|
+ trigger: 'change'
|
|
|
+ }],
|
|
|
+ CommercialNo: [{
|
|
|
+ required: true,
|
|
|
+ validator: checkCommercialNo,
|
|
|
+ trigger: 'change'
|
|
|
+ }],
|
|
|
+ CountryTaxNo: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入税务登记证编号',
|
|
|
+ trigger: 'change'
|
|
|
+ }],
|
|
|
+ CompanyType: [{
|
|
|
+ required: true,
|
|
|
+ message: '请选择公司类型',
|
|
|
+ trigger: 'change'
|
|
|
+ }],
|
|
|
+ LegalPerson: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入法定代表人姓名',
|
|
|
+ trigger: 'change'
|
|
|
+ }],
|
|
|
+ Province: [{
|
|
|
+ required: true,
|
|
|
+ message: '请选择省市区',
|
|
|
+ trigger: 'blur'
|
|
|
+ }],
|
|
|
+ Address: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入注册地址',
|
|
|
+ trigger: 'change'
|
|
|
+ }],
|
|
|
+ EMail: [{
|
|
|
+ required: false,
|
|
|
+ validator: checkemail,
|
|
|
+ trigger: 'change'
|
|
|
+ }],
|
|
|
+ OrganCode: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入组织机构代码',
|
|
|
+ trigger: 'change'
|
|
|
+ }],
|
|
|
+ SetupTime: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入成立时间',
|
|
|
+ trigger: 'change'
|
|
|
+ }],
|
|
|
+ RegCapital: [
|
|
|
+ {required: true, validator: checkMoney, trigger: 'change'},
|
|
|
+ { type: 'number', message: '只能输入数字', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ DepositBank: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入开户银行',
|
|
|
+ trigger: 'change'
|
|
|
+ }],
|
|
|
+ BankAccount: [{
|
|
|
+ required: true,
|
|
|
+ validator: checkBankAccount,
|
|
|
+ trigger: 'change'
|
|
|
+ }],
|
|
|
+ ContactName: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入联系人姓名',
|
|
|
+ trigger: 'change'
|
|
|
+ }],
|
|
|
+ CompanyTel: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入财务电话',
|
|
|
+ trigger: 'change'
|
|
|
+ }],
|
|
|
+
|
|
|
+ LinkProvince: [{
|
|
|
+ required: true,
|
|
|
+ message: '请选择省市区',
|
|
|
+ trigger: 'blur'
|
|
|
+ }],
|
|
|
+ LinkAddress: [{
|
|
|
+ required: true,
|
|
|
+ message: '请输入通信地址',
|
|
|
+ trigger: 'change'
|
|
|
+ }],
|
|
|
+ realname: [{
|
|
|
+ required: true,
|
|
|
+ message: '用户名',
|
|
|
+ trigger: 'blur'
|
|
|
+ }]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created () {
|
|
|
+ // if(this.authUser && this.authUser.Profile.IsCompanyUser === 1){
|
|
|
+ // this.inputCompanyName(this.authUser.Profile.Realname)
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ mounted () {
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ dictData: {
|
|
|
+ handler (newName, oldName) {
|
|
|
+ this.getDictOptions()
|
|
|
+ },
|
|
|
+ immediate: true
|
|
|
+ },
|
|
|
+ formData: {
|
|
|
+ handler (newName, oldName) {
|
|
|
+ this.getSupplierSceneFile()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getCurrentManufactureCount2 () {
|
|
|
+ return this.$refs['manufacturerList'].getCurrentManufactureCount3()
|
|
|
+ },
|
|
|
+ deletedata (id) {
|
|
|
+ let _this = this
|
|
|
+ _this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ // this.editSubfile(FileName, FileUrl)
|
|
|
+ api.deleteFileEntity(id, _this.$axios)
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ _this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ this.visible = false
|
|
|
+ this.$emit('initFDatas')
|
|
|
+ this.getSupplierSceneFile()
|
|
|
+ this.$refs.refuploadattach.uploadFiles = []
|
|
|
+ } else {
|
|
|
+ _this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ }).catch(() => {
|
|
|
+ /* this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消删除'
|
|
|
+ }) */
|
|
|
+ })
|
|
|
+ },
|
|
|
+ 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()
|
|
|
+ },
|
|
|
+ imgFormat (fileurl) {
|
|
|
+ console.log(fileurl, 'fileurl')
|
|
|
+ let url = fileurl.split('|')
|
|
|
+ if (url[1] != null && url[1] != undefined && url[1] != '') {
|
|
|
+ let Format = url[1].split('.')
|
|
|
+ if (Format[1] != null && Format[1] != '' && Format[1] != undefined) {
|
|
|
+ let pictureFormat = Format[1]
|
|
|
+ if (pictureFormat == 'jpg' || pictureFormat == 'bmp' || pictureFormat == 'png' || pictureFormat == 'gif' || pictureFormat == 'jpeg') {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true
|
|
|
+ },
|
|
|
+ fileurlcut (val, index) {
|
|
|
+ // let fileurlall = val.split('$')[index]
|
|
|
+ let fileurlall = val
|
|
|
+ let fileurl = fileurlall.split('|')
|
|
|
+ let retUrl = fileurl[0]
|
|
|
+ // 内网服务器专用
|
|
|
+ if (process.client && retUrl.indexOf('/upfile') === 0) {
|
|
|
+ const myDomain = window.location.host
|
|
|
+ retUrl = myDomain + '/' + retUrl
|
|
|
+ }
|
|
|
+ return retUrl
|
|
|
+ },
|
|
|
+ openDialog () {
|
|
|
+ if (this.formData.Id <= 0) {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请先保存基本信息'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.visible = true
|
|
|
+ },
|
|
|
+
|
|
|
+ getattachissuccess () {
|
|
|
+ this.SubfileForm.FileUrl = ''
|
|
|
+ this.SubfileForm.FileName = ''
|
|
|
+ if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
|
|
|
+ for (let i = 0; i < this.$refs.refuploadattach.uploadFiles.length; i++) {
|
|
|
+ if (this.$refs.refuploadattach.uploadFiles[i].status === 'success') {
|
|
|
+ for (let j = 0; j < this.waituploads.length; j++) {
|
|
|
+ if (this.waituploads[j].uid === this.$refs.refuploadattach.uploadFiles[i].uid) {
|
|
|
+ this.SubfileForm.FileUrl +=
|
|
|
+ `${this.waituploads[j].url}/${this.waituploads[j].fid}|${this.$refs.refuploadattach.uploadFiles[i].name}$`
|
|
|
+ this.SubfileForm.FileName += `${this.$refs.refuploadattach.uploadFiles[i].name}$`
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ indexOf (arr, val) {
|
|
|
+ for (var i = 0; i < arr.length; i++) {
|
|
|
+ if (arr[i] === val) {
|
|
|
+ return i
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return -1
|
|
|
+ },
|
|
|
+ editSubfile (FileName, FileUrl) {
|
|
|
+ let _this = this
|
|
|
+ _this.SubfileForm.SupplierId = parseInt(_this.formData.Id)
|
|
|
+ var list = _this.scenefileurllist
|
|
|
+ var url = ''
|
|
|
+ var name = ''
|
|
|
+ for (var i = 0; i < list.length; i++) {
|
|
|
+ url += list[i] + '$'
|
|
|
+ name += list[i].split('|')[1] + '$'
|
|
|
+ }
|
|
|
+ if (name) {
|
|
|
+ name = ''
|
|
|
+ }
|
|
|
+ var newUrl = url + _this.SubfileForm['FileUrl']
|
|
|
+ var newName = name + _this.SubfileForm['FileName']
|
|
|
+ var nameArr = newName.split('$')
|
|
|
+ var urlArr = newUrl.split('$')
|
|
|
+ // name去重
|
|
|
+ for (var i = 0, len = nameArr.length; i < len; i++) {
|
|
|
+ for (var j = i + 1, len = nameArr.length; j < len; j++) {
|
|
|
+ if (nameArr[i] === nameArr[j]) {
|
|
|
+ nameArr.splice(j, 1)
|
|
|
+ j--
|
|
|
+ len--
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // url去重
|
|
|
+ for (let i = 0, len = urlArr.length; i < len; i++) {
|
|
|
+ for (let j = i + 1, len = urlArr.length; j < len; j++) {
|
|
|
+ if (urlArr[i].split('|')[1] === urlArr[j].split('|')[1]) {
|
|
|
+ urlArr.splice(j, 1)
|
|
|
+ j--
|
|
|
+ len--
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (FileUrl) {
|
|
|
+ let index = this.indexOf(urlArr, FileUrl)
|
|
|
+ if (index > -1) {
|
|
|
+ urlArr.splice(index, 1)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (FileName) {
|
|
|
+ let index1 = this.indexOf(nameArr, FileName)
|
|
|
+ if (index1 > -1) {
|
|
|
+ nameArr.splice(index1, 1)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ _this.SubfileForm['FileName'] = nameArr.join('$')
|
|
|
+ _this.SubfileForm['FileUrl'] = urlArr.join('$')
|
|
|
+ _this.$axios.put('/supplier/editsubfile/' + this.SubfileForm.SupplierId, _this.SubfileForm)
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ _this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ this.visible = false
|
|
|
+ this.$emit('initFDatas')
|
|
|
+ this.$refs.refuploadattach.uploadFiles = []
|
|
|
+ } else {
|
|
|
+ _this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ editSubfileCopy () {
|
|
|
+ let _this = this
|
|
|
+ _this.SubfileForm.SupplierId = parseInt(_this.formData.Id)
|
|
|
+ console.log(_this.SubfileForm, '2222')
|
|
|
+ _this.$axios.put('/supplier/editsubfilecopy/' + this.SubfileForm.SupplierId, _this.SubfileForm)
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ _this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ this.visible = false
|
|
|
+ this.$emit('initFDatas')
|
|
|
+ this.$refs.refuploadattach.uploadFiles = []
|
|
|
+ } else {
|
|
|
+ _this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getSupplierSceneFile () {
|
|
|
+ if (this.formData.Id !== '') {
|
|
|
+ let params = {
|
|
|
+ SupplierId: this.formData.Id
|
|
|
+ }
|
|
|
+ this.isInvestigate = true
|
|
|
+ this.$axios.get('/supplier/getscenefilelist', {params}).then(res => {
|
|
|
+ // TODO 文件已经仅只上传一张, 还需展示描述
|
|
|
+ this.scenefileurllist = res.data.item
|
|
|
+ // this.scenefileurl = res.data.item
|
|
|
+ if (this.scenefileurllist && this.scenefileurllist.length > 0) {
|
|
|
+ this.isscenefile = true
|
|
|
+ } else {
|
|
|
+ this.isscenefile = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ makesure () {
|
|
|
+ if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
|
|
|
+ // 上传附件是否完成判断
|
|
|
+ if (!this.attachissuccess()) {
|
|
|
+ this.$message.error('有附件未成功上传!不能保存数据')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.getattachissuccess()
|
|
|
+ // this.editSubfile('', '')
|
|
|
+ this.editSubfileCopy()
|
|
|
+ return false
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请上传文件!'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 判断附件是否上传成功
|
|
|
+ attachissuccess () {
|
|
|
+ if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
|
|
|
+ for (let i = 0; i < this.$refs.refuploadattach.uploadFiles.length; i++) {
|
|
|
+ if (this.$refs.refuploadattach.uploadFiles[i].status !== 'success') {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true
|
|
|
+ },
|
|
|
+ beforeAvatarUpload (file) {
|
|
|
+ /* let isLt512K = file.size / 1024 < 512
|
|
|
+ if (isLt512K) {
|
|
|
+ this.$message.error('上传文件大小不能小于 512KB!')
|
|
|
+ return false
|
|
|
+ } */
|
|
|
+ },
|
|
|
+ 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.waituploads.push({
|
|
|
+ uid: option.file.uid,
|
|
|
+ url: res.data.publicUrl,
|
|
|
+ fid: res.data.fid
|
|
|
+ })
|
|
|
+ uploadajax(option)
|
|
|
+ } else {
|
|
|
+ _this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '未上传成功!请刷新界面重新上传!'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(function () {
|
|
|
+ _this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '未上传成功!请重新上传!'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ GradeChange (val) {
|
|
|
+ if (this.certId) {
|
|
|
+ if (val === '2') {
|
|
|
+ this.$confirm('级别变为二级,将删除一级的准入项!', '变更确认', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.formData.Grade = '2'
|
|
|
+ this.formData.MgrUnit = ''
|
|
|
+ this.formData.PACNumber = ''
|
|
|
+ })
|
|
|
+ this.formData.Grade = '1'
|
|
|
+ } else {
|
|
|
+ this.formData.MgrUnit = '中油集团公司'
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (val === '2') {
|
|
|
+ this.formData.MgrUnit = ''
|
|
|
+ this.formData.PACNumber = ''
|
|
|
+ } else {
|
|
|
+ this.formData.MgrUnit = '中油集团公司'
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ InStyleChange (val) {
|
|
|
+ if (val === '2') {
|
|
|
+ this.formData.MgrUnit = '中油集团公司'
|
|
|
+ this.formData.Grade = '1'
|
|
|
+ } else if (val === '3') { // 二级物资
|
|
|
+ this.formData.Grade = '2'
|
|
|
+ this.formData.MgrUnit = ''
|
|
|
+ // 二级物资的时候是其他地区公司管理,大港油田不能选
|
|
|
+ for (let idx in this.ManagementUnitOptions) {
|
|
|
+ if (this.ManagementUnitOptions[idx].Key.indexOf('大港油田') >= 0) {
|
|
|
+ this.ManagementUnitOptions[idx].disabled = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.formData.Grade = ''
|
|
|
+ this.formData.MgrUnit = ''
|
|
|
+ }
|
|
|
+
|
|
|
+ if (val === '3') { // 二级物资
|
|
|
+ // 二级物资的时候是其他地区公司管理,大港油田不能选
|
|
|
+ for (let idx in this.ManagementUnitOptions) {
|
|
|
+ if (this.ManagementUnitOptions[idx].Key.indexOf('大港油田') >= 0) {
|
|
|
+ this.ManagementUnitOptions[idx].disabled = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ for (let idx in this.ManagementUnitOptions) {
|
|
|
+ if (this.ManagementUnitOptions[idx].Key.indexOf('大港油田') >= 0) {
|
|
|
+ this.ManagementUnitOptions[idx].disabled = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ currentSel (event) {
|
|
|
+ if (event === 2) {
|
|
|
+ this.formData.InStyle = '5'
|
|
|
+ // for(let item of this.$refs.inStyle.options) {
|
|
|
+ // if(item.value=='5'){
|
|
|
+ // console.log(item.style)
|
|
|
+ // }else{
|
|
|
+ // //隐藏
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ } else {
|
|
|
+ this.formData.InStyle = '1'
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ showorhid (val) {
|
|
|
+ if (val === '1' || val === '2') {
|
|
|
+ this.showorhidflag = 'hid'
|
|
|
+ this.formData.OrganCode = ''
|
|
|
+ this.formData.CountryTaxNo = ''
|
|
|
+ } else {
|
|
|
+ if (this.formData.CommercialNo !== '') {
|
|
|
+ this.formData.OrganCode = this.formData.CommercialNo
|
|
|
+ this.formData.CountryTaxNo = this.formData.CommercialNo
|
|
|
+ }
|
|
|
+ this.showorhidflag = 'show'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 注释原因:三证合一,五证合一,取消自动填充
|
|
|
+ // commnoChange () {
|
|
|
+ // this.formData.CountryTaxNo = this.formData.CommercialNo
|
|
|
+ // this.formData.OrganCode = this.formData.CommercialNo
|
|
|
+ // },
|
|
|
+
|
|
|
+ // 查找是否有公司信息,若有则补全信息
|
|
|
+ searchSupplierName () {
|
|
|
+ let _this = this
|
|
|
+ _this.$axios.get('/register/getcompanyinfo/' + _this.formData.SupplierName, {})
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.items && res.data.items.length === 1) {
|
|
|
+ _this.formData.SupplierName = res.data.items[0].SupplierName
|
|
|
+ _this.formData.CredentialFlag = res.data.items[0].CredentialFlag
|
|
|
+ _this.formData.CommercialNo = res.data.items[0].CommercialNo
|
|
|
+ _this.formData.CountryTaxNo = res.data.items[0].CountryTaxNo
|
|
|
+ _this.formData.OrganCode = res.data.items[0].OrganCode
|
|
|
+ _this.formData.LocalTaxNo = res.data.items[0].LocalTaxNo
|
|
|
+ _this.formData.Address = res.data.items[0].Address
|
|
|
+ _this.formData.Province = res.data.items[0].Province
|
|
|
+ _this.formData.City = res.data.items[0].City
|
|
|
+ _this.formData.Street = res.data.items[0].Street
|
|
|
+ _this.CityAry = []
|
|
|
+ _this.CityAry.push(_this.formData.Province)
|
|
|
+ _this.CityAry.push(_this.formData.City)
|
|
|
+ _this.CityAry.push(_this.formData.Street)
|
|
|
+ _this.formData.ZipCode = res.data.items[0].ZipCode
|
|
|
+ _this.formData.LinkAddress = res.data.items[0].LinkAddress
|
|
|
+ _this.formData.LinkProvince = res.data.items[0].LinkProvince
|
|
|
+ _this.formData.LinkCity = res.data.items[0].LinkCity
|
|
|
+ _this.formData.LinkStreet = res.data.items[0].LinkStreet
|
|
|
+ _this.LinkCityAry = []
|
|
|
+ _this.LinkCityAry.push(_this.formData.LinkProvince)
|
|
|
+ _this.LinkCityAry.push(_this.formData.LinkCity)
|
|
|
+ _this.LinkCityAry.push(_this.formData.LinkStreet)
|
|
|
+ _this.formData.LinkZipCode = res.data.items[0].LinkZipCode
|
|
|
+ _this.formData.LegalPerson = res.data.items[0].LegalPerson
|
|
|
+ _this.formData.CompanyType = res.data.items[0].CompanyType
|
|
|
+ _this.formData.RegCapital = res.data.items[0].RegCapital
|
|
|
+ _this.formData.SetupTime = res.data.items[0].SetupTime
|
|
|
+ _this.formData.DepositBank = res.data.items[0].DepositBank
|
|
|
+ _this.formData.BankAccount = res.data.items[0].BankAccount
|
|
|
+ _this.formData.ContactName = res.data.items[0].ContactName
|
|
|
+ if (res.data.items[0].Mobile != null && res.data.items[0].Mobile !== '') {
|
|
|
+ _this.formData.Mobile = res.data.items[0].Mobile
|
|
|
+ } else {
|
|
|
+ _this.formData.Mobile = res.data.items[0].UserTelephone
|
|
|
+ }
|
|
|
+ _this.formData.Telphone = res.data.items[0].Telphone
|
|
|
+ _this.formData.Fax = res.data.items[0].Fax
|
|
|
+ _this.formData.CompanyTel = res.data.items[0].CompanyTel
|
|
|
+ _this.formData.EMail = res.data.items[0].EMail
|
|
|
+ _this.formData.BankCreditRating = res.data.items[0].BankCreditRating
|
|
|
+ _this.formData.Remark = res.data.items[0].Remark
|
|
|
+ _this.formData.WZAccessCardNo = res.data.items[0].WZAccessCardNo
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ getDictOptions () {
|
|
|
+ if (this.dictData) {
|
|
|
+ this.ManagementUnitOptions = this.dictData['ManagementUnit']
|
|
|
+ this.UnitRelationOptions = this.dictData['UnitRelation']
|
|
|
+ this.OperTypeOptions = this.dictData['OperType']
|
|
|
+ this.InOptions = this.dictData['InOptions']
|
|
|
+ this.CompanyTypeOptions = this.dictData['CompanyType']
|
|
|
+ this.CurrencyOptions = this.dictData['CurrencyType']
|
|
|
+ this.getCityList(this.dictData['GaodeMapChinaAreas'])
|
|
|
+ this.getCountryList(this.dictData['CountryList'])
|
|
|
+ // let suppliers = this.dictData['CompanyNames']
|
|
|
+ // for (let idx in suppliers) {
|
|
|
+ // suppliers[idx]['value'] = suppliers[idx].SupplierName
|
|
|
+ // this.companynames.push(suppliers[idx])
|
|
|
+ // }
|
|
|
+ // if (this.authUser && this.authUser.Profile.IsCompanyUser === 1 && this.companynames.length > 0) {
|
|
|
+ // if (!this.formData.Id) {
|
|
|
+ // this.formData.SupplierName = ''
|
|
|
+ // }
|
|
|
+ // this.companyReadonly = true
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getCityList (val) {
|
|
|
+ let resultData = JSON.parse(val)
|
|
|
+ let countstr = JSON.stringify(resultData.districts[0].districts)
|
|
|
+ // eslint-disable-next-line no-useless-escape
|
|
|
+ countstr = countstr.replace(/\,\"districts\"\:\[\]/g, '')
|
|
|
+ this.countryoptions = JSON.parse(countstr)
|
|
|
+ },
|
|
|
+ getCountryList (val) {
|
|
|
+ let tmpJson = JSON.parse(val)
|
|
|
+ this.countryListOptions = []
|
|
|
+ for (let idx in tmpJson) {
|
|
|
+ this.countryListOptions.push({
|
|
|
+ label: tmpJson[idx].split('-')[0],
|
|
|
+ value: tmpJson[idx].split('-')[1],
|
|
|
+ code: tmpJson[idx].split('-')[2],
|
|
|
+ key: tmpJson[idx]
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ unitRelationChange (value) {
|
|
|
+ this.formData.SpecTypeCode = value.join(',')
|
|
|
+ },
|
|
|
+ handleAreaChange (value) {
|
|
|
+ this.formData.Province = value[0]
|
|
|
+ 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) {
|
|
|
+ var y = date.getFullYear()
|
|
|
+ var m = date.getMonth() + 1
|
|
|
+ m = m < 10 ? ('0' + m) : m
|
|
|
+ var d = date.getDate()
|
|
|
+ d = d < 10 ? ('0' + d) : d
|
|
|
+ var h = date.getHours()
|
|
|
+ var minute = date.getMinutes()
|
|
|
+ minute = minute < 10 ? ('0' + minute) : minute
|
|
|
+ return y + '-' + m + '-' + d + ' ' + h + ':' + minute
|
|
|
+ },
|
|
|
+
|
|
|
+ /** ----------------------- */
|
|
|
+ // querySearch (queryString, cb) {
|
|
|
+ // var results = queryString ? this.companynames.filter(this.createFilter(queryString)) : this.companynames
|
|
|
+ // // 调用 callback 返回建议列表的数据
|
|
|
+ // cb(results)
|
|
|
+ // },
|
|
|
+ createFilter (queryString) {
|
|
|
+ return (restaurant) => {
|
|
|
+ return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // handleSelect (item) {
|
|
|
+ // this.$emit('selectcompany', item)
|
|
|
+ // },
|
|
|
+ inputCompanyName (val) {
|
|
|
+ this.$emit('inputcompany', val)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+<style>
|
|
|
+ .formDataInfo .el-input__inner[readonly] {
|
|
|
+ border-color: #dcdfe6;
|
|
|
+ }
|
|
|
+
|
|
|
+ .formDataInfo .el-input__inner[readonly]:focus {
|
|
|
+ border-color: #dcdfe6;
|
|
|
+ }
|
|
|
+
|
|
|
+ .formDataInfo .el-textarea__inner[readonly] {
|
|
|
+ border-color: #dcdfe6;
|
|
|
+ }
|
|
|
+
|
|
|
+ .formDataInfo .el-textarea__inner[readonly]:focus {
|
|
|
+ border-color: #dcdfe6;
|
|
|
+ }
|
|
|
+
|
|
|
+ .formDataInfo .el-input__inner[disabled] {
|
|
|
+ color: black;
|
|
|
+ opacity: 1;
|
|
|
+ background-color: white;
|
|
|
+ }
|
|
|
+
|
|
|
+ .formDataInfo .el-textarea__inner[disabled] {
|
|
|
+ color: black;
|
|
|
+ opacity: 1;
|
|
|
+ background-color: white;
|
|
|
+ }
|
|
|
+</style>
|