合同分类:
@@ -335,7 +335,7 @@
@@ -1160,7 +1227,7 @@ export default {
purchaseMethod: '',
name: '',
type: '', // 项目类型
- moneyWay: '',
+ moneyWay: [],
plan: [],
plan_display: '', // 预算计划显示文本
price: 0,
@@ -1182,7 +1249,9 @@ export default {
ratio: '',
payee: ''
}
- ]
+ ],
+ showAfterPayment: false, // 是否显示事后支付表格
+ contract_carry_department: [] // 新增执行科室字段
},
categoryOptions: [],
purchaseMethodsMap: {},
@@ -1762,8 +1831,8 @@ export default {
type: this.form.type,
is_plan: this.form.isBudget ? 1 : 0,
purchase_type_id: this.form.purchaseForm, // 修改这里,使用 purchaseForm 而不是 methods
- purchase_way_id: this.form.modality,
- money_way_id: `${this.form.moneyWay.toString()}`,
+ purchase_way_id: this.form.purchaseMethod,
+ money_way_id: this.form.moneyWay.toString(), // 修改这里,将数组转换为字符串
plan_price: this.form.price,
name: this.form.name,
contract_plan_links: this.form.plan.map(item => {
@@ -1892,10 +1961,10 @@ export default {
nextStep() {
// 验证当前步骤的表单
if (this.currentStep === 1) {
- // 验证第一步的必填项
- if (!this.form.category || !this.form.affairType || !this.form.contractType ||
- !this.form.purchaseForm || !this.form.purchaseMethod) {
- this.$Message.warning('请填写所有必填项')
+ // 验证是否至少选择了一个下拉框
+ if (!this.form.category && !this.form.affairType && !this.form.contractType &&
+ !this.form.purchaseForm && !this.form.purchaseMethod) {
+ this.$Message.warning('请至少选择一个选项')
return
}
// 获取模版配置
@@ -1958,10 +2027,10 @@ export default {
async getTemplateConfig() {
try {
const params = {
- category: this.form.category,
- work_type: this.form.affairType,
- contract_type: this.form.contractType,
- purchase_form: this.form.purchaseForm
+ category: this.form.category || 0,
+ work_type: this.form.affairType || 0,
+ contract_type: this.form.contractType || 0,
+ purchase_form: this.form.purchaseForm || 0
}
console.log('请求模版配置参数:', params)
@@ -2038,11 +2107,11 @@ export default {
purchaseMethod: '',
name: '',
type: '', // 项目类型
- money_way_id: '',
+ moneyWay: [],
plan: [],
plan_display: '', // 预算计划显示文本
price: 0,
- supply: '',
+ supply: '', // 承包商/供应商
// 流程控制字段
is_simple: 0, // 是否为简易流程
has_charge: 0, // 是否为河道处收费类项目
@@ -2061,7 +2130,8 @@ export default {
payee: ''
}
],
- showAfterPayment: false // 是否显示事后支付表格
+ showAfterPayment: false, // 是否显示事后支付表格
+ contract_carry_department: [] // 新增执行科室字段
}
this.affairTypeOptions = []
@@ -2229,6 +2299,27 @@ export default {
nextPaymentStep() {
this.form.showAfterPayment = true
},
+ // 获取资金渠道名称的方法
+ getMoneyWayName(id) {
+ const way = this.moneyWay.find(item => item.id === id)
+ return way ? way.value : ''
+ },
+
+ // 移除资金渠道
+ removeMoneyWay(id) {
+ this.form.moneyWay = this.form.moneyWay.filter(item => item !== id)
+ },
+
+ // 获取科室名称的方法
+ getDepartmentName(id) {
+ const dept = this.departments.find(item => item.id === id)
+ return dept ? dept.name : ''
+ },
+
+ // 移除科室
+ removeDepartment(id) {
+ this.form.contract_carry_department = this.form.contract_carry_department.filter(item => item !== id)
+ },
},
mounted() {
this.window.width = screen.availWidth * 0.95
@@ -2625,4 +2716,43 @@ export default {
min-width: 100px;
}
}
+
+.no-payment-form {
+ padding: 20px;
+ text-align: center;
+ color: #909399;
+ font-size: 14px;
+ background-color: #f5f7fa;
+ border-radius: 4px;
+}
+
+.money-way-selector {
+ width: 100%;
+
+ .money-way-tags {
+ margin-top: 8px;
+ display: flex;
+ flex-wrap: wrap;
+ gap: 8px;
+
+ .el-tag {
+ margin-right: 0;
+ }
+ }
+}
+
+.department-selector {
+ width: 100%;
+
+ .department-tags {
+ margin-top: 8px;
+ display: flex;
+ flex-wrap: wrap;
+ gap: 8px;
+
+ .el-tag {
+ margin-right: 0;
+ }
+ }
+}