Kaynağa Gözat

企业入库审核调整

LAPTOP-FO2T5SIU\35838 11 ay önce
ebeveyn
işleme
8e3dcb7904
4 değiştirilmiş dosya ile 120 ekleme ve 17 silme
  1. 8 0
      js_sdk/http.js
  2. 34 0
      pages.json
  3. 76 15
      pages/subPackages/todo/inventoryReview.vue
  4. 2 2
      pages/utils/constant.js

+ 8 - 0
js_sdk/http.js

@@ -1181,3 +1181,11 @@ export function getAllBaseCompany(data) {
         data, {}
     )
 }
+
+// 用户列表
+export function findUserList(data) {
+    return $http.post(
+        '/wx/frameUser/page',
+        data, {}
+    )
+}

+ 34 - 0
pages.json

@@ -898,6 +898,40 @@
                         }
                     }
                 },
+                {
+                    "path": "todo/addInvestmentManager",
+                    "style": {
+                        "navigationBarTitleText": "招商经理选择",
+                        "enablePullDownRefresh": true,
+                        "onReachBottomDistance": 100,
+                        "app-plus": {
+                            "bounce": "vertical",
+                            "titleNView": {
+                                "buttons": [
+                                    {
+                                        "text": "\ue534",
+                                        "fontSrc": "/static/uni.ttf",
+                                        "fontSize": "22px",
+                                        "color": "#FFFFFF"
+                                    }
+                                ]
+                            }
+                        },
+                        "component": true,
+                        "usingComponents": {
+                            "van-empty": "/wxcomponents/weapp/dist/empty/index",
+                            "van-button": "/wxcomponents/weapp/dist/button/index",
+                            "van-toast": "/wxcomponents/weapp/dist/toast/index",
+                            "van-field": "/wxcomponents/weapp/dist/field/index",
+                            "van-popup": "/wxcomponents/weapp/dist/popup/index",
+                            "van-picker": "/wxcomponents/weapp/dist/picker/index",
+                            "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
+                            "van-icon": "/wxcomponents/weapp/dist/icon/index",
+                            "van-tab": "/wxcomponents/weapp/dist/tab/index",
+                            "van-tabs": "/wxcomponents/weapp/dist/tabs/index"
+                        }
+                    }
+                },
                 {
                     "path": "todo/predetermineDetail",
                     "style": {

+ 76 - 15
pages/subPackages/todo/inventoryReview.vue

@@ -304,8 +304,8 @@
           <span class="liName">
             招商经理
           </span>
-          <div class="inputBox">
-            <input placeholder="" v-model="form.investmentManagerName" disabled class="myIpt">
+          <div class="inputBox" @tap="toChoose('招商经理')">
+            <input placeholder="" v-model="investmentManagerName" disabled class="myIpt">
             <van-icon name="arrow" />
           </div>
         </li>
@@ -313,8 +313,8 @@
           <span class="liName">
             关联企业
           </span>
-          <div class="inputBox" style="border-bottom: none" @tap="toChoose">
-            <input placeholder="" v-model="form.associationCompanyName" disabled class="myIpt">
+          <div class="inputBox" style="border-bottom: none" @tap="toChoose('关联企业')">
+            <input placeholder="" v-model="associationCompanyName" disabled class="myIpt">
             <van-icon name="arrow" />
           </div>
         </li>
@@ -372,21 +372,42 @@
 </template>
 
 <script>
-import { getUserLocalStorageInfo,getByCodes,companyExamineGetById,companyExamineExamine } from "@/js_sdk/http";
+import { getUserLocalStorageInfo,getByCodes,companyExamineGetById,companyExamineExamine,findUserList } from "@/js_sdk/http";
 
 export default {
   name: "inventoryReview",
   onLoad(options){
     uni.$on('selectInfo',e=>{
-      console.log('eeeeeeeeeee',JSON.parse(e))
+      const companyList = JSON.parse(e)
+      let associationCompanyName = companyList.map((obj,index)=>{
+        return obj.qymc
+      }).join(',')
+      let associationCompany = companyList.map((obj,index)=>{
+        return obj.id
+      }).join(',')
+      this.associationCompanyName = associationCompanyName
+      this.form.associationCompany = associationCompany
+    })
+    uni.$on('selectUserInfo',e=>{
+      const userList = JSON.parse(e)
+      let investmentManagerName = userList.map((obj,index)=>{
+        return obj.truename
+      }).join(',')
+      let investmentManager = userList.map((obj,index)=>{
+        return obj.id
+      }).join(',')
+      this.investmentManagerName = investmentManagerName
+      this.form.investmentManager = investmentManager
     })
     this.id = options.id
     this.proveType = options.proveType
-    // this.getCompanyList()
-  },
-  onShow(){
     this.getById()
     this.getByCodes()
+    this.getInvestmentManagerList()
+  },
+  onShow(){
+
+
   },
   data(){
     return{
@@ -408,7 +429,8 @@ export default {
       popType:'',
       timeShow: '',
       currentDate: new Date().getTime(),
-      companyOptions: []
+      investmentManagerName: '',
+      associationCompanyName: ''
     }
   },
   methods:{
@@ -420,6 +442,8 @@ export default {
         if(res){
           this.form = res
           this.form.currencyStr = this.form.currency == null ? ' ' : this.getDicType("bizhong", this.form.currency)
+          this.associationCompanyName = res.associationCompanyName
+          this.investmentManagerName = res.investmentManagerName
           this.settleInType = res.settleInType
           if (res.yyzzfbzp) {
             res.yyzzfbzp.split(',').forEach(id=>{
@@ -653,9 +677,17 @@ export default {
       // console.log(e)
       switch (this.popType) {
         case "币种":
-          this.form.currency = e.detail.value.label
+          this.form.currency = e.detail.value.value
           this.form.currencyStr = e.detail.value.label
           break;
+        case "招商经理":
+          this.form.investmentManager = this.selectedItems.map((obj,index)=>{
+            return obj.id
+          }).join(',')
+          this.form.investmentManagerName = this.selectedItems.map((obj,index)=>{
+            return obj.truename
+          }).join(',')
+          break;
       }
       this.show = false
     },
@@ -694,11 +726,40 @@ export default {
       this.timeShow = false
       // this.getRoomTime(this.startTime)
     },
-    toChoose(){
-      uni.navigateTo({
-        url: "/pages/subPackages/todo/associated"
-      });
+    toChoose(type){
+      if(type === '关联企业'){
+        uni.navigateTo({
+          url: "/pages/subPackages/todo/associated"
+        });
+      }
+      if(type === '招商经理'){
+        uni.navigateTo({
+          url: "/pages/subPackages/todo/addInvestmentManager"
+        });
+      }
     },
+    getInvestmentManagerList(){
+      findUserList({}).then(res=>{
+        this.investmentManagerOptions = res
+        // if(res){
+        //   res.forEach(item=>{
+        //     const data = {
+        //       value:item.id,
+        //       label:item.truename
+        //     }
+        //     this.investmentManagerOptions.push(data)
+        //   })
+        //
+        // }
+
+      })
+    },
+    investmentManagerChange(e){
+      this.investmentManager = e.detail
+      this.selectedItems = this.list.filter(item => e.detail.includes(item.truename));
+      // 现在你有了一个包含完整 item 对象的数组
+      console.log(this.selectedItems);
+    }
   }
 }
 </script>

+ 2 - 2
pages/utils/constant.js

@@ -1,10 +1,10 @@
 // 系统常量
 // export const BASE_URI = "http://192.168.2.111:9011"; // 正式
-export const BASE_URI = 'https://www.idea-co-sf.com/gardenProductApi'
+// export const BASE_URI = 'https://www.idea-co-sf.com/gardenProductApi'
 // export const BASE_URI = "http://192.168.3.94:9010"; // 老潘本地
 // export const BASE_URI = "http://192.168.2.107:9011"; // 洮洮本地
 // export const BASE_URI = "http://192.168.2.103:9010"; // 老崔本地
-// export const BASE_URI = "http://192.168.2.101:9015"; // 许峰本地
+export const BASE_URI = "http://localhost:9011"; // 许峰本地
 // export const BASE_URI = "http://192.168.2.112:9010"; // 陈凡本地
 
 export default {