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, required: true,
type: Number type: Number
}, },
page: {
type: Number,
default: 1
},
limit: { limit: {
type: Number, type: Number,
default: 20 default: 20

View File

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