付款资产

master
xy 1 year ago
parent 5b37b75e21
commit 6b53abe37b

@ -82,6 +82,32 @@
</div>
</div>
</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>
<div class="xy-table-item">
<div class="xy-table-item-label">备注
@ -114,9 +140,10 @@
</template>
<script>
import {
moneyFormatter
} from '@/utils'
import {
deepCopy,
moneyFormatter
} from '@/utils'
import {
editorContract
} from "@/api/contract/contract";
@ -130,9 +157,20 @@
import {
Message
} from "element-ui";
import {getparameter} from "@/api/system/dictionary";
export default {
data() {
return {
flowIds: [
{
flow_id: 14,
name: "供应品验收",
},
{
flow_id: 57,
name: "固定资产验收"
}
],
isShow: false,
id: '',
form: null,
@ -315,6 +353,24 @@
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: {
moneyFormat() {
@ -324,7 +380,7 @@
}
},
mounted() {
this.getAssetsFlowIds()
}
}
</script>

@ -192,6 +192,32 @@
</div>
</div>
</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 === '结算款'">
<div class="xy-table-item">
<div class="xy-table-item-label">
@ -273,11 +299,22 @@ import { getFundLog, addFundLog } from "@/api/paymentRegistration/fundLog";
import { getBudget } from "@/api/budget/budget";
import { detailContract, editorContract } from "@/api/contract/contract";
import { Message } from "element-ui";
import { parseTime } from "@/utils";
import {deepCopy, parseTime} from "@/utils";
import {getOatoken} from "@/api/oatoken";
export default {
data() {
return {
flowIds: [
{
flow_id: 14,
name: "供应品验收",
},
{
flow_id: 57,
name: "固定资产验收"
}
],
fileList: [],
action: process.env.VUE_APP_UPLOAD_API,
searchContent: "",
@ -321,6 +358,8 @@ export default {
//audit_money: "",
type: "",
isLast: false,
property: 0,
property_type_id: "",
plan: [],
remark: "",
files: []
@ -490,7 +529,9 @@ export default {
remark: this.paymentRegistrationForm.remark,
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) => {
//
@ -509,7 +550,7 @@ export default {
zongjia: this.contract?.money,
zhifucishu: this.contract?.sign_plan?.length || 0,
total: data.apply_money,
out_pay_id: res
out_pay_id: res,
});
this.isShowPaymentRegistration = false;
Message({
@ -522,7 +563,6 @@ export default {
this.$emit('refresh')
});
},
//
//
async getBudgets() {
@ -576,6 +616,25 @@ export default {
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: {
priceFormat() {
@ -608,6 +667,9 @@ export default {
mounted() {
this.getPlanTypes();
},
created() {
this.getAssetsFlowIds()
}
};
</script>

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

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

@ -68,7 +68,7 @@
<el-table-column
label="操作"
fixed="right"
width="220"
width="300"
header-align="center"
>
<template slot-scope="scope">
@ -120,6 +120,15 @@
>
支付审批
</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"
size="small"
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) {
let payments = [];
const actNumsTotal = () => {

@ -116,6 +116,32 @@
</div>
</div>
</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>
<div class="xy-table-item">
<div class="xy-table-item-label">
@ -219,14 +245,24 @@ import {
import {
Message
} from "element-ui";
import {
parseTime,
moneyFormatter
} from "@/utils";
import {
parseTime,
moneyFormatter, deepCopy
} from "@/utils";
export default {
data() {
return {
flowIds: [
{
flow_id: 14,
name: "供应品验收",
},
{
flow_id: 57,
name: "固定资产验收"
}
],
fileList: [],
planTotal: 0,
pageIndex: 1,
@ -267,6 +303,8 @@ import {
deductionMoney: "",
type: "",
//isLast:false,
property: 0,
property_type_id: "",
plan: [],
actMoney: '',
moneyWay: [], //
@ -540,7 +578,9 @@ import {
apply_money: this.paymentRegistrationForm.applyMoney,
discount_money: this.paymentRegistrationForm.deductionMoney,
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 => {
this.$emit('refresh')
this.isShow = false
@ -621,6 +661,24 @@ import {
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: {
moneyFormat() {
@ -642,6 +700,7 @@ import {
async mounted() {
//await this.getBudgets()
await this.getPlanTypes()
await this.getAssetsFlowIds()
}
}
</script>

Loading…
Cancel
Save