Commit ca3459f0 authored by qinj's avatar qinj

注册附件上传格式修改

parent 5f5604a2
...@@ -263,14 +263,13 @@ ...@@ -263,14 +263,13 @@
:offset="1" :offset="1"
class="padding-bottom"> class="padding-bottom">
<el-form-item label="营业执照:" <el-form-item label="营业执照:"
prop="filelll" prop="file"
label-width="100px" label-width="100px"
class="filter-icon-none"> class="filter-icon-none">
<el-upload :on-change="handleChange" <el-upload :on-change="handleChange"
:on-success="handleAvatarSuccess"
:on-remove="handleRemoveFile" :on-remove="handleRemoveFile"
action="https://jsonplaceholder.typicode.com/posts/" :auto-upload='false'
accept=".doc,.txt,.pdf,.xls,.docx,.xlsx " action="false"
:limit="1"> :limit="1">
<el-button size="small" <el-button size="small"
type="primary">点击上传</el-button> type="primary">点击上传</el-button>
...@@ -361,7 +360,7 @@ export default { ...@@ -361,7 +360,7 @@ export default {
extSocialUnifiedCreditCode_SDK: [{ required: true, message: '请输入统一社会信用代码', trigger: 'blur' }], extSocialUnifiedCreditCode_SDK: [{ required: true, message: '请输入统一社会信用代码', trigger: 'blur' }],
extRegisteredCapital_SDK: [{ required: true, message: '请输入注册资本(万元)', trigger: 'blur' }], extRegisteredCapital_SDK: [{ required: true, message: '请输入注册资本(万元)', trigger: 'blur' }],
extCorporateName_SDK: [{ required: true, message: '请输入法人', trigger: 'blur' }], extCorporateName_SDK: [{ required: true, message: '请输入法人', trigger: 'blur' }],
extProvince_SDK: [{ required: true, message: '请选择省份', trigger: 'blur' }], extProvince_SDK: [{ required: true, message: '请选择省份', trigger: ['blur', 'change'] }],
extCity_SDK: [{ required: true, message: '请选择市', trigger: 'blur' }], extCity_SDK: [{ required: true, message: '请选择市', trigger: 'blur' }],
extDistrict_SDK: [{ required: true, message: '请选择区', trigger: 'blur' }], extDistrict_SDK: [{ required: true, message: '请选择区', trigger: 'blur' }],
extAddressDetail_SDK: [{ required: true, message: '请输入详细经营地址', trigger: 'blur' }], extAddressDetail_SDK: [{ required: true, message: '请输入详细经营地址', trigger: 'blur' }],
...@@ -371,7 +370,7 @@ export default { ...@@ -371,7 +370,7 @@ export default {
{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }], { type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }],
extUnis_SDK: [{ required: true, message: '请输入Unis业务负责人姓名', trigger: 'blur' }], extUnis_SDK: [{ required: true, message: '请输入Unis业务负责人姓名', trigger: 'blur' }],
extUnisPhone_SDK: [{ required: true, message: '请输入Unis业务负责人电话', trigger: 'blur' }], extUnisPhone_SDK: [{ required: true, message: '请输入Unis业务负责人电话', trigger: 'blur' }],
filelll: [{ required: true, message: '请上传附件', trigger: 'blur' }], file: [{ required: true, message: '请上传附件', trigger: ['blur', 'change'] }],
extUnisEmail_SDK: [{ required: true, message: '请输入Unis业务负责人邮箱', trigger: 'blur' }, extUnisEmail_SDK: [{ required: true, message: '请输入Unis业务负责人邮箱', trigger: 'blur' },
{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }], { type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }],
}, },
...@@ -388,7 +387,7 @@ export default { ...@@ -388,7 +387,7 @@ export default {
watch: { watch: {
}, },
computed:{ computed: {
visitedViews() { visitedViews() {
return this.$store.state.tagsView.visitedViews return this.$store.state.tagsView.visitedViews
}, },
...@@ -474,12 +473,12 @@ export default { ...@@ -474,12 +473,12 @@ export default {
this.$message.success('提交成功!') this.$message.success('提交成功!')
this.$router.back() this.$router.back()
}).catch((err) => { }).catch((err) => {
this.btnloading=false this.btnloading = false
// this.$message({ // this.$message({
// type: 'warning', // type: 'warning',
// message: err // message: err
// }) // })
}) })
} else { } else {
this.btnloading = false this.btnloading = false
this.$message.warning('请输入必填信息!') this.$message.warning('请输入必填信息!')
...@@ -520,22 +519,12 @@ export default { ...@@ -520,22 +519,12 @@ export default {
return { 'Content-Type': 'multipart/form-data' } return { 'Content-Type': 'multipart/form-data' }
}, },
handleChange(file, fileList) { handleChange(file, fileList) {
this.formData.file = (file.raw) this.formData.file = file.raw
}, this.supplierBaseRules.file=[]
handleAvatarSuccess(res, file) {
console.log('res', res, "file", file)
this.supplierBaseRules.filelll = []
}, },
handleRemoveFile(res, file) { handleRemoveFile(res, file) {
console.log('restest', res, "file", file) this.supplierBaseRules.file = [{ required: true, message: '请上传附件', trigger: ['blur', 'change'] }]
this.supplierBaseRules.filelll = [{ required: true, message: '请上传附件', trigger: 'blur' }]
}, },
onSubmit() { },
handlePreview() { },
handleRemove() { },
beforeRemove() { },
handleExceed() { },
handleNext() { }
} }
} }
</script> </script>
......
...@@ -18,8 +18,7 @@ ...@@ -18,8 +18,7 @@
<el-col :span="13" <el-col :span="13"
class="padding-bottom"> class="padding-bottom">
<el-form-item label="公司全称:" <el-form-item label="公司全称:"
label-width="150px" label-width="150px">
>
<el-input v-model="formData.name" <el-input v-model="formData.name"
readonly readonly
placeholder='请选择公司' placeholder='请选择公司'
...@@ -47,8 +46,7 @@ ...@@ -47,8 +46,7 @@
class="padding-bottom"> class="padding-bottom">
<el-form-item label="统一社会信用代码:" <el-form-item label="统一社会信用代码:"
label-width="150px" label-width="150px"
prop="extSocialUnifiedCreditCode_SDK" prop="extSocialUnifiedCreditCode_SDK">
>
<template> <template>
<el-input v-model="formData.extSocialUnifiedCreditCode_SDK" <el-input v-model="formData.extSocialUnifiedCreditCode_SDK"
placeholder="企查查获取" placeholder="企查查获取"
...@@ -102,15 +100,17 @@ ...@@ -102,15 +100,17 @@
class="padding-bottom"> class="padding-bottom">
<el-form-item label="省份:" <el-form-item label="省份:"
prop="extProvince_SDK" prop="extProvince_SDK"
label-width="80px" label-width="80px">
> <el-select v-model="formData.extProvince_SDK"
<el-select v-model="formData.extProvince_SDK" style="width: 91%" filterable placeholder="请选择省份" no-match-text="无匹配数据" @change="handleSelect($event)"> style="width: 91%"
<el-option filterable
v-for="item in countryOptions" placeholder="请选择省份"
:key="item.Code" no-match-text="无匹配数据"
:label="item.Name" @change="handleSelect($event)">
:value="item.Code" <el-option v-for="item in countryOptions"
/> :key="item.Code"
:label="item.Name"
:value="item.Code" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -118,15 +118,16 @@ ...@@ -118,15 +118,16 @@
class="padding-bottom"> class="padding-bottom">
<el-form-item label="市:" <el-form-item label="市:"
prop="extCity_SDK" prop="extCity_SDK"
label-width="80px" label-width="80px">
> <el-select v-model="formData.extCity_SDK"
<el-select v-model="formData.extCity_SDK" style="width: 91%" filterable placeholder="请选择市" @change="handleSelectCity" > style="width: 91%"
<el-option filterable
v-for="item in cityOptions" placeholder="请选择市"
:key="item.Code" @change="handleSelectCity">
:label="item.Name" <el-option v-for="item in cityOptions"
:value="item.Code" :key="item.Code"
/> :label="item.Name"
:value="item.Code" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -134,15 +135,17 @@ ...@@ -134,15 +135,17 @@
class="padding-bottom"> class="padding-bottom">
<el-form-item label="区:" <el-form-item label="区:"
prop="extDistrict_SDK" prop="extDistrict_SDK"
label-width="80px" label-width="80px">
> <el-select v-model="formData.extDistrict_SDK"
<el-select v-model="formData.extDistrict_SDK" style="width: 91%" filterable placeholder="请选择区" no-match-text="无匹配数据" @change="handleSelectDis"> style="width: 91%"
<el-option filterable
v-for="item in disOptions" placeholder="请选择区"
:key="item.Code" no-match-text="无匹配数据"
:label="item.Name" @change="handleSelectDis">
:value="item.Code" <el-option v-for="item in disOptions"
/> :key="item.Code"
:label="item.Name"
:value="item.Code" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -169,8 +172,7 @@ ...@@ -169,8 +172,7 @@
class="padding-bottom"> class="padding-bottom">
<el-form-item label="公司负责人姓名:" <el-form-item label="公司负责人姓名:"
prop="extLeader_SDK" prop="extLeader_SDK"
label-width="150px" label-width="150px">
>
<el-input v-model="formData.extLeader_SDK" <el-input v-model="formData.extLeader_SDK"
placeholder="" placeholder=""
style="width: 80%" style="width: 80%"
...@@ -183,8 +185,7 @@ ...@@ -183,8 +185,7 @@
<el-form-item label="公司负责人联系电话:" <el-form-item label="公司负责人联系电话:"
prop="extLeaderPhone_SDK" prop="extLeaderPhone_SDK"
label-width="160px" label-width="160px"
class="filter-icon-none" class="filter-icon-none">
>
<el-input v-model="formData.extLeaderPhone_SDK" <el-input v-model="formData.extLeaderPhone_SDK"
placeholder="" placeholder=""
style="width: 80%" style="width: 80%"
...@@ -203,8 +204,7 @@ ...@@ -203,8 +204,7 @@
<el-form-item label="公司负责人邮箱:" <el-form-item label="公司负责人邮箱:"
prop="extLeaderEmail_SDK" prop="extLeaderEmail_SDK"
label-width="150px" label-width="150px"
class="filter-icon-none" class="filter-icon-none">
>
<el-input v-model="formData.extLeaderEmail_SDK" <el-input v-model="formData.extLeaderEmail_SDK"
placeholder="" placeholder=""
style="width: 52%" style="width: 52%"
...@@ -218,8 +218,7 @@ ...@@ -218,8 +218,7 @@
class="padding-bottom"> class="padding-bottom">
<el-form-item label="Unis业务负责人姓名:" <el-form-item label="Unis业务负责人姓名:"
prop="extUnis_SDK" prop="extUnis_SDK"
label-width="160px" label-width="160px">
>
<el-input v-model="formData.extUnis_SDK" <el-input v-model="formData.extUnis_SDK"
placeholder="" placeholder=""
style="width: 80%" style="width: 80%"
...@@ -231,8 +230,7 @@ ...@@ -231,8 +230,7 @@
class="padding-bottom"> class="padding-bottom">
<el-form-item label="Unis业务负责人电话:" <el-form-item label="Unis业务负责人电话:"
prop="extUnisPhone_SDK" prop="extUnisPhone_SDK"
label-width="160px" label-width="160px">
>
<el-input v-model="formData.extUnisPhone_SDK" <el-input v-model="formData.extUnisPhone_SDK"
placeholder="" placeholder=""
style="width: 90%" style="width: 90%"
...@@ -246,8 +244,7 @@ ...@@ -246,8 +244,7 @@
<el-form-item label="Unis业务负责人邮箱:" <el-form-item label="Unis业务负责人邮箱:"
prop="extUnisEmail_SDK" prop="extUnisEmail_SDK"
label-width="160px" label-width="160px"
class="filter-icon-none" class="filter-icon-none">
>
<el-input v-model="formData.extUnisEmail_SDK" <el-input v-model="formData.extUnisEmail_SDK"
placeholder="" placeholder=""
style="width: 80%" style="width: 80%"
...@@ -255,59 +252,104 @@ ...@@ -255,59 +252,104 @@
clearable /> clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" :offset="1" class="padding-bottom"> <el-col :span="12"
<el-form-item label="商务负责人姓名:" prop="extBusiness_SDK" label-width="150px" > :offset="1"
<el-input v-model="formData.extBusiness_SDK" placeholder="" style="width: 80%" class="filter-item" clearable /> class="padding-bottom">
<el-form-item label="商务负责人姓名:"
prop="extBusiness_SDK"
label-width="150px">
<el-input v-model="formData.extBusiness_SDK"
placeholder=""
style="width: 80%"
class="filter-item"
clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10" class="padding-bottom"> <el-col :span="10"
<el-form-item label="商务负责人电话:" prop="extBusinessPhone_SDK" label-width="140px" > class="padding-bottom">
<el-input v-model="formData.extBusinessPhone_SDK" placeholder="" style="width: 90%" class="filter-item" clearable /> <el-form-item label="商务负责人电话:"
prop="extBusinessPhone_SDK"
label-width="140px">
<el-input v-model="formData.extBusinessPhone_SDK"
placeholder=""
style="width: 90%"
class="filter-item"
clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11" :offset="1" class="padding-bottom" > <el-col :span="11"
<el-form-item label="商务负责人邮箱:" prop="extBusinessEmail_SDK" label-width="160px" class="filter-icon-none" > :offset="1"
<el-input v-model="formData.extBusinessEmail_SDK" placeholder="" style="width: 80%" class="filter-item" clearable /> class="padding-bottom">
<el-form-item label="商务负责人邮箱:"
prop="extBusinessEmail_SDK"
label-width="160px"
class="filter-icon-none">
<el-input v-model="formData.extBusinessEmail_SDK"
placeholder=""
style="width: 80%"
class="filter-item"
clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row class="border-bottom"> <el-row class="border-bottom">
<el-col :span="24"> <el-col :span="24">
<el-form-item label="签约信息" /> <el-form-item label="签约信息" />
</el-col> </el-col>
<el-col :span="11" :offset="1" class="padding-bottom"> <el-col :span="11"
<el-form-item label="签约渠道类型:" prop="extChannelType_SDK" label-width="120px" > :offset="1"
<el-select v-model="formData.extChannelType_SDK" style="width: 91%" filterable placeholder="请选择" no-match-text="无匹配数据"> class="padding-bottom">
<el-option <el-form-item label="签约渠道类型:"
v-for="item in aOptions" prop="extChannelType_SDK"
:key="item.id" label-width="120px">
:label="item.content" <el-select v-model="formData.extChannelType_SDK"
:value="item.keyword" style="width: 91%"
/> filterable
placeholder="请选择"
no-match-text="无匹配数据">
<el-option v-for="item in aOptions"
:key="item.id"
:label="item.content"
:value="item.keyword" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" class="padding-bottom"> <el-col :span="12"
<el-form-item label="签约产品组:" prop="extProductGroup_KUT" label-width="120px" > class="padding-bottom">
<el-select v-model="formData.extProductGroup_KUT" style="width: 91%" multiple filterable placeholder="请选择" no-match-text="无匹配数据" @change="handSelect2"> <el-form-item label="签约产品组:"
<el-option prop="extProductGroup_KUT"
v-for="item in bOptions" label-width="120px">
:key="item.id" <el-select v-model="formData.extProductGroup_KUT"
:label="item.content" style="width: 91%"
:value="item.keyword" multiple
/> filterable
placeholder="请选择"
no-match-text="无匹配数据"
@change="handSelect2">
<el-option v-for="item in bOptions"
:key="item.id"
:label="item.content"
:value="item.keyword" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11" :offset="1" class="padding-bottom"> <el-col :span="11"
<el-form-item label="签约总代:" prop="extTotalAgent_KUT" label-width="100px" > :offset="1"
<el-select v-model="formData.extTotalAgent_KUT" style="width: 91%" multiple filterable placeholder="请选择" no-match-text="无匹配数据" @change="handSelect3"> class="padding-bottom">
<el-option <el-form-item label="签约总代:"
v-for="item in cOptions" prop="extTotalAgent_KUT"
:key="item.id" label-width="100px">
:label="item.content" <el-select v-model="formData.extTotalAgent_KUT"
:value="item.keyword" style="width: 91%"
/> multiple
filterable
placeholder="请选择"
no-match-text="无匹配数据"
@change="handSelect3">
<el-option v-for="item in cOptions"
:key="item.id"
:label="item.content"
:value="item.keyword" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -321,29 +363,28 @@ ...@@ -321,29 +363,28 @@
:offset="1" :offset="1"
class="padding-bottom"> class="padding-bottom">
<el-form-item label="营业执照:" <el-form-item label="营业执照:"
prop="filelll" prop="file"
label-width="100px" label-width="100px"
class="filter-icon-none" class="filter-icon-none">
> <el-upload ref="uploadExcel"
<el-upload action="false"
ref="uploadExcel" :limit='1'
action="https://jsonplaceholder.typicode.com/posts/" :auto-upload= 'false'
:limit='1' :on-remove="handleRemoveFile"
accept=".doc,.txt,.pdf,.xls,.docx,.xlsx " :on-change="fileChange">
:on-success="handleAvatarSuccess" <el-button size="small"
:on-remove="handleRemoveFile" type="primary">点击上传</el-button>
:on-change="fileChange" </el-upload>
>
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col align="center"> <el-col align="center">
<el-button type="primary" :loading="btnloading" @click="handleApprove()">提交</el-button> <el-button type="primary"
</el-col> :loading="btnloading"
</el-row> @click="handleApprove()">提交</el-button>
</el-col>
</el-row>
</el-form> </el-form>
<el-dialog title="请选择公司" <el-dialog title="请选择公司"
:visible.sync="dialogTableVisible" :visible.sync="dialogTableVisible"
...@@ -388,18 +429,17 @@ ...@@ -388,18 +429,17 @@
:limit.sync="page.pageSize" :limit.sync="page.pageSize"
@pagination="getList" /> @pagination="getList" />
</el-dialog> </el-dialog>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { Qcc,Country,Customer,Common } from '@/api/qcc' import { Qcc, Country, Customer, Common } from '@/api/qcc'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
export default { export default {
name: 'city-register', name: 'city-register',
components: { components: {
Pagination Pagination
}, },
data() { data() {
...@@ -410,41 +450,41 @@ export default { ...@@ -410,41 +450,41 @@ export default {
formInline: {}, formInline: {},
recordList: [], recordList: [],
tableData: [], tableData: [],
btnloading:false, btnloading: false,
fileList:[], fileList: [],
countryOptions:[], countryOptions: [],
cityOptions:[], cityOptions: [],
disOptions:[], disOptions: [],
aOptions:[], aOptions: [],
bOptions:[], bOptions: [],
cOptions:[], cOptions: [],
supplierBaseRules: { supplierBaseRules: {
extSocialUnifiedCreditCode_SDK: [{ required: true, message: '请输入统一社会信用代码', trigger: 'blur' }], extSocialUnifiedCreditCode_SDK: [{ required: true, message: '请输入统一社会信用代码', trigger: 'blur' }],
extRegisteredCapital_SDK: [{ required: true, message: '请输入注册资本(万元)', trigger: 'blur' }], extRegisteredCapital_SDK: [{ required: true, message: '请输入注册资本(万元)', trigger: 'blur' }],
extCorporateName_SDK: [{ required: true, message: '请输入法人', trigger: 'blur' }], extCorporateName_SDK: [{ required: true, message: '请输入法人', trigger: 'blur' }],
extProvince_SDK: [{ required: true, message: '请选择省份', trigger: 'blur' }], extProvince_SDK: [{ required: true, message: '请选择省份', trigger: ['blur', 'change'] }],
extCity_SDK: [{ required: true, message: '请选择市', trigger: 'blur' }], extCity_SDK: [{ required: true, message: '请选择市', trigger: 'blur' }],
extDistrict_SDK: [{ required: true, message: '请选择区', trigger: 'blur' }], extDistrict_SDK: [{ required: true, message: '请选择区', trigger: 'blur' }],
extAddressDetail_SDK: [{ required: true, message: '请输入详细经营地址', trigger: 'blur' }], extAddressDetail_SDK: [{ required: true, message: '请输入详细经营地址', trigger: 'blur' }],
extLeader_SDK: [{ required: true, message: '请输入公司负责人姓名', trigger: 'blur' }], extLeader_SDK: [{ required: true, message: '请输入公司负责人姓名', trigger: 'blur' }],
extLeaderPhone_SDK: [{ required: true, message: '请输入公司负责人联系电话', trigger: 'blur' }], extLeaderPhone_SDK: [{ required: true, message: '请输入公司负责人联系电话', trigger: 'blur' }],
extLeaderEmail_SDK: [{ required: true, message: '请输入公司负责人邮箱', trigger: 'blur' }, extLeaderEmail_SDK: [{ required: true, message: '请输入公司负责人邮箱', trigger: 'blur' },
{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }], { type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }],
extUnis_SDK: [{ required: true, message: '请输入Unis业务负责人姓名', trigger: 'blur' }], extUnis_SDK: [{ required: true, message: '请输入Unis业务负责人姓名', trigger: 'blur' }],
extUnisPhone_SDK: [{ required: true, message: '请输入Unis业务负责人电话', trigger: 'blur' }], extUnisPhone_SDK: [{ required: true, message: '请输入Unis业务负责人电话', trigger: 'blur' }],
extUnisEmail_SDK: [{ required: true, message: '请输入Unis业务负责人邮箱', trigger: 'blur' }, extUnisEmail_SDK: [{ required: true, message: '请输入Unis业务负责人邮箱', trigger: 'blur' },
{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }], { type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }],
extBusiness_SDK: [{ required: true, message: '请输入商务负责人姓名', trigger: 'blur' }], extBusiness_SDK: [{ required: true, message: '请输入商务负责人姓名', trigger: 'blur' }],
extBusinessPhone_SDK: [{ required: true, message: '请输入商务负责人电话', trigger: 'blur' }], extBusinessPhone_SDK: [{ required: true, message: '请输入商务负责人电话', trigger: 'blur' }],
extBusinessEmail_SDK: [{ required: true, message: '请输入商务负责人邮箱', trigger: 'blur' }, extBusinessEmail_SDK: [{ required: true, message: '请输入商务负责人邮箱', trigger: 'blur' },
{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }], { type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }],
extChannelType_SDK: [{ required: true, message: '请选择签约渠道类型', trigger: 'blur' }], extChannelType_SDK: [{ required: true, message: '请选择签约渠道类型', trigger: 'blur' }],
extProductGroup_KUT: [{ required: true, message: '请选择签约产品组', trigger: 'blur' }], extProductGroup_KUT: [{ required: true, message: '请选择签约产品组', trigger: 'blur' }],
extTotalAgent_KUT: [{ required: true, message: '请选择签约总代', trigger: 'blur' }], extTotalAgent_KUT: [{ required: true, message: '请选择签约总代', trigger: 'blur' }],
filelll: [{ required: true, message: '请上传附件', trigger: 'blur' }], file: [{ required: true, message: '请上传附件', trigger: ['blur', 'change'] }],
}, },
dialogTableVisible: false, dialogTableVisible: false,
TotalRecords:0, TotalRecords: 0,
page: { page: {
currentPage: 0, currentPage: 0,
pageSize: 0 pageSize: 0
...@@ -455,7 +495,7 @@ export default { ...@@ -455,7 +495,7 @@ export default {
watch: { watch: {
}, },
computed:{ computed: {
visitedViews() { visitedViews() {
return this.$store.state.tagsView.visitedViews return this.$store.state.tagsView.visitedViews
}, },
...@@ -468,149 +508,149 @@ export default { ...@@ -468,149 +508,149 @@ export default {
getList() { getList() {
this.page.searchKey=this.formInline.Name this.page.searchKey = this.formInline.Name
this.$request(Qcc.searchUrl, this.page).then((resp) => { this.$request(Qcc.searchUrl, this.page).then((resp) => {
this.tableData = resp.results.Result this.tableData = resp.results.Result
this.page = resp.results.Paging this.page = resp.results.Paging
this.TotalRecords=resp.results.Paging.TotalRecords this.TotalRecords = resp.results.Paging.TotalRecords
}) })
}, },
selectCountry(){ selectCountry() {
this.$request(Country.searchPro, this.page).then((resp) => { this.$request(Country.searchPro, this.page).then((resp) => {
this.countryOptions=resp.results this.countryOptions = resp.results
}) })
}, },
getCommon(){ getCommon() {
const adata={code:'ExtChannelType_SDK',module:'Customer',content:'RSP'} const adata = { code: 'ExtChannelType_SDK', module: 'Customer', content: 'RSP' }
this.$request(Common.searchUrl, adata).then((resp) => { this.$request(Common.searchUrl, adata).then((resp) => {
this.aOptions=resp this.aOptions = resp
}) })
const bdata={code:'ExtProductGroup_KUT',module:'Customer'} const bdata = { code: 'ExtProductGroup_KUT', module: 'Customer' }
this.$request(Common.searchUrl, bdata).then((resp) => { this.$request(Common.searchUrl, bdata).then((resp) => {
this.bOptions=resp this.bOptions = resp
}) })
const cdata={code:'ExtTotalAgent_KUT',module:'Customer'} const cdata = { code: 'ExtTotalAgent_KUT', module: 'Customer' }
this.$request(Common.searchUrl, cdata).then((resp) => { this.$request(Common.searchUrl, cdata).then((resp) => {
this.cOptions=resp this.cOptions = resp
}) })
}, },
handleSelect(value){ handleSelect(value) {
const app={provinceCode:value} const app = { provinceCode: value }
this.$request(Country.searchCity,app).then((resp) => { this.$request(Country.searchCity, app).then((resp) => {
this.cityOptions=resp.results this.cityOptions = resp.results
}) })
let obj = {}; let obj = {};
obj = this.countryOptions.find((item)=>{//这里的userList就是上面遍历的数据源 obj = this.countryOptions.find((item) => {//这里的userList就是上面遍历的数据源
return item.Code === value;//筛选出匹配数据 return item.Code === value;//筛选出匹配数据
}); });
this.formData.extProvinceName_SDK=obj.Name//获取的 name this.formData.extProvinceName_SDK = obj.Name//获取的 name
this.formData.extProvince_SDK=value//获取的 id this.formData.extProvince_SDK = value//获取的 id
}, },
handleSelectCity(value){ handleSelectCity(value) {
const app={cityCode:value} const app = { cityCode: value }
this.$request(Country.searchDis,app).then((resp) => { this.$request(Country.searchDis, app).then((resp) => {
this.disOptions=resp.results this.disOptions = resp.results
}) })
let obj = {}; let obj = {};
obj = this.cityOptions.find((item)=>{//这里的userList就是上面遍历的数据源 obj = this.cityOptions.find((item) => {//这里的userList就是上面遍历的数据源
return item.Code === value;//筛选出匹配数据 return item.Code === value;//筛选出匹配数据
}); });
this.formData.extCityName_SDK=obj.Name//获取的 name this.formData.extCityName_SDK = obj.Name//获取的 name
this.formData.extCity_SDK=value//获取的 id this.formData.extCity_SDK = value//获取的 id
}, },
handleSelectDis(value){ handleSelectDis(value) {
let obj = {}; let obj = {};
obj = this.disOptions.find((item)=>{//这里的userList就是上面遍历的数据源 obj = this.disOptions.find((item) => {//这里的userList就是上面遍历的数据源
return item.Code === value;//筛选出匹配数据 return item.Code === value;//筛选出匹配数据
}); });
this.formData.extDistrictName_SDK=obj.Name//获取的 name this.formData.extDistrictName_SDK = obj.Name//获取的 name
this.formData.extDistrict_SDK=value//获取的 id this.formData.extDistrict_SDK = value//获取的 id
}, },
handSelect2(value){ handSelect2(value) {
let cont=[] let cont = []
let val=[] let val = []
this.bOptions.forEach((el)=>{ this.bOptions.forEach((el) => {
value.forEach((item)=>{ value.forEach((item) => {
if(el.keyword==item){ if (el.keyword == item) {
cont.push(el.content) cont.push(el.content)
val.push(el.keyword) val.push(el.keyword)
} }
}) })
}) })
this.formData.extProductGroup_SDK=cont//获取的 name this.formData.extProductGroup_SDK = cont//获取的 name
this.formData.extProductGroup_KUT=val//获取的 id this.formData.extProductGroup_KUT = val//获取的 id
}, },
handSelect3(value){ handSelect3(value) {
let cont=[] let cont = []
let val=[] let val = []
this.cOptions.forEach((el)=>{ this.cOptions.forEach((el) => {
value.forEach((item)=>{ value.forEach((item) => {
if(el.keyword==item){ if (el.keyword == item) {
cont.push(el.content) cont.push(el.content)
val.push(el.keyword) val.push(el.keyword)
} }
}) })
}) })
this.formData.extTotalAgent_SDK=cont//获取的 name this.formData.extTotalAgent_SDK = cont//获取的 name
this.formData.extTotalAgent_KUT=val//获取的 id this.formData.extTotalAgent_KUT = val//获取的 id
}, },
createLovTable() { createLovTable() {
this.dialogTableVisible = true this.dialogTableVisible = true
}, },
select(row, column, event) { select(row, column, event) {
this.page.searchKey=row.CreditCode this.page.searchKey = row.CreditCode
this.$request(Qcc.detailUrl, this.page).then((resp) => { this.$request(Qcc.detailUrl, this.page).then((resp) => {
this.formData.extCorporateName_SDK = row.OperName this.formData.extCorporateName_SDK = row.OperName
this.formData.extSocialUnifiedCreditCode_SDK = row.CreditCode this.formData.extSocialUnifiedCreditCode_SDK = row.CreditCode
this.formData.name = row.Name this.formData.name = row.Name
this.formData.extRegisteredCapital_SDK=resp.results.Result.RegistCapi this.formData.extRegisteredCapital_SDK = resp.results.Result.RegistCapi
this.dialogTableVisible = false this.dialogTableVisible = false
}) })
}, },
handleApprove(){ handleApprove() {
this.$refs.formData.validate((valid) => { this.$refs.formData.validate((valid) => {
if (valid) { if (valid) {
// this.aOptions.forEach(el=>{ // this.aOptions.forEach(el=>{
// this.formData.ExtProvinceName_SDK=el[this.formData.extProvince_SDK] // this.formData.ExtProvinceName_SDK=el[this.formData.extProvince_SDK]
// })
// this.bOptions.forEach(el=>{
// this.formData.extCityName_SDK=el[this.formData.extCity_SDK]
// })
// this.cOptions.forEach(el=>{
// this.formData.extDistrictName_SDK=el[this.formData.extDistrict_SDK]
// })
this.formData.extCustomerType_SDK=101
const ExtProductGroup_KUT=this.formData.extProductGroup_KUT.toString()
const ExtProductGroup_SDK=this.formData.extProductGroup_SDK.toString()
const ExtTotalAgent_KUT=this.formData.extTotalAgent_KUT.toString()
const ExtTotalAgent_SDK=this.formData.extTotalAgent_SDK.toString()
this.formData.extProductGroup_KUT=ExtProductGroup_KUT
this.formData.extProductGroup_SDK=ExtProductGroup_SDK
this.formData.extTotalAgent_KUT=ExtTotalAgent_KUT
this.formData.extTotalAgent_SDK=ExtTotalAgent_SDK
this.btnloading=true
this.$request(Customer.searchUrl,this.paramsToFormData(this.formData)).then((resp) => {
this.btnloading=false
this.$message.success('提交成功!')
this.$router.back()
}).catch((err) => {
this.btnloading=false
// this.$message({
// type: 'warning',
// message: err
// }) // })
}) // this.bOptions.forEach(el=>{
} else { // this.formData.extCityName_SDK=el[this.formData.extCity_SDK]
this.btnloading=false // })
this.$message.warning('请输入必填信息!') // this.cOptions.forEach(el=>{
} // this.formData.extDistrictName_SDK=el[this.formData.extDistrict_SDK]
}); // })
this.formData.extCustomerType_SDK = 101
const ExtProductGroup_KUT = this.formData.extProductGroup_KUT.toString()
const ExtProductGroup_SDK = this.formData.extProductGroup_SDK.toString()
const ExtTotalAgent_KUT = this.formData.extTotalAgent_KUT.toString()
const ExtTotalAgent_SDK = this.formData.extTotalAgent_SDK.toString()
this.formData.extProductGroup_KUT = ExtProductGroup_KUT
this.formData.extProductGroup_SDK = ExtProductGroup_SDK
this.formData.extTotalAgent_KUT = ExtTotalAgent_KUT
this.formData.extTotalAgent_SDK = ExtTotalAgent_SDK
this.btnloading = true
this.$request(Customer.searchUrl, this.paramsToFormData(this.formData)).then((resp) => {
this.btnloading = false
this.$message.success('提交成功!')
this.$router.back()
}).catch((err) => {
this.btnloading = false
// this.$message({
// type: 'warning',
// message: err
// })
})
} else {
this.btnloading = false
this.$message.warning('请输入必填信息!')
}
});
}, },
handleClickGoBack() { handleClickGoBack() {
// const visitedViews = this.$store.state.tagsView.visitedViews // const visitedViews = this.$store.state.tagsView.visitedViews
// const path = this.$route.path // const path = this.$route.path
// visitedViews.forEach(function(item, index) { // visitedViews.forEach(function(item, index) {
...@@ -622,40 +662,33 @@ export default { ...@@ -622,40 +662,33 @@ export default {
this.$router.back() this.$router.back()
}) })
}, },
paramsToFormData(obj) { paramsToFormData(obj) {
const formData = new FormData(); const formData = new FormData();
Object.keys(obj).forEach((key) => { Object.keys(obj).forEach((key) => {
if (obj[key] instanceof Array) { if (obj[key] instanceof Array) {
obj[key].forEach((item) => { obj[key].forEach((item) => {
formData.append(key, item); formData.append(key, item);
}); });
return; return;
} }
formData.append(key, obj[key]); formData.append(key, obj[key]);
}); });
return formData; return formData;
}, },
reSet() { reSet() {
this.formInline.Name='' this.formInline.Name = ''
}, },
handleClose() { handleClose() {
this.dialogTableVisible = false this.dialogTableVisible = false
}, },
myHeader(){ fileChange(res, file) {
return {'Content-Type': 'multipart/form-data'} this.formData.file = res.raw
}, this.supplierBaseRules.file=[]
fileChange(res,file){
this.formData.file=(res.raw)
},
handleAvatarSuccess(res,file){
console.log('res',res,"file",file)
this.supplierBaseRules.filelll=[]
}, },
handleRemoveFile(res, file) { handleRemoveFile(res,file){
console.log('restest', res, "file", file) this.supplierBaseRules.file = [{ required: true, message: '请上传附件', trigger: ['blur', 'change'] }]
this.supplierBaseRules.filelll = [{ required: true, message: '请上传附件', trigger: 'blur' }]
}, },
onSubmit() {}, onSubmit() { },
handlePreview() { }, handlePreview() { },
handleRemove() { }, handleRemove() { },
beforeRemove() { }, beforeRemove() { },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment