商品问题修改
This commit is contained in:
@@ -7,17 +7,16 @@
|
|||||||
<el-form-item v-if="editPram.parentCategoryName" label="父级">
|
<el-form-item v-if="editPram.parentCategoryName" label="父级">
|
||||||
{{ editPram.parentCategoryName }}
|
{{ editPram.parentCategoryName }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="分类图标(180*180)">
|
<el-form-item label="分类图标(180*180)" prop="icon" :rules="[{ required: true, message: '请上传分类图标!', trigger: ['blur', 'change'] }]">
|
||||||
<div class="upLoadPicBox" @click="modalPicTap('1')">
|
<div class="upLoadPicBox" @click="modalPicTap('1')">
|
||||||
<upload :photo="editPram.icon" @success="uploadSuccess" tip="图标尺寸为18*18比例,大小不能超过200KB,图片只能为jpg、png、gif格式"></upload>
|
<upload :photo="editPram.icon" @success="uploadSuccess" tip="图标尺寸为18*18比例,大小不能超过50KB,图片只能为jpg、png格式"></upload>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="排序">
|
<el-form-item label="排序">
|
||||||
<el-input-number v-model="editPram.sort" :min="0" />
|
<el-input-number v-model="editPram.sort" :min="0" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="状态">
|
<el-form-item label="状态">
|
||||||
<el-switch v-model="editPram.showFlag" active-text="显示" inactive-text="隐藏" active-value="1"
|
<el-switch v-model="editPram.showFlag" active-text="显示" inactive-text="隐藏" active-value="1" inactive-value="2" />
|
||||||
inactive-value="2" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" :loading="loadingBtn" @click="handlerSubmit">确定</el-button>
|
<el-button type="primary" :loading="loadingBtn" @click="handlerSubmit">确定</el-button>
|
||||||
@@ -29,8 +28,8 @@
|
|||||||
<!--创建和编辑公用一个组件-->
|
<!--创建和编辑公用一个组件-->
|
||||||
<script>
|
<script>
|
||||||
import upload from '@/components/Upload/index'
|
import upload from '@/components/Upload/index'
|
||||||
import productApi from '@/api/product/productAttr.js';
|
import productApi from '@/api/product/productAttr.js'
|
||||||
import { loadingFn } from "@/utils/validate"
|
import { loadingFn } from '@/utils/validate'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
// name: "edit",
|
// name: "edit",
|
||||||
@@ -43,17 +42,17 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
model:"classifySave",
|
model: 'classifySave',
|
||||||
loadingBtn: false,
|
loadingBtn: false,
|
||||||
constants: [],
|
constants: [],
|
||||||
editPram: {
|
editPram: {
|
||||||
level: 1,
|
level: 1,
|
||||||
icon:"",
|
icon: '',
|
||||||
showFlag: 1,
|
showFlag: 1,
|
||||||
categoryName: "",
|
categoryName: '',
|
||||||
sort: 1,
|
sort: 1,
|
||||||
parentId:"",
|
parentId: '',
|
||||||
parentCategoryName:""
|
parentCategoryName: ''
|
||||||
},
|
},
|
||||||
categoryProps: {
|
categoryProps: {
|
||||||
value: 'id',
|
value: 'id',
|
||||||
@@ -71,35 +70,34 @@ export default {
|
|||||||
},
|
},
|
||||||
uploadSuccess(e, res) {
|
uploadSuccess(e, res) {
|
||||||
if (res.code == 20000) {
|
if (res.code == 20000) {
|
||||||
({ publicUrl: this.editPram.icon } = res.data);
|
;({ publicUrl: this.editPram.icon } = res.data)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 点击图标
|
// 点击图标
|
||||||
addIcon() {},
|
addIcon() {},
|
||||||
// 点击商品图
|
// 点击商品图
|
||||||
modalPicTap(tit, num, i) {
|
modalPicTap(tit, num, i) {},
|
||||||
},
|
|
||||||
close() {
|
close() {
|
||||||
this.$parent.$parent.editDialogConfig.visible=false;
|
this.$parent.$parent.editDialogConfig.visible = false
|
||||||
},
|
|
||||||
initEditData() {
|
|
||||||
},
|
|
||||||
addTreeListLabelForCasCard(arr, child) {
|
|
||||||
},
|
},
|
||||||
|
initEditData() {},
|
||||||
|
addTreeListLabelForCasCard(arr, child) {},
|
||||||
handlerSubmit() {
|
handlerSubmit() {
|
||||||
productApi[this.model](this.editPram).then((result) => {
|
this.$refs.editPram.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
productApi[this.model](this.editPram)
|
||||||
|
.then(result => {
|
||||||
if (result.code == 20000) {
|
if (result.code == 20000) {
|
||||||
this.$parent.$parent.editDialogConfig.visible=false;
|
this.$parent.$parent.editDialogConfig.visible = false
|
||||||
this.$message.success("添加成功!");
|
this.$message.success('添加成功!')
|
||||||
this.$parent.$parent.handleCurrentChange();
|
this.$parent.$parent.handleCurrentChange()
|
||||||
|
|
||||||
}
|
}
|
||||||
}).catch((err) => {
|
})
|
||||||
|
.catch(err => {})
|
||||||
});
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
handlerSaveOrUpdate(isSave) {
|
handlerSaveOrUpdate(isSave) {}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
<el-table-column prop="advertisePosition" label="广告位置"></el-table-column>
|
<el-table-column prop="advertisePosition" label="广告位置"></el-table-column>
|
||||||
<el-table-column prop="positionImage" label="广告图片" min-width="80">
|
<el-table-column prop="positionImage" label="广告图片" min-width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-image style="width: 50px; height: 50px" :src="scope.row.positionImage"> </el-image>
|
<el-image style="width: 50px; height: 50px" :src="scope.row.positionImage" :preview-src-list="[scope.row.positionImage]"> </el-image>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="时间" min-width="150">
|
<el-table-column label="时间" min-width="150">
|
||||||
|
|||||||
@@ -1,24 +1,35 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form ref="form" :model="form">
|
<el-form ref="form" :model="form">
|
||||||
<el-form-item prop="brandName" label="品牌名称" label-width="100px"
|
<el-form-item
|
||||||
:rules="[{ required: true, message: '请输入品牌名称', trigger: ['blur', 'change'] }]">
|
prop="brandName"
|
||||||
|
label="品牌名称"
|
||||||
|
label-width="100px"
|
||||||
|
:rules="[{ required: true, message: '请输入品牌名称', trigger: ['blur', 'change'] }]"
|
||||||
|
>
|
||||||
<el-input v-model="form.brandName"></el-input>
|
<el-input v-model="form.brandName"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="品牌首字母" prop="firstLetter" label-width="100px"
|
<el-form-item
|
||||||
:rules="[{ required: true, message: '请输入品牌首字母', trigger: ['blur', 'change'] }]">
|
label="品牌首字母"
|
||||||
|
prop="firstLetter"
|
||||||
|
label-width="100px"
|
||||||
|
:rules="[{ required: true, message: '请输入品牌首字母', trigger: ['blur', 'change'] }]"
|
||||||
|
>
|
||||||
<el-input v-model="form.firstLetter"></el-input>
|
<el-input v-model="form.firstLetter"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label=" 品牌LOGO" label-width="100px">
|
<el-form-item
|
||||||
<upload :photo="form.logoUrl" @success="uploadSuccess" tip="只能上传jpg/png格式文件,文件不能超过50kb">
|
label=" 品牌LOGO"
|
||||||
</upload>
|
label-width="100px"
|
||||||
|
prop="logoUrl"
|
||||||
|
:rules="[{ required: true, message: '请上传品牌LOGO', trigger: ['blur', 'change'] }]"
|
||||||
|
>
|
||||||
|
<upload :photo="form.logoUrl" @success="uploadSuccess" tip="只能上传jpg/png格式文件,文件不能超过50kb"> </upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="排序" label-width="100px">
|
<el-form-item label="排序" label-width="100px">
|
||||||
<el-input-number v-model="form.sort" :min="0" />
|
<el-input-number v-model="form.sort" :min="0" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否显示" label-width="100px">
|
<el-form-item label="是否显示" label-width="100px">
|
||||||
<el-switch v-model="form.showFlag" active-text="显示" inactive-text="隐藏" active-value="1"
|
<el-switch v-model="form.showFlag" active-text="显示" inactive-text="隐藏" active-value="1" inactive-value="2" />
|
||||||
inactive-value="2" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="footer">
|
<div slot="footer" class="footer">
|
||||||
@@ -35,30 +46,30 @@ export default {
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
apiMode:"brandSave",
|
apiMode: 'brandSave',
|
||||||
form: {
|
form: {
|
||||||
"brandName": "",
|
brandName: '',
|
||||||
"firstLetter": "",
|
firstLetter: '',
|
||||||
"logoUrl": "",
|
logoUrl: '',
|
||||||
"showFlag": "1",
|
showFlag: '1',
|
||||||
"sort": "1"
|
sort: '1'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
save() {
|
save() {
|
||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$emit("brandSave",this.form,this.apiMode)
|
this.$emit('brandSave', this.form, this.apiMode)
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
uploadSuccess(e, res) {
|
uploadSuccess(e, res) {
|
||||||
console.log(...arguments,"uploadSuccess")
|
console.log(...arguments, 'uploadSuccess')
|
||||||
if (res.code == 20000) {
|
if (res.code == 20000) {
|
||||||
({ publicUrl: this.form.logoUrl } = res.data);
|
;({ publicUrl: this.form.logoUrl } = res.data)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -2,11 +2,9 @@
|
|||||||
<div>
|
<div>
|
||||||
<el-card :bordered="false" shadow="never" class="ivu-mt" :body-style="{ padding: 0 }">
|
<el-card :bordered="false" shadow="never" class="ivu-mt" :body-style="{ padding: 0 }">
|
||||||
<div class="padding-add">
|
<div class="padding-add">
|
||||||
<el-form ref="artFrom" :model="page" label-width="80px" label-position="right" class="tabform"
|
<el-form ref="artFrom" :model="page" label-width="80px" label-position="right" class="tabform" @submit.native.prevent inline>
|
||||||
@submit.native.prevent inline>
|
|
||||||
<el-form-item label="输入搜索">
|
<el-form-item label="输入搜索">
|
||||||
<el-input clearable v-model="page.brandName" placeholder="品牌名称/关键词"
|
<el-input clearable v-model="page.params.brandName" placeholder="品牌名称/关键词" class="form_content_width"></el-input>
|
||||||
class="form_content_width"></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="userSearchs">查询</el-button>
|
<el-button type="primary" @click="userSearchs">查询</el-button>
|
||||||
@@ -16,9 +14,17 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
<el-card :bordered="false" shadow="never" class="ivu-mt-16">
|
<el-card :bordered="false" shadow="never" class="ivu-mt-16">
|
||||||
<el-button type="primary" @click="addBrand">添加品牌</el-button>
|
<el-button type="primary" @click="addBrand">添加品牌</el-button>
|
||||||
<el-table @current-change="tableCurrentChange" ref="table" :data="tableData" v-loading="loading"
|
<el-table
|
||||||
highlight-current-row :row-key="getRowKey" @selection-change="handleSelectRow" empty-text="暂无数据"
|
@current-change="tableCurrentChange"
|
||||||
class="mt14">
|
ref="table"
|
||||||
|
:data="tableData"
|
||||||
|
v-loading="loading"
|
||||||
|
highlight-current-row
|
||||||
|
:row-key="getRowKey"
|
||||||
|
@selection-change="handleSelectRow"
|
||||||
|
empty-text="暂无数据"
|
||||||
|
class="mt14"
|
||||||
|
>
|
||||||
<el-table-column type="selection" width="60" :reserve-selection="true"> </el-table-column>
|
<el-table-column type="selection" width="60" :reserve-selection="true"> </el-table-column>
|
||||||
<el-table-column label="编号">
|
<el-table-column label="编号">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -34,8 +40,7 @@
|
|||||||
<el-table-column label="排序" prop="sort"> </el-table-column>
|
<el-table-column label="排序" prop="sort"> </el-table-column>
|
||||||
<el-table-column label="是否显示">
|
<el-table-column label="是否显示">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch disabled active-value="1" inactive-value="0" v-model="scope.row.showFlag"
|
<el-switch disabled active-value="1" inactive-value="0" v-model="scope.row.showFlag" active-color="#13ce66" inactive-color="#ff4949">
|
||||||
active-color="#13ce66" inactive-color="#ff4949">
|
|
||||||
</el-switch>
|
</el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -48,9 +53,15 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div class="acea-row row-right page">
|
<div class="acea-row row-right page">
|
||||||
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
<el-pagination
|
||||||
:current-page="page.currentPage" :page-sizes="[10, 15, 20, 30]" :page-size="page.pageSize"
|
@size-change="handleSizeChange"
|
||||||
layout="total, sizes, prev, pager, next, jumper" :total="page.totalCount" />
|
@current-change="handleCurrentChange"
|
||||||
|
:current-page="page.currentPage"
|
||||||
|
:page-sizes="[10, 15, 20, 30]"
|
||||||
|
:page-size="page.pageSize"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
:total="page.totalCount"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-dialog title="品牌设置" :visible.sync="isAddOrEdit" v-loading="addLoading">
|
<el-dialog title="品牌设置" :visible.sync="isAddOrEdit" v-loading="addLoading">
|
||||||
@@ -59,9 +70,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import productApi from '@/api/product/productAttr.js';
|
import productApi from '@/api/product/productAttr.js'
|
||||||
import { loadingFn } from "@/utils/validate"
|
import { loadingFn } from '@/utils/validate'
|
||||||
import addOrEdit from "./components/AddOrEdit.vue"
|
import addOrEdit from './components/AddOrEdit.vue'
|
||||||
export default {
|
export default {
|
||||||
components: { addOrEdit },
|
components: { addOrEdit },
|
||||||
data() {
|
data() {
|
||||||
@@ -73,10 +84,10 @@ export default {
|
|||||||
isShowAttrList: false,
|
isShowAttrList: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
page: {
|
page: {
|
||||||
"currentPage": 1,
|
currentPage: 1,
|
||||||
"pageSize": 10,
|
pageSize: 10,
|
||||||
"params": {
|
params: {
|
||||||
brandName:""
|
brandName: ''
|
||||||
},
|
},
|
||||||
totalCount: 0
|
totalCount: 0
|
||||||
},
|
},
|
||||||
@@ -84,8 +95,8 @@ export default {
|
|||||||
total: 0,
|
total: 0,
|
||||||
selectedIds: new Set(), //选中合并项的id
|
selectedIds: new Set(), //选中合并项的id
|
||||||
ids: [],
|
ids: [],
|
||||||
multipleSelection: [],
|
multipleSelection: []
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
created() {
|
created() {
|
||||||
@@ -93,24 +104,27 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
addBrand() {
|
addBrand() {
|
||||||
this.isAddOrEdit = true;
|
this.isAddOrEdit = true
|
||||||
},
|
},
|
||||||
brandSave(e,model="brandSave") {
|
brandSave(e, model = 'brandSave') {
|
||||||
loadingFn.call(this, "addLoading", productApi[model](e).then(res => {
|
loadingFn.call(
|
||||||
|
this,
|
||||||
|
'addLoading',
|
||||||
|
productApi[model](e).then(res => {
|
||||||
if (res.code == 20000) {
|
if (res.code == 20000) {
|
||||||
this.$message.success("操作成功")
|
this.$message.success('操作成功')
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.isAddOrEdit = false;
|
this.isAddOrEdit = false
|
||||||
this.getList();
|
this.getList()
|
||||||
|
}, 1000)
|
||||||
}, 1000);
|
|
||||||
}
|
}
|
||||||
}), 1000);
|
}),
|
||||||
|
1000
|
||||||
|
)
|
||||||
},
|
},
|
||||||
tableCurrentChange(e) {},
|
tableCurrentChange(e) {},
|
||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
this.page.currentPage = val;
|
this.page.currentPage = val
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
@@ -132,32 +146,39 @@ export default {
|
|||||||
this.$alert('请确定删除该数据!', '提示', {
|
this.$alert('请确定删除该数据!', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
callback: action => {
|
callback: action => {
|
||||||
if (action == "confirm") {
|
if (action == 'confirm') {
|
||||||
loadingFn.call(this, "loading", productApi.brandDelete(row).then(res => {
|
loadingFn.call(
|
||||||
if (res.code = 20000) {
|
this,
|
||||||
this.$message.success("操作成功!")
|
'loading',
|
||||||
|
productApi.brandDelete(row).then(res => {
|
||||||
|
if ((res.code = 20000)) {
|
||||||
|
this.$message.success('操作成功!')
|
||||||
this.handleCurrentChange()
|
this.handleCurrentChange()
|
||||||
}
|
}
|
||||||
}));
|
})
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
|
||||||
addAttr(model) {
|
|
||||||
},
|
},
|
||||||
|
addAttr(model) {},
|
||||||
// 编辑
|
// 编辑
|
||||||
edit(row) {
|
edit(row) {
|
||||||
this.isAddOrEdit = true;
|
this.isAddOrEdit = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.addOrEdit.apiMode = "brandUpdate"
|
this.$refs.addOrEdit.apiMode = 'brandUpdate'
|
||||||
this.$refs.addOrEdit.form = Object.assign(this.$refs.addOrEdit.form, row);
|
this.$refs.addOrEdit.form = Object.assign(this.$refs.addOrEdit.form, row)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 列表
|
// 列表
|
||||||
getList() {
|
getList() {
|
||||||
loadingFn.call(this, "loading", productApi.brandGetByPage(this.page).then(res => {
|
loadingFn.call(
|
||||||
if (res.code = 20000) ({ list: this.tableData = [], totalCount: this.page.totalCount = 0 } = res.data);
|
this,
|
||||||
}));
|
'loading',
|
||||||
|
productApi.brandGetByPage(this.page).then(res => {
|
||||||
|
if ((res.code = 20000)) ({ list: this.tableData = [], totalCount: this.page.totalCount = 0 } = res.data)
|
||||||
|
})
|
||||||
|
)
|
||||||
},
|
},
|
||||||
// 表格搜索
|
// 表格搜索
|
||||||
userSearchs() {
|
userSearchs() {
|
||||||
@@ -167,9 +188,8 @@ export default {
|
|||||||
init() {
|
init() {
|
||||||
this.getList()
|
this.getList()
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -58,7 +58,7 @@
|
|||||||
<el-dropdown-item v-if="scope.row.level == 1">
|
<el-dropdown-item v-if="scope.row.level == 1">
|
||||||
<span @click="addClass(scope.row)">新增下级</span>
|
<span @click="addClass(scope.row)">新增下级</span>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item v-if="scope.row.level == 1">查看下级 </el-dropdown-item>
|
<!-- <el-dropdown-item v-if="scope.row.level == 1">查看下级 </el-dropdown-item> -->
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
<el-button type=text>
|
<el-button type=text>
|
||||||
|
|||||||
@@ -2,8 +2,7 @@
|
|||||||
<div class="article-manager">
|
<div class="article-manager">
|
||||||
<el-card :bordered="false" shadow="never" class="ivu-mt mt16" :body-style="{ padding: '0 20px 20px' }">
|
<el-card :bordered="false" shadow="never" class="ivu-mt mt16" :body-style="{ padding: '0 20px 20px' }">
|
||||||
<el-tabs v-model="page.params.type" @tab-click="onClickTab">
|
<el-tabs v-model="page.params.type" @tab-click="onClickTab">
|
||||||
<el-tab-pane :label="item.name + '(' + item.count + ')'" :name="item.type.toString()"
|
<el-tab-pane :label="item.name + '(' + item.count + ')'" :name="item.type.toString()" v-for="(item, index) in headeNum" :key="index" />
|
||||||
v-for="(item, index) in headeNum" :key="index" />
|
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<div>
|
<div>
|
||||||
<el-form ref="artFrom" :model="page" label-width="80px" label-position="right" inline @submit.native.prevent>
|
<el-form ref="artFrom" :model="page" label-width="80px" label-position="right" inline @submit.native.prevent>
|
||||||
@@ -11,11 +10,21 @@
|
|||||||
<el-input clearable placeholder="请输入商品名称" v-model="page.params.productName" class="form_content_width" />
|
<el-input clearable placeholder="请输入商品名称" v-model="page.params.productName" class="form_content_width" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商品分类:" label-for="pid">
|
<el-form-item label="商品分类:" label-for="pid">
|
||||||
<el-cascader v-model="page.params.categorys" size="small" :options="treeSelect" :props="{
|
<el-cascader
|
||||||
multiple: false, emitPath: false, checkStrictly: true, children: 'children',
|
v-model="page.params.categorys"
|
||||||
|
size="small"
|
||||||
|
:options="treeSelect"
|
||||||
|
:props="{
|
||||||
|
multiple: false,
|
||||||
|
emitPath: false,
|
||||||
|
checkStrictly: true,
|
||||||
|
children: 'children',
|
||||||
label: 'categoryName',
|
label: 'categoryName',
|
||||||
value: 'id'
|
value: 'id'
|
||||||
}" clearable class="form_content_width"></el-cascader>
|
}"
|
||||||
|
clearable
|
||||||
|
class="form_content_width"
|
||||||
|
></el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商品类型:" prop="productType">
|
<el-form-item label="商品类型:" prop="productType">
|
||||||
<el-select style="width: 100%;" v-model="page.params.productType" placeholder="请选择商品类型">
|
<el-select style="width: 100%;" v-model="page.params.productType" placeholder="请选择商品类型">
|
||||||
@@ -24,7 +33,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="油站名称:" label-for="siteName">
|
<el-form-item label="油站名称:" label-for="siteName">
|
||||||
<el-input clearable placeholder="请输入油站名称:" v-model="page.siteName" class="form_content_width" />
|
<el-input clearable placeholder="请输入油站名称:" v-model="page.params.siteName" class="form_content_width" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="userSearchs">查询</el-button>
|
<el-button type="primary" @click="userSearchs">查询</el-button>
|
||||||
@@ -49,8 +58,16 @@
|
|||||||
<el-button @click="onShelves" v-show="artFrom.type === '2'">批量上架</el-button>
|
<el-button @click="onShelves" v-show="artFrom.type === '2'">批量上架</el-button>
|
||||||
<el-button class="export" @click="exports">导出</el-button>
|
<el-button class="export" @click="exports">导出</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table ref="table" :data="tableList" class="ivu-mt mt14" v-loading="loading" highlight-current-row
|
<el-table
|
||||||
:row-key="getRowKey" @selection-change="handleSelectRow" empty-text="暂无数据">
|
ref="table"
|
||||||
|
:data="tableList"
|
||||||
|
class="ivu-mt mt14"
|
||||||
|
v-loading="loading"
|
||||||
|
highlight-current-row
|
||||||
|
:row-key="getRowKey"
|
||||||
|
@selection-change="handleSelectRow"
|
||||||
|
empty-text="暂无数据"
|
||||||
|
>
|
||||||
<el-table-column type="selection" width="60" :reserve-selection="true"> </el-table-column>
|
<el-table-column type="selection" width="60" :reserve-selection="true"> </el-table-column>
|
||||||
<el-table-column label="编号">
|
<el-table-column label="编号">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -69,45 +86,67 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
<el-table-column label="商品名称" min-width="250">
|
<el-table-column label="商品名称" min-width="200" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.productName }}</span>
|
<span>{{ scope.row.productName }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="价格/货号" min-width="100">
|
<el-table-column label="价格/货号" min-width="200">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>价格:¥{{ scope.row.price }}</span> <br />
|
<span>价格:¥{{ scope.row.price }}</span> <br />
|
||||||
<span>货号:{{ scope.row.productNum }}</span>
|
<span>货号:{{ scope.row.productNum }}</span>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="标签" min-width="100">
|
<el-table-column label="标签" min-width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div>
|
<div>
|
||||||
上架:
|
上架:
|
||||||
<el-switch disabled active-value="1" inactive-value="2" v-model="scope.row.productStatus"
|
<el-switch
|
||||||
active-color="#13ce66" inactive-color="#ff4949"> </el-switch>
|
disabled
|
||||||
|
active-value="1"
|
||||||
|
inactive-value="2"
|
||||||
|
v-model="scope.row.productStatus"
|
||||||
|
active-color="#13ce66"
|
||||||
|
inactive-color="#ff4949"
|
||||||
|
>
|
||||||
|
</el-switch>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
新品:
|
新品:
|
||||||
<el-switch disabled active-value="1" inactive-value="2" v-model="scope.row.newMark" active-color="#13ce66"
|
<el-switch disabled active-value="1" inactive-value="2" v-model="scope.row.newMark" active-color="#13ce66" inactive-color="#ff4949">
|
||||||
inactive-color="#ff4949"> </el-switch>
|
</el-switch>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
推荐:
|
推荐:
|
||||||
<el-switch disabled active-value="1" inactive-value="2" v-model="scope.row.recommend" active-color="#13ce66"
|
<el-switch disabled active-value="1" inactive-value="2" v-model="scope.row.recommend" active-color="#13ce66" inactive-color="#ff4949">
|
||||||
inactive-color="#ff4949"> </el-switch>
|
</el-switch>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="库存" min-width="100">
|
<el-table-column label="油站" min-width="150" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.stockList.length }}</span> <br />
|
<span>
|
||||||
<!-- <el-button type="text"> {{ scope.row.stockList.length }}</el-button> <br/> -->
|
{{ scope.row.siteName }}
|
||||||
<el-button @click="stockList=scope.row;isEditorStock=true" type="text"> 编辑库存</el-button> <br />
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="更新时间" min-width="100">
|
<el-table-column label="库存" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<!-- <span>{{ scope.row.stockList.length }}</span> <br /> -->
|
||||||
|
<!-- <el-button type="text"> {{ scope.row.stockList.length }}</el-button> <br/> -->
|
||||||
|
<el-button
|
||||||
|
@click="
|
||||||
|
stockList = scope.row
|
||||||
|
isEditorStock = true
|
||||||
|
"
|
||||||
|
type="text"
|
||||||
|
>
|
||||||
|
编辑库存</el-button
|
||||||
|
>
|
||||||
|
<br />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="更新时间" min-width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>
|
<span>
|
||||||
{{ scope.row.updateTime }}
|
{{ scope.row.updateTime }}
|
||||||
@@ -118,7 +157,6 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.auditStatus | auditStatusFilter }}</span> <br />
|
<span>{{ scope.row.auditStatus | auditStatusFilter }}</span> <br />
|
||||||
<el-button @click="openAuditingDetail(scope.row.id)" type="text">审核详情</el-button>
|
<el-button @click="openAuditingDetail(scope.row.id)" type="text">审核详情</el-button>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" minWidth="100">
|
<el-table-column label="操作" fixed="right" minWidth="100">
|
||||||
@@ -129,7 +167,8 @@
|
|||||||
<el-dropdown v-if="scope.row.auditStatus == 1" size="small">
|
<el-dropdown v-if="scope.row.auditStatus == 1" size="small">
|
||||||
<span class="el-dropdown-link">
|
<span class="el-dropdown-link">
|
||||||
<el-button type="text">审核</el-button>
|
<el-button type="text">审核</el-button>
|
||||||
<i class="el-icon-arrow-down el-icon--right"></i> </span>
|
<i class="el-icon-arrow-down el-icon--right"></i>
|
||||||
|
</span>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item>
|
<el-dropdown-item>
|
||||||
<el-button @click="auditing(scope.row, 2)" type="text">审核通过</el-button>
|
<el-button @click="auditing(scope.row, 2)" type="text">审核通过</el-button>
|
||||||
@@ -156,9 +195,15 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div class="acea-row row-right page">
|
<div class="acea-row row-right page">
|
||||||
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
<el-pagination
|
||||||
:current-page="page.currentPage" :page-sizes="[10, 15, 20, 30]" :page-size="page.pageSize"
|
@size-change="handleSizeChange"
|
||||||
layout="total, sizes, prev, pager, next, jumper" :total="page.totalCount" />
|
@current-change="handleCurrentChange"
|
||||||
|
:current-page="page.currentPage"
|
||||||
|
:page-sizes="[10, 15, 20, 30]"
|
||||||
|
:page-size="page.pageSize"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
:total="page.totalCount"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<attribute :attrTemplate="attrTemplate" v-on:changeTemplate="changeTemplate"></attribute>
|
<attribute :attrTemplate="attrTemplate" v-on:changeTemplate="changeTemplate"></attribute>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -172,16 +217,27 @@
|
|||||||
>
|
>
|
||||||
<tao-bao ref="taobaos" v-if="modals" @on-close="onClose"></tao-bao>
|
<tao-bao ref="taobaos" v-if="modals" @on-close="onClose"></tao-bao>
|
||||||
</el-dialog> -->
|
</el-dialog> -->
|
||||||
<el-dialog :visible.sync="batchModal" class="batch-box" title="批量设置" :show-close="true" :close-on-click-modal="false"
|
<el-dialog :visible.sync="batchModal" class="batch-box" title="批量设置" :show-close="true" :close-on-click-modal="false" width="540px">
|
||||||
width="540px">
|
<el-form
|
||||||
<el-form class="batchFormData" ref="batchFormData" :rules="ruleBatch" :model="batchFormData" label-width="90px"
|
class="batchFormData"
|
||||||
label-position="right" @submit.native.prevent>
|
ref="batchFormData"
|
||||||
|
:rules="ruleBatch"
|
||||||
|
:model="batchFormData"
|
||||||
|
label-width="90px"
|
||||||
|
label-position="right"
|
||||||
|
@submit.native.prevent
|
||||||
|
>
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="24" v-if="batchType == 1">
|
<el-col :span="24" v-if="batchType == 1">
|
||||||
<el-form-item label="商品分类:" prop="cate_id">
|
<el-form-item label="商品分类:" prop="cate_id">
|
||||||
<el-cascader v-model="batchFormData.cate_id" size="small" :options="treeSelect"
|
<el-cascader
|
||||||
:props="{ multiple: true, emitPath: false, checkStrictly: true }" clearable
|
v-model="batchFormData.cate_id"
|
||||||
style="width: 400px"></el-cascader>
|
size="small"
|
||||||
|
:options="treeSelect"
|
||||||
|
:props="{ multiple: true, emitPath: false, checkStrictly: true }"
|
||||||
|
clearable
|
||||||
|
style="width: 400px"
|
||||||
|
></el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24" v-if="batchType == 2">
|
<el-col :span="24" v-if="batchType == 2">
|
||||||
@@ -200,29 +256,31 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="" v-if="batchFormData.freight == 2">
|
<el-form-item label="" v-if="batchFormData.freight == 2">
|
||||||
<div class="acea-row">
|
<div class="acea-row">
|
||||||
<el-input-number :controls="false" :min="0" v-model="batchFormData.postage" placeholder="请输入金额"
|
<el-input-number :controls="false" :min="0" v-model="batchFormData.postage" placeholder="请输入金额" class="perW20 maxW" />
|
||||||
class="perW20 maxW" />
|
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="" v-if="batchFormData.freight == 3" prop="temp_id">
|
<el-form-item label="" v-if="batchFormData.freight == 3" prop="temp_id">
|
||||||
<div class="acea-row">
|
<div class="acea-row">
|
||||||
<el-select v-model="batchFormData.temp_id" clearable placeholder="请选择运费模板" style="width: 414px">
|
<el-select v-model="batchFormData.temp_id" clearable placeholder="请选择运费模板" style="width: 414px">
|
||||||
<el-option v-for="(item, index) in templateList" :value="item.id" :key="index"
|
<el-option v-for="(item, index) in templateList" :value="item.id" :key="index" :label="item.name"></el-option>
|
||||||
:label="item.name"></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24" v-if="[3, 4, 5, 6].includes(batchType)">
|
<el-col :span="24" v-if="[3, 4, 5, 6].includes(batchType)">
|
||||||
<el-form-item label="赠送积分:" prop="give_integral" v-if="batchType == 3">
|
<el-form-item label="赠送积分:" prop="give_integral" v-if="batchType == 3">
|
||||||
<el-input-number :controls="false" v-model="batchFormData.give_integral" :min="0" :max="9999999999"
|
<el-input-number
|
||||||
placeholder="请输入积分" style="width: 100%" />
|
:controls="false"
|
||||||
|
v-model="batchFormData.give_integral"
|
||||||
|
:min="0"
|
||||||
|
:max="9999999999"
|
||||||
|
placeholder="请输入积分"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="赠送优惠券:" v-if="batchType == 4">
|
<el-form-item label="赠送优惠券:" v-if="batchType == 4">
|
||||||
<div v-if="couponName.length" class="mb20">
|
<div v-if="couponName.length" class="mb20">
|
||||||
<el-tag closable v-for="(item, index) in couponName" :key="index" @close="handleClose(item)">{{
|
<el-tag closable v-for="(item, index) in couponName" :key="index" @close="handleClose(item)">{{ item.title }}</el-tag>
|
||||||
item.title
|
|
||||||
}}</el-tag>
|
|
||||||
</div>
|
</div>
|
||||||
<el-button type="primary" @click="addCoupon">添加优惠券</el-button>
|
<el-button type="primary" @click="addCoupon">添加优惠券</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -231,9 +289,7 @@
|
|||||||
<div class="labelInput acea-row row-between-wrapper" @click="openLabel">
|
<div class="labelInput acea-row row-between-wrapper" @click="openLabel">
|
||||||
<div style="width: 90%">
|
<div style="width: 90%">
|
||||||
<div v-if="dataLabel.length">
|
<div v-if="dataLabel.length">
|
||||||
<el-tag closable v-for="(item, index) in dataLabel" @close="closeLabel(item)" :key="index">{{
|
<el-tag closable v-for="(item, index) in dataLabel" @close="closeLabel(item)" :key="index">{{ item.label_name }}</el-tag>
|
||||||
item.label_name
|
|
||||||
}}</el-tag>
|
|
||||||
</div>
|
</div>
|
||||||
<span class="span" v-else>选择用户关联标签</span>
|
<span class="span" v-else>选择用户关联标签</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -278,14 +334,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import expandRow from './tableExpand.vue';
|
import expandRow from './tableExpand.vue'
|
||||||
import attribute from './attribute';
|
import attribute from './attribute'
|
||||||
import taoBao from './taoBao';
|
import taoBao from './taoBao'
|
||||||
import goodsDetail from './components/goodsDetail.vue';
|
import goodsDetail from './components/goodsDetail.vue'
|
||||||
import couponList from '@/components/couponList';
|
import couponList from '@/components/couponList'
|
||||||
import userLabel from '@/components/labelList';
|
import userLabel from '@/components/labelList'
|
||||||
import productApi from '@/api/product/productAttr.js';
|
import productApi from '@/api/product/productAttr.js'
|
||||||
import { loadingFn } from "@/utils/validate";
|
import { loadingFn } from '@/utils/validate'
|
||||||
import EditorStock from './components/EditorStock.vue'
|
import EditorStock from './components/EditorStock.vue'
|
||||||
import AuditingDetail from './components/AuditingDetail.vue'
|
import AuditingDetail from './components/AuditingDetail.vue'
|
||||||
|
|
||||||
@@ -294,13 +350,13 @@ export default {
|
|||||||
auditStatusFilter(e) {
|
auditStatusFilter(e) {
|
||||||
switch (e) {
|
switch (e) {
|
||||||
case '1':
|
case '1':
|
||||||
return "待审核"
|
return '待审核'
|
||||||
case '2':
|
case '2':
|
||||||
return "通过"
|
return '通过'
|
||||||
case '3':
|
case '3':
|
||||||
return "不通过"
|
return '不通过'
|
||||||
default:
|
default:
|
||||||
return "暂无数据"
|
return '暂无数据'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -325,7 +381,7 @@ export default {
|
|||||||
give_integral: 0,
|
give_integral: 0,
|
||||||
label_id: [],
|
label_id: [],
|
||||||
coupon_ids: [],
|
coupon_ids: [],
|
||||||
recommend: [],
|
recommend: []
|
||||||
},
|
},
|
||||||
ruleBatch: {},
|
ruleBatch: {},
|
||||||
couponName: [], // 优惠券
|
couponName: [], // 优惠券
|
||||||
@@ -336,14 +392,14 @@ export default {
|
|||||||
lg: 8,
|
lg: 8,
|
||||||
md: 12,
|
md: 12,
|
||||||
sm: 24,
|
sm: 24,
|
||||||
xs: 24,
|
xs: 24
|
||||||
},
|
},
|
||||||
page: {
|
page: {
|
||||||
"currentPage": 1,
|
currentPage: 1,
|
||||||
"pageSize": 10,
|
pageSize: 10,
|
||||||
"params": {
|
params: {
|
||||||
brandName: "",
|
brandName: '',
|
||||||
type:"0"
|
type: '0'
|
||||||
},
|
},
|
||||||
totalCount: 0
|
totalCount: 0
|
||||||
},
|
},
|
||||||
@@ -352,41 +408,41 @@ export default {
|
|||||||
limit: 15,
|
limit: 15,
|
||||||
cate_id: '',
|
cate_id: '',
|
||||||
type: '1',
|
type: '1',
|
||||||
store_name: '',
|
store_name: ''
|
||||||
},
|
},
|
||||||
list: [],
|
list: [],
|
||||||
tableList: [],
|
tableList: [],
|
||||||
headeNum: [
|
headeNum: [
|
||||||
{
|
{
|
||||||
"count": 2,
|
count: '',
|
||||||
"name": "全部商品",
|
name: '全部商品',
|
||||||
"type":0,
|
type: 0,
|
||||||
"params": {}
|
params: {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"count": 40,
|
count: '',
|
||||||
"name": "已上架",
|
name: '已上架',
|
||||||
"type": 1,
|
type: 1,
|
||||||
"params": {
|
params: {
|
||||||
"productStatus": "1"
|
productStatus: '1'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"count": 5,
|
count: '',
|
||||||
"name": "未上架",
|
name: '未上架',
|
||||||
"type": 2,
|
type: 2,
|
||||||
"params": {
|
params: {
|
||||||
"productStatus": "2"
|
productStatus: '2'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"count": 10,
|
count: '',
|
||||||
"name": "待审核",
|
name: '待审核',
|
||||||
"type": 3,
|
type: 3,
|
||||||
"params": {
|
params: {
|
||||||
"auditStatus": "1"
|
auditStatus: '1'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
],
|
],
|
||||||
loading: false,
|
loading: false,
|
||||||
data: [],
|
data: [],
|
||||||
@@ -396,8 +452,8 @@ export default {
|
|||||||
goodsId: '',
|
goodsId: '',
|
||||||
isProductBox: false,
|
isProductBox: false,
|
||||||
treeSelect: [],
|
treeSelect: [],
|
||||||
multipleSelection: [],
|
multipleSelection: []
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.init()
|
this.init()
|
||||||
@@ -408,45 +464,54 @@ export default {
|
|||||||
this.$prompt('审核', '提示', {
|
this.$prompt('审核', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
inputPlaceholder:"请输入审核说明",
|
inputPlaceholder: '请输入审核说明',
|
||||||
inputPattern: /^.+$/,
|
inputPattern: /^.+$/,
|
||||||
inputErrorMessage: '审核说明不能为空'
|
inputErrorMessage: '审核说明不能为空'
|
||||||
}).then(({ value }) => {
|
})
|
||||||
|
.then(({ value }) => {
|
||||||
productApi.productListAuditProduct(Object.assign(row, { auditRemark: value, auditStatus })).then(res => {
|
productApi.productListAuditProduct(Object.assign(row, { auditRemark: value, auditStatus })).then(res => {
|
||||||
if (res.code == 20000) {
|
if (res.code == 20000) {
|
||||||
this.$message.success("操作成功!");
|
this.$message.success('操作成功!')
|
||||||
this.handleCurrentChange();
|
this.handleCurrentChange()
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}).catch((e) => {
|
})
|
||||||
|
.catch(e => {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
openAuditingDetail(id) {
|
openAuditingDetail(id) {
|
||||||
this.isAuditingDetail=true;
|
this.isAuditingDetail = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.AuditingDetail.getByPage(id);
|
this.$refs.AuditingDetail.getByPage(id)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
editorStockSubmit(stockList) {
|
editorStockSubmit(stockList) {
|
||||||
let { id:productId} = this.stockList;
|
let { id: productId } = this.stockList
|
||||||
productApi.productListUpdateBatchList({
|
productApi
|
||||||
|
.productListUpdateBatchList({
|
||||||
productId,
|
productId,
|
||||||
stockList:stockList.map(item=>{ return {
|
stockList: stockList.map(item => {
|
||||||
|
return {
|
||||||
...item,
|
...item,
|
||||||
attributeJson: JSON.stringify(item.attributeJson)
|
attributeJson: JSON.stringify(item.attributeJson)
|
||||||
} })
|
}
|
||||||
}).then(res=>{
|
})
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
if (res.code == 20000) {
|
||||||
|
this.isEditorStock = false
|
||||||
|
this.$message.success('操作成功!')
|
||||||
this.handleCurrentChange()
|
this.handleCurrentChange()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
init() {
|
init() {
|
||||||
this.getCategorySelect();
|
this.getCategorySelect()
|
||||||
this.getDataList();
|
this.getDataList()
|
||||||
},
|
},
|
||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
this.page.currentPage = val;
|
this.page.currentPage = val
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
},
|
},
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
@@ -457,7 +522,7 @@ export default {
|
|||||||
getCategorySelect() {
|
getCategorySelect() {
|
||||||
productApi.getClassificationTree().then(res => {
|
productApi.getClassificationTree().then(res => {
|
||||||
if (res.code == 20000) {
|
if (res.code == 20000) {
|
||||||
this.treeSelect = res.data;
|
this.treeSelect = res.data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -472,52 +537,52 @@ export default {
|
|||||||
handleClose(name) {},
|
handleClose(name) {},
|
||||||
//对象数组去重;
|
//对象数组去重;
|
||||||
unique(arr) {
|
unique(arr) {
|
||||||
const res = new Map();
|
const res = new Map()
|
||||||
return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1));
|
return arr.filter(arr => !res.has(arr.id) && res.set(arr.id, 1))
|
||||||
},
|
},
|
||||||
// 获取运费模板;
|
// 获取运费模板;
|
||||||
productGetTemplate() {},
|
productGetTemplate() {},
|
||||||
// 标签弹窗关闭
|
// 标签弹窗关闭
|
||||||
labelClose() {},
|
labelClose() {},
|
||||||
look(row) {
|
look(row) {
|
||||||
this.goodsId = row.id;
|
this.goodsId = row.id
|
||||||
this.isProductBox = true;
|
this.isProductBox = true
|
||||||
},
|
},
|
||||||
// 物流方式
|
// 物流方式
|
||||||
logisticsBtn(e) {
|
logisticsBtn(e) {
|
||||||
this.batchFormData.logistics = e;
|
this.batchFormData.logistics = e
|
||||||
},
|
},
|
||||||
// 关联用户标签
|
// 关联用户标签
|
||||||
openLabel() {
|
openLabel() {
|
||||||
this.labelShow = true;
|
this.labelShow = true
|
||||||
},
|
},
|
||||||
closeLabel(label) {
|
closeLabel(label) {
|
||||||
let index = this.dataLabel.indexOf(this.dataLabel.filter((d) => d.id == label.id)[0]);
|
let index = this.dataLabel.indexOf(this.dataLabel.filter(d => d.id == label.id)[0])
|
||||||
this.dataLabel.splice(index, 1);
|
this.dataLabel.splice(index, 1)
|
||||||
},
|
},
|
||||||
// 添加优惠券
|
// 添加优惠券
|
||||||
addCoupon() {},
|
addCoupon() {},
|
||||||
getPath() {},
|
getPath() {},
|
||||||
// 导出
|
// 导出
|
||||||
async exports() {
|
async exports() {
|
||||||
let [th, filekey, data, fileName] = [[], [], [], ''];
|
let [th, filekey, data, fileName] = [[], [], [], '']
|
||||||
let excelData = JSON.parse(JSON.stringify(this.artFrom));
|
let excelData = JSON.parse(JSON.stringify(this.artFrom))
|
||||||
excelData.page = 1;
|
excelData.page = 1
|
||||||
excelData.limit = 50;
|
excelData.limit = 50
|
||||||
excelData.ids = this.ids;
|
excelData.ids = this.ids
|
||||||
for (let i = 0; i < excelData.page + 1; i++) {
|
for (let i = 0; i < excelData.page + 1; i++) {
|
||||||
let lebData = await this.getExcelData(excelData);
|
let lebData = await this.getExcelData(excelData)
|
||||||
if (!fileName) fileName = lebData.filename;
|
if (!fileName) fileName = lebData.filename
|
||||||
if (!filekey.length) {
|
if (!filekey.length) {
|
||||||
filekey = lebData.fileKey;
|
filekey = lebData.fileKey
|
||||||
}
|
}
|
||||||
if (!th.length) th = lebData.header;
|
if (!th.length) th = lebData.header
|
||||||
if (lebData.export.length) {
|
if (lebData.export.length) {
|
||||||
data = data.concat(lebData.export);
|
data = data.concat(lebData.export)
|
||||||
excelData.page++;
|
excelData.page++
|
||||||
} else {
|
} else {
|
||||||
this.$exportExcel(th, filekey, fileName, data);
|
this.$exportExcel(th, filekey, fileName, data)
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -528,25 +593,25 @@ export default {
|
|||||||
// 批量下架
|
// 批量下架
|
||||||
onDismount() {},
|
onDismount() {},
|
||||||
getRowKey(row) {
|
getRowKey(row) {
|
||||||
return row.id;
|
return row.id
|
||||||
},
|
},
|
||||||
// 选中某一行
|
// 选中某一行
|
||||||
handleSelectRow(selection) {
|
handleSelectRow(selection) {
|
||||||
const uniqueArr = [];
|
const uniqueArr = []
|
||||||
const ids = [];
|
const ids = []
|
||||||
for (let i = 0; i < selection.length; i++) {
|
for (let i = 0; i < selection.length; i++) {
|
||||||
const item = selection[i];
|
const item = selection[i]
|
||||||
if (!ids.includes(item.id)) {
|
if (!ids.includes(item.id)) {
|
||||||
uniqueArr.push(item);
|
uniqueArr.push(item)
|
||||||
ids.push(item.id);
|
ids.push(item.id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.ids = ids;
|
this.ids = ids
|
||||||
this.multipleSelection = uniqueArr;
|
this.multipleSelection = uniqueArr
|
||||||
},
|
},
|
||||||
// 添加淘宝商品成功
|
// 添加淘宝商品成功
|
||||||
onClose() {
|
onClose() {
|
||||||
this.modals = false;
|
this.modals = false
|
||||||
},
|
},
|
||||||
// 复制淘宝
|
// 复制淘宝
|
||||||
onCopy() {
|
onCopy() {
|
||||||
@@ -557,48 +622,54 @@ export default {
|
|||||||
},
|
},
|
||||||
// tab选择
|
// tab选择
|
||||||
onClickTab() {
|
onClickTab() {
|
||||||
console.log(this.page.params.type,"params");
|
console.log(this.page.params.type, 'params')
|
||||||
this.page.currentPage = 1;
|
this.page.currentPage = 1
|
||||||
this.multipleSelection = [];
|
this.multipleSelection = []
|
||||||
this.$refs.table.clearSelection();
|
this.$refs.table.clearSelection()
|
||||||
this.page.params = {type:this.page.params.type};
|
this.page.params = { type: this.page.params.type }
|
||||||
this.getDataList( Object.assign({},this.page,{params:this.headeNum[this.page.params.type].params}));
|
this.getDataList(Object.assign({}, this.page, { params: this.headeNum[this.page.params.type].params }))
|
||||||
},
|
},
|
||||||
// 下拉树
|
// 下拉树
|
||||||
handleCheckChange(data) {
|
handleCheckChange(data) {
|
||||||
let value = '';
|
let value = ''
|
||||||
let title = '';
|
let title = ''
|
||||||
this.list = [];
|
this.list = []
|
||||||
this.artFrom.cate_id = 0;
|
this.artFrom.cate_id = 0
|
||||||
data.forEach((item, index) => {
|
data.forEach((item, index) => {
|
||||||
value += `${item.id},`;
|
value += `${item.id},`
|
||||||
title += `${item.title},`;
|
title += `${item.title},`
|
||||||
});
|
})
|
||||||
value = value.substring(0, value.length - 1);
|
value = value.substring(0, value.length - 1)
|
||||||
title = title.substring(0, title.length - 1);
|
title = title.substring(0, title.length - 1)
|
||||||
this.list.push({
|
this.list.push({
|
||||||
value,
|
value,
|
||||||
title,
|
title
|
||||||
});
|
})
|
||||||
this.artFrom.cate_id = value;
|
this.artFrom.cate_id = value
|
||||||
this.getDataList();
|
this.getDataList()
|
||||||
},
|
},
|
||||||
// 获取商品表单头数量
|
// 获取商品表单头数量
|
||||||
goodHeade() {},
|
goodHeade() {},
|
||||||
// 商品分类;
|
// 商品分类;
|
||||||
goodsCategory() {
|
goodsCategory() {},
|
||||||
},
|
|
||||||
// 商品列表;
|
// 商品列表;
|
||||||
getDataList(page) {
|
getDataList(page) {
|
||||||
loadingFn.call(this, "loading", productApi.productListGetByPage(page?page:this.page).then(res => {
|
loadingFn.call(
|
||||||
if (res.code = 20000) ({ list: this.tableList = [], totalCount: this.page.totalCount = 0 } = res.data);
|
this,
|
||||||
}));
|
'loading',
|
||||||
},
|
productApi.productListGetByPage(page ? page : this.page).then(res => {
|
||||||
showSelectData() {
|
if ((res.code = 20000)) ({ list: this.tableList = [], totalCount: this.page.totalCount = 0 } = res.data)
|
||||||
|
this.headeNum[0].count = res.data.allCount
|
||||||
|
this.headeNum[1].count = res.data.upCount
|
||||||
|
this.headeNum[2].count = res.data.downCount
|
||||||
|
this.headeNum[3].count = res.data.auditCount
|
||||||
|
})
|
||||||
|
)
|
||||||
},
|
},
|
||||||
|
showSelectData() {},
|
||||||
// 表格搜索
|
// 表格搜索
|
||||||
userSearchs() {
|
userSearchs() {
|
||||||
this.handleCurrentChange();
|
this.handleCurrentChange()
|
||||||
// this.artFrom.page = 1;
|
// this.artFrom.page = 1;
|
||||||
},
|
},
|
||||||
// 上下架
|
// 上下架
|
||||||
@@ -617,16 +688,16 @@ export default {
|
|||||||
},
|
},
|
||||||
// 属性弹出;
|
// 属性弹出;
|
||||||
attrTap() {
|
attrTap() {
|
||||||
this.attrTemplate = true;
|
this.attrTemplate = true
|
||||||
},
|
},
|
||||||
changeTemplate(msg) {
|
changeTemplate(msg) {
|
||||||
this.attrTemplate = msg;
|
this.attrTemplate = msg
|
||||||
},
|
},
|
||||||
// 编辑
|
// 编辑
|
||||||
edit(row) {
|
edit(row) {
|
||||||
console.log(row)
|
console.log(row)
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name:"productAdd",
|
name: 'productAdd',
|
||||||
params: {
|
params: {
|
||||||
id: row.id
|
id: row.id
|
||||||
}
|
}
|
||||||
@@ -638,17 +709,16 @@ export default {
|
|||||||
this.$alert('请确定删除!', '提示', {
|
this.$alert('请确定删除!', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
callback: action => {
|
callback: action => {
|
||||||
if (action == "confirm") {
|
if (action == 'confirm') {
|
||||||
productApi.productListDelete(row).then(res => {
|
productApi.productListDelete(row).then(res => {
|
||||||
if (res.code == 20000) {
|
if (res.code == 20000) {
|
||||||
this.$message.success("操作成功!")
|
this.$message.success('操作成功!')
|
||||||
this.handleCurrentChange()
|
this.handleCurrentChange()
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
// let delfromData = {
|
// let delfromData = {
|
||||||
// title: tit,
|
// title: tit,
|
||||||
// num: num,
|
// num: num,
|
||||||
@@ -667,9 +737,9 @@ export default {
|
|||||||
// .catch((res) => {
|
// .catch((res) => {
|
||||||
// this.$message.error(res.msg);
|
// this.$message.error(res.msg);
|
||||||
// });
|
// });
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
::v-deep .el-tabs__item {
|
::v-deep .el-tabs__item {
|
||||||
|
|||||||
Reference in New Issue
Block a user