管制区域

This commit is contained in:
2025-08-27 09:23:50 +08:00
parent 77133c2c4c
commit f6a82a5289
4 changed files with 219 additions and 1 deletions

View File

@@ -492,6 +492,13 @@
"navigationStyle": "custom"
}
}
,{
"path" : "pages/ftdl/inout-area-mark",
"style" :
{
"navigationStyle": "custom"
}
}
],
"globalStyle": {
// "pageOrientation": "landscape",

View File

@@ -0,0 +1,194 @@
<template>
<view class="zd_container">
<!-- 进出区域登记 -->
<nav-bar :title="title"></nav-bar>
<view class="zd_content">
<view class="zd_wrapper">
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">管制区域</span>
</view>
<view class="zd-col-24 filter_select">
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
</view>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th>序号</th>
<th>进入时间</th>
<th>进入人</th>
<th>进入区域</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{i+1}}</td>
<td>{{e.create_time}}</td>
<td>{{e.create_name}}</td>
<td>{{e.region_name}}</td>
</tr>
</tbody>
</table>
</view>
</view>
<!-- <uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/> -->
</view>
<view class="zd-row submit-bar">
<button class="zd-col-6 button-primary" @tap="searchList">查询</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !index}" :disabled="disabled" @tap="_inArea">进入</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !index}" :disabled="disabled2" @tap="_outArea">退出</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {getRegions, selectRegionInfo, inArea, outArea} from '@/utils/getData4.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
options: [],
index: '',
dataList: [],
reload: false,
status: 'more',
contentText: {
contentdown: '查看更多',
contentrefresh: '加载中',
contentnomore: '没有更多'
},
totalCount: 0,
pageNum: 1,
pageSize: 10,
disabled: false,
disabled2: false
};
},
onLoad (options) {
this.title = options.title
},
created () {
this._getRegions1()
},
methods: {
async _getRegions1 () {
try {
let res = await getRegions()
if (res) {
this.options = res
} else {
this.options =[]
}
} catch (e) {
this.options = []
}
},
selectChange (e) {
this.index = e
this.searchList()
},
clearUp () {
this.index = ''
this.dataList = []
this.disabled = false
this.disabled2 = false
},
searchList () {
this.dataList = []
this.pageNum = 1
this._selectRegionInfo()
},
async _selectRegionInfo () {
let res = await selectRegionInfo(this.index)
if (res.code === '200') {
this.dataList = res.data
// this.totalCount = res.totalElements
// if (res.totalElements > 0) {
// const dataMap = res.content
// this.dataList = this.reload ? dataMap : this.dataList.concat(dataMap)
// this.reload = false
// } else {
// this.dataList = []
// }
// if (this.totalCount == this.dataList.length) {
// this.reload = false
// this.status = 'noMore'
// }
}
},
onReachBottom () {
if (this.totalCount > this.dataList.length) {
this.status = 'loading'
setTimeout(() => {
this.pageNum++
this._selectRegionInfo()
}, 1000)
} else { //停止加载
this.status = 'noMore'
}
},
async _inArea () {
this.disabled = true
if (!this.index) {
this.disabled = false
return
}
try {
let res = await inArea(this.index)
if (res.code === '200') {
this.index = ''
this.dataList = []
uni.showToast({
title: res.desc,
icon: 'none'
})
} else {
uni.showToast({
title: res.desc,
icon: 'none'
})
}
this.disabled = false
} catch (e) {
this.disabled = false
}
},
async _outArea () {
this.disabled2 = true
if (!this.index) {
this.disabled2 = false
return
}
try {
let res = await outArea(this.index)
if (res.code === '200') {
this.index = ''
this.dataList = []
uni.showToast({
title: res.desc,
icon: 'none'
})
} else {
uni.showToast({
title: res.desc,
icon: 'none'
})
}
this.disabled2 = false
} catch (e) {
this.disabled2 = false
}
}
}
}
</script>

View File

@@ -41,7 +41,7 @@
return {
userName: '',
menuList: [
{title: '东丽管理', path: 'RF03', sonTree: [{title: '人工放货', path: '/pages/ftdl/man-load-goods'}, {title: '人工取货', path: '/pages/ftdl/man-get-goods'}, {title: '产线叫料', path: '/pages/ftdl/line-call-mater'}, {title: '产线下料', path: '/pages/ftdl/line-down-mater'}, {title: '库存锁定/解锁', path: '/pages/ftdl/kc-manage'}, {title: '定点作业', path: '/pages/ftdl/fixedpoint-work'}, {title: '作业管理', path: '/pages/ftdl/work-manage'}]},
{title: '东丽管理', path: 'RF03', sonTree: [{title: '人工放货', path: '/pages/ftdl/man-load-goods'}, {title: '人工取货', path: '/pages/ftdl/man-get-goods'}, {title: '产线叫料', path: '/pages/ftdl/line-call-mater'}, {title: '产线下料', path: '/pages/ftdl/line-down-mater'}, {title: '库存锁定/解锁', path: '/pages/ftdl/kc-manage'}, {title: '定点作业', path: '/pages/ftdl/fixedpoint-work'}, {title: '作业管理', path: '/pages/ftdl/work-manage'}, {title: '进出区域登记', path: '/pages/ftdl/inout-area-mark'}]},
// {title: '预装管理', path: 'RF04', sonTree: [{title: '物料组盘', path: '/pages/entry/mater-group2'}, {title: '货架绑定', path: '/pages/outbound/shelf-bind'}]},
// {title: '产线管理', path: 'RF07', sonTree: [{title: '产线叫料', path: '/pages/outbound/line-callmater'}, {title: '线边仓出库', path: '/pages/outbound/mater-outstore'}, {title: '产线转运', path: '/pages/outbound/line-transfer2'}]},
// {title: '入库管理', path: 'RF01', sonTree: [{title: '物料组盘', path: '/pages/entry/mater-group'}, {title: '组盘入库', path: '/pages/entry/groupplate-instore'}, {title: '货架绑定', path: '/pages/outbound/shelf-bind'}, {title: '拣选余料回库', path: '/pages/entry/pick-yl-return-store'}, {title: '空载具入库', path: '/pages/entry/empty-vehicle-instore'}]},

View File

@@ -121,3 +121,20 @@ export const forceConfirm = (tcode) => request({
url:'api/hand/forceConfirm',
data: {task_code: tcode}
})
// 管制区域
// 1.1根据区域查询进出区域信息
export const selectRegionInfo = (rcode) => request({
url:'api/hand/selectRegionInfo',
data: {region_code: rcode}
})
// 1.3进入
export const inArea = (rcode) => request({
url:'api/hand/inArea',
data: {region_code: rcode}
})
// 1.3强制确认
export const outArea = (rcode) => request({
url:'api/hand/outArea',
data: {region_code: rcode}
})