Browse Source

完善分公司间调车调账--重复提交

zhanglei
yunuo970428 2 years ago
parent
commit
1a36656584
  1. 44
      anrui-scm/anrui-scm-ui/src/views/supplychain/tiaozhangshenqingguanli/tiaozhangshenqingguanliAdd.vue
  2. 6
      anrui-scm/anrui-scm-ui/src/views/supplychain/tiaozhangshenqingguanli/tiaozhangshenqingguanliInfo.vue
  3. 47
      anrui-scm/anrui-scm-ui/src/views/workFlow/tiaozhangshenqingFlow/tiaozhangshenqingEdit.vue

44
anrui-scm/anrui-scm-ui/src/views/supplychain/tiaozhangshenqingguanli/tiaozhangshenqingguanliAdd.vue

@ -17,7 +17,7 @@
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="listconadd"><!-- -->
<div class="title">分公司间调账申请</div>
<div class="titwu">分公司间调账申请</div>
<el-form ref="dataForm" :model="temp" :rules="rules" :inline="true" label-width="120px" class="formadd">
<div class="invoiceadd" style="margin-top: 5px;">
<el-row>
@ -347,6 +347,7 @@ export default {
this.list = []
this.useOrg = ''
this.useOrgName = ''
this.submitdisabled = false
this.$refs['dataForm'].resetFields()
this.$emit('doback')
},
@ -355,15 +356,7 @@ export default {
this.$nextTick(() => {
this.$refs['dataForm'].clearValidate()
})
// this.temp.name = window.sessionStorage.getItem('name')
this.temp.createBySid = window.sessionStorage.getItem('userSid')
// req.detailsInfo(this.temp.sid).then(resp => {
// const data = resp.data
// this.temp.applicationCode = data.applicationCode
// this.temp.createTime = data.createTime
// }).catch(e => {
// this.submitdisabled = false
// })
this.dialogStatus = 'add'
this.viewTitle = '【新增】分公司间调账申请'
this.getPathSid()
@ -376,7 +369,7 @@ export default {
})
this.dialogStatus = 'edit'
this.viewTitle = '【编辑】分公司间调账申请'
fetchDetailsBySid(row.sid).then(resp => {
fetchDetailsBySid(row.sid).then((resp) => {
if (resp.success) {
const data = resp.data
this.temp = data
@ -385,8 +378,6 @@ export default {
this.temp.accSids = []
console.log('编辑初始化', this.temp)
}
}).catch(e => {
this.submitdisabled = false
})
this.getPathSid()
this.getType()
@ -400,8 +391,7 @@ export default {
this.list.forEach(element => {
this.temp.accSids.push(element.sid)
})
save(this.temp).then(resp => {
this.submitdisabled = false
save(this.temp).then((resp) => {
if (resp.success) {
if (resp.success) {
_this.handleReturn('true')
@ -423,26 +413,6 @@ export default {
}
})
},
// saveEdit() {
// const _this = this
// this.$refs['dataForm'].validate(valid => {
// if (valid) {
// this.submitdisabled = true
// req.save(this.temp).then(resp => {
// this.submitdisabled = false
// if (resp.success) {
// if (resp.success) {
// _this.handleReturn('true')
// }
// }
// }).catch(() => {
// this.submitdisabled = false
// })
// } else {
// return false
// }
// })
// },
handleSubmit() {
const _this = this
this.$refs['dataForm'].validate(valid => {
@ -458,8 +428,7 @@ export default {
}).then(() => {
this.submitdisabled = true
this.temp.detailsList = this.list
submitAccAdjApply(this.temp).then(resp => {
this.submitdisabled = false
submitAccAdjApply(this.temp).then((resp) => {
if (resp.success) {
if (resp.success) {
_this.handleReturn('true')
@ -487,9 +456,6 @@ export default {
</script>
<style scoped>
.title {
padding: 28px 0;
}
.formadd /deep/ .el-row {
border: 0;

6
anrui-scm/anrui-scm-ui/src/views/supplychain/tiaozhangshenqingguanli/tiaozhangshenqingguanliInfo.vue

@ -15,7 +15,7 @@
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="listconadd"><!-- -->
<div class="title">分公司间调账申请</div>
<div class="titwu">分公司间调账申请</div>
<el-form ref="dataForm" :model="temp" :rules="rules" :inline="true" label-width="120px" class="formadd">
<div class="invoiceadd" style="margin-top: 5px;">
<el-row>
@ -169,10 +169,6 @@ export default {
</script>
<style scoped>
.title {
padding: 28px 0;
}
.formadd /deep/ .el-row {
border: 0;
}

47
anrui-scm/anrui-scm-ui/src/views/workFlow/tiaozhangshenqingFlow/tiaozhangshenqingEdit.vue

@ -7,12 +7,7 @@
<div>编辑分公司间调账申请</div>
<!--start 添加修改按钮-->
<div>
<el-button
type="primary"
size="small"
:disabled="submitdisabled"
@click="handleCreate()"
>保存
<el-button type="primary" size="small" :disabled="submitdisabled" @click="handleCreate()">保存
</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="handleSubmit()">提交
</el-button>
@ -366,23 +361,20 @@ export default {
handleCreate() {
this.$refs['dataForm'].validate(valid => {
if (valid) {
this.submitdisabled = true
if (this.list.length > 0) {
this.submitdisabled = true
this.list.forEach(element => {
this.temp.accSids.push(element.sid)
})
save(this.temp).then(resp => {
this.submitdisabled = false
save(this.temp).then((resp) => {
if (resp.success) {
if (resp.success) {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
}).catch(() => {
this.submitdisabled = false
@ -414,18 +406,15 @@ export default {
})
this.submitdisabled = true
this.temp.detailsList = this.list
submitAccAdjApply(this.temp).then(resp => {
this.submitdisabled = false
submitAccAdjApply(this.temp).then((resp) => {
if (resp.success) {
if (resp.success) {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
}).catch(() => {
this.submitdisabled = false

Loading…
Cancel
Save