From 7da36ae80fbe9d9c125d0ae8b7328f80189339a5 Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期五, 21 十一月 2025 19:51:39 +0800
Subject: [PATCH] #盘点
---
uni_modules/uni-tooltip/package.json | 86 +++++++
pages/home/home.vue | 14
uni_modules/uni-tooltip/components/uni-tooltip/uni-tooltip.vue | 108 +++++++++
uni_modules/uni-tooltip/readme.md | 8
pages/check/check.vue | 393 +++++++++++++++++++++++++++++++++++
uni_modules/uni-tooltip/changelog.md | 16 +
pages.json | 9
static/css/wms.css/wms.css | 2
8 files changed, 628 insertions(+), 8 deletions(-)
diff --git a/pages.json b/pages.json
index 95a0717..9d150ed 100644
--- a/pages.json
+++ b/pages.json
@@ -300,6 +300,15 @@
"enablePullDownRefresh": false
}
+ },
+ {
+ "path" : "pages/check/check",
+ "style" :
+ {
+ "navigationBarTitleText": "鐩樼偣",
+ "enablePullDownRefresh": false
+ }
+
}
],
"globalStyle": {
diff --git a/pages/check/check.vue b/pages/check/check.vue
new file mode 100644
index 0000000..2cd67a2
--- /dev/null
+++ b/pages/check/check.vue
@@ -0,0 +1,393 @@
+<template>
+ <view>
+ <view class="code">
+ <view class="item">
+ <view class="code-decs">鎵樼洏鐮�:</view>
+ <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
+ @input="search()">
+ </view>
+ </view>
+ <view class="mat-list-title">
+ 鍟嗗搧鍒楄〃
+ </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>
+ </view>
+ </view>
+ <view class="list-left-item">
+ <view class="desc">鍝佸悕锛�</view>
+ <uni-tooltip class=" left-item" :content="item.maktx" placement="bottom">
+ <view class="left-item tip" style="">{{item.maktx}}</view>
+ </uni-tooltip>
+
+ </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>
+ </view>
+ <view class="list-left-item">
+ <view class="desc">鏁伴噺锛�</view>
+ <view class="left-item">{{item.anfme}}</view>
+ </view>
+ <view class="list-left-item">
+ <view class="desc">鐩樼偣鏁伴噺:</view>
+ <view class="left-item" style="border: none;justify-content: center;">
+ <uni-number-box v-model="item.workQty" :max="9999999" color="#747474"/>
+ </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> -->
+ </view>
+ </scroll-view>
+ <!-- 搴曢儴鎿嶄綔鎸夐挳 -->
+ <view class="buttom">
+ <button size="mini" @click="reset('warn')">閲嶇疆</button>
+ <button size="mini" type="primary" @click="combConfirm('warn')" :disabled="pushDisabled">纭畾</button>
+ </view>
+ <!-- 寮圭獥 -->
+ <!-- 淇敼鏁伴噺 -->
+ <view>
+ <uni-popup ref="revise" type="dialog">
+ <view class="popup">
+ <!-- 鏍囬 -->
+ <view class="title">淇敼</view>
+ <view class="popup-item">
+ <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;">
+ </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" style="border: none;justify-content: center;">
+ <uni-number-box :value="count" :max="9999999" color="#747474"/>
+ </view>
+ </view>
+ <view class="btn">
+ <view class="btn-left" @click="reviseClose">鍙栨秷</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="push" @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>
+</template>
+
+<script>
+ export default {
+ data() {
+ return {
+ baseUrl: '',
+ token: '',
+ barcode: '',
+ dataList: [],
+ count: 0,
+ rowNum: '',
+ matnr: '',
+ batch: '',
+ msgType1: 'success',
+ msgType: 'success',
+ messageText: '',
+ title: '',
+ content: '',
+ barcodeFocus: true,
+ matFocus: false,
+ matData: '',
+ pushDisabled:false
+
+ }
+ },
+ onLoad() {
+
+ },
+ onShow() {
+ this.baseUrl = uni.getStorageSync('baseUrl');
+ this.token = uni.getStorageSync('token');
+ },
+ methods: {
+ messageToggle(type) {
+ this.msgType1 = type
+ this.$refs.message.open()
+ },
+ // 鏍规嵁鎵樼洏鐮佹悳绱�
+ search() {
+ let that = this
+ uni.request({
+ url: that.baseUrl + '/checkOrder/getTaskList/auth',
+ header: {
+ 'token':uni.getStorageSync('token')
+ },
+ data:JSON.stringify({
+ barcode: that.barcode,
+ }),
+ method:'POST',
+ success(res) {
+ res = res.data
+ if(res.code === 200){
+ that.dataList = res.data
+ } else if (res.code == 403) {
+ that.messageText = res.msg
+ that.messageToggle('error')
+ setTimeout(() => {
+ uni.reLaunch({
+ url: '../login/login'
+ });
+ }, 1000);
+ } else {
+ that.messageText = res.msg
+ that.messageToggle('error')
+ }
+ }
+
+ })
+ },
+
+ // 鎵樼洏鐮佹湁璇噸缃�
+ barcodeFocuss() {
+ let that = this;
+ that.barcodeFocus = false;
+ setTimeout(() => {
+ that.barcode = '';
+ that.barcodeFocus = true;
+ }, 100);
+ },
+ // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆
+ focuss() {
+ // #ifdef APP
+ let that = this;
+ that.focus = false;
+ setTimeout(() => {
+ that.matnr = '';
+ that.focus = true;
+ }, 100);
+ // #endif
+ },
+ // 淇敼鎵瑰彿
+ revise(item, i) {
+ this.matnr = this.dataList[i].matnr
+ this.count = this.dataList[i].anfme
+ this.batch = this.dataList[i].batch
+ this.rowNum = i
+ this.eject()
+ },
+ eject(type) {
+ this.type = type
+ this.$refs.revise.open(type)
+ },
+ // 鍒楄〃绉婚櫎鎸夐挳
+ remove(item, i, type) {
+ this.msgType = type
+ this.title = '璀﹀憡'
+ this.content = '鏄惁绉婚櫎褰撳墠鍟嗗搧!'
+ this.$refs.alertDialog.open(i)
+ },
+ // 纭绉婚櫎
+ removeConfirm(i) {
+ this.messageText = "绉婚櫎鎴愬姛"
+ this.messageToggle('success')
+ this.dataList.splice(i, 1)
+ },
+ // 鍙栨秷绉婚櫎
+ removeClose() {
+ this.$refs.alertDialog.close()
+ },
+ reviseConfirm() {
+ this.dataList[this.rowNum].anfme = this.count
+ this.dataList[this.rowNum].batch = this.batch
+ this.messageText = "淇敼鎴愬姛"
+ this.messageToggle('success')
+ this.$refs.revise.close()
+ },
+ reviseClose() {
+ this.$refs.revise.close()
+ },
+ changeValue(value,i) {
+ console.log(value)
+ this.dataList[i].workQty = value
+ },
+ combConfirm(type) {
+ this.msgType = type
+ this.title = '璀﹀憡'
+ this.content = '鏄惁纭鐩樼偣淇℃伅!'
+ this.$refs.combConfirm.open()
+ },
+ combClose() {
+ this.$refs.combConfirm.close()
+ },
+ reset(type) {
+ this.msgType = type
+ this.title = '璀﹀憡'
+ this.content = '鏄惁閲嶇疆!'
+ this.$refs.resetConfirm.open()
+ },
+ // 纭閲嶇疆
+ resetConfirm() {
+ this.dataList = []
+ this.barcode = ''
+ this.messageText = "閲嶇疆瀹屾垚"
+ this.messageToggle('success')
+ },
+ // 鍙栨秷閲嶇疆
+ resetClose() {
+
+ },
+ // 娓呯┖
+ resst() {
+ this.dataList = []
+ this.barcode = ''
+ this.barcodeFocuss()
+ },
+ push() {
+ let that = this
+ that.pushDisabled = true
+ uni.request({
+ url: that.baseUrl + '/checkOrder/pdaComplete/auth',
+ header: {
+ 'token':uni.getStorageSync('token')
+ },
+ data:JSON.stringify({
+ barcode: that.barcode,
+ checkOrderDetlList: that.dataList
+ }),
+ method: 'POST',
+ success(result){
+ let res = result.data
+ if (res.code === 200) {
+ that.messageText = "鎻愪氦鎴愬姛"
+ that.messageToggle('success')
+ that.dataList = []
+ that.barcode = ''
+ that.pushDisabled = false
+ } else if (res.code == 403) {
+ that.messageText = res.msg
+ that.messageToggle('error')
+ setTimeout(() => {
+ uni.reLaunch({
+ url: '../login/login'
+ });
+ }, 1000);
+ } else {
+ that.messageText = res.msg
+ that.messageToggle('error')
+ that.pushDisabled = false
+ }
+ }
+ })
+
+ },
+ }
+ }
+</script>
+
+<style>
+ @import url('../../static/css/wms.css/wms.css');
+
+ .list:first-child {
+ margin-top: 210rpx;
+ }
+ .code {
+ width: 100%;
+ position: fixed;
+ min-height: 100rpx;
+ 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;
+ }
+
+ .item-right {
+ margin-left: auto;
+ margin-right: 20rpx;
+ }
+
+ .mat-list-title {
+ height: 80rpx;
+ line-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);
+ }
+ .tip {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+</style>
diff --git a/pages/home/home.vue b/pages/home/home.vue
index 58337bc..afaaf79 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -81,13 +81,13 @@
cuIcon: 'pulldown',
url: '/AGV/AGVOutCall'
},
- // {
- // title: '鍛煎彨Agv',
- // name: 'AGVStart',
- // color: 'green',
- // cuIcon: 'order',
- // url: '/AGV/AGVStart'
- // },
+ {
+ title: '鐩樼偣',
+ name: 'Check',
+ color: 'green',
+ cuIcon: 'order',
+ url: '/check/check'
+ },
// {
// title: 'Agv鍌ㄤ綅瑙g粦',
// name: 'AGVUnbind',
diff --git a/static/css/wms.css/wms.css b/static/css/wms.css/wms.css
index 10a72c7..12d0514 100644
--- a/static/css/wms.css/wms.css
+++ b/static/css/wms.css/wms.css
@@ -27,7 +27,7 @@
min-height: 40rpx;
display: flex;
align-items: center;
- width: 25%;
+ width: 28%;
}
.left-item {
display: flex;
diff --git a/uni_modules/uni-tooltip/changelog.md b/uni_modules/uni-tooltip/changelog.md
new file mode 100644
index 0000000..285b676
--- /dev/null
+++ b/uni_modules/uni-tooltip/changelog.md
@@ -0,0 +1,16 @@
+## 0.2.4锛�2024-04-23锛�
+- 淇 寮瑰嚭浣嶇疆榛樿鍊间笉涓�鑷村鑷寸殑閿欎綅
+## 0.2.3锛�2024-03-20锛�
+- 淇 寮瑰嚭浣嶇疆淇
+## 0.2.2锛�2024-01-15锛�
+- 鏂板 placement鏀寔璁剧疆鍥涗釜鏂瑰悜:top bottom left right
+## 0.2.1锛�2022-05-09锛�
+- 淇 content 涓虹┖鏃朵粛鐒跺脊鍑虹殑bug
+## 0.2.0锛�2022-05-07锛�
+**娉ㄦ剰锛氱牬鍧忔�ф洿鏂�**
+- 鏇存柊 text 灞炴�у彉鏇翠负 content
+- 鏇存柊 绉婚櫎 width 灞炴��
+## 0.1.1锛�2022-04-27锛�
+- 淇 缁勪欢鏍� text 宓屽缁勪欢 warning
+## 0.1.0锛�2022-04-21锛�
+- 鍒濆鍖�
diff --git a/uni_modules/uni-tooltip/components/uni-tooltip/uni-tooltip.vue b/uni_modules/uni-tooltip/components/uni-tooltip/uni-tooltip.vue
new file mode 100644
index 0000000..476a7dd
--- /dev/null
+++ b/uni_modules/uni-tooltip/components/uni-tooltip/uni-tooltip.vue
@@ -0,0 +1,108 @@
+<template>
+ <view class="uni-tooltip">
+ <slot></slot>
+ <view v-if="content || $slots.content" class="uni-tooltip-popup" :style="initPlacement">
+ <slot name="content">
+ {{content}}
+ </slot>
+ </view>
+ </view>
+</template>
+
+
+<script>
+ /**
+ * Tooltip 鎻愮ず鏂囧瓧
+ * @description 甯哥敤浜庡睍绀洪紶鏍� hover 鏃剁殑鎻愮ず淇℃伅銆�
+ * @tutorial https://uniapp.dcloud.io/component/uniui/uni-tooltip
+ * @property {String} content 寮瑰嚭灞傛樉绀虹殑鍐呭
+ * @property {String} placement鍑虹幇浣嶇疆, 鐩墠鏀寔锛歭eft right top bottom
+ */
+ export default {
+ name: "uni-tooltip",
+ data() {
+ return {
+
+ };
+ },
+ methods: {},
+ computed: {
+ initPlacement() {
+ let style = {};
+ switch (this.placement) {
+ case 'left':
+ style = {
+ top: '50%',
+ transform: 'translateY(-50%)',
+ right: '100%',
+ "margin-right": '10rpx',
+ }
+ break;
+ case 'right':
+ style = {
+ top: '50%',
+ transform: 'translateY(-50%)',
+ left: '100%',
+ "margin-left": '10rpx',
+ }
+ break;
+ case 'top':
+ style = {
+ bottom: '100%',
+ transform: 'translateX(-50%)',
+ left: '50%',
+ "margin-bottom": '10rpx',
+ }
+ break;
+ case 'bottom':
+ style = {
+ top: '100%',
+ transform: 'translateX(-50%)',
+ left: '50%',
+ "margin-top": '10rpx',
+ }
+ break;
+ }
+ return style;
+ }
+ },
+ props: {
+ content: {
+ type: String,
+ default: ''
+ },
+
+ placement: {
+ type: String,
+ default: 'bottom'
+ },
+ }
+ }
+</script>
+
+<style>
+ .uni-tooltip {
+ position: relative;
+ cursor: pointer;
+ display: inline-block;
+ }
+
+ .uni-tooltip-popup {
+ z-index: 1;
+ display: none;
+ position: absolute;
+ background-color: #333;
+ border-radius: 8px;
+ color: #fff;
+ font-size: 12px;
+ text-align: left;
+ line-height: 16px;
+ padding: 12px;
+ overflow: auto;
+ }
+
+
+ .uni-tooltip:hover .uni-tooltip-popup {
+ display: block;
+ }
+</style>
diff --git a/uni_modules/uni-tooltip/package.json b/uni_modules/uni-tooltip/package.json
new file mode 100644
index 0000000..44158e1
--- /dev/null
+++ b/uni_modules/uni-tooltip/package.json
@@ -0,0 +1,86 @@
+{
+ "id": "uni-tooltip",
+ "displayName": "uni-tooltip 鎻愮ず鏂囧瓧",
+ "version": "0.2.4",
+ "description": "Tooltip 鎻愮ず鏂囧瓧",
+ "keywords": [
+ "uni-tooltip",
+ "uni-ui",
+ "tooltip",
+ "tip",
+ "鏂囧瓧鎻愮ず"
+],
+ "repository": "https://github.com/dcloudio/uni-ui",
+ "engines": {
+ "HBuilderX": ""
+ },
+ "directories": {
+ "example": "../../temps/example_temps"
+ },
+"dcloudext": {
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "鏃� ",
+ "data": "鏃�",
+ "permissions": "鏃�"
+ },
+ "npmurl": "",
+ "type": "component-vue"
+ },
+ "uni_modules": {
+ "dependencies": [],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "y",
+ "aliyun": "y",
+ "alipay": "n"
+ },
+ "client": {
+ "Vue": {
+ "vue2": "y",
+ "vue3": "y"
+ },
+ "App": {
+ "app-vue": "y",
+ "app-nvue": "u"
+ },
+ "H5-mobile": {
+ "Safari": "y",
+ "Android Browser": "y",
+ "寰俊娴忚鍣�(Android)": "y",
+ "QQ娴忚鍣�(Android)": "y"
+ },
+ "H5-pc": {
+ "Chrome": "y",
+ "IE": "y",
+ "Edge": "y",
+ "Firefox": "y",
+ "Safari": "y"
+ },
+ "灏忕▼搴�": {
+ "寰俊": "y",
+ "闃块噷": "u",
+ "鐧惧害": "u",
+ "瀛楄妭璺冲姩": "u",
+ "QQ": "u",
+ "浜笢": "u"
+ },
+ "蹇簲鐢�": {
+ "鍗庝负": "u",
+ "鑱旂洘": "u"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/uni_modules/uni-tooltip/readme.md b/uni_modules/uni-tooltip/readme.md
new file mode 100644
index 0000000..faafa2e
--- /dev/null
+++ b/uni_modules/uni-tooltip/readme.md
@@ -0,0 +1,8 @@
+## Badge 鏁板瓧瑙掓爣
+> **缁勪欢鍚嶏細uni-tooltip**
+> 浠g爜鍧楋細 `uTooltip`
+
+鏁板瓧瑙掓爣涓�鑸拰鍏跺畠鎺т欢锛堝垪琛ㄣ��9瀹牸绛夛級閰嶅悎浣跨敤锛岀敤浜庤繘琛屾暟閲忔彁绀猴紝榛樿涓哄疄蹇冪伆鑹茶儗鏅紝
+
+### [鏌ョ湅鏂囨。](https://uniapp.dcloud.io/component/uniui/uni-tooltip)
+#### 濡備娇鐢ㄨ繃绋嬩腑鏈変换浣曢棶棰橈紝鎴栬�呮偍瀵箄ni-ui鏈変竴浜涘ソ鐨勫缓璁紝娆㈣繋鍔犲叆 uni-ui 浜ゆ祦缇わ細871950839
--
Gitblit v1.9.1