|
@@ -10,60 +10,57 @@
|
|
|
<i class="el-icon-plus"></i>新增
|
|
|
</el-button>
|
|
|
</div>
|
|
|
- <el-dialog title="车辆信息" :visible.sync="dialogTableVisible" :before-close="handleClose">
|
|
|
- <dilTable
|
|
|
- v-bind.sync="truck"
|
|
|
- @radio-change="currentRadioChange1"
|
|
|
- ></dilTable>
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="dialogTableVisible = false">取 消</el-button>
|
|
|
- <el-button type="primary" @click="updateTruckCapacity()">确 定</el-button>
|
|
|
- </span>
|
|
|
+ <el-dialog
|
|
|
+ title="车辆信息"
|
|
|
+ :visible.sync="dialogTableVisible"
|
|
|
+ :before-close="handleClose"
|
|
|
+ >
|
|
|
+ <dilTable
|
|
|
+ v-bind.sync="truck"
|
|
|
+ @radio-change="currentRadioChange1"
|
|
|
+ ></dilTable>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogTableVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="updateTruckCapacity()"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
+ </span>
|
|
|
</el-dialog>
|
|
|
<div class="transportOrder_bottom">
|
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
<!-- 已下发 -->
|
|
|
<el-tab-pane label="未接收" name="first">
|
|
|
<dilTable v-bind.sync="first">
|
|
|
- <el-table-column
|
|
|
- fixed="right"
|
|
|
- label="操作"
|
|
|
- width="100"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button @click="updateClick(scope)" type="text" size="small">
|
|
|
- 修改
|
|
|
- </el-button>
|
|
|
- <el-button @click="deleteClick(scope)" type="text" size="small">
|
|
|
- 删除
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+ <el-table-column fixed="right" label="操作" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button @click="updateClick(scope)" type="text" size="small">
|
|
|
+ 修改
|
|
|
+ </el-button>
|
|
|
+ <el-button @click="deleteClick(scope)" type="text" size="small">
|
|
|
+ 删除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</dilTable>
|
|
|
</el-tab-pane>
|
|
|
<!-- 已接收 -->
|
|
|
<el-tab-pane label="已接收" name="Received">
|
|
|
<dilTable v-bind.sync="Received">
|
|
|
- <el-table-column
|
|
|
- fixed="right"
|
|
|
- label="操作"
|
|
|
- width="100"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button @click="deleteClick(scope)" type="text" size="small">
|
|
|
- 关闭
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+ <el-table-column fixed="right" label="操作" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button @click="deleteClick(scope)" type="text" size="small">
|
|
|
+ 关闭
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</dilTable>
|
|
|
</el-tab-pane>
|
|
|
<!-- 已完成 -->
|
|
|
<el-tab-pane label="已完成" name="completed">
|
|
|
- <dilTable v-bind.sync="completed">
|
|
|
- </dilTable>
|
|
|
+ <dilTable v-bind.sync="completed"> </dilTable>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -82,24 +79,24 @@ export default {
|
|
|
activeName: "first",
|
|
|
//已下发的表格
|
|
|
first: {
|
|
|
- requestUrl:"",
|
|
|
+ requestUrl: ""
|
|
|
},
|
|
|
//车辆信息的表格
|
|
|
truck: {
|
|
|
- requestUrl: "" ,
|
|
|
+ requestUrl: "",
|
|
|
// 控制显示当选列
|
|
|
- selectionType: "radio",
|
|
|
+ selectionType: "radio"
|
|
|
},
|
|
|
- Received:{
|
|
|
- requestUrl: "",
|
|
|
+ Received: {
|
|
|
+ requestUrl: ""
|
|
|
},
|
|
|
- completed:{
|
|
|
- requestUrl: "",
|
|
|
+ completed: {
|
|
|
+ requestUrl: ""
|
|
|
},
|
|
|
- //车辆的表格
|
|
|
+ //车辆的表格
|
|
|
truck: {
|
|
|
requestUrl: "",
|
|
|
- selectionType: "radio",
|
|
|
+ selectionType: "radio"
|
|
|
},
|
|
|
//当前选中的订单id
|
|
|
selectOrderId: null,
|
|
@@ -112,127 +109,178 @@ export default {
|
|
|
//模态框从左往右打开
|
|
|
direction: "rtl",
|
|
|
|
|
|
- orderId:null,
|
|
|
+ orderId: null,
|
|
|
//多选的选中的订单id
|
|
|
selectionList: [],
|
|
|
//区别点击的是添加运力,还是修改
|
|
|
- index: null,
|
|
|
+ index: null
|
|
|
};
|
|
|
},
|
|
|
- created(){
|
|
|
- if (getCookie("orgCode") == "chengyunshang") {
|
|
|
+ created() {
|
|
|
+ if (getCookie("orgCode") == "chengyunshang") {
|
|
|
this.truck.requestUrl =
|
|
|
"/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
|
|
|
getCookie("userId");
|
|
|
- } else {
|
|
|
+ } else {
|
|
|
this.truck.requestUrl =
|
|
|
"/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
|
|
|
- }
|
|
|
- if(getCookie('orgCode') == "chengyunshang"){
|
|
|
- this.first.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1&carrierId=" + getCookie("userId"),
|
|
|
- this.Received.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5&carrierId=" + getCookie("userId")
|
|
|
- this.completed.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2&carrierId=" + getCookie("userId")
|
|
|
- }else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
|
|
|
- this.first.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1"
|
|
|
- this.Received.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5"
|
|
|
- this.completed.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2"
|
|
|
- }else{
|
|
|
- this.first.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1"
|
|
|
- this.Received.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5"
|
|
|
- this.completed.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2"
|
|
|
- }
|
|
|
+ }
|
|
|
+ if (getCookie("orgCode") == "chengyunshang") {
|
|
|
+ (this.first.requestUrl =
|
|
|
+ "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1&carrierId=" +
|
|
|
+ getCookie("userId")),
|
|
|
+ (this.Received.requestUrl =
|
|
|
+ "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5&carrierId=" +
|
|
|
+ getCookie("userId"));
|
|
|
+ this.completed.requestUrl =
|
|
|
+ "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2&carrierId=" +
|
|
|
+ getCookie("userId");
|
|
|
+ } else if (
|
|
|
+ getCookie("orgCode") == "dagangadmin" ||
|
|
|
+ getCookie("orgCode") == "zidonghuabu"
|
|
|
+ ) {
|
|
|
+ this.first.requestUrl =
|
|
|
+ "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1";
|
|
|
+ this.Received.requestUrl =
|
|
|
+ "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5";
|
|
|
+ this.completed.requestUrl =
|
|
|
+ "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2";
|
|
|
+ } else {
|
|
|
+ this.first.requestUrl =
|
|
|
+ "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1";
|
|
|
+ this.Received.requestUrl =
|
|
|
+ "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5";
|
|
|
+ this.completed.requestUrl =
|
|
|
+ "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2";
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
- handleClose(done){
|
|
|
- done()
|
|
|
- this.$message.info("取消修改运力")
|
|
|
+ handleClose(done) {
|
|
|
+ done();
|
|
|
+ this.$message.info("取消修改运力");
|
|
|
},
|
|
|
- getRequestUrl(){
|
|
|
- if(getCookie('orgCode') == "chengyunshang"){
|
|
|
- this.first.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1&carrierId=" + this.carrierUserId + "&test=" + new Date() ,
|
|
|
- this.Received.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5&planEnableStatus=1&carrierId=" + this.carrierUserId + "&test=" + new Date()
|
|
|
- this.completed.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2&carrierId=" + getCookie("userId")
|
|
|
- }else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
|
|
|
- this.first.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1" + "&test=" + new Date()
|
|
|
- this.Received.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5" + "&test=" + new Date()
|
|
|
- this.completed.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2"
|
|
|
- }else{
|
|
|
- this.first.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1" + "&test=" + new Date()
|
|
|
- this.Received.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5" + "&test=" + new Date()
|
|
|
- this.completed.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2"
|
|
|
+ getRequestUrl() {
|
|
|
+ if (getCookie("orgCode") == "chengyunshang") {
|
|
|
+ (this.first.requestUrl =
|
|
|
+ "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1&carrierId=" +
|
|
|
+ this.carrierUserId +
|
|
|
+ "&test=" +
|
|
|
+ new Date()),
|
|
|
+ (this.Received.requestUrl =
|
|
|
+ "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5&planEnableStatus=1&carrierId=" +
|
|
|
+ this.carrierUserId +
|
|
|
+ "&test=" +
|
|
|
+ new Date());
|
|
|
+ this.completed.requestUrl =
|
|
|
+ "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2&carrierId=" +
|
|
|
+ getCookie("userId");
|
|
|
+ } else if (
|
|
|
+ getCookie("orgCode") == "dagangadmin" ||
|
|
|
+ getCookie("orgCode") == "zidonghuabu"
|
|
|
+ ) {
|
|
|
+ this.first.requestUrl =
|
|
|
+ "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1" +
|
|
|
+ "&test=" +
|
|
|
+ new Date();
|
|
|
+ this.Received.requestUrl =
|
|
|
+ "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5" +
|
|
|
+ "&test=" +
|
|
|
+ new Date();
|
|
|
+ this.completed.requestUrl =
|
|
|
+ "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2";
|
|
|
+ } else {
|
|
|
+ this.first.requestUrl =
|
|
|
+ "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1" +
|
|
|
+ "&test=" +
|
|
|
+ new Date();
|
|
|
+ this.Received.requestUrl =
|
|
|
+ "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5" +
|
|
|
+ "&test=" +
|
|
|
+ new Date();
|
|
|
+ this.completed.requestUrl =
|
|
|
+ "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2";
|
|
|
}
|
|
|
},
|
|
|
- getTruckRequestUrl(){
|
|
|
- if (getCookie("orgCode") == "chengyunshang") {
|
|
|
- this.truck.requestUrl =
|
|
|
- "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
|
|
|
- getCookie("userId") + "&test=" + new Date();
|
|
|
+ getTruckRequestUrl() {
|
|
|
+ if (getCookie("orgCode") == "chengyunshang") {
|
|
|
+ this.truck.requestUrl =
|
|
|
+ "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
|
|
|
+ getCookie("userId") +
|
|
|
+ "&test=" +
|
|
|
+ new Date();
|
|
|
} else {
|
|
|
- this.truck.requestUrl =
|
|
|
- "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null + "&test=" + new Date();
|
|
|
+ this.truck.requestUrl =
|
|
|
+ "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
|
|
|
+ null +
|
|
|
+ "&test=" +
|
|
|
+ new Date();
|
|
|
}
|
|
|
},
|
|
|
- currentRadioChange1(row){
|
|
|
- console.log(row)
|
|
|
- this.capacityId = row.capacityId
|
|
|
+ currentRadioChange1(row) {
|
|
|
+ console.log(row);
|
|
|
+ this.capacityId = row.capacityId;
|
|
|
},
|
|
|
- //删除运输订单
|
|
|
- deleteClick(scope){
|
|
|
- this.$confirm('是否删除?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning',
|
|
|
- }).then(() => {
|
|
|
- this.axios
|
|
|
+ //删除运输订单
|
|
|
+ deleteClick(scope) {
|
|
|
+ this.$confirm("是否删除?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.axios
|
|
|
.post("/api/v1/oms/closeOmstruckOrder?orderId=" + scope.row.orderId)
|
|
|
- .then((res) => {
|
|
|
+ .then(res => {
|
|
|
if (res.data.code == 200) {
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
- message: "删除成功!",
|
|
|
- });
|
|
|
- this.getRequestUrl()
|
|
|
+ message: "删除成功!"
|
|
|
+ });
|
|
|
+ this.getRequestUrl();
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: "删除失败",
|
|
|
- type: "warning",
|
|
|
+ type: "warning"
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
- }).catch(() => {
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
this.$message({
|
|
|
- type: 'info',
|
|
|
- message: '已取消删除'
|
|
|
- });
|
|
|
+ type: "info",
|
|
|
+ message: "已取消删除"
|
|
|
+ });
|
|
|
});
|
|
|
},
|
|
|
//修改运输订单
|
|
|
- updateClick(scope){
|
|
|
- this.getTruckRequestUrl()
|
|
|
- this.orderId = scope.row.orderId
|
|
|
- this.dialogTableVisible = true
|
|
|
- console.log(scope.row.orderId)
|
|
|
+ updateClick(scope) {
|
|
|
+ this.getTruckRequestUrl();
|
|
|
+ this.orderId = scope.row.orderId;
|
|
|
+ this.dialogTableVisible = true;
|
|
|
+ console.log(scope.row.orderId);
|
|
|
},
|
|
|
- updateTruckCapacity(){
|
|
|
- if(this.capacityId == null){
|
|
|
- this.$message.error("未选中运力")
|
|
|
- return
|
|
|
- }
|
|
|
- this.axios.post("/api/v1/oms/updateCapacityId",{
|
|
|
- capacityId:this.capacityId,
|
|
|
- orderId :this.orderId
|
|
|
- }).then((res) =>{
|
|
|
- if(res.data.code == "200"){
|
|
|
- this.$message.success("修改运力成功")
|
|
|
- this.getRequestUrl()
|
|
|
- this.dialogTableVisible = false
|
|
|
- }else{
|
|
|
- this.$message.error("修改运力失败")
|
|
|
- }
|
|
|
+ updateTruckCapacity() {
|
|
|
+ if (this.capacityId == null) {
|
|
|
+ this.$message.error("未选中运力");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.axios
|
|
|
+ .post("/api/v1/oms/updateCapacityId", {
|
|
|
+ capacityId: this.capacityId,
|
|
|
+ orderId: this.orderId
|
|
|
})
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.code == "200") {
|
|
|
+ this.$message.success("修改运力成功");
|
|
|
+ this.getRequestUrl();
|
|
|
+ this.dialogTableVisible = false;
|
|
|
+ } else {
|
|
|
+ this.$message.error("修改运力失败");
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
handleClick(tab, event) {
|
|
|
- this.getRequestUrl()
|
|
|
+ this.getRequestUrl();
|
|
|
},
|
|
|
// 查看物资详情
|
|
|
detailclick(row) {
|
|
@@ -263,21 +311,20 @@ export default {
|
|
|
materialDetails(orderId) {
|
|
|
this.axios
|
|
|
.post("/api/v1/uc/getOrderMaterialMesByOrderId/" + orderId)
|
|
|
- .then((res) => {
|
|
|
+ .then(res => {
|
|
|
if (res.data.code == "200") {
|
|
|
this.tableData = res.data.data;
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- Insert(){
|
|
|
- this.$router.push("addPurInwardOrder")
|
|
|
+ Insert() {
|
|
|
+ this.$router.push("addPurInwardOrder");
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
-
|
|
|
.transportOrder {
|
|
|
.transportOrder_top {
|
|
|
width: 100%;
|
|
@@ -285,9 +332,13 @@ export default {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
padding-left: 50px;
|
|
|
- .el-input{
|
|
|
- width: 20%;
|
|
|
-}
|
|
|
+ .el-input {
|
|
|
+ width: 20%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .transportOrder_bottom {
|
|
|
+ margin-left: 20px;
|
|
|
+ margin-top: 20px;
|
|
|
}
|
|
|
.drawer_top {
|
|
|
width: 100%;
|
|
@@ -297,4 +348,4 @@ export default {
|
|
|
align-items: center;
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|