|
|
@@ -245,17 +245,29 @@
|
|
|
|
|
|
<block v-if="!$util.isEmpty(getLoginInfo.admin) && getLoginInfo.admin.currentGhsShopId > 0">
|
|
|
<view class="app-footer open_btn" v-if="detailInfo.location == 0">
|
|
|
- <view v-if="detailInfo.status != 3" @click="changePrice()" class="admin-button-com big blue">修改价格</view>
|
|
|
- <view v-if="detailInfo.status == 2 || detailInfo.status == 3 || detailInfo.status == 4" @click="printBillFn(detailInfo)" class="admin-button-com big blue">打印({{detailInfo.printNum}})</view>
|
|
|
- <view v-if="detailInfo.status == 3" @click="cancelIn()" class="admin-button-com big blue">取消入库</view>
|
|
|
- <view v-if="detailInfo.status == 3" @click="changePrice()" class="admin-button-com big blue">入库和改价</view>
|
|
|
+ <!-- #ifdef MP-WEIXIN -->
|
|
|
+ <button class="admin-button-com middle blue" open-type="share">分享</button>
|
|
|
+ <!-- #endif -->
|
|
|
+ <!-- #ifdef APP-PLUS -->
|
|
|
+ <view @click="shareOrder()" class="admin-button-com middle blue">分享</view>
|
|
|
+ <!-- #endif -->
|
|
|
+ <view v-if="detailInfo.status != 3" @click="changePrice()" class="admin-button-com middle blue">修改价格</view>
|
|
|
+ <view v-if="detailInfo.status == 2 || detailInfo.status == 3 || detailInfo.status == 4" @click="printBillFn(detailInfo)" class="admin-button-com middle blue">打印({{detailInfo.printNum}})</view>
|
|
|
+ <view v-if="detailInfo.status == 3" @click="cancelIn()" class="admin-button-com middle blue">取消入库</view>
|
|
|
+ <view v-if="detailInfo.status == 3" @click="changePrice()" class="admin-button-com middle blue">入库和改价</view>
|
|
|
</view>
|
|
|
|
|
|
<view class="app-footer open_btn" v-else>
|
|
|
- <view v-if="detailInfo.status != 3" @click="changePrice()" class="admin-button-com big blue">修改价格</view>
|
|
|
- <view v-if="detailInfo.status == 2 || detailInfo.status == 3 || detailInfo.status == 4" @click="printBillFn(detailInfo)" class="admin-button-com big blue">打印({{detailInfo.printNum}})</view>
|
|
|
- <view v-if="detailInfo.status == 3" @click="cancelIn()" class="admin-button-com big blue">取消入库</view>
|
|
|
- <view v-if="detailInfo.status == 3" @click="changePrice()" class="admin-button-com big blue">入库和改价</view>
|
|
|
+ <!-- #ifdef MP-WEIXIN -->
|
|
|
+ <button class="admin-button-com middle blue" open-type="share">分享</button>
|
|
|
+ <!-- #endif -->
|
|
|
+ <!-- #ifdef APP-PLUS -->
|
|
|
+ <view @click="shareOrder()" class="admin-button-com middle blue">分享</view>
|
|
|
+ <!-- #endif -->
|
|
|
+ <view v-if="detailInfo.status != 3" @click="changePrice()" class="admin-button-com middle blue">修改价格</view>
|
|
|
+ <view v-if="detailInfo.status == 2 || detailInfo.status == 3 || detailInfo.status == 4" @click="printBillFn(detailInfo)" class="admin-button-com middle blue">打印({{detailInfo.printNum}})</view>
|
|
|
+ <view v-if="detailInfo.status == 3" @click="cancelIn()" class="admin-button-com middle blue">取消入库</view>
|
|
|
+ <view v-if="detailInfo.status == 3" @click="changePrice()" class="admin-button-com middle blue">入库和改价</view>
|
|
|
</view>
|
|
|
</block>
|
|
|
|
|
|
@@ -281,6 +293,7 @@ import ModalModule from "@/components/plugin/modal"
|
|
|
import { print } from '@/api/product';
|
|
|
import { getPrint } from "@/api/shop";
|
|
|
import { mapGetters } from "vuex";
|
|
|
+import { IMGHOST } from '@/config'
|
|
|
export default {
|
|
|
name: "info",
|
|
|
components: {
|
|
|
@@ -288,7 +301,8 @@ export default {
|
|
|
ModalModule
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters(["getLoginInfo"])
|
|
|
+ ...mapGetters(["getLoginInfo"]),
|
|
|
+ ...mapGetters({ dictInfo:"getDictionariesInfo" }),
|
|
|
},
|
|
|
mixins: [productMins],
|
|
|
data() {
|
|
|
@@ -309,7 +323,8 @@ export default {
|
|
|
T:null,
|
|
|
orderSn:'',
|
|
|
salt:'',
|
|
|
- showSeat:1
|
|
|
+ showSeat:1,
|
|
|
+ title:''
|
|
|
};
|
|
|
},
|
|
|
onPullDownRefresh() {
|
|
|
@@ -323,6 +338,15 @@ export default {
|
|
|
onUnload(){
|
|
|
clearInterval(this.T)
|
|
|
},
|
|
|
+ onShareAppMessage(res) {
|
|
|
+ console.log("pagesPurchase/info?orderSn="+this.detailInfo.orderSn+'&salt='+this.detailInfo.salt)
|
|
|
+ return {
|
|
|
+ title: this.title,
|
|
|
+ desc: "",
|
|
|
+ imageUrl: IMGHOST+'/custom/cg_share.jpg',
|
|
|
+ path: "pagesPurchase/info?orderSn="+this.detailInfo.orderSn+'&salt='+this.detailInfo.salt,
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
changeView(){
|
|
|
if(this.showSeat == 0){
|
|
|
@@ -417,6 +441,31 @@ export default {
|
|
|
this.printLabelShow = true
|
|
|
this.printNum = item.itemNum
|
|
|
},
|
|
|
+ shareOrder(){
|
|
|
+ console.log("pagesPurchase/info?orderSn="+this.detailInfo.orderSn+'&salt='+this.detailInfo.salt)
|
|
|
+ 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/cg_share.jpg',//图片一定要有,不然会分享失败
|
|
|
+ miniProgram: {
|
|
|
+ id: miniOriginalId,//小程序原始id,发起分享的 App 与小程序属于同一微信开放平台帐号
|
|
|
+ path: "pagesPurchase/info?orderSn="+this.detailInfo.orderSn+'&salt='+this.detailInfo.salt,
|
|
|
+ type: 0,// 0-正式版; 1-测试版; 2-体验版
|
|
|
+ webUrl: 'https://www.wixhb.com'
|
|
|
+ },
|
|
|
+ success: function(res) {
|
|
|
+ //console.log(res)
|
|
|
+ },
|
|
|
+ fail: function(err) {
|
|
|
+ //console.log(err)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
changePrice(){
|
|
|
this.$util.pageTo({url: "/pagesPurchase/components/pageSuccess?orderSn="+this.detailInfo.orderSn+"&id="+this.detailInfo.id+"&status="+this.detailInfo.status,type:2})
|
|
|
},
|
|
|
@@ -551,6 +600,12 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ let ghsName = this.detailInfo.ghsName ? this.detailInfo.ghsName : ''
|
|
|
+ let actPrice = this.detailInfo.actPrice ? parseFloat(this.detailInfo.actPrice) : 0
|
|
|
+ this.title = ghsName+' '+this.detailInfo.entryTime.substr(5,11)+' ¥'+actPrice
|
|
|
+ if(this.detailInfo.tkPrice && Number(this.detailInfo.tkPrice)>0){
|
|
|
+ this.title = this.title+' 已退¥'+parseFloat(this.detailInfo.tkPrice)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
};
|