From 98a16020cbc9b777735705e8fb72200dde1b68bd Mon Sep 17 00:00:00 2001
From: wk
Date: 星期四, 26 九月 2024 16:17:54 +0800
Subject: [PATCH] feat:门卫检查

---
 pages/quality-inspection-page/toc-sampling/toc-sampling-form/toc-sampling-form.vue |   90 +++++++++++++++++++++++++++++++--------------
 1 files changed, 62 insertions(+), 28 deletions(-)

diff --git a/pages/quality-inspection-page/toc-sampling/toc-sampling-form/toc-sampling-form.vue b/pages/quality-inspection-page/toc-sampling/toc-sampling-form/toc-sampling-form.vue
index 28945fe..c2e38f5 100644
--- a/pages/quality-inspection-page/toc-sampling/toc-sampling-form/toc-sampling-form.vue
+++ b/pages/quality-inspection-page/toc-sampling/toc-sampling-form/toc-sampling-form.vue
@@ -27,6 +27,7 @@
       >
         <jp-select-plus
             :isLineFeed="false"
+            isLoading
             isSearch
             color="#497bfb"
             placeholder="璇烽�夋嫨"
@@ -53,18 +54,22 @@
           borderBottom
           ref="item1"
       >
-        <u-cell-group>
+        <u--input
+            v-model="modelForm.bunkerName"
+            border="none"
+        ></u--input>
+<!--        <u-cell-group>
           <u-cell
               value="璇烽�夋嫨"
               @click="handleBunkerIdClick">
             <view slot="value" class="u-slot-value">
-              <u--input
+              <u&#45;&#45;input
                   v-model="modelForm.bunkerName"
                   border="none"
-              ></u--input>
+              ></u&#45;&#45;input>
             </view>
           </u-cell>
-        </u-cell-group>
+        </u-cell-group>-->
 
       </u-form-item>
       <u-form-item
@@ -97,11 +102,23 @@
           borderBottom
           ref="item1"
       >
-        <u--input
+        <u-cell-group>
+          <u-cell
+              value="璇烽�夋嫨"
+              @click.native="handleBunkerIdClick">
+            <view slot="value" class="u-slot-value">
+              <u--input
+                  v-model="modelForm.samplingPerson"
+                  border="none"
+              ></u--input>
+            </view>
+          </u-cell>
+        </u-cell-group>
+<!--        <u&#45;&#45;input
             v-model="modelForm.samplingPerson"
             border="none"
             disabled
-        ></u--input>
+        ></u&#45;&#45;input>-->
       </u-form-item>
       <div class="sumbmit-box">
         <u-button @click="handleSubmit" type="primary" v-if="submitShow">纭� 瀹�</u-button>
@@ -109,9 +126,13 @@
     </u--form>
     <view class="meicang-box">
       <u-action-sheet
-          @select="selectBunker"
-          :show="bunkerShow"
-          :actions="bunkerList">
+          title="閫夋嫨閲囨牱鍛�"
+          :closeOnClickOverlay="true"
+          :closeOnClickAction="true"
+          @select="selectsamplingPerson"
+          :show="samplingPersonShow"
+          @close="samplingPersonShow = false"
+          :actions="samplingPersonList">
       </u-action-sheet>
     </view>
   </view>
@@ -121,6 +142,7 @@
 import { todayDate } from '@/utils/util.js';
 import {getStatesOne} from "../../../../utils/status";
 import { BaseUrl } from '@/api/request.js'
+const dayjs = require('dayjs')
 export default {
   name: "yanGaiMei-sampling-form",
   components: {
@@ -129,17 +151,18 @@
     return {
       submitShow:true,
       customerIdList: [],
-      bunkerShow: false,
-      bunkerList:[],
+      samplingPersonShow: false,
+      samplingPersonList:[],
       modelForm: {
         id:'',
         batchNumber:'',
         customerId:'',  //渚涘簲鍟�
         customerName:'',  //渚涘簲鍟�
         samplingTime: '', //閲囬泦鏃ユ湡
-        bunkerId:'',
+        // bunkerId:'',
         bunkerName:'',
         samplingPerson: '',
+        samplingSignAddress:'',
         type: 7,  //1 EDC銆�2 鑱氭隘涔欑儻鏍戣剛銆�3 纭吀銆�4 姘㈡哀鍖栭挔 5 娑叉隘 6銆佸師鐩愰挋闀� 7銆佸師鐩怲OC 8銆佸師鐩愬叏妫�
       },
       filedId:'',
@@ -163,7 +186,7 @@
           type: 'string',
           required: true,
           message: '璇烽�夋嫨閲囨牱鍦扮偣',
-          trigger: ['blur', 'change']
+          trigger: ['blur']
         }],
         tonnage:[{
           type: 'number',
@@ -188,21 +211,24 @@
       this.submitShow = false
       this.$nextTick(() => {
         this.modelForm = Object.assign({},JSON.parse(opt.params))
-        console.log(this.modelForm,'鎺ユ敹鍒颁笂涓〉闈紶杩囨潵鐨勫弬鏁�===')
+        console.log(this.modelForm,'this.modelForm----------涓婁釜椤甸潰浼犺繃鏉ョ殑鏁版嵁----')
+        if(this.modelForm.samplingTime) {
+          this.modelForm.samplingTime = dayjs(this.modelForm.samplingTime).format('YYYY-MM-DD HH:mm')
+        }
         return
       })
     }
-    this.modelForm.samplingTime = todayDate(); //褰撳墠鏃堕棿
-    this.modelForm.samplingPerson = uni.getStorageSync('name')
+    this.modelForm.samplingTime = todayDate('ymd hm'); //褰撳墠鏃堕棿
     this.deptId = uni.getStorageSync('userInfo').deptIds
-    console.log(uni.getStorageSync('userInfo'),'userInfo==========')
     console.log(this.deptId,'deptId==========')
     this.getClaimCustomerList()
     if(uni.getStorageSync('bunkerList')) {  //缂撳瓨鏈夋暟鎹嬁鏁版嵁
-      this.bunkerList = uni.getStorageSync('bunkerList')
+      this.samplingPersonList = uni.getStorageSync('samplingPersonList')
     }else {  //娌℃嬁鍒版暟鎹皟涓�閬嶆帴鍙�
-      this.$store.dispatch('getBunkerList')
+      this.$store.dispatch('getSamplingPerson')
     }
+
+
     // console.log(getStatus('roleType'),'roleType-----')
     // console.log(getStatus('customerId'),'customerId-----')
     // console.log(getStatus('userInfo'),'userInfo-----')
@@ -211,26 +237,27 @@
   },
   methods: {
     getClaimCustomerList() {  //渚涘簲鍟嗗垪琛�  type 绫诲瀷 0/澶栭儴 1/鍐呴儴(鍖栭獙鍗曠殑灞炰簬澶栭儴瀹㈡埛)
-      this.$reqGet('getClaimCustomerPageList',{current: 1, size:999, personnelType:0}).then(res => {
+      this.$reqGet('getClaimCustomerPageList',{personnelType:1,type:0,deptId:this.deptId}).then(res => {
         console.log(res,'渚涘簲鍟嗛偅涓�=====')
         if(res.code == 0) {
-          this.customerIdList = res.data.records.map(item => {
+          this.customerIdList = res.data.map(item => {
             return {
               code:item.id,
               name: item.name
             }
           })
+          console.log(this.customerIdList,'this.customerIdList===')
         }
       })
     },
     handleBunkerIdClick() {  //鎵撳紑鍙栨牱鍦扮偣寮规
-      this.bunkerShow = true
+      this.samplingPersonShow = true
     },
-    selectBunker(v) { //閲囨牱鍦扮偣
+    selectsamplingPerson(v) { //閲囨牱鍦扮偣
       console.log(v,'v======')
-      this.modelForm.bunkerId = v.id
-      this.modelForm.bunkerName = v.name
-      this.bunkerShow = false
+      this.modelForm.samplingPerson = v.name
+      this.modelForm.samplingSignAddress = v.imgPath
+      this.samplingPersonShow = false
     },
     toConfirmHandle(v) {  //渚涘簲鍟�
       console.log(v,'v====渚涘簲鍟�==')
@@ -246,6 +273,7 @@
         title: '鍔犺浇涓�'
       })
       this.$refs.uForm.validate().then(res => {
+        this.modelForm.samplingTime = dayjs(this.modelForm.samplingTime).format("YYYY-MM-DD HH:mm:ss")  //浼犲弬鏃堕棿瑕佸甫鍒� 鍚﹀垯鎶ラ敊
         this.$reqPost('rawSaltsSampling',this.modelForm,'json').then(res => {
           if(res) {
             uni.hideLoading();
@@ -278,6 +306,13 @@
     max-height: 85vh;
     overflow-y: auto;
   }
+  .u-icon__icon{
+    font-size: 34rpx!important;
+    top: 12rpx;
+  }
+  .inputs{
+    width: 100%;
+  }
 }
 @mixin commonBtn($h:62rpx){
   background-image: linear-gradient(to right,#497bfb,#2467fd);
@@ -294,14 +329,13 @@
       transition: all 0.3s;
     }
     .u-action-sheet__item-wrap__item{
-      align-items: flex-start;
       text{
         font-size: 28rpx;
       }
     }
     .u-popup__content{
       .u-line{
-        border-bottom-width: 0px!important;
+        //border-bottom-width: 0px!important;
       }
     }
     .u-form{

--
Gitblit v1.9.1