songshankun
2023-11-08 d517e5eacb38b075ae7cdffc011fc84401e587a8
src/views/dashboard/components/TaskControl.vue
@@ -22,7 +22,7 @@
      </BigButton>
      <template v-if="task?.Procedure.Status === 2 || task?.Procedure.Status === 3">
        <BigButton class="btn" bg-color="#ff9933">打印</BigButton>
        <BigButton class="btn" bg-color="#00cc33">报工</BigButton>
        <BigButton class="btn" bg-color="#00cc33" @click="openReportModal">报工</BigButton>
        <el-popconfirm
          width="340"
          confirm-button-text="确定"
@@ -43,6 +43,11 @@
    </div>
  </div>
  <TaskControlModal v-model="showTaskControlModal" :task="task" @produce-start="onProduceStart"></TaskControlModal>
  <ReportProductionModal
    v-model="showReportModal"
    @close="showReportModal = false"
    @submit="showReportModal = false"
  ></ReportProductionModal>
</template>
<script setup lang="ts">
import type { Task } from '@/api/task'
@@ -53,6 +58,7 @@
import { CircleCloseFilled } from '@element-plus/icons-vue'
import { finishTask } from '@/api'
import { ElMessage } from 'element-plus'
import ReportProductionModal from '@/views/dashboard/components/ReportProductionModal.vue'
const props = defineProps<{
  task?: Task
@@ -116,6 +122,11 @@
  const time = useDateFormat(timestamp * 1000, 'YYYY-MM-DD', { locales: 'zh-cn' })
  return time.value
}
// 报工
const showReportModal = ref(false)
function openReportModal() {
  showReportModal.value = true
}
</script>
<style scoped lang="scss">
$title-text-color: #9599af;