|
@@ -5,7 +5,12 @@
|
|
|
<a-row>
|
|
|
<a-col :span="24">
|
|
|
<a-form-model-item label="样品条码列表" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="barCodes">
|
|
|
- <j-multi-select-tag type="list_multi" v-model="model.barCodes" dictCode="itdm_inventory_barcode,bar_code,bar_code" placeholder="请选择样品条码列表" />
|
|
|
+ <j-multi-select-tag type="list_multi"
|
|
|
+ v-model="model.barCodes"
|
|
|
+ value-in-value
|
|
|
+ show-search
|
|
|
+ :options="rukuSampleBarcodeOptions"
|
|
|
+ placeholder="请选择样品条码列表" />
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :span="24">
|
|
@@ -33,6 +38,7 @@
|
|
|
|
|
|
import { httpAction, getAction } from '@/api/manage'
|
|
|
import { validateDuplicateValue } from '@/utils/util'
|
|
|
+ import { rukuSampleBarcodeList } from '@/api/api'
|
|
|
|
|
|
export default {
|
|
|
name: 'ItdmSampleExpireForm',
|
|
@@ -54,6 +60,7 @@
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
+ rukuSampleBarcodeOptions : [],
|
|
|
model:{
|
|
|
},
|
|
|
labelCol: {
|
|
@@ -80,10 +87,23 @@
|
|
|
},
|
|
|
},
|
|
|
created () {
|
|
|
+ this.getSampleBarcodeList();//初始化已入库样品条码下拉列表
|
|
|
//备份model原始值
|
|
|
this.modelDefault = JSON.parse(JSON.stringify(this.model));
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 获得已入库样品条码下拉列表,此方法要在created里,初始化时调用
|
|
|
+ getSampleBarcodeList(){
|
|
|
+ rukuSampleBarcodeList().then((res) =>{
|
|
|
+ this.rukuSampleBarcodeOptions = res.result.map( res => {
|
|
|
+ console.log("444",res)
|
|
|
+ return{
|
|
|
+ value: res.barCode,
|
|
|
+ label: res.barCode
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
add () {
|
|
|
this.edit(this.modelDefault);
|
|
|
},
|