|
@@ -3,6 +3,7 @@
|
|
|
<div class="bill-left">
|
|
|
<div class="bill-tab" :style="{width:closeTab?0:'200px'}">
|
|
|
<div class="title">导航</div>
|
|
|
+ <div class="bill-nav" v-if="sourceConfig" :class="{'onBill':showTab == 'source'}" @click="tabChange('source')">引单</div>
|
|
|
<div class="bill-nav" v-if="billConfig" :class="{'onBill':showTab == 'bill'}" @click="tabChange('bill')">单据</div>
|
|
|
<div class="bill-nav" v-if="smtConfig" :class="{'onBill':showTab == 'smt'}" @click="tabChange('smt')">已提交</div>
|
|
|
<div class="bill-nav" v-if="draftsBoxConfig" :class="{'onBill':showTab == 'drafts'}" @click="tabChange('draftsBox')">草稿箱</div>
|
|
@@ -16,6 +17,15 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="bill-main">
|
|
|
+ <!-- 引单 -->
|
|
|
+ <div class="bill-box" v-if="sourceConfig" :class="{'on-show':showTab == 'source'}">
|
|
|
+ <el-tabs v-model="activeSource">
|
|
|
+ <el-tab-pane v-for="(item,index) of sourceConfig" :key="index" :label="item.title" :name="'source'+index">
|
|
|
+ <bill-module :propConfig="item" :ref="'source_'+index" @clickHandle="clickHandle($event,'source_'+index)" @search="search($event,'source_'+index)"
|
|
|
+ @resert="resert('source_'+index)" />
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ </div>
|
|
|
<!-- 单据 -->
|
|
|
<div class="bill-box" v-if="billConfig" :class="{'on-show':showTab == 'bill'}">
|
|
|
<div class="bill-tool" v-if="billConfig.tool">
|
|
@@ -24,28 +34,38 @@
|
|
|
<div class="form" v-if="billConfig.form">
|
|
|
<by-form ref="billForm" :propConfig="billConfig.form" />
|
|
|
</div>
|
|
|
- <div class="table-tool" v-if="billConfig.tableTool">
|
|
|
- <by-tool ref="tableTool" :propConfig="billConfig.tableTool" @clickHandle="clickHandle($event,'billTable')" />
|
|
|
- </div>
|
|
|
- <div class="table" v-if="billConfig.table">
|
|
|
- <by-table :propConfig="billConfig.table" ref="billTable" />
|
|
|
- </div>
|
|
|
+ <template v-if="billConfig.tableConfig && billConfig.tableConfig.length > 0">
|
|
|
+ <div class="bill-table" v-for="(item,index) of billConfig.tableConfig" :key="index">
|
|
|
+ <div class="table-title" v-if="item.title">{{ item.title }}</div>
|
|
|
+ <div class="table-tool" v-if="item.tool">
|
|
|
+ <by-tool :ref="'tableTool_'+index" :propConfig="item.tool" @clickHandle="clickHandle($event,'billTable_'+index)" />
|
|
|
+ </div>
|
|
|
+ <div class="table" v-if="item.table">
|
|
|
+ <by-table :propConfig="item.table" :ref="'billTable_'+index" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
</div>
|
|
|
<!-- 已提交 -->
|
|
|
<div class="bill-box" v-if="smtConfig" :class="{'on-show':showTab == 'smt'}">
|
|
|
- <bill-module :propConfig="smtConfig" ref="smt" @clickHandle="clickHandle($event,'smt')" @search="search($event,'smt')" />
|
|
|
+ <bill-module :propConfig="smtConfig" ref="smt" @clickHandle="clickHandle($event,'smt')" @search="search($event,'smt')"
|
|
|
+ @resert="resert('smt')" />
|
|
|
</div>
|
|
|
<!-- 草稿箱 -->
|
|
|
<div class="bill-box" v-if="draftsBoxConfig" :class="{'on-show':showTab == 'draftsBox'}">
|
|
|
- <bill-module :propConfig="draftsBoxConfig" ref="draftsBox" @clickHandle="clickHandle($event,'draftsBox')" @search="search($event,'draftsBox')" />
|
|
|
+ <bill-module :propConfig="draftsBoxConfig" ref="draftsBox" @clickHandle="clickHandle($event,'draftsBox')" @search="search($event,'draftsBox')"
|
|
|
+ @resert="resert('draftsBox')" />
|
|
|
</div>
|
|
|
<!-- 综合查询 -->
|
|
|
<div class="bill-box" v-if="allConfig" :class="{'on-show':showTab == 'all'}">
|
|
|
- <bill-module :propConfig="allConfig" ref="all" @clickHandle="clickHandle($event,'all')" @search="search($event,'all')" />
|
|
|
+ <bill-module :propConfig="allConfig" ref="all" @clickHandle="clickHandle($event,'all')" @search="search($event,'all')"
|
|
|
+ @resert="resert('all')" />
|
|
|
</div>
|
|
|
<!-- 回收站 -->
|
|
|
<div class="bill-box" v-if="recycleBinConfig" :class="{'on-show':showTab == 'recycleBin'}">
|
|
|
- <bill-module :propConfig="recycleBinConfig" ref="recycleBin" @clickHandle="clickHandle($event,'recycleBin')" @search="search($event,'recycleBin')" />
|
|
|
+ <bill-module :propConfig="recycleBinConfig" ref="recycleBin" @clickHandle="clickHandle($event,'recycleBin')" @search="search($event,'recycleBin')"
|
|
|
+ @resert="resert('recycleBin')" />
|
|
|
</div>
|
|
|
<!-- 插槽 -->
|
|
|
<div class="bill-box" v-for="(item,index) of customs" :key="index" :class="{'on-show':showTab == item.name}">
|
|
@@ -57,11 +77,24 @@
|
|
|
<script lang="ts">
|
|
|
/**
|
|
|
config:{
|
|
|
+ source:[ //引单
|
|
|
+ {
|
|
|
+ title:'', //标题
|
|
|
+ search:{}, //表单配置
|
|
|
+ tool:{}, //工具栏配置
|
|
|
+ table:{} //表格配置
|
|
|
+ }
|
|
|
+ ],
|
|
|
bill:{ //单据
|
|
|
form:{}, //表单配置
|
|
|
tool:{}, //工具栏配置
|
|
|
- tableTool:{} //表格工具栏
|
|
|
- table:{} //表格配置
|
|
|
+ tableConfig:[ //表格配置
|
|
|
+ {
|
|
|
+ title:'',
|
|
|
+ tool:{} //表格工具栏
|
|
|
+ table:{}
|
|
|
+ }
|
|
|
+ ]
|
|
|
},
|
|
|
smt:{ //已提交
|
|
|
search:{}, //表单配置
|
|
@@ -84,7 +117,11 @@ import billModule from "./billModule.vue";
|
|
|
export default class ByBill extends VueViews {
|
|
|
showTab="bill"
|
|
|
closeTab = false
|
|
|
-
|
|
|
+ activeSource='source0'
|
|
|
+ //引单
|
|
|
+ get sourceConfig(){
|
|
|
+ return this.config?.source ? this.config.source : null;
|
|
|
+ }
|
|
|
//单据配置
|
|
|
get billConfig(){
|
|
|
return this.config?.bill ? this.config.bill : null;
|
|
@@ -132,6 +169,12 @@ export default class ByBill extends VueViews {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ resert(n:string){
|
|
|
+ this.$emit('resert',{
|
|
|
+ type:n
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
//获取表格数据
|
|
|
getTableData(n:string){
|
|
|
let d:Array<any> = [];
|
|
@@ -246,6 +289,17 @@ export default class ByBill extends VueViews {
|
|
|
opacity: 0;
|
|
|
z-index: -1;
|
|
|
transition: all .5s;
|
|
|
+ .bill-table{
|
|
|
+ padding-bottom: 16px;
|
|
|
+ width: 100%;
|
|
|
+ .table-title{
|
|
|
+ font-size: 14px;
|
|
|
+ padding-bottom: 8px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .bill-table:last-child{
|
|
|
+ padding: 0;
|
|
|
+ }
|
|
|
.bill-tool,.table-tool{
|
|
|
width: 100%;
|
|
|
padding-bottom: 16px;
|