xmg123 3 日 前
コミット
3b989881a6

+ 6 - 1
src/xt_pages/Pharmacy/PatientDispensing.vue ファイルの表示

1487
         }
1487
         }
1488
       }else{ //耗材
1488
       }else{ //耗材
1489
         if (event.key === 'Enter') {
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
           var textarea = ""
1495
           var textarea = ""
1491
-          textarea += this.textarea + ","
1496
+          textarea += normalizedSpace + ","
1492
           this.textarea = textarea
1497
           this.textarea = textarea
1493
         }
1498
         }
1494
       }
1499
       }

+ 7 - 4
src/xt_pages/dialysis/batch_print/batch_print_order_forty.vue ファイルの表示

465
                             <tbody>
465
                             <tbody>
466
                             <tr>
466
                             <tr>
467
                                 <td width="70">抗凝方式:</td>
467
                                 <td width="70">抗凝方式:</td>
468
-                                <td width="90">
468
+                                <td width="90" v-if="record.prescription.anticoagulant==2">
469
                                     <label-box :isChecked="record.prescription.anticoagulant==2?true:false" showValue='普通肝素'></label-box>
469
                                     <label-box :isChecked="record.prescription.anticoagulant==2?true:false" showValue='普通肝素'></label-box>
470
                                 </td>
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
                                 <td width="10">(</td>
474
                                 <td width="10">(</td>
472
                                 <td width="35">首剂</td>
475
                                 <td width="35">首剂</td>
473
                                 <td width="50">
476
                                 <td width="50">
474
                                     <div class="under-line">&nbsp;
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
                                     </div>
479
                                     </div>
477
                                 </td>
480
                                 </td>
478
                                 <td width="20">mg</td>
481
                                 <td width="20">mg</td>
480
                                 <td width="35">追加</td>
483
                                 <td width="35">追加</td>
481
                                 <td width="50">
484
                                 <td width="50">
482
                                     <div class="under-line">&nbsp;
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
                                     </div>
487
                                     </div>
485
                                 </td>
488
                                 </td>
486
                                 <td width="40">mg/h</td>
489
                                 <td width="40">mg/h</td>
487
                                 <td width="35">总量</td>
490
                                 <td width="35">总量</td>
488
                                 <td width="50">
491
                                 <td width="50">
489
                                     <div class="under-line">&nbsp;
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
                                     </div>
494
                                     </div>
492
                                 </td>
495
                                 </td>
493
                                 <td width="20">mg</td>
496
                                 <td width="20">mg</td>

+ 7 - 4
src/xt_pages/dialysis/template/DialysisPrintOrderForty.vue ファイルの表示

597
                   <tbody>
597
                   <tbody>
598
                     <tr>
598
                     <tr>
599
                       <td width="70">抗凝方式:</td>
599
                       <td width="70">抗凝方式:</td>
600
-                      <td width="90">
600
+                      <td width="90" v-if="prescription.anticoagulant == 2">
601
                         <label-box :isChecked="prescription.anticoagulant == 2 ? true : false" showValue='普通肝素'></label-box>
601
                         <label-box :isChecked="prescription.anticoagulant == 2 ? true : false" showValue='普通肝素'></label-box>
602
                       </td>
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
                       <td width="10">(</td>
606
                       <td width="10">(</td>
604
                       <td width="35">首剂</td>
607
                       <td width="35">首剂</td>
605
                       <td width="50">
608
                       <td width="50">
606
                         <div class="under-line">&nbsp;
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
                         </div>
611
                         </div>
609
                       </td>
612
                       </td>
610
                       <td width="20">mg</td>
613
                       <td width="20">mg</td>
612
                       <td width="35">追加</td>
615
                       <td width="35">追加</td>
613
                       <td width="50">
616
                       <td width="50">
614
                         <div class="under-line">&nbsp;
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
                         </div>
619
                         </div>
617
                       </td>
620
                       </td>
618
                       <td width="40">mg/h</td>
621
                       <td width="40">mg/h</td>
619
                       <td width="35">总量</td>
622
                       <td width="35">总量</td>
620
                       <td width="50">
623
                       <td width="50">
621
                         <div class="under-line">&nbsp;
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
                         </div>
626
                         </div>
624
                       </td>
627
                       </td>
625
                       <td width="20">mg</td>
628
                       <td width="20">mg</td>

+ 107 - 6
src/xt_pages/stock/drugs/drugStockFlow.vue ファイルの表示

5
     </div>
5
     </div>
6
     <div class="app-container ">
6
     <div class="app-container ">
7
       <div class="cell clearfix">
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
        规格:<span>{{drug.dose}}{{drug.dose_unit}}*{{drug.min_number}}{{drug.min_unit}}/{{drug.max_unit}}</span>&nbsp;
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
       </div>
17
       </div>
13
       <div class="cell clearfix">
18
       <div class="cell clearfix">
14
         <span>日期查询:</span>
19
         <span>日期查询:</span>
48
               :value="item.id">
53
               :value="item.id">
49
             </el-option>
54
             </el-option>
50
         </el-select>
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
         <span>
88
         <span>
53
           <el-button type="primary" size="small" @click="toExprot">导出</el-button>
89
           <el-button type="primary" size="small" @click="toExprot">导出</el-button>
207
   import { uParseTime } from '@/utils/tools'
243
   import { uParseTime } from '@/utils/tools'
208
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
244
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
209
   import { getDrugStockFlow,getOutDrugStockFlow,getDrugCountList,getDrugFlow,getDrugFlowDetailByDrugId } from '@/api/drug/drug_stock'
245
   import { getDrugStockFlow,getOutDrugStockFlow,getDrugCountList,getDrugFlow,getDrugFlowDetailByDrugId } from '@/api/drug/drug_stock'
246
+  import { postSearchDrugList } from "@/api/data";
210
   import SettingDialog from './settingDialog/index'
247
   import SettingDialog from './settingDialog/index'
211
   import { getDictionaryDataConfig } from "@/utils/data";
248
   import { getDictionaryDataConfig } from "@/utils/data";
212
   export default {
249
   export default {
213
     name: 'stockIn',
250
     name: 'stockIn',
214
     created() {
251
     created() {
252
+      this.drug_id = this.$route.query.drug_id
253
+      this.manufacturer_name = this.$route.query.manufacturer
215
        var nowDate = new Date();
254
        var nowDate = new Date();
216
       var nowYear = nowDate.getFullYear();
255
       var nowYear = nowDate.getFullYear();
217
       var nowMonth = nowDate.getMonth() + 1;
256
       var nowMonth = nowDate.getMonth() + 1;
296
         drug:{},
335
         drug:{},
297
         houseList:[],
336
         houseList:[],
298
         patientList:[],
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
     methods:{
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
            var params = {
397
            var params = {
305
              drug_id:this.$route.query.drug_id,
398
              drug_id:this.$route.query.drug_id,
306
              start_time:this.start_time,
399
              start_time:this.start_time,
528
 
621
 
529
      getDrugFlow(){
622
      getDrugFlow(){
530
        var params = {
623
        var params = {
531
-          drug_id:this.$route.query.drug_id,
624
+          drug_id:this.drug_id,
532
           start_time:this.start_time,
625
           start_time:this.start_time,
533
           end_time:this.end_time,
626
           end_time:this.end_time,
534
           page:this.page,
627
           page:this.page,
535
           limit:this.limit,
628
           limit:this.limit,
536
           stock_type:this.stock_type,  
629
           stock_type:this.stock_type,  
537
         }
630
         }
631
+      console.log("param-------------",params)
538
        getDrugFlow(params).then(response=>{
632
        getDrugFlow(params).then(response=>{
539
           if(response.data.state ==1){
633
           if(response.data.state ==1){
540
             var list = response.data.data.list
634
             var list = response.data.data.list
579
         }
673
         }
580
         return name
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
      getPrice(id){
683
      getPrice(id){
583
        var min_price = 0 
684
        var min_price = 0 
584
        if(id == this.drug.id){
685
        if(id == this.drug.id){

+ 93 - 9
src/xt_pages/stock/stockFlow.vue ファイルの表示

5
     </div>
5
     </div>
6
     <div class="app-container ">
6
     <div class="app-container ">
7
       <div class="cell clearfix">
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
       </div>
12
       </div>
13
       <div class="cell clearfix">
13
       <div class="cell clearfix">
14
         <span>日期查询:</span>
14
         <span>日期查询:</span>
49
             </el-option>
49
             </el-option>
50
         </el-select>
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
         <span>
71
         <span>
53
           <el-button type="primary" size="small" @click="toExprot">导出</el-button>
72
           <el-button type="primary" size="small" @click="toExprot">导出</el-button>
54
 
73
 
186
 <script>
205
 <script>
187
   import { uParseTime } from '@/utils/tools'
206
   import { uParseTime } from '@/utils/tools'
188
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
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
   export default {
209
   export default {
191
     name: 'stockIn',
210
     name: 'stockIn',
192
     created() {
211
     created() {
212
+      this.manufacturer = this.$route.query.manufacturer
213
+      this.good_id = this.$route.query.id
193
       var nowDate = new Date();
214
       var nowDate = new Date();
194
       var nowYear = nowDate.getFullYear();
215
       var nowYear = nowDate.getFullYear();
195
       var nowMonth = nowDate.getMonth() + 1;
216
       var nowMonth = nowDate.getMonth() + 1;
213
       
234
       
214
       this.getStockFlow()
235
       this.getStockFlow()
215
       this.packing_unit = this.$route.query.packing_unit
236
       this.packing_unit = this.$route.query.packing_unit
237
+    
216
     },
238
     },
217
     components: {
239
     components: {
218
       BreadCrumb
240
       BreadCrumb
272
         good:{},
294
         good:{},
273
         houseList:[],
295
         houseList:[],
274
         patientList:[],
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
     methods:{
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
      handleSizeChange(val) {
352
      handleSizeChange(val) {
281
         this.limit = val
353
         this.limit = val
282
         this.getStockFlow()
354
         this.getStockFlow()
465
         var params= {
537
         var params= {
466
           limit:this.limit,
538
           limit:this.limit,
467
           page:this.page,
539
           page:this.page,
468
-          good_id:this.$route.query.id,
540
+          good_id:this.good_id,
469
           start_time:this.start_time,
541
           start_time:this.start_time,
470
           end_time:this.end_time,
542
           end_time:this.end_time,
471
           is_sys:this.stock_type 
543
           is_sys:this.stock_type 
475
           if(response.data.state == 1){
547
           if(response.data.state == 1){
476
             var list =  response.data.data.list
548
             var list =  response.data.data.list
477
             var total = response.data.data.total
549
             var total = response.data.data.total
550
+            this.tableList = []
478
             this.tableList = list
551
             this.tableList = list
479
             this.total = total
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
            var manufacturerList = response.data.data.manufacturerList
556
            var manufacturerList = response.data.data.manufacturerList
557
+           this.manufacturerList = []
482
            this.manufacturerList = manufacturerList
558
            this.manufacturerList = manufacturerList
483
            this.houseList = response.data.data.houseList
559
            this.houseList = response.data.data.houseList
484
            this.patientList = response.data.data.patients
560
            this.patientList = response.data.data.patients
498
         }
574
         }
499
         return storehouse_name
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
      getGoodName(id){
585
      getGoodName(id){
502
        
586
        
503
        var good_name =  ""
587
        var good_name =  ""

+ 44 - 3
src/xt_pages/stock/stockInOrderAdd.vue ファイルの表示

142
             </template>
142
             </template>
143
           </el-table-column>
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
           <el-table-column align="center" width="120">
165
           <el-table-column align="center" width="120">
146
             <template slot="header" slot-scope="scope">
166
             <template slot="header" slot-scope="scope">
147
               <span>零售价<span style="color: red">*</span></span>
167
               <span>零售价<span style="color: red">*</span></span>
674
         tempObj['good_code'] = ""
694
         tempObj['good_code'] = ""
675
         tempObj['good_code_cnt'] = ''
695
         tempObj['good_code_cnt'] = ''
676
         tempObj["good_code_count"] =''
696
         tempObj["good_code_count"] =''
697
+        tempObj['split_of_number'] = 24
677
         this.recordInfo.recordData.push(tempObj)
698
         this.recordInfo.recordData.push(tempObj)
678
       }, handleDelete: function(index, row) {
699
       }, handleDelete: function(index, row) {
679
         if (this.recordInfo.recordData.length <= 1) {
700
         if (this.recordInfo.recordData.length <= 1) {
852
              if(this.recordInfo.recordData[i].dealer == ""){
873
              if(this.recordInfo.recordData[i].dealer == ""){
853
                 this.recordInfo.recordData[i].dealer = 0
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
               for(let j=0;j<this.manufacturerList.length;j++){
882
               for(let j=0;j<this.manufacturerList.length;j++){
856
                  if(this.recordInfo.recordData[i].manufacturer == this.manufacturerList[j].manufacturer_name){
883
                  if(this.recordInfo.recordData[i].manufacturer == this.manufacturerList[j].manufacturer_name){
857
 
884
 
868
               }
895
               }
869
               this.recordInfo.recordData[i].warehousing_count = this.recordInfo.recordData[i].warehousing_count.toString()
896
               this.recordInfo.recordData[i].warehousing_count = this.recordInfo.recordData[i].warehousing_count.toString()
870
             }
897
             }
898
+
899
+           
871
             const loading = this.$loading({
900
             const loading = this.$loading({
872
               lock: true,
901
               lock: true,
873
               text: 'Loading',
902
               text: 'Loading',
911
                   list[i].good_name = list[i].GoodInfo.good_name
940
                   list[i].good_name = list[i].GoodInfo.good_name
912
                   list[i].name = list[i].GoodInfo.specification_name +"/"+ list[i].GoodInfo.packing_unit
941
                   list[i].name = list[i].GoodInfo.specification_name +"/"+ list[i].GoodInfo.packing_unit
913
                   list[i].good_code = list[i].good_code
942
                   list[i].good_code = list[i].good_code
943
+                  list[i].split_of_number = list[i].split_of_number
914
                 }
944
                 }
915
                 this.recordInfo.recordData = []
945
                 this.recordInfo.recordData = []
916
                 this.recordInfo.recordData = list
946
                 this.recordInfo.recordData = list
1095
      },
1125
      },
1096
      changeText(event){
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
       if (event.key === 'Enter') {
1139
       if (event.key === 'Enter') {
1100
         var textarea = ""
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
          var  parts = textarea.split(',')
1142
          var  parts = textarea.split(',')
1103
          for(let i=0;i<textAreaList.length;i++){
1143
          for(let i=0;i<textAreaList.length;i++){
1104
            if(parts[parts.length-2] == textAreaList[i]){
1144
            if(parts[parts.length-2] == textAreaList[i]){
1177
       tempObj['id']= 0
1217
       tempObj['id']= 0
1178
       tempObj['register_number'] = ''
1218
       tempObj['register_number'] = ''
1179
       tempObj['good_code'] = ''
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
       this.recordInfo.recordData.push(tempObj)
1224
       this.recordInfo.recordData.push(tempObj)

+ 59 - 7
src/xt_pages/stock/stockInOrderEdit.vue ファイルの表示

166
 
166
 
167
             </template>
167
             </template>
168
           </el-table-column>
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
           <el-table-column align="center" width="120">
188
           <el-table-column align="center" width="120">
170
             <template slot="header" slot-scope="scope">
189
             <template slot="header" slot-scope="scope">
171
               <span>进货价<span style="color: red">*</span></span>
190
               <span>进货价<span style="color: red">*</span></span>
503
   },
522
   },
504
   methods: {
523
   methods: {
505
     changeText(event){
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
       if (event.key === 'Enter') {
535
       if (event.key === 'Enter') {
508
         var textarea = ""
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
               this.$message.error("该条码已经存在,不能重复扫码")
541
               this.$message.error("该条码已经存在,不能重复扫码")
514
-          }
515
-        }
542
+           }
543
+         }
516
         const uniqueStr = [...new Set(textarea.split(','))].join(',');
544
         const uniqueStr = [...new Set(textarea.split(','))].join(',');
517
         this.textarea = uniqueStr
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
     getGoodCode(val){
561
     getGoodCode(val){
521
       var newArr = []
562
       var newArr = []
666
       tempObj["license_number"] = ""
707
       tempObj["license_number"] = ""
667
       tempObj["packing_price"] = ""
708
       tempObj["packing_price"] = ""
668
       tempObj["good_code"] = ""
709
       tempObj["good_code"] = ""
710
+      tempObj['split_of_number'] = 24
669
       this.recordInfo.recordData.push(tempObj);
711
       this.recordInfo.recordData.push(tempObj);
670
     },
712
     },
671
     handleDelete: function(index, row) {
713
     handleDelete: function(index, row) {
823
                   this.recordInfo.recordData[i].dealer = this.dealerList[z].id
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
              this.recordInfo.recordData[i].warehousing_count = this.recordInfo.recordData[i].warehousing_count.toString() 
874
              this.recordInfo.recordData[i].warehousing_count = this.recordInfo.recordData[i].warehousing_count.toString() 
827
           }
875
           }
828
          
876
          
872
                 list[i].good_name = list[i].GoodInfo.good_name
920
                 list[i].good_name = list[i].GoodInfo.good_name
873
                 list[i].name = list[i].GoodInfo.specification_name
921
                 list[i].name = list[i].GoodInfo.specification_name
874
                 list[i].good_code = list[i].good_code
922
                 list[i].good_code = list[i].good_code
923
+                list[i].split_of_number = list[i].split_of_number
875
                }
924
                }
876
               this.recordInfo.recordData = []
925
               this.recordInfo.recordData = []
877
               this.recordInfo.recordData = list
926
               this.recordInfo.recordData = list
909
             response.data.data.info[i].good_name = response.data.data.info[i].GoodInfo.good_name
958
             response.data.data.info[i].good_name = response.data.data.info[i].GoodInfo.good_name
910
             response.data.data.info[i].name = response.data.data.info[i].GoodInfo.specification_name + "/"+response.data.data.info[i].GoodInfo.packing_unit
959
             response.data.data.info[i].name = response.data.data.info[i].GoodInfo.specification_name + "/"+response.data.data.info[i].GoodInfo.packing_unit
911
             response.data.data.info[i].packing_unit = response.data.data.info[i].GoodInfo.packing_unit
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
             if(response.data.data.info[i].manufacturer == 0){
964
             if(response.data.data.info[i].manufacturer == 0){
914
               response.data.data.manufacturer = ""
965
               response.data.data.manufacturer = ""
946
             tempObj["license_number"] = ""
997
             tempObj["license_number"] = ""
947
             tempObj["register_number"] = ""
998
             tempObj["register_number"] = ""
948
             tempObj["good_code"] = ""
999
             tempObj["good_code"] = ""
1000
+            tempObj['split_of_number'] = 24
949
             this.recordInfo.recordData.push(tempObj);
1001
             this.recordInfo.recordData.push(tempObj);
950
           }
1002
           }
951
         }
1003
         }