From 75811022288e2c4832974a1586f442608706c30a Mon Sep 17 00:00:00 2001
From: yangan <yangan0921@163.com>
Date: 星期四, 12 九月 2024 17:40:10 +0800
Subject: [PATCH] feat:司机接单pvc吨数提示

---
 pages/quality-inspection-page/symbNa-sampling/symbNa-sampling-form/symbNa-sampling-form.vue |  100 +++++++++++++++++++++++++++++++------------------
 1 files changed, 63 insertions(+), 37 deletions(-)

diff --git a/pages/quality-inspection-page/symbNa-sampling/symbNa-sampling-form/symbNa-sampling-form.vue b/pages/quality-inspection-page/symbNa-sampling/symbNa-sampling-form/symbNa-sampling-form.vue
index 0290614..1e5eced 100644
--- a/pages/quality-inspection-page/symbNa-sampling/symbNa-sampling-form/symbNa-sampling-form.vue
+++ b/pages/quality-inspection-page/symbNa-sampling/symbNa-sampling-form/symbNa-sampling-form.vue
@@ -25,18 +25,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
@@ -63,15 +67,27 @@
       </u-form-item>
       <u-form-item
           label="閲囨牱浜�:"
-          prop="name"
+          prop="samplingPerson"
           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>
       <u-form-item
           label="閲囨牱鏃ユ湡:"
@@ -91,9 +107,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>
@@ -103,6 +123,8 @@
 import { todayDate } from '@/utils/util.js';
 import {getStatesOne} from "../../../../utils/status";
 import { BaseUrl } from '@/api/request.js'
+const dayjs = require('dayjs')
+import { mapGetters } from 'vuex';
 export default {
   name: "yanGaiMei-sampling-form",
   components: {
@@ -113,16 +135,16 @@
       customerIdList: [],
       bunkerShow: false,
       bunkerList:[],
+      samplingPersonShow: false,
       modelForm: {
         id:'',
         batchNumber:'',
         samplingTime: '', //閲囬泦鏃ユ湡
-        bunkerId:'',
         bunkerName:'',
         samplingPerson: '',
         exterior:'鏃犺壊閫忔槑绮樼娑蹭綋',  //澶栬
         executionStandards:'GB/T209-2018',
-        type: 4,  //1 EDC銆�2 PVC銆�3 纭吀銆�4 姘㈡哀鍖栭挔 5 娑叉隘 6銆佸師鐩愰挋闀� 7銆佸師鐩怲OC 8銆佸師鐩愬叏妫�
+        type: 4,  //1 EDC銆�2 鑱氭隘涔欑儻鏍戣剛銆�3 纭吀銆�4 姘㈡哀鍖栭挔 5 娑叉隘 6銆佸師鐩愰挋闀� 7銆佸師鐩怲OC 8銆佸師鐩愬叏妫�
       },
       filedId:'',
       customerIdShow: false,
@@ -139,15 +161,13 @@
           type: 'string',
           required: true,
           message: '璇烽�夋嫨閲囨牱鍦扮偣',
-          trigger: ['blur', 'change']
+          trigger: ['blur']
         }]
       }
     }
   },
   computed: {
-    samplingPerson() {
-      return uni.getStorageSync('nameKey');
-    }
+    ...mapGetters(['samplingPersonList'])
   },
   onReady() {
     //濡傛灉闇�瑕佸吋瀹瑰井淇″皬绋嬪簭锛屽苟涓旀牎楠岃鍒欎腑鍚湁鏂规硶绛夛紝鍙兘閫氳繃setRules鏂规硶璁剧疆瑙勫垯銆�
@@ -158,21 +178,16 @@
       this.submitShow = false
       this.$nextTick(() => {
         this.modelForm = Object.assign({},JSON.parse(opt.params))
+        this.modelForm.samplingTime = dayjs(this.modelForm.samplingTime).format('YYYY-MM-DD') || ''
         console.log(this.modelForm,'鎺ユ敹鍒颁笂涓〉闈紶杩囨潵鐨勫弬鏁�===姘㈡哀鍖栭挔')
         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')
-    }else {  //娌℃嬁鍒版暟鎹皟涓�閬嶆帴鍙�
-      this.$store.dispatch('getBunkerList')
-    }
+    this.$store.dispatch('getSamplingPerson')
     // console.log(getStatus('roleType'),'roleType-----')
     // console.log(getStatus('customerId'),'customerId-----')
     // console.log(getStatus('userInfo'),'userInfo-----')
@@ -181,7 +196,7 @@
   },
   methods: {
     getClaimCustomerList() {  //渚涘簲鍟嗗垪琛�  type 绫诲瀷 0/澶栭儴 1/鍐呴儴(鍖栭獙鍗曠殑灞炰簬澶栭儴瀹㈡埛)
-      this.$reqGet('getClaimCustomerList',{type:'0'}).then(res => {
+      this.$reqGet('getClaimCustomerList',{personnelType:1,type:0,deptId:this.deptId}).then(res => {
         console.log(res,'渚涘簲鍟嗛偅涓�=====')
         if(res.code == 0) {
           this.customerIdList = res.data.map(item => {
@@ -194,13 +209,13 @@
       })
     },
     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
     },
     handleSubmit() {  //纭畾
       console.log(this.modelForm,'this.modelForm===')
@@ -208,6 +223,7 @@
         title: '鍔犺浇涓�'
       })
       this.$refs.uForm.validate().then(res => {
+        this.modelForm.samplingTime = dayjs(this.modelForm.samplingTime).format("YYYY-MM-DD HH:mm:ss")
         this.$reqPost('zjqualitycheck',this.modelForm,'json').then(res => {
           if(res) {
             uni.hideLoading();
@@ -228,6 +244,20 @@
 </script>
 
 <style lang="scss" scoped>
+::v-deep{
+  .u-transition{
+    min-height: 10vh;
+    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);
   height: $h!important;
@@ -243,17 +273,13 @@
       transition: all 0.3s;
     }
     .u-action-sheet__item-wrap__item{
-      padding: 0 20rpx;
-      align-items: flex-start;
-      min-height: 160rpx;
-      max-height: 600rpx;
       text{
         font-size: 28rpx;
       }
     }
     .u-popup__content{
       .u-line{
-        border-bottom-width: 0px!important;
+        //border-bottom-width: 0px!important;
       }
     }
     .u-form{
@@ -262,8 +288,8 @@
     .u-form-item{
       margin-bottom: 20rpx;
       .u-transition{
-        min-height: 100vh;
-        max-height: 400vh;
+        min-height: 10vh;
+        max-height: 71vh;
         height: 200rpx!important;
       }
       .u-line {

--
Gitblit v1.9.1