对接虚拟清单详情

This commit is contained in:
qq787203167
2022-04-13 15:35:29 +08:00
parent 22b9e16d6e
commit 4323f3c31f
5 changed files with 211 additions and 62 deletions
+1
View File
@@ -651,4 +651,5 @@ module.exports = {
FileUploadFailed:'File upload failed',
FileUploadedSuccessfully:'File uploaded successfully',
DeletedSuccessfully:'Deleted successfully',
confirmCopy:'confirm Copy ?',
}
+1
View File
@@ -655,4 +655,5 @@ module.exports = {
FileUploadFailed:'文件上传失败',
FileUploadedSuccessfully:'文件上传成功',
DeletedSuccessfully:'删除成功',
confirmCopy: '确定复制',
}
@@ -9,12 +9,45 @@
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<div style="margin-bottom: 60px">
<currencySearch
:flag="'1'"
:url="url"
@searchQuery="searchQuery"
@searchReset="searchReset"
/>
<div class="table-page-search-wrapper">
<a-row :gutter="24">
<a-col :md="12" :sm="8">
<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.serial_number"></j-input>
</div>
</a-col>
<a-col :md="12" :sm="8">
<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>
<a-col :md="12" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('status')">
<span>{{$t('status')}}</span>
</div>
<j-dict-select-tag class="box-input" v-model="queryParam.state"
:placeholder="$t('PleaseSelect')+$t('status')"
:type="'select'"
:triggerChange="false" :dictCode="'state'"/>
</div>
</a-col>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="12" :sm="24">
<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>
</div>
<a-table
:columns="columns"
rowKey="id"
@@ -53,11 +86,18 @@
components: {
currencySearch
},
props: {
url: {
type: Object,
default: {}
}
},
data() {
return {
visible: false,
confirmLoading: false,
selectedRowKeys: [],
queryParam: {},
columns: [
{
title: this.$t('standard'),
@@ -76,16 +116,17 @@
},
{
title: this.$t('technicalField'),
dataIndex: 'technicalField',
align: 'center'
}, {
title: this.$t('functionalAreas'),
dataIndex: 'functionalAreas',
dataIndex: 'technologyTerritory',
align: 'center'
},
// {
// title: this.$t('functionalAreas'),
// dataIndex: 'functionalAreas',
// align: 'center'
// },
{
title: this.$t('StandardImplementationDate'),
dataIndex: 'StandardImplementationDate',
dataIndex: 'xin1Che1Xing2Shi2Shi1Ri4Qi1',
align: 'center'
},
{
@@ -99,10 +140,7 @@
loading: false,
pageNo: 1,
pageSize: 10,
total: 0,
url: {
seachList: 'document/bussDocumentLibraryEO/queryCondition' //搜索字段
}
total: 0
}
},
mounted() {
@@ -111,21 +149,17 @@
methods: {
addModel() {
this.visible = true
this.queryParam = {}
this.selectedRowKeys = []
this.replacePage()
},
searchQuery(queryParam) {
let queryParamQuery = JSON.parse(JSON.stringify(queryParam))
Object.keys(queryParamQuery).forEach(res => {
if (queryParamQuery[res] instanceof Array) {
queryParamQuery[res] = queryParamQuery[res].join(',')
}
})
this.queryParam = queryParamQuery
searchQuery() {
this.pageNo = 1
this.replacePage()
},
searchReset(queryParam) {
this.queryParam = queryParam
searchReset() {
this.pageNo = 1
this.queryParam = {}
this.replacePage()
},
onChange(page, pageSize) {
@@ -138,7 +172,21 @@
this.replacePage()
},
replacePage() {
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...this.queryParam
}
this.loading = true
postAction(this.url.addModelList, query).then((res) => {
if (res.success) {
this.dataList = res.result.records || []
this.total = res.result.total
this.loading = false
} else {
this.loading = false
}
})
},
onSelectChange(value) {
this.selectedRowKeys = value
@@ -148,6 +196,19 @@
},
handleSubmit() {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.confirmLoading = true
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
postAction(this.url.addModel, { ids: selectedRowKeys.join(',') }).then((res) => {
if (res.success) {
this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.selectedRowKeys = []
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
}
})
this.visible = false
} else {
this.$message.warning(this.$t('selectLeastOne'))
@@ -174,4 +235,39 @@
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>
@@ -79,29 +79,36 @@
</a-row>
</div>
<div class="table-operator">
<!-- 导入-->
<div class="operator-text" v-has="'document:importZip'" v-if="isTrue">
<ImportFile :url="url"/>
</div>
<!-- 模板下载-->
<div @click="handleModule" class="operator-text" v-if="isTrue">
<a-icon type="download"/>
{{$t('templateDownload')}}
</div>
<!-- 导出-->
<div @click="handleExport" class="operator-text">
<a-icon type="export" :rotate="-90"/>
{{$t('export')}}
</div>
<!-- 复制-->
<div @click="copyClick" class="operator-text" v-if="isTrue">
<a-icon type="copy"/>
{{$t('copy')}}
</div>
<!-- 批量设置-->
<div @click="batSettingClick" class="operator-text" v-if="isTrue">
<a-icon type="setting"/>
{{$t('batSetting')}}
</div>
<!-- 添加-->
<div @click="handleAdd" class="operator-text" v-if="isTrue">
<a-icon type="plus"/>
{{$t('add')}}
</div>
<!-- 删除-->
<div @click="handleDel" class="operator-text" v-if="isTrue">
<a-icon type="delete"/>
{{$t('BatchDelete')}}
@@ -138,10 +145,10 @@
</a-card>
</div>
</div>
<addModel ref="addModelRef"/>
<editModel ref="editModelRef"/>
<UpdateLog ref="UpdateLogRef"/>
<batSetting ref="batSettingRef"/>
<addModel :url="url" ref="addModelRef"/>
<editModel :url="url" ref="editModelRef"/>
<UpdateLog :url="url" ref="UpdateLogRef"/>
<batSetting :url="url" ref="batSettingRef"/>
</div>
</template>
@@ -166,21 +173,32 @@
return {
title: '维护虚拟清单',
queryParam: {},
url: {},
url: {
addModelList: '/document/bussDocumentLibraryEO/queryPageInfoDummy',
page: '/dummy/dummyInventoryInfoEO/page',
addModel: '/dummy/dummyInventoryInfoEO/add',
editModel: '/dummy/dummyInventoryInfoEO/edit',
deleteBatch: '/dummy/dummyInventoryInfoEO/deleteBatch',
copyInfo: '/dummy/dummyInventoryInfoEO/copyInfoByIds',
setBatch: '/dummy/dummyInventoryInfoEO/setBatch',
importZipUrl: '/dummy/dummyInventoryInfoEO/importData',
exportData: '/dummy/dummyInventoryInfoEO/exportData',
exportTemplate: '/dummy/dummyInventoryInfoEO/exportTemplate'
},
loading: false,
dataSource: [],
columnsAll: [
{
title: 'WVTA ID',
align: 'center',
dataIndex: 'WVTAID',
dataIndex: 'wvtaId',
width: 100,
fixed: 'left'
},
{
title: this.$t('standard'),
align: 'center',
dataIndex: 'standard',
dataIndex: 'serialNumber',
width: 100,
fixed: 'left'
},
@@ -201,12 +219,12 @@
{
title: this.$t('scopeOfApplication'),
align: 'center',
dataIndex: 'scopeOfApplication'
dataIndex: 'shi4Yong4Fan4Wei2'
},
{
title: this.$t('status'),
align: 'center',
dataIndex: 'status'
dataIndex: 'state'
},
{
title: this.$t('correspondingStandard'),
@@ -216,59 +234,60 @@
{
title: this.$t('implementationCategory'),
align: 'center',
dataIndex: 'implementationCategory'
dataIndex: 'implementType'
},
{
title: this.$t('ImplementationDate'),
align: 'center',
dataIndex: 'ImplementationDate'
dataIndex: 'xin1Che1Xing2Shi2Shi1Ri4Qi1'
},
{
title: this.$t('vehicleInProductionDate'),
align: 'center',
dataIndex: 'vehicleInProductionDate'
dataIndex: 'implementTime'
},
{
title: this.$t('certificationType'),
align: 'center',
dataIndex: 'certificationType'
dataIndex: 'attestationType'
},
{
title: this.$t('certificationLevel'),
align: 'center',
dataIndex: 'certificationLevel'
dataIndex: 'attestationRank'
},
{
title: this.$t('technicalField'),
align: 'center',
dataIndex: 'technicalField'
dataIndex: 'technologyTerritory'
},
{
title: this.$t('areaOfResponsibility'),
align: 'center',
dataIndex: 'areaOfResponsibility'
dataIndex: 'dutyTerritory'
},
{
title: this.$t('remarks'),
align: 'center',
dataIndex: 'remarks'
dataIndex: 'remark'
},
{
title: this.$t('confirmationOfDesignConformity'),
children: [
{
title: this.$t('Deliverables'),
dataIndex: 'Deliverables',
dataIndex: 'designDeliverableTemplate',
align: 'center'
},
{
title: this.$t('Sponsor'),
dataIndex: 'Sponsor',
dataIndex: 'designInitiator',
align: 'center'
},
{
title: this.$t('personLiable'),
dataIndex: 'personLiable',
dataIndex: 'designDuty',
align: 'center'
}
]
@@ -278,17 +297,17 @@
children: [
{
title: this.$t('Deliverables'),
dataIndex: 'Deliverables',
dataIndex: 'prehomoDeliverableTemplate',
align: 'center'
},
{
title: this.$t('Sponsor'),
dataIndex: 'Sponsor',
dataIndex: 'prehomoInitiator',
align: 'center'
},
{
title: this.$t('personLiable'),
dataIndex: 'personLiable',
dataIndex: 'prehomoDuty',
align: 'center'
}
]
@@ -298,17 +317,17 @@
children: [
{
title: this.$t('Deliverables'),
dataIndex: 'Deliverables',
dataIndex: 'verifyDeliverableTemplate',
align: 'center'
},
{
title: this.$t('Sponsor'),
dataIndex: 'Sponsor',
dataIndex: 'verifyInitiator',
align: 'center'
},
{
title: this.$t('personLiable'),
dataIndex: 'personLiable',
dataIndex: 'verifyDuty',
align: 'center'
}
]
@@ -351,20 +370,52 @@
this.$refs.UpdateLogRef.getList()
},
searchQuery() {
this.pageNo = 1
this.getList()
},
searchReset() {
this.queryParam = {}
this.pageNo = 1
this.getList()
},
//模板下载
handleModule() {
downloadFile(this.url.exportTemplate, '模板下载.xls', {})
},
//导出
handleExport() {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let query = {
...this.queryParam,
id: selectedRowKeys.join(',')
}
downloadFile(this.url.exportData, '文档库.xls', query, this.Deselect)
},
Deselect() {
this.selectedRowKeys = []
},
//复制
copyClick() {
if (this.selectedRowKeys.length > 0) {
let _this = this
this.$confirm({
content: _this.$t('confirmCopy'),
onOk() {
let selectedRowKeys = JSON.parse(JSON.stringify(_this.selectedRowKeys))
getAction(_this.url.copyInfo, { ids: selectedRowKeys.join(',') }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.selectedRowKeys = []
_this.getList()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
pageOnChange(page, pageSize) {
this.pageNo = page
@@ -382,7 +433,7 @@
...this.queryParam
}
this.loading = true
getAction(this.url.list, query).then((res) => {
getAction(this.url.page, query).then((res) => {
if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) {
this.pageNo = res.result.current - 1
@@ -153,7 +153,7 @@
add: '/dummy/dummyInventoryBaseEO/add',
edit: '/dummy/dummyInventoryBaseEO/edit',
deleteBatch: '/dummy/dummyInventoryBaseEO/deleteBatch',
urlWithdraw: ''//撤回
urlWithdraw: '/dummy/dummyInventoryBaseEO/issue'//撤回&发布
},
total: 0,
pageSize: 10,
@@ -232,7 +232,7 @@
},
//撤回
withdraw(val) {
let item = JSON.parse(JSON.stringify(val))
let item = {}
let content = ''
if (item.state == 2) {
content = this.$t('confirmRelease')
@@ -245,7 +245,7 @@
this.$confirm({
content: content,
onOk() {
postAction(_this.url.edit, item).then((res) => {
postAction(_this.url.urlWithdraw, item).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()