车间能级提升-智能设备管理系统
zhuguifei
2025-05-13 14681dfe7052cb76eefcc0c17d0a0d708e1ac9dd
eims-ui-mobile/src/pages/repair/res-list.vue
@@ -140,9 +140,8 @@
                  size="small"
                  icon="edit-outline"
                  @click.stop="goToFeedBack(item)"
                  v-if="item.fbId === null"
                >
                  写评价
                  查看评价
                </wd-button>
              </view>
            </template>
@@ -176,9 +175,8 @@
                  size="small"
                  icon="edit-outline"
                  @click.stop="goToFeedBack(item)"
                  v-if="item.fbId === null"
                >
                  写评价
                  {{ item.fbId == null ? '写评价' : '查看评价' }}
                </wd-button>
              </view>
            </template>
@@ -201,15 +199,32 @@
const message = useMessage()
const toast = useToast()
/**
 * 其他页面传过来的数据
 * assetNo: 资产编号
 * from: 是否是扫码进来的,如果是扫码进来,只能查询固定设备的数据
 */
interface PageParams {
  assetNo?: string
  from?: string
}
// 页面参数,上个页面传递过来的参数
const option = reactive<PageParams>({
  assetNo: '',
  from: '',
})
// 维修单类型
const resTypeId = ref<number>(0)
const resTypeId = ref<number>(-1)
// 维修单处理状态
const status = ref<number>(0)
const status = ref<number>(-1)
const isSelectRes = ref(false)
const resTypeList = ref<any>([{ dictLabel: '所有类型', dictValue: 0 }])
const statusList = ref<any>([{ dictLabel: '所有状态', dictValue: 0 }])
const resTypeList = ref<any>([{ dictLabel: '所有类型', dictValue: -1 }])
const statusList = ref<any>([{ dictLabel: '所有状态', dictValue: -1 }])
function handleResType({ value }) {
  reloadData()
}
@@ -221,19 +236,23 @@
const dataList = ref([])
const queryList = (pageNum?: number, pageSize?: number) => {
  const parmams = {
  const params: any = {
    pageNum,
    pageSize,
    reqType: resTypeId.value,
    status: status.value,
  }
  if (resTypeId.value === 0) {
    delete parmams.reqType
  if (resTypeId.value === -1) {
    delete params.reqType
  }
  if (status.value === 0) {
    delete parmams.status
  if (status.value === -1) {
    delete params.status
  }
  getRepairResList(parmams)
  // 如果是从扫码页面过来,只能查询固定设备的数据
  if (option?.from === 'scan') {
    params.assetNo = option.assetNo
  }
  getRepairResList(params)
    .then((res: any) => {
      paging.value.completeByTotal(res.rows, res.total)
    })
@@ -308,7 +327,7 @@
function goToFeedBack(item) {
  uni.navigateTo({
    url: `/pages/repair/feedback?id=${item.id}`,
    url: `/pages/repair/repair-fb?id=${item.id}`,
  })
}
@@ -373,7 +392,8 @@
  const sList: any = await getDictInfo(DICT_REPAIR_RES_STATUS)
  statusList.value.push(...sList)
}
onLoad(() => {
onLoad((options) => {
  Object.assign(option, options)
  initData()
  uni.$on('res-list-refresh', reloadData)
})