|
|
@@ -47,7 +47,7 @@ |
|
|
|
<el-button-group> |
|
|
|
<el-button type="primary" size="mini" @click="edit(scope.row)" icon="el-icon-edit">编辑</el-button> |
|
|
|
<el-button type="primary" size="mini" @click="editOrderDivShow(scope.row)" icon="el-icon-share">订单</el-button> |
|
|
|
<el-button type="primary" size="mini" icon="el-icon-delete">删除</el-button> |
|
|
|
<el-button type="primary" size="mini" icon="el-icon-delete" @click="delAll(scope.row.id)">删除</el-button> |
|
|
|
</el-button-group> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
@@ -99,7 +99,7 @@ |
|
|
|
|
|
|
|
<transition name="bounce" v-if="editOrderShow"> |
|
|
|
<el-dialog title="详情" :visible.sync="editOrderShow" width="90%" top="15px"> |
|
|
|
<el-form ref="form" label-width="100px" style="width: 100%;padding-bottom: 20px"> |
|
|
|
<el-form ref="form" label-width="100px" style="width: 100%;padding-bottom: 10px"> |
|
|
|
<div style="display: flex;width: 100%"> |
|
|
|
<el-form-item label="收款单ID:" style="width: 80%"> |
|
|
|
<div v-html="editOrder.id"></div> |
|
|
@@ -121,7 +121,7 @@ |
|
|
|
<span>订单ID:</span> |
|
|
|
<el-input v-model="orderMainListSearch.order_id" style="width: 150px;" placeholder="请输入内容"></el-input> |
|
|
|
<span>订单状态:</span> |
|
|
|
<el-select v-model="orderMainListSearch.order_status" placeholder="请选择" clearable> |
|
|
|
<el-select v-model="orderMainListSearch.order_status" style="width: 150px;" placeholder="请选择" clearable> |
|
|
|
<el-option |
|
|
|
v-for="item in orderMainStatus" |
|
|
|
:key="item.id" |
|
|
@@ -138,8 +138,6 @@ |
|
|
|
:value="item.id"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
<div class="header-search" style="width: 100%;margin-bottom: 10px"> |
|
|
|
<span>渠道:</span> |
|
|
|
<el-select v-model="orderMainListSearch.channel_id" style="width: 150px;" placeholder="请选择" clearable> |
|
|
|
<el-option |
|
|
@@ -167,16 +165,44 @@ |
|
|
|
:value="item.id"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
<div class="header-search" style="width: 100%;margin-bottom: 10px"> |
|
|
|
<span>用户名</span> |
|
|
|
<el-input v-model="orderMainListSearch.user_name" style="width: 150px;" placeholder="请输入内容" clearable></el-input> |
|
|
|
<span>手机号</span> |
|
|
|
<el-input v-model="orderMainListSearch.user_phone" style="width: 150px;" placeholder="请输入内容" clearable></el-input> |
|
|
|
<span>金额</span> |
|
|
|
<el-input-number v-model="orderMainListSearch.startMoney" style="width: 150px;" placeholder="请输入内容" clearable></el-input-number> |
|
|
|
~ |
|
|
|
<el-input-number v-model="orderMainListSearch.endMoney" style="width: 150px;" placeholder="请输入内容" clearable></el-input-number> |
|
|
|
<span>时间</span> |
|
|
|
<el-date-picker |
|
|
|
style="width: 150px;" |
|
|
|
v-model="orderMainListSearch.startTime" |
|
|
|
type="date" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
placeholder="选择日期"> |
|
|
|
</el-date-picker> |
|
|
|
~ |
|
|
|
<el-date-picker |
|
|
|
style="width: 150px;" |
|
|
|
v-model="orderMainListSearch.endTime" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
type="date" |
|
|
|
placeholder="选择日期"> |
|
|
|
</el-date-picker> |
|
|
|
<el-button type="primary" icon="el-icon-search" @click="getOrderMainData(1)">搜索</el-button> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<el-table ref="multipleTable" :data="orderMainList" border tooltip-effect="dark" |
|
|
|
style="font-size:12px;width: 100%;margin-top: 12px"> |
|
|
|
<el-table ref="multipleTable" :data="orderMainList" border tooltip-effect="dark" style="font-size:12px;width: 100%;margin-top: 12px" @selection-change="handleSelectionChange"> |
|
|
|
<el-table-column type="selection" width="30" :selectable="checkSelect"></el-table-column> |
|
|
|
<el-table-column prop="id" label="订单ID" min-width="40" ></el-table-column> |
|
|
|
<el-table-column prop="commissioner" label="专员" min-width="40" :formatter="getUserName"></el-table-column> |
|
|
|
<el-table-column prop="channel_name" label="渠道" min-width="80" ></el-table-column> |
|
|
|
<el-table-column prop="channel_order_no" label="渠道订单号" min-width="90" ></el-table-column> |
|
|
|
<el-table-column prop="create_id" label="下单人" min-width="50" :formatter="getUserName"></el-table-column> |
|
|
|
<el-table-column prop="user_name" label="用户名称" min-width="50" ></el-table-column> |
|
|
|
<el-table-column prop="user_phone" label="手机号" min-width="60" ></el-table-column> |
|
|
|
<el-table-column prop="total_amount" label="总金额" min-width="40" ></el-table-column> |
|
|
|
<el-table-column prop="order_status" label="状态" min-width="40" :formatter="getOrderMainStatus"></el-table-column> |
|
|
|
<el-table-column prop="create_time" label="下单时间" min-width="80" ></el-table-column> |
|
|
@@ -192,6 +218,9 @@ |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
</el-table> |
|
|
|
<div style="margin-top: 5px"> |
|
|
|
<el-button @click="addOrderAll()" :disabled="multipleSelection.length==0">添加到采购单</el-button> |
|
|
|
</div> |
|
|
|
<el-pagination |
|
|
|
:page-size="orderMainListSearch.pageSize" |
|
|
|
:pager-count="11" |
|
|
@@ -248,20 +277,25 @@ |
|
|
|
editOrderOld:{}, |
|
|
|
editOrder:{}, |
|
|
|
orderMainListSearch:{ |
|
|
|
"receipt_order_id":0, |
|
|
|
"inReceipt":0, |
|
|
|
"receipt_order_id":"", |
|
|
|
"inReceipt":"", |
|
|
|
"order_id":"", |
|
|
|
"channel_id":"", |
|
|
|
"order_status":"", |
|
|
|
"commissioner_id":"", |
|
|
|
"user_name":"", |
|
|
|
"user_phone":"", |
|
|
|
"create_id":"", |
|
|
|
"startMoney":"", |
|
|
|
"endMoney":"", |
|
|
|
"startTime":"", |
|
|
|
"endTime":"", |
|
|
|
"pageNum":1, |
|
|
|
"pageSize":10 |
|
|
|
}, |
|
|
|
orderMainTotal:0, |
|
|
|
orderMainList:[], |
|
|
|
inReceipt:[ |
|
|
|
{id:0,name:"所有"}, |
|
|
|
{id:1,name:"在此收款单中"}, |
|
|
|
{id:2,name:"不在此收款单中"}, |
|
|
|
{id:3,name:"不在任何收款单中"} |
|
|
@@ -275,7 +309,8 @@ |
|
|
|
{id:10,name:"已完成"}, |
|
|
|
{id:11,name:"已取消"} |
|
|
|
], |
|
|
|
channelList:[] |
|
|
|
channelList:[], |
|
|
|
multipleSelection: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
@@ -285,6 +320,15 @@ |
|
|
|
|
|
|
|
}, |
|
|
|
methods: { |
|
|
|
checkSelect(row,index){ |
|
|
|
if (row.receipt_order_id ==0) { |
|
|
|
return true; |
|
|
|
} |
|
|
|
return false; |
|
|
|
}, |
|
|
|
handleSelectionChange(val) { |
|
|
|
this.multipleSelection = val; |
|
|
|
}, |
|
|
|
getChannelList(){ |
|
|
|
axios.post("/hotel.php/cf_channel_info/getList", this.search).then((response) => { |
|
|
|
console.log(response) |
|
|
@@ -457,6 +501,18 @@ |
|
|
|
console.log(error); |
|
|
|
}); |
|
|
|
}, |
|
|
|
addOrderAll(){ |
|
|
|
let orderId = ""; |
|
|
|
let length = this.multipleSelection.length; |
|
|
|
for (var k = 0; k < length; k++) { |
|
|
|
if (orderId == "") { |
|
|
|
orderId = this.multipleSelection[k].id; |
|
|
|
continue; |
|
|
|
} |
|
|
|
orderId =orderId+","+this.multipleSelection[k].id; |
|
|
|
} |
|
|
|
this.addOrderMain(orderId); |
|
|
|
}, |
|
|
|
removeOrderMain(order_id){ |
|
|
|
let param = { |
|
|
|
order_id:order_id, |
|
|
@@ -476,6 +532,36 @@ |
|
|
|
}).catch(function (error) { |
|
|
|
console.log(error); |
|
|
|
}); |
|
|
|
}, |
|
|
|
delAll(id){ |
|
|
|
let param = { |
|
|
|
id:id |
|
|
|
} |
|
|
|
this.$confirm('确定删除采购单?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
axios.post("/hotel.php/receipt_order/delAll", param).then((response) => { |
|
|
|
let data = response.data; |
|
|
|
if (data.flag) { |
|
|
|
this.$message({ |
|
|
|
message: '移除成功!', |
|
|
|
type: 'success' |
|
|
|
}); |
|
|
|
this.getData(this.search.pageNum) |
|
|
|
} else { |
|
|
|
this.$message.error(response.msg); |
|
|
|
} |
|
|
|
}).catch(function (error) { |
|
|
|
console.log(error); |
|
|
|
}); |
|
|
|
}).catch(() => { |
|
|
|
this.$message({ |
|
|
|
type: 'info', |
|
|
|
message: '已取消' |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
@@ -501,5 +587,8 @@ |
|
|
|
margin-top: 12px; |
|
|
|
background-color: white; |
|
|
|
} |
|
|
|
.el-form-item{ |
|
|
|
margin-bottom: 5px !important; |
|
|
|
} |
|
|
|
</style> |
|
|
|
</html> |