车间能级提升-智能设备管理系统
zhuguifei
2025-05-20 7fe7b6182c2d407d28c2c9da1c070c3ce964e3e7
eims-ui-mobile/src/pages/maint/order-detail.vue
@@ -2,29 +2,25 @@
{
  layout: 'default',
  needLogin: true,
  style: {
    navigationBarTitleText: '工单明细',
    'app-plus': {
      titleNView: {
        buttons: [
          {
            text: '提交',
            fontSize: '14px',
            color: '#FFFFFF',
          },
          {
            text: '',
            fontSize: '24px',
            color: '#FFFFFF',
          },
        ],
      },
    },
  },
  style: { navigationBarTitleText: '工单明细', navigationStyle: 'custom' },
}
</route>
<template>
  <view class="bg-base container" safeAreaInsetTopBottom>
    <wd-navbar
      title="保养工单"
      left-arrow
      @click-left="goBack"
      right-text="提交"
      @click-right="handleClickRight"
      custom-style="background: #4D80F0;"
      safeAreaInsetTop
    >
      <template #right>
        <text v-if="isOperatorOrRepair()" class="text-white">提交</text>
        <text v-else-if="isLeader()" class="text-white">验证</text>
      </template>
    </wd-navbar>
    <wd-form ref="form" :model="order" :rules="rules">
      <wd-cell-group custom-class="group" title="设备信息" border>
        <wd-cell title="设备名称" title-width="200rpx" is-link>
@@ -199,7 +195,7 @@
  toast.success('操作成功')
}
function handleClickRight(data: any) {
function handleSubmit(data: any) {
  message
    .confirm({
      msg: '确定提交?',
@@ -214,8 +210,10 @@
    })
}
onNavigationBarButtonTap((e) => {
  if (e.index === 0) {
const goBack = () => {
  uni.navigateBack()
}
function handleClickRight() {
    // 管理员角色 且待验证状态
    if (isLeader()) {
      switch (order.status) {
@@ -229,7 +227,7 @@
            // 修改工单状态为已完成
            const data: any = Object.assign({}, { id: order.id, status: order.status })
            data.status = '3'
            handleClickRight(data)
          handleSubmit(data)
          } else {
            toast.warning('请选择是否验证通过')
          }
@@ -250,7 +248,7 @@
              // 修改工单状态为待验证
              data.status = '2'
            }
            handleClickRight(data)
          handleSubmit(data)
          }
          break
        case '2':
@@ -262,7 +260,6 @@
      }
    }
  }
})
onMounted(() => {})
onLoad((options) => {