LAPTOP-FO2T5SIU\35838 11 月之前
父节点
当前提交
5cad18ced3
共有 2 个文件被更改,包括 101 次插入12 次删除
  1. 8 0
      js_sdk/http.js
  2. 93 12
      pages/subPackages/todo/inventoryReview.vue

+ 8 - 0
js_sdk/http.js

@@ -1173,3 +1173,11 @@ export function getContractById(data) {
         data, {}
     )
 }
+
+// 企业列表
+export function getAllBaseCompany(data) {
+    return $http.post(
+        '/wx/company/getAllBaseCompany',
+        data, {}
+    )
+}

+ 93 - 12
pages/subPackages/todo/inventoryReview.vue

@@ -31,18 +31,19 @@
           <span class="liName">
             币种
           </span>
-          <div class="inputBox">
+          <div class="inputBox" @tap="showArea('币种')">
             <input placeholder="" v-model="form.currencyStr" disabled class="myIpt">
-<!--            <van-icon name="arrow" />-->
+            <van-icon name="arrow" />
           </div>
         </li>
         <li class="detailLi">
           <span class="liName">
             注册时间
           </span>
-          <div class="inputBox">
-            <input placeholder="" v-model="form.zcsj" disabled class="myIpt">
-<!--            <van-icon name="arrow" />-->
+          <div class="inputBox" @tap="showTime">
+<!--            <input placeholder="" v-model="form.zcsj" disabled class="myIpt">-->
+            <span class="myIpt">{{ form.zcsj }} </span>
+            <van-icon name="arrow" />
           </div>
         </li>
         <li class="detailLi">
@@ -305,7 +306,7 @@
           </span>
           <div class="inputBox">
             <input placeholder="" v-model="form.investmentManagerName" disabled class="myIpt">
-<!--            <van-icon name="arrow" />-->
+            <van-icon name="arrow" />
           </div>
         </li>
         <li class="detailLi">
@@ -314,7 +315,7 @@
           </span>
           <div class="inputBox" style="border-bottom: none">
             <input placeholder="" v-model="form.associationCompanyName" disabled class="myIpt">
-<!--            <van-icon name="arrow" />-->
+            <van-icon name="arrow" />
           </div>
         </li>
       </ul>
@@ -347,11 +348,31 @@
         <button class="btn zcBtn" @click="cancel">取消</button>
         <button class="btn tjBtn" @click="confirmSubmit()">提交审核</button>
       </div>
+      <van-popup
+          :show="show"
+          position="bottom"
+          custom-style="height: 50%;"
+      >
+        <van-picker v-show="popType==='币种'" :columns="currencyList" show-toolbar @cancel="show=false" @confirm="onConfirm" value-key="label"/>
+      </van-popup>
+      <van-popup
+          :show="timeShow"
+          position="bottom"
+          custom-style="height: 50%;"
+      >
+        <van-datetime-picker
+            type="date"
+            :value="currentDate"
+            :formatter="formatter"
+            @cancel="timeShow=false"
+            @confirm="selectTime"
+        />
+      </van-popup>
     </div>
 </template>
 
 <script>
-import { getUserLocalStorageInfo,getByCodes,companyExamineGetById,companyExamineExamine } from "@/js_sdk/http";
+import { getUserLocalStorageInfo,getByCodes,companyExamineGetById,companyExamineExamine,getAllBaseCompany } from "@/js_sdk/http";
 
 export default {
   name: "inventoryReview",
@@ -361,6 +382,7 @@ export default {
     this.proveType = options.proveType
     this.getById()
     this.getByCodes()
+    this.getCompanyList()
   },
   data(){
     return{
@@ -376,7 +398,13 @@ export default {
       fileList2: [],
       settleInType:'',
       settleInTypeList: [],
-      dic_SelectList: []
+      dic_SelectList: [],
+      currencyList: [],
+      show:false,
+      popType:'',
+      timeShow: '',
+      currentDate: new Date().getTime(),
+      companyOptions: []
     }
   },
   methods:{
@@ -434,9 +462,9 @@ export default {
     async getByCodes() {
       let data = await getByCodes(JSON.stringify(this.dc_key));
       this.dic_SelectList = this.$common.handleDicList(data);
-      this.dic_SelectList.MNP_BUILDING_TYPE.forEach(item=>{
-        this.settleInTypeList.push(item)
-      })
+      this.settleInTypeList = this.dic_SelectList.MNP_BUILDING_TYPE
+      this.currencyList = this.dic_SelectList.CURRENCY
+
     },
     getDicType(type, value) {
       if (type == "bizhong" && this.dic_SelectList.CURRENCY) {
@@ -612,6 +640,59 @@ export default {
         }
       })
 
+    },
+    showArea(e){
+      this.popType = e
+      this.show = true
+    },
+    onConfirm(e){
+      console.log(e)
+      switch (this.popType) {
+        case "币种":
+          this.form.currency = e.detail.value.label
+          break;
+      }
+      this.show = false
+    },
+    showTime(){
+      this.timeShow = true
+    },
+    // 时间戳转换方法
+    timestampToDate(timestamp) {
+      const date = new Date(timestamp); // 如果timestamp是字符串,确保它是整数:parseInt(timestamp)
+      const year = date.getFullYear();
+      const month = (date.getMonth() + 1).toString().padStart(2, '0');
+      const day = date.getDate().toString().padStart(2, '0');
+      const hours = date.getHours().toString().padStart(2, '0');
+      const minutes = date.getMinutes().toString().padStart(2, '0');
+      const seconds = date.getSeconds().toString().padStart(2, '0');
+      return `${year}-${month}-${day}`;
+    },
+    // 时间选择单位
+    formatter(type, val) {
+      if (type === 'year') {
+        return `${val}年`;
+      } else if (type === 'month') {
+        return `${val}月`;
+      } else if (type === 'day') {
+        return `${val}日`;
+      } else if (type === 'hour') {
+        return `${val}时`;
+      } else if (type === 'minute') {
+        return `${val}分`;
+      }
+      return val;
+    },
+    selectTime(e) {
+      const dateString = this.timestampToDate(e.detail);
+      this.form.zcsj = dateString
+      this.timeShow = false
+      // this.getRoomTime(this.startTime)
+    },
+    getCompanyList(){
+      getAllBaseCompany({}).then(res=>{
+        this.companyOptions = res
+      })
     }
   }
 }