|
@@ -164,21 +164,37 @@
|
164
|
164
|
width="1200px"
|
165
|
165
|
:before-close="handleClose">
|
166
|
166
|
<el-form :model="form" class="modifyDialog" label-width="120px">
|
167
|
|
- <el-form-item label="药品名称">
|
168
|
|
- <el-input v-model="form.name"></el-input>
|
|
167
|
+ <el-form-item label="耗材名称">
|
|
168
|
+ <!-- <el-input v-model="form.name"></el-input> -->
|
|
169
|
+ <el-autocomplete
|
|
170
|
+ class="checkSearch"
|
|
171
|
+ popper-class="my-autocomplete"
|
|
172
|
+ v-model="form.good_name"
|
|
173
|
+ :fetch-suggestions="querySearchAsync"
|
|
174
|
+ :trigger-on-focus="true"
|
|
175
|
+ placeholder="请输入耗材名称"
|
|
176
|
+ @select="handleSelect"
|
|
177
|
+ @input="changeGoodName(scope.$index)"
|
|
178
|
+ style="width:160px;"
|
|
179
|
+ >
|
|
180
|
+ <i class="el-icon-search el-input__icon" slot="suffix"></i>
|
|
181
|
+ <template slot-scope="{ item }">
|
|
182
|
+ <div class="name">{{ item.good_name +" " +item.specification_name + " "+item.manufacturer }}</div>
|
|
183
|
+ </template>
|
|
184
|
+ </el-autocomplete>
|
169
|
185
|
</el-form-item>
|
170
|
186
|
<el-form-item label="原价格">
|
171
|
|
- <el-input v-model="form.name"></el-input>
|
|
187
|
+ <el-input v-model="form.packing_price"></el-input>
|
172
|
188
|
</el-form-item>
|
173
|
189
|
<el-form-item label="现价格">
|
174
|
|
- <el-input v-model="form.name"></el-input>
|
|
190
|
+ <el-input v-model="form.new_price"></el-input>
|
175
|
191
|
</el-form-item>
|
176
|
192
|
<el-form-item label="调价数量">
|
177
|
|
- <el-input v-model="form.name"></el-input>
|
|
193
|
+ <el-input v-model="form.count"></el-input>
|
178
|
194
|
</el-form-item>
|
179
|
195
|
<el-form-item label="备注" style="width:66%;">
|
180
|
196
|
<div style="display:flex;">
|
181
|
|
- <el-input v-model="form.name"></el-input>
|
|
197
|
+ <el-input v-model="form.remark"></el-input>
|
182
|
198
|
<el-button style="margin-left:5px;" type="primary">添加</el-button>
|
183
|
199
|
</div>
|
184
|
200
|
</el-form-item>
|
|
@@ -265,7 +281,7 @@
|
265
|
281
|
|
266
|
282
|
<script>
|
267
|
283
|
import BreadCrumb from "../components/bread-crumb";
|
268
|
|
-
|
|
284
|
+import { postSearchGoodList} from "@/api/stock"
|
269
|
285
|
export default {
|
270
|
286
|
name: "stockModifyPrice",
|
271
|
287
|
components:{
|
|
@@ -302,8 +318,17 @@ export default {
|
302
|
318
|
}],
|
303
|
319
|
dialogVisible:false,
|
304
|
320
|
form: {
|
305
|
|
- name: '',
|
|
321
|
+ good_name: '',
|
|
322
|
+ packing_price:'',
|
|
323
|
+ new_price:"",
|
|
324
|
+ count:"",
|
|
325
|
+ remark:"",
|
306
|
326
|
},
|
|
327
|
+ goodList:[],
|
|
328
|
+ manufacturerList:[],
|
|
329
|
+ dealerList:[],
|
|
330
|
+ currentIndex: 0,
|
|
331
|
+
|
307
|
332
|
}
|
308
|
333
|
},
|
309
|
334
|
methods:{
|
|
@@ -313,7 +338,77 @@ export default {
|
313
|
338
|
print(){
|
314
|
339
|
this.$router.push({path:'/stock/stockModifyPricePrint'})
|
315
|
340
|
|
316
|
|
- }
|
|
341
|
+ },
|
|
342
|
+ querySearchAsync(keyword, cb) {
|
|
343
|
+ let key = '';
|
|
344
|
+ if (keyword != undefined) {
|
|
345
|
+ key = keyword
|
|
346
|
+ }
|
|
347
|
+ postSearchGoodList(key).then(response => {
|
|
348
|
+ if (response.data.state == 1) {
|
|
349
|
+
|
|
350
|
+ var list = response.data.data.list
|
|
351
|
+
|
|
352
|
+ this.goodList = list
|
|
353
|
+ var manufacturerList = response.data.data.manufacturerList
|
|
354
|
+ this.manufacturerList = manufacturerList
|
|
355
|
+ var dealer = response.data.data.dealerList
|
|
356
|
+ this.dealerList = dealer
|
|
357
|
+ // for(let i=0;i<this.goodList.length;i++){
|
|
358
|
+ // for(let j=0;j<this.manufacturerList.length;j++){
|
|
359
|
+ // if(this.goodList[i].manufacturer == this.manufacturerList[j].id){
|
|
360
|
+ // this.goodList[i].manufacturer = this.manufacturerList[j].manufacturer_name
|
|
361
|
+ // }
|
|
362
|
+ // }
|
|
363
|
+ // }
|
|
364
|
+
|
|
365
|
+ // for(let i=0;i<this.goodList.length;i++){
|
|
366
|
+ // for(let j=0;j<this.dealerList.length;j++){
|
|
367
|
+ // if(this.goodList[i].dealer == this.dealerList[j].id){
|
|
368
|
+ // this.goodList[i].dealer = this.dealerList[j].dealer_name
|
|
369
|
+ // }
|
|
370
|
+ // }
|
|
371
|
+ // }
|
|
372
|
+
|
|
373
|
+ cb(this.goodList)
|
|
374
|
+ } else {
|
|
375
|
+ cb([])
|
|
376
|
+ }
|
|
377
|
+ })
|
|
378
|
+ },
|
|
379
|
+ changeGoodName(val){
|
|
380
|
+ console.log("val",val)
|
|
381
|
+ this.currentIndex = val
|
|
382
|
+ },
|
|
383
|
+ handleSelect(val){
|
|
384
|
+ this.form.good_name = val.good_name
|
|
385
|
+ // for(let i=0;i<this.recordInfo.recordData.length;i++){
|
|
386
|
+ // if(this.currentIndex == i){
|
|
387
|
+ // this.recordInfo.recordData[i].good_type_id = val.id
|
|
388
|
+ // this.recordInfo.recordData[i].good_name = val.good_name
|
|
389
|
+ // this.recordInfo.recordData[i].good_type_id = val.good_type_id
|
|
390
|
+ // this.recordInfo.recordData[i].name = val.specification_name +"/"+val.packing_unit
|
|
391
|
+ // this.recordInfo.recordData[i].number = val.number
|
|
392
|
+ // this.recordInfo.recordData[i].manufacturer = val.manufacturer
|
|
393
|
+ // this.recordInfo.recordData[i].remark = val.remark
|
|
394
|
+ // if(val.buy_price == 0){
|
|
395
|
+ // this.recordInfo.recordData[i].price = ""
|
|
396
|
+ // }else{
|
|
397
|
+ // this.recordInfo.recordData[i].price = val.buy_price
|
|
398
|
+ // }
|
|
399
|
+
|
|
400
|
+ // this.recordInfo.recordData[i].specification_name = val.specification_name
|
|
401
|
+ // this.recordInfo.recordData[i].good_id = val.id
|
|
402
|
+ // this.recordInfo.recordData[i].packing_unit = val.packing_unit
|
|
403
|
+ // if(val.dealer == 0){
|
|
404
|
+ // this.recordInfo.recordData[i].dealer = ""
|
|
405
|
+ // }else{
|
|
406
|
+ // this.recordInfo.recordData[i].dealer = val.dealer
|
|
407
|
+ // }
|
|
408
|
+
|
|
409
|
+ // }
|
|
410
|
+ // }
|
|
411
|
+ }
|
317
|
412
|
},
|
318
|
413
|
created(){
|
319
|
414
|
let tableHeight = document.body.clientHeight - 200;
|