Explorar o código

花掌柜收银起新项目

shish %!s(int64=3) %!d(string=hai) anos
pai
achega
733316e0a2

+ 1 - 1
hdPad/src/config.js

@@ -1,4 +1,4 @@
-export const ProjectName = 'hdPad'
+export const ProjectName = 'hd'
 export const APIHOST = 'https://api.shop.huaml.com'
 export const APIHOST = 'https://api.shop.huaml.com'
 export const IMGHOST = 'https://img.huaml.com'
 export const IMGHOST = 'https://img.huaml.com'
 export const CURRENT_ENV = 'dev'
 export const CURRENT_ENV = 'dev'

+ 6 - 43
hdPad/src/manifest.json

@@ -2,8 +2,8 @@
     "name" : "花掌柜",
     "name" : "花掌柜",
     "appid" : "__UNI__4079DC1",
     "appid" : "__UNI__4079DC1",
     "description" : "花店管家婆",
     "description" : "花店管家婆",
-    "versionName" : "1.1.6",
-    "versionCode" : 116,
+    "versionName" : "1.1.9",
+    "versionCode" : 119,
     "transformPx" : true,
     "transformPx" : true,
     /* 5+App特有相关 */
     /* 5+App特有相关 */
     "app-plus" : {
     "app-plus" : {
@@ -22,12 +22,6 @@
         },
         },
         "orientation" : [ "landscape" ],
         "orientation" : [ "landscape" ],
         "modules" : {
         "modules" : {
-            "OAuth" : {},
-            "Payment" : {},
-            "Push" : {},
-            "Share" : {},
-            "VideoPlayer" : {},
-            "Bluetooth" : {},
             "Contacts" : {}
             "Contacts" : {}
         },
         },
         /* 应用发布信息 */
         /* 应用发布信息 */
@@ -79,7 +73,7 @@
                     "NSPhotoLibraryAddUsageDescription" : "该应用需要读取您的相册,以便支持您修改头像、门店图片或花材图片",
                     "NSPhotoLibraryAddUsageDescription" : "该应用需要读取您的相册,以便支持您修改头像、门店图片或花材图片",
                     "NSCameraUsageDescription" : "该应用需要获取您的摄像头权限,以便支持您直接拍照上传头像、门店图片或花材图片"
                     "NSCameraUsageDescription" : "该应用需要获取您的摄像头权限,以便支持您直接拍照上传头像、门店图片或花材图片"
                 },
                 },
-                "idfa" : false
+                "idfa" : false            
             },
             },
             /* SDK配置 */
             /* SDK配置 */
             "sdkConfigs" : {
             "sdkConfigs" : {
@@ -87,9 +81,7 @@
                     "ifly" : {}
                     "ifly" : {}
                 },
                 },
                 "ad" : {},
                 "ad" : {},
-                "oauth" : {
-                    "univerify" : {}
-                },
+                "oauth" : {},
                 "push" : {
                 "push" : {
                     "unipush" : {}
                     "unipush" : {}
                 }
                 }
@@ -128,42 +120,13 @@
                 }
                 }
             }
             }
         },
         },
-        "nativePlugins" : {
-            "G5KJ-ShangMiPrint" : {
-                "__plugin_info__" : {
-                    "name" : "商米内置打印机与扫码",
-                    "description" : "实现商米内置打印机与外接usb扫码枪识别",
-                    "platforms" : "Android",
-                    "url" : "https://ext.dcloud.net.cn/plugin?id=3514",
-                    "android_package_name" : "zhh.huahuibao.hhb.app",
-                    "ios_bundle_id" : "com.zhh.hhb",
-                    "isCloud" : true,
-                    "bought" : 1,
-                    "pid" : "3514",
-                    "parameters" : {}
-                }
-            },
-            "Html5app-Gprinter" : {
-                "__plugin_info__" : {
-                    "name" : "Android 和 IOS 佳博 蓝牙小票 标签 打印插件",
-                    "description" : "Android / IOS 佳博小票 、标签 打印机插件,QQ交流群:891416757",
-                    "platforms" : "Android,iOS",
-                    "url" : "https://ext.dcloud.net.cn/plugin?id=462",
-                    "android_package_name" : "zhh.huahuibao.hhb.app",
-                    "ios_bundle_id" : "",
-                    "isCloud" : true,
-                    "bought" : 1,
-                    "pid" : "462",
-                    "parameters" : {}
-                }
-            }
-        }
+        "nativePlugins" : {}
     },
     },
     /* 快应用特有相关 */
     /* 快应用特有相关 */
     "quickapp" : {},
     "quickapp" : {},
     /* 小程序特有相关 线上(花掌柜) wx0d42f5f1dcb3a370 开发(花美玲) wxe4675bab299a52f7 */
     /* 小程序特有相关 线上(花掌柜) wx0d42f5f1dcb3a370 开发(花美玲) wxe4675bab299a52f7 */
     "mp-weixin" : {
     "mp-weixin" : {
-        "appid" : "wx0d42f5f1dcb3a370",
+        "appid" : "wxe4675bab299a52f7",
         "setting" : {
         "setting" : {
             "urlCheck" : false
             "urlCheck" : false
         },
         },

+ 0 - 18
hdPad/src/mixins/scan.js

@@ -1,6 +1,4 @@
 // #ifdef APP-PLUS
 // #ifdef APP-PLUS
-const shangMiPrint = uni.requireNativePlugin('G5KJ-ShangMiPrint')
-const globalEvent = uni.requireNativePlugin('globalEvent')
 export default {
 export default {
 	data() {
 	data() {
 		return {
 		return {
@@ -11,22 +9,6 @@ export default {
     },
     },
 	methods: {
 	methods: {
         listenScan(){
         listenScan(){
-            let that = this
-            //商米收银台
-            if(plus.device.vendor == 'SUNMI'){
-                //https://ext.dcloud.net.cn/plugin?id=3514
-                //初始化
-                shangMiPrint.init()
-                //扫码返回
-                globalEvent.addEventListener('scancode',function(e){
-                    if(e.code == 'ok'){
-                        let productIdCode = e.data
-                        //that.$msg(productIdCode)
-                        uni.$emit('listenGetScanCode',{code:productIdCode})
-                    }
-                })
-                console.log('商米监听扫码...')
-            }
         }
         }
     }
     }
 }
 }

+ 1 - 410
hdPad/src/pages/home/blue.vue

@@ -1,413 +1,4 @@
 <template>
 <template>
 <view class="app-content">
 <view class="app-content">
-	<view class="content">
-		<view>
-			<button @click="openDefault" >连接</button>
-			<!-- <button @click="open" >打开自定义蓝牙搜索页面</button>
-			<button @click="connectIP" >端口ip连接标签机</button>
-			<button @click="connectUSB" >USB 连接标签机</button> -->
-			<!-- <button @click="printer" >打印小票</button> -->
-			<!-- <button @click="printerLable" >打印样签</button>	 -->
-			<!-- <button @click="writePDFToTsc" >标签打印PDF</button>
-			<button @click="writePDFToEsc" >小票打印PDF</button>
-			<button @click="writeTSC" >tsc指令打印</button> -->
-			<!-- <button @click="state" >标签机状态</button> -->
-			<button @click="dis" >断开</button>
-			<text style="font-size:10upx;">{{tip}}</text>
-		</view>
-	</view>
 </view>
 </view>
-</template>
-<script>
-// #ifdef APP-PLUS
-const plug= uni.requireNativePlugin('Html5app-Gprinter')
-// #endif
-export default {
-	data() {
-		return {
-			tip: ''
-		}
-	},
-	methods: {
-		openDefault()
-		{
-			//蓝牙连接标签机
-			const that=this;
-			plug.BluetoothPort({setBackgroundColor:"#2088d2"},result=>{
-				if(result.code == 3){
-					that.$msg('连接成功')
-					setTimeout(function(){
-						uni.navigateBack()
-					},2000)
-					that.tip=''
-				}else{
-					that.tip=JSON.stringify(result)
-				}
-			})
-		},
-		open(){
-			uni.navigateTo({ "url":"./Bluetooth" })
-		},
-		connectIP()
-		{
-			//端口网络连接
-			let that=this;
-			plug.connectIP({},ret=>{	
-				that.tip=JSON.stringify(ret)
-			})
-		},
-		connectUSB()
-		{
-			//USB网络连接
-			let that=this;
-			plug.connectUSB({setBackgroundColor:"#2088d2"},ret=>{	
-				that.tip=JSON.stringify(ret)
-			});
-		},
-		state(){
-			//查询标签机状态
-			let that=this;
-			plug.state({},ret=>{
-				that.tip=JSON.stringify(ret.msg)
-			});
-		},
-		dis()
-		{
-			//断开标签机
-			let that=this;
-			plug.disconnect({},ret=>{	
-				that.tip=JSON.stringify(ret.msg)
-			});
-		},
-		printer(){
-			//标签机小票
-			const that=this;
-			plug.printer({"ESC":that.setDate()},ret=>{
-				that.tip=JSON.stringify(ret)
-			})
-		},
-		printerLable(){
-			//打印标签
-			const that=this;
-			plug.printer({"TSC":that.OrderLable('粉红雪山','11054')},ret=>{
-				that.tip=JSON.stringify(ret);
-			})
-		},
-		writePDFToTsc()
-		{
-			//打印pdf 档标签文件
-			let filePath=plus.io.convertLocalFileSystemURL("static/pdfFile.pdf");
-			plug.writePDFToTsc({filePath:filePath,width:400},ret=>{
-			
-			});
-		},
-		writePDFToEsc()
-		{
-			//打印pdf 档小票文件
-			let filePath=plus.io.convertLocalFileSystemURL("static/pdfFile.pdf");
-			plug.writePDFToEsc({filePath:filePath,width:400},ret=>{
-			
-			});
-		},
-		writeTSC()
-		{
-			//打印图片和文字
-			let image=plus.io.convertLocalFileSystemURL("static/gprinter.png");
-			
-			//图片指令,BITMAP x,y,宽度,图片路径 ,四个参数组成
-			
-			const that=this;
-			let str="SIZE 40 mm,15 mm \n";
-				str+="GAP 2 mm,0 mm \n";
-				str+"SET RESPONSE NO \n";
-				str+="CLS \n";
-				str+="TEXT 50,50,\"3\",0,1,1,\"DEMO FOR TEXT\" \n";
-				str+="BITMAP 20,20,100,"+image+" \n";
-				str+=" PRINT 1 \n";
-
-			plug.writeTSC({"tsc":str},function(e){
-					that.tip=JSON.stringify(e);
-			});
-			
-		},
-		setDate()
-		{
-			//打印小票
-			const that=this;
-			
-			//制作小票格式, 
-			var data=[];  //定义一个数组
-			var line={};  //每添加一个,代表一行字
-			
-			var filePath=plus.io.convertLocalFileSystemURL("static/gprinter.png");
-			//加入logo图片
-			var Path=filePath; 
-			line.image=Path;
-			line.width="350";
-			line.center="center";
-			line.bottom="1";
-			data.push(line);
-			
-			line={};
-			line.text="万达广场欢迎您";
-			line.center="center";
-			line.font="max";
-			line.bottom="3";
-			data.push(line); //每添加一个,代表一行字
-
-			line={};
-			line.text="收银员:00056";
-			line.center="left";
-			line.font="bold";
-			line.bottom="2";
-			data.push(line);
-			
-			line={};  
-			line.text="单号:00256933";
-			line.center="left";
-			line.font="normal";
-			line.bottom="2";
-			data.push(line);
-			
-			line={};  
-			line.text="业务日期:2019-05-30 18:15:25";
-			line.center="left";
-			line.font="normal";
-			line.bottom="1";
-			data.push(line);
-			
-			line={};
-			line.text="------------------------------";
-			line.center="left";
-			line.font="normal";
-			line.bottom="1";
-			data.push(line);
-			
-			//商品列表,示例
-			for(let i=0;i<4;i++)
-			{
-							
-			line={};
-			line.text="商品名称:小黑瓶眼霜";
-			line.center="left";
-			line.font="normal";
-			line.bottom="1";
-			data.push(line);
-			
-			line={};
-			line.title=["数量:1","单价:305","金额:305"];
-			line.left=[0,30,60];
-			line.center="left";
-			line.font="normal";
-			line.bottom="2";
-			data.push(line);
-								
-			}
-			
-			line={}; //清空一下
-			
-			line.text="------------------------------";
-			line.center="left";
-			line.font="normal";
-			line.bottom="2";
-			data.push(line);
-			
-			line={};
-			line.text="数量:4 ,金额:¥1220.00";
-			line.center="left";
-			line.font="bold";
-			line.bottom="1";
-			data.push(line);
-			
-			line={};
-			line.text="实收金额:¥1220.00";
-			line.center="left";
-			line.font="bold";
-			line.bottom="2";
-			data.push(line);
-			
-			line={};
-			line.text="活动期间满500送100";
-			line.center="left";
-			line.font="normal";
-			line.bottom="1";
-			data.push(line);
-			line={};
-			line.text="折让金额500";
-			line.center="left";
-			line.font="normal";
-			line.bottom="1";
-			data.push(line);
-			line={};
-			line.text="折后金额2029";
-			line.center="left";
-			line.font="normal";
-			line.bottom="3";
-			data.push(line);
-			
-			line={};
-			line.text="30天内可凭小票换开发票";
-			line.center="left";
-			line.font="normal";
-			line.bottom="2";
-			data.push(line);
-			line={};
-			line.text="活动商品,不退不换";
-			line.center="left";
-			line.font="normal";
-			line.bottom="2";
-			data.push(line);
-			
-			//加入条型码
-			line={};
-			line.barcode="2019563352660";
-			line.type="CODE128";
-			line.height="100";
-			line.position="BELOW";
-			line.width="2";
-			line.center="center";
-			line.bottom="2";
-			data.push(line);
-			
-			
-				//加入二维码
-			line={};
-			line.qrcode="d68242b5e540aa7f21173c2d65b2c5ad";
-			line.size="10";
-			line.center="center";
-			line.bottom="0";
-			line.errorlevel="L";
-			
-			
-			data.push(line);
-			
-			// line={};
-			// //加入图片
-			// line.image="http://www.html5-app.com/uploads/file/20190307/20190307172436572807.png";
-			// line.width="150";
-			// line.center="center";
-			// line.bottom="3";
-			// data.push(line);
-				
-			return data;
-			
-		},
-		OrderLable(itemName,itemId){
-			
-			//制作标签格式, 
-			var data=[];  //定义一个数组
-			var line={};  //每添加一个,代表一行字
-			
-			//设置标签纸大小
-			line={};
-			line.width=30; //mm
-			line.height=20; //mm
-			line.gap=2; //标签纸之间,间隙长度 mm
-			line.page=1; //打印几份
-			data.push(line); //每添加一个,代表一行字
-
-				//添加文字
-			line={};
-			line.text= itemName;
-			line.rotation=0;
-			line.x=35;
-			line.y=20;
-			line.xscal=1;
-			line.yscal=1;
-			data.push(line); //每添加一个,代表一行字
-
-			//添加条型码
-			line={};
-			line.barcode=itemId;
-			line.x=35;
-			line.y=55;
-			line.type="CODE128";
-			line.height=50;
-			line.readable=true;
-			line.rotation=0;
-			data.push(line);
-
-			return data;
-		},
-		Lable(){
-			
-			//制作标签格式, 
-			var data=[];  //定义一个数组
-			var line={};  //每添加一个,代表一行字
-			
-			//设置标签纸大小
-			line={};
-			line.width=40; //mm
-			line.height=30; //mm
-			line.gap=3; //标签纸之间,间隙长度 mm
-			line.page=1; //打印几份
-			data.push(line); //每添加一个,代表一行字
-
-			//添加图片
-			line={};
-			line.image="http://www.html5-app.com/gprinter.png";
-			line.x=30;
-			line.y=20;
-			line.width=70;
-			data.push(line);
-			
-			
-				//添加文字
-			line={};
-			line.text="HTML5+混合APP开发社区";
-			line.rotation=0;
-			line.x=30;
-			line.y=90;
-			line.xscal=1;
-			line.yscal=1;
-			data.push(line); //每添加一个,代表一行字
-			
-			//添加条型码
-			line={};
-			line.barcode="2019563352660";
-			line.x=30;
-			line.y=130;
-			line.type="CODE128";
-			line.height=50;
-			line.readable=true;
-			line.rotation=0;
-			data.push(line);
-			
-				//加入二维码
-			line={};
-			line.qrcode="1234566";	
-			line.x=190;
-			line.y=20;
-			line.width=3
-			line.rotation=0;
-			data.push(line);
-			
-			//添加黑块
-			line={};
-			line.addBar={x:25,y:2,width:300,height:3};
-			data.push(line);
-			
-			//添加方框
-			line={};
-			line.addBox={x:25,y:15,xend:300,yend:120,thickness:2};
-			data.push(line);
-			
-			return data;
-		}
-
-	}
-}
-</script>
-<style>
-	.content {
-		margin: 10px;
-		margin-top:30px;
-	}
-	button{ 
-		margin-bottom: 25px;
-		background-color: #3385ff;
-		color:white;
-		height:35upx;
-		line-height: 35upx;
-	}
-</style>
+</template>

+ 1 - 1
hdPad/src/pages/home/components/selectNumPrice.vue

@@ -32,7 +32,7 @@
             </view>
             </view>
 
 
             <view style="text-align:center;" v-if="customData.property==0">
             <view style="text-align:center;" v-if="customData.property==0">
-                <button class="admin-button-com mini-btn blue" @click="clear()">直接结算</button>
+                <button class="admin-button-com mini-btn blue" style="font-size:18upx;" @click="clear()">直接结算</button>
             </view>
             </view>
 
 
         </view>
         </view>

+ 4 - 41
开发/hdPad/src/manifest.json

@@ -2,8 +2,8 @@
     "name" : "花掌柜",
     "name" : "花掌柜",
     "appid" : "__UNI__4079DC1",
     "appid" : "__UNI__4079DC1",
     "description" : "花店管家婆",
     "description" : "花店管家婆",
-    "versionName" : "1.1.6",
-    "versionCode" : 116,
+    "versionName" : "1.1.9",
+    "versionCode" : 119,
     "transformPx" : true,
     "transformPx" : true,
     /* 5+App特有相关 */
     /* 5+App特有相关 */
     "app-plus" : {
     "app-plus" : {
@@ -22,12 +22,6 @@
         },
         },
         "orientation" : [ "landscape" ],
         "orientation" : [ "landscape" ],
         "modules" : {
         "modules" : {
-            "OAuth" : {},
-            "Payment" : {},
-            "Push" : {},
-            "Share" : {},
-            "VideoPlayer" : {},
-            "Bluetooth" : {},
             "Contacts" : {}
             "Contacts" : {}
         },
         },
         /* 应用发布信息 */
         /* 应用发布信息 */
@@ -87,9 +81,7 @@
                     "ifly" : {}
                     "ifly" : {}
                 },
                 },
                 "ad" : {},
                 "ad" : {},
-                "oauth" : {
-                    "univerify" : {}
-                },
+                "oauth" : {},
                 "push" : {
                 "push" : {
                     "unipush" : {}
                     "unipush" : {}
                 }
                 }
@@ -128,36 +120,7 @@
                 }
                 }
             }
             }
         },
         },
-        "nativePlugins" : {
-            "G5KJ-ShangMiPrint" : {
-                "__plugin_info__" : {
-                    "name" : "商米内置打印机与扫码",
-                    "description" : "实现商米内置打印机与外接usb扫码枪识别",
-                    "platforms" : "Android",
-                    "url" : "https://ext.dcloud.net.cn/plugin?id=3514",
-                    "android_package_name" : "zhh.huahuibao.hhb.app",
-                    "ios_bundle_id" : "com.zhh.hhb",
-                    "isCloud" : true,
-                    "bought" : 1,
-                    "pid" : "3514",
-                    "parameters" : {}
-                }
-            },
-            "Html5app-Gprinter" : {
-                "__plugin_info__" : {
-                    "name" : "Android 和 IOS 佳博 蓝牙小票 标签 打印插件",
-                    "description" : "Android / IOS 佳博小票 、标签 打印机插件,QQ交流群:891416757",
-                    "platforms" : "Android,iOS",
-                    "url" : "https://ext.dcloud.net.cn/plugin?id=462",
-                    "android_package_name" : "zhh.huahuibao.hhb.app",
-                    "ios_bundle_id" : "",
-                    "isCloud" : true,
-                    "bought" : 1,
-                    "pid" : "462",
-                    "parameters" : {}
-                }
-            }
-        }
+        "nativePlugins" : {}
     },
     },
     /* 快应用特有相关 */
     /* 快应用特有相关 */
     "quickapp" : {},
     "quickapp" : {},

+ 4 - 41
线上/hdPad/src/manifest.json

@@ -2,8 +2,8 @@
     "name" : "花掌柜",
     "name" : "花掌柜",
     "appid" : "__UNI__4079DC1",
     "appid" : "__UNI__4079DC1",
     "description" : "花店管家婆",
     "description" : "花店管家婆",
-    "versionName" : "1.1.8",
-    "versionCode" : 118,
+    "versionName" : "1.1.9",
+    "versionCode" : 119,
     "transformPx" : true,
     "transformPx" : true,
     /* 5+App特有相关 */
     /* 5+App特有相关 */
     "app-plus" : {
     "app-plus" : {
@@ -22,12 +22,6 @@
         },
         },
         "orientation" : [ "landscape" ],
         "orientation" : [ "landscape" ],
         "modules" : {
         "modules" : {
-            "OAuth" : {},
-            "Payment" : {},
-            "Push" : {},
-            "Share" : {},
-            "VideoPlayer" : {},
-            "Bluetooth" : {},
             "Contacts" : {}
             "Contacts" : {}
         },
         },
         /* 应用发布信息 */
         /* 应用发布信息 */
@@ -87,9 +81,7 @@
                     "ifly" : {}
                     "ifly" : {}
                 },
                 },
                 "ad" : {},
                 "ad" : {},
-                "oauth" : {
-                    "univerify" : {}
-                },
+                "oauth" : {},
                 "push" : {
                 "push" : {
                     "unipush" : {}
                     "unipush" : {}
                 }
                 }
@@ -128,36 +120,7 @@
                 }
                 }
             }
             }
         },
         },
-        "nativePlugins" : {
-            "G5KJ-ShangMiPrint" : {
-                "__plugin_info__" : {
-                    "name" : "商米内置打印机与扫码",
-                    "description" : "实现商米内置打印机与外接usb扫码枪识别",
-                    "platforms" : "Android",
-                    "url" : "https://ext.dcloud.net.cn/plugin?id=3514",
-                    "android_package_name" : "zhh.huahuibao.hhb.app",
-                    "ios_bundle_id" : "com.zhh.hhb",
-                    "isCloud" : true,
-                    "bought" : 1,
-                    "pid" : "3514",
-                    "parameters" : {}
-                }
-            },
-            "Html5app-Gprinter" : {
-                "__plugin_info__" : {
-                    "name" : "Android 和 IOS 佳博 蓝牙小票 标签 打印插件",
-                    "description" : "Android / IOS 佳博小票 、标签 打印机插件,QQ交流群:891416757",
-                    "platforms" : "Android,iOS",
-                    "url" : "https://ext.dcloud.net.cn/plugin?id=462",
-                    "android_package_name" : "zhh.huahuibao.hhb.app",
-                    "ios_bundle_id" : "",
-                    "isCloud" : true,
-                    "bought" : 1,
-                    "pid" : "462",
-                    "parameters" : {}
-                }
-            }
-        }
+        "nativePlugins" : {}
     },
     },
     /* 快应用特有相关 */
     /* 快应用特有相关 */
     "quickapp" : {},
     "quickapp" : {},