|
@@ -14,42 +14,17 @@
|
|
|
<a-form-model-item label="委托信息" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="weituoId">
|
|
|
|
|
|
|
|
|
- <a-select
|
|
|
- show-search
|
|
|
- v-model="model.weituoId"
|
|
|
- placeholder="请选择"
|
|
|
- :default-active-first-option="false"
|
|
|
- :show-arrow="false"
|
|
|
- :filter-option="false"
|
|
|
- :not-found-content="null"
|
|
|
- @change="handleChange"
|
|
|
- >
|
|
|
- <a-select-option v-for="d in weituoDictOptions" :key="d.value">
|
|
|
- {{ d.text }}
|
|
|
- </a-select-option>
|
|
|
- </a-select>
|
|
|
+ <j-search-select-tag ref="weituoNo" v-model="model.weituoId" :dictOptions="weituoDictOptions"
|
|
|
+ placeholder="请选择" @change="handleChange" />
|
|
|
+
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :span="24">
|
|
|
<a-form-model-item label="委托样品" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sampleIds">
|
|
|
- <a-select
|
|
|
- show-search
|
|
|
-
|
|
|
- mode="multiple"
|
|
|
- v-model="model.sampleIds"
|
|
|
- placeholder="请选择"
|
|
|
- :default-active-first-option="false"
|
|
|
- :show-arrow="false"
|
|
|
- :filter-option="false"
|
|
|
- :not-found-content="null"
|
|
|
- @change="handleYPChange"
|
|
|
-
|
|
|
- >
|
|
|
- <a-select-option v-for="d in yangppinDictOptions" :key="d.value">
|
|
|
- {{ d.text }}
|
|
|
- </a-select-option>
|
|
|
- </a-select>
|
|
|
+ <j-multi-select-tag ref="yangpin" v-model="model.sampleIds" placeholder="请选择"
|
|
|
+ :options="yangppinDictOptions" @change="handleYPChange" />
|
|
|
+
|
|
|
</a-form-model-item>
|
|
|
|
|
|
</a-col>
|
|
@@ -57,22 +32,9 @@
|
|
|
<a-col :span="24">
|
|
|
<a-form-model-item label="委托样品检测项目" :labelCol="labelCol" :wrapperCol="wrapperCol"
|
|
|
prop="testItemsIds">
|
|
|
- <a-select
|
|
|
- show-search
|
|
|
- mode="multiple"
|
|
|
- v-model="model.testItemsIds"
|
|
|
- placeholder="请选择"
|
|
|
- :default-active-first-option="false"
|
|
|
- :show-arrow="false"
|
|
|
- :filter-option="false"
|
|
|
- :not-found-content="null"
|
|
|
-
|
|
|
-
|
|
|
- >
|
|
|
- <a-select-option v-for="d in yangppinLsDictOptions" :key="d.value">
|
|
|
- {{ d.text }}
|
|
|
- </a-select-option>
|
|
|
- </a-select>
|
|
|
+
|
|
|
+ <j-multi-select-tag ref="jiance" v-model="model.testItemsIds" placeholder="请选择"
|
|
|
+ :options="yangppinLsDictOptions" />
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
@@ -172,8 +134,12 @@ export default {
|
|
|
methods: {
|
|
|
|
|
|
handlewcChange(data) {
|
|
|
- var weituoClient = { weituoClient: data }
|
|
|
+ this.$refs.weituoNo.handleChange('')
|
|
|
+ this.$refs.yangpin.onChange([])
|
|
|
+ this.$refs.jiance.onChange([])
|
|
|
+
|
|
|
|
|
|
+ var weituoClient = { weituoClient: data }
|
|
|
getAction('/weituo/itdmWeituoInfo/weituoNoList', weituoClient).then((res) => {
|
|
|
if (res.success) {
|
|
|
this.weituoDictOptions = res.result.map(i => {
|
|
@@ -200,44 +166,60 @@ export default {
|
|
|
},
|
|
|
|
|
|
yangpmList(weituoId) {
|
|
|
- const select = { weituoId: weituoId }
|
|
|
- getAction('/baogao/itdmBaogao/yangpin/list', select).then((res) => {
|
|
|
- if (res.success) {
|
|
|
- this.yangppinDictOptions = res.result.map(i => {
|
|
|
- const map = {}
|
|
|
- map.text = i.sampleName
|
|
|
- map.value = i.id
|
|
|
- return map
|
|
|
- })
|
|
|
+ console.log(weituoId)
|
|
|
+ if (weituoId !== '') {
|
|
|
+ const select = { weituoId: weituoId }
|
|
|
+ getAction('/baogao/itdmBaogao/yangpin/list', select).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ this.yangppinDictOptions = res.result.map(i => {
|
|
|
+ const map = {}
|
|
|
+ map.label = i.sampleName
|
|
|
+ map.value = i.id
|
|
|
+ return map
|
|
|
+ })
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.$message.warning(res.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.yangppinDictOptions=[]
|
|
|
+ }
|
|
|
|
|
|
- } else {
|
|
|
- this.$message.warning(res.message)
|
|
|
- }
|
|
|
- })
|
|
|
},
|
|
|
|
|
|
queryShiyanList(yangpinIds) {
|
|
|
- const select = { 'yangpinIds': yangpinIds.toString() }
|
|
|
- getAction('/baogao/itdmBaogao/shiyan/list', select).then((res) => {
|
|
|
- if (res.success) {
|
|
|
- this.yangppinLsDictOptions = res.result.map(i => {
|
|
|
- const map = {}
|
|
|
- map.text = i.testItems
|
|
|
- map.value = i.id
|
|
|
- return map
|
|
|
- })
|
|
|
+ console.log(yangpinIds)
|
|
|
+ if (yangpinIds !== '') {
|
|
|
+ const select = { 'yangpinIds': yangpinIds.toString() }
|
|
|
+ getAction('/baogao/itdmBaogao/shiyan/list', select).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ this.yangppinLsDictOptions = res.result.map(i => {
|
|
|
+ const map = {}
|
|
|
+ map.label = i.testItems
|
|
|
+ map.value = i.id
|
|
|
+ return map
|
|
|
+ })
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.$message.warning(res.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.yangppinLsDictOptions=[]
|
|
|
+ }
|
|
|
|
|
|
- } else {
|
|
|
- this.$message.warning(res.message)
|
|
|
- }
|
|
|
- })
|
|
|
},
|
|
|
|
|
|
handleYPChange(value) {
|
|
|
+
|
|
|
+ this.$refs.jiance.onChange([])
|
|
|
console.log(value)
|
|
|
this.queryShiyanList(value)
|
|
|
},
|
|
|
handleChange(value) {
|
|
|
+ this.$refs.yangpin.onChange([])
|
|
|
+ this.$refs.jiance.onChange([])
|
|
|
console.log(value)
|
|
|
this.yangpmList(value)
|
|
|
|