|
@@ -15,33 +15,58 @@
|
|
|
<dilTable v-bind.sync="first" ref="table">
|
|
|
<el-table-column fixed="right" label="操作" width="180">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="text" size="mini" @click="getRequirementMaterial(scope.row)">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ size="mini"
|
|
|
+ @click="getRequirementMaterial(scope.row)"
|
|
|
+ >
|
|
|
物资详情
|
|
|
</el-button>
|
|
|
- <el-button type="text" size="mini" @click="updatePlan(scope)">
|
|
|
+ <!-- <el-button type="text" size="mini" @click="updatePlan(scope)">
|
|
|
修改
|
|
|
- </el-button>
|
|
|
+ </el-button> -->
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <!-- 车辆信息 -->
|
|
|
+ <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="cancelUpdate()">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="updateTruckCapacity()"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ <!-- 物资详情抽屉 -->
|
|
|
+ <el-table-column type="expand" width="1">
|
|
|
+ <template slot-scope="props">
|
|
|
+ <el-form
|
|
|
+ label-position="center"
|
|
|
+ inline
|
|
|
+ class="demo-table-expand"
|
|
|
+ >
|
|
|
+ <div v-if="false">{{ props }}</div>
|
|
|
+ <div>
|
|
|
+ <el-table :data="tableData" border>
|
|
|
+ <el-table-column
|
|
|
+ v-for="(item, i) in tableHead"
|
|
|
+ :key="i"
|
|
|
+ :prop="item.prop"
|
|
|
+ :label="item.label"
|
|
|
+ :width="item.width"
|
|
|
+ ></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </el-form>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <!-- 物资详情抽屉 -->
|
|
|
- <el-table-column type="expand" width="1">
|
|
|
- <template slot-scope="props">
|
|
|
- <el-form label-position="center" inline class="demo-table-expand">
|
|
|
- <div v-if="false">{{ props }}</div>
|
|
|
- <div>
|
|
|
- <el-table :data="tableData" border >
|
|
|
- <el-table-column
|
|
|
- v-for="(item, i) in tableHead"
|
|
|
- :key="i"
|
|
|
- :prop="item.prop"
|
|
|
- :label="item.label"
|
|
|
- :width="item.width"
|
|
|
- ></el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
- </el-form>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
</dilTable>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="已接收" name="second">
|
|
@@ -58,36 +83,48 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
inputText: "",
|
|
|
- userCarrierId:'',
|
|
|
+ userCarrierId: "",
|
|
|
+ //是否弹出对话框
|
|
|
+ dialogTableVisible: false,
|
|
|
first: {
|
|
|
- //
|
|
|
+ //
|
|
|
requestUrl:
|
|
|
- "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=4&carrierId=" + '',
|
|
|
+ "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=4&carrierId=" +
|
|
|
+ "",
|
|
|
},
|
|
|
+ //车辆信息的表格
|
|
|
+ truck: {
|
|
|
+ requestUrl:
|
|
|
+ "/api/v1/oms/getCapacityAndDriverList?apiId=246&carrierId=" + "",
|
|
|
+ // 控制显示当选列
|
|
|
+ selectionType: "radio",
|
|
|
+ },
|
|
|
+ //选中的运力id
|
|
|
+ capacityId: null,
|
|
|
activeName: "first",
|
|
|
second: {
|
|
|
- requestUrl:""
|
|
|
+ requestUrl: "",
|
|
|
},
|
|
|
- tableHead: [
|
|
|
+ tableHead: [
|
|
|
{
|
|
|
prop: "materialName",
|
|
|
label: "物资名称",
|
|
|
width: 150,
|
|
|
},
|
|
|
{
|
|
|
- prop:"loadName",
|
|
|
- label:"装货点",
|
|
|
- width:150
|
|
|
+ prop: "loadName",
|
|
|
+ label: "装货点",
|
|
|
+ width: 150,
|
|
|
},
|
|
|
{
|
|
|
- prop:"unloadName",
|
|
|
- label:"卸货点",
|
|
|
- width:150
|
|
|
+ prop: "unloadName",
|
|
|
+ label: "卸货点",
|
|
|
+ width: 150,
|
|
|
},
|
|
|
{
|
|
|
- prop:"loadSequence",
|
|
|
- label:"装卸货次序",
|
|
|
- width:150
|
|
|
+ prop: "loadSequence",
|
|
|
+ label: "装卸货次序",
|
|
|
+ width: 150,
|
|
|
},
|
|
|
{
|
|
|
prop: "materialWeight",
|
|
@@ -101,34 +138,74 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
tableData: [],
|
|
|
- //记录旧的row对象(未下发)
|
|
|
+ //记录旧的row对象(未下发)
|
|
|
oldRow: "",
|
|
|
//记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未下发)
|
|
|
oldRowCount: 1,
|
|
|
};
|
|
|
},
|
|
|
- created(){
|
|
|
- if(getCookie("orgCode") == "chengyunshang"){
|
|
|
- this.first.requestUrl = "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=4&carrierId=" + getCookie("userId")
|
|
|
- this.second.requestUrl = "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=5&carrierId=" + getCookie("userId")
|
|
|
- }else{
|
|
|
- this.first.requestUrl = "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=4"
|
|
|
- this.second.requestUrl = "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=5"
|
|
|
- }
|
|
|
+ created() {
|
|
|
+ if (getCookie("orgCode") == "chengyunshang") {
|
|
|
+ this.first.requestUrl =
|
|
|
+ "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=4&carrierId=" +
|
|
|
+ getCookie("userId");
|
|
|
+ this.second.requestUrl =
|
|
|
+ "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=5&carrierId=" +
|
|
|
+ getCookie("userId");
|
|
|
+ } else {
|
|
|
+ this.first.requestUrl =
|
|
|
+ "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=4";
|
|
|
+ this.second.requestUrl =
|
|
|
+ "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=5";
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
- getRequest(){
|
|
|
- if(getCookie("orgCode") == "chengyunshang"){
|
|
|
- this.first.requestUrl = "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=4&carrierId=" + getCookie("userId") + new Date()
|
|
|
- this.second.requestUrl = "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=5&carrierId=" + getCookie("userId") + new Date()
|
|
|
- }else{
|
|
|
- this.first.requestUrl = "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=4"
|
|
|
- this.second.requestUrl = "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=5"
|
|
|
+ getRequest() {
|
|
|
+ if (getCookie("orgCode") == "chengyunshang") {
|
|
|
+ this.first.requestUrl =
|
|
|
+ "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=4&carrierId=" +
|
|
|
+ getCookie("userId") +
|
|
|
+ new Date();
|
|
|
+ this.second.requestUrl =
|
|
|
+ "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=5&carrierId=" +
|
|
|
+ getCookie("userId") +
|
|
|
+ new Date();
|
|
|
+ } else {
|
|
|
+ this.first.requestUrl =
|
|
|
+ "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=4";
|
|
|
+ this.second.requestUrl =
|
|
|
+ "/api/v1/oms/getInwardOrderList?apiId=260&orderStatus=5";
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
- handleClick(){
|
|
|
- this.getRequirementMaterial()
|
|
|
+
|
|
|
+ // //修改运力
|
|
|
+ // updatePlan() {
|
|
|
+ // 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("修改运力失败");
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // },
|
|
|
+
|
|
|
+ // cancelUpdate() {
|
|
|
+ // this.dialogTableVisible = false;
|
|
|
+ // this.$message.info("取消修改运力");
|
|
|
+ // },
|
|
|
+ handleClick() {
|
|
|
+ this.getRequirementMaterial();
|
|
|
},
|
|
|
getRequirementMaterial(row) {
|
|
|
// 记录重复点击次数
|
|
@@ -154,12 +231,14 @@ export default {
|
|
|
this.oldRow = row;
|
|
|
this.getMaterial(row.requirementId);
|
|
|
},
|
|
|
- getMaterial(requirementId){
|
|
|
- console.log(requirementId)
|
|
|
- this.axios.post("/api/v1/ams/getRequirementMaterial/" + requirementId).then((res) => {
|
|
|
- this.tableData = res.data.data
|
|
|
- console.log(res.data.data)
|
|
|
- })
|
|
|
+ getMaterial(requirementId) {
|
|
|
+ console.log(requirementId);
|
|
|
+ this.axios
|
|
|
+ .post("/api/v1/ams/getRequirementMaterial/" + requirementId)
|
|
|
+ .then((res) => {
|
|
|
+ this.tableData = res.data.data;
|
|
|
+ console.log(res.data.data);
|
|
|
+ });
|
|
|
},
|
|
|
deletePlan(scope) {
|
|
|
this.$confirm("是否删除", "提示", {
|
|
@@ -198,13 +277,13 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss">
|
|
|
-.steel_inbound{
|
|
|
- .sache{
|
|
|
+.steel_inbound {
|
|
|
+ .sache {
|
|
|
padding: 1.25rem 0.375rem;
|
|
|
.el-input {
|
|
|
width: 20%;
|
|
|
margin-right: 1.25rem;
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+}
|
|
|
</style>
|