[update 标准主计划] 适用市场字段关联法规清单
This commit is contained in:
@@ -103,7 +103,7 @@ export default {
|
|||||||
{ // 适用市场
|
{ // 适用市场
|
||||||
title: this.$t('standardRegulationLibrary.standardMasterPlan.applicableMarket'),
|
title: this.$t('standardRegulationLibrary.standardMasterPlan.applicableMarket'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'applicableMarket',
|
dataIndex: 'applicableMarket_dictText',
|
||||||
width: 100,
|
width: 100,
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'text' }
|
||||||
},
|
},
|
||||||
|
|||||||
+33
-18
@@ -28,12 +28,18 @@
|
|||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<!-- 适用市场 -->
|
<!-- 适用市场 -->
|
||||||
<a-form-item :label="$t('standardRegulationLibrary.standardMasterPlan.applicableMarket')">
|
<a-form-item :label="$t('standardRegulationLibrary.standardMasterPlan.applicableMarket')">
|
||||||
<a-select :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.standardMasterPlan.applicableMarket')"
|
<!--<a-select :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.standardMasterPlan.applicableMarket')"-->
|
||||||
allowClear
|
<!-- allowClear-->
|
||||||
:disabled="disableSubmit"
|
<!-- :disabled="disableSubmit"-->
|
||||||
v-decorator="['base.applicableMarket', validatorRules.applicableMarket]">
|
<!-- v-decorator="['base.applicableMarket', validatorRules.applicableMarket]">-->
|
||||||
<a-select-option v-for="item in applicableMarketList" :value="item.value" :key="item.value">{{ item }}</a-select-option>
|
<!-- <a-select-option v-for="item in applicableMarketList" :value="item.value" :key="item.value">{{ item }}</a-select-option>-->
|
||||||
</a-select>
|
<!--</a-select>-->
|
||||||
|
<market-regulations-list-selection type="radio"
|
||||||
|
selectOnly
|
||||||
|
@listChange="handleChangeApplicableMarket"
|
||||||
|
:nameStr="model.marketStandardId_dictText"
|
||||||
|
:placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.standardMasterPlan.applicableMarket')"
|
||||||
|
v-decorator="['base.marketStandardId', validatorRules.applicableMarket]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
@@ -597,10 +603,11 @@ import {
|
|||||||
editStandardMasterPlan,
|
editStandardMasterPlan,
|
||||||
getStandardMasterPlanById
|
getStandardMasterPlanById
|
||||||
} from '@api/standardRegulationLibraryApi'
|
} from '@api/standardRegulationLibraryApi'
|
||||||
|
import MarketRegulationsListSelection from '@comp/selection/MarketRegulationsListSelection'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandardMasterPlanModal',
|
name: 'StandardMasterPlanModal',
|
||||||
components: { UserSelection, StandardSelection },
|
components: { MarketRegulationsListSelection, UserSelection, StandardSelection },
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
@@ -622,7 +629,7 @@ export default {
|
|||||||
// 适用市场
|
// 适用市场
|
||||||
applicableMarket: {
|
applicableMarket: {
|
||||||
rules: [
|
rules: [
|
||||||
{ required: true, message: this.$t('standardRegulationLibrary.standardMasterPlan.standardNumber') + this.$t('cannotEmpty') }
|
{ required: true, message: this.$t('standardRegulationLibrary.standardMasterPlan.applicableMarket') + this.$t('cannotEmpty') }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
// 标准名称
|
// 标准名称
|
||||||
@@ -674,7 +681,9 @@ export default {
|
|||||||
{ required: false, message: this.$t('standardRegulationLibrary.standardMasterPlan.actualFinishingDate') + this.$t('cannotEmpty') }
|
{ required: false, message: this.$t('standardRegulationLibrary.standardMasterPlan.actualFinishingDate') + this.$t('cannotEmpty') }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
// 选择的适用市场
|
||||||
|
selectApplicableMarket: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -683,15 +692,12 @@ export default {
|
|||||||
return this.modelType === 'view'
|
return this.modelType === 'view'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
|
||||||
// 获取适用市场下拉菜单
|
|
||||||
this.loadApplicableMarketList()
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
// 获取适用市场下拉菜单
|
// 修改
|
||||||
loadApplicableMarketList () {
|
handleChangeApplicableMarket (list) {
|
||||||
this.applicableMarketList = []
|
console.log(list[0], '选择的清单')
|
||||||
// TODO 暂无清单接口
|
this.selectApplicableMarket = list[0] || {}
|
||||||
|
this.model.marketStandardId_dictText = this.selectApplicableMarket.country_dictText || ''
|
||||||
},
|
},
|
||||||
add () {
|
add () {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
@@ -724,7 +730,9 @@ export default {
|
|||||||
getStandardMasterPlanById({ id: this.model.id }).then(res => {
|
getStandardMasterPlanById({ id: this.model.id }).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.model = res.result.lawsStandardMasterPlanVO
|
this.model = res.result.lawsStandardMasterPlanVO
|
||||||
this.data = res.result.lawsStandardMasterPlanSublistList
|
if (res.result.lawsStandardMasterPlanSublistList && res.result.lawsStandardMasterPlanSublistList.length) {
|
||||||
|
this.data = res.result.lawsStandardMasterPlanSublistList
|
||||||
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue({
|
this.form.setFieldsValue({
|
||||||
base: this.model,
|
base: this.model,
|
||||||
@@ -755,6 +763,13 @@ export default {
|
|||||||
if (!err) {
|
if (!err) {
|
||||||
const params = {}
|
const params = {}
|
||||||
params.lawsStandardMasterPlanVO = Object.assign({}, this.model, values.base)
|
params.lawsStandardMasterPlanVO = Object.assign({}, this.model, values.base)
|
||||||
|
// 处理适用市场,选择清单带出
|
||||||
|
if (this.selectApplicableMarket.id) {
|
||||||
|
// 清单id
|
||||||
|
params.lawsStandardMasterPlanVO.marketStandardId = this.selectApplicableMarket.id
|
||||||
|
// 适用市场
|
||||||
|
params.lawsStandardMasterPlanVO.applicableMarket = this.selectApplicableMarket.country
|
||||||
|
}
|
||||||
params.lawsStandardMasterPlanSublistList = this.data.map((_, index) => {
|
params.lawsStandardMasterPlanSublistList = this.data.map((_, index) => {
|
||||||
const result = Object.assign({}, _, values.data[index])
|
const result = Object.assign({}, _, values.data[index])
|
||||||
if (!result.type) {
|
if (!result.type) {
|
||||||
|
|||||||
Reference in New Issue
Block a user