调取-勾选清单中已经存在的数据的提示语
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">
|
||||
<a-col :md="12" :sm="24">
|
||||
<!-- <globalAdvancedQuery ref="globalAdvancedQueryRef"-->
|
||||
<!-- @handleSuperQuery="handleSuperQuery"-->
|
||||
<!-- :fieldList="fieldList"/>-->
|
||||
<!-- @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>
|
||||
@@ -52,18 +52,18 @@
|
||||
: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 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">
|
||||
@@ -74,241 +74,256 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
|
||||
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('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()
|
||||
export default {
|
||||
name: 'transferList',
|
||||
components: {
|
||||
globalAdvancedQuery
|
||||
},
|
||||
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
|
||||
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
|
||||
}
|
||||
this.loading = true
|
||||
getAction('/authDummy/authDummyInventoryInfoEO/list', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataList = res.result || []
|
||||
this.loading = false
|
||||
} else {
|
||||
this.loading = false
|
||||
},
|
||||
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,
|
||||
authDummyInventoryBaseId: this.dummyInventoryBaseId
|
||||
}
|
||||
})
|
||||
},
|
||||
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) => {
|
||||
this.loading = true
|
||||
getAction('/authDummy/authDummyInventoryInfoEO/list', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.confirmLoading = false
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible = false
|
||||
this.selectedRowKeys = []
|
||||
this.$emit('transferListFormHomo')
|
||||
this.dataList = res.result || []
|
||||
this.loading = false
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.confirmLoading = false
|
||||
this.loading = 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>
|
||||
|
||||
<style scoped>
|
||||
.page {
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
.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-input {
|
||||
display: inline-block;
|
||||
width: 70%;
|
||||
height: 38px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.box-button {
|
||||
height: 38px;
|
||||
}
|
||||
.box-button {
|
||||
height: 38px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user