|
|
@@ -20,6 +20,7 @@
|
|
|
<view class="bar-content">
|
|
|
<button class="admin-button-com big blue" @click="batchFh()">全部发货</button>
|
|
|
<button class="admin-button-com big blue" style="margin-left: 50upx;" @click="batchPrint()">合并打印</button>
|
|
|
+ <button class="admin-button-com big blue" style="margin-left: 50upx;" open-type="share" @click="shareAllOrder()">全部分享</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
@@ -52,6 +53,7 @@ import { mapGetters } from "vuex";
|
|
|
import orderMixin from "@/mixins/order";
|
|
|
import OrderItem from "../home/components/OrderItem"
|
|
|
import { getMergeOrderList,cloudPrintOrder,mergePrintFn,allFhAction,orderFh} from "@/api/order";
|
|
|
+import { IMGHOST } from "@/config";
|
|
|
export default {
|
|
|
name: "mergeOrder",
|
|
|
components: {
|
|
|
@@ -69,6 +71,8 @@ export default {
|
|
|
fhWl:'顺丰',
|
|
|
fhWlFocus:false,
|
|
|
fhLabelShow:false,
|
|
|
+ shareInfo: {},
|
|
|
+ shareTitle: '订单列表',
|
|
|
}
|
|
|
},
|
|
|
onPullDownRefresh() {
|
|
|
@@ -97,7 +101,59 @@ export default {
|
|
|
this.ids = this.option.ids?this.option.ids:''
|
|
|
|
|
|
},
|
|
|
+ onShareAppMessage() {
|
|
|
+ const share = this.getShareConfig()
|
|
|
+ return {
|
|
|
+ title: share.title,
|
|
|
+ desc: '',
|
|
|
+ imageUrl: IMGHOST + '/custom/order_share.jpg',
|
|
|
+ path: share.path
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ getShareConfig() {
|
|
|
+ const info = this.shareInfo || {}
|
|
|
+ const id = info.id || 0
|
|
|
+ const salt = info.salt || ''
|
|
|
+ const title = this.shareTitle || '订单列表'
|
|
|
+ return {
|
|
|
+ title,
|
|
|
+ hdPath: 'pagesPurchase/mergeOrder?id=' + id + '&salt=' + salt,
|
|
|
+ path: 'pagesOrder/showMergeOrder?id=' + id + '&salt=' + salt
|
|
|
+ }
|
|
|
+ },
|
|
|
+ shareAllOrder(){
|
|
|
+ const info = this.shareInfo || {}
|
|
|
+ if (!info.id || !info.salt) {
|
|
|
+ this.$msg('暂无可分享订单')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ const firstOrder = this.list.data && this.list.data.length > 0 ? this.list.data[0] : {}
|
|
|
+ const customName = firstOrder.customName ? firstOrder.customName : ''
|
|
|
+ const count = this.list.data ? this.list.data.length : 0
|
|
|
+ this.shareTitle = customName + ' 共' + count + '个订单'
|
|
|
+ const share = this.getShareConfig()
|
|
|
+ // #ifdef APP-PLUS
|
|
|
+ const miniOriginalId =
|
|
|
+ this.getDictionariesInfo && this.getDictionariesInfo.miniOriginalId && this.getDictionariesInfo.miniOriginalId.current && this.getDictionariesInfo.miniOriginalId.current.hd
|
|
|
+ ? this.getDictionariesInfo.miniOriginalId.current.hd
|
|
|
+ : ''
|
|
|
+ uni.share({
|
|
|
+ provider: 'weixin',
|
|
|
+ scene: 'WXSceneSession',
|
|
|
+ type: 5,
|
|
|
+ title: share.title,
|
|
|
+ summary: '暂无',
|
|
|
+ imageUrl: IMGHOST + '/custom/order_share.jpg',
|
|
|
+ miniProgram: {
|
|
|
+ id: miniOriginalId,
|
|
|
+ path: share.hdPath,
|
|
|
+ type: 0,
|
|
|
+ webUrl: 'https://www.wixhb.com'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // #endif
|
|
|
+ },
|
|
|
//这个有多处要同步修改,关键词:fh_express_pop
|
|
|
fillNoFh(info){
|
|
|
let that = this
|
|
|
@@ -201,6 +257,7 @@ export default {
|
|
|
getOrderList() {
|
|
|
let mergeId = this.option.mergeId?this.option.mergeId:0
|
|
|
return getMergeOrderList({ mergeId:mergeId }).then((res) => {
|
|
|
+ this.shareInfo = res.data && res.data.shareInfo ? res.data.shareInfo : {}
|
|
|
this.completes(res)
|
|
|
})
|
|
|
}
|
|
|
@@ -304,4 +361,4 @@ page{
|
|
|
padding: 10upx 40upx;
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|