|
@@ -193,6 +193,7 @@ const useAppState = useAppStore()
|
|
const projectId = ref(useAppState.getProjectId);
|
|
const projectId = ref(useAppState.getProjectId);
|
|
const contractId = ref(useAppState.getContractId);
|
|
const contractId = ref(useAppState.getContractId);
|
|
const projectInfo = ref(useAppState.getProjectInfo);
|
|
const projectInfo = ref(useAppState.getProjectInfo);
|
|
|
|
+const contractInfo = ref(useAppState.getContractInfo);
|
|
const isCollapse = ref(useAppState.getCollapse)
|
|
const isCollapse = ref(useAppState.getCollapse)
|
|
|
|
|
|
//路由参数
|
|
//路由参数
|
|
@@ -261,11 +262,17 @@ const firstTaskStatus = async () => {
|
|
}
|
|
}
|
|
//查询状态
|
|
//查询状态
|
|
const NodeStatus = ref('1')
|
|
const NodeStatus = ref('1')
|
|
|
|
+ const { contractType } = contractInfo.value;
|
|
|
|
+const authBtnTabKey = ref(contractType===2?'2':'1')
|
|
const queryNodeStatus = async () => {
|
|
const queryNodeStatus = async () => {
|
|
const info = treeItem.value;
|
|
const info = treeItem.value;
|
|
|
|
+ console.log(info,'info')
|
|
const {error, code, data} = await wbsApi.queryNodeStatus({
|
|
const {error, code, data} = await wbsApi.queryNodeStatus({
|
|
- primaryKeyId: info['contractIdRelation'] ? info['id'] : info['primaryKeyId'],
|
|
|
|
- classify: 1
|
|
|
|
|
|
+ // primaryKeyId: info['contractIdRelation'] ? info['id'] : info['primaryKeyId'],
|
|
|
|
+ // classify: 1
|
|
|
|
+ primaryKeyId: authBtnTabKey.value==1 ? info['id'] : info['primaryKeyId'],
|
|
|
|
+ classify: authBtnTabKey.value
|
|
|
|
+
|
|
})
|
|
})
|
|
//1 未填报,2待上报,3已上报
|
|
//1 未填报,2待上报,3已上报
|
|
if (!error && code === 200) {
|
|
if (!error && code === 200) {
|
|
@@ -630,13 +637,23 @@ const reportModalClick = async (type) => {
|
|
console.log('上报')
|
|
console.log('上报')
|
|
iscanReport.value=isCanreport.value
|
|
iscanReport.value=isCanreport.value
|
|
}else{
|
|
}else{
|
|
- console.log('上报审批')
|
|
|
|
|
|
+
|
|
const rows = deepClone(tableSelectionKeys.value)
|
|
const rows = deepClone(tableSelectionKeys.value)
|
|
- //判断是否满足条件
|
|
|
|
- const result = rows.every(({isApprove})=> {
|
|
|
|
- return isApprove === true
|
|
|
|
|
|
+ const result=false
|
|
|
|
+ console.log('上报',rows)
|
|
|
|
+ //判断自身是否满足条件
|
|
|
|
+ const result1 = rows.every(({taskStatusStr})=> {
|
|
|
|
+ return taskStatusStr === '未上报'||taskStatusStr === '已废除'
|
|
})
|
|
})
|
|
|
|
+ if(result1){
|
|
|
|
+ //判断工序节点是否满足条件
|
|
|
|
+ result = rows.every(({isApprove})=> {
|
|
|
|
+ return isApprove === true
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
iscanReport.value=result
|
|
iscanReport.value=result
|
|
|
|
+
|
|
}
|
|
}
|
|
if(iscanReport.value){
|
|
if(iscanReport.value){
|
|
const { primaryKeyId, contractIdRelation } = treeItem.value
|
|
const { primaryKeyId, contractIdRelation } = treeItem.value
|