|
@ -14,31 +14,28 @@ |
|
|
<view class="title-txt"> |
|
|
<view class="title-txt"> |
|
|
{{item.maintenanceDesc}} |
|
|
{{item.maintenanceDesc}} |
|
|
</view> |
|
|
</view> |
|
|
<u-tag text="待接单" v-if="item.status == 'PENDING'" bg-color='rgba(255,255,255,0)' color='#fe8463' border-color='#fe8463' type="primary" shape='circle'/> |
|
|
<u-tag text="待派工" v-if="item.status == '0'" bg-color='rgba(255,255,255,0)' color='#fe8463' border-color='#fe8463' type="primary" shape='circle'/> |
|
|
<u-tag text="已撤回" v-else-if="item.status=='REJECTED'" bg-color='rgba(255,255,255,0)' color='#d7d7d7' border-color='#d7d7d7 ' type="warning" shape='circle'/> |
|
|
<u-tag text="已逾期" v-if="item.status == '1'" bg-color='rgba(255,255,255,0)' color='#fe8463' border-color='#fe8463' type="primary" shape='circle'/> |
|
|
<u-tag text="已转办" v-else-if="item.status=='TRANSFERRED'" bg-color='rgba(255,255,255,0)' color='#e01f54' border-color='#e01f54' type="success" shape='circle'/> |
|
|
<u-tag text="已退单" v-if="item.status == '2'" bg-color='rgba(255,255,255,0)' color='#fe8463' border-color='#fe8463' type="primary" shape='circle'/> |
|
|
<u-tag text="已接单" v-else-if="item.status=='PECEIVED'" bg-color='rgba(255,255,255,0)' color='#005eaa' border-color='#005eaa ' type="error" shape='circle'/> |
|
|
<u-tag text="待接单" v-if="item.status == '3'" bg-color='rgba(255,255,255,0)' color='#fe8463' border-color='#fe8463' type="primary" shape='circle'/> |
|
|
<u-tag text="已验证" v-else-if="item.status=='VERIFIED'" bg-color='rgba(255,255,255,0)' color='#2EC7C9' border-color='#2EC7C9' type="info" shape='circle'/> |
|
|
<u-tag text="待执行" v-else-if="item.status=='4'" bg-color='rgba(255,255,255,0)' color='#005eaa' border-color='#005eaa ' type="error" shape='circle'/> |
|
|
<u-tag text="已完成" v-else-if="item.status=='COMPLETED'" bg-color='rgba(255,255,255,0)' color='#2ba471' border-color='#2ba471' type="info" shape='circle'/> |
|
|
<u-tag text="执行中" v-else-if="item.status=='5'" bg-color='rgba(255,255,255,0)' color='#005eaa' border-color='#005eaa ' type="error" shape='circle'/> |
|
|
<u-tag text="报修人已确认" v-else-if="item.status=='APPLYPASS'" bg-color='rgba(255,255,255,0)' color='#2ba471' border-color='#2ba471' type="info" shape='circle'/> |
|
|
<u-tag text="待维修验证" v-else-if="item.status=='6'" bg-color='rgba(255,255,255,0)' color='#2ba471' border-color='#2ba471' type="info" shape='circle'/> |
|
|
|
|
|
<u-tag text="待报修验证" v-else-if="item.status=='7'" bg-color='rgba(255,255,255,0)' color='#2ba471' border-color='#2ba471' type="info" shape='circle'/> |
|
|
|
|
|
<u-tag text="已完成" v-else-if="item.status=='8'" bg-color='rgba(255,255,255,0)' color='#2EC7C9' border-color='#2EC7C9' type="info" shape='circle'/> |
|
|
|
|
|
<u-tag text="已作废" v-else-if="item.status=='9'" bg-color='rgba(255,255,255,0)' color='#2ba471' border-color='#2ba471' type="info" shape='circle'/> |
|
|
</view> |
|
|
</view> |
|
|
<view class="dec"> |
|
|
<view class="dec"> |
|
|
工单单号:<span>{{item.number}}</span> |
|
|
工单单号:<span>{{item.number}}</span> |
|
|
</view> |
|
|
</view> |
|
|
<view class="dec"> |
|
|
<view class="dec"> |
|
|
类型:<span>{{item.type=='DEVICE'?'设备':item.type=='TECH'?'工艺':'模具'}}</span> |
|
|
类型:<span>设备</span> |
|
|
</view> |
|
|
</view> |
|
|
<view class="dec"> |
|
|
<view class="dec"> |
|
|
{{`${params.type=='DEVICE'?'设备':params.type=='TECH'?'工艺' : '模具'}`}}编号:<span>{{item.deviceNumber}}</span> |
|
|
设备编号:<span>{{item.equipmentCode}}</span> |
|
|
</view> |
|
|
</view> |
|
|
<view class="dec"> |
|
|
<view class="dec"> |
|
|
{{`${params.type=='DEVICE'?'设备':params.type=='TECH'?'工艺' : '模具'}`}}名称:<span>{{item.name}}</span> |
|
|
设备名称:<span>{{item.equipmentName}}</span> |
|
|
</view> |
|
|
|
|
|
<view class="dec"> |
|
|
|
|
|
所属厂区:<span>{{item.factoryAreaName}}</span> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="dec"> |
|
|
|
|
|
班次:<span>{{item.classesName}}</span> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
<view class="dec"> |
|
|
<view class="dec"> |
|
|
故障类型:<span>{{item.faultTypeName}}</span> |
|
|
故障类型:<span>{{item.faultTypeName}}</span> |
|
@ -72,6 +69,7 @@ |
|
|
} from 'vue' |
|
|
} from 'vue' |
|
|
import * as repairOrderApi from "@/api/eam/repairOrder" |
|
|
import * as repairOrderApi from "@/api/eam/repairOrder" |
|
|
import { useCountStore } from '@/store' |
|
|
import { useCountStore } from '@/store' |
|
|
|
|
|
import * as deviceApi from "@/api/eam/device.js" |
|
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance() |
|
|
const { proxy } = getCurrentInstance() |
|
|
// 获取自定义的store |
|
|
// 获取自定义的store |
|
@ -89,23 +87,37 @@ |
|
|
function addForm(item) { |
|
|
function addForm(item) { |
|
|
proxy.$tab.navigateTo(`/pages/eam/repairOrder/addForm?type=${params.value.type}&data=${encodeURIComponent(JSON.stringify(item))}`) |
|
|
proxy.$tab.navigateTo(`/pages/eam/repairOrder/addForm?type=${params.value.type}&data=${encodeURIComponent(JSON.stringify(item))}`) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
async function getList() { |
|
|
async function getList() { |
|
|
if (status.value == 'nomore') return; |
|
|
if (status.value === 'nomore') return; |
|
|
status.value = 'loading'; |
|
|
|
|
|
proxy.$modal.loading('加载中') |
|
|
status.value = 'loading'; |
|
|
await repairOrderApi.repairOrderPage(params.value,params.value.type).then((res) => { |
|
|
proxy.$modal.loading('加载中'); |
|
|
proxy.$modal.closeLoading() |
|
|
|
|
|
if (res.data.list.length > 0) { |
|
|
try { |
|
|
list.value = list.value.concat(res.data.list); |
|
|
const res = await repairOrderApi.repairOrderPage(params.value, params.value.type); |
|
|
params.value.pageNo++; |
|
|
const resp = await deviceApi.deviceNoPage(); |
|
|
status.value = 'loadmore' |
|
|
|
|
|
} else { |
|
|
proxy.$modal.closeLoading(); |
|
|
status.value = 'nomore' |
|
|
|
|
|
} |
|
|
if (res.data.list.length > 0) { |
|
|
}).catch(() => { |
|
|
// 匹配并设置 equipmentName |
|
|
proxy.$modal.closeLoading() |
|
|
res.data.list.forEach(element => { |
|
|
}) |
|
|
const matchedItem = resp.data.find(item => item.equipmentCode === element.code); |
|
|
|
|
|
if (matchedItem) { |
|
|
|
|
|
element.equipmentName = matchedItem.name; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
list.value = list.value.concat(res.data.list); |
|
|
|
|
|
params.value.pageNo++; |
|
|
|
|
|
status.value = 'loadmore'; |
|
|
|
|
|
} else { |
|
|
|
|
|
status.value = 'nomore'; |
|
|
|
|
|
} |
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
proxy.$modal.closeLoading(); |
|
|
|
|
|
console.error('Error fetching data:', error); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
onLoad((option) => { |
|
|
onLoad((option) => { |
|
|
if (option.type) params.value.type = option.type; |
|
|
if (option.type) params.value.type = option.type; |
|
|