Browse Source

修改bug

QuKatie 3 years ago
parent
commit
fd93cd593a

+ 14 - 0
src/api/base/region.js

@@ -51,3 +51,17 @@ export const submit = (row) => {
   })
 }
 
+export const getLatLng = (query) => {
+  return request({
+    url: '/api/blade-system/region/getAddressMessage',
+    method: 'get',
+    params:query
+  })
+}
+export const getAllLatLng = (query) => {
+  return request({
+    url: '/api/blade-system/region/getAddress',
+    method: 'get',
+    params:query
+  })
+}

+ 165 - 0
src/components/goods-dialog/configuration/mainList.json

@@ -0,0 +1,165 @@
+{
+  "border": true,
+  "searchMenuSpan": 16,
+  "searchIcon": true,
+  "searchIndex": 2,
+  "index": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "addBtn": false,
+  "menu": false,
+  "align": "center",
+  "menuWidth": "180",
+  "selection": true,
+  "tip": false,
+  "column": [{
+      "label": "商品编号",
+      "prop": "code",
+      "search": true,
+      "searchSpan": 8,
+      "index": 1,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "商品类别",
+      "prop": "goodsTypeName",
+      "search": true,
+      "searchSpan": 8,
+      "index": 2,
+      "width": 100,
+      "type": "select",
+      "filterable": true,
+      "dicData": [],
+      "props": {
+        "value": "cname",
+        "label": "cname"
+      },
+      "overHidden": true
+    },
+    {
+      "label": "商品名称",
+      "search": true,
+      "searchSpan": 8,
+      "prop": "cname",
+      "index": 3,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "英文名称",
+      "search": true,
+      "searchSpan": 8,
+      "prop": "ename",
+      "index": 4,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "最新价格",
+      "prop": "price",
+      "index": 5,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "采购价格",
+      "prop": "purchaseAmount",
+      "index": 6,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "供应商",
+      "prop": "corpCode",
+      "index": 7,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "税率",
+      "prop": "taxRate",
+      "index": 8,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "币别",
+      "prop": "currency",
+      "index": 9,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "推荐理由",
+      "prop": "referrerReason",
+      "index": 10,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "有效截止日期",
+      "prop": "endTime",
+      "index": 11,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "历史价格1",
+      "prop": "priceOne",
+      "index": 12,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "历史日期1",
+      "prop": "priceOneTime",
+      "index": 13,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "历史价格2",
+      "prop": "priceTwo",
+      "index": 14,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "历史日期2",
+      "prop": "priceTwoTime",
+      "index": 15,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "历史价格3",
+      "prop": "priceThree",
+      "index": 16,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "历史日期3",
+      "prop": "priceThreeTime",
+      "index": 17,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "英文描述",
+      "prop": "cnameDescription",
+      "index": 18,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "备注",
+      "prop": "remarks",
+      "index": 19,
+      "width": 100,
+      "overHidden": true
+    }
+  ]
+}

+ 215 - 0
src/components/goods-dialog/main.vue

@@ -0,0 +1,215 @@
+<template>
+  <div>
+    <el-dialog
+      title="出口价格库"
+      class="el-dialogDeep"
+      :visible.sync="visible"
+      top="5vh"
+      width="80%"
+      append-to-body
+      @closed="closed"
+      :close-on-click-modal="false"
+      v-dialog-drag
+    >
+      <span>
+        <el-row>
+          <el-col :span="4">
+            <avue-tree
+              :option="treeOption"
+              @node-click="nodeClick"
+              style="height:74vh"
+            />
+          </el-col>
+          <el-col :span="20">
+            <avue-crud
+              ref="crud"
+              :data="data"
+              :option="tableOption"
+              :page.sync="page"
+              :search.sync="search"
+              @search-change="searchChange"
+              @current-change="currentChange"
+              @size-change="sizeChange"
+              @refresh-change="refreshChange"
+              @on-load="getList"
+              @saveColumn="saveColumn"
+              @selection-change="selectionChange"
+              :cell-style="cellStyle"
+              :table-loading="loading"
+            >
+              <template slot="cnameSearch">
+                <goods-select
+                  v-model="search.cname"
+                  :configuration="goodsConfiguration"
+                />
+              </template>
+            </avue-crud>
+          </el-col>
+        </el-row>
+      </span>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="visible = false">取 消</el-button>
+        <el-button
+          type="primary"
+          @click="importData"
+          :disabled="selectionList.length == 0"
+          >导 入</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import option from "./configuration/mainList.json";
+import {
+  getPricebank,
+  getGoodstype,
+  getDeptLazyTree
+} from "@/api/basicData/customerInquiry";
+import { dateFormat } from "@/util/date";
+import _ from "lodash";
+export default {
+  data() {
+    return {
+      treeForm: {},
+      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"
+        }
+      },
+      visible: false,
+      loading: true,
+      data: [],
+      search: {},
+      tableOption: option,
+      height: window.innerHeight - 500,
+      page: {
+        currentPage: 1,
+        total: 0,
+        pageSize: 10
+      },
+      selectionList: [],
+      goodsConfiguration: {
+        multipleChoices: false,
+        multiple: false,
+        collapseTags: false,
+        placeholder: "请点击右边按钮选择",
+        dicData: [],
+        clearable: true
+      },
+      partType: false,
+      partreData: false
+    };
+  },
+  props: {},
+  filters: {},
+  created() {
+    getGoodstype(1, 500).then(res => {
+      this.findObject(this.tableOption.column, "goodsTypeName").dicData =
+        res.data.data.records;
+      // this.treeData = res.data.data.records;
+    });
+    if (localStorage.getItem("roleName") == "贸易") {
+      this.findObject(this.tableOption.column, "taxRate").hide = true;
+      this.findObject(this.tableOption.column, "taxRate").showColumn = false;
+      this.findObject(this.tableOption.column, "price").hide = true;
+      this.findObject(this.tableOption.column, "price").showColumn = false;
+    }
+  },
+  methods: {
+    init(status, partreData) {
+      this.partType = status;
+      this.partreData = partreData;
+      this.visible = true;
+      this.getList(this.page, this.search);
+    },
+    cellStyle() {
+      return "padding:0;height:40px;";
+    },
+    nodeClick(data) {
+      console.log(data)
+      this.search.goodTypeId = data.value;
+      this.getList(this.page, this.search);
+    },
+    importData() {
+      if (this.partreData) {
+        if (this.selectionList.length != 1) {
+          return this.$message.error("重新选择的时候只能选择一条数据");
+        }
+      }
+      this.visible = false;
+      if (this.partType) {
+        this.$emit("librayToPart", this.selectionList, this.partreData);
+      } else {
+        this.$emit("importLibray", this.selectionList);
+      }
+    },
+    currentChange(val) {
+      this.page.currentPage = val;
+    },
+    sizeChange(val) {
+      this.page.currentPage = 1;
+      this.page.pageSize = val;
+    },
+    //点击搜索按钮触发
+    searchChange(params, done) {
+      this.search = this.deepClone(params);
+      this.getList(this.page, params);
+      done();
+    },
+    refreshChange(){
+      this.getList(this.page,this.search);
+    },
+    getList(page, params) {
+      let data = {
+        ...params,
+        billType: "CG",
+        statusTime: dateFormat(new Date(), "yyyy-MM-dd")
+      };
+      let obj = Object.assign(data, this.search);
+      this.loading = true;
+      getPricebank(page.currentPage, page.pageSize, obj)
+        .then(res => {
+          this.data = res.data.data.records ? res.data.data.records : [];
+          this.page.total = res.data.data.total;
+          if (this.page.total > 0) {
+            this.tableOption.height = window.innerHeight - 350;
+          }
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    selectionChange(list) {
+      this.selectionList = list;
+    },
+    closed() {
+      this.partreData = null;
+      this.$refs.crud.toggleSelection();
+    }
+  }
+};
+</script>
+
+<style scoped lang="scss"></style>

+ 4 - 0
src/util/date.js

@@ -106,3 +106,7 @@ export function getCurrentDate(type = 'dateTime') {
     return dateFormat(date, 'yyyy-MM-dd hh:mm:ss')
   }
 }
+export function getYearDate(){
+  const date = new Date();
+  return date.getFullYear()
+}

+ 488 - 333
src/views/base/region.vue

@@ -1,10 +1,14 @@
 <template>
-  <el-row>
+  <el-row v-loading="loading">
     <el-col :span="9">
       <div class="box">
         <el-scrollbar>
           <basic-container>
-            <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick"/>
+            <avue-tree
+              :option="treeOption"
+              :data="treeData"
+              @node-click="nodeClick"
+            />
           </basic-container>
         </el-scrollbar>
       </div>
@@ -12,27 +16,92 @@
     <el-col :span="15">
       <basic-container>
         <el-button-group>
-          <el-button v-if="permission.region_add" type="primary" size="small" icon="el-icon-circle-plus-outline" @click="addChildren">新增下级</el-button>
-          <el-button v-if="permission.region_delete" type="primary" size="small" icon="el-icon-delete" @click="handleDelete">删除</el-button>
-          <el-button v-if="permission.region_import" type="primary" size="small" icon="el-icon-upload2" @click="handleImport">导入</el-button>
-          <el-button v-if="permission.region_export" type="primary" size="small" icon="el-icon-download" @click="handleExport">导出</el-button>
-          <el-button v-if="permission.region_debug" type="primary" size="small" icon="el-icon-video-play" @click="handleDebug">调试</el-button>
+          <el-button
+            v-if="permission.region_add"
+            type="primary"
+            size="small"
+            icon="el-icon-circle-plus-outline"
+            @click="addChildren"
+            >新增下级</el-button
+          >
+          <el-button
+            v-if="permission.region_delete"
+            type="primary"
+            size="small"
+            icon="el-icon-delete"
+            @click="handleDelete"
+            >删除</el-button
+          >
+          <el-button
+            v-if="permission.region_import"
+            type="primary"
+            size="small"
+            icon="el-icon-upload2"
+            @click="handleImport"
+            >导入</el-button
+          >
+          <el-button
+            v-if="permission.region_export"
+            type="primary"
+            size="small"
+            icon="el-icon-download"
+            @click="handleExport"
+            >导出</el-button
+          >
+          <el-button
+            v-if="permission.region_debug"
+            type="primary"
+            size="small"
+            icon="el-icon-video-play"
+            @click="handleDebug"
+            >调试</el-button
+          >
+          <el-button
+            v-if="permission.region_debug"
+            type="primary"
+            size="small"
+            icon="el-icon-circle-plus-outline"
+            @click="getAlllatlng"
+            >批量获取经纬度</el-button
+          >
+          <el-button
+            v-if="permission.region_debug"
+            type="primary"
+            size="small"
+            icon="el-icon-circle-plus-outline"
+            @click="getLatLng"
+            >获取经纬度</el-button
+          >
         </el-button-group>
       </basic-container>
       <basic-container>
-        <avue-form ref="form" :option="regionOption" v-model="regionForm" @submit="handleSubmit">
+        <avue-form
+          ref="form"
+          :option="regionOption"
+          v-model="regionForm"
+          @submit="handleSubmit"
+        >
           <template slot="code" slot-scope="{}">
-            <el-input placeholder="请输入 区划子编号" v-model="regionForm.subCode">
-              <template slot="prepend">{{regionForm.parentCode}}</template>
+            <el-input
+              placeholder="请输入 区划子编号"
+              v-model="regionForm.subCode"
+            >
+              <template slot="prepend">{{ regionForm.parentCode }}</template>
             </el-input>
           </template>
         </avue-form>
-        <el-dialog title="行政区划数据导入"
-                   append-to-body
-                   :visible.sync="excelBox"
-                   :close-on-click-modal="false"
-                   width="555px">
-          <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
+        <el-dialog
+          title="行政区划数据导入"
+          append-to-body
+          :visible.sync="excelBox"
+          :close-on-click-modal="false"
+          width="555px"
+        >
+          <avue-form
+            :option="excelOption"
+            v-model="excelForm"
+            :upload-after="uploadAfter"
+          >
             <template slot="excelTemplate">
               <el-button type="primary" @click="handleTemplate">
                 点击下载<i class="el-icon-download el-icon--right"></i>
@@ -40,12 +109,14 @@
             </template>
           </avue-form>
         </el-dialog>
-        <el-dialog title="行政区划数据调试"
-                   append-to-body
-                   :visible.sync="debugBox"
-                   :close-on-click-modal="false"
-                   width="350px">
-          <avue-form :option="debugOption" v-model="debugForm"/>
+        <el-dialog
+          title="行政区划数据调试"
+          append-to-body
+          :visible.sync="debugBox"
+          :close-on-click-modal="false"
+          width="350px"
+        >
+          <avue-form :option="debugOption" v-model="debugForm" />
         </el-dialog>
       </basic-container>
     </el-col>
@@ -53,367 +124,451 @@
 </template>
 
 <script>
-  import {getLazyTree, getDetail, submit, remove} from "@/api/base/region";
-  import {mapGetters} from "vuex";
-  import {validatenull} from "@/util/validate";
-  import {getToken} from "@/util/auth";
+import {
+  getLazyTree,
+  getDetail,
+  submit,
+  remove,
+  getLatLng,
+  getAllLatLng
+} from "@/api/base/region";
+import { mapGetters } from "vuex";
+import { validatenull } from "@/util/validate";
+import { getToken } from "@/util/auth";
 
-  export default {
-    data() {
-      return {
-        topCode: '00',
-        treeCode: '',
-        treeParentCode: '',
-        treeData: [],
-        treeOption: {
-          nodeKey: 'id',
-          lazy: true,
-          treeLoad: function (node, resolve) {
-            const parentCode = (node.level === 0) ? "00" : node.data.id;
-            getLazyTree(parentCode).then(res => {
-              resolve(res.data.data.map(item => {
+export default {
+  data() {
+    return {
+      loading: false,
+      topCode: "00",
+      treeCode: "",
+      treeParentCode: "",
+      treeData: [],
+      treeOption: {
+        nodeKey: "id",
+        lazy: true,
+        treeLoad: function(node, resolve) {
+          const parentCode = node.level === 0 ? "00" : node.data.id;
+          getLazyTree(parentCode).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'
-          }
+                };
+              })
+            );
+          });
         },
-        regionForm: {},
-        regionOption: {
-          labelWidth: 100,
-          column: [
-            {
-              label: "父区划编号",
-              prop: "parentCode",
-              span: 24,
-              disabled: true,
-              rules: [{
+        addBtn: false,
+        menu: false,
+        size: "small",
+        props: {
+          labelText: "标题",
+          label: "title",
+          value: "value",
+          children: "children"
+        }
+      },
+      regionForm: {},
+      regionOption: {
+        labelWidth: 100,
+        column: [
+          {
+            label: "父区划编号",
+            prop: "parentCode",
+            span: 24,
+            disabled: true,
+            rules: [
+              {
                 required: true,
                 message: "请输入父区划编号",
                 trigger: "blur"
-              }]
-            },
-            {
-              label: "父区划名称",
-              prop: "parentName",
-              span: 24,
-              disabled: true,
-            },
-            {
-              label: "区划编号",
-              prop: "code",
-              formslot: true,
-              span: 24,
-              rules: [{
+              }
+            ]
+          },
+          {
+            label: "父区划名称",
+            prop: "parentName",
+            span: 24,
+            disabled: true
+          },
+          {
+            label: "区划编号",
+            prop: "code",
+            formslot: true,
+            span: 24,
+            rules: [
+              {
                 required: true,
                 message: "请输入区划编号",
                 trigger: "blur"
-              }]
-            },
-            {
-              label: "区划子编号",
-              prop: "subCode",
-              display: false,
-            },
-            {
-              label: "区划名称",
-              prop: "name",
-              span: 24,
-              rules: [{
+              }
+            ]
+          },
+          {
+            label: "区划子编号",
+            prop: "subCode",
+            display: false
+          },
+          {
+            label: "区划名称",
+            prop: "name",
+            span: 24,
+            rules: [
+              {
                 required: true,
                 message: "请输入区划名称",
                 trigger: "blur"
-              }]
+              }
+            ]
+          },
+          {
+            label: "区划等级",
+            prop: "regionLevel",
+            type: "radio",
+            dicUrl: "/api/blade-system/dict/dictionary?code=region",
+            props: {
+              label: "dictValue",
+              value: "dictKey"
             },
-            {
-              label: "区划等级",
-              prop: "regionLevel",
-              type: "radio",
-              dicUrl: "/api/blade-system/dict/dictionary?code=region",
-              props: {
-                label: "dictValue",
-                value: "dictKey"
-              },
-              dataType: "number",
-              span: 24,
-              rules: [{
+            dataType: "number",
+            span: 24,
+            rules: [
+              {
                 required: true,
                 message: "请选择区划等级",
                 trigger: "blur"
-              }]
-            },
-            {
-              label: "区划排序",
-              prop: "sort",
-              type: "number",
-              span: 24,
-              rules: [{
+              }
+            ]
+          },
+          {
+            label: "区划排序",
+            prop: "sort",
+            type: "number",
+            span: 24,
+            rules: [
+              {
                 required: true,
                 message: "请输入区划排序",
                 trigger: "blur"
-              }]
-            },
-            {
-              label: "区划备注",
-              prop: "remark",
-              type: "textarea",
-              minRows: 6,
-              span: 24,
+              }
+            ]
+          },
+          {
+            label: "经度",
+            prop: "lng",
+            disabled: true,
+            span: 24
+          },
+          {
+            label: "纬度",
+            prop: "lat",
+            disabled: true,
+            span: 24
+          },
+          {
+            label: "区划备注",
+            prop: "remark",
+            type: "textarea",
+            minRows: 6,
+            span: 24
+          }
+        ]
+      },
+      excelBox: false,
+      excelForm: {},
+      excelOption: {
+        submitBtn: false,
+        emptyBtn: false,
+        column: [
+          {
+            label: "模板上传",
+            prop: "excelFile",
+            type: "upload",
+            drag: true,
+            loadText: "模板上传中,请稍等",
+            span: 24,
+            propsHttp: {
+              res: "data"
             },
-          ]
-        },
-        excelBox: false,
-        excelForm: {},
-        excelOption: {
-          submitBtn: false,
-          emptyBtn: false,
-          column: [
-            {
-              label: '模板上传',
-              prop: 'excelFile',
-              type: 'upload',
-              drag: true,
-              loadText: '模板上传中,请稍等',
-              span: 24,
-              propsHttp: {
-                res: 'data'
+            tip: "请上传 .xls,.xlsx 标准格式文件",
+            action: "/api/blade-system/region/import-region"
+          },
+          {
+            label: "数据覆盖",
+            prop: "isCovered",
+            type: "switch",
+            align: "center",
+            width: 80,
+            dicData: [
+              {
+                label: "否",
+                value: 0
               },
-              tip: '请上传 .xls,.xlsx 标准格式文件',
-              action: "/api/blade-system/region/import-region"
-            },
-            {
-              label: "数据覆盖",
-              prop: "isCovered",
-              type: "switch",
-              align: "center",
-              width: 80,
-              dicData: [
-                {
-                  label: "否",
-                  value: 0
-                },
-                {
-                  label: "是",
-                  value: 1
-                }
-              ],
-              value: 0,
-              slot: true,
-              rules: [
-                {
-                  required: true,
-                  message: "请选择是否覆盖",
-                  trigger: "blur"
-                }
-              ]
+              {
+                label: "是",
+                value: 1
+              }
+            ],
+            value: 0,
+            slot: true,
+            rules: [
+              {
+                required: true,
+                message: "请选择是否覆盖",
+                trigger: "blur"
+              }
+            ]
+          },
+          {
+            label: "模板下载",
+            prop: "excelTemplate",
+            formslot: true,
+            span: 24
+          }
+        ]
+      },
+      debugBox: false,
+      debugForm: {},
+      debugOption: {
+        labelWidth: 50,
+        submitBtn: false,
+        emptyBtn: false,
+        column: [
+          {
+            label: "省份",
+            prop: "province",
+            type: "select",
+            props: {
+              label: "name",
+              value: "code"
             },
-            {
-              label: '模板下载',
-              prop: 'excelTemplate',
-              formslot: true,
-              span: 24,
-            }
-          ]
-        },
-        debugBox: false,
-        debugForm: {},
-        debugOption: {
-          labelWidth: 50,
-          submitBtn: false,
-          emptyBtn: false,
-          column: [
-            {
-              label: '省份',
-              prop: 'province',
-              type: 'select',
-              props: {
-                label: 'name',
-                value: 'code'
-              },
-              cascaderItem: ['city', 'district'],
-              dicUrl: '/api/blade-system/region/select',
-              span: 24,
+            cascaderItem: ["city", "district"],
+            dicUrl: "/api/blade-system/region/select",
+            span: 24
+          },
+          {
+            label: "地市",
+            prop: "city",
+            type: "select",
+            props: {
+              label: "name",
+              value: "code"
             },
-            {
-              label: '地市',
-              prop: 'city',
-              type: 'select',
-              props: {
-                label: 'name',
-                value: 'code'
-              },
-              dicFlag: false,
-              dicUrl: '/api/blade-system/region/select?code={{key}}',
-              span: 24,
+            dicFlag: false,
+            dicUrl: "/api/blade-system/region/select?code={{key}}",
+            span: 24
+          },
+          {
+            label: "区县",
+            prop: "district",
+            type: "select",
+            props: {
+              label: "name",
+              value: "code"
             },
-            {
-              label: '区县',
-              prop: 'district',
-              type: 'select',
-              props: {
-                label: 'name',
-                value: 'code'
-              },
-              dicFlag: false,
-              dicUrl: '/api/blade-system/region/select?code={{key}}',
-              span: 24,
-            }
-          ]
-        }
-      };
+            dicFlag: false,
+            dicUrl: "/api/blade-system/region/select?code={{key}}",
+            span: 24
+          }
+        ]
+      }
+    };
+  },
+  watch: {
+    "regionForm.subCode"() {
+      this.regionForm.code =
+        this.regionForm.parentCode + this.regionForm.subCode;
     },
-    watch: {
-      'regionForm.subCode'() {
-        this.regionForm.code = this.regionForm.parentCode + this.regionForm.subCode;
-      },
-      'excelForm.isCovered'() {
-        if (this.excelForm.isCovered !== '') {
-          const column = this.findObject(this.excelOption.column, "excelFile");
-          column.action = `/api/blade-system/region/import-region?isCovered=${this.excelForm.isCovered}`;
-        }
+    "excelForm.isCovered"() {
+      if (this.excelForm.isCovered !== "") {
+        const column = this.findObject(this.excelOption.column, "excelFile");
+        column.action = `/api/blade-system/region/import-region?isCovered=${this.excelForm.isCovered}`;
       }
+    }
+  },
+  computed: {
+    ...mapGetters(["permission"]),
+    permissionList() {
+      return {
+        addBtn: this.vaildData(this.permission.region_add, false),
+        viewBtn: this.vaildData(this.permission.region_view, false),
+        delBtn: this.vaildData(this.permission.region_delete, false),
+        editBtn: this.vaildData(this.permission.region_edit, false)
+      };
     },
-    computed: {
-      ...mapGetters(["permission"]),
-      permissionList() {
-        return {
-          addBtn: this.vaildData(this.permission.region_add, false),
-          viewBtn: this.vaildData(this.permission.region_view, false),
-          delBtn: this.vaildData(this.permission.region_delete, false),
-          editBtn: this.vaildData(this.permission.region_edit, false)
-        };
-      },
-      ids() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
+    ids() {
+      let ids = [];
+      this.selectionList.forEach(ele => {
+        ids.push(ele.id);
+      });
+      return ids.join(",");
+    }
+  },
+  methods: {
+    initTree() {
+      this.treeData = [];
+      getLazyTree(this.topCode).then(res => {
+        this.treeData = res.data.data.map(item => {
+          return {
+            ...item,
+            leaf: !item.hasChildren
+          };
         });
-        return ids.join(",");
+      });
+    },
+    nodeClick(data) {
+      const column = this.findObject(this.regionOption.column, "parentCode");
+      column.disabled = true;
+      this.treeCode = data.id;
+      this.treeParentCode = data.parentId;
+      getDetail(this.treeCode).then(res => {
+        this.regionForm = res.data.data;
+        this.regionForm.subCode = this.regionForm.code.replace(
+          this.regionForm.parentCode,
+          ""
+        );
+      });
+    },
+    addChildren() {
+      if (
+        validatenull(this.regionForm.code) ||
+        validatenull(this.regionForm.name)
+      ) {
+        this.$message.warning("请先选择一项区划");
+        return;
       }
+      this.regionForm.parentCode = this.regionForm.code;
+      this.regionForm.parentName = this.regionForm.name;
+      this.regionForm.code = "";
+      this.regionForm.subCode = "";
+      this.regionForm.name = "";
+      this.regionForm.regionLevel =
+        this.regionForm.regionLevel === 5 ? 5 : this.regionForm.regionLevel + 1;
     },
-    methods: {
-      initTree() {
-        this.treeData = [];
-        getLazyTree(this.topCode).then(res => {
-          this.treeData = res.data.data.map(item => {
-            return {
-              ...item,
-              leaf: !item.hasChildren
-            }
-          })
-        });
-      },
-      nodeClick(data) {
-        const column = this.findObject(this.regionOption.column, "parentCode");
-        column.disabled = true;
-        this.treeCode = data.id;
-        this.treeParentCode = data.parentId;
-        getDetail(this.treeCode).then(res => {
-          this.regionForm = res.data.data;
-          this.regionForm.subCode = this.regionForm.code.replace(this.regionForm.parentCode, '');
+    getAlllatlng() {
+      this.loading = true;
+      getAllLatLng()
+        .then(res => {
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
         })
-      },
-      addChildren() {
-        if (validatenull(this.regionForm.code) || validatenull(this.regionForm.name)) {
-          this.$message.warning("请先选择一项区划");
-          return;
-        }
-        this.regionForm.parentCode = this.regionForm.code;
-        this.regionForm.parentName = this.regionForm.name;
-        this.regionForm.code = '';
-        this.regionForm.subCode = '';
-        this.regionForm.name = '';
-        this.regionForm.regionLevel = (this.regionForm.regionLevel === 5) ? 5 : this.regionForm.regionLevel + 1;
-      },
-      handleSubmit(form, done, loading) {
-        const parentCode = form.parentCode === this.topCode ? '' : form.parentCode;
-        form.code = parentCode + form.subCode;
-        submit(form).then(() => {
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    getLatLng() {
+      if (!this.regionForm.id) {
+        return this.$message.error("请保存数据");
+      }
+      const address =
+        this.regionForm.provinceName +
+        this.regionForm.cityName +
+        this.regionForm.districtName +
+        this.regionForm.townName +
+        this.regionForm.villageName;
+      getLatLng({ address: address }).then(res => {
+        this.regionForm.lat = res.data.data.lat;
+        this.regionForm.lng = res.data.data.lng;
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+      });
+    },
+    handleSubmit(form, done, loading) {
+      const parentCode =
+        form.parentCode === this.topCode ? "" : form.parentCode;
+      form.code = parentCode + form.subCode;
+      submit(form).then(
+        () => {
           this.$message({
             type: "success",
             message: "操作成功!"
           });
           this.initTree();
-          this.regionForm.subCode = '';
+          this.regionForm.subCode = "";
           this.$refs.form.resetForm();
           done();
-        }, error => {
+        },
+        error => {
           loading();
           window.console.log(error);
-        });
-      },
-      handleDelete() {
-        if (validatenull(this.regionForm.code)) {
-          this.$message.warning("请先选择一项区划");
-          return;
         }
-        this.$confirm(`确定将 [${this.regionForm.name}] 数据删除?`, {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
+      );
+    },
+    handleDelete() {
+      if (validatenull(this.regionForm.code)) {
+        this.$message.warning("请先选择一项区划");
+        return;
+      }
+      this.$confirm(`确定将 [${this.regionForm.name}] 数据删除?`, {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return remove(this.treeCode);
         })
-          .then(() => {
-            return remove(this.treeCode);
-          })
-          .then(() => {
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.initTree();
-            this.regionForm.subCode = '';
-            this.$refs.form.resetForm();
+        .then(() => {
+          this.$message({
+            type: "success",
+            message: "操作成功!"
           });
-      },
-      uploadAfter(res, done, loading, column) {
-        window.console.log(column);
-        this.excelBox = false;
-        this.initTree();
-        done();
-      },
-      handleDebug() {
-        this.debugBox = true;
-      },
-      handleImport() {
-        this.excelBox = true;
-      },
-      handleExport() {
-        this.$confirm("是否导出行政区划数据?", "提示", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
-          window.open(`/api/blade-system/region/export-region?${this.website.tokenHeader}=${getToken()}`);
+          this.initTree();
+          this.regionForm.subCode = "";
+          this.$refs.form.resetForm();
         });
-      },
-      handleTemplate() {
-        window.open(`/api/blade-system/region/export-template?${this.website.tokenHeader}=${getToken()}`);
-      },
+    },
+    uploadAfter(res, done, loading, column) {
+      window.console.log(column);
+      this.excelBox = false;
+      this.initTree();
+      done();
+    },
+    handleDebug() {
+      this.debugBox = true;
+    },
+    handleImport() {
+      this.excelBox = true;
+    },
+    handleExport() {
+      this.$confirm("是否导出行政区划数据?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        window.open(
+          `/api/blade-system/region/export-region?${
+            this.website.tokenHeader
+          }=${getToken()}`
+        );
+      });
+    },
+    handleTemplate() {
+      window.open(
+        `/api/blade-system/region/export-template?${
+          this.website.tokenHeader
+        }=${getToken()}`
+      );
     }
-  };
+  }
+};
 </script>
 
 <style>
-  .box {
-    height: 800px;
-  }
+.box {
+  height: 800px;
+}
 
-  .el-scrollbar {
-    height: 100%;
-  }
+.el-scrollbar {
+  height: 100%;
+}
 
-  .box .el-scrollbar__wrap {
-    overflow: scroll;
-  }
+.box .el-scrollbar__wrap {
+  overflow: scroll;
+}
 </style>

+ 74 - 19
src/views/basicData/customerInformation/detailsPageEdit.vue

@@ -76,20 +76,21 @@
                   size="small"
                   style="width: 100%;"
                   :show-all-levels="false"
+                  @change="addressChange"
                 ></el-cascader>
-<!--                <avue-input-tree-->
-<!--                  v-else-if="item.prop === 'belongtoarea'"-->
-<!--                  leaf-only-->
-<!--                  multiple-->
-<!--                  tags-->
-<!--                  style="width: 100%;"-->
-<!--                  size="small"-->
-<!--                  :props="{ label: 'name', value: 'name' }"-->
-<!--                  v-model="form[item.prop]"-->
-<!--                  placeholder=" "-->
-<!--                  type="tree"-->
-<!--                  :dic="dicArea"-->
-<!--                ></avue-input-tree>-->
+                <!--                <avue-input-tree-->
+                <!--                  v-else-if="item.prop === 'belongtoarea'"-->
+                <!--                  leaf-only-->
+                <!--                  multiple-->
+                <!--                  tags-->
+                <!--                  style="width: 100%;"-->
+                <!--                  size="small"-->
+                <!--                  :props="{ label: 'name', value: 'name' }"-->
+                <!--                  v-model="form[item.prop]"-->
+                <!--                  placeholder=" "-->
+                <!--                  type="tree"-->
+                <!--                  :dic="dicArea"-->
+                <!--                ></avue-input-tree>-->
                 <el-select
                   v-else-if="item.prop === 'adminProfiles'"
                   size="small"
@@ -830,10 +831,11 @@ export default {
       // 包装要求
       packageOptions: [],
       props: {
-        value: 'name',
-        label: 'name',
-        multiple: true,
+        value: "name",
+        label: "name",
+        multiple: true
       },
+      addressLatLng: []
     };
   },
   props: {
@@ -877,9 +879,12 @@ export default {
         this.contactsData = this.form.corpsAttnList;
         this.bankOfDepositData = this.form.corpsBankList;
         this.advantageProjectData = this.form.corpsItems;
+        this.addressLatLng = JSON.parse(this.form.addressLatLng);
         this.addressData = this.form.corpsAddrList;
         if (this.form.belongtoarea) {
-          this.form.belongtoarea = this.form.belongtoarea.split(',').map(item => item.split('/'));
+          this.form.belongtoarea = this.form.belongtoarea
+            .split(",")
+            .map(item => item.split("/"));
         }
         delete this.form.corpsAttnList;
         delete this.form.corpsBankList;
@@ -908,6 +913,51 @@ export default {
         column.dicData = res.data.data;
       });
     },
+    addressChange() {
+      this.addressLatLng = [];
+      this.form.belongtoarea.forEach(e => {
+        if (e.length == 1) {
+          this.dicArea.forEach(item1 => {
+            if (item1.provinceName == e[0]) {
+              this.addressLatLng.push({
+                name: item1.provinceName,
+                value: this.addressLatLng.length + 1,
+                lng: item1.lng,
+                lat: item1.lat,
+                zoom: 1
+              });
+            }
+          });
+        } else if (e.length == 3) {
+          this.dicArea.forEach(item1 => {
+            if (item1.provinceName == e[0]) {
+              if (item1.children.length > 0) {
+                item1.children.forEach(item2 => {
+                  if (item2.cityName == e[1]) {
+                    if (item2.children.length > 0) {
+                      item2.children.forEach(item3 => {
+                        if (item3.districtName == e[2]) {
+                          this.addressLatLng.push({
+                            name:
+                              (item3.provinceName != item3.cityName
+                                ? item3.cityName
+                                : "") + item3.districtName,
+                            value: this.addressLatLng.length + 1,
+                            lng: item3.lng,
+                            lat: item3.lat,
+                            zoom: 1
+                          });
+                        }
+                      });
+                    }
+                  }
+                });
+              }
+            }
+          });
+        }
+      });
+    },
     //确认创建用户
     confirmSynchronizationTwo() {
       this.$refs["formDataTwo"].validate((valid, done) => {
@@ -1088,6 +1138,7 @@ export default {
           this.form.corpsBankList = this.bankOfDepositData;
           this.form.corpsItems = this.advantageProjectData;
           this.form.corpsAddrList = this.addressData;
+          this.form.addressLatLng = JSON.stringify(this.addressLatLng);
           if (typeof this.form.corpsTypeId == "object") {
             this.form.corpsTypeId = this.form.corpsTypeId.join(",");
           }
@@ -1095,7 +1146,9 @@ export default {
 
           if (this.form.belongtoarea) {
             // this.form.belongtoarea = this.form.belongtoarea.toString();
-            this.form.belongtoarea = this.form.belongtoarea.map(e => e.join('/')).join(',');
+            this.form.belongtoarea = this.form.belongtoarea
+              .map(e => e.join("/"))
+              .join(",");
           }
           if (this.form.adminProfiles) {
             this.form.adminProfiles = this.form.adminProfiles.join(",");
@@ -1121,7 +1174,9 @@ export default {
               }
               this.form = res.data.data;
               if (this.form.belongtoarea) {
-                this.form.belongtoarea = this.form.belongtoarea.split(',').map(item => item.split('/'));
+                this.form.belongtoarea = this.form.belongtoarea
+                  .split(",")
+                  .map(item => item.split("/"));
               }
               this.disabled = false;
             }

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

@@ -1113,6 +1113,9 @@ export default {
           }
         });
     },
+    refreshChange(){
+      this.onLoad(this.page)
+    },
     businesDateChange() {
       if (this.form.currency && this.form.businesDate) {
         this.getParities();

+ 3 - 0
src/views/exportTrade/invoice/detailsPage.vue

@@ -672,6 +672,9 @@ export default {
       }
       this.dialogVisible = false;
     },
+    refreshChange() {
+      this.onLoad(this.page);
+    },
     addRow() {
       this.data.push({ $cellEdit: true });
     },

+ 3 - 1
src/views/wel/components/sales-trend.vue

@@ -61,6 +61,7 @@
 </template>
 
 <script>
+import { getYearDate } from "@/util/date";
 import { salesTrend } from "@/api/wel";
 export default {
   name: "basicContainer",
@@ -70,12 +71,13 @@ export default {
   data() {
     return {
       loading: false,
-      annual: "2022",
+      annual:"",
       tradeType: null,
       moneyList: []
     };
   },
   created() {
+    this.annual=getYearDate().toString()
     this.getSysType();
   },
   mounted() {

+ 7 - 3
src/views/wel/home/tongjiSchool.vue

@@ -182,6 +182,7 @@
 </template>
 
 <script>
+import { getYearDate } from "@/util/date";
 import { salaryStatistics, salaryData, salaryDataChain } from "@/api/wel";
 import { mapGetters } from "vuex";
 import indexCard from "../components/card.vue";
@@ -200,9 +201,9 @@ export default {
       studentNumberList: [],
       activeNames: ["1", "2", "3", "5"],
       logActiveNames: ["24"],
-      annual: "2022",
-      annual2: "2022",
-      annual3: "2022",
+      annual: "",
+      annual2: "",
+      annual3: "",
       salaryType: "",
       salaryType2: "",
       salaryType3: "",
@@ -334,6 +335,9 @@ export default {
     };
   },
   created() {
+    this.annual = getYearDate().toString();
+    this.annual2 = getYearDate().toString();
+    this.annual3 = getYearDate().toString();
     this.isHeight.height = window.innerHeight - 165 + "px";
     this.getWorkDicts("month").then(res => {
       this.moonList = res.data.data;