shish 1 year ago
parent
commit
f51cf97f30
2 changed files with 24 additions and 12 deletions
  1. 4 0
      ghsApp/src/api/order/index.js
  2. 20 12
      ghsApp/src/pagesOrder/printWlList.vue

+ 4 - 0
ghsApp/src/api/order/index.js

@@ -1,5 +1,9 @@
 import https from "@/plugins/luch-request_0.0.7/request";
 
+export const printWlList = data => {
+	return https.get("/order/print-wl-list", data)
+}
+
 export const printWlLabel = data => {
 	return https.get("/order/print-wl-label", data)
 }

+ 20 - 12
ghsApp/src/pagesOrder/printWlList.vue

@@ -1,17 +1,22 @@
 <template>
 <view class="app-content">
-	<view style="padding-top:50upx;margin-left:45%;">
-        <DateSelect class="bar" top="0" @selectDateFn="selectDateFn" defaultShowName='今天' /> 
+	<view style="padding-top:50upx;margin-left:10%;font-size:32upx;">
+        <view>开始时间:
+        <button class="admin-button-com middle" :class="[begin == 0 ? 'blue' : 'default']" @click="begin=0">昨天</button>
+        <button class="admin-button-com middle" :class="[begin == 1 ? 'blue' : 'default']" @click="begin=1" style="margin-left:10upx;margin-right:10upx;">今天</button>
+        <input v-model="hour" name="hour" type="number" style="text-align:center;display:inline-block;border:1upx solid #CCCCCC;width:100upx;margin-right:10upx;height:70upx;" />
+        <text>点</text>
+        </view>
+        <view style="margin-top:40upx;">结束时间:现在</view>
 	</view>
-    <view style="text-align: center;margin-top:50upx;">
-        <button class="admin-button-com big" @click="printList(0)">打印全部</button>
-        <button class="admin-button-com big" @click="printList(1)" style="margin-left:50upx;">打印新单</button>
+    <view style="text-align: center;margin-top:80upx;">
+        <button class="admin-button-com big blue" @click="printList()">打印物流列表</button>
     </view>
-    <view style="margin-top:30upx;text-align: center;font-size:26upx;">打印新单时,已经打印过的,不会再打印</view>
 </view>
 </template>
 <script>
 import DateSelect from "@/components/module/dateSelect";
+import { printWlList } from "@/api/order"
 export default {
 	components: {
         DateSelect
@@ -19,6 +24,8 @@ export default {
 	mixins: [],
 	data() {
 		return {
+            hour:0,
+            begin:1
 		};
 	},
 	onPullDownRefresh() {
@@ -29,13 +36,14 @@ export default {
 		init(){
 
         },
-        printList(type){
-            let hint = '确认打印全部?'
-            if(type == 1){
-                hint = '确认打印新单?'
-            }
+        printList(){
+            let hint = '确认打印?'
             this.$util.confirmModal({content:hint},() => {
-
+                printWlList({begin:this.begin,hour:this.hour}).then(res=>{
+                    if(res.code == 1){
+                        this.$msg(res.msg)
+                    }
+                })
             })
         }