企业中心

pull/1/head
Vayne 1 year ago
parent 4f1c38bcec
commit f95d758b23

@ -68,6 +68,11 @@ export const getBusinessLinePage = async (params) => {
return await request.get({ url: `/system/business-warehouse/enterprise-business`, params })
}
//企业详情点击分支机构下的仓库列表
export const getWarehousePage = async (params) => {
return await request.get({ url: `/system/business-warehouse/enterprise-warehouse`, params })
}
//企业详情点击分支机构下的员工列表
export const getUserPage = async (params) => {
return await request.get({ url: `/system/business-warehouse/enterprise-user`, params })

@ -237,8 +237,15 @@ const resetQuery = () => {
/** 添加/修改操作 */
const formRef = ref()
const router = useRouter()
const openForm = (type: string, id?: number) => {
formRef.value.open(type, id)
router.push({
path: '/qiyezhongxin/business/warehouse-create',
query: {
type: type,
id: id
}
})
}
/** 删除按钮操作 */

@ -101,7 +101,7 @@
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
<el-tab-pane label="基本信息" name="first"><BasicInfo/></el-tab-pane>
<el-tab-pane label="关联机构" name="third"><Company :branchList='enterpriseBranchList'/></el-tab-pane>
<el-tab-pane label="员工信息" name="fifth"><EmployeeInfo :userList='enterprise.businessUserList'/></el-tab-pane>
<el-tab-pane label="员工信息" name="fifth"><EmployeeInfo :businessId='businessId'/></el-tab-pane>
<el-tab-pane label="操作记录" name="ninth"><OperateRecords /></el-tab-pane>
</el-tabs>
</div>
@ -128,6 +128,8 @@ import * as BusinessWarehouseApi from '@/api/xxjj/businessWarehouse'
// const businessWarehouseInfo = ref([]) //
let enterprise = reactive({
checked1: true,
businessId: {
},
businessWarehouseInfo: {
},
// enterpriseBranchList:{
@ -139,13 +141,11 @@ let enterprise = reactive({
total:0,
}
})
const loading = ref(true) //
const total = ref(0) //
const list = ref([]) //
const enterpriseBranchList: any = ref('') //
const list3 = ref([]) //
const businessId: any = ref('') //
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
@ -164,11 +164,9 @@ const queryParams = reactive({
const getList = async () => {
loading.value = true
try {
businessId.value = queryParams.id
const data = await BusinessWarehouseApi.getBusinessWarehouseDetail(queryParams)
enterpriseBranchList.value = [...data.enterpriseBranchList]
console.log('index', enterpriseBranchList.value );
enterpriseBranchList.value = [...data.enterpriseBranchList]
enterprise.businessWarehouseInfo = data.businessWarehouseInfo
enterprise.businessUserList = data.businessUserList
} finally {

@ -155,16 +155,17 @@ import * as EnterpriseApi from '@/api/system/enterprise'
import * as BusinessWarehouseApi from '@/api/xxjj/businessWarehouse'
// defineOptions({ name: 'SystemUserDeptTree' })
import { defineProps, ref } from 'vue' //props
import { number } from 'vue-types'
const props = defineProps({
userList: {
type: Array as ()=> unknown,
businessId: {
type: Object,
required: true,
},
});
console.log('userList',props.userList)
console.log('userList',props.businessId)
const deptName = ref('')
const deptList = ref<Tree[]>([]) //
@ -228,13 +229,13 @@ const selectoptions = [
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
const total = ref(0) //
const list = ref([]) //
const queryParams = reactive({
const queryParams: any = reactive({
pageNo: 1,
pageSize: 10,
businessId: '',
username: undefined,
mobile: undefined,
status: undefined,
@ -248,7 +249,10 @@ const queryFormRef = ref() // 搜索的表单
const getList = async () => {
loading.value = true
try {
queryParams.businessId = props.businessId
debugger
const data = await BusinessWarehouseApi.getBusinessUserPage(queryParams)
debugger
list.value = data.list
total.value = data.total
} finally {

@ -14,42 +14,42 @@
</el-col>
</el-row>
<el-form ref="ruleFormRef" :model="ruleForm" :rules="rules" label-width="160px" class="demo-ruleForm" :size="formSize" status-icon>
<el-form ref="ruleFormRef" :model="formData" label-width="160px" class="demo-ruleForm" :size="formSize" :rules="formRules" status-icon>
<el-row style="width:95%">
<el-col :span="8">
<el-form-item label="业务线编号" prop="name">
<el-input v-model="ruleForm.name" />
<el-form-item label="业务线编号" prop="businessCode">
<el-input v-model="formData.businessCode" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="业务线名称" prop="name">
<el-input v-model="ruleForm.name" />
<el-input v-model="formData.name" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="业务线 简称/英文名">
<el-input v-model="ruleForm.name" />
<el-input v-model="formData.businessSimple" />
</el-form-item>
</el-col>
</el-row>
<el-row style="width:95%">
<el-col :span="8">
<el-form-item label="类型" prop="region">
<el-select v-model="ruleForm.region" clearable placeholder="选择类型">
<el-option label="业务线" value="shanghai" />
<el-option label="业务线" value="beijing" />
<el-form-item label="类型" prop="diffFlag">
<el-select v-model="formData.diffFlag" clearable placeholder="选择类型">
<el-option label="业务线" value="0" />
<el-option label="仓库" value="1" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="所属分类" clearable prop="count">
<el-select-v2 v-model="ruleForm.count" placeholder="所属行业" :options="options" />
<el-form-item label="所属分类" clearable prop="industry">
<el-select-v2 v-model="formData.industry" placeholder="所属行业" :options="industryOptions" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="所在城市" prop="count">
<el-select-v2 v-model="ruleForm.count" placeholder="选择城市" :options="options" />
<el-form-item label="所在城市" prop="city">
<el-select-v2 v-model="formData.city" placeholder="选择城市" :options="options" />
</el-form-item>
</el-col>
</el-row>
@ -57,7 +57,7 @@
<el-row style="width:95%">
<el-col :span="8">
<el-form-item label="成立时间" prop="date1">
<el-date-picker v-model="ruleForm.date1" type="date" label="选择日期" placeholder="请选择成立时间" style="width: 100%" />
<el-date-picker v-model="formData.establishDate" type="date" label="选择日期" placeholder="请选择成立时间" style="width: 100%" />
</el-form-item></el-col>
<el-col :span="22">
<el-form-item label="描述" prop="desc">
@ -76,7 +76,7 @@
<el-row>
<el-col :span="22" style="margin:0 auto;">
<el-card class="box-card">
<el-table :data="tableData" border stripe style="width: 100%">
<el-table :data="ContacttableData" border stripe style="width: 100%">
<el-table-column prop="date" label="类型" width="180" />
<el-table-column prop="name" label="姓名" width="180" />
<el-table-column prop="name" label="手机号" width="180" />
@ -127,36 +127,36 @@
<!--新建/ 编辑对话框 -->
<el-dialog v-model="dialogFormVisible" :title="dialogTitle" width="30%" @closed="closed(ruleFormRef)">
<el-form ref="ruleFormRef" :model="ruleForm" :rules="rules" label-width="120px" class="demo-ruleForm" :size="formSize" status-icon>
<el-form ref="ruleFormRef" :model="ContactruleForm.data" :rules="rules" label-width="120px" class="demo-ruleForm" :size="formSize" status-icon>
<el-form-item label="联系人类型:" prop="region">
<el-select v-model="ruleForm.region" placeholder="类型">
<el-select v-model="ContactruleForm.data" placeholder="类型">
<el-option label="Zone one" value="shanghai" />
<el-option label="Zone two" value="beijing" />
</el-select>
</el-form-item>
<el-form-item label="联系人姓名:" prop="name">
<el-input v-model="ruleForm.name" placeholder="输入内容" />
<el-input v-model="ContactruleForm.name" placeholder="输入内容" />
</el-form-item>
<el-form-item label="联系人手机号:" prop="name">
<el-input v-model="ruleForm.name" placeholder="输入内容" />
<el-input v-model="ContactruleForm.phone" placeholder="输入内容" />
</el-form-item>
<el-form-item label="联系人邮箱:" prop="name">
<el-input v-model="ruleForm.name" placeholder="输入内容" />
<el-input v-model="ContactruleForm.email" placeholder="输入内容" />
</el-form-item>
<el-form-item label="联系人座机:">
<el-input v-model="ruleForm.name" placeholder="输入内容" />
<el-input v-model="ContactruleForm.landline" placeholder="输入内容" />
</el-form-item>
<el-form-item label="联系人传真:">
<el-input v-model="ruleForm.name" placeholder="输入内容" />
<el-input v-model="ContactruleForm.fax" placeholder="输入内容" />
</el-form-item>
<el-form-item label="备注:" prop="desc">
<el-input v-model="ruleForm.desc" maxlength="100" placeholder="输入内容" show-word-limit :autosize="{ minRows: 6, maxRows: 8 }" type="textarea" />
<el-input v-model="ContactruleForm.desc" maxlength="100" placeholder="输入内容" show-word-limit :autosize="{ minRows: 6, maxRows: 8 }" type="textarea" />
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="dialogFormVisible = false">取消</el-button>
<el-button type="primary" @click="dialogFormVisible = false">
<el-button type="primary" @click="ContactsaveData()">
保存
</el-button>
</span>
@ -177,8 +177,36 @@ const { t } = useI18n() // 国际化
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formData = ref({
id: undefined,
businessCode: undefined,
name: undefined,
businessSimple: undefined,
businessLogo: undefined,
parentId: undefined,
type: undefined,
status: undefined,
institutionNum: undefined,
employeeNum: undefined,
industry: undefined,
city: undefined,
establishDate: undefined,
belongUserId: undefined,
brandName: undefined,
phone: undefined,
diffFlag: undefined,
fax: undefined,
url: undefined,
description: undefined,
relationList: []
})
interface RuleForm {
businessCode: string
name: string
businessSimple: string
diffFlag: string
industry: string
city: string
region: string
count: string
date1: string
@ -188,69 +216,83 @@ interface RuleForm {
const formSize = ref('default')
const ruleFormRef = ref<FormInstance>()
const ruleForm = reactive<RuleForm>({
businessCode: '',
name: 'Hello',
businessSimple: '',
diffFlag: '',
industry: '',
city: '',
region: '',
count: '',
date1: '',
desc: ''
})
const rules = reactive<FormRules<RuleForm>>({
name: [
{ required: true, message: '请输入内容', trigger: 'blur' },
{ min: 1, max: 11, message: '输入1-11个字', trigger: 'blur' }
],
region: [
{
required: true,
message: '请选择',
trigger: 'change'
}
],
count: [
{
required: true,
message: '请选择',
trigger: 'change'
}
],
date1: [
{
type: 'date',
required: true,
message: 'Please pick a date',
trigger: 'change'
}
]
const formRules = reactive({
businessCode: [{ required: true, message: '业务线编号不能为空', trigger: 'blur' }],
name: [{ required: true, message: '业务线名称不能为空', trigger: 'blur' }],
diffFlag: [{ required: true, message: '业务线仓库区分(0业务线,1仓库)不能为空', trigger: 'change' }]
})
// const rules = reactive<FormRules<RuleForm>>({
// name: [
// { required: true, message: '', trigger: 'blur' },
// { min: 1, max: 11, message: '1-11', trigger: 'blur' }
// ],
// region: [
// {
// required: true,
// message: '',
// trigger: 'change'
// }
// ],
// count: [
// {
// required: true,
// message: '',
// trigger: 'change'
// }
// ],
// date1: [
// {
// type: 'date',
// required: true,
// message: 'Please pick a date',
// trigger: 'change'
// }
// ]
// })
const submitForm = async () => {
debugger
const submitForm = async (formEl: FormInstance | undefined) => {
if (!formEl) return
formLoading.value = true
await formEl.validate((valid, fields) => {
if (valid) {
// const data = formData.value as unknown as BusinessWarehouseApi.BusinessWarehouseVO
// if (formType.value === 'create') {
// await BusinessWarehouseApi.createBusinessWarehouse(data)
// message.success(t('common.createSuccess'))
// } else {
// await BusinessWarehouseApi.updateBusinessWarehouse(data)
// message.success(t('common.updateSuccess'))
// }
try {
const data = formData.value as unknown as BusinessWarehouseApi.BusinessWarehouseVO
if (formType.value === 'create') {
debugger
await BusinessWarehouseApi.createBusinessWarehouse(data)
message.success(t('common.createSuccess'))
} else {
await BusinessWarehouseApi.updateBusinessWarehouse(data)
message.success(t('common.updateSuccess'))
}
console.log('新建submit校验成功 返回上一页!')
router.push('./index.vue')//
emit('success')
} else {
console.log('error submit!', fields)
}
})
formLoading.value = false
} finally {
formLoading.value = false
}
}
const backtrack = () => {
router.push('./index.vue')//
}
const industryOptions = Array.from({ length: 10000 }).map((_, idx) => ({
value: `${idx + 1}`,
label: `${idx + 1}`
}))
const options = Array.from({ length: 10000 }).map((_, idx) => ({
value: `${idx + 1}`,
label: `${idx + 1}`
@ -280,6 +322,67 @@ const tableData = [
}
]
const ContacttableData = ref([
{
id:1,
date: '类型一',
name: 'Tom',
phone:'11012011912306',
landline:'0371-12315',
email:'ww1234@163.com',
fax:'传真',
newdata:'2023-10-18 08:36'
}, {
id:2,
date: '类型二',
name: 'Tom',
phone:'11012011912306',
landline:'0371-12315',
email:'ww1234@163.com',
fax:'传真',
newdata:'2023-10-18 08:36'
}, {
id:3,
date: '类型三',
name: 'Tom',
phone:'11012011912306',
landline:'0371-12315',
email:'ww1234@163.com',
fax:'传真',
newdata:'2023-10-18 08:36'
}, {
id:4,
date: '类型四',
name: 'Tom',
phone:'11012011912306',
landline:'0371-12315',
email:'ww1234@163.com',
fax:'传真',
newdata:'2023-10-18 08:36'
},
])
interface ContactRuleForm {
date: any
name: any
phone:any
landline:any
email:any
fax:any
newdata:any
}
const ContactruleForm:any = reactive<ContactRuleForm>(
{
date: '',
name: '',
phone:'',
landline:'',
email:'',
fax:'',
newdata:''
})
const handleClose = (done: () => void) => {
ElMessageBox.confirm('Are you sure to close this dialog?')
.then(() => {
@ -302,9 +405,46 @@ const addexpert = () => {
dialogFormVisible.value = true
dialogTitle.value = '新建联系人'
Object.keys(experupdatetList).forEach((key) => {
experupdatetList[key] = ''
})
// Object.keys(experupdatetList).forEach((key) => {
// experupdatetList[key] = ''
// })
}
const ContactsaveData = () => {
if (dialogTitle.value == '新建联系人') {
newContactsaveData()
} else if (dialogTitle.value == '编辑联系人') {
redactContactsaveData()
}
}
//
const newContactsaveData =()=>{
if (Array.isArray(ContacttableData.value)) {
ContacttableData.value.push(ContactruleForm);
} else {
//
ContacttableData.value = [ContactruleForm];
}
dialogFormVisible.value = false
}
//
const redactContactsaveData = () => {
if (Array.isArray(ContacttableData.value)) {
//
const index = ContacttableData.value.findIndex((item) => item.name === ContactruleForm.name);
if (index !== -1) {
//
ContacttableData.value.splice(index, 1, { ...ContactruleForm }); // Use spread to create a new object
} else {
//
ContacttableData.value.push({ ...ContactruleForm });
}
} else {
ContacttableData.value = [{ ...ContactruleForm }];
}
}
//
@ -378,17 +518,40 @@ const handleEdit = (val: any) => {
// }
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
// const handleDelete = async (id: number) => {
// try {
// //
// await message.delConfirm()
// //
// // await EnterpriseApi.deleteEnterprise(id)
// message.success(t('common.delSuccess'))
// //
// // await getList()
// } catch {}
// }
const handleDelete = (id: number) => {
try {
//
await message.delConfirm()
//
// await EnterpriseApi.deleteEnterprise(id)
message.success(t('common.delSuccess'))
//
// await getList()
// message.delConfirm();
//
ContacttableData.value.splice(id, 1);
// message.success(t('common.delSuccess'));
//
// await getList();
} catch {}
}
const route = useRoute() //
onMounted(() => {
const id:any = route.query.id
const type:any = route.query.type
if(!id){
formType.value = 'create'
}else{
}
})
</script>
<style scoped lang="scss">
.box-card {

@ -31,7 +31,7 @@
<el-button
type="primary"
@click="create('create')"
@click="openForm('create')"
v-hasPermi="['system:business-warehouse:create']"
>
<Icon icon="ep:plus" class="mr-5px" /> 新增业务线
@ -154,7 +154,7 @@
<!-- 表单弹窗添加/修改 -->
<BusinessWarehouseForm ref="formRef" @success="getList" />
<UpdateStatus ref="statusRef" @success="getList" />
<Increased ref="createRef" @success="getList" />
<!-- <Increased ref="createRef" @success="getList" /> -->
</template>
<script setup lang="ts" name="BusinessWarehouse">
@ -234,16 +234,18 @@ const resetQuery = () => {
/** 添加/修改操作 */
const formRef = ref()
const router = useRouter()
const openForm = (type: string, id?: number) => {
debugger
formRef.value.open(type, id)
router.push({
path: '/qiyezhongxin/business/businessLine-create',
query: {
type: type,
id: id
}
})
}
/** 新增业务线 */
const createRef = ref()
const create = (type: string, id?: number) => {
formRef.value.open(type, id)
}
/** 设置状态操作 */
const statusRef = ref()

@ -36,16 +36,16 @@
<el-col :span="21" :xs="24">
<!-- 根据不同数据导入不同右侧页面 -->
<div v-if="queryParams.flag=='总公司'">
<Company/>
<Company :treeId = 'treeId' />
</div>
<div v-else-if="queryParams.flag==''">
<Filiale/>
<Filiale :treeId = 'treeId'/>
</div >
<div v-else-if="queryParams.flag=='线'">
<Filiale2/>
<Filiale2 :treeId = 'treeId'/>
</div >
<div v-else-if="queryParams.flag==''">
<Staff/>
<Staff :treeId = 'treeId'/>
</div >
</el-col>
</el-row>
@ -148,6 +148,7 @@ const { t } = useI18n() // 国际化
const loading = ref(true) //
const total = ref(0) //
const list = ref([]) //
const treeId: any = ref('') //
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
@ -164,6 +165,10 @@ const queryParams = reactive({
})
const queryFormRef = ref() //
const treeIdMethod = async () => {
treeId.value = queryParams.id
}
/** 查询列表 */
const getList = async () => {
loading.value = true
@ -213,6 +218,7 @@ const getBusinessList3 = async () => {
const handleQuery = () => {
queryParams.pageNo = 1
getList()
treeIdMethod()
}
/** 重置按钮操作 */
@ -227,13 +233,15 @@ const handleDeptNodeClick = async (row) => {
if(row.parentId == 'A-0'){
queryParams.flag = '总公司'
const id = row.id.slice(2)
queryParams.parentId = parseInt(id)
await getList()
treeId.value = parseInt(id)
debugger
// await getList()
}else if(row.id.substring(0,1) == 'A'){
queryParams.flag = '分公司'
const id = row.id.slice(2)
queryParams.id = parseInt(id)
await getBusinessList()
// queryParams.id = parseInt(id)
treeId.value = parseInt(id)
// await getBusinessList()
}else if(row.id.substring(0,1) == 'B'){
queryParams.flag = '业务线'
const id = row.id.slice(2)

@ -39,7 +39,7 @@
<template #default="scope">
<div style="color:rgb(64,158,255)">
<p style="height:5px;">{{scope.row.k1}}</p>
<span style="font-size:12px;">{{scope.row.k1b}}</span>
<span style="font-size:12px;">{{scope.row.name}}</span>
</div>
</template>
</el-table-column>
@ -79,29 +79,29 @@
</template>
<script lang="ts" setup>
import { defineEmits,defineProps,ref } from 'vue';
import { defineProps,ref } from 'vue';
import * as BusinessWarehouseApi from '@/api/xxjj/businessWarehouse'
const props = defineProps({
data1: {
type: Array,
required: true,
},
treeId: {
type: Object,
required: true,
},
});
console.log(props.treeId);
console.log('business',props.treeId);
const handleClick = () => {
// emit('grandparentEvent', 'Hello from grandchild component');
};
// const loading = ref(true) //
const total = ref('') //
const queryParams = ref({
const loading = ref(true) //
const total = ref(0) //
const list = ref([]) //
const queryParams: any = reactive({
pageNo: 1,
pageSize: 10,
id: undefined,
username: undefined,
mobile: undefined,
status: undefined,
@ -128,6 +128,20 @@ const queryFormRef = ref() // 搜索的表单
// });
// });
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
queryParams.id = props.treeId
debugger
const data = await BusinessWarehouseApi.getBusinessLinePage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
const handleQuery = () => {
queryParams.value.pageNo = 1;
};
@ -149,6 +163,10 @@ const resetQuery = () => {
// ]) //
onMounted(() => {
getList()
})
</script>
<style scoped lang="scss">
.box-card {

@ -5,7 +5,7 @@
<template #header>
<div class="designation">
<span></span>
{{ companydata.k3b }}
{{ 123 }}
</div>
</template>
@ -36,9 +36,9 @@
</el-row>
</el-form>
<!-- 表格 -->
<el-table stripe :border="true" style="width: 1500px;height: 100%;margin-top:20px;" v-loading="loading" :data="companydata">
<el-table stripe :border="true" style="width: 1500px;height: 100%;margin-top:20px;" v-loading="loading" :data="list">
<el-table-column fixed="left" type="selection" />
<el-table-column fixed="left" label="分支机构名称" width="250" key="name" prop="k1">
<el-table-column fixed="left" label="分支机构名称" width="250" key="name" prop="name">
<template #default="scope">
<div style="display:flex;align-items:center;">
<img style="width:40px; border-radius: 100%;margin:0 5px" src="" alt="" />
@ -48,14 +48,14 @@
</el-table-column>
<el-table-column label="法定代表" width="150" sortable align="center" prop="k1" :show-overflow-tooltip="true" />
<el-table-column label="联系电话" align="center" prop="k6" width="120" />
<el-table-column label="邮箱" width="200px" prop="k6" key="status1" />
<el-table-column label="法定代表" width="150" sortable align="center" prop="legalPersonName" :show-overflow-tooltip="true" />
<el-table-column label="联系电话" align="center" prop="phone" width="120" />
<el-table-column label="邮箱" align="center" width="200px" prop="email" />
<el-table-column label="包含业务线" align="center" prop="k4" width="120" />
<el-table-column label="关联员工" align="center" prop="k2" width="120" />
<el-table-column label="状态" sortable align="center" prop="k8" width="120" />
<el-table-column label="更新时间" align="center" prop="k7" :formatter="dateFormatter" width="180" sortable />
<el-table-column label="状态" sortable align="center" prop="enterpriseStatus" width="120" />
<el-table-column label="更新时间" align="center" prop="updateTime" :formatter="dateFormatter" width="180" sortable />
<el-table-column fixed="right" label="操作" align="center" width="120">
<template #default="scope">
<el-button type="primary" link @click="handleDelete(scope.row.id)" v-hasPermi="['system:tenant:delete']">
@ -70,21 +70,17 @@
</template>
<script lang="ts" setup>
import { defineProps, ref } from 'vue' //props
import * as EnterpriseApi from '@/api/system/enterprise'
const props = defineProps({
companydata: {
type: Array,
required: true,
},
treeId:{
type: Object,
required: true,
}
});
console.log(props.treeId);
console.log('treeId',props.treeId);
console.log(props.companydata)
const deptName = ref('')
@ -94,11 +90,12 @@ const message = useMessage() // 消息弹窗
const { t } = useI18n() //
const loading = ref(false) //
const list = ref([]) //
const total = ref(0) //
// const list = ref([]) //
const queryParams = reactive({
const queryParams: any = reactive({
pageNo: 1,
pageSize: 10,
parentId: '',
username: undefined,
mobile: undefined,
status: undefined,
@ -108,17 +105,19 @@ const queryParams = reactive({
})
const queryFormRef = ref() //
// /** */
// const getList = async () => {
// loading.value = true
// try {
// const data = await UserApi.getUserPage(queryParams)
// list.value = data.list
// total.value = data.total
// } finally {
// loading.value = false
// }
// }
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
queryParams.parentId = props.treeId
debugger
const data = await EnterpriseApi.getEnterprisePage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
const handleQuery = () => {
@ -146,7 +145,7 @@ const resetQuery = () => {
/** 初始化 */
onMounted(() => {
// getList()
getList()
})
</script>
<style scoped lang="scss">

@ -1,4 +1,4 @@
handleClick
<template>
<el-card style="margin-top:20px; height:100%" class="item-card">
<template #header>
@ -10,13 +10,13 @@
<!-- 表格分页 -->
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
<el-tab-pane label="业务线" name="first">
<Businesspage :data1="data1" :treeId="treeId" />
<Businesspage :treeId="treeId" />
</el-tab-pane>
<el-tab-pane label="仓库列表" name="second">
<Warehousepage :data2="data2" :treeId="treeId"/>
<Warehousepage :treeId="treeId"/>
</el-tab-pane>
<el-tab-pane label="员工列表" name="third">
<Staffpage :data3="data3" :treeId="treeId"/>
<Staffpage :treeId="treeId"/>
</el-tab-pane>
</el-tabs>
</el-card>
@ -25,6 +25,7 @@
import Staffpage from './staffpage.vue'
import Businesspage from './businesspage.vue'
import Warehousepage from './warehousepage.vue'
import * as BusinessWarehouseApi from '@/api/xxjj/businessWarehouse'
// import { checkPermi } from '@/utils/permission'
// import { dateFormatter } from '@/utils/formatTime'
// import download from '@/utils/download'
@ -43,18 +44,6 @@ const deptName = ref('')
import { defineProps, ref } from 'vue' //props
const props = defineProps({
data1: {
type: Array,
required: true,
},
data2: {
type: Array,
required: true,
},
data3: {
type: Array,
required: true,
},
treeId:{
type: Object,
required: true,
@ -76,9 +65,11 @@ const { t } = useI18n() // 国际化
const loading = ref(true) //
const total = ref(0) //
const list = ref([]) //
const queryParams = reactive({
const treeId: any = ref('') //
const queryParams: any = reactive({
pageNo: 1,
pageSize: 10,
id: undefined,
username: undefined,
mobile: undefined,
status: undefined,
@ -88,17 +79,22 @@ const queryParams = reactive({
})
const queryFormRef = ref() //
// /** */
// const getList = async () => {
// loading.value = true
// try {
// const data = await UserApi.getUserPage(queryParams)
// list.value = data.list
// total.value = data.total
// } finally {
// loading.value = false
// }
// }
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
queryParams.id = props.treeId
const data = await BusinessWarehouseApi.getBusinessLinePage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
const treeIdMethod = async () => {
treeId.value = props.treeId
}
/** 搜索按钮操作 */
const handleQuery = () => {
@ -111,6 +107,20 @@ const resetQuery = () => {
handleQuery()
}
const handleClick = () => {
if(activeName.value == 'first'){
treeId.value = props.treeId
debugger
// await getList()
}else if(activeName.value == 'second'){
treeId.value = props.treeId
}else if(activeName.value == 'third'){
treeId.value = props.treeId
}
}
/** 添加/修改操作 */
@ -129,7 +139,8 @@ const handleImport = () => {
/** 初始化 */
onMounted(() => {
// getList()
getList()
treeIdMethod()
})
</script>
<style scoped lang="scss">

@ -130,13 +130,10 @@
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { defineProps,ref } from 'vue';
import * as BusinessWarehouseApi from '@/api/xxjj/businessWarehouse'
const props = defineProps({
data3: {
type: Array,
required: true,
},
treeId: {
type: Object,
required: true,
@ -145,31 +142,34 @@ const props = defineProps({
console.log(props.treeId);
// const loading = ref(true) //
const total = ref(5) //
const queryParams = reactive({
const loading = ref(true) //
const total = ref(0) //
const list = ref([]) //
const queryParams: any = reactive({
pageNo: 1,
pageSize: 10,
// username: undefined,
// mobile: undefined,
// status: undefined,
// status1: undefined,
// deptId: undefined,
// createTime: []
id: undefined,
username: undefined,
mobile: undefined,
status: undefined,
status1: undefined,
deptId: undefined,
createTime: []
})
const queryFormRef = ref() //
/** 查询列表 */
// const getList = async () => {
// loading.value = true
// try {
// const data = await UserApi.getUserPage(queryParams)
// list.value = data.list
// total.value = data.total
// } finally {
// loading.value = false
// }
// }
const getList = async () => {
loading.value = true
try {
queryParams.id = props.treeId
const data = await BusinessWarehouseApi.getUserPage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
const handleQuery = () => {
@ -191,6 +191,10 @@ const resetQuery = () => {
// ]) //
onMounted(() => {
getList()
})
</script>
<style scoped lang="scss">
.box-card {

@ -3,8 +3,8 @@
<el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true" label-width="68px">
<el-row>
<el-col :span="5">
<el-form-item prop="username">
<el-input v-model="queryParams.username" placeholder="仓库编号/名称/负责人" clearable @keyup.enter="handleQuery" class="!w-240px" />
<el-form-item prop="name">
<el-input v-model="queryParams.name" placeholder="仓库编号/名称/负责人" clearable @keyup.enter="handleQuery" class="!w-240px" />
</el-form-item>
</el-col>
@ -33,13 +33,13 @@
</el-row>
<el-row>
<!-- 表格 -->
<el-table stripe :border="true" style="width: 1500px;height: 100%;margin:20px 0;" v-loading="loading" :data="data2">
<el-table stripe :border="true" style="width: 1500px;height: 100%;margin:20px 0;" v-loading="loading" :data="list">
<el-table-column fixed="left" type="selection" />
<el-table-column fixed="left" label="仓库名称" width="150" >
<template #default="scope">
<div style="color:rgb(64,158,255)">
<p style="height:5px;">{{scope.row.k1}}</p>
<span style="font-size:12px;">{{scope.row.k1b}}</span>
<p style="height:5px;">{{scope.row.businessCode}}</p>
<span style="font-size:12px;">{{scope.row.name}}</span>
</div>
</template>
</el-table-column>
@ -47,8 +47,8 @@
</el-table-column>
<el-table-column label="联系电话" prop="k6" width="130" />
<el-table-column label="邮箱" prop="k6" width="180" />
<el-table-column label="隶属业务" prop="k2" width="180" />
<el-table-column label="邮箱" prop="email" width="180" />
<el-table-column label="隶属业务" prop="businessName" width="180" />
<el-table-column label="状态" width="140" sortable key="status">
<template #default="scope">
@ -77,44 +77,45 @@
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { defineProps,ref } from 'vue';
import * as BusinessWarehouseApi from '@/api/xxjj/businessWarehouse'
const props = defineProps({
data2: {
type: Array,
required: true,
},
treeId: {
type: Object,
required: true,
},
});
console.log(props.treeId);
console.log('warehouse',props.treeId);
// const loading = ref(true) //
const total = ref(5) //
const queryParams = reactive({
const loading = ref(true) //
const total = ref(0) //
const list = ref([]) //
const queryParams: any = reactive({
pageNo: 1,
pageSize: 10,
// username: undefined,
// mobile: undefined,
// status: undefined,
// status1: undefined,
// deptId: undefined,
// createTime: []
id: undefined,
username: undefined,
mobile: undefined,
status: undefined,
status1: undefined,
deptId: undefined,
createTime: []
})
const queryFormRef = ref() //
/** 查询列表 */
// const getList = async () => {
// loading.value = true
// try {
// const data = await UserApi.getUserPage(queryParams)
// list.value = data.list
// total.value = data.total
// } finally {
// loading.value = false
// }
// }
const getList = async () => {
loading.value = true
try {
queryParams.id = props.treeId
debugger
const data = await BusinessWarehouseApi.getWarehousePage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
const handleQuery = () => {
@ -135,6 +136,9 @@ const resetQuery = () => {
// {k1:'',k1b:'3001011',k2:'',k2b:'',k3:'-',k3b:'',k4:'',k4b:'',k6:'15896345652',k7:'2023-09-09 18:24:00',k8:'30'},
// ]) //
onMounted(() => {
getList()
})
</script>
<style scoped lang="scss">

@ -35,7 +35,7 @@
<!-- 表格 -->
<el-table stripe :border="true" style="width: 1500px;height: 100%;margin:20px 0;" v-loading="loading" :data="list">
<el-table-column fixed="left" type="selection" />
<el-table-column fixed="left" label="业务线名称" width="150" >
<el-table-column fixed="left" label="部门名称" width="150" >
<template #default="scope">
<div style="color:rgb(64,158,255)">
<p style="height:5px;">{{scope.row.k1}}</p>
@ -48,7 +48,7 @@
</el-table-column>
<el-table-column label="联系电话" prop="k6" width="120" />
<el-table-column label="邮箱" prop="k6" width="150" />
<el-table-column label="包含仓库" prop="k8" width="100" />
<el-table-column label="包含子部门" prop="k8" width="100" />
<el-table-column label="关联员工" prop="k8" width="120" />
<el-table-column label="隶属机构" prop="k2" width="120" />

@ -35,7 +35,7 @@
<!-- 表格 -->
<el-table stripe :border="true" style="width: 1500px;height: 100%;margin:20px 0;" v-loading="loading" :data="list">
<el-table-column fixed="left" type="selection" />
<el-table-column fixed="left" label="仓库名称" width="150" >
<el-table-column fixed="left" label="部门名称" width="150" >
<template #default="scope">
<div style="color:rgb(64,158,255)">
<p style="height:5px;">{{scope.row.k1}}</p>

Loading…
Cancel
Save