| | |
| | | v-model="dataList" |
| | | @query="queryList" |
| | | :auto="false" |
| | | refresher-only |
| | | show-refresher-update-time |
| | | > |
| | | <template #top> |
| | |
| | | <wd-card type="rectangle"> |
| | | <template #title> |
| | | <view class="flex justify-between"> |
| | | <view class="flex items-center menu-title-box"> |
| | | <view class="menu-indicator"></view> |
| | | <view class="ml-1 text-lg align-center">{{ maintSt.equName }}</view> |
| | | <view class="text-color-gray ml-2 text-sm">{{ maintSt.assetNo }}</view> |
| | | <view class="items-center menu-title-box"> |
| | | |
| | | <view class="flex justify-center ml-1 items-center align-center"> |
| | | <view class="menu-indicator"></view> |
| | | <view class="ml-1"> {{ maintSt.equName }} </view> |
| | | </view> |
| | | <view class="text-color-gray ml-2 text-xs">{{ maintSt.assetNo }}</view> |
| | | </view> |
| | | |
| | | <view class="flex items-center"> |
| | |
| | | > |
| | | <wd-input |
| | | v-model="part.name" |
| | | label="名称" |
| | | label="名称:" |
| | | label-width="100rpx" |
| | | placeholder="备件名称" |
| | | |
| | |
| | | /> |
| | | <wd-input |
| | | v-model="part.quantity" |
| | | label="数量" label-width="100rpx" |
| | | label="数量:" |
| | | label-width="100rpx" |
| | | placeholder="数量" type="number" :maxlength="5" /> |
| | | </view> |
| | | </view> |
| | |
| | | clearable |
| | | /> |
| | | <!-- 新增确认完成按钮 --> |
| | | <view class="flex justify-around mt-4"> |
| | | <wd-button type="primary" block size="large" v-if="maintSt.status === '0'" @click="handleClickRight">提交</wd-button> |
| | | <wd-button type="success" block size="large" v-if="isLeader() && maintSt.status === '1'" @click="handleComplete">确认完成</wd-button> |
| | | <view class="flex justify-around"> |
| | | <wd-button type="primary" style="margin: 20px" block v-if="maintSt.status === '0'" @click="handleClickRight">提交</wd-button> |
| | | <wd-button type="success" style="margin: 20px" block v-if="isLeader() && maintSt.status === '1'" @click="handleComplete">确认完成</wd-button> |
| | | </view> |
| | | </view> |
| | | <!-- 新增提交按钮 --> |
| | |
| | | import { getMaintSt, getMaintStOrderList, updateMaintOrder, updateMaintSt, updateMaintOrderBatch } from '@/service/maint' |
| | | import { ref, reactive } from 'vue' |
| | | import { useToast, useMessage } from 'wot-design-uni' |
| | | import { isLeader, isOperatorOrRepair } from '@/utils/RoleUtils' |
| | | import { isLeader, isLineOrRepair } from '@/utils/RoleUtils' |
| | | import { formatDate } from '@/utils/DateUtils' |
| | | import { useUserStore } from "@/store"; |
| | | import { getSpareList } from '@/service/spare' |
| | |
| | | dyzCount: null, |
| | | specialNote: '', |
| | | }) |
| | | const queryList = (pageNum?: number, pageSize?: number) => { |
| | | const queryList = () => { |
| | | const params: QueryParams = { |
| | | pageNum, |
| | | pageSize: 30, |
| | | maintCode: maintCode.value, |
| | | } |
| | | getMaintStOrderList(params) |
| | |
| | | } |
| | | }) |
| | | }) |
| | | console.log(res) |
| | | // 请勿在网络请求回调中给dataList赋值!!只需要调用complete就可以了 |
| | | paging.value.completeByTotal(res.rows, res.total) |
| | | paging.value.complete(res.rows) |
| | | }) |
| | | .catch((res) => { |
| | | console.error(res) |
| | |
| | | } |
| | | |
| | | function handleClickRight() { |
| | | if(isOperatorOrRepair()){ |
| | | |
| | | handleUpdateMaintSt() |
| | | } |
| | | |
| | | } |
| | | |