|
|
@@ -1,5 +1,6 @@
|
|
|
<template>
|
|
|
- <view @click="pageTo({url:'/pagesOrder/detail',query: {id: item.id}})">
|
|
|
+ <view>
|
|
|
+ <view @click="pageTo({url:'/pagesOrder/detail?id='+item.id})">
|
|
|
<view class="order-top_box" style="position:relative;">
|
|
|
|
|
|
<image style="width:105upx;position:absolute;top:80upx;right:12upx;" v-if="currentStatus == 1 && item.book == 0"
|
|
|
@@ -69,33 +70,99 @@
|
|
|
本客户共有{{item.sameTimeIdsNum}}个订单,可合并发货
|
|
|
</view>
|
|
|
</view>
|
|
|
- <div class="list-bottom">
|
|
|
- <div class="list-button">
|
|
|
+ <view class="list-bottom">
|
|
|
+ <view class="list-button">
|
|
|
<view><button @click.stop="shareOrder(item)" open-type="share" class="admin-button-com bule">分享</button> </view>
|
|
|
<block v-if="currentStatus == 2">
|
|
|
<block v-if="item.book == 0">
|
|
|
<view><button @click.stop="directFh(item)" class="admin-button-com bule">发货</button> </view>
|
|
|
- <view><button @click.stop="fillNoFh(item)" class="admin-button-com bule">填单发货</button> </view>
|
|
|
</block>
|
|
|
<block v-else>
|
|
|
<view><button @click.stop="confirmFh(item)" class="admin-button-com bule">确认发货</button> </view>
|
|
|
</block>
|
|
|
</block>
|
|
|
<block v-else>
|
|
|
- <view><button disabled="true" class="admin-button-com bule active">发货</button> </view>
|
|
|
- <view><button disabled="true" class="admin-button-com bule active">填单发货</button> </view>
|
|
|
+ <view><button disabled="true" class="admin-button-com bule active">发货</button> </view>
|
|
|
</block>
|
|
|
<view v-if="currentStatus == 1">
|
|
|
<button disabled="true" class="admin-button-com bule active">打印(${item.printNum})</button>
|
|
|
</view>
|
|
|
<view v-else>
|
|
|
- <button @click.stop="printOrder(item)" class="admin-button-com bule">打印<text v-if="Number(item.printNum)>0">({{item.printNum}})</text></button>
|
|
|
+ <button @click.stop="printOrder(item)" class="admin-button-com bule">打印<text>({{item.printNum}})</text></button>
|
|
|
</view>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <view>
|
|
|
+ <button @click.stop="openMore(item)" class="admin-button-com bule">更多</button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <uni-popup ref="morePopup" background-color="#fff" type="center" :animation="true" class="class-popup-style">
|
|
|
+ <view style="padding:50upx 40upx;width:70vw;">
|
|
|
+ <view style="text-align: center;"><button class="admin-button-com" style="margin:0 auto 30upx auto;width:240upx;height:80upx;line-height: 80upx;font-size:29upx;" @click="addExpress(item)">顺丰下单</button></view>
|
|
|
+ <view style="text-align: center;"><button class="admin-button-com" style="margin:0 auto 30upx auto;width:240upx;height:80upx;line-height: 80upx;font-size:29upx;" @click="cancelExpress(item)">取消顺丰订单</button></view>
|
|
|
+ <view style="text-align: center;"><button class="admin-button-com" style="margin:0 auto 30upx auto;width:240upx;height:80upx;line-height: 80upx;font-size:29upx;" @click="fillNoFh(item)">填单发货</button></view>
|
|
|
+ <view style="text-align: center;"><button class="admin-button-com" style="margin:0 auto 30upx auto;width:240upx;height:80upx;line-height: 80upx;font-size:29upx;" @click="sim(item)">模拟</button></view>
|
|
|
+ <view style="text-align: center;"><button class="admin-button-com default" @click="closeMore" style="margin:10upx auto 0 auto;width:240upx;height:80upx;line-height: 80upx;font-size:29upx;">取消</button></view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
+
|
|
|
+ <!-- 新增物流下单弹窗 -->
|
|
|
+ <uni-popup ref="expressAddressRef" background-color="#fff" type="center" :animation="true" class="class-popup-style" :mask-click="false">
|
|
|
+ <view style="padding:40upx 50upx;width:96vw;">
|
|
|
+ <view style="font-size:32upx;font-weight:bold;text-align:center;margin-bottom:30upx;">发货信息</view>
|
|
|
+ <view style="display:flex;flex-direction:column;gap:18upx;">
|
|
|
+ <view style="display:flex;align-items:center;">
|
|
|
+ <view style="width:135upx;color:#888;font-size:28upx;white-space:nowrap;">包裹数量:</view>
|
|
|
+ <input style="flex:1;font-size:28upx;border:1px solid #eee;padding:0 12upx;border-radius:8upx;height:60upx;line-height:60upx;" type="number" v-model="wlPackageNum" placeholder="请输入包裹数量" />
|
|
|
+ </view>
|
|
|
+ <view style="display:flex;align-items:center;">
|
|
|
+ <view style="width:135upx;color:#888;font-size:28upx;white-space:nowrap;">重量(kg):</view>
|
|
|
+ <input style="flex:1;font-size:28upx;border:1px solid #eee;padding:0 12upx;border-radius:8upx;height:60upx;line-height:60upx;" type="digit" v-model="wlWeight" placeholder="请输入重量" />
|
|
|
+ </view>
|
|
|
+ <view style="display:flex;align-items:center;">
|
|
|
+ <view style="width:135upx;color:#888;font-size:28upx;white-space:nowrap;">长度(cm):</view>
|
|
|
+ <input style="flex:1;font-size:28upx;border:1px solid #eee;padding:0 12upx;border-radius:8upx;height:60upx;line-height:60upx;" type="number" v-model="wlLength" placeholder="请输入长度" />
|
|
|
+ </view>
|
|
|
+ <view style="display:flex;align-items:center;">
|
|
|
+ <view style="width:135upx;color:#888;font-size:28upx;white-space:nowrap;">宽度(cm):</view>
|
|
|
+ <input style="flex:1;font-size:28upx;border:1px solid #eee;padding:0 12upx;border-radius:8upx;height:60upx;line-height:60upx;" type="number" v-model="wlWidth" placeholder="请输入宽度" />
|
|
|
+ </view>
|
|
|
+ <view style="display:flex;align-items:center;">
|
|
|
+ <view style="width:135upx;color:#888;font-size:28upx;white-space:nowrap;">高度(cm):</view>
|
|
|
+ <input style="flex:1;font-size:28upx;border:1px solid #eee;padding:0 12upx;border-radius:8upx;height:60upx;line-height:60upx;" type="number" v-model="wlHeight" placeholder="请输入高度" />
|
|
|
+ </view>
|
|
|
+ <view style="display:flex;align-items:center;">
|
|
|
+ <view style="width:135upx;color:#888;font-size:28upx;">城市:</view>
|
|
|
+ <view style="flex:1;font-size:28upx;">{{ receiverCity }}</view>
|
|
|
+ </view>
|
|
|
+ <view style="display:flex;align-items:center;">
|
|
|
+ <view style="width:135upx;color:#888;font-size:28upx;">地址:</view>
|
|
|
+ <view style="flex:1;font-size:28upx;">{{ receiverAddress }}{{ receiverFloor }}</view>
|
|
|
+ </view>
|
|
|
+ <view style="display:flex;align-items:center;">
|
|
|
+ <view style="width:135upx;color:#888;font-size:28upx;">姓名:</view>
|
|
|
+ <view style="flex:1;font-size:28upx;">{{ receiverName }}</view>
|
|
|
+ </view>
|
|
|
+ <view style="display:flex;align-items:center;">
|
|
|
+ <view style="width:135upx;color:#888;font-size:28upx;">电话:</view>
|
|
|
+ <view style="flex:1;font-size:28upx;">{{ receiverMobile }}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view style="display:flex;justify-content:space-around;margin-top:40upx;">
|
|
|
+ <button class="admin-button-com default" style="width:160upx;" @click="closeExpressPop">取消</button>
|
|
|
+ <button class="admin-button-com bule" style="width:160upx;" @click="modifyAddress(item)">修改地址</button>
|
|
|
+ <button class="admin-button-com bule" style="width:160upx;" @click="confirmAddExpress(item)">提交</button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
+import { getUserDet } from "@/api/member";
|
|
|
+import { createExpressOrder,cancelExpressOrder,testUpdate } from "@/api/express";
|
|
|
export default {
|
|
|
name: "OrderItem",
|
|
|
components: {
|
|
|
@@ -111,8 +178,18 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- currentStatus:0
|
|
|
- };
|
|
|
+ currentStatus:0,
|
|
|
+ wlPackageNum: 1,
|
|
|
+ wlWeight: '',
|
|
|
+ wlLength:100,
|
|
|
+ wlWidth: 70,
|
|
|
+ wlHeight: 50,
|
|
|
+ receiverCity: '',
|
|
|
+ receiverAddress: '',
|
|
|
+ receiverFloor:'',
|
|
|
+ receiverName:'',
|
|
|
+ receiverMobile:'',
|
|
|
+ };
|
|
|
},
|
|
|
mounted(){
|
|
|
if(this.item.status){
|
|
|
@@ -120,6 +197,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ modifyAddress(item){
|
|
|
+ this.closeExpressPop()
|
|
|
+ this.$util.pageTo({url: "/pagesClient/member/modify?id="+item.customId+"&name="+item.customName})
|
|
|
+ },
|
|
|
shareOrder(info){
|
|
|
this.$emit('shareOrder',info)
|
|
|
},
|
|
|
@@ -127,9 +208,10 @@ export default {
|
|
|
this.$emit('directFh', info)
|
|
|
},
|
|
|
confirmFh(info){
|
|
|
- this.$util.pageTo({url: "/pagesOrder/arrival?id="+info.id})
|
|
|
+ this.$util.pageTo({url: "/pagesOrder/arrival?id="+info.id})
|
|
|
},
|
|
|
fillNoFh(info){
|
|
|
+ this.closeMore()
|
|
|
this.$emit('fillNoFh', info)
|
|
|
},
|
|
|
printOrder(item) {
|
|
|
@@ -141,12 +223,64 @@ export default {
|
|
|
}else{
|
|
|
that.$emit('printOrder', item)
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ openMore(item) {
|
|
|
+ this.$refs.morePopup.open('center');
|
|
|
+ },
|
|
|
+ closeMore() {
|
|
|
+ this.$refs.morePopup.close();
|
|
|
+ },
|
|
|
+ sim(item){
|
|
|
+ //testUpdate({id:item.id}).then(res=>{ })
|
|
|
+ },
|
|
|
+ addExpress(item) {
|
|
|
+ this.closeMore()
|
|
|
+ getUserDet({id:item.customId}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ this.receiverCity = res.data.city
|
|
|
+ this.receiverAddress = res.data.address
|
|
|
+ this.receiverFloor = res.data.floor
|
|
|
+ this.receiverName = res.data.name
|
|
|
+ this.receiverMobile = res.data.mobile
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.$refs.expressAddressRef.open('center');
|
|
|
+ },
|
|
|
+ cancelExpress(item){
|
|
|
+ this.$util.confirmModal({content:'确认取消?'},() => {
|
|
|
+ cancelExpressOrder({id:item.id}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ this.$msg(res.msg)
|
|
|
+ this.closeMore()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ closeExpressPop() {
|
|
|
+ this.$refs.expressAddressRef.close();
|
|
|
+ },
|
|
|
+ confirmAddExpress(item) {
|
|
|
+ if(Number(this.wlWeight)<=0){
|
|
|
+ this.$msg('请填写重量')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ this.$util.confirmModal({content:'确认提交?'},() => {
|
|
|
+ createExpressOrder({id:item.id,weight:Number(this.wlWeight),length:this.wlLength,width:this.wlWidth,height:this.wlHeight,packageNum:this.wlPackageNum}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ this.$msg(res.msg)
|
|
|
+ this.closeExpressPop()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+.class-popup-style{
|
|
|
+ z-index:999999;
|
|
|
+}
|
|
|
.admin-button-com {
|
|
|
width: 140upx;
|
|
|
height: 60upx;
|
|
|
@@ -169,11 +303,22 @@ export default {
|
|
|
}
|
|
|
.list-bottom {
|
|
|
& > div {
|
|
|
- @include disFlex(center, flex-end);
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
}
|
|
|
.list-button {
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ justify-content: space-around;
|
|
|
+ align-items: center;
|
|
|
.admin-button-com {
|
|
|
- margin-left: 20upx;
|
|
|
+ margin: 0 6upx 12upx 6upx;
|
|
|
+ min-width: 90upx;
|
|
|
+ max-width: 140upx;
|
|
|
+ flex: none;
|
|
|
+ box-sizing: border-box;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -275,4 +420,25 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+input {
|
|
|
+ height: 60upx;
|
|
|
+ line-height: 60upx;
|
|
|
+ padding: 0 12upx;
|
|
|
+ font-size: 28upx;
|
|
|
+ box-sizing: border-box;
|
|
|
+}
|
|
|
+input::placeholder {
|
|
|
+ line-height: 60upx;
|
|
|
+ /* 可选:color、font-size 等 */
|
|
|
+}
|
|
|
+input::-webkit-input-placeholder {
|
|
|
+ line-height: 60upx;
|
|
|
+}
|
|
|
+input:-ms-input-placeholder {
|
|
|
+ line-height: 60upx;
|
|
|
+}
|
|
|
+input::-ms-input-placeholder {
|
|
|
+ line-height: 60upx;
|
|
|
+}
|
|
|
</style>
|