Ver Fonte

Merge branch 'dev' of http://www.baoxianzhanggui.com:8090/sxzgd/vue-insagent-pc into dev

@dongkboy há 2 anos atrás
pai
commit
7359acd164

+ 8 - 0
src/http/moudules/expense.js

@@ -267,4 +267,12 @@ export const detailInvAccountIncoice = (id) => {
         url: '/invAccountIncoice/byId/'+id,
         method: "get",
     })
+}
+//开票导出
+export const invAccountExcel = (data) => {
+    return axios({
+        url: '/invAccountIncoice/excel',
+        method: "post",
+        data
+    })
 }

+ 52 - 45
src/views/FinancialManagement/ExpenseManagement/ExpenseApplyFor.vue

@@ -104,7 +104,7 @@
                   placeholder="单位"
                 >
                   <el-option
-                    v-for="(item, index) in collectionData"
+                    v-for="(item, index) in innerCollectionData"
                     :key="item.accountId + '' + index"
                     :label="item.name"
                     :value="item.bankCardNum"
@@ -377,11 +377,37 @@ export default {
       dialogFormVisible: false, //账户信息弹出框状态
       title: "新增账户信息", //账户信息弹框标题
       expenseDialog: false, //申请单显示状态
-      pageResult: {
+      pageResult: {//表格参数
         pageNo: 1,
         pageSize: 10,
         content: [],
-      }, //表格参数
+      }, 
+      formData: {
+        outerFlag: "0", //账户类别
+        accountName: "", //户名
+        accountQuality: "", //账户性质
+        bankCardNum: "", //银行卡号
+        bank: "", //开户行
+        bankName: "", //开户行名称
+        bankNum: "", //开户行号
+        certExpirationDate: "", //证书有效期
+        clearingProfit: "", //结算卡
+        dayStrokeNum: "", //单日转账笔数限制
+        exteriorProfit: "", //外部过账金额
+        fiscalProfit: "", //财税公司利润
+        insuranceProfit: "", //保险公司回款
+        otherProfit: "", //其他利润
+        parkProfit: "", //园区利润
+        priDayLines: "", //对私单日限额
+        priSingleLines: "", //对私单笔限额
+        priYearExcess: "", //对私年剩余额度
+        priYearLines: "", //对私年额度
+        pubDayLines: "", //对公单日限额
+        pubSingleLines: "", //对公单笔限额
+        pubYearExcess: "", //对公年剩余额度
+        pubYearLines: "", //对公年额度
+        tianqinProfit: "", //天勤利润
+      },
       columns: [
         // 申请列表表格头部
         {
@@ -459,32 +485,6 @@ export default {
           sortable: false,
         },
       ],
-      formData: {
-        outerFlag: "0", //账户类别
-        accountName: "", //户名
-        accountQuality: "", //账户性质
-        bankCardNum: "", //银行卡号
-        bank: "", //开户行
-        bankName: "", //开户行名称
-        bankNum: "", //开户行号
-        certExpirationDate: "", //证书有效期
-        clearingProfit: "", //结算卡
-        dayStrokeNum: "", //单日转账笔数限制
-        exteriorProfit: "", //外部过账金额
-        fiscalProfit: "", //财税公司利润
-        insuranceProfit: "", //保险公司回款
-        otherProfit: "", //其他利润
-        parkProfit: "", //园区利润
-        priDayLines: "", //对私单日限额
-        priSingleLines: "", //对私单笔限额
-        priYearExcess: "", //对私年剩余额度
-        priYearLines: "", //对私年额度
-        pubDayLines: "", //对公单日限额
-        pubSingleLines: "", //对公单笔限额
-        pubYearExcess: "", //对公年剩余额度
-        pubYearLines: "", //对公年额度
-        tianqinProfit: "", //天勤利润
-      },
       pickerOptions: {
         //日期快捷键
         disabledDate(time) {
@@ -515,23 +515,10 @@ export default {
           },
         ],
       },
-      //新增申请表单form表单
-      tableForm: {
-        company: "", //单位
-        applicant: "", //申请人
-        applySector: "", //申请部门
-        applyTime: "", //申请日期
-        collectionMessage: "", //收款单位信息
-        fundFlow: "", //资金流程
-        fundUse: "", //资金用途
-        remark: "", //备注
-        applyAmount: "", //申请金额
-        bigApplyAmount: "", //大写金额
-        payMethod: [], //支付方式
-      },
       payment_methodsData: [], //支付方式字典数据
       use_fundsData: [], //备注字典数据
       collectionData: [], //收款单位信息数据
+      innerCollectionData: [], //内部账户单位信息数据
       account_qualityData: [], //账户性质字典
       fundFlowData: [], //资金用途字典数据
       tableRules: {
@@ -576,6 +563,20 @@ export default {
       collectionMessageItem: {}, //选择收款单位整条数据
       expendDataId: "", //修改时该条数据id
       buttonValue: "导 出", //弹框提交按钮内容
+      //新增申请表单form表单
+      tableForm: {
+        company: "", //单位
+        applicant: "", //申请人
+        applySector: "", //申请部门
+        applyTime: "", //申请日期
+        collectionMessage: "", //收款单位信息
+        fundFlow: "", //资金流程
+        fundUse: "", //资金用途
+        remark: "", //备注
+        applyAmount: "", //申请金额
+        bigApplyAmount: "", //大写金额
+        payMethod: [], //支付方式
+      },
     };
   },
   watch: {
@@ -612,7 +613,7 @@ export default {
   methods: {
     //导出
     expendDataup(idList) {
-      if (this.expendDataId) {
+      if (this.expendDataId) { //编辑查看直接导出
         let url = process.env.BASE_URL + "/upload/" + this.tableForm.uplodePath; // 3.创建一个临时的url指向blob对象
         // 4.创建url之后可以模拟对此文件对象的一系列操作,例如:预览、下载
         let a = document.createElement("a");
@@ -623,7 +624,7 @@ export default {
         window.URL.revokeObjectURL(url);
         this.resetForm();
         this.findPage();
-      } else {
+      } else { //新增并导出
         this.$api.expense.excel(idList).then((response) => {
           if (response.code == 200) {
             response.data.forEach((data) => {
@@ -845,6 +846,7 @@ export default {
       this.$api.expense.getAccountByAccountName().then((res) => {
         if (res.code == 200) {
           let arr = [];
+          let newarr = []
           res.data.forEach((item, index) => {
             if (item.invAccountCardList != null) {
               item.invAccountCardList.forEach((it) => {
@@ -862,8 +864,13 @@ export default {
                   item.accountName + "   " + it.bankCardNum + "   " + it.bank;
               });
               arr.push(...item.invAccountCardList);
+              //获取全部内部用户
+              if(item.outerFlag == 0){
+                newarr.push(...item.invAccountCardList)
+              }
             }
           });
+          this.innerCollectionData = newarr;
           this.collectionData = arr;
         }
       });

+ 23 - 9
src/views/FinancialManagement/ExpenseManagement/ExpenseManagement.vue

@@ -332,7 +332,12 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="备注" prop="remark">
-              <el-select v-model="inComeFormData.remark" allow-create filterable placeholder="">
+              <el-select
+                v-model="inComeFormData.remark"
+                allow-create
+                filterable
+                placeholder=""
+              >
                 <el-option
                   v-for="item in use_fundsData"
                   :key="item.value"
@@ -390,7 +395,7 @@ export default {
     this.business("use_funds"); //备注字典
     this.business("payment_methods"); //支付方式字典
     this.business("nature_business"); //营业性质字典
-    this.getTreeList();//获取资金用途字典
+    this.getTreeList(); //获取资金用途字典
   },
   mounted() {},
   data() {
@@ -413,7 +418,7 @@ export default {
         remark: "", //备注
         company: "", //转账方
         payMethod: [], //转账方
-        fundUse:'',//资金用途
+        fundUse: "", //资金用途
       },
       inComeFormRules: {
         //收入规则
@@ -674,7 +679,7 @@ export default {
         juridicalPerson: "", //法人
         owned: "", //所属地
         biller: "", //开票员
-        tentativeEstimates: '', //暂估值
+        tentativeEstimates: "", //暂估值
       },
       //账户卡信息form
       accountCardFormData: {
@@ -1088,7 +1093,7 @@ export default {
           // invoicingAmountExcess:0,//剩余开票额度
           juridicalPerson: "", //法人
           owned: "", //所属地
-          tentativeEstimates: '', //暂估值
+          tentativeEstimates: "", //暂估值
         };
       } else {
         this.accountCardFormData = {
@@ -1135,10 +1140,19 @@ export default {
         })
         .then((res) => {
           if (res.code == 200) {
-            res.data[0].certExpirationDate = [
-              res.data[0].startCertExpirationDate,
-              res.data[0].endCertExpirationDate,
-            ];
+            if (
+              res.data[0].startCertExpirationDate &&
+              res.data[0].startCertExpirationDate != null &&
+              res.data[0].endCertExpirationDate &&
+              res.data[0].endCertExpirationDate != null
+            ) {
+              res.data[0].certExpirationDate = [
+                res.data[0].startCertExpirationDate,
+                res.data[0].endCertExpirationDate,
+              ];
+            }else{
+              res.data[0].certExpirationDate = [];
+            }
             this.accountCardFormData = res.data[0];
             this.accountCardFormData.outerFlag = row.outerFlag;
             this.dialogFormVisible = true;

+ 67 - 37
src/views/FinancialManagement/ExpenseManagement/PaymentManagement.vue

@@ -69,9 +69,16 @@
         @click="addPayment"
         >开票新增</el-button
       >
-      <!-- <el-button  size="medium" @click="look=!look">查看合计</el-button> -->
+      <el-button
+        class="operation"
+        type="primary"
+        plain
+        size="medium"
+        @click="expentData"
+        >导出</el-button
+      >
       <!-- 合计 -->
-      <div v-show="look" style="margin-top: 20px">
+      <div style="margin-top: 20px">
         <el-descriptions title="" size="mini" border>
           <el-descriptions-item label="开票金额总和">{{
             allNumObj.invoiceMoneySum
@@ -181,7 +188,7 @@
                 <el-form-item label="开票金额" prop="invoiceMoney">
                   <el-input-number
                     v-model="formData.invoiceMoney"
-                    :min="0"
+                    :min="1"
                     :max="99999999999999999"
                     label=""
                   ></el-input-number>
@@ -200,26 +207,16 @@
                 </el-form-item>
               </el-col>
               <el-col class="invoic" :span="12">
-                <el-form-item label="开票科目" prop="invoiceSubjects">
+                <el-form-item label="开票科目" prop="invoiceSubjectsValue">
                   <el-input
                     v-model="formData.invoiceSubjects1"
                     autocomplete="off"
                   ></el-input>
+                  <span>*</span>
                   <el-input
                     v-model="formData.invoiceSubjects2"
                     autocomplete="off"
                   ></el-input>
-                  <!-- <el-select
-                  v-model="formData.invoiceSubjects"
-                  placeholder="请选择开票科目"
-                >
-                  <el-option
-                    v-for="(item, index) in subjectsData"
-                    :key="index + 'kpkm'"
-                    :label="item.label"
-                    :value="item.value"
-                  ></el-option>
-                </el-select> -->
                 </el-form-item>
               </el-col>
             </el-row>
@@ -272,29 +269,18 @@
                   </el-select>
                 </el-form-item>
               </el-col>
-              <el-col :span="12">
-                <el-form-item label="进账日期" prop="payoutTime">
-                  <el-date-picker
-                    v-model="formData.payoutTime"
-                    type="date"
-                    value-format="yyyy-MM-dd"
-                    placeholder="选择日期"
-                  >
-                  </el-date-picker>
-                </el-form-item>
-              </el-col>
-            </el-row>
-            <el-row>
               <el-col :span="12">
                 <el-form-item label="税率(%)" prop="rate">
                   <el-input-number
                     v-model="formData.rate"
                     :min="0"
-                    :max="99999999999999999"
+                    :max="60"
                     label=""
                   ></el-input-number>
                 </el-form-item>
               </el-col>
+            </el-row>
+            <el-row>
               <el-col :span="12">
                 <el-form-item label="备注" prop="remark">
                   <el-select
@@ -321,12 +307,25 @@
                 <el-form-item label="进账金额" prop="payoutMoney">
                   <el-input-number
                     v-model="formData.payoutMoney"
-                    :min="0"
+                    :min="1"
                     :max="99999999999999999"
                     label=""
                   ></el-input-number>
                 </el-form-item>
               </el-col>
+              <el-col :span="12">
+                <el-form-item label="进账日期" prop="payoutTime">
+                  <el-date-picker
+                    v-model="formData.payoutTime"
+                    type="date"
+                    value-format="yyyy-MM-dd"
+                    placeholder="选择日期"
+                  >
+                  </el-date-picker>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
               <el-col :span="12">
                 <el-form-item label="支付方式" prop="payMethod">
                   <el-select
@@ -344,8 +343,6 @@
                   </el-select>
                 </el-form-item>
               </el-col>
-            </el-row>
-            <el-row>
               <el-col :span="12">
                 <el-form-item label="资金用途" prop="fundUse">
                   <el-cascader
@@ -382,7 +379,7 @@
         <script>
 import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
 import KtButton from "@/views/Core/KtButton"; // 按钮权限组件
-import { toChies } from "../../../utils/moneyTransition";
+import { toChies } from "../../../utils/moneyTransition"; //金额小写转大写
 
 export default {
   name: "InvoiceInformation",
@@ -398,8 +395,15 @@ export default {
     this.getAllUser();
   },
   data() {
+    let invoiceSubjectsRules = (rule, value, callback) => {
+      console.log(this.formData.invoiceSubjects1);
+      if (!this.formData.invoiceSubjects1 || !this.formData.invoiceSubjects2) {
+        callback(new Error("开票科目不能为空!"));
+      } else {
+        callback();
+      }
+    };
     return {
-      look:true,
       allNumObj: {}, //合计对象
       subjectsData: [], //开票科目数据
       invoice_typeData: [], //发票类型数据
@@ -532,8 +536,8 @@ export default {
         invoiceSubjects1: [
           { required: true, message: "开票科目不能为空", trigger: "change" },
         ],
-        invoiceSubjects2: [
-          { required: true, message: "开票科目不能为空", trigger: "change" },
+        invoiceSubjectsValue: [
+          { validator: invoiceSubjectsRules, trigger: "blur" },
         ],
         invoiceType: [
           { required: true, message: "请选择发票类型", trigger: "blur" },
@@ -599,6 +603,29 @@ export default {
     },
   },
   methods: {
+    //导出开票记录
+    expentData() {
+      let params = {
+       ...JSON.parse(JSON.stringify(this.pageRequest))
+      };
+      delete params.pageNo;
+      delete params.pageSize;
+      this.$api.expense.invAccountExcel(params).then((res) => {
+        console.log(res);
+        if (res.code == 200) {
+          let url = process.env.BASE_URL + "/upload/" + res.data; // 3.创建一个临时的url指向blob对象
+          // 4.创建url之后可以模拟对此文件对象的一系列操作,例如:预览、下载
+          let a = document.createElement("a");
+          a.href = url;
+          a.download = "导出订单.xlsx";
+          a.click();
+          // 5.释放这个临时的对象url
+          window.URL.revokeObjectURL(url);
+        } else {
+          this.$message.error(res.msg);
+        }
+      });
+    },
     //获取资金用途树数据
     getTreeList() {
       this.$api.expense.getAccountExpensesTreeList().then((res) => {
@@ -697,6 +724,7 @@ export default {
                 params.otherUnit + "→" + this.formData.invoiceBy.nameValue, //资金流向
               payMethod: params.payMethod.join(","), //支付方式
               fundUse: params.fundUse[params.fundUse.length - 1], //资金用途
+              payoutTime: params.payoutTime, //进账日期
             };
             this.$api.expense.putInvAccountIncoice(obj).then((res) => {
               if (res.code == 200) {
@@ -713,6 +741,8 @@ export default {
               params.invoiceSubjects1 + "*" + params.invoiceSubjects2; //开票科目
             params.otherUnit = params.otherUnit.nameValue; //对方单位名称
             params.company = params.otherUnit; //单位
+            delete params.payMethod;
+            delete params.payoutTime;
             this.$api.expense.addInvAccountIncoice(params).then((res) => {
               if (res.code == 200) {
                 this.detailDialog = false;
@@ -925,7 +955,7 @@ export default {
   width: 100%;
 }
 .invoic >>> .el-input {
-  width: auto;
+  width: 45%;
 }
 </style>
         

+ 2 - 2
src/views/Letter/Letter.vue

@@ -1285,7 +1285,7 @@
                   v-show="reslistitem.orderstatus == '2'&&  !('editStatus' in reslistitem.result)"
                   type="text"
                   style="color:rgb(240, 12, 10)"
-                  @click="Payment(reslistitem.result.companyId)"
+                  @click="Payment(reslistitem.result.companyId,reslistitem.namesimple)"
                 >付款码</el-button>
                 <el-tooltip class="item" effect="dark" content="上年信息" placement="top">
                   <i
@@ -3361,7 +3361,7 @@
           style="width: 100px;"
           type="primary"
           size="small"
-          @click="Payment(companyId)"
+          @click="Payment(companyId,queryOrders.inscompany)"
         >缴费二维码</el-button>
       </span>
     </el-dialog>