Bläddra i källkod

feature:增加合作伙伴模块

liuzl 2 år sedan
förälder
incheckning
7ee4b5a178

+ 44 - 0
api/partner/index.js

@@ -0,0 +1,44 @@
+/*
+ * @Author: liuzhenlin 461480418@qq.ocm
+ * @Date: 2023-01-29 09:43:06
+ * @LastEditors: liuzhenlin
+ * @LastEditTime: 2023-01-29 09:43:36
+ * @Description: file content
+ * @FilePath: \crm\api\schedule\index.js
+ */
+import micro_request from '../../utils/micro_request'
+const basePath = process.uniEnv.VUE_APP_ParentPath
+export default {
+  // 获取列表
+  getCompanyList(query) {
+    return micro_request.postRequest(basePath, 'PartnerCompany', 'List', query)
+  },
+  addCompany(query) {
+    return micro_request.postRequest(basePath, 'PartnerCompany', 'Add', query)
+  },
+  updateCompany(query) {
+    return micro_request.postRequest(basePath, 'PartnerCompany', 'Update', query)
+  },
+  deleteCompany(query) {
+    return micro_request.postRequest(basePath, 'PartnerCompany', 'Delete', query)
+  },
+  getCompany(query) {
+    return micro_request.postRequest(basePath, 'PartnerCompany', 'Get', query)
+  },
+
+  getCompanyConcatList(query) {
+    return micro_request.postRequest(basePath, 'PartnerCompanyContact', 'List', query)
+  },
+  addCompanyConcat(query) {
+    return micro_request.postRequest(basePath, 'PartnerCompanyContact', 'Add', query)
+  },
+  updateCompanyConcat(query) {
+    return micro_request.postRequest(basePath, 'PartnerCompanyContact', 'Update', query)
+  },
+  deleteCompanyConcat(query) {
+    return micro_request.postRequest(basePath, 'PartnerCompanyContact', 'Delete', query)
+  },
+  getCompanyConcat(query) {
+    return micro_request.postRequest(basePath, 'PartnerCompanyContact', 'Get', query)
+  },
+}

+ 14 - 0
pages.json

@@ -219,6 +219,20 @@
         "navigationStyle": "custom"
       },
       "tit": "招标详情"
+    },
+    {
+      "path": "pages/partners/index",
+      "style": {
+        "navigationStyle": "custom"
+      },
+      "tit": "合作伙伴"
+    },
+    {
+      "path": "pages/partners/details",
+      "style": {
+        "navigationStyle": "custom"
+      },
+      "tit": "合作伙伴详情"
     }
   ],
   "tabBar": {

+ 26 - 2
pages/home/index.vue

@@ -113,8 +113,8 @@
                   <image class="menu-img" src="../../static/images/menu4.png" mode="scaleToFill" />
                 </view>
                 <view class="menu-info flex flex-column">
-                  <view class="tit1">合作伙伴</view>
-                  <view class="tit2">合作伙伴展示</view>
+                  <view class="tit1">经销商代理商</view>
+                  <view class="tit2">经销商代理商展示</view>
                 </view>
               </view>
             </u-col>
@@ -130,6 +130,30 @@
               </view>
             </u-col>
           </u-row>
+          <u-row justify="space-between" gutter="14">
+            <u-col span="6">
+              <view class="menu-item flex_l flex-colunm" @click="handleHomeLink('/pages/partners/index')">
+                <view class="menu-img-box">
+                  <image class="menu-img" src="../../static/images/menu1.png" mode="scaleToFill" />
+                </view>
+                <view class="menu-info flex flex-column">
+                  <view class="tit1">合作伙伴</view>
+                  <view class="tit2">合作伙伴展示</view>
+                </view>
+              </view>
+            </u-col>
+            <!-- <u-col span="6">
+              <view class="menu-item flex_l flex-colunm" @click="handleHomeLink('/pages/inviteTenders/index')">
+                <view class="menu-img-box">
+                  <image class="menu-img" src="../../static/images/menu6.png" mode="scaleToFill" />
+                </view>
+                <view class="menu-info flex flex-column">
+                  <view class="tit1">招标信息</view>
+                  <view class="tit2">招标信息查询</view>
+                </view>
+              </view>
+            </u-col> -->
+          </u-row>
         </view>
 
         <view class="data-container">

+ 178 - 0
pages/partners/components/SelectCompany.vue

@@ -0,0 +1,178 @@
+<!--
+ * @Author: liuzhenlin 461480418@qq.ocm
+ * @Date: 2023-02-15 10:34:49
+ * @LastEditors: liuzhenlin
+ * @LastEditTime: 2023-02-23 10:57:44
+ * @Description: file content
+ * @FilePath: \oms\components\SelectCustomer.vue
+-->
+<template>
+  <view>
+    <u-popup :show="selectVisible" @close="close">
+      <view class="select-header">
+        <view class="tit">选择公司</view>
+        <view class="flex">
+          <!-- <view class="save-btn" @click="handleAdd()">新增</view> -->
+          <view class="save-btn" @click="close()">保存</view>
+        </view>
+      </view>
+      <view class="search-container">
+        <view class="search-input">
+          <u-input
+            clearable
+            placeholderStyle="font-size:26rpx"
+            :customStyle="{ height: '66rpx' }"
+            v-model="queryForm.partnerName"
+            prefixIcon="search"
+            prefixIconStyle="font-size: 22px;color: #909399"
+            placeholder="请输入公司名称"
+            shape="circle"
+            @input="getUserList()"
+            border="surround"></u-input>
+        </view>
+      </view>
+      <u-empty mode="list" v-if="userList.length == 0"></u-empty>
+      <view class="concat-list" v-else>
+        <u-radio-group v-model="userValue" placement="column">
+          <view class="radio-item" v-for="item in userList" :key="item.id">
+            <u-radio :label="item.label" :name="item.id" @change="radioChange"></u-radio>
+          </view>
+        </u-radio-group>
+      </view>
+    </u-popup>
+    <u-overlay :show="showAdd" zIndex="999999">
+      <view class="add-warp">
+        <view class="tit">创建公司</view>
+        <u-input v-model="value"></u-input>
+        <view class="flex flex-between" style="margin-top: 10px">
+          <view style="width: 100px">
+            <u-button type="primary" size="small" text="取消" @click="handleCloseAdd"></u-button>
+          </view>
+          <view style="width: 100px">
+            <u-button type="primary" size="small" text="提交" @click="handleAddSub"></u-button>
+          </view>
+        </view>
+      </view>
+    </u-overlay>
+  </view>
+</template>
+
+<script>
+  import partnerApi from '@/api/partner'
+
+  import to from 'await-to-js'
+  export default {
+    name: 'OmsCustomerContact',
+    props: {
+      queryParams: {
+        type: Object,
+        default() {
+          return {}
+        },
+      },
+    },
+    data() {
+      return {
+        showAdd: false,
+        value: '',
+        selectVisible: false,
+        userList: [],
+        queryForm: {
+          partnerName: '',
+          pageNum: 1,
+          pageSize: 999,
+        },
+        // u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
+        userValue: null,
+        selected: null,
+      }
+    },
+
+    methods: {
+      handleCloseAdd() {
+        this.showAdd = false
+      },
+      handleAddSub() {},
+      handleAdd() {
+        this.value = ''
+        this.showAdd = true
+      },
+      async getUserList() {
+        let params = Object.assign(this.queryForm, this.queryParams)
+        const [err, res] = await to(partnerApi.getCompanyList(params))
+        if (err) return
+        if (res.code == 200) {
+          if (res.data.list && res.data.list.length > 0) {
+            this.userList = res.data.list.map((item) => ({
+              id: item.id,
+              label: item.partnerName,
+              name: item.partnerName,
+            }))
+          } else {
+            this.userList = []
+          }
+        }
+      },
+      open() {
+        this.selectVisible = true
+        this.getUserList()
+      },
+      close() {
+        this.selectVisible = false
+        this.$emit('close', this.selected)
+      },
+      radioChange(n) {
+        this.selected = this.userList.find((item) => item.id == n)
+      },
+    },
+  }
+</script>
+
+<style lang="scss" scoped>
+  .search-container {
+    padding: 30rpx 30rpx 0 30rpx;
+    display: flex;
+    align-items: center;
+    .search-input {
+      flex: 1;
+    }
+    .search-btn {
+      text-align: center;
+      line-height: 60rpx;
+      border-radius: 12rpx;
+      width: 100rpx;
+      height: 60rpx;
+      font-size: 26rpx;
+      margin: 0 0 0 12rpx;
+      background: $u-primary;
+      color: #ffffff;
+    }
+  }
+  .concat-list {
+    padding: 0 0 20rpx 0;
+    width: 100%;
+    height: 900rpx;
+    overflow: auto;
+    margin-top: 20rpx;
+    .radio-item {
+      padding: 20rpx 30rpx;
+      border-bottom: 1px solid #ccc;
+    }
+  }
+  .add-warp {
+    width: 80%;
+    height: 150px;
+    position: fixed;
+    left: 0;
+    right: 0;
+    margin: auto;
+    top: 0;
+    bottom: 0;
+    background: #fff;
+    border-radius: 20px;
+    padding: 20px;
+    .tit {
+      margin-bottom: 10px;
+    }
+  }
+</style>

+ 397 - 0
pages/partners/components/distrDetail.vue

@@ -0,0 +1,397 @@
+<!--
+ * @Author: liuzhenlin 461480418@qq.ocm
+ * @Date: 2023-02-15 16:25:58
+ * @LastEditors: liuzhenlin
+ * @LastEditTime: 2023-05-22 16:10:29
+ * @Description: file content
+ * @FilePath: \oms\pages\distributor\components\distrDetail.vue
+-->
+<template>
+  <view>
+    <!-- 经销商 -->
+    <view v-if="detail.distType == '10'">
+      <view class="info-item">
+        <u-row justify="space-between" gutter="10">
+          <u-col span="12">
+            <view class="flex_l">
+              <view class="label">经销商名称:</view>
+              <view class="desc">{{ detail.distName }}</view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+      <view class="info-item">
+        <u-row>
+          <u-col span="12">
+            <view class="flex_l">
+              <view class="label">助记名称:</view>
+              <view class="desc">{{ detail.abbrName }}</view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+      <view class="info-item">
+        <u-row>
+          <u-col span="12">
+            <view class="flex_l">
+              <view class="label">业务范围:</view>
+              <view class="desc">{{ detail.businessScope }}</view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+      <view class="info-item">
+        <u-row justify="space-between" gutter="10">
+          <u-col span="12">
+            <view class="flex_l">
+              <view class="label">注册资金:</view>
+              <view class="desc">{{ detail.capital }}万元</view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+      <view class="info-item">
+        <u-row justify="space-between" gutter="10">
+          <u-col span="12">
+            <view class="flex_l">
+              <view class="label">注册地:</view>
+              <view class="desc">{{ detail.registerDistrict }}</view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+      <view class="info-item">
+        <u-row justify="space-between" gutter="10">
+          <u-col span="12">
+            <view class="flex_l">
+              <view class="label">授权客户类型:</view>
+              <view class="desc">{{ setCustomerType(detail.customerType) }}</view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+      <view class="info-item">
+        <u-row justify="space-between" gutter="10">
+          <u-col span="12">
+            <view class="flex_l">
+              <view class="label">ABC项目出货总金额:</view>
+              <view class="desc"><u-text mode="price" :text="detail.allProductAmount"></u-text></view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+      <view class="info-item">
+        <u-row justify="space-between" gutter="10">
+          <u-col span="12">
+            <view class="flex_l">
+              <view class="label">未回款金额:</view>
+              <view class="desc"><u-text mode="price" :text="detail.unpaidAmount"></u-text></view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+      <view class="info-item">
+        <u-row justify="space-between" gutter="10">
+          <u-col span="12">
+            <view class="flex_l">
+              <view class="label">已有代理品牌和产品:</view>
+              <view class="desc">{{ detail.existedProduct }}</view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+      <view class="info-item">
+        <u-row justify="space-between" gutter="10">
+          <u-col span="12">
+            <view class="flex_l">
+              <view class="label">历史合作终端客户名称:</view>
+              <view class="desc">{{ detail.historyCustomer }}</view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+      <view class="info-item">
+        <u-row justify="space-between" gutter="10">
+          <u-col span="12">
+            <view class="flex_l">
+              <view class="label">归属销售:</view>
+              <view class="desc">{{ detail.belongSale }}</view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+      <view class="info-item">
+        <u-row justify="space-between" gutter="10">
+          <u-col span="12">
+            <view class="flex_l">
+              <view class="label">销售人数:</view>
+              <view class="desc">{{ detail.saleNum }}</view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+      <view class="info-item">
+        <u-row justify="space-between" gutter="10">
+          <u-col span="12">
+            <view class="flex_l">
+              <view class="label">创建时间:</view>
+              <view class="desc">{{ parseTime(detail.createdTime, '{y}-{m}-{d}') }}</view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+      <view class="info-item">
+        <u-row justify="space-between" gutter="10">
+          <u-col span="12">
+            <view class="flex_l">
+              <view class="label">更新时间:</view>
+              <view class="desc">{{ parseTime(detail.updatedTime, '{y}-{m}-{d}') }}</view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+    </view>
+    <!-- 代理商 -->
+    <view v-if="detail.distType == '20'">
+      <view class="info-item">
+        <u-row justify="space-between" gutter="10">
+          <u-col span="12">
+            <view class="flex_l">
+              <view class="label">代理商名称:</view>
+              <view class="desc">{{ detail.distName }}</view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+      <view class="info-item">
+        <u-row justify="space-between" gutter="10">
+          <u-col span="12">
+            <view class="flex_l">
+              <view class="label">助记名称:</view>
+              <view class="desc">{{ detail.abbrName }}</view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+      <view class="info-item">
+        <u-row justify="space-between" gutter="10">
+          <u-col span="12">
+            <view class="flex_l">
+              <view class="label">所在省份:</view>
+              <view class="desc">{{ detail.provinceDesc }}</view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+      <view class="info-item">
+        <u-row justify="space-between" gutter="10">
+          <u-col span="12">
+            <view class="flex_l">
+              <view class="label">业务范围:</view>
+              <view class="desc">{{ detail.businessScope }}</view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+      <view class="info-item">
+        <u-row justify="space-between" gutter="10">
+          <u-col span="12">
+            <view class="flex_l">
+              <view class="label">注册资金:</view>
+              <view class="desc">{{ detail.capital }}万元</view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+      <view class="info-item">
+        <u-row justify="space-between" gutter="10">
+          <u-col span="12">
+            <view class="flex_l">
+              <view class="label">注册地:</view>
+              <view class="desc">{{ detail.registerDistrict }}</view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+      <view class="info-item">
+        <u-row justify="space-between" gutter="10">
+          <u-col span="12">
+            <view class="flex_l">
+              <view class="label">现有销售人数::</view>
+              <view class="desc">{{ detail.saleNum }}</view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+      <view class="info-item">
+        <u-row justify="space-between" gutter="10">
+          <u-col span="12">
+            <view class="flex_l">
+              <view class="label">授权客户类型:</view>
+              <view class="desc">{{ setCustomerType(detail.customerType) }}</view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+      <view class="info-item">
+        <u-row justify="space-between" gutter="10">
+          <u-col span="12">
+            <view class="flex_l">
+              <view class="label">授权区域代理:</view>
+              <view class="desc">{{ detail.proxyDistrict }}</view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+      <view class="info-item">
+        <u-row justify="space-between" gutter="10">
+          <u-col span="12">
+            <view class="flex_l">
+              <view class="label">代理合同:</view>
+              <view class="desc" @click="downloadFile(detail.contractUrl)">
+                <u-text type="primary" text="附件"></u-text>
+              </view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+      <view class="info-item">
+        <u-row justify="space-between" gutter="10">
+          <u-col span="12">
+            <view class="flex_l">
+              <view class="label">ABC项目出货总金额:</view>
+              <view class="desc"><u-text mode="price" :text="allProductAmount"></u-text></view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+      <view class="info-item">
+        <u-row justify="space-between" gutter="10">
+          <u-col span="12">
+            <view class="flex_l">
+              <view class="label">未回款金额:</view>
+              <view class="desc"><u-text mode="price" :text="unpaidAmount"></u-text></view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+      <view class="info-item">
+        <u-row justify="space-between" gutter="10">
+          <u-col span="12">
+            <view class="flex_l">
+              <view class="label">已有代理品牌和产品:</view>
+              <view class="desc">{{ detail.existedProduct }}</view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+      <view class="info-item">
+        <u-row justify="space-between" gutter="10">
+          <u-col span="12">
+            <view class="flex_l">
+              <view class="label">历史合作终端客户名称:</view>
+              <view class="desc">{{ detail.historyCustomer }}</view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+  export default {
+    name: 'OmsCustomerDetail',
+    props: {
+      detail: {
+        type: [Object],
+        default: {},
+      },
+    },
+    data() {
+      return {
+        customerOptions: [],
+      }
+    },
+
+    mounted() {
+      this.getOptions()
+    },
+
+    methods: {
+      //通用下载文件方法
+      downloadFile(attachLink) {
+        uni.downloadFile({
+          url: attachLink, //下载地址,后端接口获取的链接
+          success: (data) => {
+            if (data.statusCode === 200) {
+              uni.saveFile({
+                //文件保存到本地
+                tempFilePath: data.tempFilePath, //临时路径
+                success: function (res) {
+                  uni.showToast({
+                    icon: 'none',
+                    mask: true,
+                    title: '文件已保存!',
+                    duration: 3000,
+                  })
+                  uni.openDocument({
+                    //fileType: 'docx',
+                    showMenu: true, //关键点,可以转发到微信
+                    filePath: res.savedFilePath,
+                    success: function (res) {
+                      console.log('打开文档成功')
+                    },
+                  })
+                },
+              })
+            }
+          },
+          fail: (err) => {
+            console.log(err)
+            uni.showToast({
+              icon: 'none',
+              mask: true,
+              title: '失败请重新下载',
+            })
+          },
+        })
+      },
+      setCustomerType(type) {
+        if (this.customerOptions.length == 0) return
+        if (!type) return
+        let arr = []
+        let typeArr = type.split(',')
+        typeArr.map((item) => {
+          arr.push(this.customerOptions.find((e) => e.key == item).value)
+        })
+        return arr.join(',')
+      },
+      getOptions() {
+        Promise.all([this.getDicts('cust_idy')])
+          .then(([data]) => {
+            this.customerOptions = data.data.values
+            // data.data.values.filter((i) => {
+            //   this.customerOptions[i.key] = i.value
+            // })
+          })
+          .catch((err) => console.log(err))
+      },
+    },
+  }
+</script>
+
+<style lang="scss" scoped>
+  .info-item {
+    padding: 20rpx;
+    .label {
+      width: 160rpx;
+      color: #646464;
+      font-size: 26rpx;
+    }
+    .desc {
+      font-size: 26rpx;
+      margin-left: 20rpx;
+    }
+  }
+</style>

+ 131 - 0
pages/partners/components/followRecords.vue

@@ -0,0 +1,131 @@
+<template>
+  <view class="todo-list">
+    <u-empty mode="list" text="暂无记录" v-if="followList.length == 0"></u-empty>
+    <view v-else v-for="(v, i) in followList" :key="i">
+      <view class="follow-date">
+        <u-text :bold="true" size="26rpx" :text="v.followDay"></u-text>
+      </view>
+      <view class="todo-item" v-for="item in v.followupList" :key="item.id">
+        <u-row>
+          <u-col span="12">
+            <view class="header">
+              <u-row>
+                <u-col span="12">
+                  <view class="flex_l">
+                    <text class="tit-txt mb5 text-ellipsis flex_1">
+                      {{ item.contactsName }} 跟进({{ formatType(item.followType) }})
+                    </text>
+                  </view>
+                </u-col>
+              </u-row>
+              <view class="tit-txt mb5">跟进内容:</view>
+              <view class="content flex">
+                <text>{{ item.followContent }}</text>
+              </view>
+              <view class="tit-txt mb5">达成效果:</view>
+              <view class="content flex">
+                <text>{{ item.effect }}</text>
+              </view>
+              <view class="tit-txt mb5">问题或困难:</view>
+              <view class="content flex">
+                <text>{{ item.issue }}</text>
+              </view>
+              <view class="tit-txt mb5">下一步跟进计划和目标:</view>
+              <view class="content flex">
+                <text>{{ item.furtherPlan }}</text>
+              </view>
+              <view class="content-footer flex1">
+                <text class="date">{{ item.followDate }}</text>
+                <view class="flex flex-middle">
+                  <text class="user-txt">联系人:{{ item.contactsName }}</text>
+                </view>
+              </view>
+            </view>
+          </u-col>
+        </u-row>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+  import to from 'await-to-js'
+  import followApi from '../../../api/follow'
+  export default {
+    name: 'OmsCustomerDetail',
+    props: {
+      targetId: {
+        type: [String, Number],
+        default: '0',
+      },
+    },
+    data() {
+      return {
+        followList: [],
+      }
+    },
+    mounted() {
+      this.getRecords()
+    },
+
+    methods: {
+      async getRecords() {
+        let params = {
+          targetId: '' + this.targetId,
+          targetType: '70',
+          DaysBeforeToday: 9999,
+        }
+        const [err, res] = await to(followApi.getListByDay(params))
+        if (err) return
+        if (res.code == 200) this.followList = res.data.list || []
+      },
+      formatType(val) {
+        let str = ''
+        if (val == 10) str = '电话'
+        else if (val == 20) str = '邮件'
+        else if (val == 30) str = '拜访'
+        return str
+      },
+    },
+  }
+</script>
+
+<style lang="scss" scoped>
+  .todo-list {
+    height: 100%;
+    overflow: auto;
+    .follow-date {
+      padding: 20rpx 0 20rpx 20rpx;
+    }
+    .todo-item {
+      padding: 12rpx 40rpx 12rpx 46rpx;
+      background: #f2f3f5;
+      border-radius: 15rpx;
+      margin-bottom: 32rpx;
+      .tit-txt {
+        font-size: 28rpx;
+        font-weight: bold;
+        color: #323232;
+      }
+      .content {
+        margin-bottom: 5px;
+        // padding: 10rpx 0;
+        font-size: 28rpx;
+        color: #646464;
+      }
+      .content-footer {
+        padding: 0 0 12rpx 0;
+        font-size: 24rpx;
+        .date {
+          color: #969696;
+        }
+        .user-img {
+          width: 46rpx;
+          height: 46rpx;
+          border-radius: 50%;
+          margin-right: 15rpx;
+        }
+      }
+    }
+  }
+</style>

+ 253 - 0
pages/partners/create.vue

@@ -0,0 +1,253 @@
+<!--
+ * @Author: liuzhenlin 461480418@qq.ocm
+ * @Date: 2023-01-12 11:57:48
+ * @LastEditors: liuzhenlin
+ * @LastEditTime: 2023-03-22 11:26:04
+ * @Description: file content
+ * @FilePath: \oms\pages\distributor\create.vue
+-->
+<template>
+  <view class="home">
+    <view class="nav">
+      <view :style="{ paddingTop }">
+        <view class="title" :style="[{ height }, { lineHeight: height }]">
+          <view class="back" @click="goBack()">
+            <u-icon name="arrow-left" color="#ffffff" size="22"></u-icon>
+          </view>
+          <text>新建经销商</text>
+        </view>
+      </view>
+    </view>
+    <view class="main">
+      <u-form :model="addForm" :rules="rules" ref="addForm" label-width="0">
+        <u-form-item prop="distName" customStyle="padding:40rpx 0 34rpx" borderBottom>
+          <view class="form-label flex_l">
+            <view class="label-tag"></view>
+            名称
+          </view>
+          <u-input border="none" v-model="addForm.distName" placeholder="请输入名称"></u-input>
+        </u-form-item>
+
+        <u-form-item prop="provinceDesc" borderBottom customStyle="padding:40rpx 0 30rpx" @click="showProvince = true">
+          <view class="form-label flex_l">
+            <view class="label-tag"></view>
+            选择省份
+          </view>
+          <u-input
+            :readonly="true"
+            placeholder="请选择省份"
+            v-model="addForm.provinceDesc"
+            border="none"
+            suffixIcon="arrow-down"
+            suffixIconStyle="color:#CDCDCD"
+            clearable
+            customStyle="padding: 0 30rpx 0 12rpx"></u-input>
+        </u-form-item>
+
+        <u-form-item prop="registerDistrict" customStyle="padding:40rpx 0 34rpx" borderBottom>
+          <view class="form-label flex_l">
+            <view class="label-tag"></view>
+            注册地
+          </view>
+          <u-input border="none" v-model="addForm.registerDistrict" placeholder="请输入备注"></u-input>
+        </u-form-item>
+      </u-form>
+      <view class="center">
+        <view class="handle-btn" @click="handleAdd" :class="!flag ? 'disabledBtn' : ''">保存</view>
+      </view>
+    </view>
+    <!-- 选择省 -->
+    <u-picker
+      :show="showProvince"
+      :columns="provinceColumns"
+      keyName="distName"
+      @cancel="showProvince = false"
+      @confirm="pickProvince"></u-picker>
+    <!-- 选择销售 -->
+    <u-notify ref="uNotify"></u-notify>
+    <u-toast ref="uToast"></u-toast>
+  </view>
+</template>
+<script>
+  import { mapGetters } from 'vuex'
+  import to from 'await-to-js'
+  import distrApi from '../../api/base/distr'
+  import SelectUser from 'components/SelectUser'
+  export default {
+    name: 'omsIndex',
+    components: { SelectUser },
+    data() {
+      return {
+        flag: true,
+        height: '',
+        paddingTop: '',
+        showProvince: false,
+        provinceColumns: [],
+        addForm: {
+          distName: '',
+          provinceId: null,
+          provinceDesc: '',
+          registerDistrict: '',
+          distType: '10',
+        },
+        rules: {
+          distName: [{ required: true, trigger: 'blur', message: '请输入名称' }],
+          registerDistrict: [{ required: true, trigger: 'blur', message: '请输入注册地' }],
+          provinceDesc: [{ required: true, trigger: 'blur', message: '请选择省份' }],
+        },
+      }
+    },
+    computed: {
+      ...mapGetters(['userId', 'nickName']),
+    },
+    created() {
+      const navData = uni.getMenuButtonBoundingClientRect()
+      this.height = navData.height + 'px'
+      this.paddingTop = navData.top + 'px'
+    },
+    mounted() {
+      this.getOptions()
+    },
+    methods: {
+      getOptions() {
+        Promise.all([distrApi.getProvinceList()])
+          .then(([province]) => {
+            this.provinceColumns = [province.data.list]
+          })
+          .catch((err) => console.log(err))
+      },
+      // 省份选择
+      pickProvince(e) {
+        this.addForm.provinceId = e.value[0].id
+        this.addForm.provinceDesc = e.value[0].distName
+        this.showProvince = false
+      },
+      handleAdd() {
+        if (!this.flag) return
+        this.$refs.addForm
+          .validate()
+          .then(async () => {
+            let params = this.addForm
+            params.belongSale = this.nickName
+            params.belongSaleId = this.userId
+            this.flag = false
+            const [err, res] = await to(distrApi.doAdd(params))
+            this.flag = true
+            if (err) return
+            if (res && res.code == 200) {
+              this.$refs.uToast.show({
+                type: 'success',
+                message: '创建成功',
+                complete: () => {
+                  uni.navigateBack({
+                    //关闭当前页面,返回上一页面或多级页面。
+                    delta: 1,
+                  })
+                },
+              })
+            }
+          })
+          .catch((err) => {
+            this.$refs.uNotify.show({
+              top: this.height + this.paddingTop + 10,
+              type: 'warning',
+              message: err[0].message,
+              duration: 1000 * 3,
+            })
+          })
+      },
+      goBack() {
+        uni.navigateBack({
+          //关闭当前页面,返回上一页面或多级页面。
+          delta: 1,
+        })
+      },
+    },
+  }
+</script>
+<style>
+  page {
+    background: #f2f3f5;
+  }
+</style>
+<style lang="scss" scoped>
+  .home {
+    padding-top: 188rpx;
+
+    .nav {
+      position: absolute;
+      left: 0;
+      top: 0;
+      width: 100%;
+      height: 284rpx;
+      background: #3e7ef8;
+
+      .title {
+        position: relative;
+        text-align: center;
+        font-size: 32rpx;
+        font-weight: bold;
+        color: #ffffff;
+
+        .back {
+          position: absolute;
+          top: 0;
+          bottom: 0;
+          margin: auto;
+          left: 70rpx;
+          display: flex;
+        }
+      }
+    }
+
+    .main {
+      position: absolute;
+      width: 100%;
+      height: calc(100vh - 188rpx);
+      background: #ffffff;
+      box-shadow: 0 6rpx 19rpx 2rpx rgba(0, 45, 132, 0.15);
+      border-radius: 31rpx 31rpx 0 0;
+      padding: 0 32rpx;
+      overflow: auto;
+      padding-bottom: 64rpx;
+
+      .form-label {
+        font-size: 32rpx;
+        font-weight: bold;
+        color: #323232;
+        padding-bottom: 18rpx;
+
+        .label-tag {
+          width: 15rpx;
+          height: 15rpx;
+          background: #ff4d4f;
+          border-radius: 50%;
+          margin-right: 10rpx;
+        }
+      }
+
+      .upload-file-box {
+        padding: 20rpx 0;
+        position: relative;
+
+        .upload-btn {
+          position: absolute;
+          right: 0;
+          top: 26rpx;
+        }
+      }
+    }
+
+    .handle-btn {
+      width: 569rpx;
+      height: 92rpx;
+      background: #3e7ef8;
+      border-radius: 31rpx;
+      margin: 116rpx auto 0;
+      font-size: 32rpx;
+      color: #ffffff;
+      text-align: center;
+      line-height: 92rpx;
+    }
+  }
+</style>

+ 304 - 0
pages/partners/details.vue

@@ -0,0 +1,304 @@
+<!--
+ * @Author: liuzhenlin 461480418@qq.ocm
+ * @Date: 2023-01-12 11:57:48
+ * @LastEditors: liuzhenlin
+ * @LastEditTime: 2023-02-28 10:21:59
+ * @Description: file content
+ * @FilePath: \oms\pages\distributor\details.vue
+-->
+<template>
+  <view class="home">
+    <view class="nav">
+      <view :style="{ paddingTop }">
+        <view class="title" :style="[{ height }, { lineHeight: height }]">
+          <view class="back" @click="goBack()">
+            <u-icon name="arrow-left" color="#ffffff" size="22"></u-icon>
+          </view>
+          <text>合作伙伴详情</text>
+        </view>
+      </view>
+    </view>
+    <view class="main">
+      <view class="main-top">
+        <view class="customer-box">
+          <view class="header flex1">
+            <view class="name flex_l">
+              <image class="img" src="../../static/images/menu1.png" mode="scaleToFill" />
+              <text>{{ details.name }}</text>
+            </view>
+            <view class="date">{{ parseTime(details.createdTime, '{y}-{m}-{d}') }}</view>
+          </view>
+          <view class="info">
+            <view class="info-item">
+              <u-row>
+                <u-col span="6">
+                  <view class="flex_l">
+                    <view class="info-label">负责区域:</view>
+                    <text class="info-txt">{{ details.territory }}</text>
+                  </view>
+                </u-col>
+                <u-col span="6">
+                  <view class="flex_l">
+                    <view class="info-label">联系方式:</view>
+                    <text class="info-txt">{{ details.contactWay }}</text>
+                  </view>
+                </u-col>
+              </u-row>
+            </view>
+            <view class="info-item">
+              <u-row justify="space-between">
+                <u-col span="6">
+                  <view class="flex_l">
+                    <view class="info-label">岗位:</view>
+                    <text class="info-txt">{{ details.post }}</text>
+                  </view>
+                </u-col>
+                <u-col span="6">
+                  <view class="flex_l">
+                    <view class="info-label">备注:</view>
+                    <text class="info-txt">{{ details.remark }}</text>
+                  </view>
+                </u-col>
+              </u-row>
+            </view>
+          </view>
+        </view>
+        <view class="tabs">
+          <u-tabs
+            v-if="curTabIndex >= 0"
+            @change="changeTabs"
+            :current="curTabIndex"
+            :scrollable="false"
+            :list="list"
+            :activeStyle="{
+              color: '#3E7EF8',
+              fontWeight: 'bold',
+            }"
+            :inactiveStyle="{
+              color: '#969696',
+            }"></u-tabs>
+        </view>
+      </view>
+      <view class="data-list">
+        <!-- 跟进记录 -->
+        <follow-records v-if="curTabIndex == 0" ref="follow" :targetId="id" :targetType="id"></follow-records>
+      </view>
+      <!-- 新增按钮 -->
+      <view class="fixed-btn-group" :style="{ width: openBtnWidth ? '180rpx' : '90rpx' }">
+        <view class="flex1" v-if="openBtnWidth">
+          <view class="btn center" @click="openFollow()">跟</view>
+        </view>
+        <view class="btn center" @click="openBtnWidth = !openBtnWidth">
+          <u-icon name="plus" color="#fff" size="20"></u-icon>
+        </view>
+      </view>
+    </view>
+  </view>
+</template>
+<script>
+  import partnerApi from '../../api/partner'
+  import to from 'await-to-js'
+  import followRecords from './components/followRecords'
+  export default {
+    name: 'omsIndex',
+    components: { followRecords },
+    data() {
+      return {
+        openBtnWidth: false,
+        curTabIndex: -1,
+        fllowList: [], //跟进数据
+        list: [
+          {
+            name: '跟进记录',
+            index: 0,
+          },
+          {
+            name: '',
+            index: 1,
+            disabled: true,
+          },
+        ],
+        height: '',
+        paddingTop: '',
+        details: {},
+        id: 0, //id
+      }
+    },
+    onLoad(option) {
+      this.id = parseInt(option.id)
+    },
+    created() {
+      const navData = uni.getMenuButtonBoundingClientRect()
+      this.height = navData.height + 'px'
+      this.paddingTop = navData.top + 'px'
+    },
+    onShow() {
+      this.curTabIndex = 0
+      this.openBtnWidth = false
+      this.getDistrDetail()
+    },
+    onHide() {
+      this.curTabIndex = -1
+    },
+    methods: {
+      async getDistrDetail() {
+        const [err, res] = await to(partnerApi.getCompanyConcat({ id: this.id }))
+        if (err) return
+        if (res && res.code == 200) {
+          this.details = res.data
+        }
+      },
+      // 改变tab
+      changeTabs(data) {
+        this.curTabIndex = data.index
+      },
+      // 打开转移
+      openFollow() {
+        // this.$store.commit('setDetails', this.projectData)
+        uni.navigateTo({
+          //保留当前页面,跳转到应用内的某个页面
+          url: '/pages/publicPages/follow?targetType=70&id=' + this.details.id,
+        })
+      },
+      goBack() {
+        uni.navigateBack({
+          //关闭当前页面,返回上一页面或多级页面。
+          delta: 1,
+        })
+      },
+    },
+  }
+</script>
+<style>
+  page {
+    background: #f2f3f5;
+  }
+</style>
+<style lang="scss" scoped>
+  .home {
+    padding-top: 200rpx;
+
+    .nav {
+      position: absolute;
+      left: 0;
+      top: 0;
+      width: 100%;
+      height: 356rpx;
+      background: #3e7ef8;
+      border-radius: 0 0 31rpx 31rpx;
+      .title {
+        position: relative;
+        text-align: center;
+        font-size: 32rpx;
+        font-weight: bold;
+        color: #ffffff;
+        .back {
+          position: absolute;
+          top: 0;
+          bottom: 0;
+          margin: auto;
+          left: 70rpx;
+          display: flex;
+        }
+      }
+    }
+
+    .main {
+      position: absolute;
+      width: 100%;
+      height: calc(100vh - 200rpx);
+      overflow: hidden;
+      padding-bottom: 64rpx;
+      .main-top {
+        padding: 0 32rpx;
+      }
+      .customer-box {
+        width: 100%;
+        background: #ffffff;
+        box-shadow: 0 6rpx 19rpx 2rpx rgba(0, 45, 132, 0.15);
+        border-radius: 32rpx;
+        padding: 22rpx 38rpx 68rpx 40rpx;
+        .header {
+          .name {
+            .img {
+              width: 46rpx;
+              height: 46rpx;
+              border-radius: 50%;
+              margin-right: 8rpx;
+            }
+            text {
+              font-size: 28rpx;
+              font-weight: bold;
+              color: #323232;
+            }
+          }
+          .date {
+            font-size: 24rpx;
+            color: #3e7ef8;
+          }
+        }
+        .info {
+          .info-item {
+            margin-top: 18rpx;
+            .info-label {
+              width: 162rpx;
+              text-align: left;
+              font-size: 24rpx;
+              color: #646464;
+            }
+            .info-txt {
+              flex: 1;
+              font-size: 24rpx;
+              color: #323232;
+            }
+          }
+        }
+      }
+      .data-list {
+        margin-top: 16rpx;
+        width: 100%;
+        height: calc(100vh - 532rpx);
+        background: #ffffff;
+        padding: 32rpx;
+        overflow: auto;
+        padding-bottom: 145rpx;
+        .status1 {
+          color: #4096fb;
+          background: rgba(64, 150, 251, 0.2);
+        }
+        .status2 {
+          background: rgba(255, 184, 60, 0.2);
+          color: #ffb83c;
+        }
+        .status3 {
+          color: #fe6936;
+          background: rgba(254, 105, 54, 0.2);
+        }
+      }
+    }
+    .fixed-btn-group {
+      position: fixed;
+      display: flex;
+      justify-content: space-around;
+      align-items: center;
+      width: 90rpx;
+      height: 90rpx;
+      bottom: 50rpx;
+      right: 50rpx;
+      box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+      border-radius: 20px;
+      transition: all 0.2s;
+      background: #fff;
+      .btn {
+        width: 60rpx;
+        height: 60rpx;
+        background: #3e7ef8;
+        border-radius: 50%;
+        margin: 10rpx;
+        font-size: 26rpx;
+        font-weight: bold;
+        color: #ffffff;
+      }
+    }
+  }
+</style>

+ 327 - 0
pages/partners/index.vue

@@ -0,0 +1,327 @@
+<!--
+ * @Author: liuzhenlin 461480418@qq.ocm
+ * @Date: 2023-01-12 11:57:48
+ * @LastEditors: liuzhenlin
+ * @LastEditTime: 2023-05-22 15:31:58
+ * @Description: file content
+ * @FilePath: \oms\pages\distributor\index.vue
+-->
+<template>
+  <view class="home">
+    <view class="nav">
+      <view :style="{ paddingTop }">
+        <view class="title" :style="[{ height }, { lineHeight: height }]">
+          <view class="back" @click="goBack()">
+            <u-icon name="arrow-left" color="#ffffff" size="22"></u-icon>
+          </view>
+          <text>合作伙伴</text>
+        </view>
+      </view>
+    </view>
+    <view class="main">
+      <!-- 搜索 -->
+      <view class="query-wrap">
+        <view class="search-container">
+          <view class="search-input">
+            <u-input
+              clearable
+              placeholderStyle="font-size:26rpx"
+              :customStyle="{ height: '66rpx' }"
+              v-model="partnerName"
+              prefixIcon="search"
+              prefixIconStyle="font-size: 22px;color: #909399"
+              placeholder="请选择公司"
+              shape="circle"
+              border="surround"
+              readonly></u-input>
+          </view>
+          <view class="search-btn" @click="selectCompany">选择</view>
+        </view>
+      </view>
+      <u-empty v-if="listData.length == 0" mode="list" text="暂无数据"></u-empty>
+      <scroll-view :scroll-y="true" class="data-list" @scrolltolower="lower" v-else>
+        <view>
+          <view class="data-item" v-for="(v, i) in listData" :key="i" @click="toDetails(v)">
+            <view class="customer-name flex">
+              <text class="name">{{ v.partnerName }}</text>
+            </view>
+            <view class="customer-info flex">
+              <view class="info-left flex_1">
+                <view class="info-row flex_l">
+                  <text class="info-label">负责区域:</text>
+                  <u-text color="#323232" size="24rpx" :text="v.territory || '-'"></u-text>
+                </view>
+                <view class="info-row flex_l">
+                  <text class="info-label">联系人:</text>
+                  <u-text color="#323232" size="24rpx" :text="v.name || '-'"></u-text>
+                </view>
+                <view class="info-row flex_l">
+                  <text class="info-label">联系方式:</text>
+                  <u-text color="#323232" size="24rpx" :text="v.contactWay || '-'"></u-text>
+                </view>
+              </view>
+            </view>
+          </view>
+          <u-loadmore :status="loadStatus" />
+        </view>
+      </scroll-view>
+    </view>
+    <!-- 消息提示 -->
+    <u-toast ref="uToast"></u-toast>
+    <select-company ref="company" @close="closeCust($event)"></select-company>
+  </view>
+</template>
+<script>
+  import SelectCompany from './components/SelectCompany.vue'
+  import partnerApi from '../../api/partner'
+  import to from 'await-to-js'
+  export default {
+    name: 'omsIndex',
+    components: { SelectCompany },
+    data() {
+      return {
+        openBtnWidth: false,
+        lineBg: require('@/static/images/up.png'),
+        height: '',
+        paddingTop: '',
+        pageNum: 0,
+        pageSize: 10,
+        listData: [], //客户列表
+        total: 0, //列表元素数量
+        loadStatus: '', //加载状态
+        partnerName: '', //经销商名称
+        partnerId: '', //经销商名称
+      }
+    },
+    created() {
+      const navData = uni.getMenuButtonBoundingClientRect()
+      this.height = navData.height + 'px'
+      this.paddingTop = navData.top + 'px'
+    },
+    onShow() {
+      this.getOptions()
+      this.initSearch()
+    },
+    methods: {
+      async initSearch() {
+        const [err, res] = await to(partnerApi.getCompanyList())
+        if (err) return
+        if (res.code == 200) {
+          this.partnerName = res.data.list[0].partnerName
+          this.partnerId = res.data.list[0].id
+          this.searchList()
+        }
+      },
+      selectCompany() {
+        this.$refs.company.open()
+      },
+      closeCust(data) {
+        this.partnerName = data.name
+        this.partnerId = data.id
+        this.searchList()
+      },
+      getOptions() {
+        Promise.all([this.getDicts('cust_idy')])
+          .then(([industry]) => {
+            // this.levelOptions = level.data.values || []
+            this.industryOptions = industry.data.values || []
+          })
+          .catch((err) => console.log(err))
+      },
+      // 确认
+      confirmFilter() {
+        this.searchList()
+      },
+      // 上拉滚动
+      lower() {
+        if (this.listData.length < this.total && this.loadStatus != 'loading') {
+          this.$u.throttle(this.getConcatData(), 2000, false)
+        }
+      },
+      // 查询列表
+      searchList() {
+        this.pageNum = 0
+        this.getConcatData(true)
+      },
+      async getConcatData(reset) {
+        this.loadStatus = 'loading'
+        this.pageNum++
+        let params = {
+          partnerId: this.partnerId,
+          pageNum: this.pageNum,
+          pageSize: this.pageSize,
+        }
+        const [err, res] = await to(partnerApi.getCompanyConcatList(params))
+        if (err) {
+          this.loadStatus = 'nomore'
+          return
+        }
+        if (res && res.code == 200) {
+          if (reset) {
+            this.listData = res.data.list || []
+          } else {
+            this.listData = [...this.listData, ...(res.data.list || [])]
+          }
+          this.total = res.data.total
+          this.loadStatus = this.listData.length == this.total ? 'nomore' : 'loadmore'
+        } else {
+          this.loadStatus = 'nomore'
+        }
+      },
+      goBack() {
+        uni.navigateBack({
+          //关闭当前页面,返回上一页面或多级页面。
+          delta: 1,
+        })
+      },
+      toDetails(v) {
+        uni.navigateTo({
+          //保留当前页面,跳转到应用内的某个页面
+          url: '/pages/partners/details?id=' + v.id,
+        })
+      },
+    },
+  }
+</script>
+<style>
+  page {
+    background: #f2f3f5;
+  }
+</style>
+<style lang="scss" scoped>
+  .home {
+    padding-top: 188rpx;
+
+    .nav {
+      position: absolute;
+      left: 0;
+      top: 0;
+      width: 100%;
+      height: 284rpx;
+      background: #3e7ef8;
+      .title {
+        position: relative;
+        text-align: center;
+        font-size: 32rpx;
+        font-weight: bold;
+        color: #ffffff;
+        .back {
+          position: absolute;
+          top: 0;
+          bottom: 0;
+          margin: auto;
+          left: 70rpx;
+          display: flex;
+        }
+      }
+    }
+
+    .main {
+      position: absolute;
+      width: 100%;
+      height: calc(100vh - 188rpx);
+      background: #ffffff;
+      box-shadow: 0 6rpx 19rpx 2rpx rgba(0, 45, 132, 0.15);
+      border-radius: 31rpx 31rpx 0 0;
+      padding: 0 32rpx;
+      padding-bottom: 64rpx;
+      .query-wrap {
+        padding-top: 20rpx;
+        .search-container {
+          display: flex;
+          align-items: center;
+          .search-input {
+            flex: 1;
+          }
+          .search-btn {
+            text-align: center;
+            line-height: 60rpx;
+            border-radius: 12rpx;
+            width: 100rpx;
+            height: 60rpx;
+            font-size: 26rpx;
+            margin: 0 0 0 12rpx;
+            background: $u-primary;
+            color: #ffffff;
+          }
+        }
+      }
+      .data-list {
+        width: 100%;
+        height: calc(100vh - 372rpx);
+        overflow: auto;
+        .data-item {
+          background: rgba(242, 243, 245, 0.5);
+          border-radius: 15rpx;
+          padding: 28rpx 40rpx 28rpx 38rpx;
+          margin-top: 32rpx;
+          .customer-name {
+            .name {
+              flex: 1;
+              color: #323232;
+              font-weight: bold;
+              font-size: 28rpx;
+              margin-right: 12rpx;
+            }
+            .user-code {
+              width: 180rpx;
+              height: 32rpx;
+              font-size: 24rpx;
+              color: #323232;
+              line-height: 32rpx;
+            }
+          }
+          .customer-info {
+            .info-left {
+              .transfer-btn {
+                margin-top: 20rpx;
+                width: 150rpx;
+              }
+              .info-row {
+                margin-top: 12rpx;
+                .info-label {
+                  color: #646464;
+                  font-size: 24rpx;
+                }
+              }
+            }
+            .info-right {
+              padding-top: 30rpx;
+              .user-img {
+                border-radius: 50%;
+                width: 46rpx;
+                height: 46rpx;
+              }
+            }
+          }
+        }
+      }
+    }
+
+    .fixed-btn-group {
+      position: fixed;
+      display: flex;
+      justify-content: space-around;
+      align-items: center;
+      width: 90rpx;
+      height: 90rpx;
+      bottom: 50rpx;
+      right: 50rpx;
+      box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+      border-radius: 20px;
+      transition: all 0.2s;
+      background: #fff;
+
+      .btn {
+        width: 60rpx;
+        height: 60rpx;
+        background: #3e7ef8;
+        border-radius: 50%;
+        margin: 10rpx;
+        font-size: 26rpx;
+        font-weight: bold;
+        color: #ffffff;
+      }
+    }
+  }
+</style>

+ 3 - 1
pages/project/components/projectDetail.vue

@@ -367,7 +367,9 @@
       }
     },
 
-    mounted() {},
+    mounted() {
+      this.init()
+    },
 
     methods: {
       init() {

+ 17 - 15
pages/project/create.vue

@@ -34,6 +34,21 @@
               border="none"></u-input>
             <u-icon slot="right" name="arrow-right"></u-icon>
           </u-form-item>
+          <u-form-item prop="productLineVal" borderBottom customStyle="padding:40rpx 0 30rpx" @click="showLine = true">
+            <view class="form-label flex_l">
+              <view class="label-tag"></view>
+              产品线
+            </view>
+            <u-input
+              :readonly="true"
+              placeholder="请选择产品线"
+              v-model="addForm.productLineVal"
+              border="none"
+              suffixIcon="arrow-down"
+              suffixIconStyle="color:#CDCDCD"
+              clearable
+              customStyle="padding: 0 30rpx 0 12rpx"></u-input>
+          </u-form-item>
           <u-form-item prop="nboName" borderBottom customStyle="padding:40rpx 0 30rpx">
             <view class="form-label flex_l">
               <view class="label-tag"></view>
@@ -150,21 +165,6 @@
               clearable
               customStyle="padding: 0 30rpx 0 12rpx"></u-input>
           </u-form-item>
-          <u-form-item prop="productLineVal" borderBottom customStyle="padding:40rpx 0 30rpx" @click="showLine = true">
-            <view class="form-label flex_l">
-              <view class="label-tag"></view>
-              产品线
-            </view>
-            <u-input
-              :readonly="true"
-              placeholder="请选择产品线"
-              v-model="addForm.productLineVal"
-              border="none"
-              suffixIcon="arrow-down"
-              suffixIconStyle="color:#CDCDCD"
-              clearable
-              customStyle="padding: 0 30rpx 0 12rpx"></u-input>
-          </u-form-item>
           <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx" @click="showSource = true">
             <view class="form-label flex_l">项目预算</view>
             <u-input
@@ -573,6 +573,7 @@
         if (user) {
           this.addForm.custId = user.id
           this.addForm.custName = user.name
+          this.addForm.nboName = user.name + this.addForm.productLineVal
         }
       },
       // 经销商
@@ -621,6 +622,7 @@
       pickLine(e) {
         this.addForm.productLine = e.value[0].key
         this.addForm.productLineVal = e.value[0].value
+        this.addForm.nboName = this.addForm.custName + this.addForm.productLineVal
         this.showLine = false
       },
       // 选择销售类型

+ 22 - 1
pages/publicPages/follow.vue

@@ -2,7 +2,7 @@
  * @Author: liuzhenlin 461480418@qq.ocm
  * @Date: 2023-01-12 11:57:48
  * @LastEditors: liuzhenlin
- * @LastEditTime: 2023-05-22 17:37:35
+ * @LastEditTime: 2023-07-03 10:43:41
  * @Description: file content
  * @FilePath: \oms\pages\publicPages\follow.vue
 -->
@@ -152,6 +152,8 @@
     <project-contact ref="projectConcat" @close="closeConcat"></project-contact>
     <!-- 经销商代理商联系人 -->
     <distr-contact ref="distrConcat" @close="closeConcat" :distrType="targetType"></distr-contact>
+    <!-- 联系人 -->
+    <select-user ref="userConcat" @close="closeConcat"></select-user>
   </view>
 </template>
 <script>
@@ -162,15 +164,18 @@
   import custApi from '../../api/customer'
   import prodApi from '../../api/project'
   import bidApi from '../../api/bid'
+  import partnerApi from '../../api/partner'
   import ProjectContact from '@/components/ProjectContact'
   import CustomerContact from '@/components/CustomerContact'
   import DistrContact from '@/components/DistrContact'
+  import SelectUser from '@/components/SelectUser'
   export default {
     name: 'omsIndex',
     components: {
       CustomerContact,
       ProjectContact,
       DistrContact,
+      SelectUser,
     },
     data() {
       return {
@@ -313,6 +318,13 @@
           if (res && res.code == 200) {
             this.details = res.data
           }
+        } else if (this.targetType == '70') {
+          // 合作伙伴信息
+          const [err, res] = await to(partnerApi.getCompanyConcat({ id: this.curId }))
+          if (err) return
+          if (res && res.code == 200) {
+            this.details = res.data
+          }
         }
       },
       // 打开联系人
@@ -325,6 +337,8 @@
           this.$refs.distrConcat.open(this.details.id)
         } else if (this.targetType == '60') {
           this.$refs.concat.open(this.details.custId)
+        } else if (this.targetType == '70') {
+          this.$refs.userConcat.open()
         }
       },
       // 行业选择
@@ -381,6 +395,13 @@
                 targetId: this.details.id,
                 targetName: this.details.title,
               }
+            } else if (this.targetType == '70') {
+              idParams = {
+                custId: null,
+                custName: null,
+                targetId: this.details.id,
+                targetName: this.details.name,
+              }
             }
             let params = Object.assign(
               {

+ 64 - 0
style/common.scss

@@ -238,4 +238,68 @@ view {
 
 .mb5 {
   margin-bottom: 5px;
+}
+
+.filter-popup {
+  background: rgba(0, 0, 0, 0.8);
+  position: fixed;
+  width: 100%;
+  height: 100%;
+  left: 0;
+  z-index: 1;
+
+  .filter-wrap {
+    width: 100%;
+    padding: 20rpx;
+    background: #ffffff;
+
+    .filter-item {
+      padding-bottom: 30rpx;
+
+      .tit {
+        font-size: 26rpx;
+        color: #323232;
+        font-weight: bold;
+        padding-bottom: 20rpx;
+      }
+
+      .menu-list {
+        display: flex;
+        flex-wrap: wrap;
+
+        .menu-item {
+          margin-right: 40rpx;
+          margin-bottom: 20rpx;
+        }
+      }
+    }
+  }
+
+  .btn-box {
+    width: 698rpx;
+    height: 75px;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+
+    >view {
+      width: 320rpx;
+      height: 40px;
+      border-radius: 40px;
+      border: solid 1rpx #ec652b;
+      align-items: center;
+      justify-content: center;
+      text-align: center;
+      line-height: 40px;
+    }
+
+    .reset {
+      color: #ec652b;
+    }
+
+    .submit {
+      color: #fff;
+      background-color: #ec652b;
+    }
+  }
 }