From 9ffd3dce0bb92458d6cbcd9993c63d5fb68c7367 Mon Sep 17 00:00:00 2001 From: zjj <3272660260@qq.com> Date: 星期一, 07 七月 2025 08:13:12 +0800 Subject: [PATCH] # --- pages/listing/labour.vue | 126 +++++++++++++++++------------------------ 1 files changed, 53 insertions(+), 73 deletions(-) diff --git a/pages/listing/labour.vue b/pages/listing/labour.vue index 6c7eeb2..5b27e05 100644 --- a/pages/listing/labour.vue +++ b/pages/listing/labour.vue @@ -1,25 +1,16 @@ <template> <view class="has-foot"> <form> - <view class="cu-form-group margin-top"> - <view class="title">ASN鍗�</view> - <input placeholder="璇锋壂鎻廇SN鍗�" v-model="asnCode" focus></input> - </view> - <view class="cu-form-group "> - <view class="title">鎵樼洏</view> - <input placeholder="璇锋壂鎻忔墭鐩�" v-model="container"></input> - </view> - - <view class="cu-form-group "> - <view class="title">鐗╂枡鐮�</view> - <input placeholder="璇锋壂鎻忕墿鏂欑爜" v-model="barcode"></input> + <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> + <input placeholder="璇锋壂鎻忓簱浣嶇爜" v-model="locCode"></input> + </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"> @@ -28,14 +19,18 @@ {{index+1}} </view> <view class="text-blue"> - {{`${item.maktx}`}} + 缂栫爜:{{`${item.matnrCode}`}} </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">鍚嶇О:</text> + <text class="text-grey ">{{item.maktx}}</text> + </view> + + </view> <view class="cu-item"> <view class="content"> <text class="text-black">ASN:</text> @@ -44,38 +39,17 @@ <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.barcode}}</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> </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.anfme}}</text> @@ -85,10 +59,7 @@ </block> </view> - <view class="cu-form-group margin-bottom"> - <view class="title">搴撲綅鐮�</view> - <input placeholder="璇锋壂鎻忓簱浣嶇爜" v-model="locCode"></input> - </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" @click="confirm">涓婃灦</button> @@ -126,15 +97,13 @@ code, data, msg - } = await request('/stock/operate/list', { - asnCode: this.asnCode, - barcode: this.container, - matnrCode: this.barcode + } = await request('/stock/operate/list', { + barcode: this.container, }) if (code === 200) { // const find = this.list.find(el => el.id === data.id); // !find && - this.list.push(data) + this.list = data } else { uni.showToast({ title: msg, @@ -152,33 +121,44 @@ }, async confirm() { - if (this.locCode !== '') { - const { - code, - data, - msg - } = await request('/stock/operate', { - itemList: this.list, - locCode: this.locCode + if (this.locCode === '' || this.locCode === null) { + uni.showToast({ + title: '璇疯緭鍏ュ簱浣�', + icon: "none", }) - if (code === 200) { - uni.showToast({ - title: '涓婃灦鎴愬姛' - }) - this.list = [] - this.barcode = '' - } else { - uni.showToast({ - title: msg, - icon: "none", - }) - } + return ; + } + if (this.container === '' || this.container === null) { + uni.showToast({ + title: '璇疯緭鍏ユ墭鐩樼爜', + icon: "none", + }) + return ; + } + const { + code, + data, + msg + } = await request('/stock/operate', { + itemList: this.list, + locCode: this.locCode, + barcode: this.container, + + }) + if (code === 200) { + uni.showToast({ + title: '涓婃灦鎴愬姛' + }) + this.list = [] + this.locCode = '' + this.container = '' } else { uni.showToast({ - title: '璇烽�夋嫨搴撲綅', + title: msg, icon: "none", }) } + }, -- Gitblit v1.9.1