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