|
|
|
|
@ -3,7 +3,7 @@
|
|
|
|
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
|
|
|
|
<div v-show="showSearch" class="mb-[10px]">
|
|
|
|
|
<el-card shadow="hover">
|
|
|
|
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width='100px'>
|
|
|
|
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="100px">
|
|
|
|
|
<el-form-item label="供应商名称" prop="supplierName">
|
|
|
|
|
<el-input v-model="queryParams.supplierName" placeholder="请输入供应商名称" clearable @keyup.enter="handleQuery" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
@ -11,11 +11,11 @@
|
|
|
|
|
<el-input v-model="queryParams.mnemonicName" placeholder="请输入助记名称" clearable @keyup.enter="handleQuery" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="供应商类型" prop="supplierType">
|
|
|
|
|
<el-select v-model="queryParams.supplierType" placeholder="请选择供应商类型" clearable >
|
|
|
|
|
<el-option v-for="dict in supplier_type" :key="dict.value" :label="dict.label" :value="dict.value"/>
|
|
|
|
|
<el-select v-model="queryParams.supplierType" placeholder="请选择供应商类型" clearable>
|
|
|
|
|
<el-option v-for="dict in supplier_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<!-- <el-form-item label="注册资本" prop="registeredCapital">
|
|
|
|
|
<!-- <el-form-item label="注册资本" prop="registeredCapital">
|
|
|
|
|
<el-input v-model="queryParams.registeredCapital" placeholder="请输入注册资本" clearable @keyup.enter="handleQuery" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="成立日期" prop="establishmentDate">
|
|
|
|
|
@ -32,10 +32,10 @@
|
|
|
|
|
<el-form-item label="主营行业" prop="mainIndustry">
|
|
|
|
|
<el-input v-model="queryParams.mainIndustry" placeholder="请输入主营行业" clearable @keyup.enter="handleQuery" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<!-- <el-form-item label="法定代表人" prop="legalRepresentative">
|
|
|
|
|
<!-- <el-form-item label="法定代表人" prop="legalRepresentative">
|
|
|
|
|
<el-input v-model="queryParams.legalRepresentative" placeholder="请输入法定代表人" clearable @keyup.enter="handleQuery" />
|
|
|
|
|
</el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="营业执照号码" prop="businessLicenseNumber">
|
|
|
|
|
<!-- <el-form-item label="营业执照号码" prop="businessLicenseNumber">
|
|
|
|
|
<el-input v-model="queryParams.businessLicenseNumber" placeholder="请输入营业执照号码" clearable @keyup.enter="handleQuery" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="税号" prop="taxNumber">
|
|
|
|
|
@ -47,13 +47,13 @@
|
|
|
|
|
<el-form-item label="银行账号" prop="bankNumber">
|
|
|
|
|
<el-input v-model="queryParams.bankNumber" placeholder="请输入银行账号" clearable @keyup.enter="handleQuery" />
|
|
|
|
|
</el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="注册地址" prop="registeredAddress">
|
|
|
|
|
<!-- <el-form-item label="注册地址" prop="registeredAddress">
|
|
|
|
|
<el-input v-model="queryParams.registeredAddress" placeholder="请输入注册地址" clearable @keyup.enter="handleQuery" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="经营地址" prop="businessAddress">
|
|
|
|
|
<el-input v-model="queryParams.businessAddress" placeholder="请输入经营地址" clearable @keyup.enter="handleQuery" />
|
|
|
|
|
</el-form-item>-->
|
|
|
|
|
<!-- <el-form-item label="联系人" prop="contactPerson">
|
|
|
|
|
<!-- <el-form-item label="联系人" prop="contactPerson">
|
|
|
|
|
<el-input v-model="queryParams.contactPerson" placeholder="请输入联系人" clearable @keyup.enter="handleQuery" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="联系电话" prop="contactPhone">
|
|
|
|
|
@ -79,8 +79,8 @@
|
|
|
|
|
<el-input v-model="queryParams.ossId" placeholder="请输入附件ID" clearable @keyup.enter="handleQuery" />
|
|
|
|
|
</el-form-item> -->
|
|
|
|
|
<el-form-item label="激活标识" prop="activeFlag">
|
|
|
|
|
<el-select v-model="queryParams.activeFlag" placeholder="请选择激活标识" clearable >
|
|
|
|
|
<el-option v-for="dict in active_flag" :key="dict.value" :label="dict.label" :value="dict.value"/>
|
|
|
|
|
<el-select v-model="queryParams.activeFlag" placeholder="请选择激活标识" clearable>
|
|
|
|
|
<el-option v-for="dict in active_flag" :key="dict.value" :label="dict.label" :value="dict.value" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
@ -96,16 +96,20 @@
|
|
|
|
|
<template #header>
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['oa/crm:crmSupplierInfo:add']">新增</el-button>
|
|
|
|
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['oa/crm:crmSupplierInfo:add']"> 新增 </el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['oa/crm:crmSupplierInfo:edit']">修改</el-button>
|
|
|
|
|
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['oa/crm:crmSupplierInfo:edit']"
|
|
|
|
|
>修改
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['oa/crm:crmSupplierInfo:remove']">删除</el-button>
|
|
|
|
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['oa/crm:crmSupplierInfo:remove']"
|
|
|
|
|
>删除
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['oa/crm:crmSupplierInfo:export']">导出</el-button>
|
|
|
|
|
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['oa/crm:crmSupplierInfo:export']">导出 </el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<right-toolbar v-model:showSearch="showSearch" :columns="columns" :search="true" @queryTable="getList"></right-toolbar>
|
|
|
|
|
</el-row>
|
|
|
|
|
@ -113,42 +117,42 @@
|
|
|
|
|
|
|
|
|
|
<el-table v-loading="loading" border :data="crmSupplierInfoList" @selection-change="handleSelectionChange">
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
<el-table-column label="供应商ID" align="center" prop="supplierId" v-if="columns[0].visible"/>
|
|
|
|
|
<el-table-column label="供应商名称" align="center" prop="supplierName" v-if="columns[2].visible"/>
|
|
|
|
|
<el-table-column label="助记名称" align="center" prop="mnemonicName" v-if="columns[3].visible"/>
|
|
|
|
|
<el-table-column label="供应商ID" align="center" prop="supplierId" v-if="columns[0].visible" />
|
|
|
|
|
<el-table-column label="供应商名称" align="center" prop="supplierName" v-if="columns[2].visible" />
|
|
|
|
|
<el-table-column label="助记名称" align="center" prop="mnemonicName" v-if="columns[3].visible" />
|
|
|
|
|
<el-table-column label="供应商类型" align="center" prop="supplierType" v-if="columns[4].visible">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<dict-tag :options="supplier_type" :value="scope.row.supplierType"/>
|
|
|
|
|
<dict-tag :options="supplier_type" :value="scope.row.supplierType" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="注册资本" align="center" prop="registeredCapital" v-if="columns[5].visible"/>
|
|
|
|
|
<el-table-column label="注册资本" align="center" prop="registeredCapital" v-if="columns[5].visible" />
|
|
|
|
|
<el-table-column label="成立日期" align="center" prop="establishmentDate" width="180" v-if="columns[6].visible">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<span>{{ parseTime(scope.row.establishmentDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="经营范围" align="center" prop="businessScope" v-if="columns[7].visible"/>
|
|
|
|
|
<el-table-column label="主营行业" align="center" prop="mainIndustry" v-if="columns[8].visible"/>
|
|
|
|
|
<el-table-column label="法定代表人" align="center" prop="legalRepresentative" v-if="columns[9].visible"/>
|
|
|
|
|
<el-table-column label="营业执照号码" align="center" prop="businessLicenseNumber" v-if="columns[10].visible"/>
|
|
|
|
|
<el-table-column label="税号" align="center" prop="taxNumber" v-if="columns[11].visible"/>
|
|
|
|
|
<el-table-column label="开户银行" align="center" prop="bankAccountOpening" v-if="columns[12].visible"/>
|
|
|
|
|
<el-table-column label="银行账号" align="center" prop="bankNumber" v-if="columns[13].visible"/>
|
|
|
|
|
<el-table-column label="注册地址" align="center" prop="registeredAddress" v-if="columns[14].visible"/>
|
|
|
|
|
<el-table-column label="经营地址" align="center" prop="businessAddress" v-if="columns[15].visible"/>
|
|
|
|
|
<el-table-column label="联系人" align="center" prop="contactPerson" v-if="columns[16].visible"/>
|
|
|
|
|
<el-table-column label="联系电话" align="center" prop="contactPhone" v-if="columns[17].visible"/>
|
|
|
|
|
<el-table-column label="联系手机" align="center" prop="contactMobile" v-if="columns[18].visible"/>
|
|
|
|
|
<el-table-column label="联系邮箱" align="center" prop="contactEmail" v-if="columns[19].visible"/>
|
|
|
|
|
<el-table-column label="传真" align="center" prop="contactFax" v-if="columns[20].visible"/>
|
|
|
|
|
<el-table-column label="网址" align="center" prop="website" v-if="columns[21].visible"/>
|
|
|
|
|
<el-table-column label="归属人员" align="center" prop="ownerName" v-if="columns[22].visible"/>
|
|
|
|
|
<el-table-column label="详细地址" align="center" prop="detailedAddress" v-if="columns[23].visible"/>
|
|
|
|
|
<el-table-column label="附件ID" align="center" prop="ossId" v-if="columns[24].visible"/>
|
|
|
|
|
<el-table-column label="备注" align="center" prop="remark" v-if="columns[25].visible"/>
|
|
|
|
|
<el-table-column label="经营范围" align="center" prop="businessScope" v-if="columns[7].visible" />
|
|
|
|
|
<el-table-column label="主营行业" align="center" prop="mainIndustry" v-if="columns[8].visible" />
|
|
|
|
|
<el-table-column label="法定代表人" align="center" prop="legalRepresentative" v-if="columns[9].visible" />
|
|
|
|
|
<el-table-column label="营业执照号码" align="center" prop="businessLicenseNumber" v-if="columns[10].visible" />
|
|
|
|
|
<el-table-column label="税号" align="center" prop="taxNumber" v-if="columns[11].visible" />
|
|
|
|
|
<el-table-column label="开户银行" align="center" prop="bankAccountOpening" v-if="columns[12].visible" />
|
|
|
|
|
<el-table-column label="银行账号" align="center" prop="bankNumber" v-if="columns[13].visible" />
|
|
|
|
|
<el-table-column label="注册地址" align="center" prop="registeredAddress" v-if="columns[14].visible" />
|
|
|
|
|
<el-table-column label="经营地址" align="center" prop="businessAddress" v-if="columns[15].visible" />
|
|
|
|
|
<el-table-column label="联系人" align="center" prop="contactPerson" v-if="columns[16].visible" />
|
|
|
|
|
<el-table-column label="联系电话" align="center" prop="contactPhone" v-if="columns[17].visible" />
|
|
|
|
|
<el-table-column label="联系手机" align="center" prop="contactMobile" v-if="columns[18].visible" />
|
|
|
|
|
<el-table-column label="联系邮箱" align="center" prop="contactEmail" v-if="columns[19].visible" />
|
|
|
|
|
<el-table-column label="传真" align="center" prop="contactFax" v-if="columns[20].visible" />
|
|
|
|
|
<el-table-column label="网址" align="center" prop="website" v-if="columns[21].visible" />
|
|
|
|
|
<el-table-column label="归属人员" align="center" prop="ownerName" v-if="columns[22].visible" />
|
|
|
|
|
<el-table-column label="详细地址" align="center" prop="detailedAddress" v-if="columns[23].visible" />
|
|
|
|
|
<el-table-column label="附件ID" align="center" prop="ossId" v-if="columns[24].visible" />
|
|
|
|
|
<el-table-column label="备注" align="center" prop="remark" v-if="columns[25].visible" />
|
|
|
|
|
<el-table-column label="激活标识" align="center" prop="activeFlag" v-if="columns[26].visible">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<dict-tag :options="active_flag" :value="scope.row.activeFlag"/>
|
|
|
|
|
<dict-tag :options="active_flag" :value="scope.row.activeFlag" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180" v-if="columns[27].visible">
|
|
|
|
|
@ -156,14 +160,20 @@
|
|
|
|
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="创建人" align="center" prop="createName" v-if="columns[28].visible"/>
|
|
|
|
|
<el-table-column label="创建人" align="center" prop="createName" v-if="columns[28].visible" />
|
|
|
|
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-tooltip content="修改" placement="top">
|
|
|
|
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['oa/crm:crmSupplierInfo:edit']"></el-button>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
<el-tooltip content="删除" placement="top">
|
|
|
|
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['oa/crm:crmSupplierInfo:remove']"></el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
link
|
|
|
|
|
type="primary"
|
|
|
|
|
icon="Delete"
|
|
|
|
|
@click="handleDelete(scope.row)"
|
|
|
|
|
v-hasPermi="['oa/crm:crmSupplierInfo:remove']"
|
|
|
|
|
></el-button>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
@ -193,24 +203,13 @@
|
|
|
|
|
<el-col :md="12" :sm="24">
|
|
|
|
|
<el-form-item label="供应商类型" prop="supplierType">
|
|
|
|
|
<el-select v-model="form.supplierType" placeholder="请选择供应商类型">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in supplier_type"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
/>
|
|
|
|
|
<el-option v-for="dict in supplier_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :md="12" :sm="24">
|
|
|
|
|
<el-form-item label="成立日期" prop="establishmentDate">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="form.establishmentDate"
|
|
|
|
|
type="date"
|
|
|
|
|
value-format="YYYY-MM-DD"
|
|
|
|
|
placeholder="请选择成立日期"
|
|
|
|
|
clearable
|
|
|
|
|
/>
|
|
|
|
|
<el-date-picker v-model="form.establishmentDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择成立日期" clearable />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :md="12" :sm="24">
|
|
|
|
|
@ -324,32 +323,39 @@
|
|
|
|
|
<span class="section-title">附件与其他</span>
|
|
|
|
|
</template>
|
|
|
|
|
<el-row :gutter="16">
|
|
|
|
|
<el-col :md="12" :sm="24">
|
|
|
|
|
<!-- <el-col :md="12" :sm="24">-->
|
|
|
|
|
<el-form-item label="附件" prop="ossId">
|
|
|
|
|
<FileUpload v-model="form.ossId" :limit="1" :is-show-tip="true" :file-size="10" />
|
|
|
|
|
<span class="upload-tip">仅支持单文件上传,大小不超过10MB</span>
|
|
|
|
|
<div v-if="form.attachmentList?.length" class="mt-2">
|
|
|
|
|
<el-tag
|
|
|
|
|
v-for="item in form.attachmentList"
|
|
|
|
|
:key="item.ossId"
|
|
|
|
|
size="small"
|
|
|
|
|
class="mr-2 mb-2"
|
|
|
|
|
>
|
|
|
|
|
<el-link :href="item.url" target="_blank" type="primary">
|
|
|
|
|
{{ item.originalName || item.name }}
|
|
|
|
|
</el-link>
|
|
|
|
|
</el-tag>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <span class="upload-tip">仅支持单文件上传,大小不超过10MB</span>-->
|
|
|
|
|
<!-- <div v-if="form.attachmentList?.length" class="mt-2">-->
|
|
|
|
|
<!-- <el-tag-->
|
|
|
|
|
<!-- v-for="item in form.attachmentList"-->
|
|
|
|
|
<!-- :key="item.ossId"-->
|
|
|
|
|
<!-- size="small"-->
|
|
|
|
|
<!-- class="mr-2 mb-2"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- <el-link :href="item.url" target="_blank" type="primary">-->
|
|
|
|
|
<!-- {{ item.originalName || item.name }}-->
|
|
|
|
|
<!-- </el-link>-->
|
|
|
|
|
<!-- </el-tag>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :md="12" :sm="24">
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!-- <el-col :md="12" :sm="24">-->
|
|
|
|
|
<!-- <el-form-item label="激活标识" prop="activeFlag">-->
|
|
|
|
|
<!-- <el-radio-group v-model="form.activeFlag">-->
|
|
|
|
|
<!-- <el-radio-->
|
|
|
|
|
<!-- v-for="dict in active_flag"-->
|
|
|
|
|
<!-- :key="dict.value"-->
|
|
|
|
|
<!-- :value="dict.value"-->
|
|
|
|
|
<!-- >{{ dict.label }}</el-radio>-->
|
|
|
|
|
<!-- </el-radio-group>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<el-col :md="24">
|
|
|
|
|
<el-form-item label="激活标识" prop="activeFlag">
|
|
|
|
|
<el-radio-group v-model="form.activeFlag">
|
|
|
|
|
<el-radio
|
|
|
|
|
v-for="dict in active_flag"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
>{{ dict.label }}</el-radio>
|
|
|
|
|
<el-radio v-for="dict in active_flag" :key="dict.value" :value="dict.value">{{ dict.label }} </el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
@ -372,35 +378,35 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup name="CrmSupplierInfo" lang="ts">
|
|
|
|
|
import { listCrmSupplierInfo, getCrmSupplierInfo, delCrmSupplierInfo, addCrmSupplierInfo, updateCrmSupplierInfo } from '@/api/oa/crm/crmSupplierInfo';
|
|
|
|
|
import { CrmSupplierInfoVO, CrmSupplierInfoQuery, CrmSupplierInfoForm } from '@/api/oa/crm/crmSupplierInfo/types';
|
|
|
|
|
import { listUser } from '@/api/system/user';
|
|
|
|
|
import { UserVO } from '@/api/system/user/types';
|
|
|
|
|
import FileUpload from '@/components/FileUpload/index.vue';
|
|
|
|
|
import { listCrmSupplierInfo, getCrmSupplierInfo, delCrmSupplierInfo, addCrmSupplierInfo, updateCrmSupplierInfo } from '@/api/oa/crm/crmSupplierInfo';
|
|
|
|
|
import { CrmSupplierInfoVO, CrmSupplierInfoQuery, CrmSupplierInfoForm } from '@/api/oa/crm/crmSupplierInfo/types';
|
|
|
|
|
import { listUser } from '@/api/system/user';
|
|
|
|
|
import { UserVO } from '@/api/system/user/types';
|
|
|
|
|
import FileUpload from '@/components/FileUpload/index.vue';
|
|
|
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
|
|
const { active_flag, supplier_type } = toRefs<any>(proxy?.useDict('active_flag', 'supplier_type'));
|
|
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
|
|
const { active_flag, supplier_type } = toRefs<any>(proxy?.useDict('active_flag', 'supplier_type'));
|
|
|
|
|
|
|
|
|
|
const crmSupplierInfoList = ref<CrmSupplierInfoVO[]>([]);
|
|
|
|
|
const userList = ref<UserVO[]>([]);
|
|
|
|
|
const buttonLoading = ref(false);
|
|
|
|
|
const loading = ref(true);
|
|
|
|
|
const showSearch = ref(true);
|
|
|
|
|
const ids = ref<Array<string | number>>([]);
|
|
|
|
|
const single = ref(true);
|
|
|
|
|
const multiple = ref(true);
|
|
|
|
|
const total = ref(0);
|
|
|
|
|
const crmSupplierInfoList = ref<CrmSupplierInfoVO[]>([]);
|
|
|
|
|
const userList = ref<UserVO[]>([]);
|
|
|
|
|
const buttonLoading = ref(false);
|
|
|
|
|
const loading = ref(true);
|
|
|
|
|
const showSearch = ref(true);
|
|
|
|
|
const ids = ref<Array<string | number>>([]);
|
|
|
|
|
const single = ref(true);
|
|
|
|
|
const multiple = ref(true);
|
|
|
|
|
const total = ref(0);
|
|
|
|
|
|
|
|
|
|
const queryFormRef = ref<ElFormInstance>();
|
|
|
|
|
const crmSupplierInfoFormRef = ref<ElFormInstance>();
|
|
|
|
|
const queryFormRef = ref<ElFormInstance>();
|
|
|
|
|
const crmSupplierInfoFormRef = ref<ElFormInstance>();
|
|
|
|
|
|
|
|
|
|
const dialog = reactive<DialogOption>({
|
|
|
|
|
const dialog = reactive<DialogOption>({
|
|
|
|
|
visible: false,
|
|
|
|
|
title: ''
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 列显隐信息
|
|
|
|
|
const columns = ref<FieldOption[]>([
|
|
|
|
|
// 列显隐信息
|
|
|
|
|
const columns = ref<FieldOption[]>([
|
|
|
|
|
{ key: 0, label: `供应商ID`, visible: false },
|
|
|
|
|
{ key: 1, label: `租户编号`, visible: false },
|
|
|
|
|
{ key: 2, label: `供应商名称`, visible: true },
|
|
|
|
|
@ -429,10 +435,10 @@
|
|
|
|
|
{ key: 25, label: `备注`, visible: true },
|
|
|
|
|
{ key: 26, label: `激活标识`, visible: true },
|
|
|
|
|
{ key: 27, label: `创建时间`, visible: true },
|
|
|
|
|
{ key: 28, label: `创建人`, visible: true },
|
|
|
|
|
]);
|
|
|
|
|
{ key: 28, label: `创建人`, visible: true }
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
const initFormData: CrmSupplierInfoForm = {
|
|
|
|
|
const initFormData: CrmSupplierInfoForm = {
|
|
|
|
|
supplierId: undefined,
|
|
|
|
|
supplierName: undefined,
|
|
|
|
|
mnemonicName: undefined,
|
|
|
|
|
@ -460,10 +466,10 @@
|
|
|
|
|
remark: undefined,
|
|
|
|
|
activeFlag: undefined,
|
|
|
|
|
ownerName: undefined,
|
|
|
|
|
createName: undefined,
|
|
|
|
|
}
|
|
|
|
|
const data = reactive<PageData<CrmSupplierInfoForm, CrmSupplierInfoQuery>>({
|
|
|
|
|
form: {...initFormData},
|
|
|
|
|
createName: undefined
|
|
|
|
|
};
|
|
|
|
|
const data = reactive<PageData<CrmSupplierInfoForm, CrmSupplierInfoQuery>>({
|
|
|
|
|
form: { ...initFormData },
|
|
|
|
|
queryParams: {
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
@ -493,126 +499,121 @@
|
|
|
|
|
activeFlag: undefined,
|
|
|
|
|
ownerName: undefined,
|
|
|
|
|
createName: undefined,
|
|
|
|
|
params: {
|
|
|
|
|
}
|
|
|
|
|
params: {}
|
|
|
|
|
},
|
|
|
|
|
rules: {
|
|
|
|
|
supplierName: [
|
|
|
|
|
{ required: true, message: "供应商名称不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
mnemonicName: [
|
|
|
|
|
{ required: true, message: "助记名称不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
supplierType: [
|
|
|
|
|
{ required: true, message: "供应商类型不能为空", trigger: "change" }
|
|
|
|
|
],
|
|
|
|
|
mainIndustry: [
|
|
|
|
|
{ required: true, message: "主营行业不能为空", trigger: "blur" }
|
|
|
|
|
]
|
|
|
|
|
supplierName: [{ required: true, message: '供应商名称不能为空', trigger: 'blur' }],
|
|
|
|
|
mnemonicName: [{ required: true, message: '助记名称不能为空', trigger: 'blur' }],
|
|
|
|
|
supplierType: [{ required: true, message: '供应商类型不能为空', trigger: 'change' }],
|
|
|
|
|
mainIndustry: [{ required: true, message: '主营行业不能为空', trigger: 'blur' }]
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const { queryParams, form, rules } = toRefs(data);
|
|
|
|
|
const { queryParams, form, rules } = toRefs(data);
|
|
|
|
|
|
|
|
|
|
/** 查询供应商信息列表 */
|
|
|
|
|
const getList = async () => {
|
|
|
|
|
/** 查询供应商信息列表 */
|
|
|
|
|
const getList = async () => {
|
|
|
|
|
loading.value = true;
|
|
|
|
|
const res = await listCrmSupplierInfo(queryParams.value);
|
|
|
|
|
crmSupplierInfoList.value = res.rows;
|
|
|
|
|
total.value = res.total;
|
|
|
|
|
loading.value = false;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** 获取用户列表 */
|
|
|
|
|
const getUserList = async () => {
|
|
|
|
|
/** 获取用户列表 */
|
|
|
|
|
const getUserList = async () => {
|
|
|
|
|
const res = await listUser({ pageNum: 1, pageSize: 1000 });
|
|
|
|
|
userList.value = res.rows;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** 取消按钮 */
|
|
|
|
|
const cancel = () => {
|
|
|
|
|
/** 取消按钮 */
|
|
|
|
|
const cancel = () => {
|
|
|
|
|
reset();
|
|
|
|
|
dialog.visible = false;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** 表单重置 */
|
|
|
|
|
const reset = () => {
|
|
|
|
|
form.value = {...initFormData};
|
|
|
|
|
/** 表单重置 */
|
|
|
|
|
const reset = () => {
|
|
|
|
|
form.value = { ...initFormData };
|
|
|
|
|
crmSupplierInfoFormRef.value?.resetFields();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
|
const handleQuery = () => {
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
|
const handleQuery = () => {
|
|
|
|
|
queryParams.value.pageNum = 1;
|
|
|
|
|
getList();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** 重置按钮操作 */
|
|
|
|
|
const resetQuery = () => {
|
|
|
|
|
/** 重置按钮操作 */
|
|
|
|
|
const resetQuery = () => {
|
|
|
|
|
queryFormRef.value?.resetFields();
|
|
|
|
|
handleQuery();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** 多选框选中数据 */
|
|
|
|
|
const handleSelectionChange = (selection: CrmSupplierInfoVO[]) => {
|
|
|
|
|
ids.value = selection.map(item => item.supplierId);
|
|
|
|
|
/** 多选框选中数据 */
|
|
|
|
|
const handleSelectionChange = (selection: CrmSupplierInfoVO[]) => {
|
|
|
|
|
ids.value = selection.map((item) => item.supplierId);
|
|
|
|
|
single.value = selection.length != 1;
|
|
|
|
|
multiple.value = !selection.length;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
const handleAdd = () => {
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
const handleAdd = () => {
|
|
|
|
|
reset();
|
|
|
|
|
form.value.activeFlag = '1';
|
|
|
|
|
dialog.visible = true;
|
|
|
|
|
dialog.title = "添加供应商信息";
|
|
|
|
|
}
|
|
|
|
|
dialog.title = '添加供应商信息';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
const handleUpdate = async (row?: CrmSupplierInfoVO) => {
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
const handleUpdate = async (row?: CrmSupplierInfoVO) => {
|
|
|
|
|
reset();
|
|
|
|
|
const _supplierId = row?.supplierId || ids.value[0]
|
|
|
|
|
const _supplierId = row?.supplierId || ids.value[0];
|
|
|
|
|
const res = await getCrmSupplierInfo(_supplierId);
|
|
|
|
|
Object.assign(form.value, res.data);
|
|
|
|
|
dialog.visible = true;
|
|
|
|
|
dialog.title = "修改供应商信息";
|
|
|
|
|
}
|
|
|
|
|
dialog.title = '修改供应商信息';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
const submitForm = () => {
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
const submitForm = () => {
|
|
|
|
|
crmSupplierInfoFormRef.value?.validate(async (valid: boolean) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
buttonLoading.value = true;
|
|
|
|
|
if (form.value.supplierId) {
|
|
|
|
|
await updateCrmSupplierInfo(form.value).finally(() => buttonLoading.value = false);
|
|
|
|
|
await updateCrmSupplierInfo(form.value).finally(() => (buttonLoading.value = false));
|
|
|
|
|
} else {
|
|
|
|
|
await addCrmSupplierInfo(form.value).finally(() => buttonLoading.value = false);
|
|
|
|
|
await addCrmSupplierInfo(form.value).finally(() => (buttonLoading.value = false));
|
|
|
|
|
}
|
|
|
|
|
proxy?.$modal.msgSuccess("操作成功");
|
|
|
|
|
proxy?.$modal.msgSuccess('操作成功');
|
|
|
|
|
dialog.visible = false;
|
|
|
|
|
await getList();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
|
const handleDelete = async (row?: CrmSupplierInfoVO) => {
|
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
|
const handleDelete = async (row?: CrmSupplierInfoVO) => {
|
|
|
|
|
const _supplierIds = row?.supplierId || ids.value;
|
|
|
|
|
await proxy?.$modal.confirm('是否确认删除供应商信息编号为"' + _supplierIds + '"的数据项?').finally(() => loading.value = false);
|
|
|
|
|
await proxy?.$modal.confirm('是否确认删除供应商信息编号为"' + _supplierIds + '"的数据项?').finally(() => (loading.value = false));
|
|
|
|
|
await delCrmSupplierInfo(_supplierIds);
|
|
|
|
|
proxy?.$modal.msgSuccess("删除成功");
|
|
|
|
|
proxy?.$modal.msgSuccess('删除成功');
|
|
|
|
|
await getList();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
|
const handleExport = () => {
|
|
|
|
|
proxy?.download('oa/crm/crmSupplierInfo/export', {
|
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
|
const handleExport = () => {
|
|
|
|
|
proxy?.download(
|
|
|
|
|
'oa/crm/crmSupplierInfo/export',
|
|
|
|
|
{
|
|
|
|
|
...queryParams.value
|
|
|
|
|
}, `crmSupplierInfo_${new Date().getTime()}.xlsx`)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
`crmSupplierInfo_${new Date().getTime()}.xlsx`
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
getList();
|
|
|
|
|
getUserList();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|