Browse Source

2023-3-15

master
guoxing 2 years ago
parent
commit
7cfbdaf947
  1. 8
      mallplusui-web-admin/src/router/index.js
  2. 393
      mallplusui-web-admin/src/views/build/community/components/CommunityDetail.vue
  3. 599
      mallplusui-web-admin/src/views/build/community/index.vue
  4. 8
      mallplusui-web-admin/src/views/build/wuyeCompany/components/WuyeCompanyDetail.vue
  5. 8
      mallplusui-web-admin/src/views/build/wuyeCompany/index.vue
  6. 12
      mallplusui-web-admin/src/views/pms/productCate/components/ProductCateDetail.vue
  7. 444
      mallplusui-web-admin/src/views/pms/productCate/index.vue
  8. 7
      mallplusui-web-admin/src/views/sms/advertise/components/HomeAdvertiseDetail.vue
  9. 18
      mallplusui-web-admin/src/views/sms/advertise/index.vue
  10. 793
      mallplusui-web-admin/src/views/sms/coupon/components/CouponDetail.vue

8
mallplusui-web-admin/src/router/index.js

@ -1269,7 +1269,7 @@ export const constantRouterMap = [{
name: 'addCommunity', name: 'addCommunity',
component: () => import('@/views/build/community/add'), component: () => import('@/views/build/community/add'),
meta: { meta: {
title: '添加小区' title: '添加取货点'
}, },
hidden: true hidden: true
}, },
@ -1278,7 +1278,7 @@ export const constantRouterMap = [{
name: 'updateCommunity', name: 'updateCommunity',
component: () => import('@/views/build/community/update'), component: () => import('@/views/build/community/update'),
meta: { meta: {
title: '编辑小区' title: '编辑取货点'
}, },
hidden: true hidden: true
}, },
@ -1560,7 +1560,7 @@ export const constantRouterMap = [{
name: 'addWuyeCompany', name: 'addWuyeCompany',
component: () => import('@/views/build/wuyeCompany/add'), component: () => import('@/views/build/wuyeCompany/add'),
meta: { meta: {
title: '添加物业公司' title: '添加社区'
}, },
hidden: true hidden: true
}, },
@ -1569,7 +1569,7 @@ export const constantRouterMap = [{
name: 'updateWuyeCompany', name: 'updateWuyeCompany',
component: () => import('@/views/build/wuyeCompany/update'), component: () => import('@/views/build/wuyeCompany/update'),
meta: { meta: {
title: '编辑物业公司' title: '编辑社区'
}, },
hidden: true hidden: true
}, },

393
mallplusui-web-admin/src/views/build/community/components/CommunityDetail.vue

@ -1,34 +1,38 @@
<template>  <template> 
<el-card class="form-container" shadow="never"> <el-card class="form-container" shadow="never">
<el-form :model="community" :rules="rules" ref="communityFrom" label-width="100px"> <el-form :model="community" :rules="rules" ref="communityFrom" label-width="130px">
<el-form-item label="社区名称:" prop="name"> <el-form-item label="社区名称:" >
<el-input v-model="community.name"></el-input>
</el-form-item> <span>{{name}}</span>
<el-form-item label="社区户数:" prop="counts"> </el-form-item>
<el-input v-model="community.counts"></el-input> <el-form-item label="取货点名称:" prop="name">
</el-form-item> <el-input v-model="community.name"></el-input>
<el-form-item label="社区地址:" prop="details"> </el-form-item>
<el-input v-model="community.details"></el-input> <el-form-item label="取货点电话:" prop="counts">
</el-form-item> <el-input v-model="community.counts"></el-input>
</el-form-item>
<el-form-item label="取货点地址:" prop="details">
<el-input v-model="community.details"></el-input>
</el-form-item>
<!--
<el-form-item label="地标:" prop="nearbyLandmarks"> <el-form-item label="地标:" prop="nearbyLandmarks">
<el-input v-model="community.nearbyLandmarks"></el-input> <el-input v-model="community.nearbyLandmarks"></el-input>
</el-form-item> </el-form-item>
-->
<el-form-item label="电话:" prop="phone"> <!-- <el-form-item label="电话:" prop="phone">
<el-input v-model="community.phone"></el-input> <el-input v-model="community.phone"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="照片:" prop="pic"> <el-form-item label="照片:" prop="pic">
<single-upload v-model="community.pic"></single-upload> <single-upload v-model="community.pic"></single-upload>
</el-form-item> </el-form-item> -->
<el-form-item label="地图:" prop="phone"> <!-- <el-form-item label="地图:" prop="phone">
<input v-model.number="center.lng" /> <input v-model.number="center.lng" />
<input v-model.number="center.lat" /> <input v-model.number="center.lat" />
<!--<label>关键词<input v-model="keyword"></label> <!--<label>关键词<input v-model="keyword"></label>
<label>地区<input v-model="location"></label>--> <label>地区<input v-model="location"></label>-->
<!--
<baidu-map ak="15BWmtGEGGkZ8lSPUGah30XZ6IGw57HE" <baidu-map ak="15BWmtGEGGkZ8lSPUGah30XZ6IGw57HE"
class="map bm-view" class="map bm-view"
@ -45,184 +49,203 @@
</bm-copyright> </bm-copyright>
<bm-city-list anchor="BMAP_ANCHOR_TOP_LEFT" @changeAfter="changeAfters"></bm-city-list> <bm-city-list anchor="BMAP_ANCHOR_TOP_LEFT" @changeAfter="changeAfters"></bm-city-list>
<bm-marker :position="center" :dragging="false" /> <bm-marker :position="center" :dragging="false" />
<!-- <bm-local-search :keyword="keyword" :auto-viewport="true" :location="location"></bm-local-search>--> <bm-local-search :keyword="keyword" :auto-viewport="true" :location="location"></bm-local-search>
</baidu-map> </baidu-map>
</el-form-item> </el-form-item> -->
<el-form-item> <el-form-item>
<el-button type="primary" @click="onSubmit('communityFrom')">提交</el-button> <el-button type="primary" @click="onSubmit('communityFrom')">提交</el-button>
<el-button v-if="!isEdit" @click="resetForm('communityFrom')">重置</el-button> <el-button v-if="!isEdit" @click="resetForm('communityFrom')">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card> </el-card>
</template> </template>
<script> <script>
import BaiduMap from 'vue-baidu-map/components/map/Map.vue'
import BaiduMap from 'vue-baidu-map/components/map/Map.vue' import BmLocalSearch from 'vue-baidu-map/components/search/LocalSearch';
import BmLocalSearch from 'vue-baidu-map/components/search/LocalSearch'; import BmCityList from 'vue-baidu-map/components/controls/CityList';
import BmCityList from 'vue-baidu-map/components/controls/CityList'; import BmCopyright from 'vue-baidu-map/components/controls/Copyright';
import BmCopyright from 'vue-baidu-map/components/controls/Copyright'; import BmView from 'vue-baidu-map/components/map/MapView';
import BmView from 'vue-baidu-map/components/map/MapView';
import BmMarker from 'vue-baidu-map/components/overlays/Marker' import BmMarker from 'vue-baidu-map/components/overlays/Marker'
import {createCommunity, getCommunity, updateCommunity} from '@/api/build/community' import {
import SingleUpload from '@/components/Upload/singleUpload' createCommunity,
import {formatDate} from '@/utils/date'; getCommunity,
const defaultCommunity={ updateCommunity
name: '' } from '@/api/build/community'
}; import SingleUpload from '@/components/Upload/singleUpload'
export default { import {
name: 'CommunityDetail', formatDate
components:{SingleUpload,BaiduMap,BmLocalSearch,BmCityList,BmView,BmCopyright,BmMarker}, } from '@/utils/date';
props: { const defaultCommunity = {
isEdit: { name: ''
type: Boolean, };
default: false export default {
} name: 'CommunityDetail',
}, components: {
data() { SingleUpload,
return { BaiduMap,
community:Object.assign({}, defaultCommunity), BmLocalSearch,
rules: { BmCityList,
name: [ BmView,
{required: true, message: '请输入名称', trigger: 'blur'}, BmCopyright,
{min: 2, max: 140, message: '长度在 2 到 140 个字符', trigger: 'blur'} BmMarker
], },
logo: [ props: {
{required: true, message: '请输入品牌logo', trigger: 'blur'} isEdit: {
], type: Boolean,
sort: [ default: false
{type: 'number', message: '排序必须为数字'} }
], },
}, data() {
location: '北京', return {
keyword: '百度', name: "",
center: { community: Object.assign({}, defaultCommunity),
lng: 116.404, rules: {
lat: 39.915 name: [{
}, required: true,
zoom: 15 message: '请输入取货点名称',
} trigger: 'blur'
}, },
mounted (){ {
min: 2,
// this.handleScroll() max: 140,
// window.addEventListener('mousewheel',this.handleScroll,false) message: '长度在 2 到 140 个字符',
}, trigger: 'blur'
created() { }
if (this.isEdit) { ]
getCommunity(this.$route.query.id).then(response => { },
this.community = response.data; location: '北京',
if(this.community.latitude){ keyword: '百度',
this.center.lat=this.community.latitude; center: {
lng: 116.404,
lat: 39.915
},
zoom: 15
}
},
mounted() {
// this.handleScroll()
// window.addEventListener('mousewheel',this.handleScroll,false)
},
created() {
console.log("query>>>",this.$route.query)
this.name = this.$route.query.cname
if (this.isEdit) {
getCommunity(this.$route.query.id).then(response => {
this.community = response.data;
if (this.community.latitude) {
this.center.lat = this.community.latitude;
} }
if(this.community.longitude){ if (this.community.longitude) {
this.center.lng=this.community.longitude; this.center.lng = this.community.longitude;
} }
if(this.community.city){ if (this.community.city) {
this.location=this.community.city; this.location = this.community.city;
} }
}); });
}else{ } else {
this.community = Object.assign({},defaultCommunity); this.community = Object.assign({}, defaultCommunity);
} }
}, },
methods: { methods: {
changeAfters(e){ changeAfters(e) {
console.log('123') console.log('123')
console.log(e) console.log(e)
}, },
handleScroll (e) { handleScroll(e) {
//body100%hover //body100%hover
document.body.scrollTop=0 document.body.scrollTop = 0
document.documentElement.scrollTop =0 document.documentElement.scrollTop = 0
}, },
syncCenterAndZoom (e) { syncCenterAndZoom(e) {
const {lng, lat} = e.target.getCenter() const {
this.center.lng = lng lng,
this.center.lat = lat lat
this.zoom = e.target.getZoom() } = e.target.getCenter()
}, this.center.lng = lng
onSubmit(formName) { this.center.lat = lat
this.$refs[formName].validate((valid) => { this.zoom = e.target.getZoom()
if (valid) { },
this.$confirm('是否提交数据', '提示', { onSubmit(formName) {
confirmButtonText: '确定', this.$refs[formName].validate((valid) => {
cancelButtonText: '取消', if (valid) {
type: 'warning' this.$confirm('是否提交数据', '提示', {
}).then(() => { confirmButtonText: '确定',
this.community.companyId=this.$route.query.cid cancelButtonText: '取消',
this.community.latitude=this.center.lat; type: 'warning'
this.community.longitude=this.center.lng; }).then(() => {
if (this.isEdit) { this.community.companyId = this.$route.query.cid
updateCommunity(this.$route.query.id, this.community).then(response => { this.community.latitude = this.center.lat;
if(response.code==200){ this.community.longitude = this.center.lng;
this.$refs[formName].resetFields(); if (this.isEdit) {
this.$message({ updateCommunity(this.$route.query.id, this.community).then(response => {
message: '修改成功', if (response.code == 200) {
type: 'success', this.$refs[formName].resetFields();
duration:1000 this.$message({
}); message: '修改成功',
this.$router.back(); type: 'success',
}else{ duration: 1000
this.$message({ });
message: response.msg, this.$router.back();
type: 'error', } else {
duration:1000 this.$message({
}); message: response.msg,
} type: 'error',
duration: 1000
}); });
} else { }
createCommunity(this.community).then(response => {
if(response.code==200){ });
this.$refs[formName].resetFields(); } else {
this.community = Object.assign({},defaultCommunity); createCommunity(this.community).then(response => {
this.$message({ if (response.code == 200) {
message: '提交成功', this.$refs[formName].resetFields();
type: 'success', this.community = Object.assign({}, defaultCommunity);
duration:1000 this.$message({
}); message: '提交成功',
this.$router.back(); type: 'success',
}else{ duration: 1000
this.$message({ });
message: response.msg, this.$router.back();
type: 'error', } else {
duration:1000 this.$message({
}); message: response.msg,
} type: 'error',
duration: 1000
}); });
} }
});
});
} else { }
this.$message({ });
message: '验证失败',
type: 'error', } else {
duration:1000 this.$message({
}); message: '验证失败',
return false; type: 'error',
} duration: 1000
}); });
}, return false;
resetForm(formName) { }
this.$refs[formName].resetFields(); });
this.community = Object.assign({},defaultCommunity); },
}, resetForm(formName) {
this.$refs[formName].resetFields();
this.community = Object.assign({}, defaultCommunity);
},
}, },
} }
</script> </script>
<style> <style>
.bm-view { .bm-view {
width: 100%; width: 100%;
height: 400px; height: 400px;
} }
</style> </style>

599
mallplusui-web-admin/src/views/build/community/index.vue

@ -1,36 +1,32 @@
<template>  <template> 
<div class="app-container"> <div class="app-container">
<el-card class="filter-container" shadow="never"> <el-card class="filter-container" shadow="never">
<div> <div>
<i class="el-icon-search"></i> <i class="el-icon-search"></i>
<span>筛选搜索</span> <span>筛选搜索</span>
<el-button <el-button style="float: right" @click="searchCommunityList()" type="primary" size="small">
style="float: right" 查询结果
@click="searchCommunityList()" </el-button>
type="primary" </div>
size="small"> <div style="margin-top: 15px">
查询结果 <el-form :inline="true" :model="listQuery" size="small" label-width="140px">
</el-button> <el-form-item label="输入搜索:">
</div> <el-input style="width: 203px" v-model="listQuery.keyword" placeholder="取货点名称/关键字"></el-input>
<div style="margin-top: 15px"> </el-form-item>
<el-form :inline="true" :model="listQuery" size="small" label-width="140px"> </el-form>
<el-form-item label="输入搜索:"> </div>
<el-input style="width: 203px" v-model="listQuery.keyword" placeholder="品牌名称/关键字"></el-input> </el-card>
</el-form-item> <el-card class="operate-container" shadow="never">
</el-form> <i class="el-icon-tickets"></i>
</div> <span>数据列表</span>
</el-card> <span v-show="name"> - {{name}}</span>
<el-card class="operate-container" shadow="never">
<i class="el-icon-tickets"></i>
<span>数据列表</span>
<el-button v-if="cid>0"
class="btn-add" type="success" icon="el-icon-download"
@click="addCommunity()"
size="mini">
添加
</el-button>
<el-button @click="exportExcel" type="success" size="mini" icon="el-icon-download">导出</el-button> <el-button v-if="cid>0" class="btn-add" type="success" icon="el-icon-download" @click="addCommunity()"
size="mini">
添加
</el-button>
<!-- <el-button @click="exportExcel" type="success" size="mini" icon="el-icon-download">导出</el-button>
<el-upload <el-upload
style="display: inline" style="display: inline"
@ -40,65 +36,52 @@
:before-upload="beforeUpload" :before-upload="beforeUpload"
:action="importExcel"> :action="importExcel">
<el-button size="mini" type="success" :disabled="!enabledUploadBtn" :icon="uploadBtnIcon">导入</el-button> <el-button size="mini" type="success" :disabled="!enabledUploadBtn" :icon="uploadBtnIcon">导入</el-button>
</el-upload> </el-upload> -->
</el-card> </el-card>
<div class="table-container"> <div class="table-container">
<el-table ref="communityTable" <el-table ref="communityTable" :data="list" style="width: 100%" @selection-change="handleSelectionChange"
:data="list" v-loading="listLoading" border>
style="width: 100%" <el-table-column type="selection" width="60" align="center"></el-table-column>
@selection-change="handleSelectionChange"
v-loading="listLoading"
border>
<el-table-column type="selection" width="60" align="center"></el-table-column>
<el-table-column label="小区ID" align="center"> <el-table-column label="取货点ID" align="center" width="100">
<template slot-scope="scope">{{scope.row.id}}</template> <template slot-scope="scope">{{scope.row.id}}</template>
</el-table-column> </el-table-column>
<el-table-column label="小区名称" align="center"> <el-table-column label="取货点名称" width="200" align="center">
<template slot-scope="scope">{{scope.row.name}}</template> <template slot-scope="scope">{{scope.row.name}}</template>
</el-table-column> </el-table-column>
<el-table-column label="电话" align="center"> <el-table-column label="取货点电话" width="160" align="center">
<template slot-scope="scope">{{scope.row.phone}}</template> <template slot-scope="scope">{{scope.row.phone}}</template>
</el-table-column> </el-table-column>
<el-table-column label="小区栋数" align="center"> <el-table-column label="取货点地址" align="center">
<template slot-scope="scope">{{scope.row.counts}}</template> <template slot-scope="scope">{{scope.row.address}}</template>
</el-table-column> </el-table-column>
<el-table-column label="小区地址" align="center">
<template slot-scope="scope">{{scope.row.address}}</template>
</el-table-column>
<el-table-column label="根据定位获取城市编码" align="center">
<template slot-scope="scope">{{scope.row.cityCode}}</template>
</el-table-column>
<el-table-column label="地标" align="center">
<template slot-scope="scope">{{scope.row.nearbyLandmarks}}</template>
</el-table-column>
<el-table-column label="创建时间" align="center"> <el-table-column label="创建时间" width="200" align="center">
<template slot-scope="scope">{{scope.row.createTime|formatCreateTime}}</template> <template slot-scope="scope">{{scope.row.createTime|formatCreateTime}}</template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="状态" align="center"> <!-- <el-table-column label="状态" align="center">
<template slot-scope="scope">{{scope.row.status|formatStatus}}</template> <template slot-scope="scope">{{scope.row.status|formatStatus}}</template>
</el-table-column>--> </el-table-column>-->
<el-table-column label="操作" width="250" align="center"> <el-table-column label="操作" width="250" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button <!-- <el-button
size="mini" size="mini"
@click="getAttrList(scope.$index, scope.row)">添加楼 @click="getAttrList(scope.$index, scope.row)">添加楼
</el-button> --> </el-button> -->
<!-- <el-button <!-- <el-button
size="mini" size="mini"
@click="getAttrList1(scope.$index, scope.row)">添加缴费规则 @click="getAttrList1(scope.$index, scope.row)">添加缴费规则
</el-button> --> </el-button> -->
<!-- <el-button <!-- <el-button
size="mini" size="mini"
@click="getAttrList2(scope.$index, scope.row)">添加缴费记录 @click="getAttrList2(scope.$index, scope.row)">添加缴费记录
</el-button> --> </el-button> -->
<!-- <el-button <!-- <el-button
size="mini" size="mini"
@click="getAttrList3(scope.$index, scope.row)">添加通知 @click="getAttrList3(scope.$index, scope.row)">添加通知
</el-button> </el-button>
@ -106,241 +89,279 @@
size="mini" size="mini"
@click="getAttrList4(scope.$index, scope.row)">添加轮播图 @click="getAttrList4(scope.$index, scope.row)">添加轮播图
</el-button> --> </el-button> -->
<el-button <el-button size="mini" @click="handleUpdate(scope.$index, scope.row)">编辑
size="mini" </el-button>
@click="handleUpdate(scope.$index, scope.row)">编辑 <el-button size="mini" type="danger" @click="handleDelete(scope.$index, scope.row)">删除
</el-button> </el-button>
<el-button </template>
size="mini" </el-table-column>
type="danger" </el-table>
@click="handleDelete(scope.$index, scope.row)">删除 </div>
</el-button> <div class="batch-operate-container">
</template>
</el-table-column>
</el-table>
</div>
<div class="batch-operate-container">
</div> </div>
<div class="pagination-container"> <div class="pagination-container">
<el-pagination <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
background layout="total, sizes,prev, pager, next,jumper" :page-size="listQuery.pageSize" :page-sizes="[5,10,15]"
@size-change="handleSizeChange" :current-page.sync="listQuery.pageNum" :total="total">
@current-change="handleCurrentChange" </el-pagination>
layout="total, sizes,prev, pager, next,jumper" </div>
:page-size="listQuery.pageSize" </div>
:page-sizes="[5,10,15]"
:current-page.sync="listQuery.pageNum"
:total="total">
</el-pagination>
</div>
</div>
</template> </template>
<script> <script>
import {fetchList, deleteCommunity,exportExcel} from '@/api/build/community' import {
import {formatDate} from '@/utils/date'; fetchList,
export default { deleteCommunity,
name: 'communityList', exportExcel
data() { } from '@/api/build/community'
import {
formatDate
} from '@/utils/date';
export default {
name: 'communityList',
data() {
return { return {
importExcel: process.env.BASE_API+'/building/community/importExcel', name: "",
uploadBtnIcon:'el-icon-upload2', importExcel: process.env.BASE_API + '/building/community/importExcel',
enabledUploadBtn:true, uploadBtnIcon: 'el-icon-upload2',
dialogVisible:false, enabledUploadBtn: true,
btnText:'数据导入', dialogVisible: false,
btnText: '数据导入',
cid:0, cid: 0,
operates: [ operates: [{
{ label: "显示品牌",
label: "显示品牌", value: "showCommunity"
value: "showCommunity" },
}, {
{ label: "隐藏品牌",
label: "隐藏品牌", value: "hideCommunity"
value: "hideCommunity" }
} ],
], operateType: null,
operateType: null, listQuery: {
listQuery: { keyword: null,
keyword: null, pageNum: 1,
pageNum: 1, pageSize: 10
pageSize: 10 },
}, list: null,
list: null, total: null,
total: null, listLoading: true,
listLoading: true, multipleSelection: []
multipleSelection: [] }
} },
}, created() {
created() { this.getList();
this.getList(); },
}, filters: {
filters: { formatCreateTime(time) {
formatCreateTime(time) { let date = new Date(time);
let date = new Date(time); return formatDate(date, 'yyyy-MM-dd hh:mm:ss')
return formatDate(date, 'yyyy-MM-dd hh:mm:ss') },
},
formatStatus(value) { formatStatus(value) {
if (value === 1) { if (value === 1) {
return '申请'; return '申请';
} else if (value === 2) { } else if (value === 2) {
return '审核失败'; return '审核失败';
} else if (value === 3) { } else if (value === 3) {
return '审核成功'; return '审核成功';
} }
}, },
}, },
methods: { methods: {
onSuccess(response,file,fileList){ onSuccess(response, file, fileList) {
this.enabledUploadBtn=true; this.enabledUploadBtn = true;
this.uploadBtnIcon="el-icon-upload2"; this.uploadBtnIcon = "el-icon-upload2";
this.btnText='数据导入'; this.btnText = '数据导入';
alert("数据导入成功!"); alert("数据导入成功!");
}, },
onError(err,file,fileList){ onError(err, file, fileList) {
this.enabledUploadBtn=true; this.enabledUploadBtn = true;
this.uploadBtnIcon="el-icon-upload2"; this.uploadBtnIcon = "el-icon-upload2";
this.btnText='数据导入'; this.btnText = '数据导入';
alert("数据导入失败!请检查是否有重复数据,和网络连接状况!"); alert("数据导入失败!请检查是否有重复数据,和网络连接状况!");
}, },
beforeUpload(file){ beforeUpload(file) {
this.enabledUploadBtn=false; this.enabledUploadBtn = false;
this.uploadBtnIcon="el-icon-loading"; this.uploadBtnIcon = "el-icon-loading";
this.btnText='正在导入'; this.btnText = '正在导入';
}, },
exportExcel(){ exportExcel() {
window.open(process.env.BASE_API+'/building/community/exportExcel') window.open(process.env.BASE_API + '/building/community/exportExcel')
}, },
getAttrList(index, row) { getAttrList(index, row) {
this.$router.push({path: '/build/floor',query:{cid:row.id,cname:row.name}}) this.$router.push({
}, path: '/build/floor',
getAttrList1(index, row) { query: {
this.$router.push({path: '/build/typePrice',query:{cid:row.id,cname:row.name}}) cid: row.id,
}, cname: row.name
getAttrList2(index, row) { }
this.$router.push({path: '/build/wuyePrice',query:{cid:row.id,cname:row.name}}) })
}, },
getAttrList3(index, row) { getAttrList1(index, row) {
this.$router.push({path: '/build/notice',query:{cid:row.id,cname:row.name}}) this.$router.push({
}, path: '/build/typePrice',
getAttrList4(index, row) { query: {
this.$router.push({path: '/build/adv',query:{cid:row.id,cname:row.name}}) cid: row.id,
}, cname: row.name
getList() { }
this.listLoading = true; })
this.cid=this.$route.query.cid; },
getAttrList2(index, row) {
this.$router.push({
path: '/build/wuyePrice',
query: {
cid: row.id,
cname: row.name
}
})
},
getAttrList3(index, row) {
this.$router.push({
path: '/build/notice',
query: {
cid: row.id,
cname: row.name
}
})
},
getAttrList4(index, row) {
this.$router.push({
path: '/build/adv',
query: {
cid: row.id,
cname: row.name
}
})
},
getList() {
this.listLoading = true;
console.log("query》》》》", this.$route.query);
this.cid = this.$route.query.cid;
this.name = this.$route.query.cname;
if (this.cid) { if (this.cid) {
this.listQuery.companyId=this.cid; this.listQuery.companyId = this.cid;
} }
fetchList(this.listQuery).then(response => { fetchList(this.listQuery).then(response => {
this.listLoading = false; this.listLoading = false;
this.list = response.data.records; console.log("list》》》》", response.data.records);
this.total = response.data.total; this.list = response.data.records;
this.totalPage = response.data.pages; this.total = response.data.total;
this.pageSize = response.data.size; this.totalPage = response.data.pages;
}); this.pageSize = response.data.size;
}, });
handleSelectionChange(val) { },
this.multipleSelection = val; handleSelectionChange(val) {
}, this.multipleSelection = val;
handleUpdate(index, row) { },
this.$router.push({path: '/build/updateCommunity', query: {id: row.id}}) handleUpdate(index, row) {
}, this.$router.push({
handleDelete(index, row) { path: '/build/updateCommunity',
this.$confirm('是否要删除该品牌', '提示', { query: {
confirmButtonText: '确定', id: row.id,
cancelButtonText: '取消', cname:row.companyName
type: 'warning' }
}).then(() => { })
deleteCommunity(row.id).then(response => { },
this.$message({ handleDelete(index, row) {
message: '删除成功', this.$confirm('是否要删除该品牌', '提示', {
type: 'success', confirmButtonText: '确定',
duration: 1000 cancelButtonText: '取消',
}); type: 'warning'
this.getList(); }).then(() => {
}); deleteCommunity(row.id).then(response => {
}); this.$message({
}, message: '删除成功',
getProductList(index, row) { type: 'success',
console.log(index, row); duration: 1000
}, });
getProductCommentList(index, row) { this.getList();
console.log(index, row); });
}, });
},
getProductList(index, row) {
console.log(index, row);
},
getProductCommentList(index, row) {
console.log(index, row);
},
handleSizeChange(val) { handleSizeChange(val) {
this.listQuery.pageNum = 1; this.listQuery.pageNum = 1;
this.listQuery.pageSize = val; this.listQuery.pageSize = val;
this.getList(); this.getList();
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.listQuery.pageNum = val; this.listQuery.pageNum = val;
this.getList(); this.getList();
}, },
searchCommunityList() { searchCommunityList() {
this.listQuery.pageNum = 1; this.listQuery.pageNum = 1;
this.getList(); this.getList();
}, },
handleBatchOperate() { handleBatchOperate() {
console.log(this.multipleSelection); console.log(this.multipleSelection);
if (this.multipleSelection < 1) { if (this.multipleSelection < 1) {
this.$message({ this.$message({
message: '请选择一条记录', message: '请选择一条记录',
type: 'warning', type: 'warning',
duration: 1000 duration: 1000
}); });
return; return;
} }
let showStatus = 0; let showStatus = 0;
if (this.operateType === 'showCommunity') { if (this.operateType === 'showCommunity') {
showStatus = 1; showStatus = 1;
} else if (this.operateType === 'hideCommunity') { } else if (this.operateType === 'hideCommunity') {
showStatus = 0; showStatus = 0;
} else { } else {
this.$message({ this.$message({
message: '请选择批量操作类型', message: '请选择批量操作类型',
type: 'warning', type: 'warning',
duration: 1000 duration: 1000
}); });
return; return;
} }
let ids = []; let ids = [];
for (let i = 0; i < this.multipleSelection.length; i++) { for (let i = 0; i < this.multipleSelection.length; i++) {
ids.push(this.multipleSelection[i].id); ids.push(this.multipleSelection[i].id);
} }
let data = new URLSearchParams(); let data = new URLSearchParams();
data.append("ids", ids); data.append("ids", ids);
data.append("showStatus", showStatus); data.append("showStatus", showStatus);
updateShowStatus(data).then(response => { updateShowStatus(data).then(response => {
this.getList(); this.getList();
this.$message({ this.$message({
message: '修改成功', message: '修改成功',
type: 'success', type: 'success',
duration: 1000 duration: 1000
}); });
}); });
}, },
addCommunity() { addCommunity() {
this.$router.push({path: '/build/addCommunity',query:{cid:this.$route.query.cid,cname:this.$route.query.cname}}); this.$router.push({
} path: '/build/addCommunity',
} query: {
} cid: this.$route.query.cid,
cname: this.$route.query.cname
}
});
}
}
}
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
</style> </style>

8
mallplusui-web-admin/src/views/build/wuyeCompany/components/WuyeCompanyDetail.vue

@ -2,7 +2,7 @@
<el-card class="form-container" shadow="never"> <el-card class="form-container" shadow="never">
<el-form :model="wuyeCompany" :rules="rules" ref="wuyeCompanyFrom" label-width="150px"> <el-form :model="wuyeCompany" :rules="rules" ref="wuyeCompanyFrom" label-width="150px">
<el-form-item label="名称:" prop="name"> <el-form-item label="社区名称:" prop="name">
<el-input v-model="wuyeCompany.name"></el-input> <el-input v-model="wuyeCompany.name"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="联系方式:" prop="phone"> <el-form-item label="联系方式:" prop="phone">
@ -15,10 +15,10 @@
<el-radio :label="3">审核成功</el-radio> <el-radio :label="3">审核成功</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item>--> </el-form-item>-->
<el-form-item label="照片:" prop="pic"> <el-form-item label="社区照片:" prop="pic">
<single-upload v-model="wuyeCompany.pic"></single-upload> <single-upload v-model="wuyeCompany.pic"></single-upload>
</el-form-item> </el-form-item>
<el-form-item label="位置:" prop="address"> <el-form-item label="社区位置:" prop="address">
<el-input v-model="wuyeCompany.address"></el-input> <el-input v-model="wuyeCompany.address"></el-input>
</el-form-item> </el-form-item>
@ -54,7 +54,7 @@
wuyeCompany:Object.assign({}, defaultWuyeCompany), wuyeCompany:Object.assign({}, defaultWuyeCompany),
rules: { rules: {
name: [ name: [
{required: true, message: '请输入品牌名称', trigger: 'blur'}, {required: true, message: '请输入社区名称', trigger: 'blur'},
{min: 2, max: 140, message: '长度在 2 到 140 个字符', trigger: 'blur'} {min: 2, max: 140, message: '长度在 2 到 140 个字符', trigger: 'blur'}
], ],
logo: [ logo: [

8
mallplusui-web-admin/src/views/build/wuyeCompany/index.vue

@ -15,7 +15,7 @@
<div style="margin-top: 15px"> <div style="margin-top: 15px">
<el-form :inline="true" :model="listQuery" size="small" label-width="140px"> <el-form :inline="true" :model="listQuery" size="small" label-width="140px">
<el-form-item label="输入搜索:"> <el-form-item label="输入搜索:">
<el-input style="width: 203px" v-model="listQuery.keyword" placeholder="品牌名称/关键字"></el-input> <el-input style="width: 203px" v-model="listQuery.keyword" placeholder="社区名称/关键字"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -42,7 +42,7 @@
<el-table-column label="编号" align="center"> <el-table-column label="编号" align="center">
<template slot-scope="scope">{{scope.row.id}}</template> <template slot-scope="scope">{{scope.row.id}}</template>
</el-table-column> </el-table-column>
<el-table-column label="名称" align="center"> <el-table-column label="社区名称" align="center">
<template slot-scope="scope">{{scope.row.name}}</template> <template slot-scope="scope">{{scope.row.name}}</template>
</el-table-column> </el-table-column>
<el-table-column label="联系方式" align="center"> <el-table-column label="联系方式" align="center">
@ -51,10 +51,10 @@
<!-- <el-table-column label="状态" align="center"> <!-- <el-table-column label="状态" align="center">
<template slot-scope="scope">{{scope.row.status|formatStatus}}</template> <template slot-scope="scope">{{scope.row.status|formatStatus}}</template>
</el-table-column>--> </el-table-column>-->
<el-table-column label="照片" align="center"> <el-table-column label="社区照片" align="center">
<template slot-scope="scope"><img style="height: 80px" :src="scope.row.pic"></template> <template slot-scope="scope"><img style="height: 80px" :src="scope.row.pic"></template>
</el-table-column> </el-table-column>
<el-table-column label="位置" align="center"> <el-table-column label="社区位置" align="center">
<template slot-scope="scope">{{scope.row.address}}</template> <template slot-scope="scope">{{scope.row.address}}</template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" align="center"> <el-table-column label="创建时间" align="center">

12
mallplusui-web-admin/src/views/pms/productCate/components/ProductCateDetail.vue

@ -24,24 +24,24 @@
<el-form-item label="排序:"> <el-form-item label="排序:">
<el-input v-model="productCate.sort"></el-input> <el-input v-model="productCate.sort"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="是否显示:"> <!-- <el-form-item label="是否显示:">
<el-radio-group v-model="productCate.showStatus"> <el-radio-group v-model="productCate.showStatus">
<el-radio :label="1"></el-radio> <el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio> <el-radio :label="0"></el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item> -->
<el-form-item label="是否显示在导航栏:"> <el-form-item label="是否显示在导航栏:">
<el-radio-group v-model="productCate.navStatus"> <el-radio-group v-model="productCate.navStatus">
<el-radio :label="1"></el-radio> <el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio> <el-radio :label="0"></el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="是否显示在首页:"> <!-- <el-form-item label="是否显示在首页:">
<el-radio-group v-model="productCate.indexStatus"> <el-radio-group v-model="productCate.indexStatus">
<el-radio :label="1"></el-radio> <el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio> <el-radio :label="0"></el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item> -->
<el-form-item label="分类图标:"> <el-form-item label="分类图标:">
<single-upload v-model="productCate.icon"></single-upload> <single-upload v-model="productCate.icon"></single-upload>
</el-form-item> </el-form-item>
@ -87,8 +87,8 @@
navStatus: 0, navStatus: 0,
parentId: 0, parentId: 0,
productUnit: '', productUnit: '',
showStatus: 0, showStatus: 1,
indexStatus:0, indexStatus:1,
sort: 0, sort: 0,
productAttributeIdList: [] productAttributeIdList: []
}; };

444
mallplusui-web-admin/src/views/pms/productCate/index.vue

@ -1,36 +1,30 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-card class="operate-container" shadow="never"> <el-card class="operate-container" shadow="never">
<i class="el-icon-tickets" style="margin-top: 5px"></i> <i class="el-icon-tickets" style="margin-top: 5px"></i>
<span style="margin-top: 5px">数据列表</span> <span style="margin-top: 5px">数据列表</span>
<el-button <el-button class="btn-add" @click="handleAddProductCate()" size="mini">
class="btn-add" 添加
@click="handleAddProductCate()" </el-button>
size="mini"> </el-card>
添加 <div class="table-container">
</el-button> <el-table ref="productCateTable" style="width: 100%" :data="list" v-loading="listLoading" border>
</el-card> <el-table-column label="编号" width="100" align="center">
<div class="table-container"> <template slot-scope="scope">{{scope.row.id}}</template>
<el-table ref="productCateTable" </el-table-column>
style="width: 100%" <el-table-column label="分类名称" align="center">
:data="list" <template slot-scope="scope">{{scope.row.name}}</template>
v-loading="listLoading" border> </el-table-column>
<el-table-column label="编号" width="100" align="center"> <el-table-column label="级别" width="100" align="center">
<template slot-scope="scope">{{scope.row.id}}</template> <template slot-scope="scope">{{scope.row.level | levelFilter}}</template>
</el-table-column> </el-table-column>
<el-table-column label="分类名称" align="center"> <el-table-column label="商品数量" width="100" align="center">
<template slot-scope="scope">{{scope.row.name}}</template> <template slot-scope="scope">{{scope.row.productCount }}</template>
</el-table-column> </el-table-column>
<el-table-column label="级别" width="100" align="center"> <el-table-column label="数量单位" width="100" align="center">
<template slot-scope="scope">{{scope.row.level | levelFilter}}</template> <template slot-scope="scope">{{scope.row.productUnit }}</template>
</el-table-column> </el-table-column>
<el-table-column label="商品数量" width="100" align="center"> <!-- <el-table-column label="导航栏" width="100" align="center">
<template slot-scope="scope">{{scope.row.productCount }}</template>
</el-table-column>
<el-table-column label="数量单位" width="100" align="center">
<template slot-scope="scope">{{scope.row.productUnit }}</template>
</el-table-column>
<el-table-column label="导航栏" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch
@change="handleNavStatusChange(scope.$index, scope.row)" @change="handleNavStatusChange(scope.$index, scope.row)"
@ -39,18 +33,15 @@
v-model="scope.row.navStatus"> v-model="scope.row.navStatus">
</el-switch> </el-switch>
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column label="是否显示" width="100" align="center"> <el-table-column label="是否显示" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch @change="handleShowStatusChange(scope.$index, scope.row)" :active-value="1"
@change="handleShowStatusChange(scope.$index, scope.row)" :inactive-value="0" v-model="scope.row.showStatus">
:active-value="1" </el-switch>
:inactive-value="0" </template>
v-model="scope.row.showStatus"> </el-table-column>
</el-switch> <!-- <el-table-column label="是否首页显示" width="100" align="center">
</template>
</el-table-column>
<el-table-column label="是否首页显示" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch
@change="handleIndexStatusChange(scope.$index, scope.row)" @change="handleIndexStatusChange(scope.$index, scope.row)"
@ -59,193 +50,196 @@
v-model="scope.row.indexStatus"> v-model="scope.row.indexStatus">
</el-switch> </el-switch>
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column label="排序" width="100" align="center"> <el-table-column label="排序" width="100" align="center">
<template slot-scope="scope">{{scope.row.sort }}</template> <template slot-scope="scope">{{scope.row.sort }}</template>
</el-table-column> </el-table-column>
<el-table-column label="设置" width="200" align="center"> <el-table-column label="设置" width="200" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button size="mini" :disabled="scope.row.level | disableNextLevel"
size="mini" @click="handleShowNextLevel(scope.$index, scope.row)">查看下级
:disabled="scope.row.level | disableNextLevel" </el-button>
@click="handleShowNextLevel(scope.$index, scope.row)">查看下级 <!-- <el-button
</el-button>
<el-button
size="mini" size="mini"
@click="handleTransferProduct(scope.$index, scope.row)">转移商品 @click="handleTransferProduct(scope.$index, scope.row)">转移商品
</el-button> </el-button> -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="200" align="center"> <el-table-column label="操作" width="200" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button size="mini" @click="handleUpdate(scope.$index, scope.row)">编辑
size="mini" </el-button>
@click="handleUpdate(scope.$index, scope.row)">编辑 <el-button size="mini" type="danger" @click="handleDelete(scope.$index, scope.row)">删除
</el-button> </el-button>
<el-button </template>
size="mini" </el-table-column>
type="danger" </el-table>
@click="handleDelete(scope.$index, scope.row)">删除 </div>
</el-button> <div class="pagination-container">
</template> <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
</el-table-column> layout="total, sizes,prev, pager, next,jumper" :page-size="listQuery.pageSize" :page-sizes="[5,10,15]"
</el-table> :current-page.sync="listQuery.pageNum" :total="total">
</div> </el-pagination>
<div class="pagination-container"> </div>
<el-pagination </div>
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
layout="total, sizes,prev, pager, next,jumper"
:page-size="listQuery.pageSize"
:page-sizes="[5,10,15]"
:current-page.sync="listQuery.pageNum"
:total="total">
</el-pagination>
</div>
</div>
</template> </template>
<script> <script>
import {fetchList,deleteProductCate,updateShowStatus,updateNavStatus,updateIndexStatus} from '@/api/productCate' import {
fetchList,
deleteProductCate,
updateShowStatus,
updateNavStatus,
updateIndexStatus
} from '@/api/productCate'
export default { export default {
name: "productCateList", name: "productCateList",
data() { data() {
return { return {
list: null, list: null,
total: null, total: null,
listLoading: true, listLoading: true,
listQuery: { listQuery: {
pageNum: 1, pageNum: 1,
pageSize: 5 pageSize: 5
}, },
parentId: 0 parentId: 0
} }
}, },
created() { created() {
this.resetParentId(); this.resetParentId();
this.getList(); this.getList();
}, },
watch: { watch: {
$route(route) { $route(route) {
this.resetParentId(); this.resetParentId();
this.getList(); this.getList();
} }
}, },
methods: { methods: {
resetParentId(){ resetParentId() {
if (this.$route.query.parentId != null) { if (this.$route.query.parentId != null) {
this.parentId = this.$route.query.parentId; this.parentId = this.$route.query.parentId;
} else { } else {
this.parentId = 0; this.parentId = 0;
} }
}, },
handleAddProductCate() { handleAddProductCate() {
this.$router.push('/pms/addProductCate'); this.$router.push('/pms/addProductCate');
}, },
getList() { getList() {
this.listLoading = true; this.listLoading = true;
fetchList(this.parentId, this.listQuery).then(response => { fetchList(this.parentId, this.listQuery).then(response => {
this.listLoading = false; this.listLoading = false;
this.list = response.data.records; this.list = response.data.records;
this.total = response.data.total; this.total = response.data.total;
}); });
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.listQuery.pageNum = 1; this.listQuery.pageNum = 1;
this.listQuery.pageSize = val; this.listQuery.pageSize = val;
this.getList(); this.getList();
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.listQuery.pageNum = val; this.listQuery.pageNum = val;
this.getList(); this.getList();
}, },
handleNavStatusChange(index, row) { handleNavStatusChange(index, row) {
let data = new URLSearchParams(); let data = new URLSearchParams();
let ids=[]; let ids = [];
ids.push(row.id) ids.push(row.id)
data.append('ids',ids); data.append('ids', ids);
data.append('navStatus',row.navStatus); data.append('navStatus', row.navStatus);
updateNavStatus(data).then(response=>{ updateNavStatus(data).then(response => {
this.$message({ this.$message({
message: '修改成功', message: '修改成功',
type: 'success', type: 'success',
duration: 1000 duration: 1000
}); });
}); });
}, },
handleShowStatusChange(index, row) { handleShowStatusChange(index, row) {
let data = new URLSearchParams(); let data = new URLSearchParams();
let ids=[]; let ids = [];
ids.push(row.id) ids.push(row.id)
data.append('ids',ids); data.append('ids', ids);
data.append('showStatus',row.showStatus); data.append('showStatus', row.showStatus);
updateShowStatus(data).then(response=>{ updateShowStatus(data).then(response => {
this.$message({ this.$message({
message: '修改成功', message: '修改成功',
type: 'success', type: 'success',
duration: 1000 duration: 1000
}); });
}); });
}, },
handleIndexStatusChange(index, row) { handleIndexStatusChange(index, row) {
let data = new URLSearchParams(); let data = new URLSearchParams();
let ids=[]; let ids = [];
ids.push(row.id) ids.push(row.id)
data.append('ids',ids); data.append('ids', ids);
data.append('indexStatus',row.indexStatus); data.append('indexStatus', row.indexStatus);
updateIndexStatus(data).then(response=>{ updateIndexStatus(data).then(response => {
this.$message({ this.$message({
message: '修改成功', message: '修改成功',
type: 'success', type: 'success',
duration: 1000 duration: 1000
}); });
}); });
}, },
handleShowNextLevel(index, row) { handleShowNextLevel(index, row) {
this.$router.push({path: '/pms/productCate', query: {parentId: row.id}}) this.$router.push({
}, path: '/pms/productCate',
handleTransferProduct(index, row) { query: {
console.log('handleAddProductCate'); parentId: row.id
}, }
handleUpdate(index, row) { })
this.$router.push({path:'/pms/updateProductCate',query:{id:row.id}}); },
}, handleTransferProduct(index, row) {
handleDelete(index, row) { console.log('handleAddProductCate');
this.$confirm('是否要删除该品牌', '提示', { },
confirmButtonText: '确定', handleUpdate(index, row) {
cancelButtonText: '取消', this.$router.push({
type: 'warning' path: '/pms/updateProductCate',
}).then(() => { query: {
deleteProductCate(row.id).then(response => { id: row.id
this.$message({ }
message: '删除成功', });
type: 'success', },
duration: 1000 handleDelete(index, row) {
}); this.$confirm('是否要删除该品牌', '提示', {
this.getList(); confirmButtonText: '确定',
}); cancelButtonText: '取消',
}); type: 'warning'
} }).then(() => {
}, deleteProductCate(row.id).then(response => {
filters: { this.$message({
levelFilter(value) { message: '删除成功',
if (value === 0) { type: 'success',
return '一级'; duration: 1000
} else if (value === 1) { });
return '二级'; this.getList();
} });
}, });
disableNextLevel(value) { }
if (value === 0) { },
return false; filters: {
} else { levelFilter(value) {
return true; if (value === 0) {
} return '一级';
} } else if (value === 1) {
} return '二级';
} }
},
disableNextLevel(value) {
if (value === 0) {
return false;
} else {
return true;
}
}
}
}
</script> </script>
<style scoped> <style scoped>

7
mallplusui-web-admin/src/views/sms/advertise/components/HomeAdvertiseDetail.vue

@ -9,14 +9,15 @@
<el-input v-model="homeAdvertise.name" class="input-width"></el-input> <el-input v-model="homeAdvertise.name" class="input-width"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="广告位置:"> <el-form-item label="广告位置:">
<el-select v-model="homeAdvertise.type"> <!-- <el-select v-model="homeAdvertise.type">
<el-option <el-option
v-for="type in typeOptions" v-for="type in typeOptions"
:key="type.value" :key="type.value"
:label="type.label" :label="type.label"
:value="type.value"> :value="type.value">
</el-option> </el-option>
</el-select> </el-select> -->
<span>Android首页轮播</span>
</el-form-item> </el-form-item>
<el-form-item label="开始时间:" prop="startTime"> <el-form-item label="开始时间:" prop="startTime">
<el-date-picker <el-date-picker
@ -84,7 +85,7 @@
]; ];
const defaultHomeAdvertise = { const defaultHomeAdvertise = {
name: null, name: null,
type: 1, type: 2,
pic: null, pic: null,
startTime: null, startTime: null,
endTime: null, endTime: null,

18
mallplusui-web-admin/src/views/sms/advertise/index.vue

@ -23,7 +23,7 @@
<el-form-item label="广告名称:"> <el-form-item label="广告名称:">
<el-input v-model="listQuery.name" class="input-width" placeholder="广告名称"></el-input> <el-input v-model="listQuery.name" class="input-width" placeholder="广告名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="广告位置:"> <!-- <el-form-item label="广告位置:">
<el-select v-model="listQuery.type" placeholder="全部" clearable class="input-width"> <el-select v-model="listQuery.type" placeholder="全部" clearable class="input-width">
<el-option v-for="item in typeOptions" <el-option v-for="item in typeOptions"
:key="item.value" :key="item.value"
@ -31,7 +31,7 @@
:value="item.value"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item> -->
<el-form-item label="到期时间:"> <el-form-item label="到期时间:">
<el-date-picker <el-date-picker
class="input-width" class="input-width"
@ -62,13 +62,13 @@
<el-table-column label="广告名称" align="center"> <el-table-column label="广告名称" align="center">
<template slot-scope="scope">{{scope.row.name}}</template> <template slot-scope="scope">{{scope.row.name}}</template>
</el-table-column> </el-table-column>
<el-table-column label="广告位置" width="120" align="center"> <!-- <el-table-column label="广告位置" width="120" align="center">
<template slot-scope="scope">{{scope.row.type | formatType}}</template> <template slot-scope="scope">{{scope.row.type | formatType}}</template>
</el-table-column> </el-table-column> -->
<el-table-column label="广告图片" width="120" align="center"> <el-table-column label="广告图片" width="250" align="center">
<template slot-scope="scope"><img style="height: 80px" :src="scope.row.pic"></template> <template slot-scope="scope"><img style="height: 80px" :src="scope.row.pic"></template>
</el-table-column> </el-table-column>
<el-table-column label="时间" width="220" align="center"> <el-table-column label="时间" width="320" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<p>开始时间{{scope.row.startTime | formatTime}}</p> <p>开始时间{{scope.row.startTime | formatTime}}</p>
<p>到期时间{{scope.row.endTime | formatTime}}</p> <p>到期时间{{scope.row.endTime | formatTime}}</p>
@ -84,13 +84,13 @@
</el-switch> </el-switch>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="点击次数" width="120" align="center"> <!-- <el-table-column label="点击次数" width="120" align="center">
<template slot-scope="scope">{{scope.row.clickCount}}</template> <template slot-scope="scope">{{scope.row.clickCount}}</template>
</el-table-column> </el-table-column>
<el-table-column label="生成订单" width="120" align="center"> <el-table-column label="生成订单" width="120" align="center">
<template slot-scope="scope">{{scope.row.orderCount}}</template> <template slot-scope="scope">{{scope.row.orderCount}}</template>
</el-table-column> </el-table-column> -->
<el-table-column label="操作" width="120" align="center"> <el-table-column label="操作" width="180" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" <el-button size="mini"
type="text" type="text"

793
mallplusui-web-admin/src/views/sms/coupon/components/CouponDetail.vue

@ -1,403 +1,408 @@
<template>  <template> 
<el-card class="form-container" shadow="never"> <el-card class="form-container" shadow="never">
<el-form :model="coupon" <el-form :model="coupon" :rules="rules" ref="couponFrom" label-width="150px" size="small">
:rules="rules" <el-form-item label="优惠券类型:">
ref="couponFrom" <span>全场赠券</span>
label-width="150px" </el-form-item>
size="small"> <el-form-item label="优惠券名称:" prop="name">
<el-form-item label="优惠券类型:"> <el-input v-model="coupon.name" class="input-width"></el-input>
<el-select v-model="coupon.type"> </el-form-item>
<el-option v-for='type in typeOptions' :key='type.value' :label='type.label' :value='type.value'></el-option> <el-form-item label="适用平台:">
</el-select>
</el-form-item> <span>全平台</span>
<el-form-item label="优惠券名称:" prop="name"> </el-form-item>
<el-input v-model="coupon.name" class="input-width"></el-input> <el-form-item label="总发行量:" prop="publishCount">
</el-form-item> <el-input v-model.number="coupon.publishCount" placeholder="只能输入正整数" class="input-width"></el-input>
<el-form-item label="适用平台:"> </el-form-item>
<el-select v-model="coupon.platform"> <el-form-item label="面额:" prop="amount">
<el-option <el-input v-model="coupon.amount" @keyup.native="coupon.amount = UpNumber(coupon.amount,2)"
v-for="item in platformOptions" placeholder="面值只能是数值,限2位小数" class="input-width">
:key="item.value" <template slot="append"></template>
:label="item.label" </el-input>
:value="item.value"> </el-form-item>
</el-option> <el-form-item label="每人限领:">
</el-select> <el-input v-model="coupon.perLimit" placeholder="只能输入正整数" class="input-width">
</el-form-item> <template slot="append"></template>
<el-form-item label="总发行量:" prop="publishCount"> </el-input>
<el-input v-model.number="coupon.publishCount" placeholder="只能输入正整数" class="input-width"></el-input> </el-form-item>
</el-form-item> <el-form-item label="使用门槛:" prop="minPoint">
<el-form-item label="面额:" prop="amount"> <el-input v-model.number="coupon.minPoint" placeholder="只能输入正整数" class="input-width">
<el-input v-model="coupon.amount" @keyup.native="coupon.amount = UpNumber(coupon.amount,2)" placeholder="面值只能是数值,限2位小数" class="input-width"> <template slot="prepend"></template>
<template slot="append"></template> <template slot="append">元可用</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="每人限领:"> <el-form-item label="有效期:" >
<el-input v-model="coupon.perLimit" placeholder="只能输入正整数" class="input-width"> <el-date-picker type="date" placeholder="选择日期" v-model="coupon.startTime" style="width: 150px">
<template slot="append"></template> </el-date-picker>
</el-input> <span style="margin-left: 20px;margin-right: 20px"></span>
</el-form-item> <el-date-picker type="date" placeholder="选择日期" v-model="coupon.endTime" style="width: 150px">
<el-form-item label="使用门槛:" prop="minPoint"> </el-date-picker>
<el-input v-model.number="coupon.minPoint" placeholder="只能输入正整数" class="input-width"> </el-form-item>
<template slot="prepend"></template> <el-form-item label="可使用商品:">
<template slot="append">元可用</template> <el-radio-group v-model="coupon.useType">
</el-input> <el-radio-button :label="0">全场通用</el-radio-button>
</el-form-item> <el-radio-button :label="1">指定分类</el-radio-button>
<el-form-item label="有效期:"> <el-radio-button :label="2">指定商品</el-radio-button>
<el-date-picker type="date" placeholder="选择日期" v-model="coupon.startTime" style="width: 150px"></el-date-picker> </el-radio-group>
<span style="margin-left: 20px;margin-right: 20px"></span> </el-form-item>
<el-date-picker type="date" placeholder="选择日期" v-model="coupon.endTime" style="width: 150px"></el-date-picker> <el-form-item v-show="coupon.useType===1">
</el-form-item> <el-cascader clearable placeholder="请选择分类名称" v-model="selectProductCate" :options="productCateOptions">
<el-form-item label="可使用商品:"> </el-cascader>
<el-radio-group v-model="coupon.useType"> <el-button @click="handleAddProductCategoryRelation()">添加</el-button>
<el-radio-button :label="0">全场通用</el-radio-button> <el-table ref="productCateRelationTable" :data="coupon.productCategoryRelationList"
<el-radio-button :label="1">指定分类</el-radio-button> style="width: 100%;margin-top: 20px" border>
<el-radio-button :label="2">指定商品</el-radio-button> <el-table-column label="分类名称" align="center">
</el-radio-group> <template
</el-form-item> slot-scope="scope">{{scope.row.parentCategoryName}}>{{scope.row.productCategoryName}}</template>
<el-form-item v-show="coupon.useType===1"> </el-table-column>
<el-cascader <el-table-column label="操作" align="center" width="100">
clearable <template slot-scope="scope">
placeholder="请选择分类名称" <el-button size="mini" type="text"
v-model="selectProductCate" @click="handleDeleteProductCateRelation(scope.$index, scope.row)">删除
:options="productCateOptions"> </el-button>
</el-cascader> </template>
<el-button @click="handleAddProductCategoryRelation()">添加</el-button> </el-table-column>
<el-table ref="productCateRelationTable" </el-table>
:data="coupon.productCategoryRelationList" </el-form-item>
style="width: 100%;margin-top: 20px" <el-form-item v-show="coupon.useType===2">
border> <el-select v-model="selectProduct" filterable remote reserve-keyword placeholder="商品名称/商品货号"
<el-table-column label="分类名称" align="center"> :remote-method="searchProductMethod" :loading="selectProductLoading">
<template slot-scope="scope">{{scope.row.parentCategoryName}}>{{scope.row.productCategoryName}}</template> <el-option v-for="item in selectProductOptions" :key="item.productId" :label="item.productName"
</el-table-column> :value="item.productId">
<el-table-column label="操作" align="center" width="100"> <span style="float: left">{{ item.productName }}</span>
<template slot-scope="scope"> <span style="float: right; color: #8492a6; font-size: 13px">NO.{{ item.productSn }}</span>
<el-button size="mini" </el-option>
type="text" </el-select>
@click="handleDeleteProductCateRelation(scope.$index, scope.row)">删除 <el-button @click="handleAddProductRelation()">添加</el-button>
</el-button> <el-table ref="productRelationTable" :data="coupon.productRelationList"
</template> style="width: 100%;margin-top: 20px" border>
</el-table-column> <el-table-column label="商品名称" align="center">
</el-table> <template slot-scope="scope">{{scope.row.productName}}</template>
</el-form-item> </el-table-column>
<el-form-item v-show="coupon.useType===2"> <el-table-column label="货号" align="center" width="120">
<el-select <template slot-scope="scope">NO.{{scope.row.productSn}}</template>
v-model="selectProduct" </el-table-column>
filterable <el-table-column label="操作" align="center" width="100">
remote <template slot-scope="scope">
reserve-keyword <el-button size="mini" type="text"
placeholder="商品名称/商品货号" @click="handleDeleteProductRelation(scope.$index, scope.row)">删除
:remote-method="searchProductMethod" </el-button>
:loading="selectProductLoading"> </template>
<el-option </el-table-column>
v-for="item in selectProductOptions" </el-table>
:key="item.productId" </el-form-item>
:label="item.productName" <el-form-item label="备注:">
:value="item.productId"> <el-input class="input-width" type="textarea" :rows="5" placeholder="请输入内容" v-model="coupon.note">
<span style="float: left">{{ item.productName }}</span> </el-input>
<span style="float: right; color: #8492a6; font-size: 13px">NO.{{ item.productSn }}</span> </el-form-item>
</el-option> <el-form-item>
</el-select> <el-button type="primary" @click="onSubmit('couponFrom')">提交</el-button>
<el-button @click="handleAddProductRelation()">添加</el-button> <el-button v-if="!isEdit" @click="resetForm('couponFrom')">重置</el-button>
<el-table ref="productRelationTable" </el-form-item>
:data="coupon.productRelationList" </el-form>
style="width: 100%;margin-top: 20px" </el-card>
border>
<el-table-column label="商品名称" align="center">
<template slot-scope="scope">{{scope.row.productName}}</template>
</el-table-column>
<el-table-column label="货号" align="center" width="120" >
<template slot-scope="scope">NO.{{scope.row.productSn}}</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button size="mini"
type="text"
@click="handleDeleteProductRelation(scope.$index, scope.row)">删除
</el-button>
</template>
</el-table-column>
</el-table>
</el-form-item>
<el-form-item label="备注:">
<el-input
class="input-width"
type="textarea"
:rows="5"
placeholder="请输入内容"
v-model="coupon.note">
</el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit('couponFrom')">提交</el-button>
<el-button v-if="!isEdit" @click="resetForm('couponFrom')">重置</el-button>
</el-form-item>
</el-form>
</el-card>
</template> </template>
<script> <script>
import {createCoupon,getCoupon,updateCoupon} from '@/api/coupon'; import {
import {fetchSimpleList as fetchProductList} from '@/api/product'; createCoupon,
import {fetchListWithChildren} from '@/api/productCate' getCoupon,
const defaultCoupon = { updateCoupon
type: 0, } from '@/api/coupon';
name: null, import {
platform: 0, fetchSimpleList as fetchProductList
amount: null, } from '@/api/product';
perLimit: 1, import {
minPoint: null, fetchListWithChildren
startTime: null, } from '@/api/productCate'
endTime: null, const defaultCoupon = {
useType: 0, type: 0,
note: null, name: null,
publishCount: null, platform: 0,
productRelationList: [], amount: null,
productCategoryRelationList: [] perLimit: 1,
}; minPoint: null,
const defaultTypeOptions = [ startTime: null,
{ endTime: null,
label: '全场赠券', useType: 0,
value: 0 note: null,
}, publishCount: null,
{ productRelationList: [],
label: '会员赠券', productCategoryRelationList: []
value: 1 };
}, const defaultTypeOptions = [{
{ label: '全场赠券',
label: '购物赠券', value: 0
value: 2 },
}, {
{ label: '会员赠券',
label: '注册赠券', value: 1
value: 3 },
} {
]; label: '购物赠券',
const defaultPlatformOptions = [ value: 2
{ },
label: '全平台', {
value: 0 label: '注册赠券',
}, value: 3
{ }
label: '移动平台', ];
value: 1 const defaultPlatformOptions = [{
}, label: '全平台',
{ value: 0
label: 'PC平台', },
value: 2 {
} label: '移动平台',
]; value: 1
},
{
label: 'PC平台',
value: 2
}
];
var validatePrice = (rule, value, callback) => { var validatePrice = (rule, value, callback) => {
if (!value) { if (!value) {
callback(new Error("面额不能为空")); callback(new Error("面额不能为空"));
} else if (value.split(".").length > 2) { } else if (value.split(".").length > 2) {
callback(new Error("请输入正确格式的金额")); // callback(new Error("请输入正确格式的金额")); //
} }
// else if (value > add_Com.Retail_Price) { // else if (value > add_Com.Retail_Price) {
// callback(new Error("")); // callback(new Error(""));
// } // }
else { else {
value = Math.round(value * Math.pow(10, 2)) / Math.pow(10, 2); // value = Math.round(value * Math.pow(10, 2)) / Math.pow(10, 2); //
value = Number(value).toFixed(2); // value = Number(value).toFixed(2); //
this.add_Com.Cost_Price = value; this.add_Com.Cost_Price = value;
callback(); callback();
}
};
export default {
name: 'CouponDetail',
props: {
isEdit: {
type: Boolean,
default: false
} }
}; },
data() {
return {
coupon: Object.assign({}, defaultCoupon),
typeOptions: Object.assign({}, defaultTypeOptions),
platformOptions: Object.assign({}, defaultPlatformOptions),
rules: {
name: [{
required: true,
message: '请输入优惠券名称',
trigger: 'blur'
},
{
min: 2,
max: 140,
message: '长度在 2 到 140 个字符',
trigger: 'blur'
}
],
publishCount: [{
type: 'number',
required: true,
message: '只能输入正整数',
trigger: 'blur'
}],
amount: [{
export default { required: true,
name: 'CouponDetail', message: '面值只能是数值,0.01-10000,限2位小数',
props: { trigger: 'blur'
isEdit: { }],
type: Boolean, minPoint: [{
default: false type: 'number',
} required: true,
}, message: '只能输入正整数',
data() { trigger: 'blur'
return { }]
coupon: Object.assign({}, defaultCoupon), },
typeOptions: Object.assign({}, defaultTypeOptions), selectProduct: null,
platformOptions: Object.assign({}, defaultPlatformOptions), selectProductLoading: false,
rules: { selectProductOptions: [],
name: [ selectProductCate: null,
{required: true, message: '请输入优惠券名称', trigger: 'blur'}, productCateOptions: []
{min: 2, max: 140, message: '长度在 2 到 140 个字符', trigger: 'blur'} }
], },
publishCount: [ created() {
{type: 'number',required: true, message: '只能输入正整数', trigger: 'blur'} if (this.isEdit) {
], getCoupon(this.$route.query.id).then(response => {
// amount: [ this.coupon = response.data;
// // {type: 'number',required: true,message: '0.01-100002',trigger: 'blur'} });
// // { required: true, validator: validatePrice, trigger: "blur" }, }
// ], this.getProductCateList();
minPoint: [ },
{type: 'number',required: true,message: '只能输入正整数',trigger: 'blur'} methods: {
] UpNumber(val, limit = 2) {
}, val = val.replace(/[^\d.]/g, '') //
selectProduct:null, val = val.replace(/^00/, '0.') // 0
selectProductLoading: false, val = val.replace(/^\./g, '0.') // 0.
selectProductOptions:[], val = val.replace(/\.{2,}/g, '.') //
selectProductCate: null, val = val.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.'); //
productCateOptions: [] /^0\d+/.test(val) ? val = val.slice(1) : '' // 0
} const str = '^(\\d+)\\.(\\d{' + limit + '}).*$'
}, const reg = new RegExp(str)
created(){ if (limit === 0) {
if(this.isEdit){ //
getCoupon(this.$route.query.id).then(response=>{ val = val.replace(reg, '$1')
this.coupon=response.data; } else {
}); //
} val = val.replace(reg, '$1.$2')
this.getProductCateList(); }
}, return val
methods:{ },
UpNumber(val, limit = 2) { onSubmit(formName) {
val = val.replace(/[^\d.]/g, '') // this.$refs[formName].validate((valid) => {
val = val.replace(/^00/, '0.') // 0 if (valid) {
val = val.replace(/^\./g, '0.') // 0. this.$confirm('是否提交数据', '提示', {
val = val.replace(/\.{2,}/g, '.') // confirmButtonText: '确定',
val = val.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.'); // cancelButtonText: '取消',
/^0\d+/.test(val) ? val = val.slice(1) : '' // 0 type: 'warning'
const str = '^(\\d+)\\.(\\d{' + limit + '}).*$' }).then(() => {
const reg = new RegExp(str) if (this.isEdit) {
if (limit === 0) { updateCoupon(this.$route.query.id, this.coupon).then(response => {
// this.$refs[formName].resetFields();
val = val.replace(reg, '$1') this.$message({
} else { message: '修改成功',
// type: 'success',
val = val.replace(reg, '$1.$2') duration: 1000
} });
return val this.$router.back();
}, });
onSubmit(formName) { } else {
this.$refs[formName].validate((valid) => { createCoupon(this.coupon).then(response => {
if (valid) { this.$refs[formName].resetFields();
this.$confirm('是否提交数据', '提示', { this.$message({
confirmButtonText: '确定', message: '提交成功',
cancelButtonText: '取消', type: 'success',
type: 'warning' duration: 1000
}).then(() => { });
if(this.isEdit){ this.$router.back();
updateCoupon(this.$route.query.id,this.coupon).then(response=>{ });
this.$refs[formName].resetFields(); }
this.$message({ });
message: '修改成功', } else {
type: 'success', this.$message({
duration:1000 message: '验证失败',
}); type: 'error',
this.$router.back(); duration: 1000
}); });
}else{ return false;
createCoupon(this.coupon).then(response=>{ }
this.$refs[formName].resetFields(); });
this.$message({ },
message: '提交成功', resetForm(formName) {
type: 'success', this.$refs[formName].resetFields();
duration:1000 this.coupon = Object.assign({}, defaultCoupon);
}); },
this.$router.back(); searchProductMethod(query) {
}); if (query !== '') {
} this.loading = true;
}); fetchProductList({
} else { keyword: query
this.$message({ }).then(response => {
message: '验证失败', this.loading = false;
type: 'error', let productList = response.data;
duration:1000 this.selectProductOptions = [];
}); for (let i = 0; i < productList.length; i++) {
return false; let item = productList[i];
} this.selectProductOptions.push({
}); productId: item.id,
}, productName: item.name,
resetForm(formName) { productSn: item.productSn
this.$refs[formName].resetFields(); });
this.coupon = Object.assign({},defaultCoupon); }
}, });
searchProductMethod(query){ } else {
if (query !== '') { this.selectProductOptions = [];
this.loading = true; }
fetchProductList({keyword:query}).then(response=>{ },
this.loading=false; handleAddProductRelation() {
let productList = response.data; if (this.selectProduct === null) {
this.selectProductOptions = []; this.$message({
for(let i=0;i<productList.length;i++){ message: '请先选择商品',
let item = productList[i]; type: 'warning'
this.selectProductOptions.push({productId:item.id,productName:item.name,productSn:item.productSn}); });
} return
}); }
} else { this.coupon.productRelationList.push(this.getProductById(this.selectProduct));
this.selectProductOptions = []; this.selectProduct = null;
} },
}, handleDeleteProductRelation(index, row) {
handleAddProductRelation(){ this.coupon.productRelationList.splice(index, 1);
if(this.selectProduct===null){ },
this.$message({ handleAddProductCategoryRelation() {
message: '请先选择商品', if (this.selectProductCate === null || this.selectProductCate.length === 0) {
type: 'warning' this.$message({
}); message: '请先选择商品分类',
return type: 'warning'
} });
this.coupon.productRelationList.push(this.getProductById(this.selectProduct)); return
this.selectProduct=null; }
}, this.coupon.productCategoryRelationList.push(this.getProductCateByIds(this.selectProductCate));
handleDeleteProductRelation(index,row){ this.selectProductCate = [];
this.coupon.productRelationList.splice(index,1); },
}, handleDeleteProductCateRelation(index, row) {
handleAddProductCategoryRelation(){ this.coupon.productCategoryRelationList.splice(index, 1);
if(this.selectProductCate===null||this.selectProductCate.length===0){ },
this.$message({ getProductById(id) {
message: '请先选择商品分类', for (let i = 0; i < this.selectProductOptions.length; i++) {
type: 'warning' if (id === this.selectProductOptions[i].productId) {
}); return this.selectProductOptions[i];
return }
} }
this.coupon.productCategoryRelationList.push(this.getProductCateByIds(this.selectProductCate)); return null;
this.selectProductCate=[]; },
}, getProductCateList() {
handleDeleteProductCateRelation(index,row){ fetchListWithChildren().then(response => {
this.coupon.productCategoryRelationList.splice(index,1); let list = response.data;
}, this.productCateOptions = [];
getProductById(id){ for (let i = 0; i < list.length; i++) {
for(let i=0;i<this.selectProductOptions.length;i++){ let children = [];
if(id===this.selectProductOptions[i].productId){ if (list[i].children != null && list[i].children.length > 0) {
return this.selectProductOptions[i]; for (let j = 0; j < list[i].children.length; j++) {
} children.push({
} label: list[i].children[j].name,
return null; value: list[i].children[j].id
}, });
getProductCateList() { }
fetchListWithChildren().then(response => { }
let list = response.data; this.productCateOptions.push({
this.productCateOptions = []; label: list[i].name,
for (let i = 0; i < list.length; i++) { value: list[i].id,
let children = []; children: children
if (list[i].children != null && list[i].children.length > 0) { });
for (let j = 0; j < list[i].children.length; j++) { }
children.push({label: list[i].children[j].name, value: list[i].children[j].id}); });
} },
} getProductCateByIds(ids) {
this.productCateOptions.push({label: list[i].name, value: list[i].id, children: children}); let name;
} let parentName;
}); for (let i = 0; i < this.productCateOptions.length; i++) {
}, if (this.productCateOptions[i].value === ids[0]) {
getProductCateByIds(ids){ parentName = this.productCateOptions[i].label;
let name; for (let j = 0; j < this.productCateOptions[i].children.length; j++) {
let parentName; if (this.productCateOptions[i].children[j].value === ids[1]) {
for (let i = 0; i < this.productCateOptions.length; i++) { name = this.productCateOptions[i].children[j].label;
if (this.productCateOptions[i].value === ids[0]) { }
parentName = this.productCateOptions[i].label; }
for (let j = 0; j < this.productCateOptions[i].children.length; j++) { }
if (this.productCateOptions[i].children[j].value === ids[1]) { }
name = this.productCateOptions[i].children[j].label; return {
} productCategoryId: ids[1],
} productCategoryName: name,
} parentCategoryName: parentName
} };
return {productCategoryId: ids[1], productCategoryName: name, parentCategoryName: parentName}; }
} }
} }
}
</script> </script>
<style scoped> <style scoped>
.input-width { .input-width {
width: 60%; width: 60%;
} }
</style> </style>

Loading…
Cancel
Save