付款资产

master
xy 2 years ago
parent 5b37b75e21
commit 6b53abe37b

@ -82,6 +82,32 @@
</div> </div>
</div> </div>
</template> </template>
<template v-slot:property>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>是否为资产
</div>
<div class="xy-table-item-content">
<el-switch v-model="form.property" :active-value="1" :inactive-value="0"/>
</div>
</div>
</template>
<template v-slot:property_type_id v-if="form.property">
<div class="xy-table-item">
<div class="xy-table-item-label" >
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>资产类型
</div>
<div class="xy-table-item-content">
<el-select v-model="form.property_type_id" style="width: 150px">
<el-option v-for="item in flowIds" :key="item.id" :value="item.id" :label="item.name"></el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:remark> <template v-slot:remark>
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label">备注 <div class="xy-table-item-label">备注
@ -114,9 +140,10 @@
</template> </template>
<script> <script>
import { import {
moneyFormatter deepCopy,
} from '@/utils' moneyFormatter
} from '@/utils'
import { import {
editorContract editorContract
} from "@/api/contract/contract"; } from "@/api/contract/contract";
@ -130,9 +157,20 @@
import { import {
Message Message
} from "element-ui"; } from "element-ui";
import {getparameter} from "@/api/system/dictionary";
export default { export default {
data() { data() {
return { return {
flowIds: [
{
flow_id: 14,
name: "供应品验收",
},
{
flow_id: 57,
name: "固定资产验收"
}
],
isShow: false, isShow: false,
id: '', id: '',
form: null, form: null,
@ -315,6 +353,24 @@
this.form.plan_link = [] this.form.plan_link = []
} }
}, },
async getAssetsFlowIds () {
let copy = deepCopy(this.flowIds)
const res = await getparameter({
number: "asset_flow_ids"
})
try {
this.flowIds = res?.detail?.map(i => {
let data = JSON.parse(i.remark)
return {
id: i.id,
name: i.value,
...data
}
})
} catch (e) {
this.flowIds = copy
}
}
}, },
computed: { computed: {
moneyFormat() { moneyFormat() {
@ -324,7 +380,7 @@
} }
}, },
mounted() { mounted() {
this.getAssetsFlowIds()
} }
} }
</script> </script>

@ -192,6 +192,32 @@
</div> </div>
</div> </div>
</template> </template>
<template v-slot:property>
<div class="xy-table-item">
<div class="xy-table-item-label" style="width: 200px">
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>是否为资产
</div>
<div class="xy-table-item-content">
<el-switch v-model="paymentRegistrationForm.property" :active-value="1" :inactive-value="0"/>
</div>
</div>
</template>
<template v-slot:property_type_id v-if="paymentRegistrationForm.property">
<div class="xy-table-item">
<div class="xy-table-item-label" style="width: 200px">
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>资产类型
</div>
<div class="xy-table-item-content">
<el-select v-model="paymentRegistrationForm.property_type_id" style="width: 150px">
<el-option v-for="item in flowIds" :key="item.id" :value="item.id" :label="item.name"></el-option>
</el-select>
</div>
</div>
</template>
<template #files v-if="paymentRegistrationForm.type === '结算款'"> <template #files v-if="paymentRegistrationForm.type === '结算款'">
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">
@ -273,11 +299,22 @@ import { getFundLog, addFundLog } from "@/api/paymentRegistration/fundLog";
import { getBudget } from "@/api/budget/budget"; import { getBudget } from "@/api/budget/budget";
import { detailContract, editorContract } from "@/api/contract/contract"; import { detailContract, editorContract } from "@/api/contract/contract";
import { Message } from "element-ui"; import { Message } from "element-ui";
import { parseTime } from "@/utils"; import {deepCopy, parseTime} from "@/utils";
import {getOatoken} from "@/api/oatoken";
export default { export default {
data() { data() {
return { return {
flowIds: [
{
flow_id: 14,
name: "供应品验收",
},
{
flow_id: 57,
name: "固定资产验收"
}
],
fileList: [], fileList: [],
action: process.env.VUE_APP_UPLOAD_API, action: process.env.VUE_APP_UPLOAD_API,
searchContent: "", searchContent: "",
@ -321,6 +358,8 @@ export default {
//audit_money: "", //audit_money: "",
type: "", type: "",
isLast: false, isLast: false,
property: 0,
property_type_id: "",
plan: [], plan: [],
remark: "", remark: "",
files: [] files: []
@ -490,7 +529,9 @@ export default {
remark: this.paymentRegistrationForm.remark, remark: this.paymentRegistrationForm.remark,
audit_money: '', audit_money: '',
//audit_money: this.paymentRegistrationForm.audit_money, //audit_money: this.paymentRegistrationForm.audit_money,
files:this.fileList? this.fileList.map(i => i?.response?.id):[] files:this.fileList? this.fileList.map(i => i?.response?.id):[],
property: this.paymentRegistrationForm.property,
property_type_id: this.paymentRegistrationForm.property_type_id,
}; };
addFundLog(data).then((res) => { addFundLog(data).then((res) => {
// //
@ -509,7 +550,7 @@ export default {
zongjia: this.contract?.money, zongjia: this.contract?.money,
zhifucishu: this.contract?.sign_plan?.length || 0, zhifucishu: this.contract?.sign_plan?.length || 0,
total: data.apply_money, total: data.apply_money,
out_pay_id: res out_pay_id: res,
}); });
this.isShowPaymentRegistration = false; this.isShowPaymentRegistration = false;
Message({ Message({
@ -522,7 +563,6 @@ export default {
this.$emit('refresh') this.$emit('refresh')
}); });
}, },
// //
// //
async getBudgets() { async getBudgets() {
@ -576,6 +616,25 @@ export default {
this.$refs["planTable"].clearSelection(); this.$refs["planTable"].clearSelection();
} }
}, },
async getAssetsFlowIds () {
let copy = deepCopy(this.flowIds)
const res = await getparameter({
number: "asset_flow_ids"
})
try {
this.flowIds = res?.detail?.map(i => {
let data = JSON.parse(i.remark)
return {
id: i.id,
name: i.value,
...data
}
})
} catch (e) {
this.flowIds = copy
}
}
}, },
computed: { computed: {
priceFormat() { priceFormat() {
@ -608,6 +667,9 @@ export default {
mounted() { mounted() {
this.getPlanTypes(); this.getPlanTypes();
}, },
created() {
this.getAssetsFlowIds()
}
}; };
</script> </script>

@ -175,7 +175,7 @@
</el-form-item> </el-form-item>
<template v-if="!isLedger"> <template v-if="!isLedger">
<el-form-item prop="is_contract" label="是否需要签订合同"> <el-form-item v-if="!isOtherFlow" prop="is_contract" label="是否需要签订合同">
<el-switch <el-switch
v-model="form.is_contract" v-model="form.is_contract"
active-text="是" active-text="是"
@ -185,7 +185,7 @@
/> />
</el-form-item> </el-form-item>
<el-form-item prop="is_simple" label="是否为直接支付"> <el-form-item v-if="!isOtherFlow" prop="is_simple" label="是否为直接支付">
<el-switch <el-switch
v-model="form.is_simple" v-model="form.is_simple"
active-text="是" active-text="是"
@ -196,7 +196,7 @@
<span style="flex: 1; text-align: right">无需采购流程如水电邮寄费等</span> <span style="flex: 1; text-align: right">无需采购流程如水电邮寄费等</span>
</el-form-item> </el-form-item>
<el-form-item prop="is_trade" label="是否为工会项目"> <el-form-item v-if="!isOtherFlow" prop="is_trade" label="是否为工会项目">
<el-switch <el-switch
v-model="form.is_trade" v-model="form.is_trade"
active-text="是" active-text="是"
@ -341,6 +341,7 @@
</template> </template>
<el-form-item <el-form-item
v-if="!isOtherFlow"
prop="use_framework_buy" prop="use_framework_buy"
label="是否使用框架协议采购内容" label="是否使用框架协议采购内容"
> >
@ -353,6 +354,7 @@
/> />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
v-if="!isOtherFlow"
prop="is_framework" prop="is_framework"
label="是否新生成框架协议" label="是否新生成框架协议"
v-show="isShowIsFramework" v-show="isShowIsFramework"
@ -866,12 +868,12 @@ export default {
{ {
id: 5, id: 5,
name: "办公用品采购", name: "办公用品采购",
type: 1 // type: 2 //
}, },
{ {
id: 12, id: 12,
name: "物资购置", name: "物资购置",
type: 1 type: 2
}, },
{ {
id: 19, id: 19,
@ -1387,7 +1389,6 @@ export default {
}catch (e) { }catch (e) {
this.flowIds = copy this.flowIds = copy
} }
console.log(this.flowIds)
}, },
getDepartment() { getDepartment() {
@ -1473,6 +1474,7 @@ export default {
this.form.contract_plan_links = [] this.form.contract_plan_links = []
} }
this.form.is_purchase = this.flowIds.find(i => i.id == this.form.flow_mod_id)?.type == 2 ? 1 : 0; this.form.is_purchase = this.flowIds.find(i => i.id == this.form.flow_mod_id)?.type == 2 ? 1 : 0;
this.form.is_contract = this.flowIds.find(i => i.id == this.form.flow_mod_id)?.type == 2 ? 0 : 1;
if (this.type === 'add') { if (this.type === 'add') {
addContrant(this.form,true).then(res => { addContrant(this.form,true).then(res => {
this.btnLoading = false this.btnLoading = false
@ -1657,6 +1659,10 @@ export default {
} }
}, },
computed: { computed: {
isOtherFlow () {
return this.flowIds.find(i => i.id === this.form.flow_mod_id)?.type == 1;
},
isNeedMore () { isNeedMore () {
// //
return this.flowIds.find(i => i.id === this.form.flow_mod_id)?.name === "政府采购流转" || this.flowIds.find(i => i.id === this.form.flow_mod_id)?.name === "政府小额采购" return this.flowIds.find(i => i.id === this.form.flow_mod_id)?.name === "政府采购流转" || this.flowIds.find(i => i.id === this.form.flow_mod_id)?.name === "政府小额采购"

@ -2489,7 +2489,6 @@ export default {
}catch (e) { }catch (e) {
this.flowIds = copy this.flowIds = copy
} }
console.log(this.flowIds)
}, },
// //
async getMoneyWay() { async getMoneyWay() {
@ -2890,7 +2889,6 @@ export default {
} }
item.FLOWSTATUS = flowStatus item.FLOWSTATUS = flowStatus
console.log(flowStatus)
} }
}, },
computed: { computed: {

@ -68,7 +68,7 @@
<el-table-column <el-table-column
label="操作" label="操作"
fixed="right" fixed="right"
width="220" width="300"
header-align="center" header-align="center"
> >
<template slot-scope="scope"> <template slot-scope="scope">
@ -120,6 +120,15 @@
> >
支付审批 支付审批
</Button> </Button>
<Button
v-if="scope.row.property && scope.row.property_type_id"
size="small"
type="primary"
style="margin-left: 10px; margin-bottom: 4px"
@click="toOutAsset(scope.row)"
>
资产申请
</Button>
<Button v-if="scope.row.flow_id" <Button v-if="scope.row.flow_id"
size="small" size="small"
type="primary" type="primary"
@ -308,6 +317,19 @@ export default {
) )
}, },
async toOutAsset (row) {
try {
let flow_id = JSON.parse(row.property_type_detail.remark).flow_id;
let url = `${process.env.VUE_APP_OUT_OLD}/flow/create/${flow_id}?auth_token=${this.$store.getters.oa_token}`;
window.open(
url,
"signProcess",
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
);
} catch (e) {
}
},
async toOutPay(row) { async toOutPay(row) {
let payments = []; let payments = [];
const actNumsTotal = () => { const actNumsTotal = () => {

@ -116,6 +116,32 @@
</div> </div>
</div> </div>
</template> </template>
<template v-slot:property>
<div class="xy-table-item">
<div class="xy-table-item-label" style="width: 200px">
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>是否为资产
</div>
<div class="xy-table-item-content">
<el-switch v-model="paymentRegistrationForm.property" :active-value="1" :inactive-value="0"/>
</div>
</div>
</template>
<template v-slot:property_type_id v-if="paymentRegistrationForm.property">
<div class="xy-table-item">
<div class="xy-table-item-label" style="width: 200px">
<span style="color: red; font-weight: 600; padding-right: 4px"
>*</span
>资产类型
</div>
<div class="xy-table-item-content">
<el-select v-model="paymentRegistrationForm.property_type_id" style="width: 150px">
<el-option v-for="item in flowIds" :key="item.id" :value="item.id" :label="item.name"></el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:actMoney> <template v-slot:actMoney>
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">
@ -219,14 +245,24 @@ import {
import { import {
Message Message
} from "element-ui"; } from "element-ui";
import { import {
parseTime, parseTime,
moneyFormatter moneyFormatter, deepCopy
} from "@/utils"; } from "@/utils";
export default { export default {
data() { data() {
return { return {
flowIds: [
{
flow_id: 14,
name: "供应品验收",
},
{
flow_id: 57,
name: "固定资产验收"
}
],
fileList: [], fileList: [],
planTotal: 0, planTotal: 0,
pageIndex: 1, pageIndex: 1,
@ -267,6 +303,8 @@ import {
deductionMoney: "", deductionMoney: "",
type: "", type: "",
//isLast:false, //isLast:false,
property: 0,
property_type_id: "",
plan: [], plan: [],
actMoney: '', actMoney: '',
moneyWay: [], // moneyWay: [], //
@ -540,7 +578,9 @@ import {
apply_money: this.paymentRegistrationForm.applyMoney, apply_money: this.paymentRegistrationForm.applyMoney,
discount_money: this.paymentRegistrationForm.deductionMoney, discount_money: this.paymentRegistrationForm.deductionMoney,
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,
property: this.paymentRegistrationForm.property,
property_type_id: this.paymentRegistrationForm.property_type_id,
}).then(res => { }).then(res => {
this.$emit('refresh') this.$emit('refresh')
this.isShow = false this.isShow = false
@ -621,6 +661,24 @@ import {
this.$refs.planTable.clearSelection() this.$refs.planTable.clearSelection()
} }
}, },
async getAssetsFlowIds () {
let copy = deepCopy(this.flowIds)
const res = await getparameter({
number: "asset_flow_ids"
})
try {
this.flowIds = res?.detail?.map(i => {
let data = JSON.parse(i.remark)
return {
id: i.id,
name: i.value,
...data
}
})
} catch (e) {
this.flowIds = copy
}
}
}, },
computed: { computed: {
moneyFormat() { moneyFormat() {
@ -642,6 +700,7 @@ import {
async mounted() { async mounted() {
//await this.getBudgets() //await this.getBudgets()
await this.getPlanTypes() await this.getPlanTypes()
await this.getAssetsFlowIds()
} }
} }
</script> </script>

Loading…
Cancel
Save