Commit 2e4a3960 authored by qinj's avatar qinj

注册唯一性校验

parent e81fb247
...@@ -3,7 +3,8 @@ import request from '@/utils/request' ...@@ -3,7 +3,8 @@ import request from '@/utils/request'
export const Qcc = { export const Qcc = {
searchUrl: '/qcc/search', searchUrl: '/qcc/search',
detailUrl: '/qcc/getOne' detailUrl: '/qcc/getOne',
onlyDetailUrl: '/customer/checkUniqueness',
} }
export const Country = { export const Country = {
searchPro: '/province/searchAll', searchPro: '/province/searchAll',
......
...@@ -458,23 +458,27 @@ export default { ...@@ -458,23 +458,27 @@ export default {
this.dialogTableVisible = true this.dialogTableVisible = true
}, },
select(row, column, event) { select(row, column, event) {
this.page.extSocialUnifiedCreditCode_SDK = row.CreditCode
this.page.searchKey = row.CreditCode this.page.searchKey = row.CreditCode
this.$request(Qcc.detailUrl, this.page).then((resp) => { this.$request(Qcc.onlyDetailUrl, 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
}).catch((err)=>{
}) })
}, },
handleApprove() { handleApprove() {
this.$refs.formData.validate((valid) => { this.$refs.formData.validate((valid) => {
if (valid) { if (valid) {
this.formData.extCustomerType_SDK = 111 this.formData.extCustomerType_SDK = 111
const dataList=this.formData
this.btnloading = true this.btnloading = true
this.$request(Customer.searchUrl, this.paramsToFormData(this.formData)).then((resp) => { this.$request(Customer.searchUrl, this.paramsToFormData(dataList)).then((resp) => {
this.btnloading = false this.btnloading = false
this.$message.success('提交成功!') this.$message.success('提交成功!')
this.isShow = false this.isShow = false
......
...@@ -459,9 +459,9 @@ export default { ...@@ -459,9 +459,9 @@ export default {
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: '请输入注册资本(万元)' }], // extRegisteredCapital_SDK: [{ required: true, message: '请输入注册资本(万元)' }],
...@@ -620,29 +620,33 @@ export default { ...@@ -620,29 +620,33 @@ export default {
this.dialogTableVisible = true this.dialogTableVisible = true
}, },
select(row, column, event) { select(row, column, event) {
this.page.searchKey = row.CreditCode this.page.extSocialUnifiedCreditCode_SDK = row.CreditCode
this.$request(Qcc.detailUrl, this.page).then((resp) => { this.page.searchKey=row.CreditCode
this.$request(Qcc.onlyDetailUrl, 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
}).catch((err)=>{
}) })
}, },
handleApprove() { handleApprove() {
this.$refs.formData.validate((valid) => { this.$refs.formData.validate((valid) => {
if (valid) { if (valid) {
this.formData.extCustomerType_SDK = 101 this.formData.extCustomerType_SDK = 101
const ExtProductGroup_KUT = this.formData.extProductGroup_KUT.toString() let dataList=this.formData
const ExtProductGroup_SDK = this.formData.extProductGroup_SDK.toString() const ExtProductGroup_KUT = this.formData.extProductGroup_KUT
const ExtTotalAgent_KUT = this.formData.extTotalAgent_KUT.toString() const ExtProductGroup_SDK = this.formData.extProductGroup_SDK
const ExtTotalAgent_SDK = this.formData.extTotalAgent_SDK.toString() const ExtTotalAgent_KUT = this.formData.extTotalAgent_KUT
this.formData.extProductGroup_KUT = ExtProductGroup_KUT const ExtTotalAgent_SDK = this.formData.extTotalAgent_SDK
this.formData.extProductGroup_SDK = ExtProductGroup_SDK dataList.extProductGroup_KUT = ExtProductGroup_KUT.toString()
this.formData.extTotalAgent_KUT = ExtTotalAgent_KUT dataList.extProductGroup_SDK = ExtProductGroup_SDK.toString()
this.formData.extTotalAgent_SDK = ExtTotalAgent_SDK dataList.extTotalAgent_KUT = ExtTotalAgent_KUT.toString()
dataList.extTotalAgent_SDK = ExtTotalAgent_SDK .toString()
this.btnloading = true this.btnloading = true
this.$request(Customer.searchUrl, this.paramsToFormData(this.formData)).then((resp) => { this.$request(Customer.searchUrl, this.paramsToFormData(dataList)).then((resp) => {
this.btnloading = false this.btnloading = false
this.$message.success('提交成功!') this.$message.success('提交成功!')
this.isShow = false this.isShow = false
......
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