Browse Source

2025 5 12

xmg123 2 days ago
parent
commit
3b989881a6

+ 6 - 1
src/xt_pages/Pharmacy/PatientDispensing.vue View File

@@ -1487,8 +1487,13 @@ export default {
1487 1487
         }
1488 1488
       }else{ //耗材
1489 1489
         if (event.key === 'Enter') {
1490
+
1491
+           const halfWidth = this.textarea.replace(/[\uff01-\uff5e]/g, ch => String.fromCharCode(ch.charCodeAt(0) - 0xfee0));
1492
+            // 2. 移除中文空格(全角空格转半角)
1493
+          const normalizedSpace = halfWidth.replace(/\u3000/g, ' ');
1494
+          console.log("normalizedSpace----------",normalizedSpace)
1490 1495
           var textarea = ""
1491
-          textarea += this.textarea + ","
1496
+          textarea += normalizedSpace + ","
1492 1497
           this.textarea = textarea
1493 1498
         }
1494 1499
       }

+ 7 - 4
src/xt_pages/dialysis/batch_print/batch_print_order_forty.vue View File

@@ -465,14 +465,17 @@
465 465
                             <tbody>
466 466
                             <tr>
467 467
                                 <td width="70">抗凝方式:</td>
468
-                                <td width="90">
468
+                                <td width="90" v-if="record.prescription.anticoagulant==2">
469 469
                                     <label-box :isChecked="record.prescription.anticoagulant==2?true:false" showValue='普通肝素'></label-box>
470 470
                                 </td>
471
+                                <td width="90" v-if="record.prescription.anticoagulant==15">
472
+                                    <label-box :isChecked="record.prescription.anticoagulant==15?true:false" showValue='甲磺酸萘莫司他'></label-box>
473
+                                </td>
471 474
                                 <td width="10">(</td>
472 475
                                 <td width="35">首剂</td>
473 476
                                 <td width="50">
474 477
                                     <div class="under-line">&nbsp;
475
-                                    <span v-if="record.prescription.anticoagulant==2">{{record.prescription.anticoagulant_shouji}}</span>
478
+                                    <span v-if="record.prescription.anticoagulant==2 || record.prescription.anticoagulant==15">{{record.prescription.anticoagulant_shouji}}</span>
476 479
                                     </div>
477 480
                                 </td>
478 481
                                 <td width="20">mg</td>
@@ -480,14 +483,14 @@
480 483
                                 <td width="35">追加</td>
481 484
                                 <td width="50">
482 485
                                     <div class="under-line">&nbsp;
483
-                                    <span v-if="record.prescription.anticoagulant==2">{{record.prescription.anticoagulant_weichi}}</span>
486
+                                    <span v-if="record.prescription.anticoagulant==2 || record.prescription.anticoagulant==15">{{record.prescription.anticoagulant_weichi}}</span>
484 487
                                     </div>
485 488
                                 </td>
486 489
                                 <td width="40">mg/h</td>
487 490
                                 <td width="35">总量</td>
488 491
                                 <td width="50">
489 492
                                     <div class="under-line">&nbsp;
490
-                                    <span v-if="record.prescription.anticoagulant==2">{{record.prescription.anticoagulant_zongliang}}</span>
493
+                                    <span v-if="record.prescription.anticoagulant==2 || record.prescription.anticoagulant==15">{{record.prescription.anticoagulant_zongliang}}</span>
491 494
                                     </div>
492 495
                                 </td>
493 496
                                 <td width="20">mg</td>

+ 7 - 4
src/xt_pages/dialysis/template/DialysisPrintOrderForty.vue View File

@@ -597,14 +597,17 @@
597 597
                   <tbody>
598 598
                     <tr>
599 599
                       <td width="70">抗凝方式:</td>
600
-                      <td width="90">
600
+                      <td width="90" v-if="prescription.anticoagulant == 2">
601 601
                         <label-box :isChecked="prescription.anticoagulant == 2 ? true : false" showValue='普通肝素'></label-box>
602 602
                       </td>
603
+                      <td width="90" v-if="prescription.anticoagulant == 15">
604
+                        <label-box :isChecked="prescription.anticoagulant == 15 ? true : false" showValue='甲磺酸萘莫司他'></label-box>
605
+                      </td>
603 606
                       <td width="10">(</td>
604 607
                       <td width="35">首剂</td>
605 608
                       <td width="50">
606 609
                         <div class="under-line">&nbsp;
607
-                          <span v-if="prescription.anticoagulant == 2">{{ prescription.anticoagulant_shouji }}</span>
610
+                          <span v-if="prescription.anticoagulant == 2 || prescription.anticoagulant == 15">{{ prescription.anticoagulant_shouji }}</span>
608 611
                         </div>
609 612
                       </td>
610 613
                       <td width="20">mg</td>
@@ -612,14 +615,14 @@
612 615
                       <td width="35">追加</td>
613 616
                       <td width="50">
614 617
                         <div class="under-line">&nbsp;
615
-                          <span v-if="prescription.anticoagulant == 2">{{ prescription.anticoagulant_weichi }}</span>
618
+                          <span v-if="prescription.anticoagulant == 2 || prescription.anticoagulant == 15">{{ prescription.anticoagulant_weichi }}</span>
616 619
                         </div>
617 620
                       </td>
618 621
                       <td width="40">mg/h</td>
619 622
                       <td width="35">总量</td>
620 623
                       <td width="50">
621 624
                         <div class="under-line">&nbsp;
622
-                          <span v-if="prescription.anticoagulant == 2">{{ prescription.anticoagulant_zongliang }}</span>
625
+                          <span v-if="prescription.anticoagulant == 2 || prescription.anticoagulant == 15">{{ prescription.anticoagulant_zongliang }}</span>
623 626
                         </div>
624 627
                       </td>
625 628
                       <td width="20">mg</td>

+ 107 - 6
src/xt_pages/stock/drugs/drugStockFlow.vue View File

@@ -5,10 +5,15 @@
5 5
     </div>
6 6
     <div class="app-container ">
7 7
       <div class="cell clearfix">
8
-       药品名称:<span>{{getName(this.$route.query.drug_id)}}</span>&nbsp;
9
-       库存: {{this.$route.query.over_plus}}
8
+       药品名称:<span>{{getName(this.drug_id)}}</span>&nbsp;
9
+       库存: 
10
+       <span>
11
+         <span v-if="getSumCount(this.drug_id)/drug.min_number>0">{{getSumCount(this.drug_id)/drug.min_number}}{{drug.max_unit}}</span> 
12
+         <span v-if="getSumCount(this.drug_id)%drug.min_number>0">{{getSumCount(this.drug_id)%drug.min_number}}{{drug.min_unit}}</span> 
13
+      </span>
14
+       <!-- {{this.$route.query.over_plus}} -->
10 15
        规格:<span>{{drug.dose}}{{drug.dose_unit}}*{{drug.min_number}}{{drug.min_unit}}/{{drug.max_unit}}</span>&nbsp;
11
-       厂家:<span>{{this.$route.query.manufacturer}}</span>&nbsp;
16
+       厂家:<span>{{manufacturer_name}}</span>&nbsp;
12 17
       </div>
13 18
       <div class="cell clearfix">
14 19
         <span>日期查询:</span>
@@ -48,6 +53,37 @@
48 53
               :value="item.id">
49 54
             </el-option>
50 55
         </el-select>
56
+
57
+        <span>药品名称:</span>
58
+
59
+        <el-autocomplete
60
+            class="checkSearch"
61
+            popper-class="my-autocomplete"
62
+            v-model="drug_name"
63
+            :fetch-suggestions="querySearchAsync"
64
+            :trigger-on-focus="true"
65
+            placeholder="请输入药品名称"
66
+            @select="handleSelect"
67
+            style="width: 300px"
68
+          >
69
+        <i class="el-icon-search el-input__icon" slot="suffix"></i>
70
+        <template slot-scope="{ item }">
71
+          <div class="name">
72
+            {{
73
+              item.drug_name +
74
+              item.dose +
75
+              item.dose_unit +
76
+              "*" +
77
+              item.min_number +
78
+              item.min_unit +
79
+              "/" +
80
+              item.max_unit +
81
+              "  " +
82
+              item.manufacturer
83
+            }}
84
+          </div>
85
+        </template>
86
+      </el-autocomplete>
51 87
         
52 88
         <span>
53 89
           <el-button type="primary" size="small" @click="toExprot">导出</el-button>
@@ -207,11 +243,14 @@
207 243
   import { uParseTime } from '@/utils/tools'
208 244
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
209 245
   import { getDrugStockFlow,getOutDrugStockFlow,getDrugCountList,getDrugFlow,getDrugFlowDetailByDrugId } from '@/api/drug/drug_stock'
246
+  import { postSearchDrugList } from "@/api/data";
210 247
   import SettingDialog from './settingDialog/index'
211 248
   import { getDictionaryDataConfig } from "@/utils/data";
212 249
   export default {
213 250
     name: 'stockIn',
214 251
     created() {
252
+      this.drug_id = this.$route.query.drug_id
253
+      this.manufacturer_name = this.$route.query.manufacturer
215 254
        var nowDate = new Date();
216 255
       var nowYear = nowDate.getFullYear();
217 256
       var nowMonth = nowDate.getMonth() + 1;
@@ -296,11 +335,65 @@
296 335
         drug:{},
297 336
         houseList:[],
298 337
         patientList:[],
299
-        adviceMap:[]
338
+        adviceMap:[],
339
+        drug_id:0,
340
+        drug_name:"",
341
+        drugList:[],
342
+        manufacturerList:[],
343
+        dealerList:[],
344
+        manufacturer_name:""
345
+
300 346
       }
301 347
     },
302 348
     methods:{
303
-       getlist(){
349
+        handleSelect(val){
350
+          console.log("val-----------",val)
351
+          this.drug_name = val.drug_name
352
+          this.drug_id = val.id
353
+          this.manufacturer_name = val.manufacturer
354
+          this.getDrugFlow()
355
+        },
356
+        querySearchAsync(keyword, cb) {
357
+          let key = "";
358
+          if (keyword != undefined) {
359
+            key = keyword;
360
+          }
361
+          let searchArray = [];
362
+          postSearchDrugList(key, this.storehouse_id).then((response) => {
363
+            if (response.data.state == 1) {
364
+              searchArray = response.data.data.list;
365
+
366
+              var list = response.data.data.list;
367
+
368
+              this.drugList = list;
369
+              var manufacturerList = response.data.data.manufacturerList;
370
+              this.manufacturerList = manufacturerList;
371
+              var dealerList = response.data.data.dealerList;
372
+              this.dealerList = dealerList;
373
+              for (let i = 0; i < this.drugList.length; i++) {
374
+                for (let j = 0; j < this.manufacturerList.length; j++) {
375
+                  if (
376
+                    this.drugList[i].manufacturer == this.manufacturerList[j].id
377
+                  ) {
378
+                    this.drugList[i].manufacturer =
379
+                      this.manufacturerList[j].manufacturer_name;
380
+                  }
381
+                }
382
+
383
+                for (let z = 0; z < dealerList.length; z++) {
384
+                  if (this.drugList[i].dealer == this.dealerList[z].id) {
385
+                    this.drugList[i].dealer = this.dealerList[z].dealer_name;
386
+                  }
387
+                }
388
+              }
389
+
390
+              cb(this.drugList);
391
+            } else {
392
+              cb([]);
393
+            }
394
+          });
395
+        },
396
+        getlist(){
304 397
            var params = {
305 398
              drug_id:this.$route.query.drug_id,
306 399
              start_time:this.start_time,
@@ -528,13 +621,14 @@
528 621
 
529 622
      getDrugFlow(){
530 623
        var params = {
531
-          drug_id:this.$route.query.drug_id,
624
+          drug_id:this.drug_id,
532 625
           start_time:this.start_time,
533 626
           end_time:this.end_time,
534 627
           page:this.page,
535 628
           limit:this.limit,
536 629
           stock_type:this.stock_type,  
537 630
         }
631
+      console.log("param-------------",params)
538 632
        getDrugFlow(params).then(response=>{
539 633
           if(response.data.state ==1){
540 634
             var list = response.data.data.list
@@ -579,6 +673,13 @@
579 673
         }
580 674
         return name
581 675
      },
676
+     getSumCount(drug_id){
677
+        var sum_count = ""
678
+        if(drug_id == this.drug.id){
679
+          sum_count = this.drug.sum_count
680
+        }
681
+        return sum_count
682
+     },
582 683
      getPrice(id){
583 684
        var min_price = 0 
584 685
        if(id == this.drug.id){

+ 93 - 9
src/xt_pages/stock/stockFlow.vue View File

@@ -5,10 +5,10 @@
5 5
     </div>
6 6
     <div class="app-container ">
7 7
       <div class="cell clearfix">
8
-       耗材名称:{{getGoodName(this.$route.query.id)}} &nbsp;
9
-       库存: {{this.$route.query.overCount}}{{packing_unit}} &nbsp;
10
-       规格:{{getSpecName(this.$route.query.id)}} &nbsp;
11
-       厂家:{{this.$route.query.manufacturer}}
8
+       耗材名称:{{getGoodName(this.good_id)}} &nbsp;
9
+       库存: {{getSumCount(this.good_id)}}{{packing_unit}} &nbsp;
10
+       规格:{{getSpecName(this.good_id)}} &nbsp;
11
+       厂家:{{manufacturer}}
12 12
       </div>
13 13
       <div class="cell clearfix">
14 14
         <span>日期查询:</span>
@@ -49,6 +49,25 @@
49 49
             </el-option>
50 50
         </el-select>
51 51
 
52
+        <span>耗材名称: </span>
53
+
54
+        <el-autocomplete
55
+              class="checkSearch"
56
+              popper-class="my-autocomplete"
57
+              v-model="good_name"
58
+              :fetch-suggestions="querySearchAsync"
59
+              :trigger-on-focus="true"
60
+              placeholder="请输入耗材名称"
61
+              @select="handleSelect"
62
+              style="width:300px;"
63
+              :popper-append-to-body="true"
64
+            >
65
+              <i class="el-icon-search el-input__icon" slot="suffix"></i>
66
+            <template slot-scope="{ item }">
67
+              <div class="name">{{ item.good_name +"  " +item.specification_name + "  "+item.manufacturer }}</div>
68
+            </template>
69
+        </el-autocomplete>
70
+
52 71
         <span>
53 72
           <el-button type="primary" size="small" @click="toExprot">导出</el-button>
54 73
 
@@ -186,10 +205,12 @@
186 205
 <script>
187 206
   import { uParseTime } from '@/utils/tools'
188 207
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
189
-  import {getStockDrugCount,getStockFlow,getStockFlowOrderList} from "@/api/stock"
208
+  import {getStockDrugCount,getStockFlow,getStockFlowOrderList,postSearchGoodList} from "@/api/stock"
190 209
   export default {
191 210
     name: 'stockIn',
192 211
     created() {
212
+      this.manufacturer = this.$route.query.manufacturer
213
+      this.good_id = this.$route.query.id
193 214
       var nowDate = new Date();
194 215
       var nowYear = nowDate.getFullYear();
195 216
       var nowMonth = nowDate.getMonth() + 1;
@@ -213,6 +234,7 @@
213 234
       
214 235
       this.getStockFlow()
215 236
       this.packing_unit = this.$route.query.packing_unit
237
+    
216 238
     },
217 239
     components: {
218 240
       BreadCrumb
@@ -272,11 +294,61 @@
272 294
         good:{},
273 295
         houseList:[],
274 296
         patientList:[],
275
-        hisPrescription:[]
276
-
297
+        hisPrescription:[],
298
+        goodList:[],
299
+        currentIndex: 0,
300
+        manufacturerList:[],
301
+        dealerList:[],
302
+        good_id:0,
303
+        good_name:"",
304
+        manufacturer:""
277 305
       }
278 306
     },
279 307
     methods:{
308
+      handleSelect(val){
309
+        console.log("valo00000",val)
310
+        this.good_id = val.id
311
+        this.good_name = val.good_name
312
+        this.manufacturer = val.manufacturer
313
+        this.getStockFlow()
314
+      },
315
+      querySearchAsync(keyword, cb) {
316
+        let key = '';
317
+        if (keyword != undefined) {
318
+          key = keyword
319
+        }
320
+        postSearchGoodList(key,this.storehouse_id).then(response => {
321
+          if (response.data.state == 1) {
322
+
323
+             var list = response.data.data.list
324
+
325
+             this.goodList = list
326
+             var manufacturerList = response.data.data.manufacturerList
327
+             this.manufacturerList = manufacturerList
328
+             var dealer =  response.data.data.dealerList
329
+             this.dealerList = dealer
330
+             for(let i=0;i<this.goodList.length;i++){
331
+                for(let j=0;j<this.manufacturerList.length;j++){
332
+                  if(this.goodList[i].manufacturer == this.manufacturerList[j].id){
333
+                     this.goodList[i].manufacturer = this.manufacturerList[j].manufacturer_name
334
+                  }
335
+                }
336
+             }
337
+
338
+             for(let i=0;i<this.goodList.length;i++){
339
+               for(let j=0;j<this.dealerList.length;j++){
340
+                  if(this.goodList[i].dealer == this.dealerList[j].id){
341
+                    this.goodList[i].dealer = this.dealerList[j].dealer_name
342
+                  }
343
+               }
344
+             }
345
+
346
+             cb(this.goodList)
347
+          } else {
348
+            cb([])
349
+          }
350
+        })
351
+    },
280 352
      handleSizeChange(val) {
281 353
         this.limit = val
282 354
         this.getStockFlow()
@@ -465,7 +537,7 @@
465 537
         var params= {
466 538
           limit:this.limit,
467 539
           page:this.page,
468
-          good_id:this.$route.query.id,
540
+          good_id:this.good_id,
469 541
           start_time:this.start_time,
470 542
           end_time:this.end_time,
471 543
           is_sys:this.stock_type 
@@ -475,10 +547,14 @@
475 547
           if(response.data.state == 1){
476 548
             var list =  response.data.data.list
477 549
             var total = response.data.data.total
550
+            this.tableList = []
478 551
             this.tableList = list
479 552
             this.total = total
480
-            this.good = response.data.data.good
553
+           var good = response.data.data.good
554
+           this.good = {}
555
+           this.good = good
481 556
            var manufacturerList = response.data.data.manufacturerList
557
+           this.manufacturerList = []
482 558
            this.manufacturerList = manufacturerList
483 559
            this.houseList = response.data.data.houseList
484 560
            this.patientList = response.data.data.patients
@@ -498,6 +574,14 @@
498 574
         }
499 575
         return storehouse_name
500 576
      },
577
+     getSumCount(id){
578
+       var sum_count = 0
579
+       if(id == this.good.id){
580
+        sum_count = this.good.sum_count
581
+       }
582
+       return sum_count
583
+       
584
+     },
501 585
      getGoodName(id){
502 586
        
503 587
        var good_name =  ""

+ 44 - 3
src/xt_pages/stock/stockInOrderAdd.vue View File

@@ -142,6 +142,26 @@
142 142
             </template>
143 143
           </el-table-column>
144 144
 
145
+          <el-table-column align="center" width="100">
146
+            <template slot="header" slot-scope="scope">
147
+              <span>拆零次数</span>
148
+            </template>
149
+            <template slot-scope="scope">
150
+              <el-form-item
151
+                style="padding-top: 10px"
152
+              >
153
+                <div style="display: flex">
154
+                  <el-input
155
+                    type="number"
156
+                    placeholder="请输入入库数量"
157
+                    v-model="scope.row.split_of_number"
158
+                    style="width: 100px"
159
+                  ></el-input>
160
+                </div>
161
+              </el-form-item>
162
+            </template>
163
+          </el-table-column>
164
+
145 165
           <el-table-column align="center" width="120">
146 166
             <template slot="header" slot-scope="scope">
147 167
               <span>零售价<span style="color: red">*</span></span>
@@ -674,6 +694,7 @@
674 694
         tempObj['good_code'] = ""
675 695
         tempObj['good_code_cnt'] = ''
676 696
         tempObj["good_code_count"] =''
697
+        tempObj['split_of_number'] = 24
677 698
         this.recordInfo.recordData.push(tempObj)
678 699
       }, handleDelete: function(index, row) {
679 700
         if (this.recordInfo.recordData.length <= 1) {
@@ -852,6 +873,12 @@
852 873
              if(this.recordInfo.recordData[i].dealer == ""){
853 874
                 this.recordInfo.recordData[i].dealer = 0
854 875
              }
876
+
877
+             if(this.recordInfo.recordData[i].split_of_number>0){
878
+              this.recordInfo.recordData[i].split_of_number = parseInt(this.recordInfo.recordData[i].split_of_number) 
879
+             }else{
880
+              this.recordInfo.recordData[i].split_of_number=0
881
+             }
855 882
               for(let j=0;j<this.manufacturerList.length;j++){
856 883
                  if(this.recordInfo.recordData[i].manufacturer == this.manufacturerList[j].manufacturer_name){
857 884
 
@@ -868,6 +895,8 @@
868 895
               }
869 896
               this.recordInfo.recordData[i].warehousing_count = this.recordInfo.recordData[i].warehousing_count.toString()
870 897
             }
898
+
899
+           
871 900
             const loading = this.$loading({
872 901
               lock: true,
873 902
               text: 'Loading',
@@ -911,6 +940,7 @@
911 940
                   list[i].good_name = list[i].GoodInfo.good_name
912 941
                   list[i].name = list[i].GoodInfo.specification_name +"/"+ list[i].GoodInfo.packing_unit
913 942
                   list[i].good_code = list[i].good_code
943
+                  list[i].split_of_number = list[i].split_of_number
914 944
                 }
915 945
                 this.recordInfo.recordData = []
916 946
                 this.recordInfo.recordData = list
@@ -1095,10 +1125,20 @@
1095 1125
      },
1096 1126
      changeText(event){
1097 1127
 
1098
-      var  textAreaList = this.textarea.split(",")
1128
+        // 1. 转换为半角字符(英文输入法标准)
1129
+        const halfWidth = this.textarea.replace(/[\uff01-\uff5e]/g, ch => 
1130
+          String.fromCharCode(ch.charCodeAt(0) - 0xfee0)
1131
+        );
1132
+        
1133
+        // 2. 移除中文空格(全角空格转半角)
1134
+      const normalizedSpace = halfWidth.replace(/\u3000/g, ' ');
1135
+
1136
+      console.log("normalizedSpace----------",normalizedSpace)
1137
+
1138
+      var  textAreaList = normalizedSpace.split(",")
1099 1139
       if (event.key === 'Enter') {
1100 1140
         var textarea = ""
1101
-         textarea += this.textarea.replace(/^\s*[\r\n]|\r?\n\s*$/gm, '') + ","
1141
+         textarea += normalizedSpace.replace(/^\s*[\r\n]|\r?\n\s*$/gm, '') + ","
1102 1142
          var  parts = textarea.split(',')
1103 1143
          for(let i=0;i<textAreaList.length;i++){
1104 1144
            if(parts[parts.length-2] == textAreaList[i]){
@@ -1177,7 +1217,8 @@
1177 1217
       tempObj['id']= 0
1178 1218
       tempObj['register_number'] = ''
1179 1219
       tempObj['good_code'] = ''
1180
-        tempObj['good_code_cnt'] = ''
1220
+      tempObj['good_code_cnt'] = ''
1221
+      tempObj['split_of_number'] = 24
1181 1222
 
1182 1223
 
1183 1224
       this.recordInfo.recordData.push(tempObj)

+ 59 - 7
src/xt_pages/stock/stockInOrderEdit.vue View File

@@ -166,6 +166,25 @@
166 166
 
167 167
             </template>
168 168
           </el-table-column>
169
+          <el-table-column align="center" width="100">
170
+            <template slot="header" slot-scope="scope">
171
+              <span>拆零次数</span>
172
+            </template>
173
+            <template slot-scope="scope">
174
+              <el-form-item
175
+                style="padding-top: 10px"
176
+              >
177
+                <div style="display: flex">
178
+                  <el-input
179
+                    type="number"
180
+                    placeholder="请输入入库数量"
181
+                    v-model="scope.row.split_of_number"
182
+                    style="width: 100px"
183
+                  ></el-input>
184
+                </div>
185
+              </el-form-item>
186
+            </template>
187
+          </el-table-column>
169 188
           <el-table-column align="center" width="120">
170 189
             <template slot="header" slot-scope="scope">
171 190
               <span>进货价<span style="color: red">*</span></span>
@@ -503,19 +522,41 @@ export default {
503 522
   },
504 523
   methods: {
505 524
     changeText(event){
506
-      var  textAreaList = this.textarea.split(",")
525
+
526
+      const halfWidth = this.textarea.replace(/[\uff01-\uff5e]/g, ch => 
527
+          String.fromCharCode(ch.charCodeAt(0) - 0xfee0)
528
+      );
529
+        
530
+        // 2. 移除中文空格(全角空格转半角)
531
+      const normalizedSpace = halfWidth.replace(/\u3000/g, ' ');
532
+
533
+     
534
+      var  textAreaList = normalizedSpace.split(",")
507 535
       if (event.key === 'Enter') {
508 536
         var textarea = ""
509
-        textarea += this.textarea.replace(/^\s*[\r\n]|\r?\n\s*$/gm, '') + ","
510
-        var  parts = textarea.split(',')
511
-        for(let i=0;i<textAreaList.length;i++){
512
-          if(parts[parts.length-2] == textAreaList[i]){
537
+         textarea += normalizedSpace.replace(/^\s*[\r\n]|\r?\n\s*$/gm, '') + ","
538
+         var  parts = textarea.split(',')
539
+         for(let i=0;i<textAreaList.length;i++){
540
+           if(parts[parts.length-2] == textAreaList[i]){
513 541
               this.$message.error("该条码已经存在,不能重复扫码")
514
-          }
515
-        }
542
+           }
543
+         }
516 544
         const uniqueStr = [...new Set(textarea.split(','))].join(',');
517 545
         this.textarea = uniqueStr
518 546
       }
547
+      // var  textAreaList = this.textarea.split(",")
548
+      // if (event.key === 'Enter') {
549
+      //   var textarea = ""
550
+      //   textarea += this.textarea.replace(/^\s*[\r\n]|\r?\n\s*$/gm, '') + ","
551
+      //   var  parts = textarea.split(',')
552
+      //   for(let i=0;i<textAreaList.length;i++){
553
+      //     if(parts[parts.length-2] == textAreaList[i]){
554
+      //         this.$message.error("该条码已经存在,不能重复扫码")
555
+      //     }
556
+      //   }
557
+      //   const uniqueStr = [...new Set(textarea.split(','))].join(',');
558
+      //   this.textarea = uniqueStr
559
+      // }
519 560
     },
520 561
     getGoodCode(val){
521 562
       var newArr = []
@@ -666,6 +707,7 @@ export default {
666 707
       tempObj["license_number"] = ""
667 708
       tempObj["packing_price"] = ""
668 709
       tempObj["good_code"] = ""
710
+      tempObj['split_of_number'] = 24
669 711
       this.recordInfo.recordData.push(tempObj);
670 712
     },
671 713
     handleDelete: function(index, row) {
@@ -823,6 +865,12 @@ export default {
823 865
                   this.recordInfo.recordData[i].dealer = this.dealerList[z].id
824 866
                }
825 867
              }
868
+             if(this.recordInfo.recordData[i].split_of_number>0){
869
+              this.recordInfo.recordData[i].split_of_number = parseInt(this.recordInfo.recordData[i].split_of_number) 
870
+             }else{
871
+              this.recordInfo.recordData[i].split_of_number=0
872
+             }
873
+           
826 874
              this.recordInfo.recordData[i].warehousing_count = this.recordInfo.recordData[i].warehousing_count.toString() 
827 875
           }
828 876
          
@@ -872,6 +920,7 @@ export default {
872 920
                 list[i].good_name = list[i].GoodInfo.good_name
873 921
                 list[i].name = list[i].GoodInfo.specification_name
874 922
                 list[i].good_code = list[i].good_code
923
+                list[i].split_of_number = list[i].split_of_number
875 924
                }
876 925
               this.recordInfo.recordData = []
877 926
               this.recordInfo.recordData = list
@@ -909,6 +958,8 @@ export default {
909 958
             response.data.data.info[i].good_name = response.data.data.info[i].GoodInfo.good_name
910 959
             response.data.data.info[i].name = response.data.data.info[i].GoodInfo.specification_name + "/"+response.data.data.info[i].GoodInfo.packing_unit
911 960
             response.data.data.info[i].packing_unit = response.data.data.info[i].GoodInfo.packing_unit
961
+
962
+            response.data.data.info[i].split_of_number = response.data.data.info[i].split_of_number
912 963
             
913 964
             if(response.data.data.info[i].manufacturer == 0){
914 965
               response.data.data.manufacturer = ""
@@ -946,6 +997,7 @@ export default {
946 997
             tempObj["license_number"] = ""
947 998
             tempObj["register_number"] = ""
948 999
             tempObj["good_code"] = ""
1000
+            tempObj['split_of_number'] = 24
949 1001
             this.recordInfo.recordData.push(tempObj);
950 1002
           }
951 1003
         }