Browse Source

1.收银机小票取货码增加收银机编号;

lsp 4 years ago
parent
commit
4649344568

+ 14 - 2
kmall-admin/src/main/resources/mybatis/mapper/SalesDataUploadDao.xml

@@ -43,6 +43,12 @@
 		<if test="name != null and name.trim() != ''">
 			AND u.file_name LIKE concat('%',#{name},'%')
 		</if>
+		<if test="startTime != null and startTime.trim() != ''">
+			AND u.creater_time >= #{startTime}
+		</if>
+		<if test="endTime != null and endTime.trim() != ''">
+			AND u.creater_time &lt;= #{endTime}
+		</if>
         <choose>
             <when test="sidx != null and sidx.trim() != ''">
                 order by ${sidx} ${order}
@@ -62,9 +68,15 @@
         <if test="name != null and name.trim() != ''">
             AND file_name LIKE concat('%',#{name},'%')
         </if>
+		<if test="startTime != null and startTime.trim() != ''">
+			AND u.creater_time >= #{startTime}
+		</if>
+		<if test="endTime != null and endTime.trim() != ''">
+			AND u.creater_time &lt;= #{endTime}
+		</if>
 	</select>
-	 
-	<insert id="save" parameterType="com.kmall.admin.entity.SalesDataUploadEntity" useGeneratedKeys="true" keyProperty="fileId">
+
+    <insert id="save" parameterType="com.kmall.admin.entity.SalesDataUploadEntity" useGeneratedKeys="true" keyProperty="fileId">
 		insert into mall_sales_data_upload(
 			`file_name`,
 			`file_type`,

+ 1 - 0
kmall-admin/src/main/webapp/WEB-INF/page/sale/sale.html

@@ -308,6 +308,7 @@
                         </div>
                         <div class="modal-footer">
                             <button type="button" style="margin:0 30px 0 20px;font-size: 20px;float: left" class="btn ivu-btn-error" @click="refundOrder()" id="refundOrder" data-dismiss="modal">退款</button>
+                            <button type="button" style="margin:0 30px 0 20px;font-size: 30px;" class="btn btn-warning" @click="confirmDelivery" id="confirmDelivery" data-dismiss="modal">确定提货</button>
                             <button type="button" style="margin:0 30px 0 20px;font-size: 30px;" class="btn btn-primary" @click="resendNotice" id="resendNotice" data-dismiss="modal">重发通知</button>
                             <button type="button" style="margin:0 30px 0 20px;font-size: 30px;" class="btn btn-primary" @click="resendWaybill" id="resendWaybill" data-dismiss="modal">重发运单</button>
                             <button type="button" style="margin:0 30px 0 20px;font-size: 30px;" class="btn btn-primary" @click="resendPayment" id="resendPayment" data-dismiss="modal">重发支付单</button>

+ 12 - 6
kmall-admin/src/main/webapp/js/sale/sale.js

@@ -1036,7 +1036,14 @@ let vm = new Vue({
                     }
                 });
             })
-
+        },
+        //确认提货
+        confirmDelivery: function(){
+            confirm('确认提货吗?', function () {
+                $.get("../pickupcode/confirmDelivery/"+vm.orderEntity.orderSn, function (r) {
+                    alert(r.msg);
+                });
+            })
         },
         retrySendOrder:function(){
         },
@@ -1082,7 +1089,7 @@ let vm = new Vue({
 });
 
 function getPrintContent(ticket) {
-    var content = "<div style=\"width: 250px;font-family: 微软雅黑;font-size: 15px;\">";
+    var content = "<div style=\"width: 300px;font-family: 微软雅黑;font-size: 15px;\">";
     // // 打印ogo
     // content += "<div style=\"text-align: center;width: 100%;height: 50px;\">";
     // // content += "<img src='./../../statics/img/cw_logo.png' />";
@@ -1140,7 +1147,6 @@ function printArea(content) {
 
     frameWindow.focus();
     frameWindow.print();
-    frameWindow.print();
     alert('打印小票完成');
     /*if(!vm.firstPrint){
         setTimeout(function() {
@@ -1179,7 +1185,7 @@ function printArea2(content) {
     doc.close();
     var frameWindow = iframe.contentWindow;
     frameWindow.focus();
-    frameWindow.print();
+    // frameWindow.print();
     frameWindow.print();
     frameWindow.close();
 }
@@ -1201,8 +1207,8 @@ function openWebSocket() {
         //无法使用wss,浏览器打开WebSocket时报错
         //ws对应http、wss对应https。
         // webSocket = new WebSocket("ws://183.62.225.124:8080/ws/server/"+storeId);
-        // webSocket = new WebSocket("ws://127.0.0.1:8080//ws/server/"+storeId);
-        webSocket = new WebSocket("wss://cb.k1net.cn/ws/server/"+storeId);
+        webSocket = new WebSocket("ws://127.0.0.1:8070//ws/server/"+storeId);
+        // webSocket = new WebSocket("wss://cb.k1net.cn/ws/server/"+storeId);
         if (webSocket.readyState === webSocket.CONNECTING) {
             console.log('1.连接正在打开......');
         }

+ 20 - 2
kmall-admin/src/main/webapp/js/sale/salesdataupload.js

@@ -51,7 +51,9 @@ let vm = new Vue({
 			]
 		},*/
 		q: {
-		    name: ''
+		    name: '',
+			startTime: '',
+			endTime: ''
 		}
 	},
 	methods: {
@@ -128,9 +130,19 @@ let vm = new Vue({
 		},
 		reload: function (event) {
 			vm.showList = true;
+
+			if(!vm.q.startTime && !vm.q.endTime){
+				alert("请选择上传时间!");
+				return;
+			}
+
             let page = $("#jqGrid").jqGrid('getGridParam', 'page');
 			$("#jqGrid").jqGrid('setGridParam', {
-                postData: {'name': vm.q.name},
+                postData: {
+                	'name': vm.q.name,
+					'startTime': vm.timestampToDate(vm.q.startTime)+" 00:00:00",
+					'endTime': vm.timestampToDate(vm.q.endTime)+" 23:59:59"
+				},
                 page: page
             }).trigger("reloadGrid");
             vm.handleReset('formValidate');
@@ -169,6 +181,12 @@ let vm = new Vue({
 					window.location.href = "../salesdataupload/download?filePath="+fileData.uploadAddress+"&fileName="+fileData.fileName+"&fileId="+fileData.fileId;
 				}
 			}
+		},
+		timestampToDate: function (timestamp){
+			if(timestamp){
+				return new Date(timestamp).toLocaleDateString().replace(/\//g, '-')
+			}
+			return '';
 		}
 	}
 });