|
@@ -5,6 +5,7 @@
|
|
|
v-model="activeType"
|
|
|
:before-leave="beforeLeave"
|
|
|
>
|
|
|
+ <!-- 合同段信息 -->
|
|
|
<el-tab-pane
|
|
|
label="合同段信息"
|
|
|
name="1"
|
|
@@ -222,9 +223,25 @@
|
|
|
</el-row>
|
|
|
<el-divider></el-divider>
|
|
|
<el-row :gutter="20">
|
|
|
+ <el-col
|
|
|
+ :span="12"
|
|
|
+ v-show="contractForm.contractType!=1"
|
|
|
+ >
|
|
|
+ <div class="head-font">施工方合同段权限配置</div>
|
|
|
+ <el-checkbox-group
|
|
|
+ v-model="idList"
|
|
|
+ class="martop15"
|
|
|
+ >
|
|
|
+ <el-checkbox
|
|
|
+ :label="item.contractId"
|
|
|
+ :key="key"
|
|
|
+ v-for="(item,key) in checkList"
|
|
|
+ >{{item.deptName}}</el-checkbox>
|
|
|
+ </el-checkbox-group>
|
|
|
+ </el-col>
|
|
|
<el-col :span="12">
|
|
|
<div class="head-font">组卷归档默认信息</div>
|
|
|
- <el-row>
|
|
|
+ <el-row class="martop15">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item
|
|
|
label="立卷人"
|
|
@@ -296,7 +313,10 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-col>
|
|
|
- <el-col :span="12">
|
|
|
+ <el-col
|
|
|
+ :span="12"
|
|
|
+ v-if="contractForm.contractType==1"
|
|
|
+ >
|
|
|
<div class="head-font">附加信息</div>
|
|
|
<el-form-item
|
|
|
label="项目地址"
|
|
@@ -330,6 +350,7 @@
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane
|
|
|
+ v-if="$route.query.contractType==1||$route.query.contractType===undefined"
|
|
|
label="分配WBS"
|
|
|
name="2"
|
|
|
>
|
|
@@ -517,9 +538,9 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getProjectDeatil, findProjectTree } from "@/api/manager/projectinfo";
|
|
|
+import { getProjectDeatil, findProjectTree, treeAllConstruction } from "@/api/manager/projectinfo";
|
|
|
import {
|
|
|
- submitContractInfo, getContractInfo, delFileFromUrl, searchRole, findAllUserByCondition, findUserByName,
|
|
|
+ submitContractInfo, getContractInfo, getContractInfo2, delFileFromUrl, searchRole, findAllUserByCondition, findUserByName,
|
|
|
saveUserInfoByProjectTow, removeUsersByIds, resetPasswordByUserId,
|
|
|
submitWbsTreeInContract, getContractInfoTree
|
|
|
} from "@/api/manager/contractinfo";
|
|
@@ -567,6 +588,8 @@ export default {
|
|
|
callback();
|
|
|
};
|
|
|
return {
|
|
|
+ idList: [],
|
|
|
+ checkList: [],
|
|
|
postIdss: '',
|
|
|
//#region
|
|
|
pageindx: 1,
|
|
@@ -592,6 +615,7 @@ export default {
|
|
|
isBackShow: false,
|
|
|
|
|
|
contractForm: {
|
|
|
+ contractType: 1,
|
|
|
contractAmount: 0
|
|
|
},
|
|
|
contractRules: {
|
|
@@ -696,6 +720,12 @@ export default {
|
|
|
} else {
|
|
|
this.contractUserList = [];
|
|
|
}
|
|
|
+ },
|
|
|
+ 'contractForm.contractType' (newValue) {
|
|
|
+ if (newValue != 1) {
|
|
|
+ this.treeAllConstruction()
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
@@ -743,16 +773,20 @@ export default {
|
|
|
if (!this.cid) {
|
|
|
this.contractForm.pid = this.pid;
|
|
|
} else {
|
|
|
- await this.getContractInfo();
|
|
|
+ if (this.$route.query.contractType == 1) {
|
|
|
+ await this.getContractInfo();//获取合同段基本信息
|
|
|
+ } else if (this.$route.query.contractType == 2 || this.$route.query.contractType == 3) {
|
|
|
+ await this.getContractInfo2()
|
|
|
+ }
|
|
|
}
|
|
|
- await this.getProjectDeatil();
|
|
|
+ await this.getProjectDeatil();//获取项目详情
|
|
|
if (this.$route.query.type) {
|
|
|
+ console.log(this.$route.query.type);
|
|
|
this.activeType = this.$route.query.type;
|
|
|
}
|
|
|
-
|
|
|
- this.getContractTypeList();
|
|
|
- this.getStoragePeriodList();
|
|
|
- this.getSecurityLevelList();
|
|
|
+ this.getContractTypeList();//获取合同类型
|
|
|
+ this.getStoragePeriodList();//获取业务字典
|
|
|
+ this.getSecurityLevelList();//获取安全等级
|
|
|
this.setHeaders();
|
|
|
},
|
|
|
beforeLeave (activeName, oldActiveName) {
|
|
@@ -801,7 +835,6 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
getProjectDeatil () {
|
|
|
return new Promise((resolve) => {
|
|
|
getProjectDeatil(this.pid).then((res) => {
|
|
@@ -834,7 +867,36 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ getContractInfo2 () {
|
|
|
+ return new Promise((resolve) => {
|
|
|
+ getContractInfo2({ id: this.cid, contractType: this.contractType }).then((res) => {
|
|
|
+ this.contractForm = res.data.data.contractInfo
|
|
|
+ if (res.data.data.wbsTreeContractList.length > 0) {
|
|
|
+ this.idList = []
|
|
|
+ res.data.data.wbsTreeContractList.forEach(val => {
|
|
|
+ if (val.contractIdRelation) {
|
|
|
+ this.idList.push(val.contractIdRelation)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
+ if (this.contractForm.startFileUrl) {
|
|
|
+ this.isBackShow = true;
|
|
|
+ }
|
|
|
+ if (this.contractForm.projectPlace) {
|
|
|
+ this.flageData = ['', '', this.contractForm.projectPlace]
|
|
|
+ }
|
|
|
+ if (Number(this.contractForm.contractAmount) < 0) {
|
|
|
+ this.contractForm.contractAmount = 0;
|
|
|
+ }
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.typeChang['1'] = false;
|
|
|
+ })
|
|
|
+ }).finally(() => {
|
|
|
+ resolve();
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
async saveQuit () {
|
|
|
this.btnLoad = true;
|
|
|
try {
|
|
@@ -880,7 +942,6 @@ export default {
|
|
|
} else if (type == 'p') {
|
|
|
num--;
|
|
|
}
|
|
|
-
|
|
|
this.activeType = num.toString();
|
|
|
this.btnLoad = false;
|
|
|
},
|
|
@@ -892,7 +953,26 @@ export default {
|
|
|
if (this.flageData.length == 3) {
|
|
|
this.contractForm.projectPlace = this.flageData[2];
|
|
|
}
|
|
|
- resolve(submitContractInfo(this.contractForm))
|
|
|
+ let das = this.contractForm
|
|
|
+ if (this.contractForm.contractType != 1) {
|
|
|
+ if (this.idList.length > 0) {
|
|
|
+ delete das.startStation
|
|
|
+ delete das.endStation
|
|
|
+ delete das.projectPlace
|
|
|
+ das.idList = []
|
|
|
+ this.idList.forEach(val => {
|
|
|
+ das.idList.push({ contractId: val })
|
|
|
+ })
|
|
|
+ resolve(submitContractInfo(das))
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: "error",
|
|
|
+ message: "请先选择施工方合同段权限配置"
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ resolve(submitContractInfo(das))
|
|
|
+ }
|
|
|
} else {
|
|
|
reject('验证失败')
|
|
|
}
|
|
@@ -1093,13 +1173,13 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
getRightTree () {
|
|
|
+ console.log(this.wbsId, this.projectInfo.id, this.contractForm.id);
|
|
|
getContractInfoTree(this.wbsId, this.projectInfo.id, this.contractForm.id).then((res) => {
|
|
|
if (Array.isArray(res.data.data)) {
|
|
|
this.$refs.treetotree.setRightTree(res.data.data);
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
saveWbsTree () {
|
|
|
let obj = {};
|
|
|
let ids = this.$refs.treetotree.getTreeAllId('rightTree');
|
|
@@ -1148,6 +1228,15 @@ export default {
|
|
|
},
|
|
|
//#endregion
|
|
|
|
|
|
+ //#region 合同段信息
|
|
|
+ async treeAllConstruction () {
|
|
|
+ const { data: res } = await treeAllConstruction({ projectId: this.$route.query.pid })
|
|
|
+ console.log(res);
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.checkList = res.data
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //#endregion
|
|
|
}
|
|
|
};
|
|
|
</script>
|