|
@@ -15,6 +15,22 @@
|
|
|
<el-button type="primary" class="btn" @click="insertClick">
|
|
|
<i class="el-icon-plus"></i>新增
|
|
|
</el-button>
|
|
|
+ <el-input
|
|
|
+ class="input"
|
|
|
+ placeholder="请从表格复制采购订单号"
|
|
|
+ v-model="inputPurOrder"
|
|
|
+ clearable
|
|
|
+ v-if="activeName == 'second'"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ class="btn"
|
|
|
+ @click="closePurOrder"
|
|
|
+ v-if="activeName == 'second'"
|
|
|
+ >
|
|
|
+ 关闭一车多趟
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
class="btn"
|
|
@@ -24,6 +40,33 @@
|
|
|
<i class="el-icon-plus"></i>下发
|
|
|
</el-button>
|
|
|
</div>
|
|
|
+ <el-dialog
|
|
|
+ title="提醒"
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
+ width="30%"
|
|
|
+ >
|
|
|
+ <div v-if="this.isMoreTrips != 1" style="color:red">
|
|
|
+ <span>该订单不是一车多趟的订单</span>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <span>采购订单号:</span>
|
|
|
+ <span>{{inputPurOrder}}</span>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <span>发货单位:</span>
|
|
|
+ <span>{{supplierName}}</span>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <span>物资名称:</span>
|
|
|
+ <span>{{materialName}}</span>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="closePurOrder1" v-if="this.isMoreTrips == 1"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
<el-tabs v-model="activeName" tab-click="handleClick">
|
|
|
<!-- 未下发 -->
|
|
|
<el-tab-pane label="未下发" name="first">
|
|
@@ -68,7 +111,7 @@
|
|
|
</el-tab-pane>
|
|
|
<!-- 已下发 -->
|
|
|
<el-tab-pane label="已下发" name="second">
|
|
|
- <dilTable v-bind.sync="option2"> </dilTable>
|
|
|
+ <dilTable v-bind.sync="option2" @func="func"> </dilTable>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</div>
|
|
@@ -83,16 +126,23 @@ export default {
|
|
|
input: "",
|
|
|
Time: "",
|
|
|
activeName: "first",
|
|
|
+ dialogVisible: false,
|
|
|
+ materialName: null,
|
|
|
+ supplierName: null,
|
|
|
+ inputPurOrder:null,
|
|
|
option1: {
|
|
|
// 表格请求数据的地址
|
|
|
requestUrl: "",
|
|
|
selectionType: "select",
|
|
|
mapList: [],
|
|
|
+
|
|
|
},
|
|
|
+ isMoreTrips:null,
|
|
|
option2: {
|
|
|
// 表格请求数据的地址
|
|
|
- requestUrl: "",
|
|
|
+ requestUrl: ""
|
|
|
},
|
|
|
+ purOrderList: []
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -114,26 +164,34 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- handleClick(){
|
|
|
- this.getRequestUrl()
|
|
|
+ handleClick() {
|
|
|
+ this.getRequestUrl();
|
|
|
},
|
|
|
- getRequestUrl(){
|
|
|
- //判断是否是承运商
|
|
|
- if (getCookie("orgCode") == "chengyunshang") {
|
|
|
- this.option1.requestUrl =
|
|
|
- "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&orderType=5&carrierSSOId=" +
|
|
|
- getCookie("userId") + "&i=" + new Date();
|
|
|
- this.option2.requestUrl =
|
|
|
- "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&orderType=5&carrierSSOId=" +
|
|
|
- getCookie("userId") + "&i=" + new Date();
|
|
|
- } else {
|
|
|
- this.option1.requestUrl =
|
|
|
- "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&orderType=5&carrierSSOId=" +
|
|
|
- null + "&i=" + new Date();
|
|
|
- this.option2.requestUrl =
|
|
|
- "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&orderType=5&carrierSSOId=" +
|
|
|
- null + "&i=" + new Date();
|
|
|
- }
|
|
|
+ getRequestUrl() {
|
|
|
+ //判断是否是承运商
|
|
|
+ if (getCookie("orgCode") == "chengyunshang") {
|
|
|
+ this.option1.requestUrl =
|
|
|
+ "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&orderType=5&carrierSSOId=" +
|
|
|
+ getCookie("userId") +
|
|
|
+ "&i=" +
|
|
|
+ new Date();
|
|
|
+ this.option2.requestUrl =
|
|
|
+ "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&orderType=5&carrierSSOId=" +
|
|
|
+ getCookie("userId") +
|
|
|
+ "&i=" +
|
|
|
+ new Date();
|
|
|
+ } else {
|
|
|
+ this.option1.requestUrl =
|
|
|
+ "/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&orderType=5&carrierSSOId=" +
|
|
|
+ null +
|
|
|
+ "&i=" +
|
|
|
+ new Date();
|
|
|
+ this.option2.requestUrl =
|
|
|
+ "/api/v1/oms/getAllTruckOrder?apiId=243&orderStatus=111&orderType=5&carrierSSOId=" +
|
|
|
+ null +
|
|
|
+ "&i=" +
|
|
|
+ new Date();
|
|
|
+ }
|
|
|
},
|
|
|
onclick() {
|
|
|
if (this.activeName == "first") {
|
|
@@ -171,14 +229,43 @@ export default {
|
|
|
selectionChange(selection) {
|
|
|
this.mapList = selection;
|
|
|
},
|
|
|
+ closePurOrder() {
|
|
|
+ if(this.inputPurOrder == null){
|
|
|
+ this.$message.warning("请输入需要关闭一车多趟的采购订单号")
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.purOrderList.forEach(e => {
|
|
|
+ if (e.purchaseOrderNo == this.inputPurOrder) {
|
|
|
+ this.materialName = e.materialName;
|
|
|
+ this.supplierName = e.supplierName;
|
|
|
+ this.isMoreTrips = e.isMoreTrips
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.dialogVisible = true
|
|
|
+ },
|
|
|
+ closePurOrder1(){
|
|
|
+ this.axios.post("/api/v1/bp/closePurOrderMoreTrips?purchaseOrderNo=" + this.inputPurOrder).then((res) =>{
|
|
|
+ console.log(res)
|
|
|
+ if(res.data.code == '200'){
|
|
|
+ this.$message.success("关闭成功")
|
|
|
+ }else{
|
|
|
+ this.$message.error(res.data.data)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.dialogVisible = false
|
|
|
+ },
|
|
|
+ func(res) {
|
|
|
+ this.purOrderList = res.list;
|
|
|
+ console.log(res.list);
|
|
|
+ },
|
|
|
issue() {
|
|
|
let mapvalue = {
|
|
|
- mapList: this.mapList,
|
|
|
+ mapList: this.mapList
|
|
|
};
|
|
|
this.axios.post("/api/v1/oms/dispatchOrder", mapvalue).then(() => {
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
- message: "下发成功!",
|
|
|
+ message: "下发成功!"
|
|
|
});
|
|
|
this.option1.requestUrl =
|
|
|
"/api/v1/oms/getAllTruckOrder?apiId=141&orderStatus=3&orderType=5&i=" +
|
|
@@ -188,27 +275,27 @@ export default {
|
|
|
// 下发
|
|
|
sendClick(orderId) {
|
|
|
let mapvalue = {
|
|
|
- mapList: [{ orderId: orderId }],
|
|
|
+ mapList: [{ orderId: orderId }]
|
|
|
};
|
|
|
this.$confirm("是否下发", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
|
- center: true,
|
|
|
+ center: true
|
|
|
})
|
|
|
.then(() => {
|
|
|
this.axios.post("/api/v1/oms/dispatchOrder", mapvalue).then(() => {
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
- message: "下发成功!",
|
|
|
+ message: "下发成功!"
|
|
|
});
|
|
|
- this.getRequestUrl()
|
|
|
+ this.getRequestUrl();
|
|
|
});
|
|
|
})
|
|
|
.catch(() => {
|
|
|
this.$message({
|
|
|
type: "info",
|
|
|
- message: "取消下发!",
|
|
|
+ message: "取消下发!"
|
|
|
});
|
|
|
});
|
|
|
},
|
|
@@ -218,26 +305,26 @@ export default {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
|
- center: true,
|
|
|
+ center: true
|
|
|
})
|
|
|
.then(() => {
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
- message: "删除成功!",
|
|
|
+ message: "删除成功!"
|
|
|
});
|
|
|
this.axios
|
|
|
.post("/api/v1/oms/deleteOrder", {
|
|
|
orderId: orderId,
|
|
|
- capacityNumber: capacityNumber,
|
|
|
+ capacityNumber: capacityNumber
|
|
|
})
|
|
|
.then(() => {
|
|
|
- this.getRequestUrl()
|
|
|
+ this.getRequestUrl();
|
|
|
});
|
|
|
})
|
|
|
.catch(() => {
|
|
|
this.$message({
|
|
|
type: "info",
|
|
|
- message: "取消删除!",
|
|
|
+ message: "取消删除!"
|
|
|
});
|
|
|
});
|
|
|
},
|
|
@@ -248,11 +335,11 @@ export default {
|
|
|
//修改
|
|
|
updateClick(orderId) {
|
|
|
this.$router.push("/transportReserveFuEdit/" + orderId);
|
|
|
- },
|
|
|
- },
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
-<style lang='scss' scoped>
|
|
|
+<style lang="scss" scoped>
|
|
|
.homeworkPath {
|
|
|
.top {
|
|
|
padding: 40px;
|
|
@@ -265,4 +352,4 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|