From 70093287ff4fc1e8996d5534e2ef86558f4ec338 Mon Sep 17 00:00:00 2001
From: pjb <pjb@>
Date: 星期二, 05 五月 2026 13:01:14 +0800
Subject: [PATCH] 组托和订单组托功能完善,新增领料出库功能
---
pages/order/orderComb.vue | 681 ++++++++++++----
/dev/null | 116 --
.idea/vcs.xml | 2
pages/home/home.vue | 10
pages/mat/matSelected.vue | 362 ++++++-
pages.json | 24
pages/order/orderSelect.vue | 564 +++++++++++--
pages/pakin/pakin.vue | 710 +++++++++++++---
.idea/misc.xml | 3
static/css/wms.css/wms.css | 3
10 files changed, 1,859 insertions(+), 616 deletions(-)
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 639900d..58c6d09 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
- <component name="ProjectRootManager">
+ <component name="KubernetesApiProvider">{}</component>
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
\ No newline at end of file
diff --git a/.idea/shelf/Uncommitted_changes_before_Update_at_2024_9_3_14_52__Changes_.xml b/.idea/shelf/Uncommitted_changes_before_Update_at_2024_9_3_14_52__Changes_.xml
deleted file mode 100644
index bd86187..0000000
--- a/.idea/shelf/Uncommitted_changes_before_Update_at_2024_9_3_14_52__Changes_.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<changelist name="Uncommitted_changes_before_Update_at_2024_9_3_14_52_[Changes]" date="1725346391490" recycled="true" deleted="true">
- <option name="PATH" value="$PROJECT_DIR$/.idea/shelf/Uncommitted_changes_before_Update_at_2024_9_3_14_52_[Changes]/shelved.patch" />
- <option name="DESCRIPTION" value="Uncommitted changes before Update at 2024/9/3 14:52 [Changes]" />
-</changelist>
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index 94a25f7..35eb1dd 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
- <mapping directory="$PROJECT_DIR$" vcs="Git" />
+ <mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
deleted file mode 100644
index e49d7e8..0000000
--- a/.idea/workspace.xml
+++ /dev/null
@@ -1,116 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
- <component name="AutoImportSettings">
- <option name="autoReloadType" value="SELECTIVE" />
- </component>
- <component name="ChangeListManager">
- <list default="true" id="ac5e0bc2-a4ad-4c6e-9ad6-80e4dd8ec177" name="Changes" comment="#" />
- <option name="SHOW_DIALOG" value="false" />
- <option name="HIGHLIGHT_CONFLICTS" value="true" />
- <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
- <option name="LAST_RESOLUTION" value="IGNORE" />
- </component>
- <component name="Git.Settings">
- <option name="RECENT_BRANCH_BY_REPOSITORY">
- <map>
- <entry key="$PROJECT_DIR$" value="xghyasrs" />
- </map>
- </option>
- <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
- </component>
- <component name="ProjectColorInfo">{
- "associatedIndex": 4
-}</component>
- <component name="ProjectId" id="2h8PF9YStMdvwll8P40GwU8SaNk" />
- <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
- <component name="ProjectViewState">
- <option name="hideEmptyMiddlePackages" value="true" />
- <option name="showLibraryContents" value="true" />
- </component>
- <component name="PropertiesComponent">{
- "keyToString": {
- "RunOnceActivity.ShowReadmeOnStart": "true",
- "git-widget-placeholder": "nbncPda",
- "ignore.virus.scanning.warn.message": "true",
- "kotlin-language-version-configured": "true",
- "last_opened_file_path": "D:/project/HBuilderX/pda/wms_app",
- "node.js.detected.package.eslint": "true",
- "node.js.detected.package.tslint": "true",
- "node.js.selected.package.eslint": "(autodetect)",
- "node.js.selected.package.tslint": "(autodetect)",
- "nodejs_package_manager_path": "npm",
- "vue.rearranger.settings.migration": "true"
- }
-}</component>
- <component name="SharedIndexes">
- <attachedChunks>
- <set>
- <option value="bundled-jdk-9f38398b9061-18abd8497189-intellij.indexing.shared.core-IU-241.14494.240" />
- <option value="bundled-js-predefined-1d06a55b98c1-74d2a5396914-JavaScript-IU-241.14494.240" />
- </set>
- </attachedChunks>
- </component>
- <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
- <component name="TaskManager">
- <task active="true" id="Default" summary="Default task">
- <changelist id="ac5e0bc2-a4ad-4c6e-9ad6-80e4dd8ec177" name="Changes" comment="" />
- <created>1716972624447</created>
- <option name="number" value="Default" />
- <option name="presentableId" value="Default" />
- <updated>1716972624447</updated>
- <workItem from="1716972625500" duration="113000" />
- <workItem from="1716972760614" duration="36000" />
- <workItem from="1716972903817" duration="15000" />
- <workItem from="1717114695518" duration="9000" />
- <workItem from="1717154256850" duration="10000" />
- <workItem from="1717305043023" duration="6000" />
- <workItem from="1719981104703" duration="779000" />
- <workItem from="1720069768395" duration="11000" />
- <workItem from="1720069796202" duration="3000" />
- <workItem from="1725346373102" duration="35000" />
- <workItem from="1725841142184" duration="7000" />
- <workItem from="1725861857301" duration="37000" />
- <workItem from="1725864000030" duration="5000" />
- </task>
- <task id="LOCAL-00001" summary="#">
- <option name="closed" value="true" />
- <created>1725861879836</created>
- <option name="number" value="00001" />
- <option name="presentableId" value="LOCAL-00001" />
- <option name="project" value="LOCAL" />
- <updated>1725861879836</updated>
- </task>
- <option name="localTasksCounter" value="2" />
- <servers />
- </component>
- <component name="TypeScriptGeneratedFilesManager">
- <option name="version" value="3" />
- </component>
- <component name="Vcs.Log.Tabs.Properties">
- <option name="TAB_STATES">
- <map>
- <entry key="MAIN">
- <value>
- <State>
- <option name="FILTERS">
- <map>
- <entry key="branch">
- <value>
- <list>
- <option value="nbncPda" />
- </list>
- </value>
- </entry>
- </map>
- </option>
- </State>
- </value>
- </entry>
- </map>
- </option>
- </component>
- <component name="VcsManagerConfiguration">
- <MESSAGE value="#" />
- <option name="LAST_COMMIT_MESSAGE" value="#" />
- </component>
-</project>
\ No newline at end of file
diff --git a/pages.json b/pages.json
index e1dcde7..428dfab 100644
--- a/pages.json
+++ b/pages.json
@@ -40,8 +40,8 @@
{
"path": "pages/pakin/pakin",
"style": {
- // "navigationBarTitleText": "缁� 鎵�"
- "navigationStyle": "custom"
+ "navigationBarTitleText": "缁� 鎵�"
+ // "navigationStyle": "custom"
}
},
{
@@ -189,8 +189,7 @@
"path" : "pages/order/orderPakin2",
"style" :
{
- "navigationBarTitleText" : "璁㈠崟缁勬墭",
- "enablePullDownRefresh" : false
+ "navigationBarTitleText" : "璁㈠崟缁勬墭"
}
},
{
@@ -277,9 +276,8 @@
"path" : "pages/order/orderComb",
"style" :
{
- // "navigationBarTitleText" : "璁㈠崟缁勬墭",
+ "navigationBarTitleText" : "璁㈠崟缁勬墭"
// "enablePullDownRefresh" : false
- "navigationStyle": "custom"
}
},
{
@@ -410,7 +408,19 @@
"enablePullDownRefresh": false
}
- }
+ },
+ {
+ "path": "pages/order/callReqOutbound",
+ "style": {
+ "navigationBarTitleText": "棰嗘枡鍑哄簱"
+ }
+ },
+ {
+ "path": "pages/order/callOutboundDetl/callOutboundDetl",
+ "style": {
+ "navigationBarTitleText": "鍑哄簱鍗曟嵁"
+ }
+ }
],
"globalStyle": {
"navigationBarTextStyle": "black",
diff --git a/pages/home/home.vue b/pages/home/home.vue
index 8ecb585..94e3c34 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -47,13 +47,20 @@
color: 'cyan',
cuIcon: 'pullup',
url: '/pakin/pakin'
- },
+ },
{
title: '璁㈠崟缁勬墭',
name: 'orderComb',
color: 'olive',
cuIcon: 'pulldown',
url: '/order/orderComb'
+ },
+ {
+ title: '棰嗘枡鍑哄簱',
+ name: 'callReqOutbound',
+ color: 'orange',
+ cuIcon: 'pullup',
+ url: '/order/callReqOutbound'
},
// {
// title: '鍛煎彨绌烘墭',
@@ -278,6 +285,7 @@
</script>
<style>
+ @import url('../../static/css/wms.css/wms.css');
::v-deep .uni-nav-bar-text{
font-size: 16px;
font-weight: 600;
diff --git a/pages/mat/matSelected.vue b/pages/mat/matSelected.vue
index 8ac9d36..0bb68ed 100644
--- a/pages/mat/matSelected.vue
+++ b/pages/mat/matSelected.vue
@@ -1,36 +1,99 @@
<template>
- <view>
- <view class="form">
- <view class="form-item">
- <view class="form-item-desc"><text>鍟嗗搧缂栫爜</text></view>
- <view class="form-item-content"><text>{{mat.matnr}}</text></view>
+ <view class="container">
+ <!-- 鏍囬鏍� -->
+ <view class="status_bar"></view>
+ <uni-nav-bar background-color="#ffffff" title="鐗╂枡璇︽儏" @clickLeft="back" :fixed="true"
+ :border="false" left-icon="left" :shadow="true">
+ </uni-nav-bar>
+
+ <!-- 鐗╂枡淇℃伅鍗$墖 -->
+ <view class="info-card">
+ <view class="card-header">
+ <view class="header-icon">
+ <uni-icons type="shop" size="24" color="#409EFF"></uni-icons>
+ </view>
+ <text class="header-title">鐗╂枡淇℃伅</text>
</view>
- <view class="form-item">
- <view class="form-item-desc"><text>鍟嗗搧鍚嶇О</text></view>
- <view class="form-item-content"><text style="word-wrap:break-word">{{mat.maktx}}</text></view>
- </view>
- <view class="form-item">
- <view class="form-item-desc"><text>瑙勬牸</text></view>
- <view class="form-item-content"><text>{{mat.specs}}</text></view>
- </view>
- <view class="form-item">
- <view class="form-item-desc"><text>鎵瑰彿</text></view>
- <view class="form-item-content">
- <view class="form-input">
- <input type="text" v-model="mat.batch">
+
+ <view class="info-list">
+ <view class="info-row">
+ <view class="info-label">
+ <uni-icons type="scan" size="16" color="#909399"></uni-icons>
+ <text>鍟嗗搧缂栫爜</text>
+ </view>
+ <view class="info-value">
+ <text class="tag tag-primary">{{mat.matnr || '-'}}</text>
+ </view>
+ </view>
+
+ <view class="info-row">
+ <view class="info-label">
+ <uni-icons type="document" size="16" color="#909399"></uni-icons>
+ <text>鍟嗗搧宸ュ崟</text>
+ </view>
+ <view class="info-value">
+ <text class="tag tag-info">{{mat.standby1 || '-'}}</text>
+ </view>
+ </view>
+
+ <view class="info-row">
+ <view class="info-label">
+ <uni-icons type="folder" size="16" color="#909399"></uni-icons>
+ <text>鍟嗗搧缁勭粐</text>
+ </view>
+ <view class="info-value">
+ <text>{{mat.matOrigin || '-'}}</text>
+ </view>
+ </view>
+
+ <view class="info-row">
+ <view class="info-label">
+ <uni-icons type="shop" size="16" color="#909399"></uni-icons>
+ <text>鍟嗗搧鍚嶇О</text>
+ </view>
+ <view class="info-value">
+ <text class="product-name">{{mat.maktx || '-'}}</text>
+ </view>
+ </view>
+
+ <view class="info-row">
+ <view class="info-label">
+ <uni-icons type="gear" size="16" color="#909399"></uni-icons>
+ <text>瑙勬牸</text>
+ </view>
+ <view class="info-value">
+ <text>{{mat.specs || '-'}}</text>
+ </view>
+ </view>
+
+ <view class="info-row">
+ <view class="info-label">
+ <uni-icons type="flag" size="16" color="#909399"></uni-icons>
+ <text>鎵瑰彿</text>
+ </view>
+ <view class="info-value">
+ <input class="batch-input" type="text" v-model="mat.batch" placeholder="閫夊~" placeholder-class="placeholder-style">
+ </view>
+ </view>
+
+ <view class="info-row">
+ <view class="info-label">
+ <uni-icons type="calculator" size="16" color="#909399"></uni-icons>
+ <text>鏁伴噺</text>
+ </view>
+ <view class="info-value number-box-wrapper">
+ <uni-number-box :value="mat.anfme" :max="99999999" :step='1' color="#409EFF" @change="changeValue" />
</view>
</view>
</view>
- <view class="form-item">
- <view class="form-item-desc"><text>鏁伴噺</text></view>
- <view class="form-item-content">
- <uni-number-box :value="mat.anfme" :max="99999999" :step='1' color="#747474" @change="changeValue" />
- </view>
- </view>
</view>
+
<!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" type="primary" @click="back()">鎻愬彇</button>
+ <view class="bottom-bar">
+ <button class="btn-submit" size="default" type="primary" @click="back()">
+ <uni-icons type="checkmarkempty" size="18" color="#ffffff"></uni-icons>
+ <text>纭鎻愬彇</text>
+ </button>
</view>
</view>
</template>
@@ -40,14 +103,16 @@
data() {
return {
mat: {
+ standby1: null,
+ matOrigin: null,
matnr: null,
maktx: null,
specs: null,
batch: null,
anfme: 1,
},
- baseIP:'',
- basePORT:'',
+ baseIP: '',
+ basePORT: '',
}
},
onLoad(option) {
@@ -59,76 +124,209 @@
const eventChannel = this.getOpenerEventChannel();
// #endif
- // 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
+ // 鐩戝惉浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
eventChannel.on('mat', function(data) {
that.mat = data.data
that.mat.anfme = 1
+ if (data.matOrigin) {
+ that.mat.matOrigin = data.matOrigin
+ }
+ if (data.standby1) {
+ that.mat.standby1 = data.standby1
+ }
})
-
-
},
methods: {
- blur() {
-
- },
- focus() {
-
- },
changeValue(value) {
this.mat.anfme = value
},
back() {
+ // 鍙獙璇佹暟閲忥紝涓嶉獙璇佹壒鍙�
if (this.mat.anfme === 0) {
- uni.showToast({title: '璇疯緭鍏ユ暟閲�', icon: "none", position: 'top'});
+ uni.showToast({
+ title: '璇疯緭鍏ユ暟閲�',
+ icon: "none",
+ position: 'top'
+ });
return;
}
- this.getOpenerEventChannel().emit('matList', {data: this.mat});
- uni.navigateBack({
-
- })
+
+ // 鎵瑰彿涓虹┖鏃朵娇鐢ㄩ粯璁ゅ�硷紝鎴栬�呯洿鎺ヤ紶閫掔┖鍊�
+ if (!this.mat.batch) {
+ this.mat.batch = '' // 鎴栬�呭彲浠ヨ缃粯璁ゅ�硷紝濡傦細this.mat.batch = '鏃�'
+ }
+
+ this.getOpenerEventChannel().emit('matList', {
+ data: this.mat,
+ shouldClear: true
+ });
+ uni.navigateBack()
}
}
}
</script>
-<style>
- @import url('../../static/css/wms.css/wms.css');
- .form {
- min-height: 80rpx;
- background-color: #FFF;
- margin-top: 10px;
- color: #606266;
- box-shadow: 0px 0px 50px 0px rgba(0,0,0,0.2) ;
- }
- .form-item {
- min-height: 100rpx;
- line-height: 1.3;
- border-bottom: 1px solid #DCDFE6;
- margin-left: 40rpx;
- display: flex;
- align-items: center;
- word-wrap: break-word;
- }
- .form-item-desc {
- width: 30%;
- }
- .form-item-content {
- width: 60%;
- }
-
- .form-item:last-child {
- border: none;
- }
- .form-input {
- display: flex;
- align-items: center;
- width: 50vw;
- height: 50rpx;
- padding: 2px 5px;
- border-bottom: 1px solid #E4E7ED;
- border-radius: 5rpx;
- }
- .form-input input{
- color: #606266;
- }
+<style scoped>
+/* 鍏ㄥ眬鏍峰紡 */
+.container {
+ min-height: 100vh;
+ background-color: #f5f7fa;
+}
+
+.status_bar {
+ height: var(--status-bar-height);
+ width: 100%;
+ background-color: #ffffff;
+}
+
+/* 淇℃伅鍗$墖 */
+.info-card {
+ background: #ffffff;
+ margin: 24rpx;
+ border-radius: 24rpx;
+ overflow: hidden;
+ box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
+}
+
+.card-header {
+ display: flex;
+ align-items: center;
+ padding: 32rpx 32rpx 20rpx 32rpx;
+ border-bottom: 2rpx solid #f5f7fa;
+}
+
+.header-icon {
+ width: 48rpx;
+ height: 48rpx;
+ background: linear-gradient(135deg, #ecf5ff 0%, #d9ecff 100%);
+ border-radius: 16rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-right: 16rpx;
+}
+
+.header-title {
+ font-size: 32rpx;
+ font-weight: 600;
+ color: #303133;
+}
+
+/* 淇℃伅鍒楄〃 */
+.info-list {
+ padding: 16rpx 0;
+}
+
+.info-row {
+ display: flex;
+ align-items: center;
+ padding: 24rpx 32rpx;
+ border-bottom: 1px solid #f0f0f0;
+}
+
+.info-row:last-child {
+ border-bottom: none;
+}
+
+.info-label {
+ width: 160rpx;
+ display: flex;
+ align-items: center;
+ gap: 12rpx;
+ font-size: 28rpx;
+ color: #909399;
+}
+
+.info-value {
+ flex: 1;
+ font-size: 28rpx;
+ color: #303133;
+ word-break: break-all;
+}
+
+/* 鏍囩鏍峰紡 */
+.tag {
+ display: inline-block;
+ padding: 8rpx 20rpx;
+ border-radius: 8rpx;
+ font-size: 26rpx;
+ font-weight: 500;
+}
+
+.tag-primary {
+ background: #ecf5ff;
+ color: #409EFF;
+}
+
+.tag-info {
+ background: #f0f9ff;
+ color: #67C23A;
+}
+
+/* 鍟嗗搧鍚嶇О */
+.product-name {
+ font-weight: 500;
+ color: #303133;
+ line-height: 1.4;
+}
+
+/* 鎵瑰彿杈撳叆妗� */
+.batch-input {
+ background: #f5f7fa;
+ padding: 16rpx 20rpx;
+ border-radius: 12rpx;
+ font-size: 28rpx;
+ color: #303133;
+ width: 100%;
+}
+
+.batch-input:focus {
+ background: #ffffff;
+ box-shadow: 0 0 0 2rpx #409EFF;
+}
+
+.placeholder-style {
+ color: #c0c4cc;
+ font-size: 26rpx;
+}
+
+/* 鏁伴噺閫夋嫨鍣� */
+.number-box-wrapper {
+ display: flex;
+ align-items: center;
+}
+
+/* 搴曢儴鎸夐挳 */
+.bottom-bar {
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ padding: 20rpx 32rpx;
+ padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
+ background: #ffffff;
+ box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.05);
+ z-index: 20;
+}
+
+.btn-submit {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ gap: 12rpx;
+ height: 88rpx;
+ border-radius: 48rpx;
+ font-size: 30rpx;
+ font-weight: 500;
+ background: linear-gradient(135deg, #409EFF 0%, #66b1ff 100%);
+ color: #ffffff;
+ border: none;
+ box-shadow: 0 8rpx 20rpx rgba(64, 158, 255, 0.3);
+ transition: all 0.3s ease;
+}
+
+.btn-submit:active {
+ transform: scale(0.98);
+ box-shadow: 0 4rpx 12rpx rgba(64, 158, 255, 0.3);
+}
</style>
\ No newline at end of file
diff --git a/pages/order/orderComb.vue b/pages/order/orderComb.vue
index fcbc098..1d2cdba 100644
--- a/pages/order/orderComb.vue
+++ b/pages/order/orderComb.vue
@@ -1,133 +1,158 @@
<template>
- <view>
- <view class="status_bar">
- <!-- 杩欓噷鏄姸鎬佹爮 -->
- </view>
- <uni-nav-bar left-icon="left" background-color="#f8f8f8" title="璁㈠崟缁勬墭" @clickLeft="back" :fixed="true"
- :border="false" rightWidth="160rpx" leftWidth="160rpx"
- >
- <block slot="right">
- <view class="city">
- <view>
- <text class="uni-nav-bar-text">{{store}}</text>
- </view>
+ <view class="container">
+
+ <!-- 杈撳叆鍗$墖 -->
+ <view class="input-card">
+ <view class="input-group">
+ <view class="input-label">
+ <uni-icons type="scan" size="20" color="#409EFF"></uni-icons>
+ <text class="label-text">鎵樼洏鐮�</text>
</view>
- </block>
- </uni-nav-bar>
- <view class="code">
- <view class="item">
- <view class="code-decs">鎵樼洏鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
- @input="barcodeInput()">
+ <input class="input-field" type="text" placeholder="璇锋壂鎻忔垨杈撳叆鎵樼洏鐮�" v-model="barcode" :focus="barcodeFocus"
+ @input="barcodeInput()" placeholder-class="placeholder-style">
</view>
- <!-- <view class="item">
- <view class="code-decs">璁㈠崟鍙�:</view>
- <uni-combox :candidates="orderNoList" placeholder="璇烽�夋嫨璁㈠崟" v-model="orderNo" @input="getOrderDet"></uni-combox>
- </view> -->
</view>
- <view class="mat-list-title">
- <view style="width: 200rpx;"></view>
- <view style="-webkit-flex: 1;flex: 1;">鍟嗗搧鍒楄〃</view>
- <view style="width: 200rpx;"><button size="mini" type="primary" @click="getChecked">鎻愬彇</button></view>
+
+ <!-- 鍒楄〃澶撮儴 -->
+ <view class="list-header">
+ <view class="header-left">
+ <uni-icons type="list" size="20" color="#409EFF"></uni-icons>
+ <text class="header-title">鍟嗗搧鍒楄〃</text>
+ </view>
+ <view class="header-right">
+ <text class="count-badge">{{dataList.length}}</text>
+ <text class="count-text">涓晢鍝�</text>
+ <button class="extract-btn" size="mini" type="primary" @click="getChecked">
+ <uni-icons type="plus" size="14" color="#ffffff"></uni-icons>
+ <text>鎻愬彇</text>
+ </button>
+ </view>
</view>
- <scroll-view>
- <checkbox-group class="list" v-for="(item,i) in dataList" :key="i" @change="checkboxChange">
- <view class="list-left" style="margin: 0;">
- <view class="list-left-item">
- <view class="desc">No锛歿{i + 1}}</view>
+
+ <!-- 鍟嗗搧鍒楄〃 -->
+ <scroll-view class="scroll-area" scroll-y :show-scrollbar="false">
+ <view class="product-list">
+ <view class="product-card" v-for="(item,i) in dataList" :key="i">
+ <view class="card-header">
+ <view class="card-number">
+ <text class="number-icon">#</text>
+ <text class="number-text">{{i + 1}}</text>
+ </view>
+ <view class="card-actions">
+ <view class="action-btn edit" @click="revise(item,i)">
+ <uni-icons type="compose" color="#67C23A" size="20"></uni-icons>
+ </view>
+ <view class="action-btn delete" @click="remove(item,i,'warn')">
+ <uni-icons type="trash" color="#F56C6C" size="20"></uni-icons>
+ </view>
+ </view>
</view>
- <view class="list-left-item">
- <view class="desc">璁㈠崟鍙凤細{{item.orderNo}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">鏂欏彿锛歿{item.matnr}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">鎵瑰彿锛歿{item.batch}}</view>
- </view>
- <view class="list-left-item" >
- <view class="desc">鏁伴噺锛歿{item.anfme}}</view>
+
+ <view class="card-body">
+ <view class="info-row">
+ <view class="info-label">璁㈠崟鍙凤細</view>
+ <view class="info-value">
+ <text class="tag tag-info">{{item.orderNo || '-'}}</text>
+ </view>
+ </view>
+ <view class="info-row">
+ <view class="info-label">鏂欏彿锛�</view>
+ <view class="info-value">
+ <text class="tag tag-primary">{{item.matnr || '-'}}</text>
+ </view>
+ </view>
+ <view class="info-row">
+ <view class="info-label">鎵瑰彿锛�</view>
+ <view class="info-value">
+ <text class="tag tag-warning">{{item.batch || '-'}}</text>
+ </view>
+ </view>
+ <view class="info-row">
+ <view class="info-label">鏁伴噺锛�</view>
+ <view class="info-value">
+ <text class="quantity-text">{{item.anfme}}</text>
+ <text class="unit-text">涓�</text>
+ </view>
+ </view>
</view>
</view>
- <view class="list-right">
- <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons>
- <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons>
+
+ <!-- 绌虹姸鎬� -->
+ <view v-if="dataList.length === 0" class="empty-state">
+ <uni-icons type="cart" size="80" color="#e4e7ed"></uni-icons>
+ <text class="empty-text">鏆傛棤鍟嗗搧锛岃鐐瑰嚮鎻愬彇娣诲姞</text>
</view>
- </checkbox-group>
+ </view>
</scroll-view>
+
<!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">缁勬墭</button>
+ <view class="bottom-bar">
+ <button class="btn-reset" size="default" @click="reset('warn')">
+ <uni-icons type="refresh" size="18" color="#909399"></uni-icons>
+ <text>閲嶇疆</text>
+ </button>
+ <button class="btn-submit" size="default" type="primary" @click="combConfirm('warn')">
+ <uni-icons type="checkmarkempty" size="18" color="#ffffff"></uni-icons>
+ <text>纭缁勬墭</text>
+ </button>
</view>
- <!-- 寮圭獥 -->
- <!-- 淇敼鏁伴噺 -->
+
+ <!-- 寮圭獥锛氫慨鏀规暟閲� -->
<view>
<uni-popup ref="revise" type="dialog">
<view class="popup">
- <!-- 鏍囬 -->
- <view class="title">淇敼</view>
+ <view class="title">淇敼鍟嗗搧淇℃伅</view>
<view class="popup-item">
<view class="popup-item-left">鏂欏彿:</view>
<view class="popup-item-right">
- <input type="text" v-model="matnr1" disabled="true"
- style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
+ <input type="text" v-model="matnr1" disabled="true" class="disabled-input">
</view>
</view>
- <!-- <view class="popup-item">
- <view class="popup-item-left">鎵瑰彿:</view>
- <view class="popup-item-right"><input type="text" v-model="batch"></view>
- </view> -->
<view class="popup-item">
<view class="popup-item-left">閲嶉噺:</view>
- <view class="popup-item-right"><input type="text" v-model="weight"></view>
+ <view class="popup-item-right">
+ <input type="text" v-model="weight" class="popup-input" placeholder="璇疯緭鍏ラ噸閲�">
+ </view>
</view>
<view class="popup-item">
<view class="popup-item-left">鏁伴噺:</view>
- <view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :step='1' :max="maxCount" color="#747474"
- @change="changeValue" />
+ <view class="popup-item-right number-box">
+ <uni-number-box :value="count" :step='1' :max="maxCount" color="#409EFF" @change="changeValue" />
</view>
</view>
<view class="btn">
<view class="btn-left" @click="reviseClose">鍙栨秷</view>
- <view class="btn-right" @click="reviseConfirm()">淇敼</view>
+ <view class="btn-right" @click="reviseConfirm()">纭淇敼</view>
</view>
</view>
</uni-popup>
</view>
- <!-- 绉婚櫎纭 -->
+
+ <!-- 鍏朵粬寮圭獥 -->
<view>
- <!-- 鎻愮ず绐楃ず渚� -->
<uni-popup ref="alertDialog" type="dialog">
<uni-popup-dialog :type="msgType" confirmText="绉婚櫎" :title="title" :content="content"
@confirm="removeConfirm" @close="removeClose"></uni-popup-dialog>
</uni-popup>
</view>
+
<view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
<uni-popup ref="message" type="message">
<uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
</uni-popup>
</view>
- <!-- 纭缁勬墭 -->
+
<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>
</uni-popup>
</view>
- <!-- 纭閲嶇疆 -->
+
<view>
<uni-popup ref="resetConfirm" type="dialog">
<uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
@confirm="resetConfirm" @close="resetClose"></uni-popup-dialog>
- </uni-popup>
- </view>
- <view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
- <uni-popup ref="message" type="message">
- <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
</uni-popup>
</view>
</view>
@@ -257,15 +282,12 @@
this.msgType1 = type
this.$refs.message.open()
},
- // barcode input 浜嬩欢
barcodeInput() {
- // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
setTimeout(() => {
var len = this.barcode.length
this.focuss()
}, 200)
},
- // 鎵樼洏鐮佹湁璇噸缃�
barcodeFocuss() {
let that = this;
that.barcodeFocus = false;
@@ -274,14 +296,12 @@
that.barcodeFocus = true;
}, 100);
},
- // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
focuss() {
setTimeout(() => {
this.matnr = '';
this.matFocus = true;
}, 100);
},
- // 鎼滅储鐗╂枡
findMat() {
let that = this
var matnr = that.matnr.split(";")
@@ -304,13 +324,11 @@
result.data.batch = matnr[2]
uni.navigateTo({
url: "../mat/matSelected",
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
success: function(res) {
res.eventChannel.emit('mat', {
data: result.data
})
},
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
events: {
matList: function(data) {
that.checkMat(data.data)
@@ -336,10 +354,8 @@
position: 'top'
})
}
-
}
});
-
},
checkMat(mat) {
mat['orderNo'] = this.order
@@ -357,24 +373,20 @@
sameItem = true
}
}
- // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃
if (mat.batch != this.dataList[i].batch) {
- this.$forceUpdate() // 寮哄埗鍒锋柊
+ this.$forceUpdate()
if (sameItem) {
add = false
} else {
add = true
}
-
} else {
- // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞
this.dataList[i].anfme += mat.anfme
- this.$forceUpdate() // 寮哄埗鍒锋柊
+ this.$forceUpdate()
add = false
}
}
}
-
}
if (add) {
this.dataList.unshift(mat)
@@ -439,18 +451,13 @@
this.content = '鏄惁閲嶇疆!'
this.$refs.resetConfirm.open()
},
- // 纭閲嶇疆
resetConfirm() {
this.dataList = []
this.orderNo = ''
this.barcode = ''
uni.showToast({ title:"閲嶇疆瀹屾垚", icon: "success", position: 'center' })
},
- // 鍙栨秷閲嶇疆
- resetClose() {
-
- },
- // 淇敼鎵瑰彿
+ resetClose() {},
revise(item, i) {
this.matnr1 = this.dataList[i].matnr
this.count = this.dataList[i].anfme
@@ -464,7 +471,6 @@
this.type = type
this.$refs.revise.open(type)
},
- // 鍒楄〃绉婚櫎鎸夐挳
remove(item, i, type) {
this.removeNum = i
this.msgType = type
@@ -472,7 +478,6 @@
this.content = '鏄惁绉婚櫎褰撳墠鍟嗗搧!'
this.$refs.alertDialog.open(i)
},
- // 纭绉婚櫎
removeConfirm(i) {
uni.showToast({ title:"绉婚櫎鎴愬姛", icon: "success", position: 'center' })
this.dataList.splice(this.removeNum, 1)
@@ -483,7 +488,7 @@
this.dataList[this.rowNum].weight = this.weight
uni.showToast({ title:"淇敼鎴愬姛", icon: "success", position: 'center' })
this.$refs.revise.close()
- this.$forceUpdate() // 寮哄埗鍒锋柊
+ this.$forceUpdate()
},
reviseClose() {
this.$refs.revise.close()
@@ -491,7 +496,6 @@
changeValue(value) {
this.count = value
},
- // 娓呯┖
resst() {
this.dataList = []
this.barcode = ''
@@ -501,7 +505,6 @@
combClose() {
this.$refs.combConfirm.close()
},
- // 鍙栨秷绉婚櫎
removeClose() {
this.$refs.alertDialog.close()
},
@@ -509,84 +512,422 @@
}
</script>
-<style>
- @import url('../../static/css/wms.css/wms.css');
+<style scoped>
+/* 鍏ㄥ眬鏍峰紡 */
+.container {
+ min-height: 100vh;
+ background-color: #f5f7fa;
+}
- .list {
- display: flex;
- min-height: 80rpx;
- background-color: #FFF;
- margin: 20rpx 20rpx;
- border-radius: 20rpx;
- box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.2);
- }
+.status_bar {
+ height: var(--status-bar-height);
+ width: 100%;
+ background-color: #ffffff;
+}
- .list:first-child {
- margin-top: 240rpx;
- }
+/* 浠撳簱鏍囩 */
+.store-badge {
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+ padding: 8rpx 24rpx;
+ border-radius: 40rpx;
+ box-shadow: 0 4rpx 12rpx rgba(102, 126, 234, 0.3);
+}
- .list:last-child {
- margin-bottom: 120rpx;
- }
+.uni-nav-bar-text {
+ color: #ffffff;
+ font-size: 28rpx;
+ font-weight: 500;
+}
- .aside {
- width: 100rpx;
- /* background-color: #303133; */
- display: flex;
- align-items: center;
- justify-content: center;
- }
+/* 杈撳叆鍗$墖 */
+.input-card {
+ background: #ffffff;
+ margin: 24rpx;
+ border-radius: 24rpx;
+ padding: 16rpx 0;
+ box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
+}
- .code {
- width: 100%;
- position: fixed;
- min-height: 100rpx;
- background-color: #FFF;
- z-index: 10;
- }
+.input-group {
+ display: flex;
+ align-items: center;
+ padding: 24rpx 32rpx;
+}
- .item {
- display: flex;
- align-items: center;
- height: 100rpx;
- margin-left: 20rpx;
- border-bottom: 1px solid #DCDFE6;
- }
+.input-label {
+ display: flex;
+ align-items: center;
+ width: 140rpx;
+ gap: 12rpx;
+}
- .item input {
- height: 50rpx;
- line-height: 50rpx;
- /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */
- font-size: 36upx;
- font-family: PingFang SC;
- width: 55vw;
+.label-text {
+ font-size: 30rpx;
+ color: #303133;
+ font-weight: 500;
+}
- }
+.input-field {
+ flex: 1;
+ font-size: 28rpx;
+ color: #303133;
+ padding: 8rpx 0;
+}
- .code-decs {
- width: 20vw;
- font-size: 18px;
- color: #303133;
- }
+.placeholder-style {
+ color: #c0c4cc;
+ font-size: 28rpx;
+}
- .item-right {
- margin-left: auto;
- margin-right: 20rpx;
- }
+/* 鍒楄〃澶撮儴 */
+.list-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 24rpx 32rpx;
+ background: #ffffff;
+ margin: 0 0 20rpx 0;
+ box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.03);
+}
- .mat-list-title {
- display: flex;
- align-items: center;
- height: 80rpx;
- width: 100%;
- background-color: white;
- position: fixed;
- margin-top: 100rpx;
- z-index: 9;
- /* border-top: 1px solid #DCDFE6; */
- text-align: center;
- box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5);
-
+.header-left {
+ display: flex;
+ align-items: center;
+ gap: 12rpx;
+}
- }
+.header-title {
+ font-size: 32rpx;
+ font-weight: 600;
+ color: #303133;
+}
+
+.header-right {
+ display: flex;
+ align-items: center;
+ gap: 16rpx;
+}
+
+.count-badge {
+ background: linear-gradient(135deg, #409EFF 0%, #66b1ff 100%);
+ color: #ffffff;
+ font-size: 24rpx;
+ font-weight: 600;
+ padding: 4rpx 12rpx;
+ border-radius: 24rpx;
+ min-width: 40rpx;
+ text-align: center;
+}
+
+.count-text {
+ font-size: 26rpx;
+ color: #909399;
+}
+
+.extract-btn {
+ display: flex;
+ align-items: center;
+ gap: 8rpx;
+ background: linear-gradient(135deg, #409EFF 0%, #66b1ff 100%);
+ color: #ffffff;
+ border: none;
+ padding: 8rpx 24rpx;
+ border-radius: 32rpx;
+ font-size: 26rpx;
+ height: 56rpx;
+ box-shadow: 0 4rpx 12rpx rgba(64, 158, 255, 0.2);
+}
+
+/* 婊氬姩鍖哄煙 */
+.scroll-area {
+ height: calc(100vh - 420rpx);
+ padding: 0 24rpx;
+}
+
+/* 鍟嗗搧鍗$墖 */
+.product-list {
+ padding-bottom: 40rpx;
+}
+
+.product-card {
+ background: #ffffff;
+ border-radius: 24rpx;
+ margin-bottom: 20rpx;
+ padding: 24rpx;
+ box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
+ transition: all 0.3s ease;
+}
+
+.product-card:active {
+ transform: scale(0.98);
+}
+
+.card-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 24rpx;
+ padding-bottom: 20rpx;
+ border-bottom: 2rpx solid #f5f7fa;
+}
+
+.card-number {
+ display: flex;
+ align-items: baseline;
+ gap: 4rpx;
+}
+
+.number-icon {
+ font-size: 32rpx;
+ font-weight: 700;
+ color: #409EFF;
+}
+
+.number-text {
+ font-size: 28rpx;
+ font-weight: 600;
+ color: #606266;
+}
+
+.card-actions {
+ display: flex;
+ gap: 20rpx;
+}
+
+.action-btn {
+ width: 60rpx;
+ height: 60rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border-radius: 50%;
+ transition: all 0.2s ease;
+}
+
+.action-btn.edit {
+ background: #f0f9ff;
+}
+
+.action-btn.edit:active {
+ background: #e6f7ff;
+ transform: scale(0.95);
+}
+
+.action-btn.delete {
+ background: #fef0f0;
+}
+
+.action-btn.delete:active {
+ background: #fde2e2;
+ transform: scale(0.95);
+}
+
+.card-body {
+ display: flex;
+ flex-direction: column;
+ gap: 16rpx;
+}
+
+.info-row {
+ display: flex;
+ align-items: center;
+ font-size: 28rpx;
+}
+
+.info-label {
+ width: 110rpx;
+ color: #909399;
+ font-size: 26rpx;
+}
+
+.info-value {
+ flex: 1;
+ color: #606266;
+ font-size: 28rpx;
+ word-break: break-all;
+}
+
+/* 鏍囩鏍峰紡 */
+.tag {
+ display: inline-block;
+ padding: 6rpx 16rpx;
+ border-radius: 8rpx;
+ font-size: 24rpx;
+ font-weight: 500;
+}
+
+.tag-primary {
+ background: #ecf5ff;
+ color: #409EFF;
+}
+
+.tag-info {
+ background: #f0f9ff;
+ color: #67C23A;
+}
+
+.tag-warning {
+ background: #fdf6ec;
+ color: #E6A23C;
+}
+
+.quantity-text {
+ font-size: 32rpx;
+ font-weight: 600;
+ color: #F56C6C;
+}
+
+.unit-text {
+ font-size: 24rpx;
+ color: #909399;
+ margin-left: 8rpx;
+}
+
+/* 绌虹姸鎬� */
+.empty-state {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ padding: 120rpx 0;
+}
+
+.empty-text {
+ font-size: 28rpx;
+ color: #c0c4cc;
+ margin-top: 24rpx;
+}
+
+/* 搴曢儴鎸夐挳鏍� */
+.bottom-bar {
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ display: flex;
+ gap: 24rpx;
+ padding: 20rpx 32rpx;
+ padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
+ background: #ffffff;
+ box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.05);
+ z-index: 20;
+}
+
+.btn-reset,
+.btn-submit {
+ flex: 1;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ gap: 12rpx;
+ height: 88rpx;
+ border-radius: 48rpx;
+ font-size: 30rpx;
+ font-weight: 500;
+ transition: all 0.3s ease;
+}
+
+.btn-reset {
+ background: #f5f7fa;
+ color: #909399;
+ border: none;
+}
+
+.btn-reset:active {
+ background: #e8eaed;
+ transform: scale(0.98);
+}
+
+.btn-submit {
+ background: linear-gradient(135deg, #409EFF 0%, #66b1ff 100%);
+ color: #ffffff;
+ border: none;
+ box-shadow: 0 8rpx 20rpx rgba(64, 158, 255, 0.3);
+}
+
+.btn-submit:active {
+ transform: scale(0.98);
+ box-shadow: 0 4rpx 12rpx rgba(64, 158, 255, 0.3);
+}
+
+/* 寮圭獥鏍峰紡 */
+.popup {
+ width: 600rpx;
+ background: #ffffff;
+ border-radius: 32rpx;
+ padding: 40rpx;
+}
+
+.title {
+ font-size: 36rpx;
+ font-weight: 600;
+ color: #303133;
+ text-align: center;
+ margin-bottom: 40rpx;
+}
+
+.popup-item {
+ display: flex;
+ align-items: center;
+ margin-bottom: 30rpx;
+}
+
+.popup-item-left {
+ width: 100rpx;
+ font-size: 28rpx;
+ color: #606266;
+}
+
+.popup-item-right {
+ flex: 1;
+}
+
+.disabled-input {
+ background: #f5f7fa;
+ padding: 16rpx 20rpx;
+ border-radius: 12rpx;
+ color: #c0c4cc;
+ font-size: 28rpx;
+ width: 100%;
+}
+
+.popup-input {
+ border: 1px solid #dcdfe6;
+ padding: 16rpx 20rpx;
+ border-radius: 12rpx;
+ font-size: 28rpx;
+ background: #ffffff;
+ width: 100%;
+}
+
+.number-box {
+ display: flex;
+ justify-content: center;
+}
+
+.btn {
+ display: flex;
+ gap: 24rpx;
+ margin-top: 40rpx;
+}
+
+.btn-left,
+.btn-right {
+ flex: 1;
+ text-align: center;
+ padding: 20rpx 0;
+ border-radius: 48rpx;
+ font-size: 30rpx;
+ font-weight: 500;
+}
+
+.btn-left {
+ background: #f5f7fa;
+ color: #909399;
+}
+
+.btn-right {
+ background: linear-gradient(135deg, #409EFF 0%, #66b1ff 100%);
+ color: #ffffff;
+}
</style>
\ No newline at end of file
diff --git a/pages/order/orderSelect.vue b/pages/order/orderSelect.vue
index 2223b7c..084eec9 100644
--- a/pages/order/orderSelect.vue
+++ b/pages/order/orderSelect.vue
@@ -1,42 +1,123 @@
<template>
- <view>
- <view class="code">
- <view style="display: flex;align-items: center;">
- <view style="width: 70rpx;padding-left: 20rpx;">{{searchType}}</view>
- <view style="flex: 1;margin-left: -8rpx;background-color: white;padding: 4px;margin: 4px;border-radius: 4px;">
- <!-- <uni-search-bar v-model="searchValue"
- maxlength="500" ancel="cancel" @confirm="getMatList()" @clear="clear" placeholder="杈撳叆 / 鎵弿">
- </uni-search-bar> -->
+ <view class="container">
+
+ <!-- 鎼滅储绛涢�夊崱鐗� -->
+ <view class="filter-card">
+ <!-- 璁㈠崟閫夋嫨 -->
+ <view class="filter-item">
+ <view class="filter-label">
+ <uni-icons type="document" size="18" color="#409EFF"></uni-icons>
+ <text>璁㈠崟鍙�</text>
+ </view>
+ <view class="filter-input">
<uni-combox :candidates="orderNoList" placeholder="璇烽�夋嫨璁㈠崟" v-model="orderNo" @input="getOrderDet"></uni-combox>
</view>
</view>
- <view class="code-title">
- <view style="flex: 1;"></view>
- <view style="width: 100%;text-align: center;margin: 16rpx 0;flex: 1;">{{searchValue}} 鎬绘暟閲忥細- {{dataList.length}} -</view>
- <view style="flex: 1;display: flex;align-items: center;"><button size="mini" type="primary" @click="allSelect()">{{seltitle}}</button></view>
+
+ <!-- 鐗╂枡缂栧彿杩囨护 -->
+ <view class="filter-item">
+ <view class="filter-label">
+ <uni-icons type="scan" size="18" color="#409EFF"></uni-icons>
+ <text>鐗╂枡缂栧彿</text>
+ </view>
+ <view class="filter-input">
+ <input
+ type="text"
+ v-model="filterMatnr"
+ placeholder="杈撳叆鐗╂枡缂栧彿杩囨护"
+ @input="onFilterInput"
+ class="filter-input-field"
+ placeholder-class="placeholder-style"
+ />
+ </view>
+ <view v-if="filterMatnr" class="filter-clear" @click="clearFilter">
+ <uni-icons type="close" size="18" color="#909399"></uni-icons>
+ </view>
+ </view>
+
+ <!-- 缁熻鍜屽叏閫夋爮 -->
+ <view class="filter-footer">
+ <view class="stat-info">
+ <uni-icons type="list" size="16" color="#909399"></uni-icons>
+ <text>{{filterMatnr ? '杩囨护缁撴灉' : '鍏ㄩ儴鐗╂枡'}}锛歿{filteredList.length}} 鏉�</text>
+ </view>
+ <view class="select-all-btn" @click="allSelect">
+ <text class="select-all-text">{{seltitle}}</text>
+ </view>
</view>
</view>
- <view class="order__list" v-for="(orderDetl,index) in dataList" :key="index">
- <view class="order__list__left">
- <view>No锛歿{index + 1}}</view>
- <view>璁㈠崟鍙凤細{{orderDetl.orderNo}}</view>
- <view>鏂欏彿锛歿{orderDetl.matnr}}</view>
- <view>鎵瑰彿锛歿{orderDetl.batch}}</view>
- <view>鍙敤鏁伴噺锛歿{orderDetl.anfme}}</view>
+ <!-- 鐗╂枡鍒楄〃 -->
+ <scroll-view class="scroll-area" scroll-y :show-scrollbar="false">
+ <view class="material-list">
+ <view class="material-card" v-for="(orderDetl,index) in filteredList" :key="index" @click="toggleSelect(orderDetl)">
+ <view class="card-content">
+ <view class="card-info">
+ <view class="info-row">
+ <view class="info-label">搴忓彿锛�</view>
+ <view class="info-value">
+ <text class="serial-number">{{index + 1}}</text>
+ </view>
+ </view>
+ <view class="info-row">
+ <view class="info-label">璁㈠崟鍙凤細</view>
+ <view class="info-value">
+ <text class="tag tag-info">{{orderDetl.orderNo || '-'}}</text>
+ </view>
+ </view>
+ <view class="info-row">
+ <view class="info-label">鏂欏彿锛�</view>
+ <view class="info-value">
+ <text class="tag tag-primary">{{orderDetl.matnr || '-'}}</text>
+ </view>
+ </view>
+ <view class="info-row">
+ <view class="info-label">鎵瑰彿锛�</view>
+ <view class="info-value">
+ <text class="tag tag-warning">{{orderDetl.batch || '-'}}</text>
+ </view>
+ </view>
+ <view class="info-row">
+ <view class="info-label">鍙敤鏁伴噺锛�</view>
+ <view class="info-value">
+ <text class="quantity-text">{{orderDetl.anfme}}</text>
+ <text class="unit-text">涓�</text>
+ </view>
+ </view>
+ </view>
+
+ <view class="card-checkbox">
+ <view class="checkbox-wrapper" :class="{ 'checked': orderDetl.checked }">
+ <uni-icons v-if="orderDetl.checked" type="checkmarkempty" size="20" color="#ffffff"></uni-icons>
+ </view>
+ </view>
+ </view>
+ </view>
+
+ <!-- 绌虹姸鎬� -->
+ <view v-if="filteredList.length === 0 && dataList.length > 0" class="empty-state">
+ <uni-icons type="search" size="80" color="#e4e7ed"></uni-icons>
+ <text class="empty-text">娌℃湁鍖归厤 "{{filterMatnr}}" 鐨勭墿鏂�</text>
+ </view>
+ <view v-else-if="dataList.length === 0" class="empty-state">
+ <uni-icons type="document" size="80" color="#e4e7ed"></uni-icons>
+ <text class="empty-text">璇峰厛閫夋嫨璁㈠崟</text>
+ </view>
+
+ <!-- 搴曢儴鎻愮ず -->
+ <view class="bottom-tip" v-if="filteredList.length > 0">
+ <text>- 宸茬粡鍒板簳浜� -</text>
+ </view>
</view>
- <view class="order__list__right">
- <!-- <uni-icons type="folder-add" size="25" color="#fff"></uni-icons> -->
- <label @click="checkboxChange(orderDetl)">
- <checkbox :value="orderDetl.matnr" :checked="orderDetl.checked" style="transform:scale(0.7)" /><text></text>
- </label>
- </view>
- </view>
+ </scroll-view>
+
<!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" type="primary" @click="addItems()">鎻愬彇</button>
+ <view class="bottom-bar">
+ <button class="btn-submit" size="default" type="primary" @click="addItems()">
+ <uni-icons type="checkmarkempty" size="18" color="#ffffff"></uni-icons>
+ <text>鎻愬彇閫変腑鐗╂枡</text>
+ </button>
</view>
- <view style="height: 100rpx;width: 100%;text-align: center;line-height: 100rpx;">- 宸茬粡鍒板簳浜� -</view>
</view>
</template>
@@ -52,11 +133,13 @@
searchType: '璁㈠崟',
searchValue: '',
dataList: [],
+ filteredList: [],
selectedList: [],
matnr: '',
orderNo: '',
orderNoList: [],
- seltitle: '鍏ㄩ��'
+ seltitle: '鍏ㄩ��',
+ filterMatnr: ''
}
},
onShow() {
@@ -78,6 +161,40 @@
this.getOrderNoList()
},
methods: {
+ onFilterInput() {
+ this.applyFilter()
+ },
+
+ applyFilter() {
+ if (!this.filterMatnr || this.filterMatnr.trim() === '') {
+ this.filteredList = [...this.dataList]
+ } else {
+ const keyword = this.filterMatnr.trim().toLowerCase()
+ this.filteredList = this.dataList.filter(item => {
+ return item.matnr && item.matnr.toLowerCase().includes(keyword)
+ })
+ }
+ this.updateSelectAllTitle()
+ },
+
+ clearFilter() {
+ this.filterMatnr = ''
+ this.applyFilter()
+ },
+
+ updateSelectAllTitle() {
+ if (this.filteredList.length === 0) {
+ this.seltitle = '鍏ㄩ��'
+ return
+ }
+ const allChecked = this.filteredList.every(item => item.checked === true)
+ this.seltitle = allChecked ? '鍙栨秷鍏ㄩ��' : '鍏ㄩ��'
+ },
+
+ toggleSelect(item) {
+ this.checkboxChange(item)
+ },
+
addItems() {
let pickList = []
for (let k of this.dataList) {
@@ -85,62 +202,62 @@
pickList.push(k)
}
}
+ if (pickList.length === 0) {
+ uni.showToast({
+ title: '璇疯嚦灏戦�夋嫨涓�涓墿鏂�',
+ icon: "none",
+ position: 'center'
+ })
+ return
+ }
this.getOpenerEventChannel().emit('pickList', {data: pickList});
- uni.navigateBack({
-
- })
+ uni.navigateBack({})
},
+
checkboxChange(e) {
- let items = this.dataList,
- values = e.matnr;
if (e.checked) {
- this.$set(e,'checked',false)
+ this.$set(e, 'checked', false)
} else {
- this.$set(e,'checked',true)
+ this.$set(e, 'checked', true)
}
- var count = 0
- for (let k of items) {
- if (k.checked) {
- count++
- }
- }
- if (count == items.length && count > 0) {
- this.seltitle = '鍙栨秷鍏ㄩ��'
- } else {
- this.seltitle = '鍏ㄩ��'
- }
+ this.updateSelectAllTitle()
},
+
allSelect() {
+ const targetList = this.filteredList
if (this.seltitle == '鍏ㄩ��') {
- for (let k of this.dataList) {
+ for (let k of targetList) {
k.checked = true
}
this.seltitle = '鍙栨秷鍏ㄩ��'
} else {
- for (let k of this.dataList) {
+ for (let k of targetList) {
k.checked = false
}
this.seltitle = '鍏ㄩ��'
}
-
},
+
getOrderDet() {
let that = this
uni.request({
url: that.baseUrl + '/order/list/orderNo',
- data: {orderNo: that.orderNo} ,
+ data: {orderNo: that.orderNo},
method: 'GET',
success(res) {
res = res.data;
if (res.code === 200) {
that.dataList = res.data
for (var i = 0; i < that.dataList.length; i++) {
- that.$set(that.dataList[i],'checked',false)
+ that.$set(that.dataList[i], 'checked', false)
}
+ that.filterMatnr = ''
+ that.applyFilter()
}
}
})
},
+
getOrderNoList() {
let that = this
uni.request({
@@ -161,15 +278,22 @@
}
})
},
+
clear() {
this.searchValue = ''
this.getOrderNoList(this.locNo)
},
- back() { uni.navigateBack({}) },
+
+ back() {
+ uni.navigateBack({})
+ },
+
set(e) {
var ck = this.dataList[e].checked
this.dataList[e].checked = ck ? false : true
+ this.updateSelectAllTitle()
},
+
getMatList() {
let that = this
let searchParam = {
@@ -193,6 +317,7 @@
);
that.dataList = result1
that.total = result1.length
+ that.applyFilter()
} else if (res.code == 403) {
uni.showToast({ title: res.msg, icon: "error", position: 'center' })
setTimeout(() => { uni.reLaunch({ url: '../login/login' }); }, 1000);
@@ -201,52 +326,303 @@
}
}
})
-
},
+
addItem(mat) {
this.getOpenerEventChannel().emit('sMat', {data: mat});
- uni.navigateBack({
-
- })
+ uni.navigateBack({})
+ }
+ },
+
+ watch: {
+ filterMatnr() {
+ this.applyFilter()
}
}
}
</script>
-<style>
- @import url('../../static/css/wms.css/wms.css');
- .code {
- background-color: #d9d9d9;
- z-index: 99;
- position: sticky;
- top: 0rpx;
- left: 0;
- }
- .code-title {
- display: flex;
- }
- .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__left {
- flex: 1;
- padding: 20rpx;
- position: relative;
- }
- .order__list__right {
- width: 70rpx;
- border-left: 1px solid #eeeeee;
- display: flex;
- align-items: center;
- justify-content: center;
- }
-</style>
+<style scoped>
+/* 鍏ㄥ眬鏍峰紡 */
+.container {
+ min-height: 100vh;
+ background-color: #f5f7fa;
+}
+.status_bar {
+ height: var(--status-bar-height);
+ width: 100%;
+ background-color: #ffffff;
+}
+
+/* 绛涢�夊崱鐗� */
+.filter-card {
+ background: #ffffff;
+ margin: 24rpx;
+ border-radius: 24rpx;
+ overflow: hidden;
+ box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
+}
+
+.filter-item {
+ display: flex;
+ align-items: center;
+ padding: 24rpx 32rpx;
+ border-bottom: 1px solid #f0f0f0;
+}
+
+.filter-item:last-child {
+ border-bottom: none;
+}
+
+.filter-label {
+ width: 140rpx;
+ display: flex;
+ align-items: center;
+ gap: 12rpx;
+ font-size: 28rpx;
+ color: #303133;
+ font-weight: 500;
+}
+
+.filter-input {
+ flex: 1;
+}
+
+.filter-input-field {
+ background: #f5f7fa;
+ padding: 16rpx 20rpx;
+ border-radius: 12rpx;
+ font-size: 28rpx;
+ color: #303133;
+ width: 100%;
+}
+
+.filter-input-field:focus {
+ background: #ffffff;
+ box-shadow: 0 0 0 2rpx #409EFF;
+}
+
+.filter-clear {
+ padding: 0 16rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.placeholder-style {
+ color: #c0c4cc;
+ font-size: 26rpx;
+}
+
+.filter-footer {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 20rpx 32rpx;
+ background: #f8f9fa;
+ border-top: 1px solid #f0f0f0;
+}
+
+.stat-info {
+ display: flex;
+ align-items: center;
+ gap: 8rpx;
+ font-size: 26rpx;
+ color: #606266;
+}
+
+.select-all-btn {
+ padding: 8rpx 24rpx;
+ background: #ecf5ff;
+ border-radius: 32rpx;
+}
+
+.select-all-text {
+ font-size: 26rpx;
+ color: #409EFF;
+ font-weight: 500;
+}
+
+/* 婊氬姩鍖哄煙 */
+.scroll-area {
+ height: calc(100vh - 420rpx);
+ padding: 0 24rpx;
+}
+
+/* 鐗╂枡鍒楄〃 */
+.material-list {
+ padding-bottom: 40rpx;
+}
+
+.material-card {
+ background: #ffffff;
+ border-radius: 24rpx;
+ margin-bottom: 20rpx;
+ overflow: hidden;
+ box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
+ transition: all 0.3s ease;
+}
+
+.material-card:active {
+ transform: scale(0.98);
+}
+
+.card-content {
+ display: flex;
+ padding: 24rpx;
+}
+
+.card-info {
+ flex: 1;
+}
+
+.info-row {
+ display: flex;
+ align-items: center;
+ margin-bottom: 16rpx;
+ font-size: 28rpx;
+}
+
+.info-row:last-child {
+ margin-bottom: 0;
+}
+
+.info-label {
+ width: 140rpx;
+ color: #909399;
+ font-size: 26rpx;
+}
+
+.info-value {
+ flex: 1;
+ color: #606266;
+ font-size: 28rpx;
+ word-break: break-all;
+}
+
+.serial-number {
+ color: #409EFF;
+ font-weight: 600;
+}
+
+/* 鏍囩鏍峰紡 */
+.tag {
+ display: inline-block;
+ padding: 6rpx 16rpx;
+ border-radius: 8rpx;
+ font-size: 24rpx;
+ font-weight: 500;
+}
+
+.tag-primary {
+ background: #ecf5ff;
+ color: #409EFF;
+}
+
+.tag-info {
+ background: #f0f9ff;
+ color: #67C23A;
+}
+
+.tag-warning {
+ background: #fdf6ec;
+ color: #E6A23C;
+}
+
+.quantity-text {
+ font-size: 32rpx;
+ font-weight: 600;
+ color: #F56C6C;
+}
+
+.unit-text {
+ font-size: 24rpx;
+ color: #909399;
+ margin-left: 8rpx;
+}
+
+/* 澶嶉�夋鏍峰紡 */
+.card-checkbox {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding-left: 20rpx;
+ margin-left: 20rpx;
+ border-left: 2rpx solid #f0f0f0;
+}
+
+.checkbox-wrapper {
+ width: 44rpx;
+ height: 44rpx;
+ border-radius: 50%;
+ border: 2rpx solid #dcdfe6;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ transition: all 0.2s ease;
+ background: #ffffff;
+}
+
+.checkbox-wrapper.checked {
+ background: #409EFF;
+ border-color: #409EFF;
+}
+
+/* 绌虹姸鎬� */
+.empty-state {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ padding: 120rpx 0;
+}
+
+.empty-text {
+ font-size: 28rpx;
+ color: #c0c4cc;
+ margin-top: 24rpx;
+}
+
+/* 搴曢儴鎻愮ず */
+.bottom-tip {
+ text-align: center;
+ padding: 40rpx 0;
+ color: #c0c4cc;
+ font-size: 24rpx;
+}
+
+/* 搴曢儴鎸夐挳鏍� */
+.bottom-bar {
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ padding: 20rpx 32rpx;
+ padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
+ background: #ffffff;
+ box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.05);
+ z-index: 20;
+}
+
+.btn-submit {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ gap: 12rpx;
+ height: 88rpx;
+ border-radius: 48rpx;
+ font-size: 30rpx;
+ font-weight: 500;
+ background: linear-gradient(135deg, #409EFF 0%, #66b1ff 100%);
+ color: #ffffff;
+ border: none;
+ box-shadow: 0 8rpx 20rpx rgba(64, 158, 255, 0.3);
+ transition: all 0.3s ease;
+}
+
+.btn-submit:active {
+ transform: scale(0.98);
+ box-shadow: 0 4rpx 12rpx rgba(64, 158, 255, 0.3);
+}
+</style>
\ No newline at end of file
diff --git a/pages/pakin/pakin.vue b/pages/pakin/pakin.vue
index 433a665..dffc725 100644
--- a/pages/pakin/pakin.vue
+++ b/pages/pakin/pakin.vue
@@ -1,161 +1,186 @@
<template>
- <view>
+ <view class="container">
<!-- ----------------------------------------------绋嬪簭鏍囬鏍�----------------------------------------------------------- -->
- <view class="status_bar">
- <!-- 杩欓噷鏄姸鎬佹爮 -->
+<!-- <view class="status_bar">
+
</view>
- <uni-nav-bar left-icon="left" background-color="#f8f8f8" title="缁勬墭鍏ュ簱" @clickLeft="back" :fixed="true"
- :border="false" rightWidth="160rpx" leftWidth="160rpx"
- >
+ <uni-nav-bar left-icon="left" background-color="#ffffff" title="缁勬墭鍏ュ簱" @clickLeft="back" :fixed="true"
+ :border="false" rightWidth="160rpx" leftWidth="160rpx" :shadow="true">
<block slot="right">
<view class="city">
- <view>
+ <view class="store-badge">
<text class="uni-nav-bar-text">{{store}}</text>
</view>
</view>
</block>
- </uni-nav-bar>
- <!-- ----------------------------------------------绋嬪簭鏍囬鏍�----------------------------------------------------------- -->
-
- <!-- ---------------------------------------------- 杈撳叆妗� ----------------------------------------------------------- -->
- <view class="code">
- <view class="item">
- <view class="code-decs">鎵樼洏鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
- @input="barcodeInput()">
+ </uni-nav-bar> -->
+
+ <!-- ---------------------------------------------- 杈撳叆鍗$墖 ----------------------------------------------------------- -->
+ <view class="input-card">
+ <view class="input-group">
+ <view class="input-label">
+ <uni-icons type="scan" size="20" color="#409EFF"></uni-icons>
+ <text class="label-text">鎵樼洏鐮�</text>
+ </view>
+ <input class="input-field" type="text" placeholder="璇锋壂鎻忔垨杈撳叆鎵樼洏鐮�" v-model="barcode" :focus="barcodeFocus"
+ @input="barcodeInput()" placeholder-class="placeholder-style">
</view>
- <view class="item">
- <view class="code-decs">鐗╂枡鐮�:</view>
- <input type="text" style="width: 350rpx;" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()">
- <uni-icons type="close" color="#c1c1c1" @click="clearMatnr"></uni-icons>
- <view class="item-right">
- <button></button>
- <text style="text-align: right;color: #409EFF;" @click="selectMat()">鎻愬彇+</text>
- <uni-icons type="right" color="#c1c1c1"></uni-icons>
+
+ <view class="input-group">
+ <view class="input-label">
+ <uni-icons type="shop" size="20" color="#409EFF"></uni-icons>
+ <text class="label-text">鐗╂枡淇℃伅</text>
+ </view>
+ <input class="input-field" type="text" placeholder="璇锋壂鎻忔垨杈撳叆鐗╂枡鐮�" v-model="matInfo" :focus="matFocus" @input="findMat()"
+ placeholder-class="placeholder-style">
+ <view class="input-actions">
+ <uni-icons type="close" color="#c1c1c1" size="20" @click="clearMatnr"></uni-icons>
+ <view class="extract-btn" @click="selectMat()">
+ <text class="extract-text">鎻愬彇</text>
+ <uni-icons type="right" color="#409EFF" size="16"></uni-icons>
+ </view>
</view>
</view>
-<!-- <view class="item">
- <view class="code-decs" style="width: 25vw;">鏄惁婊℃澘:</view>
- <radio-group @change="isFullPlt">
- <label>
- <radio :checked="ck1" /><text>鏄�</text>
- </label>
- <label>
- <radio :checked="ck2" style="margin-left: 50rpx;"/><text>鍚�</text>
- </label>
- </radio-group>
- </view> -->
</view>
- <!-- ---------------------------------------------- 杈撳叆妗� ----------------------------------------------------------- -->
- <view class="mat-list-title">
- 鍟嗗搧鍒楄〃
+
+ <!-- ---------------------------------------------- 鍟嗗搧鍒楄〃鏍囬 ----------------------------------------------------------- -->
+ <view class="list-header">
+ <view class="header-left">
+ <uni-icons type="list" size="20" color="#409EFF"></uni-icons>
+ <text class="header-title">鍟嗗搧鍒楄〃</text>
+ </view>
+ <view class="header-right">
+ <text class="count-badge">{{dataList.length}}</text>
+ <text class="count-text">涓晢鍝�</text>
+ </view>
</view>
- <scroll-view>
- <view class="list" v-for="(item,i) in dataList" :key="i">
- <view class="list-left">
- <view class="list-left-item">
- <view class="desc">No锛�</view>
- <view class="left-item">{{i + 1}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">缂栫爜锛�</view>
- <view class="left-item">
- <uni-tag :text="item.matnr" type="primary"></uni-tag>
+
+ <!-- ---------------------------------------------- 鍟嗗搧鍒楄〃 ----------------------------------------------------------- -->
+ <scroll-view class="scroll-area" scroll-y :show-scrollbar="false">
+ <view class="product-list">
+ <view class="product-card" v-for="(item,i) in dataList" :key="i">
+ <view class="card-header">
+ <view class="card-number">
+ <text class="number-icon">#</text>
+ <text class="number-text">{{i + 1}}</text>
+ </view>
+ <view class="card-actions">
+ <view class="action-btn edit" @click="revise(item,i)">
+ <uni-icons type="compose" color="#67C23A" size="20"></uni-icons>
+ </view>
+ <view class="action-btn delete" @click="remove(item,i,'warn')">
+ <uni-icons type="trash" color="#F56C6C" size="20"></uni-icons>
+ </view>
</view>
</view>
- <view class="list-left-item">
- <view class="desc">鍝佸悕锛�</view>
- <view class="left-item">{{item.maktx}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">瑙勬牸锛�</view>
- <view class="left-item">{{item.specs}}</view>
- </view>
- <view class="list-left-item">
- <view class="desc">鎵瑰彿锛�</view>
- <view class="left-item">
- <uni-tag :text="item.batch" type="warning"></uni-tag>
+
+ <view class="card-body">
+ <view class="info-row">
+ <view class="info-label">鐗╂枡缂栫爜锛�</view>
+ <view class="info-value">
+ <text class="tag tag-primary">{{item.matnr}}</text>
+ </view>
</view>
- </view>
- <!-- <view class="list-left-item">
- <view class="desc">閲嶉噺锛�</view>
- <view class="left-item">
- <uni-tag :text="item.weight" type="warning"></uni-tag>
+ <view class="info-row">
+ <view class="info-label">宸ュ崟鍙凤細</view>
+ <view class="info-value">
+ <text class="tag tag-info">{{item.standby1 || '-'}}</text>
+ </view>
</view>
- </view> -->
- <view class="list-left-item">
- <view class="desc">鏁伴噺锛�</view>
- <view class="left-item">{{item.anfme}}</view>
+ <view class="info-row">
+ <view class="info-label">鍝佸悕锛�</view>
+ <view class="info-value">{{item.maktx || '-'}}</view>
+ </view>
+ <view class="info-row">
+ <view class="info-label">瑙勬牸锛�</view>
+ <view class="info-value">{{item.specs || '-'}}</view>
+ </view>
+ <view class="info-row">
+ <view class="info-label">鎵瑰彿锛�</view>
+ <view class="info-value">
+ <text class="tag tag-warning">{{item.batch || '-'}}</text>
+ </view>
+ </view>
+ <view class="info-row">
+ <view class="info-label">鏁伴噺锛�</view>
+ <view class="info-value">
+ <text class="quantity-text">{{item.anfme}}</text>
+ <text class="unit-text">涓�</text>
+ </view>
+ </view>
</view>
</view>
- <view class="list-right">
- <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons>
- <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons>
+
+ <!-- 绌虹姸鎬� -->
+ <view v-if="dataList.length === 0" class="empty-state">
+ <uni-icons type="cart" size="80" color="#e4e7ed"></uni-icons>
+ <text class="empty-text">鏆傛棤鍟嗗搧锛岃鎵弿娣诲姞</text>
</view>
</view>
</scroll-view>
- <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
- <view class="buttom">
- <button size="mini" @click="reset('warn')">閲嶇疆</button>
- <button size="mini" type="primary" @click="combConfirm('warn')">缁勬墭</button>
+
+ <!-- ---------------------------------------------- 搴曢儴鎿嶄綔鎸夐挳 ----------------------------------------------------------- -->
+ <view class="bottom-bar">
+ <button class="btn-reset" size="default" @click="reset('warn')">
+ <uni-icons type="refresh" size="18" color="#909399"></uni-icons>
+ <text>閲嶇疆</text>
+ </button>
+ <button class="btn-submit" size="default" type="primary" @click="combConfirm('warn')">
+ <uni-icons type="checkmarkempty" size="18" color="#ffffff"></uni-icons>
+ <text>纭缁勬墭</text>
+ </button>
</view>
- <!-- 寮圭獥 -->
+
+ <!-- ------------------------------ 寮圭獥淇濇寔涓嶅彉 ------------------------------ -->
<!-- 淇敼鏁伴噺 -->
<view>
<uni-popup ref="revise" type="dialog">
<view class="popup">
- <!-- 鏍囬 -->
- <view class="title">淇敼</view>
+ <view class="title">淇敼鍟嗗搧淇℃伅</view>
<view class="popup-item">
- <view class="popup-item-left">缂栫爜:</view>
+ <view class="popup-item-left">鐗╂枡缂栫爜:</view>
<view class="popup-item-right">
- <input type="text" v-model="matnr" disabled="true"
- style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;">
+ <input type="text" v-model="matnr" disabled="true" class="disabled-input">
</view>
</view>
<view class="popup-item">
<view class="popup-item-left">鎵瑰彿:</view>
- <view class="popup-item-right"><input type="text" v-model="batch"></view>
+ <view class="popup-item-right">
+ <input type="text" v-model="batch" class="popup-input" placeholder="璇疯緭鍏ユ壒鍙�">
+ </view>
</view>
- <!-- <view class="popup-item">
- <view class="popup-item-left">閲嶉噺:</view>
- <view class="popup-item-right"><input type="text" v-model="weight"></view>
- </view> -->
<view class="popup-item">
<view class="popup-item-left">鏁伴噺:</view>
- <view class="popup-item-right" style="border: none;justify-content: center;">
- <uni-number-box :value="count" :step='1' :max="9999999" color="#747474" @change="changeValue" />
+ <view class="popup-item-right number-box">
+ <uni-number-box :value="count" :step='1' :max="9999999" color="#409EFF" @change="changeValue" />
</view>
</view>
<view class="btn">
<view class="btn-left" @click="reviseClose">鍙栨秷</view>
- <view class="btn-right" @click="reviseConfirm()">淇敼</view>
+ <view class="btn-right" @click="reviseConfirm()">纭淇敼</view>
</view>
</view>
</uni-popup>
</view>
- <!-- 绉婚櫎纭 -->
+
+ <!-- 鍏朵粬寮圭獥淇濇寔涓嶅彉 -->
<view>
- <!-- 鎻愮ず绐楃ず渚� -->
<uni-popup ref="alertDialog" type="dialog">
<uni-popup-dialog :type="msgType" confirmText="绉婚櫎" :title="title" :content="content"
@confirm="removeConfirm()" @close="removeClose"></uni-popup-dialog>
</uni-popup>
</view>
<view>
- <!-- 鎻愮ず淇℃伅寮圭獥 -->
<uni-popup ref="message" type="message">
<uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
</uni-popup>
</view>
- <!-- 纭缁勬墭 -->
<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>
</uni-popup>
</view>
- <!-- 纭閲嶇疆 -->
<view>
<uni-popup ref="resetConfirm" type="dialog">
<uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
@@ -169,6 +194,9 @@
export default {
data() {
return {
+ matOrigin: '',
+ matOrder: '',
+ matInfo: '',
baseUrl: '',
token: '',
storeId: 0,
@@ -267,6 +295,22 @@
// 鎼滅储鐗╂枡
findMat() {
let that = this
+
+ // 鏂规硶1锛氬垎鍓叉垚鏁扮粍
+ let arr = that.matInfo.split('|')
+ // 鏂规硶2锛氶亶鍘嗘瘡涓�娈�
+ arr.forEach((item, index) => {
+ switch(index){
+ case 0: that.matOrigin = item
+ break;
+ case 1: that.matOrder = item
+ break;
+ case 2: that.matnr = item
+ break;
+ default:
+ break;
+ }
+ })
uni.request({
url: that.baseUrl + '/mat/auth',
data: {
@@ -279,20 +323,25 @@
result = result.data
if (result.code === 200 && result.data) {
that.matData = result.data
+
that.matnr = ''
that.matData['batch'] = ''
uni.navigateTo({
url: "../mat/matSelected",
// 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
- success: function(res) {
+ success: function(res) {
res.eventChannel.emit('mat', {
- data: result.data
+ data: result.data,
+ matOrigin: that.matOrigin,
+ standby1: that.matOrder
})
- },
+ },
// 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
events: {
matList: function(data) {
- that.checkMat(data.data)
+ that.checkMat(data.data)
+ // 鉁� 鍦ㄨ繖閲屾竻绌虹墿鏂欎俊鎭緭鍏ユ
+ that.matInfo = ''
that.focuss()
},
},
@@ -422,6 +471,7 @@
comb() {
uni.vibrateShort();
let that = this;
+ console.info(that.dataList)
if (that.barcode === '') {
uni.showToast({ title: '璇锋壂鎻忔墭鐩樻潯鐮�', icon: "error", position: 'top' });
return;
@@ -498,60 +548,432 @@
}
}
</script>
+<style lang="scss">
+page {
+ background-color: #f5f7fa;
+}
-<style>
- @import url('../../static/css/wms.css/wms.css');
+.container {
+ min-height: 100vh;
+ background-color: #f5f7fa;
+}
- .list:first-child {
- margin-top: 320rpx;
+.status_bar {
+ height: var(--status-bar-height);
+ width: 100%;
+ background-color: #ffffff;
+}
+
+// 浠撳簱鏍囩
+.store-badge {
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+ padding: 8rpx 24rpx;
+ border-radius: 40rpx;
+ box-shadow: 0 4rpx 12rpx rgba(102, 126, 234, 0.3);
+
+ .uni-nav-bar-text {
+ color: #ffffff;
+ font-size: 28rpx;
+ font-weight: 500;
}
- .code {
- width: 100%;
- position: fixed;
- min-height: 210rpx;
- background-color: #FFF;
- z-index: 10;
- }
+}
- .item {
+// 杈撳叆鍗$墖
+.input-card {
+ background: #ffffff;
+ margin: 20rpx 24rpx;
+ border-radius: 24rpx;
+ padding: 16rpx 0;
+ box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
+}
+
+.input-group {
+ display: flex;
+ align-items: center;
+ padding: 24rpx 32rpx;
+ border-bottom: 1px solid #f0f0f0;
+
+ &:last-child {
+ border-bottom: none;
+ }
+
+ .input-label {
display: flex;
align-items: center;
- height: 70rpx;
- margin-left: 20rpx;
- border-bottom: 1px solid #DCDFE6;
+ width: 160rpx;
+ gap: 12rpx;
+
+ .label-text {
+ font-size: 30rpx;
+ color: #303133;
+ font-weight: 500;
+ }
}
-
- .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;
+
+ .input-field {
+ flex: 1;
+ font-size: 28rpx;
color: #303133;
+ padding: 8rpx 0;
}
-
- .item-right {
- margin-left: auto;
- margin-right: 20rpx;
+
+ .placeholder-style {
+ color: #c0c4cc;
+ font-size: 28rpx;
}
+
+ .input-actions {
+ display: flex;
+ align-items: center;
+ gap: 16rpx;
+ margin-left: 16rpx;
+
+ .extract-btn {
+ display: flex;
+ align-items: center;
+ gap: 4rpx;
+ background: #ecf5ff;
+ padding: 8rpx 20rpx;
+ border-radius: 32rpx;
+
+ .extract-text {
+ color: #409EFF;
+ font-size: 26rpx;
+ font-weight: 500;
+ }
+ }
+ }
+}
- .mat-list-title {
- height: 80rpx;
- line-height: 80rpx;
- width: 100%;
- background-color: white;
- position: fixed;
- margin-top: 200rpx;
- z-index: 9;
- /* border-top: 1px solid #DCDFE6; */
+// 鍒楄〃澶撮儴
+.list-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 24rpx 32rpx;
+ background: #ffffff;
+ margin-top: 20rpx;
+ border-top-left-radius: 24rpx;
+ border-top-right-radius: 24rpx;
+
+ .header-left {
+ display: flex;
+ align-items: center;
+ gap: 12rpx;
+
+ .header-title {
+ font-size: 32rpx;
+ font-weight: 600;
+ color: #303133;
+ }
+ }
+
+ .header-right {
+ display: flex;
+ align-items: center;
+ gap: 8rpx;
+
+ .count-badge {
+ background: linear-gradient(135deg, #409EFF 0%, #66b1ff 100%);
+ color: #ffffff;
+ font-size: 24rpx;
+ font-weight: 600;
+ padding: 4rpx 12rpx;
+ border-radius: 24rpx;
+ min-width: 40rpx;
+ text-align: center;
+ }
+
+ .count-text {
+ font-size: 26rpx;
+ color: #909399;
+ }
+ }
+}
+
+// 婊氬姩鍖哄煙
+.scroll-area {
+ height: calc(100vh - 520rpx);
+ padding: 0 24rpx;
+}
+
+// 鍟嗗搧鍗$墖
+.product-card {
+ background: #ffffff;
+ border-radius: 24rpx;
+ margin-bottom: 20rpx;
+ padding: 24rpx;
+ box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
+ transition: all 0.3s ease;
+
+ &:active {
+ transform: scale(0.98);
+ }
+
+ .card-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 24rpx;
+ padding-bottom: 20rpx;
+ border-bottom: 2rpx solid #f5f7fa;
+
+ .card-number {
+ display: flex;
+ align-items: baseline;
+ gap: 4rpx;
+
+ .number-icon {
+ font-size: 32rpx;
+ font-weight: 700;
+ color: #409EFF;
+ }
+
+ .number-text {
+ font-size: 28rpx;
+ font-weight: 600;
+ color: #606266;
+ }
+ }
+
+ .card-actions {
+ display: flex;
+ gap: 20rpx;
+
+ .action-btn {
+ width: 60rpx;
+ height: 60rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border-radius: 50%;
+ transition: all 0.2s ease;
+
+ &.edit {
+ background: #f0f9ff;
+
+ &:active {
+ background: #e6f7ff;
+ transform: scale(0.95);
+ }
+ }
+
+ &.delete {
+ background: #fef0f0;
+
+ &:active {
+ background: #fde2e2;
+ transform: scale(0.95);
+ }
+ }
+ }
+ }
+ }
+
+ .card-body {
+ display: flex;
+ flex-direction: column;
+ gap: 16rpx;
+
+ .info-row {
+ display: flex;
+ align-items: center;
+ font-size: 28rpx;
+
+ .info-label {
+ width: 160rpx;
+ color: #909399;
+ font-size: 26rpx;
+ }
+
+ .info-value {
+ flex: 1;
+ color: #606266;
+ font-size: 28rpx;
+ word-break: break-all;
+
+ .tag {
+ display: inline-block;
+ padding: 6rpx 16rpx;
+ border-radius: 8rpx;
+ font-size: 24rpx;
+ font-weight: 500;
+
+ &-primary {
+ background: #ecf5ff;
+ color: #409EFF;
+ }
+
+ &-info {
+ background: #f0f9ff;
+ color: #67C23A;
+ }
+
+ &-warning {
+ background: #fdf6ec;
+ color: #E6A23C;
+ }
+ }
+
+ .quantity-text {
+ font-size: 32rpx;
+ font-weight: 600;
+ color: #F56C6C;
+ }
+
+ .unit-text {
+ font-size: 24rpx;
+ color: #909399;
+ margin-left: 8rpx;
+ }
+ }
+ }
+ }
+}
+
+// 绌虹姸鎬�
+.empty-state {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ padding: 120rpx 0;
+
+ .empty-text {
+ font-size: 28rpx;
+ color: #c0c4cc;
+ margin-top: 24rpx;
+ }
+}
+
+// 搴曢儴鎸夐挳
+.bottom-bar {
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ display: flex;
+ gap: 24rpx;
+ padding: 20rpx 32rpx;
+ padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
+ background: #ffffff;
+ box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.05);
+ z-index: 20;
+
+ .btn-reset,
+ .btn-submit {
+ flex: 1;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ gap: 12rpx;
+ height: 88rpx;
+ border-radius: 48rpx;
+ font-size: 30rpx;
+ font-weight: 500;
+ transition: all 0.3s ease;
+ }
+
+ .btn-reset {
+ background: #f5f7fa;
+ color: #909399;
+ border: none;
+
+ &:active {
+ background: #e8eaed;
+ transform: scale(0.98);
+ }
+ }
+
+ .btn-submit {
+ background: linear-gradient(135deg, #409EFF 0%, #66b1ff 100%);
+ color: #ffffff;
+ border: none;
+ box-shadow: 0 8rpx 20rpx rgba(64, 158, 255, 0.3);
+
+ &:active {
+ transform: scale(0.98);
+ box-shadow: 0 4rpx 12rpx rgba(64, 158, 255, 0.3);
+ }
+ }
+}
+
+// 寮圭獥鏍峰紡
+.popup {
+ width: 600rpx;
+ background: #ffffff;
+ border-radius: 32rpx;
+ padding: 40rpx;
+
+ .title {
+ font-size: 36rpx;
+ font-weight: 600;
+ color: #303133;
text-align: center;
- box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
+ margin-bottom: 40rpx;
}
-</style>
+
+ .popup-item {
+ display: flex;
+ align-items: center;
+ margin-bottom: 30rpx;
+
+ .popup-item-left {
+ width: 140rpx;
+ font-size: 28rpx;
+ color: #606266;
+ }
+
+ .popup-item-right {
+ flex: 1;
+
+ .disabled-input {
+ background: #f5f7fa;
+ padding: 16rpx 20rpx;
+ border-radius: 12rpx;
+ color: #c0c4cc;
+ font-size: 28rpx;
+ }
+
+ .popup-input {
+ border: 1px solid #dcdfe6;
+ padding: 16rpx 20rpx;
+ border-radius: 12rpx;
+ font-size: 28rpx;
+ background: #ffffff;
+ }
+
+ &.number-box {
+ display: flex;
+ justify-content: center;
+ }
+ }
+ }
+
+ .btn {
+ display: flex;
+ gap: 24rpx;
+ margin-top: 40rpx;
+
+ .btn-left,
+ .btn-right {
+ flex: 1;
+ text-align: center;
+ padding: 20rpx 0;
+ border-radius: 48rpx;
+ font-size: 30rpx;
+ font-weight: 500;
+ }
+
+ .btn-left {
+ background: #f5f7fa;
+ color: #909399;
+ }
+
+ .btn-right {
+ background: linear-gradient(135deg, #409EFF 0%, #66b1ff 100%);
+ color: #ffffff;
+ }
+ }
+}
+</style>
\ No newline at end of file
diff --git a/static/css/wms.css/wms.css b/static/css/wms.css/wms.css
index a461648..6d2b009 100644
--- a/static/css/wms.css/wms.css
+++ b/static/css/wms.css/wms.css
@@ -2,6 +2,9 @@
font-size: 16px;
font-weight: 600;
}
+.status_bar{
+ padding-top: 5vh;
+}
.uni-nav-bar-text {
font-size: 12px;
}
--
Gitblit v1.9.1