|
|
|
|
@ -192,14 +192,32 @@
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item prop="meeting_flow_id" label="资金上会流程">
|
|
|
|
|
<el-select v-model="form.meeting_flow_id" style="width: 100%">
|
|
|
|
|
<el-form-item
|
|
|
|
|
prop="meeting_flow_id"
|
|
|
|
|
:label="'资金上会流程' + (isMeetingFlowRequired ? ' *' : '')"
|
|
|
|
|
>
|
|
|
|
|
<!-- 调试信息 -->
|
|
|
|
|
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="form.meeting_flow_id"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
:disabled="isMeetingFlowDisabled"
|
|
|
|
|
placeholder="请选择资金上会流程"
|
|
|
|
|
filterable
|
|
|
|
|
clearable
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in shList"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:value="item.id"
|
|
|
|
|
:label="item.title"
|
|
|
|
|
></el-option>
|
|
|
|
|
:label="item.data.yiti+'-'+item.title"
|
|
|
|
|
>
|
|
|
|
|
<span style="float: left">{{ item.data.yiti }}-{{ item.title }}</span>
|
|
|
|
|
<span
|
|
|
|
|
style="float: right; color: #8492a6; font-size: 13px; cursor: pointer;"
|
|
|
|
|
@click.stop="viewOaFlow('other', item.id)"
|
|
|
|
|
>查看</span>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<template v-if="!isLedger">
|
|
|
|
|
@ -457,7 +475,6 @@
|
|
|
|
|
<el-form-item
|
|
|
|
|
prop="total_money"
|
|
|
|
|
label="项目金额(元)"
|
|
|
|
|
v-if="!isWeixiu"
|
|
|
|
|
>
|
|
|
|
|
<InputNumber
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
@ -477,7 +494,6 @@
|
|
|
|
|
<el-form-item
|
|
|
|
|
prop="plan_price"
|
|
|
|
|
label="本年预算金额(元)"
|
|
|
|
|
v-if="!isWeixiu"
|
|
|
|
|
>
|
|
|
|
|
<InputNumber
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
@ -496,7 +512,6 @@
|
|
|
|
|
<el-form-item
|
|
|
|
|
prop="next_year_money"
|
|
|
|
|
label="次年预算金额(元)"
|
|
|
|
|
v-if="!isWeixiu"
|
|
|
|
|
>
|
|
|
|
|
<InputNumber
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
@ -680,14 +695,32 @@
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item prop="meeting_flow_id" label="资金上会流程">
|
|
|
|
|
<el-select v-model="form.meeting_flow_id" style="width: 100%">
|
|
|
|
|
<el-form-item
|
|
|
|
|
prop="meeting_flow_id"
|
|
|
|
|
:label="'资金上会流程' + (isMeetingFlowRequired ? ' *' : '')"
|
|
|
|
|
>
|
|
|
|
|
<!-- 调试信息 -->
|
|
|
|
|
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="form.meeting_flow_id"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
:disabled="isMeetingFlowDisabled"
|
|
|
|
|
placeholder="请选择资金上会流程"
|
|
|
|
|
filterable
|
|
|
|
|
clearable
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in shList"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:value="item.id"
|
|
|
|
|
:label="item.title"
|
|
|
|
|
></el-option>
|
|
|
|
|
:label="item.data.yiti+'-'+item.title"
|
|
|
|
|
>
|
|
|
|
|
<span style="float: left">{{ item.data.yiti }}-{{ item.title }}</span>
|
|
|
|
|
<span
|
|
|
|
|
style="float: right; color: #8492a6; font-size: 13px; cursor: pointer;"
|
|
|
|
|
@click.stop="viewOaFlow('other', item.id)"
|
|
|
|
|
>查看</span>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item prop="apply_user_id" label="申购人">
|
|
|
|
|
@ -1227,6 +1260,22 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<otherPlan ref="otherPlan" @getPlan="getSelectionPlan"></otherPlan>
|
|
|
|
|
|
|
|
|
|
<!-- OA流程Modal -->
|
|
|
|
|
<Modal
|
|
|
|
|
v-model="isShowOaModal"
|
|
|
|
|
:width="86"
|
|
|
|
|
class-name="oa-modal"
|
|
|
|
|
title="流程办理"
|
|
|
|
|
fullscreen
|
|
|
|
|
:mask-closable="false"
|
|
|
|
|
footer-hide
|
|
|
|
|
>
|
|
|
|
|
<div style="width: 100%;height: 100%;">
|
|
|
|
|
<iframe style="width: 100%;height: 100%;border-radius: 0 0 6px 6px;" :src="oaUrl" frameborder="0" />
|
|
|
|
|
</div>
|
|
|
|
|
</Modal>
|
|
|
|
|
|
|
|
|
|
<!-- <span>请选择类型</span>
|
|
|
|
|
<span slot="footer" class="dialog-footer" style="display: flex;justify-content: flex-end;">
|
|
|
|
|
<el-button @click="step = 2,myPurchaseType = 2,isWeixiu=false,form.is_common_purchase = 1,form.flow_mod_id = 99,showTypes = false,showEdit=true">一般采购</el-button>
|
|
|
|
|
@ -1254,6 +1303,7 @@ import {getShList} from "@/api/oatoken"
|
|
|
|
|
import { getInfo } from "@/api/me.js";
|
|
|
|
|
import { listdeptNoAuth } from "@/api/system/department";
|
|
|
|
|
import { deepCopy } from "@/utils";
|
|
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
|
|
|
|
|
|
|
import listAll from "@/views/contract/contractList.vue";
|
|
|
|
|
import otherPlan from "@/components/PlanPicker/otherPlan.vue";
|
|
|
|
|
@ -1353,6 +1403,9 @@ export default {
|
|
|
|
|
isShowPlan: false,
|
|
|
|
|
detail: {},
|
|
|
|
|
plan: [],
|
|
|
|
|
// OA流程相关
|
|
|
|
|
oaUrl: '',
|
|
|
|
|
isShowOaModal: false,
|
|
|
|
|
options: [
|
|
|
|
|
{
|
|
|
|
|
value: 1,
|
|
|
|
|
@ -1538,6 +1591,26 @@ export default {
|
|
|
|
|
trigger: "change",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
meeting_flow_id: [
|
|
|
|
|
{
|
|
|
|
|
validator: (rule, value, callback) => {
|
|
|
|
|
// 如果是一般采购,则不是必选
|
|
|
|
|
if (this.form.is_common_purchase) {
|
|
|
|
|
callback()
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
// 如果合同金额大于等于10万,则必选
|
|
|
|
|
if (this.form.total_money && Number(this.form.total_money) >= 100000) {
|
|
|
|
|
if (!value) {
|
|
|
|
|
callback(new Error('资金上会流程为必选项'))
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
callback()
|
|
|
|
|
},
|
|
|
|
|
trigger: "change",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
plans: [],
|
|
|
|
|
planSelect: {
|
|
|
|
|
@ -1672,15 +1745,23 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
// 查看OA流程
|
|
|
|
|
viewOaFlow(flowId) {
|
|
|
|
|
// 调用本地的toOaDetail方法
|
|
|
|
|
let url = `${process.env.VUE_APP_OUT_URL}/#/flow/detail?auth_token=${window.encodeURIComponent(getToken())}&isSinglePage=1&flow_id=${flowId}`
|
|
|
|
|
|
|
|
|
|
this.oaUrl = url
|
|
|
|
|
this.isShowOaModal = true
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 获取上会列表
|
|
|
|
|
async getSh(){
|
|
|
|
|
const res = await getShList({
|
|
|
|
|
page:1,
|
|
|
|
|
page_size:999,
|
|
|
|
|
custom_model_id:103,
|
|
|
|
|
field_id:1225,
|
|
|
|
|
operator:'eq',
|
|
|
|
|
field_keyword:'采购事项'
|
|
|
|
|
sort_name:'created_at',
|
|
|
|
|
sort_type:'DESC'
|
|
|
|
|
})
|
|
|
|
|
this.shList = res.data.data
|
|
|
|
|
},
|
|
|
|
|
@ -1962,6 +2043,15 @@ export default {
|
|
|
|
|
//submit
|
|
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
// 验证资金上会流程
|
|
|
|
|
if (this.isMeetingFlowRequired && !this.form.meeting_flow_id) {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'warning',
|
|
|
|
|
message: '资金上会流程为必选项'
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.btnLoading = true;
|
|
|
|
|
if (!this.form.use_framework_buy) {
|
|
|
|
|
this.form.contract_to_contracts = [];
|
|
|
|
|
@ -2226,6 +2316,37 @@ export default {
|
|
|
|
|
let temp = this.form.contract_to_contracts;
|
|
|
|
|
return this.$refs["contractToContractsTable"]?.getSelection() || [];
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 资金上会流程是否必选
|
|
|
|
|
isMeetingFlowRequired() {
|
|
|
|
|
console.log("isMeetingFlowRequired triggered:", {
|
|
|
|
|
is_common_purchase: this.form.is_common_purchase,
|
|
|
|
|
total_money: this.form.total_money,
|
|
|
|
|
result: !this.form.is_common_purchase && this.form.total_money && Number(this.form.total_money) >= 100000
|
|
|
|
|
})
|
|
|
|
|
return !this.form.is_common_purchase && this.form.total_money && Number(this.form.total_money) >= 100000
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 资金上会流程是否禁用
|
|
|
|
|
isMeetingFlowDisabled() {
|
|
|
|
|
console.log("isMeetingFlowDisabled triggered:", {
|
|
|
|
|
is_common_purchase: this.form.is_common_purchase,
|
|
|
|
|
total_money: this.form.total_money,
|
|
|
|
|
is_common_purchase_result: this.form.is_common_purchase,
|
|
|
|
|
amount_check: this.form.total_money && Number(this.form.total_money) < 100000
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 如果是一般采购,则不禁用
|
|
|
|
|
if (this.form.is_common_purchase) {
|
|
|
|
|
console.log("is_common_purchase is true, returning false")
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 如果不是一般采购,且金额小于10万,则禁用
|
|
|
|
|
const result = this.form.total_money && Number(this.form.total_money) < 100000
|
|
|
|
|
console.log("Final result:", result)
|
|
|
|
|
return result
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.window.width = screen.availWidth * 0.95;
|
|
|
|
|
|