调取-勾选清单中已经存在的数据的提示语
This commit is contained in:
+248
-233
@@ -33,8 +33,8 @@
|
|||||||
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||||
<a-col :md="12" :sm="24">
|
<a-col :md="12" :sm="24">
|
||||||
<!-- <globalAdvancedQuery ref="globalAdvancedQueryRef"-->
|
<!-- <globalAdvancedQuery ref="globalAdvancedQueryRef"-->
|
||||||
<!-- @handleSuperQuery="handleSuperQuery"-->
|
<!-- @handleSuperQuery="handleSuperQuery"-->
|
||||||
<!-- :fieldList="fieldList"/>-->
|
<!-- :fieldList="fieldList"/>-->
|
||||||
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
<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-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -52,18 +52,18 @@
|
|||||||
:loading="loading">
|
:loading="loading">
|
||||||
|
|
||||||
</a-table>
|
</a-table>
|
||||||
<!-- <div class="page" v-if="dataList.length > 0">-->
|
<!-- <div class="page" v-if="dataList.length > 0">-->
|
||||||
<!-- <a-pagination-->
|
<!-- <a-pagination-->
|
||||||
<!-- :show-total="total => $t('total')+` ${total} `+$t('strip')"-->
|
<!-- :show-total="total => $t('total')+` ${total} `+$t('strip')"-->
|
||||||
<!-- show-quick-jumper-->
|
<!-- show-quick-jumper-->
|
||||||
<!-- show-size-changer-->
|
<!-- show-size-changer-->
|
||||||
<!-- :page-size.sync="pageSize"-->
|
<!-- :page-size.sync="pageSize"-->
|
||||||
<!-- :total="total"-->
|
<!-- :total="total"-->
|
||||||
<!-- :current="pageNo"-->
|
<!-- :current="pageNo"-->
|
||||||
<!-- @change="onChange"-->
|
<!-- @change="onChange"-->
|
||||||
<!-- @showSizeChange="SizeChange"-->
|
<!-- @showSizeChange="SizeChange"-->
|
||||||
<!-- />-->
|
<!-- />-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="drawer-bootom-button">
|
<div class="drawer-bootom-button">
|
||||||
@@ -74,241 +74,256 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getAction, postAction } from '@/api/manage'
|
import { getAction, postAction } from '@/api/manage'
|
||||||
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
|
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'transferList',
|
name: 'transferList',
|
||||||
components: {
|
components: {
|
||||||
globalAdvancedQuery
|
globalAdvancedQuery
|
||||||
},
|
|
||||||
props: ['url'],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
visible: false,
|
|
||||||
queryParam: {},
|
|
||||||
confirmLoading: false,
|
|
||||||
selectedRowKeys: [],
|
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
title: this.$t('category'),
|
|
||||||
align: 'left',
|
|
||||||
dataIndex: 'category',
|
|
||||||
width: 150,
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: this.$t('inspectionItems'),
|
|
||||||
align: 'left',
|
|
||||||
dataIndex: 'inspectionItem',
|
|
||||||
width: 150,
|
|
||||||
ellipsis: true,
|
|
||||||
scopedSlots: { customRender: 'inspectionItems' }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'WVTA ID',
|
|
||||||
align: 'left',
|
|
||||||
dataIndex: 'wvtaId',
|
|
||||||
width: 150,
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: this.$t('standard'),
|
|
||||||
align: 'left',
|
|
||||||
dataIndex: 'serialNumber',
|
|
||||||
width: 150,
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: this.$t('areaOfResponsibility'),
|
|
||||||
align: 'left',
|
|
||||||
dataIndex: 'dutyTerritoryName',
|
|
||||||
width: 200,
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: this.$t('typeOfDeliverables'),
|
|
||||||
align: 'left',
|
|
||||||
dataIndex: 'deliverableTypeName',
|
|
||||||
width: 200,
|
|
||||||
ellipsis: true,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
fieldList: [
|
|
||||||
{
|
|
||||||
type: 'string',
|
|
||||||
value: 'wvtaId',
|
|
||||||
text: 'WVTA ID'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'string',
|
|
||||||
value: 'inspectionItem',
|
|
||||||
text: this.$t('inspectionItems'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
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() {
|
props: ['url'],
|
||||||
this.pageNo = 1
|
data() {
|
||||||
this.replacePage()
|
return {
|
||||||
},
|
visible: false,
|
||||||
searchReset() {
|
queryParam: {},
|
||||||
this.pageNo = 1
|
confirmLoading: false,
|
||||||
this.queryParam = {}
|
selectedRowKeys: [],
|
||||||
this.replacePage()
|
columns: [
|
||||||
// this.$refs.globalAdvancedQueryRef.resetLine()
|
{
|
||||||
// this.$refs.globalAdvancedQueryRef.emitCallback()
|
title: this.$t('category'),
|
||||||
},
|
align: 'left',
|
||||||
onChange(page, pageSize) {
|
dataIndex: 'category',
|
||||||
this.pageNo = page
|
width: 150,
|
||||||
this.replacePage()
|
ellipsis: true
|
||||||
},
|
},
|
||||||
SizeChange(page, pageSize) {
|
{
|
||||||
this.pageNo = 1
|
title: this.$t('inspectionItems'),
|
||||||
this.pageSize = pageSize
|
align: 'left',
|
||||||
this.replacePage()
|
dataIndex: 'inspectionItem',
|
||||||
},
|
width: 150,
|
||||||
// handleSuperQuery(params, matchType) {
|
ellipsis: true,
|
||||||
// let sqp = {}
|
scopedSlots: { customRender: 'inspectionItems' }
|
||||||
// if (!params || (params && params.length == 0)) {
|
},
|
||||||
// sqp['superQueryParams'] = ''
|
{
|
||||||
// this.$refs.globalAdvancedQueryRef.superQueryFlag = false
|
title: 'WVTA ID',
|
||||||
// } else {
|
align: 'left',
|
||||||
// this.$refs.globalAdvancedQueryRef.superQueryFlag = true
|
dataIndex: 'wvtaId',
|
||||||
// sqp['superQueryParams'] = encodeURI(JSON.stringify(params))
|
width: 150,
|
||||||
// sqp['superQueryMatchType'] = matchType
|
ellipsis: true
|
||||||
// }
|
},
|
||||||
// this.queryParamQuery = sqp
|
{
|
||||||
// this.replacePage()
|
title: this.$t('standard'),
|
||||||
// },
|
align: 'left',
|
||||||
replacePage() {
|
dataIndex: 'serialNumber',
|
||||||
let query = {
|
width: 150,
|
||||||
// pageNo: this.pageNo,
|
ellipsis: true
|
||||||
// pageSize: this.pageSize,
|
},
|
||||||
...this.queryParamQuery,
|
{
|
||||||
...this.queryParam,
|
title: this.$t('areaOfResponsibility'),
|
||||||
authDummyInventoryBaseId: this.dummyInventoryBaseId
|
align: 'left',
|
||||||
|
dataIndex: 'dutyTerritoryName',
|
||||||
|
width: 200,
|
||||||
|
ellipsis: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('typeOfDeliverables'),
|
||||||
|
align: 'left',
|
||||||
|
dataIndex: 'deliverableTypeName',
|
||||||
|
width: 200,
|
||||||
|
ellipsis: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
fieldList: [
|
||||||
|
{
|
||||||
|
type: 'string',
|
||||||
|
value: 'wvtaId',
|
||||||
|
text: 'WVTA ID'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'string',
|
||||||
|
value: 'inspectionItem',
|
||||||
|
text: this.$t('inspectionItems')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: '',
|
||||||
|
value: 'dutyTerritory',
|
||||||
|
text: this.$t('areaOfResponsibility'),
|
||||||
|
dictCode: 'duty_territory'//只要 dictCode 有值,无论 type 是什么,都显示为字典下拉框
|
||||||
|
}
|
||||||
|
],
|
||||||
|
dataList: [],
|
||||||
|
content: [],
|
||||||
|
loading: false,
|
||||||
|
dummyInventoryBaseId: '',
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0
|
||||||
}
|
}
|
||||||
this.loading = true
|
},
|
||||||
getAction('/authDummy/authDummyInventoryInfoEO/list', query).then((res) => {
|
mounted() {
|
||||||
if (res.success) {
|
|
||||||
this.dataList = res.result || []
|
},
|
||||||
this.loading = false
|
methods: {
|
||||||
} else {
|
transferModel(id) {
|
||||||
this.loading = false
|
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,
|
||||||
|
authDummyInventoryBaseId: this.dummyInventoryBaseId
|
||||||
}
|
}
|
||||||
})
|
this.loading = true
|
||||||
},
|
getAction('/authDummy/authDummyInventoryInfoEO/list', query).then((res) => {
|
||||||
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/projectCertificationInventoryEO/callAdd', {
|
|
||||||
authDummyInventoryBaseId: this.dummyInventoryBaseId,
|
|
||||||
projectLibraryId: this.$route.query.id,
|
|
||||||
authDummyInventoryInfoIds: selectedRowKeys.join(','),
|
|
||||||
}).then((res) => {
|
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.confirmLoading = false
|
this.dataList = res.result || []
|
||||||
this.$message.success(this.$t('OperationSuccessful'))
|
this.loading = false
|
||||||
this.visible = false
|
|
||||||
this.selectedRowKeys = []
|
|
||||||
this.$emit('transferListFormHomo')
|
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(this.$t('operationFailed'))
|
this.loading = false
|
||||||
this.confirmLoading = false
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
},
|
||||||
this.$message.warning(this.$t('selectLeastOne'))
|
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/projectCertificationInventoryEO/callAdd', {
|
||||||
|
authDummyInventoryBaseId: this.dummyInventoryBaseId,
|
||||||
|
projectLibraryId: this.$route.query.id,
|
||||||
|
authDummyInventoryInfoIds: selectedRowKeys.join(',')
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.confirmLoading = false
|
||||||
|
if (res.result && res.result.length > 0) {
|
||||||
|
let detailedWarningList = []
|
||||||
|
res.result.forEach(val => {
|
||||||
|
detailedWarningList.push(
|
||||||
|
< div > { val } < /div>)
|
||||||
|
})
|
||||||
|
this.$warning({
|
||||||
|
content: (
|
||||||
|
< div >
|
||||||
|
{ detailedWarningList }
|
||||||
|
< /div>
|
||||||
|
)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
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>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.page {
|
.page {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.drawer-bootom-button {
|
.drawer-bootom-button {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-top: 1px solid #e8e8e8;
|
border-top: 1px solid #e8e8e8;
|
||||||
padding: 10px 16px;
|
padding: 10px 16px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
left: 0;
|
left: 0;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 0 0 2px 2px;
|
border-radius: 0 0 2px 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box-title-text {
|
.box-title-text {
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-text {
|
.title-text {
|
||||||
width: 20%;
|
width: 20%;
|
||||||
min-width: 110px;
|
min-width: 110px;
|
||||||
color: #000F16;
|
color: #000F16;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
margin-right: 16px;
|
margin-right: 16px;
|
||||||
margin-top: 3px;
|
margin-top: 3px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box-input {
|
.box-input {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 70%;
|
width: 70%;
|
||||||
height: 38px;
|
height: 38px;
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box-button {
|
.box-button {
|
||||||
height: 38px;
|
height: 38px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user