|
@@ -45,7 +45,7 @@
|
45
|
45
|
@change="endTimeChange"
|
46
|
46
|
></el-date-picker>
|
47
|
47
|
<span>单据编码:</span>
|
48
|
|
-
|
|
48
|
+
|
49
|
49
|
</div>
|
50
|
50
|
<div>
|
51
|
51
|
<el-button size="small" type="primary" @click="savePurchaseOrder" v-show="showTwo">保存</el-button>
|
|
@@ -71,7 +71,7 @@
|
71
|
71
|
<span>商品<span style="color: red">*</span></span>
|
72
|
72
|
</template>
|
73
|
73
|
<template slot-scope="scope">
|
74
|
|
- <el-form-item required prop="name">
|
|
74
|
+ <el-form-item required prop="name">
|
75
|
75
|
<el-select v-model="scope.row.name" style="width:160px;" filterable placeholder="请选择" @change="changeName" @input="changeGoodName(scope.$index)">
|
76
|
76
|
<el-option
|
77
|
77
|
v-for="(item,index) in tabList"
|
|
@@ -80,7 +80,7 @@
|
80
|
80
|
:value="item">
|
81
|
81
|
</el-option>
|
82
|
82
|
</el-select>
|
83
|
|
- </el-form-item>
|
|
83
|
+ </el-form-item>
|
84
|
84
|
</template>
|
85
|
85
|
</el-table-column>
|
86
|
86
|
<el-table-column align="center" width="150px">
|
|
@@ -108,7 +108,7 @@
|
108
|
108
|
<template slot-scope="scope">
|
109
|
109
|
<el-form-item :rules="tableRules.supply_count" required prop="supply_count">
|
110
|
110
|
<el-input v-model="scope.row.supply_count" style="width:80px"></el-input>
|
111
|
|
- </el-form-item>
|
|
111
|
+ </el-form-item>
|
112
|
112
|
</template>
|
113
|
113
|
</el-table-column>
|
114
|
114
|
|
|
@@ -123,13 +123,13 @@
|
123
|
123
|
{{calculate(scope.row.supply_count * scope.row.supply_price)}}
|
124
|
124
|
</template>
|
125
|
125
|
</el-table-column>
|
126
|
|
-
|
|
126
|
+
|
127
|
127
|
<el-table-column label="生产厂商" align="center" width="200px">
|
128
|
128
|
<template slot-scope="scope">
|
129
|
129
|
<el-input v-model="scope.row.supply_manufacturer" style="width:160px" :disabled="true"></el-input>
|
130
|
130
|
</template>
|
131
|
131
|
</el-table-column>
|
132
|
|
-
|
|
132
|
+
|
133
|
133
|
|
134
|
134
|
<el-table-column label="批准文号" align="center" width="200px">
|
135
|
135
|
<template slot-scope="scope">
|
|
@@ -168,10 +168,10 @@
|
168
|
168
|
</el-form>
|
169
|
169
|
<div style="margin-top:10px">
|
170
|
170
|
<span>优惠率:<el-input style="width:100px" v-model="rate_of_concession"></el-input>%</span>
|
171
|
|
-
|
|
171
|
+
|
172
|
172
|
<span>优惠金额:<el-input style="width:100px" v-model="discount_amount"></el-input></span>
|
173
|
|
-
|
174
|
|
- </div>
|
|
173
|
+
|
|
174
|
+ </div>
|
175
|
175
|
</div>
|
176
|
176
|
</div>
|
177
|
177
|
</template>
|
|
@@ -209,7 +209,7 @@ return {
|
209
|
209
|
showTwo:true,
|
210
|
210
|
showOne:false,
|
211
|
211
|
recordInfo: {
|
212
|
|
- tableList:[],
|
|
212
|
+ tableList:[],
|
213
|
213
|
},
|
214
|
214
|
keywords: "",
|
215
|
215
|
total: 0,
|
|
@@ -257,12 +257,12 @@ getInitOrder(){
|
257
|
257
|
for(let i=0;i<drugList.length;i++){
|
258
|
258
|
for(let z=0;z<drugList[i].drug_warehouse_info.length;z++){
|
259
|
259
|
drugList[i].drug_warehouse_info[z].stock_max_number = drugList[i].drug_warehouse_info[z].stock_max_number * drugList[i].min_number
|
260
|
|
- }
|
|
260
|
+ }
|
261
|
261
|
for(let j=0;j<this.manufactuerList.length;j++){
|
262
|
262
|
if(drugList[i].manufacturer == this.manufactuerList[j].id){
|
263
|
263
|
drugList[i].manufacturer = this.manufactuerList[j].manufacturer_name
|
264
|
264
|
}
|
265
|
|
- }
|
|
265
|
+ }
|
266
|
266
|
for(let y=0;y<this.drugTypeList.length;y++){
|
267
|
267
|
if(drugList[i].drug_type == this.drugTypeList[y].value){
|
268
|
268
|
drugList[i].drug_type = this.drugTypeList[y].name
|
|
@@ -283,19 +283,19 @@ getInitOrder(){
|
283
|
283
|
|
284
|
284
|
this.tabList.push(drugList[i])
|
285
|
285
|
}
|
286
|
|
-
|
|
286
|
+
|
287
|
287
|
var goodList = response.data.data.goodList
|
288
|
288
|
for(let i=0;i<goodList.length;i++){
|
289
|
289
|
for(let j=0;j<this.manufactuerList.length;j++){
|
290
|
290
|
if(goodList[i].manufacturer == this.manufactuerList[j].id){
|
291
|
291
|
goodList[i].manufacturer = this.manufactuerList[j].manufacturer_name
|
292
|
292
|
}
|
293
|
|
- }
|
|
293
|
+ }
|
294
|
294
|
for(let y=0;y<this.goodTypeList.length;y++){
|
295
|
295
|
if(goodList[i].good_type_id == this.goodTypeList[y].id){
|
296
|
296
|
goodList[i].good_type_id = this.goodTypeList[y].type_name
|
297
|
297
|
}
|
298
|
|
- }
|
|
298
|
+ }
|
299
|
299
|
goodList[i].supply_name = goodList[i].good_name + " " + goodList[i].specification_name + " " +goodList[i].manufacturer
|
300
|
300
|
goodList[i].supply_type = goodList[i].good_type_id
|
301
|
301
|
goodList[i].supply_specification_name =goodList[i].specification_name
|
|
@@ -306,19 +306,19 @@ getInitOrder(){
|
306
|
306
|
goodList[i].supply_manufacturer = goodList[i].manufacturer
|
307
|
307
|
goodList[i].supply_license_number = ""
|
308
|
308
|
goodList[i].supply_remake = ""
|
309
|
|
- goodList[i].type = 2
|
|
309
|
+ goodList[i].type = 2
|
310
|
310
|
goodList[i].name = goodList[i].good_name
|
311
|
311
|
|
312
|
|
- this.tabList.push(goodList[i])
|
|
312
|
+ this.tabList.push(goodList[i])
|
313
|
313
|
}
|
314
|
314
|
}
|
315
|
|
- })
|
|
315
|
+ })
|
316
|
316
|
},
|
317
|
317
|
changeGoodName(val){
|
318
|
318
|
this.currentIndex = val
|
319
|
319
|
},
|
320
|
320
|
changeName(val){
|
321
|
|
-
|
|
321
|
+
|
322
|
322
|
for(let i=0;i<this.recordInfo.tableList.length;i++){
|
323
|
323
|
if(this.currentIndex == i){
|
324
|
324
|
this.recordInfo.tableList[i].id = val.id
|
|
@@ -333,7 +333,7 @@ changeName(val){
|
333
|
333
|
}else{
|
334
|
334
|
this.recordInfo.tableList[i].supply_count = val.supply_count?val.supply_count:""
|
335
|
335
|
}
|
336
|
|
-
|
|
336
|
+
|
337
|
337
|
this.recordInfo.tableList[i].supply_price = val.supply_price?val.supply_price:""
|
338
|
338
|
this.recordInfo.tableList[i].supply_total_price = val.supply_total_price?val.supply_total_price:""
|
339
|
339
|
this.recordInfo.tableList[i].supply_manufacturer = val.supply_manufacturer
|
|
@@ -341,7 +341,7 @@ changeName(val){
|
341
|
341
|
this.recordInfo.tableList[i].supply_remake = val.supply_remake
|
342
|
342
|
}
|
343
|
343
|
}
|
344
|
|
-
|
|
344
|
+
|
345
|
345
|
},
|
346
|
346
|
handleEdit(){
|
347
|
347
|
const tempObj = {}
|
|
@@ -358,7 +358,7 @@ handleEdit(){
|
358
|
358
|
tempObj['supply_license_number'] = ''
|
359
|
359
|
tempObj['supply_remake'] = ''
|
360
|
360
|
tempObj['type'] = 0
|
361
|
|
- this.recordInfo.tableList.push(tempObj)
|
|
361
|
+ this.recordInfo.tableList.push(tempObj)
|
362
|
362
|
},
|
363
|
363
|
handleDelete: function(index, row) {
|
364
|
364
|
if (this.recordInfo.tableList.length <= 1) {
|
|
@@ -371,7 +371,7 @@ handleDelete: function(index, row) {
|
371
|
371
|
|
372
|
372
|
|
373
|
373
|
savePurchaseOrder(){
|
374
|
|
- console.log("tablelsit323232",this.recordInfo.tableList)
|
|
374
|
+ // console.log("tablelsit323232",this.recordInfo.tableList)
|
375
|
375
|
console.log("hhh232323",this.$refs)
|
376
|
376
|
this.$refs["tableForm"].validate((valid)=>{
|
377
|
377
|
if(valid){
|
|
@@ -385,13 +385,13 @@ savePurchaseOrder(){
|
385
|
385
|
console.log("partam2332232332",params)
|
386
|
386
|
console.log("tablelsit323232",this.recordInfo.tableList)
|
387
|
387
|
for(let i=0;i<this.recordInfo.tableList.length;i++){
|
388
|
|
- this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count)
|
|
388
|
+ this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count)
|
389
|
389
|
for(let j=0;j<this.manufactuerList.length;j++){
|
390
|
390
|
if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].manufacturer_name){
|
391
|
|
- this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id
|
|
391
|
+ this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id
|
392
|
392
|
}
|
393
|
393
|
|
394
|
|
- }
|
|
394
|
+ }
|
395
|
395
|
}
|
396
|
396
|
return
|
397
|
397
|
savePurchaseOrder(this.recordInfo.tableList,this.supplier_name,this.start_time,this.end_time,this.rate_of_concession,this.discount_amount).then(response=>{
|
|
@@ -401,11 +401,11 @@ savePurchaseOrder(){
|
401
|
401
|
this.showTwo = false
|
402
|
402
|
this.showOne = true
|
403
|
403
|
}
|
404
|
|
- })
|
405
|
|
- }
|
|
404
|
+ })
|
|
405
|
+ }
|
|
406
|
+
|
|
407
|
+ })
|
406
|
408
|
|
407
|
|
- })
|
408
|
|
-
|
409
|
409
|
},
|
410
|
410
|
|
411
|
411
|
changeTypeName(){
|
|
@@ -418,7 +418,7 @@ endTimeChange(){
|
418
|
418
|
|
419
|
419
|
},
|
420
|
420
|
search(){
|
421
|
|
-
|
|
421
|
+
|
422
|
422
|
},
|
423
|
423
|
|
424
|
424
|
getWarehoseInfo(arr,max_unit,min_unit,min_number){
|
|
@@ -446,7 +446,7 @@ getWarehoseInfo(arr,max_unit,min_unit,min_number){
|
446
|
446
|
}
|
447
|
447
|
}
|
448
|
448
|
return max_str + min_str
|
449
|
|
- },
|
|
449
|
+ },
|
450
|
450
|
getTotalStockCount(arr){
|
451
|
451
|
var total_count = 0
|
452
|
452
|
for(let i=0;i<arr.length;i++){
|
|
@@ -482,8 +482,8 @@ created(){
|
482
|
482
|
tempObj['supply_license_number'] = ''
|
483
|
483
|
tempObj['supply_remake'] = ''
|
484
|
484
|
tempObj['type'] = 0
|
485
|
|
- this.recordInfo.tableList.push(tempObj)
|
486
|
|
- this.getInitOrder()
|
|
485
|
+ this.recordInfo.tableList.push(tempObj)
|
|
486
|
+ this.getInitOrder()
|
487
|
487
|
}
|
488
|
488
|
};
|
489
|
489
|
</script>
|
|
@@ -540,7 +540,7 @@ background-color: #d0d3da;
|
540
|
540
|
}
|
541
|
541
|
.el-table__fixed-right{
|
542
|
542
|
width:150px;
|
543
|
|
- bottom: 20px;
|
544
|
|
- height: 200px;
|
|
543
|
+ bottom: 20px;
|
|
544
|
+ height: 200px;
|
545
|
545
|
}
|
546
|
546
|
</style>
|