|
@@ -17,9 +17,21 @@
|
|
|
@resetColumn="resetColumn('crud','option','optionBack',codeValue)"
|
|
|
@saveColumn="saveColumn('crud','option','optionBack',codeValue)">
|
|
|
<template slot-scope="{type,size,row,index}" slot="menu">
|
|
|
- <el-button icon="el-icon-edit" :size="size" :type="type" :disabled="row.settlementAmount > 0" @click="$refs.crud.rowEdit(row,index)">编辑
|
|
|
+ <el-button icon="el-icon-edit" :size="size" :type="type" :disabled="row.settlementAmount > 0"
|
|
|
+ @click="$refs.crud.rowEdit(row,index)">编辑
|
|
|
+ </el-button>
|
|
|
+ <el-button icon="el-icon-delete" :size="size" :type="type" :disabled="row.settlementAmount > 0"
|
|
|
+ @click="rowDel(row,index)">删除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <template slot="menuLeft">
|
|
|
+ <el-button
|
|
|
+ class="el-icon-download"
|
|
|
+ type="info"
|
|
|
+ size="small"
|
|
|
+ :disabled="!id || listData.length === 0"
|
|
|
+ @click="openReport">打印
|
|
|
</el-button>
|
|
|
- <el-button icon="el-icon-delete" :size="size" :type="type" :disabled="row.settlementAmount > 0" @click="rowDel(row,index)">删除</el-button>
|
|
|
</template>
|
|
|
<template slot="itemNameForm">
|
|
|
<breakdown-select v-model="form.itemId" @selectValue="selectValue"
|
|
@@ -29,25 +41,33 @@
|
|
|
<crop-select v-model="form.corpId" @getCorpData="getGSDataTwo" corpType="KH"/>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
+ <report-dialog
|
|
|
+ :switchDialog="switchDialog"
|
|
|
+ :reportId="id"
|
|
|
+ :reportName="reportName"
|
|
|
+ @onClose="onClose()"
|
|
|
+ />
|
|
|
</trade-card>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import {tradingBoxFees} from "@/api/boxManagement";
|
|
|
-import {mapStates} from "element-ui/packages/table/src/store/helper";
|
|
|
-
|
|
|
+import reportDialog from "@/components/report-dialog/main.vue";
|
|
|
export default {
|
|
|
name: "index",
|
|
|
+ components: {reportDialog},
|
|
|
data() {
|
|
|
return {
|
|
|
- code:'',
|
|
|
+ code: '',
|
|
|
+ switchDialog: false,
|
|
|
+ reportName:'',
|
|
|
option: {},
|
|
|
optionBack: {},
|
|
|
- leaseIn:{
|
|
|
+ leaseIn: {
|
|
|
align: 'center',
|
|
|
index: true,
|
|
|
- height:500,
|
|
|
+ height: 500,
|
|
|
addBtnText: "录入明细",
|
|
|
refreshBtn: false,
|
|
|
addBtn: true,
|
|
@@ -440,13 +460,13 @@ export default {
|
|
|
// width: 100
|
|
|
// },
|
|
|
{
|
|
|
- label: '备注',
|
|
|
- prop: 'remark',
|
|
|
- type: 'textarea',
|
|
|
- overHidden: true,
|
|
|
- minRows: 3,
|
|
|
- span: 24
|
|
|
- }]
|
|
|
+ label: '备注',
|
|
|
+ prop: 'remark',
|
|
|
+ type: 'textarea',
|
|
|
+ overHidden: true,
|
|
|
+ minRows: 3,
|
|
|
+ span: 24
|
|
|
+ }]
|
|
|
},
|
|
|
dataList: [],
|
|
|
form: {},
|
|
@@ -530,6 +550,9 @@ export default {
|
|
|
activeName: {
|
|
|
type: String,
|
|
|
default: 'first'
|
|
|
+ },
|
|
|
+ id: {
|
|
|
+ type: String
|
|
|
}
|
|
|
},
|
|
|
async created() {
|
|
@@ -580,6 +603,50 @@ export default {
|
|
|
this.key++
|
|
|
},
|
|
|
methods: {
|
|
|
+ openReport() {
|
|
|
+ for (let item of this.listData) {
|
|
|
+ if (!item.id) {
|
|
|
+ this.$confirm("有未保存的费用,是否继续打印?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ if (this.type === "CK" || this.type === "JK"){
|
|
|
+ if (this.activeNameTwo === "first"){
|
|
|
+ this.reportName = "收款费用详情(进出口)"
|
|
|
+ }else {
|
|
|
+ this.reportName = "付款费用详情(进出口)"
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ if (this.activeNameTwo === "first"){
|
|
|
+ this.reportName = "收款费用详情(箱管)"
|
|
|
+ }else {
|
|
|
+ this.reportName = "付款费用详情(箱管)"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.switchDialog = true
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.type === "CK" || this.type === "JK"){
|
|
|
+ if (this.activeNameTwo === "first"){
|
|
|
+ this.reportName = "收款费用详情(进出口)"
|
|
|
+ }else {
|
|
|
+ this.reportName = "付款费用详情(进出口)"
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ if (this.activeNameTwo === "first"){
|
|
|
+ this.reportName = "收款费用详情(箱管)"
|
|
|
+ }else {
|
|
|
+ this.reportName = "付款费用详情(箱管)"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.switchDialog = true
|
|
|
+ },
|
|
|
+ // 报表关闭
|
|
|
+ onClose(val) {
|
|
|
+ this.switchDialog = val;
|
|
|
+ },
|
|
|
handleClick(tab, event) {
|
|
|
this.activeNameTwo = tab.name
|
|
|
if (tab.name === "first") {
|