Commit 62df03d5 authored by 董先生's avatar 董先生

置换订单收集

parent e20bf488
......@@ -27,7 +27,7 @@ class OrderDatabaseSeeder extends Seeder
['title' => '订单', 'name' => 'order', 'path' => '/order', 'component' => '', 'type' => 'menu', 'sort' => 5, 'children' => [
['title' => '订单列表', 'name' => 'order.list', 'path' => '/order/list', 'component' => 'order/list', 'type' => 'menu'],
['title' => '售后订单', 'name' => 'order.refund', 'path' => '/order/refund', 'component' => 'order/refund', 'type' => 'menu'],
['title' => '置换订单联系记录', 'name' => 'exchange.list', 'path' => '/exchange/list', 'component' => 'exchange/list', 'type' => 'menu'],
['title' => '置换订单联系记录', 'name' => 'order.exchange', 'path' => '/order/exchange', 'component' => '/order/exchange', 'type' => 'menu'],
]
]
];
......
......@@ -24,6 +24,6 @@ Route::name('order.')->prefix('order')->middleware(['auth.check:admin'])->group(
Route::put('/audit', 'audit')->name('audit');
});
Route::controller(Modules\Order\Controllers\Admin\Exchange::class)->prefix('exchange')->name('exchange.')->group(function () {
Route::post('/index', 'index')->name('index');
Route::get('/index', 'index')->name('index');
});
});
<template>
<el-container>
<el-header>
<div class="left-panel">
<el-input v-model="search.keyword" placeholder="关键词" style="width:150px; margin-right: 10px;" clearable></el-input>
<el-input v-model="search.name" placeholder="申请人" style="width:150px; margin-right: 10px;" clearable />
<el-input v-model="search.mobile" placeholder="手机号码" style="width:150px; margin-right: 10px;" clearable />
<el-button-group style="margin-left: 10px;">
<el-button type="primary" icon="el-icon-search" @click="upsearch">搜索</el-button>
</el-button-group>
</div>
</el-header>
<el-main class="nopadding">
<scTable tableName="member" ref="table" :apiObj="list.apiObj" :column="list.column" row-key="id" @selection-change="selectionChange" border stripe>
<el-table-column type="selection" width="50"></el-table-column>
<template #status="scope">
<el-tag :type="status[scope.row.status]?.type">{{ status[scope.row.status]?.label ?? '未知'}}</el-tag>
</template>
<el-table-column label="操作" fixed="right" align="center" width="140">
<template #default="scope">
<el-button-group>
<el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row, scope.$index)">
<template #reference>
<el-button type="danger">删除</el-button>
</template>
</el-popconfirm>
</el-button-group>
</template>
</el-table-column>
</scTable>
</el-main>
<save v-if="dialog.save" ref="saveBox" @success="upsearch" @closed="dialog.save=false" />
</el-container>
</template>
<script>
export default{
name: 'order.exchange',
components:{
save,
},
data(){
return {
dialog: {search: false, import: false, print: false},
list: {
apiObj: this.$API.order.exchange.list,
column: [
{prop: 'id', label: 'ID', width: 80},
{prop: 'name', label: '置换申请人', width: 120},
{prop: 'mobile', label: '手机号', width: 120},
{prop: 'address', label: '地址'},
{prop: 'remark', label: '行业备注'},
{prop: 'status', label: '状态', width: 120},
{prop: 'created_at', label: '添加时间', width: 140},
],
},
selection: [],
search: {},
}
},
methods:{
upsearch(){
this.$refs.table.reload(this.search);
},
moreUpsearch(search){
this.search = search;
this.upsearch();
},
moreSearch(){
this.dialog.search = true
this.$nextTick(() => {
this.$refs.searchBox.open().setData(this.search)
})
},
//表格选择后回调事件
selectionChange(selection){
this.selection = selection;
},
batch_del(){
},
table_show(row){
this.dialog.detail = true
this.$nextTick(() => {
this.$refs.detailBox.open().setData(row)
})
},
add(){
this.dialog.save = true
this.$nextTick(() => {
this.$refs.saveBox.open()
})
},
table_edit(row){
this.dialog.save = true
this.$nextTick(() => {
this.$refs.saveBox.open('edit').setData(row)
})
},
async table_del(row){
var reqData = {id: row.id}
var res = await this.$API.order.refund.delete.post(reqData);
if(res.code == 1){
//这里选择刷新整个表格 OR 插入/编辑现有表格数据
this.upsearch()
this.$message.success("删除成功")
}else{
this.$alert(res.message, "提示", {type: 'error'})
}
}
}
}
</script>
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