You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1366 lines
51 KiB
1366 lines
51 KiB
<template>
|
|
<div class="app-container">
|
|
<div v-show="isBankInfo">
|
|
<div class="tab-header webtop">
|
|
<div>
|
|
<div v-if="stateId == '0'">【新增】厂商信息</div>
|
|
<div v-else>【修改】厂商信息</div>
|
|
</div>
|
|
<div>
|
|
<el-button type="primary" size="small" @click="handleCreate()">保存</el-button>
|
|
<el-button type="primary" size="small" @click="handleSubmit()">提交</el-button>
|
|
<el-button type="info" size="small" @click="handleReturn()">返回</el-button>
|
|
</div>
|
|
</div>
|
|
<!-- 新增 修改 -->
|
|
<div class="listconadd">
|
|
<el-form ref="dataForm" :model="temp" class="formadd" :rules="rules">
|
|
<div class="title">基本信息</div>
|
|
<el-row>
|
|
<el-col :span="4">
|
|
<span><span class="icon">*</span>厂商名称</span>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item prop="manufacturerName">
|
|
<el-input v-model="temp.manufacturerName" maxlength="100" placeholder="" class="addinputw" clearable/>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<span>简称</span>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item>
|
|
<el-input v-model="temp.manufacturerAs" maxlength="20" placeholder="" class="addinputw" clearable/>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="4">
|
|
<span>编码</span>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item>
|
|
<el-input v-model="temp.manufacturerCode" maxlength="20" placeholder="" class="addinputw" clearable/>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<span><span class="icon">*</span>分类</span>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item prop="supplierType">
|
|
<el-select v-model="temp.supplierType" class="addinputw" placeholder="" @change="getSupplierType">
|
|
<el-option v-for="item in supplierType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" :disabled="item.dictValue === '挂车厂' || item.dictValue === '上装厂' || item.dictValue === '外采供应商' || item.dictValue === '分公司'"/>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="4">
|
|
<span><span class="icon">*</span>通讯地址</span>
|
|
</el-col>
|
|
<el-col :span="20">
|
|
<el-form-item prop="manufacturerAddress">
|
|
<el-input v-model="temp.manufacturerAddress" maxlength="200" placeholder="" class="addinputw addinputw01" clearable/>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="4">
|
|
<span><span class="icon">*</span>厂商办公电话</span>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item prop="manufacturerTelePhone">
|
|
<el-input v-model="temp.manufacturerTelePhone" maxlength="20" placeholder="例:010-88888888" class="addinputw" clearable/>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<span>传真</span>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item prop="manufacturerFax">
|
|
<el-input v-model="temp.manufacturerFax" maxlength="20" placeholder="例:010-88888888" class="addinputw" clearable/>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="4">
|
|
<span><span class="icon">*</span>联系人姓名</span>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item prop="contactName">
|
|
<el-input v-model="temp.contactName" maxlength="5" placeholder="" class="addinputw" clearable/>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<span><span class="icon">*</span>联系人手机号</span>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item prop="contactMobile">
|
|
<el-input v-model="temp.contactMobile" maxlength="11" placeholder="" class="addinputw" clearable/>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="4">
|
|
<span>联系人办公电话</span>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item prop="contactTelePhone">
|
|
<el-input v-model="temp.contactTelePhone" maxlength="14" placeholder="例:010-88888888" class="addinputw" clearable/>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<span>微信号</span>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item prop="weChatID">
|
|
<el-input v-model="temp.weChatID" maxlength="11" placeholder="" class="addinputw" clearable/>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row>
|
|
<el-col :span="4">
|
|
<span>邮编</span>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item prop="">
|
|
<el-input v-model="temp.zipCode" maxlength="20" placeholder="" class="addinputw" clearable/>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<span>邮箱</span>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-form-item prop="">
|
|
<el-input v-model="temp.email" maxlength="20" placeholder="" class="addinputw" clearable/>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<!-- 应要求暂时隐藏的代码,不可删除!!!应要求暂时隐藏的代码,不可删除!!!应要求暂时隐藏的代码,不可删除!!! -->
|
|
<!-- <el-row>-->
|
|
<!-- <el-col :span="12">-->
|
|
<!-- <el-form-item>-->
|
|
<!-- <span slot="label">行业</span>-->
|
|
<!-- <el-select v-model="temp.industry" class="addinputw" placeholder="" @change="getHangYe">-->
|
|
<!-- <el-option v-for="(item, index) in industryons" :key="index.dictKey" :label="item.dictValue"-->
|
|
<!-- :value="item.dictKey" />-->
|
|
<!-- </el-select>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- <el-col :span="12">-->
|
|
<!-- <el-form-item>-->
|
|
<!-- <span slot="label">供应商分类</span>-->
|
|
<!-- <el-select v-model="temp.supplierType" class="addinputw" placeholder="" @change="getGong">-->
|
|
<!-- <el-option v-for="(item, index) in supplier" :key="index.dictKey" :label="item.dictValue"-->
|
|
<!-- :value="item.dictKey" />-->
|
|
<!-- </el-select>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- </el-row>-->
|
|
<!-- <el-row>-->
|
|
<!-- <el-col :span="12">-->
|
|
<!-- <el-form-item prop="supplyType">-->
|
|
<!-- <span slot="label">供应类别</span>-->
|
|
<!-- <el-select v-model="temp.supplyType" class="addinputw" placeholder="" @change="getFen">-->
|
|
<!-- <el-option v-for="(item, index) in typeOptions" :key="index.dictKey" :label="item.dictValue"-->
|
|
<!-- :value="item.dictKey" />-->
|
|
<!-- </el-select>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- <el-col :span="12">-->
|
|
<!-- <el-form-item>-->
|
|
<!-- <span slot="label">供应商分组</span>-->
|
|
<!-- <el-select v-model="temp.supplierGroup" class="addinputw" placeholder="" @change="getShang">-->
|
|
<!-- <el-option v-for="(item, index) in grouping" :key="index.dictKey" :label="item.dictValue"-->
|
|
<!-- :value="item.dictKey" />-->
|
|
<!-- </el-select>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- </el-row>-->
|
|
<!-- <el-row>-->
|
|
<!-- <el-col :span="12">-->
|
|
<!-- <el-form-item prop="useOrgValue">-->
|
|
<!-- <span slot="label">使用组织</span>-->
|
|
<!-- <el-select v-model="useOrgValue" multiple placeholder="请选择" filterable clearable-->
|
|
<!-- class="addinputw"-->
|
|
<!-- @change="getuseOrg">-->
|
|
<!-- <el-option v-for="item in useOrg_list" :key="item.sid" :label="item.name" :value="item.sid"/>-->
|
|
<!-- </el-select>-->
|
|
<!-- <!– <el-cascader v-model="useOrgArry" class="addinputw" @change="usrOrgArryChange" :options="options"–>-->
|
|
<!-- <!– :props="props" />–>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- <el-col :span="12">-->
|
|
<!-- <el-form-item>-->
|
|
<!-- <span slot="label">地区</span>-->
|
|
<!-- <el-select v-model="temp.province" filterable placeholder="请选择省" class="filter-item_province"-->
|
|
<!-- @change="getShen">-->
|
|
<!-- <el-option v-for="item in inputProvinceList" :key="item.sid" :label="item.name" :value="item.sid"/>-->
|
|
<!-- </el-select>-->
|
|
<!-- <el-select v-model="temp.city" filterable placeholder="请选择市" class="filter-item" @change="getShi">-->
|
|
<!-- <el-option v-for="item in inputCityList" :key="item.sid" :label="item.name" :value="item.sid"/>-->
|
|
<!-- </el-select>-->
|
|
<!-- <el-select v-model="temp.county" filterable placeholder="请选择县" class="filter-item" @change="getQu">-->
|
|
<!-- <el-option v-for="item in inputCountyList" :key="item.sid" :label="item.name" :value="item.sid"/>-->
|
|
<!-- </el-select>-->
|
|
<!-- <!– <el-input v-model="temp.region" maxlength="25" placeholder="" class="addinputw" clearable /> –>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- </el-row>-->
|
|
<!-- 应要求暂时隐藏的代码,不可删除!!!应要求暂时隐藏的代码,不可删除!!!应要求暂时隐藏的代码,不可删除!!! -->
|
|
<!-- <div class="title">供应厂商财务信息</div>-->
|
|
<!-- <el-row>-->
|
|
<!-- <el-col :span="12">-->
|
|
<!-- <el-form-item>-->
|
|
<!-- <span slot="label">结算币种</span>-->
|
|
<!-- <el-select v-model="temp1.settlementCurrency" class="addinputw" placeholder="结算币种" @change="getBiZhong">-->
|
|
<!-- <el-option v-for="item in Currency" :key="item.dictKey" :label="item.dictValue"-->
|
|
<!-- :value="item.dictKey"/>-->
|
|
<!-- </el-select>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- <el-col :span="12">-->
|
|
<!-- <el-form-item prop="settlementWay">-->
|
|
<!-- <span slot="label">结算方式</span>-->
|
|
<!-- <el-select v-model="temp1.settlementWay" class="addinputw" placeholder="结算方式" @change="getFangShi">-->
|
|
<!-- <el-option v-for="item in tWay" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>-->
|
|
<!-- </el-select>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- </el-row>-->
|
|
<!-- <el-row>-->
|
|
<!-- <el-col :span="12">-->
|
|
<!-- <el-form-item>-->
|
|
<!-- <span slot="label">付款条件</span>-->
|
|
<!-- <el-input v-model="temp1.paymentConditions" maxlength="25" placeholder="" class="addinputw" clearable />-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- <el-col :span="12">-->
|
|
<!-- <el-form-item prop="settlementParty">-->
|
|
<!-- <span slot="label">结算方</span>-->
|
|
<!-- <el-input v-model="temp1.settlementParty" maxlength="25" placeholder="" class="addinputw" clearable />-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- </el-row>-->
|
|
<!-- <el-row>-->
|
|
<!-- <el-col :span="12">-->
|
|
<!-- <el-form-item>-->
|
|
<!-- <span slot="label">单次预付额度</span>-->
|
|
<!-- <el-input v-model="temp1.singleAdvance" maxlength="25" placeholder="" class="addinputw" clearable />-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- <el-col :span="12">-->
|
|
<!-- <el-form-item prop="taxClassification">-->
|
|
<!-- <span slot="label">税分类</span>-->
|
|
<!-- <el-select v-model="temp1.taxClassification" class="addinputw" placeholder="税分类"-->
|
|
<!-- @change="getShuiFenLei">-->
|
|
<!-- <el-option v-for="item in fication" :key="item.dictKey" :label="item.dictValue"-->
|
|
<!-- :value="item.dictKey"/>-->
|
|
<!-- </el-select>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- </el-row>-->
|
|
<!-- <el-row>-->
|
|
<!-- <el-col :span="12">-->
|
|
<!-- <el-form-item prop="taxRegistNum">-->
|
|
<!-- <span slot="label">税务登记号</span>-->
|
|
<!-- <el-input v-model="temp1.taxRegistNum" maxlength="25" placeholder="" class="addinputw" clearable />-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- <el-col :span="12">-->
|
|
<!-- <el-form-item prop="businessType">-->
|
|
<!-- <span slot="label">经营类型</span>-->
|
|
<!-- <el-input v-model="temp1.businessType" maxlength="25" placeholder="" class="addinputw" clearable />-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- </el-row>-->
|
|
<!-- <el-row>-->
|
|
<!-- <el-col :span="12">-->
|
|
<!-- <el-form-item prop="payee">-->
|
|
<!-- <span slot="label">收款方</span>-->
|
|
<!-- <el-input v-model="temp1.payee" maxlength="25" placeholder="" class="addinputw" clearable />-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- <el-col :span="12">-->
|
|
<!-- <el-form-item prop="invoiceType">-->
|
|
<!-- <span slot="label">发票类型</span>-->
|
|
<!-- <el-input v-model="temp1.invoiceType" maxlength="25" placeholder="" class="addinputw" clearable />-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- </el-row>-->
|
|
<!-- <el-row>-->
|
|
<!-- <el-col :span="12">-->
|
|
<!-- <el-form-item prop="defaultRate">-->
|
|
<!-- <span slot="label">默认税率</span>-->
|
|
<!-- <el-input v-model="temp1.defaultRate" maxlength="25" placeholder="" class="addinputw" clearable />-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- <el-col :span="12">-->
|
|
<!-- <el-form-item prop="remarks">-->
|
|
<!-- <span slot="label">描述</span>-->
|
|
<!-- <el-input v-model="temp1.remarks" maxlength="25" placeholder="" class="addinputw" clearable />-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- </el-row>-->
|
|
<div class="titcon">
|
|
<div class="title">开户行信息</div>
|
|
<div class="baocun">
|
|
<el-button type="primary" size="small" icon="el-icon-plus" class="btntopblueline" @click="addBank()">新增
|
|
</el-button>
|
|
</div>
|
|
</div>
|
|
<el-table :key="tableKey" v-loading="listLoading" :data="list" :index="index" border style="width: 100%">
|
|
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
|
|
<el-table-column label="操作" align="center" width="130px" class-name="small-padding fixed-width">
|
|
<template slot-scope="scope">
|
|
<el-button size="mini" type="danger" @click="handleDel(list[scope.$index])">删除</el-button>
|
|
<el-button size="mini" type="primary" @click="handleEdit(list[scope.$index],scope.$index)">编辑
|
|
</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="dueBankValue" width="140px" label="账户类型" align="center"/>
|
|
<el-table-column prop="depositBank" width="180px" label="开户银行" align="center"/>
|
|
<el-table-column prop="bankAccount" width="160px" label="银行账号" align="center"/>
|
|
<el-table-column prop="accountName" width="130px" label="账号名称" align="center"/>
|
|
<el-table-column prop="actualPay" width="240px" label="厂家回款通路" align="center"/>
|
|
<el-table-column prop="paymentAccessNoValue" width="240px" label="付款通路" align="center"/>
|
|
<el-table-column prop="bankingOutlets" width="180px" label="银行网点" align="center"/>
|
|
<el-table-column prop="bankAddress" width="260px" label="开户行地址" align="center"/>
|
|
<el-table-column prop="paymentLines" width="160px" label="联行号" align="center"/>
|
|
<el-table-column prop="swiftCode" width="200px" label="swiftcode(银行代码)" align="center"/>
|
|
<el-table-column prop="currency" width="130px" label="币种" align="center"/>
|
|
<el-table-column prop="remarks" width="240px" label="描述" align="center"/>
|
|
</el-table>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
<changshang-bank-info v-show="!isBankInfo" ref="divBank" @doback="resetState" @handleBankInfo="selectBankInfo"/>
|
|
<!-- 开户行信息的弹窗 -->
|
|
<!-- <el-dialog :visible.sync="dialogVisible" :append-to-body="true" title="供应厂商开户行信息">-->
|
|
<!-- <el-form ref="dataForm" :model="temp2" class="" :rules="rules">-->
|
|
<!-- <el-row>-->
|
|
<!-- <el-col :span="4">-->
|
|
<!-- <span>国家</span>-->
|
|
<!-- </el-col>-->
|
|
<!-- <el-col :span="8">-->
|
|
<!-- <el-form-item>-->
|
|
<!-- <el-input v-model="temp2.country" maxlength="125" placeholder="" class="addinputw" clearable/>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- <el-col :span="4">-->
|
|
<!-- <span>开户银行</span>-->
|
|
<!-- </el-col>-->
|
|
<!-- <el-col :span="8">-->
|
|
<!-- <el-form-item prop="depositBank">-->
|
|
<!-- <el-input v-model="temp2.depositBank" maxlength="125" placeholder="" class="addinputw" clearable/>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- </el-row>-->
|
|
<!-- <el-row>-->
|
|
<!-- <el-col :span="4">-->
|
|
<!-- <span>银行账号</span>-->
|
|
<!-- </el-col>-->
|
|
<!-- <el-col :span="8">-->
|
|
<!-- <el-form-item prop="bankAccount">-->
|
|
<!-- <el-input v-model="temp2.bankAccount" maxlength="125" placeholder="" class="addinputw" clearable-->
|
|
<!-- @keyup.native="temp2.bankAccount = oninput(temp2.bankAccount,2)"/>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- <el-col :span="4">-->
|
|
<!-- <span>账户名称</span>-->
|
|
<!-- </el-col>-->
|
|
<!-- <el-col :span="8">-->
|
|
<!-- <el-form-item prop="accountName">-->
|
|
<!-- <el-input v-model="temp2.accountName" maxlength="125" placeholder="" class="addinputw" clearable/>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- </el-row>-->
|
|
<!-- <el-row>-->
|
|
<!-- <el-col :span="4">-->
|
|
<!-- <span>收款银行</span>-->
|
|
<!-- </el-col>-->
|
|
<!-- <el-col :span="8">-->
|
|
<!-- <el-form-item prop="dueBank">-->
|
|
<!-- <el-input v-model="temp2.dueBank" maxlength="125" placeholder="" class="addinputw" clearable/>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- <el-col :span="4">-->
|
|
<!-- <span>银行网点</span>-->
|
|
<!-- </el-col>-->
|
|
<!-- <el-col :span="8">-->
|
|
<!-- <el-form-item prop="bankingOutlets">-->
|
|
<!-- <el-input v-model="temp2.bankingOutlets" maxlength="125" placeholder="" class="addinputw" clearable/>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- </el-row>-->
|
|
<!-- <el-row>-->
|
|
<!-- <el-col :span="4">-->
|
|
<!-- <span>开户行地址</span>-->
|
|
<!-- </el-col>-->
|
|
<!-- <el-col :span="8">-->
|
|
<!-- <el-form-item prop="bankAddress">-->
|
|
<!-- <el-input v-model="temp2.bankAddress" maxlength="125" placeholder="" class="addinputw" clearable/>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- <el-col :span="4">-->
|
|
<!-- <span>联行号</span>-->
|
|
<!-- </el-col>-->
|
|
<!-- <el-col :span="8">-->
|
|
<!-- <el-form-item prop="paymentLines">-->
|
|
<!-- <el-input v-model="temp2.paymentLines" maxlength="125" placeholder="" class="addinputw" clearable-->
|
|
<!-- @keyup.native="temp2.paymentLines = oninput(temp2.paymentLines,2)"/>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- </el-row>-->
|
|
<!-- <el-row>-->
|
|
<!-- <el-col :span="4">-->
|
|
<!-- <span>Swiftcode(银行代码)</span>-->
|
|
<!-- </el-col>-->
|
|
<!-- <el-col :span="8">-->
|
|
<!-- <el-form-item prop="swiftCode">-->
|
|
<!-- <el-input v-model="temp2.swiftCode" maxlength="125" placeholder="" class="addinputw" clearable/>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- <el-col :span="4">-->
|
|
<!-- <span>币种</span>-->
|
|
<!-- </el-col>-->
|
|
<!-- <el-col :span="8">-->
|
|
<!-- <el-form-item prop="currency">-->
|
|
<!-- <el-input v-model="temp2.currency" maxlength="125" placeholder="" class="addinputw" clearable/>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- </el-row>-->
|
|
<!-- <el-row>-->
|
|
<!-- <el-col :span="4">-->
|
|
<!-- <span>描述</span>-->
|
|
<!-- </el-col>-->
|
|
<!-- <el-col :span="8">-->
|
|
<!-- <el-form-item>-->
|
|
<!-- <el-input v-model="temp2.remarks" maxlength="125" placeholder="" class="addinputw" clearable/>-->
|
|
<!-- </el-form-item>-->
|
|
<!-- </el-col>-->
|
|
<!-- <el-col :span="12"/>-->
|
|
<!-- </el-row>-->
|
|
<!-- </el-form>-->
|
|
<!-- </el-dialog>-->
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { details, SaveList, selectListOrg, Update } from '@/api/jichuxinxi/basemanufacturer'
|
|
import { getCity, getCounty, getProvince } from '@/api/portal/areaPicker' // 省市区
|
|
import { typeValues } from '@/api/jichuxinxi/dictcommons'
|
|
import { getLook, getXiu, setuser } from '@/utils/baocun'
|
|
import { getListOrg } from '@/api/jichuxinxi/brandManagement'
|
|
import changshangBankInfo from '@/views/changshang/changshangguanli/relation/changshangBankInfo'
|
|
|
|
export default {
|
|
name: 'ChangshangguanliAdd1',
|
|
components: {
|
|
changshangBankInfo
|
|
},
|
|
data() {
|
|
var checkEamil = (rule, value, callback) => {
|
|
const regEamil = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/
|
|
if (regEamil.test(value)) {
|
|
return callback()
|
|
}
|
|
callback(new Error('请输入邮箱'))
|
|
}
|
|
var validCascader = (rule, value, callback) => {
|
|
if (this.useOrgValue.length == 0) {
|
|
callback(new Error('请填写使用组织'))
|
|
} else {
|
|
callback()
|
|
}
|
|
}
|
|
// var validatePass2 = (rule, value, callback) => {
|
|
// const WeiXin = /^[a-zA-Z]{1}[-_a-zA-Z0-9]{5,19}$/;
|
|
// const phone = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
|
|
// if (WeiXin.test(value) || phone.test(value)) {
|
|
// return callback();
|
|
// }
|
|
// callback(new Error("请输入微信号"));
|
|
// };
|
|
var validatePass2 = (rule, value, callback) => {
|
|
const WeiXin = /^[a-zA-Z][a-zA-Z\d_-]{5,19}$/
|
|
const phone = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/
|
|
if (value) {
|
|
// 如果没有通过验证!!
|
|
if (!WeiXin.test(value) && !phone.test(value)) {
|
|
callback(new Error('请输入正确的微信号码'))
|
|
}
|
|
callback()
|
|
} else {
|
|
callback()
|
|
}
|
|
}
|
|
var checkYouBian = (rule, value, callback) => {
|
|
const YouBian = /^[0-9]{6}$/
|
|
if (YouBian.test(value)) {
|
|
return callback()
|
|
}
|
|
callback(new Error('请输入邮编'))
|
|
}
|
|
var checkBanGongDianHua = (rule, value, callback) => {
|
|
const BanGongDianHua = /\d{3}-\d{8}|\d{4}-\d{7}/
|
|
if (BanGongDianHua.test(value)) {
|
|
return callback()
|
|
}
|
|
callback(new Error('请输入办公电话'))
|
|
}
|
|
var checkContenTel = (rule, value, callback) => {
|
|
const BanGongDianHua = /\d{3}-\d{8}|\d{4}-\d{7}/
|
|
if (value) {
|
|
// 如果没有通过验证!!
|
|
if (!BanGongDianHua.test(value)) {
|
|
callback(new Error('请输入正确的办公电话格式'))
|
|
}
|
|
callback()
|
|
} else {
|
|
callback()
|
|
}
|
|
}
|
|
var checkChuanzhen = (rule, value, callback) => {
|
|
const BanGongDianHua = /\d{3}-\d{8}|\d{4}-\d{7}/
|
|
if (value) {
|
|
// 如果没有通过验证!!
|
|
if (!BanGongDianHua.test(value)) {
|
|
callback(new Error('请输入正确的传真格式'))
|
|
}
|
|
callback()
|
|
} else {
|
|
callback()
|
|
}
|
|
}
|
|
var checkSubmit = (rule, value, callback) => {
|
|
const Submit = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/
|
|
if (Submit.test(value)) {
|
|
return callback()
|
|
}
|
|
callback(new Error('请输入手机号'))
|
|
}
|
|
return {
|
|
// --按钮菜单-------
|
|
menuState: {
|
|
add: false, // 添加
|
|
edit: false, // 编辑
|
|
delete: false, // 删除
|
|
view: false, // 查看
|
|
audit: false, // 审核
|
|
input: false, // 导入
|
|
output: false, // 导出
|
|
upload: false, // 同步
|
|
release: false // 下发
|
|
},
|
|
sid: '',
|
|
tWay: [],
|
|
fication: [],
|
|
province: [],
|
|
city: [],
|
|
county: [],
|
|
useOrgValue: [],
|
|
useOrg_list: [],
|
|
FormLoading: false,
|
|
listLoading: false,
|
|
dialogVisible: false,
|
|
isBankInfo: true,
|
|
dataArr: [],
|
|
tableKey: 0,
|
|
index: 0,
|
|
temp: {
|
|
useOrg: [],
|
|
supplyTypeValue: '',
|
|
supplierGroupValue: '',
|
|
industryValue: ''
|
|
},
|
|
temp1: {
|
|
settlementCurrency: '',
|
|
settlementCurrencyValue: ''
|
|
},
|
|
temp2: {},// 添加和修改
|
|
list: [],
|
|
Currency: [],
|
|
settlementWay: 'settlementWay',
|
|
taxClassification: 'taxClassification',
|
|
settlementCurrency: 'settlementCurrency',
|
|
templook: {}, // 查看实体
|
|
textMap: {
|
|
update: '修改',
|
|
create: '新增'
|
|
},
|
|
modelValue: [],
|
|
modelValue2: [],
|
|
modelValue3: [],
|
|
modelValue4: [],
|
|
stateId: 0,
|
|
infoe: 3,
|
|
lookid: '',
|
|
dialogFormVisible: false, // 添加修改对话框状态
|
|
dialogFormShowVisible: false, // 查看对话框默认关闭状态
|
|
dialogStatus: '', // 对话框状态
|
|
options: [],
|
|
props: {
|
|
value: 'sid',
|
|
label: 'name',
|
|
children: 'children',
|
|
multiple: true
|
|
},
|
|
deCode: [],
|
|
fenzuOptions: [{
|
|
value: '1',
|
|
label: '单位'
|
|
},
|
|
{
|
|
value: '2',
|
|
label: '个人'
|
|
}
|
|
],
|
|
useOrgArry: [],
|
|
inputProvinceList: [],
|
|
inputCityList: [],
|
|
inputCountyList: [],
|
|
countId: 0,
|
|
supplierType: 'supplierType',
|
|
supplierGroup: 'supplierGroup',
|
|
supplyType: 'supplyType',
|
|
industrytype: 'industrytype',
|
|
typeOptions: [],
|
|
industryons: [],
|
|
supplier: [],
|
|
grouping: [],
|
|
supplierType_list: [], // 分类
|
|
rules: {
|
|
// email: [{
|
|
// required: true,
|
|
// validator: checkEamil,
|
|
// trigger: 'blur'
|
|
// }],
|
|
weChatID: [{
|
|
// required: true,
|
|
validator: validatePass2,
|
|
message: '请填写微信号',
|
|
trigger: 'blur'
|
|
}],
|
|
// zipCode: [{
|
|
// required: true,
|
|
// validator: checkYouBian,
|
|
// trigger: 'blur'
|
|
// }],
|
|
manufacturerName: [{
|
|
required: true,
|
|
message: '请填写厂商名称',
|
|
trigger: 'blur'
|
|
}],
|
|
supplierType: [{
|
|
required: true,
|
|
message: '请选择分类',
|
|
trigger: 'change'
|
|
}],
|
|
manufacturerAddress: [{
|
|
required: true,
|
|
message: '请填写厂商通讯地址',
|
|
trigger: 'blur'
|
|
}],
|
|
manufacturerTelePhone: [{
|
|
required: true,
|
|
validator: checkBanGongDianHua,
|
|
trigger: 'blur'
|
|
}],
|
|
manufacturerFax: [{
|
|
// required: true,
|
|
validator: checkChuanzhen,
|
|
trigger: 'blur'
|
|
}],
|
|
contactName: [{
|
|
required: true,
|
|
message: '请填写联系人名字',
|
|
trigger: 'blur'
|
|
}],
|
|
contactMobile: [{
|
|
required: true,
|
|
validator: checkSubmit,
|
|
trigger: 'blur'
|
|
}],
|
|
contactTelePhone: [{
|
|
// required: true,
|
|
validator: checkContenTel,
|
|
trigger: 'blur'
|
|
}],
|
|
supplyType: [{
|
|
required: true,
|
|
message: '请填写供应类别',
|
|
trigger: 'blur'
|
|
}],
|
|
useOrgValue: [{
|
|
required: true,
|
|
validator: validCascader,
|
|
trigger: 'change'
|
|
}]
|
|
},
|
|
tempDate: {}
|
|
}
|
|
},
|
|
computed: {},
|
|
created() {
|
|
// this.tempDate.sid = this.$route.params.id;
|
|
// console.log("查看传过来的sid", this.tempDate.sid);
|
|
// // ----------------------------------------------------------
|
|
// this.infoe = this.$route.query.info;
|
|
// console.log("查看传过来的状态", this.infoe);
|
|
// ----------------------------------------------------------
|
|
|
|
// this.init();
|
|
},
|
|
methods: {
|
|
// 输入数字正则
|
|
oninput(val, limit = 0) {
|
|
val = val.replace(/[^\d.]/g, '') // 保留数字
|
|
val = val.replace(/\.{2,}/g, '.') // 两个以上的小数点转换成一个
|
|
val = val.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.') // 只保留一个小数点
|
|
const str = '^(\\d+)\\.(\\d{' + limit + '}).*$'
|
|
const reg = new RegExp(str)
|
|
if (limit === 0) {
|
|
// 不需要小数点
|
|
val = val.replace(reg, '$1')
|
|
} else {
|
|
// 通过正则保留小数点后指定的位数
|
|
val = val.replace(reg, '$1.$2')
|
|
}
|
|
return val
|
|
},
|
|
setDetaList() {
|
|
typeValues({ type: this.supplierType }).then((res) => {
|
|
if (res.code === '200') {
|
|
this.supplier = res.data
|
|
}
|
|
})
|
|
typeValues({ type: this.supplierGroup }).then((res) => {
|
|
if (res.code === '200') {
|
|
this.grouping = res.data
|
|
}
|
|
})
|
|
typeValues({ type: this.supplyType }).then((res) => {
|
|
if (res.code === '200') {
|
|
this.typeOptions = res.data
|
|
}
|
|
})
|
|
typeValues({ type: this.industrytype }).then((res) => {
|
|
if (res.code === '200') {
|
|
this.industryons = res.data
|
|
}
|
|
})
|
|
typeValues({ type: this.settlementCurrency }).then((res) => {
|
|
if (res.code === '200') {
|
|
this.Currency = res.data
|
|
console.log('结算币种', this.Currency)
|
|
}
|
|
})
|
|
typeValues({ type: this.settlementWay }).then((res) => {
|
|
if (res.code === '200') {
|
|
this.tWay = res.data
|
|
console.log('结算方式', this.tWay)
|
|
}
|
|
})
|
|
typeValues({ type: 'supplierType' }).then((res) => {
|
|
if (res.code === '200') {
|
|
this.supplierType_list = res.data
|
|
console.log('厂商分类', this.supplierType_list)
|
|
}
|
|
})
|
|
typeValues({ type: this.taxClassification }).then((res) => {
|
|
if (res.code === '200') {
|
|
this.fication = res.data
|
|
console.log('税分类', this.fication)
|
|
}
|
|
})
|
|
},
|
|
// 厂商分类
|
|
getSupplierType(value) {
|
|
let bb = null
|
|
this.supplierType_list.forEach((e) => {
|
|
if (e.dictKey === value) {
|
|
bb = {
|
|
name: e.dictValue,
|
|
vaule: e.dictKey
|
|
}
|
|
}
|
|
})
|
|
this.temp.supplierTypeValue = bb.name
|
|
console.log('厂商分类', this.temp.supplierTypeValue, this.temp.supplierType)
|
|
},
|
|
// 结算币种
|
|
getBiZhong(value) {
|
|
let bb = null
|
|
this.Currency.forEach((e) => {
|
|
if (e.dictKey === value) {
|
|
bb = {
|
|
type: 'settlementCurrency',
|
|
name: e.dictValue,
|
|
vaule: e.dictKey
|
|
}
|
|
}
|
|
})
|
|
this.temp1.settlementCurrencyValue = bb.name
|
|
},
|
|
getFangShi(value) {
|
|
let bb = null
|
|
this.tWay.forEach((e) => {
|
|
if (e.dictKey === value) {
|
|
bb = {
|
|
type: 'settlementWay',
|
|
name: e.dictValue,
|
|
vaule: e.dictKey
|
|
}
|
|
}
|
|
})
|
|
this.temp1.settlementWayValue = bb.name
|
|
},
|
|
getShuiFenLei(value) {
|
|
let bb = null
|
|
this.fication.forEach((e) => {
|
|
if (e.dictKey === value) {
|
|
bb = {
|
|
type: 'taxClassification',
|
|
name: e.dictValue,
|
|
vaule: e.dictKey
|
|
}
|
|
}
|
|
})
|
|
console.log('税分类', bb)
|
|
this.temp1.taxClassificationValue = bb.name
|
|
},
|
|
// 根据登陆人sid获取分公司
|
|
// getPathSid() {
|
|
// const userSid = window.sessionStorage.getItem('userSid')
|
|
// getPathSidByUserSid({userSid:userSid}).then((res) => {
|
|
// if (res.code === '200') {
|
|
// // this.temp.createOrgName = res
|
|
// this.temp.createOrg = res.data
|
|
// fetchBySid(res.data).then((response) => {
|
|
// if (response.code === '200') {
|
|
// this.temp.createOrgName = response.data.name
|
|
// }
|
|
// })
|
|
// }
|
|
// })
|
|
// },
|
|
// 查询所有分公司
|
|
getListOrgAll() {
|
|
getListOrg().then((res) => {
|
|
if (res.success) {
|
|
this.useOrg_list = res.data
|
|
}
|
|
})
|
|
},
|
|
// 获取所有分公司 (旧的方法,来回更改过N次,暂时做保留)
|
|
// getListOrgAll() {
|
|
// const userSid = window.sessionStorage.getItem('userSid')
|
|
// getUseOrgByUserSid({userSid: userSid}).then((res) => {
|
|
// if (res.success) {
|
|
// this.getListOrgAll0(res.data.sid)
|
|
// }
|
|
// })
|
|
// },
|
|
// getListOrgAll0(useOrgSid) {
|
|
// getListOrg({sid: useOrgSid}).then((res) => {
|
|
// if (res.success) {
|
|
// this.useOrg_list = res.data
|
|
// }
|
|
// })
|
|
// },
|
|
getuseOrg(val) {
|
|
console.log('选择的使用组织', val)
|
|
var choosetItem = []
|
|
val.forEach((ele) => {
|
|
choosetItem.push(this.useOrg_list.filter((item) => ele == item.sid)[0])
|
|
})
|
|
const useOrgName = []
|
|
choosetItem.forEach((e) => {
|
|
useOrgName.push(e.name)
|
|
})
|
|
this.temp.useOrg = val.join()
|
|
this.temp.useOrgName = useOrgName.join()
|
|
console.log('使用组织name:', this.temp.useOrgName, '使用组织sid:', this.temp.useOrg)
|
|
},
|
|
resetState() {
|
|
this.isBankInfo = true
|
|
},
|
|
selectBankInfo(info, index) {
|
|
this.isBankInfo = true
|
|
if (index === '') {
|
|
this.list.push({
|
|
country: info.country,
|
|
dueBankValue: info.dueBankValue,
|
|
dueBankKey: info.dueBankKey,
|
|
depositBank: info.depositBank,
|
|
bankAccount: info.bankAccount,
|
|
accountName: info.accountName,
|
|
bankingOutlets: info.bankingOutlets,
|
|
bankAddress: info.bankAddress,
|
|
paymentLines: info.paymentLines,
|
|
swiftCode: info.swiftCode,
|
|
currency: info.currency,
|
|
remarks: info.remarks,
|
|
actualPay: info.actualPay,
|
|
actualPayKey: info.actualPayKey,
|
|
paymentAccessNoValue: info.paymentAccessNoValue,
|
|
paymentAccessNoKey: info.paymentAccessNoKey,
|
|
sid: ''
|
|
})
|
|
console.log('ADD开户行info', info, index)
|
|
return
|
|
}
|
|
if (index >= 0) {
|
|
console.log('EDIT开户行info', info, index)
|
|
this.list[index] = {
|
|
country: info.country,
|
|
dueBankValue: info.dueBankValue,
|
|
dueBankKey: info.dueBankKey,
|
|
depositBank: info.depositBank,
|
|
bankAccount: info.bankAccount,
|
|
accountName: info.accountName,
|
|
bankingOutlets: info.bankingOutlets,
|
|
bankAddress: info.bankAddress,
|
|
paymentLines: info.paymentLines,
|
|
swiftCode: info.swiftCode,
|
|
currency: info.currency,
|
|
remarks: info.remarks,
|
|
actualPay: info.actualPay,
|
|
actualPayKey: info.actualPayKey,
|
|
paymentAccessNoValue: info.paymentAccessNoValue,
|
|
paymentAccessNoKey: info.paymentAccessNoKey,
|
|
sid: info.sid
|
|
}
|
|
return
|
|
}
|
|
},
|
|
addBank() {
|
|
this.isBankInfo = false
|
|
this.$refs['divBank'].showAdd()
|
|
},
|
|
handleDel(index) {
|
|
this.list.splice(this.list.indexOf(index), 1)
|
|
},
|
|
handleEdit(row, index) {
|
|
this.isBankInfo = false
|
|
const bankInfo = row
|
|
this.$refs['divBank'].showEdit(bankInfo, index)
|
|
},
|
|
showAdd() {
|
|
this.temp = {}
|
|
this.temp1 = {}
|
|
this.temp2 = {}
|
|
this.dialogStatus = 'add'
|
|
this.viewTitle = '新增厂商详细信息'
|
|
this.stateId = 0
|
|
this.setDetaList()
|
|
this.getZuZhi()
|
|
this.huoquSheng()
|
|
this.getListOrgAll()
|
|
// this.getPathSid()
|
|
},
|
|
|
|
init() {
|
|
this.countId = this.$store.state.counter
|
|
// ----------------------------------------------------------
|
|
this.stateId = this.$route.params.id
|
|
// ----------------------------------------------------------
|
|
var Xiusid = getXiu()
|
|
this.manufacturerSid = Xiusid[0]
|
|
// ----------------------------------------------------------
|
|
// 修改回显
|
|
var sid = this.$route.query.sid
|
|
if (this.countId != 0 && this.countId != 3) {
|
|
details(this.manufacturerSid).then((response) => {
|
|
if (response.code === '200') {
|
|
if (response.data.baseManufacturerDto.useOrg) {
|
|
this.useOrgArry = response.data.baseManufacturerDto.useOrg
|
|
}
|
|
this.temp = response.data.baseManufacturerDto
|
|
this.temp1 = response.data.baseManufacturerFinanceDto
|
|
this.temp2 = response.data.baseManufacturerBankDto
|
|
if (this.temp.useOrg.search(',') == '-1') {
|
|
this.useOrgValue = this.temp.useOrg.split(' ')
|
|
} else {
|
|
this.useOrgValue = this.temp.useOrg.split(',')
|
|
}
|
|
}
|
|
})
|
|
} else if (typeof (sid) != 'undefined') {
|
|
this.countId = 0
|
|
details(sid).then((response) => {
|
|
if (response.code === '200') {
|
|
if (response.data.baseManufacturerDto.useOrg) {
|
|
this.useOrgArry = response.data.baseManufacturerDto.useOrg
|
|
}
|
|
this.temp = response.data.baseManufacturerDto
|
|
this.temp1 = response.data.baseManufacturerFinanceDto
|
|
this.temp2 = response.data.baseManufacturerBankDto
|
|
}
|
|
})
|
|
}
|
|
// ----------------------------------------------------------
|
|
// 查看回显
|
|
var Chasid = getLook()
|
|
this.lookid = Chasid
|
|
if (this.countId === 3) {
|
|
details(this.lookid).then((response) => {
|
|
if (response.code === '200') {
|
|
if (response.data.baseManufacturerDto.useOrg) {
|
|
this.useOrgArry = response.data.baseManufacturerDto.useOrg
|
|
}
|
|
this.temp = response.data.baseManufacturerDto
|
|
this.temp1 = response.data.baseManufacturerFinanceDto
|
|
this.temp2 = response.data.baseManufacturerBankDto
|
|
} else {
|
|
this.$notify({
|
|
title: '失败',
|
|
message: '查询失败',
|
|
type: 'error'
|
|
})
|
|
}
|
|
})
|
|
}
|
|
this.setDetaList()
|
|
},
|
|
// ----------------------------------方法--------------------
|
|
huoquSheng() {
|
|
getProvince().then((res) => {
|
|
if (res.code === '200') {
|
|
this.inputProvinceList = res.data
|
|
}
|
|
})
|
|
},
|
|
getShen(value) {
|
|
let bb = ''
|
|
this.inputProvinceList.forEach((e) => {
|
|
if (e.sid == value) {
|
|
bb = {
|
|
name: e.name,
|
|
districtCode: e.districtCode,
|
|
sid: e.sid
|
|
}
|
|
}
|
|
})
|
|
// 这里是把code的值赋给province省字段
|
|
this.temp.province = bb.name
|
|
this.huoquShi(bb.sid)
|
|
},
|
|
huoquShi(sid1) {
|
|
var sid = {
|
|
sid: sid1
|
|
}
|
|
getCity(sid).then((res) => {
|
|
if (res.code === '200') {
|
|
this.inputCityList = res.data
|
|
}
|
|
})
|
|
},
|
|
getShi(value) {
|
|
let bb = ''
|
|
this.inputCityList.forEach((e) => {
|
|
if (e.sid == value) {
|
|
bb = {
|
|
name: e.name,
|
|
districtCode: e.districtCode,
|
|
sid: e.sid
|
|
}
|
|
}
|
|
})
|
|
this.temp.city = bb.name
|
|
this.huoquXian(bb.sid)
|
|
},
|
|
huoquXian(sid1) {
|
|
var sid = {
|
|
sid: sid1
|
|
}
|
|
getCounty(sid).then((res) => {
|
|
if (res.code === '200') {
|
|
this.inputCountyList = res.data
|
|
}
|
|
})
|
|
},
|
|
getQu(value) {
|
|
let bb = ''
|
|
this.inputCountyList.forEach((e) => {
|
|
if (e.sid == value) {
|
|
bb = {
|
|
name: e.name,
|
|
districtCode: e.districtCode,
|
|
sid: e.sid
|
|
}
|
|
}
|
|
})
|
|
this.temp.county = bb.name
|
|
this.deCode.push(bb.districtCode)
|
|
},
|
|
showEdit(sid) {
|
|
console.log('编辑回显', sid)
|
|
this.$nextTick(() => {
|
|
this.$refs['dataForm'].clearValidate()
|
|
})
|
|
this.viewTitle = '修改厂商信息'
|
|
this.dialogStatus = 'update'
|
|
this.sid = sid
|
|
this.stateId = 1
|
|
details(sid).then((response) => {
|
|
if (response.code === '200') {
|
|
if (response.data.baseManufacturerDto.useOrg) {
|
|
this.useOrgArry = response.data.baseManufacturerDto.useOrg
|
|
}
|
|
if (response.data.baseManufacturerDto) {
|
|
this.temp = response.data.baseManufacturerDto
|
|
}
|
|
if (response.data.baseManufacturerFinanceDto) {
|
|
this.temp1 = response.data.baseManufacturerFinanceDto
|
|
}
|
|
if (response.data.baseManufacturerBankDto) {
|
|
this.list = response.data.baseManufacturerBankDto
|
|
}
|
|
}
|
|
})
|
|
this.setDetaList()
|
|
this.getZuZhi()
|
|
this.huoquSheng()
|
|
this.getListOrgAll()
|
|
// this.getPathSid()
|
|
},
|
|
// 返回
|
|
handleReturn(isreload) {
|
|
if (isreload === 'true') this.$emit('reloadlist')
|
|
this.temp = {}
|
|
this.temp1 = {}
|
|
this.temp2 = {}
|
|
this.list = []
|
|
this.useOrgArry = []
|
|
// this.$router.go(-1)
|
|
this.$emit('doback')
|
|
},
|
|
usrOrgArryChange(e) {
|
|
var result = ''
|
|
if (e.length > 0) {
|
|
// 循环多选项
|
|
e.forEach((item) => {
|
|
var last_id = item[item.length - 1]
|
|
// 循环查找名字
|
|
this.select_temp = '' // 临时遍历,用来保存选中结果
|
|
this.findOrgId(last_id, this.options)
|
|
result = result + this.select_temp + ','
|
|
})
|
|
}
|
|
if (result !== '') {
|
|
result = result.substring(0, result.length - 1)
|
|
}
|
|
this.temp.useOrgName = result
|
|
},
|
|
// --- 循环查询
|
|
findOrgId(id, options) {
|
|
if (options) {
|
|
for (var i = 0; i < options.length; i++) {
|
|
if (id == options[i].sid) {
|
|
this.select_temp = options[i].name // 保存找到的内容
|
|
return true
|
|
} else {
|
|
// 判断是否最后一级
|
|
if (options[i].children !== undefined) {
|
|
// 不是的话查询下一级
|
|
if (this.findOrgId(id, options[i].children)) {
|
|
return true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
// 组织
|
|
getZuZhi() {
|
|
selectListOrg().then((res) => {
|
|
if (res.code === '200') {
|
|
this.options = res.data
|
|
this.zuzhi0(this.options)
|
|
}
|
|
})
|
|
},
|
|
zuzhi0(data) {
|
|
data.forEach((e) => {
|
|
if (e.children) {
|
|
if (e.children.length != 0) {
|
|
this.zuzhi0(e.children)
|
|
} else {
|
|
delete e.children
|
|
this.dataArr.push(e)
|
|
return
|
|
}
|
|
}
|
|
})
|
|
},
|
|
// 添加前数据初始化
|
|
resetTemp() {
|
|
this.temp = {
|
|
useOrg: ''
|
|
}
|
|
},
|
|
// 添加数据
|
|
handleCreate() {
|
|
this.$refs['dataForm'].validate((valid) => {
|
|
if (valid) {
|
|
this.FormLoading = true
|
|
this.dialogStatus = 'create'
|
|
if (this.stateId == 0) {
|
|
// if (this.useOrgArry) {
|
|
// var abc = []
|
|
// this.useOrgArry.forEach((e) => {
|
|
// abc.push(e[e.length - 1])
|
|
// })
|
|
// this.temp.useOrg = abc.toString()
|
|
// }
|
|
var Codese = this.deCode.join(',')
|
|
this.temp.orgAddress = Codese
|
|
var data = {
|
|
'baseManufacturerDto': this.temp,
|
|
'baseManufacturerFinanceDto': this.temp1,
|
|
'baseManufacturerBankDto': this.list
|
|
}
|
|
SaveList(data).then((response) => {
|
|
this.FormLoading = false
|
|
if (response.code === '200') {
|
|
setuser(response.data)
|
|
var jisid = response.data
|
|
this.$notify({
|
|
title: '提示',
|
|
message: '添加成功',
|
|
type: 'success',
|
|
duration: 2000
|
|
})
|
|
this.handleReturn('true')
|
|
} else {
|
|
this.$notify({
|
|
title: '提示',
|
|
message: '添加失败',
|
|
type: 'error',
|
|
duration: 2000
|
|
})
|
|
}
|
|
})
|
|
} else {
|
|
// if (this.useOrgArry) {
|
|
// var abc = []
|
|
// this.useOrgArry.forEach((e) => {
|
|
// abc.push(e[e.length - 1])
|
|
// })
|
|
// this.temp.useOrg = abc.toString()
|
|
// }
|
|
var data = {
|
|
'sid': this.sid,
|
|
'baseManufacturerDto': this.temp,
|
|
'baseManufacturerFinanceDto': this.temp1,
|
|
'baseManufacturerBankDto': this.list
|
|
}
|
|
Update(data).then((response) => {
|
|
this.dialogStatus = 'update'
|
|
this.FormLoading = false
|
|
if (response.code === '200') {
|
|
this.$notify({
|
|
title: '提示',
|
|
message: '修改成功',
|
|
type: 'success',
|
|
duration: 2000
|
|
})
|
|
this.handleReturn('true')
|
|
} else {
|
|
this.$notify({
|
|
title: '失败',
|
|
message: '修改失败',
|
|
type: 'error'
|
|
})
|
|
}
|
|
})
|
|
}
|
|
}
|
|
})
|
|
},
|
|
handleSubmit() {
|
|
|
|
},
|
|
getHangYe(value) {
|
|
let bb = null
|
|
this.industryons.forEach((e) => {
|
|
if (e.dictKey === value) {
|
|
bb = {
|
|
type: 'industry',
|
|
name: e.dictValue,
|
|
vaule: e.dictKey
|
|
}
|
|
}
|
|
})
|
|
this.temp.industryValue = bb.name
|
|
},
|
|
getGong(value) {
|
|
let bb = null
|
|
this.supplier.forEach((e) => {
|
|
if (e.dictKey === value) {
|
|
bb = {
|
|
type: 'supplierType',
|
|
name: e.dictValue,
|
|
vaule: e.dictKey
|
|
}
|
|
}
|
|
})
|
|
this.temp.supplierTypeValue = bb.name
|
|
},
|
|
getFen(value) {
|
|
let bb = null
|
|
this.typeOptions.forEach((e) => {
|
|
if (e.dictKey === value) {
|
|
bb = {
|
|
type: 'supplyType',
|
|
name: e.dictValue,
|
|
vaule: e.dictKey
|
|
}
|
|
}
|
|
})
|
|
this.temp.supplyTypeValue = bb.name
|
|
},
|
|
getShang(value) {
|
|
let bb = null
|
|
this.grouping.forEach((e) => {
|
|
if (e.dictKey === value) {
|
|
bb = {
|
|
type: 'supplierGroup',
|
|
name: e.dictValue,
|
|
vaule: e.dictKey
|
|
}
|
|
}
|
|
})
|
|
this.temp.supplierGroupValue = bb.name
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
<style scoped>
|
|
.filter-item_province, .filter-item {
|
|
width: 27%;
|
|
padding-right: 10px;
|
|
}
|
|
|
|
.addinputw01 {
|
|
width: 92% !important;
|
|
}
|
|
|
|
/deep/ .el-col-3 {
|
|
text-align: right;
|
|
float: left;
|
|
color: #606266;
|
|
line-height: 42px !important;
|
|
/*font-weight: 600;*/
|
|
}
|
|
|
|
/deep/ .el-col-4 {
|
|
text-align: right;
|
|
float: left;
|
|
color: #606266;
|
|
line-height: 42px !important;
|
|
/*font-weight: 600;*/
|
|
}
|
|
</style>
|
|
|