Quellcode durchsuchen

新增采购合同

lichao vor 3 Jahren
Ursprung
Commit
e5a24a5d7c

+ 115 - 0
src/views/purchase/contract/config/advantageProject.json

@@ -0,0 +1,115 @@
+{
+  "lazy": true,
+  "tip": false,
+  "simplePage": true,
+  "searchShow": true,
+  "searchMenuSpan": 6,
+  "dialogWidth": "60%",
+  "addBtn":false,
+  "editBtn":false,
+  "addRowBtn":false,
+  "cellBtn":false,
+  "cancelBtn":false,
+  "tree": true,
+  "border": true,
+  "index": true,
+  "refreshBtn": false,
+  "selection": true,
+  "menuWidth": 300,
+  "dialogClickModal": false,
+  "column":[
+    {
+      "label": "费用名称",
+      "prop": "feeName",
+      "index": 1,
+      "width":100,
+      "cell": false,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入费用名称",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "编号",
+      "prop": "code",
+      "index": 2,
+      "width":100,
+      "cell": false,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入编号",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "国内支付方",
+      "prop": "corpId",
+      "index": 3,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": "请输入国内支付方",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "支付金额",
+      "prop": "amount",
+      "index": 4,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": "请输入支付金额",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "核销金额",
+      "prop": "settlmentAmount",
+      "index": 5,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": "请输入核销金额",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "排序",
+      "prop": "sort",
+      "type": "number",
+      "index": 6,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入排序",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "备注",
+      "prop": "remarks",
+      "index": 7,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入备注",
+          "trigger": "blur"
+        }
+      ]
+    }
+  ]
+}

+ 193 - 0
src/views/purchase/contract/config/detailedList.json

@@ -0,0 +1,193 @@
+{
+  "lazy": true,
+  "tip": false,
+  "simplePage": true,
+  "searchShow": true,
+  "addBtn":false,
+  "editBtn":false,
+  "addRowBtn":true,
+  "cellBtn":false,
+  "cancelBtn":false,
+  "refreshBtn": false,
+  "searchMenuSpan": 6,
+  "dialogWidth": "60%",
+  "tree": true,
+  "border": true,
+  "index": true,
+  "selection": true,
+  "menuWidth": 300,
+  "dialogClickModal": false,
+  "addBtnText": "新增明细",
+  "column":[
+    {
+      "label": "提单号",
+      "prop": "sort",
+      "index": 1,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入排序",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "货物品种",
+      "prop": "priceCategory",
+      "index": 2,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入类别",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "货物详情",
+      "prop": "code",
+      "index": 3,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": "请输入编码",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "箱号",
+      "prop": "typeno",
+      "index": 4,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": "请输入规格编码",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "件数",
+      "prop": "specificationAndModel",
+      "index": 5,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": "请输入规格型号",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "发票净重(吨)",
+      "prop": "orderQuantity",
+      "index": 6,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": "请输入订货数量",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "码单重量(吨)",
+      "prop": "actualQuantity",
+      "index": 7,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": "请输入发货数量",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "单价",
+      "prop": "storageQuantity",
+      "index": 8,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": "请输入库存",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "合同金额",
+      "prop": "price",
+      "index": 9,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": "请输入最新单价",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "税率",
+      "prop": "amount",
+      "index": 10,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": "请输入金额",
+          "trigger": "blur"
+        }
+      ]
+    }, {
+      "label": "币别",
+      "prop": "price",
+      "index": 11,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": "请输入最新单价",
+          "trigger": "blur"
+        }
+      ]
+    }, {
+      "label": "汇率",
+      "prop": "price",
+      "index": 12,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": "请输入最新单价",
+          "trigger": "blur"
+        }
+      ]
+    }, {
+      "label": "备注",
+      "prop": "price",
+      "index": 13,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": "请输入最新单价",
+          "trigger": "blur"
+        }
+      ]
+    }
+  ]
+}

+ 97 - 0
src/views/purchase/contract/config/mainList.json

@@ -0,0 +1,97 @@
+{
+    "lazy": true,
+    "tip": false,
+    "simplePage": true,
+    "searchShow": true,
+    "searchMenuSpan": 6,
+    "dialogWidth": "60%",
+    "tree": true,
+    "border": true,
+    "index": true,
+    "selection": true,
+    "viewBtn": false,
+    "editBtn": false,
+    "delBtn": false,
+    "menuWidth": 300,
+    "dialogClickModal": false,
+    "searchLabelWidth": 100,
+    "addBtnText": "新单",
+    "expand": true,
+    "rowKey": "id",
+    "column":[
+        {
+            "label": "合同日期",
+            "prop": "Business_date",
+            "search": true,
+            "index": 1,
+            "width":100
+        },
+        {
+            "label": "合同号",
+            "prop": "OrderNo",
+            "search": true,
+            "index": 2,
+            "width":100
+        },{
+            "label": "供应商",
+            "prop": "Corpid",
+            "search": true,
+            "index": 3,
+            "width":100
+        },{
+            "label": "采购商",
+            "prop": "Purchaserid",
+            "search": true,
+            "index": 4,
+            "width":100
+        },{
+            "label": "付款日期/开证日期",
+            "prop": "Accounts_collection_date",
+            "search": true,
+            "index": 5,
+            "width":100
+        },{
+            "label": "到港日期",
+            "prop": "arrival_date",
+            "search": true,
+            "index": 6,
+            "width":100
+        },{
+            "label": "合同金额",
+            "prop": "Order_amount",
+            "search": false,
+            "index": 7,
+            "width":100
+        },{
+            "label": "币别及汇率",
+            "prop": "Currency",
+            "search": false,
+            "index": 8,
+            "width":100
+        },{
+            "label": "是否全部到货",
+            "prop": "banks",
+            "search": false,
+            "index": 8,
+            "width":100
+        },{
+            "label": "单据状态",
+            "prop": "requiredDeliveryDate",
+            "search": false,
+            "index": 8,
+            "width":100
+        },{
+            "label": "单据类型",
+            "prop": "Order_type",
+            "search": false,
+            "index": 8,
+            "width":100
+        },{
+            "label": "备注",
+            "prop": "Order_Remark",
+            "search": false,
+            "index": 8,
+            "width":100
+        }
+    ]
+}

+ 125 - 0
src/views/purchase/contract/config/mainListCost.json

@@ -0,0 +1,125 @@
+{
+  "headerAlign": "center",
+  "align": "center",
+  "border": true,
+  "index": true,
+  "lazy": true,
+  "tip": false,
+  "addBtn": false,
+  "searchShow": false,
+  "searchShowBtn": false,
+  "menu": false,
+  "simplePage": true,
+  "searchMenuSpan": 6,
+  "tree": true,
+  "selection": true,
+  "viewBtn": true,
+  "menuWidth": 300,
+  "column": [
+    {
+      "label": "费用编号",
+      "prop": "code",
+      "search": true,
+      "index": 1,
+      "width": 100,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入费用编号",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "费用名称",
+      "prop": "cname",
+      "search": true,
+      "index": 2,
+      "width": 100,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入商品名称",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "币别",
+      "prop": "fcyno",
+      "search": true,
+      "index": 3,
+      "width": 100,
+      "rules": [
+        {
+          "required": false,
+          "message": "请输入币别",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "计量单位",
+      "prop": "unitno",
+      "search": true,
+      "index": 4,
+      "width": 100,
+      "rules": [{
+        "required": false,
+        "message": "请输入计量单位",
+        "trigger": "blur"
+      }]
+    },
+    {
+      "label": "收付",
+      "type": "select",
+      "prop": "dc",
+      "search": true,
+      "index": 5,
+      "width": 100,
+      "dicData": [{
+        "label": "收",
+        "value": "D"
+      }, {
+        "label": "付",
+        "value": "C"
+      }],
+      "rules": [
+        {
+          "required": false,
+          "message": "请选择收付",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "费用类别",
+      "prop": "feesTypeId",
+      "dicData": [],
+      "type": "tree",
+      "hide": true,
+      "addDisabled": false,
+      "multiple": true,
+      "props": {
+        "label": "title"
+      },
+      "rules": [{
+        "required": true,
+        "message": " ",
+        "trigger": "click"
+      }]
+    },{
+      "label": "备注",
+      "prop": "remarks",
+      "index": 6,
+      "width":100,
+      "rules": [
+        {
+          "required": false,
+          "message": "请输入备注",
+          "trigger": "blur"
+        }
+      ]
+    }
+  ]
+}

+ 69 - 0
src/views/purchase/contract/config/uploadList.json

@@ -0,0 +1,69 @@
+{
+  "lazy": true,
+  "tip": false,
+  "simplePage": true,
+  "searchShow": true,
+  "searchMenuSpan": 6,
+  "dialogWidth": "60%",
+  "tree": true,
+  "refreshBtn": false,
+  "border": true,
+  "index": true,
+  "selection": true,
+  "menuWidth": 300,
+  "dialogClickModal": false,
+  "addBtnText": "上  传",
+  "column":[
+    {
+      "label": "排序",
+      "prop": "sort",
+      "type": "number",
+      "index": 1,
+      "width":100,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入排序",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "文件名称",
+      "prop": "fileName",
+      "index": 2,
+      "width":100,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入文件名称",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "备注",
+      "prop": "remarks",
+      "index": 5,
+      "width":100,
+      "rules": [
+        {
+          "required": false,
+          "message": "请输入备注",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "附件",
+      "prop": "url",
+      "type": "upload",
+      "listType": "picture-img",
+      "dataType": "string",
+      "action": "/api/blade-resource/oss/endpoint/put-file",
+      "propsHttp": {
+        "res": "data",
+        "url": "link"
+      },
+      "hide": true,
+      "span": 24
+    }
+  ]
+}

+ 663 - 0
src/views/purchase/contract/detailsPage.vue

@@ -0,0 +1,663 @@
+<template>
+  <div class="borderless">
+    <div class="customer-head">
+      <div class="customer-back">
+        <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
+                   @click="backToList">返回列表
+        </el-button>
+      </div>
+      <el-button
+        class="el-button--small-yh add-customer-btn"
+        type="primary"
+        :disabled="disabled"
+        @click="editCustomer"
+      >{{form.id?'确认修改':'确认新增'}}
+      </el-button>
+    </div>
+    <div style="margin-top: 60px">
+      <el-form :model="form" ref="form" label-width="130px">
+        <containerTitle title="基础信息"></containerTitle>
+        <basic-container style="margin-bottom: 10px">
+          <el-row>
+            <el-col v-for="(item, index) in basicData.column" :span="item.span?item.span:8" :key="index">
+              <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
+                <el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]" size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss"/>
+                <el-select v-else-if="item.type === 'select'" style="width: 100%" size="small" placeholder="请选择" clearable filterable></el-select>
+                <el-input type="age" v-else v-model="form[item.prop]" size="small" autocomplete="off" placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </basic-container>
+<!--        采购明细-->
+        <containerTitle title="采购明细"></containerTitle>
+        <basic-container style="margin-bottom: 10px">
+          <avue-crud
+            :option="detailedList"
+            :data="detailedData"
+            ref="detailedList"
+            @row-save="rowSaveProject"
+            @row-update="rowUpdateProject"
+            @row-del="rowDelProject"
+          >
+            <template slot-scope="{row,index}" slot="menu">
+              <el-button
+                type="text"
+                size="small"
+                @click="rowCellDetailed(row,index)"
+              >{{row.$cellEdit?'保存':'修改'}}</el-button>
+            </template>
+            <template slot="menuLeft" slot-scope="{size}">
+<!--              <el-button type="primary"-->
+<!--                         icon="el-icon-plus"-->
+<!--                         size="small"-->
+<!--              >保 存</el-button>-->
+<!--              <el-button type="warning"-->
+<!--                         icon="el-icon-check"-->
+<!--                         size="small"-->
+<!--              >请 核</el-button>-->
+<!--              <el-button type="info"-->
+<!--                         icon="el-icon-printer"-->
+<!--                         size="small"-->
+<!--              >打 印</el-button>-->
+            </template>
+          </avue-crud>
+        </basic-container>
+<!--        其他费用-->
+        <containerTitle title="其他费用"></containerTitle>
+        <basic-container style="margin-bottom: 40px">
+          <avue-crud
+            :option="advantageProject"
+            v-model="advantageProjectForm"
+            :data="advantageProjectData"
+            ref="crudProject"
+            @row-save="rowSaveProject"
+            @row-update="rowUpdateAdvantageProject"
+            @row-del="rowDelAdvantageProject"
+          >
+            <template slot="code" slot-scope="{row,index}">
+              <span style="float: left;padding-top: 2px">{{row.code}}</span><el-button type="text" size="mini" style="float: right" @click="choice(row)">选择</el-button>
+            </template>
+            <template slot-scope="{row,index}" slot="menu">
+              <el-button
+                type="text"
+                size="small"
+                @click="rowCellTwo(row,index)"
+              >{{row.$cellEdit?'保存':'修改'}}</el-button>
+            </template>
+            <template slot="menuLeft" slot-scope="{size}">
+              <el-button type="primary"
+                         icon="el-icon-plus"
+                         size="small"
+                         @click="costIncrease"
+              >新增</el-button>
+            </template>
+          </avue-crud>
+        </basic-container>
+<!--        合同上传-->
+        <containerTitle title="附件上传"></containerTitle>
+        <basic-container style="margin-bottom: 40px">
+          <avue-crud
+            :option="uploadList"
+            v-model="bankOfDepositForm"
+            :data="bankOfDepositData"
+            @row-save="rowSaveBankOfDeposit"
+            @row-update="rowUpdateBankOfDeposit"
+            @row-del="rowDelBankOfDeposit"
+          ></avue-crud>
+        </basic-container>
+      </el-form>
+    </div>
+
+    <el-dialog
+      title="导入费用"
+      append-to-body
+      class="el-dialogDeep"
+      :visible.sync="dialogCost"
+      width="80%"
+      :close-on-click-modal="false"
+      :destroy-on-close="true"
+      :close-on-press-escape="false">
+      <el-row style="height: 0;">
+        <el-col :span="5">
+          <div>
+            <el-scrollbar>
+              <basic-container>
+                <avue-tree :option="treeOptionCost" :data="treeData" @node-click="nodeClickCost"/>
+              </basic-container>
+            </el-scrollbar>
+          </div>
+        </el-col>
+        <el-col :span="19">
+          <basic-container>
+            <avue-crud :option="optionTwoCost"
+                       :table-loading="loadingCost"
+                       :data="dataCost"
+                       ref="crud"
+                       @refresh-change="refreshChangeCost"
+                       @selection-change="selectionChangeCost"
+                       :page.sync="pageCost"
+                       @on-load="onLoadCost">
+            </avue-crud>
+          </basic-container>
+        </el-col>
+      </el-row>
+      <span slot="footer" class="dialog-footer">
+          <el-button @click="dialogCost = false">取 消</el-button>
+          <el-button type="primary" @click="importCost" v-if="choiceData !== true">导入</el-button>
+          <el-button type="primary" @click="choiceCost" v-if="choiceData === true" :disabled="tableDataCost.length !== 1">导入</el-button>
+        </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import detailedList from './config/detailedList.json'
+import uploadList from './config/uploadList.json'
+import advantageProject from "./config/advantageProject.json"
+import {getDeptLazyTree,customerList} from "@/api/basicData/basicFeesDesc";
+import optionTwoCost from "./config/mainListCost.json"
+
+export default {
+  name: "detailsPage",
+  data() {
+    return {
+      form: {},
+      disabled: false,
+      // 明细配置
+      detailedList: detailedList,
+      // 明细数据
+      detailedData: [],
+      // 合同上传数据
+      uploadList: uploadList,
+      // 合同数据
+      bankOfDepositData: [],
+      bankOfDepositForm: {},
+      // 其他费用
+      advantageProject: advantageProject,
+      advantageProjectData: [],
+      advantageProjectForm: {},
+      dialogCost: false,
+      choiceData: false,
+      treeOptionCost:{
+        nodeKey: 'id',
+        lazy: true,
+        treeLoad: function (node, resolve) {
+          const parentId = (node.level === 0) ? 0 : node.data.id;
+          getDeptLazyTree(parentId).then(res => {
+            resolve(res.data.data.map(item => {
+              return {
+                ...item,
+                leaf: !item.hasChildren
+              }
+            }))
+          });
+        },
+        addBtn: false,
+        menu: false,
+        size: 'small',
+        props: {
+          labelText: '标题',
+          label: 'title',
+          value: 'value',
+          children: 'children'
+        }
+      },
+      // 导入其他费用配置
+      optionTwoCost: optionTwoCost,
+      loadingCost: false,
+      dataCost:[],
+      pageCost:{
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      tableDataCost: [],
+      treeDeptIdCost: '',
+      choiceIndex: '',
+    //  基础信息
+      basicData: {
+        column: [
+          {
+            label: '系统编号',
+            prop: 'orderNo',
+            rules: [
+              {
+                required: false,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          }, {
+            label: '到港日期',
+            prop: 'orderNo',
+            type:'datetime',
+            rules: [
+              {
+                required: true,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          }, {
+            label: '供应商',
+            prop: 'orderNo',
+            type:'select',
+            data: [],
+            rules: [
+              {
+                required: true,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          }, {
+            label: '业务员',
+            prop: 'orderNo',
+            type:'select',
+            data: [],
+            rules: [
+              {
+                required: true,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          }, {
+            label: '合同号',
+            prop: 'orderNo',
+            rules: [
+              {
+                required: true,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          }, {
+            label: '合同日期',
+            prop: 'orderNo',
+            type:'datetime',
+            rules: [
+              {
+                required: true,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          }, {
+            label: '合同类型',
+            prop: 'orderNo',
+            type:'select',
+            data: [],
+            rules: [
+              {
+                required: true,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          }, {
+            label: '采购商',
+            prop: 'orderNo',
+            type:'select',
+            data: [],
+            rules: [
+              {
+                required: true,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          }, {
+            label: '付款方式',
+            prop: 'orderNo',
+            type:'select',
+            data: [],
+            rules: [
+              {
+                required: true,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          }, {
+            label: '付款/开证日期',
+            prop: 'orderNo',
+            type:'datetime',
+            rules: [
+              {
+                required: true,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          }, {
+            label: '信用证到期日',
+            prop: 'orderNo',
+            type:'datetime',
+            rules: [
+              {
+                required: true,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          }, {
+            label: '合同金额',
+            prop: 'orderNo',
+            rules: [
+              {
+                required: true,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          }, {
+            label: '人民币金额',
+            prop: 'orderNo',
+            rules: [
+              {
+                required: true,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          }, {
+            label: '预付(保证)金额',
+            prop: 'orderNo',
+            rules: [
+              {
+                required: true,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          }, {
+            label: '单价',
+            prop: 'orderNo',
+            rules: [
+              {
+                required: true,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          }, {
+            label: '币别',
+            prop: 'orderNo',
+            rules: [
+              {
+                required: true,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          }, {
+            label: '汇率',
+            prop: 'orderNo',
+            rules: [
+              {
+                required: true,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          }, {
+            label: '合同重量',
+            prop: 'orderNo',
+            rules: [
+              {
+                required: true,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          }, {
+            label: '码头重量',
+            prop: 'orderNo',
+            rules: [
+              {
+                required: true,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          }, {
+            label: '已付金额',
+            prop: 'orderNo',
+            rules: [
+              {
+                required: true,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          }, {
+            label: "订单备注",
+            span: 24,
+            prop: "orderRemark",
+            mock: {
+              type: 'county'
+            }
+          }
+        ],
+      },
+    }
+  },
+  created() {
+  },
+  methods: {
+    //修改提交触发
+    editCustomer() {},
+    // 采购明细编辑
+    rowCellDetailed(row, index) {
+      this.$refs.detailedList.rowCell(row, index)
+    },
+    //其他费用编辑
+    rowCellTwo(row, index) {
+      this.$refs.crudProject.rowCell(row, index)
+    },
+    //新增明细保存触发
+    rowSaveProject(row, done, loading){
+      // this.advantageProjectData.push(row)
+      done()
+    },
+    //修改明细触发
+    rowUpdateProject(row, index, done, loading) {
+      done(row);
+    },
+    //删除明细触发
+    rowDelProject(row, index, donerowDel) {
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        if (row.id){
+          // corpsitem(row.id).then(res=>{
+          //   this.$message({
+          //     type: "success",
+          //     message: "操作成功!"
+          //   });
+          //   this.detailedData.splice(index, 1);
+          // })
+        }else {
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          this.detailedData.splice(index, 1);
+        }
+      })
+    },
+    // 修改其他费用明细
+    rowUpdateAdvantageProject(row, index, done, loading) {
+      done(row);
+    },
+    // 删除其他费用明细
+    rowDelAdvantageProject(row, index, donerowDel) {
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        if (row.id){
+          // corpsitem(row.id).then(res=>{
+          //   this.$message({
+          //     type: "success",
+          //     message: "操作成功!"
+          //   });
+          //   this.detailedData.splice(index, 1);
+          // })
+        }else {
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          this.advantageProjectData.splice(index, 1);
+        }
+      })
+    },
+    //其他费用新增触发
+    costIncrease(){
+      this.dialogCost = !this.dialogCost
+      this.choiceData = false
+    },
+    //新增附件上传保存触发
+    rowSaveBankOfDeposit(row, done, loading){
+      this.bankOfDepositData.push(row)
+      done()
+    },
+    //修改附件上传触发
+    rowUpdateBankOfDeposit(row, index, done, loading) {
+      done(row);
+    },
+    //删除附件上传触发
+    rowDelBankOfDeposit(row, index, donerowDel) {
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        if (row.id){
+          corpsbank(row.id).then(res=>{
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.bankOfDepositData.splice(index, 1);
+          })
+        }else {
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          this.bankOfDepositData.splice(index, 1);
+        }
+      })
+    },
+    //费用查询
+    onLoadCost(page, params = {}) {
+      this.loadingCost = true;
+      let queryParams = Object.assign({}, params, {pageSize: page.pageSize, pageNum: page.currentPage,parentId:0,feesTypeId:this.treeDeptIdCost})
+      customerList(queryParams).then(res => {
+        console.log(res)
+        const data = res.data.data;
+        this.pageCost.total = data.total;
+        this.dataCost = data.records;
+        this.loadingCost = false;
+      });
+    },
+    //点击费用明细选择触发
+    choice(row){
+      this.dialogCost = !this.dialogCost
+      this.choiceData = true
+      this.choiceIndex = row.$index
+    },
+    nodeClickCost(data){
+      this.treeDeptIdCost = data.id;
+      this.pageCost.currentPage = 1;
+      this.onLoadCost(this.pageCost);
+    },
+    //费用刷新触发
+    refreshChangeCost() {
+      this.treeDeptIdCost = '';
+      this.pageCost.currentPage = 1;
+      this.onLoadCost(this.pageCost);
+    },
+    //费用选中触发
+    selectionChangeCost(list){
+      this.tableDataCost = list
+    },
+    //费用导入触发
+    importCost(){
+      // this.advantageProjectForm = this.advantageProjectForm.concat(this.tableDataCost)
+      if (this.tableDataCost.length>0){
+        for(let item in this.tableDataCost){
+          console.log(this.tableDataCost[item])
+          this.tableDataCost[item].itemId = this.tableDataCost[item].id
+          this.tableDataCost[item].feeName = this.tableDataCost[item].cname
+          delete this.tableDataCost[item].id
+          this.$refs.crudProject.rowCellAdd(this.tableDataCost[item]);
+          this.$refs.crudProject.rowCell(this.tableDataCost[item], this.advantageProjectForm.length-1)
+        }
+      }
+      this.tableDataCost = []
+      this.dialogCost = false
+    },
+    //费用编辑导入触发
+    choiceCost(){
+      if (this.tableDataCost.length === 1){
+        this.advantageProjectData[this.choiceIndex].feeName = this.tableDataCost[0].cname
+        this.advantageProjectData[this.choiceIndex].itemId = this.tableDataCost[0].id
+        this.advantageProjectData[this.choiceIndex].code = this.tableDataCost[0].code
+      }
+      this.dialogCost = !this.dialogCost
+      this.choiceData = false
+    },
+    backToList() {
+      this.$router.$avueRouter.closeTag();
+      this.$router.push({
+        path: '/purchase/contract/index',
+        query: {}
+      });
+    },
+  }
+}
+</script>
+
+<style scoped lang="scss">
+.customer-head {
+  position: fixed;
+  top: 105px;
+  width: 100%;
+  margin-left: -10px;
+  height: 62px;
+  background: #ffffff;
+  box-shadow: 0 4px 12px 0px rgba(232, 232, 235, 1);
+  z-index: 999;
+  /* display: flex;
+  justify-content: left; */
+}
+
+.customer-back {
+  cursor: pointer;
+  line-height: 62px;
+  font-size: 16px;
+  color: #323233;
+  font-weight: 400;
+}
+
+.add-customer-btn {
+  position: fixed;
+  right: 36px;
+  top: 115px;
+}
+
+::v-deep .el-form-item {
+  margin-bottom: 0;
+}
+//el-icon-plus avue-upload__icon
+.avue-upload /deep/ .avue-upload__icon {
+  line-height: 178px !important;
+}
+</style>

+ 209 - 0
src/views/purchase/contract/index.vue

@@ -0,0 +1,209 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :data="dataList"
+               ref="crud"
+               v-model="form"
+               :page.sync="page"
+               @row-del="rowDel"
+               @row-update="rowUpdate"
+               :before-open="beforeOpen"
+               :before-close="beforeClose"
+               @row-save="rowSave"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot-scope="{row,size}" slot="search">
+        <el-col :span="6">
+          <el-form-item label="提单号" label-width="100px">
+            <el-input placeholder="自定义输入框" :size="size" style="width: 200px" v-model="search.fmBlno"></el-input>
+          </el-form-item>
+        </el-col>
+      </template>
+      <template slot-scope="scope" slot="expand">
+        <el-table
+          :data="scope.row.insideList"
+          v-loading="scope.row.loading"
+        >
+          <el-table-column  label="提单号" prop="fBillstatus" align="center" show-overflow-tooltip width="100"></el-table-column>
+          <el-table-column  label="货物品种" prop="fBillstatus" align="center" show-overflow-tooltip width="100"></el-table-column>
+          <el-table-column  label="件数" prop="fBillstatus" align="center" show-overflow-tooltip width="100"></el-table-column>
+          <el-table-column  label="毛重(KG)" prop="fBillstatus" align="center" show-overflow-tooltip width="100"></el-table-column>
+          <el-table-column  label="净重(KG)" prop="fBillstatus" align="center" show-overflow-tooltip width="100"></el-table-column>
+          <el-table-column  label="单价" prop="fBillstatus" align="center" show-overflow-tooltip width="100"></el-table-column>
+          <el-table-column  label="合同金额" prop="fBillstatus" align="center" show-overflow-tooltip width="100"></el-table-column>
+          <el-table-column  label="是否到货" prop="fBillstatus" align="center" show-overflow-tooltip width="100"></el-table-column>
+        </el-table>
+      </template>
+      <template slot-scope="scope" slot="menu">
+        <el-button
+          type="text"
+          icon="el-icon-view"
+          size="small"
+          @click.stop="beforeOpenPage(scope.row,scope.index)"
+        >查看
+        </el-button>
+        <el-button
+          type="text"
+          icon="el-icon-edit"
+          size="small"
+          @click.stop="editOpen(scope.row,scope.index)"
+        >编辑
+        </el-button>
+        <el-button
+          type="text"
+          icon="el-icon-delete"
+          size="small"
+          @click.stop="rowDel(scope.row,scope.index)"
+        >删除
+        </el-button>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+import option from "./config/mainList.json";
+
+export default {
+  name: "index",
+  data() {
+    return {
+      option: option,
+      dataList: [{sysNo: 1, orderNo: 1}],
+      page: {
+        pageSize: 10,
+        pagerCount: 5,
+        total: 0,
+      },
+      form: {},
+      search: {},
+    }
+  },
+  methods: {
+    //删除列表后面的删除按钮触发触发(row, index, done)
+    rowDel(row, index, done) {
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        return deleteDetails(row.id);
+      }).then(() => {
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        this.page.currentPage = 1;
+        this.onLoad(this.page, {parentId: 0});
+      });
+    },
+    //修改时的修改按钮点击触发
+    rowUpdate(row, index, done, loading) {
+      typeSave(row).then(() => {
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        // 数据回调进行刷新
+        done(row);
+      }, error => {
+        window.console.log(error);
+        loading();
+      });
+    },
+    //新增修改时保存触发
+    rowSave(row, done, loading) {
+      typeSave(row).then(res => {
+        console.log(res)
+        done()
+      })
+    },
+    //查询全部
+    initData() {
+      customerList().then(res => {
+        console.log(this.form);
+        const column = this.findObject(this.option.column, "parentId");
+        column.dicData = res.data.data.records;
+      });
+    },
+    //新增子项触发
+    handleAdd(row) {
+      this.parentId = row.id;
+      const column = this.findObject(this.option.column, "parentId");
+      column.value = row.id;
+      column.addDisabled = true;
+      this.$refs.crud.rowAdd();
+    },
+    //查看跳转页面
+    beforeOpenPage(row, index) {
+      this.$router.push({
+        path: "/purchase_detailsPage",
+        query: {id: JSON.stringify(row.id)},
+      });
+    },
+    //新增跳转页面
+    beforeOpen(row, index) {
+      this.$router.push({
+        path: "/purchase_detailsPage",
+        query: {id: JSON.stringify(row.id)},
+      });
+    },
+    editOpen(row, index) {
+      this.$router.push({
+        path: "/purchase_detailsPage",
+        query: {id: JSON.stringify(row.id)},
+      });
+    },
+    //点击新增时触发
+    beforeClose(done) {
+      this.parentId = "";
+      const column = this.findObject(this.option.column, "parentId");
+      column.value = "";
+      column.addDisabled = false;
+      done();
+    },
+    //点击搜索按钮触发
+    searchChange(params, done) {
+      console.log(params)
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done()
+    },
+    searchReset() {
+      console.log('1')
+    },
+    selectionChange() {
+      console.log('1')
+    },
+    currentChange() {
+      console.log('1')
+    },
+    sizeChange() {
+      console.log('1')
+    },
+    refreshChange() {
+      console.log('1')
+    },
+    onLoad(page, params = {parentId: 0}) {
+      let queryParams = Object.assign({}, params, {
+        pageSize: page.pageSize,
+        pageNum: page.currentPage,
+        corpsTypeId: this.treeDeptId
+      })
+      // customerList(queryParams).then(res => {
+      //   this.dataList = res.data.data.records
+      //   this.page.total = res.data.data.total
+      // })
+    },
+  },
+}
+</script>
+
+<style scoped>
+
+</style>

+ 171 - 0
src/views/system/category/index.vue

@@ -0,0 +1,171 @@
+<template>
+  <basic-container>
+    <div class="print-div">
+      <div
+      style="
+            display: flex;
+            flex-direction: column;
+            justify-content: center;
+            align-item: center;
+            font-size: 24px;
+            margin-bottom: 5px;
+            width: 100%;
+            text-align: center;
+          "
+        >
+          <div><b>VITAL INDUSTRIAL GROUP LIMITED</b></div>
+          <div>NO.37 DONGHAI ROAD, QINGDAO, CHINA</div>
+          <div>TEL:0086-532-86019080     FAX:0086-532-86019080 </div>
+          <div>
+            <b>COMMERCIAL INVOICE</b>
+            <span style="float: right">ORIGINAL</span>
+          </div>
+        </div>
+        <div class="print_table" style="display: flex">
+          <table
+             border="0"
+              cellspacing="0"
+              cellpadding="0"
+              style="width: 100%; line-height: 30px"
+          >
+            <tr>
+              <td colspan="5" rowspan="3">MESSERS:</td>
+              <td colspan="2">INVOICE NO.</td>
+              <td colspan="3"></td>
+            </tr>
+            <tr>
+              <td colspan="2">DATE</td>
+              <td colspan="3"></td>
+            </tr>
+            <tr>
+              <td colspan="2">INCOTERM .</td>
+              <td colspan="3"></td>
+            </tr>
+            <tr>
+              <td colspan="5">PI NO.:</td>
+              <td colspan="2">DELIVERY PORT</td>
+              <td colspan="3"></td>
+            </tr>
+            <tr>
+              <td rowspan="2">NO.</td>
+              <td rowspan="2">DESCRIPTION</td>
+              <td>THICK</td>
+              <td>LENGTH</td>
+              <td>WIDTH</td>
+              <td rowspan="2">SHEETS</td>
+              <td rowspan="2">CRATES</td>
+              <td>UNIT PRICE</td>
+              <td>TOTAL</td>
+              <td>T. AMOUNT</td>
+            </tr>
+            <tr>
+              <td>mm</td>
+              <td>mm</td>
+              <td>mm</td>
+              <td>US$/M²</td>
+              <td>M²</td>
+              <td>US$</td>
+            </tr>
+            <tr>
+              <td>1</td>
+              <td></td>
+              <td></td>
+              <td></td>
+              <td></td>
+              <td></td>
+              <td></td>
+              <td></td>
+              <td></td>
+              <td></td>
+            </tr>
+            <tr>
+              <td>2</td>
+              <td></td>
+              <td></td>
+              <td></td>
+              <td></td>
+              <td></td>
+              <td></td>
+              <td></td>
+              <td></td>
+              <td></td>
+            </tr>
+            <tr>
+              <td>3</td>
+              <td></td>
+              <td></td>
+              <td></td>
+              <td></td>
+              <td></td>
+              <td></td>
+              <td></td>
+              <td></td>
+              <td></td>
+            </tr>
+            <tr>
+              <td colspan="9" style="text-align: right">FUMIGATION COST:</td>
+              <td></td>
+            </tr>
+            <tr>
+              <td colspan="9" style="text-align: right">INSURANCE:</td>
+              <td></td>
+            </tr>
+            <tr>
+              <td colspan="9" style="text-align: right">TOTAL:</td>
+              <td>0.00</td>
+            </tr>
+          </table>
+        </div>
+        <div class="print-footer" style="margin-top: 8px">
+          <div style="font-weight: bold">TOTAL AMOUNT: U.S. DOLLARS NINE THOUSAND FORTY SIX CENTS TWENTY FIVE ONLY.</div>
+        </div>
+    </div>
+  </basic-container>
+</template>
+
+<script>
+export default {
+  name: "category"
+}
+</script>
+
+<style scoped lang="scss">
+.print-div {
+  color: #000;
+}
+
+.print_table {
+  table {
+    border-right: 1px solid #000;
+    border-bottom: 1px solid #000;
+    font-size: 12px;
+    margin-bottom: 5px;
+  }
+
+  table td {
+    border-left: 1px solid #000;
+    border-top: 1px solid #000;
+    vertical-align: middle;
+    padding: 2px;
+    text-align: center;
+  }
+}
+.table {
+  border-collapse: collapse;
+  border-spacing: 0;
+  background-color: transparent;
+  display: table;
+  width: 99%;
+  max-width: 100%;
+  margin: 0 auto;
+}
+
+.table td {
+  text-align: left;
+  vertical-align: middle;
+  font-size: 14px;
+  color: #000000;
+  padding: 10.5px 0 10.5px 30px;
+  //border: 1px solid #000;
+}
+</style>