|
@@ -2,6 +2,7 @@
|
|
|
<el-drawer
|
|
|
append-to-body
|
|
|
title="订单发货"
|
|
|
+ v-loading="load"
|
|
|
:visible.sync="drawer"
|
|
|
@close="close"
|
|
|
:direction="direction"
|
|
@@ -69,6 +70,10 @@
|
|
|
<div class="s-col">WMS取消订单的备注:{{ value.wmsRemark }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="space"></div>
|
|
|
+ <div class="deli-footer">
|
|
|
+ <div class="send-btn" @click="cancelDelivery">取消发货</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</el-drawer>
|
|
|
</template>
|
|
@@ -76,8 +81,7 @@
|
|
|
<script lang="ts">
|
|
|
import { Component, Prop, Vue, Watch } from "vue-property-decorator";
|
|
|
import DeliveryGoodsInfo from "./deliveryGoodsInfo.vue";
|
|
|
-import { queryOrderByOrderId } from '@/api/delivery'
|
|
|
-import { iteratee } from "lodash";
|
|
|
+import { queryOrderByOrderId,cancleSendOrder } from '@/api/delivery'
|
|
|
@Component({components:{DeliveryGoodsInfo}})
|
|
|
export default class DeliveryDetail extends Vue {
|
|
|
drawer=false;
|
|
@@ -154,6 +158,35 @@ export default class DeliveryDetail extends Vue {
|
|
|
this.load = false;
|
|
|
})
|
|
|
}
|
|
|
+ cancelDelivery(){
|
|
|
+ let msg = '';
|
|
|
+ if(this.value.shippingType == 'ONE'){
|
|
|
+ msg='此操作将导致整车订单的发货被取消,是否继续?'
|
|
|
+ }
|
|
|
+ if(this.value.shippingType == 'MORE'){
|
|
|
+ msg = '此操作将导致该订单的发货被取消,是否继续?'
|
|
|
+ }
|
|
|
+ if(msg){
|
|
|
+ this.$confirm(msg, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.load = true;
|
|
|
+ cancleSendOrder({orderNos:[this.value.tmsOrderNo]}).then((res:any) => {
|
|
|
+ this.load =false;
|
|
|
+ this.$message({
|
|
|
+ message:'该订单的发货已被取消!',
|
|
|
+ type:'success'
|
|
|
+ })
|
|
|
+ this.$emit('handleSuccess');
|
|
|
+ this.drawer = false;
|
|
|
+ }).catch(() => {
|
|
|
+ this.load = false;
|
|
|
+ })
|
|
|
+ }).catch(() => {});
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
@@ -250,5 +283,36 @@ export default class DeliveryDetail extends Vue {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+.deli-footer{
|
|
|
+ height: 60px;
|
|
|
+ box-shadow: 0 -5px 10px #EEE;
|
|
|
+ width: 100%;
|
|
|
+ padding: 0 16px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
+ align-items: center;
|
|
|
+ position: absolute;
|
|
|
+ background-color: #FFF;
|
|
|
+ left: 0;
|
|
|
+ bottom: 0;
|
|
|
+ z-index: 10;
|
|
|
+ .send-btn{
|
|
|
+ width: 120px;
|
|
|
+ height: 40px;
|
|
|
+ line-height: 40px;
|
|
|
+ border-radius: 8px;
|
|
|
+ background: linear-gradient(129.2deg, rgba(22,132,252,1) 9.81%,rgba(93,167,249,1) 97.4%);
|
|
|
+ color: rgba(255, 255, 255, 100);
|
|
|
+ font-size: 14px;
|
|
|
+ text-align: center;
|
|
|
+ box-shadow: 0px 2px 6px 0px rgba(93, 167, 249, 100);
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+}
|
|
|
+.space{
|
|
|
+ height: 60px;
|
|
|
+ width: 100%;
|
|
|
+ margin-top: 16px;
|
|
|
+}
|
|
|
</style>
|