|
|
|
|
@ -38,55 +38,52 @@
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="合同编号" prop="contract_no">
|
|
|
|
|
<el-input v-model="form.contract_no" />
|
|
|
|
|
<el-input v-model="form.contract_no_without_prefix">
|
|
|
|
|
<template slot="prepend">CZHT</template>
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="合同名称">
|
|
|
|
|
<el-form-item label="合同名称" prop="title">
|
|
|
|
|
<el-input v-model="form.title" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-form-item label="合同主要内容">
|
|
|
|
|
<el-form-item label="合同主要内容" prop="main_content">
|
|
|
|
|
<el-input v-model="form.main_content" type="textarea" :rows="3" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="甲方">
|
|
|
|
|
<el-form-item label="甲方" prop="party_a">
|
|
|
|
|
<el-input v-model="form.party_a" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="乙方">
|
|
|
|
|
<el-form-item label="乙方" prop="party_b">
|
|
|
|
|
<el-input v-model="form.party_b" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="合同金额(元)">
|
|
|
|
|
<el-form-item label="合同金额(元)" prop="amount_total">
|
|
|
|
|
<el-input-number
|
|
|
|
|
v-model="form.amount_total"
|
|
|
|
|
:min="0"
|
|
|
|
|
:precision="2"
|
|
|
|
|
:controls="form.amount_type !== 'open'"
|
|
|
|
|
:readonly="form.amount_type === 'open'"
|
|
|
|
|
@keydown="handleAmountInputKeydown"
|
|
|
|
|
@focus="handleAmountInputFocus"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
:class="{ 'readonly-amount': form.amount_type === 'open' }"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="项目预算金额(元)">
|
|
|
|
|
<el-form-item label="项目预算金额(元)" prop="budget_amount">
|
|
|
|
|
<el-input-number v-model="form.budget_amount" :min="0" :precision="2" style="width: 100%" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="金额类型">
|
|
|
|
|
<el-form-item label="金额类型" prop="amount_type">
|
|
|
|
|
<el-select v-model="form.amount_type" placeholder="请选择金额类型" style="width: 100%">
|
|
|
|
|
<el-option label="闭口合同(金额确定)" value="fixed" />
|
|
|
|
|
<el-option label="框架协议/开口合同(金额不确定)" value="open" />
|
|
|
|
|
@ -94,23 +91,26 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12" v-if="form.amount_type === 'open'">
|
|
|
|
|
<el-form-item label="金额说明">
|
|
|
|
|
<el-form-item label="金额说明" prop="amount_description">
|
|
|
|
|
<el-input v-model="form.amount_description" type="textarea" :rows="2" placeholder="请说明开口合同的金额情况" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="合同类型">
|
|
|
|
|
<el-select v-model="form.contract_type" placeholder="请选择合同类型" style="width: 100%">
|
|
|
|
|
<el-option label="收入类" value="1" />
|
|
|
|
|
<el-option label="支出类" value="2" />
|
|
|
|
|
<el-option label="技术协议" value="3" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="合同类型" prop="contract_type_id">
|
|
|
|
|
<el-select v-model="form.contract_type_id" placeholder="请选择合同类型" filterable clearable style="width: 100%">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="type in contractTypeOptions"
|
|
|
|
|
:key="type.id"
|
|
|
|
|
:label="type.name"
|
|
|
|
|
:value="type.id"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="签订日期">
|
|
|
|
|
<el-form-item label="签订日期" prop="sign_date">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="form.sign_date"
|
|
|
|
|
type="date"
|
|
|
|
|
@ -120,7 +120,7 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="申请日期">
|
|
|
|
|
<el-form-item label="申请日期" prop="apply_date">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="form.apply_date"
|
|
|
|
|
type="date"
|
|
|
|
|
@ -130,18 +130,54 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-form-item label="合同履行期">
|
|
|
|
|
<el-input v-model="form.perform_period" placeholder="例如:2025-01-01 至 2025-12-31" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="付款方式">
|
|
|
|
|
<el-form-item label="合同履行期" prop="perform_period">
|
|
|
|
|
<el-input v-model="form.perform_period" placeholder="例如:2025-01-01 至 2025-12-31" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="付款方式" prop="pay_method">
|
|
|
|
|
<el-input v-model="form.pay_method" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="预算年度" prop="fund_source_year_id">
|
|
|
|
|
<el-select v-model="form.fund_source_year_id" placeholder="请选择预算年度" filterable clearable style="width: 100%" @change="handleFundSourceYearChange">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="year in budgetYearOptions"
|
|
|
|
|
:key="year.value"
|
|
|
|
|
:label="year.label"
|
|
|
|
|
:value="year.value"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="项目经费来源">
|
|
|
|
|
<el-input v-model="form.fund_source" />
|
|
|
|
|
<el-form-item label="项目经费来源" prop="fund_source_budget_data_id">
|
|
|
|
|
<el-select v-model="form.fund_source_budget_data_id" placeholder="请选择项目经费来源" filterable clearable style="width: 100%">
|
|
|
|
|
<el-option-group
|
|
|
|
|
v-for="group in fundSourceOptions"
|
|
|
|
|
:key="group.label"
|
|
|
|
|
:label="group.label"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="option in group.options"
|
|
|
|
|
:key="option.value"
|
|
|
|
|
:label="option.label"
|
|
|
|
|
:value="option.value"
|
|
|
|
|
/>
|
|
|
|
|
</el-option-group>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="是否为政府采购" prop="is_government_purchase">
|
|
|
|
|
<el-switch v-model="form.is_government_purchase" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
@ -152,13 +188,14 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="采购方式">
|
|
|
|
|
<el-select v-model="form.purchase_method" placeholder="请选择采购方式" style="width: 100%">
|
|
|
|
|
<el-option label="公开招标" value="公开招标" />
|
|
|
|
|
<el-option label="邀请招标" value="邀请招标" />
|
|
|
|
|
<el-option label="竞争性谈判" value="竞争性谈判" />
|
|
|
|
|
<el-option label="单一来源采购" value="单一来源采购" />
|
|
|
|
|
<el-option label="询价" value="询价" />
|
|
|
|
|
<el-form-item label="采购方式" prop="purchase_method_id">
|
|
|
|
|
<el-select v-model="form.purchase_method_id" placeholder="请选择采购方式" filterable clearable style="width: 100%">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="method in purchaseMethodOptions"
|
|
|
|
|
:key="method.id"
|
|
|
|
|
:label="method.name"
|
|
|
|
|
:value="method.id"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
@ -170,39 +207,41 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="是否验收">
|
|
|
|
|
<el-form-item label="是否验收" prop="is_accepted">
|
|
|
|
|
<el-switch v-model="form.is_accepted" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-form-item label="采购类别">
|
|
|
|
|
<el-select v-model="form.purchase_category" placeholder="请选择采购类别" style="width: 100%">
|
|
|
|
|
<el-option label="仪器" value="仪器" />
|
|
|
|
|
<el-option label="外包" value="外包" />
|
|
|
|
|
<el-option label="服务" value="服务" />
|
|
|
|
|
<el-option label="一般采购" value="一般采购" />
|
|
|
|
|
<el-form-item label="采购类别" prop="purchase_category_id">
|
|
|
|
|
<el-select v-model="form.purchase_category_id" placeholder="请选择采购类别" filterable clearable style="width: 100%">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="category in purchaseCategoryOptions"
|
|
|
|
|
:key="category.id"
|
|
|
|
|
:label="category.name"
|
|
|
|
|
:value="category.id"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="科室">
|
|
|
|
|
<el-form-item label="科室" prop="owner_department_ids">
|
|
|
|
|
<el-select v-model="form.owner_department_ids_array" multiple placeholder="请选择科室" filterable clearable style="width: 100%">
|
|
|
|
|
<el-option v-for="dept in departmentList" :key="dept.id" :label="dept.name" :value="dept.id.toString()" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="合同签订/变更经办人">
|
|
|
|
|
<el-form-item label="合同签订/变更经办人" prop="handler_admin_ids">
|
|
|
|
|
<el-select v-model="form.handler_admin_ids_array" multiple placeholder="请选择经办人" filterable clearable style="width: 100%">
|
|
|
|
|
<el-option v-for="user in userList" :key="user.id" :label="user.name" :value="user.id.toString()" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="申请科室经办人">
|
|
|
|
|
<el-form-item label="申请科室经办人" prop="apply_handler_id">
|
|
|
|
|
<el-select v-model="form.apply_handler_id_array" placeholder="请选择" filterable multiple clearable style="width: 100%">
|
|
|
|
|
<el-option v-for="user in userList" :key="user.id" :label="user.name" :value="user.id.toString()" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="采购科室经办人">
|
|
|
|
|
<el-form-item label="采购科室经办人" prop="purchase_handler_id">
|
|
|
|
|
<el-select v-model="form.purchase_handler_id" placeholder="请选择" filterable clearable style="width: 100%">
|
|
|
|
|
<el-option v-for="user in userList" :key="user.id" :label="user.name" :value="user.id" />
|
|
|
|
|
</el-select>
|
|
|
|
|
@ -231,10 +270,11 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-divider content-position="left">付款计划</el-divider>
|
|
|
|
|
<div class="payplan-toolbar">
|
|
|
|
|
<el-button type="primary" size="small" @click="addPayPlan">新增计划</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
<el-table :data="form.pay_plans" border size="small" class="mb-16 payplan-table" style="width: 100%">
|
|
|
|
|
<el-form-item prop="pay_plans" style="margin-bottom: 0;">
|
|
|
|
|
<div class="payplan-toolbar">
|
|
|
|
|
<el-button type="primary" size="small" @click="addPayPlan">新增计划</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
<el-table :data="form.pay_plans" border size="small" class="mb-16 payplan-table" style="width: 100%">
|
|
|
|
|
<el-table-column prop="phase_no" label="期次" width="100">
|
|
|
|
|
<template #default="{ row }">
|
|
|
|
|
<el-input-number v-model="row.phase_no" :min="1" size="small" />
|
|
|
|
|
@ -267,7 +307,8 @@
|
|
|
|
|
<el-button type="danger" link size="small" @click="removePayPlan($index)">移除</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</el-table>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
<template #footer>
|
|
|
|
|
@ -287,6 +328,7 @@ import {
|
|
|
|
|
getContractSettings,
|
|
|
|
|
getContractByFlowId,
|
|
|
|
|
createContract,
|
|
|
|
|
getBudgetYearOptions,
|
|
|
|
|
} from "@/api/flow";
|
|
|
|
|
import { userListNoAuth, departmentListNoAuth } from "@/api/common";
|
|
|
|
|
|
|
|
|
|
@ -307,8 +349,14 @@ export default {
|
|
|
|
|
userList: [],
|
|
|
|
|
departmentList: [],
|
|
|
|
|
attachmentFileList: [],
|
|
|
|
|
budgetYearOptions: [],
|
|
|
|
|
fundSourceOptions: [],
|
|
|
|
|
purchaseCategoryOptions: [],
|
|
|
|
|
contractTypeOptions: [],
|
|
|
|
|
purchaseMethodOptions: [],
|
|
|
|
|
form: {
|
|
|
|
|
contract_no: "",
|
|
|
|
|
contract_no_without_prefix: "",
|
|
|
|
|
title: "",
|
|
|
|
|
main_content: "",
|
|
|
|
|
party_a: "",
|
|
|
|
|
@ -323,11 +371,15 @@ export default {
|
|
|
|
|
perform_period: "",
|
|
|
|
|
pay_method: "",
|
|
|
|
|
fund_source: "",
|
|
|
|
|
fund_source_year_id: null,
|
|
|
|
|
fund_source_budget_data_id: null,
|
|
|
|
|
is_government_purchase: false,
|
|
|
|
|
tender_agent: "",
|
|
|
|
|
purchase_method: "",
|
|
|
|
|
perform_status: "",
|
|
|
|
|
is_accepted: false,
|
|
|
|
|
purchase_category: "",
|
|
|
|
|
purchase_category_id: null,
|
|
|
|
|
handler_admin_ids: "",
|
|
|
|
|
handler_admin_ids_array: [],
|
|
|
|
|
apply_handler_id: "",
|
|
|
|
|
@ -339,11 +391,8 @@ export default {
|
|
|
|
|
remark: "",
|
|
|
|
|
attachment_id: null,
|
|
|
|
|
pay_plans: [],
|
|
|
|
|
savedAmountTotal: null,
|
|
|
|
|
},
|
|
|
|
|
rules: {
|
|
|
|
|
contract_no: [{ required: true, message: "请填写合同编号", trigger: "blur" }],
|
|
|
|
|
},
|
|
|
|
|
rules: {},
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
@ -374,34 +423,301 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
'form.amount_type'(newVal, oldVal) {
|
|
|
|
|
if (newVal === 'open') {
|
|
|
|
|
if (oldVal === 'fixed' && this.form.amount_total) {
|
|
|
|
|
this.form.savedAmountTotal = this.form.amount_total;
|
|
|
|
|
}
|
|
|
|
|
this.form.amount_total = null;
|
|
|
|
|
} else if (newVal === 'fixed') {
|
|
|
|
|
if (this.form.savedAmountTotal !== null) {
|
|
|
|
|
this.form.amount_total = this.form.savedAmountTotal;
|
|
|
|
|
this.form.savedAmountTotal = null;
|
|
|
|
|
}
|
|
|
|
|
'form.fund_source_year_id'(newVal, oldVal) {
|
|
|
|
|
// 当预算年度变化时,自动加载项目经费来源选项
|
|
|
|
|
if (newVal) {
|
|
|
|
|
this.fetchFundSourceOptions(newVal);
|
|
|
|
|
} else {
|
|
|
|
|
this.fundSourceOptions = [];
|
|
|
|
|
this.form.fund_source_budget_data_id = null;
|
|
|
|
|
}
|
|
|
|
|
// 如果年度变化了,清空之前选择的经费来源
|
|
|
|
|
if (newVal !== oldVal) {
|
|
|
|
|
this.form.fund_source_budget_data_id = null;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 监听多选下拉变化,触发校验
|
|
|
|
|
'form.owner_department_ids_array'() {
|
|
|
|
|
if (this.$refs.formRef) {
|
|
|
|
|
this.$refs.formRef.validateField('owner_department_ids', () => {});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
'form.handler_admin_ids_array'() {
|
|
|
|
|
if (this.$refs.formRef) {
|
|
|
|
|
this.$refs.formRef.validateField('handler_admin_ids', () => {});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
'form.apply_handler_id_array'() {
|
|
|
|
|
if (this.$refs.formRef) {
|
|
|
|
|
this.$refs.formRef.validateField('apply_handler_id', () => {});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
'form.pay_plans'() {
|
|
|
|
|
if (this.$refs.formRef) {
|
|
|
|
|
this.$refs.formRef.validateField('pay_plans', () => {});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 监听金额类型变化,重新校验合同金额和金额说明
|
|
|
|
|
'form.amount_type'() {
|
|
|
|
|
if (this.$refs.formRef) {
|
|
|
|
|
this.$refs.formRef.validateField('amount_total', () => {});
|
|
|
|
|
this.$refs.formRef.validateField('amount_description', () => {});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
openDialog() {
|
|
|
|
|
this.dialogVisible = true;
|
|
|
|
|
},
|
|
|
|
|
handleAmountInputKeydown(event) {
|
|
|
|
|
if (this.form.amount_type === 'open') {
|
|
|
|
|
event.preventDefault();
|
|
|
|
|
event.stopPropagation();
|
|
|
|
|
return false;
|
|
|
|
|
// 判断是否为编辑模式(已有合同ID)
|
|
|
|
|
isEditMode() {
|
|
|
|
|
return this.hasValue && this.normalizedValue && parseInt(this.normalizedValue);
|
|
|
|
|
},
|
|
|
|
|
// 初始化校验规则
|
|
|
|
|
initRules() {
|
|
|
|
|
// 新建时:只校验到付款方式(包含付款方式)
|
|
|
|
|
const baseRules = {
|
|
|
|
|
contract_no: [{ required: true, message: "请填写合同编号", trigger: "blur" }],
|
|
|
|
|
title: [{ required: true, message: "请填写合同名称", trigger: "blur" }],
|
|
|
|
|
main_content: [{ required: true, message: "请填写合同主要内容", trigger: "blur" }],
|
|
|
|
|
party_a: [{ required: true, message: "请填写甲方", trigger: "blur" }],
|
|
|
|
|
party_b: [{ required: true, message: "请填写乙方", trigger: "blur" }],
|
|
|
|
|
amount_total: [
|
|
|
|
|
{
|
|
|
|
|
validator: (rule, value, callback) => {
|
|
|
|
|
// 开口合同时,合同金额可以为空
|
|
|
|
|
if (this.form.amount_type === 'open') {
|
|
|
|
|
callback();
|
|
|
|
|
} else if (value === null || value === undefined || value === '') {
|
|
|
|
|
callback(new Error('请填写合同金额'));
|
|
|
|
|
} else {
|
|
|
|
|
callback();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
trigger: ['blur', 'change']
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
amount_type: [{ required: true, message: "请选择金额类型", trigger: "change" }],
|
|
|
|
|
amount_description: [
|
|
|
|
|
{
|
|
|
|
|
validator: (rule, value, callback) => {
|
|
|
|
|
if (this.form.amount_type === 'open' && !value) {
|
|
|
|
|
callback(new Error('开口合同时,金额说明不能为空'));
|
|
|
|
|
} else {
|
|
|
|
|
callback();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
trigger: 'blur'
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
budget_amount: [{ required: true, message: "请填写项目预算金额", trigger: "blur" }],
|
|
|
|
|
contract_type_id: [{ required: true, message: "请选择合同类型", trigger: "change" }],
|
|
|
|
|
sign_date: [{ required: true, message: "请选择签订日期", trigger: "change" }],
|
|
|
|
|
apply_date: [{ required: true, message: "请选择申请日期", trigger: "change" }],
|
|
|
|
|
perform_period: [{ required: true, message: "请填写合同履行期", trigger: "blur" }],
|
|
|
|
|
pay_method: [{ required: true, message: "请填写付款方式", trigger: "blur" }],
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 新建时只校验到付款方式(包含付款方式)
|
|
|
|
|
if (!this.isEditMode()) {
|
|
|
|
|
this.rules = baseRules;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 编辑时全量校验(与合同编辑页面对齐)
|
|
|
|
|
this.rules = {
|
|
|
|
|
...baseRules,
|
|
|
|
|
fund_source_year_id: [{ required: true, message: "请选择预算年度", trigger: "change" }],
|
|
|
|
|
fund_source_budget_data_id: [{ required: true, message: "请选择项目经费来源", trigger: "change" }],
|
|
|
|
|
is_government_purchase: [{ required: true, message: "请选择是否为政府采购", trigger: "change" }],
|
|
|
|
|
purchase_category_id: [{ required: true, message: "请选择采购类别", trigger: "change" }],
|
|
|
|
|
purchase_method_id: [{ required: true, message: "请选择采购方式", trigger: "change" }],
|
|
|
|
|
is_accepted: [{ required: true, message: "请选择是否验收", trigger: "change" }],
|
|
|
|
|
handler_admin_ids: [
|
|
|
|
|
{
|
|
|
|
|
validator: (rule, value, callback) => {
|
|
|
|
|
const ids = this.form.handler_admin_ids_array;
|
|
|
|
|
if (!ids || !Array.isArray(ids) || ids.length === 0) {
|
|
|
|
|
callback(new Error('请选择合同签订/变更经办人'));
|
|
|
|
|
} else {
|
|
|
|
|
callback();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
trigger: ['change', 'blur']
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
apply_handler_id: [
|
|
|
|
|
{
|
|
|
|
|
validator: (rule, value, callback) => {
|
|
|
|
|
const ids = this.form.apply_handler_id_array;
|
|
|
|
|
if (!ids || !Array.isArray(ids) || ids.length === 0) {
|
|
|
|
|
callback(new Error('请选择申请科室经办人'));
|
|
|
|
|
} else {
|
|
|
|
|
callback();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
trigger: ['change', 'blur']
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
owner_department_ids: [
|
|
|
|
|
{
|
|
|
|
|
validator: (rule, value, callback) => {
|
|
|
|
|
const ids = this.form.owner_department_ids_array;
|
|
|
|
|
if (!ids || !Array.isArray(ids) || ids.length === 0) {
|
|
|
|
|
callback(new Error('请选择科室'));
|
|
|
|
|
} else {
|
|
|
|
|
callback();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
trigger: ['change', 'blur']
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
purchase_handler_id: [{ required: true, message: "请选择采购科室经办人", trigger: "change" }],
|
|
|
|
|
pay_plans: [
|
|
|
|
|
{
|
|
|
|
|
validator: (rule, value, callback) => {
|
|
|
|
|
if (!value || !Array.isArray(value) || value.length === 0) {
|
|
|
|
|
callback(new Error('至少需要一条付款计划'));
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
const errors = [];
|
|
|
|
|
value.forEach((plan, index) => {
|
|
|
|
|
const planErrors = [];
|
|
|
|
|
if (!plan.phase_no || plan.phase_no <= 0) {
|
|
|
|
|
planErrors.push('期次');
|
|
|
|
|
}
|
|
|
|
|
if (!plan.due_date) {
|
|
|
|
|
planErrors.push('到期日期');
|
|
|
|
|
}
|
|
|
|
|
if (!plan.amount_plan || plan.amount_plan <= 0) {
|
|
|
|
|
planErrors.push('金额');
|
|
|
|
|
}
|
|
|
|
|
if (planErrors.length > 0) {
|
|
|
|
|
errors.push(`第${index + 1}条付款计划的${planErrors.join('、')}不能为空`);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
if (errors.length > 0) {
|
|
|
|
|
callback(new Error(errors[0]));
|
|
|
|
|
} else {
|
|
|
|
|
callback();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
trigger: ['change', 'blur']
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
handleFundSourceYearChange() {
|
|
|
|
|
this.form.fund_source_budget_data_id = null;
|
|
|
|
|
if (this.form.fund_source_year_id) {
|
|
|
|
|
this.fetchFundSourceOptions(this.form.fund_source_year_id);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async fetchBudgetYearOptions() {
|
|
|
|
|
try {
|
|
|
|
|
const response = await getBudgetYearOptions(false);
|
|
|
|
|
const arr = Array.isArray(response) ? response : (response?.data || []);
|
|
|
|
|
this.budgetYearOptions = arr.map((y) => ({
|
|
|
|
|
value: y.value,
|
|
|
|
|
label: y.label || (y.year ? `${y.year}年` : `${y.value}年`),
|
|
|
|
|
status: y.status, // 保留状态信息
|
|
|
|
|
}));
|
|
|
|
|
// 默认选择 ACTIVE 状态或最新的年度(与合同编辑页面保持一致)
|
|
|
|
|
// 注意:只在新建时默认选择,编辑时应该保持原有选择
|
|
|
|
|
if (this.budgetYearOptions.length > 0 && !this.form.fund_source_year_id && !this.isEditMode()) {
|
|
|
|
|
const activeYear = this.budgetYearOptions.find(y => y.status === 'ACTIVE');
|
|
|
|
|
if (activeYear) {
|
|
|
|
|
this.form.fund_source_year_id = activeYear.value;
|
|
|
|
|
await this.fetchFundSourceOptions(activeYear.value);
|
|
|
|
|
} else {
|
|
|
|
|
this.form.fund_source_year_id = this.budgetYearOptions[0].value;
|
|
|
|
|
await this.fetchFundSourceOptions(this.budgetYearOptions[0].value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
console.error('获取预算年度列表失败', e);
|
|
|
|
|
Message.error('获取预算年度列表失败:' + (e.message || '未知错误'));
|
|
|
|
|
this.budgetYearOptions = [];
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
handleAmountInputFocus(event) {
|
|
|
|
|
if (this.form.amount_type === 'open') {
|
|
|
|
|
event.target.blur();
|
|
|
|
|
async fetchFundSourceOptions(yearId) {
|
|
|
|
|
if (!yearId) {
|
|
|
|
|
this.fundSourceOptions = [];
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
// 注意:响应拦截器已经返回了 res.data,所以 response 直接就是数据数组
|
|
|
|
|
const response = await request.get('/api/budget/contracts/fund-source-options', { params: { year_id: yearId } });
|
|
|
|
|
// 检查是否是数组格式(正常的响应)
|
|
|
|
|
if (Array.isArray(response)) {
|
|
|
|
|
this.fundSourceOptions = response;
|
|
|
|
|
} else if (response && response.code === 0 && Array.isArray(response.data)) {
|
|
|
|
|
// 兼容处理:如果响应拦截器没有处理,fallback 到原始格式
|
|
|
|
|
this.fundSourceOptions = response.data;
|
|
|
|
|
} else {
|
|
|
|
|
this.fundSourceOptions = [];
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
console.error('获取项目经费来源列表失败', e);
|
|
|
|
|
Message.error('获取项目经费来源列表失败:' + (e.message || '未知错误'));
|
|
|
|
|
this.fundSourceOptions = [];
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async fetchPurchaseCategoryOptions() {
|
|
|
|
|
try {
|
|
|
|
|
// 注意:响应拦截器已经返回了 res.data,所以 response 直接就是数据
|
|
|
|
|
const response = await request.get('/api/budget/purchase-categories');
|
|
|
|
|
// 与合同编辑页面保持一致:只获取启用的采购类别
|
|
|
|
|
if (Array.isArray(response)) {
|
|
|
|
|
this.purchaseCategoryOptions = response;
|
|
|
|
|
} else if (response && response.code === 0 && Array.isArray(response.data)) {
|
|
|
|
|
// 兼容处理:如果响应拦截器没有处理,fallback 到原始格式
|
|
|
|
|
this.purchaseCategoryOptions = response.data;
|
|
|
|
|
} else {
|
|
|
|
|
this.purchaseCategoryOptions = [];
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
console.error('获取采购类别列表失败', e);
|
|
|
|
|
Message.error('获取采购类别列表失败:' + (e.message || '未知错误'));
|
|
|
|
|
this.purchaseCategoryOptions = [];
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async fetchContractTypeOptions() {
|
|
|
|
|
try {
|
|
|
|
|
// 注意:响应拦截器已经返回了 res.data,所以 response 直接就是数据
|
|
|
|
|
// 与合同编辑页面保持一致:只获取启用的合同类型(使用 /api/budget/contract-types 而不是 /all)
|
|
|
|
|
const response = await request.get('/api/budget/contract-types');
|
|
|
|
|
if (Array.isArray(response)) {
|
|
|
|
|
this.contractTypeOptions = response;
|
|
|
|
|
} else if (response && response.code === 0 && Array.isArray(response.data)) {
|
|
|
|
|
// 兼容处理:如果响应拦截器没有处理,fallback 到原始格式
|
|
|
|
|
this.contractTypeOptions = response.data;
|
|
|
|
|
} else {
|
|
|
|
|
this.contractTypeOptions = [];
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
console.error('获取合同类型列表失败', e);
|
|
|
|
|
Message.error('获取合同类型列表失败:' + (e.message || '未知错误'));
|
|
|
|
|
this.contractTypeOptions = [];
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async fetchPurchaseMethodOptions() {
|
|
|
|
|
try {
|
|
|
|
|
// 注意:响应拦截器已经返回了 res.data,所以 response 直接就是数据
|
|
|
|
|
// 与合同编辑页面保持一致:只获取启用的采购方式(使用 /api/budget/purchase-methods 而不是 /all)
|
|
|
|
|
const response = await request.get('/api/budget/purchase-methods');
|
|
|
|
|
if (Array.isArray(response)) {
|
|
|
|
|
this.purchaseMethodOptions = response;
|
|
|
|
|
} else if (response && response.code === 0 && Array.isArray(response.data)) {
|
|
|
|
|
// 兼容处理:如果响应拦截器没有处理,fallback 到原始格式
|
|
|
|
|
this.purchaseMethodOptions = response.data;
|
|
|
|
|
} else {
|
|
|
|
|
this.purchaseMethodOptions = [];
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
console.error('获取采购方式列表失败', e);
|
|
|
|
|
Message.error('获取采购方式列表失败:' + (e.message || '未知错误'));
|
|
|
|
|
this.purchaseMethodOptions = [];
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
beforeUpload(file) {
|
|
|
|
|
@ -483,12 +799,20 @@ export default {
|
|
|
|
|
this.resetForm();
|
|
|
|
|
await this.loadUserList();
|
|
|
|
|
await this.loadDepartmentList();
|
|
|
|
|
await this.fetchBudgetYearOptions();
|
|
|
|
|
await this.fetchPurchaseCategoryOptions();
|
|
|
|
|
await this.fetchContractTypeOptions();
|
|
|
|
|
await this.fetchPurchaseMethodOptions();
|
|
|
|
|
// 初始化校验规则
|
|
|
|
|
this.initRules();
|
|
|
|
|
// 优先尝试加载已有合同(通过合同ID或flowId)
|
|
|
|
|
const contractExists = await this.loadExistingContract();
|
|
|
|
|
const contractExists = await this.loadExistingContract();
|
|
|
|
|
// 如果找不到已有合同,且提供了flowId,则从流程数据预填
|
|
|
|
|
if (!contractExists && this.flowId) {
|
|
|
|
|
this.loadFlowDataAndPrefill();
|
|
|
|
|
this.loadFlowDataAndPrefill();
|
|
|
|
|
}
|
|
|
|
|
// 重新初始化校验规则(因为可能已经加载了合同数据,需要区分新建/编辑)
|
|
|
|
|
this.initRules();
|
|
|
|
|
},
|
|
|
|
|
onDialogClose() {
|
|
|
|
|
// 关闭时不做处理
|
|
|
|
|
@ -496,6 +820,7 @@ export default {
|
|
|
|
|
resetForm() {
|
|
|
|
|
this.form = {
|
|
|
|
|
contract_no: "",
|
|
|
|
|
contract_no_without_prefix: "",
|
|
|
|
|
title: "",
|
|
|
|
|
main_content: "",
|
|
|
|
|
party_a: "",
|
|
|
|
|
@ -504,17 +829,23 @@ export default {
|
|
|
|
|
amount_type: "fixed",
|
|
|
|
|
amount_description: "",
|
|
|
|
|
budget_amount: 0,
|
|
|
|
|
contract_type: "",
|
|
|
|
|
contract_type_id: null,
|
|
|
|
|
contract_type: "", // 保留旧字段,用于兼容
|
|
|
|
|
sign_date: "",
|
|
|
|
|
apply_date: "",
|
|
|
|
|
perform_period: "",
|
|
|
|
|
pay_method: "",
|
|
|
|
|
fund_source: "",
|
|
|
|
|
fund_source_year_id: null,
|
|
|
|
|
fund_source_budget_data_id: null,
|
|
|
|
|
is_government_purchase: false,
|
|
|
|
|
tender_agent: "",
|
|
|
|
|
purchase_method: "",
|
|
|
|
|
purchase_method_id: null,
|
|
|
|
|
purchase_method: "", // 保留旧字段,用于兼容
|
|
|
|
|
perform_status: "",
|
|
|
|
|
is_accepted: false,
|
|
|
|
|
purchase_category: "",
|
|
|
|
|
purchase_category_id: null,
|
|
|
|
|
handler_admin_ids: "",
|
|
|
|
|
handler_admin_ids_array: [],
|
|
|
|
|
apply_handler_id: "",
|
|
|
|
|
@ -526,9 +857,9 @@ export default {
|
|
|
|
|
remark: "",
|
|
|
|
|
attachment_id: null,
|
|
|
|
|
pay_plans: [],
|
|
|
|
|
savedAmountTotal: null,
|
|
|
|
|
};
|
|
|
|
|
this.attachmentFileList = [];
|
|
|
|
|
this.fundSourceOptions = [];
|
|
|
|
|
if (this.$refs.formRef) {
|
|
|
|
|
this.$refs.formRef.clearValidate();
|
|
|
|
|
}
|
|
|
|
|
@ -562,6 +893,14 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (contractData) {
|
|
|
|
|
// 处理合同编号:拆分CZHT前缀
|
|
|
|
|
if (contractData.contract_no) {
|
|
|
|
|
if (contractData.contract_no.startsWith('CZHT')) {
|
|
|
|
|
this.form.contract_no_without_prefix = contractData.contract_no.substring(4);
|
|
|
|
|
} else {
|
|
|
|
|
this.form.contract_no_without_prefix = contractData.contract_no;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.form.contract_no = contractData.contract_no || "";
|
|
|
|
|
this.form.title = contractData.title || "";
|
|
|
|
|
this.form.main_content = contractData.main_content || "";
|
|
|
|
|
@ -571,23 +910,36 @@ export default {
|
|
|
|
|
this.form.amount_type = contractData.amount_type || "fixed";
|
|
|
|
|
this.form.amount_description = contractData.amount_description || "";
|
|
|
|
|
this.form.budget_amount = contractData.budget_amount || 0;
|
|
|
|
|
this.form.contract_type = contractData.contract_type || "";
|
|
|
|
|
// 优先使用ID字段,如果不存在则使用旧字段(兼容历史数据)
|
|
|
|
|
this.form.contract_type_id = contractData.contract_type_id || null;
|
|
|
|
|
this.form.contract_type = contractData.contract_type || ""; // 保留旧字段,用于兼容
|
|
|
|
|
this.form.sign_date = contractData.sign_date || "";
|
|
|
|
|
this.form.apply_date = contractData.apply_date || "";
|
|
|
|
|
this.form.perform_period = contractData.perform_period || "";
|
|
|
|
|
this.form.pay_method = contractData.pay_method || "";
|
|
|
|
|
this.form.fund_source = contractData.fund_source || "";
|
|
|
|
|
this.form.fund_source_year_id = contractData.fund_source_year_id || null;
|
|
|
|
|
this.form.fund_source_budget_data_id = contractData.fund_source_budget_data_id || null;
|
|
|
|
|
this.form.is_government_purchase = contractData.is_government_purchase || false;
|
|
|
|
|
this.form.tender_agent = contractData.tender_agent || "";
|
|
|
|
|
this.form.purchase_method = contractData.purchase_method || "";
|
|
|
|
|
// 优先使用ID字段,如果不存在则使用旧字段(兼容历史数据)
|
|
|
|
|
this.form.purchase_method_id = contractData.purchase_method_id || null;
|
|
|
|
|
this.form.purchase_method = contractData.purchase_method || ""; // 保留旧字段,用于兼容
|
|
|
|
|
this.form.perform_status = contractData.perform_status || "";
|
|
|
|
|
this.form.is_accepted = contractData.is_accepted || false;
|
|
|
|
|
this.form.purchase_category = contractData.purchase_category || "";
|
|
|
|
|
this.form.purchase_category_id = contractData.purchase_category_id || null;
|
|
|
|
|
this.form.apply_handler_id = contractData.apply_handler_id || "";
|
|
|
|
|
this.form.purchase_handler_id = contractData.purchase_handler_id || null;
|
|
|
|
|
this.form.owner_department_id = contractData.owner_department_id || null;
|
|
|
|
|
this.form.remark = contractData.remark || "";
|
|
|
|
|
this.form.attachment_id = contractData.attachment_id || null;
|
|
|
|
|
|
|
|
|
|
// 如果设置了预算年度和经费来源,需要加载经费来源选项
|
|
|
|
|
if (this.form.fund_source_year_id) {
|
|
|
|
|
await this.fetchFundSourceOptions(this.form.fund_source_year_id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 处理科室多选:转换为字符串数组(因为下拉组件的value是字符串)
|
|
|
|
|
if (contractData.owner_department_ids) {
|
|
|
|
|
const ids = typeof contractData.owner_department_ids === 'string'
|
|
|
|
|
@ -764,11 +1116,25 @@ export default {
|
|
|
|
|
|
|
|
|
|
this.saving = true;
|
|
|
|
|
try {
|
|
|
|
|
// 处理合同编号:拼接CZHT前缀
|
|
|
|
|
let contractNo = this.form.contract_no_without_prefix || '';
|
|
|
|
|
if (contractNo && !contractNo.startsWith('CZHT')) {
|
|
|
|
|
contractNo = 'CZHT' + contractNo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 处理科室多选:将数组转换为逗号分隔的字符串
|
|
|
|
|
const ownerDepartmentIds = Array.isArray(this.form.owner_department_ids_array)
|
|
|
|
|
? this.form.owner_department_ids_array.join(',')
|
|
|
|
|
: (this.form.owner_department_ids || '');
|
|
|
|
|
|
|
|
|
|
// 如果有科室多选,取第一个作为 owner_department_id(用于兼容)
|
|
|
|
|
let ownerDepartmentId = null;
|
|
|
|
|
if (Array.isArray(this.form.owner_department_ids_array) && this.form.owner_department_ids_array.length > 0) {
|
|
|
|
|
ownerDepartmentId = parseInt(this.form.owner_department_ids_array[0]);
|
|
|
|
|
} else if (this.form.owner_department_id) {
|
|
|
|
|
ownerDepartmentId = this.form.owner_department_id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 处理经办人多选:将数组转换为逗号分隔的字符串
|
|
|
|
|
const handlerAdminIds = Array.isArray(this.form.handler_admin_ids_array)
|
|
|
|
|
? this.form.handler_admin_ids_array.join(',')
|
|
|
|
|
@ -778,9 +1144,6 @@ export default {
|
|
|
|
|
const applyHandlerIds = Array.isArray(this.form.apply_handler_id_array)
|
|
|
|
|
? this.form.apply_handler_id_array.filter(id => id).join(',')
|
|
|
|
|
: (this.form.apply_handler_id || '');
|
|
|
|
|
|
|
|
|
|
// 处理金额:开口合同时,amount_total 应该为 null
|
|
|
|
|
const amountTotal = this.form.amount_type === 'open' ? null : (this.form.amount_total || 0);
|
|
|
|
|
|
|
|
|
|
// 如果已有合同ID,传递合同ID用于更新
|
|
|
|
|
const contractId = this.hasValue && this.normalizedValue ? parseInt(this.normalizedValue) : null;
|
|
|
|
|
@ -789,30 +1152,36 @@ export default {
|
|
|
|
|
contract_id: contractId, // 如果提供,则更新该合同
|
|
|
|
|
flow_id: this.flowId ? parseInt(this.flowId) : null,
|
|
|
|
|
contract: {
|
|
|
|
|
contract_no: this.form.contract_no,
|
|
|
|
|
contract_no: contractNo,
|
|
|
|
|
title: this.form.title,
|
|
|
|
|
main_content: this.form.main_content || "",
|
|
|
|
|
party_a: this.form.party_a || "",
|
|
|
|
|
party_b: this.form.party_b || "",
|
|
|
|
|
amount_total: amountTotal,
|
|
|
|
|
amount_total: this.form.amount_total || 0,
|
|
|
|
|
amount_type: this.form.amount_type,
|
|
|
|
|
amount_description: this.form.amount_description || "",
|
|
|
|
|
budget_amount: this.form.budget_amount || 0,
|
|
|
|
|
contract_type: this.form.contract_type || "",
|
|
|
|
|
contract_type_id: this.form.contract_type_id,
|
|
|
|
|
contract_type: this.form.contract_type || "", // 保留旧字段,用于兼容
|
|
|
|
|
sign_date: this.form.sign_date || null,
|
|
|
|
|
apply_date: this.form.apply_date || null,
|
|
|
|
|
perform_period: this.form.perform_period || "",
|
|
|
|
|
pay_method: this.form.pay_method || "",
|
|
|
|
|
fund_source: this.form.fund_source || "",
|
|
|
|
|
fund_source_year_id: this.form.fund_source_year_id,
|
|
|
|
|
fund_source_budget_data_id: this.form.fund_source_budget_data_id,
|
|
|
|
|
is_government_purchase: this.form.is_government_purchase || false,
|
|
|
|
|
purchase_category_id: this.form.purchase_category_id,
|
|
|
|
|
tender_agent: this.form.tender_agent || "",
|
|
|
|
|
purchase_method: this.form.purchase_method || "",
|
|
|
|
|
purchase_method_id: this.form.purchase_method_id,
|
|
|
|
|
purchase_method: this.form.purchase_method || "", // 保留旧字段,用于兼容
|
|
|
|
|
perform_status: this.form.perform_status || "",
|
|
|
|
|
is_accepted: this.form.is_accepted || false,
|
|
|
|
|
purchase_category: this.form.purchase_category || "",
|
|
|
|
|
handler_admin_ids: handlerAdminIds,
|
|
|
|
|
apply_handler_id: applyHandlerIds,
|
|
|
|
|
purchase_handler_id: this.form.purchase_handler_id,
|
|
|
|
|
owner_department_id: this.form.owner_department_id,
|
|
|
|
|
owner_department_id: ownerDepartmentId,
|
|
|
|
|
owner_department_ids: ownerDepartmentIds,
|
|
|
|
|
remark: this.form.remark || "",
|
|
|
|
|
attachment_id: this.form.attachment_id,
|
|
|
|
|
|