提交批量发货没有跳转的Bug
parent
85bfb48c0c
commit
c3be931218
|
@ -395,6 +395,49 @@ export const result = [
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "lives",
|
||||
showAlways: true,
|
||||
level: 1,
|
||||
type: 0,
|
||||
title: "直播活动",
|
||||
path: "/promotion",
|
||||
component: "Main",
|
||||
icon: "md-person",
|
||||
isMenu: true,
|
||||
url: "",
|
||||
permTypes: [],
|
||||
children: [
|
||||
{
|
||||
name: "live",
|
||||
showAlways: true,
|
||||
level: 2,
|
||||
type: 0,
|
||||
title: "直播管理",
|
||||
path: "live",
|
||||
component: "promotion/live/live",
|
||||
icon: "md-person",
|
||||
isMenu: true,
|
||||
url: "",
|
||||
permTypes: [],
|
||||
children: null
|
||||
},
|
||||
{
|
||||
name: "liveGoods",
|
||||
showAlways: true,
|
||||
level: 2,
|
||||
type: 0,
|
||||
title: "直播商品",
|
||||
path: "liveGoods",
|
||||
component: "promotion/live/liveGoods",
|
||||
icon: "md-person",
|
||||
isMenu: true,
|
||||
url: "",
|
||||
permTypes: [],
|
||||
children: null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "storePromotion",
|
||||
showAlways: true,
|
||||
|
@ -436,34 +479,7 @@ export const result = [
|
|||
permTypes: [],
|
||||
children: null
|
||||
},
|
||||
{
|
||||
name: "live",
|
||||
showAlways: true,
|
||||
level: 2,
|
||||
type: 0,
|
||||
title: "直播管理",
|
||||
path: "live",
|
||||
component: "promotion/live/live",
|
||||
icon: "md-person",
|
||||
isMenu: true,
|
||||
url: "",
|
||||
permTypes: [],
|
||||
children: null
|
||||
},
|
||||
{
|
||||
name: "liveGoods",
|
||||
showAlways: true,
|
||||
level: 2,
|
||||
type: 0,
|
||||
title: "直播商品",
|
||||
path: "liveGoods",
|
||||
component: "promotion/live/liveGoods",
|
||||
icon: "md-person",
|
||||
isMenu: true,
|
||||
url: "",
|
||||
permTypes: [],
|
||||
children: null
|
||||
}
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
</div>
|
||||
<!-- 上传 -->
|
||||
<div v-if="item.checked && index ==1" class="tpl">
|
||||
<Upload :before-upload="handleUpload" name="files" style="width:50%; height:400px;"
|
||||
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" multiple type="drag" :action="action" :headers="accessToken">
|
||||
<Upload :before-upload="handleUpload" name="files" style="width:50%; height:400px;" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
|
||||
multiple type="drag" :action="action" :headers="accessToken">
|
||||
<div style="padding: 50px 0">
|
||||
<Icon type="ios-cloud-upload" size="102" style="color: #3399ff"></Icon>
|
||||
<h2>选择或拖拽文件上传</h2>
|
||||
|
@ -26,11 +26,13 @@
|
|||
</Upload>
|
||||
</div>
|
||||
<!-- 上传 -->
|
||||
<div v-if="item.checked && index ==2" class="tpl">
|
||||
<div v-if="item.checked && index ==2" class="tpl success">
|
||||
|
||||
<h1>发货完成</h1>
|
||||
|
||||
<div>
|
||||
<Button>关闭页面</Button>
|
||||
<Button class="btn" @click="close">关闭页面</Button>
|
||||
<Button class="btn" type="primary" @click="navigationToGoodsOrder">商品订单</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -44,7 +46,7 @@ import JsonExcel from "vue-json-excel";
|
|||
import { downLoadDeliverExcel, uploadDeliverExcel } from "@/api/order.js";
|
||||
import { baseUrl } from "@/libs/axios.js";
|
||||
export default {
|
||||
components: {
|
||||
components: {
|
||||
"download-excel": JsonExcel,
|
||||
},
|
||||
data() {
|
||||
|
@ -79,32 +81,50 @@ export default {
|
|||
methods: {
|
||||
// 点击选择步骤
|
||||
handleCheckStep(val) {
|
||||
if(val.title.search('3') == -1){
|
||||
console.warn(val)
|
||||
if (val.title.search("3") == -1) {
|
||||
console.warn(val);
|
||||
this.stepList.map((item) => {
|
||||
item.checked = false;
|
||||
});
|
||||
val.checked = true;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
|
||||
handleUpload(file) {
|
||||
this.file = file;
|
||||
this.upload();
|
||||
return false;
|
||||
},
|
||||
|
||||
navigationToGoodsOrder() {
|
||||
this.$router.push({
|
||||
path: "/order/orderList",
|
||||
});
|
||||
},
|
||||
|
||||
close() {
|
||||
this.$store.commit("removeTag", "export-order-deliver");
|
||||
localStorage.storeOpenedList = JSON.stringify(
|
||||
this.$store.state.app.storeOpenedList
|
||||
);
|
||||
this.$router.go(-1);
|
||||
},
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
*/
|
||||
async upload() {
|
||||
let fd = new FormData();
|
||||
fd.append("files", this.file);
|
||||
await uploadDeliverExcel(fd);
|
||||
},
|
||||
let res = await uploadDeliverExcel(fd);
|
||||
if (res.success) {
|
||||
this.stepList.map((item) => {
|
||||
item.checked = false;
|
||||
});
|
||||
|
||||
this.stepList[2].checked = true;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 下载excel
|
||||
|
@ -176,4 +196,15 @@ img {
|
|||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
.success {
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
> h1 {
|
||||
font-size: 28px;
|
||||
margin: 10px;
|
||||
}
|
||||
/deep/ .btn {
|
||||
margin: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -60,7 +60,7 @@ export default {
|
|||
orderSn: "",
|
||||
buyerName: "",
|
||||
orderStatus: "",
|
||||
orderType:"NORMAL"
|
||||
orderType: "NORMAL",
|
||||
},
|
||||
selectDate: null,
|
||||
form: {
|
||||
|
@ -191,8 +191,6 @@ export default {
|
|||
let result = await verificationCode(this.orderCode);
|
||||
|
||||
if (result.success) {
|
||||
|
||||
|
||||
this.$router.push({
|
||||
name: "order-detail",
|
||||
query: { sn: result.result.sn || this.orderCode },
|
||||
|
@ -271,6 +269,9 @@ export default {
|
|||
});
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
activated() {
|
||||
this.init();
|
||||
},
|
||||
|
|
|
@ -172,6 +172,7 @@ export default {
|
|||
// 不能选择今天以前的时间
|
||||
optionsTime: {
|
||||
disabledDate(date) {
|
||||
// console.log(data)
|
||||
return date && date.valueOf() < Date.now() - 86400000;
|
||||
},
|
||||
},
|
||||
|
@ -191,7 +192,7 @@ export default {
|
|||
startTime: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入开始时间以及结束时间",
|
||||
message: "请正确输入开始时间以及结束时间",
|
||||
},
|
||||
],
|
||||
feedsImg: [
|
||||
|
@ -331,8 +332,9 @@ export default {
|
|||
* dialog点击确定时判断
|
||||
*/
|
||||
addGoods() {
|
||||
this.liveData.forEach((item) => {
|
||||
this.commodityList.forEach((oldVal) => {
|
||||
this.liveData.forEach((item, index) => {
|
||||
this.commodityList.forEach((oldVal, i) => {
|
||||
// 如果商品里面没有商品,以及添加商品为第一次的话
|
||||
if (oldVal.liveGoodsId != item.liveGoodsId) {
|
||||
addLiveGoods({
|
||||
roomId: this.$route.query.roomId,
|
||||
|
@ -389,21 +391,66 @@ export default {
|
|||
this.liveForm.coverImg = res.result;
|
||||
},
|
||||
|
||||
tipsDateError() {
|
||||
this.$Message.error({
|
||||
content:
|
||||
"直播开播时间需要在当前时间的10分钟后并且,开始时间不能在6个月后,直播计划结束时间(开播时间和结束时间间隔不得短于30分钟,不得超过24小时)",
|
||||
duration: 5,
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 选择时间后的回调
|
||||
*/
|
||||
handleChangeTime(daterange) {
|
||||
this.times = daterange;
|
||||
this.$set(
|
||||
this.liveForm,
|
||||
"startTime",
|
||||
new Date(daterange[0]).getTime() / 1000
|
||||
);
|
||||
this.$set(
|
||||
this.liveForm,
|
||||
"endTime",
|
||||
new Date(daterange[1]).getTime() / 1000
|
||||
);
|
||||
/**
|
||||
* 直播开播时间需要在当前时间的10分钟后
|
||||
* 此处设置默认为15分钟方便调整
|
||||
*/
|
||||
let siteTime = new Date().getTime() / 1000;
|
||||
let selectTime = new Date(daterange[0]).getTime() / 1000;
|
||||
let currentTime = this.$options.filters.unixToDate(siteTime);
|
||||
/**
|
||||
* 开播时间和结束时间间隔不得短于30分钟,不得超过24小时
|
||||
* 判断用户设置的结束时间
|
||||
*/
|
||||
let endTime = new Date(daterange[1]).getTime() / 1000;
|
||||
if (selectTime <= siteTime + 15 * 60) {
|
||||
this.tipsDateError();
|
||||
return false;
|
||||
} else if (selectTime + 30 * 60 >= endTime) {
|
||||
// 不能小于30分钟
|
||||
|
||||
this.tipsDateError();
|
||||
return false;
|
||||
} else if (selectTime + 24 * 60 * 60 <= endTime) {
|
||||
// 不能超过24小时
|
||||
|
||||
this.tipsDateError();
|
||||
return false;
|
||||
} else if (
|
||||
// 不能超过6个月
|
||||
siteTime >=
|
||||
new Date().getTime() + 6 * 31 * 24 * 3600 * 1000 + 86400000
|
||||
) {
|
||||
this.tipsDateError();
|
||||
return false;
|
||||
} else {
|
||||
this.$set(this.times, [0], currentTime);
|
||||
this.times[1] = daterange[1];
|
||||
|
||||
// this.times = daterange;
|
||||
this.$set(
|
||||
this.liveForm,
|
||||
"startTime",
|
||||
new Date(daterange[0]).getTime() / 1000
|
||||
);
|
||||
this.$set(
|
||||
this.liveForm,
|
||||
"endTime",
|
||||
new Date(daterange[1]).getTime() / 1000
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -448,7 +495,9 @@ export default {
|
|||
// 需判断当前是否是添加商品
|
||||
if (this.$route.query.id && this.liveData.length != 0) {
|
||||
this.spinShow = true;
|
||||
this.liveForm.commodityList = JSON.stringify(this.liveForm.commodityList);
|
||||
this.liveForm.commodityList = JSON.stringify(
|
||||
this.liveForm.commodityList
|
||||
);
|
||||
// 将当前直播间修改
|
||||
editLive(this.liveForm).then((res) => {
|
||||
if (res.success) {
|
||||
|
|
Loading…
Reference in New Issue