Browse Source

批量打印

XMLWAN 4 years ago
parent
commit
a9b8835bfe

+ 5 - 0
src/api/drug/drug_stock.js View File

@@ -1,6 +1,11 @@
1 1
 import request from '@/utils/request'
2 2
 
3 3
 export function postDrugWarehouse(params, warehousing_time, manufacturer_id, dealer_id, type) {
4
+  console.log("params----",params)
5
+  console.log("warehousintg",warehousing_time)
6
+  console.log("manufactureer_id",manufacturer_id)
7
+  console.log("dealer_id",dealer_id)
8
+  console.log("type",type)
4 9
   return request({
5 10
     url: '/api/drugwarehouse/create?warehousing_time=' + warehousing_time + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id + '&type=' + type,
6 11
     method: 'post',

+ 6 - 0
src/api/stock.js View File

@@ -386,6 +386,12 @@ export function DeleteWarehouseInfoItem(params) {
386 386
 }
387 387
 
388 388
 export function EditWarehouse(params, warehousing_time, id, type, manufacturer_id, dealer_id) {
389
+  console.log("params",params)
390
+  console.log("warehousing",warehousing_time)
391
+  console.log("id",id)
392
+  console.log("type",type)
393
+  console.log("manufacturer_id",manufacturer_id)
394
+  console.log("dealer_id",dealer_id)
389 395
   return request({
390 396
     url: '/api/warehouse/edit?warehousing_time=' + warehousing_time + '&id=' + id + '&type=' + type + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id,
391 397
     method: 'post',

+ 32 - 17
src/xt_pages/outpatientDoctorStation/components/deskRecord.vue View File

@@ -51,17 +51,24 @@
51 51
         <el-input v-model="patientInfo.home_address" placeholder="" :disabled="true"></el-input>
52 52
       </el-form-item>
53 53
       <el-form-item label="疾病类型: " prop="name">
54
-        <el-select v-model="delivery_way" style="width:100%;" placeholder="请选择">
54
+        <el-select v-model="case_history.sick" style="width:100%;" placeholder="请选择">
55 55
          <el-option
56
-            v-for="item in wayOptions"
57
-           :key="item.id"
58
-           :label="item.name"
59
-           :value="item.id"
60
-          />
56
+                v-for="(item,index) in sick"
57
+                :key="index"
58
+                :label="item.class_name"
59
+                :value="item.id">
60
+           </el-option>
61 61
         </el-select>
62 62
       </el-form-item>
63 63
       <el-form-item label="诊断: " prop="name">
64
-        <el-input v-model="patientInfo.health_care_no" placeholder=""></el-input>
64
+         <el-select style="width:100%;" v-model="case_history.diagnose" placeholder="">
65
+              <el-option
66
+                v-for="(item,index) in diagnoses"
67
+                :key="index"
68
+                :label="item.class_name"
69
+                :value="item.id">
70
+              </el-option>
71
+        </el-select>
65 72
       </el-form-item>
66 73
       <el-form-item label="过敏史: " prop="name">
67 74
         <el-input v-model="patientInfo.home_address" placeholder=""></el-input>
@@ -238,7 +245,7 @@
238 245
   import medicalRecord from './medicalRecord'
239 246
   import saveRecordTemplate from './saveRecordTemplate'
240 247
   import { getDictionaryDataConfig } from "@/utils/data";
241
-  import {  createCaseHistory } from '@/api/his/his'
248
+  import {  createCaseHistory,getInitData } from '@/api/his/his'
242 249
   import { getDataConfig } from "@/utils/data";
243 250
   import { getTemplateDetail,getMedicalTemplateList } from "@/api/project/project"
244 251
   export default {
@@ -303,8 +310,7 @@
303 310
         valueSix:'',
304 311
         valueSeven:'',
305 312
         diagnoses:[],
306
-        state1:"",
307
-        diagnose:""
313
+        sick:[],
308 314
       }
309 315
     },
310 316
     methods: {
@@ -376,7 +382,7 @@
376 382
 
377 383
 
378 384
       getTemplateDetail(id){
379
-          console.log("22222")
385
+         
380 386
           getTemplateDetail(id).then(response=>{
381 387
               if(response.data.state == 1){
382 388
                 var templatedetail =  response.data.data.templateDetail
@@ -390,8 +396,8 @@
390 396
                 this.case_history.diagnostic = templatedetail.diagnostic
391 397
                 this.case_history.doctor_advice = templatedetail.doctor_advice
392 398
                 this.case_history.remark = templatedetail.remark
393
-                this.sick = templatedetail.sick
394
-                this.diagnose = templatedetail.diagnose
399
+                this.case_history.sick = templatedetail.sick
400
+                this.case_history.diagnose = templatedetail.diagnose
395 401
               }
396 402
           })
397 403
         },
@@ -513,6 +519,7 @@
513 519
           } else {
514 520
             this.sick = response.data.data.sick
515 521
             this.diagnoses = response.data.data.diagnose
522
+          
516 523
           }
517 524
         })
518 525
 
@@ -520,6 +527,7 @@
520 527
     },
521 528
     created(){
522 529
        this.getlist()
530
+       this.getInitData()
523 531
        this.wayOptions = getDataConfig("patient", "reimbursement_ways");
524 532
        console.log("232322323",this)
525 533
        if(this.patientInfo.gender = 1){
@@ -527,7 +535,7 @@
527 535
        }else if(this.patientInfo.gender = 2){
528 536
           this.patientInfo.gender = '女'
529 537
         }
530
-     this.getInitData()
538
+    
531 539
     },
532 540
     watch:{
533 541
       detalid:function(val){
@@ -546,10 +554,17 @@
546 554
         deep: true
547 555
       },
548 556
       case_history:function(val){
549
-        console.log("val",val)
550
-        if(val.breathing == 0){
551
-           this.case_history.breathing = ''
557
+        console.log("南京人明",this.case_history)
558
+        if(this.case_history.breathing == 0){
559
+           this.case_history.breathing = ""
560
+        }
561
+        if(this.case_history.sick == 0){
562
+          this.case_history.sick = ""
563
+        }
564
+        if(this.case_history.diagnose == 0){
565
+           this.case_history.diagnose = ""
552 566
         }
567
+        
553 568
       }
554 569
     }
555 570
   }

+ 23 - 7
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

@@ -497,13 +497,20 @@
497 497
                 this.hisPatientInfo = response.data.data.his_info
498 498
                 this.case_history = response.data.data.case_history
499 499
                 var case_history = response.data.data.case_history
500
-                console.log("case_history22222222",case_history)
501
-                if (case_history.breathing  == 0) {
502
-                  case_history.breathing = ""
503
-                }
500
+                console.log("切换患者查询病历",case_history)
501
+               
504 502
                 this.case_history = case_history
505 503
                 this.info = response.data.data.info
506 504
                 this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
505
+                 if (this.case_history.breathing  <= 0) {
506
+                    this.case_history.breathing = ""
507
+                }
508
+                if(this.case_history.sick <= 0){
509
+                  this.case_history.sick = ""
510
+                }
511
+                if(this.case_history.diagnose <= 0){
512
+                   this.case_history.diagnose = ""
513
+                }
507 514
                 if (this.case_history.temperature <= 0) {
508 515
                   this.case_history.temperature = ''
509 516
                 }
@@ -638,12 +645,20 @@
638 645
               this.case_history = response.data.data.case_history
639 646
               var case_history = response.data.data.case_history
640 647
               console.log("case_history22222222",case_history)
641
-              if (case_history.breathing  == 0) {
642
-                case_history.breathing = ""
643
-              }
648
+             
644 649
               this.case_history = case_history
645 650
               this.info = response.data.data.info
646 651
               this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
652
+              if (this.case_history.breathing  <= 0) {
653
+                  this.case_history.breathing = ""
654
+              }
655
+              if(this.case_history.sick <= 0){
656
+                  this.case_history.sick = ""
657
+              }
658
+              if(this.case_history.diagnose <= 0){
659
+                   this.case_history.diagnose = ""
660
+              }
661
+
647 662
               if (this.case_history.temperature <= 0) {
648 663
                 this.case_history.temperature = ''
649 664
               }
@@ -762,6 +777,7 @@
762 777
 
763 778
       },
764 779
       currentChange(currentRow, oldCurrentRow){
780
+       
765 781
         let isShowDailog = false
766 782
         for (let i = 0; i < this.prescriptions.length; i++){
767 783
           if((this.prescriptions[i].id == 0 && this.prescriptions[i].advices.length > 0) || (this.prescriptions[i].id == 0 && this.prescriptions[i].project.length > 0)){

+ 23 - 3
src/xt_pages/outpatientDoctorStation/template/printOne.vue View File

@@ -28,6 +28,14 @@
28 28
               <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
29 29
                 <div class="drugsOne">{{it.item_name?it.item_name:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
30 30
                </div>
31
+               
32
+              <div class="drugsBox" v-for="(it,index) in item.project" :key="index">
33
+                  <div class="drugsOne">{{getProjectName(it.project_id)?getProjectName(it.project_id):""}}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.count}}{{unit}}</div>
34
+                  <div style="margin-left:100px;"><span>用法:{{it.single_dose}}{{it.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{it.delivery_way}}</span>&nbsp;&nbsp;<span>{{it.advice_desc}}</span></div>
35
+              </div>
36
+              <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
37
+                <div class="drugsOne">{{it.project_id?it.project_id:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
38
+               </div>
31 39
 
32 40
           </div>
33 41
           <div class="doctorBox">
@@ -75,8 +83,8 @@ export default {
75 83
         prescriptionInfo:[],
76 84
         hisPatient:{},
77 85
         department:[],
78
-        prescriptions:[]
79
-        
86
+        prescriptions:[],
87
+        projectList:[]
80 88
       }
81 89
     },
82 90
    methods:{
@@ -126,6 +134,9 @@ export default {
126 134
             var hisPatient = response.data.data.hisPatient
127 135
             console.log("hisPatient",hisPatient)
128 136
             this.hisPatient = hisPatient
137
+            var projectlist =  response.data.data.projectlist
138
+            console.log("所有项目列表",projectlist)
139
+            this.projectList = projectlist
129 140
           }
130 141
        })
131 142
      },
@@ -199,7 +210,16 @@ export default {
199 210
 
200 211
         return total + addtotal
201 212
       },
202
-
213
+      
214
+     getProjectName(id){
215
+        var project_name = ""
216
+        for(let i=0;i<this.projectList.length;i++){
217
+           if(id == this.projectList[i].id){
218
+               project_name = this.projectList[i].project_name
219
+           }
220
+        }
221
+        return project_name
222
+     },
203 223
 
204 224
    },
205 225
    created(){

+ 2 - 0
src/xt_pages/outpatientDoctorStation/template/printTwo.vue View File

@@ -23,6 +23,8 @@
23 23
                 <div class="drugsOne">{{item.advice_name?item.advice_name:""}}&nbsp;&nbsp;{{item.single_dose}}{{item.single_dose_unit}}&nbsp;×&nbsp; {{item.prescribing_number}}{{item.prescribing_number_unit}}</div>
24 24
                 <div style="margin-left:100px;"><span>用法:{{item.single_dose}}{{item.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{item.execution_frequency}}</span>&nbsp;&nbsp;<span>{{item.advice_desc}}</span></div>
25 25
             </div>
26
+
27
+            
26 28
         </div>
27 29
         <div class="doctorBox">
28 30
             <p>医师:{{getDoctor(advicePrint[0].advice_doctor)?getDoctor(advicePrint[0].advice_doctor):""}}</p>

+ 12 - 2
src/xt_pages/stock/Dialog/goodTypeDialog.vue View File

@@ -9,6 +9,14 @@
9 9
           </el-form-item>
10 10
         </el-col>
11 11
       </el-row>
12
+      <el-row>
13
+        <el-col>
14
+          <el-form-item label="耗材出库" prop="out_stock">
15
+             <el-radio v-model="out_stock" label="1">是</el-radio>
16
+             <el-radio v-model="out_stock" label="2">否</el-radio>
17
+          </el-form-item>     
18
+        </el-col>
19
+      </el-row>
12 20
       <el-row>
13 21
          <el-col >
14 22
           <el-form-item label="备注">
@@ -17,7 +25,7 @@
17 25
           </el-form-item>
18 26
         </el-col>
19 27
       </el-row>
20
-
28
+   
21 29
 
22 30
     </el-form>
23 31
 
@@ -48,7 +56,8 @@ export default {
48 56
         type_name: [
49 57
           { required: true, message: "请输入类型名称", trigger: "blur" }
50 58
         ]
51
-      }
59
+      },
60
+       out_stock: '1'
52 61
     };
53 62
   },
54 63
   props: {
@@ -87,6 +96,7 @@ export default {
87 96
       form["type_name"] = this.formValue.type_name;
88 97
       form["remark"] = this.formValue.remark;
89 98
       form["isCreated"] = this.isCreated;
99
+      form['out_stock'] = this.out_stock;
90 100
       return form;
91 101
     }
92 102
   },

+ 3 - 7
src/xt_pages/stock/Dialog/manufacturerOrDealerDialog.vue View File

@@ -20,12 +20,12 @@
20 20
       </el-col>
21 21
 
22 22
       <el-col :span="8">
23
-        <el-form-item label="拼音" prop="pinyin">
23
+        <el-form-item label="拼音">
24 24
           <el-input  v-model="formValue.pinyin"></el-input>
25 25
         </el-form-item>
26 26
       </el-col>
27 27
       <el-col :span="8">
28
-        <el-form-item label="五笔" prop="wubi">
28
+        <el-form-item label="五笔">
29 29
           <el-input  v-model="formValue.wubi"></el-input>
30 30
         </el-form-item>
31 31
       </el-col>
@@ -119,11 +119,7 @@
119 119
           ],
120 120
           dealer_name: [
121 121
             {required: true, message: '请输入经销商名称', trigger: 'blur'},
122
-          ], pinyin: [
123
-            {required: true, message: '请输入拼音', trigger: 'blur'},
124
-          ], wubi: [
125
-            {required: true, message: '请输入五笔', trigger: 'blur'},
126
-          ],
122
+          ], 
127 123
 
128 124
         }
129 125
       }

+ 5 - 2
src/xt_pages/stock/config/goodType.vue View File

@@ -313,9 +313,10 @@ export default {
313 313
           type_name: val.type_name,
314 314
           remark: val.remark,
315 315
           type_code: this.goodType.type_code,
316
-          id: this.goodType.editTypeId
316
+          id: this.goodType.editTypeId,
317
+          out_stock:val.out_stock,
317 318
         };
318
-
319
+      
319 320
         modifyGoodType(params).then(response => {
320 321
           if (response.data.state == 0) {
321 322
             this.$message.error(response.data.msg);
@@ -333,7 +334,9 @@ export default {
333 334
         });
334 335
       } else if (val.isCreated == 1) {
335 336
         //新增
337
+       
336 338
         createGoodType(val).then(response => {
339
+          
337 340
           if (response.data.state == 0) {
338 341
             this.$message.error(response.data.msg);
339 342
             return false;

+ 6 - 3
src/xt_pages/stock/drugs/drugStockInOrderAdd.vue View File

@@ -390,7 +390,8 @@
390 390
         this.propForm.formValue = {}
391 391
         this.propForm.isCreated = 1
392 392
         this.isVisibility = true
393
-      }, comfirm: function(val) {
393
+      }, 
394
+      comfirm: function(val) {
394 395
 
395 396
         this.$refs.dialog.hide()
396 397
         if (val.selectedGoodInfo.length > 0) {
@@ -419,9 +420,11 @@
419 420
         }
420 421
 
421 422
         this.currentIndex = -1
422
-      }, cancle: function() {
423
+      }, 
424
+      cancle: function() {
423 425
         this.$refs.dialog.hide()
424
-      },  GetConfigInfo: function() {
426
+      },  
427
+      GetConfigInfo: function() {
425 428
         const loading = this.$loading({
426 429
           lock: true,
427 430
           text: 'Loading',

+ 768 - 42
src/xt_pages/stock/stockInOrder.vue View File

@@ -124,8 +124,22 @@
124 124
           </template>
125 125
         </el-table-column>
126 126
 
127
-        <el-table-column label="操作" align="center">
127
+        <el-table-column label="操作" align="center" width="260px">
128 128
           <template slot-scope="scope">
129
+            <el-tooltip
130
+              class="item"
131
+              effect="dark"
132
+              content="详情"
133
+              placement="top"
134
+            >
135
+              <el-button
136
+                size="small"
137
+                type="primary"
138
+                icon="el-icon-search"
139
+                @click="handleSearch(scope.row.id)"
140
+              >
141
+              </el-button>
142
+            </el-tooltip>
129 143
             <el-tooltip
130 144
               class="item"
131 145
               effect="dark"
@@ -140,6 +154,7 @@
140 154
               >
141 155
               </el-button>
142 156
             </el-tooltip>
157
+
143 158
             <el-tooltip
144 159
               class="item"
145 160
               effect="dark"
@@ -170,10 +185,370 @@
170 185
       >
171 186
       </el-pagination>
172 187
     </div>
188
+
189
+
190
+
191
+    <el-dialog
192
+      title="详情"
193
+      :visible.sync="dialogVisible"
194
+      width="80%"
195
+     >
196
+      <span>
197
+        <div>
198
+          <el-row>
199
+           <span style="font-size: 18px;color: #606266">入库单详情</span>
200
+          </el-row>
201
+            <el-row style="float:left;">
202
+            <span style="color: #606266"
203
+              >入库单号: {{ WarehouseInfo.warehouse.warehousing_order }}</span
204
+            >
205
+          </el-row>
206
+        </div>
207
+         <div class="cell clearfix">
208
+          <span style="width: 300px;color: #606266;float:right">单据日期:{{ WarehouseInfo.warehouse.warehousing_time | parseTime("{y}-{m}-{d}")}} </span>
209
+          <span style="width: 300px;color: #606266;float:right">厂商:{{ getManufactuerName(WarehouseInfo.warehouse.manufacturer) }}</span>
210
+          <span style="width: 300px;color: #606266"
211
+            >经销商:{{ getDealerName(WarehouseInfo.warehouse.dealer) }} </span>
212
+       </div>
213
+        <div class="cell clearfix" style="margin-top: 10px">
214
+          <el-button size="small" icon="el-icon-edit" @click="editRecord"
215
+            >编辑</el-button
216
+          >
217
+          <el-button size="small" icon="el-icon-delete" @click="deleteRecord"
218
+            >删除</el-button
219
+          >
220
+
221
+      <el-row :gutter="12" style="margin-top: 10px">
222
+        <el-table
223
+          :data="WarehouseInfo.warehouseInfoDate"
224
+          :class="signAndWeighBoxPatients"
225
+          style="width: 100%"
226
+          border
227
+          :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
228
+        >
229
+          <el-table-column min-width="35" align="center">
230
+            <template slot="header" slot-scope="scope">
231
+              <span>商品类型</span>
232
+            </template>
233
+
234
+            <template slot-scope="scope">
235
+              <span v-if="scope.row.good_type_id != 0">{{
236
+                getTypeName(scope.row.good_type_id)
237
+              }}</span>
238
+            </template>
239
+          </el-table-column>
240
+          <el-table-column min-width="35" align="center">
241
+            <template slot="header" slot-scope="scope">
242
+              <span>规格名称</span>
243
+            </template>
244
+            <template slot-scope="scope">
245
+              <span v-if="scope.row.good_id != 0">{{
246
+                getSpecificationName(scope.row.good_id)
247
+              }}</span>
248
+            </template>
249
+          </el-table-column>
250
+
251
+          <el-table-column min-width="23" align="center">
252
+            <template slot="header" slot-scope="scope">
253
+              <span>单价</span>
254
+            </template>
255
+            <template slot-scope="scope">
256
+              <span>{{ scope.row.price }}</span>
257
+            </template>
258
+          </el-table-column>
259
+
260
+          <el-table-column min-width="23" align="center">
261
+            <template slot="header" slot-scope="scope">
262
+              <span>入库数量</span>
263
+            </template>
264
+            <template slot-scope="scope">
265
+              <span>{{ scope.row.warehousing_count }}</span>
266
+            </template>
267
+          </el-table-column>
268
+
269
+          <el-table-column label="总价" min-width="20" align="center">
270
+            <template slot-scope="scope">
271
+              {{ calculate(scope.row.price * scope.row.warehousing_count) }}
272
+            </template>
273
+          </el-table-column>
274
+
275
+          <el-table-column align="center" min-width="25">
276
+            <template slot="header" slot-scope="scope">
277
+              <span>批号</span>
278
+            </template>
279
+            <template slot-scope="scope">
280
+              <span>{{ scope.row.number }}</span>
281
+            </template>
282
+          </el-table-column>
283
+          <el-table-column label="生产日期" min-width="40" align="center">
284
+            <template v-if="scope.row.product_date != 0" slot-scope="scope">
285
+              {{ scope.row.product_date }}
286
+            </template>
287
+          </el-table-column>
288
+          <el-table-column label="有效日期" min-width="40" align="center">
289
+            <template v-if="scope.row.expiry_date != 0" slot-scope="scope">
290
+              {{ scope.row.expiry_date  }}
291
+            </template>
292
+          </el-table-column>
293
+          <el-table-column label="备注" min-width="20" align="center">
294
+            <template slot-scope="scope">
295
+              <el-popover placement="top-start" width="250" trigger="hover">
296
+                <div>{{ scope.row.remark }}</div>
297
+                <span slot="reference" v-if="scope.row.remark.length > 20">{{
298
+                  scope.row.remark.substr(0, 20) + "..."
299
+                }}</span>
300
+                <span slot="reference" v-else>{{ scope.row.remark }}</span>
301
+              </el-popover>
302
+            </template>
303
+          </el-table-column>
304
+        </el-table>
305
+      </el-row>
306
+      </div>
307
+
308
+      </span>
309
+      <span slot="footer" class="dialog-footer">
310
+        <el-button @click="dialogVisible = false">取 消</el-button>
311
+        <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
312
+      </span>
313
+    </el-dialog>
314
+
315
+
316
+    <el-dialog
317
+      title="新增"
318
+      :visible.sync="editDialogVisible"
319
+      width="80%"
320
+    >
321
+      <span>
322
+       
323
+        <div style="margin-bottom:10px">
324
+          <label class="title"><span class="name">入库时间</span> : </label>
325
+          <el-date-picker size="small" v-model="warehousing_time" prefix-icon="el-icon-date" :editable="false"
326
+                          style="width: 196px;" type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
327
+                          value-format="yyyy-MM-dd"></el-date-picker>
328
+        </div>
329
+
330
+          <div style="margin-bottom:10px">
331
+            <label class="title"><span class="name">经 销 商</span> : </label>
332
+            <el-select size="small" v-model="form.dealer" clearable placeholder="请选择经销商" @change="changeDealer">
333
+              <el-option
334
+                v-for="(option, index) in dealer"
335
+                :key="index"
336
+                :label="option.dealer_name"
337
+                :value="option.id">
338
+              </el-option>
339
+            </el-select>
340
+          </div>
341
+
342
+          <div style="margin-bottom:10px">
343
+            <label class="title"><span class="name">厂商</span> : </label>
344
+
345
+            <el-select size="small" v-model="form.manufacturer" clearable placeholder="请选择厂商"
346
+                      @change="changeManufacturer">
347
+              <el-option
348
+                v-for="(option, index) in manufacturer"
349
+                :key="index"
350
+                :label="option.manufacturer_name"
351
+                :value="option.id">
352
+              </el-option>
353
+            </el-select>
354
+          </div>
355
+
356
+         <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
357
+        <el-table
358
+          id="oictable"
359
+          :data="recordInfo.recordData"
360
+          :class="signAndWeighBoxPatients"
361
+          style="width: 100%"
362
+          border
363
+          max-height="450"
364
+          :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
365
+        >
366
+          <el-table-column align="center" width="200">
367
+            <template slot="header" slot-scope="scope">
368
+              <span>商品类型<span style="color: red">*</span></span>
369
+            </template>
370
+
371
+            <template slot-scope="scope">
372
+              <el-form-item style="padding-top: 15px">
373
+                <el-input
374
+                  placeholder="请输入商品类型"
375
+                  v-model="scope.row.good_type_id"
376
+                  :value="typeName(scope.row.good_type_id)"
377
+                  @focus="showDialog(scope.$index, scope.row)"
378
+                ></el-input>
379
+              </el-form-item>
380
+            </template>
381
+          </el-table-column>
382
+          <el-table-column align="center" width="200">
383
+            <template slot="header" slot-scope="scope">
384
+              <span>规格名称<span style="color: red">*</span></span>
385
+            </template>
386
+            <template slot-scope="scope">
387
+              <el-form-item style="padding-top: 15px">
388
+                <el-input
389
+                  placeholder="请输入规格名称"
390
+                  v-model="scope.row.good_id"
391
+                  :value="specificationName(scope.row.good_id)"
392
+                  @focus="showDialog(scope.$index, scope.row)"
393
+                ></el-input>
394
+              </el-form-item>
395
+            </template>
396
+          </el-table-column>
397
+
398
+          <el-table-column align="center" width="150">
399
+            <template slot="header" slot-scope="scope">
400
+              <span>单价<span style="color: red">*</span></span>
401
+            </template>
402
+            <template slot-scope="scope">
403
+              <!--<el-input type="number" v-model="scope.row.price"  @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
404
+              <el-form-item
405
+                :prop="'recordData.' + scope.$index + '.price'"
406
+                :rules="tableRules.price"
407
+                style="padding-top: 17px"
408
+              >
409
+                <el-input
410
+                  placeholder="请输入单价"
411
+                  type="number"
412
+                  v-model="scope.row.price"
413
+                ></el-input>
414
+              </el-form-item>
415
+            </template>
416
+          </el-table-column>
417
+
418
+          <el-table-column align="center" width="180">
419
+            <template slot="header" slot-scope="scope">
420
+              <span>入库数量<span style="color: red">*</span></span>
421
+            </template>
422
+            <template slot-scope="scope">
423
+              <!--{{scope.row.warehousing_count}}-->
424
+              <!--<el-input type="number" v-model="scope.row.warehousing_count"   @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
425
+
426
+              <el-form-item
427
+                :prop="'recordData.' + scope.$index + '.warehousing_count'"
428
+                :rules="tableRules.warehousing_count"
429
+                style="padding-top: 17px"
430
+              >
431
+                <el-input
432
+                  placeholder="请输入入库数量"
433
+                  type="number"
434
+                  v-model="scope.row.warehousing_count"
435
+                ></el-input>
436
+              </el-form-item>
437
+            </template>
438
+          </el-table-column>
439
+          <el-table-column label="总价" align="center" width="150">
440
+            <template slot-scope="scope">
441
+              {{ calculate(scope.row.price * scope.row.warehousing_count) }}
442
+            </template>
443
+          </el-table-column>
444
+
445
+          <el-table-column align="center" width="150">
446
+            <template slot="header" slot-scope="scope">
447
+              <span>批号</span>
448
+            </template>
449
+            <template slot-scope="scope">
450
+              <el-form-item>
451
+                <el-input
452
+                  placeholder="请输入批号"
453
+                  v-model="scope.row.number"
454
+                ></el-input>
455
+              </el-form-item>
456
+            </template>
457
+          </el-table-column>
458
+
459
+          <el-table-column label="生产日期" width="250" align="center">
460
+            <template slot-scope="scope">
461
+            
462
+              <el-date-picker
463
+                prefix-icon="el-icon-date"
464
+                style="width: 145px"
465
+                v-model="scope.row.product_date"
466
+                type="date"
467
+                placeholder="选择日期时间"
468
+                format="yyyy-MM-dd"
469
+                value-format="yyyy-MM-dd"
470
+              ></el-date-picker>
471
+            </template>
472
+          </el-table-column>
473
+          <el-table-column label="有效日期" width="250" align="center">
474
+            <template slot-scope="scope">
475
+             
476
+              <el-date-picker
477
+                prefix-icon="el-icon-date"
478
+                style="width: 145px"
479
+                v-model="scope.row.expiry_date"
480
+                type="date"
481
+                placeholder="选择日期时间"
482
+                format="yyyy-MM-dd"
483
+                value-format="yyyy-MM-dd"
484
+              ></el-date-picker>
485
+            </template>
486
+          </el-table-column>
487
+          <el-table-column label="备注" width="150" align="center">
488
+            <template slot-scope="scope">
489
+              <el-input v-model="scope.row.remark"></el-input>
490
+            </template>
491
+          </el-table-column>
492
+
493
+          <el-table-column
494
+            label="操作"
495
+            fixed="right"
496
+            align="center"
497
+            width="150"
498
+          >
499
+            <template slot-scope="scope">
500
+              <el-tooltip
501
+                class="item"
502
+                effect="dark"
503
+                content="新增"
504
+                placement="top"
505
+              >
506
+                <el-button
507
+                  size="mini"
508
+                  type="primary"
509
+                  icon="el-icon-circle-plus-outline"
510
+                  @click="handleEditTwo(scope.$index, scope.row)"
511
+                >
512
+                </el-button>
513
+              </el-tooltip>
514
+              <el-tooltip
515
+                class="item"
516
+                effect="dark"
517
+                content="删除"
518
+                placement="top"
519
+              >
520
+                <el-button
521
+                  size="mini"
522
+                  type="danger"
523
+                  icon="el-icon-delete"
524
+                  @click="DeleteWarehouseInfoItem(scope.$index, scope.row)"
525
+                >
526
+                </el-button>
527
+              </el-tooltip>
528
+            </template>
529
+          </el-table-column>
530
+        </el-table>
531
+      </el-form>
532
+      </span>
533
+      <span slot="footer" class="dialog-footer">
534
+        <el-button @click="editDialogVisible = false">取 消</el-button>
535
+        <el-button type="primary" @click="submit()">保 存</el-button>
536
+      </span>
537
+    </el-dialog>
538
+
539
+
540
+     <stock-in-dialog
541
+        ref="dialog"
542
+        :propForm="propForm"
543
+        :visibility="isVisibility"
544
+        v-on:dialog-comfirm="comfirm"
545
+        v-on:dialog-cancle="cancle">
546
+    </stock-in-dialog>
173 547
   </div>
174 548
 </template>
175 549
 
176 550
 <script>
551
+import stockInDialog from "./Dialog/stockInDialog";
177 552
 import { uParseTime } from "@/utils/tools";
178 553
 import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from "@/api/doctor";
179 554
 import {
@@ -182,43 +557,19 @@ import {
182 557
   GetAllGoodInfo,
183 558
   GetAllGoodType,
184 559
   getWarehouseInfoList,
185
-  getWarehouseList
560
+  getWarehouseList,
561
+  DeleteWarehouseInfoItem,
562
+  GetAllGoodInfoByID,
563
+  EditWarehouse
186 564
 } from "@/api/stock";
565
+
566
+import { GetAllDrugInfoByID,postDrugWarehouse} from "@/api/drug/drug_stock";
187 567
 import BreadCrumb from "../components/bread-crumb";
188 568
 
189 569
 export default {
190 570
   name: "stockIn",
191
-  components: { BreadCrumb },
571
+  components: { BreadCrumb, stockInDialog },
192 572
   created() {
193
-    // var nowDate = new Date();
194
-    //
195
-    // var year = new Date().getFullYear()
196
-    // var month = new Date().getMonth() + 1
197
-    // var day = nowDate.getDate()
198
-    // if (parseInt(month) < 10) {
199
-    //   month = '0' + month
200
-    // }
201
-    // if (parseInt(day) < 10) {
202
-    //   day = '0' + day
203
-    // }
204
-    // const endTime = year + '-' + month + '-' + day
205
-    // this.end_time = endTime
206
-    //
207
-    //
208
-    // var year = new Date().getFullYear()
209
-    // var month = new Date().getMonth()
210
-    // var day = new Date().getDate()
211
-    //
212
-    // day.setMonth(day.getMonth() - 3);
213
-    //
214
-    // if (parseInt(month) < 10) {
215
-    //   month = '0' + month
216
-    // }
217
-    // if (parseInt(day) < 10) {
218
-    //   day = '0' + day
219
-    // }
220
-    // const startTime = year + '-' + month + '-' + day
221
-    // this.start_time = startTime
222 573
 
223 574
     var nowDate = new Date();
224 575
     var nowYear = nowDate.getFullYear();
@@ -231,21 +582,38 @@ export default {
231 582
       "-" +
232 583
       (nowDay < 10 ? "0" + nowDay : nowDay);
233 584
     nowDate.setMonth(nowDate.getMonth() - 1);
234
-    nowYear = nowDate.getFullYear();
235
-    nowMonth = nowDate.getMonth() + 1;
236
-    nowDay = nowDate.getDate();
585
+  
237 586
     this.start_time =
238 587
       nowYear +
239 588
       "-" +
240 589
       (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
241 590
       "-" +
242 591
       (nowDay < 10 ? "0" + nowDay : nowDay);
592
+   
243 593
 
594
+      this.warehousing_time =
595
+        nowYear +
596
+        '-' +
597
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
598
+        '-' +
599
+        (nowDay < 10 ? '0' + nowDay : nowDay)
600
+
601
+    
244 602
     this.GetWarehouse();
245 603
     this.GetConfigInfo();
246 604
     this.fetchAllAdminUsers();
605
+    this.GetAllGoodType()
606
+    this.GetAllGoodInfo()
247 607
   },
248 608
   data() {
609
+
610
+    var checkGoodId = (rule, value, callback) => {
611
+      setTimeout(() => {
612
+        if (value == "" || value == 0) {
613
+          return callback(new Error("规格名称不能为空"));
614
+        }
615
+      }, 2000);
616
+    };
249 617
     return {
250 618
       crumbs: [
251 619
         { path: false, name: "库存管理" },
@@ -277,10 +645,62 @@ export default {
277 645
 
278 646
       WarehouseInfo: {
279 647
         loading: false,
280
-        warehouseInfoDate: []
648
+        warehouseInfoDate: [],
649
+        warehouse: {}
650
+      },
651
+      startTime: "",
652
+      dialogVisible:false,
653
+      editDialogVisible:false,
654
+
655
+      recordInfo: {
656
+        recordData: [],
657
+        stock_in_code: "",
658
+        current_index: ""
659
+      },
660
+
661
+      tableRules: {
662
+        price: [{ required: true, message: "单价不能为空", trigger: "blur" }],
663
+        warehousing_count: [
664
+          { required: true, message: "数量不能为空", trigge: "blur" }
665
+        ],
666
+
667
+        good_id: [{ validator: checkGoodId, trigger: "blur" }]
668
+      },
669
+
670
+      form: {
671
+        manufacturer: '',
672
+        dealer: ''
673
+      },
674
+      dealer: [],
675
+      goodType: [],
676
+      goodInfo:[],
677
+      warehousing_time: '',
678
+
679
+      propForm: {
680
+        goods: [],
681
+        goodType: [],
682
+        goodInfo: [],
683
+        goodUnit: [],
684
+        title: '入库',
685
+        formValue: {
686
+        good_type_id: '',
687
+        good_id: '',
688
+        number: '',
689
+        product_date: '',
690
+        expiry_date: '',
691
+        warehousing_count: '',
692
+        price: '',
693
+        remark: '',
694
+        dealer: '',
695
+        manufacturer: ''
696
+      },
697
+        isCreated: 1,
698
+        isVisibility: false,
699
+        drug_id:1
281 700
       },
282
-      startTime: ""
283 701
     };
702
+
703
+  
284 704
   },
285 705
   methods: {
286 706
     search: function() {
@@ -349,9 +769,7 @@ export default {
349 769
         } else {
350 770
           this.WarehouseInfo.loading = false;
351 771
           for (let i = 0; i < response.data.data.info.length; i++) {
352
-            this.WarehouseInfo.warehouseInfoDate.push(
353
-              response.data.data.info[i]
354
-            );
772
+            this.WarehouseInfo.warehouseInfoDate.push(response.data.data.info[i]);
355 773
           }
356 774
         }
357 775
       });
@@ -425,6 +843,7 @@ export default {
425 843
           this.$message.error(response.data.msg);
426 844
           return false;
427 845
         } else {
846
+          
428 847
           for (let i = 0; i < response.data.data.goodType.length; i++) {
429 848
             this.goodType.push(response.data.data.goodType[i]);
430 849
           }
@@ -437,7 +856,9 @@ export default {
437 856
           this.$message.error(response.data.msg);
438 857
           return false;
439 858
         } else {
859
+          
440 860
           for (let i = 0; i < response.data.data.goodInfo.length; i++) {
861
+
441 862
             this.goodInfo.push(response.data.data.goodInfo[i]);
442 863
           }
443 864
         }
@@ -502,6 +923,13 @@ export default {
502 923
       // 把时间日期转成时间戳
503 924
       return new Date(time).getTime() / 1000;
504 925
     },
926
+    getTime(val, temp) {
927
+      if (val != 0) {
928
+        return uParseTime(val, temp);
929
+      } else {
930
+        return "";
931
+      }
932
+    },
505 933
     calculate: function(val) {
506 934
       return Math.round(parseFloat(val) * 100) / 100;
507 935
     },
@@ -513,6 +941,9 @@ export default {
513 941
         } else {
514 942
           this.manufacturer = response.data.data.manufacturer;
515 943
           this.dealer = response.data.data.dealer;
944
+          this.manufacturer.splice(0, 0, { id: 0, manufacturer_name: "全部" });
945
+          this.dealer.splice(0, 0, { id: 0, dealer_name: "全部" });
946
+         
516 947
         }
517 948
       });
518 949
     },
@@ -544,7 +975,7 @@ export default {
544 975
       const params = {
545 976
         ids: idStr
546 977
       };
547
-
978
+     
548 979
       this.$confirm("确认删除入库单记录?", "删除入库单记录", {
549 980
         confirmButtonText: "确定",
550 981
         cancelButtonText: "取消",
@@ -626,7 +1057,302 @@ export default {
626 1057
           });
627 1058
         })
628 1059
         .catch(() => {});
629
-    }
1060
+    },
1061
+
1062
+    handleSearch(id){
1063
+      this.GetOrderDetail(id)
1064
+      this.drug_id = id
1065
+      this.dialogVisible = true
1066
+    },
1067
+
1068
+    GetOrderDetail: function(id) {
1069
+      const params = {
1070
+        id: id
1071
+      };
1072
+      getWarehouseInfoList(params).then(response => {
1073
+        if (response.data.state == 0) {
1074
+          this.$message.error(response.data.msg);
1075
+          return false;
1076
+        } else {
1077
+         
1078
+          for (let i = 0; i < response.data.data.info.length; i++) {
1079
+            this.WarehouseInfo.warehouseInfoDate.push(response.data.data.info[i]);
1080
+            response.data.data.info[i].product_date = this.getTime(
1081
+              response.data.data.info[i].product_date,
1082
+              "{y}-{m}-{d}"
1083
+            );
1084
+            response.data.data.info[i].expiry_date = this.getTime(
1085
+              response.data.data.info[i].expiry_date,
1086
+              "{y}-{m}-{d}"
1087
+            );
1088
+           response.data.data.info[i].price = response.data.data.info[i].price.toString();
1089
+           response.data.data.info[i].warehousing_count = response.data.data.info[i].warehousing_count.toString();
1090
+
1091
+            this.recordInfo.recordData.push(response.data.data.info[i]);
1092
+          }
1093
+          this.WarehouseInfo.warehouse = response.data.data.warehousing;
1094
+         
1095
+        }
1096
+      });
1097
+    },
1098
+
1099
+     editRecord: function() {
1100
+     
1101
+     
1102
+      this.editDialogVisible = true
1103
+    },
1104
+
1105
+     deleteRecord: function() {
1106
+      const ids = [];
1107
+      ids.push(this.WarehouseInfo.warehouse.id);
1108
+      const idStr = ids.join(",");
1109
+
1110
+      const params = {
1111
+        ids: idStr
1112
+      };
1113
+
1114
+      this.$confirm("确认删除入库单记录?", "删除入库单记录", {
1115
+        confirmButtonText: "确定",
1116
+        cancelButtonText: "取消",
1117
+        type: "warning"
1118
+      })
1119
+        .then(() => {
1120
+          deleteWarehouseInfo(params).then(response => {
1121
+            if (response.data.state == 0) {
1122
+              this.$message.error(response.data.msg);
1123
+              return false;
1124
+            } else {
1125
+              this.$notify({
1126
+                title: "成功",
1127
+                message: "删除成功",
1128
+                type: "success",
1129
+                duration: 2000
1130
+              });
1131
+
1132
+              this.$router.back(-1);
1133
+            }
1134
+          });
1135
+        })
1136
+        .catch(() => {});
1137
+    },
1138
+
1139
+     typeName: function(good_type_id) {
1140
+     
1141
+      let name = "";
1142
+      for (let i = 0; i < this.goodType.length; i++) {
1143
+        if (this.goodType[i].id == good_type_id) {
1144
+          name = this.goodType[i].type_name;
1145
+        }
1146
+      }
1147
+      return name;
1148
+    },
1149
+
1150
+    showDialog(index, row) {
1151
+      this.currentIndex = index;
1152
+      const params = {
1153
+        manufacturer_id: this.form.manufacturer,
1154
+        dealer_id: this.form.dealer
1155
+      };
1156
+      this.propForm.goods = []
1157
+
1158
+      GetAllGoodInfoByID(params).then(response => {
1159
+        if (response.data.state == 0) {
1160
+          this.$message.error(response.data.msg);
1161
+          return false;
1162
+        } else {
1163
+          if (response.data.data.goodInfo.length <= 0) {
1164
+            this.$message.error("该厂商或经销商没有物品信息");
1165
+            return;
1166
+          }
1167
+          this.$refs.dialog.show();
1168
+          for (let i = 0; i < response.data.data.goodInfo.length; i++) {
1169
+            this.propForm.goodType.push(
1170
+              response.data.data.goodInfo[i].type
1171
+            );
1172
+          }
1173
+          const obj = {};
1174
+          this.propForm.goodType = this.propForm.goodType.reduce(
1175
+            (cur, next) => {
1176
+              obj[next.id] ? "" : (obj[next.id] = true && cur.push(next));
1177
+              return cur;
1178
+            },
1179
+            []
1180
+          ); // 设置cur默认类型为数组,并且初始值为空的数组
1181
+        }
1182
+
1183
+        for (let i = 0; i < this.propForm.goodType.length; i++) {
1184
+          let goodInfo = [];
1185
+          let goodObj = {};
1186
+
1187
+          for (let a = 0; a < response.data.data.goodInfo.length; a++) {
1188
+            var respObj = response.data.data.goodInfo[a];
1189
+            respObj["isSelected"] = false;
1190
+            if (respObj.type.id == this.propForm.goodType[i].id) {
1191
+              goodInfo.push(respObj);
1192
+            }
1193
+          }
1194
+          const obj = {};
1195
+          goodInfo = goodInfo.reduce((cur, next) => {
1196
+            obj[next.id] ? "" : (obj[next.id] = true && cur.push(next));
1197
+            return cur;
1198
+          }, []); // 设置cur默认类型为数组,并且初始值为空的数组
1199
+
1200
+          this.$set(goodObj, this.propForm.goodType[i].id, goodInfo);
1201
+          this.propForm.goods.push(goodObj);
1202
+        }
1203
+      });
1204
+    },
1205
+
1206
+    specificationName: function(drug_id) {
1207
+     
1208
+        let name = "";
1209
+        for (let i = 0; i < this.goodInfo.length; i++) {
1210
+          if (this.goodInfo[i].id == drug_id) {
1211
+            name = this.goodInfo[i].specification_name;
1212
+          }
1213
+        }
1214
+        return name;
1215
+    }, 
1216
+
1217
+     submit() {
1218
+     
1219
+      this.$refs["tableForm"].validate(valid => {
1220
+        if (valid) {
1221
+          const array = this.recordInfo.recordData;
1222
+          console.log('array',array)
1223
+          for (let i = 0; i < array.length; i++) {
1224
+            if (array[i].good_type_id == 0) {
1225
+              this.$message.error("商品类型不能为空");
1226
+              return;
1227
+            }
1228
+            if (array[i].good_id == 0) {
1229
+              this.$message.error("规格名称不能为空");
1230
+              return;
1231
+            }
1232
+          }
1233
+
1234
+          const params = {
1235
+            stockIn: this.recordInfo.recordData
1236
+          };
1237
+          EditWarehouse(
1238
+            params,
1239
+            this.warehousing_time,
1240
+            this.drug_id,
1241
+            this.type,
1242
+            this.form.manufacturer,
1243
+            this.form.dealer
1244
+          ).then(response => {
1245
+            if (response.data.state == 0) {
1246
+              this.$message.error(response.data.msg);
1247
+              return false;
1248
+            } else {
1249
+              this.$message.success("入库成功");
1250
+              this.dialogVisible = false
1251
+              this.editDialogVisible = false
1252
+             
1253
+            }
1254
+          });
1255
+        } else {
1256
+          return false;
1257
+        }
1258
+      });
1259
+    },
1260
+
1261
+      changeManufacturer(val) {
1262
+
1263
+      }, 
1264
+      changeDealer(val) {
1265
+
1266
+      },
1267
+
1268
+     DeleteWarehouseInfoItem: function(index, row) {
1269
+      if (row.id == 0) {
1270
+        this.recordInfo.recordData.splice(index, 1);
1271
+      } else {
1272
+        const params = {
1273
+          id: row.id
1274
+        };
1275
+        this.$confirm("确认删除该入库商品信息记录?", "删除入库商品信息记录", {
1276
+          confirmButtonText: "确定",
1277
+          cancelButtonText: "取消",
1278
+          type: "warning"
1279
+        })
1280
+          .then(() => {
1281
+            DeleteWarehouseInfoItem(params).then(response => {
1282
+              if (response.data.state == 0) {
1283
+                this.$message.error(response.data.msg);
1284
+                return false;
1285
+              } else {
1286
+                this.$message.success("删除成功");
1287
+
1288
+                this.recordInfo.recordData.splice(index, 1);
1289
+              }
1290
+            });
1291
+          })
1292
+          .catch(() => {});
1293
+      }
1294
+    },
1295
+    handleEditTwo: function(index, row) {
1296
+      const tempObj = {};
1297
+      tempObj["id"] = 0;
1298
+      tempObj["good_type_id"] = 0;
1299
+      tempObj["good_id"] = 0;
1300
+      tempObj["number"] = "";
1301
+      tempObj["product_date"] = "";
1302
+      tempObj["expiry_date"] = "";
1303
+      tempObj["warehousing_count"] = "";
1304
+      tempObj["price"] = "";
1305
+      tempObj["remark"] = "";
1306
+      tempObj["dealer"] = "";
1307
+      tempObj["manufacturer"] = "";
1308
+      this.recordInfo.recordData.push(tempObj);
1309
+    },
1310
+
1311
+     comfirm: function(val) {
1312
+      this.$refs.dialog.hide();
1313
+      this.propForm.goodType = [];
1314
+      this.propForm.goods = [];
1315
+
1316
+      if (val.selectedGoodInfo.length > 0) {
1317
+        for (let i = val.selectedGoodInfo.length - 1; ; i--) {
1318
+          if (i == 0) {
1319
+            this.recordInfo.recordData[this.currentIndex].good_type_id =
1320
+              val.selectedGoodInfo[i].good_type_id;
1321
+            this.recordInfo.recordData[this.currentIndex].good_id =
1322
+              val.selectedGoodInfo[i].id;
1323
+            this.recordInfo.recordData[
1324
+              this.currentIndex
1325
+            ].price = val.selectedGoodInfo[i].buy_price.toString();
1326
+          } else {
1327
+            const tempForm = {};
1328
+            tempForm["id"] = 0;
1329
+            tempForm["good_type_id"] = val.selectedGoodInfo[i].good_type_id;
1330
+            tempForm["good_id"] = val.selectedGoodInfo[i].id;
1331
+            tempForm["number"] = "";
1332
+            tempForm["product_date"] = "";
1333
+            tempForm["expiry_date"] = "";
1334
+            tempForm["warehousing_count"] = "";
1335
+            tempForm["price"] = val.selectedGoodInfo[i].buy_price.toString();
1336
+            tempForm["remark"] = "";
1337
+            tempForm["dealer"] = "";
1338
+            tempForm["manufacturer"] = "";
1339
+            this.recordInfo.recordData.splice(
1340
+              this.currentIndex + 1,
1341
+              0,
1342
+              tempForm
1343
+            );
1344
+          }
1345
+        }
1346
+      }
1347
+
1348
+      this.currentIndex = -1;
1349
+    },
1350
+    cancle: function() {
1351
+      this.$refs.dialog.hide();
1352
+      this.propForm.goods = [];
1353
+
1354
+      this.propForm.goodType = [];
1355
+    },
630 1356
   }
631 1357
 };
632 1358
 </script>

+ 1 - 0
src/xt_pages/stock/stockInOrderEdit.vue View File

@@ -559,6 +559,7 @@ export default {
559 559
       this.$router.go(-1);
560 560
     },
561 561
     submit() {
562
+     
562 563
       this.$refs["tableForm"].validate(valid => {
563 564
         if (valid) {
564 565
           const array = this.recordInfo.recordData;