From 32fe3499b4c2d896819ad03b6dbf776bf4d6baed Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期二, 10 三月 2026 14:43:33 +0800
Subject: [PATCH] #
---
pages/inbound/buffStore.vue | 499 ++++++++++++++++++++++++++++--------------------------
1 files changed, 259 insertions(+), 240 deletions(-)
diff --git a/pages/inbound/buffStore.vue b/pages/inbound/buffStore.vue
index 6ce4095..257d021 100644
--- a/pages/inbound/buffStore.vue
+++ b/pages/inbound/buffStore.vue
@@ -1,74 +1,73 @@
<template>
<view class="has-foot">
<form>
- <view class="flex solid-bottom padding-sm justify-between">
- <view class="text-grey margin-left">宸查�夌墿鏂欎俊鎭細{{container}}</view>
- </view>
-
<view class="cu-form-group margin-top">
<view class="title">绌烘《鎺ラ┏绔欑偣</view>
- <input placeholder="璇锋壂鎻忕┖妗舵帴椹崇珯鐐规潯鐮�" v-model="barcode" ></input>
- <!-- <text class='cuIcon-search text-blue' @click="search"></text> -->
- </view>
-
- <view class="cu-bar btn-group top margin-top">
- <button class="cu-btn text-blue line-blue shadow" @click="clear">1.鍛煎彨绌烘《</button>
- <!-- <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm">2.鍛煎彨琚嬭鏂版枡</button> -->
-<!-- <button class="ccu-btn bg-blue shadow-blur shadow-blur" @click="clear">鍛煎彨琚嬭鏂版枡</button>
- <button class="ccu-btn bg-blue shadow-blur shadow-blur" @click="clear">鍛煎彨绌烘《</button> -->
- <!-- <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm">鍏ュ簱</button> -->
+ <input
+ placeholder="璇锋壂鎻忕┖妗舵帴椹崇珯鐐规潯鐮�"
+ v-model="sta1"
+ />
</view>
-
- <view class="cu-form-group margin-top">
- <view class="title">琚嬭鏂版枡鎺ラ┏绔欑偣</view>
- <input placeholder="璇锋壂鎻忚瑁呮柊鏂欐帴椹崇珯鐐规潯鐮�" v-model="barcode" ></input>
- <!-- <text class='cuIcon-search text-blue' @click="search"></text> -->
- </view>
-
- <view class="cu-bar btn-group top margin-top">
- <!-- <button class="cu-btn text-blue line-blue shadow" @click="clear">1.鍛煎彨绌烘《</button> -->
- <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm">2.鍛煎彨琚嬭鏂版枡</button>
- <!-- <button class="ccu-btn bg-blue shadow-blur shadow-blur" @click="clear">鍛煎彨琚嬭鏂版枡</button>
- <button class="ccu-btn bg-blue shadow-blur shadow-blur" @click="clear">鍛煎彨绌烘《</button> -->
- <!-- <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm">鍏ュ簱</button> -->
- </view>
-
- <view class="cu-form-group margin-top">
- <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> -->
-
<view class="cu-bar btn-group top margin-top">
- <button class="cu-btn bg-green shadow-blur" @click="clear">3.妗惰鏂版枡鍏ュ簱</button>
+ <button
+ class="cu-btn text-blue line-blue shadow"
+ @click="sta1Click()"
+ >
+ 1.鍛煎彨绌烘《
+ </button>
+ </view>
+
+ <view class="cu-form-group margin-top">
+ <view class="title">琚嬭鏂版枡鎺ラ┏绔欑偣</view>
+ <input
+ placeholder="璇锋壂鎻忚瑁呮柊鏂欐帴椹崇珯鐐规潯鐮�"
+ v-model="sta2"
+ />
+ </view>
+
+ <view class="cu-bar btn-group top margin-top">
+ <button
+ class="cu-btn bg-blue shadow-blur"
+ :disabled="repeatClick"
+ @click="sta2Click()"
+ >
+ 2.鍛煎彨琚嬭鏂版枡
+ </button>
+ </view>
+
+ <view class="cu-bar btn-group top margin-top">
+ <button
+ class="cu-btn bg-green shadow-blur"
+ @click="toComb"
+ >
+ 3.鍘荤粍鎵�
+ </button>
+ </view>
+ <view class="cu-bar btn-group top margin-top">
+ <button
+ class="cu-btn bg-green shadow-blur"
+ @click="toIn"
+ >
+ 4.鍘诲叆搴�
+ </button>
</view>
</form>
-
- <view class="cu-list det menu sm-border padding">
- <block v-for="(item, index) in list" :key="index">
+ <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}}
+ {{ index + 1 }}
</view>
<view class="text-blue">
- {{`${item.maktx}`}}
+ {{ `${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">
@@ -76,7 +75,7 @@
<text class="text-black">ASN:</text>
</view>
<view class="action">
- <text class="text-grey ">{{item.asnCode}}</text>
+ <text class="text-grey">{{ item.asnCode }}</text>
</view>
</view>
<view class="cu-item">
@@ -84,226 +83,246 @@
<text class="text-black">鎵规:</text>
</view>
<view class="action">
- <text class="text-grey ">{{item.batch}}</text>
+ <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>
+ <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,
-
+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,
+ sta1: '',
+ sta2: ''
+ }
+ },
+ computed: {
+ ...mapState('user', ['dynamicFields'])
+ },
+ mounted() {},
+ methods: {
+ async sta1Click() {
+ let that = this
+ const { code, data, msg } = await request(
+ '/orderOut/buffStore/callEmpty',
+ {
+ sta1: this.sta1
+ },
+ 'POST'
+ )
+ if (code === 200) {
+ uni.showToast({
+ title: '鍛煎彨鎴愬姛'
+ })
+ } else {
+ uni.showToast({
+ title: msg,
+ icon: 'none'
+ })
}
},
- computed: {
- ...mapState('user', ['dynamicFields']),
- },
- mounted() {
- this.getRece()
- this.whAreaId = uni.getStorageSync('whAreaId')
- },
- methods: {
- selChange(val) {
- uni.setStorageSync('whAreaId', val)
- },
- async search() {
- let that = this
- const {
- code,
- data,
- msg
- } = await request('/staBind/list', {
- sta: this.barcode
+ async sta2Click() {
+ let that = this
+ const { code, data, msg } = await request(
+ '/orderOut/buffStore/callNewMat',
+ {
+ sta1: this.sta1
+ },
+ 'POST'
+ )
+ if (code === 200) {
+ uni.showToast({
+ title: '鍛煎彨鎴愬姛'
})
- 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",
- })
+ } else {
+ uni.showToast({
+ title: msg,
+ icon: 'none'
+ })
+ }
+ },
+ toComb() {
+ uni.navigateTo({
+ url: '/pages/listing/matnrPalletising'
+ })
+ },
+ toIn() {
+ uni.navigateTo({
+ url: '/pages/AGV/StartInTask'
+ })
+ },
+ 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 = ''
- },
+ remove(index) {
+ this.list.splice(index, 1)
+ },
+ clear() {
+ this.list = []
- open() {
- this.$refs.popup.open()
- },
+ this.container = ''
+ this.barcode = ''
+ },
- close() {
- this.$refs.popup.close()
- },
+ open() {
+ this.$refs.popup.open()
+ },
- popupSubmit() {
- this.$refs.popup.close()
- },
- itemChange(el) {
- this.curCode = el
- },
+ close() {
+ this.$refs.popup.close()
+ },
- 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
- },
-
- async getRece() {
- const {
- code,
- data,
- msg
- } = await request('/areas/receipt', {}, 'get')
- if (code === 200) {
- this.range = data.map(item => ({
- value: item.id,
- text: item.warehouseId$ + "-- " + item.name
- }));
- }
- },
+ 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
+ },
+
+ async getRece() {
+ const { code, data, msg } = await request(
+ '/areas/receipt',
+ {},
+ 'get'
+ )
+ if (code === 200) {
+ this.range = data.map((item) => ({
+ value: item.id,
+ text: item.warehouseId$ + '-- ' + item.name
+ }))
+ }
}
}
+}
</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;
- }
+.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;
+.text-blue {
+ color: #0081ff !important;
+}
- }
+.item {
+ position: relative;
+ display: flex;
+ min-height: 80upx;
+ align-items: center;
+}
- .item {
- position: relative;
- display: flex;
- min-height: 80upx;
- align-items: center;
- }
+.uni-file-picker {
+ width: 100%;
+ margin-bottom: 10px;
+}
- .uni-file-picker {
- width: 100%;
- margin-bottom: 10px;
- }
+.uni-select__selector {
+ z-index: 999;
+}
- .uni-select__selector {
- z-index: 999;
- }
+.tj {
+ height: auto;
+ padding: 6px 8px;
+ display: inline-block;
+ border-radius: 6px;
+}
- .tj {
- height: auto;
- padding: 6px 8px;
- display: inline-block;
- border-radius: 6px;
- }
+.item {
+ display: flex;
+ justify-content: center;
+}
- .item {
- display: flex;
- justify-content: center;
- }
-
- .item .cu-btn {
- font-size: 26upx;
- }
-</style>
\ No newline at end of file
+.item .cu-btn {
+ font-size: 26upx;
+}
+</style>
--
Gitblit v1.9.1