qukaidi %!s(int64=2) %!d(string=hai) anos
pai
achega
eb069c8bd9

+ 39 - 20
src/components/crop-select/main.vue

@@ -3,29 +3,35 @@
     <div style="display:flex">
       <slot v-if="slot" name="slot"></slot>
       <span v-else style="width: 100%;">
-        <el-select v-if="gysType == 'CK'" size="small" v-model="value" placeholder="请选择" @input="$emit('balabala', value)"
-                   :disabled="disabled" filterable clearable style="width:100%" :multiple="multiple ? multiple : false"
-                   :collapse-tags="collapseTags ? collapseTags : false" @change="corpChange">
-        <el-option v-for="item in corpList" :key="item.id" :label="item.code" :value="item.id">
-        </el-option>
-      </el-select>
-        <el-select v-else size="small" v-model="value" placeholder="请选择" @input="$emit('balabala', value)"
-                 :disabled="disabled" filterable clearable style="width:100%" @clear="clear"
-                 :multiple="multiple ? multiple : false" :collapse-tags="collapseTags ? collapseTags : false"
-                 @change="corpChange">
-        <template v-if="zhKey">
-          <el-option v-for="item in corpList" :key="item.id" :label="label ? item[label] : item.cname"
-                     :value="item.cname">
-          </el-option>
-        </template>
-        <template v-else>
-          <el-option v-for="item in corpList" :key="item.id" :label="label ? item[label] : item.cname" :value="item.id">
+        <el-select v-if="gysType == 'CK'" size="small" v-model="value" placeholder="请选择"
+          @input="$emit('balabala', value)" :disabled="disabled" filterable clearable style="width:100%"
+          :multiple="multiple ? multiple : false" :collapse-tags="collapseTags ? collapseTags : false"
+          @change="corpChange">
+          <el-option v-for="item in corpList" :key="item.id" :label="item.code" :value="item.id">
           </el-option>
-        </template>
-      </el-select>
+        </el-select>
+        <el-select v-else size="small" v-model="value" placeholder="请选择" @input="$emit('balabala', value)"
+          :disabled="disabled" filterable clearable style="width:100%" @clear="clear"
+          :multiple="multiple ? multiple : false" :collapse-tags="collapseTags ? collapseTags : false"
+          @change="corpChange">
+          <template v-if="zhKey">
+            <el-option v-for="item in corpList" :key="item.id" :label="label ? item[label] : item.cname"
+              :value="item.cname">
+            </el-option>
+          </template>
+          <template v-else>
+            <el-option v-for="item in corpList" :key="item.id" :label="label ? item[label] : item.cname"
+              :value="item.id">
+            </el-option>
+          </template>
+        </el-select>
       </span>
       <el-button icon="el-icon-search" size="mini" v-if="label != 'shortName'" :disabled="disabled"
         @click="openDialog()"></el-button>
+      <el-tooltip effect="dark" content="获取最新客户资料" placement="top-start">
+        <el-button icon="el-icon-refresh" size="mini" v-if="label != 'shortName'" @click="refreshData"
+          style="margin-left:0px;"></el-button>
+      </el-tooltip>
     </div>
     <el-dialog :title="title" :visible.sync="corpVisible" width="80%" top="5vh" append-to-body @closed="closed"
       class="el-dialogDeep" :close-on-click-modal="false" v-dialog-drag>
@@ -121,7 +127,7 @@ export default {
     this.tableOption = await this.getColumnData(this.getColumnName(51), option);
     let userObj = JSON.parse(localStorage.getItem("saber-userInfo")).content;
     this.title = getCustomerName(this.corpType);
-    if (!this.slot){
+    if (!this.slot) {
       allCropList({
         corpType: getCustomerCode(this.corpType),
         adminProfiles: userObj.role_name != "admin" ? userObj.user_id : null,
@@ -137,6 +143,19 @@ export default {
     init() {
       this.openDialog();
     },
+    refreshData() {
+      if (!this.slot) {
+        let userObj = JSON.parse(localStorage.getItem("saber-userInfo")).content;
+        allCropList({
+          corpType: getCustomerCode(this.corpType),
+          adminProfiles: userObj.role_name != "admin" ? userObj.user_id : null,
+          corpsTypeName: this.treeType == "CK" ? "货代和物流" : null,
+          belongtocompany: this.belongtocompany
+        }).then(res => {
+          this.corpList = res.data.data;
+        });
+      }
+    },
     openDialog() {
       let _this = this;
       this.treeOption.treeLoad = function (node, resolve) {

+ 61 - 0
src/components/warehousKH/configuration/mainList.json

@@ -0,0 +1,61 @@
+{
+    "searchShow": true,
+    "searchMenuSpan": 8,
+    "lazy": true,
+    "align": "center",
+    "border": true,
+    "index": true,
+    "tree": true,
+    "addBtn": false,
+    "menu":false,
+    "selection":true,
+    "tip":false,
+    "column":[
+        {
+            "label": "编码",
+            "prop": "code",
+            "index": 1,
+            "width":100,
+          "search": true,
+          "overHidden": true
+        },{
+            "label": "名称",
+            "prop": "cname",
+            "search": true,
+            "searchSpan": 8,
+            "index": 2,
+            "width":180,
+        "overHidden": true
+      },{
+            "label": "区域",
+            "prop": "belongtoarea",
+            "index": 4,
+            "width":180,
+        "overHidden": true
+      },{
+            "label": "所属公司",
+            "prop": "belongCompany",
+            "index": 5,
+            "width":100,
+        "overHidden": true
+      },{
+            "label": "联系人",
+            "prop": "attn",
+            "index": 6,
+            "width":100,
+        "overHidden": true
+      },{
+            "label": "代理品牌",
+            "prop": "goodtypes",
+            "index": 7,
+            "width":100,
+        "overHidden": true
+      },{
+            "label": "等级",
+            "prop": "creditLevel",
+            "index": 8,
+            "width":100,
+        "overHidden": true
+      }
+    ]
+}

+ 50 - 0
src/components/warehousKH/configuration/mainList2.json

@@ -0,0 +1,50 @@
+{
+  "searchShow": true,
+  "searchMenuSpan": 8,
+  "lazy": true,
+  "align": "center",
+  "border": true,
+  "index": true,
+  "tree": true,
+  "addBtn": false,
+  "menu": false,
+  "selection": true,
+  "tip": false,
+  "column": [{
+    "label": "编码",
+    "prop": "code",
+    "index": 1,
+    "width": 100,
+    "overHidden": true
+  }, {
+    "label": "区域",
+    "prop": "belongtoarea",
+    "index": 2,
+    "width": 180,
+    "overHidden": true
+  }, {
+    "label": "所属公司",
+    "prop": "belongCompany",
+    "index": 3,
+    "width": 100,
+    "overHidden": true
+  }, {
+    "label": "联系人",
+    "prop": "attn",
+    "index": 4,
+    "width": 100,
+    "overHidden": true
+  }, {
+    "label": "代理品牌",
+    "prop": "goodtypes",
+    "index": 5,
+    "width": 100,
+    "overHidden": true
+  }, {
+    "label": "等级",
+    "prop": "creditLevel",
+    "index": 6,
+    "width": 100,
+    "overHidden": true
+  }]
+}

+ 212 - 22
src/components/warehousKH/main.vue

@@ -1,47 +1,124 @@
 <template>
-    <div style="display: flex;">
-        <el-select v-model="value" placeholder="请选择" filterable clearable allow-create default-first-option
-            @input="$emit('balabala', value)" @change="getKeyId(value)" :disabled="disabled">
-            <template v-if="zhKey">
-                <el-option v-for="item in corpList" :key="item.id" :label="item.cname" :value="item.cname">
-                </el-option>
-            </template>
-            <template v-else>
-                <el-option v-for="item in corpList" :key="item.cname" :label="item.cname" :value="item.id">
-                </el-option>
-            </template>
-        </el-select>
-        <el-tooltip class="item" effect="dark" content="获取最新客户资料" placement="top-start">
-            <el-button icon="el-icon-refresh" size="mini" v-if="label != 'shortName'"
-                @click="refreshData"></el-button>
-        </el-tooltip>
+    <div>
+        <div style="display: flex;">
+            <el-select v-model="value" placeholder="请选择" filterable clearable allow-create default-first-option
+                @input="$emit('balabala', value)" @change="getKeyId(value)" :disabled="disabled">
+                <template v-if="zhKey">
+                    <el-option v-for="item in corpList" :key="item.id" :label="item.cname" :value="item.cname">
+                    </el-option>
+                </template>
+                <template v-else>
+                    <el-option v-for="item in corpList" :key="item.cname" :label="item.cname" :value="item.id">
+                    </el-option>
+                </template>
+            </el-select>
+            <el-button icon="el-icon-search" size="mini" v-if="label != 'shortName'" :disabled="disabled"
+                @click="openDialog()"></el-button>
+            <el-tooltip class="item" effect="dark" content="获取最新客户资料" placement="top-start">
+                <el-button icon="el-icon-refresh" size="mini" v-if="label != 'shortName'" @click="refreshData"
+                    style="margin-left:0px;"></el-button>
+            </el-tooltip>
+        </div>
+        <el-dialog :title="title" :visible.sync="corpVisible" width="80%" top="5vh" append-to-body @closed="closed"
+            class="el-dialogDeep" :close-on-click-modal="false" v-dialog-drag>
+            <span>
+                <el-row>
+                    <el-col :span="4">
+                        <el-scrollbar>
+                            <basic-container>
+                                <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick"
+                                    :style="treeStyle" />
+                            </basic-container>
+                        </el-scrollbar>
+                    </el-col>
+                    <el-col :span="20">
+                        <avue-crud :option="tableOption" :data="data" ref="crud" v-model="form" :page.sync="page"
+                            :search.sync="search" @search-change="searchChange" @search-reset="searchReset"
+                            @selection-change="selectionChange" @on-load="onLoad" @tree-load="treeLoad"
+                            @saveColumn="saveColumn" @resetColumn="resetColumn" @refresh-change="refreshChange"
+                            :table-loading="loading">
+                        </avue-crud>
+                    </el-col>
+                </el-row>
+            </span>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="corpVisible = false">取 消</el-button>
+                <el-button type="primary" @click="importCorp" :disabled="!multiple && selectionList.length != 1">确 定
+                </el-button>
+            </span>
+        </el-dialog>
     </div>
 </template>
 
 <script>
-import { allCropList } from "@/api/basicData/customerInformation";
+import option from "./configuration/mainList.json";
+import { customerList, allCropList, getDeptLazyTree } from "@/api/basicData/customerInformation";
+import { getCustomerCode, getCustomerName } from "@/enums/management-type";
 import { kMaxLength } from "buffer";
 export default {
     name: "main",
     data() {
         return {
             form: {},
-            corpList: []
+            loading: false,
+            corpList: [],
+            data: [],
+            tableOption: {},
+            search: {},
+            treeDeptId: "",
+            treeDeptName: "",
+            page: {
+                currentPage: 1,
+                pageSize: 10,
+                total: 0,
+                pageSizes: [10, 50, 100, 200, 300, 400, 500, 1000]
+            },
+            treeOption: {
+                nodeKey: "id",
+                lazy: true,
+                addBtn: false,
+                menu: false,
+                size: "small",
+                props: {
+                    labelText: "标题",
+                    label: "title",
+                    value: "value",
+                    children: "children"
+                }
+            },
+            corpVisible: false,
+            selectionList: [],
+            title: null,
+            treeStyle: "height:" + (window.innerHeight - 315) + "px"
         };
     },
     props: {
         value: String,
         disabled: Boolean,
-        zhKey: Boolean
+        zhKey: Boolean,
+        slot: Boolean,
+        cropIndex: Number,
+        corpType: String,
+        multiple: Boolean,
+        collapseTags: Boolean,
+        gysType: String,
+        treeType: String,
+        label: String,
+        belongtocompany: Number,
     },
     model: {
         prop: "value",
         event: "balabala"
     },
-    created() {
+    async created() {
+        this.tableOption = await this.getColumnData(this.getColumnName(51), option);
+            this.title = getCustomerName(this.corpType);
         this.getCorpList()
     },
     methods: {
+        init() {
+            this.openDialog();
+        },
         getCorpList() {
             let userObj = JSON.parse(localStorage.getItem("saber-userInfo")).content;
             allCropList({ corpType: 'KH', adminProfiles: userObj.role_name != "admin" ? userObj.user_id : null }).then(res => {
@@ -51,6 +128,100 @@ export default {
         refreshData() {
             this.getCorpList()
         },
+        openDialog() {
+            let _this = this;
+            this.treeOption.treeLoad = function (node, resolve) {
+                const parentId = node.level === 0 ? 0 : node.data.id;
+                getDeptLazyTree({
+                    parentId: parentId,
+                    corpType: getCustomerCode(_this.corpType),
+                    cname: _this.treeType == "CK" ? "货代和物流" : null
+                }).then(res => {
+                    resolve(
+                        res.data.data.map(item => {
+                            return {
+                                ...item,
+                                leaf: !item.hasChildren
+                            };
+                        })
+                    );
+                });
+            };
+            this.corpVisible = true;
+        },
+        closed() {
+            this.$refs.crud.toggleSelection();
+        },
+        importCorp() {
+            if (this.multiple && this.selectionList.length == 0) return this.$message.error('请选择明细')
+            if (this.zhKey) {
+                this.$emit("balabala", this.selectionList[0].cname);
+                this.corpVisible = false;
+            } else {
+                this.$emit("balabala", this.selectionList[0].id);
+                this.corpVisible = false;
+            }
+
+        },
+        refreshChange() {
+            this.onLoad(this.page, this.search);
+        },
+        onLoad(page, params = { parentId: 0 }) {
+            let userObj = JSON.parse(localStorage.getItem("saber-userInfo")).content;
+            let queryParams = Object.assign({}, params, {
+                size: page.pageSize,
+                current: page.currentPage,
+                corpsTypeId: this.treeDeptId,
+                corpType: getCustomerCode(this.corpType),
+                adminProfiles: userObj.role_name != "admin" ? userObj.user_id : null,
+                corpsTypeName: this.treeType == "CK" ? "货代和物流" : null,
+                belongtocompany: this.belongtocompany
+            });
+            this.loading = true;
+            customerList(queryParams)
+                .then(res => {
+                    this.data = res.data.data.records;
+                    this.page.total = res.data.data.total;
+                    if (this.page.total) {
+                        this.tableOption.height = window.innerHeight - 350;
+                    }
+                })
+                .finally(() => {
+                    this.loading = false;
+                });
+        },
+        selectionChange(list) {
+            this.selectionList = list;
+        },
+        sizeChange(val) {
+            this.page.pageSize = val;
+            this.onLoad();
+        },
+        currentChange(val) {
+            this.page.currentPage = val;
+            this.onLoad();
+        },
+        //列表内展开树节点
+        treeLoad(tree, treeNode, resolve) {
+            const parentId = tree.id;
+            customerList({ parentId: parentId }).then(res => {
+                resolve(res.data.data.records);
+            });
+        },
+        //点击搜索按钮触发
+        searchChange(params, done) {
+            this.page.currentPage = 1;
+            this.onLoad(this.page, params);
+            done();
+        },
+        searchReset() {
+            this.treeDeptId = null;
+        },
+        nodeClick(data) {
+            this.treeDeptId = data.id;
+            this.page.currentPage = 1;
+            this.onLoad(this.page);
+        },
         getKeyId(row) {
             if (this.zhKey) {
                 if (row) {
@@ -64,8 +235,27 @@ export default {
                     this.$emit('getCropId', null)
                 }
             }
-
-        }
+        },
+        //列保存触发
+        async saveColumn() {
+            const inSave = await this.saveColumnData(
+                this.getColumnName(51),
+                this.option
+            );
+            if (inSave) {
+                this.$message.success("保存成功");
+                //关闭窗口
+                this.$refs.crud.$refs.dialogColumn.columnBox = false;
+            }
+        },
+        async resetColumn() {
+            this.option = option;
+            const inSave = await this.delColumnData(this.getColumnName(51), option);
+            if (inSave) {
+                this.$message.success("重置成功");
+                this.$refs.crud.$refs.dialogColumn.columnBox = false;
+            }
+        },
     },
     watch: {
     }

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

@@ -28,6 +28,9 @@
           <template slot="portOfDestination">
             <port-info v-model="form.portOfDestination" :disabled="detailData.status == 1" />
           </template>
+          <template slot-scope="{}" slot="corpIdLabel">
+            <span style="color: #409EFF;cursor: pointer" @click.stop="khEdit">客户名称:</span>
+          </template>
           <template slot="corpId">
             <crop-select v-model="form.corpId" @getCorpData="getCorpData" corpType="KH"
               :disabled="detailData.status == 1"></crop-select>
@@ -868,6 +871,22 @@ export default {
     cellStyle() {
       return "padding:0;height:40px;";
     },
+    khEdit() {
+      if (this.form.corpId) {
+        this.$router.push({
+          path: '/basicData/customerInformation/index', query: {
+            corpId: this.form.corpId,
+            corpName: this.form.corpName
+          }
+        })
+      } else {
+        this.$router.push({
+          path: '/basicData/customerInformation/index', query: {
+            add: "New"
+          }
+        })
+      }
+    },
     copyDoc() {
       this.$emit("copyOrder", this.form.id);
     },

+ 19 - 0
src/views/exportTrade/salesContract/detailsPage.vue

@@ -54,6 +54,9 @@
           <template slot="portOfDestination">
             <port-info v-model="form.portOfDestination" :disabled="detailData.status == 1" />
           </template>
+          <template slot-scope="{}" slot="corpIdLabel">
+            <span style="color: #409EFF;cursor: pointer" @click.stop="khEdit">客户名称:</span>
+          </template>
           <template slot="corpId">
             <crop-select v-model="form.corpId" @getCorpData="getCorpData" corpType="KH"
               :disabled="detailData.status == 1"></crop-select>
@@ -979,6 +982,22 @@ export default {
     cellStyle() {
       return "padding:0;height:40px;";
     },
+    khEdit() {
+      if (this.form.corpId) {
+        this.$router.push({
+          path: '/basicData/customerInformation/index', query: {
+            corpId: this.form.corpId,
+            corpName: this.form.corpName
+          }
+        })
+      } else {
+        this.$router.push({
+          path: '/basicData/customerInformation/index', query: {
+            add: "New"
+          }
+        })
+      }
+    },
     copyDoc() {
       this.$emit("copyOrder", this.form.id);
     },

+ 125 - 5
src/views/wel/components/quick-launch.vue

@@ -36,7 +36,7 @@
           <span>收费</span>
         </div>
       </div>
-      <div class="content" v-if="sysType == 5">
+      <!-- <div class="content" v-if="sysType == 5">
         <div class="content-icon" @click="inPage('zy')">
           <i class="tradingIcon icon-pay" style="color:#57927a"></i>
           <span>主营业务</span>
@@ -61,6 +61,46 @@
           <i class="tradingIcon icon-pay" style="color:#576892"></i>
           <span>费用详情</span>
         </div>
+      </div> -->
+      <div class="content2" v-if="sysType === 5" v-loading="loading">
+        <div class="content2-item">
+          <div class="card">
+            <div class="card-title card-title1">
+              <span>
+                销
+              </span>
+            </div>
+            <div class="card-content">
+              <span class="card-content-text">销售机会</span>
+            </div>
+          </div>
+        </div>
+        <div class="divider" />
+        <div class="content2-item">
+          <div class="card">
+            <div class="card-title card-title2">
+              <span>
+                主
+              </span>
+            </div>
+            <div class="card-content">
+              <span class="card-content-text">主营业务</span>
+            </div>
+          </div>
+        </div>
+        <div class="divider" />
+        <div class="content2-item">
+          <div class="card">
+            <div class="card-title card-title3">
+              <span>
+                任
+              </span>
+            </div>
+            <div class="card-content">
+              <span class="card-content-text">任务</span>
+            </div>
+          </div>
+        </div>
       </div>
       <div class="content" v-if="sysType == 4 || sysType == 2">
         <div class="content-icon" @click="inPage('bj')" v-if="sysType == 4">
@@ -98,7 +138,8 @@
           <span>付费</span>
         </div>
         <div class="content-icon" @click="inPage('smart')" v-if="sysType == 2">
-          <div style="width: 36px;height: 37px;border-radius: 10px;background-color: #0771e3;text-align: center;margin-top: 1px">
+          <div
+            style="width: 36px;height: 37px;border-radius: 10px;background-color: #0771e3;text-align: center;margin-top: 1px">
             <i class="el-icon-basketball" style="color:#FFFFFF;font-size: 26px;line-height: 37px;"></i>
           </div>
           <span style="margin-top: 4px">智慧大屏</span>
@@ -199,9 +240,9 @@ export default {
             );
             break;
           case "smart":
-            if ((localStorage.getItem("roleName").split(',')).indexOf('IDC') !== -1){
-              window.open( 'http://119.3.74.195:9527/view/'+ this.largeScreenToken +'?token=' + getToken())
-            }else {
+            if ((localStorage.getItem("roleName").split(',')).indexOf('IDC') !== -1) {
+              window.open('http://119.3.74.195:9527/view/' + this.largeScreenToken + '?token=' + getToken())
+            } else {
               this.$message.error('此帐号无权限');
             }
             break;
@@ -275,32 +316,111 @@ export default {
   padding: 5px;
   box-sizing: border-box;
   height: 100%;
+
   ::v-deep .el-card__body {
     padding: 10px 15px;
     font-size: 14px;
   }
+
   &__card {
     width: 100%;
     height: 100%;
   }
+
   .title {
     display: flex;
     justify-content: space-between;
   }
 }
+
 .tradingIcon {
   font-size: 36px;
 }
+
 .content {
   display: flex;
+
   &-icon {
     display: flex;
     flex-direction: column;
     align-items: center;
     margin: 1.5vh 1vw 0vh 1vw;
+
     span {
       margin-top: 0.2vh;
     }
   }
 }
+
+.content2 {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 10vh;
+  width: 80vw;
+
+  .divider {
+    display: block;
+    height: 0px;
+    width: 100%;
+    margin-top: -20px;
+    border-top: 1px dashed #dcdfe6;
+  }
+
+  &-item {
+    margin-left: 1vw;
+
+    .card {
+      width: 100px;
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+
+      &-title {
+        width: 40px;
+        height: 40px;
+        text-align: center;
+        border-radius: 50%;
+        font-size: 20px;
+        font-weight: 600;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+
+        span {
+          line-height: 20px;
+        }
+      }
+
+      &-title1 {
+        color: #037fe1;
+        background-color: rgba(3, 127, 225, 0.15);
+      }
+
+      &-title2 {
+        color: #ffa21e;
+        background-color: rgba(255, 162, 30, 0.15);
+      }
+
+      &-title3 {
+        color: #fb5b60;
+        background-color: rgba(251, 91, 96, 0.15);
+      }
+
+      &-title4 {
+        color: #42bc6f;
+        background-color: rgba(66, 188, 111, 0.15);
+      }
+
+      &-content {
+        display: flex;
+        flex-direction: column;
+        margin-top: 4px;
+        &-text {
+          color: #909399;
+        }
+      }
+    }
+  }
+}
 </style>