| | |
| | | label="故障类型" |
| | | v-model="model.reqType" |
| | | @confirm="handleConfirmReqType" |
| | | :disabled="reqTypeDis" |
| | | /> |
| | | </wd-cell-group> |
| | | |
| | |
| | | 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>([]) |
| | | // 故障类别 |
| | |
| | | * 选择设备 |
| | | */ |
| | | function handleSelectEqu() { |
| | | if(reqTypeDis.value){ |
| | | return false |
| | | } |
| | | uni.navigateTo({ |
| | | url: '/pages/equ/equ-list', |
| | | events: { |
| | |
| | | |
| | | function handleAddRepairReq() { |
| | | // 补充必要字段 |
| | | model.status = '0' |
| | | model.status = '0' // 报修后默认状态为待接单 |
| | | model.reqTime = formatDate(new Date()) |
| | | model.reqDept = userStore?.userInfo?.deptId |
| | | model.reqUser = userStore?.userInfo?.userId |
| | |
| | | }) |
| | | |
| | | 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> |