Browse Source

Merge branch 'dev' of git.echepei.com:caojunjie/Smart_platform_ui into dev

caojunjie 4 years ago
parent
commit
269841b875

+ 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 - 15
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',
@@ -329,21 +359,6 @@ export default [{
       }
     ]
   },
-  // 任务修改页
-  {
-    path: '/task_editPages',
-    component: Layout,
-    hidden: true,
-    children: [
-      {
-        path: '/task_editPages',
-        meta: {
-          i18n: 'task_editPages'
-        },
-        component: () => import( /* webpackChunkName: "views" */ '@/views/workManagement/task/taskEdit')
-      }
-    ]
-  },
   // 结算详情页
   {
     path: '/settleAccounts_detailsPage',

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

@@ -160,7 +160,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>

+ 13 - 11
src/views/exportTrade/purchaseContract/config/uploadList.json

@@ -1,6 +1,7 @@
 {
   "lazy": true,
   "tip": false,
+  "align": "center",
   "simplePage": true,
   "searchShow": true,
   "searchMenuSpan": 6,
@@ -15,27 +16,28 @@
   "addBtnText": "上  传",
   "column":[
     {
-      "label": "排序",
-      "prop": "sort",
-      "type": "number",
+      "label": "文件名称",
+      "prop": "fileName",
       "index": 1,
-      "width":100,
+      "width":340,
       "rules": [
         {
           "required": true,
-          "message": "请输入排序",
+          "message": "请输入文件名称",
           "trigger": "blur"
         }
       ]
-    },{
-      "label": "文件名称",
-      "prop": "fileName",
+    },
+    {
+      "label": "排序",
+      "prop": "sort",
+      "type": "number",
       "index": 2,
-      "width":100,
+      "width":150,
       "rules": [
         {
           "required": true,
-          "message": "请输入文件名称",
+          "message": "请输入排序",
           "trigger": "blur"
         }
       ]
@@ -43,7 +45,7 @@
       "label": "备注",
       "prop": "remarks",
       "index": 5,
-      "width":100,
+      "width":440,
       "rules": [
         {
           "required": false,

+ 29 - 26
src/views/workManagement/main-items/configuration/detailsPage.json

@@ -18,31 +18,31 @@
       "label": "服务项目",
       "prop": "cname",
       "index": 1,
-      "width": 100
+      "width": 120
     },
     {
       "label": "收费建议",
       "prop": "remarks",
       "index": 2,
-      "width": 100
+      "width": 150
     },
     {
       "label": "单价",
       "prop": "quantity",
       "index": 3,
-      "width": 100
+      "width": 120
     },
     {
       "label": "计价单位",
       "prop": "unit",
       "index": 4,
-      "width": 100
+      "width": 120
     },
     {
       "label": "数量",
       "prop": "quantity",
       "index": 5,
-      "width": 100,
+      "width": 120,
       "cell": true,
       "rules": [
         {
@@ -56,83 +56,86 @@
       "label": "合计金额",
       "prop": "amount",
       "index": 6,
-      "width": 100,
+      "width": 120,
       "cell": true
     },
     {
       "label": "频率",
       "prop": "frequency",
       "index": 7,
-      "width": 100,
+      "width": 120,
       "cell": true
     },
     {
       "label": "提醒日",
       "prop": "reminderDay",
-      "type": "datetime",
+      "type": "date",
       "index": 9,
-      "width": 100,
-      "cell": true
-    },
-    {
-      "label": "备注",
-      "prop": "feeRemarks",
-      "index": 10,
-      "width": 100,
+      "width": 150,
       "cell": true
     },
     {
       "label": "任务部门",
       "prop": "deptId",
+      "type":"tree",
+      "cell": true,
       "slot": true,
       "index": 11,
-      "width": 100,
-      "cell": true
+      "width": 150
     },
     {
       "label": "承做人",
       "prop": "userId",
+      "slot": true,
       "index": 12,
-      "width": 100,
-      "cell": true
+      "width": 180
     },
     {
       "label": "需求开始日期",
       "prop": "beginTime",
+      "type": "date",
       "index": 13,
-      "width": 100,
+      "width": 150,
       "cell": true
     },
     {
       "label": "需求完成日期",
       "prop": "endTime",
+      "type": "date",
       "index": 14,
-      "width": 100,
+      "width": 150,
+      "cell": true
+    },
+    {
+      "label": "备注",
+      "prop": "feeRemarks",
+      "index": 10,
+      "width": 150,
       "cell": true
     },
     {
       "label": "制单人",
       "prop": "createUser",
       "index": 14,
-      "width": 80
+      "width": 120
     },
     {
       "label": "制单日期",
       "prop": "createUser",
       "index": 14,
-      "width": 120
+      "width": 150
     },
     {
       "label": "最新修改人",
       "prop": "updateUser",
       "index": 14,
-      "width": 80
+      "width": 120
     },
     {
       "label": "最新修改时间",
       "prop": "updateTime",
       "index": 14,
-      "width": 120
+      "width": 150
     }
   ]
 }

+ 14 - 14
src/views/workManagement/main-items/configuration/mainList.json

@@ -19,90 +19,90 @@
       "label": "系统编号",
       "prop": "sysNo",
       "index": 1,
-      "width": 100
+      "width": 120
     },
     {
       "label": "项目编码",
       "prop": "code",
       "search": true,
       "index": 2,
-      "width": 100
+      "width": 120
     },
     {
       "label": "项目名称",
       "prop": "cname",
       "search": true,
       "index": 3,
-      "width": 100
+      "width": 120
     },
     {
       "label": "客户名称",
       "prop": "corpId",
       "search": true,
       "index": 4,
-      "width": 100
+      "width": 120
     },
     {
       "label": "应收金额",
       "prop": "debitAmount",
       "index": 5,
-      "width": 100
+      "width": 120
     },
     {
       "label": "实收金额",
       "prop": "settlmentAmount",
       "index": 6,
-      "width": 100
+      "width": 120
     },
     {
       "label": "责任人",
       "prop": "corpAttn",
       "search": true,
       "index": 7,
-      "width": 100
+      "width": 120
     },
     {
       "label": "电话",
       "prop": "corpTel",
       "index": 8,
-      "width": 100
+      "width": 150
     },
     {
       "label": "状态",
       "prop": "status",
       "index": 9,
-      "width": 100
+      "width": 120
     },
     {
       "label": "备注",
       "prop": "remark",
       "search": true,
       "index": 10,
-      "width": 100
+      "width": 150
     },
     {
       "label": "制单人",
       "prop": "createUser",
       "index": 11,
-      "width": 100
+      "width": 120
     },
     {
       "label": "制单日期",
       "prop": "createTime",
       "index": 12,
-      "width": 100
+      "width": 150
     },
     {
       "label": "最新修改人",
       "prop": "updateUser",
       "index": 13,
-      "width": 100
+      "width": 120
     },
     {
       "label": "最新修改时间",
       "prop": "updateTime",
       "index": 14,
-      "width": 100
+      "width": 150
     }
   ]
 }

+ 50 - 0
src/views/workManagement/main-items/configuration/userList.json

@@ -0,0 +1,50 @@
+{
+    "lazy": true,
+    "tip": false,
+    "simplePage": true,
+    "searchMenuSpan": 12,
+    "dialogWidth": "60%",
+    "searchShowBtn": false,
+    "searchShow": true,
+    "menu": false,
+    "addBtn": false,
+    "tree": true,
+    "border": true,
+    "index": true,
+    "selection": true,
+    "viewBtn": false,
+    "editBtn": false,
+    "delBtn": false,
+    "menuWidth": 300,
+    "dialogClickModal": false,
+    "column":[
+        {
+            "label": "登录账号",
+            "prop": "account",
+            "search": true,
+            "index": 1,
+            "width":120
+        },{
+            "label": "所属租户",
+            "prop": "tenantName",
+            "index": 2,
+            "width":120
+        },{
+            "label": "用户姓名",
+            "prop": "realName",
+            "search": true,
+            "index": 4,
+            "width":150
+        },{
+            "label": "用户平台",
+            "prop": "userTypeName",
+            "index": 5,
+            "width":150
+        },{
+            "label": "用户拓展",
+            "prop": "userExt",
+            "index": 6,
+            "width":180
+        }
+    ]
+}

+ 208 - 157
src/views/workManagement/main-items/detailsPage.vue

@@ -20,9 +20,7 @@
                 <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-date-picker v-else-if="item.type === 'date'" style="width: 100%;" v-model="form[item.prop]" size="small" type="date" placeholder="选择日期" value-format="yyyy-MM-dd"/>
                 <el-select v-else-if="item.type === 'select'" style="width: 100%" size="small" placeholder="请选择" clearable filterable></el-select>
-                <el-input type="text" v-else-if="item.prop === 'prop5'" v-else v-model="form[item.prop]" size="small"  placeholder="请输入">
-                  <el-button slot="append" icon="el-icon-search" @click="customerDialog = true"></el-button>
-                </el-input>
+                <selectComponent v-else-if="item.prop === 'corpId'" v-model="form[item.prop]" :configuration="configuration"/>
                 <el-input type="age" v-else v-model="form[item.prop]" size="small" autocomplete="off" placeholder="请输入"></el-input>
               </el-form-item>
             </el-col>
@@ -42,9 +40,9 @@
           @row-save="rowSave"
           @size-change="sizeChange"
           @current-change="currentChange"
+          @selection-change="selectionChange"
           @search-change="searchChange"
           @refresh-change="refreshChange"
-          @cell-dblclick="cellDblclick"
           @on-load="getList"
           @saveColumn="saveColumn"
         >
@@ -55,27 +53,29 @@
                        plain
                        @click="serviceDialog = true">新增明细
             </el-button>
-            <el-button type="primary"
+            <el-button type="success"
                        size="small"
-                       icon="el-icon-arrow-right"
+                       icon="el-icon-plus"
                        plain
-                       @click="">导 出
+                       @click="">新 单
             </el-button>
-            <el-button type="primary"
+            <el-button type="info"
                        size="small"
                        plain
-                       @click="">打 印
+                       @click="">请 核
             </el-button>
-            <el-button type="success"
+          </template>
+          <template slot="menuRight">
+            <el-button type="primary"
                        size="small"
-                       icon="el-icon-plus"
+                       icon="el-icon-arrow-right"
                        plain
-                       @click="">新 单
+                       @click="">导 出
             </el-button>
-            <el-button type="info"
+            <el-button type="primary"
                        size="small"
                        plain
-                       @click="">请 核
+                       @click="">打 印
             </el-button>
           </template>
           <template slot-scope="{row,index}"  slot="menu">
@@ -85,14 +85,29 @@
               @click="rowCellTwo(row,index)"
             >{{row.$cellEdit?'保存':'修改'}}</el-button>
           </template>
+          <template slot="userId" slot-scope="{row,index}">
+            <span style="float: left;padding-top: 2px">{{ row.userId }}</span>
+            <el-button type="text" size="mini" style="float: right" @click="selectUser(row)">选择</el-button>
+          </template>
         </avue-crud>
       </basic-container>
+      <containerTitle title="附件上传"></containerTitle>
+      <basic-container style="margin-bottom: 40px">
+        <avue-crud
+          :option="upLoadOption"
+          v-model="upLoadForm"
+          :data="upLoadData"
+          @row-save="upLoadSave"
+          @row-update="upLoadUpdate"
+          @row-del="upLoadDel"
+        ></avue-crud>
+      </basic-container>
     </div>
     <el-dialog
-      title="选择客户"
+      title="导入服务项目"
       append-to-body
       class="el-dialogDeep"
-      :visible.sync="customerDialog"
+      :visible.sync="serviceDialog"
       width="70%"
       :close-on-click-modal="false"
       :destroy-on-close="true"
@@ -102,87 +117,87 @@
           <div>
             <el-scrollbar>
               <basic-container>
-                <avue-tree :option="customerTreeOption"  @node-click="customerNodeClick"/>
+                <avue-tree :option="serviceTreeOption"  @node-click="serviceNodeClick"/>
               </basic-container>
             </el-scrollbar>
           </div>
         </el-col>
         <el-col :span="19">
           <basic-container>
-            <avue-crud ref="customerCrud"
-                       :page.sync="customerPage"
-                       :search.sync="customerSearch"
-                       :option="customerOption"
-                       :table-loading="customerLoading"
-                       :data="customerData"
-                       @row-dblclick="customerConfirm"
-                       @refresh-change="customerRefreshChange"
-                       @selection-change="customerSelectionChange"
-                       @search-change="customerSearchChange"
-                       @on-load="customerOnLoad">
+            <avue-crud ref="serviceCrud"
+                       :page.sync="servicePage"
+                       :search.sync="serviceSearch"
+                       :option="serviceOption"
+                       :table-loading="serviceLoading"
+                       :data="serviceData"
+                       @refresh-change="serviceRefreshChange"
+                       @selection-change="serviceSelectionChange"
+                       @search-change="serviceSearchChange"
+                       @on-load="serviceOnLoad">
             </avue-crud>
           </basic-container>
         </el-col>
       </el-row>
       <span slot="footer" class="dialog-footer">
-         <el-button type="primary" @click="customerConfirm('confirm')" :disabled="this.customerSelectList.length == 0||  this.customerSelectList.length >1">确 定</el-button>
-         <el-button @click="customerDialog = false">取 消</el-button>
+  <el-button type="primary" @click="serviceConfirm()" :disabled="this.serviceSelectList.length == 0">导 入</el-button>
+         <el-button @click="serviceDialog = false">取 消</el-button>
         </span>
     </el-dialog>
     <el-dialog
-      title="导入服务项目"
-      append-to-body
+      title="导入用户"
+      :visible.sync="userDialog"
       class="el-dialogDeep"
-      :visible.sync="serviceDialog"
-      width="70%"
-      :close-on-click-modal="false"
-      :destroy-on-close="true"
-      :close-on-press-escape="false">
-      <el-row style="height: 0;">
-        <el-col :span="5" >
-          <div>
+      append-to-body
+      width="80%">
+      <el-row style="margin-top: -5px;height: 0">
+        <el-col :span="5">
+          <div class="box">
             <el-scrollbar>
               <basic-container>
-                <avue-tree :option="serviceTreeOption"  @node-click="serviceNodeClick"/>
+                <avue-tree :option="userTreeOption" :data="userTreeData" @node-click="userNodeClick"/>
               </basic-container>
             </el-scrollbar>
           </div>
         </el-col>
         <el-col :span="19">
           <basic-container>
-            <avue-crud ref="customerCrud"
-                       :page.sync="servicePage"
-                       :search.sync="serviceSearch"
-                       :option="serviceOption"
-                       :table-loading="serviceLoading"
-                       :data="serviceData"
-                       @refresh-change="serviceRefreshChange"
-                       @selection-change="serviceSelectionChange"
-                       @search-change="serviceSearchChange"
-                       @on-load="serviceOnLoad">
-              <template slot-scope="" slot="deptId" >
-
-              </template>
+            <avue-crud ref="userCrud"
+                       :option="userOption"
+                       :data="userDataList"
+                       :table-loading="userLoading"
+                       :page.sync="userPage"
+                       v-model="userForm"
+                       @search-change="userSearchChange"
+                       @search-reset="userSearchReset"
+                       @refresh-change="userRefreshChange"
+                       @selection-change="userSelectionChange"
+                       @on-load="userOnLoad"
+            >
             </avue-crud>
           </basic-container>
         </el-col>
       </el-row>
       <span slot="footer" class="dialog-footer">
-  <el-button type="primary" @click="serviceConfirm()" :disabled="this.serviceSelectList.length == 0">导 入</el-button>
-         <el-button @click="serviceDialog = false">取 消</el-button>
-        </span>
+      <el-button @click="userDialog = false">取 消</el-button>
+      <el-button type="primary" :disabled="this.userSelection.length == 1 ? false:true" @click="userConfirm" >确 定</el-button>
+    </span>
     </el-dialog>
   </div>
 </template>
 
 <script>
   import option from "./configuration/detailsPage.json";
-  //客户列表接口
-  import {customerList, getDeptLazyTree} from "@/api/basicData/customerInformation"
-  import customerOption from "./configuration/customerDialogList.json";
+  //上传文件json
+  import upLoadOption from "../../exportTrade/purchaseContract/config/uploadList.json"
   //服务列表接口
   import {getServiceProjectList,getServiceTypeTree,} from "@/api/workManagement/serviceProject";
   import serviceOption from "./configuration/serviceDialogList.json";
+  //任务部门树接口
+  import {getLazyList} from "@/api/system/dept";
+  //用户组件
+  import userOption from "./configuration/userList.json";
+  import { getList } from "@/api/system/user";
+  import { getDeptLazyTree} from "@/api/system/dept";
 
   export default {
     data() {
@@ -190,14 +205,30 @@
         loading: false,
         form:{},
         optionFrom:{},
-        data: [],
-        customerDialog:false,//客户名称窗口
+        data: [
+          {
+            deptId:'',
+            userId:''
+          }
+        ],
+        deptDicData:[],//任务部门数据
         serviceDialog:false,//服务导入窗口
+        userDialog:false,//用户导入窗口
+        //客户组件配置控制
+        configuration:{
+          multipleChoices:false,
+          multiple:true,
+          searchShow:true,
+          collapseTags:true,
+          placeholder:'请点击右边按钮选择',
+          dicData:[]
+        },
         page: {
           currentPage: 1,
           total: 0,
           pageSize: 10
         },
+        detailsSelect: {},
         //顶部from数据
         basicData: {
           column: [
@@ -322,46 +353,16 @@
             },
             {
               label: '备注',
+              span: 24,
               prop: 'remark'
             }
           ],
         },
         optionTable: option,
-        //客户窗口定义
-        customerTreeOption: {
-          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'
-          }
-        },
-        customerOption:customerOption,
-        customerLoading:false,
-        customerData:[],
-        customerPage:{
-          currentPage: 1,
-          total: 0,
-          pageSize: 10},
-        customerSearch:{},
-        customerTreeDeptId:"",
-        customerSelectList:[],
+        //上传文件
+        upLoadOption: upLoadOption,
+        upLoadData:[],
+        upLoadForm:{},
         //服务窗口定义
         serviceTreeOption: {
           nodeKey: 'id',
@@ -400,10 +401,46 @@
         serviceSearch:{},
         serviceTreeDeptId:"",
         serviceSelectList:[],
+        //用户窗口定义
+        userTreeOption: {
+          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'
+          }
+        },
+        userTreeData:[],
+        userOption:userOption,
+        userLoading:false,
+        userDataList:[],
+        userSelection:"",
+        userTreeDeptId:"",
+        userForm:{},
+        userPage:{
+          currentPage: 1,
+          total: 0,
+          pageSize: 10
+        },
       };
     },
     mounted() {
-      option.height = window.innerHeight - 760 ;
     },
     methods: {
       //删除列表后面的删除按钮触发触发(row, index, done)
@@ -423,41 +460,22 @@
       },
       //点击修改或保存时触发
       rowCellTwo(row,index){
-        this.$refs.crud.rowCell(row, index)
+        if(row.$cellEdit){
+          setTimeout(() => {
+            this.$message.success("保存成功");
+          }, 1000);
+        }else{
+          this.$refs.crud.rowCell(row, index);
+        }
       },
       //新增修改时保存触发
       rowSave(row, done, loading) {
-        setTimeout(() => {
-          this.$message.success("保存成功");
-          loading();
-          done();
-        }, 1000);
+
       },
       getList() {
         this.loading = true;
         setTimeout(() => {
           this.loading = false;
-          this.data = [
-            {
-              prop1: "食品许可",
-              prop2: "500",
-              prop3: "次",
-              prop4: "1",
-              prop5: "1500",
-              prop6: "1500",
-              prop7: "年",
-              prop8: "202202-1-1",
-              prop9: "效率高",
-              prop10: "商务部",
-              prop11: "老周",
-              prop12: "2021-1-1",
-              prop13: "2021-1-1",
-              prop14: "LOL",
-              prop15: "2021-1-1",
-              prop16: "LOL",
-              prop17: "2021-1-1"
-            }
-          ];
           this.page.total = 1;
         }, 1000);
       },
@@ -477,10 +495,6 @@
         this.page.currentPage = 1;
         this.getList();
       },
-      cellDblclick(row, column, cell, event) {
-        console.log(row, column, cell, event);
-        this.$refs.crud.rowEdit(row);
-      },
       saveColumn(row, column) {
         console.log(row, column);
       },
@@ -492,38 +506,39 @@
           query: {}
         });
       },
-      //客户窗口事件
-      customerNodeClick(data) {
-        this.customerTreeDeptId = data.id;
-        this.customerOnLoad(this.customerPage);
+      //上传文件保存
+      upLoadSave(row, done, loading){
+        this.upLoadData.push(row)
+        done()
       },
-      customerRefreshChange(){
-        this.customerOnLoad(this.customerPage, this.customerSearch)
+      //修改附件上传触发
+      upLoadUpdate(row, done){
+        done(row);
       },
-      customerSearchChange(params, done){
-        this.customerOnLoad(this.customerPage, params)
-        done();
-      },
-      customerSelectionChange(row){
-        this.customerSelectList = row;
-      },
-      customerOnLoad(page, params = {parentId:0}) {
-        this.customerLoading = true;
-        let queryParams = Object.assign({}, params, {size: page.pageSize, current: page.currentPage,corpsTypeId:this.customerTreeDeptId})
-        customerList(queryParams).then(res => {
-          this.customerData = res.data.data.records
-          this.customerPage.total = res.data.data.total
-          this.customerLoading = false;
+      //删除附件上传触发
+      upLoadDel(row, index,){
+        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);
+          }
         })
       },
-      customerConfirm(row){
-        if(row!='confirm'){
-          this.$set(this.form,"prop5",row.cname)
-        }else{
-          this.$set(this.form,"prop5",this.customerSelectList[0].cname)
-        }
-        this.customerDialog = false;
-      },
       //服务窗口事件
       serviceNodeClick(data) {
         this.serviceTreeDeptId = data.id;
@@ -560,6 +575,42 @@
         }
         this.serviceSelectList = []
         this.serviceDialog = false
+      },
+      //用户窗口事件
+      selectUser(row){
+        this.userDialog = true
+        this.detailsSelect = row.$index;
+      },
+      userSearchChange(params, done){
+        this.userOnLoad(this.userPage, params);
+        done()
+      },
+      userSearchReset(){
+
+      },
+      userRefreshChange(){
+        this.userOnLoad(this.userPage)
+      },
+      userSelectionChange(row){
+        this.userSelection = row;
+      },
+      userOnLoad(page,params={}){
+        this.userLoading = true;
+        getList(page.currentPage, page.pageSize, params, this.userTreeDeptId).then(res => {
+          this.userDataList = res.data.data.records
+          this.userPage.total = res.data.data.total
+          this.userLoading = false;
+        });
+      },
+      userNodeClick(data){
+        this.userTreeDeptId = data.id;
+        this.userOnLoad(this.userPage);
+      },
+      //确定
+      userConfirm(){
+         if(this.userSelection){
+           this.optionFrom[this.detailsSelect].userId = this.userSelection[0].userId;
+         }
       }
     },
   };

+ 3 - 5
src/views/workManagement/main-items/list.vue

@@ -14,7 +14,6 @@
       @current-change="currentChange"
       @search-change="searchChange"
       @refresh-change="refreshChange"
-      @cell-dblclick="cellDblclick"
       @on-load="getList"
       @saveColumn="saveColumn"
     >
@@ -58,6 +57,9 @@ export default {
       }
     };
   },
+  mounted() {
+    option.height = window.innerHeight - 350 ;
+  },
   methods: {
     getList() {
       this.loading = true;
@@ -145,10 +147,6 @@ export default {
         done();
       }, 1000);
     },
-    cellDblclick(row, column, cell, event) {
-      console.log(row, column, cell, event);
-      this.$refs.crud.rowEdit(row);
-    },
     saveColumn(row, column) {
       console.log(row, column);
     },

+ 100 - 55
src/views/workManagement/receipt/settleAccountsDetailsPage.vue

@@ -72,13 +72,24 @@
           </template>
         </avue-crud>
       </basic-container>
+      <containerTitle title="附件上传"></containerTitle>
+      <basic-container style="margin-bottom: 40px">
+        <avue-crud
+          :option="upLoadOption"
+          v-model="upLoadForm"
+          :data="upLoadData"
+          @row-save="upLoadSave"
+          @row-update="upLoadUpdate"
+          @row-del="upLoadDel"
+        ></avue-crud>
+      </basic-container>
     </div>
   </div>
 </template>
 
 <script>
   import option from "./configuration/settleAccountsDetailsPage.json";
-  import {customerList, typeSave,detail,deleteDetails} from "@/api/basicData/customerCategory"
+  import upLoadOption from "../../exportTrade/purchaseContract/config/uploadList.json";
 
   export default {
     name: "customerInformation",
@@ -98,63 +109,51 @@
           column: [
             {
               label: '系统编号',
-              prop: 'prop1',
+              prop: 'sysNo',
               rules: [
                 {
                   required: true,
-                  message: ' ',
+                  message: '请输入系统编号',
                   trigger: 'blur'
                 }
               ]
             }, {
-              label: '项目代码',
-              prop: 'prop3',
-              data: [],
+              label: '项目编码',
+              prop: 'code',
               rules: [
                 {
                   required: true,
-                  message: ' ',
+                  message: '请输入项目编码',
                   trigger: 'blur'
                 }
               ]
             }, {
               label: '项目名称',
-              prop: 'prop4',
+              prop: 'cname',
               rules: [
                 {
                   required: true,
-                  message: ' ',
+                  message: '请输入项目名称',
                   trigger: 'blur'
                 }
               ]
             }, {
               label: '客户名称',
-              prop: 'prop5',
+              prop: 'corpId'
+            },{
+              label: '合同金额',
+              prop: 'debitAmount',
               rules: [
                 {
-                  required: true,
-                  message: ' ',
+                  pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,
+                  message: '请输入数字或小数,且小数位不超过两位',
                   trigger: 'blur'
                 }
               ]
-            },{
-              label: '制单人',
-              prop: 'prop3',
-              data: []
-            }, {
-              label: '制单日期',
-              prop: 'prop2'
-            }, {
-              label: '责任人',
-              prop: 'prop6',
-              data: []
-            }, {
-              label: '承揽人',
-              prop: 'prop8',
-              data: []
-            }, {
-              label: '合同金额',
-              prop: 'prop8',
+            },
+            {
+              label: '首付金额',
+              prop: 'advanceAmount',
               rules: [
                 {
                   pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,
@@ -164,8 +163,8 @@
               ]
             },
             {
-              label: '收金额',
-              prop: 'prop9',
+              label: '收金额',
+              prop: 'balanceAmount',
               rules: [
                 {
                   pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,
@@ -175,8 +174,9 @@
               ]
             },
             {
-              label: '未收金额',
-              prop: 'prop10',
+              label: '已收金额',
+              prop: 'settlmentAmount',
+              disabled:true,
               rules: [
                 {
                   pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,
@@ -186,42 +186,50 @@
               ]
             },
             {
+              label: '责任人',
+              prop: 'corpAttn',
+            }, {
+              label: '承揽人',
+              prop: 'salesName',
+            },
+            {
+              label: '制单人',
+              prop: 'createUser',
+            }, {
+              label: '制单日期',
+              prop: 'createTime',
+              type: 'datetime'
+            },
+            {
+              label: '电话',
+              prop: 'corpTel',
+            },
+            {
               label: '收款方式',
-              prop: 'prop13',
+              prop: 'paymentType',
               type:'select',
               dataType: "number",
               width: 120,
-              dicUrl: "/api/blade-system/dict/dictionary?code=payment_term",
+              dicUrl: "/api/blade-system/dict-biz/dictionary?code=payment_term",
               props: {
                 label: "dictValue",
                 value: "dictKey"
               },
-              rules: [
-                {
-                  required: true,
-                  message: '请选择收款方式',
-                  trigger: 'blur'
-                }
-              ],
             },
             {
               label: '开始日期',
-              prop: 'prop11',
-              type:'date',
+              prop: 'beginTime',
+              type:'datetime',
             },
             {
               label: '结束日期',
-              prop: 'prop12',
-              type:'date',
-            },
-            {
-              label: '电话',
-              prop: 'prop7',
-              data: [],
+              prop: 'endTime',
+              type:'datetime',
             },
             {
               label: '备注',
-              prop: 'prop8',
+              span: 24,
+              prop: 'remark'
             }
           ],
         },
@@ -259,14 +267,18 @@
             renwubu:"商务部",
             cnegzuoren:"小明",
           }
-        ]
+        ],
+        //上传文件
+        upLoadOption: upLoadOption,
+        upLoadData:[],
+        upLoadForm:{},
       }
     },
     created() {
 
     },
     mounted() {
-      option.height = window.innerHeight - 700 ;
+
     },
     methods: {
       backToList(){
@@ -349,6 +361,39 @@
         //   this.page.total = 1;
         // })
       },
+      //上传文件保存
+      upLoadSave(row, done, loading){
+        this.upLoadData.push(row)
+        done()
+      },
+      //修改附件上传触发
+      upLoadUpdate(row, done){
+        done(row);
+      },
+      //删除附件上传触发
+      upLoadDel(row, index,){
+        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);
+          }
+        })
+      },
     }
   }
 </script>

+ 17 - 4
src/views/workManagement/service-items/configuration/projectOption.json

@@ -65,9 +65,16 @@
     },
     {
       "label": "单价",
-      "prop": "Price",
+      "prop": "price",
       "index": 3,
-      "width": 120
+      "width": 120,
+      "rules": [
+        {
+          "pattern": "/^(([1-9][0-9]*)|(([0]\\.\\d{1,2}|[1-9][0-9]*\\.\\d{1,2})))$/",
+          "message":"请输入数字或小数,且小数位不超过两位",
+          "trigger": "blur"
+        }
+      ]
     },
     {
       "label": "计价单位",
@@ -92,10 +99,16 @@
     },
     {
       "label": "标准工时",
-      "type": "number",
       "prop": "workingHours",
       "index": 7,
-      "width": 80
+      "width": 80,
+      "rules": [
+        {
+          "pattern": "/^(([1-9][0-9]*)|(([0]\\.\\d{1,2}|[1-9][0-9]*\\.\\d{1,2})))$/",
+          "message":"请输入数字或小数,且小数位不超过两位",
+          "trigger": "blur"
+        }
+      ]
     },
     {
       "label": "创建人",

+ 2 - 1
src/views/workManagement/task/configuration/mainList.json

@@ -9,10 +9,11 @@
   "searchMenuSpan": 6,
   "tree": true,
   "selection": true,
+  "addBtn": false,
   "viewBtn": false,
   "editBtn": false,
   "delBtn": false,
-  "menuWidth": 280,
+  "menuWidth": 150,
   "column": [
     {
       "label": "项目代码",

+ 2 - 56
src/views/workManagement/task/index.vue

@@ -13,14 +13,13 @@
                @current-change="currentChange"
                @size-change="sizeChange"
                @refresh-change="refreshChange"
-               @on-load="onLoad"
-               @tree-load="treeLoad">
+               @on-load="onLoad">
       <template slot="menuLeft">
         <el-button type="primary"
                    size="small"
                    icon="el-icon-upload2"
                    plain
-                   @click="">导 
+                   @click="">导 
         </el-button>
       </template>
       <template slot-scope="scope" slot="menu">
@@ -28,20 +27,6 @@
           type="text"
           icon="el-icon-view"
           size="small"
-          @click.stop="beforeOpenPage(scope.row)"
-        >查看
-        </el-button>
-        <el-button
-          type="text"
-          icon="el-icon-edit"
-          size="small"
-          @click.stop="editOpen(scope.row)"
-        >编辑
-        </el-button>
-        <el-button
-          type="text"
-          icon="el-icon-view"
-          size="small"
           @click.stop=""
         >发送
         </el-button>
@@ -59,7 +44,6 @@
 
 <script>
   import option from "./configuration/mainList.json";
-  import {customerList, typeSave,detail,deleteDetails} from "@/api/basicData/customerCategory"
 
   export default {
     name: "customerInformation",
@@ -84,28 +68,6 @@
       option.height = window.innerHeight - 350 ;
     },
     methods: {
-      //新增
-      beforeOpen(row){
-        this.$router.push({
-          path: "/task_editPages",
-          query: {id: JSON.stringify(row.fwxm)},
-        });
-      },
-      //查看
-      beforeOpenPage(row){
-        this.$router.push({
-          path: "/task_editPages",
-          query: {id: JSON.stringify(row.fwxm)},
-        });
-      },
-      //修改
-      editOpen(row){
-        this.$router.push({
-          path: "/task_editPages",
-          query: {id: JSON.stringify(row.fwxm)},
-        });
-      },
-      //
       //删除列表后面的删除按钮触发触发(row, index, done)
       rowDel(row, index, done) {
         this.$confirm("确定将选择数据删除?", {
@@ -121,15 +83,6 @@
           done(row);
         });
       },
-
-      //查询全部
-      initData(){
-        customerList().then(res => {
-          console.log(this.form);
-          const column = this.findObject(this.option.column, "parentId");
-          column.dicData = res.data.data.records;
-        });
-      },
       //点击搜索按钮触发
       searchChange(params, done) {
         this.query = params;
@@ -186,13 +139,6 @@
           kname:"李",
         }];
       },
-      //树桩列点击展开触发
-      treeLoad(tree, treeNode, resolve) {
-        const parentId = tree.id;
-        customerList({parentId:parentId}).then(res => {
-          resolve(res.data.data.records);
-        });
-      },
     }
   }
 </script>

+ 0 - 327
src/views/workManagement/task/taskEdit.vue

@@ -1,327 +0,0 @@
-<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"
-        @click=""
-      >{{form.id?'确认修改':'确认新增'}}
-      </el-button>
-    </div>
-    <div style="margin-top: 60px">
-      <basic-container>
-        <el-form :model="form" ref="form" label-width="130px">
-          <el-row>
-            <el-col v-for="(item, index) in basicData.column" :span="item.span?item.span:6" :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>
-        </el-form>
-      </basic-container>
-    </div>
-  </div>
-</template>
-
-<script>
-
-  export default {
-    data() {
-      return {
-        loading: false,
-        form:{},
-        data: [],
-        //顶部from数据
-        basicData:
-          {
-          column: [
-            {
-              label: '项目代码',
-              prop: 'prop1',
-              rules: [
-                {
-                  required: false,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            }, {
-              label: '项目名称',
-              prop: 'prop2',
-              rules: [
-                {
-                  required: true,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            }, {
-              label: '服务项目',
-              prop: 'prop3',
-              data: [],
-              rules: [
-                {
-                  required: true,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            }, {
-              label: '下单时间',
-              prop: 'prop3',
-              data: [],
-              rules: [
-                {
-                  required: true,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            }, {
-              label: '开始日期',
-              prop: 'prop4',
-              rules: [
-                {
-                  required: true,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            }, {
-              label: '需求完成日期',
-              prop: 'prop5',
-              rules: [
-                {
-                  required: true,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            }, {
-              label: '部门',
-              prop: 'prop6',
-              data: [],
-              rules: [
-                {
-                  required: true,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            }, {
-              label: '备注',
-              prop: 'prop7',
-              data: [],
-              rules: [
-                {
-                  required: true,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            }, {
-              label: '应收金额',
-              prop: 'prop8',
-              data: [],
-              rules: [
-                {
-                  required: true,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            }, {
-              label: '任务责任人',
-              prop: 'prop8',
-              rules: [
-                {
-                  required: true,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            },
-            {
-              label: '客户名称',
-              prop: 'prop9',
-              rules: [
-                {
-                  required: true,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            },
-            {
-              label: '系统编号',
-              prop: 'prop10',
-              rules: [
-                {
-                  required: true,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            },
-            {
-              label: '状态',
-              prop: 'prop11',
-              type:'datetime',
-              rules: [
-                {
-                  required: true,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            },
-            {
-              label: '备注',
-              prop: 'prop12',
-              type:'datetime',
-              rules: [
-                {
-                  required: true,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            }
-          ],
-        },
-        page: {
-          currentPage: 1,
-          total: 0,
-          pageSize: 10
-        }
-      };
-    },
-    methods: {
-      //删除列表后面的删除按钮触发触发(row, index, done)
-      rowDel(row, index, done) {
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          // 数据回调进行刷新
-          done(row);
-        });
-      },
-      //修改时的修改按钮点击触发
-      rowUpdate(row, index, done, loading) {
-        setTimeout(() => {
-          this.$message.success("修改成功");
-          loading();
-          done();
-        }, 1000);
-      },
-      //新增修改时保存触发
-      rowSave(row, done, loading) {
-        setTimeout(() => {
-          this.$message.success("保存成功");
-          loading();
-          done();
-        }, 1000);
-      },
-      getList() {
-        this.loading = true;
-        setTimeout(() => {
-          this.loading = false;
-          this.data = [
-            {
-              prop1: "食品许可",
-              prop2: "500",
-              prop3: "次",
-              prop4: "1",
-              prop5: "1500",
-              prop6: "1500",
-              prop7: "年",
-              prop8: "202202-1-1",
-              prop9: "效率高",
-              prop10: "商务部",
-              prop11: "老周",
-              prop12: "2021-1-1",
-              prop13: "2021-1-1",
-              prop14: "LOL",
-              prop15: "2021-1-1",
-              prop16: "LOL",
-              prop17: "2021-1-1"
-            }
-          ];
-          this.page.total = 1;
-        }, 1000);
-      },
-      searchChange(params, done) {
-        this.getList(this.page, params);
-        done();
-      },
-      sizeChange(val) {
-        this.page.pageSize = val;
-        this.getList();
-      },
-      currentChange(val) {
-        this.page.currentPage = val;
-        this.getList();
-      },
-      refreshChange() {
-        this.page.currentPage = 1;
-        this.getList();
-      },
-      cellDblclick(row, column, cell, event) {
-        console.log(row, column, cell, event);
-        this.$refs.crud.rowEdit(row);
-      },
-      saveColumn(row, column) {
-        console.log(row, column);
-      },
-      //返回主营项目列表
-      backToList(){
-        this.$router.$avueRouter.closeTag();
-        this.$router.push({
-          path: '/workManagement/task/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;
-  }
-
-  .customer-back {
-    cursor: pointer;
-    line-height: 62px;
-    font-size: 16px;
-    color: #323233;
-    font-weight: 400;
-  }
-
-  .add-customer-btn {
-    position: fixed;
-    right: 36px;
-    top: 115px;
-  }
-</style>