Parcourir la source

货代凭证记账 2024-3-1

caojunjie il y a 1 an
Parent
commit
76715c43aa

+ 10 - 0
src/api/iosBasicData/fingenleg.js

@@ -39,4 +39,14 @@ export const fingenlegSubmit = (row) => {
     data: row
   })
 }
+// 初始入账
+export const fingenlegInitialization = (id) => {
+  return request({
+    url: '/api/blade-los/fingenleg/initialization',
+    method: 'get',
+    params: {
+      id
+    }
+  })
+}
 

+ 2 - 2
src/api/iosBasicData/finvouchers.js

@@ -44,7 +44,7 @@ export const confirmFinVouchers = (row) => {
   return request({
     url: '/api/blade-los/finvouchers/confirmFinVouchers',
     method: 'post',
-    data: row
+    params: row
   })
 }
 // 财务凭证 撤销
@@ -52,7 +52,7 @@ export const revokeFinVouchers = (row) => {
   return request({
     url: '/api/blade-los/finvouchers/revokeFinVouchers',
     method: 'post',
-    data: row
+    params: row
   })
 }
 // 分录明细删除

+ 1 - 1
src/views/iosBasicData/ComputationCenter/settlementDetails.vue

@@ -441,7 +441,7 @@ export default {
             saveLoading:false, // 按钮动画
             // 绑定的数据
             form:{
-                dc:'C'
+                dc:null
             },
             handleSelectionData:[], // 表格选择的数据
             corpData:[], // 结算单位 数据

+ 56 - 17
src/views/iosBasicData/fingenleg/index.vue

@@ -25,6 +25,10 @@
                      @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 329)"
                      @on-load="onLoad" >
               <template slot="menuLeft">
+                  <el-button type="primary"
+                             size="small"
+                             plain @click="initializationfun" >初始入账
+                  </el-button>
                   <el-button type="success"
                              size="small"
                              plain >导出
@@ -37,11 +41,8 @@
                              @click="handleDelete">删 除
                   </el-button>
               </template>
-              <template slot-scope="{disabled,size}" slot="isForeignSearch">
-                  <el-checkbox v-model="query.isForeign" :true-label="1" :false-label="0" ></el-checkbox>
-              </template>
-              <template slot-scope="{disabled,size}" slot="isQuantitySearch">
-                  <el-checkbox v-model="query.isQuantity" :true-label="1" :false-label="0" ></el-checkbox>
+              <template slot-scope="{disabled,size}" slot="isForeignDetermineSearch">
+                  <el-checkbox v-model="isForeignDetermine"  @change="isForeignDeterminefun" ></el-checkbox>
               </template>
           </avue-crud>
       </basic-container>
@@ -49,7 +50,13 @@
 </template>
 
 <script>
-  import {fingenlegList, fingenlegDetail, fingenlegSubmit, fingenlegRemove} from "@/api/iosBasicData/fingenleg";
+import {
+    fingenlegList,
+    fingenlegDetail,
+    fingenlegSubmit,
+    fingenlegRemove,
+    fingenlegInitialization
+} from "@/api/iosBasicData/fingenleg";
   import {mapGetters} from "vuex";
 
   export default {
@@ -57,6 +64,7 @@
       return {
         form: {},
         query: {},
+        isForeignDetermine:false, // 是否外币
         loading: true,
         page: {
           pageSize: 10,
@@ -82,7 +90,7 @@
             {
               label: "年",
               prop: "accyear",
-                width:'40',
+              width:'50',
               overHidden:true,
             },
             {
@@ -139,15 +147,7 @@
             },
             {
                 label: "显示外币",
-                prop: "isForeign",
-                hide:true,
-                search:true,
-                searchslot:true,
-                searchSpan:3,
-            },
-            {
-                label: "显示数量",
-                prop: "isQuantity",
+                prop: "isForeignDetermine",
                 hide:true,
                 search:true,
                 searchslot:true,
@@ -166,7 +166,7 @@
             {
               label: "本期余额",
               prop: "amountBlc",
-                overHidden:true,
+              overHidden:true,
             }
 
           ]
@@ -196,6 +196,45 @@
         this.option = await this.getColumnData(this.getColumnName(329), this.optionBack);
     },
     methods: {
+        // 是否外币点击
+       isForeignDeterminefun(){
+          if (this.isForeignDetermine) {
+              this.option.column.push(
+                  {
+                      label: '币种',
+                      prop: 'curCode',
+                      index:11,
+                      overHidden: true,
+                  },
+                  {
+                      label: '本期借方外币金额',
+                      prop: 'amountDrUsd',
+                      width:'120',
+                      index:12,
+                      overHidden: true,
+                  },{
+                      label: '本期贷方外币金额',
+                      prop: 'amountCrUsd',
+                      width:'120',
+                      index:13,
+                      overHidden: true,
+                  },{
+                      label: '本期外币余额',
+                      prop: 'amountUsdBlc',
+                      width:'100',
+                      index:14,
+                      overHidden: true,
+                  })
+          }else {
+              this.option = this.optionBack
+          }
+      },
+      // 初始入账
+      initializationfun(){
+          fingenlegInitialization().then(res=>{
+              console.log(res,211)
+          })
+      },
       rowSave(row, done, loading) {
         fingenlegSubmit(row).then(() => {
           this.onLoad(this.page);

+ 1 - 0
src/views/iosBasicData/fininvoices/fininvoicesDetails.vue

@@ -598,6 +598,7 @@ export default {
                 isRp:1,
                 invType:'全电发票',
                 taxRate:0,
+                isExchangeToCny:0,
                 invoiceDate:getCurrentDate(),
             },
             tableData:[], // 费用明细数据

+ 1 - 0
src/views/iosBasicData/fininvoicesOutput/fininvoicesDetails.vue

@@ -598,6 +598,7 @@ export default {
                 isRp:1,
                 invType:'全电发票',
                 taxRate:0,
+                isExchangeToCny:0,
                 invoiceDate:getCurrentDate(),
             },
             tableData:[], // 费用明细数据

+ 91 - 4
src/views/iosBasicData/finvouchers/index.vue

@@ -5,6 +5,7 @@
                      :table-loading="loading"
                      :data="data"
                      :page.sync="page"
+                     :search.sync="query"
                      :permission="permissionList"
                      :before-open="beforeOpen"
                      v-model="form"
@@ -39,6 +40,11 @@
                              size="small"
                              plain @click.stop="voucherAccountingfun" >凭证记账
                   </el-button>
+                  <el-button type="danger"
+                             size="small"
+                             plain
+                             @click="revokeFinVouchersfun">撤销记账
+                  </el-button>
               </template>
               <template slot="menu" slot-scope="{row}">
                   <el-button type="text"
@@ -60,7 +66,13 @@
 </template>
 
 <script>
-  import {finvouchersList, finvouchersDetail, finvouchersSubmit, finvouchersRemove} from "@/api/iosBasicData/finvouchers";
+import {
+    finvouchersList,
+    finvouchersDetail,
+    finvouchersSubmit,
+    finvouchersRemove,
+    confirmFinVouchers, revokeFinVouchers
+} from "@/api/iosBasicData/finvouchers";
   import {mapGetters} from "vuex";
   import finvouchersitems from "@/views/iosBasicData/finvouchers/finvouchersitems.vue";
   import finstlbillsDetails from "@/views/iosBasicData/finstlbills/finstlbillsDetails.vue";
@@ -130,6 +142,28 @@
               prop: "voucherDate",
               overHidden:true,
             },
+              {
+                  label: "凭证开始日期",
+                  prop: "voucherDateStart",
+                  search:true,
+                  overHidden:true,
+                  searchLabelWidth:"100",
+                  hide:true,
+                  type: "date",
+                  format: "yyyy-MM-dd",
+                  valueFormat: "yyyy-MM-dd HH:mm:ss",
+              },
+              {
+                  label: "凭证结束日期",
+                  prop: "voucherDateEnd",
+                  search:true,
+                  overHidden:true,
+                  searchLabelWidth:"100",
+                  hide:true,
+                  type: "date",
+                  format: "yyyy-MM-dd",
+                  valueFormat: "yyyy-MM-dd HH:mm:ss",
+              },
             {
               label: "财务年",
               prop: "accountYear",
@@ -279,6 +313,7 @@
         this.voucherStatusWorkDictsfun()
     },
     methods: {
+        revokeFinVouchers,
       // 获取字典数据
         voucherStatusWorkDictsfun(){
           getWorkDicts("voucher_status_los").then(res => {
@@ -300,7 +335,59 @@
               this.$message.warning("请选择至少一条数据");
               return;
           }
-          console.log(this.selectionList,'凭证记账选择数据')
+          if (this.selectionList.length === 1) {
+              if (this.selectionList[0].voucherStatus == 1) {
+                  return this.$message.warning("请选择还未记账的数据");
+              }
+          }
+          this.$confirm("确定将选择数据进行记账?", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning"
+          }).then(()=>{
+              let arrids = this.selectionList.map(item=>{
+                  if (item.voucherStatus == 0) {
+                      return item.id
+                  }
+              })
+              confirmFinVouchers({ids:arrids.join(',')}).then(res=>{
+                  this.$message({
+                      type: "success",
+                      message: "操作成功!"
+                  });
+                  this.onLoad(this.page, this.query);
+              })
+          })
+      },
+      // 撤销记账
+      revokeFinVouchersfun(){
+          if (this.selectionList.length === 0) {
+              this.$message.warning("请选择至少一条数据");
+              return;
+          }
+          if (this.selectionList.length === 1) {
+              if (this.selectionList[0].voucherStatus == 0) {
+                  return this.$message.warning("请选择已记账的数据");
+              }
+          }
+          this.$confirm("确定将选择数据撤销记账?", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning"
+          }).then(()=>{
+              let arrids = this.selectionList.map(item=>{
+                  if (item.voucherStatus == 1) {
+                      return item.id
+                  }
+              })
+              revokeFinVouchers({ids:arrids.join(',')}).then(res=>{
+                  this.$message({
+                      type: "success",
+                      message: "操作成功!"
+                  });
+                  this.onLoad(this.page, this.query);
+              })
+          })
       },
       // 新建凭证
       addbtnfun(){
@@ -323,7 +410,7 @@
               });
           }
           this.isShow = true;
-          this.onLoad(this.page, this.search);
+          this.onLoad(this.page, this.query);
       },
 
       rowSave(row, done, loading) {
@@ -406,7 +493,7 @@
       searchChange(params, done) {
         this.query = params;
         this.page.currentPage = 1;
-        this.onLoad(this.page, params);
+        this.onLoad(this.page, this.query);
         done();
       },
       selectionChange(list) {