预算重置

master
xy 2 years ago
parent ad05dec9b4
commit 87f490bee9

@ -60,3 +60,12 @@ export function updateStatus(params,noloading = true){
noloading 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) { 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', url: '/api/admin/parameter/show',
method: 'get', method: 'get',
params: param params: param

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

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

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

Loading…
Cancel
Save