dev
张同海 2 years ago
parent b665ea41e8
commit 05d7977822

@ -153,3 +153,15 @@ export function DJYTenantParamDeleteParamItem(parameter) {
params: parameter
})
}
/**
* 分页查询租户
*
* @author Myshipping
*/
export function SysTenantPage(parameter) {
return axios({
url: '/sysTenant/page',
method: 'get',
params: parameter
})
}

@ -25,7 +25,8 @@ const constantRouterComponents = {
OrderList: () => import('@/views/Booking/OrderList/index'),
// 默认首页
Console: () => import('@/views/system/index/welcome'),
BookingDetail: () => import('@/views/main/BookingLedger/detail')
BookingDetail: () => import('@/views/main/BookingLedger/detail'),
CustomerInformationManagementAdd: () => import('@/views/main/Customer/addForm')
}
// 前端未找到页面路由(固定不用改)、原来为 /404
@ -164,6 +165,17 @@ const booking = [
show: false
},
component: 'BookingDetail'
},
{
name: 'CustomerInformationManagementAdd',
path: '/CustomerInformationManagementAdd',
pid: 0,
id: 10031,
meta: {
title: '新增客户',
show: false
},
component: 'CustomerInformationManagementAdd'
}
]

@ -361,6 +361,9 @@ export default {
this.activeKey = activeKey
},
TabsAdd() {
// CustomerInformationManagementAdd
// this.$router.push({ name: 'CustomerInformationManagementAdd' })
// this.$router.push({ name: 'CustomerInformationManagementAdd', query: { type: this.carrierRadio } })
let activeKey = this.panes.length + 1
this.panes.push({
title: '新增客户',

@ -10,28 +10,60 @@
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row>
<a-col :span="8">
<a-form-item label="租户" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select
show-search
v-decorator="['tenantId', { rules: [{ required: true, message: '请选择租户!' }] }]"
placeholder="请选择租户"
style="width: 200px"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
@search="tenantIdSearch"
>
<a-select-option v-for="item in TenantData" :key="item.id" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="租户参数类别" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select
placeholder="请选择租户参数类别"
v-decorator="['typeCode', { rules: [{ required: true, message: '请选择租户参数类别!' }] }]"
v-decorator="['paraCode', { rules: [{ required: true, message: '请选择租户参数类别!' }] }]"
@change="FnChangeTypeCode"
>
<a-select-option v-for="item in TypeData" :key="item.id" :value="item.id">
<a-select-option v-for="item in TypeData" :key="item.id" :value="item.paraCode">
{{ item.paraCode }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="租户参数名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-form-item label="租户参数名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback disabled>
<a-input
placeholder="请输入租户参数名称"
v-decorator="['itemCode', { rules: [{ required: true, message: '请输入租户参数名称!' }] }]"
:disabled="ItemCodeDisabled"
v-if="ItemData.length == 0"
/>
<a-select
placeholder="请选择租户参数名称"
v-decorator="['itemCode', { rules: [{ required: true, message: '请选择租户参数名称!' }] }]"
:disabled="ItemCodeDisabled"
v-else
>
<a-select-option v-for="item in ItemData" :key="item.id" :value="item.itemCode">
{{ item.itemName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-col :span="24">
<a-form-item label="备注" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-input placeholder="请输入备注" v-decorator="['remark']" />
</a-form-item>
</a-col>
@ -42,18 +74,23 @@
</template>
<script>
import { DJYTenantParamAddParamValue, DJYTenantParamGet } from '@/api/modular/main/DJYTenantParam'
import {
DJYTenantParamAddParamValue,
DJYTenantParamGet,
SysTenantPage,
DJYTenantParamGetParamItem
} from '@/api/modular/main/DJYTenantParam'
export default {
data() {
return {
TypeData: [],
labelCol: {
xs: { span: 24 },
sm: { span: 7 }
sm: { span: 9 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 15 }
sm: { span: 14 }
},
labelCol2: {
xs: { span: 24 },
@ -61,12 +98,15 @@ export default {
},
wrapperCol2: {
xs: { span: 24 },
sm: { span: 21 }
sm: { span: 20 }
},
typeData: [],
visible: false,
confirmLoading: false,
form: this.$form.createForm(this)
form: this.$form.createForm(this),
TenantData: [],
ItemData: [],
ItemCodeDisabled: true
}
},
mounted() {
@ -76,6 +116,22 @@ export default {
})
},
methods: {
FnChangeTypeCode(e) {
if (e) {
this.ItemCodeDisabled = false
DJYTenantParamGetParamItem({ paraCode: e }).then(res => {
this.ItemData = res.data
console.log(res.data)
})
}
},
tenantIdSearch(value) {
if (value) {
SysTenantPage({ pageNo: 1, pageSize: 9999, name: value }).then(res => {
this.TenantData = res.data.rows
})
}
},
//
add(record) {
this.visible = true

@ -11,31 +11,55 @@
<a-form :form="form">
<a-row>
<a-col :span="8">
<a-form-item label="租户参数类别" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-form-item label="租户" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select
placeholder="请选择租户参数类别"
v-decorator="['typeCode', { rules: [{ required: true, message: '请选择租户参数类别!' }] }]"
show-search
v-decorator="['tenantId', { rules: [{ required: true, message: '请选择租户!' }] }]"
placeholder="请选择租户"
style="width: 200px"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
@search="tenantIdSearch"
>
<a-select-option v-for="item in TypeData" :key="item.id" :value="item.id">
{{ item.paraCode }}
<a-select-option v-for="item in TenantData" :key="item.id" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="账号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入账号"
v-decorator="['account', { rules: [{ required: true, message: '请输入账号!' }] }]"
/>
<a-form-item label="租户参数类别" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select
placeholder="请选择租户参数类别"
v-decorator="['paraCode', { rules: [{ required: true, message: '请选择租户参数类别!' }] }]"
@change="FnChangeTypeCode"
>
<a-select-option v-for="item in TypeData" :key="item.id" :value="item.paraCode">
{{ item.paraCode }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="密码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-form-item label="租户参数名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback disabled>
<a-input
placeholder="请输入密码"
v-decorator="['password', { rules: [{ required: true, message: '请输入密码!' }] }]"
placeholder="请输入租户参数名称"
v-decorator="['itemCode', { rules: [{ required: true, message: '请输入租户参数名称!' }] }]"
:disabled="ItemCodeDisabled"
v-if="ItemData.length == 0"
/>
<a-select
placeholder="请选择租户参数名称"
v-decorator="['itemCode', { rules: [{ required: true, message: '请选择租户参数名称!' }] }]"
:disabled="ItemCodeDisabled"
v-else
>
<a-select-option v-for="item in ItemData" :key="item.id" :value="item.itemCode">
{{ item.itemName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="19">
@ -50,7 +74,12 @@
</template>
<script>
import { DJYTenantParamEditParamValue, DJYTenantParamGet } from '@/api/modular/main/DJYTenantParam'
import {
DJYTenantParamEditParamValue,
DJYTenantParamGet,
SysTenantPage,
DJYTenantParamGetParamItem
} from '@/api/modular/main/DJYTenantParam'
export default {
data() {
return {
@ -75,7 +104,10 @@ export default {
visible: false,
confirmLoading: false,
form: this.$form.createForm(this),
data: {}
data: {},
TenantData: [],
ItemData: [],
ItemCodeDisabled: true
}
},
mounted() {
@ -85,6 +117,22 @@ export default {
})
},
methods: {
FnChangeTypeCode(e) {
if (e) {
this.ItemCodeDisabled = false
DJYTenantParamGetParamItem({ paraCode: e }).then(res => {
this.ItemData = res.data
console.log(res.data)
})
}
},
tenantIdSearch(value) {
if (value) {
SysTenantPage({ pageNo: 1, pageSize: 9999, name: value }).then(res => {
this.TenantData = res.data.rows
})
}
},
//
edit(record) {
this.data = record
@ -94,9 +142,9 @@ export default {
this.typeData = typeOption.filters['dictData']('edi_type')
setTimeout(() => {
this.form.setFieldsValue({
typeCode: record.typeCode,
account: record.account,
password: record.password,
paraCode: record.paraCode,
itemCode: record.itemCode,
itemName: record.itemName,
remark: record.remark
})
console.log(this.form.getFieldsValue())

@ -10,9 +10,38 @@
<a-row :gutter="48">
<a-col :md="18">
<a-row :gutter="48">
<a-col :md="8" :sm="24" v-for="item in ColumnsQuery" :key="`${item.dataIndex}1`">
<a-col :md="8" :sm="16" v-for="item in ColumnsQuery" :key="`${item.dataIndex}1`">
<a-form-item :label="item.title">
<a-input v-model="queryParam[item.dataIndex]" allow-clear :placeholder="`请输入${item.title}`" />
<!-- <a-input
v-model="queryParam[item.dataIndex]"
allow-clear
:placeholder="`请输入${item.title}`"
v-if="item.title == '租户'"
/> -->
<a-select
show-search
placeholder="请选择租户"
style="width: 200px"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
@search="tenantIdSearch"
v-model="queryParam[item.dataIndex]"
allow-clear
v-if="item.title == '租户'"
:style="{ width: '100%' }"
>
<a-select-option v-for="item in TenantData" :key="item.id" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
<a-input
v-model="queryParam[item.dataIndex]"
allow-clear
:placeholder="`请输入${item.title}`"
v-else
/>
</a-form-item>
</a-col>
</a-row>
@ -48,6 +77,7 @@
:min-width="item.width"
:title="item.title"
:align="item.align"
v-if="item.title != '租户'"
>
<template #default="{ row }" v-if="item.title == '类型'">
<span>{{ FnTurnD(row.typeCode) }}</span>
@ -86,7 +116,11 @@
</div>
</template>
<script>
import { DJYTenantParamGetParamValue, DJYTenantParamDeleteParamValue } from '@/api/modular/main/DJYTenantParam'
import {
DJYTenantParamGetParamValue,
SysTenantPage,
DJYTenantParamDeleteParamValue
} from '@/api/modular/main/DJYTenantParam'
import { sysDictDataPage } from '@/api/modular/system/dictDataManage'
import addForm from './addItemForm.vue'
import editForm from './editItemForm.vue'
@ -108,11 +142,16 @@ export default {
queryParam: {
currentPage: 1,
pageSize: 10,
totalResult: 1,
tenantId: 0
totalResult: 1
},
ColumnsQuery: [],
columns: [
{
title: '租户',
align: 'center',
width: '80',
dataIndex: 'tenantId'
},
{
title: '租户参数类别',
align: 'center',
@ -135,7 +174,8 @@ export default {
],
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
// Promise
loadData: {}
loadData: {},
TenantData: []
}
},
created() {},
@ -147,6 +187,13 @@ export default {
})
},
methods: {
tenantIdSearch(value) {
if (value) {
SysTenantPage({ pageNo: 1, pageSize: 9999, name: value }).then(res => {
this.TenantData = res.data.rows
})
}
},
FnTurnD(data) {
let Rdata = ''
this.TypeData.forEach(item => {
@ -171,7 +218,11 @@ export default {
},
FnGetData() {
this.loading = true
DJYTenantParamGetParamValue(this.queryParam).then(res => {
let data = { ...this.queryParam }
if (!data.tenantId) {
data.tenantId = 0
}
DJYTenantParamGetParamValue(data).then(res => {
this.loadData = res.data
this.loading = false
this.queryParam.currentPage = res.data.pageNo

@ -25,8 +25,8 @@
@cell-dblclick="cellDBLClickEvent"
>
<vxe-column type="seq" width="60"></vxe-column>
<vxe-column field="itemCode" title="租户参数"></vxe-column>
<!-- <vxe-column field="sex" title="Sex" :formatter="formatterSex"></vxe-column> -->
<vxe-column field="itemName" title="选项名称"></vxe-column>
<vxe-column field="itemCode" title="选项代码"></vxe-column>
<vxe-column field="remark" title="备注"></vxe-column>
<vxe-column title="操作" width="120" show-overflow>
<template #default="{ row }">
@ -47,14 +47,19 @@
>
<template #default>
<vxe-form :data="formData" :rules="formRules" title-align="right" title-width="100" @submit="submitEvent">
<vxe-form-item field="itemCode" title="租户参数" :span="12" :item-render="{}">
<vxe-form-item field="itemName" title="选项名称:" :span="12" :item-render="{}">
<template #default="{ data }">
<vxe-input v-model="data.itemCode" placeholder="请输入租户参数"></vxe-input>
<vxe-input v-model="data.itemName" placeholder="请输入选项名称"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item field="remark" title="备注" :span="12" :item-render="{}">
<vxe-form-item field="itemCode" title="选项代码:" :span="12" :item-render="{}">
<template #default="{ data }">
<vxe-input v-model="data.remark" placeholder="请输入备注"></vxe-input>
<vxe-input v-model="data.itemCode" placeholder="请输入选项代码"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item field="remark" title="备注:" :span="24" :item-render="{}">
<template #default="{ data }">
<vxe-textarea v-model="data.remark" placeholder="请输入备注"></vxe-textarea>
</template>
</vxe-form-item>
<vxe-form-item align="center" title-align="left" :span="24">

Loading…
Cancel
Save