|
|
@ -32,7 +32,7 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup> |
|
|
|
import { ref, computed } from 'vue'; |
|
|
|
import { ref, computed, watch, inject } from 'vue'; |
|
|
|
import { useStore } from 'vuex'; |
|
|
|
import { quickWords } from '@/config/deliver'; |
|
|
|
|
|
|
@ -42,12 +42,26 @@ const props = defineProps({ |
|
|
|
}); |
|
|
|
const emits = defineEmits(['hide', 'submit-end']); |
|
|
|
const store = useStore(); |
|
|
|
const remindData = computed(() => store.state.socket.remindData); // 小红点 |
|
|
|
const words = computed(() => quickWords[props.data.mode]); // 快捷用语 |
|
|
|
const projectId = computed(() => store.getters['project/projectId']); |
|
|
|
|
|
|
|
const task = inject('task'); |
|
|
|
const commit = ref(''); // 提交的信息 |
|
|
|
const score = ref(100); // 评分 |
|
|
|
|
|
|
|
let msgId = ref(null); |
|
|
|
|
|
|
|
watch(remindData, () => { |
|
|
|
remindData.value.forEach(remind => { |
|
|
|
const remind_data = JSON.parse(remind.data); |
|
|
|
|
|
|
|
if (remind_data.data.taskId === task.id) { |
|
|
|
msgId.value = remind.id; |
|
|
|
console.log('交付物检查弹框', msgId.value) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
/** |
|
|
|
* 提交评审信息 |
|
|
|
* 提交成功后隐藏modal 重置表单控件 |
|
|
@ -63,8 +77,9 @@ async function handleSubmit(mode) { |
|
|
|
type: mode === 'RESOLVE' ? 1 : 2, |
|
|
|
remark: commit.value, |
|
|
|
score: mode === 'RESOLVE' ? score.value : '', |
|
|
|
msgId: props.msgId |
|
|
|
msgId: msgId.value |
|
|
|
}; |
|
|
|
console.log('交付物审核', param, msgId.value) |
|
|
|
await uni.$u.api.checkDeliver(param); |
|
|
|
handleHide(); // 隐藏 + 重置 |
|
|
|
uni.$ui.showToast('审核信息提交成功'); |
|
|
|