[update] 市场法规清单联调
This commit is contained in:
+23
-7
@@ -13,9 +13,12 @@
|
||||
<a-form-item :labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
:label="$t('standardRegulationLibrary.marketRegulationsList.countryRegion')">
|
||||
<j-dict-select-tag v-decorator="['country', validatorRules.country]"
|
||||
dict-code="market_state"
|
||||
:placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketRegulationsList.countryRegion')" />
|
||||
<s-tree-select v-decorator="['country', validatorRules.country]"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
style="width: 100%"
|
||||
:tree-data="countryOptions"
|
||||
:label-in-value="false"
|
||||
:placeholder="$t('pleaseSelect')+$t('standardRegulationLibrary.marketRegulationsList.countryRegion')" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- 清单编号 -->
|
||||
@@ -197,6 +200,7 @@
|
||||
<script>
|
||||
import InternalDetailPage from '@/components/InternalDetailPage'
|
||||
import JTable from '@/components/jero/JTable'
|
||||
import STreeSelect from '@/components/STreeSelect'
|
||||
import MarketRegulationsModal from './modules/MarketRegulationsModal'
|
||||
import StandardSelectionModal from '../../../components/selection/StandardSelectionModal'
|
||||
import MarketRegulationsListSelectionModal from '../../../components/selection/MarketRegulationsListSelectionModal'
|
||||
@@ -214,6 +218,7 @@ import { ACCESS_TOKEN, TENANT_ID } from '../../../store/mutation-types'
|
||||
import { downloadFile } from '../../../api/manage'
|
||||
import HistoryVersionModal from './modules/HistoryVersionModal'
|
||||
import store from '@/store'
|
||||
import { getFormDictTreeList } from '../../../api/api'
|
||||
|
||||
const uidGenerator = () => {
|
||||
return '-' + parseInt(Math.random() * 10000 + 1, 10)
|
||||
@@ -230,7 +235,8 @@ export default {
|
||||
InternalDetailPage,
|
||||
JTable,
|
||||
MarketRegulationsModal,
|
||||
HistoryVersionModal
|
||||
HistoryVersionModal,
|
||||
STreeSelect
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['defaultHeight']),
|
||||
@@ -263,6 +269,7 @@ export default {
|
||||
form: this.$form.createForm(this),
|
||||
model: {},
|
||||
queryParam: {},
|
||||
countryOptions: [], // 国家下拉选择
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 6 }
|
||||
@@ -481,11 +488,19 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.getCountryOption()
|
||||
if (this.$route.query.id) {
|
||||
this.initData(this.$route.query.id)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getCountryOption () {
|
||||
getFormDictTreeList({ dictId: '1801130851452059649' }).then(res => {
|
||||
if (res.success) {
|
||||
this.countryOptions = res.result
|
||||
}
|
||||
})
|
||||
},
|
||||
initData (id) {
|
||||
this.loading = true
|
||||
getMarketRegulationListById({ id }).then(res => {
|
||||
@@ -772,15 +787,16 @@ export default {
|
||||
this.form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
this.loading = true
|
||||
const param = Object.assign({}, values)
|
||||
const param = {}
|
||||
param.manifest = Object.assign({}, values)
|
||||
let func
|
||||
if (this.model.id) {
|
||||
param.id = this.model.id
|
||||
param.manifest.id = this.model.id
|
||||
func = marketRegulationListEdit
|
||||
} else {
|
||||
func = marketRegulationListAdd
|
||||
}
|
||||
param.dataList = this.dataList
|
||||
param.lists = this.dataList
|
||||
func(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
|
||||
+41
-16
@@ -8,28 +8,35 @@
|
||||
<!-- 清单编号 -->
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item :label="$t('standardRegulationLibrary.marketRegulationsList.listNumber')">
|
||||
<j-input
|
||||
<a-input
|
||||
:placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.marketRegulationsList.listNumber')"
|
||||
v-model="queryParam.manifestNo"></j-input>
|
||||
v-model="queryParam.manifestNo"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<!-- 清单名称 -->
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item :label="$t('standardRegulationLibrary.marketRegulationsList.listName')">
|
||||
<j-input
|
||||
<a-input
|
||||
:placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.marketRegulationsList.listName')"
|
||||
v-model="queryParam.mainfestName"></j-input>
|
||||
v-model="queryParam.manifestName"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<!-- 国家/地区 -->
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item :label="$t('standardRegulationLibrary.marketRegulationsList.countryRegion')">
|
||||
<j-dict-select-tag
|
||||
:placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketRegulationsList.countryRegion')"
|
||||
<a-tree-select
|
||||
tree-node-filter-prop="title"
|
||||
v-model="queryParam.country"
|
||||
dict-code="market_state"></j-dict-select-tag>
|
||||
:maxTagCount="1"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
:tree-data="countryOptions"
|
||||
:placeholder="$t('pleaseSelect')+$t('standardRegulationLibrary.marketRegulationsList.countryRegion')"
|
||||
show-search
|
||||
allowClear
|
||||
:filterTreeNode="filterTreeOption"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
@@ -47,9 +54,9 @@
|
||||
<!-- 作者 -->
|
||||
<a-col :md="6" :sm="8">
|
||||
<a-form-item :label="$t('standardRegulationLibrary.marketRegulationsList.author')">
|
||||
<j-input
|
||||
<a-input
|
||||
:placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.marketRegulationsList.author')"
|
||||
v-model="queryParam.author"></j-input>
|
||||
v-model="queryParam.author"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</template>
|
||||
@@ -59,7 +66,7 @@
|
||||
{{ toggleSearchStatus ? $t('putAway') : $t('open') }}
|
||||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
|
||||
</a>
|
||||
<a-button type="primary" @click="searchQuery" icon="search">{{ $t('query') }}</a-button>
|
||||
<a-button type="primary" @click="searchQuery" icon="search" v-has="'marketStandard:search'">{{ $t('query') }}</a-button>
|
||||
<a-button type="primary" ghost @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button>
|
||||
</div>
|
||||
|
||||
@@ -94,6 +101,8 @@
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
:operationList="operationList"
|
||||
@operationClick="operationClick"
|
||||
@change="handleTableChange">
|
||||
|
||||
<!-- 清单编号、清单名称 -->
|
||||
@@ -116,6 +125,7 @@ import JTable from '@/components/jero/JTable'
|
||||
import JDictSelectTag from '@/components/dict/JDictSelectTag'
|
||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||
import { ListState } from '../../../enums/commonEnums'
|
||||
import { getFormDictTreeList } from '../../../api/api'
|
||||
|
||||
export default {
|
||||
name: 'MarketRegulationsList',
|
||||
@@ -123,12 +133,13 @@ export default {
|
||||
mixins: [JeroListMixin],
|
||||
data () {
|
||||
return {
|
||||
countryOptions: [], // 国家下拉选择
|
||||
columns: [
|
||||
{ // 国家/地区
|
||||
title: this.$t('standardRegulationLibrary.marketRegulationsList.countryRegion'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'country',
|
||||
dataIndex: 'country_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 清单编号
|
||||
@@ -142,14 +153,14 @@ export default {
|
||||
title: this.$t('standardRegulationLibrary.marketRegulationsList.listName'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'mainfestName',
|
||||
dataIndex: 'manifestName',
|
||||
scopedSlots: { customRender: 'toDetail' }
|
||||
},
|
||||
{ // 驾驶位置
|
||||
title: this.$t('standardRegulationLibrary.marketRegulationsList.drivingPosition'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'drivePosition',
|
||||
dataIndex: 'drivePosition_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 清单版本
|
||||
@@ -170,14 +181,14 @@ export default {
|
||||
title: this.$t('standardRegulationLibrary.marketRegulationsList.author'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'author',
|
||||
dataIndex: 'author_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 清单状态
|
||||
title: this.$t('standardRegulationLibrary.marketRegulationsList.listState'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'manifestStatus',
|
||||
dataIndex: 'manifestStatus_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
@@ -213,13 +224,27 @@ export default {
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: '',
|
||||
list: '/laws/marketStandard/page',
|
||||
deleteBatch: '',
|
||||
delete: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.getCountryOption()
|
||||
},
|
||||
methods: {
|
||||
getCountryOption () {
|
||||
getFormDictTreeList({ dictId: '1801130851452059649' }).then(res => {
|
||||
if (res.success) {
|
||||
this.countryOptions = res.result
|
||||
}
|
||||
})
|
||||
},
|
||||
filterTreeOption (input, option) {
|
||||
const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label
|
||||
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
},
|
||||
// 新增
|
||||
handleAdd () {
|
||||
this.$router.push({
|
||||
|
||||
+46
-15
@@ -42,23 +42,29 @@
|
||||
<!-- 新生产车实施日期 -->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.newProductionVehicleImplementationDate')">
|
||||
<j-multiple-date-picker :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.newProductionVehicleImplementationDate')"
|
||||
field-name="newProductImplDate"
|
||||
v-decorator.trim="[ 'newProductImplDate', validatorRules.newProductImplDate ]" />
|
||||
</a-form-item>
|
||||
<!-- 新认证车实施日期 -->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.newCertifiedVehicleImplementationDate')">
|
||||
<j-multiple-date-picker :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.newCertifiedVehicleImplementationDate')"
|
||||
field-name="newAuthImplDate"
|
||||
v-decorator.trim="[ 'newAuthImplDate', validatorRules.newAuthImplDate ]" />
|
||||
</a-form-item>
|
||||
<!-- 注册日期 -->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.dateOfRegistration')">
|
||||
<j-multiple-date-picker :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.dateOfRegistration')"
|
||||
field-name="registrationDate"
|
||||
v-decorator.trim="[ 'registrationDate', validatorRules.registrationDate ]" />
|
||||
</a-form-item>
|
||||
<!-- 适用国家/地区 -->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.applicableCountryRegion')">
|
||||
<j-dict-select-tag :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.applicableCountryRegion')"
|
||||
dict-code="market_state"
|
||||
v-decorator.trim="[ 'applicableCountryRegion', validatorRules.applicableCountryRegion ]" />
|
||||
<s-tree-select
|
||||
v-decorator.trim="[ 'applicableCountryRegion', validatorRules.applicableCountryRegion ]"
|
||||
:tree-data="countryOptions"
|
||||
tree-checkable
|
||||
treeCheckStrictly
|
||||
:placeholder="$t('pleaseSelect')+$t('standardRegulationLibrary.marketListField.applicableCountryRegion')" />
|
||||
</a-form-item>
|
||||
<!-- 认证对象 -->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.authenticationObject')">
|
||||
@@ -80,9 +86,9 @@
|
||||
</a-form-item>
|
||||
<!-- 主控部门专业模块 -->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.masterControlDepartmentProfessionalModule')">
|
||||
<j-dict-select-tag :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.masterControlDepartmentProfessionalModule')"
|
||||
dict-code="master_control_department_professional_module"
|
||||
v-decorator.trim="[ 'mainDeptProfMode', validatorRules.mainDeptProfMode ]" />
|
||||
<j-multi-select-tag :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.masterControlDepartmentProfessionalModule')"
|
||||
dict-code="professional_module"
|
||||
v-decorator.trim="[ 'mainDeptProfMode', validatorRules.mainDeptProfMode ]" />
|
||||
</a-form-item>
|
||||
<!-- 关联部门 -->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.relatedDepartment')">
|
||||
@@ -92,9 +98,9 @@
|
||||
</a-form-item>
|
||||
<!-- 关联部门专业模块 -->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.associateDepartmentSpecializedModules')">
|
||||
<j-dict-select-tag :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.associateDepartmentSpecializedModules')"
|
||||
dict-code="master_control_department_professional_module"
|
||||
v-decorator.trim="[ 'associateDeptProfMode', validatorRules.associateDeptProfMode ]" />
|
||||
<j-multi-select-tag :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.associateDepartmentSpecializedModules')"
|
||||
dict-code="professional_module"
|
||||
v-decorator.trim="[ 'associateDeptProfMode', validatorRules.associateDeptProfMode ]" />
|
||||
</a-form-item>
|
||||
<!-- 适用车型 -->
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.applicableVehicleType')">
|
||||
@@ -142,12 +148,14 @@
|
||||
<script>
|
||||
import StandardSelection from '@/components/selection/StandardSelection'
|
||||
import JMultipleDatePicker from '../../../../components/JMultipleDatePicker'
|
||||
import STreeSelect from '@/components/STreeSelect'
|
||||
import pick from 'lodash.pick'
|
||||
import { getForeignStandardDocumentInfo } from '../../../../api/standardRegulationLibraryApi'
|
||||
import { getFormDictTreeList } from '../../../../api/api'
|
||||
|
||||
export default {
|
||||
name: 'MarketRegulationsModal',
|
||||
components: { JMultipleDatePicker, StandardSelection },
|
||||
components: { JMultipleDatePicker, StandardSelection, STreeSelect },
|
||||
data () {
|
||||
return {
|
||||
title: this.$t('newlyAdded'),
|
||||
@@ -156,6 +164,7 @@ export default {
|
||||
confirmLoading: false,
|
||||
form: this.$form.createForm(this),
|
||||
model: {},
|
||||
countryOptions: [], // 适用国家/地区下拉框
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 6 }
|
||||
@@ -256,6 +265,9 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.getCountryOption()
|
||||
},
|
||||
methods: {
|
||||
add () {
|
||||
this.edit({})
|
||||
@@ -271,20 +283,39 @@ export default {
|
||||
'associateDeptProfMode', 'applicableVehicle', 'dynamicType', 'batchLimit', 'autopilotLevel', 'requireType'))
|
||||
})
|
||||
},
|
||||
getCountryOption () {
|
||||
getFormDictTreeList({ dictId: '1801130851452059649' }).then(res => {
|
||||
if (res.success) {
|
||||
this.countryOptions = res.result
|
||||
}
|
||||
})
|
||||
},
|
||||
// 选择标准改变
|
||||
selectStandardChange (value) {
|
||||
this.loading = true
|
||||
// 企标名称
|
||||
this.formInline.standardName = value[0].standardName
|
||||
// 根据返回的id查询企标数据
|
||||
getForeignStandardDocumentInfo({ id: value[0].id, type: '2' }).then(res => {
|
||||
if (res.success) {
|
||||
const result = res.result
|
||||
result.standardName = result.standard_name // 标准名称
|
||||
result.standardEnglishName = result.standard_english_name // 标准英文名称
|
||||
result.stanardClass = result.standard_class // 标准类型
|
||||
result.newProductImplDate = result.new_product_impl_date // 新生产车实施日期
|
||||
result.newAuthImplDate = result.new_auth_impl_date // 新认证车实施日期
|
||||
result.registrationDate = result.registration_date // 注册日期
|
||||
result.applicableCountryRegion = result.applicable_market ? (result.applicable_market.split(',').map(item => {
|
||||
return { value: item }
|
||||
})) : [] // 适用国家/地区
|
||||
result.mainDept = result.main_dept // 主控部门
|
||||
result.mainDeptProfMode = result.main_dept_prof_mode || undefined // 主控部门专业模块
|
||||
result.associateDept = result.associate_dept // 关联部门
|
||||
result.associateDeptProfMode = result.associate_dept_prof_mode || undefined // 关联部门专业模块
|
||||
result.applicableVehicle = result.applicable_vehicle // 适用车型
|
||||
result.dynamicType = result.dynamic_type // 动力类型
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(pick(result, 'standardNumber', 'standardName', 'standardEnglishName',
|
||||
this.form.setFieldsValue(pick(result, 'standardName', 'standardEnglishName',
|
||||
'stanardClass', 'newProductImplDate', 'newAuthImplDate', 'registrationDate', 'applicableCountryRegion',
|
||||
'authenticationObject', 'certifyTheDeliverables', 'mainDept', 'mainDeptProfMode', 'associateDept',
|
||||
'associateDeptProfMode', 'applicableVehicle', 'dynamicType', 'batchLimit', 'autopilotLevel', 'requireType'))
|
||||
'mainDept', 'mainDeptProfMode', 'associateDept', 'associateDeptProfMode', 'applicableVehicle', 'dynamicType'))
|
||||
})
|
||||
}
|
||||
}).finally(() => {
|
||||
|
||||
Reference in New Issue
Block a user