|
@@ -72,14 +72,9 @@
|
|
|
<el-dropdown-item v-if="user.company.packageProject == 1 && permissions.projectCostOfItems">
|
|
|
<el-link type="primary" :underline="false" @click="showBaseCostItemDialog">{{ $t('baselinecostitem') }}</el-link>
|
|
|
</el-dropdown-item>
|
|
|
- <!-- <el-dropdown-item v-if="user.company.packageProject == 1 && user.companyId == '936'"> -->
|
|
|
- <!-- <el-dropdown-item >
|
|
|
- <el-link type="primary" :underline="false" @click="keyNodesIsShow = true">关键节点项</el-link>
|
|
|
- </el-dropdown-item> -->
|
|
|
<el-dropdown-item v-if="permissions.projectClassification">
|
|
|
<el-link type="primary" :underline="false" @click="showClfDialog = true">{{ $t('classificationmanagement') }}</el-link>
|
|
|
</el-dropdown-item>
|
|
|
- <!-- <el-dropdown-item v-if="user.timeType.mainProjectState == 1 && !permissions.projectClassification"> -->
|
|
|
<el-dropdown-item v-if="user.timeType.mainProjectState == 1">
|
|
|
<el-link type="primary" :underline="false" @click="mainProjectDialog = true">{{ $t('masterprojectmanagement') }}</el-link>
|
|
|
</el-dropdown-item>
|
|
@@ -95,6 +90,9 @@
|
|
|
<el-dropdown-item v-if="user.companyId==3385 && permissions.projectClassification">
|
|
|
<el-link type="primary" :underline="false" @click="functionalDivisionDig=true,getFunctionalList()">{{'职能分工设置'}}</el-link>
|
|
|
</el-dropdown-item>
|
|
|
+ <el-dropdown-item v-if="user.timeType.projectManDay == 1 && permissions.projectClassification">
|
|
|
+ <el-link type="primary" :underline="false" @click="projectManDaySettingDialog = true;getManDaySetting()">{{ '预估工时配置' }}</el-link>
|
|
|
+ </el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
</el-form-item>
|
|
@@ -622,7 +620,8 @@
|
|
|
</el-form-item>
|
|
|
|
|
|
<!-- 增加项目人天字段 绎维固定字段 -->
|
|
|
- <el-form-item label="项目人天" v-if="user.timeType.projectManDay == 1">
|
|
|
+ <el-form-item v-if="user.timeType.projectManDay == 1">
|
|
|
+ <template slot="label"><span v-if="manDaySetting.projectManDayFillMode == 2 || (manDaySetting.projectManDayFillMode == 1 && addForm.fromOutside == 0)" style="padding:5px;color:red;">*</span>项目人天</template>
|
|
|
<el-input v-model.number="addForm.manDay" :placeholder="$t('peaseenterthe')" @input="jisuanEstimatedWorkTime(addForm.manDay)" style="width: 100px"></el-input><span style="margin-left:10px;position:absolute;">人天(预估工时:{{this.estimatedWorkTime}}h)</span>
|
|
|
<el-tooltip effect="dark" :content="$t('根据系统基础设置每日正常工作时长计算,1人天为一个每日正常工作时长')" placement="top-start" style="margin-left:180px">
|
|
|
<i class="el-icon-question" style="color:#606266"></i>
|
|
@@ -1070,6 +1069,43 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
+
|
|
|
+ <el-dialog title="项目预估工时配置" show-header="false" v-if="projectManDaySettingDialog" :visible.sync="projectManDaySettingDialog" :close-on-click-modal="false" customClass="customWidth" width="600px">
|
|
|
+ <el-form label-width="200px" :form="manDaySetting">
|
|
|
+ <el-form-item :label="'预估工时是否必填'" >
|
|
|
+ <el-select v-model="manDaySetting.projectManDayFillMode" :placeholder="$t('defaultText.pleaseChoose')" >
|
|
|
+ <el-option label="非必填" :value="0"></el-option>
|
|
|
+ <el-option label="工时系统创建的项目必填" :value="1"></el-option>
|
|
|
+ <el-option label="工时系统和外部同步的项目都必填" :value="2"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item :label="'项目工时提醒百分比'" >
|
|
|
+ <el-input v-model="manDaySetting.projectWarningPercent" type="number" style="width:200px;">
|
|
|
+ </el-input>%
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item :label="'项目工时不足时'" >
|
|
|
+ <el-select v-model="manDaySetting.projectFronzeOnLack" :placeholder="$t('defaultText.pleaseChoose')" >
|
|
|
+ <el-option label="禁止填报" :value="1"></el-option>
|
|
|
+ <el-option label="可以填报,仅提醒" :value="0"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item :label="'分组工时提醒百分比'" v-if="user.company.packageProject == 1">
|
|
|
+ <el-input v-model="manDaySetting.groupWarningPercent" type="number" style="width:200px;">
|
|
|
+ </el-input>%
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item :label="'分组工时不足时'" v-if="user.company.packageProject == 1" >
|
|
|
+ <el-select v-model="manDaySetting.groupFronzeOnLack" :placeholder="$t('defaultText.pleaseChoose')" >
|
|
|
+ <el-option label="禁止填报" :value="1"></el-option>
|
|
|
+ <el-option label="可以填报,仅提醒" :value="0"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="default" @click="projectManDaySettingDialog = false" >{{ $t('Shutdown') }}</el-button>
|
|
|
+ <el-button type="primary" @click="saveProjectManDaySetting()" >保存</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
<!-- 导出任务分组 -->
|
|
|
<el-dialog :title="'导出任务分组'" show-header="false" v-if="groupTaskDialog" :visible.sync="groupTaskDialog" :close-on-click-modal="false" customClass="customWidth" width="600px">
|
|
|
<el-form>
|
|
@@ -1629,6 +1665,8 @@ a {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ manDaySetting:{},
|
|
|
+ projectManDaySettingDialog: false,
|
|
|
projectListPageComponentKey: 1,
|
|
|
isDeleting: false,
|
|
|
forSubProjectlist:[],
|
|
@@ -1924,6 +1962,47 @@ a {
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
+ saveProjectManDaySetting() {
|
|
|
+ this.http.post('/estimate-time-setting/save', this.manDaySetting,
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.projectManDaySettingDialog = false;
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //获取项目预估工时配置数据
|
|
|
+ getManDaySetting() {
|
|
|
+ this.http.post('/estimate-time-setting/get', {
|
|
|
+ companyId: this.user.companyId
|
|
|
+ },
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.manDaySetting = res.data;
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
submitCopySubProject() {
|
|
|
//获取选中的项目
|
|
|
if (this.checkedPForSubArr.length == 0) {
|
|
@@ -4397,7 +4476,8 @@ a {
|
|
|
projectMainId: '',
|
|
|
outputValue: '',
|
|
|
bu: [],
|
|
|
- manDay:0
|
|
|
+ manDay:0,
|
|
|
+ fromOutside: 0,
|
|
|
// deptId: []
|
|
|
}
|
|
|
this.estimatedWorkTime=''
|
|
@@ -4534,7 +4614,8 @@ a {
|
|
|
bu: buascaderList,
|
|
|
manDay:item.manDay==null?0:item.manDay,
|
|
|
manDayStartDate:item.manDayStartDate,
|
|
|
- manDayDisable:item.manDay
|
|
|
+ manDayDisable:item.manDay,
|
|
|
+ fromOutside:item.fromOutside
|
|
|
}
|
|
|
for(var i in this.dataList) {
|
|
|
var str = 'plate' + (+i + 1)
|
|
@@ -4634,6 +4715,9 @@ a {
|
|
|
// this.findUserInTree()
|
|
|
}
|
|
|
this.addFormVisible = true;
|
|
|
+ if (this.user.timeType.projectManDay == 1) {
|
|
|
+ this.getManDaySetting();
|
|
|
+ }
|
|
|
if (this.user.company.packageEngineering == 1) {
|
|
|
if (this.professionList.length == 0) {
|
|
|
this.getProfessionList();
|
|
@@ -4874,6 +4958,7 @@ a {
|
|
|
if (this.user.timeType.outputValueStatus == 1){
|
|
|
formData.append("outputValue",this.addForm.outputValue ? this.addForm.outputValue : 0)
|
|
|
}
|
|
|
+
|
|
|
var listId = []
|
|
|
var listName = []
|
|
|
for(var i in this.auseList) {
|
|
@@ -4944,6 +5029,17 @@ a {
|
|
|
}
|
|
|
formData.append("buId", this.addForm.bu ? this.addForm.bu : '');
|
|
|
if(this.user.timeType.projectManDay){
|
|
|
+ //检验预估人天的必填属性
|
|
|
+ if (this.manDaySetting.projectManDayFillMode == 2 || (this.manDaySetting.projectManDayFillMode == 1 && this.addForm.fromOutside == 0)) {
|
|
|
+ if (!this.addForm.manDay) {
|
|
|
+ this.$message({
|
|
|
+ message: '预估工时不能为0',
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ this.addLoading = false;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
formData.append("manDay", this.addForm.manDay ? this.addForm.manDay : '');
|
|
|
formData.append("manDayStartDate", this.addForm.manDayStartDate ? this.addForm.manDayStartDate : '');
|
|
|
}
|
|
@@ -5547,6 +5643,9 @@ a {
|
|
|
if(this.user.companyId == '936') {
|
|
|
this.getkeyNodes()
|
|
|
}
|
|
|
+ if (this.user.timeType.projectManDay == 1) {
|
|
|
+ this.getManDaySetting();
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|