pull/4/head
Aaaaaaaa 2024-08-27 20:04:10 +08:00
parent a62d49e078
commit 2587a2cad9
2 changed files with 43 additions and 48 deletions

View File

@ -25,10 +25,6 @@ export default {
required: true,
type: Number
},
page: {
type: Number,
default: 1
},
limit: {
type: Number,
default: 20

View File

@ -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,15 +101,15 @@
</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>
@ -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()
},