|
@@ -82,13 +82,14 @@
|
|
</t-col>
|
|
</t-col>
|
|
</t-row>
|
|
</t-row>
|
|
</t-form>
|
|
</t-form>
|
|
- <t-space class="sop-step-footer">
|
|
|
|
- <template v-if="showAction">
|
|
|
|
- <t-button theme="primary" @click="submitHandle('START')"
|
|
|
|
- >提交</t-button
|
|
|
|
- >
|
|
|
|
- <t-button theme="default" @click="cancelHandle">取消</t-button>
|
|
|
|
- </template>
|
|
|
|
|
|
+ <t-space v-if="showAction" class="sop-step-footer">
|
|
|
|
+ <t-button theme="primary" @click="submitHandle('START')"
|
|
|
|
+ >提交</t-button
|
|
|
|
+ >
|
|
|
|
+ <t-button theme="default" @click="cancelHandle">取消</t-button>
|
|
|
|
+ </t-space>
|
|
|
|
+ <t-space v-else class="sop-step-footer" style="flex-direction: row">
|
|
|
|
+ <t-button theme="primary" @click="cancelHandle">返回</t-button>
|
|
</t-space>
|
|
</t-space>
|
|
</t-tab-panel>
|
|
</t-tab-panel>
|
|
</t-tabs>
|
|
</t-tabs>
|
|
@@ -123,6 +124,9 @@ const emit = defineEmits(['confirm', 'cancel']);
|
|
const IS_NEW_MODE = computed(() => {
|
|
const IS_NEW_MODE = computed(() => {
|
|
return props.type === 'new';
|
|
return props.type === 'new';
|
|
});
|
|
});
|
|
|
|
+const IS_VIEW_MODE = computed(() => {
|
|
|
|
+ return props.type === 'view';
|
|
|
|
+});
|
|
const IS_FILL_MODE = computed(() => {
|
|
const IS_FILL_MODE = computed(() => {
|
|
return props.type === 'fill';
|
|
return props.type === 'fill';
|
|
});
|
|
});
|
|
@@ -201,16 +205,12 @@ const initFill = async () => {
|
|
sopInfo.sopNo = res.sopNo;
|
|
sopInfo.sopNo = res.sopNo;
|
|
sopInfo.customManagerTypeStr = CUSTOMER_TYPE[crmInfo.value.customType];
|
|
sopInfo.customManagerTypeStr = CUSTOMER_TYPE[crmInfo.value.customType];
|
|
|
|
|
|
- curStep.value = res.currFlowTaskResult.taskName;
|
|
|
|
- currFlowTaskResultSetup.value = res.currFlowTaskResult.setup;
|
|
|
|
- curStepSetup.value = res.currFlowTaskResult.setup;
|
|
|
|
res.flowTaskHistoryList = res.flowTaskHistoryList || [];
|
|
res.flowTaskHistoryList = res.flowTaskHistoryList || [];
|
|
res.flowTaskHistoryList.forEach((item) => {
|
|
res.flowTaskHistoryList.forEach((item) => {
|
|
item.formProperty.forEach((v) => {
|
|
item.formProperty.forEach((v) => {
|
|
v.writable = false;
|
|
v.writable = false;
|
|
});
|
|
});
|
|
});
|
|
});
|
|
- allSteps.value = [...res.flowTaskHistoryList, res.currFlowTaskResult];
|
|
|
|
tabs.value = [
|
|
tabs.value = [
|
|
...res.flowTaskHistoryList.map((item) => {
|
|
...res.flowTaskHistoryList.map((item) => {
|
|
return {
|
|
return {
|
|
@@ -218,11 +218,24 @@ const initFill = async () => {
|
|
label: item.taskName,
|
|
label: item.taskName,
|
|
};
|
|
};
|
|
}),
|
|
}),
|
|
- {
|
|
|
|
|
|
+ ];
|
|
|
|
+
|
|
|
|
+ if (res.currFlowTaskResult) {
|
|
|
|
+ curStep.value = res.currFlowTaskResult.taskName;
|
|
|
|
+ currFlowTaskResultSetup.value = res.currFlowTaskResult.setup;
|
|
|
|
+ curStepSetup.value = res.currFlowTaskResult.setup;
|
|
|
|
+
|
|
|
|
+ allSteps.value = [...res.flowTaskHistoryList, res.currFlowTaskResult];
|
|
|
|
+ tabs.value.push({
|
|
value: res.currFlowTaskResult.taskName,
|
|
value: res.currFlowTaskResult.taskName,
|
|
label: res.currFlowTaskResult.taskName,
|
|
label: res.currFlowTaskResult.taskName,
|
|
- },
|
|
|
|
- ];
|
|
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ allSteps.value = [...res.flowTaskHistoryList];
|
|
|
|
+ curStepSetup.value = allSteps.value[0].setup;
|
|
|
|
+ curStep.value = allSteps.value[0].taskName;
|
|
|
|
+ }
|
|
|
|
+
|
|
allSteps.value.forEach((item) => {
|
|
allSteps.value.forEach((item) => {
|
|
item.formProperty.forEach((prop) => {
|
|
item.formProperty.forEach((prop) => {
|
|
prop.value = prop.value ? JSON.parse(prop.value).value : null;
|
|
prop.value = prop.value ? JSON.parse(prop.value).value : null;
|
|
@@ -260,6 +273,11 @@ const curFormConfig = computed(() => {
|
|
if (!stepData) return [];
|
|
if (!stepData) return [];
|
|
|
|
|
|
const formProperty = stepData.formProperty || [];
|
|
const formProperty = stepData.formProperty || [];
|
|
|
|
+ if (IS_VIEW_MODE.value) {
|
|
|
|
+ formProperty.forEach((item) => {
|
|
|
|
+ item.writable = false;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
return formProperty;
|
|
return formProperty;
|
|
});
|
|
});
|
|
watch(curFormConfig, (val) => {
|
|
watch(curFormConfig, (val) => {
|