1
0
Quellcode durchsuchen

Merge branch 'master' of zhh/kmall-haikong into master

lhm vor 3 Jahren
Ursprung
Commit
e24b3991c4

+ 7 - 0
kmall-admin/src/main/resources/mybatis/mapper/OrderDao.xml

@@ -471,6 +471,9 @@
         <if test="ids != null and ids.trim() != ''">
             AND o.id in (${ids})
         </if>
+        <if test="pickUpCodeSn != null and pickUpCodeSn.trim() != ''">
+            AND c.pick_up_code_sn LIKE concat('%',#{pickUpCodeSn},'%')
+        </if>
         <choose>
             <when test="sidx != null and sidx.trim() != ''">
                 order by ${sidx} ${order}
@@ -487,6 +490,7 @@
     <select id="queryOffilineOrderTotal" resultType="int">
         select count(DISTINCT o.id) FROM
         mall_order o
+        LEFT JOIN mall_pick_up_code c on c.order_sn = o.order_sn
         LEFT JOIN mall_store s on o.store_id = s.id
         LEFT JOIN mall_order_goods g ON o.id = g.order_id
         WHERE 1=1
@@ -541,6 +545,9 @@
         <if test="ids != null and ids.trim() != ''">
             AND o.id in (${ids})
         </if>
+        <if test="pickUpCodeSn != null and pickUpCodeSn.trim() != ''">
+            AND c.pick_up_code_sn LIKE concat('%',#{pickUpCodeSn},'%')
+        </if>
     </select>
 
     <insert id="save" parameterType="com.kmall.api.entity.OrderVo" useGeneratedKeys="true" keyProperty="id">

+ 23 - 5
kmall-admin/src/main/resources/mybatis/mapper/SaleRecordDao.xml

@@ -57,8 +57,17 @@
 
 
 		WHERE 1=1
-		<if test="name != null and name.trim() != ''">
-			AND name LIKE concat('%',#{name},'%')
+		<if test="orderSn != null and orderSn.trim() != ''">
+			AND record.`order_sn` LIKE concat('%',#{orderSn},'%')
+		</if>
+		<if test="cashierSn != null and cashierSn.trim() != ''">
+			AND record.`cashier_sn` LIKE concat('%',#{cashierSn},'%')
+		</if>
+		<if test="sallerId != null and sallerId.trim() != ''">
+			AND record.`saller_id` LIKE concat('%',#{sallerId},'%')
+		</if>
+		<if test="sallerName != null and sallerName.trim() != ''">
+			AND su.`username` LIKE concat('%',#{sallerName},'%')
 		</if>
         <choose>
             <when test="sidx != null and sidx.trim() != ''">
@@ -79,9 +88,18 @@
 		left join mall_store store on su.store_id = store.id
 		left join mall_store_topic topic on topic.id = record.discount_id
 		WHERE 1=1
-        <if test="name != null and name.trim() != ''">
-            AND name LIKE concat('%',#{name},'%')
-        </if>
+		<if test="orderSn != null and orderSn.trim() != ''">
+			AND record.`order_sn` LIKE concat('%',#{orderSn},'%')
+		</if>
+		<if test="cashierSn != null and cashierSn.trim() != ''">
+			AND record.`cashier_sn` LIKE concat('%',#{cashierSn},'%')
+		</if>
+		<if test="sallerId != null and sallerId.trim() != ''">
+			AND record.`saller_id` LIKE concat('%',#{sallerId},'%')
+		</if>
+		<if test="sallerName != null and sallerName.trim() != ''">
+			AND su.`username` LIKE concat('%',#{sallerName},'%')
+		</if>
 	</select>
 
 	<insert id="save" parameterType="com.kmall.admin.entity.SaleRecordEntity" useGeneratedKeys="true" keyProperty="msrId">

+ 22 - 13
kmall-admin/src/main/webapp/WEB-INF/page/cashier/salerecord.html

@@ -8,24 +8,33 @@
 <div id="rrapp" v-cloak>
 	<div v-show="showList">
         <Row :gutter="16">
-            <!--<div class="search-group">
+            <div class="search-group">
                 <i-col span="4">
-                    <i-input v-model="q.name" @on-enter="query" placeholder="名称"/>
+                    <i-input v-model="q.orderSn" @on-enter="query" placeholder="订单编号"/>
+                </i-col>
+                <i-col span="4">
+                    <i-input v-model="q.cashierSn" @on-enter="query" placeholder="收银机编号"/>
+                </i-col>
+                <i-col span="4">
+                    <i-input v-model="q.sallerId" @on-enter="query" placeholder="店员id"/>
+                </i-col>
+                <i-col span="4">
+                    <i-input v-model="q.sallerName" @on-enter="query" placeholder="店员名称"/>
                 </i-col>
                 <i-button @click="query">查询</i-button>
                 <i-button @click="reloadSearch">重置</i-button>
             </div>
-            <div class="buttons-group">
-                #if($shiro.hasPermission("salerecord:save"))
-                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
-                #end
-                #if($shiro.hasPermission("salerecord:update"))
-                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
-                #end
-                #if($shiro.hasPermission("salerecord:delete"))
-                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
-                #end
-            </div>-->
+<!--            <div class="buttons-group">-->
+<!--                #if($shiro.hasPermission("salerecord:save"))-->
+<!--                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>-->
+<!--                #end-->
+<!--                #if($shiro.hasPermission("salerecord:update"))-->
+<!--                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>-->
+<!--                #end-->
+<!--                #if($shiro.hasPermission("salerecord:delete"))-->
+<!--                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>-->
+<!--                #end-->
+<!--            </div>-->
         </Row>
 	    <table id="jqGrid"></table>
 	    <div id="jqGridPager"></div>

+ 4 - 1
kmall-admin/src/main/webapp/WEB-INF/page/receipt/receiptCheck.html

@@ -10,7 +10,10 @@
         <Row :gutter="16">
             <div class="search-group">
                 <i-col span="4">
-                    <i-input v-model="q.orderSn" @on-enter="query" placeholder="小票号"/>
+                    <i-input v-model="q.orderSn" @on-enter="query" placeholder="订单号"/>
+                </i-col>
+                <i-col span="4">
+                    <i-input v-model="q.pickUpCodeSn" @on-enter="query" placeholder="小票号"/>
                 </i-col>
 
                 <i-button @click="query">查询</i-button>

+ 14 - 3
kmall-admin/src/main/webapp/js/cashier/salerecord.js

@@ -61,7 +61,10 @@ let vm = new Vue({
 			]
 		},
 		q: {
-		    name: ''
+			orderSn: '',
+			cashierSn: '',
+			sallerId: '',
+			sallerName: ''
 		}
 	},
 	methods: {
@@ -132,7 +135,10 @@ let vm = new Vue({
 		},
         reloadSearch: function() {
             vm.q = {
-                name: ''
+				orderSn: '',
+				cashierSn: '',
+				sallerId: '',
+				sallerName: ''
             }
             vm.reload();
 		},
@@ -143,7 +149,12 @@ let vm = new Vue({
 				page = $("#jqGrid").jqGrid('getGridParam', 'page');
 			}
 			$("#jqGrid").jqGrid('setGridParam', {
-                postData: {'name': vm.q.name},
+                postData: {
+                	'orderSn': vm.q.orderSn,
+					'cashierSn': vm.q.cashierSn,
+					'sallerId': vm.q.sallerId,
+					'sallerName': vm.q.sallerName
+				},
                 page: page
             }).trigger("reloadGrid");
             vm.handleReset('formValidate');

+ 6 - 3
kmall-admin/src/main/webapp/js/receipt/receiptCheck.js

@@ -103,7 +103,8 @@ let vm = new Vue({
         q: {
             orderSn: '',
             orderStatus: '',
-            orderType: ''
+            orderType: '',
+            pickUpCodeSn: ''
         },
         refundMoney: 0,
         shipping: {},
@@ -157,7 +158,8 @@ let vm = new Vue({
                 postData: {
                     'orderSn': vm.q.orderSn,
                     'orderStatus': vm.q.orderStatus,
-                    'orderType': vm.q.orderType
+                    'orderType': vm.q.orderType,
+                    'pickUpCodeSn': vm.q.pickUpCodeSn
                 },
                 page: page
             }).trigger("reloadGrid");
@@ -166,7 +168,8 @@ let vm = new Vue({
             vm.q = {
                 orderSn: '',
                 orderStatus: '',
-                orderType: ''
+                orderType: '',
+                pickUpCodeSn: ''
             };
             vm.reload(1);
         },