imeik-bizui 2.0.6 → 2.0.8

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.
@@ -62,6 +62,9 @@ export default {
62
62
  doctorAttrs() {
63
63
  return { isView: this.isView }
64
64
  },
65
+ isB02B03() {
66
+ return ['B02', 'B03'].includes(this.formProps?.formBaseNo)
67
+ },
65
68
  formItems() {
66
69
  return [
67
70
  {
@@ -104,7 +107,7 @@ export default {
104
107
  {
105
108
  type: 'ImSelect',
106
109
  prop: 'projectCode',
107
- label: ['B02', 'B03'].includes(this.formProps.formBaseNo) ? '项目编号(研发用途必填)' : '项目编号',
110
+ label: '项目编号',
108
111
  hidden: true,
109
112
  rules: [{ required: !this.isView, message: '请选择项目编号' }],
110
113
  attrs: {
@@ -146,6 +149,10 @@ export default {
146
149
  const erpIndex = this.formConfig.formItems.findIndex((item) => item.prop === 'erpBillName')
147
150
  this.formConfig.formItems[erpIndex].hidden = true
148
151
  }
152
+ if (this.isB02B03) {
153
+ const projectCodeIndex = this.formConfig.formItems.findIndex((item) => item.prop === 'projectCode')
154
+ this.formConfig.formItems[projectCodeIndex].label = '项目编号(研发用途必填)'
155
+ }
149
156
  },
150
157
  mounted() {
151
158
  this.handleBusEvent()
@@ -296,27 +303,29 @@ export default {
296
303
  this.$set(this.formConfig.formItems[index].attrs, 'disabled', false)
297
304
  }
298
305
  }
299
- getTagManageList({ tagModel: 'APPLY', tagCode: 'al-fxssqxmbh' }).then((res) => {
300
- if (res.code === 200) {
301
- Axios.get(res.data[0].tagValueUrl).then((subRes) => {
302
- if (subRes.data.code === 200) {
303
- const fiterData = []
304
- subRes.data.data.forEach((item) => {
305
- if (this.belongCompany === item.dicExt) {
306
- item.label = item.dicName
307
- item.value = item.dicValue
308
- fiterData.push(item)
309
- }
310
- })
311
- const options = fiterData
312
- const newData = JSON.parse(JSON.stringify(this.formConfig.formItems[index]))
313
- newData.attrs.options = options
314
- this.$set(this.formConfig.formItems, index, newData)
315
- }
316
- })
317
- } else {
318
- this.$message.error(res.msg)
319
- }
306
+ this.$nextTick(() => {
307
+ getTagManageList({ tagModel: 'APPLY', tagCode: 'al-fxssqxmbh' }).then((res) => {
308
+ if (res.code === 200) {
309
+ Axios.get(res.data[0].tagValueUrl).then((subRes) => {
310
+ if (subRes.data.code === 200) {
311
+ const fiterData = []
312
+ subRes.data.data.forEach((item) => {
313
+ if (this.belongCompany === item.dicExt) {
314
+ item.label = item.dicName
315
+ item.value = item.dicValue
316
+ fiterData.push(item)
317
+ }
318
+ })
319
+ const options = fiterData
320
+ const newData = JSON.parse(JSON.stringify(this.formConfig.formItems[index]))
321
+ newData.attrs.options = options
322
+ this.$set(this.formConfig.formItems, index, newData)
323
+ }
324
+ })
325
+ } else {
326
+ this.$message.error(res.msg)
327
+ }
328
+ })
320
329
  })
321
330
  },
322
331
  propChange(data) {