shish 10 сар өмнө
parent
commit
81bdf0720e

+ 98 - 0
ghsApp/src/admin/cg/code.vue

@@ -0,0 +1,98 @@
+<template>
+  <view class="app-content">
+    <view class="img_box" style="margin-top:30upx;">
+      <image :src="gatherUrl" mode="heightFix" class="img_url"></image>
+    </view>
+    <view style="font-size:32upx;text-align: center;margin:20upx 0 5upx 0;">打印尺寸 100mmx150mm</view>
+    <view class="confirm-btn">
+      <button class="admin-button-com big blue" style="width:60vw;" @click="downloadImg(gatherUrl)">下载收款码</button>
+    </view>
+  </view>
+</template>
+<script>
+import { miniGatheringCode } from '@/api/shop'
+export default {
+  data() {
+    return {
+      gatherUrl:''
+    }
+  },
+  methods: {
+    init() {
+      this.getImg()
+    },
+    downloadImg(url){
+            // #ifdef APP-PLUS
+            let platformType = uni.getSystemInfoSync().platform
+            if(platformType == 'android'){
+                let store = plus.navigator.checkPermission('android.permission.READ_EXTERNAL_STORAGE')
+                if(store != 'authorized'){
+                    this.$util.confirmModal({content:'将申请您的存储权限,用于保存小程序码'},() => {
+                        this.downloadImg2(url)
+            })
+                }else{
+                    this.downloadImg2(url)
+                }
+            }else{
+                this.downloadImg2(url)
+            }
+            // #endif
+            // #ifdef MP-WEIXIN
+            this.downloadImg2(url)
+            // #endif
+    },
+    downloadImg2(url){
+      uni.downloadFile({
+        url: url,
+        success: (res) => {
+          if (res.statusCode === 200) {
+            uni.saveImageToPhotosAlbum({
+              filePath: res.tempFilePath,
+              success: function (data) {
+                uni.showToast({title:'下载成功!'})
+              }
+            });
+          }
+        }
+      });
+    },
+    getImg() {
+      miniGatheringCode().then(res => {
+        this.gatherUrl = res.data.imgUrl
+      })
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.app-content{
+  overflow: hidden;
+}
+.img_box{
+  height:900upx;
+  box-sizing: border-box;
+  &>.img_url{
+    height:900upx;
+    width: auto;
+    margin: 20upx auto;
+  }
+}
+// 按钮
+.confirm-btn {
+  width: calc(100% - 60upx);
+  margin: 30upx 30upx 20upx;
+  text-align:center;
+  .admin-button-com {
+    width: 100%;
+  }
+}
+// 按钮
+.confirm-btn1 {
+  width: calc(100% - 60upx);
+  margin: 30upx 30upx 20upx;
+  text-align:center;
+  .admin-button-com {
+    width: 100%;
+  }
+}
+</style>

+ 200 - 0
ghsApp/src/admin/order/scanPay.vue

@@ -0,0 +1,200 @@
+<template>
+<view class="app-content">
+	<view class="allot-ex-page">
+		<view class="tabs">
+			<Tabs :tabs="tabs" :currentTab="tabIndex" @change="changeTabEvent" @add="addEvent" ></Tabs>
+		</view>
+		<scroll-view scroll-y class="allot-list">
+			<block v-if="!$util.isEmpty(list.data)">
+				<view class="allot-item" v-for="(item, index) in list.data" :key="index" @click="gotoDetails(item)" >
+					<view class="info">
+						<view class="info-order"><text style="font-weight:normal;font-size:28upx;">来自:</text>
+							{{ item.outShopName }}
+						</view>
+						<view class="info-name">单号:{{ item.orderSn }}</view>
+						<view class="info-name">价格:¥{{ item.price?parseFloat(item.price):0 }}</view>
+						<view class="info-name">数量:
+							<text v-if="Number(item.bigNum)>0" style="color:#3385ff;font-weight:bold;">{{ item.bigNum}}扎</text>
+							<text v-if="Number(item.smallNum)>0" style="color:#3385ff;font-weight:bold;">{{ item.smallNum}}支</text>
+						</view>
+            			<view class="info-name">时间:{{ item.updateTime.substr(5,11) }}</view>
+						<view class="info-name">编号:{{ item.id }}</view>
+					</view>
+					<view class="primary" >
+						<view :class="['status-name']">{{ item.statusName }}</view>
+					</view>
+				</view>
+			</block>
+			<block v-else>
+				<AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
+			</block>
+		</scroll-view>
+	</view>
+</view>
+</template>
+<script>
+import Tabs from "@/components/plugin/tabs";
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import { list } from "@/mixins";
+import { getStockInListApi } from "@/api/storehouse/stock";
+import { PUT_STATUS } from "@/utils/declare";
+export default {
+	name: "allotPut",
+	components: { Tabs, AppWrapperEmpty },
+	mixins: [list],
+	data() {
+		return {
+			PUT_STATUS,
+			tabIndex: 0,
+			tabs: [
+				{
+					name: "全部",
+					key: ""
+				},
+				{
+					name: "配送中",
+					key: PUT_STATUS.CONFIRM
+				},
+				{
+					name: "已入库",
+					key: PUT_STATUS.DONE
+				},
+				{
+					name: "已取消",
+					key: PUT_STATUS.CANCEL
+				}
+			]
+		};
+	},
+	onPullDownRefresh() {
+		this.resetList();
+		this.getMyScanList().then(res => {
+			uni.stopPullDownRefresh();
+		});
+	},
+	onLoad() {
+	},
+	onReachBottom() {
+		if (!this.list.finished) {
+		this.getMyScanList().then((res) => {
+			uni.stopPullDownRefresh();
+		});
+		} else {
+		uni.stopPullDownRefresh();
+		}
+	},
+	methods: {
+		async init() {
+			this.getMyScanList();
+		},
+		getMyScanList() {
+			return getStockInListApi({status:this.tabs[this.tabIndex].key,page: this.list.page})
+				.then(res => {
+					this.completes(res);
+				})
+				.catch(err => {});
+		},
+		changeTabEvent(info) {
+			const { index } = info;
+			if (this.tabIndex == index) {
+				return false;
+			} else {
+				this.tabIndex = index;
+				this.resetList();
+				this.getMyScanList();
+			}
+		},
+		getItemStatusName(status) {
+			let name = "";
+			switch (status) {
+				case PUT_STATUS.CONFIRM:
+					name = "配送中";
+					break;
+				case PUT_STATUS.DONE:
+					name = "已入库";
+					break;
+				case PUT_STATUS.CANCEL:
+					name = "已取消";
+					break;
+
+				default:
+					break;
+			}
+			return name;
+		},
+		addEvent() {
+			uni.navigateTo({url:'/pagesStorehouse/allot/addExDetails'})
+		},
+		gotoDetails(item) {
+			uni.navigateTo({url: `/pagesStorehouse/allot/putDetails?orderSn=${item.orderSn}`})
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.allot-ex-page {
+	height: 100%;
+	display: flex;
+	flex-direction: column;
+	background-color: #f9fbfc;
+	.allot-list {
+		margin-top: 20upx;
+		flex: 1;
+		padding-bottom: 30upx;
+		.allot-item {
+			margin-bottom: 1upx;
+			padding: 30upx;
+			display: flex;
+			align-items: center;
+
+			box-shadow: 0upx 1upx 0upx 0upx #eeeeee;
+			background-color: #fff;
+			.info {
+				flex: 1;
+				margin-right: 20upx;
+				.info-order {
+					font-size: 32upx;
+					font-weight: 600;
+					color: #333333;
+				}
+				.info-name {
+					margin: 20upx 0 20upx;
+					font-size: 28upx;
+					font-weight: 400;
+					color: #666666;
+				}
+				.info-time {
+					margin-right: 30upx;
+					font-size: 28upx;
+					font-weight: 400;
+					color: #666666;
+				}
+			}
+			.status {
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				flex-shrink: 0;
+				width: 100upx;
+				color: #cccccc;
+				.status-name {
+					margin-top: 10upx;
+					font-size: 24upx;
+				}
+				.iconfont {
+					font-size: 46upx;
+				}
+				&.primary {
+					color: #3385ff;
+				}
+				&.gray {
+					color: #cccccc;
+				}
+				&.warn {
+					color: #ffaf1d;
+				}
+			}
+		}
+	}
+}
+</style>

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

@@ -147,4 +147,8 @@ export const bookSet = data => {
 
 export const getInfo = data => {
 	return https.get('/shop/info', data)
+}
+
+export const miniGatheringCode = data => {
+	return https.get('/shop/mini-gathering-code', data)
 }

+ 1 - 0
ghsApp/src/pages.json

@@ -480,6 +480,7 @@
 			"root": "admin/order",
 			"pages": [
 				{"path": "itemOrder","style": {"navigationBarTitleText": "订单列表"}},
+				{"path": "scanPay","style": {"navigationBarTitleText": "二维码收款"}},
 				{"path": "bookSet","style": {"navigationBarTitleText": "预订开关"}},
 				{"path": "statBook","style": {"navigationBarTitleText": "预订汇总","enablePullDownRefresh": true}},
 				{"path": "statKhBook","style": {"navigationBarTitleText": "详情"}},

+ 0 - 2
ghsApp/src/pagesStorehouse/allot/allotPut.vue

@@ -42,11 +42,9 @@
 <script>
 import Tabs from "@/components/plugin/tabs";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
-
 import { list } from "@/mixins";
 import { getStockInListApi } from "@/api/storehouse/stock";
 import { PUT_STATUS } from "@/utils/declare";
-
 export default {
 	name: "allotPut",
 	components: { Tabs, AppWrapperEmpty },

+ 21 - 39
hdApp/src/admin/cg/code.vue

@@ -3,10 +3,7 @@
     <view class="img_box" style="margin-top:30upx;">
       <image :src="gatherUrl" mode="heightFix" class="img_url"></image>
     </view>
-    <view style="font-size:32upx;text-align: center;margin:15upx 0 5upx 0;">打印尺寸 100mmx150mm</view>
-    <view style="text-align: center;font-size:32upx;">
-      收款码算收入:<switch style="transform:scale(0.7,0.7)" :checked="gatherRepeat == 0 ? true : false" @change="gatherRepeatChangeFn" />{{ gatherRepeat==0?'是':'否' }}
-    </view>
+    <view style="font-size:32upx;text-align: center;margin:20upx 0 5upx 0;">打印尺寸 100mmx150mm</view>
     <view class="confirm-btn">
       <button class="admin-button-com big blue" style="width:60vw;" @click="downloadImg(gatherUrl)">下载收款码</button>
     </view>
@@ -14,51 +11,36 @@
 </template>
 <script>
 import { miniGatheringCode } from '@/api/shop'
-import { getExtInfo,modifyGatherRepeat } from '@/api/shop/ext'
 export default {
   data() {
     return {
-      gatherUrl:'',
-      gatherRepeat:0
+      gatherUrl:''
     }
   },
   methods: {
     init() {
       this.getImg()
-      getExtInfo().then(res=>{
-        if(res.code == 1){
-          this.gatherRepeat = res.data.ext.gatherRepeat
-        }
-      })
-    },
-    gatherRepeatChangeFn(e){
-      this.gatherRepeat = e.detail.value ? 0 : 1
-      modifyGatherRepeat({gatherRepeat:this.gatherRepeat}).then(res=>{
-        if(res.code == 1){
-          this.$msg(res.msg)
-        }
-      })
     },
     downloadImg(url){
-				// #ifdef APP-PLUS
-				let platformType = uni.getSystemInfoSync().platform
-				if(platformType == 'android'){
-					let store = plus.navigator.checkPermission('android.permission.READ_EXTERNAL_STORAGE')
-					if(store != 'authorized'){
-						this.$util.confirmModal({content:'将申请您的存储权限,用于保存小程序码'},() => {
-							this.downloadImg2(url)
-      			})
-					}else{
-						this.downloadImg2(url)
-					}
-				}else{
-					this.downloadImg2(url)
-				}
-				// #endif
-				// #ifdef MP-WEIXIN
-				this.downloadImg2(url)
-				// #endif
-		},
+            // #ifdef APP-PLUS
+            let platformType = uni.getSystemInfoSync().platform
+            if(platformType == 'android'){
+                let store = plus.navigator.checkPermission('android.permission.READ_EXTERNAL_STORAGE')
+                if(store != 'authorized'){
+                    this.$util.confirmModal({content:'将申请您的存储权限,用于保存小程序码'},() => {
+                        this.downloadImg2(url)
+            })
+                }else{
+                    this.downloadImg2(url)
+                }
+            }else{
+                this.downloadImg2(url)
+            }
+            // #endif
+            // #ifdef MP-WEIXIN
+            this.downloadImg2(url)
+            // #endif
+    },
     downloadImg2(url){
       uni.downloadFile({
         url: url,