Просмотр исходного кода

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

caojunjie 3 лет назад
Родитель
Сommit
8af5c41aad
22 измененных файлов с 840 добавлено и 131 удалено
  1. 42 0
      src/api/workManagement/mainProject.js
  2. 4 3
      src/util/validate.js
  3. 1 0
      src/views/basicData/commodityCategory/configuration/mainList.json
  4. 143 0
      src/views/basicData/container/configuration/mainList.json
  5. 118 0
      src/views/basicData/container/index.vue
  6. 142 0
      src/views/basicData/portinformation/configuration/mainList.json
  7. 118 0
      src/views/basicData/portinformation/index.vue
  8. 15 3
      src/views/exportTrade/customerInquiry/config/customerContact.json
  9. 15 15
      src/views/exportTrade/customerInquiry/config/mainList.json
  10. 68 20
      src/views/exportTrade/customerInquiry/detailsPage.vue
  11. 22 11
      src/views/exportTrade/customerInquiry/index.vue
  12. 3 3
      src/views/workManagement/main-items/configuration/mainList.json
  13. 32 26
      src/views/workManagement/main-items/detailsPage.vue
  14. 67 37
      src/views/workManagement/main-items/list.vue
  15. 1 1
      src/views/workManagement/receipt/configuration/statisticalList.json
  16. 8 0
      src/views/workManagement/receipt/statisticalList.vue
  17. 1 1
      src/views/workManagement/service-items/configuration/projectOption.json
  18. 1 1
      src/views/workManagement/service-items/configuration/typeOption.json
  19. 29 6
      src/views/workManagement/service-items/project.vue
  20. 5 2
      src/views/workManagement/service-items/type.vue
  21. 1 1
      src/views/workManagement/task/configuration/mainList.json
  22. 4 1
      src/views/workManagement/task/index.vue

+ 42 - 0
src/api/workManagement/mainProject.js

@@ -0,0 +1,42 @@
+import request from '@/router/axios';
+
+//主营项目列表
+export function getList(current,size,params) {
+  return request({
+    url: '/api/trade-project/project/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+//
+export function typeSave(data) {
+  return request({
+    url: '/api/blade-client/affairstype/submit',
+    method: 'post',
+    data: data
+  })
+}
+//根据id主营以及明细
+export function projectDetail(id) {
+  return request({
+    url: '/api/trade-project/project/findById',
+    method: 'get',
+    params:{
+      id : id
+    }
+  })
+}
+//删除
+export function deleteMain(id) {
+  return request({
+    url: '/api/trade-project/project/delete',
+    method: 'delete',
+    params:{
+      id : id
+    }
+  })
+}

+ 4 - 3
src/util/validate.js

@@ -201,9 +201,10 @@ export function isvalidatemobile(phone) {
  * 判断姓名是否正确
  */
 export function validatename(name) {
-    var regName = /^[\u4e00-\u9fa5]{2,4}$/;
-    if (!regName.test(name)) return false;
-    return true;
+    var regName = /^[\u4e00-\u9fa5]{2,10}$/;
+    console.log(!regName.test(name))
+    if (!regName.test(name)) return true;
+    return false;
 }
 /**
  * 判断是否为整数

+ 1 - 0
src/views/basicData/commodityCategory/configuration/mainList.json

@@ -35,6 +35,7 @@
       "valueFormat": "yyyy-MM-dd",
       "search": true,
       "searchRange":true,
+      "addDisplay": false,
       "editDisplay":false,
       "index": 2,
       "width": 100,

+ 143 - 0
src/views/basicData/container/configuration/mainList.json

@@ -0,0 +1,143 @@
+{
+  "headerAlign": "center",
+  "align": "center",
+  "border": true,
+  "index": true,
+  "lazy": true,
+  "tip": false,
+  "searchShow": true,
+  "searchMenuSpan": 6,
+  "tree": true,
+  "selection": true,
+  "addBtn": true,
+  "viewBtn": true,
+  "editBtn": true,
+  "delBtn": true,
+  "labelWidth": 120,
+  "menuWidth": 220,
+  "column": [
+    {
+      "label": "编号",
+      "prop": "fNo",
+      "search": true,
+      "index": 1,
+      "width": 120
+    },
+    {
+      "label": "箱种类",
+      "prop": "fType",
+      "index": 2,
+      "width": 150,
+      "rules": [
+        {
+          "required": true,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "名称",
+      "prop": "fName",
+      "search": true,
+      "index": 3,
+      "width": 150,
+      "rules": [
+        {
+          "required": true,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "英文名",
+      "prop": "fEname",
+      "index": 4,
+      "width": 150
+    },
+    {
+      "label": "航线",
+      "prop": "portName",
+      "index": 5,
+      "width": 120
+    },
+    {
+      "label": "UNCODE",
+      "prop": "fUncode",
+      "index": 6,
+      "width": 120
+    },
+    {
+      "label": "TEU",
+      "prop": "fTeu",
+      "index": 7,
+      "width": 80
+    },
+    {
+      "label": "容积(立方)",
+      "prop": "fCbm",
+      "index": 8,
+      "width": 80
+    },
+    {
+      "label": "毛重(T)",
+      "prop": "fWeight",
+      "index": 9,
+      "width": 80
+    },
+    {
+      "label": "状态",
+      "prop": "fStatus",
+      "type": "select",
+      "dicData": [{
+        "label": "正常",
+        "value": 0
+      }, {
+        "label": "关闭",
+        "value": 1
+      }],
+      "search": true,
+      "index": 10,
+      "width": 120
+    },
+    {
+      "label": "备注",
+      "prop": "remark",
+      "index": 11,
+      "width": 150
+    },
+    {
+      "label": "录入人",
+      "prop": "createBy",
+      "addDisplay": false,
+      "editDisplay":false,
+      "index": 12,
+      "width": 120
+    },
+    {
+      "label": "录入时间",
+      "prop": "createTime",
+      "addDisplay": false,
+      "editDisplay":false,
+      "index": 13,
+      "width": 150
+    },
+    {
+      "label": "最新修改人",
+      "prop": "updateBy",
+      "addDisplay":false,
+      "editDisplay":false,
+      "index": 14,
+      "width": 120
+    },
+    {
+      "label": "最新修改时间",
+      "prop": "updateTime",
+      "addDisplay": false,
+      "editDisplay":false,
+      "index": 15,
+      "width": 150
+    }
+  ]
+}

+ 118 - 0
src/views/basicData/container/index.vue

@@ -0,0 +1,118 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :data="dataList"
+               ref="crud"
+               v-model="form"
+               :page.sync="page"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button
+          icon="el-icon-printer"
+          size="small"
+          type="primary"
+          @click.stop=""
+        >报 表
+        </el-button>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import option from "./configuration/mainList.json";
+
+  export default {
+    name: "customerInformation",
+    data() {
+      return {
+        form: {},
+        option: option,
+        parentId:0,
+        dataList: [],
+        page: {
+          pageSize: 10,
+          pagerCount: 5,
+          total: 0,
+        },
+        query:{}
+      }
+    },
+    created() {
+
+    },
+    mounted() {
+      option.height = window.innerHeight - 280 ;
+    },
+    methods: {
+      //删除列表后面的删除按钮触发触发(row, index, done)
+      rowDel(row, index, done) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          // 数据回调进行刷新
+          done(row);
+        });
+      },
+      //点击搜索按钮触发
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        params.parentId = 0
+        this.onLoad(this.page, params);
+        done()
+      },
+      searchReset() {
+        console.log('1')
+      },
+      selectionChange() {
+        console.log('1')
+      },
+      currentChange() {
+        console.log('1')
+      },
+      sizeChange() {
+        console.log('1')
+      },
+      refreshChange() {
+        console.log('1')
+      },
+      onLoad(page, params = {}) {
+        this.dataList = [{
+          fNo:"DD",
+          fType:"箱种类",
+          fName:"丹东",
+          fEname:"dandong",
+          portName:"威海-丹东",
+          fUncode:"CEWEI",
+          fTeu:"1",
+          fCbm:"2",
+          fWeight:"3",
+          fStatus:"正常使用",
+          remark:"123",
+          createBy:"admin",
+          createTime:"2021-04-16",
+          updateBy:"admin",
+          updateTime:"2021-04-16",
+        }];
+      },
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 142 - 0
src/views/basicData/portinformation/configuration/mainList.json

@@ -0,0 +1,142 @@
+{
+  "headerAlign": "center",
+  "align": "center",
+  "border": true,
+  "index": true,
+  "lazy": true,
+  "tip": false,
+  "searchShow": true,
+  "searchMenuSpan": 6,
+  "tree": true,
+  "selection": true,
+  "addBtn": true,
+  "viewBtn": true,
+  "editBtn": true,
+  "delBtn": true,
+  "menuWidth": 220,
+  "column": [
+    {
+      "label": "港口类型",
+      "prop": "havenName",
+      "search": true,
+      "index": 1,
+      "width": 120
+    },
+    {
+      "label": "港口编号",
+      "prop": "fNo",
+      "index": 2,
+      "width": 150,
+      "rules": [
+        {
+          "required": true,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "港口全称",
+      "prop": "fName",
+      "search": true,
+      "index": 3,
+      "width": 150,
+      "rules": [
+        {
+          "required": true,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "英文全称",
+      "prop": "fEname",
+      "index": 4,
+      "width": 150
+    },
+    {
+      "label": "航线",
+      "prop": "portName",
+      "index": 5,
+      "width": 120
+    },
+    {
+      "label": "UNCODE",
+      "prop": "fUncode",
+      "index": 6,
+      "width": 120
+    },
+    {
+      "label": "国家",
+      "prop": "fCountry",
+      "index": 7,
+      "width": 80
+    },
+    {
+      "label": "省",
+      "prop": "fProvince",
+      "index": 8,
+      "width": 80
+    },
+    {
+      "label": "市",
+      "prop": "fCity",
+      "index": 9,
+      "width": 80
+    },
+    {
+      "label": "状态",
+      "prop": "fStatus",
+      "type": "select",
+      "dicData": [{
+        "label": "正常",
+        "value": 0
+      }, {
+        "label": "关闭",
+        "value": 1
+      }],
+      "search": true,
+      "index": 10,
+      "width": 120
+    },
+    {
+      "label": "备注",
+      "prop": "remark",
+      "index": 11,
+      "width": 150
+    },
+    {
+      "label": "录入人",
+      "prop": "createBy",
+      "addDisplay": false,
+      "editDisplay":false,
+      "index": 12,
+      "width": 120
+    },
+    {
+      "label": "录入时间",
+      "prop": "createTime",
+      "addDisplay": false,
+      "editDisplay":false,
+      "index": 13,
+      "width": 150
+    },
+    {
+      "label": "最新修改人",
+      "prop": "updateBy",
+      "addDisplay":false,
+      "editDisplay":false,
+      "index": 14,
+      "width": 120
+    },
+    {
+      "label": "最新修改时间",
+      "prop": "updateTime",
+      "addDisplay": false,
+      "editDisplay":false,
+      "index": 15,
+      "width": 150
+    }
+  ]
+}

+ 118 - 0
src/views/basicData/portinformation/index.vue

@@ -0,0 +1,118 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :data="dataList"
+               ref="crud"
+               v-model="form"
+               :page.sync="page"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button
+          icon="el-icon-printer"
+          size="small"
+          type="primary"
+          @click.stop=""
+        >报 表
+        </el-button>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import option from "./configuration/mainList.json";
+
+  export default {
+    name: "customerInformation",
+    data() {
+      return {
+        form: {},
+        option: option,
+        parentId:0,
+        dataList: [],
+        page: {
+          pageSize: 10,
+          pagerCount: 5,
+          total: 0,
+        },
+        query:{}
+      }
+    },
+    created() {
+
+    },
+    mounted() {
+      option.height = window.innerHeight - 350 ;
+    },
+    methods: {
+      //删除列表后面的删除按钮触发触发(row, index, done)
+      rowDel(row, index, done) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          // 数据回调进行刷新
+          done(row);
+        });
+      },
+      //点击搜索按钮触发
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        params.parentId = 0
+        this.onLoad(this.page, params);
+        done()
+      },
+      searchReset() {
+        console.log('1')
+      },
+      selectionChange() {
+        console.log('1')
+      },
+      currentChange() {
+        console.log('1')
+      },
+      sizeChange() {
+        console.log('1')
+      },
+      refreshChange() {
+        console.log('1')
+      },
+      onLoad(page, params = {}) {
+        this.dataList = [{
+          havenName:"海港",
+          fNo:"DD",
+          fName:"丹东",
+          fEname:"dandong",
+          portName:"威海-丹东",
+          fUncode:"CEWEI",
+          fCountry:"中国",
+          fProvince:"山东",
+          fCity:"威海",
+          fStatus:"正常使用",
+          remark:"123",
+          createBy:"admin",
+          createTime:"2021-04-16",
+          updateBy:"admin",
+          updateTime:"2021-04-16",
+        }];
+      },
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 15 - 3
src/views/exportTrade/customerInquiry/config/customerContact.json

@@ -17,7 +17,7 @@
     },
     {
       "label": "产品编号",
-      "prop": "itemId",
+      "prop": "code",
       "index": 2,
       "minWidth": 80,
       "overHidden":true
@@ -35,7 +35,13 @@
       "index": 4,
       "minWidth": 80,
       "overHidden":true,
-      "cell": true
+      "cell": true,
+      "type": "select",
+      "dicUrl": "/api/blade-system/dict-biz/dictionary?code=product_properties",
+      "props": {
+        "label": "dictValue",
+        "value": "dictKey"
+      }
     },
     {
       "label": "产品照片",
@@ -82,7 +88,13 @@
       "index": 10,
       "minWidth": 80,
       "overHidden":true,
-      "cell": true
+      "cell": true,
+      "type": "select",
+      "dicUrl": "/api/blade-system/dict-biz/dictionary?code=pricing_terms",
+      "props": {
+        "label": "dictValue",
+        "value": "dictKey"
+      }
     },
     {
       "label": "单价",

+ 15 - 15
src/views/exportTrade/customerInquiry/config/mainList.json

@@ -16,15 +16,15 @@
       "index": 1,
       "minWidth": 60,
       "overHidden": true
-    },
-    {
-      "label": "订单状态",
-      "prop": "status",
+    }, {
+      "label": "客户名称",
+      "prop": "corpId",
       "search": true,
       "index": 2,
       "minWidth": 80,
       "overHidden": true
-    }, {
+    },
+    {
       "label": "发票号(PI)",
       "prop": "proformInvoice",
       "search": true,
@@ -32,12 +32,18 @@
       "minWidth": 80,
       "overHidden": true
     }, {
-      "label": "客户名称",
-      "prop": "corpId",
+      "label": "订单状态",
+      "prop": "orderStatus",
       "search": true,
       "index": 4,
       "minWidth": 80,
-      "overHidden": true
+      "overHidden": true,
+      "type": "select",
+      "dicUrl": "/api/blade-system/dict-biz/dictionary?code=order_status",
+      "props": {
+        "label": "dictValue",
+        "value": "dictValue"
+      }
     }, {
       "label": "联系人",
       "prop": "corpAttn",
@@ -106,13 +112,7 @@
       "prop": "paymentType",
       "index": 14,
       "minWidth": 80,
-      "overHidden": true,
-      "type": "select",
-      "dicUrl": "/api/blade-system/dict/dictionary?code=payment_term",
-      "props": {
-        "label": "dictValue",
-        "value": "dictKey"
-      }
+      "overHidden": true
     }, {
       "label": "币别",
       "prop": "currency",

+ 68 - 20
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -24,7 +24,17 @@
       <basic-container style="margin-bottom: 10px">
         <avue-form ref="form" v-model="form" :option="option">
           <template slot="corpId">
-            <select-component v-model="form.corpId" :configuration="configuration"></select-component>
+            <select-component
+              v-model="form.corpId"
+              :configuration="configuration"
+            ></select-component>
+          </template>
+          <template slot="exchangeRate">
+            <el-input
+              size="mini"
+              v-model="form.exchangeRate"
+              oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d{1,2}).*$/, "$1.$2")'
+            />
           </template>
         </avue-form>
       </basic-container>
@@ -49,17 +59,17 @@
               icon="el-icon-printer"
               size="small"
               @click.stop="openReport()"
-              >打 印</el-button
+              >报 表</el-button
             >
           </template>
-          <template slot="menu" slot-scope="{ row, label, dic, $index }">
+          <template slot="menu" slot-scope="scope">
             <el-button
-              v-if="row.$cellEdit"
+              v-if="scope.row.$cellEdit"
               size="small"
               icon="el-icon-edit"
               type="text"
-              @click="save(row, label, dic, $index)"
-              >保 存</el-button
+              @click="rowDel(scope.row,scope.index)"
+              >删 除</el-button
             >
           </template>
         </avue-crud>
@@ -135,9 +145,34 @@ import {
 } from "@/api/basicData/customerInquiry";
 import { orderStates } from "@/enums/order-stauts";
 import reportDialog from "@/components/report-dialog/main";
+import { isvalidatemobile, validatename } from "@/util/validate";
 export default {
   name: "detailsPageEdit",
   data() {
+    const validatePhone = (rule, value, callback) => {
+      if (value != "") {
+        if (isvalidatemobile(value)[0]) {
+          this.$message.error("手机号码格式不正确");
+          callback(new Error(isvalidatemobile(value)[1]));
+        } else {
+          callback();
+        }
+      } else {
+        callback();
+      }
+    };
+    const validateName = (rule, value, callback) => {
+      if (value != "") {
+        if (validatename(value)) {
+          this.$message.error("联系人格式不正确");
+          callback(new Error(validatename(value)));
+        } else {
+          callback();
+        }
+      } else {
+        callback();
+      }
+    };
     return {
       configuration: {
         multipleChoices: false,
@@ -162,14 +197,14 @@ export default {
           },
           {
             label: "订单状态",
-            prop: "status",
+            prop: "orderStatus",
             span: 8,
             type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=order_status",
             props: {
-              label: "name",
-              value: "code"
-            },
-            dicData: orderStates
+              label: "dictValue",
+              value: "dictValue"
+            }
           },
           {
             label: "发票号(PI)",
@@ -186,17 +221,20 @@ export default {
                 trigger: "blur"
               }
             ],
-            span: 8
+            span: 8,
+            slot: true
           },
           {
             label: "联系人",
             prop: "corpAttn",
-            span: 8
+            span: 8,
+            rules: [{ validator: validateName, trigger: "blur" }]
           },
           {
             label: "电话",
             prop: "corpTel",
-            span: 8
+            span: 8,
+            rules: [{ validator: validatePhone, trigger: "blur" }]
           },
           {
             label: "起运港",
@@ -286,12 +324,19 @@ export default {
           {
             label: "币别",
             prop: "currency",
-            span: 8
+            span: 8,
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            }
           },
           {
             label: "汇率",
             prop: "exchangeRate",
-            span: 8
+            span: 8,
+            slot: true
           },
           {
             label: "信用证编号",
@@ -367,9 +412,9 @@ export default {
     }
   },
   methods: {
-    save(row, label, dic, index) {
-      console.log(row, label, dic, index);
-      this.data[index].$cellEdit = false;
+    rowSave(row) {
+      console.log(row);
+      this.$set(row, "$cellEdit", false);
     },
     rowDel(row, index) {
       if (row.id) {
@@ -398,7 +443,7 @@ export default {
     },
     selectionChange(list) {
       list.map(e => {
-        e.itemId = e.code;
+        e.itemId = e.id;
         e.priceCategory = e.goodsTypeName;
         e.itemUrl = e.url;
         e.itemProp = null;
@@ -414,6 +459,8 @@ export default {
         e.$cellEdit = true;
         delete e.$index;
         delete e.id;
+        delete e.isDeleted;
+        delete e.status;
       });
       this.selectionList = list;
     },
@@ -448,6 +495,7 @@ export default {
       detail(id).then(res => {
         this.form = res.data.data;
         this.data = res.data.data.orderItemsList;
+        this.configuration.dicData = this.form.corpName;
       });
     },
     //修改提交触发

+ 22 - 11
src/views/exportTrade/customerInquiry/index.vue

@@ -22,6 +22,15 @@
           >新 建</el-button
         >
       </template>
+      <template slot="corpIdSearch">
+        <select-component
+          v-model="search.corpId"
+          :configuration="configuration"
+        ></select-component>
+      </template>
+      <template slot-scope="scope" slot="corpId">
+        {{ scope.row.corpsName }}
+      </template>
       <template slot-scope="scope" slot="menu">
         <el-button
           type="text"
@@ -52,12 +61,19 @@
 <script>
 import option from "./config/mainList.json";
 import { getList, remove } from "@/api/basicData/customerInquiry";
-import { orderStateFormat} from "@/enums/order-stauts";
+import { orderStateFormat } from "@/enums/order-stauts";
 
 export default {
   name: "customerInformation",
   data() {
     return {
+      configuration: {
+        multipleChoices: false,
+        multiple: false,
+        collapseTags: false,
+        placeholder: "请点击右边按钮选择",
+        dicData: []
+      },
       search: {},
       option: option,
       parentId: 0,
@@ -69,15 +85,6 @@ export default {
       }
     };
   },
-  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) {
@@ -152,4 +159,8 @@ export default {
 };
 </script>
 
-<style scoped></style>
+<style scoped>
+::v-deep .select-component {
+  display: flex;
+}
+</style>

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

@@ -7,12 +7,12 @@
   "lazy": true,
   "tip": false,
   "searchShow": true,
-  "searchMenuSpan": 6,
+  "searchMenuPosition": "right",
   "tree": true,
   "selection": true,
-  "editBtn": true,
+  "editBtn": false,
   "viewBtn": false,
-  "delBtn": true,
+  "delBtn": false,
   "menuWidth": 220,
   "column": [
     {

+ 32 - 26
src/views/workManagement/main-items/detailsPage.vue

@@ -13,7 +13,7 @@
     <div style="margin-top: 60px">
       <containerTitle title="基础信息"></containerTitle>
       <basic-container>
-        <el-form :model="form" ref="form" label-width="130px">
+        <el-form :model="form" ref="form" label-width="100px" class="demo-ruleForm">
           <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">
@@ -40,42 +40,34 @@
           @row-save="rowSave"
           @size-change="sizeChange"
           @current-change="currentChange"
-          @selection-change="selectionChange"
           @search-change="searchChange"
           @refresh-change="refreshChange"
           @on-load="getList"
           @saveColumn="saveColumn"
         >
           <template slot="menuLeft">
-            <el-button type="success"
+            <el-button type="primary"
                        size="small"
                        icon="el-icon-plus"
-                       plain
                        @click="serviceDialog = true">新增明细
             </el-button>
-            <el-button type="success"
+            <el-button type="primary"
                        size="small"
                        icon="el-icon-plus"
-                       plain
                        @click="">新 单
             </el-button>
             <el-button type="info"
                        size="small"
-                       plain
                        @click="">请 核
             </el-button>
           </template>
           <template slot="menuRight">
-            <el-button type="primary"
-                       size="small"
-                       icon="el-icon-arrow-right"
-                       plain
-                       @click="">导 出
-            </el-button>
-            <el-button type="primary"
-                       size="small"
-                       plain
-                       @click="">打 印
+            <el-button
+              icon="el-icon-printer"
+              size="small"
+              type="primary"
+              @click.stop="openReport()"
+            >报表
             </el-button>
           </template>
           <template slot-scope="{row,index}"  slot="menu">
@@ -139,7 +131,7 @@
         </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 type="primary" @click="serviceConfirm()" :disabled="this.serviceSelectList.length == 0">导 入</el-button>
          <el-button @click="serviceDialog = false">取 消</el-button>
         </span>
     </el-dialog>
@@ -187,6 +179,7 @@
 
 <script>
   import option from "./configuration/detailsPage.json";
+  import { projectDetail } from "@/api/workManagement/mainProject";
   //上传文件json
   import upLoadOption from "../../exportTrade/purchaseContract/config/uploadList.json"
   //服务列表接口
@@ -238,7 +231,7 @@
               rules: [
                 {
                   required: true,
-                  message: '请输入系统编号',
+                  message: ' ',
                   trigger: 'blur'
                 }
               ]
@@ -248,7 +241,7 @@
               rules: [
                 {
                   required: true,
-                  message: '请输入项目编码',
+                  message: ' ',
                   trigger: 'blur'
                 }
               ]
@@ -258,7 +251,7 @@
               rules: [
                 {
                   required: true,
-                  message: '请输入项目名称',
+                  message: ' ',
                   trigger: 'blur'
                 }
               ]
@@ -271,7 +264,7 @@
               rules: [
                 {
                   pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,
-                  message: '请输入数字或小数,且小数位不超过两位',
+                  message: ' ',
                   trigger: 'blur'
                 }
               ]
@@ -282,7 +275,7 @@
               rules: [
                 {
                   pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,
-                  message: '请输入数字或小数,且小数位不超过两位',
+                  message: ' ',
                   trigger: 'blur'
                 }
               ]
@@ -293,7 +286,7 @@
               rules: [
                 {
                   pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,
-                  message: '请输入数字或小数,且小数位不超过两位',
+                  message: ' ',
                   trigger: 'blur'
                 }
               ]
@@ -305,7 +298,7 @@
               rules: [
                 {
                   pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,
-                  message: '请输入数字或小数,且小数位不超过两位',
+                  message: ' ',
                   trigger: 'blur'
                 }
               ]
@@ -440,7 +433,16 @@
         },
       };
     },
+    created() {
+      if(this.$route.query.id){
+        projectDetail(this.$route.query.id).then(res =>{
+          this.form = res.data.data;
+          // this.data = res.data.data.itemList;
+        })
+      }
+    },
     mounted() {
+
     },
     methods: {
       //删除列表后面的删除按钮触发触发(row, index, done)
@@ -609,7 +611,8 @@
       //确定
       userConfirm(){
          if(this.userSelection){
-           this.optionFrom[this.detailsSelect].userId = this.userSelection[0].userId;
+           this.data[this.detailsSelect].userId = this.userSelection[0].realName;
+           this.userDialog = !this.userDialog
          }
       }
     },
@@ -643,4 +646,7 @@
     right: 36px;
     top: 115px;
   }
+  ::v-deep .el-form-item {
+    margin-bottom: 0;
+  }
 </style>

+ 67 - 37
src/views/workManagement/main-items/list.vue

@@ -18,35 +18,59 @@
       @saveColumn="saveColumn"
     >
       <template slot="menuLeft">
-        <el-button type="primary" size="small" icon="el-icon-arrow-right" plain
-          >导 出
-        </el-button>
-        <el-button type="success"
+        <el-button type="primary"
                    size="small"
                    icon="el-icon-plus"
-                   plain
                    @click="addMainItems">新 单
         </el-button>
+        <el-button icon="el-icon-printer"
+                   size="small"
+                   type="primary"
+                   @click.stop="openReport()"
+          >报 表
+        </el-button>
       </template>
       <template slot-scope="scope" slot="menu">
         <el-button
+          type="text"
+          icon="el-icon-edit"
+          size="small"
+          @click.stop="editOpen(scope.row, scope.index)"
+        >编辑
+        </el-button>
+        <el-button
           icon="el-icon-check"
           size="small"
           type="text"
           @click.stop="beforeOpenPage(scope.row, scope.index)"
-          >详 情</el-button
-        >
+        >详 情
+        </el-button>
+        <el-button
+          type="text"
+          icon="el-icon-delete"
+          size="small"
+          @click.stop="rowDel(scope.row, scope.index)"
+        >删除
+        </el-button>
       </template>
+      <report-dialog
+        :switchDialog="switchDialog"
+        @onClose="onClose()"
+      ></report-dialog>
     </avue-crud>
   </basic-container>
 </template>
 
 <script>
   import option from "./configuration/mainList.json";
+  import { getDictionary } from "@/api/system/dictbiz";
+  import { getList,deleteMain } from "@/api/workManagement/mainProject";
+  import reportDialog from "@/components/report-dialog/main";
 
 export default {
   data() {
     return {
+      switchDialog:false,
       loading: false,
       data: [],
       optionTable: option,
@@ -57,34 +81,38 @@ export default {
       }
     };
   },
+  created() {
+    let  params = {code:"payment_term"}
+    getDictionary(params).then(res =>{
+      console.log(res.data.data)
+    })
+    // if (parseInt(this.option.column.length / 4) !== this.option.column.length / 4){
+    //   this.option.searchMenuSpan = 6;
+    //   this.option.searchMenuPosition = "center";
+    // }
+  },
   mounted() {
-    option.height = window.innerHeight - 350 ;
+    option.height = window.innerHeight - 380 ;
+  },
+  components: {
+    reportDialog
   },
   methods: {
-    getList() {
+    //打印
+    openReport() {
+      this.switchDialog =! this.switchDialog;
+    },
+    //关闭打印
+    onClose(val) {
+      this.switchDialog = val;
+    },
+    getList(page,params={}) {
       this.loading = true;
-      setTimeout(() => {
-        this.loading = false;
-        this.data = [
-          {
-            prop1: "TUBAO",
-            prop2: "途宝注册",
-            prop3: "途宝",
-            prop4: "2100",
-            prop5: "1500",
-            prop6: "李俊平",
-            prop7: "XM0001",
-            prop8: "暂存",
-            prop9: "效率高",
-            prop10: "LOLO",
-            prop11: "2021-1-1",
-            prop12: "LOLO",
-            prop13: "2021-1-1",
-            prop14: "15199999999"
-          }
-        ];
-        this.page.total = 1;
-      }, 1000);
+      getList(page.currentPage, page.pageSize,params).then(res =>{
+        this.data = res.data.data.records
+        this.page.total = res.data.data.total
+        this.loading = false
+      })
     },
     //新单打开
     addMainItems(){
@@ -94,10 +122,10 @@ export default {
       });
     },
     //编辑打开
-    beforeOpen(row, index){
+    editOpen(row, index){
       this.$router.push({
         path: "/mainItems_detailsPage",
-        query: {id: JSON.stringify(row.prop1)},
+        query: {id: JSON.stringify(row.id)},
       });
     },
     searchChange(params, done) {
@@ -123,10 +151,12 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        this.$message({
-          type: "success",
-          message: "操作成功!"
-        });
+        deleteMain(row.id).then(res =>{
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+        })
         // 数据回调进行刷新
         done(row);
       });

+ 1 - 1
src/views/workManagement/receipt/configuration/statisticalList.json

@@ -7,7 +7,7 @@
   "lazy": true,
   "tip": false,
   "searchShow": true,
-  "searchMenuSpan": 12,
+  "searchMenuPosition": "right",
   "tree": true,
   "selection": true,
   "viewBtn": true,

+ 8 - 0
src/views/workManagement/receipt/statisticalList.vue

@@ -40,7 +40,15 @@
       }
     },
     created() {
+      console.log(parseInt(this.option.column.length / 4),111111111)
+      if (parseInt(this.option.column.length / 4) !== this.option.column.length / 4){
+        console.log(123)
+        this.option.searchMenuSpan = 6;
+        this.option.searchMenuPosition = "center";
+      }else {
 
+        this.option.searchMenuPosition = "right";
+      }
     },
     mounted() {
       option.height = window.innerHeight - 340 ;

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

@@ -6,7 +6,7 @@
   "lazy": true,
   "tip": false,
   "searchShow": true,
-  "searchMenuSpan": 12,
+  "searchMenuPosition": "right",
   "tree": true,
   "selection": true,
   "viewBtn": false,

+ 1 - 1
src/views/workManagement/service-items/configuration/typeOption.json

@@ -7,7 +7,7 @@
   "tip": false,
   "simplePage": true,
   "searchShow": true,
-  "searchMenuSpan": 6,
+  "searchMenuPosition": "right",
   "tree": true,
   "selection": true,
   "viewBtn": true,

+ 29 - 6
src/views/workManagement/service-items/project.vue

@@ -37,13 +37,18 @@
           @tree-load="treeLoad"
         >
           <template slot="menuLeft">
-            <el-button type="primary"
-                       size="small"
-                       icon="el-icon-upload2"
-                       plain
-                       @click="">导 出
+            <el-button
+              icon="el-icon-printer"
+              size="small"
+              type="primary"
+              @click.stop="openReport()"
+            >报 表
             </el-button>
           </template>
+          <report-dialog
+            :switchDialog="switchDialog"
+            @onClose="onClose()"
+          ></report-dialog>
         </avue-crud>
       </basic-container>
     </el-col>
@@ -53,10 +58,11 @@
 <script>
   import option from "./configuration/projectOption.json";
   import {getServiceProjectList, remove, submit,detail, getServiceTypeTree,getDeptTree,getDicData} from "@/api/workManagement/serviceProject";
-
+  import reportDialog from "@/components/report-dialog/main";
 export default {
   data() {
     return {
+      switchDialog:false,//报表
       loading: true,
       data: [],
       tableOption: option,
@@ -98,6 +104,15 @@ export default {
       }
     };
   },
+  created() {
+    if (parseInt(this.option.column.length / 4) !== this.option.column.length / 4){
+      this.option.searchMenuSpan = 6;
+      this.option.searchMenuPosition = "center";
+    }
+  },
+  components: {
+    reportDialog
+  },
   mounted() {
     option.height = window.innerHeight - 350 ;
     //查询服务类别字典项
@@ -106,6 +121,14 @@ export default {
     });
   },
   methods: {
+    //打印
+    openReport() {
+      this.switchDialog =! this.switchDialog;
+    },
+    //关闭打印
+    onClose(val) {
+      this.switchDialog = val;
+    },
     getList(page, params = {}) {
       this.loading = true
       getServiceProjectList(page.currentPage, page.pageSize, params, this.treeDeptId).then(res => {

+ 5 - 2
src/views/workManagement/service-items/type.vue

@@ -53,10 +53,13 @@
       }
     },
     created() {
-
+      if (parseInt(this.option.column.length / 4) !== this.option.column.length / 4){
+        this.option.searchMenuSpan = 6;
+        this.option.searchMenuPosition = "center";
+      }
     },
     mounted() {
-      option.height = window.innerHeight - 350 ;
+      option.height = window.innerHeight - 310 ;
     },
     methods: {
       onLoad(page, params = {}) {

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

@@ -6,7 +6,7 @@
   "lazy": true,
   "tip": false,
   "searchShow": true,
-  "searchMenuSpan": 6,
+  "searchMenuPosition": "right",
   "tree": true,
   "selection": true,
   "addBtn": false,

+ 4 - 1
src/views/workManagement/task/index.vue

@@ -62,7 +62,10 @@
       }
     },
     created() {
-
+      if (parseInt(this.option.column.length / 4) !== this.option.column.length / 4){
+        this.option.searchMenuSpan = 6;
+        this.option.searchMenuPosition = "center";
+      }
     },
     mounted() {
       option.height = window.innerHeight - 350 ;