|
|
@@ -314,7 +314,6 @@
|
|
|
id="out-table"
|
|
|
ref="crud"
|
|
|
:header-cell-class-name="headerClassName"
|
|
|
- :row-style="{ height: '20px', padding: '0px' }"
|
|
|
:cell-style="{ height: '20px', padding: '0px' }"
|
|
|
:search.sync="boxQuery"
|
|
|
@search-change="searchChangeBox"
|
|
|
@@ -322,6 +321,7 @@
|
|
|
@selection-change="selectionChange"
|
|
|
@select="selectHandle"
|
|
|
@row-update="rowUpdate"
|
|
|
+ :row-style="rowStyle2"
|
|
|
@resetColumn="resetColumn('crud', 'option', 'optionBack', 462)"
|
|
|
@saveColumn="saveColumn('crud', 'option', 'optionBack', 462)"
|
|
|
>
|
|
|
@@ -356,7 +356,10 @@
|
|
|
>客户还箱</el-button
|
|
|
>
|
|
|
<el-button type="success" size="small" :disabled="!form.id" @click="allClick('导出箱号')"> 导出箱号</el-button>
|
|
|
- <!-- <el-button type="primary" size="small" @click="allClick('卖箱')">卖箱</el-button> -->
|
|
|
+ <el-button type="success" size="small" :disabled="!form.id" @click="allClick('导出选中箱号')">导出选中箱号</el-button>
|
|
|
+ <el-button size="small" :disabled="!form.id" @click="allClick('选中')"> 选中</el-button>
|
|
|
+ <el-button size="small" :disabled="!form.id" @click="allClick('清空选中')"> 清空选中</el-button>
|
|
|
+ <!--<el-button type="primary" size="small" @click="allClick('卖箱')">卖箱</el-button> -->
|
|
|
<!-- <el-button size="small" style="margin-right: 8px" :disabled="!form.id || true"
|
|
|
@click="$refs.print.openDialog()">打印报表
|
|
|
</el-button> -->
|
|
|
@@ -1449,10 +1452,12 @@ import feeModifyView from "@/components/feeModify/view.vue";
|
|
|
import _ from "lodash";
|
|
|
import { Header } from "element-ui";
|
|
|
import changeCn from "./components/changeCn.vue";
|
|
|
+import axios from "axios";
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
|
data() {
|
|
|
return {
|
|
|
+ pickIds: [],
|
|
|
searchStatus: false,
|
|
|
boxQuery: {},
|
|
|
fininvoicesData: [],
|
|
|
@@ -4640,16 +4645,65 @@ export default {
|
|
|
ids: ids.join(",")
|
|
|
};
|
|
|
exportTemplateById(data).then(res => {
|
|
|
- const routeData = this.$router.resolve({
|
|
|
- path: "/api/blade-los/boxdynamicsrecord/exportTemplateById", //跳转目标窗口的地址
|
|
|
- query: {
|
|
|
- "Blade-Auth": getToken(),
|
|
|
- ...data //括号内是要传递给新窗口的参数
|
|
|
+ axios({
|
|
|
+ url: "/api/blade-los/boxdynamicsrecord/exportTemplateById", // 比如: 'http://example.com/api/downloadExcel'
|
|
|
+ method: "post",
|
|
|
+ responseType: "blob", // 重要:设置为blob以接收二进制数据
|
|
|
+ data: {
|
|
|
+ ...data
|
|
|
}
|
|
|
+ }).then(response => {
|
|
|
+ const url = window.URL.createObjectURL(new Blob([response.data]));
|
|
|
+ const link = document.createElement("a");
|
|
|
+ link.href = url;
|
|
|
+ link.setAttribute("download", "箱明细.xlsx"); // 设置下载的文件名
|
|
|
+ document.body.appendChild(link);
|
|
|
+ link.click();
|
|
|
+ this.$message.success("下载成功,请查看浏览器下载记录!");
|
|
|
});
|
|
|
- window.open(routeData.href.slice(1, routeData.href.length));
|
|
|
});
|
|
|
}
|
|
|
+ if (name == "导出选中箱号") {
|
|
|
+ if (this.pickIds.length == 0) {
|
|
|
+ return this.$message.error("请点击选中按钮!");
|
|
|
+ }
|
|
|
+ let data = {
|
|
|
+ id: this.form.id,
|
|
|
+ ids: this.pickIds.join(",")
|
|
|
+ };
|
|
|
+ exportTemplateById(data).then(res => {
|
|
|
+ axios({
|
|
|
+ url: "/api/blade-los/boxdynamicsrecord/exportTemplateById", // 比如: 'http://example.com/api/downloadExcel'
|
|
|
+ method: "post",
|
|
|
+ responseType: "blob", // 重要:设置为blob以接收二进制数据
|
|
|
+ data: {
|
|
|
+ ...data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .then(response => {
|
|
|
+ console.log(response);
|
|
|
+ const url = window.URL.createObjectURL(new Blob([response.data]));
|
|
|
+ const link = document.createElement("a");
|
|
|
+ link.href = url;
|
|
|
+ link.setAttribute("download", "箱明细.xlsx"); // 设置下载的文件名
|
|
|
+ document.body.appendChild(link);
|
|
|
+ link.click();
|
|
|
+ this.$message.success("下载成功,请查看浏览器下载记录!");
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.log(err);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (name == "选中") {
|
|
|
+ for (let item of this.selectionList) {
|
|
|
+ this.pickIds.push(item.id);
|
|
|
+ }
|
|
|
+ this.pickIds = [...new Set(this.pickIds)];
|
|
|
+ }
|
|
|
+ if (name == "清空选中") {
|
|
|
+ this.pickIds = [];
|
|
|
+ }
|
|
|
if (name == "导出") {
|
|
|
let ids = [];
|
|
|
if (this.boxQuery.code) {
|
|
|
@@ -5461,8 +5515,8 @@ export default {
|
|
|
this.podDialog = true;
|
|
|
}
|
|
|
if (name == "批量修改放箱号") {
|
|
|
- for(let item of this.selectionList){
|
|
|
- if(item.status!='待使用'){
|
|
|
+ for (let item of this.selectionList) {
|
|
|
+ if (item.status != "待使用") {
|
|
|
return this.$message.error("请选择箱状态为待使用的数据");
|
|
|
}
|
|
|
}
|
|
|
@@ -5979,6 +6033,13 @@ export default {
|
|
|
};
|
|
|
}
|
|
|
},
|
|
|
+ rowStyle2({ row, column, rowIndex }) {
|
|
|
+ if (this.pickIds.filter(item => item == row.id).length) {
|
|
|
+ return {
|
|
|
+ backgroundColor: "#E1F3D8"
|
|
|
+ };
|
|
|
+ }
|
|
|
+ },
|
|
|
//自定义列保存
|
|
|
async saveColumn(ref, option, optionBack, code) {
|
|
|
if (code == 462) {
|