车间能级提升-智能设备管理系统
zhuguifei
2025-05-13 14681dfe7052cb76eefcc0c17d0a0d708e1ac9dd
eims-ui-mobile/src/pages/repair/repair-add.vue
@@ -35,6 +35,7 @@
          label="故障类型"
          v-model="model.reqType"
          @confirm="handleConfirmReqType"
          :disabled="reqTypeDis"
        />
      </wd-cell-group>
@@ -181,6 +182,25 @@
const toast = useToast()
const userStore = useUserStore()
/**
 * 其他页面传过来的数据
 * assetNo: 资产编号
 * from: 是否是扫码进来的,如果是扫码进来,只能查询固定设备的数据
 */
interface PageParams {
  equId?: string
  equName?: string
  from?: string
}
// 页面参数,上个页面传递过来的参数
const option = reactive<PageParams>({
  equId: '',
  equName: '',
  from: '',
})
const reqTypeDis = ref(false)
// 报修类型
const reqList = ref<any>([])
// 故障类别
@@ -228,6 +248,9 @@
 * 选择设备
 */
function handleSelectEqu() {
  if(reqTypeDis.value){
    return false
  }
  uni.navigateTo({
    url: '/pages/equ/equ-list',
    events: {
@@ -294,7 +317,7 @@
function handleAddRepairReq() {
  // 补充必要字段
  model.status = '0'
  model.status = '0' // 报修后默认状态为待接单
  model.reqTime = formatDate(new Date())
  model.reqDept = userStore?.userInfo?.deptId
  model.reqUser = userStore?.userInfo?.userId
@@ -397,6 +420,15 @@
})
onLoad((options) => {
  Object.assign(option, options)
  // 扫码页面进入的一些初始化
  if (option.from === 'scan') {
    model.equId = option?.equId
    model.equName = option?.equName
    // 设置类型为设备类型
    model.reqType = '1'
    reqTypeDis.value = true
  }
  initData()
})
</script>