|
|
@@ -4,7 +4,7 @@
|
|
|
<view class="order-info-list">
|
|
|
<view class="list-item">
|
|
|
<text>订单号</text>
|
|
|
- <text>2929323</text>
|
|
|
+ <text>{{orderInfo.orderSn}}</text>
|
|
|
</view>
|
|
|
<view class="list-item">
|
|
|
<text>下单时间</text>
|
|
|
@@ -23,22 +23,174 @@
|
|
|
src="/static/images/default-img.png" mode="scaleToFill">
|
|
|
</image>
|
|
|
</view>
|
|
|
+ <view class="step-content_box">
|
|
|
+ <stepShip
|
|
|
+ @affirmSend="affirmSend"
|
|
|
+ @selfSend="selfSend"
|
|
|
+ @sendParcel="sendParcel"
|
|
|
+ :orderComData="orderComData">
|
|
|
+ </stepShip>
|
|
|
+ </view>
|
|
|
+ <!-- 快递送 -->
|
|
|
+ <modal-module
|
|
|
+ :show="shipModal"
|
|
|
+ :maskClosable="false"
|
|
|
+ @cancel="modalCancel"
|
|
|
+ @click="shipModalClick"
|
|
|
+ title="发快递"
|
|
|
+ padding="30rpx 30rpx"
|
|
|
+ >
|
|
|
+ <template v-slot:content>
|
|
|
+ <view class="order-fa_box">
|
|
|
+ <view class="order-fa_info">
|
|
|
+ <view class="order-fa_top">
|
|
|
+ <view>
|
|
|
+ 收
|
|
|
+ </view>
|
|
|
+ <view class="">
|
|
|
+ {{orderInfo.receiveProvince + orderInfo.receiveCity}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ {{orderInfo.receiveAddress}}
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ {{orderInfo.customName}}({{orderInfo.customMobile}})
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="app-modal-input-wrap ship-modal">
|
|
|
+ <view class="inp-list-line">
|
|
|
+ <view class="line-label">配送方</view>
|
|
|
+ <view class="line-input">
|
|
|
+ <picker
|
|
|
+ mode="selector"
|
|
|
+ :range="deliveryList"
|
|
|
+ @change="changeDeliveryFn"
|
|
|
+ range-key="text"
|
|
|
+ class="inp-select"
|
|
|
+ >
|
|
|
+ <view v-if="form.sendSide">{{ sendSideText }}</view>
|
|
|
+ <view class="tui-placeholder" v-else>请选择</view>
|
|
|
+ </picker>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="inp-list-line">
|
|
|
+ <view class="line-label">送花时间</view>
|
|
|
+ <view class="line-input">
|
|
|
+ <picker
|
|
|
+ mode="multiSelector"
|
|
|
+ :range="timeList"
|
|
|
+ :value="timeValue"
|
|
|
+ @change="changeTimeFn"
|
|
|
+ class="inp-select"
|
|
|
+ >
|
|
|
+ <view v-if="form.sendTime">{{ form.sendTime }}</view>
|
|
|
+ <view class="tui-placeholder" v-else>默认10分钟后配送</view>
|
|
|
+ </picker>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="inp-list-line">
|
|
|
+ <view class="line-label">运费</view>
|
|
|
+ <view class="line-input">
|
|
|
+ <view class="">
|
|
|
+ {{form.sendCost}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ </modal-module>
|
|
|
+ <modal-module
|
|
|
+ :show="showSubmitModel"
|
|
|
+ @cancel="modalCancel"
|
|
|
+ @click="submitEvent"
|
|
|
+ :title="titText"
|
|
|
+ color="#333"
|
|
|
+ :size="32"
|
|
|
+ padding="30rpx 30rpx"
|
|
|
+ >
|
|
|
+ </modal-module>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-
|
|
|
-
|
|
|
-import { getDetB, orderSendDet } from '@/api/order'
|
|
|
+import stepShip from './components/stepShip'
|
|
|
+import { getDetB,
|
|
|
+ orderSendDet,
|
|
|
+ freight,
|
|
|
+ thirdSend,
|
|
|
+ selfSend,
|
|
|
+ reachOrder
|
|
|
+ } from '@/api/order'
|
|
|
+import ModalModule from "@/components/plugin/modal";
|
|
|
export default {
|
|
|
name: 'admin-ship',
|
|
|
components: {
|
|
|
-
|
|
|
+ stepShip,
|
|
|
+ ModalModule
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ showSubmitModel: false,
|
|
|
+ titText:'',
|
|
|
orderInfo: {},
|
|
|
- orderComData: []
|
|
|
+ orderComData: [],
|
|
|
+ shipModal: false,
|
|
|
+ form:{
|
|
|
+ sendTime:'',
|
|
|
+ sendSide: 2,
|
|
|
+ sendCost: 0
|
|
|
+ },
|
|
|
+ sendSideText:'达达配送',
|
|
|
+ deliveryList: [
|
|
|
+ {
|
|
|
+ text: "达达配送",
|
|
|
+ key: 2
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text: "顺丰同城",
|
|
|
+ key: 3
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text: "闪送",
|
|
|
+ key: 4
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text: "美团",
|
|
|
+ key: 5
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ timeList: [
|
|
|
+ [
|
|
|
+ "1",
|
|
|
+ "2",
|
|
|
+ "3",
|
|
|
+ "4",
|
|
|
+ "5",
|
|
|
+ "6",
|
|
|
+ "7",
|
|
|
+ "8",
|
|
|
+ "9",
|
|
|
+ "10",
|
|
|
+ "11",
|
|
|
+ "12",
|
|
|
+ "13",
|
|
|
+ "14",
|
|
|
+ "15",
|
|
|
+ "16",
|
|
|
+ "17",
|
|
|
+ "18",
|
|
|
+ "19",
|
|
|
+ "20",
|
|
|
+ "21",
|
|
|
+ "22",
|
|
|
+ "23",
|
|
|
+ "24"
|
|
|
+ ],
|
|
|
+ ["00", "10", "20", "30", "40", "50"]
|
|
|
+ ],
|
|
|
+ currentTitType: {}
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
|
@@ -53,14 +205,14 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
init() {
|
|
|
- this.showIndex = this.option.pageStatus || 0
|
|
|
+ // this.showIndex = this.option.pageStatus || 0
|
|
|
this._getDet()
|
|
|
this._orderComDet()
|
|
|
-
|
|
|
+ this.freightCount()
|
|
|
},
|
|
|
_getDet() {
|
|
|
// this.option.id
|
|
|
- return getDetB({ id: 78 }).then(res => {
|
|
|
+ return getDetB({ id: this.option.id }).then(res => {
|
|
|
this.orderInfo = res.data
|
|
|
})
|
|
|
},
|
|
|
@@ -69,6 +221,74 @@ export default {
|
|
|
this.orderComData = res.data
|
|
|
})
|
|
|
},
|
|
|
+ // 快递送
|
|
|
+ sendParcel(){
|
|
|
+ this.shipModal = true;
|
|
|
+ },
|
|
|
+ // 计算运费
|
|
|
+ freightCount(){
|
|
|
+ freight({
|
|
|
+ id: this.option.id,
|
|
|
+ sendSide: this.form.sendSide,
|
|
|
+ }).then(res=>{
|
|
|
+ this.form.sendCost = res.data.sndCost
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //发货
|
|
|
+ shipModalClick(e){
|
|
|
+ if (e.index === 0){
|
|
|
+ this.modalCancel()
|
|
|
+ }else{
|
|
|
+ thirdSend({
|
|
|
+ id:this.option.id,
|
|
|
+ ...this.form
|
|
|
+ }).then(res=>{
|
|
|
+ this.$msg('发货成功')
|
|
|
+ this.init()
|
|
|
+ this.modalCancel();
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ },//关闭
|
|
|
+ modalCancel(){
|
|
|
+ this.shipModal = false;
|
|
|
+ this.showSubmitModel = false
|
|
|
+ }, // 自己送
|
|
|
+ selfSend(val){
|
|
|
+ this.currentTitType = val
|
|
|
+ this.titText = val.text;
|
|
|
+ this.showSubmitModel = true
|
|
|
+ }, // 确认
|
|
|
+ affirmSend(val){
|
|
|
+ this.currentTitType = val
|
|
|
+ this.titText = val.text;
|
|
|
+ this.showSubmitModel = true
|
|
|
+ }, // 确认送达 和 本店送
|
|
|
+ submitEvent(e){
|
|
|
+ if(e.index === 0) {
|
|
|
+ this.modalCancel()
|
|
|
+ }else{
|
|
|
+ let updateStatue = this.currentTitType.type == 0? selfSend:reachOrder
|
|
|
+ updateStatue({
|
|
|
+ id:this.option.id
|
|
|
+ }).then(res=>{
|
|
|
+ this.modalCancel()
|
|
|
+ this.$msg('发货状态已更新')
|
|
|
+ this.init()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ changeTimeFn(e){
|
|
|
+ let oneIndex = e.detail.value[0] || 0;
|
|
|
+ let twoIndex = e.detail.value[1] || 0;
|
|
|
+ this.form.sendTime = this.timeList[0][oneIndex] + ":" + this.timeList[1][twoIndex];
|
|
|
+ },
|
|
|
+ changeDeliveryFn(e){
|
|
|
+ this.form.sendSide = this.deliveryList[e.detail.value].key;
|
|
|
+ this.sendSideText = this.deliveryList[e.detail.value].text;
|
|
|
+ // 平台不同运费重新计算
|
|
|
+ this.freightCount()
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
@@ -76,6 +296,11 @@ export default {
|
|
|
<style lang="scss" scoped>
|
|
|
.app-content {
|
|
|
// background-color: #fff;
|
|
|
+ .ship-modal {
|
|
|
+ .line-label {
|
|
|
+ width: 140px;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
.order-info_box {
|
|
|
display: flex;
|
|
|
@@ -102,4 +327,51 @@ export default {
|
|
|
height: 146px;
|
|
|
}
|
|
|
}
|
|
|
+ .order-fa_box {
|
|
|
+ padding:20upx;
|
|
|
+ border: 1upx solid #DDDDDD;
|
|
|
+ border-radius: 4upx;
|
|
|
+ margin-bottom: 20upx;
|
|
|
+ & > .order-fa_info {
|
|
|
+ padding-left: 20upx;
|
|
|
+ & > .order-fa_top {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ & > view:nth-child(1) {
|
|
|
+ width: 40upx;
|
|
|
+ height: 40upx;
|
|
|
+ line-height: 40upx;
|
|
|
+ text-align: center;
|
|
|
+ background-color: #3385FF;
|
|
|
+ color: #FFFFFF;
|
|
|
+ font-size: 24upx;
|
|
|
+ margin-right: 20upx;
|
|
|
+ border-radius: 50%;
|
|
|
+ }
|
|
|
+ & > view:nth-child(2) {
|
|
|
+ color: #333333;
|
|
|
+ font-size: 32upx;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #333333;
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ & > view:nth-child(2) {
|
|
|
+ padding-left: 60upx;
|
|
|
+ text-align: left;
|
|
|
+ color: #999999;
|
|
|
+ font-size: 24upx;
|
|
|
+ font-weight: 400;
|
|
|
+ margin:25upx 0 19upx;
|
|
|
+ }
|
|
|
+ & > view:nth-child(3) {
|
|
|
+ padding-left: 60upx;
|
|
|
+ text-align: left;
|
|
|
+ color: #333333;
|
|
|
+ font-size: 24upx;
|
|
|
+ font-weight: 400;
|
|
|
+ margin:25upx 0 19upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|