Commit 539c69a7 authored by dcy's avatar dcy

互斥关联订单添加分页

parent fd65df8b
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<el-form inline label-width="85px" label-position="left"> <el-form inline label-width="85px" label-position="left">
<el-form-item label="订单号"> <el-form-item label="订单号">
<div class="content"> <div class="content">
<el-input v-model="relateOrderId"></el-input> <el-input v-model="params.relateOrderNo"></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
...@@ -49,6 +49,8 @@ ...@@ -49,6 +49,8 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination v-show="total > 0" :total="total" :page.sync="params.page" :limit.sync="params.rows"
@pagination="getUnassociatedOrder" />
<el-row style="margin-top: 40px"> <el-row style="margin-top: 40px">
<el-col> <el-col>
<el-button type="primary" @click="batchJoin(multipleSelection.map(e => e.orderId))" <el-button type="primary" @click="batchJoin(multipleSelection.map(e => e.orderId))"
...@@ -78,9 +80,13 @@ export default { ...@@ -78,9 +80,13 @@ export default {
data() { data() {
return { return {
orderDetails: {}, orderDetails: {},
relateOrderId: '',
list: [], list: [],
multipleSelection: [], multipleSelection: [],
params:{
page:1,
rows:10
},
total:0
} }
}, },
created() { created() {
...@@ -96,11 +102,12 @@ export default { ...@@ -96,11 +102,12 @@ export default {
methods: { methods: {
getUnassociatedOrder() { getUnassociatedOrder() {
getUnGuanlianOrderByOrderId({ getUnGuanlianOrderByOrderId({
orderId: this.orderId, orderId: this.orderId,
relateOrderId: this.relateOrderId ? this.relateOrderId : 0 ...this.params
}).then(r => { }).then(r => {
if (r.code === 0) { if (r.code === 0) {
this.list = r.data this.list = r.data.list;
this.total = r.data.total;
} }
}) })
}, },
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作人" prop="creator"> <el-table-column label="操作人" prop="creator">
<template v-slot="{row}"> <template v-slot="{row}">
{{userList.find( i => row.creator == i.id).nickname}} {{(userList.find( i => row.creator == i.id) || {}).nickname}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作时间"> <el-table-column label="操作时间">
...@@ -75,6 +75,8 @@ ...@@ -75,6 +75,8 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination v-show="total > 0" :total="total" :page.sync="params.page" :limit.sync="params.rows"
@pagination="getList" />
</div> </div>
</template> </template>
...@@ -114,13 +116,16 @@ export default { ...@@ -114,13 +116,16 @@ export default {
orderDetails:{}, orderDetails:{},
params:{ params:{
orderId:undefined, orderId:undefined,
relateOrderId:undefined relateOrderNo:undefined,
page:1,
rows:10
}, },
list:[], list:[],
DICT_TYPE, DICT_TYPE,
getDictDatas, getDictDatas,
multipleSelection:[], multipleSelection:[],
userList:[] userList:[],
total:0,
} }
}, },
created() { created() {
...@@ -137,7 +142,8 @@ export default { ...@@ -137,7 +142,8 @@ export default {
getList(){ getList(){
guanlianList(this.params).then(r => { guanlianList(this.params).then(r => {
if(r.code === 0){ if(r.code === 0){
this.list = r.data this.list = r.data.list;
this.total = r.data.total;
} }
}) })
}, },
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<el-divider></el-divider> <el-divider></el-divider>
<el-form inline label-width="100px"> <el-form inline label-width="100px">
<el-form-item label="订单号"><div class="content"> <el-form-item label="订单号"><div class="content">
<el-input v-model="params.relateOrderId"></el-input> <el-input v-model="params.relateOrderNo"></el-input>
</div></el-form-item> </div></el-form-item>
<el-form-item><div class="content"> <el-form-item><div class="content">
<el-button @click="getList">查询</el-button> <el-button @click="getList">查询</el-button>
...@@ -75,6 +75,8 @@ ...@@ -75,6 +75,8 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination v-show="total > 0" :total="total" :page.sync="params.page" :limit.sync="params.rows"
@pagination="getList" />
</div> </div>
</template> </template>
...@@ -104,8 +106,10 @@ export default { ...@@ -104,8 +106,10 @@ export default {
orderDetails:{}, orderDetails:{},
params:{ params:{
orderId:undefined, orderId:undefined,
mutualOrderId:undefined page:1,
rows:10,
}, },
total:0,
list:[], list:[],
DICT_TYPE, DICT_TYPE,
getDictDatas, getDictDatas,
...@@ -127,7 +131,8 @@ export default { ...@@ -127,7 +131,8 @@ export default {
getList(){ getList(){
guanlianList(this.params).then(r => { guanlianList(this.params).then(r => {
if(r.code === 0){ if(r.code === 0){
this.list = r.data this.list = r.data.list;
this.total = r.data.total;
} }
}) })
}, },
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<el-form inline label-width="85px" label-position="left"> <el-form inline label-width="85px" label-position="left">
<el-form-item label="订单号"> <el-form-item label="订单号">
<div class="content"> <div class="content">
<el-input v-model="mutualOrderId"></el-input> <el-input v-model="params.relateOrderNo"></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
...@@ -53,6 +53,8 @@ ...@@ -53,6 +53,8 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination v-show="total > 0" :total="total" :page.sync="params.page" :limit.sync="params.rows"
@pagination="getUnassociatedOrder" />
<el-row style="margin-top: 40px"> <el-row style="margin-top: 40px">
<el-col> <el-col>
<el-button type="primary" @click="batchJoin(multipleSelection.map(e => e.orderId))" <el-button type="primary" @click="batchJoin(multipleSelection.map(e => e.orderId))"
...@@ -85,6 +87,11 @@ export default { ...@@ -85,6 +87,11 @@ export default {
mutualOrderId: '', mutualOrderId: '',
list: [], list: [],
multipleSelection: [], multipleSelection: [],
total:0,
params:{
page:1,
rows:10,
}
} }
}, },
created() { created() {
...@@ -101,11 +108,11 @@ export default { ...@@ -101,11 +108,11 @@ export default {
getUnassociatedOrder() { getUnassociatedOrder() {
getUnGuanlianOrderByOrderId({ getUnGuanlianOrderByOrderId({
orderId: this.orderId, orderId: this.orderId,
mutualOrderId: this.mutualOrderId ? this.mutualOrderId : 0 ...this.params,
}).then(r => { }).then(r => {
if (r.code === 0) { if (r.code === 0) {
this.list = r.data this.list = r.data.list;
console.log(this.list[0]) this.total = r.data.total;
} }
}) })
}, },
......
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