From b46bc2dba51a3885a68e4c58316b41a31ea16bb2 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 14 二月 2023 13:35:03 +0800
Subject: [PATCH] 1.存货档案修改

---
 src/views/zzmx/chda.vue       |    8 ++--
 src/views/scgl/zdpc.vue       |    2 
 src/components/Test/index.vue |   60 +++++++++++++++++++++---------
 3 files changed, 47 insertions(+), 23 deletions(-)

diff --git a/src/components/Test/index.vue b/src/components/Test/index.vue
index 312f9db..ac4cec4 100644
--- a/src/components/Test/index.vue
+++ b/src/components/Test/index.vue
@@ -6,9 +6,11 @@
     <div
       slot="reference"
       class="plan"
-      :style="{'margin-top':0.1*cellHeight+'px',}"
+      :style="{'marginTop':0.1*cellHeight+'px'}"
+
       @click="onClick"
     >
+      <!--      ,background: backgroundPercent-->
       <!-- <div class="runTime">
         <span>S:{{startToString}}</span>
         <span>E:{{endToString}}</span>
@@ -78,6 +80,7 @@
 
 <script>
 import dayjs from 'dayjs'
+import { handleDatetime2 } from '@/utils/global'
 
 const NOW_PLAN = '#D5F8EA'
 const FUTHER_PLAN = '#BFF2FE'
@@ -99,28 +102,45 @@
   data() {
     return {
       dayjs: dayjs
+
     }
   },
   computed: {
-    statusColor() {
-      const { item, currentTime } = this
-      const start = dayjs(item.start)
-      const end = dayjs(item.end)
-      // if(item.type == 'capacity'){
-      //   return CAPACITY
-      // }else if(item.type == 'h_schedule'){
-      //   return H_SCHEDULE
-      // }else if(item.type == 'schedule'){
-      //   return SCHEDULEING
+    backgroundPercent() {
+      // console.log(JSON.stringify(this.item), 9)
+      // this.item.forEach(item => {
+      //
+      // })
+      // `linear-gradient(to right,rgba(5, 185, 100, 0.1) 0%,rgba(5, 185, 100, 0.1) 4.99%,rgba(167, 167, 167, 0.3) 5%,rgba(167, 167, 167, 0.3) `+ percentCenter +`%,rgba(5, 185, 100, 0.1)  `+(percentCenter+0.01)+`%,rgba(5, 185, 100, 0.1) 100%)`}
+      // const molecule = (new Date(handleDatetime2(new Date())).getTime() - new Date(this.item.start).getTime()) / 1000 // 鍒嗗瓙
+      // const denominator = (new Date(this.item.end).getTime() - new Date(this.item.start).getTime()) / 1000 // 鍒嗘瘝
+      // let percentCenter = ((molecule * 1 / denominator * 1) * 100).toFixed(2) * 1
+      // if (percentCenter < 0) {
+      //   percentCenter = 0
       // }
-      // if (start.isBefore(currentTime) && end.isAfter(currentTime)) {
-      //   return NOW_PLAN; // NOW
-      // } else if (end.isBefore(currentTime)) {
-      //   return PAST_PLAN; // PAST
-      // } else {
-      //   return FUTHER_PLAN; // Future
-      // }
+      // return percentCenter
+
+      return `linear-gradient(to right,rgba(167, 167, 167, 0.3) 0%,rgba(167, 167, 167, 0.3) 50%,rgba(5, 185, 100, 0.1)  51%,rgba(5, 185, 100, 0.1) 100%)`
     },
+    // statusColor() {
+    // const { item, currentTime } = this
+    // const start = dayjs(item.start)
+    // const end = dayjs(item.end)
+    // if(item.type == 'capacity'){
+    //   return CAPACITY
+    // }else if(item.type == 'h_schedule'){
+    //   return H_SCHEDULE
+    // }else if(item.type == 'schedule'){
+    //   return SCHEDULEING
+    // }
+    // if (start.isBefore(currentTime) && end.isAfter(currentTime)) {
+    //   return NOW_PLAN; // NOW
+    // } else if (end.isBefore(currentTime)) {
+    //   return PAST_PLAN; // PAST
+    // } else {
+    //   return FUTHER_PLAN; // Future
+    // }
+    // },
     startToString() {
       return dayjs(this.item.start).format('HH:mm')
     },
@@ -128,6 +148,7 @@
       return dayjs(this.item.end).format('HH:mm')
     }
   },
+
   methods: {
     onClick() {
       this.updateTimeLines(this.item.start, this.item.end)
@@ -143,7 +164,10 @@
   position: relative;
   z-index: 0;
   // background:rgba(171, 245, 240 , 0.6);
+
   background: rgba(5, 185, 100, 0.1);
+
+  //background: linear-gradient(to right, rgba(167, 167, 167, 0.3) 0%,rgba(167, 167, 167, 0.3) 20%,rgba(5, 185, 100, 0.1) 21%,rgba(5, 185, 100, 0.1) 100%);
   text-align: center;
   border-radius: 5px;
 
diff --git a/src/views/scgl/zdpc.vue b/src/views/scgl/zdpc.vue
index e939d8b..716955d 100644
--- a/src/views/scgl/zdpc.vue
+++ b/src/views/scgl/zdpc.vue
@@ -271,7 +271,7 @@
             <div class="colorDescriptionItem"><i class="el-icon-s-opportunity" style="margin-right: 5px;color: rgba(5, 185, 100, 0.5)" />浜ц兘</div>
             <div class="colorDescriptionItem"><i class="el-icon-s-opportunity" style="margin-right: 5px;color: rgba(5, 185, 100, 1)" />宸叉帓</div>
             <div class="colorDescriptionItem"><i class="el-icon-s-opportunity" style="margin-right: 5px;color:rgba(128,0,128,0.7)" />棰勬帓</div>
-            <!--            <div class="colorDescriptionItem"><i class="el-icon-s-opportunity" style="color: #a7a7a7" />宸插け鏁堟椂闂�</div>-->
+            <!--            <div class="colorDescriptionItem"><i class="el-icon-s-opportunity" style="margin-right: 5px;color: #a7a7a7" />澶辨晥浜ц兘</div>-->
           </div>
           <div
             class="bodyTopFormExpand"
diff --git a/src/views/zzmx/chda.vue b/src/views/zzmx/chda.vue
index 34e1ed1..9f8c7ca 100644
--- a/src/views/zzmx/chda.vue
+++ b/src/views/zzmx/chda.vue
@@ -1074,8 +1074,8 @@
         this.dialogForm.warehousecode = row.stck_code
         this.dialogForm.stocktypecode = row.stocktypecode
         this.dialogForm.materialtypecode = row.materialtypecode
-        this.dialogForm.minstockqty = row.maxqty
-        this.dialogForm.maxstockqty = row.minqty
+        this.dialogForm.minstockqty = row.minqty
+        this.dialogForm.maxstockqty = row.maxqty
         this.isBatchNo = row.is_batchno === 'Y'
         this.isFifo = row.is_fifo === 'Y'
         this.isInCheck = row.is_incheck === 'Y'
@@ -1139,8 +1139,8 @@
             warehousecode: this.dialogForm.warehousecode,
             stocktypecode: this.dialogForm.stocktypecode,
             materialtypecode: this.dialogForm.materialtypecode,
-            minstockqty: this.dialogForm.minstockqty === null ? 0 : this.dialogForm.minstockqty,
-            maxstockqty: this.dialogForm.maxstockqty === null ? 0 : this.dialogForm.maxstockqty,
+            minstockqty: this.dialogForm.minstockqty ? parseFloat(this.dialogForm.minstockqty) : 0,
+            maxstockqty: this.dialogForm.maxstockqty ? parseFloat(this.dialogForm.maxstockqty) : 0,
             OperType: this.operation === 'add' ? 'Add' : 'Update',
             is_batchno: this.isBatchNo ? 'Y' : 'N',
             is_fifo: this.isFifo ? 'Y' : 'N',

--
Gitblit v1.9.3