pull/4/head
parent
a62d49e078
commit
2587a2cad9
|
@ -25,10 +25,6 @@ export default {
|
||||||
required: true,
|
required: true,
|
||||||
type: Number
|
type: Number
|
||||||
},
|
},
|
||||||
page: {
|
|
||||||
type: Number,
|
|
||||||
default: 1
|
|
||||||
},
|
|
||||||
limit: {
|
limit: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 20
|
default: 20
|
||||||
|
|
|
@ -7,26 +7,26 @@
|
||||||
<el-button style="float: right; padding: 3px 10px" type="text" @click="chong">重置</el-button>
|
<el-button style="float: right; padding: 3px 10px" type="text" @click="chong">重置</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="text item">
|
<div class="text item">
|
||||||
<el-form ref="form" :model="shop" label-width="100px">
|
<el-form ref="form" :model="orders" label-width="100px">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
输入搜索:<el-input v-model="shop.shopName" placeholder="商品名称" style="width: 180px;margin-right: 50px"></el-input>
|
输入搜索:<el-input v-model="orders.shopName" placeholder="商品名称" style="width: 180px;margin-right: 50px"></el-input>
|
||||||
订单编号:<el-input v-model="shop.shopNum" placeholder="编号" style="width: 180px;margin-right: 50px"></el-input>
|
订单编号:<el-input v-model="orders.shopNum" placeholder="编号" style="width: 180px;margin-right: 50px"></el-input>
|
||||||
订单分类:<el-cascader
|
订单分类:<el-cascader
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
v-model="typeId"
|
v-model="typeId"
|
||||||
:options="type"
|
:options="type"
|
||||||
:props=Cascader
|
:props=Cascader
|
||||||
@change="shopTypeId(shop.typeId)" clearable
|
@change="shopTypeId(orders.typeId)" clearable
|
||||||
></el-cascader>
|
></el-cascader>
|
||||||
<el-select v-model="shop.brandId" placeholder="请选择商品" style="margin-right: 30px" clearable>
|
<el-select v-model="orders.brandId" placeholder="请选择商品" style="margin-right: 30px" clearable>
|
||||||
<el-option v-for="item in dict.type.pms_shop_brandid" :label="item.label" :value="item.value" :key="item.value"></el-option>
|
<el-option v-for="item in dict.type.pms_shop_brandid" :label="item.label" :value="item.value" :key="item.value"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
订单状态:<el-select v-model="shop.publishStatus" placeholder="请选择上架状态" style="margin-right: 30px" clearable>
|
订单状态:<el-select v-model="orders.publishStatus" placeholder="请选择上架状态" style="margin-right: 30px" clearable>
|
||||||
<el-option v-for="item in dict.type.pms_shop_publiststatus" :label="item.label" :value="item.value" :key="item.value"></el-option>
|
<el-option v-for="item in dict.type.pms_shop_publiststatus" :label="item.label" :value="item.value" :key="item.value"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
审核状态:<el-select v-model="shop.verifyStatus" placeholder="请选择审核状态" style="margin-right: 30px" clearable>
|
审核状态:<el-select v-model="orders.verifyStatus" placeholder="请选择审核状态" style="margin-right: 30px" clearable>
|
||||||
<el-option v-for="item in dict.type.pms_shop_verifystatus" :label="item.label" :value="item.value" :key="item.value"></el-option>
|
<el-option v-for="item in dict.type.pms_shop_verifystatus" :label="item.label" :value="item.value" :key="item.value"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -101,21 +101,21 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
<!-- <el-pagination style="float: right"-->
|
<el-pagination style="float: right"
|
||||||
<!-- @size-change="handleSizeChange"-->
|
@size-change="handleSizeChange"
|
||||||
<!-- @current-change="handleCurrentChange"-->
|
@current-change="handleCurrentChange"
|
||||||
<!-- :current-page="shop.pageNum"-->
|
:current-page="orders.pageNum"
|
||||||
<!-- :page-sizes="[2, 4, 6, 8]"-->
|
:page-sizes="[2, 4, 6, 8]"
|
||||||
<!-- :page-size="shop.pageSize"-->
|
:page-size="orders.pageSize"
|
||||||
<!-- layout="total, sizes, prev, pager, next, jumper"-->
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
<!-- :total="shop.total">-->
|
:total="orders.total">
|
||||||
<!-- </el-pagination>-->
|
</el-pagination>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { selectList, update } from '@/api/market/orders'
|
import {selectList, update } from '@/api/market/orders'
|
||||||
import {handleDelete} from "@/api/market/product";
|
import {handleDelete} from "@/api/market/product";
|
||||||
import { diGui } from "@/api/market/orders";
|
import { diGui } from "@/api/market/orders";
|
||||||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||||
|
@ -129,9 +129,9 @@ export default {
|
||||||
//这里存放数据"
|
//这里存放数据"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
shop:{
|
orders:{
|
||||||
pageNum:1,
|
pageNum:1,
|
||||||
pageSize:5,
|
pageSize:10,
|
||||||
total:1,
|
total:1,
|
||||||
typeId:0
|
typeId:0
|
||||||
},
|
},
|
||||||
|
@ -150,63 +150,63 @@ export default {
|
||||||
// 商品分类下拉框
|
// 商品分类下拉框
|
||||||
shopTypeId(){
|
shopTypeId(){
|
||||||
for (let i = 0; i < this.typeId.length; i++) {
|
for (let i = 0; i < this.typeId.length; i++) {
|
||||||
this.shop.typeId=this.typeId[i]
|
this.orders.typeId=this.typeId[i]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**递归*/
|
/**递归*/
|
||||||
diGui(){
|
diGui(){
|
||||||
diGui(this.shop.typeId).then(
|
diGui(this.orders.typeId).then(
|
||||||
res => {
|
res => {
|
||||||
this.type=res.data
|
this.type=res.data
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
handleDelete(shop){
|
handleDelete(orders){
|
||||||
handleDelete(shop.id).then(
|
handleDelete(orders.id).then(
|
||||||
res => {
|
res => {
|
||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
this.page()
|
this.selectList()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
// 重置
|
// 重置
|
||||||
chong(){
|
chong(){
|
||||||
this.shop={}
|
this.orders={}
|
||||||
this.page()
|
this.selectList()
|
||||||
},
|
},
|
||||||
// 分页
|
// 分页
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
this.shop.pageSize=val
|
this.orders.pageSize=val
|
||||||
this.page()
|
this.selectList()
|
||||||
},
|
},
|
||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
this.shop.pageNum=val
|
this.orders.pageNum=val
|
||||||
this.page()
|
this.selectList()
|
||||||
},
|
},
|
||||||
// 上架,新品,推荐修改
|
// 上架,新品,推荐修改
|
||||||
updateShop(shop){
|
updateShop(orders){
|
||||||
update(shop).then(
|
update(orders).then(
|
||||||
res => {
|
res => {
|
||||||
this.$message.success(res.msg)
|
this.$message.success(res.msg)
|
||||||
this.page()
|
this.selectList()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
// 修改跳转路径
|
// 修改跳转路径
|
||||||
handleEdit(shop){
|
handleEdit(orders){
|
||||||
if (this.shop.serviceIds && typeof this.shop.serviceIds === 'string') {
|
if (this.orders.serviceIds && typeof this.orders.serviceIds === 'string') {
|
||||||
shop.serviceid = this.shop.serviceIds.split(',');
|
orders.serviceid = this.orders.serviceIds.split(',');
|
||||||
// ... 后续操作
|
// ... 后续操作
|
||||||
}
|
}
|
||||||
console.log(JSON.stringify(shop))
|
console.log(JSON.stringify(orders))
|
||||||
shop.serviceid=shop.serviceIds.split(',').map(id => parseInt(id, 10));
|
orders.serviceid=orders.serviceIds.split(',').map(id => parseInt(id, 10));
|
||||||
console.log(JSON.stringify(shop))
|
console.log(JSON.stringify(orders))
|
||||||
this.$router.push({path:'/product/info/update',query:{shop:shop}})
|
this.$router.push({path:'/product/info/update',query:{orders:orders}})
|
||||||
},
|
},
|
||||||
// 查询
|
// 查询
|
||||||
findShop(){
|
findShop(){
|
||||||
this.page()
|
this.selectList()
|
||||||
},
|
},
|
||||||
// 添加跳转路径
|
// 添加跳转路径
|
||||||
add(){
|
add(){
|
||||||
|
@ -218,18 +218,17 @@ export default {
|
||||||
},
|
},
|
||||||
//商品列表
|
//商品列表
|
||||||
selectList(){
|
selectList(){
|
||||||
selectList(data).then(
|
selectList(this.orders).then(
|
||||||
res => {
|
res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
this.arr=res.data.list
|
this.arr=res.data.list
|
||||||
this.shop.total=res.data.total
|
this.orders.total=res.data.total
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//生命周期 - 创建完成(可以访问当前this实例)",
|
//生命周期 - 创建完成(可以访问当前this实例)",
|
||||||
created() {
|
created() {
|
||||||
this.page()
|
|
||||||
this.diGui()
|
this.diGui()
|
||||||
this.selectList()
|
this.selectList()
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue