Browse Source

设备档案路由配置

caojunjie 2 years ago
parent
commit
0777b6d2a4

+ 218 - 0
src/api/basicData/EquipmentArchives.js

@@ -0,0 +1,218 @@
+import request from '@/router/axios';
+
+
+// 设备档案 列表
+export const corpequipmentarchivesList = (current, size, params) => {
+  return request({
+    url: '/api/blade-client/corpequipmentarchives/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+// 设备档案 详情
+export const corpequipmentarchivesDetail = (data) => {
+  return request({
+    url: '/api/blade-client/corpequipmentarchives/detail',
+    method: 'get',
+    params: data
+  })
+}
+// 设备档案 保存
+export const corpequipmentarchivesSubmit = (data) => {
+  return request({
+    url: '/api/blade-client/corpequipmentarchives/submit',
+    method: 'post',
+    data: data
+  })
+}
+// 设备档案 删除
+export const corpequipmentarchivesRemove = (data) => {
+  return request({
+    url: '/api/blade-client/corpequipmentarchives/remove',
+    method: 'post',
+    params: data
+  })
+}
+// 设备档案 明细删除
+export const corpequipmentarchivesitemRemove = (data) => {
+  return request({
+    url: '/api/blade-client/corpequipmentarchivesitem/remove',
+    method: 'post',
+    params: data
+  })
+}
+
+
+export const getList = (current, size, params) => {
+  return request({
+    url: 'api/blade-purchase-sales/appParts/page',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+export const getListTwo = (current, size, params) => {
+  return request({
+    url: '/api/blade-purchase-sales/partsMall/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+      source:'1'
+    }
+  })
+}
+export const getCorpsAll = () => {
+  return request({
+    url: '/api/blade-client/partsCorps/getCorpsAll',
+    method: 'get',
+  })
+}
+export const getCorpDetails = (data) => {
+  return request({
+    url: '/api/blade-client/partsCorps/getDetails',
+    method: 'get',
+    params:data
+  })
+}
+export function gainUser(query) {
+  return request({
+    url: '/api/blade-user/client/gainUser',
+    method: 'get',
+    params: query
+  })
+}
+export function save(data) {
+  return request({
+    url: '/api/blade-purchase-sales/partsMall/savePlaceOrder',
+    method: 'post',
+    data:data
+  })
+}
+export function fixSave(data) {
+  return request({
+    url: '/api/blade-purchase-sales/dealerOrder/submitApp',
+    method: 'post',
+    data:data
+  })
+}
+export function submit(data) {
+  return request({
+    url: '/api/blade-purchase-sales/appParts/confirm',
+    method: 'post',
+    data:data
+  })
+}
+export function revoke(data) {
+  return request({
+    url: '/api/blade-purchase-sales/appParts/revoke',
+    method: 'post',
+    data:data
+  })
+}
+export const getDetails = (data) => {
+  return request({
+    url: '/api/blade-purchase-sales/appParts/detail',
+    method: 'get',
+    params:{
+      ...data,
+      source:'1'
+    }
+  })
+}
+export function remove(data) {
+  return request({
+    url: '/api/blade-purchase-sales/orderitems/update',
+    method: 'post',
+    data: {
+      id: data
+    }
+  })
+}
+export const getGoodsList = (current, size, params) => {
+  return request({
+      url: '/api/blade-client/goodsdesc/descList',
+      method: 'get',
+      params: {
+          ...params,
+          current,
+          size,
+      }
+  })
+}
+export const getCorpType = (data) => {
+  return request({
+    url: '/api/blade-client/corpstype/tree',
+    method: 'get',
+    params:data
+  })
+}
+export function getAllgoods() {
+  return request({
+    url: '/api/blade-client/goodsdesc/descListAll',
+    method: 'get',
+  })
+}
+// 确认收款
+export function collectPayment(data) {
+  return request({
+    url: '/api/blade-purchase-sales/appParts/collectPayment',
+    method: 'post',
+    data:data
+  })
+}
+export function orderRemove(data) {
+  return request({
+    url: '/api/blade-purchase-sales/appParts/remove',
+    method: 'post',
+    params: {
+      id: data
+    }
+  })
+}
+export const getStoragelist = (data) => {
+  return request({
+      url: '/api/blade-client/storagedesc/storage/list',
+      method: 'get',
+      params: data
+  })
+}
+export const statusStatisticsApi = (data) => {
+  return request({
+      url: '/api/blade-purchase-sales/partsMall/statusStatisticsApi',
+      method: 'get',
+      params: data
+  })
+}
+export const offset = (data) => {
+  return request({
+      url: '/api/blade-purchase-sales/appParts/offset',
+      method: 'post',
+      data: data
+  })
+}
+export const delivery = (data) => {
+  return request({
+      url: '/api/blade-purchase-sales/partsMall/delivery',
+      method: 'post',
+      data: data
+  })
+}
+
+// 根据产品ID和客户id获取产品单价
+export const obtainPrice = (data) => {
+  return request({
+    url: '/api/blade-client/goodsDescParts/obtainPrice',
+    method: 'get',
+    params: data
+  })
+}
+

+ 155 - 0
src/views/EquipmentArchives/components/feeInfo.vue

@@ -0,0 +1,155 @@
+<template>
+    <trade-card title="付款信息">
+        <avue-crud ref="crud" :data="data" :option="feeOption" @saveColumn="saveColumn" @resetColumn="resetColumn"
+            :cell-style="cellStyle">
+            <template slot="headerSerial">
+                <el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow"
+                    :disabled="detailData.status == 1" circle></el-button>
+            </template>
+            <template slot="menu" slot-scope="{ row, index }">
+                <el-button size="small" type="text" v-if="!row.id" @click="rowCell(row, index)">保存</el-button>
+            </template>
+            <template slot="accountHeader" slot-scope="{column}">
+                <span style="color: #409EFF;cursor: pointer" @click.stop="$refs.dictbiz.open()">付款账户
+                </span>
+            </template>
+        </avue-crud>
+        <dictbiz-dialog ref="dictbiz" title="添加账户" code="account" parentId="1587970253894307841"
+            @closed="getAllWorkDicts"></dictbiz-dialog>
+    </trade-card>
+</template>
+  
+<script>
+import { feeOption } from "../js/optionList";
+import { collectPayment } from "@/api/basicData/salesOrder";
+export default {
+    data() {
+        return {
+            feeOption: {}
+        };
+    },
+    props: {
+        data: {
+            type: Array
+        },
+        detailData: {
+            type: Object
+        },
+        form: {
+            type: Object
+        }
+    },
+    async created() {
+        this.feeOption = await this.getColumnData(
+            this.getColumnName(233),
+            feeOption
+        );
+        this.getAllWorkDicts()
+    },
+    methods: {
+        refreshTable() {
+            this.$refs.crud.refreshTable();
+        },
+        getAllWorkDicts() {
+            this.getWorkDicts("account").then(res => {
+                this.findObject(this.feeOption.column, "account").dicData = res.data.data;
+            });
+            this.$refs.crud.init();
+        },
+        cellStyle() {
+            return "padding:0;height:40px;";
+        },
+        addRow() {
+            // if (!this.form.corpId) {
+            //     return this.$message.error("请选择供应商名称");
+            // }
+            if(!this.form.id){
+                return this.$message.error("请保存数据");
+            }
+            this.data.push({ $cellEdit: true })
+        },
+        rowCell(row, index) {
+            collectPayment({ ...this.form, orderItemsList: [], settlementList: [], currentAmount: row.amount, account: row.account }).then(res => {
+                this.$emit('getPay', res.data.data)
+                this.$message.success("保存成功");
+            })
+
+        },
+        rowDel(row, index) {
+            this.$confirm("确定删除数据?", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning"
+            }).then(() => {
+                if (row.id) {
+                    //   remove(row.id).then(res => {
+                    //     this.$message({
+                    //       type: "success",
+                    //       message: "删除成功!"
+                    //     });
+                    //     this.data.splice(index, 1);
+                    //   });
+                } else {
+                    this.$message({
+                        type: "success",
+                        message: "删除成功!"
+                    });
+                    this.data.splice(index, 1);
+                }
+            });
+        },
+        async saveColumn() {
+            const inSave = await this.saveColumnData(
+                this.getColumnName(233),
+                this.feeOption
+            );
+            if (inSave) {
+                this.$nextTick(() => {
+                    this.$refs.crud.doLayout();
+                });
+                this.$message.success("保存成功");
+                //关闭窗口
+                this.$refs.crud.$refs.dialogColumn.columnBox = false;
+            }
+        },
+        async resetColumn() {
+            this.feeOption = feeOption;
+            const inSave = await this.delColumnData(
+                this.getColumnName(233),
+                feeOption
+            );
+            if (inSave) {
+                this.$nextTick(() => {
+                    this.$refs.crud.doLayout();
+                });
+                this.getAllWorkDicts()
+                this.$message.success("重置成功");
+                //关闭窗口
+                setTimeout(() => {
+                    this.$refs.crud.$refs.dialogColumn.columnBox = false;
+                }, 1000);
+            }
+        }
+    }
+};
+</script>
+  
+<style scoped>
+::v-deep .select-component {
+    display: flex;
+}
+
+.page-crad ::v-deep .basic-container__card {
+    height: 94.2vh;
+}
+
+.itemTable ::v-deep .el-table {
+    width: 738px;
+}
+
+::v-deep .el-input-group__append,
+.el-input-group__prepend {
+    padding: 0 5px;
+}
+</style>
+  

+ 786 - 0
src/views/EquipmentArchives/detailsPage.vue

@@ -0,0 +1,786 @@
+<template>
+  <div>
+    <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>
+        <div class="add-customer-btn">
+          <el-button type="info" icon="el-icon-printer" size="small" @click.stop="openReport()">报表打印
+          </el-button>
+          <el-button type="primary" size="small" v-if="detailData.status == 1 && form.confirmStatus == 0"
+            class="el-button--small-yh " @click.stop="openEdit">编辑
+          </el-button>
+          <el-button type="primary" size="small" v-if="!form.id && detailData.status != 1" @click="editCustomer">
+            保存数据
+          </el-button>
+          <!--<el-button type="primary" size="small" v-if="form.id && detailData.status != 1 && form.confirmStatus == 0"-->
+          <!--  @click="fixSave">-->
+          <!--  保存数据-->
+          <!--</el-button>-->
+          <el-button type="primary" size="small" v-if="form.id && detailData.status != 1 && form.confirmStatus == 0"
+            @click="submit">
+            提交
+          </el-button>
+          <el-button type="primary" size="small" v-if="form.confirmStatus == 1" @click="revoke">
+            撤销
+          </el-button>
+        </div>
+      </div>
+      <!-- <containerTitle title="基础资料" style="margin-top: 60px"></containerTitle> -->
+      <trade-card title="基础资料" style="margin-top: 60px" v-loading="loadingBtn">
+        <avue-form ref="form" class="trading-form" v-model="form" :option="option">
+          <template slot="corpId">
+            <crop-select v-model="form.corpId" corpType="GYS" :disabled="detailData.status == 1"
+              @getCorpData="getCorpData"></crop-select>
+          </template>
+               <template slot="storageId">
+                      <el-select v-model="form.storageId" placeholder="请选择" size="small" filterable @change="storageChange"
+                        :disabled="detailData.status == 1 || data.length > 0">
+                        <el-option v-for="item in storageoptions" :key="item.id" :label="item.cname" :value="item.id">
+                        </el-option>
+                      </el-select>
+                    </template>
+        </avue-form>
+      </trade-card>
+      <trade-card title="商品信息" v-loading="loadingBtn">
+        <avue-form class="trading-form" v-model="form" :option="option2">
+          <template slot="thisUsedProfit">
+            <el-input-number v-model="form.thisUsedProfit" :disabled="detailData.status == 1" @change="amountChange"
+              placeholder="请输入" size="small" :controls="false" style="width:100%;"></el-input-number>
+          </template>
+        </avue-form>
+        <avue-crud ref="crud" :option="optionList" :data="data" :table-loading="loading" @saveColumn="saveColumn"
+          @resetColumn="resetColumn" :cell-style="cellStyle">
+          <template slot="headerSerial">
+            <el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow"
+              :disabled="detailData.status == 1" circle></el-button>
+          </template>
+          <template slot="cname" slot-scope="{ row, index }">
+            <el-select v-if="row.$cellEdit" v-model="row.cname" placeholder="请选择" size="small" filterable
+              @change="cnameChange(row, index)">
+              <el-option v-for="item in goodsoptions" :key="item.itemId" :label="item.cname" :value="item.cname">
+              </el-option>
+            </el-select>
+            <span v-else>{{ row.cname }}</span>
+          </template>
+          <template slot="unitHeader" slot-scope="{column}">
+            <span style="color: #409EFF;cursor: pointer" @click.stop="$refs.dictbiz.open()">单位
+            </span>
+          </template>
+          <template slot="storageInQuantity" slot-scope="{ row, index }">
+            <el-input-number v-if="row.$cellEdit" min="0" v-model="row.storageInQuantity" @change="countChange(row)"
+              placeholder="请输入" size="small" :controls="false" style="width:100%;"></el-input-number>
+            <span v-else>{{ row.storageInQuantity }}</span>
+          </template>
+          <template slot="price" slot-scope="{ row, index }">
+            <el-input-number v-if="row.$cellEdit" v-model="row.price" min="0" @change="countChange(row)" placeholder="请输入"
+              size="small" :controls="false" style="width:100%;"></el-input-number>
+            <span v-else>{{ row.price }}</span>
+          </template>
+          <template slot="purchaseAmount" slot-scope="{ row, index }">
+            <el-input-number v-if="row.$cellEdit" v-model="row.purchaseAmount" min="0" @change="countChange(row)"
+              placeholder="请输入" size="small" :controls="false" style="width:100%;"></el-input-number>
+            <span v-else>{{ row.purchaseAmount }}</span>
+          </template>
+          <template slot="menu" slot-scope="{ row, index }">
+            <el-button size="small" type="text" :disabled="detailData.status == 1" @click="rowCell(row, index)">{{
+                row.$cellEdit ? "保存" : "修改"
+            }}</el-button>
+            <el-button size="small" type="text" :disabled="detailData.status == 1" @click="rowDel(row, index)">删除
+            </el-button>
+          </template>
+        </avue-crud>
+      </trade-card>
+      <fee-info ref="feeInfo" :data="settlementList" :form="form" :detailData="detailData" @getPay="getPay"
+        v-loading="loadingBtn">
+      </fee-info>
+      <containerTitle title="上传附件"></containerTitle>
+      <c-upload v-loading="loadingBtn" typeUpload="CD"
+        deleteUrl="/api/trade-purchase/woodHarvestingCloud/removeByFileId" :data="orderFilesList" display
+        :enumerationValue="35.1" :disabled="detailData.status == 1"></c-upload>
+      <el-dialog :title="addressTitle" v-dialogDrag :visible.sync="addressVisible" class="avue-dialog avue-dialog--top"
+        width="50%" append-to-body>
+        <span>
+          <el-tabs v-model="activeName">
+            <el-tab-pane label="供应商地址" name="first">
+              <avue-form class="trading-form" v-model="form2" :option="optiontabs1"></avue-form>
+            </el-tab-pane>
+            <el-tab-pane label="物流地址" name="second">
+              <avue-form class="trading-form" v-model="form3" :option="optiontabs2"></avue-form>
+            </el-tab-pane>
+          </el-tabs>
+        </span>
+        <div class="avue-dialog__footer">
+          <el-button @click="addressVisible = false">取 消</el-button>
+          <el-button @click="addressVisible = false" type="primary">确 定</el-button>
+        </div>
+      </el-dialog>
+      <dictbiz-dialog ref="dictbiz" title="添加单位" code="unit" parentId="1585962784498225154" @closed="getAllWorkDicts">
+      </dictbiz-dialog>
+      <report-dialog :switchDialog="switchDialog" :reportId="form.id" reportName="配件系统-采购单" @onClose="onClose()">
+      </report-dialog>
+    </div>
+  </div>
+</template>
+
+<script>
+import { optionList } from "./js/optionList";
+import { getDetails, submit, getCorpDetails, remove, getAllgoods, save, fixSave, revoke, collectPayment, getStoragelist } from "@/api/basicData/salesOrder";
+import feeInfo from "./components/feeInfo.vue";
+import reportDialog from "@/components/report-dialog/main";
+import { multiply, sum, subtract } from "@/util/calculate";
+export default {
+  name: "index",
+  data() {
+    return {
+      switchDialog: false,
+      activeName: 'first',
+      loadingBtn: false,
+      addressTitle: null,
+      addressVisible: false,
+      form: {},
+      form2: {
+      },
+      form3: {
+
+      },
+      data: [],
+      option: {
+        menuBtn: false,
+        labelWidth: 90,
+        disabled: false,
+        column: [
+          {
+            label: "供应商名称",
+            prop: "corpId",
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ],
+            span: 8,
+          },
+          {
+            label: "送货地址",
+            prop: "arrivalAddress",
+            type: 'select',
+            dicData: [],
+            props: {
+              label: 'detailedAddress',
+              value: 'detailedAddress'
+            },
+            allowCreate: true,
+            filterable: true,
+            span: 16,
+          },
+          {
+            label: "采购日期",
+            prop: "businesDate",
+            type: "date",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd 00:00:00",
+            span: 8,
+          },
+          {
+            label: "计划付款日期",
+            prop: "advanceCollectionDate",
+            type: "date",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd 00:00:00",
+            span: 8,
+          },
+          {
+            label: "收货日期",
+            prop: "requiredDeliveryDate",
+            type: "date",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd 00:00:00",
+            span: 8,
+          },
+                {
+                      label: "仓库",
+                      prop: "storageId",
+                      rules: [
+                        {
+                          required: true,
+                          message: "",
+                          trigger: "blur"
+                        }
+                      ],
+                      span: 8,
+                    },
+          {
+            label: "备注",
+            prop: "orderRemark",
+            placeholder: "打印时显示",
+            type: "textarea",
+            minRows: 3,
+            span: 16,
+          }
+        ]
+      },
+      option2: {
+        menuBtn: false,
+        labelWidth: 80,
+        disabled: false,
+        column: [
+          {
+            label: "税率",
+            prop: "exchangeRate",
+            type: "select",
+            props: {
+              label: "dictValue",
+              value: "dictKey"
+            },
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=tax_rate",
+            span: 4,
+          },
+          {
+            label: "采购总数量",
+            prop: "storageQuantity",
+            disabled: true,
+            span: 4,
+          },
+          {
+            label: "成本",
+            prop: "costAmount",
+            disabled: true,
+            span: 4,
+          },
+          {
+            label: "毛利",
+            prop: "grossProfit",
+            disabled: true,
+            span: 4,
+          },
+          {
+            label: "订单金额",
+            prop: "purchaseAmount",
+            disabled: true,
+            span: 4,
+          },
+          {
+            label: "优惠金额",
+            prop: "thisUsedProfit",
+            span: 4,
+          },
+          {
+            label: "合同金额",
+            prop: "orderAmount",
+            disabled: true,
+            span: 8,
+          },
+          {
+            label: "应付金额",
+            prop: "balanceAmount",
+            disabled: true,
+            span: 8,
+          },
+          {
+            label: "已付金额",
+            prop: "settlmentAmount",
+            disabled: true,
+            span: 8,
+          }
+        ]
+      },
+      optiontabs1: {
+        menuBtn: false,
+        labelWidth: 90,
+        column: [
+          {
+            label: "简称",
+            prop: "a",
+            type: "select",
+            span: 24,
+          },
+          {
+            label: "地址",
+            prop: "b",
+            type: "select",
+            span: 24,
+          },
+          {
+            label: "详细地址",
+            prop: "c",
+            span: 24,
+          },
+          {
+            label: "邮编",
+            prop: "d",
+            span: 24,
+          },
+          {
+            label: "备注",
+            prop: "e",
+            type: 'textarea',
+            minRows: 3,
+            span: 24,
+          },
+          {
+            label: "地址智能识别",
+            prop: "ad",
+            placeholder: "例:上海市徐汇区枫林街道斜土路100号",
+            type: "textarea",
+            minRows: 3,
+            span: 24,
+          }
+        ]
+      },
+      optiontabs2: {
+        menuBtn: false,
+        labelWidth: 80,
+        column: [
+          {
+            label: "目的地",
+            prop: "a",
+            type: "select",
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ],
+            span: 24,
+          },
+          {
+            label: "物流公司",
+            prop: "b",
+            span: 24,
+          },
+          {
+            label: "电话",
+            prop: "c",
+            span: 24,
+          },
+          {
+            label: "地址",
+            prop: "d",
+            span: 24,
+          },
+          {
+            label: "详细地址",
+            prop: "e",
+            span: 24,
+          },
+          {
+            label: "邮编",
+            prop: "f",
+            span: 24,
+          },
+          {
+            label: "备注",
+            prop: "remarks",
+            type: "textarea",
+            minRows: 3,
+            span: 24,
+          },
+          {
+            label: "地址智能识别",
+            prop: "g",
+            type: "textarea",
+            minRows: 3,
+            span: 24,
+          }
+        ]
+      },
+      optionList: {},
+      goodsoptions: [],
+      settlementList: [],
+      orderFilesList: []
+    };
+  },
+  props: {
+    detailData: {
+      type: Object
+    }
+  },
+  components: {
+    feeInfo,
+    reportDialog
+  },
+  async created() {
+    this.optionList = await this.getColumnData(
+      this.getColumnName(214),
+      optionList
+    );
+    if (this.detailData.id) {
+      this.getDetail(this.detailData.id);
+    }
+    if (this.detailData.status == 1) {
+      this.option.disabled = true;
+      this.option2.disabled = true;
+    }
+    this.getAllWorkDicts()
+    getAllgoods().then(res => {
+      this.goodsoptions = res.data.data
+    });
+  },
+  methods: {
+    openReport() {
+      this.switchDialog = !this.switchDialog;
+    },
+    onClose(val) {
+      this.switchDialog = val;
+    },
+    getAllWorkDicts() {
+      this.getWorkDicts("unit").then(res => {
+        this.findObject(this.optionList.column, "unit").dicData = res.data.data;
+      });
+      getStoragelist().then(res => {
+        this.storageoptions = res.data;
+        this.findObject(this.optionList.column, "storageId").dicData = res.data;
+      })
+      this.$refs.crud.init();
+    },
+    cellStyle() {
+      return "padding:0;height:40px;";
+    },
+    cnameChange(row) {
+      if (row.cname) {
+        this.goodsoptions.forEach(e => {
+          if (e.cname == row.cname) {
+            row.itemId = e.id
+            row.unit = e.unit
+            row.price = e.purchasePrice
+            row.storageInQuantity = 1
+            row.amount = e.standardPrice
+            row.purchasePrice = e.purchasePrice
+            row.storageAmount = e.purchasePrice
+          }
+        })
+      } else {
+        row.itemId = null
+        row.unit = null
+        row.price = null
+        row.storageInQuantity = null
+        row.amount = null
+        row.purchasePrice = null
+        row.storageAmount = null
+      }
+      this.countChange(row)
+    },
+    amountChange() {
+      let val = 0
+      this.data.forEach(e => {
+        val = sum(val, e.amount)
+        this.form.purchaseAmount = val
+        this.form.orderAmount = subtract(this.form.purchaseAmount, this.form.thisUsedProfit)
+      })
+    },
+    countChange(row) {
+      row.amount = multiply(row.price, row.storageInQuantity)
+      row.storageAmount = multiply(row.purchaseAmount, row.storageInQuantity)
+      let val = 0
+      this.data.forEach(e => {
+        val = sum(val, e.amount)
+        this.form.purchaseAmount = val
+        this.form.orderAmount = subtract(this.form.purchaseAmount, this.form.thisUsedProfit)
+      })
+    },
+    getDetail(id) {
+      this.loadingBtn = true
+      getDetails({ id: id })
+        .then(res => {
+          this.form = res.data.data;
+          this.data = res.data.data.orderItemsList;
+          this.settlementList = res.data.data.settlementList;
+          this.orderFilesList = res.data.data.orderFilesList ? res.data.data.orderFilesList : [];
+          this.getAddress(res.data.data)
+        })
+        .finally(() => {
+          this.loadingBtn = false;
+        });
+    },
+    getCorpData(row) {
+      if (row) {
+        this.form.corpsName = row.cname
+        this.form.corpTel = row.tel
+        getCorpDetails({ id: row.id }).then(res => {
+          this.findObject(this.option.column, "arrivalAddress").dicData = res.data.data.corpsAddrList;
+        })
+      } else {
+        this.form.corpsName = null
+        this.form.corpTel = null
+        this.findObject(this.option.column, "arrivalAddress").dicData = []
+      }
+    },
+       storageChange(row) {
+          // console.log(row)
+
+        },
+    getAddress(row) {
+      getCorpDetails({ id: row.corpId }).then(res => {
+        this.findObject(this.option.column, "arrivalAddress").dicData = res.data.data.corpsAddrList;
+      })
+    },
+    addRow() {
+            this.$refs["form"].validate((valid, done) => {
+              done();
+              if (valid) {
+                this.data.push({ $cellEdit: true, storageId: this.form.storageId })
+              } else {
+                return false;
+              }
+            });
+    },
+    rowCell(row, index) {
+      if (row.$cellEdit == true) {
+        this.$set(row, "$cellEdit", false);
+      } else {
+        this.$set(row, "$cellEdit", true);
+      }
+    },
+    rowDel(row, index) {
+      this.$confirm("确定删除数据?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        if (row.id) {
+          remove(row.id).then(res => {
+            this.$message({
+              type: "success",
+              message: "删除成功!"
+            });
+            this.data.splice(index, 1);
+          });
+        } else {
+          this.$message({
+            type: "success",
+            message: "删除成功!"
+          });
+          this.data.splice(index, 1);
+        }
+      });
+    },
+    getPay(row) {
+      this.getDetail(row.id);
+    },
+    //修改提交触发
+    editCustomer() {
+      this.$refs["form"].validate((valid, done) => {
+        done();
+        if (valid) {
+          if (this.data.length == 0) {
+            return this.$message.error('请添加一条商品信息');
+          }
+          if (this.settlementList.length > 0) {
+            for (let i = 0; i < this.settlementList.length; i++) {
+              if (!this.settlementList[i].id) {
+                return this.$message.error(`请保存第${i + 1}行的费用明细`);
+              }
+            }
+          }
+          this.loadingBtn = true;
+          save({ ...this.form, billType: 'CG', tradeType: 'YPJ', orderItemsList: this.data, settlementList: this.settlementList, orderFilesList: this.orderFilesList })
+            .then(res => {
+              this.$message.success("保存成功");
+              this.form = res.data.data;
+              this.data = res.data.data.orderItemsList;
+              this.settlementList = res.data.data.settlementList;
+              this.orderFilesList = res.data.data.orderFilesList ? res.data.data.orderFilesList : [];
+              this.detailData.status = 1
+              this.option.disabled = true;
+              this.option2.disabled = true;
+              this.$refs.crud.refreshTable();
+              this.$refs.feeInfo.refreshTable();
+            })
+            .finally(() => {
+              this.loadingBtn = false;
+            });
+        } else {
+          return false;
+        }
+      });
+    },
+    fixSave() {
+      this.$refs["form"].validate((valid, done) => {
+        done();
+        if (valid) {
+          if (this.data.length == 0) {
+            return this.$message.error('请添加一条商品信息');
+          }
+          if (this.settlementList.length > 0) {
+            for (let i = 0; i < this.settlementList.length; i++) {
+              if (!this.settlementList[i].id) {
+                return this.$message.error(`请保存第${i + 1}行的费用明细`);
+              }
+            }
+          }
+          this.loadingBtn = true;
+          fixSave({ ...this.form, billType: 'CG', tradeType: 'YPJ', orderItemsList: this.data, settlementList: this.settlementList, orderFilesList: this.orderFilesList })
+            .then(res => {
+              this.$message.success("修改成功");
+              this.form = res.data.data;
+              this.data = res.data.data.orderItemsList;
+              this.settlementList = res.data.data.settlementList;
+              this.orderFilesList = res.data.data.orderFilesList ? res.data.data.orderFilesList : [];
+            })
+            .finally(() => {
+              this.loadingBtn = false;
+            });
+        } else {
+          return false;
+        }
+      });
+    },
+    submit() {
+      this.$refs["form"].validate((valid, done) => {
+        done();
+        if (valid) {
+          if (this.data.length == 0) {
+            return this.$message.error('请添加一条商品信息');
+          }
+          if (this.settlementList.length > 0) {
+            for (let i = 0; i < this.settlementList.length; i++) {
+              if (!this.settlementList[i].id) {
+                return this.$message.error(`请保存第${i + 1}行的费用明细`);
+              }
+            }
+          }
+          this.loadingBtn = true;
+          submit({ ...this.form, billType: 'CG', tradeType: 'YPJ', orderItemsList: this.data, settlementList: this.settlementList, orderFilesList: this.orderFilesList })
+            .then(res => {
+              this.$message.success("提交成功");
+              this.form = res.data.data;
+              this.data = res.data.data.orderItemsList;
+              this.settlementList = res.data.data.settlementList;
+              this.orderFilesList = res.data.data.orderFilesList ? res.data.data.orderFilesList : [];
+              this.$emit("goBack");
+            })
+            .finally(() => {
+              this.loadingBtn = false;
+            });
+        } else {
+          return false;
+        }
+      });
+    },
+    revoke() {
+      this.$confirm('此操作将会撤销单子, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.loadingBtn = true;
+        revoke({ ...this.form, billType: 'CG', tradeType: 'YPJ', orderItemsList: this.data, settlementList: this.settlementList })
+          .then(res => {
+            this.$message.success("撤销成功");
+            this.form = res.data.data;
+            this.data = res.data.data.orderItemsList;
+            this.settlementList = res.data.data.settlementList
+            this.openEdit()
+          })
+          .finally(() => {
+            this.loadingBtn = false;
+          });
+      }).catch(() => {
+      });
+    },
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(214),
+        this.optionList
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn() {
+      this.optionList = optionList;
+      const inSave = await this.delColumnData(
+        this.getColumnName(214),
+        optionList
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.getAllWorkDicts()
+        this.$message.success("重置成功");
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    openEdit() {
+      this.detailData.status = 2
+      this.option = this.$options.data().option;
+      this.option2 = this.$options.data().option2;
+      this.$refs.crud.refreshTable();
+      this.$refs.feeInfo.refreshTable();
+    },
+    //返回列表
+    backToList() {
+      this.$emit("goBack");
+    }
+  },
+  watch: {
+    // data: function (rows) {
+    //   let val = 0
+    //   rows.forEach(e => {
+    //     val = sum(val, e.amount)
+    //     this.form.purchaseAmount = val
+    //     this.form.orderAmount = subtract(this.form.purchaseAmount, this.form.thisUsedProfit)
+    //   })
+    // }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.trading-form ::v-deep .el-form-item {
+  margin-bottom: 8px !important;
+}
+
+::v-deep .el-dialog__body {
+  padding: 0px 20px 15px 20px;
+}
+
+::v-deep .el-form-item__error {
+  display: none !important;
+}
+
+.img-form ::v-deep .el-form-item {
+  height: 150px;
+  line-height: 150px;
+  margin-bottom: 8px !important;
+}
+
+.img-form ::v-deep .avue-upload__icon {
+  font-size: 20px;
+  width: 150px;
+  height: 150px;
+  line-height: 150px;
+}
+
+::v-deep .el-table .cell {
+  padding: 0 2px !important;
+}
+
+::v-deep .avue-crud .el-table .el-form-item__label {
+  left: -1px;
+}
+
+.addressTabs {
+  display: flex;
+  justify-content: center;
+
+  span {
+    width: 100px;
+    font-size: 18px;
+    font-weight: 600;
+    text-align: center;
+  }
+}
+</style>

+ 349 - 0
src/views/EquipmentArchives/index.vue

@@ -0,0 +1,349 @@
+<template>
+  <div>
+    <basic-container v-show="show" class="page-crad">
+      <avue-crud ref="crud" :option="option" :data="dataList" :page.sync="page" :search.sync="search"
+        @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
+        @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
+        @resetColumn="resetColumn" :cell-style="cellStyle" @search-criteria-switch="searchCriteriaSwitch">
+        <template slot="menuLeft">
+          <el-button type="primary" size="mini" @click.stop="newAdd()">新建设备档案
+          </el-button>
+        </template>
+        <template slot="corpIdSearch">
+          <crop-select v-model="search.corpId" corpType="GYS"></crop-select>
+        </template>
+        <template slot-scope="{ row, index }" slot="corpId">
+          <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 1)">{{ row.corpsName }}
+          </span>
+        </template>
+        <template slot-scope="{ row, index }" slot="sysNo">
+          <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 1)">{{ row.sysNo }}
+          </span>
+        </template>
+        <template slot="businesDateSearch">
+          <el-date-picker v-model="search.businesDate" type="daterange" start-placeholder="开始日期" end-placeholder="结束日期"
+            format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" :default-time="['00:00:00', '23:59:59']"
+            :picker-options="pickerOptions">
+          </el-date-picker>
+        </template>
+        <template slot-scope="{ row, index }" slot="menu">
+          <!-- <el-tooltip class="item" effect="dark" content="新建采购订单" placement="top">
+            <i class="tradingIcon icon-add" />
+          </el-tooltip>
+          <el-tooltip class="item" effect="dark" content="付款" placement="top">
+            <i class="tradingIcon icon-proceeds" />
+          </el-tooltip>
+          <el-tooltip class="item" effect="dark" content="发货" placement="top">
+            <i class="tradingIcon icon-deliver" />
+          </el-tooltip>
+          <el-tooltip class="item" effect="dark" content="对账" placement="top">
+            <i class="tradingIcon icon-reconciliation" />
+          </el-tooltip> -->
+          <el-tooltip class="item" effect="dark" content="编辑" placement="top">
+            <i class="tradingIcon icon-edit" @click.stop="editOpen(row, 2)"/>
+          </el-tooltip>
+          <el-tooltip class="item" effect="dark" content="删除" placement="top">
+            <i class="tradingIcon icon-del" v-if="row.confirmStatus == 0" @click.stop="rowDel(row, index)"/>
+          </el-tooltip>
+          <!--<el-button type="text" size="small" @click.stop="editOpen(row, 2)">-->
+          <!--  查看-->
+          <!--</el-button>-->
+          <!--<el-button type="text" size="small" v-if="row.confirmStatus == 0" @click.stop="rowDel(row, index)">-->
+          <!--  删除-->
+          <!--</el-button>-->
+        </template>
+      </avue-crud>
+    </basic-container>
+    <details-page v-if="!show" @goBack="goBack()" :detailData="detailData" />
+  </div>
+</template>
+
+<script>
+import detailsPage from "./detailsPage";
+import { option } from "./js/optionList";
+import {getList, getCorpsAll, gainUser, getCorpType, orderRemove} from "@/api/basicData/EquipmentArchives";
+export default {
+  name: "index",
+  data() {
+    return {
+      src: '',
+      show: true,
+      loading: false,
+      search: {},
+      detailData: {},
+      dataList: [],
+      selectionList: [],
+      page: {
+        pageSize: 20,
+        currentPage: 1,
+        total: 0,
+        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+      },
+      option: {},
+      pickerOptions: {
+        shortcuts: [
+          {
+            text: '当天',
+            onClick(picker) {
+              const date = new Date();
+              const start = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0);
+              const end = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 23, 59, 59);
+              picker.$emit('pick', [start, end]);
+            }
+          },
+          {
+            text: '昨天',
+            onClick(picker) {
+              const date = new Date();
+              const start = new Date(date.getFullYear(), date.getMonth(), date.getDate() - 1, 0, 0, 0);
+              const end = new Date(date.getFullYear(), date.getMonth(), date.getDate() - 1, 23, 59, 59);
+              picker.$emit('pick', [start, end]);
+            }
+          }, {
+            text: '当月',
+            onClick(picker) {
+              const date = new Date();
+              const start = new Date(date.getFullYear(), date.getMonth(), 1, 0, 0, 0);
+              const end = new Date(date.getFullYear(), date.getMonth() + 1, 0, 23, 59, 59);
+              picker.$emit('pick', [start, end]);
+            }
+          }, {
+            text: '当季',
+            onClick(picker) {
+              const date = new Date();
+              const start = new Date(date.getFullYear(), parseInt(date.getMonth() / 3) * 3, 1, 0, 0, 0);
+              const end = new Date(date.getFullYear(), parseInt(date.getMonth() / 3) * 3 + 3, 0, 23, 59, 59);
+              picker.$emit('pick', [start, end]);
+            }
+          }, {
+            text: '当年',
+            onClick(picker) {
+              const date = new Date();
+              const start = new Date(date.getFullYear(), date.getMonth(), 1, 0, 0, 0);
+              const end = new Date(date.getFullYear() + 1, 0, 0, 23, 59, 59);
+              picker.$emit('pick', [start, end]);
+            }
+          }, {
+            text: '最近一周',
+            onClick(picker) {
+              const date = new Date();
+              const start = new Date(date.getFullYear(), date.getMonth(), date.getDate() - 7, 0, 0, 0);
+              const end = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 23, 59, 59);
+              picker.$emit('pick', [start, end]);
+            }
+          }, {
+            text: '最近二周',
+            onClick(picker) {
+              const date = new Date();
+              const start = new Date(date.getFullYear(), date.getMonth(), date.getDate() - 7 * 2, 0, 0, 0);
+              const end = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 23, 59, 59);
+              picker.$emit('pick', [start, end]);
+            }
+          }, {
+            text: '最近三周',
+            onClick(picker) {
+              const date = new Date();
+              const start = new Date(date.getFullYear(), date.getMonth(), date.getDate() - 7 * 3, 0, 0, 0);
+              const end = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 23, 59, 59);
+              picker.$emit('pick', [start, end]);
+            }
+          }]
+      },
+    };
+  },
+  components: {
+    detailsPage
+  },
+  async created() {
+      this.getWorkDicts("payment_status").then(res => {
+          const arr = res.data.data.map(item => {
+              item.dictKey = Number(item.dictKey)
+              return item
+          })
+          this.findObject(this.option.column, "actualPaymentStatus").dicData = arr
+      });
+      this.getWorkDicts("order_status_pjjl").then(res => {
+          const arr = res.data.data.map(item => {
+              item.dictKey = Number(item.dictKey)
+              return item
+          })
+          this.findObject(this.option.column, "status").dicData = arr
+      });
+    this.option = await this.getColumnData(this.getColumnName(213), option);
+    this.option.height = window.innerHeight - 210;
+    this.getAllWorkDicts()
+  },
+  activated() {
+    this.$refs.crud.refreshTable();
+    if (!this.$store.getters.pjcgStatus&&!this.show) {
+      this.show = true;
+    }
+    if (this.$route.query.orderId) {
+      setTimeout(() => {
+        this.editOpen({ id: this.$route.query.orderId }, 1);
+      }, 100);
+    }
+  },
+  methods: {
+    getAllWorkDicts() {
+      gainUser().then(res => {
+        this.findObject(this.option.column, "createUser").dicData = res.data.data;
+      })
+      getCorpType({ corpType: 'GYS' }).then(res => {
+        this.findObject(this.option.column, "corpType").dicData= res.data.data
+      });
+      this.$refs.crud.init();
+    },
+    searchCriteriaSwitch(type) {
+      if (type) {
+        this.option.height = this.option.height - 138;
+      } else {
+        this.option.height = this.option.height + 138;
+      }
+      this.$refs.crud.getTableHeight();
+    },
+    cellStyle() {
+      return "padding:0;height:40px;";
+    },
+    //点击搜索按钮触发
+    searchChange(params, done) {
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.search);
+    },
+    newAdd() {
+      this.show = false;
+      this.$store.commit("IN_PJCG_STATUS");
+    },
+    onLoad(page, params = {}) {
+      let data = this.deepClone(Object.assign(params, this.search));
+      data.billType = 'CG';
+      data.tradeType = 'YPJ';
+      if (data.businesDate) {
+        data.orderStartDate = data.businesDate[0];
+        data.orderEndDate = data.businesDate[1];
+      }
+      delete data.businesDate
+      this.loading = true;
+      getList(
+          page.currentPage,
+          page.pageSize,
+          data
+      ).then(res => {
+        this.dataList = res.data.data.records ? res.data.data.records : [];
+        this.page.total = res.data.data.total;
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+      }).finally(() => {
+        this.loading = false;
+      });
+    },
+    editOpen(row, status) {
+      this.detailData = {
+        id: row.id,
+        status: status
+      };
+      this.show = false;
+      this.$store.commit("IN_PJCG_STATUS");
+    },
+    currentChange(val) {
+      this.page.currentPage = val;
+    },
+    sizeChange(val) {
+      this.page.currentPage = 1;
+      this.page.pageSize = val;
+    },
+    rowDel(row, index, done) {
+      this.$confirm("确定删除数据?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        orderRemove(row.id).then(res => {
+          if (res.data.code == 200) {
+            this.$message({
+              type: "success",
+              message: "删除成功!"
+            });
+            this.onLoad(this.page, this.search);
+          }
+        });
+      });
+    },
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(213),
+        this.option
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn() {
+      this.option = option;
+      const inSave = await this.delColumnData(this.getColumnName(213), option);
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.getAllWorkDicts()
+        this.$message.success("重置成功");
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    //返回列表
+    goBack() {
+      this.detailData = this.$options.data().detailData;
+      this.show = true;
+      this.onLoad(this.page, this.search);
+      this.$store.commit("OUT_PJCG_STATUS");
+    },
+  }
+}
+</script>
+
+<style  lang="scss"  scoped>
+.page-crad ::v-deep .basic-container__card {
+  height: 94.2vh;
+}
+
+.stat-td {
+  text-align: center;
+  position: relative;
+}
+
+.stat-img {
+  width: 95%;
+  height: 100px;
+}
+
+.stat-tip {
+  position: absolute;
+  left: 15px;
+  top: 5px;
+
+  .money {
+    color: #fff;
+    font-size: 28px;
+    text-align: left;
+    font-weight: 600;
+  }
+
+  .title {
+    color: #fff;
+    font-size: 14px;
+    text-align: left;
+    margin-top: 5px;
+    margin-bottom: 0px;
+  }
+}
+</style>

+ 305 - 0
src/views/EquipmentArchives/js/optionList.js

@@ -0,0 +1,305 @@
+import { number } from "echarts"
+
+export const option = {
+  searchShow: true,
+  searchMenuSpan: 8,
+  align: "center",
+  searchSpan: 8,
+  tip: false,
+  border: true,
+  index: true,
+  addBtn: false,
+  viewBtn: false,
+  editBtn: false,
+  delBtn: false,
+  menu: true,
+  menuWidth: 150,
+  searchIcon: true,
+  searchIndex: 2,
+  showSummary: true,
+  summaryText: "合计",
+  sumColumnList: [
+    {
+      name: "debitAmount",
+      type: "sum"
+    },
+    {
+      name: "deliveringAmount",
+      type: "sum"
+    },
+    {
+      name: "balanceAmount",
+      type: "sum"
+    },
+    {
+      name: "settlmentAmount",
+      type: "sum"
+    }
+  ],
+  column: [
+    {
+      label: "单号",
+      prop: "sysNo",
+      width:165,
+      overHidden: true,
+      search: true,
+      index: 1
+    },
+    {
+      label: "供应商名称",
+      prop: "corpId",
+      type: 'select',
+      dicData: [],
+      search: true,
+      overHidden: true,
+      index: 2
+    },
+    {
+      label: "电话",
+      prop: "corpTel",
+      // search: true,
+      overHidden: true,
+      index: 3
+    },
+    {
+      label: "日期",
+      prop: "businesDate",
+      search: true,
+      overHidden: true,
+      index: 4
+    },
+    {
+      label: "合同金额",
+      prop: "debitAmount",
+      overHidden: true,
+      index: 5
+    },
+    {
+      label: "已送货",
+      prop: "deliveringAmount",
+      overHidden: true,
+      // search: true,
+      index: 6
+    },
+    {
+      label: "未付款",
+      prop: "balanceAmount",
+      overHidden: true,
+      // search: true,
+      index: 7
+    },
+    {
+      label: "已付款",
+      prop: "settlmentAmount",
+      overHidden: true,
+      // search: true,
+      index: 8
+    },
+    {
+      label: "付款状态",
+      prop: "actualPaymentStatus",
+      type: 'select',
+      dicData:[],
+      props: {
+        label: "dictValue",
+        value: "dictKey"
+      },
+      index: 9
+    },
+    {
+      label: "状态",
+      prop: "status",
+      type: 'select',
+      // search: true,
+      dicData:[],
+      props: {
+        label: "dictValue",
+        value: "dictKey"
+      },
+      index: 10
+    },
+    {
+      label: "供应商分类",
+      prop: "corpType",
+      type: "tree",
+      dicData: [],
+      filterable:true,
+      props: {
+        label: "title",
+        value: "id"
+      },
+      hide: true,
+      search: true,
+      showColumn: false,
+      index: 12
+    },
+    {
+      label: "制单人",
+      prop: "createUser",
+      type: "select",
+      filterable:true,
+      props: {
+        label: "name",
+        value: "id"
+      },
+      dicData: [],
+      hide: true,
+      search: true,
+      showColumn: false,
+      index: 14
+    }
+  ]
+}
+export const optionList = {
+  align: "center",
+  addBtn: false,
+  refreshBtn: false,
+  editBtn: false,
+  delBtn: false,
+  border: true,
+  menuWidth: 120,
+  stripe: true,
+  index: true,
+  indexSlot: true,
+  showSummary: true,
+  summaryText: "合计",
+  sumColumnList: [
+    {
+      name: "amount",
+      type: "sum"
+    },
+    {
+      name: "storageAmount",
+      type: "sum"
+    },
+    {
+      name: "storageInQuantity",
+      type: "sum"
+    },
+    {
+      name: "actualQuantity",
+      type: "sum"
+    }
+  ],
+  column: [
+    {
+      label: "产品",
+      prop: "cname",
+      width:'250px',
+      overHidden: true
+    },
+    {
+      label: "图片",
+      prop: "img",
+      overHidden: true
+    },
+    {
+      label: "数量",
+      prop: "storageInQuantity",
+      type: 'number',
+      minRows: 0,
+      controls: false,
+      overHidden: true
+    },
+    {
+      label: "单位",
+      prop: "unit",
+      type: "select",
+      props: {
+        label: "dictValue",
+        value: "dictValue"
+      },
+      dicData:[],
+      cell: true,
+      overHidden: true
+    },
+    {
+      label: "单价",
+      prop: "price",
+      type: 'number',
+      minRows: 0,
+      controls: false,
+      overHidden: true
+    },
+    {
+      label: "金额",
+      prop: "amount",
+      type: 'number',
+      minRows: 0,
+      controls: false,
+      overHidden: true
+    },
+    {
+      label: "送货数量",
+      prop: "actualQuantity",
+      type: 'number',
+      controls: false,
+      minRows: 0,
+      cell: true,
+      overHidden: true
+    },
+    {
+      label: "备注",
+      prop: "remarks",
+      cell: true,
+      overHidden: true
+    }
+    // ,{
+    //   label: "进价",
+    //   prop: "purchasePrice",
+    //   overHidden: true
+    // }
+  ]
+}
+
+export const feeOption = {
+  align: "center",
+  addBtn: false,
+  refreshBtn: false,
+  editBtn: false,
+  delBtn: false,
+  border: true,
+  menuWidth: 120,
+  stripe: true,
+  index: true,
+  indexSlot: true,
+  column: [
+    {
+      label: "付款单号",
+      prop: "sysNo",
+      overHidden: true
+    },
+    {
+      label: "付款日期",
+      prop: "settlementDate",
+      type: "datetime",
+      format: "yyyy-MM-dd HH:mm:ss",
+      valueFormat: "yyyy-MM-dd HH:mm:ss",
+      overHidden: true
+    },
+    {
+      label: "付款金额",
+      prop: "amount",
+      cell: true,
+      overHidden: true
+    },
+    {
+      label: "付款账户",
+      prop: "account",
+      type: "select",
+      props: {
+        label: "dictValue",
+        value: "dictValue"
+      },
+      dicData:[],
+      cell: true,
+      overHidden: true
+    },
+    {
+      label: "备注",
+      prop: "remark",
+      cell: true,
+      overHidden: true
+    }
+  ]
+}