Commit f8ad9d7d by damodmg

add新功能

parent 5f37f5b8
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet type=text/css href=./static/css/iconfont.css><link rel=stylesheet type=text/css href=./static/css/common.css><link rel="shortcut icon" type=image/x-icon href=./static/img/favicon.ico><title>积分商城</title><link href=./static/css/app.dc304c372fa862098c527c47b1721c49.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.20.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.05.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.04.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.bf93010d9b9b1322a27b.js></script><script type=text/javascript src=./static/js/app.0446b669186f77695fd7.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet type=text/css href=./static/css/iconfont.css><link rel=stylesheet type=text/css href=./static/css/common.css><link rel="shortcut icon" type=image/x-icon href=./static/img/favicon.ico><title>积分商城</title><link href=./static/css/app.487e85a7cce18e81735a3d8ecf504ea5.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.20.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.05.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-new.2.0.11.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.04.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.bf93010d9b9b1322a27b.js></script><script type=text/javascript src=./static/js/app.d8fb6c63d1a57ea84bb2.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -20,6 +20,7 @@
<script src="//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.05.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js"></script>
<script src='//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.01.js'></script>
<script src="//web-1251519181.file.myqcloud.com/components/store-new.2.0.11.js"></script>
<!-- <script src="//web-1251519181.file.myqcloud.com/components/member-info.1.0.01.js"></script> -->
<script src="//web-1251519181.file.myqcloud.com/components/card.2.0.03.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/export-excel.2.0.04.js"></script>
......
......@@ -135,6 +135,7 @@ export default {
deliveryContent: this.deliverdModal.changeType === 3 ? this.deliverdModal.content : '' //在线发货内容
};
if (this.deliverdModal.changeType === 3) {
//在线发货
params.logisticsCompanyId = '';
params.logisticsCompanyCode = '';
params.logisticsCompanyName = '';
......
......@@ -107,6 +107,7 @@
<!-- <el-button type="text" @click="goDetail(scope.row)">订单详情</el-button> -->
<el-button type="text" v-if="scope.row.status === 1 && scope.row.changeType === 2" @click="handleDeliver(scope.row)">物流发货</el-button>
<el-button type="text" v-if="scope.row.status === 1 && scope.row.changeType === 3" @click="handleDeliver(scope.row)">在线发货</el-button>
<el-button type="text" v-if="scope.row.status === 1 && scope.row.changeType === 4" @click="deliverShop(scope.row)">核销</el-button>
<el-button type="text" v-if="scope.row.status === 3" @click="getDeliverInfo(scope.row)">查看物流</el-button>
<el-button type="text" v-if="scope.row.status === 1 && scope.row.refundStatus !== 2" @click="closeOrder(scope.row)">关闭订单</el-button>
......@@ -211,6 +212,17 @@
<el-button @click="cancelSubmit('deliverInfodModal')">关闭</el-button>
</div>
</el-dialog>
<!-- 门店自提核销 -->
<el-dialog title="发货并核销" :visible.sync="shopDialogVisible" width="450px">
<p style="margin-bottom:20px">
请确认买家出示的提货码为:<span style="color:#f5222d">{{ writeOffCode }}</span>
</p>
<p style="margin-bottom:20px">确认无误后,将商品交付给买家,确认核销,则订单交易完成</p>
<span slot="footer" class="dialog-footer">
<el-button @click="shopDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="hanhdleShopDeliver" :loading="submitLoading">确 定</el-button>
</span>
</el-dialog>
<!-- 批量发货 -->
<importdispatch :deliverModal="deliverModal"></importdispatch>
<!-- 导出订单 -->
......@@ -317,7 +329,11 @@ export default {
placement: 'top-start',
requestProject: 'integral-mall',
testNum: '',
testName: ''
testName: '',
shopDialogVisible: false, //门店自提
shopIntegralMallProExchangeId: '', //门店自提订单id
writeOffCode: '', //核销码
submitLoading: false //门店自提确认按钮
};
},
watch: {
......@@ -646,6 +662,36 @@ export default {
}
});
},
// 门店自提发货
deliverShop(item) {
this.shopDialogVisible = true;
this.shopIntegralMallProExchangeId = item.integralMallProExchangeId;
this.writeOffCode = item.writeOffCode;
},
// 确认门店自提
hanhdleShopDeliver(item) {
let params = {
optType: 1,
integralMallProExchangeId: this.shopIntegralMallProExchangeId,
logisticsCompanyId: '',
logisticsCompanyCode: '',
logisticsCompanyName: '',
courierNumber: '',
cancelReason: '',
deliveryContent: '',
changeType: 4
};
this.submitLoading = true;
request.get('/api-integral-mall/order-opt', { params }).then(res => {
if (res.data.errorCode === 0) {
this.$message.success('发货核销成功');
this.submitLoading = false;
} else {
this.$message.error(res.data.message);
this.submitLoading = false;
}
});
},
cancelLogisticsInfo() {
this.editStatus = false;
},
......
......@@ -120,7 +120,7 @@
<span>提货人:</span><span>{{ orderDetail.goodsPerson }}</span>
</p>
<p class="order-mess-item" v-if="orderDetail.changeType === 4">
<span>提货手机:</span><span>{{ orderDetail.receivingAddress }}</span>
<span>提货手机:</span><span>{{ orderDetail.goodsPhone }}</span>
</p>
<p class="order-mess-item" v-if="orderDetail.changeType === 4">
<span>自提点:</span><span>{{ orderDetail.goodsPoint }}</span>
......@@ -136,14 +136,21 @@
<!-- 待付款 或者 待发货没申请退款-->
<div v-if="orderStatus === 11">
<div class="operate-header">订单已提交成功,等待买家付款</div>
<el-button type="primary" class="operate-btn">关闭订单</el-button>
<el-button type="primary" class="operate-btn" @click="closeOrder">关闭订单</el-button>
</div>
<!-- 待发货 -->
<div v-if="orderStatus === 1">
<!-- 待发货不属于门店自提 -->
<div v-if="orderStatus === 1 && orderDetail.changeType !== 4">
<div class="operate-header">买家已付款,等待商家发货</div>
<div class="operate-tip">买家已付款到商家账户,请及时发货</div>
<el-button type="primary" class="operate-btn">发货</el-button>
<el-button plain class="operate-btn" v-if="orderStatus === 1 && orderDetail.refundStatus !== 2">关闭订单</el-button>
<el-button type="primary" class="operate-btn" @click="deliverOrder">发货</el-button>
<el-button plain class="operate-btn" v-if="orderStatus === 1 && orderDetail.refundStatus !== 2" @click="closeOrder">关闭订单</el-button>
</div>
<!-- 门店自提的待发货 -->
<div v-if="orderStatus === 1 && orderDetail.changeType === 4">
<div class="operate-header">买家已付款,等待商家发货</div>
<div class="operate-tip">买家已付款到商家账户,请及时发货</div>
<el-button type="primary" class="operate-btn" @click="deliverShop">发货并核销</el-button>
<el-button plain class="operate-btn" v-if="orderStatus === 1 && orderDetail.refundStatus !== 2" @click="closeOrder">关闭订单</el-button>
</div>
<!-- 已发货 -->
<div v-if="orderStatus === 3">
......@@ -239,6 +246,21 @@
</div>
</div>
</div>
<!-- 关闭订单 -->
<closeOrder :refunOrderdModal="refunOrderdModal" @getList="getList"></closeOrder>
<!-- 发货 -->
<deliverModal :deliverdModal="deliverdModal" @getList="getList" v-show="deliverdModal.dialogVisible"></deliverModal>
<!-- 门店自提核销 -->
<el-dialog title="发货并核销" :visible.sync="shopDialogVisible" width="450px">
<p style="margin-bottom:20px">
请确认买家出示的提货码为:<span style="color:#f5222d">{{ orderDetail.writeOffCode }}</span>
</p>
<p style="margin-bottom:20px">确认无误后,将商品交付给买家,确认核销,则订单交易完成</p>
<span slot="footer" class="dialog-footer">
<el-button @click="shopDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="hanhdleShopDeliver" :loading="submitLoading">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
......@@ -246,6 +268,8 @@
import qs from 'qs';
import request from '../../service/request.js';
import getInputVal from '../../utils/common.js';
import closeOrder from './closeOrder';
import deliverModal from './delive';
export default {
data() {
return {
......@@ -255,7 +279,26 @@ export default {
orderDetail: {}, //订单详情
logisticsInfo: {}, //物流信息
showLogistics: false,
windowUrl: window.location.origin
windowUrl: window.location.origin,
refunOrderdModal: {
//关闭订单
dialogVisible: false,
integralMallProExchangeId: ''
},
deliverdModal: {
//发货
dialogVisible: false,
changeType: '',
integralMallProExchangeId: '',
consignee: '', //收件人
consigneePhone: '', //联系方式
receivingAddress: '', //收货地址
logisticsCompanyId: '',
logisticsCode: '',
otherLogisticsCompanyName: ''
},
shopDialogVisible: false, //门店自提
submitLoading: false //门店自提确认按钮
};
},
created() {
......@@ -293,9 +336,82 @@ export default {
this.$message.error(res.data.message);
}
});
},
//关闭订单
closeOrder() {
if (this.orderStatus === 11) {
//待付款
let params = {
integralMallProExchangeId: this.integralMallProExchangeId,
optType: 4
};
request.get('/api-integral-mall/order-opt', { params }).then(res => {
if (res.data.errorCode === 0) {
this.$message.success('关闭订单成功');
this.getOrderDetail();
} else {
this.$message.error(res.data.message);
}
});
} else if (this.orderStatus === 1 && this.orderDetail.refundStatus !== 2) {
//待发货的并且为申请退款的
this.refunOrderdModal.integralMallProExchangeId = this.integralMallProExchangeId;
this.refunOrderdModal.dialogVisible = true;
}
},
// 发货
deliverOrder() {
// 获取快递发货的信息
let params = {
integralMallProExchangeId: this.integralMallProExchangeId
};
request.post('/api-integral-mall/list-logistics-traces', qs.stringify(params)).then(res => {
if (res.data.errorCode === 0) {
this.deliverdModal.integralMallProExchangeId = this.integralMallProExchangeId;
this.deliverdModal.changeType = this.orderDetail.changeType;
this.deliverdModal.consignee = res.data.result.changeLog.consignee; //收件人
this.deliverdModal.consigneePhone = res.data.result.changeLog.consigneePhone; //联系方式
this.deliverdModal.receivingAddress = res.data.result.changeLog.receivingAddress; //收货地址
this.deliverdModal.deliverStatus = true;
this.deliverdModal.dialogVisible = true;
} else {
this.$message.error(res.data.message);
}
});
},
// 门店自提发货
deliverShop() {
this.shopDialogVisible = true;
},
// 确认门店自提
hanhdleShopDeliver() {
let params = {
optType: 1,
integralMallProExchangeId: this.integralMallProExchangeId,
logisticsCompanyId: '',
logisticsCompanyCode: '',
logisticsCompanyName: '',
courierNumber: '',
cancelReason: '',
deliveryContent: '',
changeType: 4
};
this.submitLoading = true;
request.get('/api-integral-mall/order-opt', { params }).then(res => {
if (res.data.errorCode === 0) {
this.$message.success('发货核销成功');
this.submitLoading = false;
} else {
this.$message.error(res.data.message);
this.submitLoading = false;
}
});
}
},
components: {}
components: {
closeOrder,
deliverModal
}
};
</script>
<style scoped>
......
......@@ -185,7 +185,7 @@ export default {
return {
fixedWidth: document.documentElement.clientWidth - 200,
form: {
shopType: 1,
shopType: 0,
pickUpPointName: '',
pickUpPointPhone: '',
pickUpPointAddress: '',
......@@ -197,7 +197,7 @@ export default {
timeHours: '', //小时
timeMinuter: '', //分钟
timeDay: '',
timeRangeList: [{ timeRange: '' }],
timeRangeList: [{ timeRange: ['00:00', '00:30'] }],
orderTimeHours: '',
validateTime
},
......@@ -229,23 +229,44 @@ export default {
this.$message.error('最多五个时间段');
return false;
}
this.form.timeRangeList.push({ timeRange: '' });
// this.form.timeRangeList.push({ timeRange: ['00:00', '23:59'] });
let currentYear = new Date().getFullYear();
let currentMonth = new Date().getMonth() + 1;
let currentDate = new Date().getDate();
let time = new Date(currentYear + '-' + currentMonth + '-' + currentDate + ' ' + this.form.timeRangeList[this.form.timeRangeList.length - 1].timeRange[1] + ':00').valueOf();
let temTime1 = new Date(time + 30 * 60 * 1000).getHours() + ':' + new Date(time + 30 * 60 * 1000).getMinutes();
let temTime2 = new Date(time + 60 * 60 * 1000).getHours() + ':' + new Date(time + 60 * 60 * 1000).getMinutes();
this.form.timeRangeList.push({ timeRange: [temTime1, temTime2] });
},
//删除时间段
deleteTime(index) {
this.form.timeRangeList.splice(index, 1);
},
//时间限制
limitTimeSelect(index, value) {
limitTimeSelect(index, val) {
if (index !== 0) {
//非第一个
if (new Date(this.form.timeRangeList[index].timeRange[0]) < new Date(this.form.timeRangeList[index - 1].timeRange[1])) {
this.$message.errr('时间段不可重叠');
this.form.timeRangeList[index].timeRange = [];
let currentYear = new Date().getFullYear();
let currentMonth = new Date().getMonth() + 1;
let currentDate = new Date().getDate();
let currentTime = new Date(currentYear + '-' + currentMonth + '-' + currentDate + ' ' + val[0]).valueOf();
let Time = new Date(currentYear + '-' + currentMonth + '-' + currentDate + ' ' + this.form.timeRangeList[index - 1].timeRange[1]).valueOf();
if (currentTime < Time) {
this.$message.error('时间不可重叠!');
let temTime = String(new Date(Time + 60 * 1000).getHours()) + ':' + String(new Date(Time + 60 * 1000).getMinutes());
this.form.timeRangeList[index].timeRange = [temTime, this.form.timeRangeList[index].timeRange[1]];
}
if (this.form.timeRangeList.length - 1 > index) {
let currentTime2 = new Date(currentYear + '-' + currentMonth + '-' + currentDate + ' ' + val[1]).valueOf();
let Time2 = new Date(currentYear + '-' + currentMonth + '-' + currentDate + ' ' + this.form.timeRangeList[index + 1].timeRange[0]).valueOf();
let Time1 = new Date(currentYear + '-' + currentMonth + '-' + currentDate + ' ' + this.form.timeRangeList[index - 1].timeRange[1]).valueOf();
if (currentTime2 > Time2) {
this.$message.error('时间不可重叠2!');
let temTime2 = String(new Date(Time2 - 60 * 1000).getHours()) + ':' + String(new Date(Time2 - 60 * 1000).getMinutes());
let temTime1 = String(new Date(Time2 - 60 * 1000).getHours()) + ':' + String(new Date(Time1 + 60 * 1000).getMinutes());
// this.form.timeRangeList[index].timeRange = [this.form.timeRangeList[index].timeRange[0], temTime2];
this.form.timeRangeList[index].timeRange = [temTime1, temTime2];
}
}
}
if (index === this.form.timeRangeList.length - 1) {
//最后一个
}
},
//获取编辑信息
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment