From a1b487e3417efb1481c3ef5598dcc4894529f1d5 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期四, 18 四月 2024 16:42:04 +0800
Subject: [PATCH] 出入库明细打印的接口联调+根据公司的不同设置不同的打印宽度
---
src/views/operate/scrap/index.vue | 134 ++++++++++++++++++++------------------------
1 files changed, 62 insertions(+), 72 deletions(-)
diff --git a/src/views/operate/scrap/index.vue b/src/views/operate/scrap/index.vue
index 5a10919..ae4d460 100644
--- a/src/views/operate/scrap/index.vue
+++ b/src/views/operate/scrap/index.vue
@@ -20,39 +20,29 @@
<template slot="tableButton">
<el-table-column fixed="right" label="鎿嶄綔" width="100">
<template slot-scope="scope">
- <el-button
- @click="examineClick(scope.row)"
- type="text"
- size="small"
- >鏌ョ湅</el-button
+ <el-button @click="examineClick(scope.row)" type="text" size="small">鏌ョ湅</el-button>
+ <el-button type="text" v-if="scope.row.status != 4" size="small" @click="editClick(scope.row)"
+ >缂栬緫</el-button
>
- <el-button type="text" v-if="scope.row.status!=4" size="small" @click="editClick(scope.row)">缂栬緫</el-button>
</template>
</el-table-column>
</template>
</TableCommonView>
</div>
<div class="btn-pager">
- <PagerView
- class="page"
- :pager-options="pagerOptions"
- v-on="pagerEvents"
- />
+ <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
</div>
</div>
<!-- 鏂板缓/缂栬緫 -->
- <AddScrapDialog
- v-if="editConfig.visible"
- :editCommonConfig="editConfig"
- />
+ <AddScrapDialog v-if="editConfig.visible" :editCommonConfig="editConfig" />
</div>
</template>
<script>
-import pageMixin from "@/components/makepager/pager/mixin/pageMixin";
-import { getDisuseList } from "@/api/operate/scrap";
+import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
+import { getDisuseList } from "@/api/operate/scrap"
// import DetailProduct from "@/views/productManage/product/DetailProduct"
-import AddScrapDialog from "@/views/operate/scrap/AddScrapDialog";
+import AddScrapDialog from "@/views/operate/scrap/AddScrapDialog"
export default {
name: "ScrapView",
@@ -68,27 +58,27 @@
visible: false,
title: "鏂板缓",
infomation: {},
- showEdit:false,
+ showEdit: false
},
- keyword: "",
- };
+ keyword: ""
+ }
},
created() {
- this.setTable();
- this.getData();
+ this.setTable()
+ this.getData()
},
methods: {
// 鏌ョ湅
examineClick(row) {
- this.editConfig.title = "鏌ョ湅";
- this.editConfig.infomation = { ...row };
- this.editConfig.visible = true;
+ this.editConfig.title = "鏌ョ湅"
+ this.editConfig.infomation = { ...row }
+ this.editConfig.visible = true
},
- editClick(row){
- console.log(row,"缂栬緫")
- this.editConfig.title = "缂栬緫";
- this.editConfig.infomation = { ...row };
- this.editConfig.visible = true;
+ editClick(row) {
+ console.log(row, "缂栬緫")
+ this.editConfig.title = "缂栬緫"
+ this.editConfig.infomation = { ...row }
+ this.editConfig.visible = true
},
setTable() {
this.tableList = {
@@ -97,61 +87,61 @@
selectIndex: true,
showcol: this.showcol,
allcol: [],
- tableColumn: this.setTableColumn(this.showcol),
- };
- let allcol = [];
+ tableColumn: this.setTableColumn(this.showcol)
+ }
+ let allcol = []
for (let i = 0; i < this.tableList.tableColumn.length; i++) {
if (!this.tableList.tableColumn[i].default) {
- const label = this.tableList.tableColumn[i].label;
- allcol.push(label);
+ const label = this.tableList.tableColumn[i].label
+ allcol.push(label)
}
}
- this.tableList.allcol = allcol;
+ this.tableList.allcol = allcol
},
setTableColumn(showcol) {
- console.log(showcol);
+ console.log(showcol)
let tableColumn = [
{
- label: "鍗曞彿",
+ label: "鎶ュ簾鍗曞彿",
prop: "number",
isShowColumn: true,
- default: true,
+ default: true
},
{
label: "鏃ユ湡",
prop: "operationDate",
isShowColumn: true,
- default: true,
+ default: true
},
{
label: "浜у搧",
prop: "productName",
isShowColumn: true,
- default: true,
+ default: true
},
{
label: "鏁伴噺",
prop: "amount",
isShowColumn: true,
- default: false,
+ default: false
},
{
label: "璁¢噺鍗曚綅",
prop: "unit",
isShowColumn: true,
- default: false,
+ default: false
},
{
label: "婧愪綅缃�",
prop: "from",
isShowColumn: true,
- default: false,
+ default: false
},
{
label: "鎶ュ簾浣嶇疆",
prop: "to",
isShowColumn: true,
- default: false,
+ default: false
},
{
label: "鐘舵��",
@@ -161,61 +151,61 @@
default: false,
status: true,
isCallMethod: true,
- getCallMethod: this.getStatus,
- },
- ];
- return tableColumn;
+ getCallMethod: this.getStatus
+ }
+ ]
+ return tableColumn
},
selTableCol(val) {
- this.showcol = val;
- this.tableList.tableColumn = this.setTableColumn(val);
+ this.showcol = val
+ this.tableList.tableColumn = this.setTableColumn(val)
},
// 璇锋眰鏁版嵁
async getData() {
await getDisuseList({
number: this.keyword,
page: this.pagerOptions.currPage,
- pageSize: this.pagerOptions.pageSize,
+ pageSize: this.pagerOptions.pageSize
}).then((res) => {
if (res.code === 200) {
const list = res.data.map((item) => {
return {
...item,
from: item.fromLocation.name,
- to: item.toLocation.name,
- };
- });
- this.tableList.tableInfomation = list || [];
- this.pagerOptions.totalCount = res.total;
+ to: item.toLocation.name
+ }
+ })
+ this.tableList.tableInfomation = list || []
+ this.pagerOptions.totalCount = res.total
}
- });
+ })
},
// 鎼滅储
getList(val) {
- this.keyword = val;
- console.log(val);
- this.pagerOptions.currPage = 1;
- this.getData();
+ this.keyword = val
+ console.log(val)
+ this.pagerOptions.currPage = 1
+ this.getData()
},
// 琛岀偣鍑�
tableRowClick(row) {
- console.log(row);
+ console.log(row)
// this.editConfig.visible = true;
// this.editConfig.title = "缂栬緫";
- this.editConfig.infomation = { ...row };
+ this.editConfig.infomation = { ...row }
},
// 鏂板缓
addBtnClick() {
- this.editConfig.visible = true;
- this.editConfig.title = "鏂板缓";
- this.editConfig.infomation = {};
+ this.editConfig.visible = true
+ this.editConfig.title = "鏂板缓"
+ this.editConfig.infomation = {}
},
// 鐘舵��
getStatus(val) {
- return val === 1 ? "鑽夌" : val === 3 ? "灏辩华" : "瀹屾垚";
- },
- },
-};
+ return val === 1 ? "鑽夌" : val === 3 ? "灏辩华" : "瀹屾垚"
+ }
+ }
+}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
--
Gitblit v1.8.0