diff --git a/src/api/store.js b/src/api/store.js
index 5a51bbd..5c42583 100644
--- a/src/api/store.js
+++ b/src/api/store.js
@@ -280,6 +280,19 @@ export function productExcelApi(params) {
})
}
+/**
+ * 商品导入
+ * @param params
+ * @returns {*}
+ */
+export function importExcelApi(data) {
+ return request({
+ url: `/admin/import/excel/product`,
+ method: 'post',
+ data
+ })
+}
+
/**
* 商品列表 获取复制商品配置
* @param pram
diff --git a/src/api/systemHelp.js b/src/api/systemHelp.js
index b38a4cd..cc56081 100644
--- a/src/api/systemHelp.js
+++ b/src/api/systemHelp.js
@@ -40,11 +40,11 @@ export function detailApi(id) {
* ebsystemhelpproblem删除
* @param pram
*/
-export function deleteApi(data) {
+export function deleteApi(params) {
return request({
url: `admin/system/helpProblem/delete`,
method: 'POST',
- data
+ params
})
}
diff --git a/src/components/UploadExcel/index.vue b/src/components/UploadExcel/index.vue
index 9e8ba8b..6fbabfc 100644
--- a/src/components/UploadExcel/index.vue
+++ b/src/components/UploadExcel/index.vue
@@ -2,9 +2,11 @@
@@ -24,10 +26,15 @@ export default {
excelData: {
header: null,
results: null
- }
+ },
+ fileName: ''
}
},
methods: {
+ resetData() {
+ this.$refs['excel-upload-input'].value = null;
+ this.fileName = '';
+ },
generateData({ header, results }) {
this.excelData.header = header
this.excelData.results = results
@@ -64,7 +71,8 @@ export default {
const files = e.target.files
const rawFile = files[0] // only use files[0]
if (!rawFile) return
- this.upload(rawFile)
+ this.upload(rawFile);
+ this.fileName = rawFile.name;
},
upload(rawFile) {
this.$refs['excel-upload-input'].value = null // fix can't select the same excel
@@ -125,8 +133,7 @@ export default {
}
.drop{
border: 2px dashed #bbb;
- width: 600px;
- height: 160px;
+ width: 800px;
line-height: 160px;
margin: 0 auto;
font-size: 24px;
diff --git a/src/views/store/creatStore/index.vue b/src/views/store/creatStore/index.vue
index 81cb4b8..d99b6c5 100644
--- a/src/views/store/creatStore/index.vue
+++ b/src/views/store/creatStore/index.vue
@@ -435,7 +435,7 @@
cost: 0,
otPrice: 0,
stock: 0,
- barCode: '',
+ // barCode: '',
// weight: 0,
// volume: 0
}],
@@ -448,7 +448,7 @@
id: 0,
couponIds: [],
coupons: [],
- activity: ['默认','秒杀']
+ activity: ['默认']//,'秒杀'
}
const objTitle = {
price: {
@@ -463,9 +463,9 @@
stock: {
title: '库存'
},
- barCode: {
- title: '商品编号'
- },
+ // barCode: {
+ // title: '商品编号'
+ // },
// weight: {
// title: '重量(KG)'
// },
@@ -479,7 +479,7 @@
data() {
return {
isDisabled: this.$route.params.isDisabled==='1'?true:false,
- activity: { '默认': 'red', '秒杀': 'blue' },
+ activity: { '默认': 'red'}, // , '秒杀': 'blue'
props2: {
children: 'child',
label: 'name',
@@ -720,7 +720,7 @@
cost: 0,
otPrice: 0,
stock: 0,
- barCode: '',
+ // barCode: '',
// weight: 0,
// volume: 0,
brokerage: 0,
@@ -751,7 +751,7 @@
cost: 0,
otPrice: 0,
stock: 0,
- barCode: '',
+ // barCode: '',
// weight: 0,
// volume: 0,
brokerage: 0,
@@ -884,7 +884,7 @@
this.$set(val, 'cost', this.oneFormBatch[0].cost)
this.$set(val, 'otPrice', this.oneFormBatch[0].otPrice)
this.$set(val, 'stock', this.oneFormBatch[0].stock)
- this.$set(val, 'barCode', this.oneFormBatch[0].barCode)
+ // this.$set(val, 'barCode', this.oneFormBatch[0].barCode)
// this.$set(val, 'weight', this.oneFormBatch[0].weight)
// this.$set(val, 'volume', this.oneFormBatch[0].volume)
this.$set(val, 'brokerage', this.oneFormBatch[0].brokerage)
@@ -1000,7 +1000,7 @@
ficti: info.ficti,
coupons: info.coupons,
couponIds: info.couponIds,
- activity: info.activityStr ? info.activityStr.split(',') : ['默认','秒杀']
+ activity: info.activityStr ? info.activityStr.split(',') : ['默认']// ,'秒杀'
}
marketingSendApi({type:3}).then(res=>{
if(this.formValidate.couponIds !== null){
diff --git a/src/views/store/index.vue b/src/views/store/index.vue
index a8dc389..487c3da 100644
--- a/src/views/store/index.vue
+++ b/src/views/store/index.vue
@@ -21,7 +21,8 @@
添加商品
-
+ 商品导入
+ 导出
+
+
+
+
+
+
+
+ 上传到服务器
+
+
+
+