| | |
| | | >承认</el-button> |
| | | </crudOperation> |
| | | <!--表单组件--> |
| | | <el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px"> |
| | | <el-form ref="form" :model="form" :rules="rules" size="small" label-width="100px"> |
| | | <el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="690px"> |
| | | <el-form ref="form" :model="form" :rules="rules" :inline="true" size="small" label-width="110px"> |
| | | <el-divider>项目基本</el-divider> |
| | | <el-form-item label="名称" prop="name"> |
| | | <el-input v-model="form.name" maxlength="100" style="width: 350px;" /> |
| | | <el-input v-model="form.name" maxlength="100" style="width: 523px;" /> |
| | | </el-form-item> |
| | | <el-form-item label="项目类型" prop="projectTypeId"> |
| | | <el-select v-model="form.projectTypeId" clearable filterable placeholder="请选择" style="width: 350px;" @change="projectTypeChange"> |
| | | <el-select v-model="form.projectTypeId" clearable filterable placeholder="请选择" style="width: 200px;" @change="projectTypeChange"> |
| | | <el-option |
| | | v-for="item in projectTypeList" |
| | | :key="item.id" |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="项目区分" maxlength="100" prop="projectDistinguish"> |
| | | <el-select v-model="form.projectDistinguish" clearable filterable placeholder="请选择" style="width: 350px;"> |
| | | <el-form-item label="项目区分" prop="projectDistinguish"> |
| | | <el-select v-model="form.projectDistinguish" clearable filterable placeholder="请选择" style="width: 200px;"> |
| | | <el-option |
| | | v-for="item in dict[projectDistinguish]" |
| | | :key="item.id" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="需求说明"> |
| | | <el-input v-model="form.requirement" :rows="3" type="textarea" style="width: 350px;" /> |
| | | <el-input v-model="form.requirement" :rows="3" type="textarea" style="width: 523px;" /> |
| | | </el-form-item> |
| | | <el-form-item label="单价币种" prop="unitCurrency"> |
| | | <el-select v-model="form.unitCurrency" clearable filterable placeholder="请选择" style="width: 350px;"> |
| | | <el-divider>金额</el-divider> |
| | | <el-form-item label="报价单金" prop="quotationPrice"> |
| | | <money-input :key="random" v-model="form.quotationPrice" :width="200" /> |
| | | </el-form-item> |
| | | <el-form-item label="报价币种" prop="unitCurrency"> |
| | | <el-select v-model="form.unitCurrency" clearable filterable placeholder="请选择" style="width: 200px;"> |
| | | <el-option |
| | | v-for="item in dict[standardUnitCurrency]" |
| | | :key="item.id" |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="单价金额" prop="unitPrice"> |
| | | <money-input :key="random" v-model="form.unitPrice" :width="350" /> |
| | | <el-form-item label="绩效单金" prop="performancePrice"> |
| | | <money-input :key="random" v-model="form.performancePrice" :width="200" /> |
| | | </el-form-item> |
| | | <el-form-item label="报价金额" prop="totalPrice"> |
| | | <money-input :key="random" v-model="form.totalPrice" :width="350" /> |
| | | <el-form-item label="绩效币种"> |
| | | <el-input value="人民币" maxlength="100" :disabled="true" style="width: 200px;" /> |
| | | </el-form-item> |
| | | <el-form-item label="绩效目标" prop="performanceObjectives"> |
| | | <el-input :key="random" v-model="form.performanceObjectives" style="width: 200px;"> |
| | | <template slot="append">%</template> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="合同金额" prop="contractPrice"> |
| | | <money-input :key="random" v-model="form.contractPrice" :width="200" /> |
| | | </el-form-item> |
| | | <el-divider>项目其他</el-divider> |
| | | <el-form-item label="计划开始日期" prop="planStartDate"> |
| | | <el-date-picker v-model="form.planStartDate" style="width: 200px;" :picker-options="pickerOptionsStart" type="date" placeholder="选择日期" /> |
| | | </el-form-item> |
| | | <el-form-item label="计划结束日期" prop="planEndDate"> |
| | | <el-date-picker v-model="form.planEndDate" type="date" :picker-options="pickerOptionsEnd" style="width: 200px;" placeholder="选择日期" /> |
| | | </el-form-item> |
| | | <el-form-item label="责任人"> |
| | | <el-select v-model="form.liableUserId" clearable filterable placeholder="请选择" style="width: 350px;"> |
| | | <el-select v-model="form.liableUserId" clearable filterable placeholder="请选择" style="width: 200px;"> |
| | | <el-option |
| | | v-for="item in userList" |
| | | :key="item.id" |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="计划开始日期" prop="planStartDate"> |
| | | <el-date-picker v-model="form.planStartDate" style="width: 350px;" :picker-options="pickerOptionsStart" type="date" placeholder="选择日期" /> |
| | | </el-form-item> |
| | | <el-form-item label="计划结束日期" prop="planEndDate"> |
| | | <el-date-picker v-model="form.planEndDate" type="date" :picker-options="pickerOptionsEnd" style="width: 350px;" placeholder="选择日期" /> |
| | | </el-form-item> |
| | | <el-form-item v-if="form.id != null" label="项目状态" prop="projectStatus"> |
| | | <el-select v-model="form.projectStatus" clearable filterable placeholder="请选择" style="width: 350px;"> |
| | | <el-select v-model="form.projectStatus" clearable filterable placeholder="请选择" style="width: 200px;"> |
| | | <el-option |
| | | v-for="item in dict[projectStatus]" |
| | | :key="item.id" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="备注" prop="remarks"> |
| | | <el-input v-model="form.remarks" :rows="3" type="textarea" style="width: 350px;" /> |
| | | <el-input v-model="form.remarks" :rows="3" type="textarea" style="width: 523px;" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | |
| | | <el-tag>{{ dict.label[projectDistinguish][scope.row.projectDistinguish] }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="requirement" label="需求说明" show-overflow-tooltip width="150" /> |
| | | <el-table-column prop="unitCurrency" label="单价币种" width="80"> |
| | | <el-table-column prop="contractPrice" label="合同金额" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-tag>{{ dict.label[standardUnitCurrency][scope.row.unitCurrency] }}</el-tag> |
| | | {{ scope.row.contractPrice != null && scope.row.contractPrice != '' ? crud.toMoney(scope.row.contractPrice) : '' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="unitPrice" label="单价金额" width="120"> |
| | | <el-table-column prop="quotationPrice" label="报价金额" width="120"> |
| | | <template slot-scope="scope"> |
| | | {{ crud.toMoney(scope.row.unitPrice) }} |
| | | <el-tooltip class="item" effect="dark" :content="scope.row.quotationPrice + ' * ' + scope.row.totalTaskTime" placement="top"> |
| | | <span>{{ scope.row.quotationPrice != null && scope.row.quotationPrice != '' ? crud.toMoney(scope.row.quotationPrice * scope.row.totalTaskTime) : 0 }}</span> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="totalPrice" label="报价金额" width="120"> |
| | | <el-table-column prop="performancePrice" label="预算金额" width="120"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.totalPrice != null && scope.row.totalPrice != '' ? crud.toMoney(scope.row.totalPrice) : '' }} |
| | | <el-tooltip class="item" effect="dark" :content="scope.row.performancePrice + ' * ' + scope.row.totalTaskTime" placement="top"> |
| | | <span>{{ scope.row.performancePrice != null && scope.row.performancePrice != '' ? crud.toMoney(scope.row.performancePrice * scope.row.totalTaskTime) : 0 }}</span> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="totalLaborCost" label="人力成本预算" width="120"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.totalLaborCost != null && scope.row.totalLaborCost != '' ? crud.toMoney(scope.row.totalLaborCost) : '' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="performanceObjectives" label="绩效目标" width="120"> |
| | | <template slot-scope="scope"> |
| | | {{ (scope.row.performanceObjectives ? scope.row.performanceObjectives : 0) + '%' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="liableUserName" label="责任人" width="80"> |
| | |
| | | <el-tag>{{ dict.label[approveStatus][scope.row.approveStatus] }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="remarks" label="备注" show-overflow-tooltip width="150" /> |
| | | <el-table-column prop="createTime" label="创建时间" width="140" /> |
| | | <el-table-column v-if="checkPer(['admin','project:edit','project:del'])" label="操作" width="180px" align="center" fixed="right"> |
| | | <template slot-scope="scope"> |
| | |
| | | import constant from '../../../utils/constant' |
| | | import DateRangePicker from '@/components/DateRangePicker' |
| | | |
| | | const defaultForm = { id: null, name: null, projectTypeId: null, projectDistinguish: null, requirement: null, unitCurrency: null, unitPrice: null, totalPrice: null, liableUserId: null, planStartDate: null, planEndDate: null, projectStatus: null, approveStatus: null, remarks: null, createBy: null, createTime: null, updateBy: null, updateTime: null } |
| | | const defaultForm = { id: null, name: null, projectTypeId: null, projectDistinguish: null, requirement: null, unitCurrency: null, performanceObjectives: null, quotationPrice: null, performancePrice: null, contractPrice: null, liableUserId: null, planStartDate: null, planEndDate: null, projectStatus: null, approveStatus: null, remarks: null, createBy: null, createTime: null, updateBy: null, updateTime: null } |
| | | export default { |
| | | name: 'Project', |
| | | components: { pagination, crudOperation, rrOperation, udOperation, moneyInput, DateRangePicker }, |
| | |
| | | unitCurrency: [ |
| | | { required: true, message: '单价币种不能为空', trigger: 'change' } |
| | | ], |
| | | unitPrice: [ |
| | | quotationPrice: [ |
| | | { required: true, validator: checkUnitPrice, trigger: 'blur' } |
| | | ], |
| | | totalPrice: [ |
| | | contractPrice: [ |
| | | { validator: checkTotalPrice, trigger: 'blur' } |
| | | ], |
| | | projectStatus: [ |
| | |
| | | // 单价币种赋值 |
| | | this.form.unitCurrency = res[0].standardUnitCurrency |
| | | // 单价金额赋值 |
| | | this.form.unitPrice = res[0].standardUnitPrice |
| | | this.form.quotationPrice = res[0].standardUnitPrice |
| | | // 单价金额赋值 |
| | | this.form.performancePrice = res[0].standardProfitPrice |
| | | this.random = Math.random() |
| | | }) |
| | | }, |