2个文件已删除
2个文件已添加
1 文件已重命名
2个文件已修改
| | |
| | | { |
| | | "pages": [ |
| | | { |
| | | "pages": [{
|
| | | "path": "pages/login/index", |
| | | "style": { |
| | | "navigationBarTitleText": "%page.login%", |
| | |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/workInfo/taskInfo", |
| | | "path": "pages/other/workInfo/taskInfo",
|
| | | "style": { |
| | | "navigationBarTitleText": "工作任务" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/workInfo/stationInfo", |
| | | "path": "pages/other/workInfo/stationInfo",
|
| | | "style": { |
| | | "navigationBarTitleText": "站点信息" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/workInfo/locInfo", |
| | | "path": "pages/other/workInfo/locInfo",
|
| | | "style": { |
| | | "navigationBarTitleText": "库位信息" |
| | | } |
| | |
| | | </template>
|
| | |
|
| | | <script>
|
| | | import { request } from '../../common/request.js'
|
| | | import ConfirmModal from '../../components/confirm-modal/confirm-modal.vue'
|
| | | import { request } from '@/common/request.js'
|
| | | import ConfirmModal from '@/components/confirm-modal/confirm-modal.vue'
|
| | |
|
| | | export default {
|
| | | components: {
|
| New file |
| | |
| | | <template> |
| | | <view class="has-foot"> |
| | | <form> |
| | | <view class="cu-form-group margin-top"> |
| | | <view class="title">库位码</view> |
| | | <input |
| | | placeholder="请扫描库位条码" |
| | | v-model="barcode" |
| | | /> |
| | | <text |
| | | class="cuIcon-search text-blue" |
| | | @click="search" |
| | | ></text> |
| | | </view> |
| | | </form> |
| | | |
| | | <view class="cu-list det menu sm-border padding"> |
| | | <block |
| | | v-for="(item, index) in list" |
| | | :key="index" |
| | | @click="clickTaskItem(index)" |
| | | > |
| | | <view |
| | | class="cu-list det menu" |
| | | @click="clickTaskItem(index)" |
| | | > |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-grey">库位编码:</text> |
| | | <text class="text-black">{{ item.code }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-grey">库位类型:</text> |
| | | <text class="text-black">{{ item.typeIds$ }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-grey">库区:</text> |
| | | <text class="text-black">{{ item.areaId$ }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-grey">站点状态:</text> |
| | | <text class="text-black"> |
| | | {{ item.useStatus$ }} |
| | | </text> |
| | | </view> |
| | | </view> |
| | | <view |
| | | class="cu-item" |
| | | style="justify-content: center" |
| | | > |
| | | <button |
| | | class="cu-btn bg-blue" |
| | | style="width: 80%" |
| | | @click.stop="openAction(item)" |
| | | > |
| | | 操作 |
| | | </button> |
| | | </view> |
| | | </view> |
| | | </block> |
| | | </view> |
| | | <uni-load-more :status="loadingType"></uni-load-more> |
| | | |
| | | <uni-popup |
| | | ref="popup" |
| | | class="cu-popup" |
| | | type="bottom" |
| | | > |
| | | <view class="bg-white"> |
| | | <view class="cu-bar bg-white justify-end"> |
| | | <view class="content">操作</view> |
| | | <view |
| | | class="action" |
| | | @click="close" |
| | | > |
| | | <text class="cuIcon-close text-red"></text> |
| | | </view> |
| | | </view> |
| | | <view class="padding-xl"> |
| | | <button |
| | | class="cu-btn block bg-red margin-tb-sm lg" |
| | | @click="handleOperate(1)" |
| | | > |
| | | 禁用 |
| | | </button> |
| | | <button |
| | | class="cu-btn block bg-green margin-tb-sm lg" |
| | | @click="handleOperate(2)" |
| | | > |
| | | 解禁 |
| | | </button> |
| | | <button |
| | | class="cu-btn block bg-yellow margin-tb-sm lg" |
| | | @click="handleOperate(3)" |
| | | > |
| | | 释放 |
| | | </button> |
| | | </view> |
| | | </view> |
| | | </uni-popup> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { request } from '@/common/request.js' |
| | | import { mapState, mapMutations, mapActions, mapGetters } from 'vuex' |
| | | export default { |
| | | data() { |
| | | return { |
| | | container: '', |
| | | list: [], |
| | | range: [], |
| | | curCode: '', |
| | | barcode: '', |
| | | curr: 1, |
| | | limit: 10, |
| | | loadingType: 'more', |
| | | curItem: null // 当前操作的项 |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapState('user', ['dynamicFields']) |
| | | }, |
| | | mounted() { |
| | | this.search() |
| | | }, |
| | | onReachBottom() { |
| | | if (this.loadingType === 'more') { |
| | | this.curr++ |
| | | this.getData() |
| | | } |
| | | }, |
| | | methods: { |
| | | openAction(item) { |
| | | this.curItem = item |
| | | this.$refs.popup.open() |
| | | }, |
| | | async handleOperate(type) { |
| | | if (!this.curItem) return |
| | | |
| | | uni.showLoading({ |
| | | title: '处理中...' |
| | | }) |
| | | |
| | | try { |
| | | const { code, data, msg } = await request('/other/locOperate', { |
| | | locNo: this.curItem.code, |
| | | staOperateType: type |
| | | }) |
| | | |
| | | uni.hideLoading() |
| | | |
| | | if (code === 200) { |
| | | uni.showToast({ |
| | | title: '操作成功', |
| | | icon: 'success' |
| | | }) |
| | | this.$refs.popup.close() |
| | | // 刷新列表 |
| | | this.search() |
| | | } else { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } catch (e) { |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: '操作失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | search() { |
| | | this.getData(true) |
| | | }, |
| | | async getData(isReset = false) { |
| | | if (isReset) { |
| | | this.curr = 1 |
| | | this.loadingType = 'more' |
| | | } |
| | | if (this.loadingType === 'noMore') return |
| | | this.loadingType = 'loading' |
| | | |
| | | const { code, data, msg } = await request( |
| | | '/other/loc/page', |
| | | { |
| | | curr: this.curr, |
| | | limit: this.limit, |
| | | locNo: this.barcode |
| | | }, |
| | | 'GET' |
| | | ) |
| | | if (code === 200) { |
| | | if (isReset) { |
| | | this.list = data.records |
| | | } else { |
| | | this.list = this.list.concat(data.records) |
| | | } |
| | | |
| | | const total = data.total |
| | | if (this.list.length >= total) { |
| | | this.loadingType = 'noMore' |
| | | } else { |
| | | this.loadingType = 'more' |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: 'none' |
| | | }) |
| | | this.loadingType = 'more' |
| | | } |
| | | }, |
| | | clickTaskItem(index) { |
| | | let that = this |
| | | uni.navigateTo({ |
| | | url: './orderInItem', |
| | | // 通过eventChannel向被打开页面传送数据 |
| | | success: function (res) { |
| | | res.eventChannel.emit('checkItem', { |
| | | data: that.list[index] |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | remove(index) { |
| | | this.list.splice(index, 1) |
| | | }, |
| | | clear() { |
| | | this.list = [] |
| | | this.container = '' |
| | | this.barcode = '' |
| | | }, |
| | | |
| | | open() { |
| | | this.$refs.popup.open() |
| | | }, |
| | | |
| | | close() { |
| | | this.$refs.popup.close() |
| | | }, |
| | | |
| | | popupSubmit() { |
| | | this.$refs.popup.close() |
| | | }, |
| | | itemChange(el) { |
| | | this.curCode = el |
| | | }, |
| | | |
| | | async confirm() { |
| | | if (this.barcode === '' || this.barcode === null) { |
| | | uni.showToast({ |
| | | title: '接驳站码不能为空', |
| | | icon: 'none' |
| | | }) |
| | | return |
| | | } |
| | | const { code, data, msg } = await request('/AGV/staBind', { |
| | | barcode: this.container, |
| | | sta: this.barcode |
| | | }) |
| | | if (code === 200) { |
| | | uni.showToast({ |
| | | title: '绑定成功' |
| | | }) |
| | | this.clear() |
| | | } else { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .index { |
| | | border: 1px solid #e54d42; |
| | | color: #e54d42; |
| | | border-radius: 50%; |
| | | display: block; |
| | | width: 50rpx; |
| | | height: 50rpx; |
| | | line-height: 48rpx; |
| | | text-align: center; |
| | | margin-right: 20rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | |
| | | .text-blue { |
| | | color: #0081ff !important; |
| | | } |
| | | |
| | | .item { |
| | | position: relative; |
| | | display: flex; |
| | | min-height: 80upx; |
| | | align-items: center; |
| | | } |
| | | |
| | | .uni-file-picker { |
| | | width: 100%; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .uni-select__selector { |
| | | z-index: 999; |
| | | } |
| | | |
| | | .tj { |
| | | height: auto; |
| | | padding: 6px 8px; |
| | | display: inline-block; |
| | | border-radius: 6px; |
| | | } |
| | | |
| | | .item { |
| | | display: flex; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .item .cu-btn { |
| | | font-size: 26upx; |
| | | } |
| | | </style> |
| New file |
| | |
| | | <template> |
| | | <view class="has-foot"> |
| | | <form> |
| | | <view class="cu-form-group margin-top"> |
| | | <view class="title">接驳站点</view> |
| | | <input |
| | | placeholder="请扫描接驳站点条码" |
| | | v-model="barcode" |
| | | /> |
| | | <text |
| | | class="cuIcon-search text-blue" |
| | | @click="search" |
| | | ></text> |
| | | </view> |
| | | </form> |
| | | |
| | | <view class="cu-list det menu sm-border padding"> |
| | | <block |
| | | v-for="(item, index) in list" |
| | | :key="index" |
| | | @click="clickTaskItem(index)" |
| | | > |
| | | <view |
| | | class="cu-list det menu" |
| | | @click="clickTaskItem(index)" |
| | | > |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-grey">站点编码:</text> |
| | | <text class="text-black"> |
| | | {{ item.stationName }} |
| | | </text> |
| | | </view> |
| | | </view> |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-grey">站点类型:</text> |
| | | <text class="text-black"> |
| | | {{ item.type === 1 ? '光电站点' : '普通站点' }} |
| | | </text> |
| | | </view> |
| | | </view> |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-grey">站点状态:</text> |
| | | <text class="text-black"> |
| | | {{ item.useStatus$ }} |
| | | </text> |
| | | </view> |
| | | </view> |
| | | <view |
| | | class="cu-item" |
| | | style="justify-content: center" |
| | | > |
| | | <button |
| | | class="cu-btn bg-blue" |
| | | style="width: 80%" |
| | | @click.stop="openAction(item)" |
| | | > |
| | | 操作 |
| | | </button> |
| | | </view> |
| | | </view> |
| | | </block> |
| | | </view> |
| | | <uni-load-more :status="loadingType"></uni-load-more> |
| | | |
| | | <uni-popup |
| | | ref="popup" |
| | | class="cu-popup" |
| | | type="bottom" |
| | | > |
| | | <view class="bg-white"> |
| | | <view class="cu-bar bg-white justify-end"> |
| | | <view class="content">操作</view> |
| | | <view |
| | | class="action" |
| | | @click="close" |
| | | > |
| | | <text class="cuIcon-close text-red"></text> |
| | | </view> |
| | | </view> |
| | | <view class="padding-xl"> |
| | | <button |
| | | class="cu-btn block bg-red margin-tb-sm lg" |
| | | @click="handleOperate(1)" |
| | | > |
| | | 禁用 |
| | | </button> |
| | | <button |
| | | class="cu-btn block bg-green margin-tb-sm lg" |
| | | @click="handleOperate(2)" |
| | | > |
| | | 解禁 |
| | | </button> |
| | | <button |
| | | class="cu-btn block bg-yellow margin-tb-sm lg" |
| | | @click="handleOperate(3)" |
| | | > |
| | | 释放 |
| | | </button> |
| | | </view> |
| | | </view> |
| | | </uni-popup> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { request } from '@/common/request.js' |
| | | import { mapState, mapMutations, mapActions, mapGetters } from 'vuex' |
| | | export default { |
| | | data() { |
| | | return { |
| | | container: '', |
| | | list: [], |
| | | range: [], |
| | | curCode: '', |
| | | barcode: '', |
| | | curr: 1, |
| | | limit: 10, |
| | | loadingType: 'more', |
| | | curItem: null // 当前操作的项 |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapState('user', ['dynamicFields']) |
| | | }, |
| | | mounted() { |
| | | this.search() |
| | | }, |
| | | onReachBottom() { |
| | | if (this.loadingType === 'more') { |
| | | this.curr++ |
| | | this.getData() |
| | | } |
| | | }, |
| | | methods: { |
| | | openAction(item) { |
| | | this.curItem = item |
| | | this.$refs.popup.open() |
| | | }, |
| | | async handleOperate(type) { |
| | | if (!this.curItem) return |
| | | |
| | | uni.showLoading({ |
| | | title: '处理中...' |
| | | }) |
| | | |
| | | try { |
| | | const { code, data, msg } = await request('/other/staOperate', { |
| | | transferStationNo: this.curItem.stationName, |
| | | staOperateType: type |
| | | }) |
| | | |
| | | uni.hideLoading() |
| | | |
| | | if (code === 200) { |
| | | uni.showToast({ |
| | | title: '操作成功', |
| | | icon: 'success' |
| | | }) |
| | | this.$refs.popup.close() |
| | | // 刷新列表 |
| | | this.search() |
| | | } else { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } catch (e) { |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: '操作失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | search() { |
| | | this.getData(true) |
| | | }, |
| | | async getData(isReset = false) { |
| | | if (isReset) { |
| | | this.curr = 1 |
| | | this.loadingType = 'more' |
| | | } |
| | | if (this.loadingType === 'noMore') return |
| | | this.loadingType = 'loading' |
| | | |
| | | const { code, data, msg } = await request( |
| | | '/other/station/page', |
| | | { |
| | | curr: this.curr, |
| | | limit: this.limit, |
| | | staNo: this.barcode |
| | | }, |
| | | 'GET' |
| | | ) |
| | | if (code === 200) { |
| | | if (isReset) { |
| | | this.list = data.records |
| | | } else { |
| | | this.list = this.list.concat(data.records) |
| | | } |
| | | |
| | | const total = data.total |
| | | if (this.list.length >= total) { |
| | | this.loadingType = 'noMore' |
| | | } else { |
| | | this.loadingType = 'more' |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: 'none' |
| | | }) |
| | | this.loadingType = 'more' |
| | | } |
| | | }, |
| | | clickTaskItem(index) { |
| | | let that = this |
| | | uni.navigateTo({ |
| | | url: './orderInItem', |
| | | // 通过eventChannel向被打开页面传送数据 |
| | | success: function (res) { |
| | | res.eventChannel.emit('checkItem', { |
| | | data: that.list[index] |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | remove(index) { |
| | | this.list.splice(index, 1) |
| | | }, |
| | | clear() { |
| | | this.list = [] |
| | | this.container = '' |
| | | this.barcode = '' |
| | | }, |
| | | |
| | | open() { |
| | | this.$refs.popup.open() |
| | | }, |
| | | |
| | | close() { |
| | | this.$refs.popup.close() |
| | | }, |
| | | |
| | | popupSubmit() { |
| | | this.$refs.popup.close() |
| | | }, |
| | | itemChange(el) { |
| | | this.curCode = el |
| | | }, |
| | | |
| | | async confirm() { |
| | | if (this.barcode === '' || this.barcode === null) { |
| | | uni.showToast({ |
| | | title: '接驳站码不能为空', |
| | | icon: 'none' |
| | | }) |
| | | return |
| | | } |
| | | const { code, data, msg } = await request('/AGV/staBind', { |
| | | barcode: this.container, |
| | | sta: this.barcode |
| | | }) |
| | | if (code === 200) { |
| | | uni.showToast({ |
| | | title: '绑定成功' |
| | | }) |
| | | this.clear() |
| | | } else { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .index { |
| | | border: 1px solid #e54d42; |
| | | color: #e54d42; |
| | | border-radius: 50%; |
| | | display: block; |
| | | width: 50rpx; |
| | | height: 50rpx; |
| | | line-height: 48rpx; |
| | | text-align: center; |
| | | margin-right: 20rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | |
| | | .text-blue { |
| | | color: #0081ff !important; |
| | | } |
| | | |
| | | .item { |
| | | position: relative; |
| | | display: flex; |
| | | min-height: 80upx; |
| | | align-items: center; |
| | | } |
| | | |
| | | .uni-file-picker { |
| | | width: 100%; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .uni-select__selector { |
| | | z-index: 999; |
| | | } |
| | | |
| | | .tj { |
| | | height: auto; |
| | | padding: 6px 8px; |
| | | display: inline-block; |
| | | border-radius: 6px; |
| | | } |
| | | |
| | | .item { |
| | | display: flex; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .item .cu-btn { |
| | | font-size: 26upx; |
| | | } |
| | | </style> |
| File was renamed from pages/workInfo/taskInfo.vue |
| | |
| | | <script> |
| | | import { |
| | | request |
| | | } from '../../common/request.js' |
| | | } from '@/common/request.js' |
| | | import { |
| | | mapState, |
| | | mapMutations, |