Преглед на файлове

Merge branch 'master' into new_version

lihongxiao преди 2 години
родител
ревизия
b2a92736b2

+ 1 - 1
src/http/moudules/expense.js

@@ -137,7 +137,7 @@ export const getAccountExcelById = (id) => {
 //新增费用申请数据
 export const insert = (data) => {
     return axios({
-        url: '/accountExcel/invert',
+        url: '/accountExcel/insert',
         method: "post",
         data
     })

+ 105 - 5
src/http/moudules/insCompany.js

@@ -309,14 +309,18 @@ export const getPtlInsAttributionTemplate = (data) => {
     })
 }
 /** 归属模版模块 */
-//协议产品费用查询
-export const productCostQuery = (agreementId) => {
+
+
+/** 协议产品费用 */
+//查询
+export const productCostQuery = (data) => {
   return axios({
-      url: '/plt/agreement/getProduct?agreementId='+agreementId,
-      method: "get",
+      url: '/plt/agreement/getProduct',
+      method: "post",
+      data
   })
 }
-//协议产品费用添加
+//添加
 export const productCostSave = (data) => {
   return axios({
       url: '/plt/agreement/productSave',
@@ -324,6 +328,102 @@ export const productCostSave = (data) => {
       data
   })
 }
+//修改
+export const productCostUpdate = (data) => {
+  return axios({
+      url: '/plt/agreement/productUpdate',
+      method: "post",
+      data
+  })
+}
+//删除
+export const productCostDelete = (id) => {
+  return axios({
+      url: '/plt/agreement/productDelete?id='+id,
+      method: "get",
+  })
+}
+//历史记录
+export const productCostHistory = (data) => {
+  return axios({
+      url: '/plt/agreementhistory/costsHistoryPage',
+      method: "post",
+      data
+  })
+}
+/** 协议产品费用 */
+
 
 
+/** 协议承保规则 */
+//查询
+export const getUndwrtRulesQuery = (data) => {
+  return axios({
+      url: '/plt/agreement/getUndwrtRules',
+      method: "post",
+      data
+  })
+}
+//添加
+export const undwrtRulesSaveCostSave = (data) => {
+  return axios({
+      url: '/plt/agreement/undwrtRulesSave',
+      method: "post",
+      data
+  })
+}
+//修改
+export const undwrtRulesUpdate = (data) => {
+  return axios({
+      url: '/plt/agreement/undwrtRulesUpdate',
+      method: "post",
+      data
+  })
+}
+//删除
+export const undwrtRulesDelete = (data) => {
+  return axios({
+      url: '/plt/agreement/undwrtRulesDelete',
+      method: "post",
+      data
+  })
+}
+//历史记录
+export const undwrtRulesHistoryPage = (data) => {
+  return axios({
+      url: '/plt/agreementhistory/rulesHistoryPage',
+      method: "post",
+      data
+  })
+}
+/** 协议承保规则 */
+
+/** 协议非车产品费用 */
+//查询
+export const getNonCarProductQuery = (agreementId) => {
+  return axios({
+      url: '/plt/agreement/getNonCarProduct?agreementId='+agreementId,
+      method: "get",
+  })
+}
+//添加
+export const nonCarProductCostSave = (data) => {
+  return axios({
+      url: '/plt/agreement/nonCarProductSave',
+      method: "post",
+      data
+  })
+}
+/** 协议非车产品费用 */
+
+
+//协议历史记录
+export const agreementHistory = (data) => {
+  return axios({
+      url: '/plt/agreementhistory/agreementHistoryPage',
+      method: "post",
+      data
+  })
+}
+
 

Файловите разлики са ограничени, защото са твърде много
+ 518 - 341
src/views/AgreementManage/CarInsurance/AgreementEntry.vue


+ 43 - 152
src/views/Core/KtCommonTable.vue

@@ -1,128 +1,46 @@
 <template>
   <div style="position: relative" ref="commonTable">
     <!--表格栏-->
-    <el-table
-      id="commonTable"
-      ref="doLayout"
-      :data="data.content"
-      :highlight-current-row="highlightCurrentRow"
-      @selection-change="selectionChange"
-      @row-click="rowClick"
-      @current-change="handleCurrentChange"
-      :element-loading-text="$t('action.loading')"
-      :border="border"
-      :stripe="stripe"
-      :show-summary="showSummary"
-      :summary-method="getSummaries"
-      :show-overflow-tooltip="showOverflowTooltip"
-      :height="tableHeight"
-      :size="size"
-      :align="align"
-      :header-cell-style="{
+    <el-table id="commonTable" ref="doLayout" :data="data.content" :highlight-current-row="highlightCurrentRow"
+      @selection-change="selectionChange" @row-click="rowClick" @current-change="handleCurrentChange"
+      :element-loading-text="$t('action.loading')" :border="border" :stripe="stripe" :show-summary="showSummary"
+      :summary-method="getSummaries" :show-overflow-tooltip="showOverflowTooltip" :height="tableHeights? tableHeights:tableHeight" :size="size"
+      :align="align" :header-cell-style="{
         background: '#F2F7FC',
         fontWeight: '900',
         color: '#606266',
-      }"
-      style="width: 100%"
-      :row-class-name="tableRowClassName"
-    >
-      <el-table-column
-        type="selection"
-        width="50"
-        fixed
-        align="center"
-        v-if="showBatchDelete || showBatchSettled || showBatchPrint"
-      ></el-table-column>
-      <el-table-column
-        v-if="SerialShow"
-        label="序号"
-        type="index"
-        width="50"
-        align="center"
-      ></el-table-column>
+      }" style="width: 100%" :row-class-name="tableRowClassName">
+      <el-table-column type="selection" width="50" fixed align="center"
+        v-if="showBatchDelete || showBatchSettled || showBatchPrint"></el-table-column>
+      <el-table-column v-if="SerialShow" label="序号" type="index" width="50" align="center"></el-table-column>
       <template v-for="column in columns">
-        <el-table-column
-          header-align="center"
-          align="center"
-          :prop="column.prop"
-          :label="column.label"
-          :width="column.width"
-          :min-width="column.minWidth"
-          :fixed="column.fixed"
-          :key="column.prop"
-          :type="column.type"
-          :formatter="column.formatter"
-          :sortable="column.sortable ? column.sortable : false"
-          v-if="column.signIcon || column.isImg || column.isBtn"
-        >
+        <el-table-column header-align="center" align="center" :prop="column.prop" :label="column.label"
+          :width="column.width" :min-width="column.minWidth" :fixed="column.fixed" :key="column.prop" :type="column.type"
+          :formatter="column.formatter" :sortable="column.sortable ? column.sortable : false"
+          v-if="column.signIcon || column.isImg || column.isBtn">
           <template slot-scope="scope">
-            <el-switch
-              :disabled="column.isDisabled"
-              v-if="column.signIcon"
-              v-model="scope.row[column.prop]"
-              active-value="1"
-              inactive-value="0"
-              @change="signStateChanged(scope.$index, scope.row)"
-            ></el-switch>
-            <img
-              v-if="column.isImg"
-              :width="column.imgWidth"
-              :height="column.imgHeight"
-              :src="scope.row[column.prop]"
-            />
-            <kt-button
-              v-if="column.isBtn"
-              icon="fa fa-edit"
-              :label="column.btnName"
-              :size="size"
-              :perms="column.permsEdit"
-              @click="handleBtnEdit(scope.$index, scope.row)"
-            />
+            <el-switch :disabled="column.isDisabled" v-if="column.signIcon" v-model="scope.row[column.prop]"
+              active-value="1" inactive-value="0" @change="signStateChanged(scope.$index, scope.row)"></el-switch>
+            <img v-if="column.isImg" :width="column.imgWidth" :height="column.imgHeight" :src="scope.row[column.prop]" />
+            <kt-button v-if="column.isBtn" icon="fa fa-edit" :label="column.btnName" :size="size"
+              :perms="column.permsEdit" @click="handleBtnEdit(scope.$index, scope.row)" />
           </template>
         </el-table-column>
-        <el-table-column
-          header-align="center"
-          align="center"
-          :prop="column.prop"
-          :label="column.label"
-          :width="column.width"
-          :min-width="column.minWidth"
-          :fixed="column.fixed"
-          :key="column.prop"
-          :type="column.type"
-          :formatter="column.formatter"
-          :sortable="column.sortable ? column.sortable : false"
-          v-else
-        >
+        <el-table-column header-align="center" align="center" :prop="column.prop" :label="column.label"
+          :width="column.width" :min-width="column.minWidth" :fixed="column.fixed" :key="column.prop" :type="column.type"
+          :formatter="column.formatter" :sortable="column.sortable ? column.sortable : false" v-else>
           <template v-for="columnchildren in column.children">
-            <el-table-column
-              v-if="columnchildren"
-              header-align="center"
-              align="center"
-              :prop="columnchildren.prop"
-              :label="columnchildren.label"
-              :width="columnchildren.width"
-              :min-width="columnchildren.minWidth"
-              :fixed="columnchildren.fixed"
-              :key="columnchildren.prop"
-              :type="columnchildren.type"
-              :formatter="columnchildren.formatter"
-              :sortable="
-                columnchildren.sortable == null ? true : columnchildren.sortable
-              "
-            >
+            <el-table-column v-if="columnchildren" header-align="center" align="center" :prop="columnchildren.prop"
+              :label="columnchildren.label" :width="columnchildren.width" :min-width="columnchildren.minWidth"
+              :fixed="columnchildren.fixed" :key="columnchildren.prop" :type="columnchildren.type"
+              :formatter="columnchildren.formatter" :sortable="columnchildren.sortable == null ? true : columnchildren.sortable
+                ">
             </el-table-column>
           </template>
         </el-table-column>
       </template>
-      <el-table-column
-        :label="$t('action.operation')"
-        :width="operationWidth"
-        fixed="right"
-        v-if="showOperation"
-        header-align="center"
-        align="center"
-      >
+      <el-table-column :label="$t('action.operation')" :width="operationWidth" fixed="right" v-if="showOperation"
+        header-align="center" align="center">
         <template slot-scope="scope">
           <kt-button
             type="primary"
@@ -200,49 +118,19 @@
     <!--分页栏-->
     <!-- 底部分页 -->
     <div class="bottomFixed" ref="bottomFixed">
-      <kt-button
-        class="debutton"
-        :label="$t('action.batchDelete')"
-        :perms="permsDelete"
-        :size="size"
-        type="danger"
-        @click="handleBatchDelete()"
-        :disabled="selections.length === 0"
-        style="float: left"
-        v-if="showBatchDelete & showOperation"
-      />
-      <kt-button
-        :label="settledName"
-        :perms="permsDelete"
-        :size="size"
-        type="danger"
-        @click="handleBatchSettled()"
-        :disabled="selections.length === 0"
-        style="float: left"
-        v-if="showBatchSettled"
-      />
+      <kt-button class="debutton" :label="$t('action.batchDelete')" :perms="permsDelete" :size="size" type="danger"
+        @click="handleBatchDelete()" :disabled="selections.length === 0" style="float: left"
+        v-if="showBatchDelete & showOperation" />
+      <kt-button :label="settledName" :perms="permsDelete" :size="size" type="danger" @click="handleBatchSettled()"
+        :disabled="selections.length === 0" style="float: left" v-if="showBatchSettled" />
       <!-- <kt-button label="导出Excel" :perms="permsDelete" :size="size" type="danger" @click="handleBatchPrint()"
         :disabled="selections.length === 0" style="float: left" v-if="showBatchPrint" /> -->
-      <kt-button
-        label="导出Excel"
-        :perms="permsDelete"
-        :size="size"
-        type="danger"
-        @click="handleBatchPrint()"
-        style="float: left"
-        v-if="showBatchPrint"
-      />
-      <el-pagination
-        @size-change="handleSizeChange"
-        layout="total, sizes, prev, pager, next, jumper"
-        @current-change="refreshPageRequest"
-        :current-page="data.pageNum"
-        :page-size="data.pageSize"
-        :page-sizes="[10, 20, 50, 100, 200, 300, 400, 500]"
-        :total="data.totalSize"
-        style="float: left; margin-left: 20px"
-        v-if="isshowpagination"
-      >
+      <kt-button label="导出Excel" :perms="permsDelete" :size="size" type="danger" @click="handleBatchPrint()"
+        style="float: left" v-if="showBatchPrint" />
+      <el-pagination @size-change="handleSizeChange" layout="total, sizes, prev, pager, next, jumper"
+        @current-change="refreshPageRequest" :current-page="data.pageNum" :page-size="data.pageSize"
+        :page-sizes="[10, 20, 50, 100, 200, 300, 400, 500]" :total="data.totalSize" style="float: left; margin-left: 20px"
+        v-if="isshowpagination">
       </el-pagination>
     </div>
   </div>
@@ -256,6 +144,9 @@ export default {
     KtButton,
   },
   props: {
+    tableHeights:{
+      type: Number,
+    },
     operationWidth: {
       type: Number,
       default: 200,
@@ -643,7 +534,7 @@ export default {
             callback: callback,
           });
         })
-        .catch(() => {});
+        .catch(() => { });
     },
     //批量结算
     handleBatchSettled: function () {

+ 39 - 11
src/views/FinancialManagement/ExpenseManagement/ExpenseApplyFor.vue

@@ -5,10 +5,10 @@
       <el-form
         v-model="queryFrom"
         size="small"
-        label-width="95px"
+        label-width="120px"
         class="query-form"
       >
-        <el-form-item label="转账状态" label-width="95px" prop="transferFlag">
+        <el-form-item label="转账状态" prop="transferFlag">
           <el-select
             v-model="queryFrom.transferFlag"
             placeholder="请选择转账状态"
@@ -18,7 +18,7 @@
             <el-option label="未转账" value="1"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="申请人" label-width="95px" prop="applicant">
+        <el-form-item label="申请人" prop="applicant">
           <el-input
             v-model="queryFrom.applicant"
             placeholder="请输入申请人"
@@ -26,7 +26,7 @@
             clearable
           ></el-input>
         </el-form-item>
-        <el-form-item label="申请部门" label-width="95px" prop="applySector">
+        <el-form-item label="申请部门" prop="applySector">
           <el-input
             v-model="queryFrom.applySector"
             placeholder="请输入申请部门"
@@ -34,14 +34,33 @@
             clearable
           ></el-input>
         </el-form-item>
-        <el-form-item label="申请日期" label-width="95px" prop="applyTime">
+        <el-form-item label="申请日期" prop="applyTime">
           <el-date-picker
             v-model="queryFrom.applyTime"
-            type="date"
-            placeholder="选择日期"
+            type="daterange"
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            value-format="yyyy-MM-dd"
           >
           </el-date-picker>
         </el-form-item>
+        <el-form-item label="单位" prop="company">
+          <el-input
+            v-model="queryFrom.company"
+            placeholder="请输入单位"
+            class="widths"
+            clearable
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="收款单位信息" prop="collectionMessage">
+          <el-input
+            v-model="queryFrom.collectionMessage"
+            placeholder="请输入收款单位信息"
+            class="widths"
+            clearable
+          ></el-input>
+        </el-form-item>
         <el-form-item>
           <el-button type="primary" size="small" @click="queryStaffInfo"
             >查询</el-button
@@ -771,6 +790,8 @@ export default {
     },
     //搜索列表功能
     queryStaffInfo() {
+      this.pageRequest.pageNo = 1
+      this.pageRequest.pageSize = 20
       this.findPage();
     },
     //查询列表
@@ -779,7 +800,12 @@ export default {
         this.pageRequest.pageNo = data.pageRequest.pageNum;
         this.pageRequest.pageSize = data.pageRequest.pageSize;
       }
-      let obj = { ...this.queryFrom, ...this.pageRequest };
+      let obj = JSON.parse(JSON.stringify({ ...this.queryFrom, ...this.pageRequest }))
+      if (obj.applyTime!=null&&obj.applyTime.length>0) {
+        obj.applyTimeStart = obj.applyTime[0];
+        obj.applyTimeEnd= obj.applyTime[1];
+      }
+      delete obj.applyTime;
       this.$api.expense
         .getAccountExcel(obj)
         .then((res) => {
@@ -920,8 +946,9 @@ export default {
                   it.bankCardNum +
                   "   " +
                   it.bank;
-                it.nameValue =
-                  item.accountName + "   " + it.bankCardNum + "   " + it.bank;
+                it.nameValue =it.name
+                // it.nameValue =
+                //   item.accountName + "   " + it.bankCardNum + "   " + it.bank;
               });
               arr.push(...item.invAccountCardList);
               //获取全部内部用户
@@ -989,7 +1016,7 @@ export default {
             params.entProfit[item.profitEng] = item.profit;
           });
           this.affiliationData2.forEach((item) => {
-            params.outProfit[item.profitEng] = item.profit;
+            params.outProfit[item.profitEng] = item.profit*-1;
           });
           //转化资金归属
           if (this.expendDataId) {
@@ -1065,6 +1092,7 @@ export default {
   display: flex;
   align-items: center;
   margin-top: 14px;
+  flex-wrap: wrap;
 }
 .td-title,
 .demo-tableForm >>> .el-form-item__label {

+ 4 - 3
src/views/FinancialManagement/ExpenseManagement/ExpenseManagement.vue

@@ -910,8 +910,9 @@ export default {
                   it.bankCardNum +
                   "   " +
                   it.bank;
-                it.nameValue =
-                  item.accountName + "   " + it.bankCardNum + "   " + it.bank;
+                it.nameValue = it.name
+                // it.nameValue =
+                //   item.accountName + "   " + it.bankCardNum + "   " + it.bank;
               });
               arr.push(...item.invAccountCardList);
             }
@@ -949,7 +950,7 @@ export default {
         obj.entProfit[item.profitEng] = item.profit;
       });
       this.affiliationData2.forEach((item) => {
-        obj.outProfit[item.profitEng] = item.profit;
+        obj.outProfit[item.profitEng] = item.profit*-1;
       });
       //转化资金归属
       this.$refs.inComeFormData.validate((valid) => {

+ 33 - 50
src/views/FinancialManagement/ExpenseManagement/PaymentManagement.vue

@@ -50,10 +50,13 @@
         <el-form-item label="开票日期" label-width="95px" prop="invoiceTime">
           <el-date-picker
             v-model="pageRequest.invoiceTime"
+            type="daterange"
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
             value-format="yyyy-MM-dd"
-            type="date"
-            placeholder="选择开票日期"
-          ></el-date-picker>
+          >
+          </el-date-picker>
         </el-form-item>
         <el-form-item
           ><el-button type="primary" size="small" @click="queryStaffInfo"
@@ -191,7 +194,7 @@
                 <el-form-item label="开票金额" prop="invoiceMoney">
                   <el-input-number
                     v-model="formData.invoiceMoney"
-                    :min="1"
+                    :min="-99999999999999999"
                     :max="99999999999999999"
                     label=""
                   ></el-input-number>
@@ -356,43 +359,9 @@
                       checkStrictly: false,
                     }"
                   ></el-cascader>
-                  <!-- <el-select
-                    v-model="formData.fundUse"
-                    placeholder=""
-                  >
-                    <el-option
-                      v-for="item in fundFlowData"
-                      :key="item.value"
-                      :label="item.category"
-                      :value="item.category"
-                    >
-                    </el-option>
-                  </el-select> -->
                 </el-form-item>
               </el-col>
             </el-row>
-            <!-- <el-row>
-              <el-col :span="12">
-                <el-form-item label="资金用途分项" prop="fundFen">
-                  <el-cascader
-                    v-model="formData.fundFen"
-                    :show-all-levels="false"
-                    :clearable="true"
-                    :checkStrictly="true"
-                    :emitPath="false"
-                    placeholder=""
-                    :options="fundFlowData"
-                    filterable
-                    :props="{
-                      children: 'child',
-                      label: 'category',
-                      value: 'category',
-                      checkStrictly: false,
-                    }"
-                  ></el-cascader>
-                </el-form-item>
-              </el-col>
-            </el-row> -->
             <el-row>
               <el-col :span="12" style="text-align: center"
                 ><h3>收入方资金归属(%)</h3>
@@ -664,7 +633,7 @@ export default {
           outBankCardNum: "", //支出卡号
           biller: "", //开票员
           invoiceBy: "", //开票方
-          invoiceMoney: "", //开票金额
+          invoiceMoney: 0, //开票金额
           invoiceNum: 1, //发票数
           invoiceSubjects: "", //开票科目
           invoiceTime: "", //开票日期
@@ -811,8 +780,9 @@ export default {
                   it.bankCardNum +
                   "   " +
                   it.bank;
-                it.nameValue =
-                  it.accountName + "   " + it.bankCardNum + "   " + it.bank;
+                it.nameValue = it.name
+                // it.nameValue =
+                //   it.accountName + "   " + it.bankCardNum + "   " + it.bank;
                 arr.push(it);
               });
             }
@@ -854,13 +824,16 @@ export default {
               params.entProfit[item.profitEng] = item.profit;
             });
             this.affiliationData2.forEach((item) => {
-              params.outProfit[item.profitEng] = item.profit;
+              params.outProfit[item.profitEng] = item.profit * -1;
             });
             //转化资金归属
             let obj = {
               invoiceId: this.formDataId, //id
               payoutMoney: this.formData.payoutMoney, //进账金额
-              fundFlow: params.otherUnit.nameValue + "→" + this.formData.invoiceBy.nameValue, //资金流向
+              fundFlow:
+                params.otherUnit.nameValue +
+                "→" +
+                this.formData.invoiceBy.nameValue, //资金流向
               payMethod: params.payMethod.join(","), //支付方式
               fundUse: this.formData.fundUse[this.formData.fundUse.length - 2], //资金用途
               fundFen: this.formData.fundUse[this.formData.fundUse.length - 1], //资金用途分项
@@ -879,7 +852,7 @@ export default {
             //编辑
           } else if (this.formDataId && this.typeStatus == 1) {
             params.invoiceBy = this.formData.invoiceBy.nameValue; //开票方
-            params.bigApplyAmount = toChies(params.invoiceMoney); //大写金额
+            // params.bigApplyAmount = toChies(params.invoiceMoney); //大写金额
             params.invoiceSubjects =
               params.invoiceSubjects1 + "*" + params.invoiceSubjects2; //开票科目
             params.otherUnit = params.otherUnit.nameValue; //对方单位名称
@@ -897,7 +870,7 @@ export default {
             //新增
           } else {
             params.invoiceBy = this.formData.invoiceBy.nameValue; //开票方
-            params.bigApplyAmount = toChies(params.invoiceMoney); //大写金额
+            // params.bigApplyAmount = toChies(params.invoiceMoney); //大写金额
             params.invoiceSubjects =
               params.invoiceSubjects1 + "*" + params.invoiceSubjects2; //开票科目
             params.otherUnit = params.otherUnit.nameValue; //对方单位名称
@@ -948,6 +921,10 @@ export default {
     handleDetail(index, type) {
       this.typeStatus = type;
       let row = index.row;
+      if (row.invoiceMoney < 0) {
+        this.$message.error("对冲票据,无法进账");
+        return;
+      }
       this.formDataId = row.invoiceId;
       this.title = type == 1 ? "开票编辑" : "开票进账";
       this.getDetailData(row.invoiceId);
@@ -970,8 +947,8 @@ export default {
             res.data.otherUnit = obj2;
           }
           if (this.typeStatus == 1) {
-            res.data.invoiceSubjects1 = res.data.invoiceSubjects.split('*')[0]
-            res.data.invoiceSubjects2 = res.data.invoiceSubjects.split('*')[1]
+            res.data.invoiceSubjects1 = res.data.invoiceSubjects.split("*")[0];
+            res.data.invoiceSubjects2 = res.data.invoiceSubjects.split("*")[1];
           }
           this.formData = JSON.parse(JSON.stringify(res.data));
         } else {
@@ -986,12 +963,18 @@ export default {
         this.pageRequest.pageNo = data.pageRequest.pageNum;
         this.pageRequest.pageSize = data.pageRequest.pageSize;
       }
+      let params = JSON.parse(JSON.stringify(this.pageRequest));
+      if (params.invoiceTime != null && params.invoiceTime.length > 0) {
+        params.invoiceTimeStart = params.invoiceTime[0];
+        params.invoiceTimeEnd = params.invoiceTime[1];
+      }
+      delete params.invoiceTime;
       this.$api.expense
-        .getInvAccountIncoice(this.pageRequest)
+        .getInvAccountIncoice(params)
         .then((res) => {
           if (res.code == 200) {
             res.data.records.forEach((item) => {
-              item.clearFlagName = item.clearFlag==0?'未清':'已清'
+              item.clearFlagName = item.clearFlag == 0 ? "未清" : "已清";
               item.invoiceTypeName = this.businessZh(
                 this.invoice_typeData,
                 item.invoiceType,
@@ -1004,7 +987,7 @@ export default {
                   ).label
                 : "";
             });
-           
+
             this.pageResult = {
               content: res.data.records,
               pageNum: res.data.current,

+ 10 - 1
src/views/FinancialManagement/ExpenseManagement/ReportViewing.vue

@@ -48,7 +48,7 @@
       :showBatchDelete="false"
       :showOperation="false"
       @findPage="findPage"
-      :isshowpagination="false"
+      :isshowpagination="true"
     ></kt-common-table>
   </div>
 </template>
@@ -92,6 +92,8 @@ export default {
         return
       }
       this.showStatus = false;
+      this.pageRequest.pageNo = 1;
+      this.pageRequest.pageSize = 20;
       this.findPage();
     },
     /**
@@ -119,6 +121,13 @@ export default {
               });
             });
             this.pageResult.content = res.data.maps;
+            this.pageResult = {
+            content: res.data.maps,
+            pageNo: res.data.current,
+            pageSize: res.data.pageSize,
+            totalPages: res.data.pageNo,
+            totalSize: res.data.total,
+          };
           } else {
             this.$message.error(res.msg);
           }

+ 0 - 735
src/views/FinancialManagement/InvoiceAmount.vue

@@ -1,735 +0,0 @@
-<template>
-  <!--布局容器-->
-  <div class="container" style="width: 99%; margin-top: 0px">
-    <!-- 顶部查询 -->
-    <el-row class="top">
-      <el-form v-model="queryFrom" size="small" label-width="95px" class="form">
-        <el-form-item label="选择日期">
-          <el-date-picker
-            v-model="queryFrom.value1"
-            size="small"
-            type="daterange"
-            range-separator="至"
-            start-placeholder="起开票日期"
-            end-placeholder="止开票日期"
-            value-format="yyyy-MM-dd"
-          >
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="营业性质" label-width="95px" prop="qualityId">
-          <el-select
-            v-model="queryFrom.qualityId"
-            placeholder="请选择营业性质"
-            clearable
-          >
-            <el-option
-              v-for="item in natureBusinessList"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-
-        <el-form-item label="企业名称" label-width="95px" prop="invCompanyName">
-          <el-select
-            v-model="queryFrom.enterpriseId"
-            placeholder="请选择企业"
-            clearable
-            @change="changeEnterprise"
-          >
-            <el-option
-              v-for="item in enterpriseNameList"
-              :key="item.id"
-              :label="item.enterpriseName"
-              :value="item.id"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item>
-          <el-button type="primary" size="small" @click="queryStaffInfo"
-            >查询</el-button
-          >
-        </el-form-item>
-      </el-form>
-    </el-row>
-    <!-- 新增 -->
-    <el-button
-      class="operation"
-      type="primary"
-      plain
-      size="medium"
-      @click="addAmount"
-      >新增</el-button
-    >
-
-    <!-- 表格 -->
-    <kt-common-table
-      :operationWidth="operationWidth"
-      class="ktTable"
-      permsEdit="sys:agent:view"
-      ref="dataTable"
-      :data="pageResult"
-      :columns="columns"
-      :showBatchDelete="true"
-      :showOperation="true"
-      editButtonName="修改"
-      :button1Name="button1Name"
-      @handleButton1="handleTableDelete"
-      @findPage="findPage"
-      @handleEdit="handleTableEdit"
-      :isshowpagination="true"
-    ></kt-common-table>
-
-    <!-- 新增弹出框 -->
-    <el-dialog
-      class="dialog"
-      title="新增"
-      :close-on-click-modal="false"
-      :before-close="handleClose"
-      :visible.sync="dialogFormVisible"
-      width=" 770px"
-    >
-      <el-form
-        :model="addform"
-        :rules="rules"
-        ref="addform"
-        label-width="120px"
-        size="small"
-        class="frame"
-      >
-        <el-row>
-          <el-col :span="12">
-            <el-form-item
-              label="营业性质"
-              :label-width="formLabelWidth"
-              prop="qualityId"
-            >
-              <el-select
-                v-model="addform.qualityId"
-                placeholder="请选择营业性质"
-                @change="changeDept"
-              >
-                <el-option
-                  v-for="item in natureBusinessList"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                ></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item
-              label="所属地"
-              :label-width="formLabelWidth"
-              prop="areaName"
-            >
-              <el-input
-                v-model="addform.areaName"
-                autocomplete="off"
-              ></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="12">
-            <el-form-item
-              label="企业名称"
-              :label-width="formLabelWidth"
-              prop="enterpriseName"
-            >
-              <el-input
-                v-model="addform.enterpriseName"
-                autocomplete="off"
-              ></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item
-              label="法人"
-              :label-width="formLabelWidth"
-              prop="legalPerson"
-            >
-              <el-input
-                v-model="addform.legalPerson"
-                autocomplete="off"
-              ></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="12">
-            <el-form-item
-              label="税率(%)"
-              :label-width="formLabelWidth"
-              prop="taxRate"
-            >
-              <el-input-number
-                v-model="addform.taxRate"
-                @change="handleChange"
-                :min="0"
-                :max="10"
-                label="描述文字"
-              ></el-input-number>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12"
-            ><el-form-item label="成立日期" prop="foundDate"
-              ><el-date-picker
-                v-model="addform.foundDate"
-                type="date"
-                placeholder="选择日期"
-                value-format="yyyy-MM-dd"
-              >
-              </el-date-picker>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="12">
-            <el-form-item
-              label="管理员"
-              :label-width="formLabelWidth"
-              prop="管理员"
-            >
-              <el-input v-model="addform.admin" autocomplete="off"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item
-              label="报税限额度(年)"
-              :label-width="formLabelWidth"
-              prop="taxLimit"
-            >
-              <el-input v-model="addform.taxLimit"></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="resetForm('addform')" size="small">取 消</el-button>
-        <el-button type="primary" @click="submitForm('addform')" size="small"
-          >确 定</el-button
-        >
-      </div>
-    </el-dialog>
-    <!-- 修改弹出框 -->
-    <el-dialog
-      class="dialog"
-      title="编辑信息"
-      :close-on-click-modal="false"
-      :visible.sync="dialogForm"
-      width=" 770px"
-    >
-      <el-form
-        :model="editform"
-        :rules="rules"
-        ref="editform"
-        label-width="120px"
-        size="small"
-        class="frame"
-      >
-        <el-row>
-          <el-col :span="12">
-            <el-form-item
-              label="营业性质"
-              :label-width="formLabelWidth"
-              prop="qualityId"
-            >
-              <el-select
-                v-model="editform.qualityId"
-                placeholder="请选择营业性质"
-                @change="changeDept1"
-              >
-                <el-option
-                  v-for="item in natureBusinessList"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                ></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item
-              label="所属地"
-              :label-width="formLabelWidth"
-              prop="areaName"
-            >
-              <el-input
-                v-model="editform.areaName"
-                autocomplete="off"
-              ></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="12">
-            <el-form-item
-              label="企业名称"
-              :label-width="formLabelWidth"
-              prop="enterpriseName"
-            >
-              <el-input
-                v-model="editform.enterpriseName"
-                autocomplete="off"
-              ></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item
-              label="法人"
-              :label-width="formLabelWidth"
-              prop="legalPerson"
-            >
-              <el-input
-                v-model="editform.legalPerson"
-                autocomplete="off"
-              ></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="12">
-            <el-form-item
-              label="税率(%)"
-              :label-width="formLabelWidth"
-              prop="taxRate"
-            >
-              <el-input-number
-                v-model="editform.taxRate"
-                @change="handleChange"
-                :min="0"
-                :max="10"
-                label="描述文字"
-              ></el-input-number>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12"
-            ><el-form-item label="成立日期" prop="foundDate"
-              ><el-date-picker
-                v-model="editform.foundDate"
-                type="date"
-                placeholder="选择日期"
-                value-format="yyyy-MM-dd"
-              >
-              </el-date-picker>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="12">
-            <el-form-item
-              label="管理员"
-              :label-width="formLabelWidth"
-              prop="管理员"
-            >
-              <el-input v-model="editform.admin" autocomplete="off"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item
-              label="报税限额度(年)"
-              :label-width="formLabelWidth"
-              prop="taxLimit"
-            >
-              <el-input v-model="editform.taxLimit"></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="reset('editform')" size="small">取 消</el-button>
-        <el-button type="primary" @click="determine" size="small"
-          >确 定</el-button
-        >
-      </div>
-    </el-dialog>
-  </div>
-</template>
-<script>
-import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
-import KtButton from "@/views/Core/KtButton"; // 按钮权限组件
-import CommonUtil from "@/utils/comutil.js";
-
-export default {
-  name: "InvoiceInformation",
-  components: { KtCommonTable, KtButton },
-  created() {
-    this.business(); //营业性质
-    this.findEnterpriseNameList(); //获取企业下拉框数据
-  },
-  mounted() {},
-  data() {
-    return {
-      operationWidth: 300, //操作列宽度
-      queryFrom: {
-        value1: "",
-        qualityId: "",
-        enterpriseName: "",
-        enterpriseId: "",
-      },
-
-      button1Name: "删除",
-      pageResult: {},
-      pageRequest: {
-        //查询的默认条件
-        startInvoiceDate: "",
-        endInvoiceDate: "",
-        enterpriseId: "", //企业id
-        pageNum: 1,
-        pageSize: 10,
-        qualityId: "", //营业性质
-      },
-      columns: [
-        // 数据列
-        {
-          prop: "qualityName",
-          label: "营业性质",
-          minWidth: 80,
-          sortable: false,
-        },
-
-        { prop: "areaName", label: "所属地", minWidth: 150, sortable: false },
-        {
-          prop: "enterpriseName",
-          label: "企业名称",
-          minWidth: 160,
-          sortable: false,
-        },
-        {
-          prop: "legalPerson",
-          label: "法人",
-          minWidth: 80,
-          sortable: false,
-        },
-        {
-          prop: "taxRate",
-          label: "税率",
-          minWidth: 70,
-          sortable: false,
-        },
-        {
-          prop: "foundDate",
-          label: "成立日期",
-          minWidth: 140,
-          sortable: false,
-        },
-        {
-          prop: "taxLimit",
-          label: "总开票额",
-          minWidth: 80,
-          sortable: false,
-        },
-        {
-          prop: "invoicedMoney",
-          label: "已开票额",
-          minWidth: 80,
-          sortable: false,
-        },
-        {
-          prop: "notInvoicedMoney",
-          label: "未开票额",
-          minWidth: 80,
-          sortable: false,
-        },
-      ],
-      //查询信息
-      checked: false, //选项
-      dialogFormVisible: false, //新增弹出框
-      dialogForm: false, //编辑弹出框
-      formLabelWidth: "120px",
-      num: 1, //发票数
-      addform: {
-        qualityName: "", //营业性质
-        areaName: "", //所属地
-        enterpriseName: "", //企业名称
-        legalPerson: "", //法人
-        taxRate: 0, //税率
-        foundDate: "", //成立日期
-        taxLimit: "", //报税限额度(年)
-        admin: "", //管理员
-        qualityId: "", //营业性质ID
-        enterpriseId: "", //企业名称ID
-      },
-      editform: {
-        qualityName: "", //营业性质
-        areaName: "", //所属地
-        enterpriseName: "", //企业名称
-        legalPerson: "", //法人
-        taxRate: 0, //税率
-        foundDate: "", //成立日期
-        taxLimit: "", //报税限额度(年)
-        admin: "", //管理员
-        qualityId: "", //营业性质ID
-        enterpriseId: "", //企业名称ID
-      },
-      //下拉框数据字典
-      natureBusinessList: [], //营业性质
-      rules: {
-        legalPerson: [
-          { required: true, message: "请输入法人名称", trigger: "blur" },
-          { min: 2, max: 5, message: "长度在 2 到 6 个字符", trigger: "blur" },
-        ],
-        qualityId: [
-          { required: true, message: "请选择营业性质", trigger: "change" },
-        ],
-        areaName: [
-          { required: true, message: "请输入所属地", trigger: "blur" },
-        ],
-        enterpriseName: [
-          { required: true, message: "请输入企业名称", trigger: "blur" },
-        ],
-        foundDate: [
-          {
-            required: true,
-            message: "请选择成立日期",
-            trigger: "change",
-          },
-        ],
-      },
-      id: "",
-      enterpriseNameList: [], //下拉框企业名称集合
-    };
-  },
-  methods: {
-    //获取企业下拉框数据
-    findEnterpriseNameList() {
-      let params = {
-        pageNum: 1,
-        pageSize: 10,
-        startInvoiceDate: "",
-        endInvoiceDate: "",
-        enterpriseId: "", //企业id
-        qualityId: "", //营业性质
-      };
-      this.$api.dict.companyFindPage(params).then((res) => {
-        console.log(res);
-        // this.pageResult = res.data;
-        this.enterpriseNameList = res.data.content;
-      });
-    },
-    findPage(data) {
-      if (data && data.pageRequest) {
-        this.pageRequest.pageNum = data.pageRequest.pageNum;
-        this.pageRequest.pageSize = data.pageRequest.pageSize;
-      }
-      this.$api.dict
-        .companyFindPage(this.pageRequest)
-        .then((res) => {
-          this.pageResult = res.data;
-          // this.enterpriseNameList = res.data.content;
-        })
-        .then(data != null ? data.callback : "");
-    },
-    //营业性质下拉框
-    changeDept(value) {
-      this.natureBusinessList.forEach((item) => {
-        if (item.value == value) {
-          this.addform.qualityId = item.value;
-          this.addform.qualityName = item.label;
-        }
-      });
-    },
-    changeDept1(value) {
-      this.natureBusinessList.forEach((item) => {
-        if (item.value == value) {
-          this.editform.qualityName = item.label;
-        }
-      });
-    },
-    changeEnterprise(value) {},
-    //formatter---营业性质
-    natureBusinessFormatter(row) {
-      let nature_business = row.nature_business;
-      return CommonUtil.getDataName({
-        dataList: this.natureBusinessList,
-        value: "value",
-        label: "label",
-        data: nature_business,
-      });
-    },
-
-    //营业性质数据字典
-    business() {
-      let typeName = "nature_business";
-      this.$api.dict.findByLableName(typeName).then((res) => {
-        this.natureBusinessList = res.data;
-      });
-    },
-    // 查询
-    queryStaffInfo() {
-      if (
-        this.queryFrom.value1 == undefined ||
-        this.queryFrom.value1 == null ||
-        this.queryFrom.value1 == ""
-      ) {
-        (this.pageRequest.startInvoiceDate = ""),
-          (this.pageRequest.endInvoiceDate = "");
-      } else {
-        this.pageRequest.startInvoiceDate = this.queryFrom.value1[0];
-        this.pageRequest.endInvoiceDate = this.queryFrom.value1[1];
-      }
-      this.pageRequest.enterpriseId = this.queryFrom.enterpriseId; //企业名称id
-      this.pageRequest.qualityId = this.queryFrom.qualityId; //营业性质id
-      this.pageRequest.pageNum = 1;
-      this.findPage();
-    },
-    addAmount() {
-      this.dialogFormVisible = true;
-    },
-    handleClose() {
-      this.dialogFormVisible = false;
-      this.$refs.addform.resetFields();
-    },
-    handleTableDelete(index) {
-      // console.log("删除", index);
-      this.$message({ message: "暂不支持删除操作", type: "warning" });
-    },
-    //发票数
-    handleChange() {},
-    //新增取消重置
-    resetForm(addform) {
-      this.dialogFormVisible = false;
-      this.$refs[addform].resetFields();
-    },
-    //修改取消重置
-    reset(editform) {
-      this.dialogForm = false;
-      this.$refs[editform].resetFields();
-    },
-    //修改
-    handleTableEdit(index) {
-      console.log(index);
-      this.id = index.row.id;
-      let data = index.row;
-      this.editform = { ...data };
-      this.dialogForm = true;
-    },
-    //修改提交
-    determine() {
-      this.$refs["editform"].validate((valid) => {
-        if (valid) {
-          let params = {
-            admin: this.editform.admin,
-            areaName: this.editform.areaName,
-            enterpriseName: this.editform.enterpriseName,
-            foundDate: this.editform.foundDate,
-            legalPerson: this.editform.legalPerson,
-            qualityId: this.editform.qualityId,
-            qualityName: this.editform.qualityName,
-            taxLimit: this.editform.taxLimit,
-            taxRate: String(this.editform.taxRate),
-            id: this.id,
-          };
-          console.log(params);
-          this.$api.dict.companySave(params).then((res) => {
-            if (res.code == "200") {
-              this.$message({ message: "修改成功!", type: "success" });
-              this.dialogFormVisible = false;
-            } else {
-              this.$message({
-                message: `修改失败, ${res.msg}`,
-                type: "error",
-              });
-            }
-            this.findPage();
-            this.dialogForm = false;
-          });
-        } else {
-          return false;
-        }
-      });
-    },
-    //提交
-    submitForm(addform) {
-      let params = {
-        admin: this.addform.admin,
-        areaName: this.addform.areaName,
-        enterpriseName: this.addform.enterpriseName,
-        foundDate: this.addform.foundDate,
-        legalPerson: this.addform.legalPerson,
-        qualityId: this.addform.qualityId,
-        qualityName: this.addform.qualityName,
-        taxLimit: this.addform.taxLimit,
-        taxRate: String(this.addform.taxRate),
-      };
-      console.log(params);
-      this.$refs[addform].validate((valid) => {
-        if (valid) {
-          this.$api.dict.companySave(params).then((res) => {
-            if (res.code == 200) {
-              this.$message({
-                message: "添加成功",
-                type: "success",
-              });
-            } else {
-              this.$message({
-                message: `添加失败, ${res.msg}`,
-                type: "error",
-              });
-            }
-            this.dialogFormVisible = false;
-            this.findPage();
-          });
-        } else {
-          return false;
-        }
-      });
-    },
-  },
-};
-</script>
-
-<style scoped>
-.operation {
-  margin-left: 14px !important;
-  margin-top: 15px !important ;
-}
-.form {
-  display: flex;
-  margin-top: 14px;
-  align-items: center;
-  margin-left: -12px;
-  margin-bottom: 20px;
-}
-.el-pagination {
-  font-weight: normal;
-}
-.el-card__body {
-  padding: 12px !important;
-}
-.footer .footerdiv {
-  display: flex;
-  align-items: center;
-}
-.container .el-form-item {
-  margin-bottom: -14px !important;
-}
-.form .el-form-item__label {
-  font-size: 15px !important;
-  font-weight: 600 !important;
-}
-
-.ktTable {
-  margin-top: 20px;
-}
-.el-row {
-  margin-top: 18px;
-}
-.top {
-  margin-top: 0px;
-}
-.el-date-editor--daterange.el-input__inner {
-  width: 300px;
-}
-.frame .el-form-item .el-input {
-  width: 220px;
-}
-.frame .el-form-item .el-select {
-  width: 220px;
-}
-</style>

+ 0 - 842
src/views/FinancialManagement/InvoiceInformation.vue

@@ -1,842 +0,0 @@
-<template>
-  <!--布局容器-->
-  <div class="container" style="width: 99%; margin-top: 0px">
-    <templateTable :formList="formList" :searchData.sync="queryFrom" :tableConfig="tableConfig" :btnGroup="btnGroup"
-      :data="pageResult" @getList="findPage" @handleSearchList="handleSearchList" :pagination="pageData">
-    </templateTable>
-    <!-- 新增弹出框 -->
-    <el-dialog :title="dialogTitle" class="dialog" :close-on-click-modal="false" :before-close="handleClose"
-      :visible.sync="dialogFormVisible" width="900px">
-      <el-form class="frame" :model="dataform" label-width="120px" size="small" :rules="rules" :disabled="isDisabled"
-        ref="dataform">
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="开票日期" prop="invoiceDate"><el-date-picker v-model="dataform.invoiceDate" type="date"
-                placeholder="选择日期" value-format="yyyy-MM-dd">
-              </el-date-picker>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="开票员" prop="invoiceClerk">
-              <el-input v-model="dataform.invoiceClerk" autocomplete="off"></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row type="flex" justify="center">
-          <el-col :span="12">
-            <el-form-item label="开票方" prop="invCompanyId">
-              <el-select v-model="dataform.invCompanyId" placeholder="请选择开票方" @change="invCompanyChange">
-                <el-option v-for="item in invCompanyNameList" :key="item.id" :label="item.enterpriseName"
-                  :value="item.id"></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="开票科目" prop="subjectsId">
-              <el-select v-model="dataform.subjectsId" placeholder="请选择开票科目" @change="changeDept">
-                <el-option v-for="item in subjectstList" :key="item.value" :label="item.label"
-                  :value="item.value"></el-option>
-              </el-select> </el-form-item></el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="对方单位名称" prop="peerCompanyName">
-              <el-input v-model="dataform.peerCompanyName" autocomplete="off"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="发票类型" prop="invoiceType">
-              <el-select v-model="dataform.invoiceType" placeholder="请选择发票类型" @change="invoiceChange">
-                <el-option v-for="item in incoiceList" :key="item.value" :label="item.label"
-                  :value="item.value"></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="开票金额" prop="invoiceAmount">
-              <el-input v-model.trim="dataform.invoiceAmount" autocomplete="off"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="发票号码" prop="invoiceNum">
-              <el-input v-model="dataform.invoiceNum" autocomplete="off"></el-input> </el-form-item></el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="不含税收入" prop="taxExclusivePrice">
-              <el-input disabled v-model="dataform.taxExclusivePrice"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="发票数" prop="invoiceQuantity">
-              <el-input v-model.trim="dataform.invoiceQuantity"></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="税额" prop="taxAmounts">
-              <el-input v-model="dataform.taxAmounts" disabled></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="税率(%)" prop="taxRate">
-              <el-input v-model="dataform.taxRate"></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-
-        <!-- <el-form-item label="备注" prop="remark">
-          <el-input type="textarea" v-model="dataform.remark"></el-input>
-        </el-form-item> -->
-      </el-form>
-      <el-divider v-if="isDisabled"></el-divider>
-      <el-form v-if="isDisabled" class="frame" :model="dataCollection" label-width="120px" size="small"
-        :rules="rulesCollection" :disabled="isWholeDisabled" ref="dataCollection">
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="未进账金额" prop="notIncomeMoney"> <el-input disabled v-model="notIncomeMoney"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="未出账金额" prop="notOutMoney">
-              <el-input disabled v-model="notOutMoney"></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="利润合计" prop="totalProfit"> <el-input disabled v-model="dataCollection.totalProfit"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="已提利润" prop="profitApplied">
-              <el-input v-model="dataCollection.profitApplied"></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="利润点(%)" prop="profitPoint"> <el-input
-                v-model.trim="dataCollection.profitPoint"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="手续费" prop="procedureFee">
-              <el-input v-model.trim="dataCollection.procedureFee"></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-
-        <el-button style="margin-left:30px" type="success" size="small" @click="addIncome()">添加进账</el-button>
-        <el-row v-for="(val, index) in dataCollection.incomeList" :key="index">
-          <el-col :span="10">
-            <el-form-item :label="'进账金额' + (index + 1)" :prop="'incomeList.' + index + '.incomeMoney'"
-              :rules="rulesCollection.incomeMoney"> <el-input v-model="val.incomeMoney"
-                @change="incomeMoneyFun(val.incomeMoney, index)" @input='provingChange($event, "incomeMoney")'></el-input>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="10">
-            <el-form-item :label="'进账日期' + (index + 1)" :prop="'incomeList.' + index + '.incomeDate'">
-              <el-date-picker type="date" size="small" v-model="val.incomeDate" placeholder="选择日期"
-                @input='provingChange($event, "incomeDate")' value-format="yyyy-MM-dd"></el-date-picker>
-            </el-form-item>
-          </el-col>
-          <el-col :span="4">
-            <el-button type="primary" size="small" @click="deleteIncome(index)">删除</el-button>
-          </el-col>
-          <el-col :span="10" style="margin-top:10px">
-            <el-form-item :label="'出账金额' + (index + 1)" :prop="'incomeList.' + index + '.outIncomeMoney'"> <el-input
-                v-model="val.outIncomeMoney" disabled @input='provingChange($event, "outIncomeMoney")'></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="10" style="margin-top:10px">
-            <el-form-item :label="'出账日期' + (index + 1)" :prop="'incomeList.' + index + '.outIncomeDate'">
-              <el-date-picker type="date" size="small" v-model="val.outIncomeDate" placeholder="选择日期"
-                @input='provingChange($event, "outIncomeDate")' value-format="yyyy-MM-dd"></el-date-picker>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="21">
-            <el-form-item label="备注" prop="remark"> <el-input type="textarea" v-model="dataCollection.remark"></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="resetForm('dataform')" size="small">取 消</el-button>
-        <el-button v-if="dialogTitle!=='查看发票信息'" type="primary" @click="submitForm()" size="small">确 定</el-button>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-
-<script>
-import { limitNumber } from "../../utils/validate.js";
-import templateTable from '@/components/TemplateTable/index.vue'
-
-export default {
-  name: "InvoiceInformation",
-  components: { templateTable },
-  created() {
-    //获取所有下拉框数据
-    this.subjectsFn(); //开票科目
-    this.incoiceType(); //发票类型
-    this.EnterpriseName(); //开票方
-    this.findPage()
-
-  },
-  computed: {
-    notIncomeMoney: {
-      get: function () {
-        let a
-        if (this.dataCollection.incomeList[0].incomeMoney) {
-          a = 0
-          this.dataCollection.incomeList.forEach(val => {
-            a += Number(val.incomeMoney)
-          })
-          a = Number(this.dataform.invoiceAmount) - a
-        }
-        else {
-          a = this.dataform.invoiceAmount
-        }
-        return a
-      },
-      set: function (value) {
-        this.dataform.invoiceAmount = value
-      },
-    },
-    notOutMoney: {
-      get: function () {
-        let a
-        if (this.dataCollection.incomeList[0].outIncomeMoney) {
-          a = 0
-          this.dataCollection.incomeList.forEach(val => {
-            a += Number(val.outIncomeMoney)
-          })
-          a = Number(this.dataform.invoiceAmount) - a
-        }
-        else {
-          a = this.dataform.invoiceAmount
-        }
-        return a
-      },
-      set: function (value) {
-        this.dataform.invoiceAmount = value
-      },
-    },
-  },
-  watch: {
-    // 开票金额
-    'dataform.invoiceAmount'(newVal, oldVal) {
-      if (newVal && limitNumber(newVal)) {
-        if (this.dataform.taxRate) {
-          this.dataform.taxExclusivePrice = (Number(newVal) / (1 + Number(this.dataform.taxRate))).toFixed(2)
-          this.dataform.taxAmounts = (Number(newVal) / (1 + Number(this.dataform.taxRate)) * Number(this.dataform.taxRate)).toFixed(2)
-        }
-      }
-    },
-    // 税率
-    'dataform.taxRate'(newVal, oldVal) {
-      if (newVal && limitNumber(newVal)) {
-        if (this.dataform.invoiceAmount) {
-          this.dataform.taxExclusivePrice = (Number(this.dataform.invoiceAmount) / (1 + Number(newVal))).toFixed(2)
-          this.dataform.taxAmounts = (Number(this.dataform.invoiceAmount) / (1 + Number(newVal)) * Number(newVal)).toFixed(2)
-        }
-      }
-    },
-    // 利润点
-    'dataCollection.profitPoint'(newVal) {
-      if (newVal && limitNumber(newVal)) {
-        let valData = Number(newVal)
-        this.dataCollection.incomeList.forEach((val, index) => {
-          if (val.incomeMoney) {
-            this.dataCollection.incomeList[index].outIncomeMoney = ((1 - valData) * Number(val.incomeMoney)).toFixed(2)
-          }
-        })
-
-        if (this.dataCollection.procedureFee) {
-          this.dataCollection.totalProfit = (Number(this.dataform.invoiceAmount) * valData - Number(this.dataCollection.procedureFee)).toFixed(2)
-        }
-      }
-
-    },
-    // 手续费
-    'dataCollection.procedureFee'(newVal) {
-      if (newVal && limitNumber(newVal)) {
-        if (this.dataCollection.profitPoint) {
-          this.dataCollection.totalProfit = (Number(this.dataform.invoiceAmount) * Number(this.dataCollection.profitPoint) - Number(newVal)).toFixed(2)
-        }
-      }
-    },
-  },
-  data() {
-    const validateSz = (rule, value, callback) => {
-      if (!value && rule.field == "invoiceAmount") {
-        callback(new Error("请填写开票金额"));
-      }
-      if (!value && rule.field == "invoiceQuantity") {
-        callback(new Error("请填写发票数"));
-      }
-      if (value && !limitNumber(value)) {
-        callback(new Error("请输入整数或者保留两位小数!"));
-      }
-      callback()
-    };
-    const valiaDigit = (rule, value, callback) => {
-      if (value && !limitNumber(value)) {
-        callback(new Error("请输入整数或者保留两位小数!"));
-      }
-    }
-    return {
-      formList: [
-        {
-          label: "开票员",
-          prop: "invoiceClerk",
-          type: 'input'
-        },
-        {
-          label: "开票方",
-          prop: "invCompanyName",
-          type: 'input'
-        },
-        {
-          label: "对方单位名称",
-          prop: "peerCompanyName",
-          type: 'input'
-        },
-        {
-          label: "开票日期",
-          prop: "invoiceDate",
-          type: 'date'
-        },
-        {
-          label: "开票科目",
-          prop: "subjects",
-          type: "select",
-          options: this.subjectstList
-        },
-        {
-          label: "发票类型",
-          prop: "status",
-          type: "select",
-          options: JSON.parse(localStorage.getItem('user_statusoptions'))
-        },
-      ],
-      btnGroup: [{
-        name: '新增(外部合同开票)',
-        click: () => { return this.add() },
-      }, {
-        name: '新增(手续费开票)',
-        click: () => { return this.addTwo() },
-      },],
-      tableConfig: {
-        columns: [
-          // 数据列
-          { prop: "invoiceClerk", label: "开票员", type: 'text' },
-          {
-            prop: "subjects",
-            label: "开票科目", type: 'text',
-          },
-          { prop: "invCompanyName", label: "开票方", type: 'text', },
-
-          { prop: "peerCompanyName", label: "对方单位名称", type: 'text', },
-          { prop: "invoiceNum", label: "发票号码", type: 'text', },
-          {
-            prop: "invoiceDate",
-            label: "开票日期",
-            type: 'text',
-          },
-          {
-            prop: "taxExclusivePrice",
-            label: "不含税金额",
-            type: 'text',
-          },
-        ],
-        loading: true,
-        isPaginationShow: true,
-        isShowIndex: true,
-        operationWidth: '120',
-        optBtns: [
-          {
-            type: 'primary',
-            label: '添加回款',
-            type: 'text',
-            click: (row, index) => { return this.addCollection(row) },
-          },
-          {
-            type: 'primary',
-            label: '修改',
-            type: 'text',
-            click: (row, index) => { return this.handleTableEdit(row) },
-          },
-          {
-            type: 'primary',
-            label: '查看',
-            type: 'text',
-            click: (row, index) => { return this.handleTableDetail(row) },
-          },
-          {
-            type: 'primary',
-            label: '删除',
-            type: 'text',
-            click: (row, index) => { return this.handleTableDelete(row) },
-          }
-        ]
-      },
-      pageData: {
-        pageNum: 1,
-        pageSize: 10,
-        totalSize: 0
-      },
-      nvoicingCategory: '1',
-      isDisabled: false,
-      isWholeDisabled: false,
-      dialogTitle: '新增发票信息',
-      incomeList: [{
-        incomeDate: '',
-        incomeMoney: '',
-        outIncomeDate: '',
-        outIncomeMoney: ''
-      }],
-      pageResult: [], //表格数据
-      //顶部查询信息
-      queryFrom: {}, //查询信息
-      dialogFormVisible: false, //新增弹出框
-      dialogForm: false, //修改弹出框
-      form: {},
-      dataCollection: {
-        incomeList: [{
-          incomeDate: '',
-          incomeMoney: '',
-          outIncomeDate: '',
-          outIncomeMoney: ''
-        }],
-      },
-      //新增弹出框信息
-      dataform: {},
-      formLabelWidth: "120px",
-      subjectstList: [], //选择的开票科目
-      incoiceList: [], //选择的发票类型
-      approvalList: [], //字典状态数组
-      invCompanyNameList: [], //选择的开票方数组
-      rulesCollection: {
-        procedureFee: { required: false, trigger: "blur", validator: valiaDigit },
-        profitPoint: { required: false, trigger: "blur", validator: valiaDigit },
-        incomeMoney: { required: false, trigger: "change", validator: valiaDigit },
-      },
-      //表单验证
-      rules: {
-        invoiceClerk: [
-          { required: true, message: "请输入开票员", trigger: "blur" },
-        ],
-        // taxExclusivePrice: [
-        //   { required: true, message: "请输入不含金额税", trigger: "blur" },
-        // ],
-        invoiceNum: [
-          { required: true, message: "请输入开票号码", trigger: "blur" },
-        ],
-        subjectsId: [
-          { required: true, message: "请选择开票科目", trigger: "change" },
-        ],
-        invoiceType: [
-          { required: true, message: "请选择开票类型", trigger: "change" },
-        ],
-        invCompanyId: [
-          { required: true, message: "请选择开票方", trigger: "change" },
-        ],
-        peerCompanyName: [
-          { required: true, message: "请输入对方单位名称", trigger: "blur" },
-        ],
-        invoiceAmount: [{ required: true, trigger: "blur", validator: validateSz }],
-        invoiceDate: [
-          {
-            required: true,
-            message: "请选择开票日期",
-            trigger: "change",
-          },
-        ],
-        invoiceQuantity: [{ required: true, trigger: "blur", validator: validateSz }],
-        taxRate: [
-          { required: true, message: "请输入", trigger: "blur" },
-        ],
-      },
-      subjectsId: "", //科目ID
-      invCompanyId: "", //开票方ID
-      checkList: [], //选中的选项集合
-      id: "", //每一项选中的id信息
-    };
-  },
-  methods: {
-    handleSearchList(data) {
-      this.findPage(data)
-    },
-    // 输入进账金额触发方法
-    incomeMoneyFun(val, index) {
-      if (val && limitNumber(val) && this.dataCollection.profitPoint) {
-        this.dataCollection.incomeList[index].outIncomeMoney = ((1 - Number(this.dataCollection.profitPoint)) * Number(this.dataCollection.incomeList[index].incomeMoney)).toFixed(2)
-      }
-    },
-    //字典---
-    subjectsFn() {
-      let typeName = "subjects";
-      this.$api.dict.findByLableName(typeName).then((res) => {
-        this.subjectstList = res.data;
-      });
-    },
-    incoiceType() {
-      let typeName = "invoice_type";
-      this.$api.dict.findByLableName(typeName).then((res) => {
-        this.incoiceList = res.data;
-      });
-    },
-    //--数据字典 end --
-    // handleSearchList(data) {
-    //   this.findPage(data)
-    // },
-    findPage(data) {
-      this.tableConfig.loading = true;
-      this.$api.dict
-        .queryPage({ ...this.pageData, ...data })
-        .then((res) => {
-          this.tableConfig.loading = false;
-          this.pageResult = res.data.content;
-          this.pageData.pageNum = res.data.pageNum;
-          this.pageData.pageSize = res.data.pageSize;
-          this.pageData.totalSize = res.data.totalSize;
-
-        })
-    },
-    statusChange(e) {
-      //状态选择事件
-      // this.pageRequest.approvalStatus = e;
-      // this.findPage();
-    },
-    //开票公司下拉框
-    EnterpriseName() {
-      this.$api.dict.companyFindList().then((res) => {
-        this.invCompanyNameList = res.data;
-        if (this.invCompanyNameList.length > 0) {
-          this.invCompanyNameList = this.invCompanyNameList.filter(
-            (item) =>
-              item.enterpriseName != "" &&
-              item.enterpriseName != null &&
-              item.enterpriseName != undefined
-          );
-          this.dataform.invCompanyName = this.invCompanyNameList[0].id;
-        } else {
-          this.dataform.invCompanyName = "";
-        }
-      });
-    },
-    // 添加进账
-    addIncome() {
-      this.dataCollection.incomeList.push({
-        incomeDate: '',
-        incomeMoney: '',
-        outIncomeDate: '',
-        outIncomeMoney: ''
-      })
-
-    },
-    deleteIncome(index) {
-      this.$confirm('是否删除该数据?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        if (this.dataCollection.incomeList.length > 1) {
-          this.dataCollection.incomeList.splice(index, 1)
-          this.$message({
-            type: 'success',
-            message: '删除成功!'
-          });
-        }
-        else {
-          this.$message.warning('至少添加一条数据!')
-        }
-      })
-
-    },
-    //新增外部合同开票
-    add() {
-      if(this.$refs.dataform){
-        this.$refs.dataform.resetFields();
-      }
-      this.nvoicingCategory = '1'
-      this.dialogTitle = '新增发票信息'
-      this.dataform = {}
-      this.dialogFormVisible = true;
-      this.isDisabled = false
-    },
-    //新增手续费开票
-    addTwo() {
-      if(this.$refs.dataform){
-        this.$refs.dataform.resetFields();
-      }
-      this.nvoicingCategory = '2'
-      this.dialogTitle = '新增发票信息'
-      this.dataform = {
-        invoiceDate:'',
-        invCompanyId:'',
-        subjectsId:'',
-        invoiceType:''
-      }
-      this.dialogFormVisible = true;
-      this.isDisabled = false
-
-    },
-    handleClose() {
-      this.dialogFormVisible = false;
-    },
-
-    //取消
-    resetForm() {
-      this.dialogFormVisible = false;
-    },
-    provingChange(e, name) {
-      // this.$forceUpdate();  
-      this.$delete(this.dataCollection, name)
-      this.$set(this.dataCollection, name, e);
-    },
-    getInterface(jiekou) {
-      if (this.dialogTitle == '新增发票信息' ||this.dialogTitle == '修改发票信息') {
-        this.$refs["dataform"].validate((valid) => {
-          if (valid) {
-            Number(this.dataform.taxExclusivePrice)
-            Number(this.dataform.taxAmounts)
-            jiekou({ invoiceInfo: this.dataform }).then((res) => {
-              if (res.code == "200") {
-                this.$message({ message: "添加成功!", type: "success" });
-                this.dialogFormVisible = false;
-              } else {
-                this.$message({
-                  message: `添加失败,请重新添加, ${res.msg}`,
-                  type: "error",
-                });
-              }
-              this.findPage();
-            });
-          } else {
-            return false;
-          }
-        });
-      }
-      if (this.dialogTitle == "回款信息") {
-        let invoiceInfo = { ...this.dataform, ...this.dataCollection }
-        this.$api.dict.invoiceInfoSave({ invoiceInfo, invoiceInfoInOutList: this.dataCollection.incomeList }).then((res) => {
-          if (res.code == "200") {
-            this.$message({ message: "添加成功!", type: "success" });
-            this.dialogFormVisible = false;
-          } else {
-            this.$message({
-              message: `添加失败,请重新添加, ${res.msg}`,
-              type: "error",
-            });
-          }
-          this.findPage();
-        });
-      }
-    },
-    //新增提交
-    submitForm() {
-      this.dataCollection.notOutMoney = this.notOutMoney
-      this.dataCollection.notIncomeMoney = this.notIncomeMoney
-      this.dataCollection.incomeList.forEach(val => val.id = this.dataform.id)
-      if (this.nvoicingCategory == '1') {
-        this.getInterface(this.$api.dict.saveTypeOne)
-      }
-      else {
-        this.getInterface(this.$api.dict.saveTypeTwo)
-      }
-    },
-    //选择开票科目传参文字
-    changeDept(value) {
-      this.subjectstList.forEach((item) => {
-        if (item.value == value) {
-          this.subjectsId = item.value;
-          this.dataform.subjects = item.label;
-          this.form.subjects = item.label;
-        }
-      });
-    },
-    //发票类型
-    invoiceChange(value) {
-      this.incoiceList.forEach((item) => {
-        if (item.value == value) {
-          this.dataform.invoiceType = item.label;
-        }
-      });
-    },
-    invoiceChange1(value) {
-      this.incoiceList.forEach((item) => {
-        if (item.value == value) {
-          this.form.invoiceType = item.label;
-        }
-      });
-    },
-    //弹出框-开票方
-    invCompanyChange(value) {
-      this.invCompanyNameList.forEach((item) => {
-        if (item.id == value) {
-          this.invCompanyId = item.id;
-          this.dataform.invCompanyName = item.enterpriseName;
-          this.form.invCompanyName = item.enterpriseName;
-        }
-      });
-    },
-
-    //修改
-    handleTableEdit(row) {
-      if(this.$refs.dataform){
-        this.$refs.dataform.resetFields();
-      }
-      this.dialogTitle = '修改发票信息'
-      this.isDisabled = false
-      this.isWholeDisabled = false
-      this.dataform = { ...row };
-      this.dialogFormVisible = true;
-    },
-    // 查看
-    handleTableDetail(row) {
-      this.dialogTitle = '查看发票信息'
-      this.$api.dict.invDetails(row.id).then(res => {
-        if (res.code == 200) {
-          if (res.data.invoiceInfoInOutList.length == 0) {
-            res.data.invoiceInfoInOutList = [{
-              incomeDate: '',
-              incomeMoney: '',
-              outIncomeDate: '',
-              outIncomeMoney: ''
-            }]
-          }
-          this.dataform = res.data.invoiceInfo
-          this.dataCollection = res.data.invoiceInfo
-          this.dataCollection.incomeList = res.data.invoiceInfoInOutList
-          this.isDisabled = true
-          this.isWholeDisabled = true
-          this.dialogFormVisible = true;
-        }
-        else {
-          this.$message.error(res.msg);
-        }
-      })
-    },
-    //删除
-    handleTableDelete(row) {
-
-    },
-    // 添加回款
-    addCollection(row) {
-      this.$api.dict.invDetails(row.id).then(res => {
-        if (res.code == 200) {
-          if (Object.keys(res.data.invoiceInfoInOutList).length === 0) {
-            this.dataCollection = {
-              ...res.data.invoiceInfo, incomeList: [{
-                incomeDate: '',
-                incomeMoney: '',
-                outIncomeDate: '',
-                outIncomeMoney: ''
-              }]
-            }
-          }
-          else {
-            res.data.invoiceInfoInOutList.forEach(val => val.incomeMoney = val.incomeMoney + '')
-            this.dataCollection = { ...res.data.invoiceInfo, incomeList: res.data.invoiceInfoInOutList }
-          }
-          this.dataform = res.data.invoiceInfo
-          this.isDisabled = true
-          this.isWholeDisabled = false
-          this.dialogFormVisible = true;
-          this.dialogTitle = '回款信息'
-        }
-        else {
-          this.$message.error(res.msg);
-        }
-      })
-
-    }
-
-  },
-};
-</script>
-
-<style scoped>
-.el-input--suffix .el-input__inner {
-  padding-right: 60px !important;
-}
-
-.operation {
-  margin-left: 14px !important;
-  margin-top: 15px !important;
-}
-
-.dialog-footer {
-  margin-top: -20px !important;
-}
-
-.dialog .el-dialog__body {
-  padding: 30px 20px 5px !important;
-}
-
-.form {
-  display: flex;
-  margin-left: -12px !important;
-}
-
-.el-pagination {
-  font-weight: normal !important;
-}
-
-.footer {
-  z-index: 500;
-  position: fixed;
-  margin: 10px 0;
-  position: fixed;
-  bottom: -9px;
-  left: 210px;
-  right: 25px;
-  line-height: var(--footer-height);
-  color: #fff;
-}
-
-.el-card__body {
-  padding: 12px !important;
-}
-
-.footer .footerdiv {
-  display: flex !important;
-  align-items: center !important;
-}
-
-.frame .el-form-item {
-  margin-bottom: 7px !important;
-}
-
-.form .el-form-item__label {
-  font-size: 15px !important;
-  font-weight: 600 !important;
-}
-
-.el-row {
-  margin-top: 10px !important;
-}
-
-.el-textarea {
-  margin-top: 10px !important;
-}
-
-.frame .el-form-item .el-input {
-  width: 220px !important;
-}
-
-.frame .el-form-item .el-select {
-  width: 220px !important;
-}
-</style>

+ 18 - 3
src/views/Letter/Letter.vue

@@ -187,7 +187,7 @@
           <el-col :xs="xscell" :sm="smcell" :md="mdcell" :lg="lgcell" :xl="xlcell">
             <el-form-item label="发动机号:" prop="engineNo">
               <el-input
-                onkeyup="value=value.replace(/[^\w-]/ig,'')"
+
                 v-model="carInfo.engineNo"
                 placeholder="请输入发动机号"
               ></el-input>
@@ -441,6 +441,7 @@
                 placeholder="请输入车主手机号"
                 type="text"
                 maxlength="11"
+                @paste.native="handlePaste($event,'ownerInfo')"
                 show-word-limit
               ></el-input>
             </el-form-item>
@@ -562,6 +563,7 @@
                 placeholder="请输入投保人手机号"
                 maxlength="11"
                 type="text"
+                @paste.native="handlePaste($event,'policyHolderInfo')"
                 show-word-limit
               ></el-input>
             </el-form-item>
@@ -693,6 +695,7 @@
                 placeholder="请输入被保人手机号"
                 maxlength="11"
                 type="text"
+                @paste.native="handlePaste($event,'insuredPersonInfo')"
                 show-word-limit
               ></el-input>
             </el-form-item>
@@ -4787,7 +4790,7 @@ export default {
     "carInfo.engineNo": {
       handler(val) {
         if (val) {
-          this.carInfo.engineNo = val.toUpperCase();
+          this.carInfo.engineNo = val.replace(/[^\w-]/ig,'').toUpperCase();
         }
       },
       deep: true
@@ -4999,6 +5002,18 @@ export default {
     }
   },
   methods: {
+    //手机号复制粘贴处理
+    handlePaste(e,mobileKey) {
+      e.preventDefault();//阻止默认行为
+      const clipboardData = e.clipboardData || window.clipboardData;//获取剪切板内容
+      let pastedText = clipboardData.getData('text').replace(/\s+/g, '');//获取纯文本并处理空格
+      // 截取前11个字符,以确保不会超过手机号长度限制
+      pastedText = pastedText.substring(0, 11);
+      // 使用Vue.nextTick确保更新发生在DOM更新之后
+      this.$nextTick(() => {
+        this[mobileKey].mobile = pastedText;
+      });
+    },
     // licenseNoFun(data){
     //   if(data && this.carInfo.enginedesc){
     //     this.obtainProtocol()
@@ -6244,7 +6259,7 @@ else{
       this.$api.letter.generateOrder(param).then(res => {
         if (res.code == "200") {
               //上传图片
-            const mergedArray = [...this.imageList1, ...this.imageList2, ...this.imageList3, ...this.imageList4];
+            const mergedArray = [...this.imageList1, ...this.imageList2, ...this.imageList3, ...this.imageList4,...this.imageList5];
             if (mergedArray.length > 0) {
               let imageparam = {
                 imageList: mergedArray,

+ 22 - 3
src/views/Letter/Orderlist.vue

@@ -1848,7 +1848,14 @@ export default {
                 });
                 this.findPage();
               } else {
-                this.$message({ message: res.msg, type: "error" });
+                this.$message({
+                            showClose: true,
+                            dangerouslyUseHTMLString: true,
+                            message:  (res.msg).replace(/\n/g,"<br><br>"),
+                            type: "error",
+                            duration: 7000
+                          });
+                // this.$message({ message: res.msg, type: "error" });
               }
             }
           );
@@ -1863,7 +1870,13 @@ export default {
             });
             this.findPage();
           } else {
-            this.$message({ message: res.msg, type: "error" });
+            this.$message({
+              showClose: true,
+              dangerouslyUseHTMLString: true,
+              message:  (res.msg).replace(/\n/g,"<br><br>"),
+              type: "error",
+              duration: 7000
+            });
           }
         });
       }
@@ -1878,7 +1891,13 @@ export default {
           });
           this.findPage();
         } else {
-          this.$message({ message: res.msg, type: "error" });
+          this.$message({
+              showClose: true,
+              dangerouslyUseHTMLString: true,
+              message:  (res.msg).replace(/\n/g,"<br><br>"),
+              type: "error",
+              duration: 7000
+            });
         }
       });
     },

+ 462 - 314
src/views/Sys/Inscommanytemplate.vue

@@ -1,342 +1,490 @@
 <template>
-    <div class="page">
-        <el-row>
-            <el-col :span="6" style="padding: 20px;">
-                <el-button type="danger" size="small" @click="add()">新增</el-button>
-            </el-col>
-        </el-row>
-        <el-table size="small" :data="pageResult" height="690" border style="width: 100%" v-loading="loading"
-            highlight-current-row stripe
-            :header-cell-style="{ background: '#F2F7FC', fontWeight: '700', color: '#606266' }">
-            <el-table-column prop="id" label="ID" width="200" align="center"></el-table-column>
-            <el-table-column prop="insCompanyId" label="保险公司ID" width="100" align="center"></el-table-column>
-            <el-table-column prop="insCompanyName" label="保险公司简称" width="100" align="center"></el-table-column>
-            <el-table-column prop="fields" label="配置参数" align="center" :formatter="configureformatter"></el-table-column>
-            <el-table-column label="操作" align="center" width="200" fixed="right">
-                <template slot-scope="scope">
-                    <el-button size="mini" type="text" @click="CloseEdit(scope.$index, scope.row)">编辑</el-button>
-                    <el-button size="mini" type="text" style="color: #f78989;"
-                        @click="empowerBtn(scope.$index, scope.row)">删除</el-button>
-                </template>
-            </el-table-column>
-        </el-table>
+  <div class="page">
+    <el-form
+      :inline="true"
+      :model="formInline"
+      class="demo-form-inline"
+      size="small"
+      label-width="130px"
+      style="text-align: center"
+    >
+      <el-row style="padding: 20px">
+        <el-col :span="6">
+          <el-form-item label="请求类型:">
+            <el-select class="widths1" clearable v-model="formInline.apiType">
+              <el-option label="API" :value="1"></el-option>
+              <el-option label="python" :value="2"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="保险公司:">
+            <el-select
+              class="widths1"
+              filterable
+              v-model="formInline.insCompanyId"
+              @change="companyChange"
+              clearable
+            >
+              <el-option
+                v-for="(item, index) in companyselect"
+                :key="index.id"
+                :label="item.namesimple"
+                :value="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-button type="primary" size="small" @click="querySearch"
+            >查询</el-button
+          >
+          <el-button type="danger" size="small" @click="add()">新增</el-button>
+        </el-col>
+      </el-row>
+    </el-form>
 
-        <!-- 分页功能 -->
-        <div class="block">
-            <el-pagination @size-change="applyhandleSizeChange" @current-change="applyhandleCurrentChange"
-                :current-page="pageNum" :page-size="pageSize" :page-sizes="[10, 20, 50, 100]"
-                layout="total, sizes, prev, pager, next, jumper" :total="totalSize"></el-pagination>
-        </div>
-        <el-dialog :title="dilogtitle" :visible.sync="dialogVisible" width="1000px">
-            <el-form class="demo-ruleForm wrap-scrollbar scroll-style" :model="attributionform" ref="attributionform"
-                label-width="130px" size="small">
-                <el-row>
-                    <el-col :span="12">
-                        <el-form-item label="请求类型:">
-                            <el-select class="widths1" v-model="attributionform.apiType" @change="apiChange">
-                                <el-option label="API" :value="1"></el-option>
-                                <el-option label="python" :value="2"></el-option>
-                            </el-select>
-                        </el-form-item>
-                    </el-col>
-                    <el-col :span="12">
-                        <el-form-item label="保险公司:">
-                            <el-select class="widths1" filterable  v-model="attributionform.insCompanyId" @change="companyChange">
-                                <el-option v-for="(item, index) in companyselect" :key="index.id" :label="item.namesimple"
-                                    :value="item.id"></el-option>
-                            </el-select>
-                        </el-form-item>
-                    </el-col>
-                    <div v-if="attributionform.apiType==2">
-                        <el-col :span="24">
-                            <div>
-                                <h4>URL配置</h4>
-                            </div>
-                        </el-col>
-                        <el-col :span="12" v-for="(apiitem, apiindex) in attributionform.api" :key="apiindex">
-                            <el-form-item :label="apiitem.apiName + ':'">
-                                <el-input v-model="apiitem.url"  placeholder="请输入指定链接"  ></el-input>
-                            </el-form-item>
-                        </el-col>
-                    </div>
-                    <el-col :span="24">
-                        <div>
-                            <h4>配置参数</h4>
-                        </div>
-                    </el-col>
-                    <el-col v-for="(configureitem, configureindex) in attributionform.fields" :key="configureindex">
-                        <el-col :span="10">
-                            <el-form-item label="字段名:">
-                                <el-input v-model="configureitem.field" class="widths1" placeholder="请输入字段名"></el-input>
-                            </el-form-item>
-                            <el-form-item label="标签:">
-                                <el-input v-model="configureitem.label" class="widths1" placeholder="标签名"></el-input>
-                            </el-form-item>
-                        </el-col>
-                        <el-col :span="10">
-                            <el-form-item label="表单类型:">
-                                <el-radio-group v-model="configureitem.type">
-                                    <el-radio label="text"></el-radio>
-                                    <el-radio label="select"></el-radio>
-                                </el-radio-group>
-
-                            </el-form-item>
-                            <el-form-item label="是否可修改:">
-                                <el-switch v-model="configureitem.isEdit"
-                                    @change="(event) => isEditchange(event, configureindex)" class="widths1"></el-switch>
-                            </el-form-item>
-                        </el-col>
-                        <el-col :span="4" >
-                            <el-button @click.prevent="removeDomain(configureitem)" size="small">删除</el-button>
-                        </el-col>
-                    </el-col>
-                </el-row>
-            </el-form>
-            <span slot="footer" class="dialog-footer">
-                <el-button size="small" @click="configuration" >新增配置</el-button>
-                <el-button size="small" @click="dialogVisible = false">取 消</el-button>
-                <el-button size="small" type="primary" @click="submitForm('attributionform')">提 交</el-button>
-            </span>
-        </el-dialog>
+    <el-table
+      size="small"
+      :data="pageResult"
+      height="690"
+      border
+      style="width: 100%"
+      v-loading="loading"
+      highlight-current-row
+      stripe
+      :header-cell-style="{
+        background: '#F2F7FC',
+        fontWeight: '700',
+        color: '#606266',
+      }"
+    >
+      <el-table-column
+        prop="id"
+        label="ID"
+        width="200"
+        align="center"
+      ></el-table-column>
+      <el-table-column
+        prop="insCompanyId"
+        label="保险公司ID"
+        width="100"
+        align="center"
+      ></el-table-column>
+      <el-table-column
+        prop="insCompanyName"
+        label="保险公司简称"
+        width="100"
+        align="center"
+      ></el-table-column>
+      <el-table-column
+        prop="fields"
+        label="配置参数"
+        align="center"
+        :formatter="configureformatter"
+      ></el-table-column>
+      <el-table-column label="操作" align="center" width="200" fixed="right">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            @click="CloseEdit(scope.$index, scope.row)"
+            >编辑</el-button
+          >
+          <el-button
+            size="mini"
+            type="text"
+            style="color: #f78989"
+            @click="empowerBtn(scope.$index, scope.row)"
+            >删除</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
 
+    <!-- 分页功能 -->
+    <div class="block">
+      <el-pagination
+        @size-change="applyhandleSizeChange"
+        @current-change="applyhandleCurrentChange"
+        :current-page="pageNum"
+        :page-size="pageSize"
+        :page-sizes="[10, 20, 50, 100]"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="totalSize"
+      ></el-pagination>
     </div>
+    <el-dialog :title="dilogtitle" :visible.sync="dialogVisible" width="1000px">
+      <el-form
+        class="demo-ruleForm wrap-scrollbar scroll-style"
+        :model="attributionform"
+        ref="attributionform"
+        label-width="130px"
+        size="small"
+      >
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="请求类型:">
+              <el-select
+                class="widths1"
+                v-model="attributionform.apiType"
+                @change="apiChange"
+              >
+                <el-option label="API" :value="1"></el-option>
+                <el-option label="python" :value="2"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="保险公司:">
+              <el-select
+                class="widths1"
+                filterable
+                v-model="attributionform.insCompanyId"
+                @change="companyChange"
+              >
+                <el-option
+                  v-for="(item, index) in companyselect"
+                  :key="index.id"
+                  :label="item.namesimple"
+                  :value="item.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <div v-if="attributionform.apiType == 2">
+            <el-col :span="24">
+              <div>
+                <h4>URL配置</h4>
+              </div>
+            </el-col>
+            <el-col
+              :span="12"
+              v-for="(apiitem, apiindex) in attributionform.api"
+              :key="apiindex"
+            >
+              <el-form-item :label="apiitem.apiName + ':'">
+                <el-input
+                  v-model="apiitem.url"
+                  placeholder="请输入指定链接"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+          </div>
+          <el-col :span="24">
+            <div>
+              <h4>配置参数</h4>
+            </div>
+          </el-col>
+          <el-col
+            v-for="(configureitem, configureindex) in attributionform.fields"
+            :key="configureindex"
+          >
+            <el-col :span="10">
+              <el-form-item label="字段名:">
+                <el-input
+                  v-model="configureitem.field"
+                  class="widths1"
+                  placeholder="请输入字段名"
+                ></el-input>
+              </el-form-item>
+              <el-form-item label="标签:">
+                <el-input
+                  v-model="configureitem.label"
+                  class="widths1"
+                  placeholder="标签名"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="10">
+              <el-form-item label="表单类型:">
+                <el-radio-group v-model="configureitem.type">
+                  <el-radio label="text"></el-radio>
+                  <el-radio label="select"></el-radio>
+                </el-radio-group>
+              </el-form-item>
+              <el-form-item label="是否可修改:">
+                <el-switch
+                  v-model="configureitem.isEdit"
+                  @change="(event) => isEditchange(event, configureindex)"
+                  class="widths1"
+                ></el-switch>
+              </el-form-item>
+            </el-col>
+            <el-col :span="4">
+              <el-button
+                @click.prevent="removeDomain(configureitem)"
+                size="small"
+                >删除</el-button
+              >
+            </el-col>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="small" @click="configuration">新增配置</el-button>
+        <el-button size="small" @click="dialogVisible = false">取 消</el-button>
+        <el-button
+          size="small"
+          type="primary"
+          @click="submitForm('attributionform')"
+          >提 交</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
 </template>
 <script>
 export default {
-    data() {
-        return {
-            dilogtitle:"新增",
-            filterText: "",
-            treedata: [], //树形数据
-            loading: false, //加载效果
-            dialogVisible: false, //新增弹框
-            pageNum: 1, //页数
-            pageSize: 20, //条数
-            totalSize: null, //总数
-            pageResult: [], //表格数据
+  data() {
+    return {
+      dilogtitle: "新增",
+      filterText: "",
+      treedata: [], //树形数据
+      loading: false, //加载效果
+      dialogVisible: false, //新增弹框
+      pageNum: 1, //页数
+      pageSize: 20, //条数
+      totalSize: null, //总数
+      pageResult: [], //表格数据
+      formInline: {
+        insCompanyId: "", //保险公司
+        apiType: "", //请求类型
+      }, //查询条件
 
-            attributionform: {
-                fields: [
-                    {
-                        field: "",
-                        isEdit: false,
-                        label: "",
-                        type: "",
-                        value: "",
-                    },
-                ],
-                apiType: "", //接口类型
-                insCompanyId: "", //保险公司id
-            },
-            attributionform1:{},
-            pythonApi: [
-                {
-                    apiName: "归属配置",
-                    apiType: 1,
-                    url: "",
-                },
-                {
-                    apiName: "报价",
-                    apiType: 2,
-                    url: "",
-                }, {
-                    apiName: "影像上传",
-                    apiType: 3,
-                    url: "",
-                }, {
-                    apiName: "核保",
-                    apiType: 4,
-                    url: "",
-                }, {
-                    apiName: "缴费查询",
-                    apiType: 5,
-                    url: "",
-                }, {
-                    apiName: "保单下载",
-                    apiType: 6,
-                    url: "",
-                }, {
-                    apiName: "非车险查询",
-                    apiType: 7,
-                    url: "",
-                }, {
-                    apiName: "人工核保状态刷新",
-                    apiType: 8,
-                    url: "",
-                }
-            ],
-            pageRequest: {
-                pageNum: 1,
-                pageSize: 20,
-                columnFilters: {
-                    parentId: {
-                        name: "parentId",
-                        value: "0",
-                    },
-                },
-            },
-            companyselect: [],
-            configurelist: [],
-            id: "",
-        };
-    },
-    created() {
-        this.$api.insCompany.gainTopList("1").then((res) => {
-            this.companyselect = res.data;
-        });
-        this.findpage();
-    },
-    watch: {
-        filterText(val) {
-            this.$refs.tree.filter(val);
+      attributionform: {
+        fields: [
+          {
+            field: "",
+            isEdit: false,
+            label: "",
+            type: "",
+            value: "",
+          },
+        ],
+        apiType: "", //接口类型
+        insCompanyId: "", //保险公司id
+      },
+      attributionform1: {},
+      pythonApi: [
+        {
+          apiName: "归属配置",
+          apiType: 1,
+          url: "",
         },
-    },
-
-    methods: {
-        add() {
-            let params = {
-                fields: [
-                    {
-                        field: "",
-                        isEdit: false,
-                        label: "",
-                        type: "",
-                        value: "",
-                    },
-                ],
-                insCompanyId: "", //保险公司id
-            };
-            this.id = "";
-            this.attributionform = params;
-            this.show = true;
-            this.dialogVisible = true;
+        {
+          apiName: "报价",
+          apiType: 2,
+          url: "",
         },
-        //表格参数自定义内容
-        configureformatter(row) {
-            let data = JSON.stringify(row.fields);
-            return data;
+        {
+          apiName: "影像上传",
+          apiType: 3,
+          url: "",
         },
-        findpage() {
-            let params={
-                pageNum:this.pageNum,
-                pageSize:this.pageSize,
-                insCompanyId:"",
-            }
-            this.$api.insCompany
-                .pagebelong(params)
-                .then((res) => {
-                    if (res.code == "200") {
-                        this.pageResult = res.data.content
-                        this.totalSize = res.data.totalSize
-                    }
-                });
+        {
+          apiName: "核保",
+          apiType: 4,
+          url: "",
         },
-        //删除事件
-        removeDomain(item) {
-            var index = this.attributionform.fields.indexOf(item);
-            if (index !== -1) {
-                this.attributionform.fields.splice(index, 1);
-            }
+        {
+          apiName: "缴费查询",
+          apiType: 5,
+          url: "",
         },
-        //新增配置按钮
-        configuration() {
-            this.attributionform.fields.push({
-                field: "",
-                isEdit: false,
-                label: "",
-                type: "",
-                value: "",
-            });
+        {
+          apiName: "保单下载",
+          apiType: 6,
+          url: "",
         },
-        //修改开关事件
-        isEditchange(val, id) {
-            this.attributionform.fields[id].isEdit = val;
+        {
+          apiName: "非车险查询",
+          apiType: 7,
+          url: "",
         },
-        //选择保险公司获取归属模板
-        companyChange(e) { },
-        apiChange(e){
-            e==2? this.attributionform['api']=this.pythonApi:"";
+        {
+          apiName: "人工核保状态刷新",
+          apiType: 8,
+          url: "",
         },
-        //提交表单
-        submitForm(formName) {
-            this.$refs[formName].validate((valid) => {
-                if (valid) {
-                    if (this.id) {
-                        this.$api.insCompany
-                            .updatebelong(this.id, this.attributionform)
-                            .then((res) => {
-                                if (res.code == "200") {
-                                    this.$message({ message: "修改成功", type: "success" });
-                                    this.findpage();
-                                    this.dialogVisible = false;
-                                } else {
-                                    this.$message({ message: res.msg, type: "warning" });
-                                }
-                            });
-                    } else {
-                        this.$api.insCompany
-                            .addbelong(this.attributionform)
-                            .then((res) => {
-                                if (res.code == "200") {
-                                    this.$message({ message: "新增成功", type: "success" });
-                                    this.findpage();
-                                    this.dialogVisible = false;
-                                } else {
-                                    this.$message({ message: res.msg, type: "success" });
-                                }
-                            });
-                    }
-                }
-            });
+      ],
+      pageRequest: {
+        pageNum: 1,
+        pageSize: 20,
+        columnFilters: {
+          parentId: {
+            name: "parentId",
+            value: "0",
+          },
         },
-        //删除操作
-        empowerBtn(index, row) {
-            this.$api.insCompany.deletebelong(row.id).then((res) => {
+      },
+      companyselect: [],
+      configurelist: [],
+      id: "",
+    };
+  },
+  created() {
+    this.$api.insCompany.gainTopList("1").then((res) => {
+      this.companyselect = res.data;
+    });
+    this.findpage();
+  },
+  watch: {
+    filterText(val) {
+      this.$refs.tree.filter(val);
+    },
+  },
+
+  methods: {
+    //查询
+    querySearch() {
+      this.pageNum = 1;
+      this.pageSize = 20;
+      this.findpage();
+    },
+    add() {
+      let params = {
+        fields: [
+          {
+            field: "",
+            isEdit: false,
+            label: "",
+            type: "",
+            value: "",
+          },
+        ],
+        insCompanyId: "", //保险公司id
+      };
+      this.id = "";
+      this.attributionform = params;
+      this.show = true;
+      this.dialogVisible = true;
+    },
+    //表格参数自定义内容
+    configureformatter(row) {
+      let data = JSON.stringify(row.fields);
+      return data;
+    },
+    findpage() {
+      let params = {
+        pageNum: this.pageNum,
+        pageSize: this.pageSize,
+        insCompanyId: this.formInline.insCompanyId,
+        apiType: this.formInline.apiType,
+      };
+      this.$api.insCompany.pagebelong(params).then((res) => {
+        if (res.code == "200") {
+          this.pageResult = res.data.content;
+          this.totalSize = res.data.totalSize;
+        }
+      });
+    },
+    //删除事件
+    removeDomain(item) {
+      var index = this.attributionform.fields.indexOf(item);
+      if (index !== -1) {
+        this.attributionform.fields.splice(index, 1);
+      }
+    },
+    //新增配置按钮
+    configuration() {
+      this.attributionform.fields.push({
+        field: "",
+        isEdit: false,
+        label: "",
+        type: "",
+        value: "",
+      });
+    },
+    //修改开关事件
+    isEditchange(val, id) {
+      this.attributionform.fields[id].isEdit = val;
+    },
+    //选择保险公司获取归属模板
+    companyChange(e) {},
+    apiChange(e) {
+      e == 2 ? (this.attributionform["api"] = this.pythonApi) : "";
+    },
+    //提交表单
+    submitForm(formName) {
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          if (this.id) {
+            this.$api.insCompany
+              .updatebelong(this.id, this.attributionform)
+              .then((res) => {
                 if (res.code == "200") {
-                    this.findpage();
-                    this.$message({ message: res.msg, type: "success" });
+                  this.$message({ message: "修改成功", type: "success" });
+                  this.findpage();
+                  this.dialogVisible = false;
+                } else {
+                  this.$message({ message: res.msg, type: "warning" });
                 }
+              });
+          } else {
+            this.$api.insCompany.addbelong(this.attributionform).then((res) => {
+              if (res.code == "200") {
+                this.$message({ message: "新增成功", type: "success" });
+                this.findpage();
+                this.dialogVisible = false;
+              } else {
+                this.$message({ message: res.msg, type: "success" });
+              }
             });
-        },
-        //编辑操作
-        CloseEdit(index, row) {
-            this.dilogtitle="编辑"
-            this.id=row.id;
-           this.$api.insCompany.querybelong(row.id).then(res=>{
-            this.attributionform=res.data;
-            if(res.data.api!=null){
-                let api = JSON.parse(JSON.stringify(this.pythonApi));
-                api.forEach(item=>{
-                    let obj = res.data.api.find(it=>(item.apiName==it.apiName&&item.apiType==it.apiType))
-                    if(obj){
-                        item.url = obj.url
-                    }
-                })
-                this.attributionform['api']= api;
+          }
+        }
+      });
+    },
+    //删除操作
+    empowerBtn(index, row) {
+      this.$api.insCompany.deletebelong(row.id).then((res) => {
+        if (res.code == "200") {
+          this.findpage();
+          this.$message({ message: res.msg, type: "success" });
+        }
+      });
+    },
+    //编辑操作
+    CloseEdit(index, row) {
+      this.dilogtitle = "编辑";
+      this.id = row.id;
+      this.$api.insCompany.querybelong(row.id).then((res) => {
+        this.attributionform = res.data;
+        if (res.data.api != null) {
+          let api = JSON.parse(JSON.stringify(this.pythonApi));
+          api.forEach((item) => {
+            let obj = res.data.api.find(
+              (it) => item.apiName == it.apiName && item.apiType == it.apiType
+            );
+            if (obj) {
+              item.url = obj.url;
             }
-            this.dialogVisible=true;
-           })
-        },
-        // 设置每页条数
-        applyhandleSizeChange(val) {
-            this.pageSize = val;
-            this.pageNum = 1;
-            this.pageRequest.pageNum = 1;
-            this.pageRequest.pageSize = val;
-            this.findpage();
-        },
-        // 当前页
-        // 当前页 当前页
-        applyhandleCurrentChange(val) {
-            this.pageNum = val;
-            this.pageRequest.pageNum = val;
-            this.findpage();
-        },
+          });
+          this.attributionform["api"] = api;
+        }
+        this.dialogVisible = true;
+      });
+    },
+    // 设置每页条数
+    applyhandleSizeChange(val) {
+      this.pageSize = val;
+      this.pageNum = 1;
+      this.pageRequest.pageNum = 1;
+      this.pageRequest.pageSize = val;
+      this.findpage();
+    },
+    // 当前页
+    // 当前页 当前页
+    applyhandleCurrentChange(val) {
+      this.pageNum = val;
+      this.pageRequest.pageNum = val;
+      this.findpage();
     },
+  },
 };
 </script>
 <style scoped >
 .widths1 {
-    width: 250px;
+  width: 250px;
 }
 </style>

Някои файлове не бяха показани, защото твърде много файлове са промени