| | |
| | | <template> |
| | | <view class="container"> |
| | | <cu-custom :bgColor="NavBarColor" :isBack="true" backRouterName="productionTask"> |
| | | <block slot="backText">返回</block> |
| | | <block slot="content">维修</block> |
| | | </cu-custom> |
| | | <cu-custom :bgColor="NavBarColor" :isBack="true"> |
| | | <block slot="backText">返回</block> |
| | | <block slot="content">待维修</block> |
| | | <block slot="right"> |
| | | <view @click="search"> |
| | | <image class="search" src="/static/icon/sear.png" style="width: 25px; height: 25px;" alt="" /> |
| | | </view> |
| | | </block> |
| | | </cu-custom> |
| | | |
| | | <view style="width: 100%;"> |
| | | <uni-popup ref="popup" background-color="#fff" :type="type"> |
| | |
| | | <!-- 基础表单校验 --> |
| | | <uni-forms ref="form" :modelValue="formData" validate-trigger="bind" err-show-type="undertext"> |
| | | <uni-group title="" top="0"> |
| | | <uni-forms-item name="numbers" label="领料申请单号:"> |
| | | <uni-easyinput type="text" v-model="formData.num" placeholder="请输入领料申请单号检索" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="name" label="领料产品:"> |
| | | <uni-easyinput v-model="formData.partNumNameModel" placeholder="请输入领料产品" /> |
| | | <uni-forms-item name="numbers" label="工单编号:"> |
| | | <uni-easyinput type="text" v-model="formData.num" placeholder="请输入工单编号检索" /> |
| | | </uni-forms-item> |
| | | </uni-group> |
| | | </uni-forms> |
| | |
| | | <view class="content"> |
| | | <uni-card margin="10px" spacing="1px" v-for="(item,index) in msgList" :key="index" |
| | | @click="onClickProductionTask(item)"> |
| | | |
| | | |
| | | |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">设备编号:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs text-bold radius text-right"> |
| | | {{item.equipmentId_dictText}} |
| | | {{item.equipmentCode}} |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">故障简称:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs radius text-right"> |
| | | {{item.faultName}} |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">设备名称:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs text-bold radius text-right"> |
| | | {{item.equipmentName}} |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">安装位置:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs text-blue radius text-right"> |
| | | {{item.installationPosition}} |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">维修状态:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs text-green radius text-right"> |
| | | {{item.reportStatus_dictText}} |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">故障描述:</view> |
| | | <view class="flex-sub bg-white padding-xs margin-xs text-green radius text-right"> |
| | | {{item.faultDescription}} |
| | | </view> |
| | | </view> |
| | | <view class="flex"> |
| | |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view class="flex"> |
| | | <view v-if="authIncludes('eam:repair:collect')" class="flex"> |
| | | <view class="flex-sub text-light bg-white padding-xs margin-xs radius">操作:</view> |
| | | <view class="flex-sub bg-blue padding-xs margin-xs radius text-sm text-center" |
| | | @click.stop="handleStartWork(item)" hover-class="is-hover">领取</view> |
| | | |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | |
| | | activeColor: '#5277A6', |
| | | url: { |
| | | stallList: "/eam/eamReportRepair/list", |
| | | add:'/eam/eamRepairOrder/add' |
| | | add: '/eam/eamRepairOrder/add' |
| | | }, |
| | | |
| | | upOption: { |
| | |
| | | announcement1: [], |
| | | msg1Count: 0, |
| | | msg2Count: 0, |
| | | msg1Title: "" |
| | | msg1Title: "", |
| | | equipmentId: '' |
| | | } |
| | | }, |
| | | mounted() { |
| | | console.log('从 store 获取的 auth:', this.$store.getters.getAuth) |
| | | }, |
| | | computed: { |
| | | authList() { |
| | | return this.$store.getters.getAuth || [] |
| | | }, |
| | | top() { |
| | | return this.CustomBar * 2 + 50 |
| | | }, |
| | |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | onShow() { |
| | | if (this.mescroll) { |
| | | this.mescroll.resetUpScroll() |
| | | } |
| | | }, |
| | | |
| | | onLoad: function(options) { |
| | | this.equipmentId = options.equipmentId ? |
| | | decodeURIComponent(options.equipmentId) : |
| | | ''; |
| | | }, |
| | | created() {}, |
| | | methods: { |
| | | |
| | | /** |
| | | * @param {Object} code按钮权限 |
| | | */ |
| | | authIncludes(code) { |
| | | return this.authList.some(auth => auth.action === code) |
| | | }, |
| | | /** |
| | | * 领取 |
| | | */ |
| | | handleStartWork(item) { |
| | | |
| | | this.$tip.loading(); |
| | | |
| | | uni.showLoading({ |
| | | mask: true, |
| | | title: "加载中....", |
| | | }) |
| | | this.$http.post(this.url.add, { |
| | | |
| | | actualEndTime: item.actualEndTime, |
| | | actualStartTime: item.actualStartTime, |
| | | createBy: item.actualStartTime, |
| | | createTime: item.createTime, |
| | | delFlag: item.delFlag, |
| | | equipmentId:item.equipmentId, |
| | | equipmentName: item.equipmentName, |
| | | faultReason:item.faultReason, |
| | | id: item.faultReason, |
| | | imageFiles:item.imageFiles, |
| | | imageFilesResult:null, |
| | | outsourcedEndTime:item.outsourcedEndTime, |
| | | outsourcedFlag:item.outsourcedFlag, |
| | | outsourcedPerson: item.outsourcedPerson, |
| | | outsourcedRepairDescription:item.outsourcedRepairDescription, |
| | | outsourcedStartTime:item.outsourcedStartTime, |
| | | repairCode:item.repairCode, |
| | | repairDescription:item.repairDescription, |
| | | repairStatus:item.repairStatus, |
| | | repairer:item.repairer, |
| | | reportId:item.id, |
| | | updateBy:item.updateBy, |
| | | updateTime: item.updateTime |
| | | |
| | | reportId: item.id, |
| | | }).then(res => { |
| | | console.log(res) |
| | | this.$tip.loaded(); |
| | | uni.hideLoading() |
| | | if (res.data.success) { |
| | | uni.showToast({ |
| | | icon: "success", |
| | | title: '领取成功', |
| | | duration: 2000 |
| | | }); |
| | | this.mescroll.resetUpScroll() |
| | | this.mescroll.resetUpScroll(); |
| | | } else { |
| | | uni.showModal({ |
| | | title: "提示", |
| | |
| | | * 详情页面 |
| | | */ |
| | | onClickProductionTask(item) { |
| | | |
| | | uni.navigateTo({ |
| | | url: '/pages/maintenanceReport/maintenanceReportDetils/maintenanceReportDetils?item=' + |
| | | encodeURIComponent(JSON.stringify(item)) |
| | | |
| | | }) |
| | | |
| | | // uni.navigateTo({ |
| | | // url: '/pages/maintenanceReport/maintenanceReportDetils/maintenanceReportDetils?item=' + |
| | | // encodeURIComponent(JSON.stringify(item)) |
| | | |
| | | // }) |
| | | }, |
| | | |
| | | search() { |
| | |
| | | pageSize: page.size, |
| | | order: 'desc', |
| | | column: 'createTime', |
| | | repairStatus: 'WAIT_REPAIR' |
| | | reportStatus: 'WAIT_REPAIR', |
| | | equipmentId: this.equipmentId || '' |
| | | }, |
| | | |
| | | }).then(res => { |
| | |
| | | |
| | | resetTask() { |
| | | this.formData.num = '' |
| | | this.formData.partNumNameModel = '' |
| | | this.$refs.popup.close(); |
| | | this.mescroll.resetUpScroll() |
| | | |
| | |
| | | /* 检索 */ |
| | | getSera() { |
| | | this.$refs.popup.close(); |
| | | let keyword = this.TabCur |
| | | |
| | | this.msgList = []; |
| | | |
| | | if (keyword == 0) { |
| | | this.$http.get(this.url.stallList, { |
| | | params: { |
| | | pageNo: 1, |
| | | pageSize: 999, |
| | | order: "desc", |
| | | column: "createTime", |
| | | num: '*' + this.formData.num + '*', |
| | | partNumNameModel: '*' + this.formData.partNumNameModel + '*', |
| | | status: 'published' |
| | | repairCode:this.formData.num, |
| | | reportStatus: 'WAIT_REPAIR', |
| | | equipmentId: this.equipmentId || '' |
| | | } |
| | | }).then(res => { |
| | | //联网成功的回调,隐藏下拉刷新和上拉加载的状态; |
| | |
| | | //联网失败, 结束加载 |
| | | this.mescroll.endErr(); |
| | | }) |
| | | |
| | | } else if (keyword == 1) { |
| | | this.$http.get(this.url.stallList, { |
| | | params: { |
| | | pageNo: 1, |
| | | pageSize: 999, |
| | | order: "desc", |
| | | column: "createTime", |
| | | status: 'training', |
| | | num: '*' + this.formData.num + '*', |
| | | partNumNameModel: '*' + this.formData.partNumNameModel + '*' |
| | | |
| | | } |
| | | }).then(res => { |
| | | //联网成功的回调,隐藏下拉刷新和上拉加载的状态; |
| | | |
| | | this.announcement1 = res.data.result.records |
| | | this.mescroll.endSuccess(this.announcement1.length); |
| | | console.log("url", res) |
| | | //设置列表数据 |
| | | if (res.data.success) { |
| | | console.log("res", res.data) |
| | | this.msg1Count = res.data.result.total |
| | | this.msg2Title = "通知(" + res.data.result.total + ")"; |
| | | for (let annItem of this.announcement1) { |
| | | this.msgList.push(annItem) |
| | | } |
| | | } |
| | | if (page.num == 1) { |
| | | this.msgList = []; //如果是第一页需手动制空列表 |
| | | this.msgList = this.msgList.concat(this.announcement1); //追加新数据 |
| | | } |
| | | |
| | | }).catch(() => { |
| | | //联网失败, 结束加载 |
| | | this.mescroll.endErr(); |
| | | }) |
| | | |
| | | } else if (keyword == 2) { |
| | | this.$http.get(this.url.stallList, { |
| | | params: { |
| | | pageNo: 1, |
| | | pageSize: 999, |
| | | order: "desc", |
| | | column: "createTime", |
| | | status: 'completed', |
| | | num: '*' + this.formData.num + '*', |
| | | partNumNameModel: '*' + this.formData.partNumNameModel + '*' |
| | | |
| | | } |
| | | }).then(res => { |
| | | //联网成功的回调,隐藏下拉刷新和上拉加载的状态; |
| | | |
| | | this.announcement1 = res.data.result.records |
| | | this.mescroll.endSuccess(this.announcement1.length); |
| | | console.log("url", res) |
| | | //设置列表数据 |
| | | if (res.data.success) { |
| | | console.log("res", res.data) |
| | | this.msg3Count = res.data.result.total |
| | | this.msg1Title = "通知(" + res.data.result.total + ")"; |
| | | for (let annItem of this.announcement1) { |
| | | this.msgList.push(annItem) |
| | | } |
| | | } |
| | | if (page.num == 1) { |
| | | this.msgList = []; //如果是第一页需手动制空列表 |
| | | this.msgList = this.msgList.concat(this.announcement1); //追加新数据 |
| | | } |
| | | |
| | | }).catch(() => { |
| | | //联网失败, 结束加载 |
| | | this.mescroll.endErr(); |
| | | }) |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | }, |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | .popupView { |
| | | margin-top: 85px; |
| | | margin-top: 45px; |
| | | height: auto; |
| | | } |
| | | </style> |