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

@ -153,3 +153,15 @@ export function DJYTenantParamDeleteParamItem(parameter) {
params: 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'), OrderList: () => import('@/views/Booking/OrderList/index'),
// 默认首页 // 默认首页
Console: () => import('@/views/system/index/welcome'), 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 // 前端未找到页面路由(固定不用改)、原来为 /404
@ -164,6 +165,17 @@ const booking = [
show: false show: false
}, },
component: 'BookingDetail' 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 this.activeKey = activeKey
}, },
TabsAdd() { TabsAdd() {
// CustomerInformationManagementAdd
// this.$router.push({ name: 'CustomerInformationManagementAdd' })
// this.$router.push({ name: 'CustomerInformationManagementAdd', query: { type: this.carrierRadio } })
let activeKey = this.panes.length + 1 let activeKey = this.panes.length + 1
this.panes.push({ this.panes.push({
title: '新增客户', title: '新增客户',

@ -10,28 +10,60 @@
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form :form="form"> <a-form :form="form">
<a-row> <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-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 <a-select
placeholder="请选择租户参数类别" 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 }} {{ item.paraCode }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <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 <a-input
placeholder="请输入租户参数名称" placeholder="请输入租户参数名称"
v-decorator="['itemCode', { rules: [{ required: true, message: '请输入租户参数名称!' }] }]" 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-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="24">
<a-form-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> <a-form-item label="备注" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-input placeholder="请输入备注" v-decorator="['remark']" /> <a-input placeholder="请输入备注" v-decorator="['remark']" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -42,18 +74,23 @@
</template> </template>
<script> <script>
import { DJYTenantParamAddParamValue, DJYTenantParamGet } from '@/api/modular/main/DJYTenantParam' import {
DJYTenantParamAddParamValue,
DJYTenantParamGet,
SysTenantPage,
DJYTenantParamGetParamItem
} from '@/api/modular/main/DJYTenantParam'
export default { export default {
data() { data() {
return { return {
TypeData: [], TypeData: [],
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 7 } sm: { span: 9 }
}, },
wrapperCol: { wrapperCol: {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 15 } sm: { span: 14 }
}, },
labelCol2: { labelCol2: {
xs: { span: 24 }, xs: { span: 24 },
@ -61,12 +98,15 @@ export default {
}, },
wrapperCol2: { wrapperCol2: {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 21 } sm: { span: 20 }
}, },
typeData: [], typeData: [],
visible: false, visible: false,
confirmLoading: false, confirmLoading: false,
form: this.$form.createForm(this) form: this.$form.createForm(this),
TenantData: [],
ItemData: [],
ItemCodeDisabled: true
} }
}, },
mounted() { mounted() {
@ -76,6 +116,22 @@ export default {
}) })
}, },
methods: { 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) { add(record) {
this.visible = true this.visible = true

@ -11,31 +11,55 @@
<a-form :form="form"> <a-form :form="form">
<a-row> <a-row>
<a-col :span="8"> <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 <a-select
placeholder="请选择租户参数类别" show-search
v-decorator="['typeCode', { rules: [{ required: true, message: '请选择租户参数类别!' }] }]" 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"> <a-select-option v-for="item in TenantData" :key="item.id" :value="item.id">
{{ item.paraCode }} {{ item.name }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <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-input <a-select
placeholder="请输入账号" placeholder="请选择租户参数类别"
v-decorator="['account', { 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.paraCode">
{{ item.paraCode }}
</a-select-option>
</a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <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 <a-input
placeholder="请输入密码" placeholder="请输入租户参数名称"
v-decorator="['password', { rules: [{ required: true, message: '请输入密码!' }] }]" 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-form-item>
</a-col> </a-col>
<a-col :span="19"> <a-col :span="19">
@ -50,7 +74,12 @@
</template> </template>
<script> <script>
import { DJYTenantParamEditParamValue, DJYTenantParamGet } from '@/api/modular/main/DJYTenantParam' import {
DJYTenantParamEditParamValue,
DJYTenantParamGet,
SysTenantPage,
DJYTenantParamGetParamItem
} from '@/api/modular/main/DJYTenantParam'
export default { export default {
data() { data() {
return { return {
@ -75,7 +104,10 @@ export default {
visible: false, visible: false,
confirmLoading: false, confirmLoading: false,
form: this.$form.createForm(this), form: this.$form.createForm(this),
data: {} data: {},
TenantData: [],
ItemData: [],
ItemCodeDisabled: true
} }
}, },
mounted() { mounted() {
@ -85,6 +117,22 @@ export default {
}) })
}, },
methods: { 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) { edit(record) {
this.data = record this.data = record
@ -94,9 +142,9 @@ export default {
this.typeData = typeOption.filters['dictData']('edi_type') this.typeData = typeOption.filters['dictData']('edi_type')
setTimeout(() => { setTimeout(() => {
this.form.setFieldsValue({ this.form.setFieldsValue({
typeCode: record.typeCode, paraCode: record.paraCode,
account: record.account, itemCode: record.itemCode,
password: record.password, itemName: record.itemName,
remark: record.remark remark: record.remark
}) })
console.log(this.form.getFieldsValue()) console.log(this.form.getFieldsValue())

@ -10,9 +10,38 @@
<a-row :gutter="48"> <a-row :gutter="48">
<a-col :md="18"> <a-col :md="18">
<a-row :gutter="48"> <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-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-form-item>
</a-col> </a-col>
</a-row> </a-row>
@ -48,6 +77,7 @@
:min-width="item.width" :min-width="item.width"
:title="item.title" :title="item.title"
:align="item.align" :align="item.align"
v-if="item.title != '租户'"
> >
<template #default="{ row }" v-if="item.title == '类型'"> <template #default="{ row }" v-if="item.title == '类型'">
<span>{{ FnTurnD(row.typeCode) }}</span> <span>{{ FnTurnD(row.typeCode) }}</span>
@ -86,7 +116,11 @@
</div> </div>
</template> </template>
<script> <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 { sysDictDataPage } from '@/api/modular/system/dictDataManage'
import addForm from './addItemForm.vue' import addForm from './addItemForm.vue'
import editForm from './editItemForm.vue' import editForm from './editItemForm.vue'
@ -108,11 +142,16 @@ export default {
queryParam: { queryParam: {
currentPage: 1, currentPage: 1,
pageSize: 10, pageSize: 10,
totalResult: 1, totalResult: 1
tenantId: 0
}, },
ColumnsQuery: [], ColumnsQuery: [],
columns: [ columns: [
{
title: '租户',
align: 'center',
width: '80',
dataIndex: 'tenantId'
},
{ {
title: '租户参数类别', title: '租户参数类别',
align: 'center', align: 'center',
@ -135,7 +174,8 @@ export default {
], ],
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' }, tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
// Promise // Promise
loadData: {} loadData: {},
TenantData: []
} }
}, },
created() {}, created() {},
@ -147,6 +187,13 @@ export default {
}) })
}, },
methods: { methods: {
tenantIdSearch(value) {
if (value) {
SysTenantPage({ pageNo: 1, pageSize: 9999, name: value }).then(res => {
this.TenantData = res.data.rows
})
}
},
FnTurnD(data) { FnTurnD(data) {
let Rdata = '' let Rdata = ''
this.TypeData.forEach(item => { this.TypeData.forEach(item => {
@ -171,7 +218,11 @@ export default {
}, },
FnGetData() { FnGetData() {
this.loading = true 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.loadData = res.data
this.loading = false this.loading = false
this.queryParam.currentPage = res.data.pageNo this.queryParam.currentPage = res.data.pageNo

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

Loading…
Cancel
Save