From b989da3c3a99fef9068c20ac55467d7ce25523af Mon Sep 17 00:00:00 2001
From: su1124 <1583764726@qq.com>
Date: 星期五, 08 三月 2024 14:25:04 +0800
Subject: [PATCH] su

---
 src/views/sampling/sampling/index.vue |  101 +++++++++++++++++++++++++++++++++-----------------
 1 files changed, 66 insertions(+), 35 deletions(-)

diff --git a/src/views/sampling/sampling/index.vue b/src/views/sampling/sampling/index.vue
index f344874..ad3b730 100644
--- a/src/views/sampling/sampling/index.vue
+++ b/src/views/sampling/sampling/index.vue
@@ -10,7 +10,7 @@
     >
       <el-form-item label="浣撴鍙�" prop="tjNum">
         <el-input
-        ref="inputName"
+          ref="inputName"
           v-model="queryParams.tjNum"
           placeholder="璇疯緭鍏ヤ綋妫�鍙�"
           clearable
@@ -32,8 +32,9 @@
         <el-date-picker
           v-model="createTimeList"
           @change="dateChangebirthday1"
-          style="width: 240px"
-          value-format="yyyy-MM-dd"
+          :default-time="['00:00:00', '23:00:00']"
+          format="yyyy-MM-dd HH:mm:ss"
+          value-format="yyyy-MM-dd HH:mm:ss"
           type="daterange"
           range-separator="-"
           start-placeholder="寮�濮嬫棩鏈�"
@@ -78,24 +79,23 @@
         >
       </el-form-item>
     </el-form>
-    <el-row :gutter="10" class="mb8" >
+    <el-row :gutter="10" class="mb8">
       <el-col :span="10">
         <el-radio-group
-      v-model="tjStatus"
-      @input="radioChange"
-      style="margin: 10px 15px"
-    >
-      <el-radio-button label="1">鏈噰鏍�</el-radio-button>
-      <el-radio-button label="0">宸查噰鏍�</el-radio-button>
-    </el-radio-group>
-      </el-col >
-            <el-col :span="12" v-if="tableList.length > 1 && tjStatus==0">
-                <el-button type="primary" plain 
-                    v-hasPermi="['hosp:detail:add']">鍚堝苟鏍锋湰</el-button>
-            </el-col>
-
-        </el-row>
-   
+          v-model="tjStatus"
+          @input="radioChange"
+          style="margin: 10px 15px"
+        >
+          <el-radio-button label="1">鏈噰鏍�</el-radio-button>
+          <el-radio-button label="0">宸查噰鏍�</el-radio-button>
+        </el-radio-group>
+      </el-col>
+      <el-col :span="12" v-if="tableList.length > 1 && tjStatus == 0">
+        <el-button type="primary" plain v-hasPermi="['hosp:detail:add']"
+          >鍚堝苟鏍锋湰</el-button
+        >
+      </el-col>
+    </el-row>
 
     <div style="width: 100%; margin-left: 10px; display: flex">
       <div style="width: 40%; margin-right: 20px">
@@ -131,7 +131,7 @@
             <!-- <template slot-scope="scope">
               {{ scope.row.customer.cusSex === 0 ? "鐢�" : "濂�" }}
             </template> -->
-              <template slot-scope="scope">
+            <template slot-scope="scope">
               <span v-if="scope.row.cusSex == '0'">鐢�</span>
               <span v-if="scope.row.cusSex == '1'">濂�</span>
               <span v-if="scope.row.cusSex == '2'">鏈煡</span>
@@ -156,7 +156,6 @@
         </el-table>
       </div>
       <div style="width: 50%">
-       
         <el-table
           v-loading="loading"
           :data="tableList"
@@ -175,7 +174,12 @@
                     <span>{{ parseTime(scope.row.tjTime, '{y}-{m}-{d}') }}</span>
                 </template>
             </el-table-column> -->
-          <el-table-column label="鏍囨湰绫诲瀷" align="center" prop="specimenType" width="120">
+          <el-table-column
+            label="鏍囨湰绫诲瀷"
+            align="center"
+            prop="specimenType"
+            width="120"
+          >
             <template slot-scope="scope">
               <dict-tag
                 :options="dict.type.sys_dict_specimen"
@@ -184,15 +188,31 @@
             </template>
           </el-table-column>
           <el-table-column label="椤圭洰鍚嶇О" align="center" prop="proName" />
-          <el-table-column label="鎬у埆" align="center" prop="proSex" width="90" />
-          <el-table-column label="绌鸿吂" align="center" prop="proCheckMethod" width="90" />
+          <el-table-column
+            label="鎬у埆"
+            align="center"
+            prop="proSex"
+            width="90"
+          />
+          <el-table-column
+            label="绌鸿吂"
+            align="center"
+            prop="proCheckMethod"
+            width="90"
+          />
           <el-table-column
             label="閲囨牱缂栧彿"
             align="center"
             prop="samplingNumber"
-            :show-overflow-tooltip="true" width="120"
+            :show-overflow-tooltip="true"
+            width="120"
           />
-          <el-table-column label="閲囨牱鐘舵��" align="center" prop="isSignFor" width="90">
+          <el-table-column
+            label="閲囨牱鐘舵��"
+            align="center"
+            prop="isSignFor"
+            width="90"
+          >
             <template slot-scope="scope">
               <dict-tag
                 :options="dict.type.sampling_type"
@@ -265,6 +285,8 @@
   updateSampling,
   confirmSampling,
 } from "@/api/sampling/sampling";
+import { getNewDateList } from "@/api/hosp/order";
+import moment from "moment";
 
 export default {
   dicts: [
@@ -357,8 +379,9 @@
     };
   },
   created() {
-    this.getNowTime();
+    // this.getNowTime();
     this.getList();
+    this.getdate();
   },
   mounted() {
     this.$nextTick(() => {
@@ -366,6 +389,15 @@
     });
   },
   methods: {
+    getdate() {
+      getNewDateList().then((res) => {
+        this.createTimeList = [
+          moment(res.data).format("YYYY-MM-DD 00:00:00"),
+          moment(res.data).format("YYYY-MM-DD 23:59:00"),
+        ];
+        console.log(this.createTimeList, 111);
+      });
+    },
     handleSizeChange(val) {
       this.size = val;
       this.page = 1;
@@ -405,7 +437,7 @@
       this.queryParams.endTime = this.createTimeList[1];
       getList(this.queryParams).then((response) => {
         if (response.data) {
-           if (response.data.list == null) {
+          if (response.data.list == null) {
             this.samplingList = [];
             this.tableList = [];
             this.loading = false;
@@ -455,9 +487,9 @@
       };
       this.resetForm("form");
     },
-    hb(){
+    hb() {
       console.log(this.queryParams.tjNum);
-       if (this.queryParams.tjNum != null) {
+      if (this.queryParams.tjNum != null) {
         this.handleQuery();
       }
     },
@@ -531,7 +563,6 @@
       this.loading = true;
       this.queryParams.isSignFor = value;
       getList(this.queryParams).then((response) => {
-
         if (response.data) {
           if (response.data.list == null) {
             this.samplingList = [];
@@ -550,10 +581,10 @@
           }
           this.total = response.data.total;
           this.loading = false;
-        }else{
-           this.samplingList= [];
-           this.tableList = [];
-           this.loading = false;
+        } else {
+          this.samplingList = [];
+          this.tableList = [];
+          this.loading = false;
         }
       });
     },

--
Gitblit v1.8.0