2022-12-12 09:52:25 +00:00
|
|
|
|
<#assign base=request.contextPath />
|
|
|
|
|
|
<#import "../../common/defaultLayout.ftl" as defaultLayout>
|
|
|
|
|
|
<@defaultLayout.layout>
|
|
|
|
|
|
<#-- <link rel="stylesheet" href="../assets/css/amazeui.switch.css"/>-->
|
|
|
|
|
|
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
|
|
|
|
|
|
<style>
|
|
|
|
|
|
|
|
|
|
|
|
#businessPurchaseDetailsModal {
|
|
|
|
|
|
overflow: auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#businessPurchaseDetailsModal > table {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-12-26 10:03:45 +00:00
|
|
|
|
#procurementContractProcess {
|
2022-12-12 09:52:25 +00:00
|
|
|
|
overflow: auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.el-upload__input {
|
|
|
|
|
|
display: none !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-12-13 09:37:06 +00:00
|
|
|
|
.el-textarea .el-input__count {
|
|
|
|
|
|
line-height: 15px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.admin-content-body {
|
|
|
|
|
|
margin-bottom: 100px;
|
|
|
|
|
|
}
|
2022-12-14 06:20:25 +00:00
|
|
|
|
|
|
|
|
|
|
.el-table__empty-block {
|
|
|
|
|
|
height: 60px !important;
|
|
|
|
|
|
}
|
2022-12-22 09:05:55 +00:00
|
|
|
|
|
|
|
|
|
|
.el-upload-list__item-name [class^="el-icon"] {
|
|
|
|
|
|
height: unset;
|
|
|
|
|
|
}
|
2022-12-23 09:24:05 +00:00
|
|
|
|
|
|
|
|
|
|
.el-checkbox {
|
2022-12-23 03:37:16 +00:00
|
|
|
|
margin-right: 10px;
|
|
|
|
|
|
}
|
2022-12-26 10:03:45 +00:00
|
|
|
|
|
|
|
|
|
|
.supplierChoose {
|
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.el-input-number--mini .el-input-number__decrease, .el-input-number--mini .el-input-number__increase {
|
|
|
|
|
|
height: 93%;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.el-input-number i {
|
|
|
|
|
|
line-height: unset;
|
|
|
|
|
|
}
|
2022-12-27 06:14:05 +00:00
|
|
|
|
|
|
|
|
|
|
[v-cloak] {
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
}
|
2022-12-28 09:27:53 +00:00
|
|
|
|
|
|
|
|
|
|
.supplierChoose .el-alert {
|
|
|
|
|
|
border-radius: unset;
|
|
|
|
|
|
}
|
2022-12-12 09:52:25 +00:00
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="admin-content" id="app">
|
|
|
|
|
|
<div class="admin-content-body">
|
|
|
|
|
|
<div class="am-cf am-padding">
|
|
|
|
|
|
<div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">业务应用</strong> /
|
2022-12-27 06:14:05 +00:00
|
|
|
|
<small v-cloak>{{subTitle}}</small></div>
|
2022-12-12 09:52:25 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="am-g">
|
|
|
|
|
|
<div class="am-u-sm-12 am-u-md-12" v-if="isButtonMode">
|
2022-12-13 09:37:06 +00:00
|
|
|
|
<button type="button" class="am-btn" @click="goToSaleContractProcess">
|
2022-12-12 09:52:25 +00:00
|
|
|
|
<img src="${base}/assets/process/销售合同流程@3x.png" width="36"/>
|
|
|
|
|
|
销售合同流程
|
|
|
|
|
|
</button>
|
2022-12-26 10:03:45 +00:00
|
|
|
|
<button type="button" class="am-btn" @click="newProcurementContractClick">
|
2022-12-12 09:52:25 +00:00
|
|
|
|
<img src="${base}/assets/process/业务采购流程@3x.png" width="39"/>
|
|
|
|
|
|
业务采购流程
|
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2022-12-28 09:27:53 +00:00
|
|
|
|
<#-- 业务采购流程项目选择 -->
|
2022-12-29 03:31:32 +00:00
|
|
|
|
<el-dialog title="请选择项目编号" :visible.sync="procurementProjectSelectorVisible"
|
|
|
|
|
|
destroy-on-close v-cloak width="40%">
|
2022-12-28 09:27:53 +00:00
|
|
|
|
|
|
|
|
|
|
<el-autocomplete v-model="processForm.projectNo" :fetch-suggestions="queryProject" clearable
|
2022-12-28 09:49:08 +00:00
|
|
|
|
value-key="projectNo" placeholder="请输入项目编号或名称,支持模糊查询" @select="handleSelectProject"
|
2022-12-28 09:27:53 +00:00
|
|
|
|
@clear="clearProjectProcess" style="width: 100%;">
|
|
|
|
|
|
<template slot="prepend">项目编号</template>
|
2022-12-28 09:49:08 +00:00
|
|
|
|
<#--显示项目名称,但是值是 projectNo 定义显示的列表样式-->
|
|
|
|
|
|
<template slot-scope="{ item }">
|
2022-12-28 10:09:38 +00:00
|
|
|
|
<span>{{ item.name }}</span>
|
2022-12-28 09:49:08 +00:00
|
|
|
|
</template>
|
2022-12-28 09:27:53 +00:00
|
|
|
|
</el-autocomplete>
|
|
|
|
|
|
|
|
|
|
|
|
<div slot="footer">
|
|
|
|
|
|
<el-button type="primary" @click="selectProcurementDetail">下一步</el-button>
|
2022-12-12 09:52:25 +00:00
|
|
|
|
</div>
|
2022-12-28 09:27:53 +00:00
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
2022-12-29 03:31:32 +00:00
|
|
|
|
<el-dialog title="预算采购明细" :visible="procurementDetailSelectorVisible" v-cloak width="90%" :close-on-click-modal="false">
|
2022-12-28 09:27:53 +00:00
|
|
|
|
|
|
|
|
|
|
<el-table border :data="procurementDetails">
|
|
|
|
|
|
<el-table-column type="index" :index="1" label="序号" fixed></el-table-column>
|
|
|
|
|
|
<el-table-column prop="feeType" label="费用项目" fixed width="80"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="name" label="产品名称" fixed></el-table-column>
|
|
|
|
|
|
<el-table-column prop="category" label="采购类别" fixed></el-table-column>
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column prop="amount" label="数量"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="unit" label="单位"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="price" label="预算单价" width="100"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="taxRate" label="税率(%)"></el-table-column>
|
2022-12-29 03:31:32 +00:00
|
|
|
|
<el-table-column prop="totalTaxInclude_" label="含税总金额(元)" width="120"></el-table-column>
|
2022-12-28 09:27:53 +00:00
|
|
|
|
<el-table-column prop="totalTaxExclude" label="不含税金额(元)" width="120"></el-table-column>
|
2022-12-28 10:09:38 +00:00
|
|
|
|
<el-table-column prop="totalTax" label="税金(元)" width="110"></el-table-column>
|
2022-12-28 09:27:53 +00:00
|
|
|
|
<el-table-column prop="isUnderwritten" label="是否垫资"></el-table-column>
|
2022-12-28 10:09:38 +00:00
|
|
|
|
<el-table-column prop="payTime" label="支出时间" width="160"></el-table-column>
|
2022-12-28 09:27:53 +00:00
|
|
|
|
<el-table-column prop="payAmount" label="支出金额(元)" width="120"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="amountAlready" label="已采购数量" width="100"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="amountCurrent" label="本次采购数量" width="180">
|
|
|
|
|
|
<template slot-scope="scope">
|
2022-12-29 03:31:32 +00:00
|
|
|
|
<el-input-number :precision="2" :step="0.1" :min="0" v-model="scope.row.amountCurrent"
|
|
|
|
|
|
:disabled="scope.row.amount - scope.row.amountAlready===0" size="mini"
|
|
|
|
|
|
:max="scope.row.amount - scope.row.amountAlready" controls-position="right">
|
|
|
|
|
|
</el-input-number>
|
2022-12-28 09:27:53 +00:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column prop="amountLeft" label="未采购数量" width="100">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<span>{{scope.row.amount - scope.row.amountAlready}}</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
2022-12-29 03:31:32 +00:00
|
|
|
|
<el-button type="primary" @click="saveProcurementDetail">下一步</el-button>
|
2022-12-28 09:27:53 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</el-dialog>
|
2022-12-12 09:52:25 +00:00
|
|
|
|
|
|
|
|
|
|
<#-- 新增销售合同流程 -->
|
|
|
|
|
|
|
2022-12-27 06:14:05 +00:00
|
|
|
|
<div class="am-u-sm-12 am-u-md-12" v-cloak v-if="isSalesContractMode || isProcurementContractMode">
|
2022-12-27 08:03:37 +00:00
|
|
|
|
<el-form :inline="true" ref="contractProcessForm" :model="processForm" label-position="right" label-width="110px">
|
2022-12-12 09:52:25 +00:00
|
|
|
|
|
|
|
|
|
|
<div class="am-form-inline">
|
2022-12-28 09:27:53 +00:00
|
|
|
|
<el-tooltip :disabled="projectSelected && hasText(processForm.projectNo)" effect="light" content="项目编号或名称,支持模糊查询"
|
|
|
|
|
|
placement="top-end">
|
2022-12-12 09:52:25 +00:00
|
|
|
|
<el-form-item label="项目编号">
|
2022-12-28 09:27:53 +00:00
|
|
|
|
<el-autocomplete :disabled="projectSelected" clearable @clear="clearProjectProcess"
|
|
|
|
|
|
v-model="processForm.projectNo" :fetch-suggestions="queryProject"
|
2022-12-28 09:35:28 +00:00
|
|
|
|
value-key="projectNo" placeholder="请输入项目编号或名称" @select="handleSelectProject">
|
|
|
|
|
|
<#--显示项目名称,但是值是 projectNo 定义显示的列表样式-->
|
|
|
|
|
|
<template slot-scope="{ item }">
|
|
|
|
|
|
<el-tooltip effect="light" :content="item.name" placement="top-start">
|
|
|
|
|
|
<span>{{ item.name }}</span>
|
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
|
</template>
|
2022-12-28 09:27:53 +00:00
|
|
|
|
|
|
|
|
|
|
<el-popconfirm slot="append" title="确定重新选择项目吗?填写的表单将丢弃"
|
|
|
|
|
|
:disabled="!projectSelected" @confirm="clearProjectProcess">
|
|
|
|
|
|
<el-button type="danger" slot="reference" icon="el-icon-delete" size="mini"></el-button>
|
|
|
|
|
|
</el-popconfirm>
|
|
|
|
|
|
|
2022-12-12 09:52:25 +00:00
|
|
|
|
</el-autocomplete>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
|
|
2022-12-28 09:27:53 +00:00
|
|
|
|
<el-tooltip :disabled="!projectSelected" effect="light" :content="processForm.projectTitle" placement="top-start">
|
2022-12-14 08:07:26 +00:00
|
|
|
|
<el-form-item label="项目标题">
|
2022-12-28 09:27:53 +00:00
|
|
|
|
<span v-if="projectSelected">{{processForm.projectTitle}}</span>
|
2022-12-14 08:07:26 +00:00
|
|
|
|
<span v-else>未选择项目</span>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-tooltip>
|
2022-12-12 09:52:25 +00:00
|
|
|
|
|
|
|
|
|
|
<el-form-item label="申请时间">
|
2022-12-14 08:07:26 +00:00
|
|
|
|
<span v-if="projectSelected">{{processForm.applyDate}}</span>
|
|
|
|
|
|
<span v-else>未选择项目</span>
|
2022-12-12 09:52:25 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
2022-12-26 10:03:45 +00:00
|
|
|
|
<el-form-item :rules="[{ required: true, message: '采购模式不能为空'}]"
|
|
|
|
|
|
label="采购模式" prop="procurementMode" v-if="isProcurementContractMode">
|
|
|
|
|
|
<el-select v-model="processForm.procurementMode" placeholder="请选择采购模式">
|
|
|
|
|
|
<#list procurementMode as item>
|
|
|
|
|
|
<el-option label="${item.description}" value="${item.name()}"></el-option>
|
|
|
|
|
|
</#list>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="项目类型" v-if="isSalesContractMode">
|
2022-12-14 08:07:26 +00:00
|
|
|
|
<span v-if="projectSelected">{{processForm.projectType}}</span>
|
|
|
|
|
|
<span v-else>未选择项目</span>
|
2022-12-12 09:52:25 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="合作类型">
|
2022-12-14 08:07:26 +00:00
|
|
|
|
<span v-if="projectSelected">{{processForm.cooperationType}}</span>
|
|
|
|
|
|
<span v-else>未选择项目</span>
|
2022-12-12 09:52:25 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
2022-12-27 08:03:37 +00:00
|
|
|
|
<el-form-item label="申请部门" prop="applyDeptId" :rules="[{ required: true, message: '申请部门不能为空'}]">
|
|
|
|
|
|
<el-cascader :options="applyDeptSectorOptions" clearable v-model="processForm.applyDeptId"
|
2022-12-27 07:15:48 +00:00
|
|
|
|
:props="{ expandTrigger: 'hover', label:'name', value: 'id'}" @change="applyDeptSelected"></el-cascader>
|
2022-12-12 09:52:25 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="申请人">
|
2022-12-14 08:07:26 +00:00
|
|
|
|
<span v-if="projectSelected">{{processForm.applyPersonName}}</span>
|
|
|
|
|
|
<span v-else>未选择项目</span>
|
2022-12-12 09:52:25 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="申请部门领导">
|
2022-12-27 07:15:48 +00:00
|
|
|
|
<span v-if="processForm.applyDeptLeaderName">{{processForm.applyDeptLeaderName}}</span>
|
2022-12-14 08:07:26 +00:00
|
|
|
|
<span v-else>未选择部门</span>
|
2022-12-12 09:52:25 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
2022-12-27 10:08:57 +00:00
|
|
|
|
<el-form-item v-if="isSalesContractMode" label="申请人电话" prop="applyPersonPhone"
|
2022-12-29 03:31:32 +00:00
|
|
|
|
:rules="[{ required: true, message: '申请人电话不能为空'},
|
|
|
|
|
|
{ pattern:/^((0\d{2,3}-\d{7,8})|(1[3584]\d{9}))$/, message: '请输入合法手机号', trigger: 'blur' }]">
|
2022-12-13 09:37:06 +00:00
|
|
|
|
<el-input placeholder="请输入内容" v-model="processForm.applyPersonPhone"></el-input>
|
2022-12-12 09:52:25 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
2022-12-13 09:37:06 +00:00
|
|
|
|
<el-form-item label="合同编号" :rules="[{ required: true, message: '合同编号不能为空'}]" prop="contractNo">
|
|
|
|
|
|
<el-input placeholder="请输入合同编号" v-model="processForm.contractNo"></el-input>
|
2022-12-12 09:52:25 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
2022-12-26 10:03:45 +00:00
|
|
|
|
<el-form-item :rules="[{ required: true, message: '合同名称不能为空'}]"
|
|
|
|
|
|
label="合同名称" prop="contractName" v-if="isSalesContractMode">
|
2022-12-13 09:37:06 +00:00
|
|
|
|
<el-input placeholder="请输入合同名称" v-model="processForm.contractName"></el-input>
|
2022-12-12 09:52:25 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
2022-12-26 10:03:45 +00:00
|
|
|
|
<el-form-item v-if="isProcurementContractMode" label="采购合同名称"
|
|
|
|
|
|
:rules="[{ required: true, message: '采购合同名称不能为空'}]" prop="contractName">
|
|
|
|
|
|
<el-input placeholder="请输入采购合同名称" v-model="processForm.contractName"></el-input>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
2022-12-12 09:52:25 +00:00
|
|
|
|
<el-form-item label="合同金额">
|
2022-12-14 08:07:26 +00:00
|
|
|
|
<span v-if="projectSelected">{{processForm.contractAmount}}元</span>
|
|
|
|
|
|
<span v-else>未选择项目</span>
|
2022-12-12 09:52:25 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div>
|
2022-12-26 10:03:45 +00:00
|
|
|
|
<el-form-item v-if="isSalesContractMode" label="客户名称" :rules="[{ required: true, message: '客户名称不能为空'}]">
|
2022-12-14 08:07:26 +00:00
|
|
|
|
<el-input placeholder="请输入客户名称" v-model="processForm.clientName"></el-input>
|
2022-12-12 09:52:25 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
2022-12-26 10:03:45 +00:00
|
|
|
|
<el-form-item v-if="isProcurementContractMode" label="供应商名称" :rules="[{ required: true, message: '供应商名称不能为空'}]">
|
|
|
|
|
|
<el-input placeholder="请输入供应商" v-model="processForm.supplierName"></el-input>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
2022-12-12 09:52:25 +00:00
|
|
|
|
<el-form-item label="最终用户名称">
|
2022-12-14 08:07:26 +00:00
|
|
|
|
<#--TODO 最终用户名称-->
|
2022-12-23 02:59:25 +00:00
|
|
|
|
<span v-if="projectSelected">{{processForm.terminalCustomer}}</span>
|
2022-12-14 08:07:26 +00:00
|
|
|
|
<span v-else>未选择项目</span>
|
2022-12-12 09:52:25 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div>
|
2022-12-13 09:37:06 +00:00
|
|
|
|
<el-form-item label="用印类型" :rules="[{ required: true, message: '用印类型不能为空'}]">
|
2022-12-14 09:50:41 +00:00
|
|
|
|
<el-checkbox-group v-model="processForm.sealTypes">
|
2022-12-13 09:37:06 +00:00
|
|
|
|
<#list sealTypes as sealType>
|
|
|
|
|
|
<el-checkbox label="${sealType.name()}" key="key-${sealType.name()}">${sealType.description}</el-checkbox>
|
|
|
|
|
|
</#list>
|
2022-12-12 09:52:25 +00:00
|
|
|
|
</el-checkbox-group>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
2022-12-13 09:37:06 +00:00
|
|
|
|
<el-form-item label="税率" :rules="[{ required: true, message: '税率不能为空'}]" prop="taxRate">
|
|
|
|
|
|
<el-select v-model="processForm.taxRate" placeholder="请选择税率">
|
|
|
|
|
|
<#list taxRate as rate>
|
|
|
|
|
|
<el-option label="${rate}%" value="${rate}"></el-option>
|
|
|
|
|
|
</#list>
|
2022-12-12 09:52:25 +00:00
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="是否垫资">
|
2022-12-14 08:07:26 +00:00
|
|
|
|
<span v-if="projectSelected">{{processForm.isPrepaid}}</span>
|
|
|
|
|
|
<span v-else>未选择项目</span>
|
2022-12-12 09:52:25 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="垫资金额">
|
2022-12-14 08:07:26 +00:00
|
|
|
|
<span v-if="projectSelected">{{processForm.repaidAmount}}</span>
|
|
|
|
|
|
<span v-else>未选择项目</span>
|
2022-12-12 09:52:25 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="预算毛利率">
|
2022-12-14 08:07:26 +00:00
|
|
|
|
<span v-if="projectSelected">{{processForm.budgetGrossMargin}}</span>
|
|
|
|
|
|
<span v-else>未选择项目</span>
|
2022-12-12 09:52:25 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div>
|
2022-12-26 10:03:45 +00:00
|
|
|
|
<el-form-item v-if="isSalesContractMode" label="收款条件" :rules="[{ required: true, message: '收款条件不能为空'}]"
|
|
|
|
|
|
prop="paymentTerms">
|
2022-12-29 03:31:32 +00:00
|
|
|
|
<el-input type="textarea" :autosize="{ minRows: 5, maxRows: 10}" cols="90" maxlength="5000" show-word-limit
|
2022-12-13 09:37:06 +00:00
|
|
|
|
v-model="processForm.paymentTerms" placeholder="请输入收款条件(限制5000字)"></el-input>
|
2022-12-12 09:52:25 +00:00
|
|
|
|
</el-form-item>
|
2022-12-26 10:03:45 +00:00
|
|
|
|
|
|
|
|
|
|
<el-form-item v-if="isProcurementContractMode" label="付款条件" :rules="[{ required: true, message: '付款条件不能为空'}]"
|
|
|
|
|
|
prop="paymentTerms">
|
2022-12-29 03:31:32 +00:00
|
|
|
|
<el-input type="textarea" :autosize="{ minRows: 5, maxRows: 10}" cols="90" maxlength="5000" show-word-limit
|
2022-12-26 10:03:45 +00:00
|
|
|
|
v-model="processForm.paymentTerms" placeholder="请输入付款条件(限制5000字)"></el-input>
|
|
|
|
|
|
</el-form-item>
|
2022-12-12 09:52:25 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<el-form-item label="备注">
|
2022-12-29 03:31:32 +00:00
|
|
|
|
<el-input type="textarea" :autosize="{ minRows: 5, maxRows: 10}" maxlength="5000" show-word-limit
|
2022-12-13 09:37:06 +00:00
|
|
|
|
v-model="processForm.remark" placeholder="请输入备注(限制5000字)" cols="90"></el-input>
|
2022-12-12 09:52:25 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div>
|
2022-12-22 09:05:55 +00:00
|
|
|
|
<el-form-item label="上传附件" :rules="[{ required: true, message: '未上传附件'}]">
|
2022-12-12 09:52:25 +00:00
|
|
|
|
<el-upload class="upload-demo"
|
2022-12-22 09:05:55 +00:00
|
|
|
|
action="${base}/file/upload"
|
|
|
|
|
|
name="files[]"
|
2022-12-12 09:52:25 +00:00
|
|
|
|
:on-remove="handleRemove"
|
|
|
|
|
|
:before-remove="beforeRemove"
|
2022-12-22 09:05:55 +00:00
|
|
|
|
:on-success="handleFileUploaded"
|
|
|
|
|
|
:limit="10"
|
|
|
|
|
|
:on-exceed="handleExceed">
|
2022-12-12 09:52:25 +00:00
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
|
|
<div slot="tip" class="el-upload__tip">只能上传PDF、excel、word、图片、压缩包,且不超过50MB</div>
|
|
|
|
|
|
</el-upload>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<el-form-item label="合同清单明细">
|
2022-12-26 10:03:45 +00:00
|
|
|
|
<el-button type="text" @click="goToContractDetail">详细清单</el-button>
|
2022-12-12 09:52:25 +00:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
2022-12-27 06:53:06 +00:00
|
|
|
|
<#-- 供应商比选材料 -->
|
2022-12-26 10:03:45 +00:00
|
|
|
|
<div class="am-u-sm-12 am-u-md-12 supplierChoose" v-if="isProcurementContractMode">
|
|
|
|
|
|
<el-alert title="供应商比选材料" type="success" center :closable="false"></el-alert>
|
|
|
|
|
|
|
|
|
|
|
|
<el-table style="width: 100%" border :data="supplierMaterialsForm" v-model="supplierMaterialsForm" empty-text="暂无">
|
|
|
|
|
|
<el-table-column type="index" :index="1" label="序号" fixed></el-table-column>
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column prop="companyName" label="公司名称" width="180" align="center">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-input size="mini" placeholder="请输入公司名称" v-model="scope.row.companyName"></el-input>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2022-12-27 10:08:57 +00:00
|
|
|
|
<el-table-column prop="totalAmount" label="合计金额" width="160" align="center">
|
2022-12-26 10:03:45 +00:00
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-input-number size="mini" :precision="2" :step="0.1" :max="100" :min="0"
|
|
|
|
|
|
v-model="scope.row.totalAmount"></el-input-number>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column prop="serviceTerms" label="服务条款" width="180" align="center">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-input size="mini" placeholder="请输入服务条款" v-model="scope.row.serviceTerms"></el-input>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column prop="paymentTerms" label="付款条件" align="center">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-input size="mini" placeholder="请输入付款条件" v-model="scope.row.paymentTerms"></el-input>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2022-12-27 10:08:57 +00:00
|
|
|
|
<el-table-column prop="taxRate" label="税率(%)" width="160" align="center">
|
2022-12-26 10:03:45 +00:00
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-input-number size="mini" :precision="2" :step="0.1" :max="100" :min="0"
|
|
|
|
|
|
v-model="scope.row.taxRate"></el-input-number>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column prop="remark" label="备注" align="center">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<#--
|
|
|
|
|
|
<el-input type="textarea" size="mini" maxlength="100"
|
|
|
|
|
|
v-model="scope.row.remark" placeholder="请输入备注(限制100字)" cols="90"></el-input>
|
|
|
|
|
|
-->
|
|
|
|
|
|
<el-input size="mini" placeholder="请输入备注"
|
|
|
|
|
|
v-model="scope.row.remark"></el-input>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column prop="attachment" label="附件" align="center" width="150">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-tag size="small" v-if="scope.row.attachment">
|
|
|
|
|
|
<a :href="scope.row.attachment.uri">
|
|
|
|
|
|
<i class="el-icon-document"></i> {{scope.row.attachment.name}}
|
|
|
|
|
|
</a>
|
|
|
|
|
|
</el-tag>
|
|
|
|
|
|
<el-upload v-else class="upload-demo"
|
|
|
|
|
|
action="${base}/file/upload"
|
|
|
|
|
|
name="files[]"
|
|
|
|
|
|
:on-remove="handleRemove"
|
|
|
|
|
|
:before-remove="beforeRemove"
|
|
|
|
|
|
:on-success="handleFileUploaded"
|
|
|
|
|
|
:limit="1"
|
|
|
|
|
|
size="mini">
|
|
|
|
|
|
<el-button size="small" type="text">上传附件</el-button>
|
|
|
|
|
|
</el-upload>
|
|
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
|
|
<el-button type="primary" icon="el-icon-plus" circle size="mini" @click="addSupplierRow"
|
|
|
|
|
|
style="float: right;margin-top: 10px;"></el-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2022-12-27 06:14:05 +00:00
|
|
|
|
<el-row class="am-u-sm-12 am-u-md-12" v-cloak>
|
2022-12-13 09:37:06 +00:00
|
|
|
|
<el-button type="info" @click="goToHome">返回上一级</el-button>
|
|
|
|
|
|
<el-button type="primary" @click="saveDraft">保存草稿</el-button>
|
2022-12-23 09:24:05 +00:00
|
|
|
|
<el-button type="success" @click="submitForm">提交</el-button>
|
2022-12-13 09:37:06 +00:00
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<#-- 销售合同清单明细 -->
|
|
|
|
|
|
|
2022-12-27 06:14:05 +00:00
|
|
|
|
<div v-cloak class="am-u-sm-12 am-u-md-12" v-if="isSaleContractDetailMode">
|
2022-12-22 09:05:55 +00:00
|
|
|
|
<el-table border :data="incomeDetails">
|
2022-12-14 06:20:25 +00:00
|
|
|
|
<el-table-column type="index" :index="1" label="序号" fixed></el-table-column>
|
|
|
|
|
|
<el-table-column prop="name" label="名称" fixed width="120"></el-table-column>
|
2022-12-13 10:16:15 +00:00
|
|
|
|
<el-table-column prop="type" label="类别"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="spec" label="规格型号"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="param" label="参数"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="amount" label="数量"></el-table-column>
|
2022-12-29 03:31:32 +00:00
|
|
|
|
<el-table-column prop="unit" label="单位"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="price" label="单价(元)" width="120"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="taxRate" label="税率(%)"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="totalTaxInclude" label="含税金额(元)" width="120"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="totalTaxExclude" label="不含税金额(元)" width="120"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="totalTax" label="税金(元)" width="120"></el-table-column>
|
2022-12-14 06:20:25 +00:00
|
|
|
|
|
|
|
|
|
|
<el-table-column prop="expirationDate" label="质保期" fixed="right" width="150">
|
|
|
|
|
|
<template slot-scope="scope">
|
2022-12-29 03:31:32 +00:00
|
|
|
|
<el-input maxlength="5" size="mini" placeholder="请输入质保期" show-word-limit
|
2022-12-14 06:20:25 +00:00
|
|
|
|
v-model="scope.row.expirationDate"></el-input>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2022-12-13 09:37:06 +00:00
|
|
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
2022-12-13 10:16:15 +00:00
|
|
|
|
<el-row style="margin: 20px 0">
|
|
|
|
|
|
<el-button type="info" @click="goToSaleContractProcess">返回上一级</el-button>
|
|
|
|
|
|
<el-button type="primary" @click="submitToSaleContractProcess">保存并返回上一级</el-button>
|
2022-12-13 09:37:06 +00:00
|
|
|
|
</el-row>
|
|
|
|
|
|
|
2022-12-12 09:52:25 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<#-- 新增业务采购合同流程 -->
|
|
|
|
|
|
|
2022-12-13 09:37:06 +00:00
|
|
|
|
<#-- 选择 业务采购清单明细 -->
|
|
|
|
|
|
|
2022-12-27 10:08:57 +00:00
|
|
|
|
<div v-cloak class="am-u-sm-12 am-u-md-12" v-if="isProcurementContractDetailMode">
|
2022-12-29 03:31:32 +00:00
|
|
|
|
<el-table style="width: 100%" border :data="procurementDetails">
|
|
|
|
|
|
<el-table-column type="index" :index="1" label="序号" fixed></el-table-column>
|
|
|
|
|
|
<el-table-column prop="feeType" label="费用项目" fixed width="80"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="name" label="产品名称" fixed></el-table-column>
|
|
|
|
|
|
<el-table-column prop="category" label="采购类别" fixed></el-table-column>
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column prop="amount" label="数量"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="unit" label="单位"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="price" label="预算单价" width="100"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="taxRate" label="税率(%)"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="totalTaxInclude_" label="含税总金额(元)" width="120"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="totalTaxExclude" label="不含税金额(元)" width="120"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="totalTax" label="税金(元)" width="110"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="isUnderwritten" label="是否垫资"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="payTime" label="支出时间" width="160"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="payAmount" label="支出金额(元)" width="120"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="amountAlready" label="已采购数量" width="100"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="amountCurrent" label="本次采购数量" width="180">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-input-number :precision="2" :step="0.1" :min="0" v-model="scope.row.amountCurrent"
|
|
|
|
|
|
:disabled="scope.row.amount - scope.row.amountAlready===0" size="mini"
|
|
|
|
|
|
:max="scope.row.amount - scope.row.amountAlready" controls-position="right">
|
|
|
|
|
|
</el-input-number>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column prop="amountLeft" label="未采购数量" width="100">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<span>{{scope.row.amount - scope.row.amountAlready}}</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column prop="supplierName" label="供应商名称" width="200">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-input size="mini" placeholder="请输入供应商名称" v-model="scope.row.supplierName"></el-input>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column prop="manufacturerName" label="设备厂商名称" width="200">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-input size="mini" placeholder="请输入设备厂商名称" v-model="scope.row.manufacturerName"></el-input>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column prop="purchaseList" label="对应采购清单" width="200">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-input size="mini" placeholder="请输入对应采购清单" v-model="scope.row.purchaseList"></el-input>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column prop="spec" label="规格型号" width="200">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-input size="mini" placeholder="请输入规格型号" v-model="scope.row.spec"></el-input>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column prop="procurementAmount" label="对应采购数目" width="200">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-input-number size="mini" :precision="2" :step="0.1" :min="0"
|
|
|
|
|
|
v-model="scope.row.procurementAmount" controls-position="right"></el-input-number>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column prop="procurementPrice" label="采购单价" width="200">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-input-number size="mini" :precision="2" :step="1" :min="0"
|
|
|
|
|
|
v-model="scope.row.procurementPrice" controls-position="right"></el-input-number>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column prop="totalTaxInclude" label="含税总金额(元)" width="200">
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-input-number size="mini" :precision="2" :step="0.1" :min="0"
|
|
|
|
|
|
v-model="scope.row.totalTaxInclude" controls-position="right"></el-input-number>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2022-12-13 09:37:06 +00:00
|
|
|
|
|
|
|
|
|
|
</el-table>
|
2022-12-27 08:46:35 +00:00
|
|
|
|
|
|
|
|
|
|
<el-row style="margin: 20px 0">
|
|
|
|
|
|
<el-button type="info" @click="goToProcurementContract">返回上一级</el-button>
|
|
|
|
|
|
<el-button type="primary" @click="goToProcurementContract">保存并返回上一级</el-button>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
2022-12-13 09:37:06 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
|
2022-12-12 09:52:25 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<script src="https://unpkg.com/vue@2/dist/vue.js"></script>
|
|
|
|
|
|
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
2022-12-26 10:03:45 +00:00
|
|
|
|
const procurementContractProcess = "procurementContractProcess"
|
|
|
|
|
|
const procurementContractDetail = "procurementContractDetail"
|
2022-12-13 09:37:06 +00:00
|
|
|
|
const saleContractProcess = "saleContractProcess"
|
|
|
|
|
|
const saleContractDetail = "saleContractDetail"
|
2022-12-12 09:52:25 +00:00
|
|
|
|
const BUTTON = "btn"
|
2022-12-29 03:31:32 +00:00
|
|
|
|
const saleContract = "sale_contract"
|
|
|
|
|
|
const procurementContract = "procurement_contract"
|
2022-12-12 09:52:25 +00:00
|
|
|
|
|
2022-12-13 09:37:06 +00:00
|
|
|
|
const isEmpty = (obj) => {
|
|
|
|
|
|
return !obj || (obj.length && obj.length === 0)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const isNotEmpty = (obj) => {
|
|
|
|
|
|
return !isEmpty(obj)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const isBlank = (obj) => {
|
|
|
|
|
|
return isEmpty(obj) || (obj.trim && isEmpty(obj.trim()))
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const hasText = (obj) => {
|
|
|
|
|
|
return !isBlank(obj)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-12-12 09:52:25 +00:00
|
|
|
|
const data = () => {
|
|
|
|
|
|
return {
|
2022-12-26 10:03:45 +00:00
|
|
|
|
mode: "btn", // btn , procurementContractProcess
|
2022-12-13 09:37:06 +00:00
|
|
|
|
processForm: {
|
2022-12-14 09:50:41 +00:00
|
|
|
|
sealTypes: [],
|
2022-12-13 09:37:06 +00:00
|
|
|
|
},
|
2022-12-26 10:03:45 +00:00
|
|
|
|
supplierMaterialsForm: [],
|
2022-12-12 09:52:25 +00:00
|
|
|
|
projectSelected: false,
|
2022-12-27 06:14:05 +00:00
|
|
|
|
applyDeptSectorOptions: [],
|
2022-12-12 09:52:25 +00:00
|
|
|
|
fileList: [],
|
2022-12-14 09:50:41 +00:00
|
|
|
|
// 销售合同收入明细
|
|
|
|
|
|
incomeDetails: [],
|
2022-12-28 09:27:53 +00:00
|
|
|
|
procurementDetails: [],
|
2022-12-27 07:15:48 +00:00
|
|
|
|
processType: "",
|
2022-12-28 09:27:53 +00:00
|
|
|
|
procurementProjectSelectorVisible: false,
|
|
|
|
|
|
procurementDetailSelectorVisible: false
|
2022-12-12 09:52:25 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const methods = {
|
2022-12-28 09:27:53 +00:00
|
|
|
|
isEmpty,
|
|
|
|
|
|
isBlank,
|
|
|
|
|
|
hasText,
|
2022-12-12 09:52:25 +00:00
|
|
|
|
changeMode(mode) {
|
|
|
|
|
|
this.mode = mode
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2022-12-26 10:03:45 +00:00
|
|
|
|
newProcurementContractClick() {
|
2022-12-28 09:27:53 +00:00
|
|
|
|
// 先选择 项目 (打开对话框)
|
|
|
|
|
|
this.procurementProjectSelectorVisible = true
|
|
|
|
|
|
},
|
|
|
|
|
|
selectProcurementDetail() {
|
|
|
|
|
|
if (this.processForm.projectId) {
|
|
|
|
|
|
// 预算采购明细表 (打开对话框)
|
|
|
|
|
|
this.procurementProjectSelectorVisible = false
|
|
|
|
|
|
this.procurementDetailSelectorVisible = true
|
|
|
|
|
|
}
|
|
|
|
|
|
else {
|
|
|
|
|
|
this.$message.warning("项目还未选择")
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
saveProcurementDetail() {
|
|
|
|
|
|
this.procurementDetailSelectorVisible = false
|
2022-12-26 10:03:45 +00:00
|
|
|
|
this.changeMode(procurementContractProcess)
|
2022-12-29 03:31:32 +00:00
|
|
|
|
this.processType = procurementContract
|
|
|
|
|
|
|
|
|
|
|
|
this.procurementDetails = this.procurementDetails.filter(detail => {
|
|
|
|
|
|
if (detail.amountCurrent) {
|
|
|
|
|
|
return detail.amountCurrent !== 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
return false
|
|
|
|
|
|
})
|
2022-12-12 09:52:25 +00:00
|
|
|
|
},
|
|
|
|
|
|
|
2022-12-13 09:37:06 +00:00
|
|
|
|
goToHome() {
|
2022-12-27 08:46:35 +00:00
|
|
|
|
// 判断是否已填写了
|
2022-12-28 09:49:08 +00:00
|
|
|
|
if (Object.keys(this.processForm).length > 2) { // 2代表 -> sealTypes,projectTitle
|
2022-12-27 08:46:35 +00:00
|
|
|
|
this.$confirm('您确认要返回上一级吗 返回后填写的表单将重置', '返回上一级', {
|
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
this.projectSelected = false
|
|
|
|
|
|
this.initForm({})
|
|
|
|
|
|
this.changeMode(BUTTON)
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
type: 'info',
|
|
|
|
|
|
message: '已取消'
|
|
|
|
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
else {
|
|
|
|
|
|
this.changeMode(BUTTON)
|
|
|
|
|
|
}
|
2022-12-13 09:37:06 +00:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
goToSaleContractProcess() {
|
|
|
|
|
|
this.changeMode(saleContractProcess)
|
2022-12-29 03:31:32 +00:00
|
|
|
|
this.processType = saleContract
|
2022-12-13 09:37:06 +00:00
|
|
|
|
},
|
2022-12-28 09:27:53 +00:00
|
|
|
|
|
2022-12-27 08:46:35 +00:00
|
|
|
|
goToProcurementContract() {
|
2022-12-28 09:27:53 +00:00
|
|
|
|
this.changeMode(procurementContractProcess)
|
2022-12-29 03:31:32 +00:00
|
|
|
|
this.processType = procurementContract
|
2022-12-27 08:46:35 +00:00
|
|
|
|
},
|
2022-12-26 10:03:45 +00:00
|
|
|
|
|
|
|
|
|
|
goToContractDetail() {
|
2022-12-14 09:50:41 +00:00
|
|
|
|
const { projectId } = this.processForm
|
|
|
|
|
|
if (projectId) {
|
2022-12-27 08:46:35 +00:00
|
|
|
|
// 选择了才能编辑详情
|
|
|
|
|
|
if (this.isSalesContractMode) {
|
|
|
|
|
|
this.changeMode(saleContractDetail)
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (this.isProcurementContractMode) {
|
|
|
|
|
|
this.changeMode(procurementContractDetail)
|
|
|
|
|
|
}
|
2022-12-14 06:20:25 +00:00
|
|
|
|
}
|
|
|
|
|
|
else {
|
|
|
|
|
|
this.$message.warning("项目还未选择")
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2022-12-13 10:16:15 +00:00
|
|
|
|
|
2022-12-14 06:20:25 +00:00
|
|
|
|
render(obj) {
|
|
|
|
|
|
console.log(obj)
|
2022-12-13 09:37:06 +00:00
|
|
|
|
},
|
2022-12-28 09:27:53 +00:00
|
|
|
|
computeProjectTitle(processForm) {
|
|
|
|
|
|
const { projectNo, projectName, applyPersonName, applyDate } = processForm
|
|
|
|
|
|
if (projectNo && projectName) {
|
|
|
|
|
|
return projectNo.trim() + "-" + projectName.trim() + "-" + applyPersonName + "-" + applyDate.split('-').join('')
|
|
|
|
|
|
}
|
|
|
|
|
|
return ""
|
|
|
|
|
|
},
|
2022-12-14 09:50:41 +00:00
|
|
|
|
initForm(form) {
|
2022-12-28 09:27:53 +00:00
|
|
|
|
this.processForm = { ...form, sealTypes: [], projectTitle: this.computeProjectTitle(form) }
|
2022-12-14 09:50:41 +00:00
|
|
|
|
},
|
|
|
|
|
|
|
2022-12-12 09:52:25 +00:00
|
|
|
|
queryProject(q, callback) {
|
2022-12-13 09:37:06 +00:00
|
|
|
|
if (isBlank(q)) {
|
2022-12-28 09:27:53 +00:00
|
|
|
|
callback([])
|
2022-12-13 09:37:06 +00:00
|
|
|
|
return
|
|
|
|
|
|
}
|
2022-12-12 09:52:25 +00:00
|
|
|
|
fetch("${base}/process/projects?q=" + q)
|
|
|
|
|
|
.then(res => res.json())
|
|
|
|
|
|
.then(data => {
|
|
|
|
|
|
if (data.length === 0) {
|
2022-12-28 09:27:53 +00:00
|
|
|
|
callback([])
|
|
|
|
|
|
this.$message.info('未搜索到结果');
|
2022-12-13 09:37:06 +00:00
|
|
|
|
}
|
|
|
|
|
|
else {
|
2022-12-13 10:16:15 +00:00
|
|
|
|
callback(data)
|
2022-12-12 09:52:25 +00:00
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
.catch(err => {
|
|
|
|
|
|
this.$message.error('项目搜索失败');
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
handleSelectProject(selected) {
|
2022-12-14 06:20:25 +00:00
|
|
|
|
const { id, name } = selected
|
2022-12-13 09:37:06 +00:00
|
|
|
|
if (!id) {
|
2022-12-28 09:27:53 +00:00
|
|
|
|
this.initForm(this.processForm)
|
2022-12-13 09:37:06 +00:00
|
|
|
|
return
|
|
|
|
|
|
}
|
2022-12-12 09:52:25 +00:00
|
|
|
|
const loading = this.$loading({
|
|
|
|
|
|
lock: true,
|
|
|
|
|
|
text: '正在加载项目',
|
|
|
|
|
|
spinner: 'el-icon-loading',
|
|
|
|
|
|
background: 'rgba(0, 0, 0, 0.7)'
|
2022-12-13 09:37:06 +00:00
|
|
|
|
})
|
2022-12-12 09:52:25 +00:00
|
|
|
|
|
2022-12-13 09:37:06 +00:00
|
|
|
|
fetch("${base}/process/projects/" + id)
|
2022-12-12 09:52:25 +00:00
|
|
|
|
.then(res => res.json())
|
|
|
|
|
|
.then(data => {
|
2022-12-28 09:27:53 +00:00
|
|
|
|
const { incomeDetails, procurementDetails, ...form } = data
|
2022-12-14 09:50:41 +00:00
|
|
|
|
// 转换数据
|
|
|
|
|
|
// @formatter:off
|
|
|
|
|
|
const computeType = (type) => {
|
|
|
|
|
|
switch (type) {
|
|
|
|
|
|
case 1: return '设备'
|
|
|
|
|
|
case 2: return '工程'
|
|
|
|
|
|
case 3: return '服务'
|
|
|
|
|
|
default: return '未知'
|
|
|
|
|
|
}
|
2022-12-13 09:37:06 +00:00
|
|
|
|
}
|
2022-12-28 09:27:53 +00:00
|
|
|
|
|
|
|
|
|
|
const computeFeeType = (type) => {
|
|
|
|
|
|
switch (type) {
|
|
|
|
|
|
case 1: return '设备'
|
|
|
|
|
|
case 2: return '施工'
|
|
|
|
|
|
case 3: return '服务'
|
|
|
|
|
|
case 4: return '其他'
|
|
|
|
|
|
default: return '未知'
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
// @formatter:on
|
2022-12-14 09:50:41 +00:00
|
|
|
|
|
|
|
|
|
|
this.initForm(form)
|
2022-12-12 09:52:25 +00:00
|
|
|
|
this.projectSelected = true
|
2022-12-14 09:50:41 +00:00
|
|
|
|
this.incomeDetails = incomeDetails.map(detail => ({
|
|
|
|
|
|
...detail, type: computeType(detail.type)
|
|
|
|
|
|
}))
|
2022-12-27 07:15:48 +00:00
|
|
|
|
|
2022-12-28 09:27:53 +00:00
|
|
|
|
this.procurementDetails = procurementDetails.map(detail => ({
|
|
|
|
|
|
...detail, feeType: computeFeeType(detail.type),
|
2022-12-29 03:31:32 +00:00
|
|
|
|
totalTaxInclude_: detail.totalTaxInclude, totalTaxInclude: null, // 存在相同字段转换一下
|
2022-12-28 09:27:53 +00:00
|
|
|
|
isUnderwritten: detail.isUnderwritten === 1 ? "是" : "否"
|
|
|
|
|
|
}))
|
|
|
|
|
|
|
2022-12-27 07:15:48 +00:00
|
|
|
|
if (!form.projectNo || !form.projectName) {
|
|
|
|
|
|
this.$message.warning("当前选择的项目没有编号或者名称");
|
|
|
|
|
|
}
|
2022-12-12 09:52:25 +00:00
|
|
|
|
})
|
|
|
|
|
|
.catch(err => {
|
2022-12-13 09:37:06 +00:00
|
|
|
|
this.$message.error("项目'" + name + "'加载失败");
|
2022-12-12 09:52:25 +00:00
|
|
|
|
})
|
|
|
|
|
|
.finally(() => loading.close())
|
|
|
|
|
|
},
|
2022-12-14 08:07:26 +00:00
|
|
|
|
clearProjectProcess() {
|
2022-12-14 09:50:41 +00:00
|
|
|
|
this.initForm({})
|
|
|
|
|
|
this.incomeDetails = []
|
2022-12-28 09:49:08 +00:00
|
|
|
|
this.projectSelected = false
|
2022-12-28 09:27:53 +00:00
|
|
|
|
this.procurementDetails = []
|
2022-12-28 09:49:08 +00:00
|
|
|
|
|
|
|
|
|
|
if (this.isProcurementContractMode) {
|
|
|
|
|
|
this.goToHome()
|
|
|
|
|
|
// 重新打开对话框选择项目
|
|
|
|
|
|
this.newProcurementContractClick()
|
|
|
|
|
|
}
|
2022-12-14 08:07:26 +00:00
|
|
|
|
},
|
2022-12-12 09:52:25 +00:00
|
|
|
|
|
2022-12-27 10:08:57 +00:00
|
|
|
|
async saveDraft() {
|
2022-12-13 09:37:06 +00:00
|
|
|
|
this.processForm.status = 'draft'
|
2022-12-27 10:08:57 +00:00
|
|
|
|
await this.submit(false)
|
2022-12-13 09:37:06 +00:00
|
|
|
|
},
|
|
|
|
|
|
|
2022-12-27 10:08:57 +00:00
|
|
|
|
async submitForm() {
|
2022-12-23 09:24:05 +00:00
|
|
|
|
this.processForm.status = 'to_be_audit'
|
2022-12-27 10:08:57 +00:00
|
|
|
|
await this.submit(true)
|
2022-12-23 09:24:05 +00:00
|
|
|
|
},
|
|
|
|
|
|
|
2022-12-27 10:08:57 +00:00
|
|
|
|
async submit(needValid) {
|
|
|
|
|
|
const processForm = this.processForm
|
|
|
|
|
|
const processType = this.processType
|
|
|
|
|
|
const fileList = this.fileList
|
2022-12-26 10:03:45 +00:00
|
|
|
|
|
2022-12-27 10:08:57 +00:00
|
|
|
|
if (!processForm.projectId) {
|
|
|
|
|
|
this.$message.error("未选择项目");
|
|
|
|
|
|
return false
|
|
|
|
|
|
}
|
|
|
|
|
|
let validStatus = !needValid
|
|
|
|
|
|
if (needValid) {
|
|
|
|
|
|
this.$refs["contractProcessForm"].validate((valid) => {
|
|
|
|
|
|
if (valid) {
|
|
|
|
|
|
if (fileList.length === 0) {
|
|
|
|
|
|
this.$message.error("未上传附件");
|
|
|
|
|
|
return false
|
|
|
|
|
|
}
|
2022-12-29 03:31:32 +00:00
|
|
|
|
if (processType === saleContract) {
|
|
|
|
|
|
this.checkExpirationDate()
|
|
|
|
|
|
}
|
2022-12-27 10:08:57 +00:00
|
|
|
|
|
|
|
|
|
|
// 采购合同需要验证 供应商比选材料
|
2022-12-29 03:31:32 +00:00
|
|
|
|
if (processType === procurementContract) {
|
2022-12-27 10:08:57 +00:00
|
|
|
|
const { procurementMode } = processForm
|
|
|
|
|
|
|
|
|
|
|
|
// specify_purchase("指定采购"),
|
|
|
|
|
|
// simple_price_comparison("简单比价"),
|
|
|
|
|
|
// price_comparison("比价"),
|
|
|
|
|
|
// competitive_evaluation("竞争性评估");
|
|
|
|
|
|
// 当“采购模式”为“指定采购”“简单比价”时,本模块为非必填模块,当为“比价”“竞争性评估”时,本模块为必填项(“备注”除外)
|
|
|
|
|
|
if (procurementMode === 'price_comparison'
|
|
|
|
|
|
|| procurementMode === 'competitive_evaluation') {
|
|
|
|
|
|
|
|
|
|
|
|
if (isEmpty(this.supplierMaterialsForm)) {
|
2022-12-27 08:46:35 +00:00
|
|
|
|
this.$message.error("供应商比选材料未填写")
|
|
|
|
|
|
return false
|
|
|
|
|
|
}
|
2022-12-27 10:08:57 +00:00
|
|
|
|
for (const item in this.supplierMaterialsForm) {
|
|
|
|
|
|
if (isEmpty(Object.keys(item))) {
|
|
|
|
|
|
this.$message.error("供应商比选材料未填写")
|
|
|
|
|
|
return false
|
|
|
|
|
|
}
|
|
|
|
|
|
for (const [key, value] of Object.entries(item)) {
|
|
|
|
|
|
if (value) {
|
|
|
|
|
|
if (typeof value === 'string') {
|
|
|
|
|
|
if (isBlank(value)) {
|
|
|
|
|
|
this.$message.error("有未填写的表单,请检查表单");
|
|
|
|
|
|
return false
|
|
|
|
|
|
}
|
2022-12-26 10:03:45 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2022-12-27 10:08:57 +00:00
|
|
|
|
else {
|
|
|
|
|
|
// 没有值
|
|
|
|
|
|
if (key !== 'remark') {
|
|
|
|
|
|
this.$message.error("有未填写的表单,请检查表单");
|
|
|
|
|
|
}
|
2022-12-26 10:03:45 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-12-27 10:08:57 +00:00
|
|
|
|
}
|
2022-12-26 10:03:45 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-12-27 10:08:57 +00:00
|
|
|
|
if (!processForm.applyDeptId) {
|
|
|
|
|
|
this.$message.error("申请部门还未选择");
|
|
|
|
|
|
return false
|
|
|
|
|
|
}
|
|
|
|
|
|
validStatus = true
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
else {
|
2022-12-27 06:14:05 +00:00
|
|
|
|
return false
|
|
|
|
|
|
}
|
2022-12-27 10:08:57 +00:00
|
|
|
|
})
|
2022-12-27 06:14:05 +00:00
|
|
|
|
|
2022-12-27 10:08:57 +00:00
|
|
|
|
}
|
2022-12-13 09:37:06 +00:00
|
|
|
|
|
2022-12-27 10:08:57 +00:00
|
|
|
|
if (!validStatus) {
|
|
|
|
|
|
return false
|
|
|
|
|
|
}
|
|
|
|
|
|
// 提交
|
|
|
|
|
|
const loading = this.$loading({
|
|
|
|
|
|
lock: true,
|
|
|
|
|
|
text: processForm.status === 'draft' ? '正在保存草稿' : "正在提交",
|
|
|
|
|
|
spinner: 'el-icon-loading',
|
|
|
|
|
|
background: 'rgba(0, 0, 0, 0.7)'
|
|
|
|
|
|
})
|
2022-12-14 09:50:41 +00:00
|
|
|
|
|
2022-12-27 10:08:57 +00:00
|
|
|
|
const applyDeptId = processForm.applyDeptId?.join(',') // (逗号分割)
|
|
|
|
|
|
const form = {
|
|
|
|
|
|
...processForm,
|
|
|
|
|
|
processType,
|
|
|
|
|
|
applyDeptId,
|
|
|
|
|
|
attachments: fileList.map(file => ({
|
|
|
|
|
|
uri: file.response.data.url,
|
|
|
|
|
|
name: file.response.data.originName
|
|
|
|
|
|
})),
|
|
|
|
|
|
supplierMaterials: this.supplierMaterialsForm,
|
|
|
|
|
|
incomeDetails: this.incomeDetails.map(detail => ({
|
|
|
|
|
|
id: detail.id, expirationDate: detail.expirationDate
|
|
|
|
|
|
}))
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fetch("${base}/process", {
|
|
|
|
|
|
method: 'POST', // or 'PUT'
|
|
|
|
|
|
headers: {
|
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
|
},
|
|
|
|
|
|
body: JSON.stringify(form),
|
|
|
|
|
|
}).then(response => {
|
|
|
|
|
|
if (response.ok) {
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
showClose: true,
|
|
|
|
|
|
message: '提交成功',
|
|
|
|
|
|
type: 'success'
|
|
|
|
|
|
})
|
2022-12-13 09:37:06 +00:00
|
|
|
|
}
|
|
|
|
|
|
else {
|
2022-12-27 10:08:57 +00:00
|
|
|
|
return Promise.reject("失败")
|
2022-12-13 09:37:06 +00:00
|
|
|
|
}
|
2022-12-27 10:08:57 +00:00
|
|
|
|
}).catch(err => {
|
|
|
|
|
|
this.$message.error("项目提交失败");
|
|
|
|
|
|
}).finally(() => loading.close())
|
2022-12-13 09:37:06 +00:00
|
|
|
|
},
|
|
|
|
|
|
|
2022-12-29 03:31:32 +00:00
|
|
|
|
checkExpirationDate() {
|
|
|
|
|
|
const emptyRows = this.incomeDetails.filter(detail => isBlank(detail.expirationDate))
|
|
|
|
|
|
if (isNotEmpty(emptyRows)) {
|
|
|
|
|
|
const row = emptyRows[0]
|
|
|
|
|
|
this.$message.error("名称为:'" + row.name + "' 类别为:'" + row.type + "' 的质保期未填写")
|
|
|
|
|
|
return false
|
|
|
|
|
|
}
|
|
|
|
|
|
return true
|
|
|
|
|
|
},
|
2022-12-13 10:16:15 +00:00
|
|
|
|
submitToSaleContractProcess() {
|
2022-12-29 03:31:32 +00:00
|
|
|
|
// 做校验
|
|
|
|
|
|
if (this.checkExpirationDate()) {
|
|
|
|
|
|
this.goToSaleContractProcess()
|
|
|
|
|
|
}
|
2022-12-13 10:16:15 +00:00
|
|
|
|
},
|
|
|
|
|
|
|
2022-12-12 09:52:25 +00:00
|
|
|
|
handleRemove(file, fileList) {
|
2022-12-22 09:05:55 +00:00
|
|
|
|
this.fileList = fileList
|
2022-12-12 09:52:25 +00:00
|
|
|
|
},
|
2022-12-22 09:05:55 +00:00
|
|
|
|
|
2022-12-12 09:52:25 +00:00
|
|
|
|
handleExceed(files, fileList) {
|
2022-12-22 09:05:55 +00:00
|
|
|
|
this.$message.warning("当前限制选择只能选择10个文件");
|
|
|
|
|
|
this.fileList = fileList
|
2022-12-12 09:52:25 +00:00
|
|
|
|
},
|
2022-12-22 09:05:55 +00:00
|
|
|
|
|
2022-12-12 09:52:25 +00:00
|
|
|
|
beforeRemove(file, fileList) {
|
|
|
|
|
|
return this.$confirm("确定移除 " + file.name + "?");
|
2022-12-13 09:37:06 +00:00
|
|
|
|
},
|
2022-12-12 09:52:25 +00:00
|
|
|
|
|
2022-12-22 09:05:55 +00:00
|
|
|
|
handleFileUploaded(response, file, fileList) {
|
|
|
|
|
|
if (response.success) {
|
|
|
|
|
|
this.fileList = fileList
|
|
|
|
|
|
}
|
|
|
|
|
|
else {
|
|
|
|
|
|
this.$message.warning("上传失败");
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2022-12-13 09:37:06 +00:00
|
|
|
|
indexMethod(index) {
|
|
|
|
|
|
return index * 1;
|
2022-12-26 10:03:45 +00:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
addSupplierRow() {
|
|
|
|
|
|
this.supplierMaterialsForm.push({})
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2022-12-27 06:14:05 +00:00
|
|
|
|
applyDeptSelected(value) {
|
2022-12-27 06:53:06 +00:00
|
|
|
|
if (value.length === 0) {
|
|
|
|
|
|
this.processForm['applyDept'] = null
|
|
|
|
|
|
this.processForm['applyDeptId'] = null
|
|
|
|
|
|
this.processForm['applyDeptLeaderId'] = null
|
|
|
|
|
|
this.processForm['applyDeptLeaderName'] = null
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-12-27 06:14:05 +00:00
|
|
|
|
const level1Value = value[0]
|
|
|
|
|
|
const level2Value = value.length >= 2 && value[1]
|
|
|
|
|
|
const level3Value = value.length === 3 && value[2]
|
|
|
|
|
|
|
|
|
|
|
|
const find = (options, value) => {
|
2022-12-27 06:53:06 +00:00
|
|
|
|
return options.find(option => option.id === value)
|
2022-12-27 06:14:05 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const leveled = []
|
2022-12-27 07:15:48 +00:00
|
|
|
|
let selected = find(this.applyDeptSectorOptions, level1Value)
|
2022-12-27 06:53:06 +00:00
|
|
|
|
leveled.push(selected)
|
|
|
|
|
|
if (selected && level2Value) {
|
|
|
|
|
|
selected = find(selected.children, level2Value)
|
2022-12-27 08:03:37 +00:00
|
|
|
|
leveled.push(selected)
|
2022-12-27 06:53:06 +00:00
|
|
|
|
if (selected && level3Value) {
|
|
|
|
|
|
selected = find(selected.children, level3Value)
|
|
|
|
|
|
if (selected) {
|
|
|
|
|
|
leveled.push(selected)
|
2022-12-27 06:14:05 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2022-12-27 06:53:06 +00:00
|
|
|
|
}
|
2022-12-27 06:14:05 +00:00
|
|
|
|
|
2022-12-27 08:03:37 +00:00
|
|
|
|
// applyDeptId 提交时处理
|
2022-12-27 07:24:33 +00:00
|
|
|
|
this.processForm['applyDept'] = leveled.map(level => level.name).join(',') // (逗号分割)
|
2022-12-27 08:03:37 +00:00
|
|
|
|
this.processForm['applyDeptLeaderId'] = selected.leaderId
|
|
|
|
|
|
this.processForm['applyDeptLeaderName'] = selected.leaderName
|
2022-12-27 06:14:05 +00:00
|
|
|
|
},
|
|
|
|
|
|
|
2022-12-12 09:52:25 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
new Vue({
|
|
|
|
|
|
el: '#app',
|
|
|
|
|
|
data,
|
|
|
|
|
|
computed: {
|
|
|
|
|
|
isButtonMode() {
|
|
|
|
|
|
return this.mode === BUTTON
|
|
|
|
|
|
},
|
2022-12-26 10:03:45 +00:00
|
|
|
|
isProcurementContractMode() {
|
|
|
|
|
|
return this.mode === procurementContractProcess
|
|
|
|
|
|
},
|
|
|
|
|
|
isProcurementContractDetailMode() {
|
|
|
|
|
|
return this.mode === procurementContractDetail
|
2022-12-12 09:52:25 +00:00
|
|
|
|
},
|
2022-12-26 10:03:45 +00:00
|
|
|
|
isSalesContractMode() {
|
2022-12-13 09:37:06 +00:00
|
|
|
|
return this.mode === saleContractProcess
|
|
|
|
|
|
},
|
|
|
|
|
|
isSaleContractDetailMode() {
|
|
|
|
|
|
return this.mode === saleContractDetail
|
2022-12-12 09:52:25 +00:00
|
|
|
|
},
|
|
|
|
|
|
subTitle() {
|
|
|
|
|
|
switch (this.mode) {
|
|
|
|
|
|
case BUTTON:
|
|
|
|
|
|
return "新增流程"
|
2022-12-13 09:37:06 +00:00
|
|
|
|
case saleContractProcess:
|
2022-12-12 09:52:25 +00:00
|
|
|
|
return "新增销售合同流程"
|
2022-12-13 09:37:06 +00:00
|
|
|
|
case saleContractDetail:
|
|
|
|
|
|
return "销售合同清单明细"
|
2022-12-29 03:31:32 +00:00
|
|
|
|
case procurementContractDetail:
|
|
|
|
|
|
return "业务采购合同清单明细"
|
2022-12-26 10:03:45 +00:00
|
|
|
|
case procurementContractProcess:
|
2022-12-12 09:52:25 +00:00
|
|
|
|
return "新增业务采购合同流程"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
methods,
|
2022-12-14 06:20:25 +00:00
|
|
|
|
|
|
|
|
|
|
mounted() {
|
2022-12-28 09:27:53 +00:00
|
|
|
|
this.handleSelectProject({ id: 135 })
|
2022-12-27 06:14:05 +00:00
|
|
|
|
this.applyDeptSectorOptions = JSON.parse('${applyDeptSectorOptions}')
|
2022-12-14 06:20:25 +00:00
|
|
|
|
},
|
2022-12-12 09:52:25 +00:00
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
</@defaultLayout.layout>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|