فهرست منبع

app 扫码环境区分

shish 4 سال پیش
والد
کامیت
11426f55f0

+ 1 - 3
ghsApp/src/admin/billing/affirm.vue

@@ -60,7 +60,7 @@
 
         <view class="module-com input-line-wrap">
 					<view class="" v-if="isBilling">
-          <tui-list-cell class="line-cell" :hover="false" :arrow="false" @click="selectCustom">
+          <tui-list-cell class="line-cell" :hover="false" :arrow="false">
             <view class="tui-title">客户</view>
             <view class="tui-input">{{ form.customName }}</view>
           </tui-list-cell>
@@ -340,8 +340,6 @@ export default {
 		},
     init () {
       this._getDet();
-    },
-    selectCustom(){
     },
 		payWayChange(e){
 			let index = e.detail.value

+ 0 - 3
ghsApp/src/admin/cg/set.vue

@@ -71,9 +71,6 @@ export default {
         }
       })
     },
-    selectCustom(){
-      this.$util.pageTo({ url: '/admin/custom/selectCustom',query: {style:2}})
-    },
     formSubmit() {
       let that = this
       if(that.cgModel == 1){

+ 9 - 6
ghsApp/src/admin/custom/selectCustom.vue

@@ -21,8 +21,7 @@
                   <text v-else-if="item.level == 0" style="color:#999;">{{ item.levelName }}</text>
                   <text v-else>{{ item.levelName }}</text>
                 </span>
-                <span v-if="item.debtAmount > 0" class="debt-amount">欠<span class="amount_num">{{parseFloat(item.debtAmount)}}</span></span>
-                <button v-if="selectStyle == 1 && couldScan == true" class="admin-button-com mini default" style="margin-left:30upx;" @click.stop="pdaKd(item)">扫码开单</button>
+                <span v-if="item.debtAmount > 0" class="debt-amount">欠款<span class="amount_num">{{parseFloat(item.debtAmount)}}</span></span>
               </div>
             </div>
           </div>
@@ -101,10 +100,14 @@ export default {
       let style = this.option.style ? this.option.style : 1
       this.selectStyle = style
       if(style == 1){
-        //点开单选客户后再选花材
-        this.$util.pageTo({url: '/admin/billing/index',type:2,query: {customId: item.id,customName:item.name}})
+        //选择客户并开单情况
+        if(this.$util.isScanEnv()){
+          this.$util.pageTo({url: '/admin/billing/affirm',type:2,query: {customId: item.id}})
+        }else{
+          this.$util.pageTo({url: '/admin/billing/index',type:2,query: {customId: item.id}})
+        }
       }else if(style == 2){
-        //已经选完花材后重选客户
+        //用于选择客户并且需要返回的情况
         let pages = getCurrentPages();
         let prevPage = pages[ pages.length - 2 ];
         prevPage.$vm.form.customId = item.id;
@@ -271,7 +274,7 @@ export default {
     line-height: 1;
     color: #9397a4;
     .debt-amount{
-      margin-left:10upx;
+      margin-left:20upx;
       .amount_num{
         color:red;
         margin-left:5upx;

+ 1 - 1
ghsApp/src/admin/custom/visit.vue

@@ -47,7 +47,7 @@ import AppSearchModule from "@/components/module/app-search";
 import { list } from "@/mixins";
 import { getVisit } from "@/api/member";
 export default {
-  name: "selectCustom",
+  name: "customVisit",
   components: {
     TuiListCell,
     BadgeModule,

+ 10 - 10
ghsApp/src/admin/home/mall.vue

@@ -3,15 +3,15 @@
     <view class="img_box">
       <image :src="imgUrl" class="img_url"></image>
     </view>
-    <!-- 确认 -->
-      <div class="confirm-btn">
-        <button class="admin-button-com big blue" @click="downloadImg">保存图片</button>
-      </div>
-      <!-- #ifdef MP-WEIXIN -->
-      <div class="confirm-btn1">
-        <button class="admin-button-com big blue" @click="goToMallPt('pages/home/index')">打开商城</button>
-      </div>
-       <!-- #endif -->
+    <view style="margin:50upx 0 0 30upx;font-size:30upx;font-weight:bold;">保存图片分享给客户即可下单</view>
+    <div class="confirm-btn">
+      <button class="admin-button-com big blue" @click="downloadImg">保存图片</button>
+    </div>
+    <!-- #ifdef MP-WEIXIN -->
+    <!-- <div class="confirm-btn1">
+      <button class="admin-button-com big blue" @click="goToMallPt('pages/home/index')">打开商城</button>
+    </div> -->
+      <!-- #endif -->
   </view>
 </template>
 
@@ -97,7 +97,7 @@ export default {
 // 按钮
 .confirm-btn {
   width: calc(100% - 60upx);
-  margin: 100upx 30upx 20upx;
+  margin: 50upx 30upx 20upx;
   .admin-button-com {
     width: 100%;
   }

+ 19 - 5
ghsApp/src/admin/home/workbench.vue

@@ -54,8 +54,10 @@
 
 			<!-- 散客和花店开单 -->
 			<view class="tabs-head_bx">
-				<image @click="skKd()" :src="skSrc" mode="widthFix"></image>
-				<image @click="pageTo({ url: '/admin/custom/selectCustom',query: {style:1}})" :src="pfSrc" mode="widthFix" ></image>
+				<image v-if="isScanEnv==false" @click="skKd()" :src="skSrc" mode="widthFix"></image>
+				<image v-else @click="skKd()" :src="skSrc3" mode="widthFix"></image>
+				<image v-if="isScanEnv==false" @click="customKd()" :src="pfSrc" mode="widthFix" ></image>
+				<image v-else @click="customKd()" :src="pfSrc3" mode="widthFix" ></image>
 			</view>
 			
 			<!-- 使用手册 -->
@@ -120,6 +122,7 @@ export default {
 		AppAvatarModule,
     	noneHd,
 		loginModel,
+		isScanEnv:false
 	},
 	mixins: [productMins],
 	data() {
@@ -156,7 +159,9 @@ export default {
 				{ name: "总采购(元)", value: 0.00, url:'/admin/statistics/cgStat', type:1 }
 			],
 			skSrc: `${this.$constant.imgUrl}/ghs/home/sk.jpg`,
-			pfSrc: `${this.$constant.imgUrl}/ghs/home/pf.jpg`
+			pfSrc: `${this.$constant.imgUrl}/ghs/home/pf.jpg`,
+			skSrc3: `${this.$constant.imgUrl}/ghs/home/sk3.jpg`,
+			pfSrc3: `${this.$constant.imgUrl}/ghs/home/pf3.jpg`
 		};
 	},
 	onShareAppMessage(res) {
@@ -172,7 +177,9 @@ export default {
 		...mapGetters({ myShopInfo: "getMyShopInfo" }),
 	},
 	onLoad(option) {
-
+		if(this.$util.isScanEnv()){
+			this.isScanEnv = true
+		}
 	},
 	onPullDownRefresh() {
 		this.init();
@@ -239,6 +246,9 @@ export default {
 				})
 			})
 		},
+		customKd(){
+			this.pageTo({ url: '/admin/custom/selectCustom',query: {style:1}})
+		},
 		skKd(){
 			let that = this
 			let currentId = 0;
@@ -249,7 +259,11 @@ export default {
 				currentId = this.loginInfo.skCustomId
 			}
 			if(currentId > 0){
-				this.$util.pageTo({url: "/admin/billing/index",query: {customId: currentId}})
+				if(this.$util.isScanEnv()){
+					this.$util.pageTo({url: "/admin/billing/affirm",query: {customId: currentId}})
+				}else{
+					this.$util.pageTo({url: "/admin/billing/index",query: {customId: currentId}})
+				}
 			}else{
 				that.$util.confirmModal({content:'请设置您的零售店',okText:'好的',cancelText:'取消'},() => {
 					that.$util.pageTo({url: '/admin/shop/sk'})	

+ 13 - 1
ghsApp/src/utils/util.js

@@ -406,6 +406,17 @@ export const confirmModal = (item,okCallback=null,cancelCallback=null) => {
 	})
 	//#endif
 }
+//判断是否有扫码的条件
+export const isScanEnv = () =>{
+	let isScanEnv = false
+	if(plus.device.vendor == 'SUNMI'){
+		isScanEnv = true
+	}
+	if(plus.device.vendor == 'Newland'){
+		isScanEnv = true
+	}
+	return isScanEnv
+}
 export default {
 	isEmpty,
 	copyObject,
@@ -427,5 +438,6 @@ export default {
 	noStockRemind,
 	callUp,
 	hitRemind,
-	confirmModal
+	confirmModal,
+	isScanEnv
 };