|
@@ -14,7 +14,8 @@
|
|
|
<el-radio-button :label="$t('projectworker')">{{$t('projectworker')}}({{noReportUserList.length}})</el-radio-button>
|
|
|
</el-radio-group>
|
|
|
<el-form-item v-if="permissions.financialProportion" style="margin-left:5px;">
|
|
|
- <el-link type="primary" :underline="false" @click="showSettingDialog()" >{{ $t('Apportionmentratesetting') }}</el-link>
|
|
|
+ <el-link type="primary" :underline="false" @click="showProjSettingDialog()" v-if="user.companyId == 88">{{ $t('ApportionmentProjsetting')}}</el-link>
|
|
|
+ <el-link type="primary" :underline="false" @click="showSettingDialog()" style="margin-left:50px;">{{ $t('Apportionmentratesetting') }}</el-link>
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item style="float:right;" v-if="permissions.financialUpload">
|
|
@@ -496,6 +497,24 @@
|
|
|
<el-button type="primary" @click="saveProjectSetting()" >{{ $t('btn.determine') }}</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog :title="proSetting.ymonth + $t('projectstobe assessed')" show-header="false" v-if="projSettingDialog" :visible.sync="projSettingDialog"
|
|
|
+ :close-on-click-modal="false" customClass="customWidth" width="1000px">
|
|
|
+ <el-radio-group v-model="proSetting.settingType" style="margin-top:15px;">
|
|
|
+ <el-radio :label=0 >全部已填报项目</el-radio>
|
|
|
+ <el-radio :label=1 >选择部分项目</el-radio>
|
|
|
+ <el-radio :label=2 >排除部分项目</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ <el-select v-model="proSettingChosenProjects" multiple filterable clearable style="width:100%;margin-top:10px;" v-show="proSetting.settingType > 0" @change="updateChosenView()">
|
|
|
+ <el-option v-for="item in allProjectList" :key="item.id" :label="item.projectName + '/'+ item.projectCode" :value="item.id">
|
|
|
+ <span style="float: left;color: #8492a6;">{{ item.projectCode }}</span>
|
|
|
+ <span style="float: right;font-size: 13px;">{{ item.projectName }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="default" @click="projSettingDialog = false" >{{ $t('Shutdown') }}</el-button>
|
|
|
+ <el-button type="primary" @click="saveCostProjectSetting()" >{{ $t('btn.determine') }}</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
<el-dialog :title="$t('allocationdata')" v-if="intoAmortizationDialog" :visible.sync="intoAmortizationDialog" customClass="customWidth" width="500px">
|
|
|
<p>{{'1.' + $t('other.download')}}
|
|
|
<el-link v-if="financialFlg" type="primary" style="margin-left:5px;" :underline="false" :href="'./upload/'+$t('allocationImporttemplates')+'.xlsx'" :download="$t('allocationImporttemplates') + '.xlsx'">{{$t('allocationImporttemplates')+'.xlsx'}}</el-link>
|
|
@@ -593,6 +612,11 @@ import { error } from 'dingtalk-jsapi';
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ proSettingChosenProjects:[],
|
|
|
+ proSetting: {
|
|
|
+ ymonth:null,settingType:0,
|
|
|
+ },
|
|
|
+ projSettingDialog: false,
|
|
|
operating: false,
|
|
|
showMissingDialog: false,
|
|
|
missingFinanceUserList: [],
|
|
@@ -668,6 +692,58 @@ import { error } from 'dingtalk-jsapi';
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
+ getMonthProjSetting() {
|
|
|
+ this.http.post('/cost-project-setting/get',{companyId: this.user.companyId, ymonth: this.date},res => {
|
|
|
+ if(res.code == 'ok'){
|
|
|
+ if (res.data.setting != null) {
|
|
|
+ this.proSetting = res.data.setting;
|
|
|
+ this.proSettingChosenProjects = JSON.parse(this.proSetting.projectJson);
|
|
|
+ }
|
|
|
+ if (this.allProjectList == null || this.allProjectList.length == 0) {
|
|
|
+ this.allProjectList = res.data.allProjectList;
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },err => {
|
|
|
+ this.$message({
|
|
|
+ message: err,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ saveCostProjectSetting() {
|
|
|
+ //处理选中的项目
|
|
|
+ if (this.proSetting.settingType == 0) {
|
|
|
+ this.proSetting.projectJson = '[]';
|
|
|
+ } else {
|
|
|
+ this.proSetting.projectJson = JSON.stringify(this.proSettingChosenProjects);
|
|
|
+ }
|
|
|
+ this.http.post('/cost-project-setting/save',this.proSetting,res => {
|
|
|
+ if(res.code == 'ok'){
|
|
|
+ this.$message({
|
|
|
+ message: '保存成功',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ this.projSettingDialog = false;
|
|
|
+ //刷新分摊数据显示
|
|
|
+ this.assignToProject();
|
|
|
+ }else{
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },err => {
|
|
|
+ this.$message({
|
|
|
+ message: er,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
uploadTest(){
|
|
|
this.http.post('/report/uploadThirdReportData',{
|
|
|
yearMonth: this.date
|
|
@@ -852,6 +928,7 @@ import { error } from 'dingtalk-jsapi';
|
|
|
this.assignToProject();
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
getLastMonthSetting() {
|
|
|
this.costSettingLoading = true;
|
|
|
var dataArr = this.date.split('-');
|
|
@@ -1067,6 +1144,12 @@ import { error } from 'dingtalk-jsapi';
|
|
|
this.settingDialog = true;
|
|
|
this.getMonthSetting();
|
|
|
},
|
|
|
+ showProjSettingDialog() {
|
|
|
+ this.projSettingDialog = true;
|
|
|
+ this.proSetting.ymonth = this.date;
|
|
|
+ this.proSetting.companyId = this.user.companyId;
|
|
|
+ this.getMonthProjSetting();
|
|
|
+ },
|
|
|
handleSelectionChange(val) {
|
|
|
this.multipleSelection = val;
|
|
|
},
|
|
@@ -1194,15 +1277,14 @@ import { error } from 'dingtalk-jsapi';
|
|
|
|
|
|
|
|
|
// },
|
|
|
- // getProjects() {
|
|
|
- // this.http.post('/finance/getProjects', {companyId: this.user.companyId, yearMonth: this.date},
|
|
|
- // res => {
|
|
|
- // if (res.code == "ok") {
|
|
|
- // this.projectCols = res.data.financeProjects;
|
|
|
- // this.allProjectList = res.data.allProjectList;
|
|
|
- // }});
|
|
|
+ getProjects() {
|
|
|
+ this.http.post('/project/getSimpleProjectList', {companyId: this.user.companyId},
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.allProjectList = res.data.allProjectList;
|
|
|
+ }});
|
|
|
|
|
|
- // },
|
|
|
+ },
|
|
|
// showNoProjectUsers() {
|
|
|
// this.showNPDialog = true;
|
|
|
// this.http.post('/finance/getNoProjectUsers', {yearMonth: this.date},
|
|
@@ -1775,7 +1857,6 @@ import { error } from 'dingtalk-jsapi';
|
|
|
};
|
|
|
|
|
|
this.getCustomColumn();
|
|
|
- // this.getProjects();
|
|
|
this.addreviewer();
|
|
|
this.arrter()
|
|
|
this.loadMonthData()
|