|
@@ -41,7 +41,7 @@
|
|
|
<!--底部操作栏-->
|
|
|
<HcTabbarBlock :height="77"/>
|
|
|
<hc-tabbars>
|
|
|
- <button type="primary" class="action-bar-btn" @click="submitClick">确认上报</button>
|
|
|
+ <button type="primary" class="action-bar-btn" :disabled="!isFixedFlow" @click="submitClick">确认上报</button>
|
|
|
</hc-tabbars>
|
|
|
</hc-sys>
|
|
|
</template>
|
|
@@ -93,6 +93,7 @@ const getEventChannel = async () => {
|
|
|
//获取流程数据
|
|
|
const fixedFlowData = ref([])
|
|
|
const linkUserJoinString = ref('')
|
|
|
+const isFixedFlow = ref(false)
|
|
|
const fixedFlowDefault = [{
|
|
|
value: 0, text: '自定义流程', disable: false, linkUserJoinString: null
|
|
|
}]
|
|
@@ -104,7 +105,6 @@ const getFixedFlowDataApi = async () => {
|
|
|
} else {
|
|
|
await getProcessData()
|
|
|
}
|
|
|
- uni.hideLoading();
|
|
|
}
|
|
|
|
|
|
//获取流程数据
|
|
@@ -112,7 +112,7 @@ const getProcessData = async () => {
|
|
|
linkUserJoinString.value = ''
|
|
|
fixedFlowData.value = fixedFlowDefault
|
|
|
const { projectId, contractId } = props.value
|
|
|
- const { error, code, data } = await flowApi.getPageData({
|
|
|
+ const { error, code, data, msg } = await flowApi.getPageData({
|
|
|
projectId: projectId,
|
|
|
contractId: contractId,
|
|
|
current: 1, size: 100,
|
|
@@ -127,6 +127,12 @@ const getProcessData = async () => {
|
|
|
linkUserJoinString: arr[i].linkUserJoinString
|
|
|
})
|
|
|
}
|
|
|
+ uni.hideLoading();
|
|
|
+ isFixedFlow.value = true
|
|
|
+ } else {
|
|
|
+ uni.hideLoading();
|
|
|
+ isFixedFlow.value = false
|
|
|
+ errorToast(msg ?? '任务流程异常');
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -144,7 +150,7 @@ const queryFixedFlowApi = async (type, datas) => {
|
|
|
linkUserJoinString.value = ''
|
|
|
fixedFlowData.value = fixedFlowDefault
|
|
|
const { projectId, contractId } = props.value
|
|
|
- const { error, code, data } = await queryFixedFlow({
|
|
|
+ const { error, code, data, msg } = await queryFixedFlow({
|
|
|
projectId: projectId,
|
|
|
contractId: contractId,
|
|
|
...flowJson,
|
|
@@ -159,6 +165,12 @@ const queryFixedFlowApi = async (type, datas) => {
|
|
|
linkUserJoinString: arr[i].linkUserJoinString
|
|
|
})
|
|
|
}
|
|
|
+ uni.hideLoading();
|
|
|
+ isFixedFlow.value = true
|
|
|
+ } else {
|
|
|
+ uni.hideLoading();
|
|
|
+ isFixedFlow.value = false
|
|
|
+ errorToast(msg ?? '任务流程异常');
|
|
|
}
|
|
|
}
|
|
|
|