From 557ba4c410f34b4cf32dc372a888f69fbac7a2de Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期六, 28 六月 2025 17:29:31 +0800
Subject: [PATCH] no message
---
pages/order/orderOutConfirm.vue | 357 ++++++++++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 278 insertions(+), 79 deletions(-)
diff --git a/pages/order/orderOutConfirm.vue b/pages/order/orderOutConfirm.vue
index beb6ea0..2470d5c 100644
--- a/pages/order/orderOutConfirm.vue
+++ b/pages/order/orderOutConfirm.vue
@@ -1,17 +1,41 @@
<template>
<view>
+ <view class="code">
+ <view class="item">
+ <view class="code-decs">璁㈠崟鍙�:</view>
+ <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="orderNo" :focus="barcodeFocus"
+ @input="barcodeInput()">
+ </view>
+ <uni-section title="鍟嗗搧鍒楄〃" type="line" class="mat-list-title"></uni-section>
+ <uni-row :gutter="10" v-if="range.length > 0">
+ <checkbox-group @change="checkboAll">
+ <uni-col :span="3" style="padding: 10px;">
+ <checkbox value="鍏ㄩ��" checked></checkbox>
+ </uni-col>
+ <uni-col :span="20">
+
+ </uni-col>
+ </checkbox-group>
+ </uni-row>
+ </view>
<view class="list-view">
<scroll-view style="overflow: hidden;overflow-y: scroll;height: auto;">
- <view>
- <uni-row :gutter="10">
- <uni-col :span="3" style="margin: auto;align-items: center;justify-content: center;">
- <uni-data-checkbox mode="list" icon="left" v-model="value" :localdata="range" @change="change" :multiple="true" />
- </uni-col>
- <uni-col :span="20">
- <view>1112244</view>
- </uni-col>
- </uni-row>
- </view>
+ <checkbox-group @change="checkboxChange">
+ <label :class="item.workQty == item.anfme ? 'order__list' : 'order-list-cell'" v-for="(item, index) in range" :key="index">
+ <view class="order__list__right">
+ <checkbox :value="item.id" :checked="item.checked" style="transform:scale(0.7)" />
+ </view>
+ <view class="order__list__left">
+ <view>No锛歿{index + 1}}</view>
+ <view>璁㈠崟鍙凤細{{item.orderNo}}</view>
+ <view>娉㈡鍙凤細{{item.waveNo}}</view>
+ <view>鏂欏彿锛歿{item.matnr}}</view>
+ <view>鎵瑰彿锛歿{item.batch}}</view>
+ <view>璁㈠崟鏁伴噺锛歿{item.anfme}}</view>
+ <view>瀹炲彂鏁伴噺锛歿{item.workQty}}</view>
+ </view>
+ </label>
+ </checkbox-group>
</scroll-view>
</view>
<!-- 搴曢儴鎿嶄綔鎸夐挳 -->
@@ -22,7 +46,7 @@
<view>
<uni-popup ref="combConfirm" type="dialog">
<uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
- @confirm="comb" @close="combClose"></uni-popup-dialog>
+ @confirm="shippingConfirm" @close="combClose"></uni-popup-dialog>
</uni-popup>
</view>
<view>
@@ -38,29 +62,186 @@
export default {
data() {
return {
+ barcodeFocus: '',
+ orderNo: '',
msgType1: 'success',
msgType: 'success',
messageText: '',
title: '',
content: '',
- dataList: [],
+ shipping: [],
barcode: '',
matFocus: '',
- value: 0,
- range: [{"value": 0,"texts": "绡悆" },{"value": 1,"texts": "瓒崇悆"},{"value": 2,"texts": "娓告吵"}]
+ value: '0',
+ range: []
}
},
+ onShow() {
+ this.baseUrl = uni.getStorageSync('baseUrl');
+ this.token = uni.getStorageSync('token');
+ },
+
methods: {
- change(data) {
- console.log(data)
- }
+ barcodeInput() {
+ let that = this
+ setTimeout(() => {
+ that.getOrderDetl()
+ }, 700)
+ },
+ /**
+ * 鑾峰彇鍙戣揣璁㈠崟鏄庣粏淇℃伅
+ */
+ getOrderDetl() {
+ if (this.orderNo.trim() == undefined || this.orderNo.trim() == null || this.orderNo == '') {
+ this.messageToggle('error', '璁㈠崟缂栫爜涓嶈兘涓虹┖锛侊紒')
+ return
+ }
+
+ let that = this
+ this.$toast.loading('鍔犺浇涓�...')
+ uni.request({
+ url: that.baseUrl + '/pda/shipping/order/detl',
+ data: JSON.stringify({
+ orderNo: this.orderNo.trim(),
+ }),
+ method: 'POST',
+ header: {
+ 'token': uni.getStorageSync('token')
+ },
+ success(result) {
+ var res = result.data
+ if (res.code === 200) {
+ that.messageToggle('success', '鏁版嵁鎷夊彇鎴愬姛锛侊紒')
+ that.range = res.data.map(item => {
+ return {...item, checked: true}
+ })
+ } else {
+ that.messageText = res.msg
+ that.messageToggle('error')
+ }
+ },
+ complete() {
+ that.$toast.hideLoading()
+ }
+ });
+ },
+
+ /**
+ * 杈撳叆妗嗛噸缃�
+ */
+ resst() {
+ this.orderNo = ''
+ this.shipping = []
+ },
+ /**
+ * checkbox閫変腑浜嬩欢
+ * @param {Object} e
+ */
+ checkboxChange: function (e) {
+ var items = this.range, values = e.detail.value;
+ for (var i = 0, lenI = items.length; i < lenI; ++i) {
+ const item = items[i]
+ if(values.indexOf(item.id) >= 0){
+ this.$set(item,'checked',true)
+ }else {
+ this.$set(item,'checked',false)
+ }
+ }
+ },
+ /**
+ * checkbox鍏ㄩ�変簨浠�
+ * @param {Object} e
+ */
+ checkboAll(e) {
+ let detl = e.detail.value
+ if (detl.length < 1) {
+ this.range.map(item => {
+ return item.checked = false
+ })
+ } else {
+ this.range.map(item => {
+ return item.checked = true
+ })
+ }
+ },
+
+ //纭鍙戣揣
+ shippinged() {
+ if (this.orderNo == undefined || this.orderNo == null || this.orderNo.trim() == '') {
+ this.messageToggle('error', '璁㈠崟缂栫爜涓嶈兘涓虹┖锛侊紒')
+ return
+ }
+
+ let that = this
+ this.$toast.loading('鍔犺浇涓�...')
+ uni.request({
+ url: that.baseUrl + '/pda/shipping/confirm',
+ data: JSON.stringify(that.shipping),
+ method: 'POST',
+ header: {
+ 'token': uni.getStorageSync('token')
+ },
+ success(result) {
+ var res = result.data
+ if (res.code === 200) {
+ that.messageToggle('success', '鍙戣揣鎴愬姛锛侊紒')
+ that.range = res.data.map(item => {
+ return {...item, checked: true}
+ })
+ } else {
+ that.messageText = res.msg
+ that.messageToggle('error')
+ }
+ },
+ complete() {
+ that.resst()
+ that.$toast.hideLoading()
+ }
+ });
+ },
+
+ combConfirm() {
+ this.dialogToggle('dialog', '纭', '鏄惁纭鍙戣揣锛�')
+ },
+
+ shippingConfirm(type) {
+ if (this.range == null) {
+ this.messageToggle('error', '鍙戣揣鍗曟暟鎹负绌猴紒锛�');
+ return
+ }
+ /**杩囨护鏈�変腑璁㈠崟鏄庣粏*/
+ this.shipping = this.range.filter(item => {
+ return item.checked == true
+ })
+
+ if (this.shipping != null && this.shipping.length > 0) {
+ this.shippinged()
+ }
+ },
+
+ //dialog寮规淇℃伅
+ dialogToggle(type,title, msg) {
+ this.msgType = type
+ this.title = title
+ this.content = msg
+ this.$refs.combConfirm.open()
+ },
+
+ //娑堟伅寮规
+ messageToggle(type, msg) {
+ this.msgType1 = type
+ if (msg != undefined || msg != null) {
+ this.messageText = msg
+ }
+ this.$refs.message.open()
+ },
+
}
}
</script>
<style>
@import url('../../static/css/wms.css/wms.css');
-
.uni-section {
margin-top: 0rpx;
@@ -69,79 +250,97 @@
font-size: 16px !important;
}
}
-
.buttom uni-button {
width: 60%;
- }
-
- .list-view {
- width: 100%;
- position: relative;
-
- .uni-data-checklist .checklist-group .checklist-box.is--list {
- padding-left: 30rpx;
- }
-
- }
-
- .list {
- display: flex;
- min-height: 80rpx;
- background-color: #FFF;
- margin: 20rpx;
- border-radius: 20rpx;
- box-shadow: 0px 0px 30px 0px rgba(0,0,0,0.2);
- }
- .list:first-child {
- margin-top: 300rpx;
- }
- .list:last-child {
- margin-bottom: 120rpx;
}
.code {
width: 100%;
- position: fixed;
+ top: 76rpx;
+ position: sticky;
background: white;
min-height: 200rpx;
background-color: #FFF;
- z-index: 10;
- }
- .item {
- display: flex;
- align-items: center;
- height: 100rpx;
- margin-left: 20rpx;
- border-bottom: 1px solid #DCDFE6;
- }
-
- .item input {
- height: 50rpx;
- line-height: 50rpx;
- /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
- font-size: 36upx;
- font-family: PingFang SC;
- width: 55vw;
-
- }
-
- .code-decs {
- width: 20vw;
- font-size: 18px;
- color: #303133;
- }
+ z-index: 10;
+
+ .item {
+ display: flex;
+ align-items: center;
+ height: 100rpx;
+ margin-left: 20rpx;
+ border-bottom: 1px solid #DCDFE6;
+
+ .code-decs {
+ width: 20vw;
+ font-size: 18px;
+ color: #303133;
+ }
+ }
+
+ .item input {
+ height: 50rpx;
+ line-height: 50rpx;
+ /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
+ font-size: 36upx;
+ font-family: PingFang SC;
+ width: 55vw;
+
+ }
+
+ .mat-list-title {
+ height: 80rpx;
+ line-height: 80rpx;
+ font-size: 24px;
+ width: 100%;
+ background: white;
+ font-weight: 500;
+ }
+
+ }
+
+ .list-view {
+ padding-bottom: 92rpx;
+ }
.item-right {
margin-left: auto;
margin-right: 20rpx;
}
-
- .mat-list-title {
- height: 80rpx;
- position: fixed;
- line-height: 80rpx;
- font-size: 24px;
- width: 100%;
- background: white;
- font-weight: 500;
+
+ .order__list {
+ margin: 20rpx;
+ font-size: 14px;
+ background-color: #fff;
+ border-radius: 20rpx;
+ border: 1px solid #eeeeee;
+ display: flex;
+ position: relative;
+ background-color: #3eb689;
+ color: #FFF;
}
+
+ .order-list-cell {
+ margin: 20rpx;
+ font-size: 14px;
+ border-radius: 20rpx;
+ border: 1px solid #eeeeee;
+ display: flex;
+ position: relative;
+ background-color: #FD4D11;
+ color: #FFF;
+ }
+
+
+ .order__list__left {
+ flex: 1;
+ padding: 20rpx;
+ position: relative;
+ }
+ .order__list__right {
+ width: 70rpx;
+ border-right: 1rpx solid #eeeeee;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+
</style>
--
Gitblit v1.9.1