Browse Source

完善入库--重复提交

master
yunuo970428 2 years ago
parent
commit
64abc06137
  1. 46
      anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangAdd.vue
  2. 73
      anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangEdit.vue

46
anrui-scm/anrui-scm-ui/src/views/ruzhang/ruzhangguanli/ruzhangAdd.vue

@ -5,7 +5,7 @@
<div>{{ viewTitle }}</div>
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveEdit()">保存</el-button>
<el-button type="primary" size="small" @click="submitVehicleApply()">提交</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submitVehicleApply()">提交</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
@ -743,7 +743,6 @@ export default {
if (valid) {
this.submitdisabled = true
req.saveOrUpdate(this.formobj).then((resp) => {
this.submitdisabled = false
if (resp.success) {
this.$message({ showClose: true, type: 'success', message: '保存成功' })
this.handleReturn('true')
@ -812,28 +811,42 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
req.submitVehicleApply(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '提交成功'
this.$refs['form_obj'].validate(valid => {
if (valid) {
this.submitdisabled = true
req.submitVehicleApply(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '提交成功'
})
this.handleReturn('true')
}
}).catch(() => {
this.submitdisabled = false
})
this.handleReturn('true')
}
})
}).catch(() => {
hint = 0
})
} else {
req.submitVehicleApply(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '提交成功'
this.$refs['form_obj'].validate(valid => {
if (valid) {
this.submitdisabled = true
req.submitVehicleApply(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '提交成功'
})
this.handleReturn('true')
}
}).catch(() => {
this.submitdisabled = false
})
this.handleReturn('true')
}
})
}
@ -843,6 +856,7 @@ export default {
if (isreload === 'true') this.$emit('reloadlist')
this.$refs['form_obj'].resetFields()
this.imgList = []
this.submitdisabled = false
this.$emit('doback')
}
}

73
anrui-scm/anrui-scm-ui/src/views/workFlow/ruzhangguanliFlow/ruzhangguanli/ruzhangEdit.vue

@ -5,7 +5,7 @@
<div>{{ viewTitle }}</div>
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveEdit()">保存</el-button>
<el-button type="primary" size="small" @click="submitVehicleApply()">提交</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submitVehicleApply()">提交</el-button>
</div>
</div>
<div class="">
@ -757,7 +757,6 @@ export default {
if (valid) {
this.submitdisabled = true
req.saveOrUpdate(this.formobj).then((resp) => {
this.submitdisabled = false
/* this.$message({
showClose: true,
type: 'success',
@ -838,42 +837,56 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
req.submitVehicleApply(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '提交成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
this.$refs['form_obj'].validate(valid => {
if (valid) {
this.submitdisabled = true
req.submitVehicleApply(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '提交成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
}, '*')
}).catch(() => {
this.submitdisabled = false
})
}
})
}).catch(() => {
hint = 0
})
} else {
req.submitVehicleApply(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '提交成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
this.$refs['form_obj'].validate(valid => {
if (valid) {
this.submitdisabled = true
req.submitVehicleApply(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '提交成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
}, '*')
}).catch(() => {
this.submitdisabled = false
})
}
})
}

Loading…
Cancel
Save