|
|
@@ -51,11 +51,8 @@
|
|
|
<div class="table" v-show="isShowTable">
|
|
|
<div class="table_option">
|
|
|
<select @change="seletByArea" v-model="optionValue">
|
|
|
- <option value="" selected>全区</option>
|
|
|
- <option value="s">南区</option>
|
|
|
- <option value="n">北区</option>
|
|
|
- <option value="e">东区</option>
|
|
|
- <option value="self">自定义分组</option>
|
|
|
+ <option value="">请选择</option>
|
|
|
+ <option v-for="(item, index) in areaList" :key="index">{{item}}</option>
|
|
|
</select>
|
|
|
<div class="hidTable" @click="hidTable">
|
|
|
<img src="../../../img/crossMark.png" />
|
|
|
@@ -88,24 +85,14 @@ import Table from "./RecordDetailTable";
|
|
|
import Count from "../../../components/Count";
|
|
|
import TablePage from "../../../components/TablePage";
|
|
|
export default {
|
|
|
- props: {
|
|
|
- detailData: {
|
|
|
- type: Object,
|
|
|
- default: () => {
|
|
|
- return {};
|
|
|
- },
|
|
|
- },
|
|
|
- },
|
|
|
components: {
|
|
|
Table,
|
|
|
Count,
|
|
|
TablePage,
|
|
|
},
|
|
|
mounted() {
|
|
|
- let id = this.detailData['id'];
|
|
|
- let data = {informationId: id};
|
|
|
- console.log(this.detailData, 11);
|
|
|
- this.selectInformationFileList(data);
|
|
|
+ this.getFirmsUploadList();
|
|
|
+ this.getAreaList();
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -115,7 +102,10 @@ export default {
|
|
|
pageSize: 20,
|
|
|
tableData: [],
|
|
|
optionValue: "",
|
|
|
- filesList: []
|
|
|
+ filesList: [],
|
|
|
+ index: (this.$route.query && this.$route.query.id) || "",
|
|
|
+ detailData: {},
|
|
|
+ areaList: []
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -128,20 +118,19 @@ export default {
|
|
|
showTable: function () {
|
|
|
this.isShowTable = !this.isShowTable;
|
|
|
let id = this.detailData["id"];
|
|
|
- let dataObj= {
|
|
|
- informationId: id,
|
|
|
- };
|
|
|
- this.getDlrData(dataObj);
|
|
|
+ let req = {
|
|
|
+ informationId: id,
|
|
|
+ };
|
|
|
+ this.getDlrData(req);
|
|
|
},
|
|
|
hidTable: function () {
|
|
|
this.isShowTable = false;
|
|
|
},
|
|
|
seletByArea: function () {
|
|
|
- console.log(this.optionValue, 111);
|
|
|
- let dataObj = {
|
|
|
- localArea: ['东区', '南区']
|
|
|
- }
|
|
|
- this.getDlrData(dataObj);
|
|
|
+ let req = {
|
|
|
+ localArea: this.optionValue,
|
|
|
+ };
|
|
|
+ this.getDlrData(req);
|
|
|
},
|
|
|
// 获取某一页面的数据,展示在表格
|
|
|
changePage: function (page) {
|
|
|
@@ -170,10 +159,10 @@ export default {
|
|
|
downloadFile: function (i) {
|
|
|
console.log(i);
|
|
|
let dataObj = {
|
|
|
- fileId: this.filesList[i]['id'],
|
|
|
- informationId: this.filesList[i]['informationId'],
|
|
|
+ fileId: this.filesList[i]["id"],
|
|
|
+ informationId: this.filesList[i]["informationId"],
|
|
|
//agentId: this.filesList[i]['agentId'] 如果是厂商下载不传agentId
|
|
|
- }
|
|
|
+ };
|
|
|
console.log(dataObj);
|
|
|
this.dealerDownload(dataObj);
|
|
|
},
|
|
|
@@ -181,10 +170,49 @@ export default {
|
|
|
downloadExcel: function () {
|
|
|
let id = this.detailData["id"];
|
|
|
let data = {
|
|
|
- informationId: id
|
|
|
- }
|
|
|
+ informationId: id,
|
|
|
+ };
|
|
|
this.exportTem(data);
|
|
|
},
|
|
|
+ // 上传记录列表接口 获取对应详情
|
|
|
+ getFirmsUploadList: function (data = {}) {
|
|
|
+ this.$http({
|
|
|
+ method: "post",
|
|
|
+ url: "/firmsUploadList",
|
|
|
+ data: data,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data && res.data.code === 200) {
|
|
|
+ this.detailData = res.data.data[this.index];
|
|
|
+ let id = this.detailData["id"];
|
|
|
+ let req = { informationId: id };
|
|
|
+ this.selectInformationFileList(req);
|
|
|
+ } else {
|
|
|
+ console.log(res);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.log(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 获取 所有区域 接口
|
|
|
+ getAreaList: function () {
|
|
|
+ this.$http({
|
|
|
+ method: "post",
|
|
|
+ url: "/sys/agent/selectAgentAreaInfoList",
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data && res.data.code === 200) {
|
|
|
+ this.areaList = res.data.data;
|
|
|
+ console.log(this.areaList);
|
|
|
+ } else {
|
|
|
+ console.log(res);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.log(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
// 导出 接口
|
|
|
exportTem: function (data) {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
@@ -212,15 +240,14 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
// 分页获取所有进销商信息接口
|
|
|
- getDlrData: function (dataObj={}) {
|
|
|
+ getDlrData: function (dataObj = {}) {
|
|
|
this.$http({
|
|
|
method: "post",
|
|
|
url: "/sys/agent/selectAgentInfoPage",
|
|
|
- data: dataObj
|
|
|
+ data: dataObj,
|
|
|
})
|
|
|
.then((res) => {
|
|
|
if (res.data && res.data.code === 200) {
|
|
|
- console.log(res.data.data);
|
|
|
this.tableData = res.data.data;
|
|
|
this.sum = res.data.count;
|
|
|
} else {
|
|
|
@@ -236,12 +263,12 @@ export default {
|
|
|
this.$http({
|
|
|
method: "post",
|
|
|
url: "/selectInformationFileList",
|
|
|
- data: data
|
|
|
+ data: data,
|
|
|
})
|
|
|
.then((res) => {
|
|
|
if (res.data && res.data.code === 200) {
|
|
|
this.filesList = res.data.data;
|
|
|
- console.log(res.data.data , '文件');
|
|
|
+ console.log(res.data.data, "文件");
|
|
|
} else {
|
|
|
console.log(res);
|
|
|
}
|
|
|
@@ -251,11 +278,11 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
// 文件下载接口
|
|
|
- dealerDownload: function(data) {
|
|
|
+ dealerDownload: function (data) {
|
|
|
this.$http({
|
|
|
method: "post",
|
|
|
url: "/dealerDownload",
|
|
|
- data: data
|
|
|
+ data: data,
|
|
|
})
|
|
|
.then((res) => {
|
|
|
if (res.data.code === 200) {
|
|
|
@@ -274,7 +301,7 @@ export default {
|
|
|
.catch((err) => {
|
|
|
console.log(err);
|
|
|
});
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|