|
@@ -15,13 +15,16 @@
|
|
<el-button type="primary" @click="batchReport">
|
|
<el-button type="primary" @click="batchReport">
|
|
<i class="upload2"></i>批量上传
|
|
<i class="upload2"></i>批量上传
|
|
</el-button>
|
|
</el-button>
|
|
|
|
+ <el-button type="primary" @click="exportData()"
|
|
|
|
+ ><i class="el-icon-download"></i>导出(Excel)</el-button
|
|
|
|
+ >
|
|
</div>
|
|
</div>
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
<!-- 未上报 -->
|
|
<!-- 未上报 -->
|
|
<el-tab-pane label="未上报" name="first">
|
|
<el-tab-pane label="未上报" name="first">
|
|
- <dilTable
|
|
|
|
|
|
+ <mergeRowTable
|
|
v-bind.sync="option"
|
|
v-bind.sync="option"
|
|
- ref="table3"
|
|
|
|
|
|
+ ref="excelDom"
|
|
@selection-change="selectionChange"
|
|
@selection-change="selectionChange"
|
|
>
|
|
>
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -49,102 +52,18 @@
|
|
@click="deleteclick(scope.row.saleOrderId)"
|
|
@click="deleteclick(scope.row.saleOrderId)"
|
|
>删除</el-button
|
|
>删除</el-button
|
|
>
|
|
>
|
|
- <el-button
|
|
|
|
- @click="detailclick3(scope.row)"
|
|
|
|
- type="text"
|
|
|
|
- size="small"
|
|
|
|
- >物资详情</el-button
|
|
|
|
- >
|
|
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</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="tableData3" 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>
|
|
|
|
|
|
+ </mergeRowTable>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
<!-- 已审批 -->
|
|
<!-- 已审批 -->
|
|
<el-tab-pane label="已审批" name="four">
|
|
<el-tab-pane label="已审批" name="four">
|
|
- <dilTable v-bind.sync="option4" ref="table">
|
|
|
|
- <el-table-column fixed="right" label="操作" width="80">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-button
|
|
|
|
- @click="detailclick(scope.row)"
|
|
|
|
- type="text"
|
|
|
|
- size="small"
|
|
|
|
- >物资详情</el-button
|
|
|
|
- >
|
|
|
|
- </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>
|
|
|
|
|
|
+ <mergeRowTable v-bind.sync="option4" ref="table"> </mergeRowTable>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
<!-- 已上报 -->
|
|
<!-- 已上报 -->
|
|
<el-tab-pane label="已上报" name="second">
|
|
<el-tab-pane label="已上报" name="second">
|
|
- <dilTable v-bind.sync="option2" ref="table2">
|
|
|
|
- <el-table-column fixed="right" label="操作" width="70">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-button
|
|
|
|
- @click="detailclick2(scope.row)"
|
|
|
|
- type="text"
|
|
|
|
- size="small"
|
|
|
|
- >物资详情</el-button
|
|
|
|
- >
|
|
|
|
- </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="tableData2" 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>
|
|
|
|
|
|
+ <mergeRowTable v-bind.sync="option2" ref="table2"> </mergeRowTable>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
</el-tabs>
|
|
</div>
|
|
</div>
|
|
@@ -157,6 +76,7 @@ export default {
|
|
return {
|
|
return {
|
|
batchReportList: [],
|
|
batchReportList: [],
|
|
activeName: "first",
|
|
activeName: "first",
|
|
|
|
+ tableTitle: "未上传销售订单报表",
|
|
drawer: false,
|
|
drawer: false,
|
|
input: "",
|
|
input: "",
|
|
index: "",
|
|
index: "",
|
|
@@ -165,16 +85,40 @@ export default {
|
|
option: {
|
|
option: {
|
|
// 表格请求数据的地址
|
|
// 表格请求数据的地址
|
|
requestUrl: "/api/v1/ams/getSaleOrderInfoes?apiId=408",
|
|
requestUrl: "/api/v1/ams/getSaleOrderInfoes?apiId=408",
|
|
- selectionType: "select"
|
|
|
|
|
|
+ selectionType: "select",
|
|
|
|
+ comparison: "saleNumber",
|
|
|
|
+ columnIndexs: [0, 1, 2, 3, 4, 8, 9, 10, 11, 12, 13, 14, 15]
|
|
},
|
|
},
|
|
option2: {
|
|
option2: {
|
|
// 表格请求数据的地址
|
|
// 表格请求数据的地址
|
|
- requestUrl: "/api/v1/ams/getSaleOrderReportedes?apiId=408"
|
|
|
|
|
|
+ requestUrl: "/api/v1/ams/getSaleOrderReportedes?apiId=408",
|
|
|
|
+ comparison: "saleNumber",
|
|
|
|
+ columnIndexs: [0, 1, 2, 3, 7, 8, 9, 10, 11, 12, 13, 14, 15]
|
|
},
|
|
},
|
|
option4: {
|
|
option4: {
|
|
// 表格请求数据的地址
|
|
// 表格请求数据的地址
|
|
requestUrl:
|
|
requestUrl:
|
|
- "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&saleType=1"
|
|
|
|
|
|
+ "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&saleType=1",
|
|
|
|
+ comparison: "saleNumber",
|
|
|
|
+ columnIndexs: [
|
|
|
|
+ 0,
|
|
|
|
+ 1,
|
|
|
|
+ 2,
|
|
|
|
+ 3,
|
|
|
|
+ 7,
|
|
|
|
+ 8,
|
|
|
|
+ 9,
|
|
|
|
+ 10,
|
|
|
|
+ 11,
|
|
|
|
+ 12,
|
|
|
|
+ 13,
|
|
|
|
+ 14,
|
|
|
|
+ 15,
|
|
|
|
+ 16,
|
|
|
|
+ 17,
|
|
|
|
+ 18,
|
|
|
|
+ 20
|
|
|
|
+ ]
|
|
},
|
|
},
|
|
mapList: [],
|
|
mapList: [],
|
|
mapItemList: [],
|
|
mapItemList: [],
|
|
@@ -198,23 +142,23 @@ export default {
|
|
{
|
|
{
|
|
prop: "materialName",
|
|
prop: "materialName",
|
|
label: "物资名称",
|
|
label: "物资名称",
|
|
- width: 150
|
|
|
|
|
|
+ width: 150,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
prop: "specificationModel",
|
|
prop: "specificationModel",
|
|
label: "规格型号",
|
|
label: "规格型号",
|
|
- width: 150
|
|
|
|
|
|
+ width: 150,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
prop: "materialNumber",
|
|
prop: "materialNumber",
|
|
label: "物资件数",
|
|
label: "物资件数",
|
|
- width: 100
|
|
|
|
|
|
+ width: 100,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
prop: "materialWeight",
|
|
prop: "materialWeight",
|
|
label: "物资重量",
|
|
label: "物资重量",
|
|
- width: 100
|
|
|
|
- }
|
|
|
|
|
|
+ width: 100,
|
|
|
|
+ },
|
|
],
|
|
],
|
|
//(销售公司已审批)
|
|
//(销售公司已审批)
|
|
tableData: [],
|
|
tableData: [],
|
|
@@ -223,7 +167,7 @@ export default {
|
|
//(已上报)
|
|
//(已上报)
|
|
tableData2: [],
|
|
tableData2: [],
|
|
//(未上报)
|
|
//(未上报)
|
|
- tableData3: []
|
|
|
|
|
|
+ tableData3: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -290,7 +234,7 @@ export default {
|
|
}
|
|
}
|
|
this.axios
|
|
this.axios
|
|
.post("/api/v1/ams/uploadSaleOrderList", this.batchReportList)
|
|
.post("/api/v1/ams/uploadSaleOrderList", this.batchReportList)
|
|
- .then(res => {
|
|
|
|
|
|
+ .then((res) => {
|
|
if (res.data.code == "200") {
|
|
if (res.data.code == "200") {
|
|
this.$message.success("上传成功");
|
|
this.$message.success("上传成功");
|
|
this.getRequestUrl();
|
|
this.getRequestUrl();
|
|
@@ -317,37 +261,49 @@ export default {
|
|
"/api/v1/ams/getSaleOrderInfoes?apiId=408&saleType=1&con=" +
|
|
"/api/v1/ams/getSaleOrderInfoes?apiId=408&saleType=1&con=" +
|
|
this.input +
|
|
this.input +
|
|
"&consigneeSsoId=" +
|
|
"&consigneeSsoId=" +
|
|
- getCookie("userId");
|
|
|
|
|
|
+ getCookie("userId") +
|
|
|
|
+ "&i=" +
|
|
|
|
+ new Date();
|
|
} else if (this.activeName == "second") {
|
|
} else if (this.activeName == "second") {
|
|
this.option2.requestUrl =
|
|
this.option2.requestUrl =
|
|
"/api/v1/ams/getSaleOrderReportedes?apiId=408&saleType=1&con=" +
|
|
"/api/v1/ams/getSaleOrderReportedes?apiId=408&saleType=1&con=" +
|
|
this.input +
|
|
this.input +
|
|
"&consigneeSsoId=" +
|
|
"&consigneeSsoId=" +
|
|
- getCookie("userId");
|
|
|
|
|
|
+ getCookie("userId") +
|
|
|
|
+ "&i=" +
|
|
|
|
+ new Date();
|
|
} else if (this.activeName == "four") {
|
|
} else if (this.activeName == "four") {
|
|
this.option4.requestUrl =
|
|
this.option4.requestUrl =
|
|
"/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&saleType=1&shipperId=1&con=" +
|
|
"/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&saleType=1&shipperId=1&con=" +
|
|
this.input +
|
|
this.input +
|
|
"&consigneeSsoId=" +
|
|
"&consigneeSsoId=" +
|
|
- getCookie("userId");
|
|
|
|
|
|
+ getCookie("userId") +
|
|
|
|
+ "&i=" +
|
|
|
|
+ new Date();
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
if (this.activeName == "first") {
|
|
if (this.activeName == "first") {
|
|
this.option.requestUrl =
|
|
this.option.requestUrl =
|
|
- "/api/v1/ams/getSaleOrderInfoes?apiId=408&saleType=1&con=" + this.input;
|
|
|
|
|
|
+ "/api/v1/ams/getSaleOrderInfoes?apiId=408&saleType=1&con=" +
|
|
|
|
+ this.input +
|
|
|
|
+ "&i=" +
|
|
|
|
+ new Date();
|
|
} else if (this.activeName == "second") {
|
|
} else if (this.activeName == "second") {
|
|
this.option2.requestUrl =
|
|
this.option2.requestUrl =
|
|
- "/api/v1/ams/getSaleOrderReportedes?apiId=408&saleType=1&con=" + this.input;
|
|
|
|
|
|
+ "/api/v1/ams/getSaleOrderReportedes?apiId=408&saleType=1&con=" +
|
|
|
|
+ this.input +
|
|
|
|
+ "&i=" +
|
|
|
|
+ new Date();
|
|
} else if (this.activeName == "four") {
|
|
} else if (this.activeName == "four") {
|
|
this.option4.requestUrl =
|
|
this.option4.requestUrl =
|
|
"/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&saleType=1&shipperId=1&con=" +
|
|
"/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&saleType=1&shipperId=1&con=" +
|
|
- this.input;
|
|
|
|
|
|
+ this.input +
|
|
|
|
+ "&i=" +
|
|
|
|
+ new Date();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- handleClose(){
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
|
|
+ handleClose() {},
|
|
seeclick(saleOrderId) {
|
|
seeclick(saleOrderId) {
|
|
this.$router.push("/saleOrderDetail/" + saleOrderId);
|
|
this.$router.push("/saleOrderDetail/" + saleOrderId);
|
|
},
|
|
},
|
|
@@ -383,7 +339,7 @@ export default {
|
|
// 根据销售订单id查询物资信息
|
|
// 根据销售订单id查询物资信息
|
|
this.axios
|
|
this.axios
|
|
.post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
|
|
.post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
|
|
- .then(res => {
|
|
|
|
|
|
+ .then((res) => {
|
|
this.tableData = res.data.data;
|
|
this.tableData = res.data.data;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -414,7 +370,7 @@ export default {
|
|
// 根据销售订单id查询物资信息
|
|
// 根据销售订单id查询物资信息
|
|
this.axios
|
|
this.axios
|
|
.post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
|
|
.post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
|
|
- .then(res => {
|
|
|
|
|
|
+ .then((res) => {
|
|
this.tableData1 = res.data.data;
|
|
this.tableData1 = res.data.data;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -445,7 +401,7 @@ export default {
|
|
// 根据销售订单id查询物资信息
|
|
// 根据销售订单id查询物资信息
|
|
this.axios
|
|
this.axios
|
|
.post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
|
|
.post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
|
|
- .then(res => {
|
|
|
|
|
|
+ .then((res) => {
|
|
this.tableData2 = res.data.data;
|
|
this.tableData2 = res.data.data;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -457,12 +413,12 @@ export default {
|
|
this.oldRowCount3 += 1;
|
|
this.oldRowCount3 += 1;
|
|
}
|
|
}
|
|
// 切换当前详情表
|
|
// 切换当前详情表
|
|
- this.$refs.table3.toggleRowExpansion(row);
|
|
|
|
|
|
+ this.$refs.excelDom.toggleRowExpansion(row);
|
|
// 打开前关闭上一个详情表
|
|
// 打开前关闭上一个详情表
|
|
if (this.oldRow3 != "") {
|
|
if (this.oldRow3 != "") {
|
|
if (this.oldRow3 != row) {
|
|
if (this.oldRow3 != row) {
|
|
if (this.oldRowCount3 % 2 === 1) {
|
|
if (this.oldRowCount3 % 2 === 1) {
|
|
- this.$refs.table3.toggleRowExpansion(this.oldRow3);
|
|
|
|
|
|
+ this.$refs.excelDom.toggleRowExpansion(this.oldRow3);
|
|
} else {
|
|
} else {
|
|
this.oldRowCount3 = 1;
|
|
this.oldRowCount3 = 1;
|
|
}
|
|
}
|
|
@@ -476,7 +432,7 @@ export default {
|
|
// 根据销售订单id查询物资信息
|
|
// 根据销售订单id查询物资信息
|
|
this.axios
|
|
this.axios
|
|
.post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
|
|
.post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
|
|
- .then(res => {
|
|
|
|
|
|
+ .then((res) => {
|
|
this.tableData3 = res.data.data;
|
|
this.tableData3 = res.data.data;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -487,12 +443,12 @@ export default {
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
type: "warning",
|
|
type: "warning",
|
|
- center: true
|
|
|
|
|
|
+ center: true,
|
|
})
|
|
})
|
|
.then(() => {
|
|
.then(() => {
|
|
this.axios
|
|
this.axios
|
|
.post("/api/v1/ams/uploadSaleOrder?saleOrderId=" + saleOrderId)
|
|
.post("/api/v1/ams/uploadSaleOrder?saleOrderId=" + saleOrderId)
|
|
- .then(res => {
|
|
|
|
|
|
+ .then((res) => {
|
|
if (res.data.code == "200") {
|
|
if (res.data.code == "200") {
|
|
this.$message.success("上传成功!");
|
|
this.$message.success("上传成功!");
|
|
this.getRequestUrl();
|
|
this.getRequestUrl();
|
|
@@ -505,7 +461,7 @@ export default {
|
|
.catch(() => {
|
|
.catch(() => {
|
|
this.$message({
|
|
this.$message({
|
|
type: "info",
|
|
type: "info",
|
|
- message: "取消上传!"
|
|
|
|
|
|
+ message: "取消上传!",
|
|
});
|
|
});
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -516,7 +472,7 @@ export default {
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
type: "warning",
|
|
type: "warning",
|
|
- center: true
|
|
|
|
|
|
+ center: true,
|
|
})
|
|
})
|
|
.then(() => {
|
|
.then(() => {
|
|
this.axios
|
|
this.axios
|
|
@@ -524,7 +480,7 @@ export default {
|
|
"/api/v1/ams/deleteAmsSaleOrderBySaleOrderId?saleOrderId=" +
|
|
"/api/v1/ams/deleteAmsSaleOrderBySaleOrderId?saleOrderId=" +
|
|
saleOrderId
|
|
saleOrderId
|
|
)
|
|
)
|
|
- .then(res => {
|
|
|
|
|
|
+ .then((res) => {
|
|
if (res.data.code == "200") {
|
|
if (res.data.code == "200") {
|
|
this.$message.success("删除成功");
|
|
this.$message.success("删除成功");
|
|
this.getRequestUrl();
|
|
this.getRequestUrl();
|
|
@@ -537,11 +493,11 @@ export default {
|
|
.catch(() => {
|
|
.catch(() => {
|
|
this.$message({
|
|
this.$message({
|
|
type: "info",
|
|
type: "info",
|
|
- message: "取消删除!"
|
|
|
|
|
|
+ message: "取消删除!",
|
|
});
|
|
});
|
|
});
|
|
});
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ },
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|