|
@@ -16,9 +16,6 @@
|
|
|
<dilTable v-bind.sync="second" ref="table1">
|
|
|
<el-table-column fixed="right" label="操作" width="100">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="text" size="mini" @click="getRequirementMaterial1(scope.row)">
|
|
|
- 物资详情
|
|
|
- </el-button>
|
|
|
<el-button
|
|
|
type="text"
|
|
|
size="mini"
|
|
@@ -51,11 +48,8 @@
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="已分解" name="third">
|
|
|
<dilTable v-bind.sync="third" ref="table2">
|
|
|
- <el-table-column fixed="right" label="操作" width="180">
|
|
|
+ <el-table-column fixed="right" label="操作" width="150">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="text" size="mini" @click="getRequirementMaterial2(scope.row)">
|
|
|
- 物资详情
|
|
|
- </el-button>
|
|
|
<el-button type="text" size="mini" @click="desponsePlan(scope)">
|
|
|
继续分解
|
|
|
</el-button>
|
|
@@ -97,15 +91,6 @@ export default {
|
|
|
return {
|
|
|
inputText: "",
|
|
|
carrierId:40,
|
|
|
- oldRow: "",
|
|
|
- //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未下发)
|
|
|
- oldRowCount: 1,
|
|
|
- oldRow1: "",
|
|
|
- //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未下发)
|
|
|
- oldRowCount1: 1,
|
|
|
- oldRow2: "",
|
|
|
- //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未下发)
|
|
|
- oldRowCount2: 1,
|
|
|
first: {
|
|
|
// first请求数据的地址
|
|
|
requestUrl:"",
|
|
@@ -121,38 +106,6 @@ export default {
|
|
|
""
|
|
|
},
|
|
|
activeName: "second",
|
|
|
- tableHead: [
|
|
|
- {
|
|
|
- prop: "materialName",
|
|
|
- label: "物资名称",
|
|
|
- width: 150,
|
|
|
- },
|
|
|
- {
|
|
|
- prop:"loadName",
|
|
|
- label:"装货点",
|
|
|
- width:150
|
|
|
- },
|
|
|
- {
|
|
|
- prop:"unloadName",
|
|
|
- label:"卸货点",
|
|
|
- width:150
|
|
|
- },
|
|
|
- {
|
|
|
- prop:"loadSequence",
|
|
|
- label:"装卸货次序",
|
|
|
- width:150
|
|
|
- },
|
|
|
- {
|
|
|
- prop: "materialWeight",
|
|
|
- label: "物资重量",
|
|
|
- width: 150,
|
|
|
- },
|
|
|
- {
|
|
|
- prop: "materialCount",
|
|
|
- label: "物资数量",
|
|
|
- width: 150,
|
|
|
- },
|
|
|
- ],
|
|
|
tableData: [],
|
|
|
};
|
|
|
},
|
|
@@ -168,85 +121,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- getRequirementMaterial(row) {
|
|
|
- // 记录重复点击次数
|
|
|
- if (this.oldRow === row) {
|
|
|
- this.oldRowCount += 1;
|
|
|
- }
|
|
|
- // 切换当前详情表
|
|
|
- this.$refs.table.toggleRowExpansion(row);
|
|
|
- // 打开前关闭上一个详情表
|
|
|
- if (this.oldRow != "") {
|
|
|
- if (this.oldRow != row) {
|
|
|
- if (this.oldRowCount % 2 === 1) {
|
|
|
- this.$refs.table.toggleRowExpansion(this.oldRow);
|
|
|
- } else {
|
|
|
- this.oldRowCount = 1;
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.oldRow = null;
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
- // 重置上一个点击对象
|
|
|
- this.oldRow = row;
|
|
|
- this.getMaterial(row.requirementId);
|
|
|
- },
|
|
|
- getRequirementMaterial1(row) {
|
|
|
- // 记录重复点击次数
|
|
|
- if (this.oldRow1 === row) {
|
|
|
- this.oldRowCount1 += 1;
|
|
|
- }
|
|
|
- // 切换当前详情表
|
|
|
- this.$refs.table1.toggleRowExpansion(row);
|
|
|
- // 打开前关闭上一个详情表
|
|
|
- if (this.oldRow1 != "") {
|
|
|
- if (this.oldRow1 != row) {
|
|
|
- if (this.oldRowCount1 % 2 === 1) {
|
|
|
- this.$refs.table1.toggleRowExpansion(this.oldRow1);
|
|
|
- } else {
|
|
|
- this.oldRowCount1 = 1;
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.oldRow1 = null;
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
- // 重置上一个点击对象
|
|
|
- this.oldRow1 = row;
|
|
|
- this.getMaterial(row.requirementId);
|
|
|
- },
|
|
|
- getRequirementMaterial2(row) {
|
|
|
- // 记录重复点击次数
|
|
|
- if (this.oldRow2 === row) {
|
|
|
- this.oldRowCount2 += 1;
|
|
|
- }
|
|
|
- // 切换当前详情表
|
|
|
- this.$refs.table2.toggleRowExpansion(row);
|
|
|
- // 打开前关闭上一个详情表
|
|
|
- if (this.oldRow2 != "") {
|
|
|
- if (this.oldRow2 != row) {
|
|
|
- if (this.oldRowCount2 % 2 === 1) {
|
|
|
- this.$refs.table2.toggleRowExpansion(this.oldRow2);
|
|
|
- } else {
|
|
|
- this.oldRowCount2 = 1;
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.oldRow2 = null;
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
- // 重置上一个点击对象
|
|
|
- this.oldRow2 = 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)
|
|
|
- })
|
|
|
- },
|
|
|
handleClick(tab, event) {
|
|
|
console.log("zhix")
|
|
|
this.getRequestUrl()
|