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