Bläddra i källkod

销项发票 进项发票

qinbai 4 år sedan
förälder
incheckning
ba4f912842
23 ändrade filer med 2978 tillägg och 137 borttagningar
  1. 16 0
      src/enums/column-name.js
  2. 6 0
      src/page/index/tags.vue
  3. 34 0
      src/router/views/index.js
  4. 2 0
      src/store/getters.js
  5. 22 0
      src/store/modules/ifdetail.js
  6. 85 0
      src/views/financialManagement/incomeInvoice/configuration/detailsPage.json
  7. 97 0
      src/views/financialManagement/incomeInvoice/configuration/invoicepage.json
  8. 156 0
      src/views/financialManagement/incomeInvoice/configuration/mainList.json
  9. 231 0
      src/views/financialManagement/incomeInvoice/incomeInvoice.vue
  10. 767 0
      src/views/financialManagement/incomeInvoice/incomeInvoiceDetailsPage.vue
  11. 85 0
      src/views/financialManagement/outputInvoice/configuration/detailsPage.json
  12. 97 0
      src/views/financialManagement/outputInvoice/configuration/invoicepage.json
  13. 156 0
      src/views/financialManagement/outputInvoice/configuration/mainList.json
  14. 231 0
      src/views/financialManagement/outputInvoice/outputInvoice.vue
  15. 767 0
      src/views/financialManagement/outputInvoice/outputInvoiceDetailsPage.vue
  16. 1 1
      src/views/purchase/contract/detailsPage.vue
  17. 28 0
      src/views/wel/components/quick-launch.vue
  18. 47 1
      src/views/wel/components/realtime-data.vue
  19. 36 9
      src/views/wel/components/sales-trend.vue
  20. 5 5
      src/views/wel/home/defaultPage.vue
  21. 44 66
      src/views/workManagement/performanceAnalysis/config/clientList.json
  22. 30 50
      src/views/workManagement/performanceAnalysis/config/mainList.json
  23. 35 5
      src/views/workManagement/performanceAnalysis/index.vue

+ 16 - 0
src/enums/column-name.js

@@ -227,6 +227,22 @@ const columnName = [{
     code: 68,
     name: '返利'
   },
+  {
+    code: 69,
+    name: '销项发票'
+  },
+  {
+    code: 70,
+    name: '销项发票明细'
+  },
+  {
+    code: 71,
+    name: '进项发票'
+  },
+  {
+    code: 72,
+    name: '进项发票明细'
+  },
 ]
 export const getColumnName = (key) => {
   for (let index = 0; index < columnName.length; index++) {

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

@@ -341,6 +341,12 @@ export default {
         if (tag.label == "锁定订单明细") {
           this.$store.commit("DOMKC_OUT_DETAIL");
         }
+        if (tag.label == "销项发票") {
+          this.$store.commit("OUTPUT_OUT_DETAIL");
+        }
+        if (tag.label == "进项发票") {
+          this.$store.commit("INCOME_OUT_DETAIL");
+        }
         this.$store.commit("DEL_TAG", tag);
         if (tag.value === this.tag.value) {
           tag = this.tagList[key === 0 ? key : key - 1]; //如果关闭本标签让前推一个

+ 34 - 0
src/router/views/index.js

@@ -637,6 +637,40 @@ export default [{
       }
     ]
   },
+  //销项发票
+  {
+    path: '/financialManagement/outputInvoice/outputInvoice',
+    component: Layout,
+    hidden: true,
+    children: [
+      {
+        path: '/financialManagement/outputInvoice/outputInvoice',
+        name:"销项发票",
+        meta: {
+          i18n: '/financialManagement/outputInvoice/outputInvoice',
+          keepAlive: true,
+        },
+        component: () => import( /* webpackChunkName: "views" */ '@/views/financialManagement/outputInvoice/outputInvoice')
+      }
+    ]
+  },
+  //进项发票
+  {
+    path: '/financialManagement/incomeInvoice/incomeInvoice',
+    component: Layout,
+    hidden: true,
+    children: [
+      {
+        path: '/financialManagement/incomeInvoice/incomeInvoice',
+        name:"进项发票",
+        meta: {
+          i18n: '/financialManagement/incomeInvoice/incomeInvoice',
+          keepAlive: true,
+        },
+        component: () => import( /* webpackChunkName: "views" */ '@/views/financialManagement/incomeInvoice/incomeInvoice')
+      }
+    ]
+  },
   //进口库存账
   {
     path: '/purchase/stockBill/index',

+ 2 - 0
src/store/getters.js

@@ -39,5 +39,7 @@ const getters = {
   settleStatus: state => state.ifdetail.settleStatus,
   domSaleStatus: state => state.ifdetail.domSaleStatus,
   domStockDetail: state => state.ifdetail.domStockDetail,
+  outputStatus: state => state.ifdetail.outputStatus,
+  incomeStatus: state => state.ifdetail.incomeStatus,
 }
 export default getters

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

@@ -13,6 +13,8 @@ const ifdetail = {
     settleStatus:false,//结算明细
     domSaleStatus: false, // 内贸销售
     domStockDetail: false, // 国内库存账
+    outputStatus:false,//销项发票
+    incomeStatus:false,//进项发票
   },
   actions: {},
   mutations: {
@@ -125,6 +127,20 @@ const ifdetail = {
     DOMKC_OUT_DETAIL(state) {
       state.domStockDetail = false;
     },
+    //财务销项发票
+    OUTPUT_IN_DETAIL(state) {
+      state.outputStatus = true;
+    },
+    OUTPUT_OUT_DETAIL(state) {
+      state.outputStatus = false;
+    },
+    //财务进项发票
+    INCOME_IN_DETAIL(state) {
+      state.incomeStatus = true;
+    },
+    INCOME_OUT_DETAIL(state) {
+      state.incomeStatus = false;
+    },
     //关闭所有
     DEL_ALL_DETAIL(state) {
       for (let item in state) {
@@ -175,6 +191,12 @@ const ifdetail = {
       if (tag.label == '锁定订单明细') {
         state.domStockDetail = true
       }
+      if (tag.label == '销项发票') {
+        state.outputStatus = true
+      }
+      if (tag.label == '进项发票') {
+        state.incomeStatus = true
+      }
     }
   }
 

+ 85 - 0
src/views/financialManagement/incomeInvoice/configuration/detailsPage.json

@@ -0,0 +1,85 @@
+{
+  "lazy": true,
+  "tip": false,
+  "simplePage": true,
+  "searchShow": true,
+  "addBtn":false,
+  "editBtn":false,
+  "addRowBtn":false,
+  "cellBtn":false,
+  "cancelBtn":false,
+  "refreshBtn": false,
+  "searchMenuSpan": 6,
+  "align": "center",
+  "delBtn":false,
+  "dialogWidth": "60%",
+  "tree": true,
+  "border": true,
+  "index": true,
+  "selection": false,
+  "menuWidth": 150,
+  "dialogClickModal": false,
+  "showSummary": true,
+  "summaryText": "合计",
+  "sumColumnList": [
+    {
+      "name": "amount",
+      "type": "sum"
+    },
+    {
+      "name": "thisAmount",
+      "type": "sum"
+    }
+  ],
+  "column": [
+    {
+      "label": "合同号",
+      "prop": "srcOrderno",
+      "overHidden": true,
+      "width": 200,
+      "index": 2
+    },
+    {
+      "label": "提单号",
+      "prop": "billNo",
+      "overHidden": true,
+      "width": 200,
+      "index": 3
+    },
+    {
+      "label": "费用名称",
+      "prop": "itemName",
+      "overHidden": true,
+      "width": 200,
+      "index": 4
+    },
+    {
+      "label": "金额",
+      "prop": "amount",
+      "overHidden": true,
+      "width": 150,
+      "index": 7
+    },
+    {
+      "label": "本次金额",
+      "prop": "thisAmount",
+      "overHidden": true,
+      "width": 150,
+      "index": 7
+    },
+    {
+      "label": "币别",
+      "prop": "currency",
+      "index": 7,
+      "width": 120
+    },
+    {
+      "label": "备注",
+      "prop": "remarks",
+      "overHidden": true,
+      "index": 13,
+      "cell": true,
+      "width": 500
+    }
+  ]
+}

+ 97 - 0
src/views/financialManagement/incomeInvoice/configuration/invoicepage.json

@@ -0,0 +1,97 @@
+{
+  "lazy": true,
+  "tip": false,
+  "simplePage": true,
+  "searchShow": true,
+  "addBtn":false,
+  "editBtn":false,
+  "addRowBtn":false,
+  "cellBtn":false,
+  "cancelBtn":false,
+  "refreshBtn": false,
+  "searchMenuSpan": 6,
+  "align": "center",
+  "delBtn":false,
+  "dialogWidth": "60%",
+  "tree": true,
+  "border": true,
+  "index": true,
+  "selection": false,
+  "menuWidth": 150,
+  "dialogClickModal": false,
+  "showSummary": true,
+  "summaryText": "合计",
+  "sumColumnList": [
+    {
+      "name": "amount",
+      "type": "sum"
+    }
+  ],
+  "column": [
+    {
+      "label": "货物",
+      "prop": "srcOrderno",
+      "overHidden": true,
+      "width": 200,
+      "index": 2
+    },
+    {
+      "label": "服务名称",
+      "prop": "billNo",
+      "overHidden": true,
+      "width": 200,
+      "index": 3
+    },
+    {
+      "label": "费用名称",
+      "prop": "itemName",
+      "overHidden": true,
+      "width": 200,
+      "index": 4
+    },
+    {
+      "label": "规格型号",
+      "prop": "amount",
+      "overHidden": true,
+      "width": 150,
+      "index": 7
+    },
+    {
+      "label": "单位",
+      "prop": "thisAmount",
+      "overHidden": true,
+      "width": 150,
+      "index": 7
+    },
+    {
+      "label": "数量",
+      "prop": "currency",
+      "index": 7,
+      "width": 120
+    },
+    {
+      "label": "单价(含税)",
+      "prop": "currency",
+      "index": 7,
+      "width": 120
+    },
+    {
+      "label": "金额(含税)",
+      "prop": "currency",
+      "index": 7,
+      "width": 120
+    },
+    {
+      "label": "税率",
+      "prop": "currency",
+      "index": 7,
+      "width": 120
+    },
+    {
+      "label": "税额",
+      "prop": "currency",
+      "index": 7,
+      "width": 120
+    }
+  ]
+}

+ 156 - 0
src/views/financialManagement/incomeInvoice/configuration/mainList.json

@@ -0,0 +1,156 @@
+{
+  "lazy": true,
+  "tip": false,
+  "simplePage": true,
+  "searchShow": true,
+  "searchMenuSpan": 16,
+  "dialogWidth": "60%",
+  "align": "center",
+  "height": "auto",
+  "searchSpan": 8,
+  "searchMenuPosition": "right",
+  "border": true,
+  "index": true,
+  "selection": false,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "menuWidth": 130,
+  "dialogClickModal": false,
+  "searchLabelWidth": 120,
+  "searchIcon": true,
+  "searchIndex": 2,
+  "addBtn":false,
+  "headerAlign": "center",
+  "showSummary": true,
+  "summaryText": "合计",
+  "sumColumnList": [
+    {
+      "name": "amount",
+      "type": "sum"
+    }
+  ],
+  "column": [
+    {
+      "label": "合同号",
+      "prop": "srcOrderno",
+      "overHidden": true,
+      "search": true,
+      "width": 150,
+      "index": 2
+    },
+    {
+      "label": "提单号",
+      "prop": "billNo",
+      "search": true,
+      "overHidden": true,
+      "width": 150,
+      "index": 3
+    },
+    {
+      "label": "往来单位",
+      "prop": "corpId",
+      "search": true,
+      "hide": true
+    },
+    {
+      "label": "客户名称",
+      "prop": "corpName",
+      "overHidden": true,
+      "width": 200,
+      "index": 4
+    },
+    {
+      "label": "单据状态",
+      "prop": "financeStatus",
+      "type": "select",
+      "search": true,
+      "overHidden": true,
+      "index": 1,
+      "width": 120,
+      "dicData": [
+        {
+          "label": "待结算",
+          "value":"待结算"
+        },
+        {
+          "label": "结算完成",
+          "value": "结算完成"
+        }
+      ]
+    },
+    {
+      "label": "人民币金额",
+      "prop": "amount",
+      "overHidden": true,
+      "width": 120,
+      "index": 5
+    },
+    {
+      "label": "外币金额",
+      "prop": "foreignAmount",
+      "overHidden": true,
+      "width": 120,
+      "index": 5
+    },
+    {
+      "label": "结算日期",
+      "prop": "settlementDate",
+      "overHidden": true,
+      "type": "date",
+      "search": true,
+      "unlinkPanels": true,
+      "searchRange": true,
+      "width": 150,
+      "index": 6
+    },
+
+    {
+      "label": "银行名称",
+      "prop": "accountBank",
+      "overHidden": true,
+      "width": 150,
+      "index": 7
+    },
+    {
+      "label": "银行户头",
+      "prop": "accountName",
+      "search": true,
+      "overHidden": true,
+      "width": 150,
+      "index": 8
+    },
+    {
+      "label": "银行卡号",
+      "prop": "accountNo",
+      "overHidden": true,
+      "width": 150,
+      "index": 9
+    },
+    {
+      "label": "申请人",
+      "prop": "createUserName",
+      "overHidden": true,
+      "index": 10,
+      "width": 120
+    },
+    {
+      "label": "申请日期",
+      "prop": "createTime",
+      "overHidden": true,
+      "type": "date",
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd",
+      "width": 150,
+      "index": 11
+    },
+    {
+      "label": "备注",
+      "prop": "remark",
+      "search": true,
+      "overHidden": true,
+      "index": 12,
+      "width": 120
+    }
+  ]
+}

+ 231 - 0
src/views/financialManagement/incomeInvoice/incomeInvoice.vue

@@ -0,0 +1,231 @@
+<template>
+  <basic-container v-if="show">
+    <avue-crud :option="option"
+               :data="dataList"
+               ref="crud"
+               v-model="form"
+               :page.sync="page"
+               :search.sync="search"
+               :table-loading="loading"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @saveColumn="saveColumn"
+               @resetColumn="resetColumn"
+               @on-load="onLoad">
+      <template slot="corpIdSearch">
+        <select-component
+          v-model="search.corpId"
+          :configuration="configuration"
+        ></select-component>
+      </template>
+      <template slot="menuLeft">
+        <el-button type="primary"
+                   size="small"
+                   icon="el-icon-plus"
+                   @click="addReceipt">创建单据
+        </el-button>
+      </template>
+      <template slot-scope="scope" slot="menu">
+        <el-button
+          type="text"
+          size="small"
+          icon="el-icon-edit"
+          @click.stop="editOpen(scope.row, 2)"
+        >编辑
+        </el-button>
+        <el-button
+          type="text"
+          size="small"
+          icon="el-icon-delete"
+          @click.stop="rowDel(scope.row, scope.index)"
+        >删除
+        </el-button>
+      </template>
+    </avue-crud>
+  </basic-container>
+  <detail-page
+    ref="detail"
+    @goBack="goBack"
+    :detailData="detailData"
+    v-else
+  ></detail-page>
+</template>
+
+<script>
+  import option from "./configuration/mainList.json";
+  import {getList ,remove} from "@/api/financialManagement/financialManagement"
+  import detailPage from "./incomeInvoiceDetailsPage";
+
+  export default {
+    name: "incomeInvoice",
+    data() {
+      return {
+        loading : false,
+        form: {},
+        search:{},
+        show:true,
+        detailData:{},
+        option: option,
+        dataList: [],
+        page: {
+          currentPage: 1,
+          total: 0,
+          pageSize: 10,
+          pageSizes: [10, 50, 100, 200, 300, 400, 500,1000]
+        },
+        query:{},
+        configuration:{
+          multipleChoices:false,
+          multiple:false,
+          disabled:false,
+          searchShow:true,
+          collapseTags:false,
+          clearable:true,
+          placeholder:'请点击右边按钮选择',
+          dicData:[]
+        },
+      }
+    },
+    activated() {
+      if(!this.show && !this.$store.getters.outputStatus){
+        this.show = true;
+      }
+      setTimeout(() => {
+        if(this.$route.query.params  && this.show){
+          this.detailData={
+            id:this.$route.query.params
+          }
+          this.show = false;
+          this.$store.commit("OUTPUT_IN_DETAIL");
+        }
+      }, 100);
+    },
+    components:{
+      detailPage
+    },
+    async created() {
+      // this.option = await this.getColumnData(this.getColumnName(69), option);
+    },
+    mounted() {
+
+    },
+    methods: {
+      //新单打开
+      addReceipt(row){
+        this.detailData = {
+          id: row.id,
+          status: 1
+        };
+        this.show = false;
+        this.$store.commit("OUTPUT_IN_DETAIL");
+      },
+      //编辑打开
+      editOpen(row, status){
+        this.detailData = {
+          id: row.id,
+          status: status
+        };
+        this.show = false;
+        this.$store.commit("OUTPUT_IN_DETAIL");
+      },
+      rowDel(row, index, done) {
+        if(row.id){
+          this.$confirm("确定将选择数据删除?", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(() => {
+            remove(row.id).then(res =>{
+              if(res.data.success){
+                this.$message.success("操作成功!");
+                this.onLoad(this.page);
+              }
+            })
+          });
+        }
+      },
+      //点击搜索按钮触发
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done()
+      },
+      searchReset() {
+        console.log('1')
+      },
+      selectionChange() {
+        console.log('1')
+      },
+      currentChange(val) {
+        this.page.currentPage = val
+      },
+      sizeChange(val) {
+        this.page.currentPage = 1;
+        this.page.pageSize = val;
+      },
+      refreshChange(params) {
+        this.onLoad(this.page,params)
+      },
+      paramsAdjustment(params) {
+        params = Object.assign({}, this.search);
+        if (params.settlementDate &&  params.settlementDate.length !==0 ) {  //合同
+          params.settlementStartDate = params.settlementDate[0]+ " " + "00:00:00";
+          params.settlementEndDate = params.settlementDate[1] + " " + "23:59:59";
+          this.$delete(params,'settlementDate')
+        }
+        return params
+      },
+      onLoad(page, params) {
+        this.loading = true
+        params =  this.paramsAdjustment(params)
+        params.billType = "付费"
+
+        getList(page.currentPage, page.pageSize,params).then(res =>{
+          this.dataList = res.data.data.records
+          this.page.total = res.data.data.total
+        }).finally(()=>{
+          this.loading = false
+        })
+      },
+
+      goBack() {
+        this.detailData=this.$options.data().detailData
+        this.show = true;
+        this.onLoad(this.page,this.search)
+      },
+      //列保存触发
+      async saveColumn() {
+        const inSave = await this.saveColumnData(
+          this.getColumnName(69),
+          this.option
+        );
+        if (inSave) {
+          this.$message.success("保存成功");
+          //关闭窗口
+          this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        }
+      },
+      async resetColumn() {
+        const inSave = await this.delColumnData(
+          this.getColumnName(69),
+          option
+        );
+        if (inSave) {
+          this.$message.success("重置成功");
+          this.option = option;
+          //关闭窗口
+          this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        }
+      },
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 767 - 0
src/views/financialManagement/incomeInvoice/incomeInvoiceDetailsPage.vue

@@ -0,0 +1,767 @@
+<template>
+  <div class="borderless">
+    <div class="customer-head">
+      <div class="customer-back">
+        <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
+                   @click="backToList">返回列表
+        </el-button>
+        <div class="upper_right_button">
+
+          <el-button type="warning"
+                     class="el-button--small-yh"
+                     size="small"
+                     :loading="buttonLoading"
+                     :disabled="!form.id"
+                     @click.stop="confirmSettlement"
+          >{{financeButton?"付费":"撤销付费"}}
+          </el-button>
+          <el-button class="el-button--small-yh"
+                     type="primary"
+                     size="small"
+                     :loading="buttonLoading"
+                     @click.stop="saveSettlement"
+          >保存数据
+          </el-button>
+        </div>
+      </div>
+    </div>
+    <el-tabs v-model="activeName" @tab-click="handleClick" style="padding: 3% 0 0 1%;background: #FFFFFF">
+      <el-tab-pane label="费用明细" name="first" :key="'first'">
+      </el-tab-pane>
+      <el-tab-pane label="开票信息" name="second" :key="'second'">
+      </el-tab-pane>
+    </el-tabs>
+
+    <div class="customer-main" style="margin-top: 1px" v-if="show">
+      <containerTitle title="基础信息"></containerTitle>
+      <basic-container>
+        <avue-form class="trading-form" ref="form" v-model="form" :option="option">
+          <template slot="corpId">
+            <crop-select
+              v-model="form.corpId"
+              corpType="KG"
+              :disabled="!financeDisabled && form.id"
+              @getCorpData="returnBack"
+              style="width: 100%"
+            ></crop-select>
+          </template>
+          <template slot="accountNo">
+            <el-select v-model="form.accountNo"
+                       placeholder="请选择"
+                       :disabled="!financeDisabled && form.id"
+                       @change="accountNoChange"
+                       clearable
+                       filterable>
+              <el-option v-for="(item,index) in form.bankList"
+                         :key="index"
+                         :label="item.accountNo"
+                         :value="item.accountNo"
+              >
+              </el-option>
+            </el-select>
+          </template>
+          <template slot="remark">
+            <el-input type="textarea"
+                      v-model="form.remark"
+                      size="small"
+                      rows="2"
+                      autocomplete="off"
+                      placeholder="">
+            </el-input>
+          </template>
+        </avue-form>
+      </basic-container>
+      <containerTitle title="明细列表"></containerTitle>
+      <basic-container>
+        <avue-crud :option="itemsOption"
+                   :data="dataList"
+                   ref="crud"
+                   v-model="itemsForm"
+                   :page.sync="page"
+                   @search-reset="searchReset"
+                   @row-update="rowUpdate"
+                   @selection-change="selectionChange"
+        >
+          <template slot="menuLeft">
+            <el-button type="primary"
+                       size="small"
+                       :loading="buttonLoading"
+                       icon="el-icon-shopping-cart-2"
+                       :disabled="!financeButton"
+                       @click="selectPurchase">选择采购合同
+            </el-button>
+          </template>
+          <template slot-scope="scope" slot="menu">
+            <el-button
+              type="text"
+              size="small"
+              icon="el-icon-edit"
+              :disabled="!financeButton"
+              @click.stop="rowCell(scope.row,scope.index)"
+            > {{ scope.row.$cellEdit ? '修改完成' : '修改' }}
+            </el-button>
+            <el-button
+              type="text"
+              size="small"
+              icon="el-icon-delete"
+              :disabled="!financeButton"
+              @click.stop="rowDel(scope.row,scope.index)"
+            >删除
+            </el-button>
+          </template>
+          <template slot-scope="{ row }" slot="currency">
+            <el-select  v-if="row.$cellEdit" v-model="row.currency" size="small" placeholder="请选择 币别" clearable filterable>
+              <el-option v-for="(item,index) in currencyDic" :key="index" :label="item.dictValue"  :value="item.dictValue"></el-option>
+            </el-select>
+            <span v-else>{{ row.currency }}</span>
+          </template>
+          <template slot="thisAmount" slot-scope="{ row }">
+            <span v-if="row.$cellEdit" class="required_fields">*</span>
+            <el-input
+              v-if="row.$cellEdit"
+              v-model="row.thisAmount"
+              style="width: 90%"
+              placeholder="请输入"
+              size="small"
+              oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
+            ></el-input>
+            <span v-else>{{ row.thisAmount }}</span>
+          </template>
+        </avue-crud>
+      </basic-container>
+      <el-dialog
+        title="导入采购"
+        append-to-body
+        class="el-dialogDeep"
+        :visible.sync="billDetailDialog"
+        width="60%"
+        :close-on-click-modal="false"
+        :destroy-on-close="true"
+        :close-on-press-escape="false"
+        top="10vh"
+        v-dialog-drag>
+        <bill-detail
+          :params="params"
+          :billType="billType"
+          @closeFun="closeBillDetail"
+          @importProMent="importProMent"
+        >
+        </bill-detail>
+      </el-dialog>
+    </div>
+    <div class="customer-main" style="margin-top: 1px" v-if="!show">
+      <containerTitle title="开票信息"></containerTitle>
+      <basic-container>
+        <avue-form class="trading-form" ref="forms" v-model="forms" :option="options">
+        </avue-form>
+      </basic-container>
+      <containerTitle title="明细列表"></containerTitle>
+      <basic-container>
+        <avue-crud :option="itemsOptions"
+                   :data="dataLists"
+                   ref="cruds"
+                   v-model="itemsForms"
+                   @search-reset="searchReset"
+                   @row-update="rowUpdate"
+                   @selection-change="selectionChange"
+        >
+          <template slot="menuLeft">
+            <el-button type="primary"
+                       size="small"
+                       :loading="buttonLoading"
+                       icon="el-icon-shopping-cart-2"
+                       :disabled="!financeButton"
+                       @click="">录入
+            </el-button>
+          </template>
+          <template slot-scope="scope" slot="menu">
+            <el-button
+              type="text"
+              size="small"
+              icon="el-icon-edit"
+              :disabled="!financeButton"
+              @click.stop="rowCell(scope.row,scope.index)"
+            > {{ scope.row.$cellEdit ? '修改完成' : '修改' }}
+            </el-button>
+            <el-button
+              type="text"
+              size="small"
+              icon="el-icon-delete"
+              :disabled="!financeButton"
+              @click.stop="rowDel(scope.row,scope.index)"
+            >删除
+            </el-button>
+          </template>
+        </avue-crud>
+      </basic-container>
+      <el-dialog
+        title="导入采购"
+        append-to-body
+        class="el-dialogDeep"
+        :visible.sync="billDetailDialog"
+        width="60%"
+        :close-on-click-modal="false"
+        :destroy-on-close="true"
+        :close-on-press-escape="false"
+        top="10vh"
+        v-dialog-drag>
+        <bill-detail
+          :params="params"
+          :billType="billType"
+          @closeFun="closeBillDetail"
+          @importProMent="importProMent"
+        >
+        </bill-detail>
+      </el-dialog>
+    </div>
+  </div>
+</template>
+
+<script>
+  import option from "./configuration/detailsPage.json";
+  import options from "./configuration/invoicepage.json";
+  import { getDetail,editFinance } from "@/api/financialManagement/financialManagement"
+  import { getDetails,modify,cancelModify,saveOrEdit } from "@/api/financialManagement/paymentRequest";
+  import { contrastObj,contrastList } from "@/util/contrastData";
+  import  billDetail from "@/components/bill/billDetailList";
+  import { getlistBankBy } from "@/api/financialManagement/paymentRequest";
+  import _ from "lodash";
+
+  export default {
+    name: "outputInvoiceDetailsPage",
+    props: {
+      detailData: {
+        type: Object
+      }
+    },
+    data() {
+      return {
+        form: {},
+        itemsForm:{},
+        show:true,
+        itemsOption: option,
+        billDetailDialog:false,
+        buttonLoading:false,
+        financeDisabled:false,
+        financeButton:true,
+        billType:"申请",
+        params:{},
+        id:"",
+        dataList: [],
+        currencyDic:[],
+        page: {
+          pageSize: 10,
+          pagerCount: 5,
+          total: 0,
+        },
+        query:{},
+        option: {
+          menuBtn: false,
+          labelWidth: 100,
+          column: [
+            {
+              label: '系统号',
+              prop: 'sysNo',
+              span: 8,
+              disabled: true
+            },{
+              label: '合同号',
+              prop: 'srcOrderno',
+              span: 8,
+              rules: [
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            }, {
+              label: '往来单位',
+              prop: 'corpId',
+              sort:true,
+              span: 8,
+              rules: [
+                {
+                  required: true,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '银行账号',
+              prop: 'accountNo',
+              span: 8,
+              rules: [
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '开户银行',
+              prop: 'accountBank',
+              span: 8,
+              rules: [
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            }, {
+              label: '银行户头',
+              prop: 'accountName',
+              span: 8,
+              rules: [
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '人民币金额',
+              prop: 'amount',
+              span: 8,
+              rules: [
+                {
+                  pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
+                  message: ' ',
+                  trigger: 'blur'
+                },
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '外币金额',
+              prop: 'foreignAmount',
+              span: 8,
+              rules: [
+                {
+                  pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '付款日期',
+              prop: 'settlementDate',
+              format:"yyyy-MM-dd",
+              valueFormat:"yyyy-MM-dd 00:00:00",
+              span: 8,
+              type:"date",
+              rules: [
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '制单人',
+              prop: 'createUserName',
+              span: 8,
+              disabled:true,
+              rules: [
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '制单日期',
+              prop: 'createTime',
+              span: 8,
+              type:"date",
+              disabled:true,
+              rules: [
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '备注',
+              prop: 'remark',
+              span:24,
+              minRows: 2,
+              rules: [
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            },
+          ],
+        },
+        financeStatusDic:[{
+          label:'正常',
+          value:0
+        },{
+          label:'停用',
+          value:1
+        }],
+        //顶部from数据
+        oldForm:{},
+        oldDataList:[],
+
+        activeName:'first',
+        forms:{},
+        options:{
+          menuBtn: false,
+          labelWidth: 100,
+          column: [
+            {
+              label: '发票号',
+              prop: 'sysNo',
+              span: 8,
+            },{
+              label: '开票日期',
+              prop: 'srcOrderno',
+              span: 8,
+              rules: [
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            }, {
+              label: '开票抬头',
+              prop: 'corpId',
+              sort:true,
+              span: 8,
+              rules: [
+                {
+                  required: true,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '纳税人识别号',
+              prop: 'accountNo',
+              span: 8,
+              rules: [
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '地址电话',
+              prop: 'accountBank',
+              span: 8,
+              rules: [
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            }, {
+              label: '开户行账号',
+              prop: 'accountName',
+              span: 8,
+              rules: [
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            },
+          ],
+        },
+        itemsOptions: options,
+      }
+    },
+    components:{
+      billDetail
+    },
+    created() {
+      //币别
+      this.getWorkDicts("currency").then(res =>{
+        this.currencyDic = res.data.data
+      })
+
+      if (this.detailData.id) {
+        this.buttonLoading = true
+        this.id = this.detailData.id;//字符串转数字  超长用BigInt
+        getDetail(this.id).then(res => {
+          this.afterEcho(res.data.data)
+        }).finally(()=>{
+          this.buttonLoading = false
+        })
+      }else{
+        this.form.financeStatus = "待结算"
+        this.oldForm.financeStatus = "待结算"
+      }
+
+      if(this.detailData.params){
+        this.buttonLoading = true
+        getDetails(this.detailData.params).then(res =>{
+          delete res.data.data.id;
+          delete res.data.data.sysNo;
+          delete res.data.data.billType;
+          res.data.data.itemsList.map((items)=>{
+            delete items.id ;
+            items.thisAmount = items.amount
+          })
+          this.afterEcho(res.data.data)
+        }).finally(()=>{
+          this.buttonLoading = false
+        })
+      }
+
+    },
+    mounted() {
+
+    },
+    methods: {
+      handleClick(tab){
+        if(tab.name === "first"){
+          this.show = true
+        }else{
+          this.show = false
+        }
+      },
+      //选择客户
+      returnBack(corpValue){
+        this.corpId = corpValue.id
+        getlistBankBy(corpValue.id).then(res =>{
+          this.$set(this.form,"bankList",res.data)
+        })
+      },
+      //选择卡号
+      accountNoChange(value){
+        this.form.bankList.forEach(item =>{
+          if(item.accountNo == value){
+            this.$set(this.form,"accountBank",item.accountBank)
+            this.$set(this.form,"accountName",item.accountName)
+          }
+        })
+      },
+      selectPurchase(){
+        if(!this.form.corpId){
+          this.$message.warning("请先选择客户!")
+          return
+        }
+        this.params = {
+          corpId: this.form.corpId
+        }
+        this.billDetailDialog = true;
+      },
+      closeBillDetail(){
+        this.billDetailDialog = false;
+      },
+      importProMent(list){
+        list.forEach((item,index) =>{
+          item.accId = item.id;
+          item.srcOrderno  = item.accSysNo
+          item.billNo  = item.srcBillNo
+          delete item.id;
+
+          this.$refs.crud.rowCellAdd(item);
+        })
+        this.$set(this.form,'srcOrderno',Array.from(new Set(this.dataList.map(item =>{ if(item.srcOrderno){return item.srcOrderno}}))).join(','))
+        this.billDetailDialog = false;
+      },
+      rowUpdate(row, index, done) {
+        done(row);
+      },
+      rowCell(row,index){
+        this.$refs.crud.rowCell(row, index)
+        // row.$cellEdit = !row.$cellEdit
+      },
+      rowDel(row,index){
+        this.dataList.splice(index, 1);
+      },
+      searchReset() {
+        console.log('1')
+      },
+      selectionChange() {
+        console.log('1')
+      },
+      confirmSettlement(status){
+        this.$refs["form"].validate((valid,done) => {
+          done();
+          if(valid && this.verificationData()){
+            this.$confirm("是否确认付费?", "提示", {
+              confirmButtonText: "确认",
+              cancelButtonText: "取消",
+              type: "warning",
+            }).then(()=>{
+              for (let i = 0; i < this.dataList.length; i++) {
+                if (this.dataList[i].thisAmount == null || this.dataList[i].thisAmount == 0) {
+                  return this.$message.error(`第${i + 1}行的本次金额不能为空`);
+                }
+              }
+
+              this.buttonLoading = true
+              this.form.billNo = this.dataList.map(item =>{return item.billNo}).join(",")
+
+              const params = {
+                ...this.form,
+                billType:"付费",
+                itemsList:this.dataList
+              }
+              if(this.financeButton){
+                modify(params).then(res =>{
+                  this.$message.success("操作成功!")
+                  this.afterEcho(res.data.data)
+                }).finally(()=>{
+                  this.buttonLoading = false
+                })
+              }else{
+                cancelModify(params).then(res =>{
+                  this.$message.success("操作成功!")
+                  this.afterEcho(res.data.data)
+                }).finally(()=>{
+                  this.buttonLoading = false
+                })
+              }
+
+            })
+            if(status === true){
+              this.$emit("goBack");
+            }
+          }
+        })
+      },
+      saveSettlement(){
+        this.$refs["form"].validate((valid,done) => {
+          if(valid){
+            for (let i = 0; i < this.dataList.length; i++) {
+              if (this.dataList[i].thisAmount == (null || "")) {
+                return this.$message.error(`第输入${i + 1}行的本次金额`);
+              }
+            }
+
+            this.buttonLoading = true
+            this.form.billNo = this.dataList.map(item =>{return item.billNo}).join(",")
+
+            const params = {
+              ...this.form,
+              billType:"付费",
+              itemsList:this.dataList
+            }
+
+            saveOrEdit(params).then(res=>{
+              this.$message.success("操作成功!")
+              this.afterEcho(res.data.data)
+              done();
+            }).finally(()=>{
+              this.buttonLoading = false
+            })
+          }})
+      },
+      afterEcho(data){
+        this.form = data;
+        this.oldForm = Object.assign({},data);
+        this.financeDisabled =  this.form.financeStatus == "待结算"?true:false;
+        //审核状态为空时  说明为新单进来
+        if(this.financeDisabled){
+          this.financeButton = true
+          this.option.column.forEach(item =>{
+            if( item.prop === "remark" || item.prop === "settlementDate"){
+              this.$set(item,"disabled",false)
+            }else if( item.prop === "createUserName" ||  item.prop === "createTime" ||  item.prop === "sysNo" ){
+              this.$set(item,"disabled",true)
+            }else{
+              this.$set(item,"disabled",false)
+            }
+          })
+        }
+        else{
+          this.financeButton = false
+          this.option.column.forEach(item =>{
+            if( item.prop === "remark"){
+              this.$set(item,"disabled",false)
+            }else if( item.prop === "createUserName" ||  item.prop === "createTime" ||  item.prop === "sysNo"){
+              this.$set(item,"disabled",true)
+            }else{
+              this.$set(item,"disabled",true)
+            }
+          })
+        }
+
+        if(data.itemsList){
+          this.dataList = data.itemsList
+          this.oldDataList = this.deepClone(data.itemsList)
+        }
+      },
+      verificationData(){
+        if(contrastObj(this.form,this.oldForm) || contrastList(this.dataList,this.oldDataList)
+        ){
+          this.$confirm("数据发生变化,请先提交保存!", "提示", {
+            confirmButtonText: "保存",
+            cancelButtonText: "取消",
+            type: "warning",
+          }).then(() => {
+            this.saveSettlement()
+          }).catch(()=>{
+            return false
+          })
+        }else{
+          return true
+        }
+      },
+      backToList() {
+        if(contrastObj(this.form,this.oldForm) || contrastList(this.dataList,this.oldDataList)
+        ){
+          this.$confirm("是否保存当前页面?", "提示", {
+            confirmButtonText: "保存",
+            cancelButtonText: "取消",
+            type: "warning",
+          }).then(() => {
+            this.saveSettlement()
+          }).catch(()=>{
+            this.$emit("goBack");
+          })
+        }else{
+          this.$emit("goBack");
+        }
+      },
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  ::v-deep .el-form-item {
+    margin-bottom: 0;
+  }
+
+  .trading-form ::v-deep .el-form-item {
+    margin-bottom: 8px !important;
+  }
+  .required_fields{
+    color: #F56C6C;
+    display:inline-block;
+    width: 7%
+  }
+  .upper_right_button{
+    display: flex;
+    position: fixed;
+    right: 12px;
+    top: 47px;
+  }
+</style>

+ 85 - 0
src/views/financialManagement/outputInvoice/configuration/detailsPage.json

@@ -0,0 +1,85 @@
+{
+  "lazy": true,
+  "tip": false,
+  "simplePage": true,
+  "searchShow": true,
+  "addBtn":false,
+  "editBtn":false,
+  "addRowBtn":false,
+  "cellBtn":false,
+  "cancelBtn":false,
+  "refreshBtn": false,
+  "searchMenuSpan": 6,
+  "align": "center",
+  "delBtn":false,
+  "dialogWidth": "60%",
+  "tree": true,
+  "border": true,
+  "index": true,
+  "selection": false,
+  "menuWidth": 150,
+  "dialogClickModal": false,
+  "showSummary": true,
+  "summaryText": "合计",
+  "sumColumnList": [
+    {
+      "name": "amount",
+      "type": "sum"
+    },
+    {
+      "name": "thisAmount",
+      "type": "sum"
+    }
+  ],
+  "column": [
+    {
+      "label": "合同号",
+      "prop": "srcOrderno",
+      "overHidden": true,
+      "width": 200,
+      "index": 2
+    },
+    {
+      "label": "提单号",
+      "prop": "billNo",
+      "overHidden": true,
+      "width": 200,
+      "index": 3
+    },
+    {
+      "label": "费用名称",
+      "prop": "itemName",
+      "overHidden": true,
+      "width": 200,
+      "index": 4
+    },
+    {
+      "label": "金额",
+      "prop": "amount",
+      "overHidden": true,
+      "width": 150,
+      "index": 7
+    },
+    {
+      "label": "本次金额",
+      "prop": "thisAmount",
+      "overHidden": true,
+      "width": 150,
+      "index": 7
+    },
+    {
+      "label": "币别",
+      "prop": "currency",
+      "index": 7,
+      "width": 120
+    },
+    {
+      "label": "备注",
+      "prop": "remarks",
+      "overHidden": true,
+      "index": 13,
+      "cell": true,
+      "width": 500
+    }
+  ]
+}

+ 97 - 0
src/views/financialManagement/outputInvoice/configuration/invoicepage.json

@@ -0,0 +1,97 @@
+{
+  "lazy": true,
+  "tip": false,
+  "simplePage": true,
+  "searchShow": true,
+  "addBtn":false,
+  "editBtn":false,
+  "addRowBtn":false,
+  "cellBtn":false,
+  "cancelBtn":false,
+  "refreshBtn": false,
+  "searchMenuSpan": 6,
+  "align": "center",
+  "delBtn":false,
+  "dialogWidth": "60%",
+  "tree": true,
+  "border": true,
+  "index": true,
+  "selection": false,
+  "menuWidth": 150,
+  "dialogClickModal": false,
+  "showSummary": true,
+  "summaryText": "合计",
+  "sumColumnList": [
+    {
+      "name": "amount",
+      "type": "sum"
+    }
+  ],
+  "column": [
+    {
+      "label": "货物",
+      "prop": "srcOrderno",
+      "overHidden": true,
+      "width": 200,
+      "index": 2
+    },
+    {
+      "label": "服务名称",
+      "prop": "billNo",
+      "overHidden": true,
+      "width": 200,
+      "index": 3
+    },
+    {
+      "label": "费用名称",
+      "prop": "itemName",
+      "overHidden": true,
+      "width": 200,
+      "index": 4
+    },
+    {
+      "label": "规格型号",
+      "prop": "amount",
+      "overHidden": true,
+      "width": 150,
+      "index": 7
+    },
+    {
+      "label": "单位",
+      "prop": "thisAmount",
+      "overHidden": true,
+      "width": 150,
+      "index": 7
+    },
+    {
+      "label": "数量",
+      "prop": "currency",
+      "index": 7,
+      "width": 120
+    },
+    {
+      "label": "单价(含税)",
+      "prop": "currency",
+      "index": 7,
+      "width": 120
+    },
+    {
+      "label": "金额(含税)",
+      "prop": "currency",
+      "index": 7,
+      "width": 120
+    },
+    {
+      "label": "税率",
+      "prop": "currency",
+      "index": 7,
+      "width": 120
+    },
+    {
+      "label": "税额",
+      "prop": "currency",
+      "index": 7,
+      "width": 120
+    }
+  ]
+}

+ 156 - 0
src/views/financialManagement/outputInvoice/configuration/mainList.json

@@ -0,0 +1,156 @@
+{
+  "lazy": true,
+  "tip": false,
+  "simplePage": true,
+  "searchShow": true,
+  "searchMenuSpan": 16,
+  "dialogWidth": "60%",
+  "align": "center",
+  "height": "auto",
+  "searchSpan": 8,
+  "searchMenuPosition": "right",
+  "border": true,
+  "index": true,
+  "selection": false,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "menuWidth": 130,
+  "dialogClickModal": false,
+  "searchLabelWidth": 120,
+  "searchIcon": true,
+  "searchIndex": 2,
+  "addBtn":false,
+  "headerAlign": "center",
+  "showSummary": true,
+  "summaryText": "合计",
+  "sumColumnList": [
+    {
+      "name": "amount",
+      "type": "sum"
+    }
+  ],
+  "column": [
+    {
+      "label": "合同号",
+      "prop": "srcOrderno",
+      "overHidden": true,
+      "search": true,
+      "width": 150,
+      "index": 2
+    },
+    {
+      "label": "提单号",
+      "prop": "billNo",
+      "search": true,
+      "overHidden": true,
+      "width": 150,
+      "index": 3
+    },
+    {
+      "label": "往来单位",
+      "prop": "corpId",
+      "search": true,
+      "hide": true
+    },
+    {
+      "label": "客户名称",
+      "prop": "corpName",
+      "overHidden": true,
+      "width": 200,
+      "index": 4
+    },
+    {
+      "label": "单据状态",
+      "prop": "financeStatus",
+      "type": "select",
+      "search": true,
+      "overHidden": true,
+      "index": 1,
+      "width": 120,
+      "dicData": [
+        {
+          "label": "待结算",
+          "value":"待结算"
+        },
+        {
+          "label": "结算完成",
+          "value": "结算完成"
+        }
+      ]
+    },
+    {
+      "label": "人民币金额",
+      "prop": "amount",
+      "overHidden": true,
+      "width": 120,
+      "index": 5
+    },
+    {
+      "label": "外币金额",
+      "prop": "foreignAmount",
+      "overHidden": true,
+      "width": 120,
+      "index": 5
+    },
+    {
+      "label": "结算日期",
+      "prop": "settlementDate",
+      "overHidden": true,
+      "type": "date",
+      "search": true,
+      "unlinkPanels": true,
+      "searchRange": true,
+      "width": 150,
+      "index": 6
+    },
+
+    {
+      "label": "银行名称",
+      "prop": "accountBank",
+      "overHidden": true,
+      "width": 150,
+      "index": 7
+    },
+    {
+      "label": "银行户头",
+      "prop": "accountName",
+      "search": true,
+      "overHidden": true,
+      "width": 150,
+      "index": 8
+    },
+    {
+      "label": "银行卡号",
+      "prop": "accountNo",
+      "overHidden": true,
+      "width": 150,
+      "index": 9
+    },
+    {
+      "label": "申请人",
+      "prop": "createUserName",
+      "overHidden": true,
+      "index": 10,
+      "width": 120
+    },
+    {
+      "label": "申请日期",
+      "prop": "createTime",
+      "overHidden": true,
+      "type": "date",
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd",
+      "width": 150,
+      "index": 11
+    },
+    {
+      "label": "备注",
+      "prop": "remark",
+      "search": true,
+      "overHidden": true,
+      "index": 12,
+      "width": 120
+    }
+  ]
+}

+ 231 - 0
src/views/financialManagement/outputInvoice/outputInvoice.vue

@@ -0,0 +1,231 @@
+<template>
+  <basic-container v-if="show">
+    <avue-crud :option="option"
+               :data="dataList"
+               ref="crud"
+               v-model="form"
+               :page.sync="page"
+               :search.sync="search"
+               :table-loading="loading"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @saveColumn="saveColumn"
+               @resetColumn="resetColumn"
+               @on-load="onLoad">
+      <template slot="corpIdSearch">
+        <select-component
+          v-model="search.corpId"
+          :configuration="configuration"
+        ></select-component>
+      </template>
+      <template slot="menuLeft">
+        <el-button type="primary"
+                   size="small"
+                   icon="el-icon-plus"
+                   @click="addReceipt">创建单据
+        </el-button>
+      </template>
+      <template slot-scope="scope" slot="menu">
+        <el-button
+          type="text"
+          size="small"
+          icon="el-icon-edit"
+          @click.stop="editOpen(scope.row, 2)"
+        >编辑
+        </el-button>
+        <el-button
+          type="text"
+          size="small"
+          icon="el-icon-delete"
+          @click.stop="rowDel(scope.row, scope.index)"
+        >删除
+        </el-button>
+      </template>
+    </avue-crud>
+  </basic-container>
+  <detail-page
+    ref="detail"
+    @goBack="goBack"
+    :detailData="detailData"
+    v-else
+  ></detail-page>
+</template>
+
+<script>
+  import option from "./configuration/mainList.json";
+  import {getList ,remove} from "@/api/financialManagement/financialManagement"
+  import detailPage from "./outputInvoiceDetailsPage";
+
+  export default {
+    name: "outputInvoice",
+    data() {
+      return {
+        loading : false,
+        form: {},
+        search:{},
+        show:true,
+        detailData:{},
+        option: option,
+        dataList: [],
+        page: {
+          currentPage: 1,
+          total: 0,
+          pageSize: 10,
+          pageSizes: [10, 50, 100, 200, 300, 400, 500,1000]
+        },
+        query:{},
+        configuration:{
+          multipleChoices:false,
+          multiple:false,
+          disabled:false,
+          searchShow:true,
+          collapseTags:false,
+          clearable:true,
+          placeholder:'请点击右边按钮选择',
+          dicData:[]
+        },
+      }
+    },
+    activated() {
+      if(!this.show && !this.$store.getters.outputStatus){
+        this.show = true;
+      }
+      setTimeout(() => {
+        if(this.$route.query.params  && this.show){
+          this.detailData={
+            id:this.$route.query.params
+          }
+          this.show = false;
+          this.$store.commit("OUTPUT_IN_DETAIL");
+        }
+      }, 100);
+    },
+    components:{
+      detailPage
+    },
+    async created() {
+      // this.option = await this.getColumnData(this.getColumnName(69), option);
+    },
+    mounted() {
+
+    },
+    methods: {
+      //新单打开
+      addReceipt(row){
+        this.detailData = {
+          id: row.id,
+          status: 1
+        };
+        this.show = false;
+        this.$store.commit("OUTPUT_IN_DETAIL");
+      },
+      //编辑打开
+      editOpen(row, status){
+        this.detailData = {
+          id: row.id,
+          status: status
+        };
+        this.show = false;
+        this.$store.commit("OUTPUT_IN_DETAIL");
+      },
+      rowDel(row, index, done) {
+        if(row.id){
+          this.$confirm("确定将选择数据删除?", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(() => {
+            remove(row.id).then(res =>{
+              if(res.data.success){
+                this.$message.success("操作成功!");
+                this.onLoad(this.page);
+              }
+            })
+          });
+        }
+      },
+      //点击搜索按钮触发
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done()
+      },
+      searchReset() {
+        console.log('1')
+      },
+      selectionChange() {
+        console.log('1')
+      },
+      currentChange(val) {
+        this.page.currentPage = val
+      },
+      sizeChange(val) {
+        this.page.currentPage = 1;
+        this.page.pageSize = val;
+      },
+      refreshChange(params) {
+        this.onLoad(this.page,params)
+      },
+      paramsAdjustment(params) {
+        params = Object.assign({}, this.search);
+        if (params.settlementDate &&  params.settlementDate.length !==0 ) {  //合同
+          params.settlementStartDate = params.settlementDate[0]+ " " + "00:00:00";
+          params.settlementEndDate = params.settlementDate[1] + " " + "23:59:59";
+          this.$delete(params,'settlementDate')
+        }
+        return params
+      },
+      onLoad(page, params) {
+        this.loading = true
+        params =  this.paramsAdjustment(params)
+        params.billType = "付费"
+
+        getList(page.currentPage, page.pageSize,params).then(res =>{
+          this.dataList = res.data.data.records
+          this.page.total = res.data.data.total
+        }).finally(()=>{
+          this.loading = false
+        })
+      },
+
+      goBack() {
+        this.detailData=this.$options.data().detailData
+        this.show = true;
+        this.onLoad(this.page,this.search)
+      },
+      //列保存触发
+      async saveColumn() {
+        const inSave = await this.saveColumnData(
+          this.getColumnName(69),
+          this.option
+        );
+        if (inSave) {
+          this.$message.success("保存成功");
+          //关闭窗口
+          this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        }
+      },
+      async resetColumn() {
+        const inSave = await this.delColumnData(
+          this.getColumnName(69),
+          option
+        );
+        if (inSave) {
+          this.$message.success("重置成功");
+          this.option = option;
+          //关闭窗口
+          this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        }
+      },
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 767 - 0
src/views/financialManagement/outputInvoice/outputInvoiceDetailsPage.vue

@@ -0,0 +1,767 @@
+<template>
+  <div class="borderless">
+    <div class="customer-head">
+      <div class="customer-back">
+        <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
+                   @click="backToList">返回列表
+        </el-button>
+        <div class="upper_right_button">
+
+          <el-button type="warning"
+                     class="el-button--small-yh"
+                     size="small"
+                     :loading="buttonLoading"
+                     :disabled="!form.id"
+                     @click.stop="confirmSettlement"
+          >{{financeButton?"付费":"撤销付费"}}
+          </el-button>
+          <el-button class="el-button--small-yh"
+                     type="primary"
+                     size="small"
+                     :loading="buttonLoading"
+                     @click.stop="saveSettlement"
+          >保存数据
+          </el-button>
+        </div>
+      </div>
+    </div>
+    <el-tabs v-model="activeName" @tab-click="handleClick" style="padding: 3% 0 0 1%;background: #FFFFFF">
+      <el-tab-pane label="费用明细" name="first" :key="'first'">
+      </el-tab-pane>
+      <el-tab-pane label="开票信息" name="second" :key="'second'">
+      </el-tab-pane>
+    </el-tabs>
+
+    <div class="customer-main" style="margin-top: 1px" v-if="show">
+      <containerTitle title="基础信息"></containerTitle>
+      <basic-container>
+        <avue-form class="trading-form" ref="form" v-model="form" :option="option">
+          <template slot="corpId">
+            <crop-select
+              v-model="form.corpId"
+              corpType="KG"
+              :disabled="!financeDisabled && form.id"
+              @getCorpData="returnBack"
+              style="width: 100%"
+            ></crop-select>
+          </template>
+          <template slot="accountNo">
+            <el-select v-model="form.accountNo"
+                       placeholder="请选择"
+                       :disabled="!financeDisabled && form.id"
+                       @change="accountNoChange"
+                       clearable
+                       filterable>
+              <el-option v-for="(item,index) in form.bankList"
+                         :key="index"
+                         :label="item.accountNo"
+                         :value="item.accountNo"
+              >
+              </el-option>
+            </el-select>
+          </template>
+          <template slot="remark">
+            <el-input type="textarea"
+                      v-model="form.remark"
+                      size="small"
+                      rows="2"
+                      autocomplete="off"
+                      placeholder="">
+            </el-input>
+          </template>
+        </avue-form>
+      </basic-container>
+      <containerTitle title="明细列表"></containerTitle>
+      <basic-container>
+        <avue-crud :option="itemsOption"
+                   :data="dataList"
+                   ref="crud"
+                   v-model="itemsForm"
+                   :page.sync="page"
+                   @search-reset="searchReset"
+                   @row-update="rowUpdate"
+                   @selection-change="selectionChange"
+        >
+          <template slot="menuLeft">
+            <el-button type="primary"
+                       size="small"
+                       :loading="buttonLoading"
+                       icon="el-icon-shopping-cart-2"
+                       :disabled="!financeButton"
+                       @click="selectPurchase">选择采购合同
+            </el-button>
+          </template>
+          <template slot-scope="scope" slot="menu">
+            <el-button
+              type="text"
+              size="small"
+              icon="el-icon-edit"
+              :disabled="!financeButton"
+              @click.stop="rowCell(scope.row,scope.index)"
+            > {{ scope.row.$cellEdit ? '修改完成' : '修改' }}
+            </el-button>
+            <el-button
+              type="text"
+              size="small"
+              icon="el-icon-delete"
+              :disabled="!financeButton"
+              @click.stop="rowDel(scope.row,scope.index)"
+            >删除
+            </el-button>
+          </template>
+          <template slot-scope="{ row }" slot="currency">
+            <el-select  v-if="row.$cellEdit" v-model="row.currency" size="small" placeholder="请选择 币别" clearable filterable>
+              <el-option v-for="(item,index) in currencyDic" :key="index" :label="item.dictValue"  :value="item.dictValue"></el-option>
+            </el-select>
+            <span v-else>{{ row.currency }}</span>
+          </template>
+          <template slot="thisAmount" slot-scope="{ row }">
+            <span v-if="row.$cellEdit" class="required_fields">*</span>
+            <el-input
+              v-if="row.$cellEdit"
+              v-model="row.thisAmount"
+              style="width: 90%"
+              placeholder="请输入"
+              size="small"
+              oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
+            ></el-input>
+            <span v-else>{{ row.thisAmount }}</span>
+          </template>
+        </avue-crud>
+      </basic-container>
+      <el-dialog
+        title="导入采购"
+        append-to-body
+        class="el-dialogDeep"
+        :visible.sync="billDetailDialog"
+        width="60%"
+        :close-on-click-modal="false"
+        :destroy-on-close="true"
+        :close-on-press-escape="false"
+        top="10vh"
+        v-dialog-drag>
+        <bill-detail
+          :params="params"
+          :billType="billType"
+          @closeFun="closeBillDetail"
+          @importProMent="importProMent"
+        >
+        </bill-detail>
+      </el-dialog>
+    </div>
+    <div class="customer-main" style="margin-top: 1px" v-if="!show">
+      <containerTitle title="开票信息"></containerTitle>
+      <basic-container>
+        <avue-form class="trading-form" ref="forms" v-model="forms" :option="options">
+        </avue-form>
+      </basic-container>
+      <containerTitle title="明细列表"></containerTitle>
+      <basic-container>
+        <avue-crud :option="itemsOptions"
+                   :data="dataLists"
+                   ref="cruds"
+                   v-model="itemsForms"
+                   @search-reset="searchReset"
+                   @row-update="rowUpdate"
+                   @selection-change="selectionChange"
+        >
+          <template slot="menuLeft">
+            <el-button type="primary"
+                       size="small"
+                       :loading="buttonLoading"
+                       icon="el-icon-shopping-cart-2"
+                       :disabled="!financeButton"
+                       @click="">录入
+            </el-button>
+          </template>
+          <template slot-scope="scope" slot="menu">
+            <el-button
+              type="text"
+              size="small"
+              icon="el-icon-edit"
+              :disabled="!financeButton"
+              @click.stop="rowCell(scope.row,scope.index)"
+            > {{ scope.row.$cellEdit ? '修改完成' : '修改' }}
+            </el-button>
+            <el-button
+              type="text"
+              size="small"
+              icon="el-icon-delete"
+              :disabled="!financeButton"
+              @click.stop="rowDel(scope.row,scope.index)"
+            >删除
+            </el-button>
+          </template>
+        </avue-crud>
+      </basic-container>
+      <el-dialog
+        title="导入采购"
+        append-to-body
+        class="el-dialogDeep"
+        :visible.sync="billDetailDialog"
+        width="60%"
+        :close-on-click-modal="false"
+        :destroy-on-close="true"
+        :close-on-press-escape="false"
+        top="10vh"
+        v-dialog-drag>
+        <bill-detail
+          :params="params"
+          :billType="billType"
+          @closeFun="closeBillDetail"
+          @importProMent="importProMent"
+        >
+        </bill-detail>
+      </el-dialog>
+    </div>
+  </div>
+</template>
+
+<script>
+  import option from "./configuration/detailsPage.json";
+  import options from "./configuration/invoicepage.json";
+  import { getDetail,editFinance } from "@/api/financialManagement/financialManagement"
+  import { getDetails,modify,cancelModify,saveOrEdit } from "@/api/financialManagement/paymentRequest";
+  import { contrastObj,contrastList } from "@/util/contrastData";
+  import  billDetail from "@/components/bill/billDetailList";
+  import { getlistBankBy } from "@/api/financialManagement/paymentRequest";
+  import _ from "lodash";
+
+  export default {
+    name: "outputInvoiceDetailsPage",
+    props: {
+      detailData: {
+        type: Object
+      }
+    },
+    data() {
+      return {
+        form: {},
+        itemsForm:{},
+        show:true,
+        itemsOption: option,
+        billDetailDialog:false,
+        buttonLoading:false,
+        financeDisabled:false,
+        financeButton:true,
+        billType:"申请",
+        params:{},
+        id:"",
+        dataList: [],
+        currencyDic:[],
+        page: {
+          pageSize: 10,
+          pagerCount: 5,
+          total: 0,
+        },
+        query:{},
+        option: {
+          menuBtn: false,
+          labelWidth: 100,
+          column: [
+            {
+              label: '系统号',
+              prop: 'sysNo',
+              span: 8,
+              disabled: true
+            },{
+              label: '合同号',
+              prop: 'srcOrderno',
+              span: 8,
+              rules: [
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            }, {
+              label: '往来单位',
+              prop: 'corpId',
+              sort:true,
+              span: 8,
+              rules: [
+                {
+                  required: true,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '银行账号',
+              prop: 'accountNo',
+              span: 8,
+              rules: [
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '开户银行',
+              prop: 'accountBank',
+              span: 8,
+              rules: [
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            }, {
+              label: '银行户头',
+              prop: 'accountName',
+              span: 8,
+              rules: [
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '人民币金额',
+              prop: 'amount',
+              span: 8,
+              rules: [
+                {
+                  pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
+                  message: ' ',
+                  trigger: 'blur'
+                },
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '外币金额',
+              prop: 'foreignAmount',
+              span: 8,
+              rules: [
+                {
+                  pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '付款日期',
+              prop: 'settlementDate',
+              format:"yyyy-MM-dd",
+              valueFormat:"yyyy-MM-dd 00:00:00",
+              span: 8,
+              type:"date",
+              rules: [
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '制单人',
+              prop: 'createUserName',
+              span: 8,
+              disabled:true,
+              rules: [
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '制单日期',
+              prop: 'createTime',
+              span: 8,
+              type:"date",
+              disabled:true,
+              rules: [
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '备注',
+              prop: 'remark',
+              span:24,
+              minRows: 2,
+              rules: [
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            },
+          ],
+        },
+        financeStatusDic:[{
+          label:'正常',
+          value:0
+        },{
+          label:'停用',
+          value:1
+        }],
+        //顶部from数据
+        oldForm:{},
+        oldDataList:[],
+
+        activeName:'first',
+        forms:{},
+        options:{
+          menuBtn: false,
+          labelWidth: 100,
+          column: [
+            {
+              label: '发票号',
+              prop: 'sysNo',
+              span: 8,
+            },{
+              label: '开票日期',
+              prop: 'srcOrderno',
+              span: 8,
+              rules: [
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            }, {
+              label: '开票抬头',
+              prop: 'corpId',
+              sort:true,
+              span: 8,
+              rules: [
+                {
+                  required: true,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '纳税人识别号',
+              prop: 'accountNo',
+              span: 8,
+              rules: [
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            },
+            {
+              label: '地址电话',
+              prop: 'accountBank',
+              span: 8,
+              rules: [
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            }, {
+              label: '开户行账号',
+              prop: 'accountName',
+              span: 8,
+              rules: [
+                {
+                  required: false,
+                  message: ' ',
+                  trigger: 'blur'
+                }
+              ]
+            },
+          ],
+        },
+        itemsOptions: options,
+      }
+    },
+    components:{
+      billDetail
+    },
+    created() {
+      //币别
+      this.getWorkDicts("currency").then(res =>{
+        this.currencyDic = res.data.data
+      })
+
+      if (this.detailData.id) {
+        this.buttonLoading = true
+        this.id = this.detailData.id;//字符串转数字  超长用BigInt
+        getDetail(this.id).then(res => {
+          this.afterEcho(res.data.data)
+        }).finally(()=>{
+          this.buttonLoading = false
+        })
+      }else{
+        this.form.financeStatus = "待结算"
+        this.oldForm.financeStatus = "待结算"
+      }
+
+      if(this.detailData.params){
+        this.buttonLoading = true
+        getDetails(this.detailData.params).then(res =>{
+          delete res.data.data.id;
+          delete res.data.data.sysNo;
+          delete res.data.data.billType;
+          res.data.data.itemsList.map((items)=>{
+            delete items.id ;
+            items.thisAmount = items.amount
+          })
+          this.afterEcho(res.data.data)
+        }).finally(()=>{
+          this.buttonLoading = false
+        })
+      }
+
+    },
+    mounted() {
+
+    },
+    methods: {
+      handleClick(tab){
+        if(tab.name === "first"){
+          this.show = true
+        }else{
+          this.show = false
+        }
+      },
+      //选择客户
+      returnBack(corpValue){
+        this.corpId = corpValue.id
+        getlistBankBy(corpValue.id).then(res =>{
+          this.$set(this.form,"bankList",res.data)
+        })
+      },
+      //选择卡号
+      accountNoChange(value){
+        this.form.bankList.forEach(item =>{
+          if(item.accountNo == value){
+            this.$set(this.form,"accountBank",item.accountBank)
+            this.$set(this.form,"accountName",item.accountName)
+          }
+        })
+      },
+      selectPurchase(){
+        if(!this.form.corpId){
+          this.$message.warning("请先选择客户!")
+          return
+        }
+        this.params = {
+          corpId: this.form.corpId
+        }
+        this.billDetailDialog = true;
+      },
+      closeBillDetail(){
+        this.billDetailDialog = false;
+      },
+      importProMent(list){
+        list.forEach((item,index) =>{
+          item.accId = item.id;
+          item.srcOrderno  = item.accSysNo
+          item.billNo  = item.srcBillNo
+          delete item.id;
+
+          this.$refs.crud.rowCellAdd(item);
+        })
+        this.$set(this.form,'srcOrderno',Array.from(new Set(this.dataList.map(item =>{ if(item.srcOrderno){return item.srcOrderno}}))).join(','))
+        this.billDetailDialog = false;
+      },
+      rowUpdate(row, index, done) {
+        done(row);
+      },
+      rowCell(row,index){
+        this.$refs.crud.rowCell(row, index)
+        // row.$cellEdit = !row.$cellEdit
+      },
+      rowDel(row,index){
+        this.dataList.splice(index, 1);
+      },
+      searchReset() {
+        console.log('1')
+      },
+      selectionChange() {
+        console.log('1')
+      },
+      confirmSettlement(status){
+        this.$refs["form"].validate((valid,done) => {
+          done();
+          if(valid && this.verificationData()){
+            this.$confirm("是否确认付费?", "提示", {
+              confirmButtonText: "确认",
+              cancelButtonText: "取消",
+              type: "warning",
+            }).then(()=>{
+              for (let i = 0; i < this.dataList.length; i++) {
+                if (this.dataList[i].thisAmount == null || this.dataList[i].thisAmount == 0) {
+                  return this.$message.error(`第${i + 1}行的本次金额不能为空`);
+                }
+              }
+
+              this.buttonLoading = true
+              this.form.billNo = this.dataList.map(item =>{return item.billNo}).join(",")
+
+              const params = {
+                ...this.form,
+                billType:"付费",
+                itemsList:this.dataList
+              }
+              if(this.financeButton){
+                modify(params).then(res =>{
+                  this.$message.success("操作成功!")
+                  this.afterEcho(res.data.data)
+                }).finally(()=>{
+                  this.buttonLoading = false
+                })
+              }else{
+                cancelModify(params).then(res =>{
+                  this.$message.success("操作成功!")
+                  this.afterEcho(res.data.data)
+                }).finally(()=>{
+                  this.buttonLoading = false
+                })
+              }
+
+            })
+            if(status === true){
+              this.$emit("goBack");
+            }
+          }
+        })
+      },
+      saveSettlement(){
+        this.$refs["form"].validate((valid,done) => {
+          if(valid){
+            for (let i = 0; i < this.dataList.length; i++) {
+              if (this.dataList[i].thisAmount == (null || "")) {
+                return this.$message.error(`第输入${i + 1}行的本次金额`);
+              }
+            }
+
+            this.buttonLoading = true
+            this.form.billNo = this.dataList.map(item =>{return item.billNo}).join(",")
+
+            const params = {
+              ...this.form,
+              billType:"付费",
+              itemsList:this.dataList
+            }
+
+            saveOrEdit(params).then(res=>{
+              this.$message.success("操作成功!")
+              this.afterEcho(res.data.data)
+              done();
+            }).finally(()=>{
+              this.buttonLoading = false
+            })
+          }})
+      },
+      afterEcho(data){
+        this.form = data;
+        this.oldForm = Object.assign({},data);
+        this.financeDisabled =  this.form.financeStatus == "待结算"?true:false;
+        //审核状态为空时  说明为新单进来
+        if(this.financeDisabled){
+          this.financeButton = true
+          this.option.column.forEach(item =>{
+            if( item.prop === "remark" || item.prop === "settlementDate"){
+              this.$set(item,"disabled",false)
+            }else if( item.prop === "createUserName" ||  item.prop === "createTime" ||  item.prop === "sysNo" ){
+              this.$set(item,"disabled",true)
+            }else{
+              this.$set(item,"disabled",false)
+            }
+          })
+        }
+        else{
+          this.financeButton = false
+          this.option.column.forEach(item =>{
+            if( item.prop === "remark"){
+              this.$set(item,"disabled",false)
+            }else if( item.prop === "createUserName" ||  item.prop === "createTime" ||  item.prop === "sysNo"){
+              this.$set(item,"disabled",true)
+            }else{
+              this.$set(item,"disabled",true)
+            }
+          })
+        }
+
+        if(data.itemsList){
+          this.dataList = data.itemsList
+          this.oldDataList = this.deepClone(data.itemsList)
+        }
+      },
+      verificationData(){
+        if(contrastObj(this.form,this.oldForm) || contrastList(this.dataList,this.oldDataList)
+        ){
+          this.$confirm("数据发生变化,请先提交保存!", "提示", {
+            confirmButtonText: "保存",
+            cancelButtonText: "取消",
+            type: "warning",
+          }).then(() => {
+            this.saveSettlement()
+          }).catch(()=>{
+            return false
+          })
+        }else{
+          return true
+        }
+      },
+      backToList() {
+        if(contrastObj(this.form,this.oldForm) || contrastList(this.dataList,this.oldDataList)
+        ){
+          this.$confirm("是否保存当前页面?", "提示", {
+            confirmButtonText: "保存",
+            cancelButtonText: "取消",
+            type: "warning",
+          }).then(() => {
+            this.saveSettlement()
+          }).catch(()=>{
+            this.$emit("goBack");
+          })
+        }else{
+          this.$emit("goBack");
+        }
+      },
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  ::v-deep .el-form-item {
+    margin-bottom: 0;
+  }
+
+  .trading-form ::v-deep .el-form-item {
+    margin-bottom: 8px !important;
+  }
+  .required_fields{
+    color: #F56C6C;
+    display:inline-block;
+    width: 7%
+  }
+  .upper_right_button{
+    display: flex;
+    position: fixed;
+    right: 12px;
+    top: 47px;
+  }
+</style>

+ 1 - 1
src/views/purchase/contract/detailsPage.vue

@@ -80,7 +80,7 @@
     <div class="customer-main">
       <el-form :model="form" ref="form" label-width="130px">
         <containerTitle title="基础信息"></containerTitle>
-        <basic-container style="margin-bottom: 10px">
+        <basic-container style="margin-bottom: 10px" :showBtn="true">
           <el-row>
             <el-col v-for="(item, index) in basicData.column" :span="item.span?item.span:8" :key="index">
               <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">

+ 28 - 0
src/views/wel/components/quick-launch.vue

@@ -43,6 +43,22 @@
           <i class="tradingIcon icon-pay" style="color:#576892"></i>
           <span>业绩分析</span>
         </div>
+        <div class="content-icon" v-if="sysType === 5" @click="inPage('tj')">
+          <i class="tradingIcon icon-pay" style="color:#57927a"></i>
+          <span>统计列表</span>
+        </div>
+        <div class="content-icon" v-if="sysType === 5" @click="inPage('fw')">
+          <i class="tradingIcon icon-pay" style="color:#576892"></i>
+          <span>服务项目</span>
+        </div>
+        <div class="content-icon" v-if="sysType === 5" @click="inPage('sp')">
+          <i class="tradingIcon icon-pay" style="color:#57927a"></i>
+          <span>商品信息</span>
+        </div>
+        <div class="content-icon" v-if="sysType === 5" @click="inPage('fy')">
+          <i class="tradingIcon icon-pay" style="color:#576892"></i>
+          <span>费用详情</span>
+        </div>
       </div>
     </el-card>
   </div>
@@ -124,6 +140,18 @@ export default {
           case "yf":
             this.$router.push("/workManagement/performanceAnalysis/index");
             break;
+          case "tj":
+            this.$router.push("/workManagement/receipt/statisticalList");
+            break;
+          case "fw":
+            this.$router.push("/workManagement/service-items/project");
+            break;
+          case "sp":
+            this.$router.push("/basicData/commodityType/index");
+            break;
+          case "fy":
+            this.$router.push("/basicData/basicFeesDesc/index");
+            break;
         }
       }
 

+ 47 - 1
src/views/wel/components/realtime-data.vue

@@ -30,7 +30,7 @@
         </span>
       </div>
       <div style="display: flex;justify-content: center;">
-        <div class="content" v-loading="loading">
+        <div class="content" v-if="sysType !== 5" v-loading="loading">
           <div class="content-item">
             <div class="card">
               <div class="card-title card-title1">
@@ -87,6 +87,49 @@
             </div>
           </div>
         </div>
+        <div class="content" v-if="sysType === 5" v-loading="loading">
+          <div class="content-item">
+            <div class="card">
+              <div class="card-title card-title1">
+                <span>
+                  主
+                </span>
+              </div>
+              <div class="card-content">
+                <span class="card-content-num">1</span>
+                <span class="card-content-text">主营业务</span>
+              </div>
+            </div>
+          </div>
+          <div class="divider" />
+          <div class="content-item">
+            <div class="card">
+              <div class="card-title card-title2">
+                <span>
+                  已
+                </span>
+              </div>
+              <div class="card-content">
+                <span class="card-content-num">1</span>
+                <span class="card-content-text">已结(条)</span>
+              </div>
+            </div>
+          </div>
+          <div class="divider" />
+          <div class="content-item">
+            <div class="card">
+              <div class="card-title card-title3">
+                <span>
+                  未
+                </span>
+              </div>
+              <div class="card-content">
+                <span class="card-content-num">1</span>
+                <span class="card-content-text">未结(条)</span>
+              </div>
+            </div>
+          </div>
+        </div>
       </div>
     </el-card>
   </div>
@@ -95,6 +138,9 @@
 <script>
 export default {
   name: "basicContainer",
+  props: {
+    sysType: Number
+  },
   data() {
     return {
       isActive: true,

+ 36 - 9
src/views/wel/components/sales-trend.vue

@@ -1,24 +1,47 @@
 <template>
   <div class="home-container">
-    <el-card class="home-container__card">
-      <div class="title">
+    <el-card  class="home-container__card">
+      <div v-if="sysType !== 5">
+        <div class="title">
         <span>
           销售趋势
         </span>
-        <span>
+          <span>
           <i
             class="el-icon-refresh-right"
             style="cursor: pointer;font-size:20px"
             @click="refresh"
           ></i>
         </span>
+        </div>
+        <div class="content" v-loading="loading">
+          <div
+            id="polylineData"
+            ref="polylineData"
+            style="width:60vw;height:33vh"
+          />
+        </div>
       </div>
-      <div class="content" v-loading="loading">
-        <div
-          id="polylineData"
-          ref="polylineData"
-          style="width:60vw;height:33vh"
-        />
+      <div v-if="sysType === 5">
+        <div class="title">
+        <span>
+          业绩趋势
+        </span>
+          <span>
+          <i
+            class="el-icon-refresh-right"
+            style="cursor: pointer;font-size:20px"
+            @click="refresh"
+          ></i>
+        </span>
+        </div>
+        <div class="content" v-loading="loading">
+          <div
+            id="polylineDatas"
+            ref="polylineData"
+            style="width:60vw;height:33vh"
+          />
+        </div>
       </div>
     </el-card>
   </div>
@@ -27,6 +50,9 @@
 <script>
 export default {
   name: "basicContainer",
+  props: {
+    sysType: Number
+  },
   data() {
     return {
       loading: false
@@ -46,6 +72,7 @@ export default {
       let polylineData = this.$echarts.init(
         document.getElementById("polylineData")
       );
+      // document.getElementById("polylineDatas")
       polylineData.setOption({
         xAxis: {
           type: "category",

+ 5 - 5
src/views/wel/home/defaultPage.vue

@@ -2,11 +2,11 @@
   <div class="container">
     <quick-launch class="item1" :sysType="sysType" />
     <audit-data class="item2" :sysType="sysType"/>
-    <realtime-data class="item3" />
-    <sales-reached class="item4" />
-    <sales-trend class="item5" />
-    <charge-today class="item6" />
-    <pay-today class="item7" />
+    <realtime-data class="item3" :sysType="sysType"/>
+    <sales-reached class="item4" :sysType="sysType"/>
+    <sales-trend class="item5" :sysType="sysType"/>
+    <charge-today class="item6" :sysType="sysType"/>
+    <pay-today class="item7" :sysType="sysType"/>
   </div>
 </template>
 

+ 44 - 66
src/views/workManagement/performanceAnalysis/config/clientList.json

@@ -85,149 +85,127 @@
   ],
   "column": [
     {
+      "label": "类型",
+      "prop": "flag",
+      "searchValue": "2",
+      "search": true,
+      "hide": true,
+      "index": 1
+    },
+    {
+      "label": "年份",
+      "prop": "year",
+      "search": true,
+      "hide": true,
+      "index": 2,
+      "type": "select",
+      "searchValue": "2022"
+    },
+    {
       "label": "客户名称",
       "prop": "corpNames",
       "search": true,
       "overHidden": true,
       "width": 120,
-      "index": 1
+      "index": 3
     },
     {
       "label": "承做人数量",
       "prop": "countUserName",
       "overHidden": true,
       "width": 120,
-      "index": 2
+      "index": 4
     },
     {
-      "label": "1",
+      "label": "1",
       "prop": "jan",
       "width": 90,
       "overHidden": true,
-      "index": 3
+      "index": 5
     },
     {
-      "label": "2",
+      "label": "2",
       "prop": "feb",
       "width": 90,
       "overHidden": true,
-      "index": 4
+      "index": 6
     },
     {
-      "label": "3",
+      "label": "3",
       "prop": "mar",
       "width": 90,
       "overHidden": true,
-      "index": 5
+      "index": 7
     },
     {
-      "label": "4",
+      "label": "4",
       "prop": "apr",
       "width": 90,
       "overHidden": true,
-      "index": 6
+      "index": 8
     },
     {
-      "label": "5",
+      "label": "5",
       "prop": "may",
       "width": 90,
       "overHidden": true,
-      "index": 7
+      "index": 9
     },
     {
-      "label": "6",
+      "label": "6",
       "prop": "june",
       "width": 90,
       "overHidden": true,
-      "index": 8
+      "index": 10
     },
     {
-      "label": "7",
+      "label": "7",
       "prop": "july",
       "width": 90,
       "overHidden": true,
-      "index": 9
+      "index": 11
     },
     {
-      "label": "8",
+      "label": "8",
       "prop": "aug",
       "width": 90,
       "overHidden": true,
-      "index": 10
+      "index": 12
     },
     {
-      "label": "9",
+      "label": "9",
       "prop": "sept",
       "width": 90,
       "overHidden": true,
-      "index": 11
+      "index": 13
     },
     {
-      "label": "10",
+      "label": "10",
       "prop": "oct",
       "overHidden": true,
       "width": 90,
-      "index": 12
+      "index": 14
     },
     {
-      "label": "11",
+      "label": "11",
       "prop": "nov",
       "overHidden": true,
       "width": 90,
-      "index": 13
+      "index": 15
     },
     {
-      "label": "12",
+      "label": "12",
       "prop": "dece",
       "overHidden": true,
       "width": 90,
-      "index": 14
+      "index": 16
     },
     {
       "label": "合计",
       "prop": "total",
       "overHidden": true,
       "width": 90,
-      "index": 15
-    },
-    {
-      "label": "类型",
-      "prop": "flag",
-      "searchValue": "2",
-      "search": true,
-      "hide": true,
-      "index": 16
-    },
-    {
-      "label": "年份",
-      "prop": "year",
-      "search": true,
-      "hide": true,
-      "index": 17,
-      "type": "select",
-      "searchValue": "2021",
-      "dicData": [
-        {
-          "label": "2018",
-          "value": 2018
-        },
-        {
-          "label": "2019",
-          "value": 2019
-        },
-        {
-          "label": "2020",
-          "value": 2020
-        },
-        {
-          "label": "2021",
-          "value": 2021
-        },
-        {
-          "label": "2022",
-          "value": 2022
-        }
-      ]
+      "index": 17
     }
   ]
 }

+ 30 - 50
src/views/workManagement/performanceAnalysis/config/mainList.json

@@ -89,6 +89,7 @@
       "prop": "flag",
       "searchValue": "1",
       "search": true,
+      "index": 1,
       "hide": true
     },
     {
@@ -97,29 +98,8 @@
       "search": true,
       "hide": true,
       "type": "select",
-      "searchValue": "2021",
-      "dicData": [
-        {
-        "label": "2018",
-        "value": 2018
-      },
-        {
-        "label": "2019",
-        "value": 2019
-      },
-        {
-          "label": "2020",
-          "value": 2020
-        },
-        {
-          "label": "2021",
-          "value": 2021
-        },
-        {
-          "label": "2022",
-          "value": 2022
-        }
-      ]
+      "index": 2,
+      "searchValue": "2022"
     },
     {
       "label": "承做人",
@@ -127,104 +107,104 @@
       "overHidden": true,
       "search": true,
       "width": 120,
-      "index": 1
+      "index": 3
     },
     {
       "label": "客户数量",
       "prop": "countCorp",
       "overHidden": true,
       "width": 120,
-      "index": 2
+      "index": 4
     },
     {
-      "label": "1",
+      "label": "1",
       "prop": "jan",
       "width": 90,
       "overHidden": true,
-      "index": 3
+      "index": 5
     },
     {
-      "label": "2",
+      "label": "2",
       "prop": "feb",
       "width": 90,
       "overHidden": true,
-      "index": 4
+      "index": 6
     },
     {
-      "label": "3",
+      "label": "3",
       "prop": "mar",
       "width": 90,
       "overHidden": true,
-      "index": 5
+      "index": 7
     },
     {
-      "label": "4",
+      "label": "4",
       "prop": "apr",
       "width": 90,
       "overHidden": true,
-      "index": 6
+      "index": 8
     },
     {
-      "label": "5",
+      "label": "5",
       "prop": "may",
       "width": 90,
       "overHidden": true,
-      "index": 7
+      "index": 9
     },
     {
-      "label": "6",
+      "label": "6",
       "prop": "june",
       "width": 90,
       "overHidden": true,
-      "index": 8
+      "index": 10
     },
     {
-      "label": "7",
+      "label": "7",
       "prop": "july",
       "width": 90,
       "overHidden": true,
-      "index": 9
+      "index": 11
     },
     {
-      "label": "8",
+      "label": "8",
       "prop": "aug",
       "width": 90,
       "overHidden": true,
-      "index": 10
+      "index": 12
     },
     {
-      "label": "9",
+      "label": "9",
       "prop": "sept",
       "width": 90,
       "overHidden": true,
-      "index": 11
+      "index": 13
     },
     {
-      "label": "10",
+      "label": "10",
       "prop": "oct",
       "overHidden": true,
       "width": 90,
-      "index": 12
+      "index": 14
     },
     {
-      "label": "11",
+      "label": "11",
       "prop": "nov",
       "overHidden": true,
       "width": 90,
-      "index": 13
+      "index": 15
     },
     {
-      "label": "12",
+      "label": "12",
       "prop": "dece",
       "overHidden": true,
       "width": 90,
-      "index": 14
+      "index": 16
     }, {
       "label": "合计",
       "prop": "total",
       "overHidden": true,
       "width": 90,
-      "index": 15
+      "index": 17
     }
   ]
 }

+ 35 - 5
src/views/workManagement/performanceAnalysis/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <basic-container>
+  <basic-container  v-if="show">
     <avue-crud :option="option"
                :data="dataList"
                ref="crud"
@@ -41,6 +41,23 @@
           </el-option>
         </el-select>
       </template>
+      <template slot="yearSearch">
+        <el-select
+          v-model="search.year"
+          placeholder=""
+          filterable
+          allow-create
+          default-first-option
+          clearable
+        >
+          <el-option
+            v-for="item in yearOptions"
+            :key="item"
+            :label="item"
+            :value="item">
+          </el-option>
+        </el-select>
+      </template>
       <template slot="userNameSearch">
         <el-select
           v-model="search.userName"
@@ -83,7 +100,10 @@
         exportLoading:false,
         loading:false,
         dataList: [],
+        show:true,
+        date:'',
         userNameOptions:[],
+        yearOptions:[],
         flagOptions:[{
           value: '1',
           label: '承做人'
@@ -109,6 +129,12 @@
             this.userNameOptions.push(item)
           }
         })
+
+        this.date = new Date();
+        for(let i = 0;i<6;i++){
+          this.yearOptions.push(this.date.getFullYear() - i)
+        }
+        this.yearOptions.unshift(this.date.getFullYear() + 1)
       })
     },
     mounted() {
@@ -134,13 +160,17 @@
           this.exportLoading = false
         })
       },
-      cut(val){
+      async cut(val){
+        this.show = false
+        await  this.switchTab(val)
+        this.show = true
+        this.onLoad(this.page,this.search)
+      },
+      switchTab(val){
         if(val == 1){
           this.option = option
-          this.onLoad(this.page,this.search)
         }else{
           this.option = clientOption
-          this.onLoad(this.page,this.search)
         }
       },
       userNameRemoteMethod(val){
@@ -183,7 +213,7 @@
           params.flag = "1"
         }
         if(!params.year){
-          params.year = "2021"
+          params.year = "2022"
         }
         return params
       },