|
@@ -4,21 +4,34 @@
|
|
|
<div class="homeworkPath">
|
|
|
<div class="top">
|
|
|
<el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
|
|
|
- <el-button type="primary" class="btn" @click="onclick">
|
|
|
- <i class="el-icon-search"></i>查询
|
|
|
- </el-button>
|
|
|
- <el-button type="primary" @click="insertClick" >
|
|
|
+ <el-button type="primary" class="btn" @click="onclick">
|
|
|
+ <i class="el-icon-search"></i>查询
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" @click="insertClick">
|
|
|
<i class="el-icon-plus"></i>新增
|
|
|
</el-button>
|
|
|
- <el-button type="primary" @click="sendClick()" v-if="this.activeName == 'first'">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="sendClick()"
|
|
|
+ v-if="this.activeName == 'first'"
|
|
|
+ >
|
|
|
<i class="el-icon-bottom"></i>下发
|
|
|
</el-button>
|
|
|
</div>
|
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
- <!-- 未下发 -->
|
|
|
+ <!-- 未下发 -->
|
|
|
<el-tab-pane label="未下发" name="first">
|
|
|
- <dilTable v-bind.sync="option1" ref="table" @selection-change="selectionChange">
|
|
|
- <el-table-column fixed="right" align="center" label="操作" width="120">
|
|
|
+ <dilTable
|
|
|
+ v-bind.sync="option1"
|
|
|
+ ref="table"
|
|
|
+ @selection-change="selectionChange"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ fixed="right"
|
|
|
+ align="center"
|
|
|
+ label="操作"
|
|
|
+ width="120"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
<!-- <el-button @click="updateClick(scope.row.orderId)" type="text" size="small">
|
|
|
修改
|
|
@@ -32,8 +45,7 @@
|
|
|
</el-tab-pane>
|
|
|
<!-- 已下发 -->
|
|
|
<el-tab-pane label="已下发" name="second">
|
|
|
- <dilTable v-bind.sync="option2">
|
|
|
- </dilTable>
|
|
|
+ <dilTable v-bind.sync="option2"> </dilTable>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</div>
|
|
@@ -49,66 +61,72 @@ export default {
|
|
|
activeName: "first",
|
|
|
option1: {
|
|
|
// 表格请求数据的地址
|
|
|
- requestUrl: "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=0&orderType=12",
|
|
|
+ requestUrl:
|
|
|
+ "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=0&orderType=12",
|
|
|
// 控制显示多选列
|
|
|
selectionType: "select",
|
|
|
},
|
|
|
- option2: {
|
|
|
+ option2: {
|
|
|
// 表格请求数据的地址
|
|
|
- requestUrl: "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=1&orderType=12",
|
|
|
+ requestUrl:
|
|
|
+ "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=1&orderType=12",
|
|
|
},
|
|
|
- selection:[],
|
|
|
+ selection: [],
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
//获取选中的订单
|
|
|
- selectionChange(selection){
|
|
|
- this.maplist = selection
|
|
|
+ selectionChange(selection) {
|
|
|
+ this.maplist = selection;
|
|
|
},
|
|
|
onclick() {
|
|
|
- if(this.activeName == "first"){
|
|
|
- this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=0&orderType=12&con=" + this.input;
|
|
|
- }else{
|
|
|
- this.option2.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=1&orderType=12&con=" + this.input;
|
|
|
- }
|
|
|
+ if (this.activeName == "first") {
|
|
|
+ this.option1.requestUrl =
|
|
|
+ "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=0&orderType=12&con=" +
|
|
|
+ this.input;
|
|
|
+ } else {
|
|
|
+ this.option2.requestUrl =
|
|
|
+ "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=1&orderType=12&con=" +
|
|
|
+ this.input;
|
|
|
+ }
|
|
|
},
|
|
|
handleClick(tab, event) {
|
|
|
console.log(tab, event);
|
|
|
+ }, // 下发
|
|
|
+ // 下发
|
|
|
+ sendClick() {
|
|
|
+ console.log(this.maplist);
|
|
|
+ this.axios
|
|
|
+ .post("/api/v1/ams/issueSporadicOrders", this.maplist)
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data.code == "200") {
|
|
|
+ this.option1.requestUrl =
|
|
|
+ "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=0&orderType=12&test=1";
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "下发成功!",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
- // 下发
|
|
|
- // 下发
|
|
|
- sendClick() {
|
|
|
- console.log(this.maplist)
|
|
|
- this.axios
|
|
|
- .post(
|
|
|
- "/api/v1/ams/issueSporadicOrders" , this.maplist
|
|
|
- )
|
|
|
- .then((res) => {
|
|
|
- if(res.data.code == '200'){
|
|
|
- this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=0&orderType=12&test=1"
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "下发成功!",
|
|
|
- });
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
// 删除
|
|
|
deleteClick(scope) {
|
|
|
- console.log(scope.row.sporadicOrderId);
|
|
|
- this.axios
|
|
|
- .post(
|
|
|
- "/api/v1/ams/deleteSporadicOrders?sporadicOrderId="+scope.row.sporadicOrderId
|
|
|
- )
|
|
|
+ console.log(scope.row.sporadicOrderId);
|
|
|
+ this.axios
|
|
|
+ .post(
|
|
|
+ "/api/v1/ams/deleteSporadicOrders?sporadicOrderId=" +
|
|
|
+ scope.row.sporadicOrderId
|
|
|
+ )
|
|
|
.then((res) => {
|
|
|
- if(res.data.code == '200'){
|
|
|
- this.option1.requestUrl = "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=0&orderType=12"
|
|
|
+ if (res.data.code == "200") {
|
|
|
+ this.option1.requestUrl =
|
|
|
+ "/api/v1/ams/getSporadicOrdersList?apiId=384&issueStatus=0&orderType=12";
|
|
|
this.$message({
|
|
|
- type: "success",
|
|
|
- message: "删除成功!",
|
|
|
- });
|
|
|
- }
|
|
|
- })
|
|
|
+ type: "success",
|
|
|
+ message: "删除成功!",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
//新增
|
|
|
insertClick() {
|
|
@@ -116,19 +134,20 @@ export default {
|
|
|
},
|
|
|
//修改
|
|
|
updateClick(orderId) {
|
|
|
- this.$router.push("/importedIngredients/transportReserveFuEdit/" + orderId);
|
|
|
+ this.$router.push(
|
|
|
+ "/importedIngredients/transportReserveFuEdit/" + orderId
|
|
|
+ );
|
|
|
},
|
|
|
-
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
<style lang='scss' scoped>
|
|
|
- .homeworkPath {
|
|
|
- .top {
|
|
|
- padding: 1.25rem 0.375rem;
|
|
|
- .el-input{
|
|
|
- width: 20%;
|
|
|
- margin-right: 1.25rem;
|
|
|
+.homeworkPath {
|
|
|
+ .top {
|
|
|
+ padding: 40px;
|
|
|
+ .el-input {
|
|
|
+ width: 250px;
|
|
|
+ margin-right: 20px;
|
|
|
}
|
|
|
}
|
|
|
}
|