zhongtianhaoyuan 3 سال پیش
والد
کامیت
5657b0f0d5

+ 18 - 0
src/api/V2/profitable/index.js

@@ -0,0 +1,18 @@
+//收支明细
+export const API_GET_INOUTDETAILED = '/reveExpeInfo/selectReveExpe'
+//合同外费用
+export const API_GET_OUTMONEY = '/nonContractExpenses/selectInfo'
+//请款
+export const API_POST_PLEASEMONEY = '/nonContractExpenses/api/addInfo'
+//付款
+export const API_POST_PAYMENT = '/nonContractExpenses/payment'
+//删除
+export const API_POST_DELDATA = '/nonContractExpenses/deleteInfo'
+//编辑
+export const API_POST_EDITINFO = '/nonContractExpenses/editInfo'
+//查看
+export const API_GET_LOOKINFO = '/nonContractExpenses/getInfo'
+//审核
+export const API_POST_WORKFLOW_API_HANDLE = '/workflow/api/handle'
+//审核记录
+export const API_POST_AUDITRECORD = '/billOperateHis/query/commonBillOperateHis'

+ 12 - 0
src/lang/zh.js

@@ -1048,6 +1048,11 @@ export default {
     settlement: '结算',
     settlement: '结算',
     inspectInfo: '质检信息',
     inspectInfo: '质检信息',
     weightCheck: '检斤',
     weightCheck: '检斤',
+    //利润核算
+    profitable:'利润核算',
+    contractOtherMoney: '合同外费用',
+    earningsLook: '盈收概览',
+    inOutDetailed: '收支明细',
 
 
     //出库管理
     //出库管理
     outboundManagement: '出库管理',
     outboundManagement: '出库管理',
@@ -7472,6 +7477,13 @@ export default {
     inspectInfo: '质检信息',
     inspectInfo: '质检信息',
     weightCheck: '检斤'
     weightCheck: '检斤'
   },
   },
+  //利润核算
+  profitable:{
+    contractOtherMoney: '合同外费用',
+    earningsLook: '盈收概览',
+    inOutDetailed: '收支明细'
+  },
+  
   //出库管理
   //出库管理
   outboundManagement: {
   outboundManagement: {
     weighingManagement: '检斤管理',
     weighingManagement: '检斤管理',

+ 31 - 0
src/model/profitable/index.js

@@ -0,0 +1,31 @@
+import { errorCatcher, errorHandle, filter } from 'base-core-lib'
+import { appRx } from '../defalutConfig/indexRx'
+import {
+  API_GET_INOUTDETAILED,
+  API_GET_OUTMONEY,
+  API_POST_PLEASEMONEY,
+  API_POST_PAYMENT,
+  API_POST_DELDATA,
+  API_GET_LOOKINFO, 
+  API_POST_EDITINFO,
+  API_POST_WORKFLOW_API_HANDLE,
+  API_POST_AUDITRECORD,
+} from '@/api/V2/profitable'
+//收支明细列表
+export const getInOutDetailed = appRx.get(API_GET_INOUTDETAILED, errorCatcher, errorHandle, filter)
+//合同外费用列表
+export const getOutMoney = appRx.get(API_GET_OUTMONEY, errorCatcher, errorHandle, filter)
+//请款
+export const requestFunds = appRx.post(API_POST_PLEASEMONEY, errorCatcher, errorHandle, filter)
+//付款
+export const payment = appRx.post(API_POST_PAYMENT, errorCatcher, errorHandle, filter)
+//付款
+export const deleteInfo = appRx.post(API_POST_DELDATA, errorCatcher, errorHandle, filter)
+//编辑
+export const editInfo = appRx.post(API_POST_EDITINFO, errorCatcher, errorHandle, filter)
+//查看
+export const getLookInfo = appRx.get(API_GET_LOOKINFO, errorCatcher, errorHandle, filter)
+// 审核
+export const woekflowhandle = appRx.post(API_POST_WORKFLOW_API_HANDLE, errorCatcher, errorHandle, filter)
+// 审核记录
+export const getAuditRecord = appRx.get(API_POST_AUDITRECORD, errorCatcher, errorHandle, filter)

+ 64 - 0
src/views/profitable/component/routers/route.js

@@ -0,0 +1,64 @@
+import Layout from '@/layout/index';
+
+const profitableRouter = {
+  path: '/profitable',
+  component: Layout,
+  redirect: '/profitable',
+  name: 'profitable',
+  alwaysShow: true, // will always show the root menu
+  meta: {
+    title: 'profitable',
+    module: 'contractManagement.exContract.exContractInfo.view',
+    icon: '-caigouguanli'
+  },
+  children: [
+      // 盈收概览
+    {
+      path: 'earningsLook',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/profitable/earningsLook'),
+      name: 'earningsLook',
+      meta: {
+        title: 'earningsLook',
+        shortcutEntrance: 'profitable',
+        module: 'contractManagement.exContract.exContractInfo.view',
+        permissicon: [],
+        keepAlive: true
+        // module: 'procurement.sparepart.applDetail'
+      }
+    },  
+      // 收支明细
+      {
+        path: 'inOutDetailed',
+        component: () =>
+          import(/* webpackChunkName: "applDetail" */ '@/views/profitable/inOutDetailed'),
+        name: 'inOutDetailed',
+        meta: {
+          title: 'inOutDetailed',
+          shortcutEntrance: 'profitable',
+          module: 'contractManagement.exContract.exContractInfo.view',
+          permissicon: [],
+          keepAlive: true
+          // module: 'procurement.sparepart.applDetail'
+        }
+      }, 
+       // 合同外费用
+       {
+        path: 'contractOtherMoney',
+        component: () =>
+          import(/* webpackChunkName: "applDetail" */ '@/views/profitable/contractOtherMoney'),
+        name: 'contractOtherMoney',
+        meta: {
+          title: 'contractOtherMoney',
+          shortcutEntrance: 'profitable',
+          module: 'contractManagement.exContract.exContractInfo.view',
+          permissicon: [],
+          keepAlive: true
+          // module: 'procurement.sparepart.applDetail'
+        }
+      }, 
+  ],
+
+};
+
+export default profitableRouter;

+ 706 - 0
src/views/profitable/contractOtherMoney.vue

@@ -0,0 +1,706 @@
+//合同外费用
+<template>
+  <div class="container">
+    <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">合同外费用</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"></el-col>
+    </el-row>
+
+    <div class="center">
+      <el-row>
+        <el-col :span="12">
+          <el-button style="margin-left:10px" @click="typeChange('')" :type="!searchType?'primary':''">全部</el-button>
+          <el-button @click="typeChange(1)" :type="searchType == 1?'primary':''">收入</el-button>
+          <el-button @click="typeChange(2)" :type="searchType == 2?'primary':''">支出</el-button>
+          <div class="top_info">
+            <span class="info_css">合计收入:{{inmoney}}元</span><span class="info_css">合计支出:{{outmoney}}元</span><span
+              class="info_css">请款中:{{inmoney}}元</span>
+          </div>
+        </el-col>
+        <el-col :span="12">
+          <div class="datascreen">
+            <el-date-picker value-format='yyyy-MM-dd' v-model="value" type="daterange" align="right" unlink-panels
+              range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions"
+              class="data_css" @change="changeDate">
+            </el-date-picker>
+            <el-input placeholder="按费用名称或用途查找" class="input_css" v-model="searchKeyWord"></el-input>
+            <el-button class="find" type="primary" @click="find()"><img width="16" height="16" style="left: -8px;"
+                src="../../../public/img/sousuo.png" alt="" /></el-button>
+          </div>
+          <div class="btn_css">
+            <el-button @click="audit(3)" v-hasPermission=" `contractManagement.exContract.exContractInfo.add`">请款
+            </el-button>
+            <el-button @click="audit(4)" v-hasPermission=" `contractManagement.exContract.exContractInfo.add`">收款
+            </el-button>
+          </div>
+        </el-col>
+      </el-row>
+      <div class="fromdata">
+        <el-table :data="tableData" stripe style="width: 100%">
+          <el-table-column type="index" label="序号">
+            <template scope="scope">
+              <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+              <span v-else>{{ scope.$index + 1 }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="reexType" label="类型"></el-table-column>
+          <el-table-column prop="purpose" label="用途"></el-table-column>
+          <el-table-column prop="expenseName" label="费用名称"></el-table-column>
+          <el-table-column prop="amountMoney" label="费用金额(元)" min-width="106"></el-table-column>
+          <el-table-column label="附件">
+            <template slot-scope="scope">
+              <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
+                src="../../../public/img/fujian.png" @click="fujian(scope.row)" alt="" />
+              <span>{{scope.row.addressUrl.split(",").length == 0 ? '' : scope.row.addressUrl.split(",").length}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="payee" label="请款人/收款人" min-width="100"></el-table-column>
+          <el-table-column prop="paymentDate" label="支付日期"></el-table-column>
+          <el-table-column prop="status" label="状态" min-width="81">
+            <template slot-scope="scope">
+              <span style="margin-right:10px">{{scope.row.status}}</span><i class="el-icon-tickets icon_css"
+                v-show="scope.row.reexType == '支出'" @click="showAudit(scope.row)"></i>
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" min-width="400">
+            <template slot-scope="scope">
+              <el-button @click="audit(1,scope.row)" v-if="scope.row.reexType == '支出' && scope.row.taskId">审核
+              </el-button>
+              <el-button @click="audit(2,scope.row)"
+                v-hasPermission=" `contractManagement.exContract.exContractInfo.status`">付款</el-button>
+              <el-button @click="audit(5,scope.row)"
+                v-hasPermission=" `contractManagement.exContract.exContractInfo.edit`">编辑</el-button>
+              <el-button @click="delData(scope.row)"
+                v-hasPermission=" `contractManagement.exContract.exContractInfo.delete`">删除</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        style="text-align:center" :page-size="deptCircularPage.pageSize"
+        layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
+      </el-pagination>
+      <el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" top="20vh"
+        class="title_css">
+        <el-form ref="formData" :model="formData" label-width="100px">
+          <el-form-item label="费用类型" v-if="btnChange == 3 || btnChange == 4 || btnChange == 5">
+            <el-radio-group v-model="radio">
+              <el-radio v-model="radio" label="1">经营费用</el-radio>
+              <el-radio v-model="radio" label="2">仓库费用</el-radio>
+            </el-radio-group>
+          </el-form-item>
+          <el-form-item label="费用类型" v-if="btnChange == 1 || btnChange == 2">
+            <template>
+              <el-input value="经营费用" :disabled="disabled" v-if="formData.expenseType == 1"></el-input>
+              <el-input value="仓库费用" :disabled="disabled" v-else></el-input>
+            </template>
+          </el-form-item>
+          <el-form-item label="仓库" v-if="radio == 2">
+            <el-select v-model="formData.warehouseName" placeholder="请选择仓库" style="width:100%" :disabled="disabled">
+              <el-option v-for="(item,index) in warehouseList" :key="index" :label="item.warehouseName"
+                :value="item.warehouseName"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="款项名称">
+            <el-input v-model="formData.expenseName" placeholder="输入费用名称" :disabled="disabled" maxlength="15">
+            </el-input>
+          </el-form-item>
+          <el-form-item label="金额(元)" v-if="btnChange == 3 || btnChange == 4 || btnChange == 5">
+            <el-input v-model="formData.amountMoney" placeholder="输入请款金额" type="number"></el-input>
+          </el-form-item>
+          <el-form-item label="请款(元)" v-if="btnChange == 1 || btnChange == 2">
+            <el-input v-model="formData.amountMoney" placeholder="输入请款金额" :disabled="disabled" type="number"></el-input>
+          </el-form-item>
+          <el-form-item label="备注(选填)" v-if="btnChange == 3 || btnChange == 4 || btnChange == 5">
+            <el-input type="textarea" v-model="formData.remarks" placeholder="输入备注,不超过50个字" maxlength="50" :rows="4">
+            </el-input>
+          </el-form-item>
+          <el-form-item label="请款备注" v-if="btnChange == 1 || btnChange == 2">
+            <el-input type="textarea" v-model="formData.remarks" placeholder="输入备注,不超过50个字" maxlength="50" :rows="4"
+              :disabled="disabled"></el-input>
+          </el-form-item>
+          <el-form-item label="附件">
+            <!-- :limit="1" -->
+            <ws-upload ref="upload" :comp-id="compId" :appendix-ids="formData.addressUrl" :editable="!disabled"
+              :disabled="disabled" @onChange="onChange" accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
+              :remarkWord="false" />
+          </el-form-item>
+          <el-form-item label="审核意见" v-if="btnChange == 1">
+            <el-input type="textarea" v-model="formData.opinion" placeholder="选填,不超过50个字" maxlength="50" :rows="4">
+            </el-input>
+          </el-form-item>
+          <el-form-item label="收款日期" v-if="btnChange == 4">
+            <el-date-picker value-format='yyyy-MM-dd' v-model="formData.paymentDate" type="date" placeholder="选择日期">
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item label="付款日期" v-if="btnChange == 2">
+            <el-date-picker value-format='yyyy-MM-dd' v-model="formData.paymentDate" type="date" placeholder="选择日期">
+            </el-date-picker>
+          </el-form-item>
+        </el-form>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="handleClose" v-if="btnChange != 1">取 消</el-button>
+          <el-button type="primary" @click="submit" v-if="btnChange != 1">确 定</el-button>
+          <el-button @click="examine(1)" v-if="btnChange == 1">驳 回</el-button>
+          <el-button type="primary" @click="examine(2)" v-if="btnChange == 1">通 过</el-button>
+        </span>
+      </el-dialog>
+    </div>
+    <el-dialog title="附件预览" :visible.sync="fujianshow" width="30%" :before-close="fuijianClose" top="30vh"
+      class="title_css">
+      <ws-upload ref="upload" @onChange="onChange" :comp-id="compId" :appendix-ids="appendixIdss" :editable="editable"
+        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
+    </el-dialog>
+    <el-dialog title="审核记录" :visible.sync="auditShow" width="30%" :before-close="auditShowClose" top="20vh"
+      class="title_css">
+      <div v-for="(item,index) in auditRecord" :key="index" class="audit">
+        <div class="audit_item">
+          <div class="audit_left">
+            <span class="audit_name">{{item.operateUser}}</span><span
+              v-if="item.approveResult">{{item.approveResult == 0 ? "驳回" : "通过"}}</span><span
+              v-else>{{item.dealMsg}}</span>
+          </div>
+          <span class="audit_date">{{item.operateDate}}</span>
+        </div>
+        <div class="audit_opinion" v-if="item.dealMsg != '付款' && item.approveResult">审核意见:{{item.verifyRemark}}</div>
+        <div class="audit_opinion" v-if="item.dealMsg == '请款' && item.approveResult == null">备注信息:{{item.verifyRemark}}
+        </div>
+      </div>
+
+    </el-dialog>
+  </div>
+</template>
+<script>
+  import {
+    getOutMoney,
+    requestFunds,
+    payment,
+    deleteInfo,
+    editInfo,
+    woekflowhandle,
+    getAuditRecord
+  } from '@/model/profitable/index'
+  import {
+    selectWarehouseSelf
+  } from '@/model/houseSelfCollect/index'
+  import WsUpload from '@/components/WsUpload'
+  export default {
+    components: {
+      WsUpload
+    },
+    data() {
+      return {
+        value: "",
+        tableData: [],
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 10,
+        deptCircularPage: {},
+        dialogVisible: false,
+        fujianshow: false,
+        compId: localStorage.getItem('ws-pf_compId'),
+        btnChange: "",
+        title: "",
+        disabled: false,
+        searchType: "",
+        searchKeyWord: "",
+        startDate: "",
+        endDate: "",
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 10,
+        deptCircularPage: {},
+        value: "",
+        warehouseList: [],
+        formData: {},
+        radio: "1",
+        appendixIdss: [],
+        editable: false,
+        auditShow: false,
+        auditRecord: [],
+        inmoney:0,
+        outmoney:0,
+      }
+    },
+    activated() {
+      this.getPassYearFormatDate()
+      this.getList()
+      this.getWarehouse()
+    },
+    methods: {
+      showAudit(row) {
+        getAuditRecord({
+            id: row.id,
+            workflowId: row.workflowId
+          })
+          .toPromise()
+          .then((response) => {
+            this.auditShow = true
+            this.auditRecord = response
+          })
+      },
+      auditShowClose() {
+        this.auditRecord = []
+        this.auditShow = false
+      },
+      examine(tmp) {
+        if (tmp == 1) { //驳回
+          this.$confirm('是否确定驳回该条请款信息?', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning',
+            })
+            .then(() => {
+              woekflowhandle({
+                  taskId: this.formData.taskId,
+                  approved: false,
+                  auditMind: this.formData.opinion ? this.formData.opinion : "驳回",
+                  needReapply: true,
+                })
+                .toPromise()
+                .then((response) => {
+                  this.$notify({
+                    title: '成功',
+                    message: '驳回成功!',
+                    type: 'success'
+                  });
+                })
+              this.formData = {}
+              this.dialogVisible = false
+              this.getList()
+            })
+        } else if (tmp == 2) { //通过
+          this.$confirm('是否确定通过该条请款信息?', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning',
+            })
+            .then(() => {
+              woekflowhandle({
+                  taskId: this.formData.taskId,
+                  approved: true,
+                  auditMind: this.formData.opinion ? this.formData.opinion : "通过",
+                  needReapply: false,
+                })
+                .toPromise()
+                .then((response) => {
+                  this.$notify({
+                    title: '成功',
+                    message: '审核成功!',
+                    type: 'success'
+                  });
+                  this.formData = {}
+                  this.dialogVisible = false
+                  this.getList()
+
+                })
+                .catch(() => {
+                  return false
+                })
+            })
+        }
+
+
+      },
+      delData(row) {
+        this.$confirm('确定删除请款信息?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            deleteInfo({
+                id: row.id
+              })
+              .toPromise()
+              .then((response) => {
+                this.$notify({
+                  title: '成功',
+                  message: '删除成功!',
+                  type: 'success'
+                });
+                this.getList()
+              })
+          })
+      },
+      fujian(row) {
+        this.fujianshow = true
+        this.appendixIdss = row.addressUrl
+      },
+      fuijianClose() {
+        this.appendixIdss = ""
+        this.fujianshow = false
+      },
+      submit() {
+        this.formData.expenseType = this.radio
+        if (this.formData.expenseType == 2) {
+          if (!this.formData.warehouseName) {
+            this.$message.error("请选择仓库")
+            return
+          }
+        }
+        if (!this.formData.expenseName) {
+          this.$message.error("款项名称不能为空!")
+          return
+        }
+        if (!this.formData.amountMoney) {
+          this.$message.error("金额不能为空!")
+          return
+        }
+        if (Number(this.formData.amountMoney) < 0 || Number(this.formData.amountMoney) > 100000000) {
+          this.$message.error("金额输入错误!")
+        }
+        
+        if (this.formData.amountMoney.indexOf(".") != -1 && this.formData.amountMoney.split(".")[1].length > 2) {
+          this.$message.error("金额请保留两位小数!")
+          return
+        }
+        if (this.btnChange == 4) {
+          if (!this.formData.addressUrl) {
+            this.$message.error("请上传附件!")
+            return
+          }
+        }
+        this.$confirm('确定提交' + this.title + '信息?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            if (this.btnChange == 3) { //请款
+              this.formData.compId = this.compId
+              this.formData.payee = localStorage.getItem('ws-pf_staffName')
+              this.formData.reexType = "支出"
+              this.formData.reexTypeKey = 2
+              requestFunds(this.formData)
+                .toPromise()
+                .then((response) => {
+                  if (response == 'ok') {
+                    this.formData = {}
+                    this.dialogVisible = false
+                    this.$notify({
+                      title: '成功',
+                      message: '请款提交成功!',
+                      type: 'success'
+                    });
+                    this.getList()
+                  }
+                })
+            } else if (this.btnChange == 2) { //付款
+              payment(this.formData)
+                .toPromise()
+                .then((response) => {
+                  if (response == 'ok') {
+                    this.formData = {}
+                    this.dialogVisible = false
+                    this.$notify({
+                      title: '成功',
+                      message: '付款提交成功!',
+                      type: 'success'
+                    });
+                    this.getList()
+                  }
+                })
+            } else if (this.btnChange == 5) { //编辑
+              editInfo(this.formData)
+                .toPromise()
+                .then((response) => {
+                  if (response == 'ok') {
+                    this.formData = {}
+                    this.dialogVisible = false
+                    this.$notify({
+                      title: '成功',
+                      message: '修改成功!',
+                      type: 'success'
+                    });
+                    this.getList()
+                  }
+
+                })
+            } else if (this.btnChange == 4) { //收款
+              this.formData.compId = this.compId
+              this.formData.payee = localStorage.getItem('ws-pf_staffName')
+              this.formData.reexType = "收入"
+              this.formData.reexTypeKey = 1
+              requestFunds(this.formData)
+                .toPromise()
+                .then((response) => {
+                  if (response == 'ok') {
+                    this.formData = {}
+                    this.dialogVisible = false
+                    this.$notify({
+                      title: '成功',
+                      message: '请款提交成功!',
+                      type: 'success'
+                    });
+                    this.getList()
+                  }
+                })
+
+            }
+          })
+      },
+      typeChange(num) {
+        this.searchType = num
+        this.getList()
+      },
+      getWarehouse() {
+        //仓库
+        selectWarehouseSelf({
+            compId: localStorage.getItem('ws-pf_compId'),
+          })
+          .toPromise()
+          .then((response) => {
+            this.warehouseList = response
+          })
+      },
+      audit(num, row) {
+        this.btnChange = num
+        if (num == 1) {
+          this.title = "审核"
+          this.formData = row
+          this.disabled = true
+        } else if (num == 2) {
+          this.title = "付款"
+          this.formData = row
+          this.disabled = true
+        } else if (num == 3) {
+          this.title = "请款"
+          this.disabled = false
+        } else if (num == 4) {
+          this.title = "收款"
+          this.disabled = false
+        } else if (num == 5) {
+          this.title = "编辑"
+          this.formData = row
+          this.radio = row.expenseType
+          this.disabled = false
+        }
+        this.dialogVisible = true
+
+      },
+      getPassYearFormatDate() {
+        var nowDate = new Date()
+        var _date = new Date()
+        nowDate.setTime(nowDate.getTime() - 24 * 60 * 60 * 1000 * 30)
+        var year = nowDate.getFullYear()
+        var year1 = _date.getFullYear()
+        var month = nowDate.getMonth() + 1
+        var month1 = _date.getMonth() + 1
+        var strDate = nowDate.getDate()
+        var strDate1 = _date.getDate()
+        if (month >= 1 && month <= 9) {
+          month = '0' + month
+        }
+        if (month1 >= 1 && month1 <= 9) {
+          month1 = '0' + month1
+        }
+
+        if (strDate >= 0 && strDate <= 9) {
+          strDate = '0' + strDate
+        }
+        if (strDate1 >= 0 && strDate1 <= 9) {
+          strDate1 = '0' + strDate1
+        }
+        this.startDate = year + '-' + month + '-' + strDate
+        this.endDate = year1 + '-' + month1 + '-' + strDate1
+        this.value = [this.startDate, this.endDate]
+      },
+      handleClose() {
+        this.formData = {}
+        this.radio = "1"
+        this.dialogVisible = false
+      },
+      onChange() {
+        this.$refs.upload
+          .handleSaveBill()
+          .then(async response => {
+            this.formData.addressUrl = response
+          })
+          .catch(res => {
+            EventBus.$emit('error', (JSON.parse(res) || {}).message)
+            this.$refs.upload.clearFiles()
+          })
+      },
+      getList() {
+        getOutMoney({
+            // warehouseType: 1,
+            compId: localStorage.getItem('ws-pf_compId'),
+            startDate: this.startDate,
+            endDate: this.endDate,
+            searchKeyWord: this.searchKeyWord,
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            searchType: this.searchType
+          })
+          .toPromise()
+          .then(response => {
+            this.inmoney = 0
+             this.outmoney = 0
+            this.tableData = response.records
+            for(let count = 0 ; count < this.tableData.length ; count++){
+              if(this.tableData[count].reexType == '收入'){
+                this.inmoney += this.tableData[count].amountMoney
+              }
+              if(this.tableData[count].reexType == '支出'){
+                 this.outmoney += this.tableData[count].amountMoney
+              }
+            }
+            this.deptBudgetTotal = response.total
+          })
+      },
+      changeDate() {
+        if (this.value) {
+          this.startDate = this.value[0]
+          this.endDate = this.value[1]
+        }
+        this.getList()
+      },
+      pickerOptions() {},
+      find() {
+        this.getList()
+
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .container {
+    background: #E8ECF6;
+  }
+
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    height: calc(100vh - 13vh);
+    border-radius: 4px;
+    padding: 20px 0;
+
+    /deep/.el-table td,
+    /deep/.el-table th {
+      text-align: center;
+    }
+  }
+
+  .row_top {
+    background: #F6F7FC;
+    border-radius: 4px;
+    margin-bottom: 10px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+    .bg-right {
+      padding-right: 10px;
+      text-align: right;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    display: flex;
+
+    .data_css {
+      width: 40%;
+    }
+
+    .input_css {
+      width: 50%;
+      margin: 0 10px;
+    }
+
+    .find {
+      margin-right: 10px;
+    }
+  }
+
+  .fromdata {
+    margin: 10px 0;
+    overflow-y: scroll;
+    height: 546px;
+
+    .icon_css {
+      font-size: 15px;
+
+      color: #5473e8;
+
+    }
+  }
+
+  /deep/.title_css .el-dialog__header {
+    text-align: center !important;
+    border-radius: 4px;
+  }
+
+  .btn_css {
+    margin: 10px 10px 0;
+    justify-content: flex-end;
+    display: flex;
+  }
+
+  .top_info {
+    margin: 16px 0 0 10px;
+    min-width: 712px;
+
+    .info_css {
+      margin-right: 15px;
+    }
+  }
+
+  .audit {
+    margin-bottom: 20px;
+    border-bottom: 1px solid #AFB3BF;
+    height: 70px;
+
+    .audit_item {
+      width: 100%;
+      display: flex;
+      height: 30px;
+
+      .audit_name {
+        margin-right: 30px;
+        font-size: 16px;
+        font-weight: 600;
+      }
+
+      .audit_left {
+        width: 60%;
+      }
+
+      .audit_date {
+        width: 40%;
+        justify-content: flex-end;
+        display: flex;
+        color: #AFB3BF;
+      }
+    }
+
+    .audit_opinion {}
+  }
+</style>

+ 359 - 0
src/views/profitable/earningsLook.vue

@@ -0,0 +1,359 @@
+//盈收概览
+<template>
+  <div class="container">
+    <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">盈收概览</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"></el-col>
+    </el-row>
+    <div class="center">
+      <div class="datascreen">
+        <el-date-picker v-model="value" type="daterange" align="right" unlink-panels range-separator="至"
+          start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
+        </el-date-picker>
+      </div>
+      <div class="chart_css">
+        <div class="table">
+          <div ref="myEchart7" style="height: 410px;"></div>
+        </div>
+        <div class="makeWord_css">
+          <div ref="myEchart6" style="height: 410px"></div>
+        </div>
+      </div>
+      <div class="table_css">
+        <el-table :data="valueData" style="width: 100%">
+          <el-table-column prop="date" label="货名/货值" min-width="110">
+            <div slot-scope="scope">
+              <span v-if="scope.$index == 0">期初货值(元)</span>
+              <span v-if="scope.$index == 1">期末货值(元)</span>
+            </div>
+
+          </el-table-column>
+          <el-table-column prop="date" label="玉米"></el-table-column>
+          <el-table-column prop="date" label="玉米"></el-table-column>
+          <el-table-column prop="date" label="玉米"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="货名"></el-table-column>
+          <el-table-column prop="date" label="合计" min-width="130">
+            <div slot-scope="scope">
+              <span v-if="scope.$index == 0">合计:</span>
+              <span v-if="scope.$index == 1">合计:1000000000</span>
+            </div>
+          </el-table-column>
+        </el-table>
+
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  import {} from '@/model/profitable/index'
+  export default {
+    components: {},
+    data() {
+      return {
+        value: [],
+        profitList: [{
+          name: "玉米",
+          count: 2000,
+        }],
+        makeWordData: {},
+        valueData: [{
+            date: 10
+          },
+          {
+            date: 20
+          }
+        ], //货值
+
+      }
+    },
+    activated() {
+      this.makeWordData = this.getData(2)
+      this.initCharts()
+      this.getPassYearFormatDate()
+      this.getList()
+    },
+    methods: {
+      getList() {
+        // getceshi({
+        //  driverId:'8f1f3c624d7946d79a9d44a4057d969b'
+        // })
+        // .toPromise()
+        // .then((response) => {
+        // debugger
+        // console.log(response)
+        // })
+
+      },
+      getPassYearFormatDate() {
+        var nowDate = new Date()
+        var _date = new Date()
+        nowDate.setTime(nowDate.getTime() - 24 * 60 * 60 * 1000 * 30)
+        var year = nowDate.getFullYear()
+        var year1 = _date.getFullYear()
+        var month = nowDate.getMonth() + 1
+        var month1 = _date.getMonth() + 1
+        var strDate = nowDate.getDate()
+        var strDate1 = _date.getDate()
+        if (month >= 1 && month <= 9) {
+          month = '0' + month
+        }
+        if (month1 >= 1 && month1 <= 9) {
+          month1 = '0' + month1
+        }
+
+        if (strDate >= 0 && strDate <= 9) {
+          strDate = '0' + strDate
+        }
+        if (strDate1 >= 0 && strDate1 <= 9) {
+          strDate1 = '0' + strDate1
+        }
+        this.startDate = year + '-' + month + '-' + strDate
+        this.endDate = year1 + '-' + month1 + '-' + strDate1
+        this.value = [this.startDate, this.endDate]
+      },
+      pickerOptions() {
+
+      },
+      initCharts() {
+        let app = this;
+        let myChart7 = app.$echarts.init(this.$refs.myEchart7);
+        let myChart6 = app.$echarts.init(this.$refs.myEchart6);
+        var option;
+        var graphical;
+        graphical = {
+          title: {
+            text: '盈利',
+            subtext: '利润',
+            left: 'center'
+          },
+          tooltip: {
+            trigger: 'item',
+            formatter: '{b} : {c} ({d}%)'
+          },
+          legend: {
+            type: 'scroll',
+            orient: 'vertical',
+            right: 10,
+            top: 20,
+            bottom: 20,
+            data: this.makeWordData.legendData
+          },
+          series: [{
+            // name: '姓名',
+            type: 'pie',
+            radius: '55%',
+            center: ['40%', '50%'],
+            data: this.makeWordData.seriesData,
+            emphasis: {
+              itemStyle: {
+                shadowBlur: 10,
+                shadowOffsetX: 0,
+                shadowColor: 'rgba(0, 0, 0, 0.5)'
+              }
+            }
+          }],
+
+        }
+        myChart6.setOption(graphical)
+        option = {
+            // title: {
+            //   text: 'Rainfall vs Evaporation',
+            //   subtext: 'Fake Data'
+            // },
+            tooltip: {
+              trigger: 'axis'
+            },
+            legend: {
+              data: ['支出', '收入']
+            },
+            toolbox: {
+              show: true,
+              feature: {
+                dataView: {
+                  show: false,
+                  readOnly: false
+                },
+                magicType: {
+                  show: false,
+                  type: ['line', 'bar']
+                },
+                restore: {
+                  show: false
+                },
+                saveAsImage: {
+                  show: false
+                }
+              }
+            },
+            calculable: true,
+            xAxis: [{
+              name: '种类',
+              type: 'category',
+              // prettier-ignore
+              data: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct']
+            }],
+            yAxis: [{
+              name: '储量(吨)',
+              type: 'value'
+            }],
+            series: [{
+                name: '支出',
+                type: 'bar',
+                right: 0,
+                // label: {
+                //   show: true,
+                //   position: 'inside'
+                // },
+                 label: {
+                  show: true,
+                  precision: 1,
+                  position: 'top',
+                  valueAnimation: true,
+                  fontFamily: 'monospace'
+                },
+                data: [
+                  6.0, 60.9, 90.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0
+                ],
+                color: ['#5878E8 '],
+                formatter: '{value} 元',
+
+              },
+              {
+                name: '收入',
+                type: 'bar',
+                right: 20,
+                label: {
+                  show: true,
+                  precision: 1,
+                  position: 'top',
+                  valueAnimation: true,
+                  fontFamily: 'monospace'
+                },
+                data: [
+                  102.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8
+                ],
+                color: ['#FF9F24'],
+                formatter: '{value} 元',
+              }
+            ]
+          },
+          myChart7.setOption(option)
+      },
+      getData(count) {
+        // prettier-ignore
+        const nameList = [
+          '支出', '收入'
+        ];
+        const legendData = [];
+        const seriesData = [];
+        for (var i = 0; i < count; i++) {
+          var name = nameList[i]
+          // Math.random() > 0.65 ?  makeWord(4, 1) + '·' + makeWord(3, 0) :  makeWord(2, 1);
+          legendData.push(name);
+          seriesData.push({
+            name: name,
+            value: Math.round(Math.random() * 100000)
+          });
+        }
+
+        return {
+          legendData: legendData,
+          seriesData: seriesData
+        };
+
+        // function makeWord(max, min) {
+        //   debugger
+        //   const nameLen = Math.ceil(Math.random() * max + min);
+        //   const name = [];
+        //   for (var i = 0; i < nameLen; i++) {
+        //     name.push(nameList[Math.round(Math.random() * nameList.length - 1)]);
+        //   }
+        //   return name.join('');
+        // }
+
+      }
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .container {
+    background: #E8ECF6;
+  }
+
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    height: calc(100vh - 13vh);
+    border-radius: 4px;
+    margin-top: 10px;
+  }
+
+  .row_top {
+    background: #F6F7FC;
+    border-radius: 4px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+    .bg-right {
+      padding-right: 10px;
+      text-align: right;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    // margin-top: 10px;
+    width: 500px;
+    height: 60px;
+    line-height: 60px;
+    margin-left: 30px;
+
+  }
+
+  .chart_css {
+    display: flex;
+    height: 410px;
+
+    .table {
+      width: 70%;
+      height: 410px;
+    }
+
+    .makeWord_css {
+      width: 30%;
+      height: 410px;
+      margin-left: 30px;
+    }
+  }
+
+  .table_css {
+
+    /deep/.el-table th,
+    /deep/.el-table td {
+      text-align: center;
+    }
+
+  }
+</style>

+ 235 - 0
src/views/profitable/inOutDetailed.vue

@@ -0,0 +1,235 @@
+//收支明细
+<template>
+  <div class="container">
+    <el-row class="row_top">
+      <el-col :span="12">
+        <h2 class="bg-left title">收支明细</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right"></el-col>
+    </el-row>
+
+    <div class="center">
+      <el-row>
+        <el-col :span="12">
+          <el-button style="margin-left:10px" @click="typeChange('')" :type="!searchType?'primary':''">全部</el-button>
+          <el-button @click="typeChange(1)" :type="searchType == 1?'primary':''">收入</el-button>
+          <el-button @click="typeChange(2)" :type="searchType == 2?'primary':''">支出</el-button>
+          <div class="top_info">
+           <span class="info_css">合同收入:{{tableData[0].inContractMoney? tableData[0].inContractMoney:0}}元</span><span class="info_css">仓库收入:{{tableData[0].inWarehouseMoney? tableData[0].inWarehouseMoney:0}}元</span><span class="info_css">经营收入:{{tableData[0].inManageMoney? tableData[0].inManageMoney:0}}元</span><span class="info_css">合计收入:{{intotal}}元</span>   
+          </div>
+          <div class="top_info">
+            <span class="info_css">合同支出:{{tableData[0].outContractMoney? tableData[0].outContractMoney:0}}元</span><span class="info_css">仓库支出:{{tableData[0].outWarehouseMoney? tableData[0].outWarehouseMoney:0}}元</span><span class="info_css">经营支出:{{tableData[0].outManageMoney? tableData[0].outManageMoney:0}}元</span><span class="info_css">合计支出:{{outtotal}}元</span> <span class="info_css">毛利润:{{Number(intotal - outtotal)}}元</span>
+          </div>
+        </el-col>
+        <el-col :span="12">
+          <div class="datascreen">
+            <el-date-picker value-format='yyyy-MM-dd' v-model="value" type="daterange" align="right" unlink-panels range-separator="至"
+              start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" class="data_css" @change="changeDate" >
+            </el-date-picker>
+            <el-input placeholder="按费用名称或费用说明查找" class="input_css" v-model="searchKeyWord"></el-input>
+            <el-button class="find" type="primary" @click="find()"><img width="16" height="16" style="left: -8px;"
+                src="../../../public/img/sousuo.png" alt="" /></el-button>
+          </div>
+        </el-col>
+      </el-row>
+      <div class="fromdata">
+        <el-table :data="tableData" stripe style="width: 100%">
+          <el-table-column type="index" label="序号">
+            <template scope="scope">
+              <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+              <span v-else>{{ scope.$index + 1 }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="reexType" label="类型"></el-table-column>
+          <el-table-column prop="createDate" label="录入日期"></el-table-column>
+          <el-table-column prop="amountMoney" label="金额(元)"></el-table-column>
+          <el-table-column prop="expenseName" label="费用名称"></el-table-column>
+          <el-table-column prop="expenseRemarks" label="费用说明"></el-table-column>
+        </el-table>
+      </div>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        style="text-align:center" :page-size="deptCircularPage.pageSize"
+        layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+<script>
+  import {
+    getInOutDetailed
+  } from '@/model/profitable/index'
+  export default {
+    components: {},
+    data() {
+      return {
+        value: "",
+        tableData: [],
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 10,
+        deptCircularPage: {},
+        searchType:"",
+        searchKeyWord:"",
+        startDate:"",
+        endDate:"",
+        outtotal:0,
+        intotal:0,
+      }
+    },
+    activated() {
+         this.getPassYearFormatDate()
+      this.getList()
+    },
+    methods: {
+      typeChange(num){
+        this.searchType = num
+        this.getList()
+      },
+      getPassYearFormatDate () {
+          var nowDate = new Date()
+          var _date = new Date()
+          nowDate.setTime(nowDate.getTime()-24*60*60*1000*30)
+          var year = nowDate.getFullYear()
+          var year1 = _date.getFullYear()
+          var month = nowDate.getMonth() + 1
+          var month1 = _date.getMonth() + 1
+          var strDate = nowDate.getDate()
+          var strDate1 = _date.getDate()
+          if (month >= 1 && month <= 9) {
+            month = '0' + month
+          }
+           if (month1 >= 1 && month1 <= 9) {
+            month1 = '0' + month1
+          }
+        
+          if (strDate >= 0 && strDate <= 9) {
+            strDate = '0' + strDate
+          }
+           if (strDate1 >= 0 && strDate1 <= 9) {
+            strDate1 = '0' + strDate1
+          }
+          this.startDate = year + '-' + month +'-' + strDate
+          this.endDate = year1 + '-' + month1 +'-' + strDate1
+          this.value=[this.startDate,this.endDate]
+        },
+      getList() {
+         getInOutDetailed({
+            // warehouseType: 1,
+            compId: localStorage.getItem('ws-pf_compId'),
+            startDate:this.startDate,
+            endDate:this.endDate,
+            searchKeyWord:this.searchKeyWord,
+            currentPage: this.currentPage,
+            pageSize:this.pageSize ,
+            searchType:this.searchType
+          })
+          .toPromise()
+          .then(response => {
+            this.tableData = response.records
+            this.intotal = Number(this.tableData[0].inContractMoney) + Number(this.tableData[0].inWarehouseMoney) + Number(this.tableData[0].inManageMoney)
+            this.outtotal = Number(this.tableData[0].outContractMoney) + Number(this.tableData[0].outWarehouseMoney) + Number(this.tableData[0].outManageMoney)
+           this.deptBudgetTotal = response.total
+          })
+      },
+      changeDate(){
+        if(this.value){
+          this.startDate = this.value[0]
+          this.endDate = this.value[1]
+        }
+        this.getList()
+      },
+      pickerOptions() {},
+      find() {
+        this.getList()
+
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .container {
+    background: #E8ECF6;
+  }
+
+  .center {
+    margin: 0 auto;
+    background: #ffffff;
+    height: calc(100vh - 13vh);
+    border-radius: 4px;
+    padding: 20px 0;
+
+    /deep/.el-table td,
+    /deep/.el-table th {
+      text-align: center;
+    }
+  }
+
+  .row_top {
+    background: #F6F7FC;
+    border-radius: 4px;
+    margin-bottom: 10px;
+
+    .bg-left {
+      padding-left: 30px;
+    }
+
+    .bg-right {
+      padding-right: 10px;
+      text-align: right;
+    }
+
+    .title {
+      position: relative;
+    }
+
+    .title::before {
+      content: '';
+      display: inline-block;
+      width: 5px;
+      height: 30px;
+      background: #5473e8;
+      position: absolute;
+      left: 0;
+    }
+  }
+
+  .datascreen {
+    display: flex;
+
+    .data_css {
+      width: 40%;
+    }
+
+    .input_css {
+      width: 50%;
+      margin: 0 10px;
+    }
+
+    .find {
+      margin-right: 10px;
+    }
+  }
+
+  .fromdata {
+    margin: 20px 0;
+    overflow-y: scroll;
+    height: 546px;
+  }
+  .top_info{
+    margin: 10px 0 0 10px;
+    min-width: 712px;
+    .info_css{
+      margin-right: 20px;
+    }
+  }
+</style>