Explorar o código

配送赋值问题: isdelivery 为 null 强制转换成 0
f959d3ceb4dc8cc0d903409cc249e24645787ff3

cc12458 hai 1 ano
pai
achega
61092d3368
Modificáronse 1 ficheiros con 10 adicións e 4 borrados
  1. 10 4
      src/views/diagnosis/Prescribing.vue

+ 10 - 4
src/views/diagnosis/Prescribing.vue

@@ -1785,7 +1785,9 @@ export default {
         medAdressData = this.$refs.medAdress.form;
       }
 
+      console.group("debug:20250558")
       data1.recipe_tabs.forEach((item, index) => {
+        console.log("填写值", item.bottom_form.radio)
         let obj = {
           seqn: index + 1,
           province:
@@ -1837,6 +1839,7 @@ export default {
           // preId: this.$route.query.recipeID ? this.$route.query.recipeID : ""
           preId: item.preId ? item.pageId : ""
         };
+        console.log("保存值", obj.isdelivery)
         item.totalTableD.forEach(item1 => {
           if (item1.name && item1.color != "red") {
             let obj1 = {
@@ -1880,7 +1883,7 @@ export default {
           zhongPrescriptionVo.push(obj);
         }
       });
-
+      console.groupEnd()
       return zhongPrescriptionVo;
     },
     // 处理中成药处方提交数据
@@ -2172,8 +2175,11 @@ export default {
             // if (isAutoCheck == 1) {
 
             // }
-
-            obj.bottom_form.radio = Number(item.isdelivery);
+            console.group("debug:20250558")
+            console.log('配送原始', item.isdelivery);
+            obj.bottom_form.radio = item.isdelivery == null ? null : Number(item.isdelivery);
+            console.log('配送赋值', obj.bottom_form.radio);
+            console.groupEnd()
             obj.bottom_form.savename = item.consigneeName;
             obj.bottom_form.phone = item.consigneePhone;
             obj.bottom_form.address = item.address;
@@ -2325,7 +2331,7 @@ export default {
         data1.bottom_form.zhutuo = data.command;
         data1.preId = data.preId ? data.preId : "";
         if (!!this.getEditPreNo()) {
-          data1.bottom_form.radio = Number(data.isdelivery);
+          data1.bottom_form.radio = data.isdelivery == null ? null : Number(data.isdelivery);
           data1.bottom_form.savename = data.consigneeName;
           data1.bottom_form.phone = data.consigneePhone;
           data1.bottom_form.address = data.address;