|
|
|
@ -0,0 +1,399 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<a-card :bordered="false" :bodyStyle="tstyle">
|
|
|
|
|
<div
|
|
|
|
|
class="table-page-search-wrapper"
|
|
|
|
|
:class="advanced ? 'Open' : 'Close'"
|
|
|
|
|
>
|
|
|
|
|
<a-form layout="inline">
|
|
|
|
|
<a-row :gutter="48">
|
|
|
|
|
<a-col :md="18">
|
|
|
|
|
<a-row :gutter="48">
|
|
|
|
|
<a-col
|
|
|
|
|
:md="8"
|
|
|
|
|
:sm="16"
|
|
|
|
|
v-for="item in ColumnsQuery"
|
|
|
|
|
:key="`${item.dataIndex}1`"
|
|
|
|
|
v-show="item.dataIndex != 'itemName' && item.dataIndex != 'remark'"
|
|
|
|
|
>
|
|
|
|
|
<a-form-item :label="item.title">
|
|
|
|
|
<a-select
|
|
|
|
|
show-search
|
|
|
|
|
style="width: 200px"
|
|
|
|
|
:default-active-first-option="false"
|
|
|
|
|
:show-arrow="false"
|
|
|
|
|
:filter-option="false"
|
|
|
|
|
:not-found-content="null"
|
|
|
|
|
@search="tenantIdSearch"
|
|
|
|
|
v-model="queryParam.customerId"
|
|
|
|
|
allow-clear
|
|
|
|
|
v-if="item.title == '客户'"
|
|
|
|
|
:style="{ width: '100%' }"
|
|
|
|
|
>
|
|
|
|
|
<a-select-option v-for="itemS in TenantData" :key="itemS.id" :value="itemS.id">
|
|
|
|
|
{{ itemS.shortName }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
<a-select
|
|
|
|
|
v-model="queryParam.paraCode"
|
|
|
|
|
v-else-if="item.title == '客户参数类别'"
|
|
|
|
|
allow-clear
|
|
|
|
|
>
|
|
|
|
|
<a-select-option v-for="(item1) in WTypeData" :key="item1.id" :value="item1.paraCode">
|
|
|
|
|
{{ item1.paraName }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :md="6" :sm="24">
|
|
|
|
|
<span class="table-page-search-submitButtons">
|
|
|
|
|
<a-button type="primary" @click="FnGetData">查询</a-button>
|
|
|
|
|
<a-button style="margin-left: 8px" @click="init">重置</a-button>
|
|
|
|
|
</span>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
</a-form>
|
|
|
|
|
</div>
|
|
|
|
|
</a-card>
|
|
|
|
|
<a-card :bordered="false">
|
|
|
|
|
<vxe-toolbar>
|
|
|
|
|
<template #buttons>
|
|
|
|
|
<div class="nav-box">
|
|
|
|
|
<div class="nav" @click="handleAdd"><i class="iconfont icon-jiahao2fill"></i>新建</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</vxe-toolbar>
|
|
|
|
|
<vxe-table
|
|
|
|
|
:data="loadData"
|
|
|
|
|
stripe
|
|
|
|
|
resizable
|
|
|
|
|
round
|
|
|
|
|
:loading="loading"
|
|
|
|
|
empty-text="没有更多数据了!">
|
|
|
|
|
<vxe-column type="seq" width="40" fixed="left"></vxe-column>
|
|
|
|
|
<vxe-column
|
|
|
|
|
v-for="item in columns"
|
|
|
|
|
:key="`${item.dataIndex}3`"
|
|
|
|
|
:field="item.dataIndex"
|
|
|
|
|
:min-width="item.width"
|
|
|
|
|
:title="item.title"
|
|
|
|
|
:align="item.align"
|
|
|
|
|
>
|
|
|
|
|
</vxe-column>
|
|
|
|
|
<vxe-column title="操作" fixed="right" width="200" align="center">
|
|
|
|
|
<template #default="{ row }">
|
|
|
|
|
<vxe-button type="text" @click="$refs.editForm.edit(row)">
|
|
|
|
|
<a-icon type="form" :style="{ color: '#13c2c2' }" />
|
|
|
|
|
</vxe-button>
|
|
|
|
|
<a-popconfirm
|
|
|
|
|
title="请确认删除?"
|
|
|
|
|
ok-text="是"
|
|
|
|
|
cancel-text="否"
|
|
|
|
|
@confirm="
|
|
|
|
|
e => {
|
|
|
|
|
confirm(e, row)
|
|
|
|
|
}
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
<a-icon type="delete" :style="{ color: '#13c2c2' }" />
|
|
|
|
|
</a-popconfirm>
|
|
|
|
|
</template>
|
|
|
|
|
</vxe-column>
|
|
|
|
|
</vxe-table>
|
|
|
|
|
<vxe-pager
|
|
|
|
|
:loading="loading"
|
|
|
|
|
:current-page="queryParam.pageNo"
|
|
|
|
|
:page-size="queryParam.pageSize"
|
|
|
|
|
:total="queryParam.totalResult"
|
|
|
|
|
:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
|
|
|
|
|
@page-change="handlePageChange"
|
|
|
|
|
>
|
|
|
|
|
</vxe-pager>
|
|
|
|
|
<add-form ref="addForm" @ok="handleOk" />
|
|
|
|
|
<edit-form ref="editForm" @ok="handleOk" />
|
|
|
|
|
</a-card>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import {
|
|
|
|
|
DJYTenantParamDeleteParamValue,
|
|
|
|
|
PageParamValue,
|
|
|
|
|
ParamList,
|
|
|
|
|
deleteParamValue
|
|
|
|
|
} from '@/api/modular/main/DJYTenantParam'
|
|
|
|
|
import { DjyCustomerSuggest } from '@/api/modular/main/BookingLedger'
|
|
|
|
|
import addForm from './addItemForm.vue'
|
|
|
|
|
import editForm from './editItemForm.vue'
|
|
|
|
|
import columnSetting from '@/components/tableColumnSetting'
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
addForm,
|
|
|
|
|
editForm,
|
|
|
|
|
columnSetting
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
TypeData: [],
|
|
|
|
|
WTypeData: [],
|
|
|
|
|
advanced: false,
|
|
|
|
|
loading: false,
|
|
|
|
|
setVisible: false,
|
|
|
|
|
setVisible1: false,
|
|
|
|
|
queryParam: {
|
|
|
|
|
pageNo: 1,
|
|
|
|
|
pageSize: 10
|
|
|
|
|
},
|
|
|
|
|
ColumnsQuery: [],
|
|
|
|
|
customerQuery:"",
|
|
|
|
|
columns: [
|
|
|
|
|
{
|
|
|
|
|
title: '客户',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: '80',
|
|
|
|
|
dataIndex: 'customerName'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '客户参数类别',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: '100',
|
|
|
|
|
dataIndex: 'paraName'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '客户参数名称',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: '80',
|
|
|
|
|
dataIndex: 'itemName'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '备注',
|
|
|
|
|
align: 'center',
|
|
|
|
|
width: '80',
|
|
|
|
|
dataIndex: 'remark'
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
|
|
|
|
|
loadData: [],
|
|
|
|
|
TenantData: [],
|
|
|
|
|
YWData: []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
'$route.query': {
|
|
|
|
|
immediate: true,
|
|
|
|
|
handler(nval, oval) {
|
|
|
|
|
if (this.$route.name === 'customerParam') {
|
|
|
|
|
this.init()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {},
|
|
|
|
|
mounted() {
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
tenantIdSearch(value) {
|
|
|
|
|
if (value) {
|
|
|
|
|
DjyCustomerSuggest({ type: 'consignor', keyword: value }).then(res => {
|
|
|
|
|
this.TenantData = res.data.rows
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
toggleAdvanced() {
|
|
|
|
|
this.advanced = !this.advanced
|
|
|
|
|
},
|
|
|
|
|
init() {
|
|
|
|
|
Object.assign(this.$data, this.$options.data())
|
|
|
|
|
this.ColumnsQuery = this.columns
|
|
|
|
|
this.FnGetData()
|
|
|
|
|
this.customerQuery = ''
|
|
|
|
|
ParamList().then(res => {
|
|
|
|
|
this.WTypeData = res.data
|
|
|
|
|
})
|
|
|
|
|
DjyCustomerSuggest({ type: 'consignor' }).then(res => {
|
|
|
|
|
this.TenantData = res.data.rows
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
initQuery(row) {
|
|
|
|
|
Object.assign(this.$data, this.$options.data())
|
|
|
|
|
this.ColumnsQuery = this.columns
|
|
|
|
|
this.queryParam.customerId = row.id
|
|
|
|
|
this.customerQuery = row.id
|
|
|
|
|
this.FnGetData()
|
|
|
|
|
ParamList().then(res => {
|
|
|
|
|
this.WTypeData = res.data
|
|
|
|
|
})
|
|
|
|
|
DjyCustomerSuggest({ type: 'consignor' }).then(res => {
|
|
|
|
|
this.TenantData = res.data.rows
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handlePageChange({ currentPage, pageSize }) {
|
|
|
|
|
this.queryParam.pageNo = currentPage
|
|
|
|
|
this.queryParam.pageSize = pageSize
|
|
|
|
|
this.FnGetData()
|
|
|
|
|
},
|
|
|
|
|
FnGetData() {
|
|
|
|
|
this.loading = true
|
|
|
|
|
const data = { ...this.queryParam }
|
|
|
|
|
PageParamValue(data).then(res => {
|
|
|
|
|
this.loadData = res.data.items
|
|
|
|
|
this.loading = false
|
|
|
|
|
this.queryParam.pageNo = res.data.pageIndex
|
|
|
|
|
this.queryParam.pageSize = res.data.pageSize
|
|
|
|
|
this.queryParam.totalResult = res.data.totalCount
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
/**
|
|
|
|
|
* 查询参数组装
|
|
|
|
|
*/
|
|
|
|
|
switchingDate() {
|
|
|
|
|
const obj = JSON.parse(JSON.stringify(this.queryParam))
|
|
|
|
|
return obj
|
|
|
|
|
},
|
|
|
|
|
confirm(e, data) {
|
|
|
|
|
this.DJYTenantParamDeleteParamValue(data)
|
|
|
|
|
},
|
|
|
|
|
handleAdd() {
|
|
|
|
|
const data = this.customerQuery ? this.customerQuery : ''
|
|
|
|
|
this.$refs.addForm.add(data)
|
|
|
|
|
},
|
|
|
|
|
DJYTenantParamDeleteParamValue(record) {
|
|
|
|
|
deleteParamValue({ id: record.id }).then(res => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
this.$message.success('删除成功')
|
|
|
|
|
this.FnGetData()
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(`删除失败,${res.message}`)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handleOk() {
|
|
|
|
|
this.FnGetData()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="less">
|
|
|
|
|
.table-operator {
|
|
|
|
|
margin-bottom: 18px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
button {
|
|
|
|
|
margin-right: 8px;
|
|
|
|
|
}
|
|
|
|
|
.Open {
|
|
|
|
|
}
|
|
|
|
|
.Close {
|
|
|
|
|
height: 45px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
.vxe-table--render-default .vxe-body--row.row--stripe {
|
|
|
|
|
background: #f5f9fe;
|
|
|
|
|
}
|
|
|
|
|
.ant-card-body {
|
|
|
|
|
padding-top: 10px;
|
|
|
|
|
}
|
|
|
|
|
.nav-box {
|
|
|
|
|
padding: 0 10px;
|
|
|
|
|
|
|
|
|
|
.nav {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
margin-right: 8px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
border: 1px solid rgba(255, 255, 255, 0);
|
|
|
|
|
padding: 0 10px;
|
|
|
|
|
height: 28px;
|
|
|
|
|
line-height: 26px;
|
|
|
|
|
|
|
|
|
|
.iconfont {
|
|
|
|
|
margin-right: 6px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
border: 1px solid rgba(255, 255, 255, 0);
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:nth-of-type(1) {
|
|
|
|
|
.iconfont {
|
|
|
|
|
color: #1d8aff;
|
|
|
|
|
}
|
|
|
|
|
&:hover {
|
|
|
|
|
background: #fff;
|
|
|
|
|
box-shadow: 0 0 10px #eee;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:nth-of-type(2) {
|
|
|
|
|
.iconfont {
|
|
|
|
|
color: #865ef8;
|
|
|
|
|
}
|
|
|
|
|
&:hover {
|
|
|
|
|
background: #fff;
|
|
|
|
|
box-shadow: 0 0 10px #eee;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:nth-of-type(3) {
|
|
|
|
|
.iconfont {
|
|
|
|
|
color: #ff9702;
|
|
|
|
|
}
|
|
|
|
|
&:hover {
|
|
|
|
|
background: #fff;
|
|
|
|
|
box-shadow: 0 0 10px #eee;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:nth-of-type(4) {
|
|
|
|
|
.iconfont {
|
|
|
|
|
color: #1d8aff;
|
|
|
|
|
}
|
|
|
|
|
&:hover {
|
|
|
|
|
background: #fff;
|
|
|
|
|
box-shadow: 0 0 10px #eee;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:nth-of-type(5) {
|
|
|
|
|
.iconfont {
|
|
|
|
|
color: #ff1062;
|
|
|
|
|
}
|
|
|
|
|
&:hover {
|
|
|
|
|
background: #fff;
|
|
|
|
|
box-shadow: 0 0 10px #eee;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:nth-of-type(6) {
|
|
|
|
|
.iconfont {
|
|
|
|
|
color: #1ebeca;
|
|
|
|
|
}
|
|
|
|
|
&:hover {
|
|
|
|
|
background: #fff;
|
|
|
|
|
box-shadow: 0 0 10px #eee;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:nth-of-type(7) {
|
|
|
|
|
.iconfont {
|
|
|
|
|
color: #82c93d;
|
|
|
|
|
}
|
|
|
|
|
&:hover {
|
|
|
|
|
background: #fff;
|
|
|
|
|
box-shadow: 0 0 10px #eee;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:nth-of-type(8) {
|
|
|
|
|
.iconfont {
|
|
|
|
|
color: #1d8aff;
|
|
|
|
|
}
|
|
|
|
|
&:hover {
|
|
|
|
|
background: #fff;
|
|
|
|
|
box-shadow: 0 0 10px #eee;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|