'更新营销中心按钮禁用'

This commit is contained in:
2020-04-08 11:31:42 +08:00
parent 0d0e0dcb6f
commit 46f9db9c1c
7 changed files with 44 additions and 8 deletions

View File

@@ -336,7 +336,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="投标人" prop="投标人"> <el-form-item label="投标人" prop="投标人">
<el-input v-model="form2.投标人" size="small" placeholder="请输入投标人" style="width: 200px;" clearable readonly @dblclick.native="dialogFormVisiblePeople = true;flag2 = 2;searchPer()" @clear="clear()"/> <el-input v-model="form2.投标人" size="small" placeholder="请选择投标人" style="width: 200px;" clearable readonly @dblclick.native="dialogFormVisiblePeople = true;flag2 = 2;searchPer()" @clear="clear()"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@@ -377,7 +377,7 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button size="small" icon="el-icon-circle-close" @click="callOff('form2')">取消</el-button> <el-button size="small" icon="el-icon-circle-close" @click="callOff('form2')">取消</el-button>
<el-button type="distribution" size="small" icon="el-icon-circle-check" @click="submit('form2')"> </el-button> <el-button :disabled="submitDisabled" type="distribution" size="small" icon="el-icon-circle-check" @click="submit('form2')"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@@ -490,6 +490,7 @@ export default {
} }
} }
return { return {
submitDisabled: false,
dateRange: '', dateRange: '',
check1: '', check1: '',
pickerOptions: { pickerOptions: {
@@ -814,11 +815,13 @@ export default {
} else { } else {
this.$message.error('信息更新失败') this.$message.error('信息更新失败')
} }
this.submitDisabled = false
}) })
}, },
submit(formName) { submit(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
this.submitDisabled = true
if (this.flag1 === 1) { if (this.flag1 === 1) {
this.submitTakeBack() this.submitTakeBack()
this.flag1 = null this.flag1 = null
@@ -859,6 +862,7 @@ export default {
this.addForm('form2') this.addForm('form2')
this.title = '新增投标保证金' this.title = '新增投标保证金'
this.dialogFormVisible2 = true this.dialogFormVisible2 = true
this.submitDisabled = false
}, },
addTableData1() { addTableData1() {
addBidBond(this.form2.招标企业, this.form2.联系人, this.form2.联系电话, this.form2.保证金金额, this.peopleid, this.form2.保证金类型, this.form2.投标日期, this.form2.备注, this.form2.提前X天提醒我).then(response => { addBidBond(this.form2.招标企业, this.form2.联系人, this.form2.联系电话, this.form2.保证金金额, this.peopleid, this.form2.保证金类型, this.form2.投标日期, this.form2.备注, this.form2.提前X天提醒我).then(response => {
@@ -870,11 +874,13 @@ export default {
} else { } else {
this.$message.error('添加失败,请检查金额于提醒天数是否为数字') this.$message.error('添加失败,请检查金额于提醒天数是否为数字')
} }
this.submitDisabled = false
}) })
}, },
editBidBond(row) { editBidBond(row) {
this.editForm(row, 'form2') this.editForm(row, 'form2')
this.title = '编辑投标保证金' this.title = '编辑投标保证金'
this.submitDisabled = false
this.dialogFormVisible2 = true this.dialogFormVisible2 = true
this.form2.招标企业 = row.招标企业 this.form2.招标企业 = row.招标企业
this.form2.联系人 = row.联系人 this.form2.联系人 = row.联系人
@@ -900,6 +906,7 @@ export default {
} else { } else {
this.$message.error('编辑失败') this.$message.error('编辑失败')
} }
this.submitDisabled = false
}) })
}, },
delBidBond(row) { delBidBond(row) {

View File

@@ -341,7 +341,7 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button size="small" icon="el-icon-circle-close" @click="callOff2('form')">取消</el-button> <el-button size="small" icon="el-icon-circle-close" @click="callOff2('form')">取消</el-button>
<el-button type="distribution" size="small" icon="el-icon-circle-check" @click="submit2('form2')"> </el-button> <el-button :disabled="addCustomerDisabled" type="distribution" size="small" icon="el-icon-circle-check" @click="submit2('form2')"> </el-button>
<!--<el-button @click="callOff2()">取消</el-button>--> <!--<el-button @click="callOff2()">取消</el-button>-->
<!--<el-button type="primary" @click="submit2('form2')"> </el-button>--> <!--<el-button type="primary" @click="submit2('form2')"> </el-button>-->
</div> </div>
@@ -358,6 +358,7 @@ export default {
}, },
data() { data() {
return { return {
addCustomerDisabled: false,
dialogVisible: false, dialogVisible: false,
treeData: [7], treeData: [7],
a: '', // 营销经理地区流水号 a: '', // 营销经理地区流水号
@@ -618,6 +619,7 @@ export default {
if (this.AdressID === '' || this.AdressID === null) { if (this.AdressID === '' || this.AdressID === null) {
this.$message.warning('请选择一个省份') this.$message.warning('请选择一个省份')
} else { } else {
this.addCustomerDisabled = false
this.dialogFormVisible2 = true this.dialogFormVisible2 = true
this.title2 = '新增客户' this.title2 = '新增客户'
} }
@@ -629,6 +631,7 @@ export default {
this.dialogFormVisible2 = false this.dialogFormVisible2 = false
}, },
handleEdit(row) { handleEdit(row) {
this.addCustomerDisabled = false
this.dialogFormVisible2 = true this.dialogFormVisible2 = true
this.title2 = '编辑客户' this.title2 = '编辑客户'
this.form2.省份 = row.省份 this.form2.省份 = row.省份
@@ -646,6 +649,7 @@ export default {
this.form2.开户行 = row.开户行 this.form2.开户行 = row.开户行
}, },
submit2() { submit2() {
this.addCustomerDisabled = true
function a() { function a() {
this.dialogFormVisible2 = false this.dialogFormVisible2 = false
this.getTable(selectCustomer, [this.AdressID, this.pageCurrent, this.pageSize], ['tableData2', 'total', 'loading2']) this.getTable(selectCustomer, [this.AdressID, this.pageCurrent, this.pageSize], ['tableData2', 'total', 'loading2'])

View File

@@ -119,7 +119,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="66"> <el-table-column label="操作" align="center" width="66">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="mini" icon="el-icon-circle-plus-outline" @click.stop="addMoney(scope.row)">收款</el-button> <el-button :disabled="addMoneyDisabled" type="text" size="mini" icon="el-icon-circle-plus-outline" @click.stop="addMoney(scope.row)">收款</el-button>
</template> </template>
</el-table-column> </el-table-column>
<!--<el-table-column label="操作" align="center" width="60" fixed="right">--> <!--<el-table-column label="操作" align="center" width="60" fixed="right">-->
@@ -221,6 +221,7 @@ export default {
}, },
data() { data() {
return { return {
addMoneyDisabled: false,
dateRange: '', dateRange: '',
check1: '', check1: '',
pickerOptions: { pickerOptions: {
@@ -466,6 +467,7 @@ export default {
}) })
}, },
addMoney(row) { addMoney(row) {
this.addMoneyDisabled = true
this.maxnomoney = Number(row.未收金额) this.maxnomoney = Number(row.未收金额)
this.tableData2 = [] this.tableData2 = []
this.moneyID = row.资金id this.moneyID = row.资金id
@@ -486,6 +488,7 @@ export default {
} else { } else {
this.$message.error('收款失败') this.$message.error('收款失败')
} }
this.addMoneyDisabled = false
}) })
}, },
cancelEdit(index, row) { cancelEdit(index, row) {

View File

@@ -1172,8 +1172,8 @@ export default {
this.dialogFormVisible2 = false this.dialogFormVisible2 = false
}, },
submitMachine() { submitMachine() {
this.submitMachineDisabled = true
function a() { function a() {
this.submitMachineDisabled = true
selectMachine(this.projectNum).then(response => { selectMachine(this.projectNum).then(response => {
this.tableData2 = response.data this.tableData2 = response.data
this.submitMachineDisabled = false this.submitMachineDisabled = false

View File

@@ -311,7 +311,7 @@
<!--<el-button @click="dialogFormVisible1 = false">取消</el-button>--> <!--<el-button @click="dialogFormVisible1 = false">取消</el-button>-->
<!--<el-button type="primary" @click="submit('form')"> </el-button>--> <!--<el-button type="primary" @click="submit('form')"> </el-button>-->
<el-button size="small" icon="el-icon-circle-close" @click="dialogFormVisible1 = false">取消</el-button> <el-button size="small" icon="el-icon-circle-close" @click="dialogFormVisible1 = false">取消</el-button>
<el-button type="distribution" size="small" icon="el-icon-circle-check" @click="submit('form')"> </el-button> <el-button :disabled="submitDisable" type="distribution" size="small" icon="el-icon-circle-check" @click="submit('form')"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<!--客户选择--> <!--客户选择-->
@@ -397,6 +397,7 @@ export default {
} }
} }
return { return {
submitDisable: false,
dateRange: '', dateRange: '',
check1: '', check1: '',
pickerOptions: { pickerOptions: {
@@ -724,6 +725,7 @@ export default {
this.$message.error('请先选择合同') this.$message.error('请先选择合同')
} else { } else {
console.log(this.row1) console.log(this.row1)
this.submitDisable = false
this.projectid = this.row1.项目流水号 this.projectid = this.row1.项目流水号
this.timetime = this.row1.合同签订日期 this.timetime = this.row1.合同签订日期
this.changeTime() this.changeTime()
@@ -782,6 +784,7 @@ export default {
submit(formName) { submit(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
this.submitDisable = true
if (this.flag === 1) { if (this.flag === 1) {
this.addSubmit() this.addSubmit()
} else if (this.flag === 2) { } else if (this.flag === 2) {
@@ -826,6 +829,7 @@ export default {
this.form.开票时间 = row.开票时间 this.form.开票时间 = row.开票时间
this.form.备注 = row.备注 this.form.备注 = row.备注
this.invoiceRecordingCode = row.开票记录流水号 this.invoiceRecordingCode = row.开票记录流水号
this.submitDisable = false
}, },
editSubmit() { editSubmit() {
editSubmit(this.CustomerCode, this.form.开票金额, this.form.开票时间, this.form.备注, this.invoiceRecordingCode).then(response => { editSubmit(this.CustomerCode, this.form.开票金额, this.form.开票时间, this.form.备注, this.invoiceRecordingCode).then(response => {

View File

@@ -370,7 +370,7 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button size="small" icon="el-icon-circle-close" @click="callOffPerformanceBondDialog('form2')">取消</el-button> <el-button size="small" icon="el-icon-circle-close" @click="callOffPerformanceBondDialog('form2')">取消</el-button>
<el-button type="distribution" size="small" icon="el-icon-circle-check" @click="submitPerformanceBondDialog('form2')"> </el-button> <el-button :disabled="submitPerformanceBondDisabled" type="distribution" size="small" icon="el-icon-circle-check" @click="submitPerformanceBondDialog('form2')"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@@ -395,6 +395,7 @@ export default {
} }
} }
return { return {
submitPerformanceBondDisabled: false,
dateRange: '', dateRange: '',
check1: '', check1: '',
pickerOptions: { pickerOptions: {
@@ -726,6 +727,7 @@ export default {
openPerformanceBondDialog(row) { openPerformanceBondDialog(row) {
this.addForm('form2') this.addForm('form2')
this.title1 = '新增履约保证金' this.title1 = '新增履约保证金'
this.submitPerformanceBondDisabled = false
this.dialogFormVisible1 = true this.dialogFormVisible1 = true
this.projectId = row.项目流水号 this.projectId = row.项目流水号
this.tableData2 = [] this.tableData2 = []
@@ -741,6 +743,7 @@ export default {
submitPerformanceBondDialog(formName) { submitPerformanceBondDialog(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
this.submitPerformanceBondDisabled = true
if (this.flag === 1) { if (this.flag === 1) {
addPerformanceBond(this.projectId, this.form2.保证金金额, this.form2.保证金类型, this.form2.收回条件, this.form2.截止时间, this.form2.timer).then(response => { addPerformanceBond(this.projectId, this.form2.保证金金额, this.form2.保证金类型, this.form2.收回条件, this.form2.截止时间, this.form2.timer).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
@@ -786,6 +789,7 @@ export default {
} else { } else {
this.$message.error('操作失败') this.$message.error('操作失败')
} }
this.submitPerformanceBondDisabled = false
}) })
} else if (this.flag === 2) { } else if (this.flag === 2) {
editPerformanceBond(this.projectId, this.form2.保证金金额, this.form2.保证金类型, this.form2.收回条件, this.form2.截止时间, this.performanceBondCode, this.form2.timer).then(response => { editPerformanceBond(this.projectId, this.form2.保证金金额, this.form2.保证金类型, this.form2.收回条件, this.form2.截止时间, this.performanceBondCode, this.form2.timer).then(response => {
@@ -831,12 +835,14 @@ export default {
} else { } else {
this.$message.error('操作失败') this.$message.error('操作失败')
} }
this.submitPerformanceBondDisabled = false
}) })
} }
} }
}) })
}, },
openEditPerformanceBondDialog(row) { openEditPerformanceBondDialog(row) {
this.submitPerformanceBondDisabled = false
this.dialogFormVisible1 = true this.dialogFormVisible1 = true
this.performanceBondCode = row.履约保证金流水号 this.performanceBondCode = row.履约保证金流水号
this.form2.保证金金额 = row.履约保证金总额 this.form2.保证金金额 = row.履约保证金总额

View File

@@ -435,7 +435,7 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button size="small" icon="el-icon-circle-close" @click="callOff('form')">取消</el-button> <el-button size="small" icon="el-icon-circle-close" @click="callOff('form')">取消</el-button>
<el-button type="distribution" size="small" icon="el-icon-circle-check" @click="submit1('form')"> </el-button> <el-button :disabled="submit1Disabled" type="distribution" size="small" icon="el-icon-circle-check" @click="submit1('form')"> </el-button>
<!--<el-button @click="callOff('form')">取消</el-button>--> <!--<el-button @click="callOff('form')">取消</el-button>-->
<!--<el-button type="primary" @click="submit1('form')"> </el-button>--> <!--<el-button type="primary" @click="submit1('form')"> </el-button>-->
</div> </div>
@@ -656,6 +656,7 @@ export default {
} }
} }
return { return {
submit1Disabled: false,
dateRange: '', dateRange: '',
check1: '', check1: '',
pickerOptions: { pickerOptions: {
@@ -950,6 +951,7 @@ export default {
this.projectName = row.项目名称 this.projectName = row.项目名称
this.getTable(searchTable2, [this.PageCurrent2, this.PageSize2, this.code], ['tableData2', 'total2', 'tableData2Loading']) this.getTable(searchTable2, [this.PageCurrent2, this.PageSize2, this.code], ['tableData2', 'total2', 'tableData2Loading'])
this.dialogFormVisible5 = true this.dialogFormVisible5 = true
this.submit1Disabled = false
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.PageCurrent = 1 this.PageCurrent = 1
@@ -974,6 +976,7 @@ export default {
this.fetchTableData2() this.fetchTableData2()
}, },
addSafetyMargin(row) { addSafetyMargin(row) {
this.submit1Disabled = false
this.title = '新增安全保证金' this.title = '新增安全保证金'
this.timetime = row.合同签订日期 this.timetime = row.合同签订日期
this.changeTime() this.changeTime()
@@ -982,6 +985,7 @@ export default {
this.addForm('form') this.addForm('form')
}, },
editSafetyMargin(row) { editSafetyMargin(row) {
this.submit1Disabled = false
this.editForm(row, 'form') this.editForm(row, 'form')
this.title = '编辑安全保证金' this.title = '编辑安全保证金'
this.dialogFormVisible1 = true this.dialogFormVisible1 = true
@@ -1005,6 +1009,7 @@ export default {
} else { } else {
this.$message.error('添加失败') this.$message.error('添加失败')
} }
this.submit1Disabled = false
}) })
}, },
editTableData1() { editTableData1() {
@@ -1018,12 +1023,14 @@ export default {
} else { } else {
this.$message.error('信息更新失败') this.$message.error('信息更新失败')
} }
this.submit1Disabled = false
}) })
}, },
// 提交保证金信息添加或者修改 // 提交保证金信息添加或者修改
submit1(formName) { submit1(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
this.submit1Disabled = true
if (this.flag1 === 1) { if (this.flag1 === 1) {
this.addTableData1() this.addTableData1()
this.flag1 = null this.flag1 = null
@@ -1081,6 +1088,7 @@ export default {
console.log(row) console.log(row)
this.changeTime1() this.changeTime1()
this.dialogFormVisible2 = true this.dialogFormVisible2 = true
this.submit1Disabled = false
this.code = row.安全保证金流水号 this.code = row.安全保证金流水号
this.projectName = row.项目名称 this.projectName = row.项目名称
this.maxMoney = parseFloat(row.应收回金额) this.maxMoney = parseFloat(row.应收回金额)
@@ -1099,11 +1107,13 @@ export default {
} else { } else {
this.$message.error('扣款失败') this.$message.error('扣款失败')
} }
this.submit1Disabled = false
}) })
}, },
editWithdrawing(row) { editWithdrawing(row) {
this.editForm(row, 'form3') this.editForm(row, 'form3')
this.dialogFormVisible3 = true this.dialogFormVisible3 = true
this.submit1Disabled = false
this.maxMoney1 = parseFloat(this.SurplusAmount) + parseFloat(row.扣款金额) this.maxMoney1 = parseFloat(this.SurplusAmount) + parseFloat(row.扣款金额)
this.form3.扣款金额 = row.扣款金额 this.form3.扣款金额 = row.扣款金额
this.form3.被扣款人 = row.被扣款人 this.form3.被扣款人 = row.被扣款人
@@ -1132,6 +1142,7 @@ export default {
this.form4.剩余金额 = parseFloat(row.应收回金额) this.form4.剩余金额 = parseFloat(row.应收回金额)
this.dialogFormVisible4 = true this.dialogFormVisible4 = true
this.form4.回收金额 = 0 this.form4.回收金额 = 0
this.submit1Disabled = false
}, },
submitTakeBack() { submitTakeBack() {
TakeBack(this.code, this.form4.收回日期, this.form4.回收金额).then(response => { TakeBack(this.code, this.form4.收回日期, this.form4.回收金额).then(response => {
@@ -1143,6 +1154,7 @@ export default {
} else { } else {
this.$message.error('信息更新失败') this.$message.error('信息更新失败')
} }
this.submit1Disabled = false
}) })
} }
} }