From ea952b446a6fca053c27178bccf1c2af6f25f30b Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期五, 21 六月 2024 09:33:25 +0800
Subject: [PATCH] 添加尺寸审核重新进入保留之前输入

---
 north-glass-erp/northglass-erp/src/stores/sd/order/orderInfo.js           |   25 +++++++++++++++++++++++++
 north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue         |    1 +
 north-glass-erp/northglass-erp/src/components/sd/order/OrderSizeCheck.vue |   33 ++++++++++++++++-----------------
 3 files changed, 42 insertions(+), 17 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/components/sd/order/OrderSizeCheck.vue b/north-glass-erp/northglass-erp/src/components/sd/order/OrderSizeCheck.vue
index 6c95691..546b127 100644
--- a/north-glass-erp/northglass-erp/src/components/sd/order/OrderSizeCheck.vue
+++ b/north-glass-erp/northglass-erp/src/components/sd/order/OrderSizeCheck.vue
@@ -1,11 +1,11 @@
 <script setup>
-import {defineEmits, onMounted, reactive, ref, watch} from "vue";
-import {changeFilterEvent, filterChanged} from "@/hook"
+import {defineEmits, onMounted, reactive, ref, watch} from "vue"
 import {useI18n} from "vue-i18n"
-import request from "@/utils/request"
-import {ElMessage} from "element-plus";
+import {ElMessage} from "element-plus"
+import useOrderInfoStore from "@/stores/sd/order/orderInfo"
 const { t } = useI18n()
 const xGrid = ref()
+const orderInfo = useOrderInfoStore()
 const gridOptions = reactive({
   loading:false,
   border:  "full",//琛ㄦ牸鍔犺竟妗�
@@ -78,12 +78,6 @@
             ElMessage.error(t('basicData.msg.checkoutLose'))
             return
           }
-          // const $table = props.OrderDetail
-          // $table.getTableData().fullData.forEach((row)=>{
-          //   if()row.computeGrossArea
-          // })
-
-
           emit('getParent')
           break
         }
@@ -96,24 +90,29 @@
 const emit = defineEmits(['getParent'])
 
 let props = defineProps({
-  OrderDetail:null
+  OrderDetail:null,
+  orderId:null
 })
+
+
 onMounted(()=>{
   const length = props.OrderDetail.getTableData().fullData.length
   const $grid = xGrid.value
-  let list = []
-  for (let i = 0; i < length; i++) {
+  if(props.orderId !== orderInfo.orderId){
+    orderInfo.clearOrderInfo()
+    orderInfo.orderId=props.orderId
 
-    list.push({})
-
+    for (let i = 0; i < length; i++) {
+      orderInfo.reviewList.push({})
+    }
   }
-  xGrid.value.reloadData(list)
+
+  xGrid.value.reloadData(orderInfo.reviewList)
 
 })
 
 const editClosedEvent = ({ row, column,rowIndex}) => {
   const $table = props.OrderDetail
-  console.log($table.getTableData())
   let checkVal = row[column.property]*1
   const oldVal = $table.getTableData().fullData[rowIndex][column.property]*1
   if(checkVal!==oldVal){
diff --git a/north-glass-erp/northglass-erp/src/stores/sd/order/orderInfo.js b/north-glass-erp/northglass-erp/src/stores/sd/order/orderInfo.js
new file mode 100644
index 0000000..1880538
--- /dev/null
+++ b/north-glass-erp/northglass-erp/src/stores/sd/order/orderInfo.js
@@ -0,0 +1,25 @@
+import {defineStore} from "pinia";
+
+export default defineStore('orderInfo', {
+
+    state: () => ({
+        orderId:null,
+        reviewList:[]
+    }),
+    actions: {
+
+        // 鑾峰彇璁㈠崟淇℃伅
+        getOrderInfo(orderId){
+            this.orderId = orderId
+        },
+        // 鑾峰彇璁㈠崟璇勮
+        getOrderReview(reviewList){
+            this.reviewList = reviewList
+        },
+        clearOrderInfo(){
+            this.orderId = null
+            this.reviewList = []
+        }
+    },
+    persist: true
+})
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue b/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
index b89508c..027e15e 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
@@ -1326,6 +1326,7 @@
     >
       <order-size-check
           @getParent="gaveOrderSizeCheck"
+          :orderId="titleUploadData.orderId"
           :OrderDetail="xGrid"/>
     </el-dialog>
 

--
Gitblit v1.8.0