disable
This commit is contained in:
@@ -165,7 +165,7 @@
|
||||
</el-row>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible=false">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="submitAdd">确定</el-button>
|
||||
<el-button :disabled="addMaterial_disable" type="primary" size="small" @click="submitAdd">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -177,6 +177,7 @@ import request from '@/utils/request'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
addMaterial_disable: false,
|
||||
materialName: '',
|
||||
materialSpec: '',
|
||||
materialModel: '',
|
||||
@@ -319,6 +320,7 @@ export default {
|
||||
},
|
||||
// 新增物料货位数量
|
||||
addMaterial() {
|
||||
this.addMaterial_disable = false
|
||||
this.dialogVisible = true
|
||||
},
|
||||
// 选择物料
|
||||
@@ -327,6 +329,7 @@ export default {
|
||||
},
|
||||
// 确认新增物料货位数量
|
||||
submitAdd() {
|
||||
this.addMaterial_disable = true
|
||||
const param = {
|
||||
url: '',
|
||||
method: 'post',
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button type="primary" @click="submit('form')">确定</el-button>
|
||||
<el-button :disabled="ADD_disable" type="primary" @click="submit('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--货位表单-->
|
||||
@@ -242,6 +242,7 @@ import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
ADD_disable: false,
|
||||
Contactpeople: [], // 联系人
|
||||
count2: 0, // 清表单验证计数器
|
||||
tableData: [],
|
||||
@@ -372,10 +373,16 @@ export default {
|
||||
},
|
||||
// 点击增加仓库
|
||||
ADD() {
|
||||
this.form = []
|
||||
this.WarehouseNumber = ''
|
||||
this.WarehouseName = ''
|
||||
this.WarehouseDescription = ''
|
||||
this.Address = ''
|
||||
this.ContactpeopleValue = ''
|
||||
this.Note = ''
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.ADD_disable = false
|
||||
this.dialogFormVisible = true
|
||||
this.temp = 1
|
||||
},
|
||||
@@ -383,6 +390,7 @@ export default {
|
||||
submit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.ADD_disable = true
|
||||
if (this.temp === 1) {
|
||||
this.addTableData()
|
||||
this.form.WarehouseNumber = ''
|
||||
@@ -402,16 +410,9 @@ export default {
|
||||
// 执行增加仓库
|
||||
addTableData() {
|
||||
addWarehouse(this.form.WarehouseNumber, this.form.WarehouseName, this.form.WarehouseDescription, this.form.Address, this.form.ContactpeopleValue, this.form.Note).then(response => {
|
||||
console.log(this.form.WarehouseNumber, this.form.WarehouseName, this.form.WarehouseDescription, this.form.Address, this.form.ContactpeopleValue, this.form.Note)
|
||||
this.dialogFormVisible = false
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('添加成功')
|
||||
this.form.WarehouseNumber = ''
|
||||
this.form.WarehouseName = ''
|
||||
this.form.WarehouseDescription = ''
|
||||
this.form.Address = ''
|
||||
this.form.ContactpeopleValue = ''
|
||||
this.form.Note = ''
|
||||
} else {
|
||||
this.$message.error('添加失败')
|
||||
}
|
||||
@@ -432,6 +433,7 @@ export default {
|
||||
}
|
||||
this.form.Note = row.备注
|
||||
this.HouseNumber = row.仓库流水号
|
||||
this.ADD_disable = false
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
// 执行修改
|
||||
|
||||
@@ -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