Commit a9ccb075 by lixiaomin

修改页面

parent 38544e19
......@@ -10,7 +10,7 @@
<el-dialog title="上架" :visible.sync="dialogVisible2" width="30%">
本商品已在店铺中上架,下架商品会在店铺中同时下架,是否确认下架?
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button @click="dialogVisible2 = false">取 消</el-button>
<el-button type="primary" @click="offShop">确 定</el-button>
</span>
</el-dialog>
......
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="商品名称" prop="spuName">
<el-input v-model="queryParams.spuName" placeholder="请输入商品名称" clearable @keyup.enter.native="handleQuery" />
<el-form-item label="商品名称" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入商品名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="状态" prop="state">
<el-select v-model="queryParams.state" placeholder="请选择状态" clearable @keyup.enter.native="handleQuery">
......@@ -111,7 +111,7 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
spuName: null,
name: null,
state: null,
category: null
},
......
......@@ -60,7 +60,7 @@
<!-- 添加或修改规格对话框 -->
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="规格名称" prop="name">
<el-form-item label="名称" prop="name">
<el-input v-model="form.name" placeholder="请输入规格名称" />
</el-form-item>
<el-form-item label="必须原料">
......
......@@ -24,16 +24,16 @@
<el-cascader style="width:100%" v-model="form.province" placeholder="地区" :options="piovince" filterable>
</el-cascader>
</el-form-item>
<el-form-item label="店铺营业时间" prop="time">
<el-form-item label="详细地址" prop="address">
<el-input v-model="form.address" placeholder="请输入详细地址" />
</el-form-item>
<el-form-item label="营业时间" prop="time">
<el-date-picker style="width:100%" v-model="form.time" type="daterange" range-separator="~"
start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item label="店铺地址" prop="address">
<el-input v-model="form.address" placeholder="请输入店铺地址" />
</el-form-item>
<el-form-item label="店铺备注" prop="remarks">
<el-input v-model="form.remarks" placeholder="请输入店铺备注" />
</el-form-item>
<el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" placeholder="请输入备注" />
</el-form-item>
</el-form>
<div class="dialog-footer">
......@@ -49,9 +49,8 @@ import {
addShop,
updateShop,
} from "@/api/system/shop";
import moment from 'moment'
import piovince from '@/utils/piovince'
import LogoVue from '../../../../layout/components/Sidebar/Logo.vue';
import moment from 'moment';
import piovince from '@/utils/piovince';
export default {
props: ['shopId'],
watch: {
......@@ -94,10 +93,7 @@ export default {
],
province: [
{ required: true, message: "不能为空", trigger: "change" },
],
city: [
{ required: true, message: "不能为空", trigger: "change" },
],
],
time: [
{ required: true, message: "不能为空", trigger: "change" },
],
......
......@@ -9,9 +9,9 @@
<el-table-column label="绑定时间" align="center" prop="bindTime" />
<el-table-column label="状态" align="center" prop="state">
<template slot-scope="scope">
<span v-if="scope.row.status == 1">正常</span>
<span v-if="scope.row.status == 2">故障</span>
<span v-if="scope.row.status == 3">关停</span>
<span v-if="scope.row.state == 1">正常</span>
<span v-if="scope.row.state == 2">故障</span>
<span v-if="scope.row.state == 3">关停</span>
</template>
</el-table-column>
......
......@@ -5,6 +5,26 @@
<el-form-item label="店铺名称" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入店铺名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="城市">
<el-select v-model="queryParams.province" placeholder="请选择城市" clearable>
<el-option
v-for="item in provinceList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="状态" prop="state">
<el-select v-model="queryParams.state" placeholder="请选择状态" clearable @keyup.enter.native="handleQuery">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="机器编码" prop="machineCode ">
<el-input v-model="queryParams.machineCode" placeholder="请输入店铺地址" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
......@@ -13,60 +33,53 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="openSet()"
v-hasPermi="['system:shop:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
v-hasPermi="['system:shop:edit']">修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
v-hasPermi="['system:shop:remove']">删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
v-hasPermi="['system:shop:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="shopList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table v-loading="loading" :data="shopList">
<el-table-column label="店铺名称" align="center" prop="name">
<template slot-scope="scope">
<a @click="openSet(scope.row.id)">{{ scope.row.name }}</a>
</template>
</el-table-column>
<el-table-column label="默认店铺" align="center" prop="isDefault" />
<el-table-column label="城市" align="center" prop="code" />
<el-table-column label="默认店铺" align="center" prop="isDefault">
<template slot-scope="scope">
<span v-if="scope.row.isDefault == 1"></span>
<span v-if="scope.row.isDefault == 0"></span>
</template>
</el-table-column>
<el-table-column label="城市" align="center">
<template slot-scope="scope">
{{getProvince(scope.row.province)}}
</template>
</el-table-column>
<el-table-column label="设备数量" align="center" prop="machineCount" />
<el-table-column label="地址" align="center" prop="address" />
<el-table-column label="总销售金额" align="center" prop="salesAmount" />
<el-table-column label="总销量" align="center" prop="salesVolume" />
<el-table-column label="创建时间" align="center" prop="endTime" />
<el-table-column label="营业时间" align="center" prop="address" />
<el-table-column label="创建时间" align="center" prop="createdAt" />
<el-table-column label="营业时间" align="center" />
<el-table-column label="状态" align="center" prop="state">
<template slot-scope="scope">
<span v-if="scope.row.state == 1">正常营业</span>
<span v-if="scope.row.state == 2">暂停营业</span>
<span v-if="scope.row.state == 3">已删除</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="300">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
<el-button v-show="scope.row.state !='3'" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['system:shop:remove']">删除</el-button>
<el-button size="mini" type="text" v-if="authBtn(['1'], scope.row.state)"
@click="setShopState(scope.row, 2, 'setState')">
暂停营业</el-button>
<el-button size="mini" type="text" v-if="authBtn(['2', '3'], scope.row.state)"
@click="setShopState(scope.row, 1, 'setState')">恢复营业</el-button>
<el-button size="mini" type="text" @click="setShopState(scope.row)">设为默认</el-button>
@click="setShopState(scope.row, 1, 'setState')">开始营业</el-button>
<el-button v-show="scope.row.isDefault=='0'" size="mini" type="text" @click="setShopState(scope.row)">设为默认</el-button>
</template>
</el-table-column>
</el-table>
......@@ -82,12 +95,14 @@ import {
delShop,
updateShop
} from "@/api/system/shop";
import SetShop from './setShop'
import SetShop from './setShop';
import piovince from '@/utils/piovince'
export default {
components: { SetShop },
name: "Shop",
data() {
return {
piovince,
// 遮罩层
loading: true,
// 选中数组
......@@ -106,28 +121,52 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
name: null,
code: null,
lng: null,
lat: null,
remarks: null,
startTime: null,
endTime: null,
address: null,
province: null,
city: null,
zone: null,
name: null,
province: null,
state: null,
createdAt: null,
updatedAt: null,
isDefault: null,
machineCode: null
},
provinceList:[{
value: '',
label: '全部'
}],
options: [{
value: '1',
label: '已创建'
}, {
value: '2',
label: '已完成编程'
}, {
value: '3',
label: '已上架'
}, {
value: '4',
label: '已下架'
}, {
value: '5',
label: '已删除'
}],
};
},
created() {
this.getList();
this.getProvinceList();
},
methods: {
getProvinceList(){
let list=this.piovince;
for(let i=0;i<list.length;i++){
this.provinceList.push({value:list[i].value,label:list[i].name})
}
},
getProvince(province){
let list=this.piovince;
for(let i=0;i<list.length;i++){
if(list[i].value == province){
return list[i].name;
}
}
},
handleUpdate() { },
/** 查询店铺列表 */
getList() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment