| | |
| | | <cu-custom :bgColor="NavBarColor" :isBack="true" backRouterName="productionTask"> |
| | | <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-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 name="type" :labelWidth="80" label="流程分类:"> |
| | | <uni-data-select v-model="formData.type" :localdata="storageTypeList" |
| | | @change="changeSelectType" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item name="name" label="领料产品:"> |
| | | <uni-easyinput v-model="formData.partNumNameModel" placeholder="请输入领料产品" /> |
| | | <uni-forms-item name="num" :labelWidth="80" label="设备编号:"> |
| | | <uni-easyinput v-model="formData.num" placeholder="请输入设备编号" /> |
| | | </uni-forms-item> |
| | | </uni-group> |
| | | </uni-forms> |
| | |
| | | type: 'top', |
| | | scrollLeft: 0, |
| | | formData: { |
| | | num: '', |
| | | partNumNameModel: '' |
| | | type: '', |
| | | num:'' |
| | | }, |
| | | storageTypeList: [], |
| | | NavBarColor: this.NavBarColor, |
| | | colorIndex: 0, |
| | | activeColor: '#5277A6', |
| | | url: { |
| | | stallList: "assign/flow/finishedList" |
| | | stallList: "assign/flow/finishedList", |
| | | storageType: 'sys/dict/getDictItems/flow_type' |
| | | }, |
| | | |
| | | upOption: { |
| | |
| | | } |
| | | }, |
| | | |
| | | created() {}, |
| | | created() { |
| | | this.storageType(); |
| | | }, |
| | | methods: { |
| | | |
| | | changeSelectType(e) { |
| | | |
| | | this.formData.type = e |
| | | }, |
| | | /** |
| | | * @param {Object} item |
| | | * 详情页面 |
| | | * 流程类型 |
| | | */ |
| | | // onClickProductionTask(item) { |
| | | // const name = item.category_dictText |
| | | // const type= item.taskName |
| | | // if (name == '设备点检' && type =='班组长确认') { |
| | | // uni.navigateTo({ |
| | | // url: '/pages/ToDoList/ToDoListCheckSure/ToDoListCheckSure?item=' + |
| | | // encodeURIComponent(JSON.stringify(item)) |
| | | // }) |
| | | // }else if(name == '设备周保' && type =='班组长确认'){ |
| | | // uni.navigateTo({ |
| | | // url: '/pages/ToDoList/ToDoBaoZhouSure/ToDoBaoZhouSure?item=' + |
| | | // encodeURIComponent(JSON.stringify(item)) |
| | | // }) |
| | | // } |
| | | storageType() { |
| | | this.$http.get(this.url.storageType).then(res => { |
| | | //设置列表数据 |
| | | if (res.data.success) { |
| | | this.storageTypeList = res.data.result |
| | | } |
| | | }).catch(() => { |
| | | //联网失败, |
| | | }) |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | // }, |
| | | onClickProductionTask(item) { |
| | | onClickProductionTask(item, flag = 'task') { |
| | | const name = item.taskName; |
| | | const type = item.category_dictText; |
| | | let url = ''; |
| | |
| | | case (name === '点检工单' && type === '设备点检'): |
| | | url = '/pages/ToDoList/ToDoListCheckSure/ToDoListCheckSure'; |
| | | break; |
| | | case (name === '点检开始' && type === '设备点检'): |
| | | url = '/pages/ToDoList/ToDoListCheckSure/ToDoListCheckSure'; |
| | | break; |
| | | default: |
| | | console.warn(`No URL found for name: ${name} and type: ${type}`); |
| | | return; |
| | |
| | | |
| | | if (url) { |
| | | uni.navigateTo({ |
| | | url: `${url}?item=${encodeURIComponent(JSON.stringify(item))}` |
| | | |
| | | url: `${url}?item=${encodeURIComponent(JSON.stringify(item))}&flag=${flag}` |
| | | }); |
| | | } |
| | | }, |
| | |
| | | this.$http.get(this.url.stallList, { |
| | | params: { |
| | | pageNo: page.num, |
| | | pageSize: page.size |
| | | pageSize: page.size, |
| | | column: 'createTime', |
| | | order: 'desc' |
| | | }, |
| | | |
| | | }).then(res => { |
| | |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | /* 重置查询条件 */ |
| | | resetTask() { |
| | | this.formData.num = '' |
| | | this.formData.partNumNameModel = '' |
| | | this.formData.type = '', |
| | | this.formData.num='', |
| | | 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' |
| | | } |
| | | }).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.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(); |
| | | }) |
| | | |
| | | } 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(); |
| | | }) |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | pageSize: 9999, |
| | | column: 'createTime', |
| | | order: 'desc', |
| | | category: this.formData.type, |
| | | title:this.formData.num |
| | | }, |
| | | |
| | | }).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.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(); |
| | | }) |
| | | }, |
| | | |
| | | mescrollInit(mescroll) { |
| | | console.log('mescrollInit') |
| | |
| | | } |
| | | |
| | | .popupView { |
| | | margin-top: 85px; |
| | | margin-top: 45px; |
| | | height: auto; |
| | | } |
| | | </style> |