From e4f7e87cd3d8a1e33d433636a189a905fa776f35 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期三, 14 五月 2025 16:32:15 +0800
Subject: [PATCH] Merge branch 'devlop' of http://47.97.1.152:5880/r/pda-master into devlop
---
pages/home/index.vue | 11 +
pages.json | 6
pages/AGV/StartInTask.vue | 79 +++++-----
pages/AGV/BindAndInTask.vue | 262 +++++++++++++++++++++++++++++++++++++
pages/AGV/StaUnBind.vue | 12 -
pages/AGV/AGVStaBind.vue | 11 -
6 files changed, 318 insertions(+), 63 deletions(-)
diff --git a/pages.json b/pages.json
index 1da202a..5c5d8ad 100644
--- a/pages.json
+++ b/pages.json
@@ -49,6 +49,12 @@
}
},
{
+ "path": "pages/AGV/BindAndInTask",
+ "style": {
+ "navigationBarTitleText": "AGV缁戝畾&鍏ュ簱"
+ }
+ },
+ {
"path": "pages/listing/matnrPalletising",
"style": {
"navigationBarTitleText": "鐗╂枡缁勭洏"
diff --git a/pages/AGV/AGVStaBind.vue b/pages/AGV/AGVStaBind.vue
index 7a96a2d..98b034a 100644
--- a/pages/AGV/AGVStaBind.vue
+++ b/pages/AGV/AGVStaBind.vue
@@ -40,18 +40,11 @@
</view>
</view>
- <view class="cu-item">
- <view class="content">
- <text class="text-black">渚涘簲鍟嗘壒娆�:</text>
- </view>
- <view class="action">
- <text class="text-grey">{{item.splrBatch}}</text>
- </view>
- </view>
+
<view class="cu-item">
<view class="content">
- <text class="text-black">搴撳瓨鎵规:</text>
+ <text class="text-black">鎵规:</text>
</view>
<view class="action">
<text class="text-grey ">{{item.batch}}</text>
diff --git a/pages/AGV/BindAndInTask.vue b/pages/AGV/BindAndInTask.vue
new file mode 100644
index 0000000..737066d
--- /dev/null
+++ b/pages/AGV/BindAndInTask.vue
@@ -0,0 +1,262 @@
+<template>
+ <view class="has-foot">
+ <form>
+ <view class="cu-form-group ">
+ <view class="title">鎺ラ┏绔�</view>
+ <input placeholder="璇锋壂鎻忔帴椹崇珯鏉$爜" v-model="barcode" ></input>
+ <text class='cuIcon-search text-blue' @click="search"></text>
+ </view>
+ <view class="cu-form-group ">
+ <view class="title">瀹瑰櫒鐮�</view>
+ <input placeholder="璇锋壂鎻忓鍣ㄧ爜" v-model="container" ></input>
+ <text class='cuIcon-search text-blue' @click="search"></text>
+ </view>
+ <view class="cu-form-group">
+ <view class="title">鐩爣搴撳尯</view>
+ <view style="width: 75%;">
+ <uni-data-select style="min-width: 50%; max-width: 100%;" v-model="whAreaId" :localdata="range"
+ placement="bottom" @change="selChange"></uni-data-select>
+ </view>
+ </view>
+ </form>
+
+
+
+ <view class="cu-list det menu sm-border padding">
+ <block v-for="(item, index) in list" :key="index">
+ <view class="cu-bar bg-white solid-bottom margin-top-sm">
+ <view class="action">
+ <view class="index">
+ {{index+1}}
+ </view>
+ <view class="text-blue">
+ {{`${item.maktx}`}}
+ </view>
+ </view>
+ <!-- <view class="action" >
+ <text @click="remove(index)" class="cuIcon-close text-red" style="font-size: 24px;"></text>
+ </view> -->
+ </view>
+
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">ASN:</text>
+ </view>
+ <view class="action">
+ <text class="text-grey ">{{item.asnCode}}</text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">鎵规:</text>
+ </view>
+ <view class="action">
+ <text class="text-grey ">{{item.batch}}</text>
+ </view>
+ </view>
+
+
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">鏀惰揣鏁伴噺:</text>
+ </view>
+ <view class="action">
+ <text class="text-grey ">{{item.anfme}}</text>
+ </view>
+ </view>
+
+ </block>
+ </view>
+
+
+ <view class="cu-bar btn-group foot">
+ <button class="cu-btn text-blue line-blue shadow" @click="clear">娓呯┖</button>
+ <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm">鍚姩</button>
+ </view>
+
+
+
+ </view>
+</template>
+
+<script>
+ import {
+ request
+ } from '../../common/request.js'
+ import {
+ mapState,
+ mapMutations,
+ mapActions,
+ mapGetters
+ } from 'vuex';
+ export default {
+ data() {
+ return {
+ barcode: '',
+ areaName: '',
+ locCode: '',
+ container: '',
+ list: [],
+ range: [],
+ curCode: '',
+ whAreaId:'',
+ repeatClick: false,
+
+ }
+ },
+ computed: {
+ ...mapState('user', ['dynamicFields']),
+ },
+ mounted() {},
+ methods: {
+ selChange(val) {
+ uni.setStorageSync('whAreaId', val)
+ },
+ async search() {
+ let that = this
+ const {
+ code,
+ data,
+ msg
+ } = await request('/staBind/list', {
+ sta: this.barcode
+ })
+ if (code === 200) {
+ if(data.list.length >0){
+ that.container = data.barcode
+ that.list = data.list
+ }
+ that.range = data.warehouseAreasList.map(item => ({
+ value: item.id,
+ text: item.name
+ }));
+ that.whAreaId = data.area
+ } else {
+ uni.showToast({
+ title: msg,
+ icon: "none",
+ })
+ }
+ },
+
+ 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 ;
+ }
+ if(this.whAreaId === '' || this.whAreaId ===null){
+ uni.showToast({
+ title: "鐩爣搴撳尯涓嶈兘涓虹┖",
+ icon: "none",
+ })
+ return ;
+ }
+ this.repeatClick = true
+ const {
+ code,
+ data,
+ msg
+ } = await request('/AGV/task/start',{
+ sta: this.barcode,
+ area: this.whAreaId
+ }
+ )
+ if (code === 200) {
+ uni.showToast({
+ title: '鍚姩鎴愬姛'
+ })
+ this.clear()
+ } else {
+ uni.showToast({
+ title: msg,
+ icon: "none",
+ })
+ }
+ this.repeatClick = false
+
+
+ },
+
+ }
+ }
+</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>
\ No newline at end of file
diff --git a/pages/AGV/StaUnBind.vue b/pages/AGV/StaUnBind.vue
index 3214c5b..1d0b407 100644
--- a/pages/AGV/StaUnBind.vue
+++ b/pages/AGV/StaUnBind.vue
@@ -38,19 +38,9 @@
<text class="text-grey ">{{item.asnCode}}</text>
</view>
</view>
-
<view class="cu-item">
<view class="content">
- <text class="text-black">渚涘簲鍟嗘壒娆�:</text>
- </view>
- <view class="action">
- <text class="text-grey">{{item.splrBatch}}</text>
- </view>
- </view>
-
- <view class="cu-item">
- <view class="content">
- <text class="text-black">搴撳瓨鎵规:</text>
+ <text class="text-black">鎵规:</text>
</view>
<view class="action">
<text class="text-grey ">{{item.batch}}</text>
diff --git a/pages/AGV/StartInTask.vue b/pages/AGV/StartInTask.vue
index 3214c5b..d43db9e 100644
--- a/pages/AGV/StartInTask.vue
+++ b/pages/AGV/StartInTask.vue
@@ -5,7 +5,14 @@
<view class="title">鎺ラ┏绔�</view>
<input placeholder="璇锋壂鎻忔帴椹崇珯鏉$爜" v-model="barcode" ></input>
<text class='cuIcon-search text-blue' @click="search"></text>
- </view>
+ </view>
+ <view class="cu-form-group">
+ <view class="title">鐩爣搴撳尯</view>
+ <view style="width: 75%;">
+ <uni-data-select style="min-width: 50%; max-width: 100%;" v-model="whAreaId" :localdata="range"
+ placement="bottom" @change="selChange"></uni-data-select>
+ </view>
+ </view>
</form>
<view class="flex solid-bottom padding-sm justify-between">
<view class="text-blue">瀹瑰櫒鐮�:{{container}}</view>
@@ -38,19 +45,9 @@
<text class="text-grey ">{{item.asnCode}}</text>
</view>
</view>
-
<view class="cu-item">
<view class="content">
- <text class="text-black">渚涘簲鍟嗘壒娆�:</text>
- </view>
- <view class="action">
- <text class="text-grey">{{item.splrBatch}}</text>
- </view>
- </view>
-
- <view class="cu-item">
- <view class="content">
- <text class="text-black">搴撳瓨鎵规:</text>
+ <text class="text-black">鎵规:</text>
</view>
<view class="action">
<text class="text-grey ">{{item.batch}}</text>
@@ -73,30 +70,10 @@
<view class="cu-bar btn-group foot">
<button class="cu-btn text-blue line-blue shadow" @click="clear">娓呯┖</button>
- <button class="cu-btn bg-blue shadow-blur" @click="confirm">瑙g粦</button>
+ <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm">鍚姩</button>
</view>
- <uni-popup ref="popup" class="cu-popup">
- <view class="popup-content">
- <view class="head">
- <text>鎺ㄨ崘</text>
- <text class='cuIcon-close text-red close' @click="close"></text>
- </view>
-
- <div class="body">
- <view class="cu-list grid col-3 no-border">
- <view class="item" v-for="el in range">
- <view class="cu-btn round sm" :class="[el===curCode?'bg-blue':'line-blue']"
- @click="itemChange(el)">{{el}}</view>
- </view>
- </view>
- </div>
-
- <view class="cu-bar btn-group ">
- <button class="cu-btn bg-blue shadow-blur" @click="popupSubmit">鎻愪氦</button>
- </view>
- </view>
- </uni-popup>
+
</view>
</template>
@@ -120,14 +97,20 @@
container: '',
list: [],
range: [],
- curCode: ''
+ curCode: '',
+ whAreaId:'',
+ repeatClick: false,
+
}
},
computed: {
...mapState('user', ['dynamicFields']),
},
mounted() {},
- methods: {
+ methods: {
+ selChange(val) {
+ uni.setStorageSync('whAreaId', val)
+ },
async search() {
let that = this
const {
@@ -141,7 +124,12 @@
if(data.list.length >0){
that.container = data.barcode
that.list = data.list
- }
+ }
+ that.range = data.warehouseAreasList.map(item => ({
+ value: item.id,
+ text: item.name
+ }));
+ that.whAreaId = data.area
} else {
uni.showToast({
title: msg,
@@ -183,17 +171,26 @@
})
return ;
}
+ if(this.whAreaId === '' || this.whAreaId ===null){
+ uni.showToast({
+ title: "鐩爣搴撳尯涓嶈兘涓虹┖",
+ icon: "none",
+ })
+ return ;
+ }
+ this.repeatClick = true
const {
code,
data,
msg
- } = await request('/AGV/staUnBind',{
- sta: this.barcode
+ } = await request('/AGV/task/start',{
+ sta: this.barcode,
+ area: this.whAreaId
}
)
if (code === 200) {
uni.showToast({
- title: '瑙g粦鎴愬姛'
+ title: '鍚姩鎴愬姛'
})
this.clear()
} else {
@@ -202,7 +199,7 @@
icon: "none",
})
}
-
+ this.repeatClick = false
},
diff --git a/pages/home/index.vue b/pages/home/index.vue
index 06e3814..e2c9dd2 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -108,10 +108,10 @@
</navigator>
</view>
<view class="cu-item">
- <navigator hover-class='none' url="/pages/AGV/AGVStaBind" navigateTo>
+ <navigator hover-class='none' url="/pages/AGV/StartInTask" navigateTo>
<view class="cuIcon-punch text-blue">
</view>
- <text>鍚姩鍏ュ簱</text>
+ <text>缁戝畾鍏ュ簱</text>
</navigator>
</view>
<view class="cu-item">
@@ -121,6 +121,13 @@
<text>绔欑偣瑙g粦</text>
</navigator>
</view>
+ <view class="cu-item">
+ <navigator hover-class='none' url="/pages/AGV/BindAndInTask" navigateTo>
+ <view class="cuIcon-punch text-blue">
+ </view>
+ <text>缁戝畾&鍏ュ簱</text>
+ </navigator>
+ </view>
</view>
--
Gitblit v1.9.1