|
@@ -38,16 +38,16 @@
|
38
|
38
|
>
|
39
|
39
|
</drugs-stock-dialog>
|
40
|
40
|
|
41
|
|
- <div class="cell clearfix">
|
|
41
|
+ <!-- <div class="cell clearfix">
|
42
|
42
|
<label class="title"><span class="name">出库时间</span> : </label>
|
43
|
43
|
<el-date-picker size="small" v-model="warehouse_out_time" prefix-icon="el-icon-date" :editable="false"
|
44
|
44
|
style="width: 196px;"
|
45
|
45
|
type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
|
46
|
46
|
value-format="yyyy-MM-dd"></el-date-picker>
|
47
|
|
- </div>
|
|
47
|
+ </div> -->
|
48
|
48
|
|
49
|
49
|
|
50
|
|
- <div class="cell clearfix">
|
|
50
|
+ <!-- <div class="cell clearfix">
|
51
|
51
|
<label class="title"><span class="name">经销商</span> : </label>
|
52
|
52
|
<el-select size="small" v-model="form.dealer" clearable placeholder="请选择经销商" @change="changeDealer">
|
53
|
53
|
<el-option
|
|
@@ -57,9 +57,9 @@
|
57
|
57
|
:value="option.id">
|
58
|
58
|
</el-option>
|
59
|
59
|
</el-select>
|
60
|
|
- </div>
|
61
|
|
-
|
|
60
|
+ </div> -->
|
62
|
61
|
|
|
62
|
+<!--
|
63
|
63
|
<div class="cell clearfix">
|
64
|
64
|
<label class="title"><span class="name">厂商</span> : </label>
|
65
|
65
|
|
|
@@ -71,7 +71,7 @@
|
71
|
71
|
:value="option.id">
|
72
|
72
|
</el-option>
|
73
|
73
|
</el-select>
|
74
|
|
- </div>
|
|
74
|
+ </div> -->
|
75
|
75
|
|
76
|
76
|
<el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
|
77
|
77
|
<el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
|
|
@@ -85,84 +85,168 @@
|
85
|
85
|
|
86
|
86
|
<template slot-scope="scope">
|
87
|
87
|
<el-form-item style="padding-top: 15px">
|
88
|
|
- <el-input
|
89
|
|
- placeholder="请输入药品名称"
|
90
|
|
- v-model="scope.row.drug_id"
|
91
|
|
- :value="typeName(scope.row.drug_id)"
|
92
|
|
- @focus="showDialog(scope.$index, scope.row)"
|
93
|
|
- ></el-input>
|
|
88
|
+ <el-autocomplete
|
|
89
|
+ class="checkSearch"
|
|
90
|
+ popper-class="my-autocomplete"
|
|
91
|
+ v-model="scope.row.drug_name"
|
|
92
|
+ :fetch-suggestions="querySearchAsync"
|
|
93
|
+ :trigger-on-focus="false"
|
|
94
|
+ placeholder="请输入药品名称"
|
|
95
|
+ @select="handleSelect"
|
|
96
|
+ @input="changeDrugName(scope.$index)"
|
|
97
|
+ style="width:160px;"
|
|
98
|
+ >
|
|
99
|
+ <i class="el-icon-search el-input__icon" slot="suffix"></i>
|
|
100
|
+ <template slot-scope="{ item }">
|
|
101
|
+ <div class="name">{{ item.drug_name + item.dose + "*"+ item.dose_unit +item.min_number + item.min_unit +"/" + item.max_unit}}</div>
|
|
102
|
+ </template>
|
|
103
|
+ </el-autocomplete>
|
94
|
104
|
</el-form-item>
|
95
|
105
|
</template>
|
96
|
106
|
</el-table-column>
|
97
|
|
- <el-table-column align="center" width="200">
|
|
107
|
+ <el-table-column align="center" width="140">
|
98
|
108
|
<template slot="header" slot-scope="scope">
|
99
|
|
- <span>规格名称<span style="color: red">*</span></span>
|
|
109
|
+ <span>药品类型</span>
|
|
110
|
+ </template>
|
|
111
|
+ <template slot-scope="scope">
|
|
112
|
+ <el-select v-model="scope.row.drug_type" filterable placeholder="请选择厂商">
|
|
113
|
+ <el-option
|
|
114
|
+ v-for="(option, index) in drugTypeList"
|
|
115
|
+ :key="index"
|
|
116
|
+ :label="option.name"
|
|
117
|
+ :value="option.id">
|
|
118
|
+ </el-option>
|
|
119
|
+ </el-select>
|
|
120
|
+ </template>
|
|
121
|
+ </el-table-column>
|
|
122
|
+ <el-table-column align="center" width="140">
|
|
123
|
+ <template slot="header" slot-scope="scope">
|
|
124
|
+ <span>规格&单位</span>
|
100
|
125
|
</template>
|
101
|
126
|
<template slot-scope="scope">
|
102
|
|
- <el-form-item style="padding-top: 15px">
|
|
127
|
+ <el-form-item style="padding-top: 20px">
|
103
|
128
|
<el-input
|
104
|
|
- placeholder="请输入规格名称"
|
105
|
|
- v-model="scope.row.drug_id"
|
106
|
|
- :value="specificationName(scope.row.drug_id)"
|
107
|
|
- @focus="showDialog(scope.$index, scope.row)"
|
|
129
|
+ :disabled="true"
|
|
130
|
+ placeholder="请输入规格&单位"
|
|
131
|
+ v-model="scope.row.name"
|
108
|
132
|
></el-input>
|
109
|
133
|
</el-form-item>
|
110
|
134
|
</template>
|
111
|
135
|
</el-table-column>
|
112
|
|
-
|
113
|
|
-
|
114
|
|
- <el-table-column min-width="23" align="center">
|
|
136
|
+ <el-table-column align="center" width="150">
|
|
137
|
+ <template slot="header" slot-scope="scope" >
|
|
138
|
+ <span>批号</span>
|
|
139
|
+ </template>
|
|
140
|
+ <template slot-scope="scope">
|
|
141
|
+ <el-form-item style="padding-top: 20px">
|
|
142
|
+ <el-input
|
|
143
|
+ placeholder="请输入批号"
|
|
144
|
+ v-model="scope.row.batch_number"
|
|
145
|
+ ></el-input>
|
|
146
|
+ </el-form-item>
|
|
147
|
+ </template>
|
|
148
|
+ </el-table-column>
|
|
149
|
+ <el-table-column width="120" align="center">
|
115
|
150
|
<template slot="header" slot-scope="scope">
|
116
|
|
- <span>进价<span style="color: red">*</span></span>
|
|
151
|
+ <span>出库数量<span style="color: red">*</span></span>
|
117
|
152
|
</template>
|
118
|
153
|
<template slot-scope="scope">
|
119
|
|
- <!--<el-input type="number" v-model="scope.row.price" @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
|
120
|
|
- <el-form-item :prop="'recordData.' + scope.$index + '.price'" :rules='tableRules.price'
|
121
|
|
- style="padding-top: 17px">
|
122
|
|
- <el-input type="number" v-model="scope.row.price"></el-input>
|
|
154
|
+ <el-form-item
|
|
155
|
+ :prop="'recordData.' + scope.$index + '.count'"
|
|
156
|
+ :rules="tableRules.count"
|
|
157
|
+ style="padding-top: 20px"
|
|
158
|
+ >
|
|
159
|
+ <div style="display:flex;">
|
|
160
|
+ <el-input
|
|
161
|
+ placeholder="请输入出库数量"
|
|
162
|
+ type="number"
|
|
163
|
+ v-model="scope.row.count"
|
|
164
|
+ ></el-input>
|
|
165
|
+ {{scope.row.packing_unit}}
|
|
166
|
+ </div>
|
123
|
167
|
</el-form-item>
|
124
|
|
-
|
125
|
|
-
|
|
168
|
+
|
126
|
169
|
</template>
|
127
|
170
|
</el-table-column>
|
128
|
|
-
|
129
|
|
- <el-table-column min-width="23" align="center">
|
|
171
|
+ <el-table-column width="120" align="center">
|
130
|
172
|
<template slot="header" slot-scope="scope">
|
131
|
|
- <span>出库数量<span style="color: red">*</span></span>
|
|
173
|
+ <span>出货价<span style="color: red">*</span></span>
|
132
|
174
|
</template>
|
133
|
175
|
<template slot-scope="scope">
|
134
|
|
- <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count'
|
135
|
|
- style="padding-top: 17px">
|
136
|
|
- <el-input type="number" v-model="scope.row.count"></el-input>
|
|
176
|
+
|
|
177
|
+ <el-form-item
|
|
178
|
+ :prop="'recordData.' + scope.$index + '.last_price'"
|
|
179
|
+ :rules="tableRules.last_price"
|
|
180
|
+ style="padding-top: 20px"
|
|
181
|
+ >
|
|
182
|
+ <el-input
|
|
183
|
+ placeholder="请输入出货价"
|
|
184
|
+ type="number"
|
|
185
|
+ v-model="scope.row.last_price"
|
|
186
|
+ ></el-input>
|
137
|
187
|
</el-form-item>
|
138
|
188
|
</template>
|
139
|
189
|
</el-table-column>
|
140
|
|
-
|
141
|
|
- <el-table-column label="进价总价" min-width="20" align="center">
|
|
190
|
+ <el-table-column label="总价" width="80" align="center">
|
142
|
191
|
<template slot-scope="scope">
|
143
|
|
- {{calculate(scope.row.price*scope.row.count)}}
|
|
192
|
+ {{ calculate(scope.row.last_price * scope.row.count) }}
|
144
|
193
|
</template>
|
145
|
194
|
</el-table-column>
|
146
|
|
-
|
147
|
|
-
|
148
|
|
- <el-table-column label="零价" align="center" width="150">
|
|
195
|
+ <el-table-column label="生产厂家" width="140" align="center">
|
149
|
196
|
<template slot-scope="scope">
|
150
|
|
- {{ scope.row.retail_price }}
|
|
197
|
+ <el-select v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
|
|
198
|
+ <el-option
|
|
199
|
+ v-for="(option, index) in manufacturerList"
|
|
200
|
+ :key="index"
|
|
201
|
+ :label="option.manufacturer_name"
|
|
202
|
+ :value="option.id">
|
|
203
|
+ </el-option>
|
|
204
|
+ </el-select>
|
151
|
205
|
</template>
|
152
|
206
|
</el-table-column>
|
153
|
|
-
|
154
|
|
- <el-table-column label="零价总价" align="center" width="150">
|
|
207
|
+ <el-table-column label="生产日期" width="180" align="center">
|
155
|
208
|
<template slot-scope="scope">
|
156
|
|
- {{ calculate(scope.row.retail_price * scope.row.count) }}
|
|
209
|
+ <el-date-picker
|
|
210
|
+ prefix-icon="el-icon-date"
|
|
211
|
+ style="width: 145px"
|
|
212
|
+ v-model="scope.row.product_date"
|
|
213
|
+ type="date"
|
|
214
|
+ placeholder="选择日期时间"
|
|
215
|
+ format="yyyy-MM-dd"
|
|
216
|
+ value-format="yyyy-MM-dd"
|
|
217
|
+ ></el-date-picker>
|
|
218
|
+ </template>
|
|
219
|
+ </el-table-column>
|
|
220
|
+ <el-table-column label="有效日期" width="180" align="center">
|
|
221
|
+ <template slot-scope="scope">
|
|
222
|
+ <el-date-picker
|
|
223
|
+ prefix-icon="el-icon-date"
|
|
224
|
+ style="width: 145px"
|
|
225
|
+ v-model="scope.row.expiry_date"
|
|
226
|
+ type="date"
|
|
227
|
+ placeholder="选择日期时间"
|
|
228
|
+ format="yyyy-MM-dd"
|
|
229
|
+ value-format="yyyy-MM-dd"
|
|
230
|
+ ></el-date-picker>
|
|
231
|
+ </template>
|
|
232
|
+ </el-table-column>
|
|
233
|
+ <el-table-column align="center" width="150" label="批准文号">
|
|
234
|
+ <template slot-scope="scope">
|
|
235
|
+ <el-form-item style="padding-top: 20px">
|
|
236
|
+ <el-input
|
|
237
|
+ placeholder="请输入批准文号"
|
|
238
|
+ v-model="scope.row.number"
|
|
239
|
+ ></el-input>
|
|
240
|
+ </el-form-item>
|
157
|
241
|
</template>
|
158
|
242
|
</el-table-column>
|
159
|
243
|
|
160
|
|
-
|
161
|
|
- <el-table-column label="备注" min-width="20" align="center">
|
|
244
|
+ <el-table-column label="备注" width="120" align="center">
|
162
|
245
|
<template slot-scope="scope">
|
163
|
246
|
<el-input v-model="scope.row.remark"></el-input>
|
164
|
247
|
</template>
|
165
|
248
|
</el-table-column>
|
|
249
|
+
|
166
|
250
|
<el-table-column label="操作" align="center" min-width="20">
|
167
|
251
|
<template slot-scope="scope">
|
168
|
252
|
<el-tooltip class="item" effect="dark" content="新增" placement="top">
|
|
@@ -200,7 +284,8 @@
|
200
|
284
|
import { deleteDrugWarehouseOutInfo, editDrugWarehouseoutInfo, getDrugSalesReturnConfig, getDrugWarehouseOutInfo,GetAllConfig,GetAllDrugInfoByID } from '@/api/drug/drug_stock'
|
201
|
285
|
import BreadCrumb from '../../components/bread-crumb'
|
202
|
286
|
import DrugsStockDialog from './drugsStockDialog/index'
|
203
|
|
-
|
|
287
|
+ import {postSearchDrugList } from "@/api/data"
|
|
288
|
+ import { getDictionaryDataConfig } from "@/utils/data";
|
204
|
289
|
export default {
|
205
|
290
|
components: { DrugsStockDialog, BreadCrumb},
|
206
|
291
|
name: 'salesReturnEdit',
|
|
@@ -264,6 +349,8 @@
|
264
|
349
|
dealer: [],
|
265
|
350
|
goodType: [],
|
266
|
351
|
goodInfo:[],
|
|
352
|
+ drugTypeList:[],
|
|
353
|
+ manufacturerList:[]
|
267
|
354
|
}
|
268
|
355
|
},
|
269
|
356
|
methods: {
|
|
@@ -474,7 +561,8 @@
|
474
|
561
|
return false
|
475
|
562
|
}
|
476
|
563
|
})
|
477
|
|
- }, GetOrderDetail: function(order_id) {
|
|
564
|
+ },
|
|
565
|
+ GetOrderDetail: function(order_id) {
|
478
|
566
|
const params = {
|
479
|
567
|
'id': order_id
|
480
|
568
|
}
|
|
@@ -483,12 +571,28 @@
|
483
|
571
|
this.$message.error(response.data.msg)
|
484
|
572
|
return false
|
485
|
573
|
} else {
|
|
574
|
+ console.log("list222222",response.data.data.list)
|
|
575
|
+ var manulist = response.data.data.manulist
|
486
|
576
|
for (let i = 0; i < response.data.data.list.length; i++) {
|
|
577
|
+ response.data.data.list[i].drug_name = response.data.data.list[i].drug.drug_name,
|
|
578
|
+ response.data.data.list[i].drug_type = response.data.data.list[i].drug.drug_type
|
|
579
|
+ response.data.data.list[i].name = response.data.data.list[i].drug.dose + response.data.data.list[i].drug.dose_unit +"*"+response.data.data.list[i].drug.min_number+response.data.data.list[i].drug.min_unit + "/" + response.data.data.list[i].drug.max_unit
|
|
580
|
+ response.data.data.list[i].last_price = response.data.data.list[i].drug.last_price.toString()
|
|
581
|
+ response.data.data.list[i].number = response.data.data.list[i].drug.number
|
|
582
|
+ response.data.data.list[i].manufacturer = response.data.data.list[i].drug.manufacturer
|
487
|
583
|
response.data.data.list[i].price = response.data.data.list[i].price.toString()
|
488
|
584
|
response.data.data.list[i].retail_price = response.data.data.list[i].retail_price.toString()
|
489
|
585
|
response.data.data.list[i].count = response.data.data.list[i].count.toString()
|
490
|
586
|
this.recordInfo.recordData.push(response.data.data.list[i])
|
491
|
587
|
}
|
|
588
|
+ for(let j=0;j<this.recordInfo.recordData.length;j++){
|
|
589
|
+ for(let i=0;i<manulist.length;i++){
|
|
590
|
+ if(this.recordInfo.recordData[j].manufacturer == manulist[i].id){
|
|
591
|
+ this.recordInfo.recordData[j].manufacturer = manulist[i].manufacturer_name
|
|
592
|
+ }
|
|
593
|
+ }
|
|
594
|
+ }
|
|
595
|
+
|
492
|
596
|
this.warehouseOut = response.data.data.info
|
493
|
597
|
this.warehouse_out_time = this.getTime(this.warehouseOut.warehouse_out_time, '{y}-{m}-{d}')
|
494
|
598
|
this.form.manufacturer = this.warehouseOut.manufacturer
|
|
@@ -517,9 +621,63 @@
|
517
|
621
|
this.propForm.manufacturer = val
|
518
|
622
|
}, changeDealer(val) {
|
519
|
623
|
this.propForm.dealer = val
|
520
|
|
- }
|
|
624
|
+ },
|
|
625
|
+ querySearchAsync(keyword, cb) {
|
|
626
|
+ let key = '';
|
|
627
|
+ if (keyword != undefined) {
|
|
628
|
+ key = keyword
|
|
629
|
+ }
|
|
630
|
+ let searchArray = [];
|
|
631
|
+ postSearchDrugList(key).then(response => {
|
|
632
|
+ if (response.data.state == 1) {
|
|
633
|
+ searchArray = response.data.data.list;
|
|
634
|
+
|
|
635
|
+ var list = response.data.data.list
|
|
636
|
+ console.log("猎豹22222222222",list)
|
|
637
|
+
|
|
638
|
+ this.drugList = list
|
|
639
|
+ var manufacturerList = response.data.data.manufacturerList
|
|
640
|
+ this.manufacturerList = manufacturerList
|
|
641
|
+ for(let i=0;i<this.drugList.length;i++){
|
|
642
|
+
|
|
643
|
+ for(let j=0;j<this.manufacturerList.length;j++){
|
|
644
|
+ if(this.drugList[i].manufacturer == this.manufacturerList[j].id){
|
|
645
|
+ this.drugList[i].manufacturer = this.manufacturerList[j].manufacturer_name
|
|
646
|
+ }
|
|
647
|
+ }
|
|
648
|
+ }
|
|
649
|
+
|
|
650
|
+ cb(this.drugList)
|
|
651
|
+ } else {
|
|
652
|
+ cb([])
|
|
653
|
+ }
|
|
654
|
+ })
|
|
655
|
+ },
|
|
656
|
+ changeDrugName(val){
|
|
657
|
+ this.currentIndex = val
|
|
658
|
+ },
|
|
659
|
+ handleSelect(val){
|
|
660
|
+ for(let i=0;i<this.recordInfo.recordData.length;i++){
|
|
661
|
+ if(i == this.currentIndex){
|
|
662
|
+ this.recordInfo.recordData[i].drug_id = val.id
|
|
663
|
+ this.recordInfo.recordData[i].drug_name = val.drug_name
|
|
664
|
+ this.recordInfo.recordData[i].drug_type = val.drug_type
|
|
665
|
+ this.recordInfo.recordData[i].name = val.dose +val.dose_unit+"*"+val.min_number+ val.min_unit+"/"+val.max_unit
|
|
666
|
+ this.recordInfo.recordData[i].last_price = val.last_price
|
|
667
|
+ this.recordInfo.recordData[i].manufacturer = val.manufacturer
|
|
668
|
+ this.recordInfo.recordData[i].batch_number = val.number
|
|
669
|
+ this.recordInfo.recordData[i].max_unit = val.max_unit
|
|
670
|
+ this.recordInfo.recordData[i].min_unit = val.min_unit
|
|
671
|
+ }
|
|
672
|
+ }
|
|
673
|
+ console.log("333333",this.recordInfo.recordData)
|
|
674
|
+ },
|
|
675
|
+ getDictionaryDataConfig(module, filed_name) {
|
|
676
|
+ return getDictionaryDataConfig(module, filed_name)
|
|
677
|
+ },
|
521
|
678
|
},
|
522
|
679
|
created() {
|
|
680
|
+ this.drugTypeList = getDictionaryDataConfig('system','drug_type')
|
523
|
681
|
this.GetConfigInfo()
|
524
|
682
|
this.propForm.goodUnit = this.$store.getters.good_unit
|
525
|
683
|
const order_id = this.$route.query.id
|