imeik-bizui 0.2.6 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@
7
7
  * 4: 上市后大样本临床研究
8
8
  */
9
9
  const typeItems = {
10
- 1: [
10
+ '1897633650850717699': [
11
11
  {
12
12
  type: 'FieldEmpty',
13
13
  span: 18,
@@ -120,11 +120,13 @@ export default {
120
120
  )
121
121
  }) || []
122
122
  const resData = []
123
- allData?.forEach((element) => {
124
- if (this.attrs.applyTypeOptions?.options.includes(element.value)) {
125
- resData.push(element)
126
- }
127
- })
123
+ if (this.attrs.applyTypeOptions?.options && this.attrs.applyTypeOptions?.options.length) {
124
+ allData?.forEach((element) => {
125
+ if (this.attrs.applyTypeOptions.options.includes(element.value)) {
126
+ resData.push(element)
127
+ }
128
+ })
129
+ }
128
130
  this.formConfig.formItems[0].attrs.options = resData
129
131
  if (this.attrs.applyTypeOptions.default) {
130
132
  this.formConfig.props.applyType = this.attrs.applyTypeOptions.default
@@ -141,7 +143,6 @@ export default {
141
143
  },
142
144
  // 与大表单同步数据,更新数据
143
145
  setPropsData() {
144
- console.log('触发更新')
145
146
  this.$emit('input', this.formConfig.props)
146
147
  this.$emit('change', this.formConfig.props)
147
148
  },
@@ -72,7 +72,7 @@ export default {
72
72
  computed: {
73
73
  // 是否选择了客户
74
74
  hasCustom() {
75
- return this.formProps.applicationApplyCustomer.accountCode
75
+ return this.formProps.applicationApplyCustomer?.accountCode
76
76
  },
77
77
  // 是不是械类产品,是什么械类
78
78
  isEquipment() {
@@ -153,26 +153,6 @@ export default {
153
153
  data: [],
154
154
  tableItems: []
155
155
  },
156
- schemeOptions: [
157
- {
158
- value: '母方案1',
159
- label: '母方案1'
160
- },
161
- {
162
- value: '母方案2',
163
- label: '母方案2'
164
- }
165
- ],
166
- batchOptions: [
167
- {
168
- value: '是',
169
- label: '是'
170
- },
171
- {
172
- value: '否',
173
- label: '否'
174
- }
175
- ],
176
156
  allTableItemMap: {
177
157
  materialBasicsInfo: {
178
158
  prop: 'materialBasicsInfo',
@@ -303,10 +283,10 @@ export default {
303
283
  handleGetMaterialReceivingAddressList(data, index) {
304
284
  getMaterialReceivingAddressList({
305
285
  materialCode: data.materialCode,
306
- accountCode: this.formProps.applicationApplyCustomer.accountCode,
286
+ accountCode: this.formProps.applicationApplyCustomer?.accountCode,
307
287
  materialSaleType: data.materialSaleType
308
288
  }).then((res) => {
309
- if (res.code === 200) {
289
+ if (res.code === 200 && res.data.length) {
310
290
  const {
311
291
  materialReceivingAddress,
312
292
  materialReceivingAddressType,
@@ -330,7 +310,7 @@ export default {
330
310
  handleGetMotherSchemeList(data, index) {
331
311
  getMotherSchemeList({
332
312
  materialCode: data.materialCode,
333
- customerUniqueCode: this.formProps.applicationApplyCustomer.customerUniqueCode
313
+ customerUniqueCode: this.formProps.applicationApplyCustomer?.customerUniqueCode
334
314
  }).then((res) => {
335
315
  if (res.code === 200) {
336
316
  this.$set(this.tableConfig.data[index], 'motherSchemeList', res.data)
@@ -42,6 +42,11 @@
42
42
  import { getMaterialList } from '../../../api/applycenter'
43
43
  export default {
44
44
  name: 'SelectProductDialog',
45
+ inject: {
46
+ formProps: {
47
+ default: () => {}
48
+ }
49
+ },
45
50
  data() {
46
51
  return {
47
52
  formConfig: {
@@ -184,7 +189,7 @@ export default {
184
189
  */
185
190
  getList() {
186
191
  const data = {
187
- accountCode: '1'
192
+ accountCode: this.formProps.applicationApplyCustomer?.accountCode
188
193
  }
189
194
  getMaterialList(data).then(res => {
190
195
  if (res.code === 200) {
@@ -1,15 +1,15 @@
1
1
  <template>
2
2
  <div class="select-view">
3
- <el-select v-if="!attrs.isView" v-model="myValue" filterable style="width: calc(25% - 16px);" :placeholder="placeholder" clearable @change="changeDoctor">
4
- <el-option v-for="item in doctorList" :key="item.value" :label="item.label" :value="item.value"> </el-option>
3
+ <el-select v-if="!attrs.isView" v-model="myValue" filterable style="width: calc(25% - 16px)" :placeholder="placeholder" clearable :remote-method="remoteMethod" @change="changeDoctor">
4
+ <el-option v-for="item in doctorList" :key="item.doctorPhone" :label="item.doctorName" :value="item.doctorPhone"> </el-option>
5
5
  </el-select>
6
6
  <el-row :gutter="24">
7
7
  <el-col v-for="(item, index) in selectDoctorList" :key="index" :span="6">
8
8
  <div class="item-view" :class="{ 'item-view-disabled': attrs.isView }">
9
- <img v-if="!attrs.isView" src="https://udstatic.imeik.com/pcUploads/1738999803093/delete%402x.png" class="delect-img" @click="selectDoctor(index)" />
10
- <p class="doctor-name">{{ item }}</p>
11
- <p class="doctor-other">医学美容中心</p>
12
- <p class="doctor-other">北京源于华丽美容有限公司</p>
9
+ <img v-if="!attrs.isView" src="https://udstatic.imeik.com/pcUploads/1738999803093/delete%402x.png" class="delect-img" @click="deleteDoctor(index)" />
10
+ <p class="doctor-name">{{ item.doctorName }}</p>
11
+ <p class="doctor-other">{{ item.doctorDepartment }} | {{ item.doctorPosition }}</p>
12
+ <p class="doctor-other">{{ item.doctorPracticeAgency }}</p>
13
13
  </div>
14
14
  </el-col>
15
15
  </el-row>
@@ -46,11 +46,6 @@ export default {
46
46
  }
47
47
  },
48
48
  watch: {
49
- selectDoctorList: {
50
- handler() {
51
- this.$emit('input', this.selectDoctorList)
52
- }
53
- },
54
49
  value: {
55
50
  immediate: true,
56
51
  handler(val) {
@@ -58,26 +53,40 @@ export default {
58
53
  }
59
54
  }
60
55
  },
61
- mounted() {},
56
+ mounted() {
57
+ this.handleGetDoctorList()
58
+ },
62
59
  methods: {
63
- getDoctorList() {
64
- getDoctorList().then(res => {
65
- if (res.code === 200) {
60
+ remoteMethod(val) {
61
+ this.handleGetDoctorList(val)
62
+ },
63
+ handleGetDoctorList(name = '') {
64
+ getDoctorList({ name }).then((res) => {
65
+ if (res.code === 200 && res.data.length) {
66
66
  this.doctorList = res.data
67
67
  }
68
68
  })
69
69
  },
70
- changeDoctor() {
71
- this.selectDoctorList.push(this.myValue)
70
+ changeDoctor(val) {
71
+ this.doctorList?.forEach((res) => {
72
+ if (res.doctorPhone === val) {
73
+ this.selectDoctorList.push(this.myValue)
74
+ this.onUpdate()
75
+ }
76
+ })
72
77
  this.myValue = undefined
73
78
  },
74
- selectDoctor(index) {
79
+ deleteDoctor(index) {
75
80
  this.selectDoctorList.splice(index, 1)
81
+ this.onUpdate()
76
82
  },
77
83
  setMyValue(value) {
78
84
  if (value && value.length) {
79
85
  this.selectDoctorList = value
80
86
  }
87
+ },
88
+ onUpdate() {
89
+ this.$emit('input', this.selectDoctorList)
81
90
  }
82
91
  }
83
92
  }