采购部采购禁用
This commit is contained in:
@@ -80,7 +80,7 @@
|
||||
<el-tooltip :open-delay="100" effect="dark" content="开启物料变更" placement="top">
|
||||
<el-switch v-model="switchValue" active-color="#13ce66" inactive-color="#ff4949" style="margin-left: 30px"/>
|
||||
</el-tooltip>
|
||||
<el-button type="primary" size="small" plain style="float: right;margin-right: 20px" @click="tiaozheng1">调整采购任务</el-button>
|
||||
<el-button :disabled="tiaozheng1_disable" type="primary" size="small" plain style="float: right;margin-right: 20px" @click="tiaozheng1">调整采购任务</el-button>
|
||||
<el-select v-model="PersonValue" style="width:100px;float: right;" placeholder="人员" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in Person"
|
||||
@@ -969,6 +969,7 @@
|
||||
<el-button size="small" icon="el-icon-circle-close" @click="dialogVisible2=false">取消</el-button>
|
||||
<el-button
|
||||
v-show="title2==='创建询价单'"
|
||||
:disabled="createInquirySheet_disable"
|
||||
type="distribution"
|
||||
size="small"
|
||||
icon="el-icon-circle-check"
|
||||
@@ -1125,6 +1126,8 @@ export default {
|
||||
name: '', // 创建询价单
|
||||
data() {
|
||||
return {
|
||||
tiaozheng1_disable: false,
|
||||
createInquirySheet_disable: false,
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
loading: false,
|
||||
@@ -1424,10 +1427,12 @@ export default {
|
||||
tiaozheng1() {
|
||||
if (this.标准件和外购件流水号.length !== 0) {
|
||||
if (this.PersonValue) {
|
||||
this.tiaozheng1_disable = true
|
||||
tiaozheng1(this.PersonValue, this.标准件和外购件流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('调整成功')
|
||||
this.searchTable11()
|
||||
this.tiaozheng1_disable = false
|
||||
} else {
|
||||
this.$message.warning('调整失败')
|
||||
}
|
||||
@@ -1989,6 +1994,7 @@ export default {
|
||||
submitCreateInquirySheet() { // 提交创建询价单
|
||||
this.$refs['form2'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.createInquirySheet_disable = true
|
||||
const numGroup1 = [] // 空数组,放现有的询价单号
|
||||
searchCreateInquirySheet2().then(response => { // 先查询判断是否存在
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
@@ -1996,6 +2002,7 @@ export default {
|
||||
}
|
||||
}).then(() => {
|
||||
if (numGroup1.indexOf(this.form2.inquirySheetNum) !== -1) {
|
||||
this.createInquirySheet_disable = false
|
||||
this.$message.error('该询价单号已存在')
|
||||
} else {
|
||||
createInquirySheet(this.form2.inquirySheetNum, this.id, this.form2.supplierValue, '').then(response => {
|
||||
@@ -2006,6 +2013,7 @@ export default {
|
||||
this.supplierValue = ''
|
||||
this.dialogVisible2 = false
|
||||
this.searchTable2()
|
||||
this.createInquirySheet_disable = false
|
||||
} else { this.$message.error('操作失败') }
|
||||
})
|
||||
}
|
||||
@@ -2019,6 +2027,7 @@ export default {
|
||||
submitCreateInquirySheet1() { // 提交创建询价单
|
||||
this.$refs['form2'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.createInquirySheet_disable = true
|
||||
createInquirySheet(this.form2.inquirySheetNum, this.id, this.form2.supplierNameValue, '').then(response => {
|
||||
if (!(response.data)) {
|
||||
this.$message.success('创建成功')
|
||||
@@ -2029,7 +2038,11 @@ export default {
|
||||
this.dialogVisible2 = false
|
||||
this.inquirySheetNum = this.form2.inquirySheetNum
|
||||
this.searchTable2(this.inquirySheetNum)
|
||||
} else { this.$message.error('操作失败!该询价单已存在,请重新输入') }
|
||||
this.createInquirySheet_disable = false
|
||||
} else {
|
||||
this.$message.error('操作失败!该询价单已存在,请重新输入')
|
||||
this.createInquirySheet_disable = false
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -2084,6 +2097,7 @@ export default {
|
||||
submitEditInquirySheet() { // 提交编辑询价单
|
||||
this.$refs['form2'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.createInquirySheet_disable = true
|
||||
const numGroup1 = [] // 空数组,放现有的询价单号
|
||||
const numGroup2 = [] // 空数组,放现有的询价单流水号
|
||||
searchCreateInquirySheet2().then(response => { // 先查询判断是否存在
|
||||
@@ -2094,6 +2108,7 @@ export default {
|
||||
}).then(() => {
|
||||
if (numGroup1.indexOf(this.form2.inquirySheetNum) !== -1 && numGroup1.indexOf(this.form2.inquirySheetNum) !== numGroup2.indexOf(parseInt(this.form2.inquirySheetNumValue))) {
|
||||
this.$message.error('该询价单号已存在')
|
||||
this.createInquirySheet_disable = false
|
||||
} else {
|
||||
editInquirySheet(this.form2.inquirySheetNumValue, this.form2.inquirySheetNum, this.form2.supplierNameValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
@@ -2103,7 +2118,11 @@ export default {
|
||||
this.supplierValue = ''
|
||||
this.dialogVisible2 = false
|
||||
this.searchTable2()
|
||||
} else { this.$message.error('修改失败') }
|
||||
this.createInquirySheet_disable = false
|
||||
} else {
|
||||
this.$message.error('修改失败')
|
||||
this.createInquirySheet_disable = false
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user