|
@@ -1,14 +1,23 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <addProduct :data="data" @onConfirm="listData()"></addProduct>
|
|
|
+ <addProduct class="inline-16" :data="data" @onConfirm="listData()"></addProduct>
|
|
|
+ <el-button size="small" type="primary" @click="adddispatch">一键发货</el-button>
|
|
|
<el-table
|
|
|
ref="multipleTable"
|
|
|
:data="tableData"
|
|
|
height="500px"
|
|
|
style="width: 100%;"
|
|
|
size="small"
|
|
|
+ @selection-change ="selectionChange">
|
|
|
stripe
|
|
|
- border>
|
|
|
+ border
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ type="selection"
|
|
|
+ width="55"
|
|
|
+ fixed="left"
|
|
|
+ align="center">
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
prop="itemname"
|
|
|
label="产品名称"
|
|
@@ -186,7 +195,7 @@ export default {
|
|
|
"content": {
|
|
|
"sa_orderid": 0, //订单ID
|
|
|
"pageNumber": 1,
|
|
|
- "pageSize": 20,
|
|
|
+ "pageSize": 9999,
|
|
|
"where": {
|
|
|
"condition": ""
|
|
|
}
|
|
@@ -197,6 +206,7 @@ export default {
|
|
|
return time.getTime() < (Date.now() - 24 * 3600 * 1000);
|
|
|
},
|
|
|
},
|
|
|
+ selection:[],
|
|
|
total:0,
|
|
|
currentPage:0,
|
|
|
time: null,
|
|
@@ -317,6 +327,29 @@ export default {
|
|
|
},
|
|
|
})
|
|
|
},
|
|
|
+ selectionChange (selection) {
|
|
|
+ this.$emit('select',selection)
|
|
|
+ },
|
|
|
+ async adddispatch () {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": "20230220100604",
|
|
|
+ "content": {
|
|
|
+ "sa_orderid":this.data.sa_orderid,
|
|
|
+ "sa_orderitemsids": this.selection.map(e=>{
|
|
|
+ return e.sa_orderitemsid
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ let route = this.$route
|
|
|
+
|
|
|
+ this.oldRoute = {path:route.path,query:route.query}
|
|
|
+
|
|
|
+ this.$store.dispatch('setHistoryRouter',this.oldRoute)
|
|
|
+
|
|
|
+ this.$router.replace({path:'/dispatchdetail',query:{id:res.data.sa_dispatchid,rowindex:res.data.rowindex}})
|
|
|
+ })
|
|
|
+ },
|
|
|
},
|
|
|
mounted () {
|
|
|
this.listData()
|