Explorar o código

添加客户询价

fenghy %!s(int64=3) %!d(string=hai) anos
pai
achega
b672f91d1f

+ 69 - 0
src/api/basicData/customerInquiry.js

@@ -0,0 +1,69 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/blade-purchase-sales/exportEnquiry/page',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+export function detail(id) {
+  return request({
+    url: '/api/blade-purchase-sales/exportEnquiry/detail?id=' + id,
+    method: 'get'
+  })
+}
+//修改和新增
+export function submit(data) {
+  return request({
+    url: '/api/blade-purchase-sales/exportEnquiry/submit',
+    method: 'post',
+    data: data
+  })
+}
+//明细表删除
+export function delItem(data) {
+  return request({
+    url: '/api/blade-purchase-sales/orderitems/update',
+    method: 'post',
+    data: {
+      id: data
+    }
+  })
+}
+//主表删除
+export function remove(data) {
+  return request({
+    url: '/api/blade-purchase-sales/exportEnquiry/update',
+    method: 'post',
+    data: {
+      id: data
+    }
+  })
+}
+//获取商品
+export const getGoods = (current, size,goodsTypeId) => {
+  return request({
+      url: '/api//blade-client/goodsdesc/selectGoods',
+      method: 'get',
+      params: {
+          current,
+          size,
+          goodsTypeId,
+      }
+  })
+}
+//树形
+export const getDeptLazyTree = (parentId) => {
+  return request({
+      url: '/api/blade-client/goodstype/lazy-tree',
+      method: 'get',
+      params: {
+          parentId
+      }
+  })
+}

+ 9 - 3
src/components/report-dialog/main.vue

@@ -75,6 +75,12 @@ export default {
     switchDialog: {
       type: Boolean,
       default: false
+    },
+    reportName: {
+      type: String
+    },
+    reportId:{
+      type:String
     }
   },
   filters: {
@@ -103,7 +109,7 @@ export default {
     },
     goReport(name) {
       this.$router.push({
-        path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}`
+        path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}&id=${this.reportId}`
       });
     }
   },
@@ -111,12 +117,12 @@ export default {
     switchDialog: function(i) {
       this.visible = i;
       this.query = {
-        name: this.$router.currentRoute.name
+        name: this.$router.currentRoute.name?this.$router.currentRoute.name:this.reportName
       };
       if (i) {
         this.getList();
       }
-    },
+    }
   }
 };
 </script>

+ 18 - 0
src/enums/order-stauts.js

@@ -0,0 +1,18 @@
+//订单状态
+export const orderStates = [{
+  code: 0,
+  name: '正常'
+}, {
+  code: 1,
+  name: '停用'
+}]
+
+// 订单状态过滤器
+export const orderStateFormat = (state) => {
+  for (let i = 0; i < orderStates.length; i++) {
+    if (orderStates[i].code === state) {
+      return orderStates[i].name;
+    }
+  }
+  return null
+}

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

@@ -238,6 +238,36 @@ export default [{
       }
     ]
   },
+    // 进口 收货单详情页
+  {
+    path: '/importReceipt_detailsPage',
+    component: Layout,
+    hidden: true,
+    children: [
+      {
+        path: '/importReceipt_detailsPage',
+        meta: {
+          i18n: 'importReceipt_detailsPage'
+        },
+        component: () => import( /* webpackChunkName: "views" */ '@/views/importTrade/receipt/detailsPageEdit')
+      }
+    ]
+  },
+   // 出口 客户询价
+   {
+    path: '/exportcustomerInquiry_detailsPage',
+    component: Layout,
+    hidden: true,
+    children: [
+      {
+        path: '/exportcustomerInquiry_detailsPage',
+        meta: {
+          i18n: 'exportcustomerInquiry_detailsPage'
+        },
+        component: () => import( /* webpackChunkName: "views" */ '@/views/exportTrade/customerInquiry/detailsPage')
+      }
+    ]
+  },
   // 出口 销售订单详情页
   {
     path: '/exportsalesContract_detailsPage',

+ 3 - 1
src/views/basicData/customerInformation/detailsPageEdit.vue

@@ -159,7 +159,9 @@
       :switchDialog="switchDialog"
       @onClose="onClose()"
     >
-    <template slot="content">111</template>
+    <template slot="content">
+      
+    </template>
     </flow-dialog>
   </div>
 </template>

+ 1 - 1
src/views/basicData/customerInformation/index.vue

@@ -41,7 +41,7 @@
               size="small"
               type="primary"
               @click.stop="openReport()"
-              >报表
+              >报 
             </el-button>
           </template>
           <template slot-scope="scope" slot="menu">

+ 124 - 0
src/views/exportTrade/customerInquiry/config/commodity.json

@@ -0,0 +1,124 @@
+
+{
+  "calcHeight": 80,
+  "tip": false,
+  "addBtn": false,
+  "searchShow": false,
+  "searchShowBtn": false,
+  "menu": false,
+  "searchMenuSpan": 6,
+  "border": true,
+  "index": true,
+  "selection": true,
+  "viewBtn": true,
+  "dialogClickModal": false,
+  "column": [
+    {
+      "label": "商品编码",
+      "prop": "code",
+      "search": true,
+      "minWidth": 100,
+      "rules": [
+        {
+          "required": true,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "商品名称",
+      "prop": "cname",
+      "slot": true,
+      "minWidth": 100,
+      "rules": [
+        {
+          "required": true,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "商品类别",
+      "prop": "goodsTypeId",
+      "dicData": [],
+      "type": "tree",
+      "hide": true,
+      "addDisabled": false,
+      "multiple": true,
+      "props": {
+        "label": "title"
+      },
+      "rules": [{
+        "required": true,
+        "message": " ",
+        "trigger": "click"
+      }]
+    },
+    {
+      "label": "规格编码",
+      "prop": "typeno",
+      "search": true
+    },
+    {
+      "label": "品牌",
+      "prop": "brand",
+      "slot": true
+    },
+    {
+      "label": "花纹",
+      "prop": "brandItem",
+      "slot": true
+    },
+    {
+      "label": "规格尺寸",
+      "prop": "specs",
+      "slot": true
+    },
+    {
+      "label": "产品类别",
+      "prop": "category",
+      "slot": true
+    },
+    {
+      "label": "产品分类",
+      "prop": "categoryitem",
+      "slot": true
+    },
+    {
+      "label": "供应商",
+      "prop": "providers",
+      "slot": true
+    },
+    {
+      "label": "计量单位",
+      "prop": "unit",
+      "slot": true
+    },
+    {
+      "label": "包装单位",
+      "prop": "packgeunit",
+      "slot": true
+    },
+    {
+      "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
+    },
+    {
+      "label": "备注",
+      "prop": "remarks",
+      "slot": true
+    }
+  ]
+}

+ 120 - 0
src/views/exportTrade/customerInquiry/config/customerContact.json

@@ -0,0 +1,120 @@
+{
+  "searchShow": true,
+  "searchMenuSpan": 6,
+  "border": true,
+  "index": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "addBtn":false,
+  "align": "center",
+  "menuWidth": "180",
+  "column": [{
+      "label": "产品类别",
+      "prop": "priceCategory",
+      "index": 1,
+      "minWidth": 80,
+      "overHidden":true
+    },
+    {
+      "label": "产品编号",
+      "prop": "itemId",
+      "index": 2,
+      "minWidth": 80,
+      "overHidden":true
+    },
+    {
+      "label": "产品名称",
+      "prop": "cname",
+      "index": 3,
+      "minWidth": 80,
+      "overHidden":true
+    },
+    {
+      "label": "产品属性",
+      "prop": "itemProp",
+      "index": 4,
+      "minWidth": 80,
+      "overHidden":true,
+      "cell": true
+    },
+    {
+      "label": "产品照片",
+      "prop": "itemUrl",
+      "index": 5,
+      "minWidth": 80,
+      "overHidden":true,
+      "hide":true
+    },
+    {
+      "label": "产品描述",
+      "prop": "itemDescription",
+      "index": 6,
+      "minWidth": 80,
+      "overHidden":true,
+      "cell": true
+    },
+    {
+      "label": "产品型号",
+      "prop": "itemType",
+      "index": 7,
+      "minWidth": 80,
+      "cell": true
+    },
+    {
+      "label": "数量",
+      "prop": "orderQuantity",
+      "index": 8,
+      "minWidth": 60,
+      "overHidden":true,
+      "cell": true
+    },
+    {
+      "label": "计价单位",
+      "prop": "unit",
+      "index": 9,
+      "minWidth": 80,
+      "overHidden":true,
+      "cell": true
+    },
+    {
+      "label": "价格条款",
+      "prop": "tradeTerms",
+      "index": 10,
+      "minWidth": 80,
+      "overHidden":true,
+      "cell": true
+    },
+    {
+      "label": "单价",
+      "prop": "price",
+      "index": 11,
+      "minWidth": 60,
+      "overHidden":true,
+      "cell": true
+    },
+    {
+      "label": "金额",
+      "prop": "amount",
+      "index": 12,
+      "minWidth": 60,
+      "overHidden":true,
+      "cell": true
+    },
+    {
+      "label": "税率",
+      "prop": "taxRate",
+      "index": 13,
+      "minWidth": 60,
+      "overHidden":true,
+      "cell": true
+    },
+    {
+      "label": "备注",
+      "prop": "remarks",
+      "index": 14,
+      "minWidth": 60,
+      "overHidden":true,
+      "cell": true
+    }
+  ]
+}

+ 157 - 0
src/views/exportTrade/customerInquiry/config/mainList.json

@@ -0,0 +1,157 @@
+{
+  "searchShow": true,
+  "searchMenuSpan": 6,
+  "border": true,
+  "index": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "addBtn": false,
+  "align": "center",
+  "menuWidth": "180",
+  "column": [{
+      "label": "系统号",
+      "prop": "sysNo",
+      "search": true,
+      "index": 1,
+      "minWidth": 60,
+      "overHidden": true
+    },
+    {
+      "label": "订单状态",
+      "prop": "status",
+      "search": true,
+      "index": 2,
+      "minWidth": 80,
+      "overHidden": true
+    }, {
+      "label": "发票号(PI)",
+      "prop": "proformInvoice",
+      "search": true,
+      "index": 3,
+      "minWidth": 80,
+      "overHidden": true
+    }, {
+      "label": "客户名称",
+      "prop": "corpId",
+      "search": true,
+      "index": 4,
+      "minWidth": 80,
+      "overHidden": true
+    }, {
+      "label": "联系人",
+      "prop": "corpAttn",
+      "index": 5,
+      "minWidth": 80,
+      "overHidden": true
+    }, {
+      "label": "电话",
+      "prop": "corpTel",
+      "index": 6,
+      "minWidth": 80,
+      "overHidden": true
+    }, {
+      "label": "起运港",
+      "prop": "portOfLoad",
+      "search": true,
+      "index": 7,
+      "minWidth": 80,
+      "overHidden": true
+    }, {
+      "label": "目的港",
+      "prop": "portOfDestination",
+      "search": true,
+      "index": 8,
+      "minWidth": 80,
+      "overHidden": true
+    }, {
+      "label": "运输方式",
+      "prop": "transport",
+      "index": 9,
+      "minWidth": 80,
+      "overHidden": true
+    }, {
+      "label": "价格条款",
+      "prop": "priceTerms",
+      "index": 10,
+      "minWidth": 80,
+      "overHidden": true
+    }, {
+      "label": "贸易条款",
+      "prop": "tradeTerms",
+      "index": 11,
+      "minWidth": 80,
+      "overHidden": true
+    }, {
+      "label": "订单日期",
+      "prop": "businesDate",
+      "search": true,
+      "index": 12,
+      "minWidth": 100,
+      "type": "date",
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd 00:00:00",
+      "overHidden": true
+    }, {
+      "label": "有效日期",
+      "prop": "dateValidity",
+      "index": 13,
+      "minWidth": 80,
+      "type": "date",
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd 00:00:00",
+      "overHidden": true
+    }, {
+      "label": "收款方式",
+      "prop": "paymentType",
+      "index": 14,
+      "minWidth": 80,
+      "overHidden": true,
+      "type": "select",
+      "dicUrl": "/api/blade-system/dict/dictionary?code=payment_term",
+      "props": {
+        "label": "dictValue",
+        "value": "dictKey"
+      }
+    }, {
+      "label": "币别",
+      "prop": "currency",
+      "index": 15,
+      "minWidth": 80,
+      "overHidden": true
+    }, {
+      "label": "汇率",
+      "prop": "exchangeRate",
+      "index": 16,
+      "minWidth": 80,
+      "overHidden": true
+    }, {
+      "label": "信用证编号",
+      "prop": "creditNumber",
+      "index": 17,
+      "minWidth": 100,
+      "overHidden": true
+    }, {
+      "label": "信用证到期日",
+      "prop": "creditDate",
+      "index": 18,
+      "minWidth": 100,
+      "type": "date",
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd 00:00:00",
+      "overHidden": true
+    }, {
+      "label": "信用证金额",
+      "prop": "creditAmount",
+      "index": 19,
+      "minWidth": 100,
+      "overHidden": true
+    }, {
+      "label": "备注",
+      "prop": "orderRemark",
+      "index": 20,
+      "minWidth": 80,
+      "overHidden": true
+    }
+  ]
+}

+ 491 - 0
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -0,0 +1,491 @@
+<template>
+  <div class="borderless">
+    <div class="customer-head">
+      <div class="customer-back">
+        <!--        <i class="back-icon el-icon-arrow-left"></i><i style="font-style:normal">返回管理列表</i>-->
+        <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;margin-bottom:35px">
+      <containerTitle title="基础信息"></containerTitle>
+      <basic-container style="margin-bottom: 10px">
+        <avue-form ref="form" v-model="form" :option="option"> </avue-form>
+      </basic-container>
+      <containerTitle title="商品信息"></containerTitle>
+      <basic-container>
+        <avue-crud
+          :ref="crud"
+          :data="data"
+          :option="tableOption"
+          @row-del="rowDel"
+        >
+          <template slot="menuLeft">
+            <el-button
+              type="primary"
+              icon="el-icon-plus"
+              size="small"
+              @click.stop="newDetails"
+              >新增明细</el-button
+            >
+            <el-button
+              type="info"
+              icon="el-icon-printer"
+              size="small"
+              @click.stop="openReport()"
+              >打 印</el-button
+            >
+          </template>
+        </avue-crud>
+      </basic-container>
+    </div>
+    <el-dialog
+      title="导入商品"
+      append-to-body
+      class="el-dialogDeep"
+      :visible.sync="dialogVisible"
+      width="60%"
+      :close-on-click-modal="false"
+      :destroy-on-close="true"
+      :close-on-press-escape="false"
+      @close="closeGoods"
+      top="10vh"
+    >
+      <span>
+        <el-row>
+          <el-col :span="5">
+            <div>
+              <el-scrollbar>
+                <basic-container style="margin-top:45px">
+                  <avue-tree :option="treeOption" @node-click="nodeClick" />
+                </basic-container>
+              </el-scrollbar>
+            </div>
+          </el-col>
+          <el-col :span="19">
+            <avue-crud
+              :option="goodsOption"
+              :table-loading="loading"
+              :data="goodsList"
+              ref="crud"
+              @refresh-change="refreshChange"
+              @selection-change="selectionChange"
+              :page.sync="page"
+              @on-load="onLoad"
+            ></avue-crud>
+          </el-col>
+        </el-row>
+      </span>
+
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="importGoods">导入</el-button>
+      </span>
+    </el-dialog>
+    <report-dialog
+      :switchDialog="switchDialog"
+      :reportId="form.id"
+      reportName="客户询价"
+      @onClose="onClose()"
+    ></report-dialog>
+  </div>
+</template>
+
+<script>
+import tableOption from "./config/customerContact.json";
+import goodsOption from "./config/commodity.json";
+import {
+  detail,
+  submit,
+  delItem,
+  getDeptLazyTree,
+  getGoods
+} from "@/api/basicData/customerInquiry";
+import { orderStates } from "@/enums/order-stauts";
+import reportDialog from "@/components/report-dialog/main";
+export default {
+  name: "detailsPageEdit",
+  data() {
+    return {
+      switchDialog: false,
+      form: {},
+      disabled: false,
+      dialogVisible: false,
+      tableOption: tableOption,
+      option: {
+        menuBtn: false,
+        labelWidth: 100,
+        column: [
+          {
+            label: "系统号",
+            prop: "sysNo",
+            span: 8
+          },
+          {
+            label: "订单状态",
+            prop: "status",
+            span: 8,
+            type: "select",
+            props: {
+              label: "name",
+              value: "code"
+            },
+            dicData: orderStates
+          },
+          {
+            label: "发票号(PI)",
+            prop: "proformInvoice",
+            span: 8
+          },
+          {
+            label: "客户名称",
+            prop: "corpId",
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ],
+            span: 8
+          },
+          {
+            label: "联系人",
+            prop: "corpAttn",
+            span: 8
+          },
+          {
+            label: "电话",
+            prop: "corpTel",
+            span: 8
+          },
+          {
+            label: "起运港",
+            prop: "portOfLoad",
+            span: 8
+          },
+          {
+            label: "目的港",
+            prop: "portOfDestination",
+            span: 8
+          },
+          {
+            label: "运输方式",
+            prop: "transport",
+            span: 8,
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=mode_transport",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            }
+          },
+          {
+            label: "价格条款",
+            prop: "priceTerms",
+            span: 8,
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=pricing_terms",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            }
+          },
+          {
+            label: "条款说明",
+            prop: "priceTermsDescription",
+            span: 8
+          },
+          {
+            label: "贸易条款",
+            prop: "tradeTerms",
+            span: 8,
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=trade_terms",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            }
+          },
+          {
+            label: "贸易条款说明",
+            prop: "tradeTermsDescription",
+            span: 8
+          },
+          {
+            label: "订单日期",
+            prop: "businesDate",
+            span: 8,
+            type: "date",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd 00:00:00"
+          },
+          {
+            label: "有效日期",
+            prop: "dateValidity",
+            span: 8,
+            type: "date",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd 00:00:00"
+          },
+          {
+            label: "收款方式",
+            prop: "paymentType",
+            span: 8,
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=payment_term",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            }
+          },
+          {
+            label: "收款说明",
+            prop: "paymentTypeDescription",
+            span: 8
+          },
+          {
+            label: "币别",
+            prop: "currency",
+            span: 8
+          },
+          {
+            label: "汇率",
+            prop: "exchangeRate",
+            span: 8
+          },
+          {
+            label: "信用证编号",
+            prop: "creditNumber",
+            span: 8
+          },
+          {
+            label: "信用证到期日",
+            prop: "creditDate",
+            span: 8,
+            type: "date",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd 00:00:00"
+          },
+          {
+            label: "信用证金额",
+            prop: "creditAmount",
+            span: 8
+          },
+          {
+            label: "备注",
+            prop: "orderRemark",
+            type: "textarea",
+            minRows: 2,
+            span: 16
+          }
+        ]
+      },
+      treeOption: {
+        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: {
+          label: "title",
+          value: "value",
+          children: "children"
+        }
+      },
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      loading: false,
+      goodsOption: goodsOption,
+      data: [],
+      goodsList: [],
+      selectionList: [],
+      treeDeptId: null
+    };
+  },
+  components: {
+    reportDialog
+  },
+  created() {
+    if (this.$route.query.id) {
+      this.getDetail(JSON.parse(this.$route.query.id));
+    }
+  },
+  methods: {
+    rowDel(row, index) {
+      if (row.id) {
+        delItem(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);
+      }
+    },
+    importGoods() {
+      this.data = this.data.concat(this.selectionList);
+      this.dialogVisible = false;
+    },
+    closeGoods() {
+      this.selectionList = [];
+      this.treeDeptId = "";
+    },
+    selectionChange(list) {
+      console.log(list);
+      list.map(e => {
+        e.itemId = e.code;
+        e.priceCategory = e.goodsTypeName;
+        e.itemUrl = e.url;
+        e.itemProp = null;
+        e.itemDescription = null;
+        e.itemDescription = null;
+        e.itemType = null;
+        e.orderQuantity = 1;
+        e.tradeTerms = null;
+        e.price = 0;
+        e.amount = 0;
+        e.taxRate = 0;
+        e.remarks = null;
+        e.$cellEdit = true;
+        delete e.id;
+      });
+      this.selectionList = list;
+      console.log(this.selectionList);
+    },
+    nodeClick(data) {
+      this.treeDeptId = data.id;
+      this.page.currentPage = 1;
+      this.onLoad(this.page);
+    },
+    //费用查询
+    onLoad(page, params = {}) {
+      this.loading = true;
+      getGoods(page.currentPage, page.pageSize, this.treeDeptId).then(res => {
+        const data = res.data.data;
+        this.page.total = data.total;
+        this.goodsList = data.records;
+        this.loading = false;
+        if (this.page.total) {
+          this.goodsOption.height = window.innerHeight - 470;
+        } else {
+          this.goodsOption.height = window.innerHeight - 395;
+        }
+      });
+    },
+    //商品明细导入
+    newDetails() {
+      this.dialogVisible = !this.dialogVisible;
+    },
+    getDetail(id) {
+      detail(id).then(res => {
+        this.form = res.data.data;
+        this.data = res.data.data.orderItemsList;
+      });
+    },
+    //修改提交触发
+    editCustomer() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          submit({
+            ...this.form,
+            orderItemsList: this.data
+          }).then(res => {
+            console.log(res);
+            this.backToList();
+          });
+        } else {
+          return false;
+        }
+      });
+    },
+    //返回列表
+    backToList() {
+      this.$router.$avueRouter.closeTag();
+      this.$router.push({
+        path: "/exportTrade/customerInquiry/index",
+        query: {}
+      });
+    },
+    openReport() {
+      this.switchDialog = !this.switchDialog;
+    },
+    onClose(val) {
+      this.switchDialog = val;
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.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;
+}
+
+.customer-back {
+  cursor: pointer;
+  line-height: 62px;
+  font-size: 16px;
+  color: #323233;
+  font-weight: 400;
+}
+
+.back-icon {
+  line-height: 64px;
+  font-size: 20px;
+  margin-right: 8px;
+}
+
+.add-customer-btn {
+  position: fixed;
+  right: 36px;
+  top: 115px;
+}
+::v-deep .el-form-item {
+  margin-bottom: 8px;
+}
+::v-deep .el-form-item__error {
+  display: none;
+}
+</style>

+ 155 - 0
src/views/exportTrade/customerInquiry/index.vue

@@ -0,0 +1,155 @@
+<template>
+  <basic-container>
+    <avue-crud
+      ref="crud"
+      :option="option"
+      :data="dataList"
+      v-model="form"
+      :page.sync="page"
+      :search.sync="search"
+      @search-change="searchChange"
+      @current-change="currentChange"
+      @size-change="sizeChange"
+      @refresh-change="refreshChange"
+      @on-load="onLoad"
+    >
+      <template slot="menuLeft">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="small"
+          @click.stop="newAdd()"
+          >新 建</el-button
+        >
+      </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";
+import { getList, remove } from "@/api/basicData/customerInquiry";
+import { orderStateFormat} from "@/enums/order-stauts";
+
+export default {
+  name: "customerInformation",
+  data() {
+    return {
+      search: {},
+      option: option,
+      parentId: 0,
+      dataList: [{}],
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      }
+    };
+  },
+  mounted() {
+    this.option.column.map(e => {
+      if (e.prop == "status") {
+        e.formatter = function(row) {
+          return orderStateFormat(row.status);
+        };
+      }
+    });
+  },
+  methods: {
+    //删除列表后面的删除按钮触发触发(row, index, done)
+    rowDel(row, index, done) {
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        remove(row.id);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        this.page.currentPage = 1;
+        this.onLoad(this.page);
+      });
+    },
+    //查看跳转页面
+    beforeOpenPage(row, index) {
+      this.$router.push({
+        path: "/exportcustomerInquiry_detailsPage",
+        query: { id: JSON.stringify(row.id) }
+      });
+    },
+    //新增跳转页面
+    beforeOpen(row) {
+      console.log(row);
+      this.$router.push({
+        path: "/exportInvoice_detailsPage",
+        query: { id: JSON.stringify(row.id) }
+      });
+    },
+    editOpen(row) {
+      this.$router.push({
+        path: "/exportcustomerInquiry_detailsPage",
+        query: { id: JSON.stringify(row.id) }
+      });
+    },
+    //点击搜索按钮触发
+    searchChange(params, done) {
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+    currentChange(val) {
+      this.page.currentPage = val;
+    },
+    sizeChange(val) {
+      this.page.currentPage = 1;
+      this.page.pageSize = val;
+    },
+    onLoad(page, params) {
+      getList(page.currentPage, page.pageSize, params).then(res => {
+        this.dataList = res.data.data.records ? res.data.data.records : [];
+        this.page.total = res.data.data.total;
+        if (this.page.total) {
+          this.option.height = window.innerHeight - 380;
+        } else {
+          this.option.height = window.innerHeight - 305;
+        }
+      });
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.search);
+    },
+    newAdd() {
+      this.$router.push({
+        path: "/exportcustomerInquiry_detailsPage"
+      });
+    }
+  }
+};
+</script>
+
+<style scoped></style>