disable
This commit is contained in:
@@ -301,11 +301,7 @@
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitGroup">转为成组采购</el-button>
|
||||
<el-button :disabled="submitGroup_disable" type="primary" size="small" icon="el-icon-check" @click="submitGroup">转为成组采购</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -318,6 +314,7 @@ export default {
|
||||
inject: ['reload'],
|
||||
data() {
|
||||
return {
|
||||
submitGroup_disable: false,
|
||||
submitDisable: true, // 不点击表格中的行不让确定
|
||||
AdvanceCharge: '',
|
||||
loading: false,
|
||||
@@ -463,6 +460,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
linkGroup() {
|
||||
this.submitGroup_disable = false
|
||||
this.dialogVisible2 = true
|
||||
},
|
||||
filterNuber(val, index, date, row) {
|
||||
@@ -507,6 +505,7 @@ export default {
|
||||
this.calculateContractSum()
|
||||
},
|
||||
submitGroup() {
|
||||
this.submitGroup_disable = true
|
||||
submitGroup(this.contractNumValue, this.form3.groupNumValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.contractNumType = 1
|
||||
|
||||
@@ -268,8 +268,8 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible1 = false">取消</el-button>
|
||||
<el-button v-if="title1 === '创建到票结算申请单'" size="small" type="primary" @click="submitAdd1()">确定</el-button>
|
||||
<el-button v-else size="small" type="primary" @click="submitEdit()">确定</el-button>
|
||||
<el-button v-if="title1 === '创建到票结算申请单'" :disabled="createOrder_disable" size="small" type="primary" @click="submitAdd1()">确定</el-button>
|
||||
<el-button v-else :disabled="submitEdit_disable" size="small" type="primary" @click="submitEdit()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
@@ -391,6 +391,8 @@ export default {
|
||||
name: '', // 发票结算申请
|
||||
data() {
|
||||
return {
|
||||
createOrder_disable: false,
|
||||
submitEdit_disable: false,
|
||||
disabled: false,
|
||||
contractType: '采购合同',
|
||||
invoiceNum: '',
|
||||
@@ -476,6 +478,7 @@ export default {
|
||||
this.form1.isCost = ''
|
||||
this.form1.remark = ''
|
||||
this.title1 = '创建到票结算申请单'
|
||||
this.createOrder_disable = false
|
||||
this.dialogVisible1 = true
|
||||
},
|
||||
searchTable1() {
|
||||
@@ -494,9 +497,11 @@ export default {
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
submitAdd1() { // 提交新增
|
||||
// 提交新增
|
||||
submitAdd1() {
|
||||
this.$refs['form1'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.createOrder_disable = true
|
||||
insertInto(this.form1.invoiceNum, this.form1.money, this.form1.supplierValue, this.form1.paid, this.form1.unpaid, this.form1.tax, this.form1.isCost, this.form1.remark).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
@@ -514,6 +519,7 @@ export default {
|
||||
submitEdit() { // 提交编辑
|
||||
this.$refs['form1'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitEdit_disable = true
|
||||
submitEdit(this.form1.invoiceNum, this.form1.money, this.form1.paid, this.form1.unpaid, this.form1.tax, this.form1.isCost, this.form1.remark, this.form1.applyOrderNum).then(response => {
|
||||
if (response.data[0].result === '修改成功') {
|
||||
this.$message.success('编辑成功')
|
||||
@@ -521,7 +527,11 @@ export default {
|
||||
this.searchTable1()
|
||||
} else if (response.data[0].result === '修改失败') {
|
||||
this.$message.error('已提交申请,编辑失败')
|
||||
} else { this.$message.error('编辑失败') }
|
||||
this.submitEdit_disable = false
|
||||
} else {
|
||||
this.$message.error('编辑失败')
|
||||
this.submitEdit_disable = false
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
@@ -542,6 +552,7 @@ export default {
|
||||
this.form1.remark = row.备注
|
||||
this.form1.applyOrderNum = row.发票结算申请单流水号
|
||||
this.title1 = '编辑到票结算申请单'
|
||||
this.submitEdit_disable = false
|
||||
this.dialogVisible1 = true
|
||||
},
|
||||
handleDelete(row) {
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span>合计:<el-input v-model="SUM" readonly size="mini" style="width: 120px; margin: 10px 10px 0 10px"/>元</span>
|
||||
<el-button type="primary" size="small" style="float:right;margin: 10px" icon="el-icon-check" @click="submitRequestFund">确定请款</el-button>
|
||||
<el-button :disabled="requestFund_disabe" type="primary" size="small" style="float:right;margin: 10px" icon="el-icon-check" @click="submitRequestFund">确定请款</el-button>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@@ -195,6 +195,7 @@ import { timeToStamp, numSubtract } from '@/utils/tool'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
requestFund_disabe: false,
|
||||
selectContents: [],
|
||||
getDate: null,
|
||||
tableData0: [],
|
||||
@@ -316,11 +317,13 @@ export default {
|
||||
this.totalDebt = this.totalSum - this.totalPay
|
||||
})
|
||||
},
|
||||
requestFund() { // 请款
|
||||
this.dialogVisible2 = true
|
||||
// 请款
|
||||
requestFund() {
|
||||
this.supplierValue = ''
|
||||
this.fetchData() // 重新获取供应商
|
||||
this.tableData01 = []
|
||||
this.requestFund_disabe = false
|
||||
this.dialogVisible2 = true
|
||||
},
|
||||
searchTable01() { // 查询待请款
|
||||
if (this.supplierValue) {
|
||||
@@ -359,6 +362,7 @@ export default {
|
||||
},
|
||||
submitRequestFund() { // 确认请款
|
||||
if (this.supplierValue && this.contractGroup.length !== 0) {
|
||||
this.requestFund_disabe = true
|
||||
this.SUM = 0
|
||||
this.contractGroup = []
|
||||
this.sumGroup = []
|
||||
@@ -372,6 +376,7 @@ export default {
|
||||
}
|
||||
}
|
||||
if (this.SUM === 0) {
|
||||
this.requestFund_disabe = false
|
||||
this.$message.error('请款金额不能为0')
|
||||
} else {
|
||||
submitRequestFund(this.contractGroup, this.sumGroup, this.supplierValue, this.SUM, this.id).then(response => {
|
||||
|
||||
Reference in New Issue
Block a user