Selaa lähdekoodia

fix:选择组件修改样式和操作方式,增加协议配置,修改项目创建功能点

liuzl 2 vuotta sitten
vanhempi
commit
56e32edd94

+ 26 - 14
.env.dev.js

@@ -1,20 +1,32 @@
+/*
+ * @Author: liuzhenlin 461480418@qq.ocm
+ * @Date: 2023-02-22 11:11:21
+ * @LastEditors: liuzhenlin
+ * @LastEditTime: 2023-02-22 17:28:30
+ * @Description: file content
+ * @FilePath: \oms\.env.dev.js
+ */
 const config = {
-  // # 租户码
-  VUE_APP_TENANT: 'default',
+    // # 租户码
+    VUE_APP_TENANT: 'default',
 
-  // # GateWay地址
-  // VUE_APP_MicroSrvProxy_API: 'http://192.168.0.65:9981/',
-  VUE_APP_MicroSrvProxy_API: 'http://192.168.0.252:8200/',
+    // # GateWay地址
+    // VUE_APP_MicroSrvProxy_API: 'http://192.168.0.65:9981/',
+    VUE_APP_MicroSrvProxy_API: 'http://192.168.0.252:8200/',
+    // VUE_APP_MicroSrvProxy_API: 'https://oms.dashoo.cn:9981/',
 
-  // # 登录验证微服务名称
-  VUE_APP_AdminPath: 'dashoo.labsop.lims_latest_opms_admin',
-  // VUE_APP_AdminPath: 'dashoo.opms.admin-0.0.1',
+    // # 登录验证微服务名称
+    VUE_APP_AdminPath: 'dashoo.labsop.lims_latest_opms_admin',
+    // VUE_APP_AdminPath: 'dashoo.opms.admin-0.0.1',
 
-  // # 业务接口微服务名称
-  VUE_APP_ParentPath: 'dashoo.labsop.lims_latest_opms_parent',
-  // VUE_APP_ParentPath: 'dashoo.opms.parent-0.0.1',
+    // # 业务接口微服务名称
+    VUE_APP_ParentPath: 'dashoo.labsop.lims_latest_opms_parent',
+    // VUE_APP_ParentPath: 'dashoo.opms.parent-0.0.1',
 
-  // # 文件上传
-  VUE_APP_UPLOAD_WEED: 'http://192.168.0.252:9333/dir/assign',
+    // # 文件上传
+    VUE_APP_UPLOAD_WEED: 'http://192.168.0.252:9333/dir/assign',
+
+    // 协议
+    VUE_APP_PROTOCOL:'http://'
 }
-module.exports = config
+module.exports = config

+ 37 - 13
.env.prod.js

@@ -1,16 +1,40 @@
+/*
+ * @Author: liuzhenlin 461480418@qq.ocm
+ * @Date: 2023-02-22 11:11:21
+ * @LastEditors: liuzhenlin
+ * @LastEditTime: 2023-02-23 10:50:18
+ * @Description: file content
+ * @FilePath: \oms\.env.prod.js
+ */
+/*
+ * @Author: liuzhenlin 461480418@qq.ocm
+ * @Date: 2023-02-22 11:11:21
+ * @LastEditors: liuzhenlin
+ * @LastEditTime: 2023-02-23 10:11:57
+ * @Description: file content
+ * @FilePath: \oms\.env.dev.js
+ */
 const config = {
-  // # 租户码
-  VUE_APP_TENANT:"default",
-  
-  // # GateWay地址
-  VUE_APP_MicroSrvProxy_API:"http://192.168.0.252:8100/",
-  
-  // # 登录验证微服务名称
-  VUE_APP_AdminPath:"dashoo.labsop.lims_latest_opms_admin",
-  
-  // # 业务接口微服务名称
-  VUE_APP_ParentPath:"dashoo.labsop.lims_latest_opms_parent",
+    // # 租户码
+    VUE_APP_TENANT: '8b9ec443',
+
+    // # GateWay地址
+    // VUE_APP_MicroSrvProxy_API: 'http://192.168.0.65:9981/',
+    // VUE_APP_MicroSrvProxy_API: 'http://192.168.0.252:8200/',
+    VUE_APP_MicroSrvProxy_API: 'https://oms.dashoo.cn/api/',
+
+    // # 登录验证微服务名称
+    // VUE_APP_AdminPath: 'dashoo.labsop.lims_latest_opms_admin',
+    VUE_APP_AdminPath: 'dashoo.opms.admin-0.0.1',
+
+    // # 业务接口微服务名称
+    // VUE_APP_ParentPath: 'dashoo.labsop.lims_latest_opms_parent',
+    VUE_APP_ParentPath: 'dashoo.opms.parent-0.0.1',
+
     // # 文件上传
-    VUE_APP_UPLOAD_WEED: 'http://192.168.0.252:9333/dir/assign',
+    VUE_APP_UPLOAD_WEED: 'https://oms.dashoo.cn/dir/assign',
+
+    // 协议
+    VUE_APP_PROTOCOL:'https://'
 }
-module.exports = config
+module.exports = config

+ 6 - 8
components/CustomerContact.vue

@@ -9,7 +9,10 @@
 <template>
   <view>
     <u-popup :show="selectVisible" @close="close">
-      <view class="tit">选择客户联系人</view>
+      <view class="select-header">
+        <view class="tit">选择客户联系人</view>
+        <view class="save-btn" @click="close()">保存</view>
+      </view>
       <view class="search-container">
         <view class="search-input">
           <u-input
@@ -21,9 +24,9 @@
             prefixIconStyle="font-size: 22px;color: #909399"
             placeholder="请输入联系人名称"
             shape="circle"
+            @input="getUserList()"
             border="surround"></u-input>
         </view>
-        <view class="search-btn" @click="getUserList()">搜索</view>
       </view>
       <u-empty mode="list" v-if="userList.length == 0"></u-empty>
       <view class="concat-list" v-else>
@@ -65,7 +68,7 @@
         const [err, res] = await to(userApi.getContact(params))
         if (err) return
         if (res.code == 200) {
-          if (res.data.list.length > 0) {
+          if (res.data.list && res.data.list.length > 0) {
             this.userList = res.data.list.map((item) => ({ ...item, label: item.cuctName }))
           } else {
             this.userList = []
@@ -90,11 +93,6 @@
 </script>
 
 <style lang="scss" scoped>
-  .tit {
-    font-size: 26rpx;
-    font-weight: bold;
-    padding: 30rpx 0 0 30rpx;
-  }
   .search-container {
     padding: 30rpx 30rpx 0 30rpx;
     display: flex;

+ 6 - 8
components/ProjectContact.vue

@@ -9,7 +9,10 @@
 <template>
   <view>
     <u-popup :show="selectVisible" @close="close">
-      <view class="tit">选择项目联系人</view>
+      <view class="select-header">
+        <view class="tit">选择项目联系人</view>
+        <view class="save-btn" @click="close()">保存</view>
+      </view>
       <view class="search-container">
         <view class="search-input">
           <u-input
@@ -21,9 +24,9 @@
             prefixIconStyle="font-size: 22px;color: #909399"
             placeholder="请输入联系人名称"
             shape="circle"
+            @input="getUserList()"
             border="surround"></u-input>
         </view>
-        <view class="search-btn" @click="getUserList()">搜索</view>
       </view>
       <u-empty mode="list" v-if="userList.length == 0"></u-empty>
       <view class="concat-list" v-else>
@@ -65,7 +68,7 @@
         const [err, res] = await to(userApi.getProjectContact(params))
         if (err) return
         if (res.code == 200) {
-          if (res.data.list.length > 0) {
+          if (res.data.list && res.data.list.length > 0) {
             this.userList = res.data.list.map((item) => ({ id: item.id, label: item.cuctName }))
           } else {
             this.userList = []
@@ -90,11 +93,6 @@
 </script>
 
 <style lang="scss" scoped>
-  .tit {
-    font-size: 26rpx;
-    font-weight: bold;
-    padding: 30rpx 0 0 30rpx;
-  }
   .search-container {
     padding: 30rpx 30rpx 0 30rpx;
     display: flex;

+ 8 - 10
components/SelectCustomer.vue

@@ -2,14 +2,17 @@
  * @Author: liuzhenlin 461480418@qq.ocm
  * @Date: 2023-02-15 10:34:49
  * @LastEditors: liuzhenlin
- * @LastEditTime: 2023-02-20 11:38:06
+ * @LastEditTime: 2023-02-23 10:57:44
  * @Description: file content
- * @FilePath: \frontend_mobile\components\SelectCustomer.vue
+ * @FilePath: \oms\components\SelectCustomer.vue
 -->
 <template>
   <view>
     <u-popup :show="selectVisible" @close="close">
-      <view class="tit">选择客户</view>
+      <view class="select-header">
+        <view class="tit">选择客户</view>
+        <view class="save-btn" @click="close()">保存</view>
+      </view>
       <view class="search-container">
         <view class="search-input">
           <u-input
@@ -21,9 +24,9 @@
             prefixIconStyle="font-size: 22px;color: #909399"
             placeholder="请输入客户名称"
             shape="circle"
+            @input="getUserList()"
             border="surround"></u-input>
         </view>
-        <view class="search-btn" @click="getUserList()">搜索</view>
       </view>
       <u-empty mode="list" v-if="userList.length == 0"></u-empty>
       <view class="concat-list" v-else>
@@ -71,7 +74,7 @@
         const [err, res] = await to(customerApi.getList(params))
         if (err) return
         if (res.code == 200) {
-          if (res.data.list.length > 0) {
+          if (res.data.list && res.data.list.length > 0) {
             this.userList = res.data.list.map((item) => ({
               id: item.id,
               label: `${item.custName}/${item.custIndustry}`,
@@ -98,11 +101,6 @@
 </script>
 
 <style lang="scss" scoped>
-  .tit {
-    font-size: 26rpx;
-    font-weight: bold;
-    padding: 30rpx 0 0 30rpx;
-  }
   .search-container {
     padding: 30rpx 30rpx 0 30rpx;
     display: flex;

+ 7 - 3
components/SelectDealer.vue

@@ -9,7 +9,10 @@
 <template>
   <view>
     <u-popup :show="selectVisible" @close="close">
-      <view class="tit">选择经销商/代理商</view>
+      <view class="select-header">
+        <view class="tit">选择经销商/代理商</view>
+        <view class="save-btn" @click="close()">保存</view>
+      </view>
       <view class="search-container">
         <view class="search-input">
           <u-input
@@ -21,9 +24,9 @@
             prefixIconStyle="font-size: 22px;color: #909399"
             placeholder="请输入客户名称"
             shape="circle"
+            @input="getList()"
             border="surround"></u-input>
         </view>
-        <view class="search-btn" @click="getList()">搜索</view>
       </view>
       <view class="tit">经销商名称/助记名/所在省份/归属销售/负责人</view>
       <u-empty mode="list" v-if="userList.length == 0"></u-empty>
@@ -64,7 +67,7 @@
         const [err, res] = await to(distrApi.getList(params))
         if (err) return
         if (res.code == 200) {
-          if (res.data.list.length > 0) {
+          if (res.data.list && res.data.list.length > 0) {
             this.userList = res.data.list.map((item) => ({
               id: item.id,
               label: `${item.distName}/${item.abbrName}/${item.provinceDesc}/${item.belongSale}/${item.distBoss}`,
@@ -100,6 +103,7 @@
     padding: 30rpx 30rpx 0 30rpx;
     display: flex;
     align-items: center;
+
     .search-input {
       flex: 1;
     }

+ 7 - 3
components/SelectProduct.vue

@@ -9,7 +9,10 @@
 <template>
   <view>
     <u-popup :show="selectVisible" @close="close">
-      <view class="tit">选择产品</view>
+      <view class="select-header">
+        <view class="tit">选择产品</view>
+        <view class="save-btn" @click="close()">保存</view>
+      </view>
       <view class="search-container">
         <view class="search-input">
           <u-input
@@ -21,9 +24,9 @@
             prefixIconStyle="font-size: 22px;color: #909399"
             placeholder="请输入产品名称"
             shape="circle"
+            @input="getProjectList()"
             border="surround"></u-input>
         </view>
-        <view class="search-btn" @click="getProjectList()">搜索</view>
       </view>
       <view class="tit">产品名称/产品类别/产品型号</view>
 
@@ -76,7 +79,7 @@
         const [err, res] = await to(productApi.getList(params))
         if (err) return
         if (res.code == 200) {
-          if (res.data.list) {
+          if (res.data.list && res.data.list.length > 0) {
             this.checkboxList = res.data.list.map((item) => ({
               ...item,
               label: `${item.prodName}/${item.prodClass}/${item.prodCode}`,
@@ -135,6 +138,7 @@
     padding: 30rpx 30rpx 0 30rpx;
     display: flex;
     align-items: center;
+
     .search-input {
       flex: 1;
     }

+ 8 - 10
components/SelectUser.vue

@@ -2,14 +2,17 @@
  * @Author: liuzhenlin 461480418@qq.ocm
  * @Date: 2023-02-15 10:34:49
  * @LastEditors: liuzhenlin
- * @LastEditTime: 2023-02-15 14:10:58
+ * @LastEditTime: 2023-02-23 11:20:56
  * @Description: file content
- * @FilePath: \oms\components\selectUser.vue
+ * @FilePath: \oms\components\SelectUser.vue
 -->
 <template>
   <view>
     <u-popup :show="selectVisible" @close="close">
-      <view class="tit">选择员工</view>
+      <view class="select-header">
+        <view class="tit">选择员工</view>
+        <view class="save-btn" @click="close()">保存</view>
+      </view>
       <view class="search-container">
         <view class="search-input">
           <u-input
@@ -21,9 +24,9 @@
             prefixIconStyle="font-size: 22px;color: #909399"
             placeholder="请输入姓名"
             shape="circle"
+            @input="getUserList()"
             border="surround"></u-input>
         </view>
-        <view class="search-btn" @click="getUserList()">搜索</view>
       </view>
       <u-empty mode="list" v-if="userList.length == 0"></u-empty>
       <view class="concat-list" v-else>
@@ -71,7 +74,7 @@
         const [err, res] = await to(userApi.getList(params))
         if (err) return
         if (res.code == 200) {
-          if (res.data.list) {
+          if (res.data.list && res.data.list.length > 0) {
             this.userList = res.data.list.map((item) => ({ id: item.id, label: item.nickName }))
           } else {
             this.userList = []
@@ -94,11 +97,6 @@
 </script>
 
 <style lang="scss" scoped>
-  .tit {
-    font-size: 26rpx;
-    font-weight: bold;
-    padding: 30rpx 0 0 30rpx;
-  }
   .search-container {
     padding: 30rpx 30rpx 0 30rpx;
     display: flex;

+ 56 - 40
pages/contract/collection.vue

@@ -32,7 +32,11 @@
             <view class="label-tag"></view>
             回款日期
           </view>
-          <u-input v-model="form.collectionDatetime" disabled disabledColor="#ffffff" placeholder="请选择回款日期"></u-input>
+          <u-input
+            v-model="form.collectionDatetime"
+            disabled
+            disabledColor="#ffffff"
+            placeholder="请选择回款日期"></u-input>
         </u-form-item>
         <u-form-item prop="collectionType" @click="showPicker = true">
           <view class="form-label flex_l">
@@ -46,7 +50,12 @@
             <view class="label-tag"></view>
             备注
           </view>
-          <u-textarea fontSize="26rpx" v-model="form.remark" placeholder="输入备注" height="180" :count="true"
+          <u-textarea
+            fontSize="26rpx"
+            v-model="form.remark"
+            placeholder="输入备注"
+            height="180"
+            :count="true"
             maxlength="300"></u-textarea>
         </u-form-item>
       </u-form>
@@ -73,29 +82,35 @@
           contractId: null, //合同id
           collectionAmount: '', //回款金额
           collectionType: '', //回款方式
-          collectionName:'',
+          collectionName: '',
           remark: '', //备注
         },
         rules: {
-          contractCode: [{
-            required: true,
-            trigger: 'blur',
-            message: '请选择合同'
-          }],
-          collectionAmount: [{
-            required: true,
-            trigger: 'blur',
-            message: '请输入回款金额'
-          }],
-          collectionDatetime: [{
-            required: true,
-            trigger: 'change',
-            message: '请选择回款日期'
-          }, ],
+          contractCode: [
+            {
+              required: true,
+              trigger: 'blur',
+              message: '请选择合同',
+            },
+          ],
+          collectionAmount: [
+            {
+              required: true,
+              trigger: 'blur',
+              message: '请输入回款金额',
+            },
+          ],
+          collectionDatetime: [
+            {
+              required: true,
+              trigger: 'change',
+              message: '请选择回款日期',
+            },
+          ],
         },
         show: false,
         showPicker: false,
-        collectionTypeOption: []
+        collectionTypeOption: [],
       }
     },
     created() {
@@ -114,13 +129,11 @@
         Promise.all([this.getDicts('collection_type')])
           .then(([collectionType]) => {
             this.collectionTypeOption = collectionType.data.values || []
-            this.collectionTypeOption.forEach(item => item.name = item.value)
+            this.collectionTypeOption.forEach((item) => (item.name = item.value))
           })
           .catch((err) => console.log(err))
       },
-      closeMoveInModel() {
-
-      },
+      closeMoveInModel() {},
       confirmCalendar(val) {
         this.form.collectionDatetime = val[0]
         this.show = false
@@ -132,24 +145,27 @@
       },
       async save() {
         let params = {
-          ...this.form
+          ...this.form,
         }
         delete params.collectionName
         params.collectionAmount = parseInt(params.collectionAmount)
-        this.$refs.form.validate().then(async valid => {
-          if (valid) {
-            console.log(valid);
-            const [err, res] = await to(api.addCollection(params))
-            if (err) return
-            this.$refs.uToast.show({
-              type: 'success',
-              message: '创建成功',
-              complete: () => {
-                this.goBack()
-              },
-            })
-          }
-        }).catch(errors => {})
+        this.$refs.form
+          .validate()
+          .then(async (valid) => {
+            if (valid) {
+              console.log(valid)
+              const [err, res] = await to(api.addCollection(params))
+              if (err) return
+              this.$refs.uToast.show({
+                type: 'success',
+                message: '创建成功',
+                complete: () => {
+                  this.goBack()
+                },
+              })
+            }
+          })
+          .catch((errors) => {})
       },
       goBack() {
         uni.navigateBack({
@@ -210,9 +226,9 @@
         .label-tag {
           width: 15rpx;
           height: 15rpx;
-          background: rgba(62, 126, 248, 0.6);
+          background: #ff4d4f;
           border-radius: 50%;
-          margin-right: -4rpx;
+          margin-right: 10rpx;
         }
       }
 

+ 2 - 2
pages/contract/invoice.vue

@@ -215,9 +215,9 @@
         .label-tag {
           width: 15rpx;
           height: 15rpx;
-          background: rgba(62, 126, 248, 0.6);
+          background:  #ff4d4f;
           border-radius: 50%;
-          margin-right: -4rpx;
+          margin-right: 10rpx;
         }
       }
 

+ 2 - 3
pages/customer/add.vue

@@ -96,7 +96,6 @@
         </u-form-item>
         <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx">
           <view class="form-label flex_l">
-            <view class="label-tag"></view>
             备注
           </view>
           <u-input
@@ -447,9 +446,9 @@
         .label-tag {
           width: 15rpx;
           height: 15rpx;
-          background: rgba(62, 126, 248, 0.6);
+          background:  #ff4d4f;
           border-radius: 50%;
-          margin-right: -4rpx;
+          margin-right: 10rpx;
         }
       }
       .save {

+ 2 - 2
pages/customer/transfer.vue

@@ -204,9 +204,9 @@
         .label-tag {
           width: 15rpx;
           height: 15rpx;
-          background: rgba(62, 126, 248, 0.6);
+          background:  #ff4d4f;
           border-radius: 50%;
-          margin-right: -4rpx;
+          margin-right: 10rpx;
         }
       }
       .save {

+ 31 - 10
pages/my/index.vue

@@ -2,9 +2,9 @@
  * @Author: liuzhenlin 461480418@qq.ocm
  * @Date: 2023-01-12 11:57:48
  * @LastEditors: liuzhenlin
- * @LastEditTime: 2023-01-16 17:52:26
+ * @LastEditTime: 2023-02-22 15:46:58
  * @Description: file content
- * @FilePath: \opms\pages\my\index.vue
+ * @FilePath: \oms\pages\my\index.vue
 -->
 <template>
   <view class="home">
@@ -17,12 +17,14 @@
           <text>我的</text>
         </view>
         <view class="user-info flex flex-middle">
-          <image class="user-img" src="@/static/images/user.jpg" mode="scaleToFill" />
+          <image class="user-img" :src="avatar || require('@/static/images/user.jpg')" mode="scaleToFill" />
           <view class="info flex1 flex-column flex_1">
             <u-text :lines="1" size="32rpx" color="#fff" :bold="true" :text="nickName"></u-text>
             <u-text :lines="1" size="24rpx" color="#fff" :text="postName"></u-text>
+            <!-- <u-text :lines="1" size="24rpx" color="#fff" text="西南地区销售工程师"></u-text> -->
+            <u-text :lines="1" size="24rpx" color="#fff" text="登出" @click="logOut()"></u-text>
           </view>
-          <u-icon name="arrow-right" color="#ffffff" size="18"></u-icon>
+          <!-- <u-icon name="arrow-right" color="#ffffff" size="18"></u-icon> -->
         </view>
       </view>
     </view>
@@ -67,9 +69,9 @@
   </view>
 </template>
 <script>
-  import {
-    mapGetters
-  } from 'vuex'
+  import { mapGetters } from 'vuex'
+  import to from 'await-to-js'
+  import userApi from '../../api/system/user'
   export default {
     name: 'opsIndex',
     data() {
@@ -79,7 +81,7 @@
       }
     },
     computed: {
-      ...mapGetters(['nickName', 'postName']),
+      ...mapGetters(['nickName', 'postName', 'avatar']),
     },
     created() {
       const navData = uni.getMenuButtonBoundingClientRect()
@@ -87,8 +89,27 @@
       this.height = navData.height + 'px'
       this.paddingTop = navData.top + 'px'
     },
-    mounted() {},
-    methods: {},
+    mounted() {
+      console.log(this.nickName, this.avatar)
+    },
+    methods: {
+      async logOut() {
+        const [err, res] = await to(userApi.logout())
+        if (err) return
+        if (res.code == 200) {
+          uni.showToast({
+            title: '登出成功',
+            icon: 'none',
+            complete: async () => {
+              uni.removeStorageSync('opms_token')
+              uni.reLaunch({
+                url: '/pages/login/index',
+              })
+            },
+          })
+        }
+      },
+    },
   }
 </script>
 <style>

+ 63 - 69
pages/project/create.vue

@@ -2,9 +2,9 @@
  * @Author: liuzhenlin 461480418@qq.ocm
  * @Date: 2023-01-12 11:57:48
  * @LastEditors: liuzhenlin
- * @LastEditTime: 2023-02-21 19:28:18
+ * @LastEditTime: 2023-02-22 13:56:08
  * @Description: file content
- * @FilePath: \frontend_mobile\pages\project\create.vue
+ * @FilePath: \oms\pages\project\create.vue
 -->
 <template>
   <view class="home">
@@ -21,6 +21,19 @@
     <view class="main">
       <view class="step1" v-if="step == 1">
         <u-form :model="addForm" :rules="rules" ref="addForm" label-width="0">
+          <u-form-item prop="custName" borderBottom customStyle="padding:40rpx 0 30rpx" @click="$refs.cust.open()">
+            <view class="form-label flex_l">
+              <view class="label-tag"></view>
+              选择客户
+            </view>
+            <u-input
+              v-model="addForm.custName"
+              disabled
+              disabledColor="#ffffff"
+              placeholder="请选择关联客户"
+              border="none"></u-input>
+            <u-icon slot="right" name="arrow-right"></u-icon>
+          </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>
@@ -34,19 +47,6 @@
               clearable
               customStyle="padding: 0 30rpx 0 12rpx"></u-input>
           </u-form-item>
-          <u-form-item prop="custName" borderBottom customStyle="padding:40rpx 0 30rpx" @click="$refs.cust.open()">
-            <view class="form-label flex_l">
-              <view class="label-tag"></view>
-              关联客户
-            </view>
-            <u-input
-              v-model="addForm.custName"
-              disabled
-              disabledColor="#ffffff"
-              placeholder="请选择关联客户"
-              border="none"></u-input>
-            <u-icon slot="right" name="arrow-right"></u-icon>
-          </u-form-item>
           <u-form-item
             prop="nboSourceVal"
             borderBottom
@@ -82,10 +82,7 @@
               customStyle="padding: 0 30rpx 0 12rpx"></u-input>
           </u-form-item>
           <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx">
-            <view class="form-label flex_l">
-              <view class="label-tag"></view>
-              职位
-            </view>
+            <view class="form-label flex_l">职位</view>
             <u-input
               placeholder="请输入职位"
               v-model="addForm.contactPostion"
@@ -95,10 +92,7 @@
               customStyle="padding: 0 30rpx 0 12rpx"></u-input>
           </u-form-item>
           <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx">
-            <view class="form-label flex_l">
-              <view class="label-tag"></view>
-              联系电话
-            </view>
+            <view class="form-label flex_l">联系电话</view>
             <u-input
               placeholder="请输入联系电话"
               v-model="addForm.contactTelephone"
@@ -107,7 +101,7 @@
               clearable
               customStyle="padding: 0 30rpx 0 12rpx"></u-input>
           </u-form-item>
-          <u-form-item prop="saleName" borderBottom customStyle="padding:40rpx 0 30rpx" @click="$refs.user.open()">
+          <!-- <u-form-item prop="saleName" borderBottom customStyle="padding:40rpx 0 30rpx" @click="$refs.user.open()">
             <view class="form-label flex_l">
               <view class="label-tag"></view>
               销售工程师
@@ -121,7 +115,7 @@
               suffixIconStyle="color:#CDCDCD"
               clearable
               customStyle="padding: 0 30rpx 0 12rpx"></u-input>
-          </u-form-item>
+          </u-form-item> -->
           <u-form-item prop="salesVal" borderBottom customStyle="padding:40rpx 0 30rpx" @click="showModel = true">
             <view class="form-label flex_l">
               <view class="label-tag"></view>
@@ -168,10 +162,7 @@
               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 class="label-tag"></view>
-              项目预算
-            </view>
+            <view class="form-label flex_l">项目预算</view>
             <u-input
               type="number"
               placeholder="输入项目预算"
@@ -198,10 +189,7 @@
               customStyle="padding: 0 30rpx 0 12rpx"></u-input>
           </u-form-item>
           <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx" @click="showEstTransDate = true">
-            <view class="form-label flex_l">
-              <view class="label-tag"></view>
-              预计成交时间
-            </view>
+            <view class="form-label flex_l">预计成交时间</view>
             <u-input
               :readonly="true"
               placeholder="请选择预计成交时间"
@@ -213,10 +201,7 @@
               customStyle="padding: 0 30rpx 0 12rpx"></u-input>
           </u-form-item>
           <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx" @click="showPlanDate = true">
-            <view class="form-label flex_l">
-              <view class="label-tag"></view>
-              计划采购时间
-            </view>
+            <view class="form-label flex_l">计划采购时间</view>
             <u-input
               :readonly="true"
               placeholder="请选择计划采购时间"
@@ -228,10 +213,7 @@
               customStyle="padding: 0 30rpx 0 12rpx"></u-input>
           </u-form-item>
           <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx" @click="showDate = true">
-            <view class="form-label flex_l">
-              <view class="label-tag"></view>
-              风险情况
-            </view>
+            <view class="form-label flex_l">风险情况</view>
             <u-input
               placeholder="输入风险情况"
               v-model="addForm.riskProfile"
@@ -241,10 +223,7 @@
               customStyle="padding: 0 30rpx 0 12rpx"></u-input>
           </u-form-item>
           <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx" @click="showDate = true">
-            <view class="form-label flex_l">
-              <view class="label-tag"></view>
-              困难点
-            </view>
+            <view class="form-label flex_l">困难点</view>
             <u-input
               placeholder="输入困难点"
               v-model="addForm.difficulty"
@@ -254,10 +233,7 @@
               customStyle="padding: 0 30rpx 0 12rpx"></u-input>
           </u-form-item>
           <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx" @click="showDate = true">
-            <view class="form-label flex_l">
-              <view class="label-tag"></view>
-              竞争公司
-            </view>
+            <view class="form-label flex_l">竞争公司</view>
             <u-input
               placeholder="输入竞争公司"
               v-model="addForm.competitor"
@@ -267,10 +243,7 @@
               customStyle="padding: 0 30rpx 0 12rpx"></u-input>
           </u-form-item>
           <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx" @click="showDate = true">
-            <view class="form-label flex_l">
-              <view class="label-tag"></view>
-              介入情况
-            </view>
+            <view class="form-label flex_l">介入情况</view>
             <u-input
               placeholder="输入介入情况"
               v-model="addForm.intervention"
@@ -295,7 +268,7 @@
       </view>
       <view class="step2" v-else-if="step == 2">
         <view class="step-tit">添加产品</view>
-        <view class="add-btn" @click="$refs.product.open()">添加产品</view>
+        <view class="add-btn" @click="$refs.product.open()">+</view>
         <view class="product-wrap">
           <view class="product-item" v-for="(v, i) in productList" :key="v.id">
             <view class="product-label flex_l">
@@ -325,7 +298,7 @@
           </view>
         </view>
       </view>
-      <view class="step3" v-else-if="step == 3">
+      <!-- <view class="step3" v-else-if="step == 3">
         <u-form :model="addForm" :rules="rules" ref="addForm" label-width="0">
           <u-form-item
             prop="followTime"
@@ -378,11 +351,11 @@
               customStyle="padding: 0 30rpx 0 12rpx"></u-input>
           </u-form-item>
         </u-form>
-      </view>
+      </view> -->
       <view class="center">
         <view class="handle-btn" v-if="step > 1" @click="previousStep">上一步</view>
-        <view class="handle-btn" v-if="step < 3" @click="nextStep">下一步</view>
-        <view class="handle-btn" v-if="step == 3" @click="handleAdd">保存</view>
+        <view class="handle-btn" v-if="step < 2" @click="nextStep">下一步</view>
+        <view class="handle-btn" v-if="step == 2" @click="handleAdd">保存</view>
       </view>
     </view>
     <!-- 选择下次时间 -->
@@ -454,6 +427,8 @@
   </view>
 </template>
 <script>
+  import { mapGetters } from 'vuex'
+
   import projectApi from 'api/project'
   import customerApi from '../../api/customer'
   import to from 'await-to-js'
@@ -524,17 +499,17 @@
           competitor: '', //竞争公司
           intervention: '', //介入情况
           remark: '', //备注
-          followTime: this.parseTime(new Date(), '{y}-{m}-{d} {h}:{i}'), //跟进时间
-          followUserId: '', //跟进用户id
-          followUserName: '', //跟进用户id
-          followContent: '', //跟进内容
+          // followTime: this.parseTime(new Date(), '{y}-{m}-{d} {h}:{i}'), //跟进时间
+          // followUserId: '', //跟进用户id
+          // followUserName: '', //跟进用户id
+          // followContent: '', //跟进内容
         },
         rules: {
           nboName: [{ required: true, trigger: ['blur', 'change'], message: '请输入项目名称' }],
           custName: [{ required: true, trigger: ['blur', 'change'], message: '请选择关联客户' }],
           nboSourceVal: [{ required: true, trigger: ['blur', 'change'], message: '请选择项目来源' }],
           contactName: [{ required: true, trigger: ['blur', 'change'], message: '请选择主要联系人' }],
-          saleName: [{ required: true, trigger: ['blur', 'change'], message: '请选择销售工程师' }],
+          // saleName: [{ required: true, trigger: ['blur', 'change'], message: '请选择销售工程师' }],
           salesModelVal: [{ required: true, trigger: ['blur', 'change'], message: '请选择销售模式' }],
           distributorName: [
             { validator: validateDistributor, trigger: ['blur', 'change'], message: '请选择经销商/代理商' },
@@ -542,12 +517,15 @@
           isBigVal: [{ required: true, trigger: ['blur', 'change'], message: '请选择是否大项目' }],
           productLineVal: [{ required: true, trigger: ['blur', 'change'], message: '请选择产品线' }],
           // 跟进
-          followTime: [{ required: true, trigger: ['blur', 'change'], message: '请输入跟进时间' }],
-          followContent: [{ required: true, trigger: ['blur', 'change'], message: '请输入跟进内容' }],
+          // followTime: [{ required: true, trigger: ['blur', 'change'], message: '请输入跟进时间' }],
+          // followContent: [{ required: true, trigger: ['blur', 'change'], message: '请输入跟进内容' }],
         },
         productList: [],
       }
     },
+    computed: {
+      ...mapGetters(['userId', 'username']),
+    },
     onLoad(option) {
       console.log(option.id) //打印出上个页面传递的参数。
       this.addForm.custId = parseInt(option.id)
@@ -583,6 +561,7 @@
         if (res && res.code == 200) {
           console.log(res)
           this.addForm.custName = res.data.list[0].custName
+          this.addForm.nboName = this.addForm.custName
         }
       },
       // 打开主要联系人
@@ -620,6 +599,8 @@
           console.log(user)
           this.addForm.contactId = user.id
           this.addForm.contactName = user.label
+          this.addForm.contactPostion = user.postion
+          this.addForm.contactTelephone = user.telephone
         }
       },
       // 关闭选择销售
@@ -732,6 +713,8 @@
             console.log(this.addForm)
             let params = this.addForm
             params.nboBudget = Number(params.nboBudget)
+            params.saleName = this.username
+            params.saleId = this.userId
             let products = this.productList.map((item) => ({
               ProdId: item.id,
               ProdName: item.prodName,
@@ -829,9 +812,9 @@
         .label-tag {
           width: 15rpx;
           height: 15rpx;
-          background: rgba(62, 126, 248, 0.6);
+          background: #ff4d4f;
           border-radius: 50%;
-          margin-right: -4rpx;
+          margin-right: 10rpx;
         }
       }
       .handle-btn {
@@ -846,8 +829,19 @@
         line-height: 92rpx;
       }
     }
+    .step1 {
+      width: 100%;
+      height: calc(100% - 124rpx);
+      overflow: auto;
+    }
     .step2 {
+      width: 100%;
+      height: calc(100% - 124rpx);
       .product-wrap {
+        width: 100%;
+        margin-top: 30rpx;
+        height: calc(100% - 150rpx);
+        overflow: auto;
         .product-item {
           margin: 30rpx 0;
           padding: 20rpx;
@@ -867,8 +861,8 @@
         background: #3c9cff;
         border-radius: 3px;
         text-align: center;
-        line-height: 60rpx;
-        font-size: 22rpx;
+        line-height: 58rpx;
+        font-size: 44rpx;
       }
     }
   }

+ 2 - 2
pages/project/details.vue

@@ -92,13 +92,13 @@
       </view>
     </view>
     <!-- 新增按钮 -->
-    <view class="fixed-btn-group" :style="{ width: openBtnWidth ? '560rpx' : '90rpx' }">
+    <view class="fixed-btn-group" :style="{ width: openBtnWidth ? '480rpx' : '90rpx' }">
       <view class="flex1" v-if="openBtnWidth">
         <view class="btn center" @click="linkToLevel(1)">升</view>
         <view class="red btn center" @click="linkToLevel(0)">降</view>
         <view class="btn center" @click="$refs.reserve.open(projectId)">储</view>
         <view class="btn center" @click="linkToTransfer()">转</view>
-        <view class="btn center" @click="createProject()">增</view>
+        <!-- <view class="btn center" @click="createProject()">增</view> -->
         <view class="btn center" @click="openFollow()">跟</view>
       </view>
       <view class="btn center" @click="openBtnWidth = !openBtnWidth">

+ 2 - 4
pages/project/downgrade.vue

@@ -42,7 +42,6 @@
         </u-form-item>
         <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx">
           <view class="form-label flex_l">
-            <view class="label-tag"></view>
             技术支持人员
           </view>
           <u-input
@@ -68,7 +67,6 @@
         </u-form-item>
         <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx" @click="showSupportDate = true">
           <view class="form-label flex_l">
-            <view class="label-tag"></view>
             技术支持时间
           </view>
           <u-input
@@ -289,9 +287,9 @@
         .label-tag {
           width: 15rpx;
           height: 15rpx;
-          background: rgba(62, 126, 248, 0.6);
+          background:  #ff4d4f;
           border-radius: 50%;
-          margin-right: -4rpx;
+          margin-right: 10rpx;
         }
       }
       .save {

+ 2 - 2
pages/project/transfer.vue

@@ -194,9 +194,9 @@
         .label-tag {
           width: 15rpx;
           height: 15rpx;
-          background: rgba(62, 126, 248, 0.6);
+          background:  #ff4d4f;
           border-radius: 50%;
-          margin-right: -4rpx;
+          margin-right: 10rpx;
         }
       }
       .save {

+ 2 - 16
pages/project/upgrade.vue

@@ -80,7 +80,6 @@
           </u-form-item>
           <u-form-item prop="parentReceiver" borderBottom customStyle="padding:40rpx 0 30rpx">
             <view class="form-label flex_l">
-              <view class="label-tag"></view>
               总部对接人
             </view>
             <u-input
@@ -94,7 +93,6 @@
         </view>
         <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx">
           <view class="form-label flex_l">
-            <view class="label-tag"></view>
             技术支持人员
           </view>
           <u-input
@@ -120,7 +118,6 @@
         </u-form-item>
         <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx" @click="showSupportDate = true">
           <view class="form-label flex_l">
-            <view class="label-tag"></view>
             技术支持时间
           </view>
           <u-input
@@ -136,7 +133,6 @@
         <view v-if="addForm.nboType !== '30'">
           <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx" @click="showBudgetDate = true">
             <view class="form-label flex_l">
-              <view class="label-tag"></view>
               项目预算期限
             </view>
             <u-input
@@ -151,7 +147,6 @@
           </u-form-item>
           <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx">
             <view class="form-label flex_l">
-              <view class="label-tag"></view>
               资金来源
             </view>
             <u-input
@@ -164,7 +159,6 @@
           </u-form-item>
           <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx">
             <view class="form-label flex_l">
-              <view class="label-tag"></view>
               产品/方案满足情况
             </view>
             <u-input
@@ -179,7 +173,6 @@
         <view v-if="addForm.nboType === '10'">
           <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx" @click="showChasingWay = true">
             <view class="form-label flex_l">
-              <view class="label-tag"></view>
               采购方式
             </view>
             <u-input
@@ -194,7 +187,6 @@
           </u-form-item>
           <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx" @click="showPurchasingDate = true">
             <view class="form-label flex_l">
-              <view class="label-tag"></view>
               采购时间
             </view>
             <u-input
@@ -209,7 +201,6 @@
           </u-form-item>
           <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx" @click="selectContact()">
             <view class="form-label flex_l">
-              <view class="label-tag"></view>
               决策人员
             </view>
             <u-input
@@ -223,7 +214,6 @@
           </u-form-item>
           <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx">
             <view class="form-label flex_l">
-              <view class="label-tag"></view>
               决策部门
             </view>
             <u-input
@@ -237,7 +227,6 @@
           </u-form-item>
           <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx">
             <view class="form-label flex_l">
-              <view class="label-tag"></view>
               经销商与客户历史成交信息
             </view>
             <u-input
@@ -250,7 +239,6 @@
           </u-form-item>
           <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx">
             <view class="form-label flex_l">
-              <view class="label-tag"></view>
               经销商销售人员
             </view>
             <u-input
@@ -263,7 +251,6 @@
           </u-form-item>
           <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx">
             <view class="form-label flex_l">
-              <view class="label-tag"></view>
               维护部门及人员
             </view>
             <u-input
@@ -276,7 +263,6 @@
           </u-form-item>
           <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx">
             <view class="form-label flex_l">
-              <view class="label-tag"></view>
               是否采纳大数技术参数
             </view>
             <u-radio-group v-model="addForm.isAdoptDashoo" placement="row">
@@ -619,9 +605,9 @@
         .label-tag {
           width: 15rpx;
           height: 15rpx;
-          background: rgba(62, 126, 248, 0.6);
+          background:  #ff4d4f;
           border-radius: 50%;
-          margin-right: -4rpx;
+          margin-right: 10rpx;
         }
       }
       .save {

+ 6 - 14
pages/publicPages/follow.vue

@@ -21,10 +21,7 @@
     <view class="main">
       <u-form :model="addForm" :rules="rules" ref="addForm" label-width="0">
         <u-form-item prop="content" customStyle="padding:40rpx 0 34rpx">
-          <view class="form-label flex_l">
-            <view class="label-tag"></view>
-            跟进内容
-          </view>
+          <view class="form-label flex_l">跟进内容</view>
           <u-textarea
             v-model="addForm.content"
             placeholder="请输入跟进内容"
@@ -80,10 +77,7 @@
         </u-form-item>
       </u-form>
       <view class="upload-file-box">
-        <view class="form-label flex_l">
-          <view class="label-tag"></view>
-          附件
-        </view>
+        <view class="form-label flex_l">附件</view>
         <uni-file-picker
           file-mediatype="all"
           v-model="imageValue"
@@ -312,7 +306,7 @@
       },
       // 上传函数
       async uploadFiles(e, res) {
-        let action = 'http://' + res.url + '/' + res.fid
+        let action = process.uniEnv.VUE_APP_PROTOCOL + res.publicUrl + '/' + res.fid
         uni.uploadFile({
           url: action,
           filePath: e.tempFilePaths[0],
@@ -323,9 +317,7 @@
           success: (res) => {
             this.addForm.files = [{ fileName: e.tempFiles[0].file.name, fileUrl: action }]
           },
-          fail: () => {
-            console.log('err')
-          },
+          fail: (err) => {},
         })
       },
       // 获取上传进度
@@ -402,9 +394,9 @@
         .label-tag {
           width: 15rpx;
           height: 15rpx;
-          background: rgba(62, 126, 248, 0.6);
+          background: #ff4d4f;
           border-radius: 50%;
-          margin-right: -4rpx;
+          margin-right: 10rpx;
         }
       }
       .upload-file-box {

+ 1 - 0
store/index.js

@@ -142,3 +142,4 @@ const store = new Vuex.Store({
     },
 })
 export default store
+

+ 28 - 2
style/common.scss

@@ -158,6 +158,32 @@ view {
     border-radius: 50%;
     box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
 }
-.mr20{
-  margin-right: 20rpx;
+
+.mr20 {
+    margin-right: 20rpx;
+}
+
+// 选择组件
+.select-header {
+    line-height: 50rpx;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: 0px 30rpx;
+    .tit {
+        font-size: 26rpx;
+        font-weight: bold;
+        padding: 30rpx 0 0 30rpx;
+    }
+    .save-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;
+    }
 }