预算重置

master
xy 2 years ago
parent ad05dec9b4
commit 87f490bee9

@ -60,3 +60,12 @@ export function updateStatus(params,noloading = true){
noloading
})
}
export function resetMoney (params) {
return request({
method: "get",
url: "/api/admin/contract/reset-amount",
params,
noloading: true
})
}

@ -16,7 +16,16 @@ export function store(data) {
})
}
export function getparameter(param) {
return request({
let myrequest = request;
myrequest.interceptors.response.use(response => {
if (response.detail instanceof Array) {
response.detail = response.detail.filter(item => item.status)
}
return response
},err => {
return Promise.reject(err)
})
return myrequest({
url: '/api/admin/parameter/show',
method: 'get',
params: param

@ -231,7 +231,8 @@
} from "@/api/contractSign/contractSign";
import {
detailContract,
editorContract
editorContract,
resetMoney,
} from "@/api/contract/contract";
import {
Message
@ -450,8 +451,6 @@
},
//
sign() {
console.log(this.signList)
console.log(this.signList.length)
if (this.signList.length == 0) {
Message({
type: 'error',
@ -478,12 +477,18 @@
assurance_expire:this.form.assurance_expire,
contract_links:this.form.contract_links,
}).then(res => {
resetMoney({
id: this.contractId,
money: this.form.money
})
this.isShow = false
Message({
type: 'success',
message: '操作成功'
})
this.$emit('signSuccess')
})
},

@ -297,6 +297,7 @@
>
<template slot-scope="scope">
<div class="slot-btns">
<Button v-if="$store.state.user.min_allow_level === 0" class="slot-btns-item" size="small" type="primary" @click="resetMoney(scope.row)"></Button>
<template v-if="scope.row.FLOWSTATUS['zhifu'].isEnabled() && !/contractLedger/g.test($route.path)">
<template v-if="scope.row.is_assurance === 1">
<!-- 如果是 履约文件-->
@ -1152,7 +1153,8 @@ import {
delContract,
checkContractName,
updateStatus,
detailContract
detailContract,
resetMoney
} from "@/api/contract/contract";
import { getparameter } from "@/api/system/dictionary";
import { listdeptNoAuth } from "@/api/system/department";
@ -2069,6 +2071,14 @@ export default {
};
},
methods: {
resetMoney (row) {
resetMoney({
id: row.id,
money: row.money
}).then(res => {
this.$message.success('重置金额成功')
})
},
showIsFramework () {
this.$nextTick(() => {
if (this.$refs['methodInput'].selected.label === '直接发包' && this.form.use_framework_buy) {

@ -243,7 +243,7 @@ import {
getBudget
} from "@/api/budget/budget";
import {
detailContract
detailContract, resetMoney
} from "@/api/contract/contract";
import {
Message
@ -554,7 +554,6 @@ import { listdeptNoAuth } from '@/api/system/department'
this.paymentRegistrationForm.plan.forEach(item => {
total += Number(item.use_money)
})
console.log(Number(this.paymentRegistrationForm.actMoney).toFixed(2), total.toFixed(2))
// if (Number(this.paymentRegistrationForm.actMoney).toFixed(2) !== total.toFixed(2)) {
// Message({
// type: 'warning',
@ -580,6 +579,10 @@ import { listdeptNoAuth } from '@/api/system/department'
money_way_id: this.paymentRegistrationForm.moneyWay.toString(),
contract_plan_act_links: this.paymentRegistrationForm.plan
}).then(res => {
resetMoney({
id: this.contract.id,
money: this.contract.money
})
this.$emit('refresh')
this.isShow = false
Message({

Loading…
Cancel
Save