|
@@ -38,13 +38,13 @@
|
|
</div>
|
|
</div>
|
|
<div class="hc-footer-box">
|
|
<div class="hc-footer-box">
|
|
<HcTooltip keys="ledger_query_save_form">
|
|
<HcTooltip keys="ledger_query_save_form">
|
|
- <el-button type="primary" hc-btn :disabled="!isTableForm" :loading="tableFormSaveLoading" @click="tableFormSaveClick">
|
|
|
|
|
|
+ <el-button type="primary" hc-btn :disabled="!isTableForm || taskStatus === 3 || taskStatus === 4" :loading="tableFormSaveLoading" @click="tableFormSaveClick">
|
|
<HcIcon name="save"/>
|
|
<HcIcon name="save"/>
|
|
<span>保存</span>
|
|
<span>保存</span>
|
|
</el-button>
|
|
</el-button>
|
|
</HcTooltip>
|
|
</HcTooltip>
|
|
<HcTooltip keys="ledger_query_report_form">
|
|
<HcTooltip keys="ledger_query_report_form">
|
|
- <el-button hc-btn :disabled="!isTableForm" @click="reportModalClick">
|
|
|
|
|
|
+ <el-button hc-btn :disabled="!isTableForm || taskStatus === 3 || taskStatus === 4" @click="reportModalClick">
|
|
<HcIcon name="send-plane-2"/>
|
|
<HcIcon name="send-plane-2"/>
|
|
<span>上报</span>
|
|
<span>上报</span>
|
|
</el-button>
|
|
</el-button>
|
|
@@ -56,23 +56,27 @@
|
|
</el-button>
|
|
</el-button>
|
|
</HcTooltip>
|
|
</HcTooltip>
|
|
<HcTooltip keys="ledger_query_copy_form">
|
|
<HcTooltip keys="ledger_query_copy_form">
|
|
- <el-button hc-btn :disabled="!isTableForm" @click="copyTableFormClick">
|
|
|
|
|
|
+ <el-button hc-btn :disabled="!isTableForm || taskStatus === 3 || taskStatus === 4" @click="copyTableFormClick">
|
|
<HcIcon name="file-copy-2"/>
|
|
<HcIcon name="file-copy-2"/>
|
|
<span>复制当前表格及内容</span>
|
|
<span>复制当前表格及内容</span>
|
|
</el-button>
|
|
</el-button>
|
|
</HcTooltip>
|
|
</HcTooltip>
|
|
<HcTooltip keys="ledger_query_time_form">
|
|
<HcTooltip keys="ledger_query_time_form">
|
|
- <el-button hc-btn :disabled="!isTableForm" @click="copyTimeLogModal">
|
|
|
|
|
|
+ <el-button hc-btn :disabled="!isTableForm || taskStatus === 3 || taskStatus === 4" @click="copyTimeLogModal">
|
|
<HcIcon name="file-copy-2"/>
|
|
<HcIcon name="file-copy-2"/>
|
|
<span>复制任意时间</span>
|
|
<span>复制任意时间</span>
|
|
</el-button>
|
|
</el-button>
|
|
</HcTooltip>
|
|
</HcTooltip>
|
|
<HcTooltip keys="ledger_query_add_form">
|
|
<HcTooltip keys="ledger_query_add_form">
|
|
- <el-button hc-btn :disabled="!isTableForm" @click="addTableFormClick">
|
|
|
|
|
|
+ <el-button hc-btn :disabled="!isTableForm || taskStatus === 3 || taskStatus === 4" @click="addTableFormClick">
|
|
<HcIcon name="add-circle"/>
|
|
<HcIcon name="add-circle"/>
|
|
<span>新增表格</span>
|
|
<span>新增表格</span>
|
|
</el-button>
|
|
</el-button>
|
|
</HcTooltip>
|
|
</HcTooltip>
|
|
|
|
+ <el-button hc-btn :disabled="!isTableForm || taskStatus === 1 || taskStatus === 2" @click="abolishTableFormClick">
|
|
|
|
+ <HcIcon name="delete-bin-3"/>
|
|
|
|
+ <span>废除</span>
|
|
|
|
+ </el-button>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!--关联工序-->
|
|
<!--关联工序-->
|
|
@@ -157,6 +161,7 @@ const dateCalendarChoice = ({date, choices}) => {
|
|
getExcelHtml(excelIdVal.value)
|
|
getExcelHtml(excelIdVal.value)
|
|
getTheLogBusinessData(excelIdVal.value, choices)
|
|
getTheLogBusinessData(excelIdVal.value, choices)
|
|
getSubmitLogDateList(date,primaryKeyId)
|
|
getSubmitLogDateList(date,primaryKeyId)
|
|
|
|
+ checkTheLogTaskStatus(choices,primaryKeyId)
|
|
}
|
|
}
|
|
|
|
|
|
//获取模板标签数据
|
|
//获取模板标签数据
|
|
@@ -268,6 +273,30 @@ const getSubmitLogDateList = async ({year},pid) => {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+//获取当前资料的任务状态
|
|
|
|
+const taskStatus = ref(1)
|
|
|
|
+const checkTheLogTaskStatus = async (choices,primaryKeyId) => {
|
|
|
|
+ if (primaryKeyId > 0) {
|
|
|
|
+ const { error, code, data } = await queryApi.checkTheLogTaskStatus({
|
|
|
|
+ projectId: projectId.value,
|
|
|
|
+ contractId: contractId.value,
|
|
|
|
+ nodePrimaryKeyId: primaryKeyId,
|
|
|
|
+ recordTime: choices
|
|
|
|
+ }, false)
|
|
|
|
+ //处理数据
|
|
|
|
+ const res = isString(data) ? data || '' : ''
|
|
|
|
+ if (!error && code === 200 && res) {
|
|
|
|
+ //1和2的时候所有按钮皆可操作,废除 除外
|
|
|
|
+ //3和4时, 除了预览和废除 都不行
|
|
|
|
+ taskStatus.value = data
|
|
|
|
+ } else {
|
|
|
|
+ taskStatus.value = 1
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ taskStatus.value = 1
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
//关联工序
|
|
//关联工序
|
|
const processNodeModal = ref(false)
|
|
const processNodeModal = ref(false)
|
|
const showProcessModal = () => {
|
|
const showProcessModal = () => {
|
|
@@ -538,6 +567,34 @@ const showReportFinish = () => {
|
|
window?.location?.reload() //刷新页面
|
|
window?.location?.reload() //刷新页面
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+//废除
|
|
|
|
+const abolishTableFormClick = () => {
|
|
|
|
+ window?.$messageBox?.alert('是否废除已上报的文件?', '废除文件', {
|
|
|
|
+ showCancelButton: true,
|
|
|
|
+ confirmButtonText: '确定废除',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ callback: (action) => {
|
|
|
|
+ if (action === 'confirm') {
|
|
|
|
+ theLogOneAbolish()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+//确认废除
|
|
|
|
+const theLogOneAbolish = async () => {
|
|
|
|
+ const {primaryKeyId} = menuItem.value
|
|
|
|
+ const { error, code } = await queryApi.theLogOneAbolish({
|
|
|
|
+ projectId: projectId.value,
|
|
|
|
+ contractId: contractId.value,
|
|
|
|
+ nodePrimaryKeyId: primaryKeyId,
|
|
|
|
+ recordTime: recordTime.value
|
|
|
|
+ })
|
|
|
|
+ //处理数据
|
|
|
|
+ if (!error && code === 200) {
|
|
|
|
+ window.$message?.success('废除成功')
|
|
|
|
+ window?.location?.reload() //刷新页面
|
|
|
|
+ }
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|