소스 검색

Merge branch 'master' of http://47.107.53.207:3000/ymy/oms

AlanWong 2 년 전
부모
커밋
ab382cf58b
2개의 변경된 파일101개의 추가작업 그리고 19개의 파일을 삭제
  1. 5 0
      src/benyun/components/byBill/billModule.vue
  2. 96 19
      src/benyun/components/byBill/byBill.vue

+ 5 - 0
src/benyun/components/byBill/billModule.vue

@@ -109,6 +109,11 @@ export default class BillModule extends Vue {
       (this.$refs.table as any).setPage(page)
     }
   }
+  getPage(){
+    if(this.$refs.table){
+      return (this.$refs.table as any).getPage()
+    }
+  }
 }
 </script>
 

+ 96 - 19
src/benyun/components/byBill/byBill.vue

@@ -27,25 +27,41 @@
         </el-tabs>
       </div>
       <!-- 单据 -->
-      <div class="bill-box" v-if="billConfig" :class="{'on-show':showTab == 'bill'}">
-        <div class="bill-tool" v-if="billConfig.tool">
-          <by-tool ref="billTool" :propConfig="billConfig.tool" @clickHandle="clickHandle($event,'bill')" />
-        </div>
-        <div class="form" v-if="billConfig.form">
-          <by-form ref="billForm" :propConfig="billConfig.form" @getSupplierModal="getSupplierModal" />
-        </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" @onChangeRow="onChangeRow" />
+      <div class="bill-box b-bill" v-if="billConfig" :class="{'on-show':showTab == 'bill'}">
+        <div class="bill-cont">
+          <div class="bill-tool" v-if="billConfig.tool">
+            <by-tool ref="billTool" :propConfig="billConfig.tool" @clickHandle="clickHandle($event,'bill')" />
+          </div>
+          <div class="form" v-if="billConfig.form">
+            <by-form ref="billForm" :propConfig="billConfig.form" @getSupplierModal="getSupplierModal" />
+          </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" @onChangeRow="onChangeRow" />
+              </div>
             </div>
+          </template>
+        </div>
+        <div class="bill-log">
+          <div class="log-icon" @click="showLog">
+            <i v-if="!drawer" class="el-icon-s-fold"></i>
+            <i v-else class="el-icon-s-unfold"></i>
           </div>
-        </template>
-        
+        </div>
+        <el-drawer
+          class="log-drawer"
+          :size="600"
+          append-to-body
+          title="操作日志"
+          :visible.sync="drawer"
+          direction="rtl">
+          <byLog :config="billConfig && billConfig.log" :parentValue="billValue" ref="log" />
+        </el-drawer>
       </div>
       <!-- 已提交 -->
       <div class="bill-box" v-if="smtConfig" :class="{'on-show':showTab == 'smt'}">
@@ -91,6 +107,7 @@
   bill:{ //单据
     form:{}, //表单配置
     tool:{},  //工具栏配置
+    log:{}, //日志配置
     tableConfig:[ //表格配置
       {
         title:'',
@@ -119,8 +136,10 @@ import billModule from "./billModule.vue";
 @Component({components:{billModule}})
 export default class ByBill extends VueViews {
   showTab="bill"
-  closeTab = false
-  activeSource='source0'
+  closeTab = false;
+  billValue={};
+  activeSource='source0';
+  drawer=false;
   //引单
   get sourceConfig(){
     return this.config?.source ? this.config.source : null;
@@ -155,6 +174,16 @@ export default class ByBill extends VueViews {
       this.setConfig(this.propConfig)
     }
   }
+  //日志弹窗
+  showLog(){
+    if(this.$refs.billForm){
+      this.billValue = (this.$refs.billForm as any).getValue();
+      this.drawer = true;
+    }
+    if(this.$refs.log){
+      (this.$refs.log as any).request();
+    }
+  }
 
   setConfigAfter(){
     if(this.attrs.activeName){
@@ -363,6 +392,16 @@ export default class ByBill extends VueViews {
     }
   }
 
+  /**
+   * 获取表格分页
+   * @param n 
+   */
+  getTablePage(n:string){
+    if(this.$refs[n]){
+      return (this.$refs[n] as any).getPage();
+    }
+  }
+
   //分页变化
   paginationChange(page:any,n:string){
     this.$emit('pagination',{page,type:n})
@@ -446,6 +485,10 @@ export default class ByBill extends VueViews {
       opacity: 0;
       z-index: -1;
       transition: all .5s;
+      
+      .bill-cont{
+        width:100%
+      }
       .bill-table{
         padding-bottom: 16px;
         width: 100%;
@@ -464,6 +507,32 @@ export default class ByBill extends VueViews {
       .form{
         margin-bottom: 8px;
       }
+      .bill-log{
+        width: 30px;
+        display: flex;
+        flex-direction: column;
+        justify-content: center;
+        align-items: center;
+        flex-shrink: 0;
+        margin-left: 8px;
+        border-left: solid 1px #EEE;
+        .log-icon{
+          // background-color: #EEE;
+          width: 30px;
+          height: 40px;
+          display: flex;
+          justify-content: center;
+          align-items: center;
+          cursor: pointer;
+          .el-icon-notebook{
+            font-size: 20px;
+          }
+        }
+      }
+    }
+    .b-bill{
+      display: flex;
+      justify-content: space-between;
     }
     .on-show{
       opacity: 1;
@@ -471,4 +540,12 @@ export default class ByBill extends VueViews {
     }
   }
 }
+</style>
+
+<style lang="scss">
+.log-drawer{
+  .el-drawer__body{
+    height: calc(100% - 63px);
+  }
+}
 </style>