409 lines
11 KiB
Java
409 lines
11 KiB
Java
<template>
|
|
<a-drawer
|
|
:title="$t('Transfer')"
|
|
:maskClosable="false"
|
|
:width="1000"
|
|
placement="right"
|
|
:closable="true"
|
|
@close="handleCancel"
|
|
:visible="visible"
|
|
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
|
<div style="margin-bottom: 60px">
|
|
<div class="table-page-search-wrapper">
|
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
|
<a-row :gutter="24">
|
|
<a-col :md="12" :sm="5">
|
|
<div class="box-title-text">
|
|
<div class="title-text" :title="$t('standard')">
|
|
<span>{{$t('standard')}}</span>
|
|
</div>
|
|
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
|
|
v-model="queryParam.serialNumber"></j-input>
|
|
</div>
|
|
</a-col>
|
|
<a-col :md="12" :sm="5">
|
|
<div class="box-title-text">
|
|
<div class="title-text" :title="$t('title')">
|
|
<span>{{$t('title')}}</span>
|
|
</div>
|
|
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
|
|
v-model="queryParam.title"></j-input>
|
|
</div>
|
|
</a-col>
|
|
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
|
<a-col :md="12" :sm="24">
|
|
<globalAdvancedQuery ref="globalAdvancedQueryRef"
|
|
@handleSuperQuery="handleSuperQuery"
|
|
:fieldList="fieldList"/>
|
|
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
|
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
|
|
</a-col>
|
|
</span>
|
|
</a-row>
|
|
</a-form>
|
|
</div>
|
|
<a-table
|
|
:columns="columns"
|
|
rowKey="id"
|
|
:scroll="{x: 800,y:600}"
|
|
:data-source="dataList"
|
|
:pagination="false"
|
|
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange,columnTitle:'' }"
|
|
:loading="loading">
|
|
|
|
</a-table>
|
|
<!-- <div class="page" v-if="dataList.length > 0">-->
|
|
<!-- <a-pagination-->
|
|
<!-- :show-total="total => $t('total')+` ${total} `+$t('strip')"-->
|
|
<!-- show-quick-jumper-->
|
|
<!-- show-size-changer-->
|
|
<!-- :page-size.sync="pageSize"-->
|
|
<!-- :total="total"-->
|
|
<!-- :current="pageNo"-->
|
|
<!-- @change="onChange"-->
|
|
<!-- @showSizeChange="SizeChange"-->
|
|
<!-- />-->
|
|
<!-- </div>-->
|
|
</div>
|
|
|
|
<div class="drawer-bootom-button">
|
|
<a-button @click="handleCancel" style="margin-right: 16px">{{$t('cancel')}}</a-button>
|
|
<a-button @click="handleSubmit(undefined)" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
|
</div>
|
|
</a-drawer>
|
|
</template>
|
|
|
|
<script>
|
|
import { getAction, postAction } from '@/api/manage'
|
|
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
|
|
|
|
export default {
|
|
name: 'transferList',
|
|
components: {
|
|
globalAdvancedQuery
|
|
},
|
|
props: ['url'],
|
|
data() {
|
|
return {
|
|
visible: false,
|
|
queryParam: {},
|
|
confirmLoading: false,
|
|
selectedRowKeys: [],
|
|
columns: [
|
|
{
|
|
title: this.$t('standard'),
|
|
align: 'left',
|
|
dataIndex: 'serialNumber',
|
|
width: 100,
|
|
fixed: 'left',
|
|
scopedSlots: { customRender: 'standard' }
|
|
},
|
|
{
|
|
title: this.$t('title'),
|
|
align: 'left',
|
|
dataIndex: 'title',
|
|
width: 100,
|
|
fixed: 'left',
|
|
scopedSlots: { customRender: 'titleName' }
|
|
},
|
|
{
|
|
title: this.$t('subtitle'),
|
|
align: 'left',
|
|
dataIndex: 'subtitle',
|
|
ellipsis: true,
|
|
width: 150
|
|
},
|
|
{
|
|
title: this.$t('zoneOfApplication'),
|
|
align: 'left',
|
|
dataIndex: 'region_dictText',
|
|
width: 150,
|
|
ellipsis: true
|
|
},
|
|
{
|
|
title: this.$t('correspondingStandard'),
|
|
align: 'left',
|
|
dataIndex: 'correspondingStandard',
|
|
width: 150,
|
|
ellipsis: true
|
|
},
|
|
{
|
|
title: this.$t('implementationCategory'),
|
|
align: 'left',
|
|
dataIndex: 'implementType_dictText',
|
|
width: 150,
|
|
ellipsis: true
|
|
},
|
|
{
|
|
title: this.$t('ImplementationDate'),
|
|
align: 'left',
|
|
width: 200,
|
|
dataIndex: 'xin1Che1Xing2Shi2Shi1Ri4Qi1',
|
|
ellipsis: true
|
|
},
|
|
{
|
|
title: this.$t('vehicleInProductionDate'),
|
|
align: 'left',
|
|
width: 220,
|
|
dataIndex: 'implementTime',
|
|
ellipsis: true
|
|
},
|
|
{
|
|
title: this.$t('certificationType'),
|
|
align: 'left',
|
|
dataIndex: 'attestationType_dictText',
|
|
width: 180,
|
|
ellipsis: true
|
|
},
|
|
{
|
|
title: this.$t('certificationLevel'),
|
|
align: 'left',
|
|
dataIndex: 'attestationRank_dictText',
|
|
width: 180,
|
|
ellipsis: true
|
|
},
|
|
{
|
|
title: this.$t('applicableSupplement'),
|
|
align: 'left',
|
|
width: 220,
|
|
dataIndex: 'applicableSupplement',
|
|
ellipsis: true
|
|
},
|
|
{
|
|
title: 'WVTA ID',
|
|
align: 'left',
|
|
dataIndex: 'wvtaId',
|
|
width: 180,
|
|
ellipsis: true
|
|
},
|
|
{
|
|
title: this.$t('areaOfResponsibility'),
|
|
align: 'left',
|
|
ellipsis: true,
|
|
dataIndex: 'dutyTerritory_dictText',
|
|
width: 180
|
|
},
|
|
],
|
|
fieldList: [
|
|
{
|
|
type: 'string',
|
|
value: 'subtitle',
|
|
text: this.$t('subtitle')
|
|
},
|
|
{
|
|
type: '',
|
|
value: 'region',
|
|
text: this.$t('zoneOfApplication'),
|
|
dictCode: 'region'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
|
|
},
|
|
{
|
|
type: 'string',
|
|
value: 'correspondingStandard',
|
|
text: this.$t('correspondingStandard')
|
|
},
|
|
{
|
|
type: '',
|
|
value: 'implementType',
|
|
text: this.$t('implementationCategory'),
|
|
dictCode: 'implement_type'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
|
|
},
|
|
{
|
|
type: 'date',
|
|
value: 'xin1Che1Xing2Shi2Shi1Ri4Qi1',
|
|
text: this.$t('ImplementationDate')
|
|
},
|
|
{
|
|
type: 'date',
|
|
value: 'implementTime',
|
|
text: this.$t('vehicleInProductionDate')
|
|
},
|
|
{
|
|
type: '',
|
|
value: 'attestationType',
|
|
text: this.$t('certificationType'),
|
|
dictCode: 'attestation_type'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
|
|
},
|
|
{
|
|
type: '',
|
|
value: 'attestationRank',
|
|
text: this.$t('certificationLevel'),
|
|
dictCode: 'attestation_rank'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
|
|
},
|
|
{
|
|
type: 'string',
|
|
value: 'applicableSupplement',
|
|
text: this.$t('applicableSupplement')
|
|
},
|
|
{
|
|
type: 'string',
|
|
value: 'wvtaId',
|
|
text: 'WVTA ID'
|
|
},
|
|
{
|
|
type: '',
|
|
value: 'dutyTerritory',
|
|
text: this.$t('areaOfResponsibility'),
|
|
dictCode: 'duty_territory'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
|
|
},
|
|
|
|
],
|
|
dataList: [],
|
|
content: [],
|
|
loading: false,
|
|
dummyInventoryBaseId:'',
|
|
pageNo: 1,
|
|
pageSize: 10,
|
|
total: 0
|
|
}
|
|
},
|
|
mounted() {
|
|
|
|
},
|
|
methods: {
|
|
transferModel(id) {
|
|
this.visible = true
|
|
this.dummyInventoryBaseId = id
|
|
this.queryParam = {}
|
|
this.selectedRowKeys = []
|
|
this.replacePage()
|
|
},
|
|
searchQuery() {
|
|
this.pageNo = 1
|
|
this.replacePage()
|
|
},
|
|
searchReset() {
|
|
this.pageNo = 1
|
|
this.queryParam = {}
|
|
this.replacePage()
|
|
this.$refs.globalAdvancedQueryRef.resetLine()
|
|
this.$refs.globalAdvancedQueryRef.emitCallback()
|
|
},
|
|
onChange(page, pageSize) {
|
|
this.pageNo = page
|
|
this.replacePage()
|
|
},
|
|
SizeChange(page, pageSize) {
|
|
this.pageNo = 1
|
|
this.pageSize = pageSize
|
|
this.replacePage()
|
|
},
|
|
handleSuperQuery(params, matchType) {
|
|
let sqp = {}
|
|
if (!params || (params && params.length == 0)) {
|
|
sqp['superQueryParams'] = ''
|
|
this.$refs.globalAdvancedQueryRef.superQueryFlag = false
|
|
} else {
|
|
this.$refs.globalAdvancedQueryRef.superQueryFlag = true
|
|
sqp['superQueryParams'] = encodeURI(JSON.stringify(params))
|
|
sqp['superQueryMatchType'] = matchType
|
|
}
|
|
this.queryParamQuery = sqp
|
|
this.replacePage()
|
|
},
|
|
replacePage() {
|
|
let query = {
|
|
// pageNo: this.pageNo,
|
|
// pageSize: this.pageSize,
|
|
...this.queryParamQuery,
|
|
...this.queryParam,
|
|
dummyInventoryBaseId: this.dummyInventoryBaseId
|
|
}
|
|
this.loading = true
|
|
getAction('/dummy/dummyInventoryInfoEO/list', query).then((res) => {
|
|
if (res.success) {
|
|
this.dataList = res.result || []
|
|
this.loading = false
|
|
} else {
|
|
this.loading = false
|
|
}
|
|
})
|
|
},
|
|
onSelectChange(value) {
|
|
this.selectedRowKeys = value
|
|
// if (this.selectedRowKeys.length > 1) {
|
|
// this.selectedRowKeys.shift()
|
|
// }
|
|
},
|
|
handleCancel() {
|
|
this.visible = false
|
|
},
|
|
handleSubmit(flag) {
|
|
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
|
this.confirmLoading = true
|
|
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
|
postAction('project/projectLawsInventoryEO/add', {
|
|
dummyInventoryBaseId: this.dummyInventoryBaseId,
|
|
projectLibraryId: this.$route.query.id,
|
|
dummyids: selectedRowKeys.join(','),
|
|
}).then((res) => {
|
|
if (res.success) {
|
|
this.confirmLoading = false
|
|
this.$message.success(this.$t('OperationSuccessful'))
|
|
this.visible = false
|
|
this.selectedRowKeys = []
|
|
this.$emit('transferListFormHomo')
|
|
} else {
|
|
this.$message.warning(this.$t('operationFailed'))
|
|
this.confirmLoading = false
|
|
}
|
|
})
|
|
} else {
|
|
this.$message.warning(this.$t('selectLeastOne'))
|
|
}
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.page {
|
|
text-align: right;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
.drawer-bootom-button {
|
|
position: absolute;
|
|
bottom: 0;
|
|
z-index: 100;
|
|
width: 100%;
|
|
border-top: 1px solid #e8e8e8;
|
|
padding: 10px 16px;
|
|
text-align: right;
|
|
left: 0;
|
|
background: #fff;
|
|
border-radius: 0 0 2px 2px;
|
|
}
|
|
|
|
.box-title-text {
|
|
line-height: 1.4;
|
|
display: flex;
|
|
align-items: center;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.title-text {
|
|
width: 20%;
|
|
min-width: 110px;
|
|
color: #000F16;
|
|
display: inline-block;
|
|
font-weight: 500;
|
|
font-size: 14px;
|
|
margin-right: 16px;
|
|
margin-top: 3px;
|
|
text-align: right;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.box-input {
|
|
display: inline-block;
|
|
width: 70%;
|
|
height: 38px;
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.box-button {
|
|
height: 38px;
|
|
}
|
|
</style> |