|
@@ -15,7 +15,7 @@
|
|
<el-form-item label="客户名称" prop="workClientInfo.name" :rules="[
|
|
<el-form-item label="客户名称" prop="workClientInfo.name" :rules="[
|
|
{required: true, message:'请输入客户名称', trigger:'blur'}
|
|
{required: true, message:'请输入客户名称', trigger:'blur'}
|
|
]">
|
|
]">
|
|
- <el-input v-model="inputForm.workClientInfo.name" placeholder="请输入客户名称"></el-input>
|
|
|
|
|
|
+ <el-input @blur="isExistByName" v-model="inputForm.workClientInfo.name" placeholder="请输入客户名称"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="2">
|
|
<el-col :span="2">
|
|
@@ -88,7 +88,7 @@
|
|
:rules="[
|
|
:rules="[
|
|
{required: true, message:'请输入统一社会信用代码', trigger:'blur'}
|
|
{required: true, message:'请输入统一社会信用代码', trigger:'blur'}
|
|
]">
|
|
]">
|
|
- <el-input v-model="inputForm.workClientInfo.uscCode" placeholder="请输入统一社会信用代码"></el-input>
|
|
|
|
|
|
+ <el-input @blur="isExistByUscCode" v-model="inputForm.workClientInfo.uscCode" placeholder="请输入统一社会信用代码"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
@@ -379,7 +379,7 @@
|
|
zIndex="9999"/>
|
|
zIndex="9999"/>
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button size="small" @click="close(),closeXTable()" icon="el-icon-circle-close">关闭</el-button>
|
|
<el-button size="small" @click="close(),closeXTable()" icon="el-icon-circle-close">关闭</el-button>
|
|
- <el-button size="small" type="primary" v-if="method != 'view'" @click="doSubmit()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
|
|
|
|
|
|
+ <el-button size="small" type="primary" v-if="method != 'view'" @click="doSubmit()" icon="el-icon-circle-check" v-noMoreClick :disabled="isSubmit">确定</el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
@@ -406,6 +406,7 @@
|
|
dataListNew: [],
|
|
dataListNew: [],
|
|
title: '',
|
|
title: '',
|
|
method: '',
|
|
method: '',
|
|
|
|
+ isSubmit: false,
|
|
visible: false,
|
|
visible: false,
|
|
loading: false,
|
|
loading: false,
|
|
returnForm: {
|
|
returnForm: {
|
|
@@ -535,6 +536,30 @@
|
|
setTimeout(() => { this.progressFlag = false }, 1000) // 一秒后关闭进度条
|
|
setTimeout(() => { this.progressFlag = false }, 1000) // 一秒后关闭进度条
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ isExistByName () {
|
|
|
|
+ let value = this.inputForm.workClientInfo.name
|
|
|
|
+ if (value !== null && value !== undefined && value !== '') {
|
|
|
|
+ this.workClientService.isExist(value).then((data) => {
|
|
|
|
+ console.log('data',data.data)
|
|
|
|
+ if (data.data !== 0) {
|
|
|
|
+ this.$message.error('该客户名称已存在')
|
|
|
|
+ this.isSubmit = true
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ isExistByUscCode () {
|
|
|
|
+ let value = this.inputForm.workClientInfo.uscCode
|
|
|
|
+ if (value !== null && value !== undefined && value !== '') {
|
|
|
|
+ this.workClientService.isExist(value).then((data) => {
|
|
|
|
+ console.log('data',data.data)
|
|
|
|
+ if (data.data !== 0) {
|
|
|
|
+ this.$message.error('该统一社会信用代码已存在')
|
|
|
|
+ this.isSubmit = true
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
async toHref (row) {
|
|
async toHref (row) {
|
|
const link = document.createElement('a')
|
|
const link = document.createElement('a')
|
|
if (row.id === null || row.id === undefined || row.id === '') {
|
|
if (row.id === null || row.id === undefined || row.id === '') {
|