修改标准选择
This commit is contained in:
@@ -6,7 +6,8 @@
|
|||||||
<!-- <span :class="{'title-text-text':false}">{{query.enName}}</span><br>-->
|
<!-- <span :class="{'title-text-text':false}">{{query.enName}}</span><br>-->
|
||||||
<!-- <span :class="{'title-text-text':false}">{{query.name}}</span>-->
|
<!-- <span :class="{'title-text-text':false}">{{query.name}}</span>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<a-input class="box-input" :value="value" @input="indexclick($event)" :placeholder="$t('PleaseEnterOrSelect')+query.db_field_txt"/>
|
<a-input class="box-input" :value="value" @input="indexclick($event)"
|
||||||
|
:placeholder="$t('PleaseEnterOrSelect')+query.db_field_txt"/>
|
||||||
<a-button type="primary" class="button-box" @click="standardClick">
|
<a-button type="primary" class="button-box" @click="standardClick">
|
||||||
标准选择
|
标准选择
|
||||||
</a-button>
|
</a-button>
|
||||||
@@ -20,32 +21,12 @@
|
|||||||
@close="handleCancel"
|
@close="handleCancel"
|
||||||
:visible="visible"
|
:visible="visible"
|
||||||
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||||
<a-form layout="inline" @keyup.enter.native="searchQuery" style="margin-bottom: 20px">
|
<currencySearch
|
||||||
<a-row :gutter="24">
|
:flag="'1'"
|
||||||
<a-col :md="6" :sm="8" style="line-height: 48px">
|
:url="url"
|
||||||
<div class="box-title-text-index">
|
@searchQuery="searchQuery"
|
||||||
<div class="title-text-index">
|
@searchReset="searchReset"
|
||||||
<span>{{$t('standard')}}</span>
|
/>
|
||||||
</div>
|
|
||||||
<a-input class="box-input-index" :placeholder="this.$t('PleaseEnter') +' '+ this.$t('standard')"
|
|
||||||
v-model="queryParam.serialNumber"></a-input>
|
|
||||||
</div>
|
|
||||||
</a-col>
|
|
||||||
<a-col :md="6" :sm="8" style="line-height: 48px">
|
|
||||||
<div class="box-title-text-index">
|
|
||||||
<div class="title-text-index">
|
|
||||||
<span>{{$t('title')}}</span>
|
|
||||||
</div>
|
|
||||||
<a-input class="box-input-index" :placeholder="this.$t('PleaseEnter') +' '+ this.$t('title')"
|
|
||||||
v-model="queryParam.title"></a-input>
|
|
||||||
</div>
|
|
||||||
</a-col>
|
|
||||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
|
||||||
<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>
|
|
||||||
</span>
|
|
||||||
</a-row>
|
|
||||||
</a-form>
|
|
||||||
<a-table
|
<a-table
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
@@ -76,10 +57,14 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getAction, postAction } from '@/api/manage'
|
import { getAction, postAction } from '@/api/manage'
|
||||||
|
import currencySearch from '@/components/currencySearch/index'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'index',
|
name: 'index',
|
||||||
props: ['query', 'value'],
|
components:{
|
||||||
|
currencySearch
|
||||||
|
},
|
||||||
|
props: ['query', 'value', 'replace_standard_id'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
visible: false,
|
visible: false,
|
||||||
@@ -92,23 +77,26 @@
|
|||||||
{
|
{
|
||||||
title: this.$t('standard'),
|
title: this.$t('standard'),
|
||||||
dataIndex: 'serial_number',
|
dataIndex: 'serial_number',
|
||||||
align: 'center',
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('title'),
|
title: this.$t('title'),
|
||||||
dataIndex: 'title',
|
dataIndex: 'title',
|
||||||
align: 'center',
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('TextStatus'),
|
title: this.$t('TextStatus'),
|
||||||
dataIndex: 'state',
|
dataIndex: 'state',
|
||||||
align: 'center',
|
align: 'center'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
dataList: [],
|
dataList: [],
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0
|
total: 0,
|
||||||
|
url: {
|
||||||
|
seachList: 'document/bussDocumentLibraryEO/queryCondition' //搜索字段
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -118,7 +106,7 @@
|
|||||||
standardClick() {
|
standardClick() {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.queryParam = {}
|
this.queryParam = {}
|
||||||
this.replacePage()
|
this.replacePage(this.replace_standard_id)
|
||||||
},
|
},
|
||||||
replacePage() {
|
replacePage() {
|
||||||
let query = {
|
let query = {
|
||||||
@@ -126,12 +114,16 @@
|
|||||||
pageNo: this.pageNo,
|
pageNo: this.pageNo,
|
||||||
pageSize: this.pageSize
|
pageSize: this.pageSize
|
||||||
}
|
}
|
||||||
|
this.selectedRowKeys = []
|
||||||
this.loading = true
|
this.loading = true
|
||||||
postAction('document/bussDocumentLibraryEO/replacePageInfo', query).then((res) => {
|
postAction('document/bussDocumentLibraryEO/replacePageInfo', query).then((res) => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.dataList = res.result.records
|
this.dataList = res.result.records
|
||||||
this.total = res.result.total
|
this.total = res.result.total
|
||||||
|
if (this.replace_standard_id) {
|
||||||
|
this.selectedRowKeys = this.replace_standard_id.split(',')
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
}
|
}
|
||||||
@@ -142,10 +134,13 @@
|
|||||||
},
|
},
|
||||||
handleSubmit() {
|
handleSubmit() {
|
||||||
let content = []
|
let content = []
|
||||||
|
let replace_standard_id = []
|
||||||
this.content.forEach(res => {
|
this.content.forEach(res => {
|
||||||
content.push(res.title)
|
content.push(res.title)
|
||||||
|
replace_standard_id.push(res.id)
|
||||||
})
|
})
|
||||||
this.$emit('input', content.join(','))
|
this.$emit('input', content.join(','))
|
||||||
|
this.$emit('change', replace_standard_id.join(','))
|
||||||
this.visible = false
|
this.visible = false
|
||||||
},
|
},
|
||||||
indexclick(event) {
|
indexclick(event) {
|
||||||
@@ -162,11 +157,12 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
searchQuery() {
|
searchQuery(queryParam) {
|
||||||
|
this.queryParam = queryParam
|
||||||
this.replacePage()
|
this.replacePage()
|
||||||
},
|
},
|
||||||
searchReset() {
|
searchReset(queryParam) {
|
||||||
this.queryParam = {}
|
this.queryParam = queryParam
|
||||||
this.replacePage()
|
this.replacePage()
|
||||||
},
|
},
|
||||||
onChange(page, pageSize) {
|
onChange(page, pageSize) {
|
||||||
@@ -176,7 +172,7 @@
|
|||||||
SizeChange(page, pageSize) {
|
SizeChange(page, pageSize) {
|
||||||
this.pageSize = pageSize
|
this.pageSize = pageSize
|
||||||
this.replacePage()
|
this.replacePage()
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -237,6 +233,7 @@
|
|||||||
height: 38px;
|
height: 38px;
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page {
|
.page {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
|||||||
@@ -0,0 +1,154 @@
|
|||||||
|
<template>
|
||||||
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :md="12" :sm="8" v-for="(item,index) in searchList" :key="index" style="line-height: 48px">
|
||||||
|
<template>
|
||||||
|
<div class="box-title-text" v-if="item.field_show_type == '1'">
|
||||||
|
<div class="title-text" :title="item.db_field_txt">
|
||||||
|
<span>{{item.db_field_txt}}</span>
|
||||||
|
</div>
|
||||||
|
<a-input class="box-input" :placeholder="$t('PleaseEnter')+item.db_field_txt"
|
||||||
|
v-model="queryParam[item.db_field_name]"></a-input>
|
||||||
|
</div>
|
||||||
|
<div class="box-title-text" v-if="item.field_show_type == '2'">
|
||||||
|
<div class="title-text" :title="item.db_field_txt">
|
||||||
|
<span>{{item.db_field_txt}}</span>
|
||||||
|
</div>
|
||||||
|
<a-input-number class="box-input" :placeholder="$t('PleaseEnter')+item.db_field_txt"
|
||||||
|
v-model="queryParam[item.db_field_name]" :min="1" :max="99999999"/>
|
||||||
|
</div>
|
||||||
|
<div class="box-title-text" v-else-if="item.field_show_type == '3'">
|
||||||
|
<div class="title-text" :title="item.db_field_txt">
|
||||||
|
<span>{{item.db_field_txt}}</span>
|
||||||
|
</div>
|
||||||
|
<j-multi-select-tag class="box-input" v-model="queryParam[item.db_field_name]"
|
||||||
|
:placeholder="$t('PleaseSelect')+item.db_field_txt" :type="'select'"
|
||||||
|
:triggerChange="false" :dictCode="item.dict_field"/>
|
||||||
|
</div>
|
||||||
|
<div class="box-title-text" v-else-if="item.field_show_type == '6'">
|
||||||
|
<div class="title-text" :title="item.db_field_txt">
|
||||||
|
<span>{{item.db_field_txt}}</span>
|
||||||
|
</div>
|
||||||
|
<a-range-picker class="box-input" v-model="queryParam[item.db_field_name]"
|
||||||
|
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||||
|
@change="onChange(item.db_field_name)"></a-range-picker>
|
||||||
|
</div>
|
||||||
|
<div class="box-title-text" v-else-if="item.field_show_type == '5'">
|
||||||
|
<div class="title-text" :title="item.db_field_txt">
|
||||||
|
<span>{{item.db_field_txt}}</span>
|
||||||
|
</div>
|
||||||
|
<a-date-picker class="box-input"
|
||||||
|
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||||
|
@change="dateChange(item.db_field_name)"
|
||||||
|
v-model="queryParam[item.db_field_name]"/>
|
||||||
|
</div>
|
||||||
|
<div class="box-title-text" v-else-if="item.field_show_type == '4'">
|
||||||
|
<div class="title-text" :title="item.db_field_txt">
|
||||||
|
<span>{{item.db_field_txt}}</span>
|
||||||
|
</div>
|
||||||
|
<j-dict-select-tag class="box-input" v-model="queryParam[item.db_field_name]"
|
||||||
|
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||||
|
:type="'select'"
|
||||||
|
:triggerChange="false" :dictCode="item.dict_field"/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</a-col>
|
||||||
|
<span style="float: right;overflow: hidden;margin-right: 41px;margin-bottom: 20px" class="table-page-search-submitButtons">
|
||||||
|
<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>
|
||||||
|
</span>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import moment from 'moment'
|
||||||
|
import { getAction } from '@/api/manage'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'index',
|
||||||
|
props: {
|
||||||
|
url: {
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
},
|
||||||
|
flag: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
queryParam: {},
|
||||||
|
toggleSearchStatus: false,
|
||||||
|
searchList: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getSeach()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
searchQuery() {
|
||||||
|
this.$emit('searchQuery', this.queryParam)
|
||||||
|
},
|
||||||
|
searchReset() {
|
||||||
|
this.queryParam = {}
|
||||||
|
this.$emit('searchReset', this.queryParam)
|
||||||
|
},
|
||||||
|
getSeach() {
|
||||||
|
let params = {
|
||||||
|
flag: this.flag
|
||||||
|
}
|
||||||
|
getAction(this.url.seachList, params).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.searchList = res.result
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
dateChange(item) {
|
||||||
|
this.queryParam[item] = moment(this.queryParam[item]).format('YYYY-MM-DD')
|
||||||
|
},
|
||||||
|
onChange(item) {
|
||||||
|
let dateOne = moment(this.queryParam[item][0]).format('YYYY-MM-DD')
|
||||||
|
let dateTwo = moment(this.queryParam[item][1]).format('YYYY-MM-DD')
|
||||||
|
this.queryParam[item] = [dateOne, dateTwo]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.box-title-text {
|
||||||
|
line-height: 1.4;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text {
|
||||||
|
width: 20%;
|
||||||
|
min-width: 90px;
|
||||||
|
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;
|
||||||
|
/*margin-top: 2px;*/
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -156,7 +156,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||||
<Standardselection :query="item"
|
<Standardselection :query="item"
|
||||||
|
@change="StandardselectionChange"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
|
:replace_standard_id="formInline.replace_standard_id"
|
||||||
v-model="formInline[item.db_field_name]"/>
|
v-model="formInline[item.db_field_name]"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
@@ -475,7 +477,10 @@
|
|||||||
},
|
},
|
||||||
add() {
|
add() {
|
||||||
this.formInline = {}
|
this.formInline = {}
|
||||||
}
|
},
|
||||||
|
StandardselectionChange(id){
|
||||||
|
this.formInline.replace_standard_id = id
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -105,7 +105,6 @@
|
|||||||
getAction(this.url.seachList, params).then((res) => {
|
getAction(this.url.seachList, params).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.searchList = res.result
|
this.searchList = res.result
|
||||||
console.log(this.searchList)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user