Browse Source

财务账单 历史记录

qinbai 3 years ago
parent
commit
1b3794c8a1

+ 2 - 1
src/components/bill/config/application.json

@@ -9,6 +9,7 @@
   "cellBtn":false,
   "cancelBtn":false,
   "refreshBtn": false,
+  "searchBtn": false,
   "searchMenuPosition": "right",
   "searchMenuSpan": 24,
   "searchSpan": 8,
@@ -18,7 +19,7 @@
   "tree": true,
   "border": true,
   "index": true,
-  "selection": true,
+  "selection": false,
   "menu": false,
   "menuWidth": 0,
   "searchIcon": true,

+ 149 - 104
src/components/finance/financialAccount.vue

@@ -1,119 +1,137 @@
 <template>
   <div>
-    <avue-crud
-      ref="crud"
-      :data="data"
-      :option="option"
-      :table-loading="loading"
-      @row-update="rowUpdate"
-      @row-del="rowDel"
-      @saveColumn="saveColumn"
-      @resetColumn="resetColumn"
-    >
-      <template slot="menuLeft" slot-scope="{size}">
-        <el-button type="primary"
-                   icon="el-icon-plus"
-                   size="small"
-                   :loading="submitButton"
-                   @click="entering"
-        >录入
-        </el-button>
-      </template>
-      <template slot-scope="{row,index}" slot="menu">
-<!--        <el-button-->
-<!--          type="text"-->
-<!--          size="small"-->
-<!--          icon="el-icon-edit"-->
-<!--          @click="rowCell(row,index)"-->
-<!--        >{{ row.$cellEdit ? '修改完成' : '修改' }}-->
-<!--        </el-button>-->
-        <el-button
-          type="text"
-          icon="el-icon-delete"
-          size="small"
-          @click="rowDel(row,index)"
-        >删除
-        </el-button>
-      </template>
-      <template slot-scope="{row,index}" slot="corpId">
-        <span v-if="row.$cellEdit" class="required_fields" style="float: left;line-height: 32px">*</span>
-        <crop-select
-          v-if="row.$cellEdit"
-          v-model="corpId"
-          corpType="KG"
-          style="width: 100%"
-        ></crop-select>
-      </template>
-      <template slot-scope="{row,index}" slot="costType">
-        <span v-if="row.$cellEdit" class="required_fields">*</span>
-        <breakdown-select
-          v-if="row.$cellEdit"
-          v-model="row.costType"
-          style="width: 90%"
-          :configuration="configuration">
-        </breakdown-select>
-        <span v-else>{{ row.costType }}</span>
-      </template>
-      <template slot-scope="{row,index}" slot="billNo">
-        <el-select placeholder="请选择"
-                   v-if="row.$cellEdit"
-                   v-model="row.billNo"
-                   size="small"
-                   filterable
-                   allow-create
-                   default-first-option
-                   clearable>
-          <el-option
-            v-for="item in row.billNoList"
-            :key="item"
-            :label="item"
-            :value="item"
-          ></el-option>
-        </el-select>
-        <span v-else>{{ row.billNo }}</span>
-      </template>
-      <template slot-scope="{row,index}" slot="taxRate">
-        <el-input
-          v-model="row.taxRate"
-          v-if="row.$cellEdit"
-          size="small"
-          oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d\d\d\d\d).*$/, "$1.$2")'
-          autocomplete="off"
-        >
-          <i slot="suffix" style="margin-right: 10px;top:6px">%</i>
-        </el-input>
-        <span v-else>{{ row.taxRate }}</span>
-      </template>
-      <template slot-scope="{row,index}" slot="currency">
-        <span v-if="row.$cellEdit" class="required_fields">*</span>
-        <el-select v-if="row.$cellEdit" v-model="row.currency" size="small" placeholder="请选择" style="width: 90%" @change="currencyChange(row)" clearable filterable>
-          <el-option v-for="(item,index) in currencyDic" :key="index" :label="item.dictValue"  :value="item.dictValue"></el-option>
-        </el-select>
-        <span v-else>{{ row.currency }}</span>
-      </template>
-      <template slot-scope="{row,index}" slot="unit">
-        <span v-if="row.$cellEdit" class="required_fields">*</span>
-        <el-select  v-if="row.$cellEdit" v-model="row.unit" size="small" style="width: 90%" placeholder="请选择" clearable filterable>
-          <el-option v-for="(item,index) in unitDic" :key="index" :label="item.dictValue"  :value="item.dictValue"></el-option>
-        </el-select>
-        <span v-else>{{ row.unit }}</span>
-      </template>
-    </avue-crud>
-    <div class="dialogButton">
-      <el-button size="small" :loading="submitButton" @click="$emit('choceFun')">取消</el-button>
-      <el-button type="primary" size="small" :loading="submitButton" @click="submit()">确定</el-button>
-    </div>
+    <basic-container>
+      <avue-crud
+        ref="crud"
+        :data="data"
+        :option="option"
+        :table-loading="loading"
+        @row-update="rowUpdate"
+        @row-del="rowDel"
+        @saveColumn="saveColumn"
+        @resetColumn="resetColumn"
+      >
+        <template slot="menuLeft" slot-scope="{size}">
+          <el-button type="primary"
+                     icon="el-icon-plus"
+                     size="small"
+                     :loading="submitButton"
+                     @click="entering"
+          >录入
+          </el-button>
+        </template>
+        <template slot-scope="{row,index}" slot="menu">
+          <!--        <el-button-->
+          <!--          type="text"-->
+          <!--          size="small"-->
+          <!--          icon="el-icon-edit"-->
+          <!--          @click="rowCell(row,index)"-->
+          <!--        >{{ row.$cellEdit ? '修改完成' : '修改' }}-->
+          <!--        </el-button>-->
+          <el-button
+            type="text"
+            icon="el-icon-delete"
+            size="small"
+            @click="rowDel(row,index)"
+          >删除
+          </el-button>
+        </template>
+        <template slot-scope="{row,index}" slot="corpId">
+          <span v-if="row.$cellEdit" class="required_fields" style="float: left;line-height: 32px">*</span>
+          <crop-select
+            v-if="row.$cellEdit"
+            v-model="corpId"
+            corpType="KG"
+            style="width: 100%"
+          ></crop-select>
+        </template>
+        <template slot-scope="{row,index}" slot="costType">
+          <span v-if="row.$cellEdit" class="required_fields">*</span>
+          <breakdown-select
+            v-if="row.$cellEdit"
+            v-model="row.costType"
+            style="width: 90%"
+            :configuration="configuration">
+          </breakdown-select>
+          <span v-else>{{ row.costType }}</span>
+        </template>
+        <template slot-scope="{row,index}" slot="billNo">
+          <el-select placeholder="请选择"
+                     v-if="row.$cellEdit"
+                     v-model="row.billNo"
+                     size="small"
+                     filterable
+                     allow-create
+                     default-first-option
+                     clearable>
+            <el-option
+              v-for="item in row.billNoList"
+              :key="item"
+              :label="item"
+              :value="item"
+            ></el-option>
+          </el-select>
+          <span v-else>{{ row.billNo }}</span>
+        </template>
+        <template slot-scope="{row,index}" slot="taxRate">
+          <el-input
+            v-model="row.taxRate"
+            v-if="row.$cellEdit"
+            size="small"
+            oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d\d\d\d\d).*$/, "$1.$2")'
+            autocomplete="off"
+          >
+            <i slot="suffix" style="margin-right: 10px;top:6px">%</i>
+          </el-input>
+          <span v-else>{{ row.taxRate }}</span>
+        </template>
+        <template slot-scope="{row,index}" slot="currency">
+          <span v-if="row.$cellEdit" class="required_fields">*</span>
+          <el-select v-if="row.$cellEdit" v-model="row.currency" size="small" placeholder="请选择" style="width: 90%" @change="currencyChange(row)" clearable filterable>
+            <el-option v-for="(item,index) in currencyDic" :key="index" :label="item.dictValue"  :value="item.dictValue"></el-option>
+          </el-select>
+          <span v-else>{{ row.currency }}</span>
+        </template>
+        <template slot-scope="{row,index}" slot="unit">
+          <span v-if="row.$cellEdit" class="required_fields">*</span>
+          <el-select  v-if="row.$cellEdit" v-model="row.unit" size="small" style="width: 90%" placeholder="请选择" clearable filterable>
+            <el-option v-for="(item,index) in unitDic" :key="index" :label="item.dictValue"  :value="item.dictValue"></el-option>
+          </el-select>
+          <span v-else>{{ row.unit }}</span>
+        </template>
+      </avue-crud>
+      <div class="dialogButton">
+        <el-button size="small" :loading="submitButton" @click="$emit('choceFun')">取消</el-button>
+        <el-button type="primary" size="small" :loading="submitButton" @click="submit()">确定</el-button>
+      </div>
+    </basic-container>
+    <containerTitle title="历史账单"></containerTitle>
+    <basic-container>
+      <avue-crud :option="historyOption"
+                 :data="historyDataList"
+                 ref="historyCrud"
+                 v-model="historyForm"
+                 :page.sync="page"
+                 :table-loading="historyLoading"
+                 @on-load="onLoad">
+      </avue-crud>
+    </basic-container>
   </div>
 </template>
 
 <script>
   import {applyLoan, paymentApply} from "@/api/financialManagement/paymentRequest";
   import option from "./config/option.json"
+  import historyOption from "../bill/config/application.json"
   import {getUserInfo} from "@/api/system/user";
+  import { getBillList } from "@/api/financialManagement/paymentRequest";
 
   export default {
     name: "financialAccount",
     props: {
+      billId:{
+        type:String
+      },
       billType: {
         type: String
       },
@@ -156,9 +174,21 @@
           dicData: []
         },
         category: '',
+
+        historyLoading:false,
+        historyOption:historyOption,
+        historyDataList:[],
+        historyForm:{},
+        page: {
+          pageSize: 10,
+          pagerCount: 1,
+          total: 0,
+        },
       }
     },
     created() {
+      this.historyOption.searchShow = false
+
       getUserInfo().then(res=>{
         this.category = res.data.data.billType
         if (this.category == 2) {
@@ -176,7 +206,11 @@
       this.init()
     },
     watch:{
-
+      billId(val, oldVal) {
+        if(val != oldVal){
+          this.onLoad(this.page)
+        }
+      },
     },
     methods:{
       init(){
@@ -237,6 +271,17 @@
           this.$refs.crud.rowCellAdd(this.billData);
         }
       },
+      onLoad(page,params = {}) {
+        this.historyLoading = true;
+        params.srcParentId = this.billId
+        params.flag = 1
+
+        getBillList(page.currentPage, page.pageSize,params).then(res=>{
+          this.historyDataList = res.data.data.records
+        }).finally(()=>{
+          this.historyLoading = false;
+        })
+      },
       submit(){
         for(let i = 0;i<this.data.length;i++){
           if (this.corpId === (null || "")) {

+ 6 - 0
src/page/index/tags.vue

@@ -351,6 +351,12 @@ export default {
         if (tag.label == "采购订单(N)") {
           this.$store.commit("DOMCG_OUT_DETAIL");
         }
+        if (tag.label == "采购订单(I)") {
+          this.$store.commit("ENTRANCE_OUT_DETAIL");
+        }
+        if (tag.label == "销售订单(I)") {
+          this.$store.commit("XSACE_OUT_DETAIL");
+        }
         this.$store.commit("DEL_TAG", tag);
         if (tag.value === this.tag.value) {
           tag = this.tagList[key === 0 ? key : key - 1]; //如果关闭本标签让前推一个

+ 2 - 0
src/store/getters.js

@@ -42,5 +42,7 @@ const getters = {
   domPurStatus: state => state.ifdetail.domPurStatus,
   outputStatus: state => state.ifdetail.outputStatus,
   incomeStatus: state => state.ifdetail.incomeStatus,
+  entranceCgStatus: state => state.ifdetail.entranceCgStatus,
+  entranceXsStatus: state => state.ifdetail.entranceXsStatus,
 }
 export default getters

+ 22 - 0
src/store/modules/ifdetail.js

@@ -16,6 +16,8 @@ const ifdetail = {
     domPurStatus: false, // 内贸采购
     outputStatus:false,//销项发票
     incomeStatus:false,//进项发票
+    entranceCgStatus:false,//进口采购
+    entranceXsStatus:false,//进口销售
   },
   actions: {},
   mutations: {
@@ -148,6 +150,20 @@ const ifdetail = {
     INCOME_OUT_DETAIL(state) {
       state.incomeStatus = false;
     },
+    //进口采购
+    ENTRANCE_IN_DETAIL(state) {
+      state.entranceCgStatus = true;
+    },
+    ENTRANCE_OUT_DETAIL(state) {
+      state.entranceCgStatus = false;
+    },
+    //进口采购
+    XSACE_IN_DETAIL(state) {
+      state.entranceXsStatus = true;
+    },
+    XSACE_OUT_DETAIL(state) {
+      state.entranceXsStatus = false;
+    },
     //关闭所有
     DEL_ALL_DETAIL(state) {
       for (let item in state) {
@@ -207,6 +223,12 @@ const ifdetail = {
       if (tag.label == '进项发票') {
         state.incomeStatus = true
       }
+      if (tag.label == '采购订单(I)') {
+        state.entranceCgStatus = true
+      }
+      if (tag.label == '销售订单(I)') {
+        state.entranceXsStatus = true
+      }
     }
   }