lilei 1 yıl önce
ebeveyn
işleme
ff3906e12a

+ 19 - 13
pages/codeBar/codeBar.vue

@@ -8,7 +8,7 @@
 					class="uni-input" 
 					placeholder="扫描或输入条码" 
 					border="surround" 
-					@confirm="queryProduct"
+					@confirm="queryProduct(0)"
 					v-model="query.qrCode">
 				</view>
 			</view>
@@ -18,7 +18,7 @@
 					<input 
 					class="uni-input" 
 					placeholder="请输入产品编码"
-					 @confirm="queryProduct"
+					 @confirm="queryProduct(0)"
 					border="surround" 
 					v-model="query.code">
 				</view>
@@ -29,13 +29,13 @@
 					<input  
 					class="uni-input" 
 					placeholder="请输入产品名称" 
-					@confirm="queryProduct"
+					@confirm="queryProduct(0)"
 					border="surround" 
 					v-model="query.name">
 				</view>
 			</view>
 			<view>
-				<button type="primary" size="mini" @click="queryProduct" :style="{padding:'5px 30px'}">查询</button>
+				<button type="primary" size="mini" @click="queryProduct(0)" :style="{padding:'5px 30px'}">查询</button>
 			</view>
 		</view>
 		<view class="p-body">
@@ -56,6 +56,7 @@
 					<uni-td width="30%" align="center">{{item.qrCode}}</uni-td>
 				</uni-tr>
 			</uni-table>
+			<view v-if="noMore" style="padding: 30upx;text-align: center;color:#999;font-size: 24rpx;">{{noMore}}</view>
 		</view>
 		 
 		<scanCode></scanCode>
@@ -116,7 +117,8 @@
 				},
 				detailList:[],
 				code:'',
-				tempProduct: null
+				tempProduct: null,
+				noMore: ''
 			};
 		},
 		onLoad(opts) {
@@ -127,7 +129,7 @@
 				_this.code = content||''
 			  }else{
 				   _this.query.qrCode = content||''
-				   _this.queryProduct()
+				   _this.queryProduct(0)
 			  }
 		  })
 		  
@@ -166,18 +168,20 @@
 				prams.qrCode = this.code
 				dealerProductSave(prams).then(res => {
 					if(res.status == 200){
-						this.queryProduct()
+						this.queryProduct(1)
 						this.closePop()
 					}
 					this.subloading = false
 				})
 			},
 			// 查询产品
-			queryProduct(){
+			queryProduct(flag){
 				if(this.query.code==''&&this.query.qrCode==''&&this.query.name==''){
-				  uni.$u.toast("请输入查询条件!")
-				  playAudio('error')
-				  return
+				  if(!flag){
+					  uni.$u.toast("请输入查询条件!")
+					  playAudio('error')
+					  return
+				  }
 				}
 				const params = { 
 					pageNo:1, 
@@ -190,8 +194,10 @@
 					if(res.status == 200){
 						this.detailList = res.data && res.data.list || []
 					}
-					if(res.data.count>10){
-						uni.$u.toast("最多显示前10条匹配产品!")
+					if(res.data.count > 10){
+						this.noMore = '最多显示前10条匹配产品!'
+					}else{
+						this.noMore = ''
 					}
 					this.loading = false
 				})

Dosya farkı çok büyük olduğundan ihmal edildi
+ 30 - 17
unpackage/dist/dev/app-plus/app-service.js


+ 36 - 21
unpackage/dist/dev/app-plus/app-view.js

@@ -20210,13 +20210,28 @@ var render = function () {
             ],
             2
           ),
+          _vm._$g(26, "i")
+            ? _c(
+                "uni-view",
+                {
+                  staticStyle: {
+                    padding: "30upx",
+                    "text-align": "center",
+                    color: "#999",
+                    "font-size": "24rpx",
+                  },
+                  attrs: { _i: 26 },
+                },
+                [_vm._v(_vm._$g(26, "t0-0"))]
+              )
+            : _vm._e(),
         ],
         1
       ),
-      _c("scanCode", { attrs: { _i: 26 } }),
+      _c("scanCode", { attrs: { _i: 27 } }),
       _c(
         "uni-popup",
-        { ref: "popup", attrs: { _i: 27 } },
+        { ref: "popup", attrs: { _i: 28 } },
         [
           _c(
             "uni-view",
@@ -20229,22 +20244,22 @@ var render = function () {
                 width: "80%",
                 margin: "0 auto",
               },
-              attrs: { _i: 28 },
+              attrs: { _i: 29 },
             },
             [
-              _vm._$g(29, "i")
+              _vm._$g(30, "i")
                 ? _c(
                     "uni-view",
                     {
                       staticStyle: { "line-height": "60rpx", width: "600rpx" },
-                      attrs: { _i: 29 },
+                      attrs: { _i: 30 },
                     },
                     [
-                      _c("uni-view", { attrs: { _i: 30 } }, [
-                        _vm._v("产品编码:" + _vm._$g(30, "t0-0")),
-                      ]),
                       _c("uni-view", { attrs: { _i: 31 } }, [
-                        _vm._v("产品名称:" + _vm._$g(31, "t0-0")),
+                        _vm._v("产品编码:" + _vm._$g(31, "t0-0")),
+                      ]),
+                      _c("uni-view", { attrs: { _i: 32 } }, [
+                        _vm._v("产品名称:" + _vm._$g(32, "t0-0")),
                       ]),
                       _c(
                         "uni-view",
@@ -20254,20 +20269,20 @@ var render = function () {
                             "align-items": "center",
                             "padding-top": "15rpx",
                           },
-                          attrs: { _i: 32 },
+                          attrs: { _i: 33 },
                         },
                         [
-                          _c("v-uni-text", { attrs: { _i: 33 } }, [
+                          _c("v-uni-text", { attrs: { _i: 34 } }, [
                             _vm._v("条形码:"),
                           ]),
                           _c("v-uni-input", {
-                            staticClass: _vm._$g(34, "sc"),
+                            staticClass: _vm._$g(35, "sc"),
                             staticStyle: { width: "350rpx" },
                             attrs: {
                               focus: true,
                               placeholder: "扫描或输入条码",
                               border: "surround",
-                              _i: 34,
+                              _i: 35,
                             },
                             on: {
                               confirm: function ($event) {
@@ -20275,9 +20290,9 @@ var render = function () {
                               },
                             },
                             model: {
-                              value: _vm._$g(34, "v-model"),
+                              value: _vm._$g(35, "v-model"),
                               callback: function ($$v) {
-                                _vm.$handleVModelEvent(34, $$v)
+                                _vm.$handleVModelEvent(35, $$v)
                               },
                               expression: "code",
                             },
@@ -20297,14 +20312,14 @@ var render = function () {
                     padding: "50rpx 15rpx 10rpx",
                     "justify-content": "center",
                   },
-                  attrs: { _i: 35 },
+                  attrs: { _i: 36 },
                 },
                 [
                   _c(
                     "v-uni-button",
                     {
-                      style: _vm._$g(36, "s"),
-                      attrs: { size: "mini", _i: 36 },
+                      style: _vm._$g(37, "s"),
+                      attrs: { size: "mini", _i: 37 },
                       on: {
                         click: function ($event) {
                           return _vm.$handleViewEvent($event)
@@ -20316,12 +20331,12 @@ var render = function () {
                   _c(
                     "v-uni-button",
                     {
-                      style: _vm._$g(37, "s"),
+                      style: _vm._$g(38, "s"),
                       attrs: {
                         size: "mini",
                         type: "primary",
-                        loading: _vm._$g(37, "a-loading"),
-                        _i: 37,
+                        loading: _vm._$g(38, "a-loading"),
+                        _i: 38,
                       },
                       on: {
                         click: function ($event) {

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor