diff --git a/src/views/report/project/components/projStageGoalsEdit.vue b/src/views/report/project/components/projStageGoalsEdit.vue index 02881634271adc60256b05b08c92151bac1f7f70..3bd16d061c08cd62edf872104b18588039ee842b 100644 --- a/src/views/report/project/components/projStageGoalsEdit.vue +++ b/src/views/report/project/components/projStageGoalsEdit.vue @@ -3,35 +3,26 @@ <a-row> <a-col :span="24"> <div class="tb-title"> - <span>项目安排及阶段目标</span> + <span>项目实施阶段及任务</span> </div> </a-col> </a-row> <a-row type="flex" class="row_center"> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div class="required">完成时限</div> - </div> - </a-col> - <a-col :span="8" class="bg-gray"> - <div class="special-middle"> - <div class="required">进度安排</div> - </div> - </a-col> <a-col :span="8" class="bg-gray"> <div class="special-middle"> - <div class="required">阶段目标</div> + <div class="required">时间</div> </div> </a-col> - <a-col :span="4" class="bg-gray"> + <a-col :span="16" class="bg-gray"> <div class="special-middle"> - <div>操作</div> + <div class="required">计划完成内容和关键节点目标</div> </div> </a-col> </a-row> <a-row v-for="(item, index) in stageGoals" :key="'stageGoals' + index" type="flex" class="row_center"> - <a-col :span="4"> + <a-col :span="8"> <div class="special-middle"> + <div><span>第{{toChineseNum(index+1)}}阶段</span></div> <a-form-model-item :prop="'stageGoals.' + index + '.startTime'" :rules="{ required: true, message: '*' }" style="flex-basis: 45%;"> <a-date-picker placeholder="请选择开始日期" format="YYYY-MM-DD" valueFormat="YYYY-MM-DD HH:mm:ss" v-model="item.startTime" style="width: 140px" /> </a-form-model-item> @@ -40,40 +31,20 @@ </a-form-model-item> </div> </a-col> - <a-col :span="8"> - <a-form-model-item :prop="'stageGoals.' + index + '.contentInfo'" :rules="{ required: true, message: '*' }"> - <a-textarea v-model="item.contentInfo" placeholder="项目阶段实施内容及目标" :maxLength="500" style="width: 90%;height: 80px;margin-top: 12px;" /> - </a-form-model-item> - </a-col> - <a-col :span="8"> + <a-col :span="16"> <a-form-model-item :prop="'stageGoals.' + index + '.target'" :rules="{ required: true, message: '*' }"> - <a-textarea v-model="item.target" placeholder="项目阶段实施内容及目标" :maxLength="500" style="width: 90%;height: 80px;margin-top: 12px;" /> + <a-textarea v-model="item.target" placeholder="计划完成内容和关键节点目标" :maxLength="500" style="width: 90%;height: 80px;margin-top: 12px;" /> </a-form-model-item> </a-col> - <a-col :span="4"> - <div class="special-middle"> - <a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="removeArray(item)"> - <a-button type="link" size="small">[删除]</a-button> - </a-popconfirm> - </div> - </a-col> - </a-row> - <a-row type="flex"> - <a-col :span="24" style="text-align: center;"> - <div class="special-middle"> - <a-button type="dashed" style="width: 50%" @click="addArray"> - <a-icon type="plus" /> 添加 - </a-button> - </div> - </a-col> </a-row> </div> </template> <script> //用法 <proj-stage-goals :stageGoals.sync="formData.stageGoals" /> +import { toChineseNum } from '@/views/utils/common' -const Model = { startTime: null, endTime: null, contentInfo: null, target: null } +const Model = { startTime: null, endTime: null, target: null } export default { name: 'projStageGoalsEdit', @@ -95,6 +66,7 @@ export default { created () { }, methods: { + toChineseNum, addArray () {//添加成员 this.stageGoals.push({ ...Model }) }, diff --git a/src/views/report/project/components/projStageGoalsInfo.vue b/src/views/report/project/components/projStageGoalsInfo.vue index f6738c164eb5d90e1dc600b6c7692d4e291beb9c..2ed26f571e7a0d6ea14084dcb02d76f01030e156 100644 --- a/src/views/report/project/components/projStageGoalsInfo.vue +++ b/src/views/report/project/components/projStageGoalsInfo.vue @@ -3,37 +3,30 @@ <a-row> <a-col :span="24"> <div class="tb-title"> - <span>项目安排及阶段目标</span> + <span>项目实施阶段及任务</span> </div> </a-col> </a-row> <a-row type="flex" class="row_center"> <a-col :span="8" class="bg-gray"> <div class="special-middle"> - <div>完成时限</div> + <div>时间</div> </div> </a-col> - <a-col :span="8" class="bg-gray"> - <div class="special-middle"> - <div>进度安排</div> - </div> - </a-col> - <a-col :span="8" class="bg-gray"> + <a-col :span="16" class="bg-gray"> <div class="special-middle"> - <div>阶段目标</div> + <div>计划完成内容和关键节点目标</div> </div> </a-col> </a-row> <a-row v-for="(item, index) in stageGoals" :key="'stageGoals' + index" type="flex" class="row_center"> <a-col :span="8"> <div class="special-middle"> - {{ moment(item.startTime).format("YYYY-MM-DD HH:mm:ss") }} 至 {{ moment(item.endTime).format("YYYY-MM-DD HH:mm:ss") }} + <div><span>第{{toChineseNum(index+1)}}阶段</span></div> + {{ moment(item.startTime).format("YYYY-MM-DD") }} 至 {{ moment(item.endTime).format("YYYY-MM-DD") }} </div> </a-col> - <a-col :span="8"> - {{ item.contentInfo }} - </a-col> - <a-col :span="8"> + <a-col :span="16"> {{ item.target }} </a-col> </a-row> @@ -42,6 +35,7 @@ <script> import moment from "moment"; +import { toChineseNum } from '@/views/utils/common' export default { name: "projStageGoalsInfo", @@ -53,11 +47,12 @@ export default { } }, }, - data() { + data () { return {}; }, methods: { moment, + toChineseNum, } }; </script> \ No newline at end of file diff --git a/src/views/report/project/components/projectEdit.vue b/src/views/report/project/components/projectEdit.vue index 569c606fb6718f723eb05cee3c6196324cdb808f..1d87c0d328990a307e60e2256019cc02afeebdfa 100644 --- a/src/views/report/project/components/projectEdit.vue +++ b/src/views/report/project/components/projectEdit.vue @@ -421,6 +421,8 @@ </a-col> </a-row> + <!-- 项目主要参与单位及分工 --> + <participate-units-edit :participateUnits.sync="formData.participateUnits" /> <a-row> <a-col :span="24" style="border-top: 0px"> <div class="main-title"> @@ -606,7 +608,7 @@ import previewFile from '@/views/components/common/previewFile' import { getType } from '@/views/utils/auth' import projectMemberEdit from '@/views/report/project/components/projectMemberEdit' import cooperativeUnitsEdit from '@/views/report/project/components/cooperativeUnitsEdit' - +import participateUnitsEdit from '@/views/report/project/components/participateUnitsEdit' import deviceEdit from '@/views/report/project/components/deviceEdit' import projStageGoalsEdit from '@/views/report/project/components/projStageGoalsEdit' import budgetEdit from '@/views/report/project/components/budgetEdit' @@ -618,9 +620,10 @@ import fileEdit from '@/views/report/project/components/fileEdit' import { isEmptyParams } from "@/views/utils/common" import moment from 'moment' - +const ParticipateUnit = { id: null, unitName: null, unitCountry: null, unitAddress: null, organizationCode: null, projectWork: null } const ProjResearch = { projNo: null, projName: null, approveUnit: null, leader: null, startDate: null, endDate: null, funds: null } const ManagementRule = { policyName: null, releaseDate: null, documentNumber: null, validityPeriod: null, mainContent: null, fileId: null, downloadId: null, fileName: null, downloadUrl: null } +const StageGoals = { startTime: null, endTime: null, target: null } const ProjectSub = { projName: null, undertakingUnit: null, address: null, director: null, totalBudget: null, govBudget: null, selfBudget: null, cooperativeUnits: null, fileId: null, downloadId: null, fileName: null, downloadUrl: null } const Cooperative = { id: null, unitName: null } const File = { fileName: '', downloadUrl: '', fileExplain: '', downloadId: '' } @@ -666,7 +669,7 @@ import cascaderSelect from '@/views/components/common/cascaderSelect' export default { name: 'projectEdit', components: { - projectMemberEdit, cooperativeUnitsEdit, budgetEdit, fundPlanEdit, projectKpiEdit, fileEdit, previewFile, documentView, cascaderSelect, deviceEdit, projStageGoalsEdit, manufactureEdit, projectSubEdit + projectMemberEdit, cooperativeUnitsEdit, budgetEdit, fundPlanEdit, projectKpiEdit, fileEdit, previewFile, documentView, cascaderSelect, deviceEdit, projStageGoalsEdit, manufactureEdit, projectSubEdit, participateUnitsEdit }, props: { value: { @@ -724,6 +727,7 @@ export default { year3Goal: null, projectKPI: projectKPI, cooperativeUnits: [], + participateUnits: [], members: [], budget: [], fundPlan: [], @@ -803,6 +807,9 @@ export default { if (!!!this.formData.cooperativeUnits || this.formData.cooperativeUnits.length == 0) this.formData.cooperativeUnits = [{ ...Cooperative }, { ...Cooperative }] + if (!!!this.formData.participateUnits || this.formData.participateUnits.length == 0) + this.formData.participateUnits = [{ ...ParticipateUnit }] + if (!!!this.formData.members || this.formData.members.length == 0) this.formData.members = [] @@ -813,7 +820,7 @@ export default { this.formData.manufactureList = [] if (!!!this.formData.stageGoals || this.formData.stageGoals.length == 0) - this.formData.stageGoals = [] + this.formData.stageGoals = [{ ...StageGoals }, { ...StageGoals }, { ...StageGoals }] if (!!!this.formData.projectSubList || this.formData.projectSubList.length == 0) this.formData.projectSubList = [{ ...ProjectSub }] diff --git a/src/views/report/project/components/projectInfo.vue b/src/views/report/project/components/projectInfo.vue index cb73039744f8b728427dd1812fc8b17024ab5743..89ad8b73557df3b9b66a2d49eb5cd71b199682f0 100644 --- a/src/views/report/project/components/projectInfo.vue +++ b/src/views/report/project/components/projectInfo.vue @@ -384,6 +384,9 @@ </a-row> </div> <div v-if="tabsData[2].isShow"> + + <!-- 项目合作单位 --> + <participate-units-info :dataList.sync="value.participateUnits" /> <a-row> <a-col :span="24" style="border-top: 0px"> <div class="main-title"> @@ -545,6 +548,7 @@ import moment from 'moment' import cooperativeUnitsInfo from '@/views/report/project/components/cooperativeUnitsInfo' +import participateUnitsInfo from '@/views/report/project/components/participateUnitsInfo' import projectMemberInfo from '@/views/report/project/components/projectMemberInfo' import projectKpiInfo from '@/views/report/project/components/projectKpiInfo.vue' import budgetInfo from '@/views/report/project/components/budgetInfo' @@ -559,7 +563,7 @@ import { toTextarea } from '@/views/utils/common' export default { components: { - cooperativeUnitsInfo, projectMemberInfo, projectKpiInfo, budgetInfo, fundPlanInfo, fileInfo, documentView, AuditList, projStageGoalsInfo,projectSubInfo + cooperativeUnitsInfo, projectMemberInfo, projectKpiInfo, budgetInfo, fundPlanInfo, fileInfo, documentView, AuditList, projStageGoalsInfo, projectSubInfo, participateUnitsInfo }, name: "ProjectInfo", data () { diff --git a/src/views/report/project/components/projectSubEdit.vue b/src/views/report/project/components/projectSubEdit.vue index 3a229ed9b69ac4d76a5dd57822e95e55ac04b359..c035277d676edde094d82f95e7aba22fb7b7be50 100644 --- a/src/views/report/project/components/projectSubEdit.vue +++ b/src/views/report/project/components/projectSubEdit.vue @@ -3,109 +3,79 @@ <a-row> <a-col :span="24"> <div class="tb-title"> - <span>项目课颖设置</span> + <span>项目课题设置</span> </div> </a-col> </a-row> <a-row type="flex" class="row_center"> - <a-col :span="4" class="bg-gray"> + <a-col :span="6" class="bg-gray"> <div class="special-middle"> <div class="required">课题名称</div> </div> </a-col> - <a-col :span="2" class="bg-gray"> - <div class="special-middle"> - <div class="required">课题承担单位</div> - </div> - </a-col> - <a-col :span="2" class="bg-gray"> + <a-col :span="4" class="bg-gray"> <div class="special-middle"> - <div class="required">所在地</div> + <div class="required">承担单位</div> </div> </a-col> <a-col :span="2" class="bg-gray"> <div class="special-middle"> - <div class="required">课颖负责人</div> + <div class="required">课题负责人</div> </div> </a-col> - <a-col :span="2" class="bg-gray"> + <a-col :span="3" class="bg-gray"> <div class="special-middle"> <div class="required">课题预算总经费</div> </div> </a-col> - <a-col :span="2" class="bg-gray"> + <a-col :span="3" class="bg-gray"> <div class="special-middle"> - <div class="required">其中:省科技经费</div> + <div class="required">其中:省科技经费</div> </div> </a-col> - <a-col :span="2" class="bg-gray"> + <a-col :span="3" class="bg-gray"> <div class="special-middle"> <div>自筹经费</div> </div> </a-col> - <a-col :span="2" class="bg-gray"> - <div class="special-middle"> - <div>合作单位</div> - </div> - </a-col> - <a-col :span="4" class="bg-gray"> - <div class="special-middle"> - <div>附件</div> - </div> - </a-col> - <a-col :span="2" class="bg-gray"> + <a-col :span="3" class="bg-gray"> <div class="special-middle"> <div>操作</div> </div> </a-col> </a-row> <a-row v-for="(item, index) in projectSubList" :key="'projectSubList'+index" type="flex" class="row_center"> - <a-col :span="4"> + <a-col :span="6"> <a-form-model-item :prop="'projectSubList.' + index + '.projName'" :rules="{ required: true, message: '*', trigger: 'blur',}"> <a-input v-model="item.projName" :maxLength="100" placeholder="课题名称" style="width:85%" /> </a-form-model-item> </a-col> - <a-col :span="2"> + <a-col :span="4"> <a-form-model-item :prop="'projectSubList.' + index + '.undertakingUnit'" :rules="{ required: true, message: '*', trigger: 'blur',}"> - <a-input v-model="item.undertakingUnit" :maxLength="100" placeholder="课题承担单位" style="width:85%" /> - </a-form-model-item> - </a-col> - <a-col :span="2"> - <a-form-model-item :prop="'projectSubList.' + index + '.address'" :rules="{ required: true, message: '*', trigger: 'blur',}"> - <a-input v-model="item.address" :maxLength="100" placeholder="所在地" style="width:85%" /> + <a-input v-model="item.undertakingUnit" :maxLength="100" placeholder="承担单位" style="width:85%" /> </a-form-model-item> </a-col> <a-col :span="2"> <a-form-model-item :prop="'projectSubList.' + index + '.director'" :rules="{ required: true, message: '*', trigger: 'blur',}"> - <a-input v-model="item.director" :maxLength="50" placeholder="课颖负责人" style="width:85%" /> + <a-input v-model="item.director" :maxLength="50" placeholder="课题负责人" style="width:85%" /> </a-form-model-item> </a-col> - <a-col :span="2"> + <a-col :span="3"> <a-form-model-item :prop="'projectSubList.' + index + '.totalBudget'" :rules="{ required: true, message: '*', trigger: 'blur',}"> <a-input-number v-model="item.totalBudget" placeholder="课题预算总经费" :min="0" :step="0.01" style="width:85%" /> </a-form-model-item> </a-col> - <a-col :span="2"> + <a-col :span="3"> <a-form-model-item :prop="'projectSubList.' + index + '.govBudget'" :rules="{ required: true, message: '*', trigger: 'blur',}"> <a-input-number v-model="item.govBudget" placeholder="其中:省科技经费" :min="0" :step="0.01" style="width:85%" /> </a-form-model-item> </a-col> - <a-col :span="2"> + <a-col :span="3"> <a-form-model-item :prop="'projectSubList.' + index + '.selfBudget'" :rules="{ required: true, message: '*', trigger: 'blur',}"> <a-input-number v-model="item.selfBudget" placeholder="自筹经费" :min="0" :step="0.01" style="width:85%" /> </a-form-model-item> </a-col> - <a-col :span="2"> - <a-form-model-item :prop="'projectSubList.' + index + '.cooperativeUnits'" :rules="{ required: true, message: '*', trigger: 'blur',}"> - <a-input v-model="item.cooperativeUnits" :maxLength="100" placeholder="合作单位" style="width:85%" /> - </a-form-model-item> - </a-col> - <a-col :span="4"> - <div class="special-middle"> - <file-load :file.sync="projectSubList[index]" :index="index" :name="'projectSubList'" /> - </div> - </a-col> - <a-col :span="2"> + <a-col :span="3"> <div class="special-middle"> <a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="deleteArray(item)"> <a-button type="link" size="small">删除</a-button> diff --git a/src/views/report/project/components/projectSubInfo.vue b/src/views/report/project/components/projectSubInfo.vue index 522ff78797d81cde3a9d072cfed606f0b3c67dcb..c2c0cfe3eec6b6d34f574f0aa3781b033a05f2b9 100644 --- a/src/views/report/project/components/projectSubInfo.vue +++ b/src/views/report/project/components/projectSubInfo.vue @@ -3,134 +3,97 @@ <a-row> <a-col :span="24"> <div class="tb-title"> - <span>项目课颖设置</span> + <span>项目课题设置</span> </div> </a-col> </a-row> <a-row type="flex" class="row_center"> - <a-col :span="1" class="bg-gray"> + <a-col :span="2" class="bg-gray"> <div class="special-middle"> <div>序号</div> </div> </a-col> - <a-col :span="2" class="bg-gray"> + <a-col :span="6" class="bg-gray"> <div class="special-middle"> <div >课题名称</div> </div> </a-col> - <a-col :span="2" class="bg-gray"> - <div class="special-middle"> - <div >课题承担单位</div> - </div> - </a-col> - <a-col :span="2" class="bg-gray"> + <a-col :span="4" class="bg-gray"> <div class="special-middle"> - <div >所在地</div> + <div >承担单位</div> </div> </a-col> <a-col :span="2" class="bg-gray"> <div class="special-middle"> - <div >课颖负责人</div> + <div >课题负责人</div> </div> </a-col> - <a-col :span="2" class="bg-gray"> + <a-col :span="3" class="bg-gray"> <div class="special-middle"> <div >课题预算总经费</div> </div> </a-col> - <a-col :span="2" class="bg-gray"> + <a-col :span="3" class="bg-gray"> <div class="special-middle"> - <div >其中:省科技经费</div> + <div >其中:省科技经费</div> </div> </a-col> - <a-col :span="2" class="bg-gray"> + <a-col :span="3" class="bg-gray"> <div class="special-middle"> <div>自筹经费</div> </div> </a-col> - <a-col :span="2" class="bg-gray"> - <div class="special-middle"> - <div>合作单位</div> - </div> - </a-col> - <a-col :span="7" class="bg-gray"> - <div class="special-middle"> - <div>附件</div> - </div> - </a-col> </a-row> <a-row v-for="(item, index) in dataList" :key="'projectSubList'+index" type="flex" class="row_center"> - <a-col :span="1"> + <a-col :span="2"> <div class="special-middle"> <div> {{ index + 1 }} </div> </div> </a-col> - <a-col :span="2"> + <a-col :span="6"> <div class="special-middle"> <div> {{ item.projName }} </div> </div> </a-col> - <a-col :span="2"> + <a-col :span="4"> <div class="special-middle"> <div> {{ item.undertakingUnit }} </div> </div> </a-col> - <a-col :span="2"> - <div class="special-middle"> - <div> - {{ item.address }} - </div> - </div> - </a-col> - <a-col :span="2"> + <a-col :span="3"> <div class="special-middle"> <div> {{ item.director }} </div> </div> </a-col> - <a-col :span="2"> + <a-col :span="3"> <div class="special-middle"> <div> {{ item.totalBudget }} </div> </div> </a-col> - <a-col :span="2"> + <a-col :span="3"> <div class="special-middle"> <div> {{ item.govBudget }} </div> </div> </a-col> - <a-col :span="2"> + <a-col :span="3"> <div class="special-middle"> <div> {{ item.selfBudget }} </div> </div> </a-col> - <a-col :span="2"> - <div class="special-middle"> - <div> - {{ item.cooperativeUnits }} - </div> - </div> - </a-col> - <a-col :span="7"> - <div class="special-middle"> - <div v-if="item.fileName" style="text-align: left;"> - <document-view :fileUrl="item.downloadUrl" :fileName="item.fileName" :imageArray="[item.downloadUrl]"></document-view> - </div> - <div v-else>无</div> - </div> - </a-col> </a-row> </div> </template> diff --git a/src/views/utils/common.js b/src/views/utils/common.js index 08b869a956b82b479138bf886e4e9ded82f4c33f..1735d4dd12abb2609109628cb79b67d17653292c 100644 --- a/src/views/utils/common.js +++ b/src/views/utils/common.js @@ -357,6 +357,23 @@ export const tableColumnsName = (tableColumns) => { }) return arr } +export const toChineseNum = (num) => { + let changeNum = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九']; + let unit = ["", "十", "百", "千", "万"]; + num = parseInt(num); + let getWan = (temp) => { + let strArr = temp.toString().split("").reverse(); + let newNum = ""; + for (var i = 0; i < strArr.length; i++) { + newNum = (i == 0 && strArr[i] == 0 ? "" : (i > 0 && strArr[i] == 0 && strArr[i - 1] == 0 ? "" : changeNum[strArr[i]] + (strArr[i] == 0 ? unit[0] : unit[i]))) + newNum; + } + return newNum; + } + let overWan = Math.floor(num / 10000); + let noWan = num % 10000; + if (noWan.toString().length < 4) noWan = "0" + noWan; + return overWan ? getWan(overWan) + "万" + getWan(noWan) : getWan(num); +} /** * 生成UUID