|
@@ -36,8 +36,8 @@
|
|
|
:disabled="disabled"
|
|
|
type="date"
|
|
|
placeholder="请选择应收账款起始日"
|
|
|
- @change="getEndDate"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
+ @change="getEndDate"
|
|
|
>
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
@@ -84,7 +84,7 @@
|
|
|
incomeExpenditurePlanList: ruleForm.incomeExpenditurePlanList || [],
|
|
|
planIrrStr: ruleForm.planIrrStr
|
|
|
}"
|
|
|
- :disabled="disabled"
|
|
|
+ :disabled="disabled"
|
|
|
@getTrrData="getTrrData"
|
|
|
>
|
|
|
</revenue-expenditure-plan>
|
|
@@ -103,7 +103,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { getLimitExpenditureDatails, getExpenditurePlan, getTrr, reviewQuotaDisburseSubmit } from '@/api/financingManage'
|
|
|
-import { parseTime } from "@/utils";
|
|
|
+import { parseTime } from '@/utils'
|
|
|
export default {
|
|
|
components: {
|
|
|
FinancingInfo: () => import('./components/FinancingInfo'),
|
|
@@ -199,7 +199,7 @@ export default {
|
|
|
const { startDate, term } = this.ruleForm
|
|
|
if (startDate && term) {
|
|
|
const endDateGetTime = new Date(`${startDate} 00:00:00`).getTime() + (3600 * 1000 * 24 * term)
|
|
|
- this.ruleForm.endDate = parseTime(endDateGetTime)
|
|
|
+ this.ruleForm.endDate = parseTime(endDateGetTime)
|
|
|
}
|
|
|
},
|
|
|
async automaticGeneration() {
|
|
@@ -223,18 +223,18 @@ export default {
|
|
|
// const { id } = this.$route.params
|
|
|
const { taskId } = this.$route.query
|
|
|
var params = {
|
|
|
- Loading: true,
|
|
|
+ Loading: true
|
|
|
}
|
|
|
if (this.ruleForm.approvalConclusion === 'pass') {
|
|
|
- if(type === 'submit') {
|
|
|
+ if (type === 'submit') {
|
|
|
const { startDate, endDate } = this.ruleForm
|
|
|
- if(!startDate) {
|
|
|
+ if (!startDate) {
|
|
|
this.$message.warning('请选择应收账款起始日')
|
|
|
- return
|
|
|
+ return
|
|
|
}
|
|
|
- if(!endDate) {
|
|
|
+ if (!endDate) {
|
|
|
this.$message.warning('请选择应收账款结束日')
|
|
|
- return
|
|
|
+ return
|
|
|
}
|
|
|
}
|
|
|
const financingInfo = await this.$refs.financingInfo.getParams(type)
|
|
@@ -254,11 +254,11 @@ export default {
|
|
|
...assignment,
|
|
|
taskId
|
|
|
}
|
|
|
- if(!assignment.reviewTransferReceivable.confirm) {
|
|
|
+ if (!assignment.reviewTransferReceivable.confirm) {
|
|
|
params.reviewBasicContractList = []
|
|
|
}
|
|
|
- }else {
|
|
|
- const { approvalConclusion, approvalComments,financingBasicInfoId, id } = this.ruleForm
|
|
|
+ } else {
|
|
|
+ const { approvalConclusion, approvalComments, financingBasicInfoId, id } = this.ruleForm
|
|
|
params = {
|
|
|
...params,
|
|
|
approvalConclusion,
|
|
@@ -271,30 +271,30 @@ export default {
|
|
|
return params
|
|
|
},
|
|
|
async submit(type) {
|
|
|
-
|
|
|
- if(type === 'temp') {
|
|
|
- let data = await this.getParams(type)
|
|
|
+ if (type === 'temp') {
|
|
|
+ const data = await this.getParams(type)
|
|
|
data.visible = type !== 'temp'
|
|
|
reviewQuotaDisburseSubmit(data).then(() => {
|
|
|
this.$message.warning('暂存成功')
|
|
|
this.$router.go(-1)
|
|
|
})
|
|
|
- }else {
|
|
|
- this.$refs.ruleForm.validate(async (valid) => {
|
|
|
- if(valid) {
|
|
|
- let data = await this.getParams(type)
|
|
|
+ } else {
|
|
|
+ await this.automaticGeneration()
|
|
|
+ this.$refs.ruleForm.validate(async(valid) => {
|
|
|
+ if (valid) {
|
|
|
+ const data = await this.getParams(type)
|
|
|
data.visible = type !== 'temp'
|
|
|
- reviewQuotaDisburseSubmit(data).then(() => {
|
|
|
- this.$message.warning('提交成功')
|
|
|
- this.$router.go(-1)
|
|
|
- })
|
|
|
- }else {
|
|
|
+ setTimeout(() => {
|
|
|
+ reviewQuotaDisburseSubmit(data).then(() => {
|
|
|
+ this.$message.warning('提交成功')
|
|
|
+ this.$router.go(-1)
|
|
|
+ })
|
|
|
+ }, 500)
|
|
|
+ } else {
|
|
|
return false
|
|
|
}
|
|
|
-
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
}
|