Browse Source

出入库单详情查询优化

lhm 3 years ago
parent
commit
2a77e9c062

+ 6 - 0
kmall-admin/src/main/resources/mybatis/mapper/haikong/StockChangeRecordDao.xml

@@ -39,6 +39,12 @@
 		<if test="sku != null and sku.trim() != ''">
 			AND `sku` LIKE concat('%',#{sku},'%')
 		</if>
+		<if test="parentId != null and parentId.trim() != ''">
+			AND `parent_id` LIKE concat('%',#{parentId},'%')
+		</if>
+		<if test="storeId != null and storeId.trim() != ''">
+			AND `store_id` LIKE concat('%',#{storeId},'%')
+		</if>
         <choose>
             <when test="sidx != null and sidx.trim() != ''">
                 order by ${sidx} ${order}

+ 3 - 0
kmall-admin/src/main/webapp/WEB-INF/page/shop/stockchangerecord.html

@@ -17,6 +17,9 @@
                     </i-select>
                 </i-col>
                 <i-col span="3">
+                    <i-input v-model="q.parentId" @on-enter="query" placeholder="主体单号"/>
+                </i-col>
+                <i-col span="3">
                     <i-input v-model="q.sku" @on-enter="query" placeholder="sku"/>
                 </i-col>
                 <i-col span="3">

+ 6 - 2
kmall-admin/src/main/webapp/js/shop/stockchangerecord.js

@@ -75,7 +75,10 @@ let vm = new Vue({
 			]
 		},
 		q: {
-		    name: ''
+		    type: '',
+			parentId : '',
+			sku: '',
+			storeId : ''
 		},
 		merchList: {},//商户
 		thirdMerchantBizList: {},//第三方商户
@@ -168,7 +171,8 @@ let vm = new Vue({
                 postData: {
                 	'storeId': vm.q.storeId,
 					'type': vm.q.type,
-					'sku': vm.q.sku
+					'sku': vm.q.sku,
+					'parentId' : vm.q.parentId
 				},
                 page: page
             }).trigger("reloadGrid");