|
@@ -14,9 +14,9 @@
|
|
|
</template>
|
|
|
<template #extra>
|
|
|
<el-button v-if="state === 2" type="success" round @click="onSubmitReportClick">查看验收意见</el-button>
|
|
|
- <el-button v-if="state === 2" type="danger" round>撤回提交</el-button>
|
|
|
- <el-button v-if="isShowSubmit && state !== 2" type="danger" round @click="submissionClick">确认提交</el-button>
|
|
|
- <el-button color="#7729F5" round :loading="saveDraftLaod" @click="officeDraft">暂存草稿</el-button>
|
|
|
+ <el-button v-if="state === 2" type="danger" round :loading="cancelLoading" @click="cancleSubmit">撤回提交</el-button>
|
|
|
+ <el-button v-if="isShowSubmit && state !== 2" type="danger" round :loading="subLoading" @click="submissionClick">确认提交</el-button>
|
|
|
+ <el-button color="#7729F5" round :loading="saveDraftLaod" :disabled="state === 2" @click="officeDraft">暂存草稿</el-button>
|
|
|
<el-button round plain type="danger" @click="previousStep">上一步</el-button>
|
|
|
<el-button type="danger" round plain @click="toBackClick">返回主页</el-button>
|
|
|
</template>
|
|
@@ -127,13 +127,16 @@ const getIsSubmit = async ()=>{
|
|
|
//短信验证
|
|
|
const SMSAuthLoading = ref(false)
|
|
|
const SMSAuthShow = ref(false)
|
|
|
+const subLoading = ref(false)
|
|
|
const SMSAuthConfirm = async () => {
|
|
|
SMSAuthShow.value = false
|
|
|
|
|
|
//确认提交调接口
|
|
|
+ subLoading.value = true
|
|
|
const { error, code, msg } = await writeApi.submitTable({
|
|
|
...consolusionData.value,
|
|
|
})
|
|
|
+ subLoading.value = false
|
|
|
if (!error && code === 200) {
|
|
|
window.$message.success(msg)
|
|
|
// state.value = 2
|
|
@@ -215,7 +218,6 @@ const getConclusion = async ()=>{
|
|
|
projectId: projectId.value,
|
|
|
})
|
|
|
if (!error && code === 200) {
|
|
|
- console.log(data, 'data')
|
|
|
consolusionData.value = getObjValue(data)
|
|
|
state.value = data['status']
|
|
|
} else {
|
|
@@ -228,6 +230,20 @@ const getConclusion = async ()=>{
|
|
|
|
|
|
}
|
|
|
}
|
|
|
+//撤回提交
|
|
|
+const cancelLoading = ref(false)
|
|
|
+const cancleSubmit = async ()=>{
|
|
|
+ cancelLoading.value = true
|
|
|
+ const { error, code, data, msg } = await writeApi.repealTable({
|
|
|
+ id: consolusionData.value.id,
|
|
|
+ })
|
|
|
+ cancelLoading.value = false
|
|
|
+ if (!error && code === 200) {
|
|
|
+ window.$message.success(msg)
|
|
|
+ getConclusion()
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|