|
@@ -15,13 +15,16 @@
|
|
|
<el-button type="primary" @click="batchReport">
|
|
|
<i class="upload2"></i>批量上传
|
|
|
</el-button>
|
|
|
+ <el-button type="primary" @click="exportData()"
|
|
|
+ ><i class="el-icon-download"></i>导出(Excel)</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
<!-- 未上报 -->
|
|
|
<el-tab-pane label="未上报" name="first">
|
|
|
<dilTable
|
|
|
v-bind.sync="option"
|
|
|
- ref="table3"
|
|
|
+ ref="excelDom"
|
|
|
@selection-change="selectionChange"
|
|
|
>
|
|
|
<el-table-column
|
|
@@ -157,6 +160,7 @@ export default {
|
|
|
return {
|
|
|
batchReportList: [],
|
|
|
activeName: "first",
|
|
|
+ tableTitle: "未上传销售订单报表",
|
|
|
drawer: false,
|
|
|
input: "",
|
|
|
index: "",
|
|
@@ -165,16 +169,16 @@ export default {
|
|
|
option: {
|
|
|
// 表格请求数据的地址
|
|
|
requestUrl: "/api/v1/ams/getSaleOrderInfoes?apiId=408",
|
|
|
- selectionType: "select"
|
|
|
+ selectionType: "select",
|
|
|
},
|
|
|
option2: {
|
|
|
// 表格请求数据的地址
|
|
|
- requestUrl: "/api/v1/ams/getSaleOrderReportedes?apiId=408"
|
|
|
+ requestUrl: "/api/v1/ams/getSaleOrderReportedes?apiId=408",
|
|
|
},
|
|
|
option4: {
|
|
|
// 表格请求数据的地址
|
|
|
requestUrl:
|
|
|
- "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&saleType=1"
|
|
|
+ "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&saleType=1",
|
|
|
},
|
|
|
mapList: [],
|
|
|
mapItemList: [],
|
|
@@ -198,23 +202,23 @@ export default {
|
|
|
{
|
|
|
prop: "materialName",
|
|
|
label: "物资名称",
|
|
|
- width: 150
|
|
|
+ width: 150,
|
|
|
},
|
|
|
{
|
|
|
prop: "specificationModel",
|
|
|
label: "规格型号",
|
|
|
- width: 150
|
|
|
+ width: 150,
|
|
|
},
|
|
|
{
|
|
|
prop: "materialNumber",
|
|
|
label: "物资件数",
|
|
|
- width: 100
|
|
|
+ width: 100,
|
|
|
},
|
|
|
{
|
|
|
prop: "materialWeight",
|
|
|
label: "物资重量",
|
|
|
- width: 100
|
|
|
- }
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
],
|
|
|
//(销售公司已审批)
|
|
|
tableData: [],
|
|
@@ -223,7 +227,7 @@ export default {
|
|
|
//(已上报)
|
|
|
tableData2: [],
|
|
|
//(未上报)
|
|
|
- tableData3: []
|
|
|
+ tableData3: [],
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -290,7 +294,7 @@ export default {
|
|
|
}
|
|
|
this.axios
|
|
|
.post("/api/v1/ams/uploadSaleOrderList", this.batchReportList)
|
|
|
- .then(res => {
|
|
|
+ .then((res) => {
|
|
|
if (res.data.code == "200") {
|
|
|
this.$message.success("上传成功");
|
|
|
this.getRequestUrl();
|
|
@@ -380,7 +384,7 @@ export default {
|
|
|
// 根据销售订单id查询物资信息
|
|
|
this.axios
|
|
|
.post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
|
|
|
- .then(res => {
|
|
|
+ .then((res) => {
|
|
|
this.tableData = res.data.data;
|
|
|
});
|
|
|
},
|
|
@@ -411,7 +415,7 @@ export default {
|
|
|
// 根据销售订单id查询物资信息
|
|
|
this.axios
|
|
|
.post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
|
|
|
- .then(res => {
|
|
|
+ .then((res) => {
|
|
|
this.tableData1 = res.data.data;
|
|
|
});
|
|
|
},
|
|
@@ -442,7 +446,7 @@ export default {
|
|
|
// 根据销售订单id查询物资信息
|
|
|
this.axios
|
|
|
.post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
|
|
|
- .then(res => {
|
|
|
+ .then((res) => {
|
|
|
this.tableData2 = res.data.data;
|
|
|
});
|
|
|
},
|
|
@@ -454,12 +458,12 @@ export default {
|
|
|
this.oldRowCount3 += 1;
|
|
|
}
|
|
|
// 切换当前详情表
|
|
|
- this.$refs.table3.toggleRowExpansion(row);
|
|
|
+ this.$refs.excelDom.toggleRowExpansion(row);
|
|
|
// 打开前关闭上一个详情表
|
|
|
if (this.oldRow3 != "") {
|
|
|
if (this.oldRow3 != row) {
|
|
|
if (this.oldRowCount3 % 2 === 1) {
|
|
|
- this.$refs.table3.toggleRowExpansion(this.oldRow3);
|
|
|
+ this.$refs.excelDom.toggleRowExpansion(this.oldRow3);
|
|
|
} else {
|
|
|
this.oldRowCount3 = 1;
|
|
|
}
|
|
@@ -473,7 +477,7 @@ export default {
|
|
|
// 根据销售订单id查询物资信息
|
|
|
this.axios
|
|
|
.post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
|
|
|
- .then(res => {
|
|
|
+ .then((res) => {
|
|
|
this.tableData3 = res.data.data;
|
|
|
});
|
|
|
},
|
|
@@ -484,12 +488,12 @@ export default {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
|
- center: true
|
|
|
+ center: true,
|
|
|
})
|
|
|
.then(() => {
|
|
|
this.axios
|
|
|
.post("/api/v1/ams/uploadSaleOrder?saleOrderId=" + saleOrderId)
|
|
|
- .then(res => {
|
|
|
+ .then((res) => {
|
|
|
if (res.data.code == "200") {
|
|
|
this.$message.success("上传成功!");
|
|
|
this.getRequestUrl();
|
|
@@ -502,7 +506,7 @@ export default {
|
|
|
.catch(() => {
|
|
|
this.$message({
|
|
|
type: "info",
|
|
|
- message: "取消上传!"
|
|
|
+ message: "取消上传!",
|
|
|
});
|
|
|
});
|
|
|
},
|
|
@@ -513,7 +517,7 @@ export default {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
|
- center: true
|
|
|
+ center: true,
|
|
|
})
|
|
|
.then(() => {
|
|
|
this.axios
|
|
@@ -521,7 +525,7 @@ export default {
|
|
|
"/api/v1/ams/deleteAmsSaleOrderBySaleOrderId?saleOrderId=" +
|
|
|
saleOrderId
|
|
|
)
|
|
|
- .then(res => {
|
|
|
+ .then((res) => {
|
|
|
if (res.data.code == "200") {
|
|
|
this.$message.success("删除成功");
|
|
|
this.getRequestUrl();
|
|
@@ -534,11 +538,11 @@ export default {
|
|
|
.catch(() => {
|
|
|
this.$message({
|
|
|
type: "info",
|
|
|
- message: "取消删除!"
|
|
|
+ message: "取消删除!",
|
|
|
});
|
|
|
});
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|