|
|
@@ -203,6 +203,7 @@
|
|
|
<div slot="slot0">
|
|
|
<product-list
|
|
|
:data="mainData"
|
|
|
+ @select="select"
|
|
|
@onSuccess="queryMainData($route.query.id)"
|
|
|
ref="prod"
|
|
|
>
|
|
|
@@ -219,6 +220,7 @@
|
|
|
@clearUrl="errorUrl = null"
|
|
|
@onSuccess="bindImportOrder"
|
|
|
></importFile>
|
|
|
+ <el-button class="inline-16" :disabled="mainData.status !== '审核' || selection.length === 0" size="small" type="primary" @click="adddispatch">{{$t(`一键发货`)}}</el-button>
|
|
|
</div>
|
|
|
</product-list>
|
|
|
</div>
|
|
|
@@ -299,7 +301,8 @@ export default {
|
|
|
checked: 0,
|
|
|
rebateamount: "",
|
|
|
typeNew:'',
|
|
|
- fullscreenLoading:false
|
|
|
+ fullscreenLoading:false,
|
|
|
+ selection:[]
|
|
|
};
|
|
|
},
|
|
|
provide() {
|
|
|
@@ -730,6 +733,29 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
+ select (data) {
|
|
|
+ this.selection = data
|
|
|
+ },
|
|
|
+ async adddispatch () {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": "20230220100604",
|
|
|
+ "content": {
|
|
|
+ "sa_orderid":this.mainData.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.queryMainData(this.$route.query.id);
|