From 377a8fb1ad828ccf9129bde69b3be72af057eef1 Mon Sep 17 00:00:00 2001
From: zzyuan <781948537@qq.com>
Date: Wed, 16 Jul 2025 11:01:11 +0800
Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E9=87=8F=E5=8F=AF=E8=BE=93=E5=85=A5?=
 =?UTF-8?q?=E4=B8=A4=E4=BD=8D=E5=B0=8F=E6=95=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
 .../purchaseManage/contractList/edit.vue      |  12 +-
 .../purchaseManage/contractList/index.vue     |   2 +-
 .../purchaseManage/productionPlan/index.vue   | 127 ++++++++++--------
 .../purchaseInspection/edit.vue               |  12 +-
 .../purchaseManage/purchaseOrder/edit.vue     |   2 +-
 .../purchaseManage/purchasePlan/edit.vue      |   2 +-
 6 files changed, 84 insertions(+), 73 deletions(-)
diff --git a/src/views/foodManage/purchaseManage/contractList/edit.vue b/src/views/foodManage/purchaseManage/contractList/edit.vue
index e2184dd6..8c046e34 100644
--- a/src/views/foodManage/purchaseManage/contractList/edit.vue
+++ b/src/views/foodManage/purchaseManage/contractList/edit.vue
@@ -139,12 +139,12 @@
                      
                     
                         
-                            (scope.row.orderNum=v.replace(/[^\d]/g,''))"/>
+                            (scope.row.orderNum=v.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1'))"/>
                         
                      
                     
                         
-                            {{ scope.row.orderNum*scope.row.singlePrice }}
+                            {{ (scope.row.orderNum*scope.row.singlePrice).toFixed(4) }}
                         
                      
                     
@@ -483,7 +483,9 @@ export default {
                     param.contractStartTime = this.formatDateTime(this.baseInfo.dateRange[0])
                     param.contractEndTime = this.formatDateTime(this.baseInfo.dateRange[1])
                     param.contractSigningTime = this.formatDate(this.baseInfo.contractSigningTime)
-                    param.payMoneyDate = this.formatDate(this.baseInfo.payMoneyDate)   
+                    if(this.baseInfo.payMoneyDate){
+                        param.payMoneyDate = this.formatDate(this.baseInfo.payMoneyDate)   
+                    } 
                     param.contractAmount = 0;
                     param.commitStatus=1
                     param.purchaseContractDetailList = []  
@@ -550,7 +552,9 @@ export default {
                     param.contractStartTime = this.formatDateTime(this.baseInfo.dateRange[0])
                     param.contractEndTime = this.formatDateTime(this.baseInfo.dateRange[1])
                     param.contractSigningTime = this.formatDate(this.baseInfo.contractSigningTime)
-                    param.payMoneyDate = this.formatDate(this.baseInfo.payMoneyDate)  
+                    if(this.baseInfo.payMoneyDate){
+                        param.payMoneyDate = this.formatDate(this.baseInfo.payMoneyDate)   
+                    } 
                     param.contractAmount = 0;
                     param.commitStatus=2
                     param.purchaseContractDetailList = [] 
diff --git a/src/views/foodManage/purchaseManage/contractList/index.vue b/src/views/foodManage/purchaseManage/contractList/index.vue
index c94a7bfa..889064e7 100644
--- a/src/views/foodManage/purchaseManage/contractList/index.vue
+++ b/src/views/foodManage/purchaseManage/contractList/index.vue
@@ -87,7 +87,7 @@
         
         
             
-               {{ (scope.row.contractAmount/100).toFixed(2) }}
+               {{ (scope.row.contractAmount/100).toFixed(4) }}
               
         
         
diff --git a/src/views/foodManage/purchaseManage/productionPlan/index.vue b/src/views/foodManage/purchaseManage/productionPlan/index.vue
index 301ff77e..db37349a 100644
--- a/src/views/foodManage/purchaseManage/productionPlan/index.vue
+++ b/src/views/foodManage/purchaseManage/productionPlan/index.vue
@@ -51,22 +51,13 @@
                 
                  
              
-          
-        
+        
          
-        
+         --> 
         
             搜索
             重置
@@ -147,6 +138,12 @@
                 icon="el-icon-edit" v-if="scope.row.status==2"
                 @click="handleView(scope.row)" 
             >详情 
+            生成采购计划 
             
 
     
-    
-      
+    
+        
+             
+             
+             
+             
+            
+                
+             
+              
+            
+                
+                    100 
+                
+            
+             
+            
+                
+                
+            
 
+              
+        
 
-
-
-         
-      
+       
       
     
@@ -206,11 +223,7 @@ export default {
             // 总条数
             total: 0,
             //表格数据
-            tableListData: [],
-            // 弹出层标题
-            title: "",
-            // 是否显示弹出层
-            open: false, 
+            tableListData: [], 
             // 查询参数
             queryParams: {
                 pageNum: 1,
@@ -248,17 +261,12 @@ export default {
                     }
                 }]
             },
-            // 表单参数
-            form: {},
-            // 表单校验
-            rules: {
-            //   canteenName: [
-            //     { required: true, message: "字典名称不能为空", trigger: "blur" }
-            //   ],
-            //   dictType: [
-            //     { required: true, message: "字典类型不能为空", trigger: "blur" }
-            //   ]
-            }
+            // 弹出层标题
+            title: "",
+            // 是否显示弹出层
+            open: false, 
+            loading2: false, 
+            dialogTableList: [], 
         };
     },
     created() { 
@@ -341,7 +349,7 @@ export default {
         handleCommand(command){
             this.$router.push({ path: "/foodManage/purchaseManage/productionPlanEdit",query: {dialogType:command} });
         }, 
-        /** 修改按钮操作 */
+        /** 详情按钮操作 */
         handleView(row) { 
             this.$router.push({ path: "/foodManage/purchaseManage/productionPlanDetail",query: {productionPlanRowData:JSON.stringify(row),dialogType:row.productionPlanType} });
         },
@@ -349,35 +357,36 @@ export default {
         handleUpdate(row) { 
             this.$router.push({ path: "/foodManage/purchaseManage/productionPlanEdit",query: {productionPlanRowData:JSON.stringify(row)} });
         },
+        /** 生成采购计划操作 */
+        handlePurchasePlan(row) { //purchaseManage/planEdit
+            this.dialogTableList = []; 
+            // let param = { 
+                // "productionPlanCode": this.queryParams.productionPlanCode,     
+                // "goodsType":1,
+                // "areaId": this.queryParams.areaId,  
+                // "canteenId": this.queryParams.canteenId,  
+                // "stallId": this.queryParams.stallId,  
+                // "status": this.queryParams.status,  
+                // "decompositionState": this.queryParams.decompositionState,   
+            // }
+            // this.loading2=true;
+            // productionPlanPageApi(param).then(response => {
+            //     this.dialogTableList = response.rows;  
+                this.title = "生成采购计划"
+                this.open=true;
+            //     this.loading2 = false;
+            // }).catch(() => {
+            //     this.loading2 = false;
+            // });
+        },
         // 取消按钮
         cancel() {
             this.open = false;
-            this.reset();
+            this.dialogTableList = []; 
         },
-        // 表单重置
-        reset() {
-            this.form = {};
-            this.resetForm("form");
-        }, 
         /** 提交按钮 */
-        submitForm: function() {
-            this.$refs["form"].validate(valid => {
-            if (valid) {
-                if (this.form.dictId != undefined) {
-                    // updateType(this.form).then(response => {
-                    //     this.$modal.msgSuccess("修改成功");
-                    //     this.open = false;
-                    //     this.getList();
-                    // });
-                } else {
-                    // addType(this.form).then(response => {
-                    //     this.$modal.msgSuccess("新增成功");
-                    //     this.open = false;
-                    //     this.getList();
-                    // });
-                }
-            }
-            });
+        submitPlan: {
+             
         },
         /** 删除按钮操作 */
         handleDelete(row) { 
diff --git a/src/views/foodManage/purchaseManage/purchaseInspection/edit.vue b/src/views/foodManage/purchaseManage/purchaseInspection/edit.vue
index 4d0cdead..6186b8d1 100644
--- a/src/views/foodManage/purchaseManage/purchaseInspection/edit.vue
+++ b/src/views/foodManage/purchaseManage/purchaseInspection/edit.vue
@@ -95,7 +95,7 @@
                      
                     
                         
-                            (scope.row.orderNum=v.replace(/[^\d]/g,''))"/>
+                            (scope.row.orderNum=v.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1'))"/>
                         
                      
                     
@@ -105,12 +105,12 @@
                      
                     
                         
-                            (scope.row.deliveryNum=v.replace(/[^\d]/g,''))"/>
+                            (scope.row.deliveryNum=v.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1'))"/>
                         
                      
                     
                         
-                            (scope.row.qualifiedNum=v.replace(/[^\d]/g,''))"/>
+                            (scope.row.qualifiedNum=v.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1'))"/>
                         
                      
                     
@@ -447,8 +447,7 @@ export default {
             this.$refs["baseInfo"].validate(valid => {
                 if (valid) { 
                     let param = Object.assign({},this.baseInfo);
-                    param.deliveryDate = this.formatDate(this.baseInfo.deliveryDate)
-                    param.payMoneyDate = this.formatDate(this.baseInfo.payMoneyDate)  
+                    param.deliveryDate = this.formatDate(this.baseInfo.deliveryDate) 
                     param.deliveryTotalNum = 0;//送货总数量 
                     param.inspectQualifiedNum = 0;//验货合格总数量 
                     param.status=1
@@ -515,8 +514,7 @@ export default {
             this.$refs["baseInfo"].validate(valid => {
                 if (valid) { 
                     let param = Object.assign({},this.baseInfo);
-                    param.deliveryDate = this.formatDate(this.baseInfo.deliveryDate)
-                    param.payMoneyDate = this.formatDate(this.baseInfo.payMoneyDate)  
+                    param.deliveryDate = this.formatDate(this.baseInfo.deliveryDate) 
                     param.deliveryTotalNum = 0;//送货总数量 
                     param.inspectQualifiedNum = 0;//验货合格总数量 
                     param.status=2
diff --git a/src/views/foodManage/purchaseManage/purchaseOrder/edit.vue b/src/views/foodManage/purchaseManage/purchaseOrder/edit.vue
index fb135ced..6d00d2f9 100644
--- a/src/views/foodManage/purchaseManage/purchaseOrder/edit.vue
+++ b/src/views/foodManage/purchaseManage/purchaseOrder/edit.vue
@@ -126,7 +126,7 @@
                      
                     
                         
-                            (scope.row.orderNum=v.replace(/[^\d]/g,''))"/>
+                            (scope.row.orderNum=v.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1'))"/>
                         
                      
                     
diff --git a/src/views/foodManage/purchaseManage/purchasePlan/edit.vue b/src/views/foodManage/purchaseManage/purchasePlan/edit.vue
index eab52abe..a5a2ee9b 100644
--- a/src/views/foodManage/purchaseManage/purchasePlan/edit.vue
+++ b/src/views/foodManage/purchaseManage/purchasePlan/edit.vue
@@ -87,7 +87,7 @@
                      
                     
                         
-                            (scope.row.purchaseNum=v.replace(/[^\d]/g,''))"/>
+                            (scope.row.purchaseNum=v.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1'))"/>