shish пре 3 година
родитељ
комит
0f12dce4f0

+ 61 - 30
ghsApp/src/admin/billing/result.vue

@@ -1,18 +1,29 @@
 <template>
 <template>
   <appResult :title="option.title">
   <appResult :title="option.title">
-	<button v-if="option.title != '报损成功'" class="admin-button-com big" @click="gotoOrderDetail">订单详情</button>
-	<button class="admin-button-com big" @click="goBackHome">返回首页</button>
+
   <!-- #ifdef MP-WEIXIN -->
   <!-- #ifdef MP-WEIXIN -->
-  <button v-if="option.title != '报损成功'" class="admin-button-com big" @click="shareTo">打开分享给 {{customName}}</button>
+  <button v-if="option.title != '报损成功'" class="admin-button-com big blue" open-type="share">
+    分享给<text style="font-weight:bold;margin-left:12upx;">{{customName}}</text>
+  </button>
   <!-- #endif -->
   <!-- #endif -->
+  <!-- #ifdef APP-PLUS -->
+  <button v-if="option.title != '报损成功'" class="admin-button-com big blue" @click="shareOrder">
+    分享给<text style="font-weight:bold;margin-left:12upx;">{{customName}}</text>
+  </button>
+  <!-- #endif -->
+
+	<button v-if="option.title != '报损成功'" class="admin-button-com big" @click="gotoOrderDetail">订单详情</button>
+	<button class="admin-button-com big" @click="goBackHome">返回首页</button>
   </appResult>
   </appResult>
 </template>
 </template>
 <script>
 <script>
-import appResult from "@/components/app-result";
-import { getDetail} from "@/api/order/index";
-import { getWeixinId } from "@/api/invite/index";
+import { mapGetters } from "vuex"
+import appResult from "@/components/app-result"
+import { getDetail} from "@/api/order/index"
+import { getWeixinId } from "@/api/invite/index"
+import { IMGHOST } from '@/config'
 export default {
 export default {
-  name: "BillingResult",
+  name: "result",
   components: {
   components: {
     appResult,
     appResult,
   },
   },
@@ -21,32 +32,48 @@ export default {
     return {
     return {
       detailInfo: {},
       detailInfo: {},
       customName:'客户',
       customName:'客户',
-      getappIdList: {}
+      getappIdList: {},
+			title:'新订单'
     };
     };
   },
   },
+	computed: {
+		...mapGetters({ loginInfo: "getLoginInfo",dictInfo:"getDictionariesInfo" }),
+	},
+	onShareAppMessage(res) {
+		console.log("pagesOrder/showOrder?id="+this.detailInfo.purchaseId)
+		return {
+			title: this.title,
+			desc: "",
+      imageUrl: IMGHOST+'/custom/order_share.jpg',
+			path: "pagesOrder/showOrder?id="+this.detailInfo.purchaseId,
+		}
+	},
   methods: {
   methods: {
-    shareTo(){
-        // #ifdef APP-PLUS
-        this.$msg('暂时只支持小程序')
-        // #endif
-        if(this.$util.isEmpty(this.detailInfo)){
-          this.$msg('稍等3秒再点')
-          return false
-        }
-        let that = this
-        console.log('pagesPurchase/purDetails?id='+ that.detailInfo.purchaseId)
-        // #ifdef MP-WEIXIN
-        uni.navigateToMiniProgram({
-					appId: that.getappIdList.hd.miniAppId,
-					path: 'pagesPurchase/purDetails?id='+ that.detailInfo.purchaseId,
-					//develop 开发版 trial 体验版 release 正式版
-					envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
-					extraData: {},
-          success (res) {
-          }
-        })
-        // #endif
-    },
+		shareOrder(){
+			console.log("pagesOrder/showOrder?id="+this.detailInfo.purchaseId)
+			let that = this
+			let miniOriginalId = that.dictInfo.miniOriginalId && that.dictInfo.miniOriginalId.current && that.dictInfo.miniOriginalId.current.ghs ? that.dictInfo.miniOriginalId.current.ghs : ''
+			uni.share({
+				provider: "weixin", //分享服务提供商(即weixin|qq|sinaweibo)
+				scene: 'WXSceneSession', //场景,可取值参考下面说明。
+				type: 5, //分享形式
+				title: that.title, //分享内容的标题
+				summary: '暂无', //分享内容的摘要
+				imageUrl: IMGHOST+'/custom/order_share.jpg',//图片一定要有,不然会分享失败
+				miniProgram: {
+					id: miniOriginalId,//小程序原始id,发起分享的 App 与小程序属于同一微信开放平台帐号
+					path: "pagesOrder/showOrder?id="+this.detailInfo.purchaseId,
+					type: 0,// 0-正式版; 1-测试版; 2-体验版
+					webUrl: 'https://www.wixhb.com'
+				},
+				success: function(res) {
+					//console.log(res)
+				},
+				fail: function(err) {
+					//console.log(err)
+				}
+			})
+		},
     async init() {
     async init() {
       if (this.option.title != "报损成功") {
       if (this.option.title != "报损成功") {
 
 
@@ -58,6 +85,10 @@ export default {
           id: this.option.orderId,
           id: this.option.orderId,
         });
         });
         this.detailInfo = res.data;
         this.detailInfo = res.data;
+
+        let actPrice = this.detailInfo.actPrice ? parseFloat(this.detailInfo.actPrice) : 0
+        this.title = this.detailInfo.addTime.substr(5,11)+' ¥'+actPrice
+
         if(this.detailInfo.customName && !this.$util.isEmpty(this.detailInfo.customName)) {
         if(this.detailInfo.customName && !this.$util.isEmpty(this.detailInfo.customName)) {
           this.customName = this.detailInfo.customName
           this.customName = this.detailInfo.customName
         }
         }

+ 1 - 1
ghsApp/src/admin/home/apply.vue

@@ -77,7 +77,7 @@ export default {
                     title:'采购与供货商',
                     title:'采购与供货商',
                     list:[
                     list:[
                         {name: "供货商",img: `${this.$constant.imgUrl}/ghs/home/icon_ghs.png`,url: "/pagesPurchase/supplier"},
                         {name: "供货商",img: `${this.$constant.imgUrl}/ghs/home/icon_ghs.png`,url: "/pagesPurchase/supplier"},
-                        {name: "采购记录",img: `${this.$constant.imgUrl}/ghs/home/icon_caigou.png`,url: "/pagesPurchase/order"},
+                        {name: "采购入库",img: `${this.$constant.imgUrl}/ghs/home/icon_caigou.png`,url: "/pagesPurchase/order"},
                         {name: "采购设置",img: `${this.$constant.imgUrl}/ghs/home/icon_caigou.png`,url: "/admin/cg/set"},
                         {name: "采购设置",img: `${this.$constant.imgUrl}/ghs/home/icon_caigou.png`,url: "/admin/cg/set"},
                         {name: "结账记录",img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,url: "/admin/clear/list"}
                         {name: "结账记录",img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,url: "/admin/clear/list"}
                     ]
                     ]

+ 3 - 3
ghsApp/src/admin/home/workbench.vue

@@ -172,15 +172,15 @@ export default {
 				{ name: "商城", img: 'ghs/home/shop.png', url: "/admin/home/mall" },
 				{ name: "商城", img: 'ghs/home/shop.png', url: "/admin/home/mall" },
 				{ name: "改价", img: 'ghs/home/gj.png', url: "/admin/changePrice/list" },
 				{ name: "改价", img: 'ghs/home/gj.png', url: "/admin/changePrice/list" },
 				{ name: "花材", img: 'ghs/home/hcgl.png', url: "/admin/item/list" },
 				{ name: "花材", img: 'ghs/home/hcgl.png', url: "/admin/item/list" },
-				{name: "供货商", img: 'ghs/home/icon_ghs.png', url: '/pagesPurchase/supplier'},
-				{ name: "采购记录", img: 'ghs/home/icon_caigou.png', url: "/pagesPurchase/order" },
+				{ name: "采购入库", img: 'ghs/home/icon_caigou.png', url: "/pagesPurchase/order" },
 				{ name: "报损", img: 'ghs/home/kcyjs.png', url: "/admin/breakage/list" },
 				{ name: "报损", img: 'ghs/home/kcyjs.png', url: "/admin/breakage/list" },
 				{ name: "预售", img: 'ghs/home/kcyjs.png', url: "/admin/order/statBook" },
 				{ name: "预售", img: 'ghs/home/kcyjs.png', url: "/admin/order/statBook" },
-				{ name: "调拨出库", img: 'ghs/home/dbck.png', url: "/pagesStorehouse/allot/allotEx" },
 				{ name: "调拨入库", img: 'ghs/home/dbrk.png', url: "/pagesStorehouse/allot/allotPut" },
 				{ name: "调拨入库", img: 'ghs/home/dbrk.png', url: "/pagesStorehouse/allot/allotPut" },
+				{ name: "调拨出库", img: 'ghs/home/dbck.png', url: "/pagesStorehouse/allot/allotEx" },
 				{name : "结账记录", img : "ghs/home/kcyjs.png", url : "/admin/clear/customList"},
 				{name : "结账记录", img : "ghs/home/kcyjs.png", url : "/admin/clear/customList"},
 				{name : "支出", img : "ghs/home/kcyjs.png", url : "/admin/expend/list"},
 				{name : "支出", img : "ghs/home/kcyjs.png", url : "/admin/expend/list"},
 				{name : "员工", img : "/ghs/home/yggl.png", url : "/admin/staff/list"},
 				{name : "员工", img : "/ghs/home/yggl.png", url : "/admin/staff/list"},
+				{name : "库存预警", img : "/ghs/home/kcyjs.png", url : "/pagesStorehouse/stockWarn/manage"},
 			],
 			],
 			skSrc: `${this.$constant.imgUrl}/ghs/home/kj.png`,
 			skSrc: `${this.$constant.imgUrl}/ghs/home/kj.png`,
 			pfSrc: `${this.$constant.imgUrl}/ghs/home/pf.jpg`,
 			pfSrc: `${this.$constant.imgUrl}/ghs/home/pf.jpg`,

+ 18 - 12
ghsApp/src/pagesOrder/detail.vue

@@ -275,6 +275,7 @@ import BLE from "@/mixins/BLE";
 import { cloudPrintOrder, cancelOrder } from "@/api/order";
 import { cloudPrintOrder, cancelOrder } from "@/api/order";
 import { hasHitNavigate } from "@/api/map";
 import { hasHitNavigate } from "@/api/map";
 import { getWeixinId } from "@/api/invite/index";
 import { getWeixinId } from "@/api/invite/index";
+import { IMGHOST } from '@/config'
 export default {
 export default {
 	name: "orderDetail",
 	name: "orderDetail",
 	components: {
 	components: {
@@ -298,7 +299,8 @@ export default {
 			loading: false,
 			loading: false,
 			settlePrice:0,
 			settlePrice:0,
 			showCancelBtn: true,
 			showCancelBtn: true,
-			getappIdList: {}
+			getappIdList: {},
+			title:'新订单'
 		};
 		};
 	},
 	},
 	onPullDownRefresh() {
 	onPullDownRefresh() {
@@ -306,14 +308,6 @@ export default {
 		uni.stopPullDownRefresh()
 		uni.stopPullDownRefresh()
 		})
 		})
 	},
 	},
-	onShareAppMessage(res) {
-		console.log("pagesOrder/showOrder?id="+this.detailInfo.purchaseId)
-		return {
-			title: this.title,
-			desc: "",
-			path: "pagesOrder/showOrder?id="+this.detailInfo.purchaseId,
-		}
-	},
 	onShow() {
 	onShow() {
 
 
         getWeixinId().then(res => {
         getWeixinId().then(res => {
@@ -323,7 +317,16 @@ export default {
 		this.init();
 		this.init();
 	},
 	},
 	computed: {
 	computed: {
-		...mapGetters({ loginInfo: "getLoginInfo" }),
+		...mapGetters({ loginInfo: "getLoginInfo",dictInfo:"getDictionariesInfo" }),
+	},
+	onShareAppMessage(res) {
+		console.log("pagesOrder/showOrder?id="+this.detailInfo.purchaseId)
+		return {
+			title: this.title,
+			desc: "",
+			imageUrl: IMGHOST+'/custom/order_share.jpg',
+			path: "pagesOrder/showOrder?id="+this.detailInfo.purchaseId,
+		}
 	},
 	},
 	methods: {
 	methods: {
 		shareOrder(){
 		shareOrder(){
@@ -334,9 +337,9 @@ export default {
 				provider: "weixin", //分享服务提供商(即weixin|qq|sinaweibo)
 				provider: "weixin", //分享服务提供商(即weixin|qq|sinaweibo)
 				scene: 'WXSceneSession', //场景,可取值参考下面说明。
 				scene: 'WXSceneSession', //场景,可取值参考下面说明。
 				type: 5, //分享形式
 				type: 5, //分享形式
-				title: '查账和结账', //分享内容的标题
+				title: that.title, //分享内容的标题
 				summary: '暂无', //分享内容的摘要
 				summary: '暂无', //分享内容的摘要
-				imageUrl: IMGHOST+'/custom/hit_me_clear.jpg',//图片一定要有,不然会分享失败
+				imageUrl: IMGHOST+'/custom/order_share.jpg',//图片一定要有,不然会分享失败
 				miniProgram: {
 				miniProgram: {
 					id: miniOriginalId,//小程序原始id,发起分享的 App 与小程序属于同一微信开放平台帐号
 					id: miniOriginalId,//小程序原始id,发起分享的 App 与小程序属于同一微信开放平台帐号
 					path: "pagesOrder/showOrder?id="+this.detailInfo.purchaseId,
 					path: "pagesOrder/showOrder?id="+this.detailInfo.purchaseId,
@@ -604,6 +607,9 @@ export default {
 				});
 				});
 				this.detailInfo = res.data;
 				this.detailInfo = res.data;
 
 
+				let actPrice = this.detailInfo.actPrice ? parseFloat(this.detailInfo.actPrice) : 0
+				this.title = this.detailInfo.addTime.substr(5,11)+' ¥'+actPrice
+
 				this.settlePrice = Number(this.detailInfo.bookPrice) - Number(this.detailInfo.orderPrice)
 				this.settlePrice = Number(this.detailInfo.bookPrice) - Number(this.detailInfo.orderPrice)
 				this.settlePrice = parseFloat(this.settlePrice.toFixed(2))
 				this.settlePrice = parseFloat(this.settlePrice.toFixed(2))