功能测试与修改

This commit is contained in:
Chopper
2022-08-26 17:12:48 +08:00
committed by chc
parent ba91d7c26d
commit a345586b25
27 changed files with 2468 additions and 986 deletions

View File

@@ -181,7 +181,7 @@
</div>
</Modal>
<Modal title="导入商品信息" v-model="importModal" :mask-closable="false">
<div>
<div style="text-align: center">
<Upload :before-upload="handleUpload" name="files" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
multiple type="drag" :action="action" :headers="accessToken">
<div style="padding: 50px 0">
@@ -189,6 +189,7 @@
<h2>选择或拖拽文件上传</h2>
</div>
</Upload>
<Button @click="exportGoods" type="text" style="color: red">下载导入模板</Button>
</div>
<div slot="footer">
<Button type="text" @click="importModal = false">确定</Button>
@@ -206,9 +207,12 @@ import {
lowGoods,
deleteGoods,
batchShipTemplate,
downLoadGoods
} from "@/api/goods";
import { baseUrl } from "@/libs/axios.js";
import * as API_Shop from "@/api/shops";
import Cookies from "js-cookie";
import {uploadGoodsExcel} from "../../../api/goods";
export default {
name: "goods",
@@ -511,9 +515,51 @@ export default {
this.upload();
return false;
},
/**
* 上传文件
*/
async upload() {
let fd = new FormData();
fd.append("files", this.file);
let res = await uploadGoodsExcel(fd);
if (res.success) {
this.stepList.map((item) => {
item.checked = false;
});
this.stepList[2].checked = true;
}
},
openImportGoods(){
this.importModal = true
},
async exportGoods(){
downLoadGoods()
.then((res) => {
console.log(res)
const blob = new Blob([res], {
type: "application/vnd.ms-excel;charset=utf-8",
});
//对于<a>标签,只有 Firefox 和 Chrome内核 支持 download 属性
//IE10以上支持blob但是依然不支持download
if ("download" in document.createElement("a")) {
//支持a标签download的浏览器
const link = document.createElement("a"); //创建a标签
link.download = "商品批量导入模板.xls"; //a标签添加属性
link.style.display = "none";
link.href = URL.createObjectURL(blob);
document.body.appendChild(link);
link.click(); //执行下载
URL.revokeObjectURL(link.href); //释放url
document.body.removeChild(link); //释放标签
} else {
navigator.msSaveBlob(blob, fileName);
}
})
.catch((err) => {
console.log(err);
});
},
// 更新库存
updateStock() {
let updateStockList = this.stockList.map((i) => {

0
seller/src/views/lili-dialog/goods-dialog.vue Normal file → Executable file
View File

0
seller/src/views/lili-dialog/index.vue Normal file → Executable file
View File

0
seller/src/views/lili-dialog/link-dialog.vue Normal file → Executable file
View File

0
seller/src/views/lili-dialog/style.scss Normal file → Executable file
View File

View File

@@ -11,6 +11,17 @@ export default [
// name: "category"
// },
// {
// title: "活动",
// url: "3",
// name: "marketing"
// },
// {
// title: "页面",
// url: "3",
// name: "pages"
// },
// {
// title: "活动",
// url: "3",

View File

@@ -126,7 +126,7 @@ export default {
const data = this.formData;
data.status ? (data.pageShow = "OPEN") : (data.pageShow = "CLOSE");
delete data.status;
(data.pageType = "INDEX"), (data.pageClientType = "PC");
(data.pageType = "STORE"), (data.pageClientType = "PC");
if (data.id) {
API_floor.updateHome(data.id, data).then((res) => {
this.$Message.success("编辑模板成功");

View File

@@ -1,98 +1,5 @@
export const modelData = [{
type: 'carousel',
name: '图片轮播',
icon: 'md-image',
showName: '',
size: "790*340",
options: {
list: [{
img: require('@/assets/nav/1.jpg'),
url: ''
},
{
img: require('@/assets/nav/2.jpg'),
url: ''
},
{
img: require('@/assets/nav/3.jpg'),
url: ''
}
],
},
},
// {
// type: 'carousel1',
// name: '图片轮播1',
// icon: 'md-image',
// size: "1200*470",
// options: {
// list: [{
// img: require('@/assets/nav/1.jpg'),
// url: '',
// bgColor: 'yellow'
// },
// {
// img: require('@/assets/nav/2.jpg'),
// url: '',
// bgColor: 'purple'
// },
// {
// img: require('@/assets/nav/3.jpg'),
// url: '',
// bgColor: 'blue'
// }
// ],
// },
// },
// {
// type: 'carousel2',
// name: '图片轮播2',
// icon: 'md-image',
// size: "590*470",
// options: {
// list: [{
// img: require('@/assets/nav/1.jpg'),
// url: ''
// },
// {
// img: require('@/assets/nav/2.jpg'),
// url: ''
// },
// {
// img: require('@/assets/nav/3.jpg'),
// url: ''
// }
// ],
// listRight: [
// [{
// img: require('@/assets/nav/1.jpg'),
// url: ''
// },
// {
// img: require('@/assets/nav/2.jpg'),
// url: ''
// },
// {
// img: require('@/assets/nav/3.jpg'),
// url: ''
// }
// ],
// [{
// img: require('@/assets/nav/1.jpg'),
// url: ''
// },
// {
// img: require('@/assets/nav/2.jpg'),
// url: ''
// },
// {
// img: require('@/assets/nav/3.jpg'),
// url: ''
// }
// ],
// ]
// },
// },
export const modelData = [
{
type: 'hotAdvert',
name: '热门广告',

View File

@@ -61,7 +61,7 @@
</ul>
</div>
</div>
</div>
</div>)
</div>
<!-- 左侧轮播装修 -->
<Modal
@@ -166,14 +166,12 @@
</table>
</TabPane>
</Tabs>
</div>
</Modal>
<!-- 选择商品链接 -->
<liliDialog
ref="liliDialog"
@selectedLink="selectedLink"
></liliDialog>
<!-- 选择图片 -->
<Modal width="1200px" v-model="picModelFlag" footer-hide>

View File

@@ -459,10 +459,9 @@ export default {
}
});
},
<<<<<<< HEAD
pageShow(type){
pageShow(type) {
this.form.pageShow = type
=======
},
getDeliverAddress(){
API_Shop.getDeliverAddress().then(res=>{
if(res.success){
@@ -474,7 +473,6 @@ export default {
}
}
})
>>>>>>> 4ea142ea086a3f534419a31b595de80497e16d90
},
//修改售后地址
regionClick() {

View File

@@ -116,7 +116,7 @@ export default {
: (this.submitWay.pageShow = "CLOSE");
this.submitWay.pageData = JSON.stringify(this.$store.state.styleStore);
this.submitWay.pageType = "INDEX";
this.submitWay.pageType = "STORE";
this.$route.query.id ? this.update() : this.submit(this.submitWay);
},
@@ -128,7 +128,7 @@ export default {
pageData: JSON.stringify(this.$store.state.styleStore),
name: this.submitWay.name,
pageShow: this.submitWay.pageShow,
pageType: "INDEX",
pageType: "STORE",
pageClientType: "H5",
})
.then((res) => {

View File

@@ -63,7 +63,7 @@ export default {
pageSize: 10,
sort: "createTime",
order: "desc",
pageType: "INDEX",
pageType: "STORE",
pageClientType: "H5",
},
total: 0, // 页面数量

View File

@@ -26,7 +26,7 @@
style="width: 200px"
/>
</Form-item>
<Form-item label="上传时间">
<DatePicker
v-model="selectDate"
@@ -189,7 +189,7 @@
</Row>
</Card>
<Modal
:title="modalTitle"
@@ -815,6 +815,6 @@ export default {
this.init();
}
},
};
</script>