From 7a3f79cb315a4dd10ee04ee6c72e476e24226b6f Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期一, 12 一月 2026 09:47:20 +0800
Subject: [PATCH] #
---
pages/listing/itemSelect.vue | 2
pages/listing/matnrPalletising.vue | 268 +++++++++++++++++++++++++++++++++++++++++++++++++++--
pages.json | 2
pages/AGV/StartInTask.vue | 5
4 files changed, 263 insertions(+), 14 deletions(-)
diff --git a/pages.json b/pages.json
index 150f997..bf22534 100644
--- a/pages.json
+++ b/pages.json
@@ -544,7 +544,7 @@
}, {
"path": "pages/phyz/bcp/bcpOrder",
"style": {
- "navigationBarTitleText": "鍗婃垚鍝佸叆搴撳崟",
+ "navigationBarTitleText": "鍗婂叆搴撳崟",
"enablePullDownRefresh": false
}
diff --git a/pages/AGV/StartInTask.vue b/pages/AGV/StartInTask.vue
index 8c04e84..ebef7c2 100644
--- a/pages/AGV/StartInTask.vue
+++ b/pages/AGV/StartInTask.vue
@@ -118,7 +118,10 @@
this.buttonPermissions = uni.getStorageSync('buttonPermissions') || [];
console.log('褰撳墠椤甸潰鎸夐挳鏉冮檺:', this.buttonPermissions);
},
- methods: {
+ methods: {
+ hasButtonPermission(route) {
+ return this.buttonPermissions.includes(route);
+ },
selChange(val) {
uni.setStorageSync('whAreaId', val)
},
diff --git a/pages/listing/itemSelect.vue b/pages/listing/itemSelect.vue
index b1ec2ba..99eb754 100644
--- a/pages/listing/itemSelect.vue
+++ b/pages/listing/itemSelect.vue
@@ -65,7 +65,7 @@
<view class="cu-item">
<view class="content">
<text class="text-black">鍙粍鐩樻暟閲�: <text
- class="text-grey ">{{item.anfme - item.workQty - item.qty}}</text></text>
+ class="text-grey ">{{item.ableQty}}</text></text>
</view>
</view>
diff --git a/pages/listing/matnrPalletising.vue b/pages/listing/matnrPalletising.vue
index 90d8f1e..a054a93 100644
--- a/pages/listing/matnrPalletising.vue
+++ b/pages/listing/matnrPalletising.vue
@@ -96,7 +96,7 @@
<view class="cu-item">
<view class="content">
<text class="text-black">鍙粍鐩樻暟閲�: <text
- class="text-grey ">{{item.anfme - item.workQty - item.qty}}</text></text>
+ class="text-grey ">{{item.ableQty}}</text></text>
</view>
</view>
@@ -106,7 +106,7 @@
<view class="title text-blue"><text
class="text-red text-xl vertical-middle">*</text>缁勭洏鏁伴噺:
</view>
- <uni-number-box style="width: 70%;" :min="0" :max="max" :decimal="2" :step="0.01" v-model="item.receiptQty"
+ <uni-number-box style="width: 70%;" :min="0" :max="item.ableQty" :decimal="2" :step="0.01" v-model="item.receiptQty"
></uni-number-box>
</view>
</view>
@@ -117,6 +117,43 @@
<view class="cu-bar btn-group foot">
<button v-if="hasButtonPermission('reset')" class="cu-btn text-blue line-blue shadow" @click="clear">娓呯┖</button>
<button v-if="hasButtonPermission('submit')" class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm">缁勬墭</button>
+ <button v-if="hasButtonPermission('submitNoJudge')" class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm2">缁勬墭</button>
+ </view>
+
+ <!-- AGV鍛煎彨纭寮圭獥 -->
+ <view class="modal-mask" v-if="showAgvModal" @click="closeAgvModal">
+ <view class="modal-container" @click.stop>
+ <view class="modal-header">
+ <text class="cuIcon-deliver" style="font-size: 48rpx; color: #0081ff;"></text>
+ <text class="modal-title">AGV鍛煎彨纭</text>
+ </view>
+ <view class="modal-body">
+ <text class="modal-message">鏄惁闇�瑕佸懠鍙獳GV杩涜鎵樼洏鎼繍锛�</text>
+ </view>
+ <view class="modal-footer">
+ <button class="modal-btn modal-btn-cancel" @click="handleAgvNo">涓嶉渶瑕�</button>
+ <button class="modal-btn modal-btn-confirm" @click="handleAgvYes">闇�瑕佸懠鍙�</button>
+ </view>
+ </view>
+ </view>
+
+ <!-- AGV绔欑偣杈撳叆寮圭獥 -->
+ <view class="modal-mask" v-if="showAgvInputModal" @click="closeAgvInputModal">
+ <view class="modal-container" @click.stop>
+ <view class="modal-header">
+ <text class="cuIcon-locationfill" style="font-size: 48rpx; color: #0081ff;"></text>
+ <text class="modal-title">杈撳叆AGV绔欑偣</text>
+ </view>
+ <view class="modal-body">
+ <view class="input-wrapper">
+ <input class="agv-input" type="text" v-model="agvStationInput" placeholder="璇疯緭鍏GV绔欑偣缂栧彿" />
+ </view>
+ </view>
+ <view class="modal-footer">
+ <button class="modal-btn modal-btn-cancel" @click="closeAgvInputModal">鍙栨秷</button>
+ <button class="modal-btn modal-btn-confirm" @click="confirmAgvStation">纭畾</button>
+ </view>
+ </view>
</view>
</view>
</template>
@@ -144,7 +181,10 @@
isconfirm: false,
matnrCode:'',
max: 99999999,
- buttonPermissions: [] // 鎸夐挳鏉冮檺鍒楄〃
+ buttonPermissions: [], // 鎸夐挳鏉冮檺鍒楄〃
+ showAgvModal: false, // AGV纭寮圭獥
+ showAgvInputModal: false, // AGV绔欑偣杈撳叆寮圭獥
+ agvStationInput: '' // AGV绔欑偣杈撳叆鍊�
}
},
computed: {
@@ -325,7 +365,7 @@
prev() {
this.isconfirm = false
},
- async confirm() {
+ confirm() {
if(this.container === '' || this.container === null){
uni.showToast({
title: "瀹瑰櫒鐮佷负绌�",
@@ -342,23 +382,48 @@
})
return ;
}
+ // 鏄剧ずAGV纭寮圭獥
+ this.showAgvModal = true;
+ },
+ confirm2() {
+ if(this.container === '' || this.container === null){
+ uni.showToast({
+ title: "瀹瑰櫒鐮佷负绌�",
+ icon: "none",
+ position: 'top'
+ })
+ return ;
+ }
+ if(this.list.length ===0 || this.list === null){
+ uni.showToast({
+ title: "鏈坊鍔犳槑缁�",
+ icon: "none",
+ position: 'top'
+ })
+ return ;
+ }
+ this.submitConfirm2();
+ },
+ // 鎻愪氦缁勬墭璇锋眰
+ async submitConfirm2() {
this.repeatClick = true
const newArr = this.list.map(item => {
return {
...item,
- anfme: item.anfme === null ? 0 : +item.anfme,
+ anfme: item.anfme === null ? 0 : +item.anfme,
};
});
-
+
+ const requestData = {
+ items: newArr,
+ barcode: this.container,
+ };
const {
code,
data,
msg
- } = await request('/waitPakin/merge', {
- items: newArr,
- barcode: this.container,
- })
+ } = await request('/waitPakin/merge', requestData)
if (code === 200) {
uni.showToast({
title: '缁勭洏鎴愬姛'
@@ -376,6 +441,82 @@
}
this.repeatClick = false
},
+ // 鍏抽棴AGV纭寮圭獥
+ closeAgvModal() {
+ this.showAgvModal = false;
+ },
+ // 閫夋嫨涓嶉渶瑕丄GV
+ handleAgvNo() {
+ this.showAgvModal = false;
+ this.submitConfirm('');
+ },
+ // 閫夋嫨闇�瑕丄GV
+ handleAgvYes() {
+ this.showAgvModal = false;
+ this.agvStationInput = '';
+ this.showAgvInputModal = true;
+ },
+ // 鍏抽棴AGV绔欑偣杈撳叆寮圭獥
+ closeAgvInputModal() {
+ this.showAgvInputModal = false;
+ this.agvStationInput = '';
+ },
+ // 纭AGV绔欑偣
+ confirmAgvStation() {
+ if (this.agvStationInput.trim() === '') {
+ uni.showToast({
+ title: "AGV绔欑偣涓嶈兘涓虹┖",
+ icon: "none",
+ position: 'top'
+ });
+ return;
+ }
+ this.showAgvInputModal = false;
+ this.submitConfirm(this.agvStationInput);
+ },
+ // 鎻愪氦缁勬墭璇锋眰
+ async submitConfirm(agvStation) {
+ this.repeatClick = true
+ const newArr = this.list.map(item => {
+
+ return {
+ ...item,
+ anfme: item.anfme === null ? 0 : +item.anfme,
+ };
+ });
+
+ const requestData = {
+ items: newArr,
+ barcode: this.container,
+ };
+
+ // 濡傛灉鏈堿GV绔欑偣锛屾坊鍔犲埌璇锋眰鍙傛暟涓�
+ if (agvStation) {
+ requestData.agvStation = agvStation;
+ }
+
+ const {
+ code,
+ data,
+ msg
+ } = await request('/waitPakin/merge/v2', requestData)
+ if (code === 200) {
+ uni.showToast({
+ title: '缁勭洏鎴愬姛'
+ })
+ this.list = []
+ this.barcode = ''
+ this.container = ''
+ this.isconfirm = false
+ } else {
+ uni.showToast({
+ title: msg,
+ icon: "none",
+ position: 'top'
+ })
+ }
+ this.repeatClick = false
+ },
}
}
</script>
@@ -396,7 +537,6 @@
.text-blue {
color: #0081ff !important;
-
}
.act {
@@ -409,4 +549,110 @@
min-height: 80upx;
align-items: center;
}
+
+ /* 寮圭獥閬僵灞� */
+ .modal-mask {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background-color: rgba(0, 0, 0, 0.5);
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ z-index: 999;
+ }
+
+ /* 寮圭獥瀹瑰櫒 */
+ .modal-container {
+ width: 600rpx;
+ background-color: #ffffff;
+ border-radius: 24rpx;
+ overflow: hidden;
+ box-shadow: 0 8rpx 40rpx rgba(0, 0, 0, 0.15);
+ }
+
+ /* 寮圭獥澶撮儴 */
+ .modal-header {
+ padding: 40rpx 30rpx 20rpx;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ background: linear-gradient(135deg, #f0f7ff 0%, #e8f4ff 100%);
+ }
+
+ .modal-title {
+ font-size: 34rpx;
+ font-weight: bold;
+ color: #333;
+ /* margin-top: 16rpx; */
+ }
+
+ /* 寮圭獥鍐呭 */
+ .modal-body {
+ padding: 40rpx 30rpx;
+ }
+
+ .modal-message {
+ font-size: 30rpx;
+ color: #666;
+ text-align: center;
+ display: block;
+ }
+
+ /* 杈撳叆妗嗗鍣� */
+ .input-wrapper {
+ background-color: #f5f7fa;
+ border-radius: 12rpx;
+ padding: 20rpx;
+ border: 2rpx solid #e4e7ed;
+ }
+
+ .agv-input {
+ width: 100%;
+ height: 70rpx;
+ font-size: 30rpx;
+ color: #333;
+ background-color: transparent;
+ }
+
+ /* 寮圭獥搴曢儴鎸夐挳 */
+ .modal-footer {
+ display: flex;
+ border-top: 1rpx solid #eee;
+ }
+
+ .modal-btn {
+ flex: 1;
+ height: 100rpx;
+ line-height: 100rpx;
+ font-size: 32rpx;
+ border: none;
+ border-radius: 0;
+ background-color: #fff;
+ }
+
+ .modal-btn::after {
+ border: none;
+ }
+
+ .modal-btn-cancel {
+ color: #999;
+ border-right: 1rpx solid #eee;
+ }
+
+ .modal-btn-confirm {
+ color: #fff;
+ background: linear-gradient(135deg, #0081ff 0%, #1890ff 100%);
+ font-weight: bold;
+ }
+
+ .modal-btn-confirm:active {
+ background: linear-gradient(135deg, #0070dd 0%, #1480e8 100%);
+ }
+
+ .modal-btn-cancel:active {
+ background-color: #f5f5f5;
+ }
</style>
\ No newline at end of file
--
Gitblit v1.9.1