|
@@ -56,37 +56,44 @@
|
|
|
<el-card shadow="never">
|
|
<el-card shadow="never">
|
|
|
<template #header>
|
|
<template #header>
|
|
|
<el-row :gutter="10" class="mb8">
|
|
<el-row :gutter="10" class="mb8">
|
|
|
- <el-col :span="1.5" >
|
|
|
|
|
- 供应商审核信息列表
|
|
|
|
|
- </el-col>
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <el-col :span="1.5"> 供应商审核信息列表 </el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<el-table v-loading="loading" border :data="infoList" class="no-resize-table" @selection-change="handleSelectionChange">
|
|
<el-table v-loading="loading" border :data="infoList" class="no-resize-table" @selection-change="handleSelectionChange">
|
|
|
- <el-table-column label="供应商编号" align="center" prop="supplierNo" width="150" fixed="left" />
|
|
|
|
|
- <el-table-column label="供应商名称" align="left" prop="enterpriseName" width="250" fixed="left" />
|
|
|
|
|
-
|
|
|
|
|
- <el-table-column label="企业规模" align="center" prop="enterpriseScaleName" width="120">
|
|
|
|
|
-
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column label="注册时间" align="center" prop="createTime" width="150">
|
|
|
|
|
|
|
+ <el-table-column label="编号" align="center" prop="supplierNo" width="150" fixed="left" />
|
|
|
|
|
+ <el-table-column label="名称" align="left" prop="enterpriseName" fixed="left" />
|
|
|
|
|
+ <el-table-column label="注册时间" align="center" prop="createTime">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<span>{{ formatDate(scope.row.createTime) }}</span>
|
|
<span>{{ formatDate(scope.row.createTime) }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column label="经营类目" align="center" prop="operatingCategory" width="150" />
|
|
|
|
|
|
|
+ <el-table-column label="企业规模" align="center" prop="enterpriseScaleName"> </el-table-column>
|
|
|
|
|
+ <el-table-column label="采销经理" align="center" prop="productManager" />
|
|
|
|
|
+ <el-table-column label="产品专员" align="center" prop="buyer" />
|
|
|
|
|
+ <el-table-column label="类型" align="center" prop="buyer" />
|
|
|
|
|
+ <!-- 类型:新增/更新 -->
|
|
|
|
|
+
|
|
|
|
|
+ <!-- <el-table-column label="经营类目" align="center" prop="operatingCategory" width="150" />
|
|
|
<el-table-column label="供应品牌" align="center" prop="brandName" width="200" />
|
|
<el-table-column label="供应品牌" align="center" prop="brandName" width="200" />
|
|
|
<el-table-column label="供应区域(省)" align="left" prop="province" width="250">
|
|
<el-table-column label="供应区域(省)" align="left" prop="province" width="250">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
- <el-tooltip :content="scope.row.province" placement="top" :disabled="!scope.row.province || scope.row.province.split(',').filter(p => p.trim()).length <= 3">
|
|
|
|
|
|
|
+ <el-tooltip
|
|
|
|
|
+ :content="scope.row.province"
|
|
|
|
|
+ placement="top"
|
|
|
|
|
+ :disabled="!scope.row.province || scope.row.province.split(',').filter((p) => p.trim()).length <= 3"
|
|
|
|
|
+ >
|
|
|
<span>{{ formatProvinceDisplay(scope.row.province) }}</span>
|
|
<span>{{ formatProvinceDisplay(scope.row.province) }}</span>
|
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="供应区域(市)" align="left" prop="city" width="300">
|
|
<el-table-column label="供应区域(市)" align="left" prop="city" width="300">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
- <el-tooltip :content="scope.row.city" placement="top" :disabled="!scope.row.city || scope.row.city.split(',').filter(c => c.trim()).length <= 10">
|
|
|
|
|
|
|
+ <el-tooltip
|
|
|
|
|
+ :content="scope.row.city"
|
|
|
|
|
+ placement="top"
|
|
|
|
|
+ :disabled="!scope.row.city || scope.row.city.split(',').filter((c) => c.trim()).length <= 10"
|
|
|
|
|
+ >
|
|
|
<span>{{ formatCityDisplay(scope.row.city) }}</span>
|
|
<span>{{ formatCityDisplay(scope.row.city) }}</span>
|
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
</template>
|
|
</template>
|
|
@@ -102,23 +109,32 @@
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<span>{{ getStatusDisplayName(scope.row.supplyStatus) }}</span>
|
|
<span>{{ getStatusDisplayName(scope.row.supplyStatus) }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
|
|
|
|
+ </el-table-column> -->
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250" fixed="right">
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250" fixed="right">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<!-- 状态 0、3、4:待审核、审核未通过、待修改审核 -->
|
|
<!-- 状态 0、3、4:待审核、审核未通过、待修改审核 -->
|
|
|
- <template v-if="scope.row.supplyStatus === '0' || scope.row.supplyStatus === 0 || scope.row.supplyStatus === '3' || scope.row.supplyStatus === 3 || scope.row.supplyStatus === '4' || scope.row.supplyStatus === 4">
|
|
|
|
|
|
|
+ <template
|
|
|
|
|
+ v-if="
|
|
|
|
|
+ scope.row.supplyStatus === '0' ||
|
|
|
|
|
+ scope.row.supplyStatus === 0 ||
|
|
|
|
|
+ scope.row.supplyStatus === '3' ||
|
|
|
|
|
+ scope.row.supplyStatus === 3 ||
|
|
|
|
|
+ scope.row.supplyStatus === '4' ||
|
|
|
|
|
+ scope.row.supplyStatus === 4
|
|
|
|
|
+ "
|
|
|
|
|
+ >
|
|
|
<el-button link type="primary" @click="handleView(scope.row)" v-hasPermi="['customer:info:query']">查看</el-button>
|
|
<el-button link type="primary" @click="handleView(scope.row)" v-hasPermi="['customer:info:query']">查看</el-button>
|
|
|
<el-button link type="primary" @click="handleApprove(scope.row)" v-hasPermi="['customer:info:edit']">审核通过</el-button>
|
|
<el-button link type="primary" @click="handleApprove(scope.row)" v-hasPermi="['customer:info:edit']">审核通过</el-button>
|
|
|
<el-button link type="danger" @click="handleReject(scope.row)" v-hasPermi="['customer:info:edit']">驳回</el-button>
|
|
<el-button link type="danger" @click="handleReject(scope.row)" v-hasPermi="['customer:info:edit']">驳回</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<!-- 状态 1:正式供应商 -->
|
|
<!-- 状态 1:正式供应商 -->
|
|
|
<template v-else-if="scope.row.supplyStatus === '1' || scope.row.supplyStatus === 1">
|
|
<template v-else-if="scope.row.supplyStatus === '1' || scope.row.supplyStatus === 1">
|
|
|
<el-button link type="primary" @click="handleView(scope.row)" v-hasPermi="['customer:info:query']">查看</el-button>
|
|
<el-button link type="primary" @click="handleView(scope.row)" v-hasPermi="['customer:info:query']">查看</el-button>
|
|
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['customer:info:edit']">编辑</el-button>
|
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['customer:info:edit']">编辑</el-button>
|
|
|
<el-button link type="primary" @click="handleStopCooperation(scope.row)" v-hasPermi="['customer:info:edit']">停止合作</el-button>
|
|
<el-button link type="primary" @click="handleStopCooperation(scope.row)" v-hasPermi="['customer:info:edit']">停止合作</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<!-- 状态 2:停用 -->
|
|
<!-- 状态 2:停用 -->
|
|
|
<template v-else-if="scope.row.supplyStatus === '2' || scope.row.supplyStatus === 2">
|
|
<template v-else-if="scope.row.supplyStatus === '2' || scope.row.supplyStatus === 2">
|
|
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['customer:info:edit']">编辑</el-button>
|
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['customer:info:edit']">编辑</el-button>
|
|
@@ -143,7 +159,7 @@
|
|
|
<el-input v-model="form.membershipSize" placeholder="请输入人员规模" />
|
|
<el-input v-model="form.membershipSize" placeholder="请输入人员规模" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="固定电话" prop="fixedPhone">
|
|
<el-form-item label="固定电话" prop="fixedPhone">
|
|
|
- <el-input v-model="form.fixedPhone" type="textarea" placeholder="请输入内容" />
|
|
|
|
|
|
|
+ <el-input v-model="form.fixedPhone" type="textarea" placeholder="请输入内容" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="传真" prop="fax">
|
|
<el-form-item label="传真" prop="fax">
|
|
|
<el-input v-model="form.fax" placeholder="请输入传真" />
|
|
<el-input v-model="form.fax" placeholder="请输入传真" />
|
|
@@ -197,7 +213,7 @@
|
|
|
<el-input v-model="form.businessAddress" placeholder="请输入注册详细地址" />
|
|
<el-input v-model="form.businessAddress" placeholder="请输入注册详细地址" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="营业执照图片路径" prop="businessLicense">
|
|
<el-form-item label="营业执照图片路径" prop="businessLicense">
|
|
|
- <el-input v-model="form.businessLicense" type="textarea" placeholder="请输入内容" />
|
|
|
|
|
|
|
+ <el-input v-model="form.businessLicense" type="textarea" placeholder="请输入内容" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="发票抬头" prop="invoiceHeader">
|
|
<el-form-item label="发票抬头" prop="invoiceHeader">
|
|
|
<el-input v-model="form.invoiceHeader" placeholder="请输入发票抬头" />
|
|
<el-input v-model="form.invoiceHeader" placeholder="请输入发票抬头" />
|
|
@@ -221,7 +237,7 @@
|
|
|
<el-input v-model="form.invoiceLandline" placeholder="请输入发票电话" />
|
|
<el-input v-model="form.invoiceLandline" placeholder="请输入发票电话" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="供货范围" prop="scopeSupply">
|
|
<el-form-item label="供货范围" prop="scopeSupply">
|
|
|
- <el-input v-model="form.scopeSupply" type="textarea" placeholder="请输入内容" />
|
|
|
|
|
|
|
+ <el-input v-model="form.scopeSupply" type="textarea" placeholder="请输入内容" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="合作方式" prop="cooperateWay">
|
|
<el-form-item label="合作方式" prop="cooperateWay">
|
|
|
<el-input v-model="form.cooperateWay" placeholder="请输入合作方式" />
|
|
<el-input v-model="form.cooperateWay" placeholder="请输入合作方式" />
|
|
@@ -230,11 +246,13 @@
|
|
|
<el-input v-model="form.cooperateLevel" placeholder="请输入合作等级" />
|
|
<el-input v-model="form.cooperateLevel" placeholder="请输入合作等级" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="合同到期时间" prop="contractEndTime">
|
|
<el-form-item label="合同到期时间" prop="contractEndTime">
|
|
|
- <el-date-picker clearable
|
|
|
|
|
|
|
+ <el-date-picker
|
|
|
|
|
+ clearable
|
|
|
v-model="form.contractEndTime"
|
|
v-model="form.contractEndTime"
|
|
|
type="datetime"
|
|
type="datetime"
|
|
|
value-format="YYYY-MM-DD HH:mm:ss"
|
|
value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
- placeholder="请选择合同到期时间">
|
|
|
|
|
|
|
+ placeholder="请选择合同到期时间"
|
|
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="供应评分" prop="supplyScore">
|
|
<el-form-item label="供应评分" prop="supplyScore">
|
|
@@ -256,10 +274,10 @@
|
|
|
<el-input v-model="form.operatingCategory" placeholder="请输入经营品类" />
|
|
<el-input v-model="form.operatingCategory" placeholder="请输入经营品类" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="经营品牌" prop="operatingBrand">
|
|
<el-form-item label="经营品牌" prop="operatingBrand">
|
|
|
- <el-input v-model="form.operatingBrand" type="textarea" placeholder="请输入内容" />
|
|
|
|
|
|
|
+ <el-input v-model="form.operatingBrand" type="textarea" placeholder="请输入内容" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="其他客户" prop="otherCustomers">
|
|
<el-form-item label="其他客户" prop="otherCustomers">
|
|
|
- <el-input v-model="form.otherCustomers" type="textarea" placeholder="请输入内容" />
|
|
|
|
|
|
|
+ <el-input v-model="form.otherCustomers" type="textarea" placeholder="请输入内容" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="简称" prop="shortName">
|
|
<el-form-item label="简称" prop="shortName">
|
|
|
<el-input v-model="form.shortName" placeholder="请输入简称" />
|
|
<el-input v-model="form.shortName" placeholder="请输入简称" />
|
|
@@ -271,42 +289,38 @@
|
|
|
<el-input v-model="form.ownedCompany" placeholder="请输入所属公司" />
|
|
<el-input v-model="form.ownedCompany" placeholder="请输入所属公司" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="创建时间" prop="created">
|
|
<el-form-item label="创建时间" prop="created">
|
|
|
- <el-date-picker clearable
|
|
|
|
|
- v-model="form.created"
|
|
|
|
|
- type="datetime"
|
|
|
|
|
- value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
|
|
- placeholder="请选择创建时间">
|
|
|
|
|
|
|
+ <el-date-picker clearable v-model="form.created" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择创建时间">
|
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="修改时间" prop="modify">
|
|
<el-form-item label="修改时间" prop="modify">
|
|
|
- <el-date-picker clearable
|
|
|
|
|
- v-model="form.modify"
|
|
|
|
|
- type="datetime"
|
|
|
|
|
- value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
|
|
- placeholder="请选择修改时间">
|
|
|
|
|
|
|
+ <el-date-picker clearable v-model="form.modify" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择修改时间">
|
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="有效期开始时间" prop="validityFromDate">
|
|
<el-form-item label="有效期开始时间" prop="validityFromDate">
|
|
|
- <el-date-picker clearable
|
|
|
|
|
|
|
+ <el-date-picker
|
|
|
|
|
+ clearable
|
|
|
v-model="form.validityFromDate"
|
|
v-model="form.validityFromDate"
|
|
|
type="datetime"
|
|
type="datetime"
|
|
|
value-format="YYYY-MM-DD HH:mm:ss"
|
|
value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
- placeholder="请选择有效期开始时间">
|
|
|
|
|
|
|
+ placeholder="请选择有效期开始时间"
|
|
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="有效期结束时间" prop="validityToDate">
|
|
<el-form-item label="有效期结束时间" prop="validityToDate">
|
|
|
- <el-date-picker clearable
|
|
|
|
|
|
|
+ <el-date-picker
|
|
|
|
|
+ clearable
|
|
|
v-model="form.validityToDate"
|
|
v-model="form.validityToDate"
|
|
|
type="datetime"
|
|
type="datetime"
|
|
|
value-format="YYYY-MM-DD HH:mm:ss"
|
|
value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
- placeholder="请选择有效期结束时间">
|
|
|
|
|
|
|
+ placeholder="请选择有效期结束时间"
|
|
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="行号" prop="rowNo">
|
|
<el-form-item label="行号" prop="rowNo">
|
|
|
<el-input v-model="form.rowNo" placeholder="请输入行号" />
|
|
<el-input v-model="form.rowNo" placeholder="请输入行号" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="法人身份证图片路径" prop="personImage">
|
|
<el-form-item label="法人身份证图片路径" prop="personImage">
|
|
|
- <image-upload v-model="form.personImage"/>
|
|
|
|
|
|
|
+ <image-upload v-model="form.personImage" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="对接次数" prop="abutmentNo">
|
|
<el-form-item label="对接次数" prop="abutmentNo">
|
|
|
<el-input v-model="form.abutmentNo" placeholder="请输入对接次数" />
|
|
<el-input v-model="form.abutmentNo" placeholder="请输入对接次数" />
|
|
@@ -326,7 +340,17 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup name="Info" lang="ts">
|
|
<script setup name="Info" lang="ts">
|
|
|
-import { getApproveList, getInfo, delInfo, addInfo, updateInfo, getComSupTyList, getProductCategoryList, getComStaffList, getDictData } from '@/api/customer/info';
|
|
|
|
|
|
|
+import {
|
|
|
|
|
+ getApproveList,
|
|
|
|
|
+ getInfo,
|
|
|
|
|
+ delInfo,
|
|
|
|
|
+ addInfo,
|
|
|
|
|
+ updateInfo,
|
|
|
|
|
+ getComSupTyList,
|
|
|
|
|
+ getProductCategoryList,
|
|
|
|
|
+ getComStaffList,
|
|
|
|
|
+ getDictData
|
|
|
|
|
+} from '@/api/customer/info';
|
|
|
import { InfoVO, InfoQuery, InfoForm } from '@/api/customer/info/types';
|
|
import { InfoVO, InfoQuery, InfoForm } from '@/api/customer/info/types';
|
|
|
import { listType } from '@/api/system/type';
|
|
import { listType } from '@/api/system/type';
|
|
|
import { TypeVO } from '@/api/system/type/types';
|
|
import { TypeVO } from '@/api/system/type/types';
|
|
@@ -424,9 +448,9 @@ const initFormData: InfoForm = {
|
|
|
personImage: undefined,
|
|
personImage: undefined,
|
|
|
abutmentNo: undefined,
|
|
abutmentNo: undefined,
|
|
|
cooperative: undefined
|
|
cooperative: undefined
|
|
|
-}
|
|
|
|
|
|
|
+};
|
|
|
const data = reactive<PageData<InfoForm, InfoQuery>>({
|
|
const data = reactive<PageData<InfoForm, InfoQuery>>({
|
|
|
- form: {...initFormData},
|
|
|
|
|
|
|
+ form: { ...initFormData },
|
|
|
queryParams: {
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
@@ -492,166 +516,61 @@ const data = reactive<PageData<InfoForm, InfoQuery>>({
|
|
|
buyer: undefined,
|
|
buyer: undefined,
|
|
|
province: undefined,
|
|
province: undefined,
|
|
|
city: undefined,
|
|
city: undefined,
|
|
|
- params: {
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ params: {}
|
|
|
},
|
|
},
|
|
|
rules: {
|
|
rules: {
|
|
|
- supplierNo: [
|
|
|
|
|
- { required: true, message: "供应商编号不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- enterpriseName: [
|
|
|
|
|
- { required: true, message: "企业名称不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- membershipSize: [
|
|
|
|
|
- { required: true, message: "人员规模不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- supplierType: [
|
|
|
|
|
- { required: true, message: "供应商类型不能为空", trigger: "change" }
|
|
|
|
|
- ],
|
|
|
|
|
- cooperationType: [
|
|
|
|
|
- { required: true, message: "合作类型不能为空", trigger: "change" }
|
|
|
|
|
- ],
|
|
|
|
|
- fixedPhone: [
|
|
|
|
|
- { required: true, message: "固定电话不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- fax: [
|
|
|
|
|
- { required: true, message: "传真不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- url: [
|
|
|
|
|
- { required: true, message: "网址不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- postCode: [
|
|
|
|
|
- { required: true, message: "邮政编码不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- mailbox: [
|
|
|
|
|
- { required: true, message: "邮箱不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- officeProvince: [
|
|
|
|
|
- { required: true, message: "办公地址-省不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- officeCity: [
|
|
|
|
|
- { required: true, message: "办公地址-市不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- officeCounty: [
|
|
|
|
|
- { required: true, message: "办公地址-区/县不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- officeAddress: [
|
|
|
|
|
- { required: true, message: "办公详细地址不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- businessName: [
|
|
|
|
|
- { required: true, message: "营业执照名称不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- socialCreditCode: [
|
|
|
|
|
- { required: true, message: "统一社会信用代码不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- legalPersonName: [
|
|
|
|
|
- { required: true, message: "法人姓名不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- legalPersonId: [
|
|
|
|
|
- { required: true, message: "法人身份证号不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- registeredCapital: [
|
|
|
|
|
- { required: true, message: "注册资本不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- businessProvince: [
|
|
|
|
|
- { required: true, message: "注册地址-省不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- businessCity: [
|
|
|
|
|
- { required: true, message: "注册地址-市不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- businessCounty: [
|
|
|
|
|
- { required: true, message: "注册地址-区/县不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- businessAddress: [
|
|
|
|
|
- { required: true, message: "注册详细地址不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- businessLicense: [
|
|
|
|
|
- { required: true, message: "营业执照图片路径不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- invoiceType: [
|
|
|
|
|
- { required: true, message: "发票类型不能为空", trigger: "change" }
|
|
|
|
|
- ],
|
|
|
|
|
- invoiceHeader: [
|
|
|
|
|
- { required: true, message: "发票抬头不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- taxpayerIdentifier: [
|
|
|
|
|
- { required: true, message: "纳税人识别号不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- depositaryBank: [
|
|
|
|
|
- { required: true, message: "开户银行不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- rowNum: [
|
|
|
|
|
- { required: true, message: "行号不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- bankAccounts: [
|
|
|
|
|
- { required: true, message: "银行账号不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- invoiceAddress: [
|
|
|
|
|
- { required: true, message: "发票地址不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- invoiceLandline: [
|
|
|
|
|
- { required: true, message: "发票电话不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- scopeSupply: [
|
|
|
|
|
- { required: true, message: "供货范围不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- cooperateWay: [
|
|
|
|
|
- { required: true, message: "合作方式不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- contractEndTime: [
|
|
|
|
|
- { required: true, message: "合同到期时间不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- yearSales: [
|
|
|
|
|
- { required: true, message: "年销售额不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- supplierName: [
|
|
|
|
|
- { required: true, message: "供应商联系人姓名不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- supplierPhone: [
|
|
|
|
|
- { required: true, message: "供应商联系人电话不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- supplierPassword: [
|
|
|
|
|
- { required: true, message: "供应商登录密码不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- operatingCategory: [
|
|
|
|
|
- { required: true, message: "经营品类不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- operatingBrand: [
|
|
|
|
|
- { required: true, message: "经营品牌不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- otherCustomers: [
|
|
|
|
|
- { required: true, message: "其他客户不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- shortName: [
|
|
|
|
|
- { required: true, message: "简称不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- industrCategory: [
|
|
|
|
|
- { required: true, message: "所属行业不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- type: [
|
|
|
|
|
- { required: true, message: "类型不能为空", trigger: "change" }
|
|
|
|
|
- ],
|
|
|
|
|
- ownedCompany: [
|
|
|
|
|
- { required: true, message: "所属公司不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- modify: [
|
|
|
|
|
- { required: true, message: "修改时间不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- validityFromDate: [
|
|
|
|
|
- { required: true, message: "有效期开始时间不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- validityToDate: [
|
|
|
|
|
- { required: true, message: "有效期结束时间不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- rowNo: [
|
|
|
|
|
- { required: true, message: "行号不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- personImage: [
|
|
|
|
|
- { required: true, message: "法人身份证图片路径不能为空", trigger: "blur" }
|
|
|
|
|
- ],
|
|
|
|
|
- cooperative: [
|
|
|
|
|
- { required: true, message: "是否合作不能为空", trigger: "blur" }
|
|
|
|
|
- ]
|
|
|
|
|
|
|
+ supplierNo: [{ required: true, message: '供应商编号不能为空', trigger: 'blur' }],
|
|
|
|
|
+ enterpriseName: [{ required: true, message: '企业名称不能为空', trigger: 'blur' }],
|
|
|
|
|
+ membershipSize: [{ required: true, message: '人员规模不能为空', trigger: 'blur' }],
|
|
|
|
|
+ supplierType: [{ required: true, message: '供应商类型不能为空', trigger: 'change' }],
|
|
|
|
|
+ cooperationType: [{ required: true, message: '合作类型不能为空', trigger: 'change' }],
|
|
|
|
|
+ fixedPhone: [{ required: true, message: '固定电话不能为空', trigger: 'blur' }],
|
|
|
|
|
+ fax: [{ required: true, message: '传真不能为空', trigger: 'blur' }],
|
|
|
|
|
+ url: [{ required: true, message: '网址不能为空', trigger: 'blur' }],
|
|
|
|
|
+ postCode: [{ required: true, message: '邮政编码不能为空', trigger: 'blur' }],
|
|
|
|
|
+ mailbox: [{ required: true, message: '邮箱不能为空', trigger: 'blur' }],
|
|
|
|
|
+ officeProvince: [{ required: true, message: '办公地址-省不能为空', trigger: 'blur' }],
|
|
|
|
|
+ officeCity: [{ required: true, message: '办公地址-市不能为空', trigger: 'blur' }],
|
|
|
|
|
+ officeCounty: [{ required: true, message: '办公地址-区/县不能为空', trigger: 'blur' }],
|
|
|
|
|
+ officeAddress: [{ required: true, message: '办公详细地址不能为空', trigger: 'blur' }],
|
|
|
|
|
+ businessName: [{ required: true, message: '营业执照名称不能为空', trigger: 'blur' }],
|
|
|
|
|
+ socialCreditCode: [{ required: true, message: '统一社会信用代码不能为空', trigger: 'blur' }],
|
|
|
|
|
+ legalPersonName: [{ required: true, message: '法人姓名不能为空', trigger: 'blur' }],
|
|
|
|
|
+ legalPersonId: [{ required: true, message: '法人身份证号不能为空', trigger: 'blur' }],
|
|
|
|
|
+ registeredCapital: [{ required: true, message: '注册资本不能为空', trigger: 'blur' }],
|
|
|
|
|
+ businessProvince: [{ required: true, message: '注册地址-省不能为空', trigger: 'blur' }],
|
|
|
|
|
+ businessCity: [{ required: true, message: '注册地址-市不能为空', trigger: 'blur' }],
|
|
|
|
|
+ businessCounty: [{ required: true, message: '注册地址-区/县不能为空', trigger: 'blur' }],
|
|
|
|
|
+ businessAddress: [{ required: true, message: '注册详细地址不能为空', trigger: 'blur' }],
|
|
|
|
|
+ businessLicense: [{ required: true, message: '营业执照图片路径不能为空', trigger: 'blur' }],
|
|
|
|
|
+ invoiceType: [{ required: true, message: '发票类型不能为空', trigger: 'change' }],
|
|
|
|
|
+ invoiceHeader: [{ required: true, message: '发票抬头不能为空', trigger: 'blur' }],
|
|
|
|
|
+ taxpayerIdentifier: [{ required: true, message: '纳税人识别号不能为空', trigger: 'blur' }],
|
|
|
|
|
+ depositaryBank: [{ required: true, message: '开户银行不能为空', trigger: 'blur' }],
|
|
|
|
|
+ rowNum: [{ required: true, message: '行号不能为空', trigger: 'blur' }],
|
|
|
|
|
+ bankAccounts: [{ required: true, message: '银行账号不能为空', trigger: 'blur' }],
|
|
|
|
|
+ invoiceAddress: [{ required: true, message: '发票地址不能为空', trigger: 'blur' }],
|
|
|
|
|
+ invoiceLandline: [{ required: true, message: '发票电话不能为空', trigger: 'blur' }],
|
|
|
|
|
+ scopeSupply: [{ required: true, message: '供货范围不能为空', trigger: 'blur' }],
|
|
|
|
|
+ cooperateWay: [{ required: true, message: '合作方式不能为空', trigger: 'blur' }],
|
|
|
|
|
+ contractEndTime: [{ required: true, message: '合同到期时间不能为空', trigger: 'blur' }],
|
|
|
|
|
+ yearSales: [{ required: true, message: '年销售额不能为空', trigger: 'blur' }],
|
|
|
|
|
+ supplierName: [{ required: true, message: '供应商联系人姓名不能为空', trigger: 'blur' }],
|
|
|
|
|
+ supplierPhone: [{ required: true, message: '供应商联系人电话不能为空', trigger: 'blur' }],
|
|
|
|
|
+ supplierPassword: [{ required: true, message: '供应商登录密码不能为空', trigger: 'blur' }],
|
|
|
|
|
+ operatingCategory: [{ required: true, message: '经营品类不能为空', trigger: 'blur' }],
|
|
|
|
|
+ operatingBrand: [{ required: true, message: '经营品牌不能为空', trigger: 'blur' }],
|
|
|
|
|
+ otherCustomers: [{ required: true, message: '其他客户不能为空', trigger: 'blur' }],
|
|
|
|
|
+ shortName: [{ required: true, message: '简称不能为空', trigger: 'blur' }],
|
|
|
|
|
+ industrCategory: [{ required: true, message: '所属行业不能为空', trigger: 'blur' }],
|
|
|
|
|
+ type: [{ required: true, message: '类型不能为空', trigger: 'change' }],
|
|
|
|
|
+ ownedCompany: [{ required: true, message: '所属公司不能为空', trigger: 'blur' }],
|
|
|
|
|
+ modify: [{ required: true, message: '修改时间不能为空', trigger: 'blur' }],
|
|
|
|
|
+ validityFromDate: [{ required: true, message: '有效期开始时间不能为空', trigger: 'blur' }],
|
|
|
|
|
+ validityToDate: [{ required: true, message: '有效期结束时间不能为空', trigger: 'blur' }],
|
|
|
|
|
+ rowNo: [{ required: true, message: '行号不能为空', trigger: 'blur' }],
|
|
|
|
|
+ personImage: [{ required: true, message: '法人身份证图片路径不能为空', trigger: 'blur' }],
|
|
|
|
|
+ cooperative: [{ required: true, message: '是否合作不能为空', trigger: 'blur' }]
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -664,7 +583,7 @@ const getList = async () => {
|
|
|
infoList.value = res.rows;
|
|
infoList.value = res.rows;
|
|
|
total.value = res.total;
|
|
total.value = res.total;
|
|
|
loading.value = false;
|
|
loading.value = false;
|
|
|
-}
|
|
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
/** 获取企业规模字典 */
|
|
/** 获取企业规模字典 */
|
|
|
const getMembershipSizeDict = async () => {
|
|
const getMembershipSizeDict = async () => {
|
|
@@ -679,7 +598,7 @@ const getMembershipSizeDict = async () => {
|
|
|
|
|
|
|
|
/** 根据字典值获取字典标签 */
|
|
/** 根据字典值获取字典标签 */
|
|
|
const getMembershipSizeLabel = (dictValue: string) => {
|
|
const getMembershipSizeLabel = (dictValue: string) => {
|
|
|
- const dict = membershipSizeDict.value.find(item => item.dictValue === dictValue);
|
|
|
|
|
|
|
+ const dict = membershipSizeDict.value.find((item) => item.dictValue === dictValue);
|
|
|
return dict ? dict.dictLabel : dictValue;
|
|
return dict ? dict.dictLabel : dictValue;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -693,51 +612,51 @@ const formatDate = (dateStr: string) => {
|
|
|
const cancel = () => {
|
|
const cancel = () => {
|
|
|
reset();
|
|
reset();
|
|
|
dialog.visible = false;
|
|
dialog.visible = false;
|
|
|
-}
|
|
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
/** 表单重置 */
|
|
/** 表单重置 */
|
|
|
const reset = () => {
|
|
const reset = () => {
|
|
|
- form.value = {...initFormData};
|
|
|
|
|
|
|
+ form.value = { ...initFormData };
|
|
|
infoFormRef.value?.resetFields();
|
|
infoFormRef.value?.resetFields();
|
|
|
-}
|
|
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
/** 搜索按钮操作 */
|
|
/** 搜索按钮操作 */
|
|
|
const handleQuery = () => {
|
|
const handleQuery = () => {
|
|
|
queryParams.value.pageNum = 1;
|
|
queryParams.value.pageNum = 1;
|
|
|
getList();
|
|
getList();
|
|
|
-}
|
|
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
/** 重置按钮操作 */
|
|
/** 重置按钮操作 */
|
|
|
const resetQuery = () => {
|
|
const resetQuery = () => {
|
|
|
queryFormRef.value?.resetFields();
|
|
queryFormRef.value?.resetFields();
|
|
|
handleQuery();
|
|
handleQuery();
|
|
|
-}
|
|
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
/** 多选框选中数据 */
|
|
/** 多选框选中数据 */
|
|
|
const handleSelectionChange = (selection: InfoVO[]) => {
|
|
const handleSelectionChange = (selection: InfoVO[]) => {
|
|
|
- ids.value = selection.map(item => item.id);
|
|
|
|
|
|
|
+ ids.value = selection.map((item) => item.id);
|
|
|
single.value = selection.length != 1;
|
|
single.value = selection.length != 1;
|
|
|
multiple.value = !selection.length;
|
|
multiple.value = !selection.length;
|
|
|
-}
|
|
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
/** 新增按钮操作 */
|
|
/** 新增按钮操作 */
|
|
|
const handleAdd = () => {
|
|
const handleAdd = () => {
|
|
|
reset();
|
|
reset();
|
|
|
dialog.visible = true;
|
|
dialog.visible = true;
|
|
|
- dialog.title = "添加供应商信息";
|
|
|
|
|
|
|
+ dialog.title = '添加供应商信息';
|
|
|
dialog.readonly = false;
|
|
dialog.readonly = false;
|
|
|
-}
|
|
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
/** 修改按钮操作 */
|
|
/** 修改按钮操作 */
|
|
|
const handleUpdate = async (row?: InfoVO) => {
|
|
const handleUpdate = async (row?: InfoVO) => {
|
|
|
reset();
|
|
reset();
|
|
|
- const _id = row?.id || ids.value[0]
|
|
|
|
|
|
|
+ const _id = row?.id || ids.value[0];
|
|
|
const res = await getInfo(_id);
|
|
const res = await getInfo(_id);
|
|
|
Object.assign(form.value, res.data);
|
|
Object.assign(form.value, res.data);
|
|
|
dialog.visible = true;
|
|
dialog.visible = true;
|
|
|
- dialog.title = "修改供应商信息";
|
|
|
|
|
|
|
+ dialog.title = '修改供应商信息';
|
|
|
dialog.readonly = false;
|
|
dialog.readonly = false;
|
|
|
-}
|
|
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
|
const submitForm = () => {
|
|
const submitForm = () => {
|
|
@@ -745,25 +664,25 @@ const submitForm = () => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
buttonLoading.value = true;
|
|
buttonLoading.value = true;
|
|
|
if (form.value.id) {
|
|
if (form.value.id) {
|
|
|
- await updateInfo(form.value).finally(() => buttonLoading.value = false);
|
|
|
|
|
|
|
+ await updateInfo(form.value).finally(() => (buttonLoading.value = false));
|
|
|
} else {
|
|
} else {
|
|
|
- await addInfo(form.value).finally(() => buttonLoading.value = false);
|
|
|
|
|
|
|
+ await addInfo(form.value).finally(() => (buttonLoading.value = false));
|
|
|
}
|
|
}
|
|
|
- proxy?.$modal.msgSuccess("操作成功");
|
|
|
|
|
|
|
+ proxy?.$modal.msgSuccess('操作成功');
|
|
|
dialog.visible = false;
|
|
dialog.visible = false;
|
|
|
await getList();
|
|
await getList();
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
-}
|
|
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
/** 删除按钮操作 */
|
|
/** 删除按钮操作 */
|
|
|
const handleDelete = async (row?: InfoVO) => {
|
|
const handleDelete = async (row?: InfoVO) => {
|
|
|
const _ids = row?.id || ids.value;
|
|
const _ids = row?.id || ids.value;
|
|
|
- await proxy?.$modal.confirm('是否确认删除供应商信息编号为"' + _ids + '"的数据项?').finally(() => loading.value = false);
|
|
|
|
|
|
|
+ await proxy?.$modal.confirm('是否确认删除供应商信息编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
|
|
await delInfo(_ids);
|
|
await delInfo(_ids);
|
|
|
- proxy?.$modal.msgSuccess("删除成功");
|
|
|
|
|
|
|
+ proxy?.$modal.msgSuccess('删除成功');
|
|
|
await getList();
|
|
await getList();
|
|
|
-}
|
|
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
/** 查看按钮操作 */
|
|
/** 查看按钮操作 */
|
|
|
const handleView = (row: InfoVO) => {
|
|
const handleView = (row: InfoVO) => {
|
|
@@ -775,72 +694,76 @@ const handleView = (row: InfoVO) => {
|
|
|
id: row.id
|
|
id: row.id
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
-}
|
|
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
/** 审核通过按钮操作 */
|
|
/** 审核通过按钮操作 */
|
|
|
const handleApprove = async (row: InfoVO) => {
|
|
const handleApprove = async (row: InfoVO) => {
|
|
|
await proxy?.$modal.confirm('是否确认审核通过供应商"' + row.enterpriseName + '"?');
|
|
await proxy?.$modal.confirm('是否确认审核通过供应商"' + row.enterpriseName + '"?');
|
|
|
try {
|
|
try {
|
|
|
// 只传id和supplyStatus,避免将后端返回的名字字段传回去
|
|
// 只传id和supplyStatus,避免将后端返回的名字字段传回去
|
|
|
- await updateInfo({
|
|
|
|
|
|
|
+ await updateInfo({
|
|
|
id: row.id,
|
|
id: row.id,
|
|
|
- supplyStatus: '1'
|
|
|
|
|
|
|
+ supplyStatus: '1'
|
|
|
});
|
|
});
|
|
|
- proxy?.$modal.msgSuccess("审核通过成功");
|
|
|
|
|
|
|
+ proxy?.$modal.msgSuccess('审核通过成功');
|
|
|
await getList();
|
|
await getList();
|
|
|
} catch (e) {
|
|
} catch (e) {
|
|
|
console.error('审核通过失败:', e);
|
|
console.error('审核通过失败:', e);
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
/** 驳回按钮操作 */
|
|
/** 驳回按钮操作 */
|
|
|
const handleReject = async (row: InfoVO) => {
|
|
const handleReject = async (row: InfoVO) => {
|
|
|
await proxy?.$modal.confirm('是否确认驳回供应商"' + row.enterpriseName + '"?');
|
|
await proxy?.$modal.confirm('是否确认驳回供应商"' + row.enterpriseName + '"?');
|
|
|
try {
|
|
try {
|
|
|
// 只传id和supplyStatus
|
|
// 只传id和supplyStatus
|
|
|
- await updateInfo({
|
|
|
|
|
|
|
+ await updateInfo({
|
|
|
id: row.id,
|
|
id: row.id,
|
|
|
- supplyStatus: '3'
|
|
|
|
|
|
|
+ supplyStatus: '3'
|
|
|
});
|
|
});
|
|
|
- proxy?.$modal.msgSuccess("驳回成功");
|
|
|
|
|
|
|
+ proxy?.$modal.msgSuccess('驳回成功');
|
|
|
await getList();
|
|
await getList();
|
|
|
} catch (e) {
|
|
} catch (e) {
|
|
|
console.error('驳回失败:', e);
|
|
console.error('驳回失败:', e);
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
/** 停止合作按钮操作 */
|
|
/** 停止合作按钮操作 */
|
|
|
const handleStopCooperation = async (row: InfoVO) => {
|
|
const handleStopCooperation = async (row: InfoVO) => {
|
|
|
await proxy?.$modal.confirm('是否确认停止与供应商"' + row.enterpriseName + '"的合作?');
|
|
await proxy?.$modal.confirm('是否确认停止与供应商"' + row.enterpriseName + '"的合作?');
|
|
|
// 只传id和supplyStatus
|
|
// 只传id和supplyStatus
|
|
|
- const updateData = {
|
|
|
|
|
- id: row.id,
|
|
|
|
|
- supplyStatus: '2'
|
|
|
|
|
|
|
+ const updateData = {
|
|
|
|
|
+ id: row.id,
|
|
|
|
|
+ supplyStatus: '2'
|
|
|
};
|
|
};
|
|
|
await updateInfo(updateData);
|
|
await updateInfo(updateData);
|
|
|
- proxy?.$modal.msgSuccess("操作成功");
|
|
|
|
|
|
|
+ proxy?.$modal.msgSuccess('操作成功');
|
|
|
await getList();
|
|
await getList();
|
|
|
-}
|
|
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
/** 恢复合作按钮操作 */
|
|
/** 恢复合作按钮操作 */
|
|
|
const handleResumeCooperation = async (row: InfoVO) => {
|
|
const handleResumeCooperation = async (row: InfoVO) => {
|
|
|
await proxy?.$modal.confirm('是否确认恢复与供应商"' + row.enterpriseName + '"的合作?');
|
|
await proxy?.$modal.confirm('是否确认恢复与供应商"' + row.enterpriseName + '"的合作?');
|
|
|
// 只传id和supplyStatus
|
|
// 只传id和supplyStatus
|
|
|
- const updateData = {
|
|
|
|
|
- id: row.id,
|
|
|
|
|
- supplyStatus: '1'
|
|
|
|
|
|
|
+ const updateData = {
|
|
|
|
|
+ id: row.id,
|
|
|
|
|
+ supplyStatus: '1'
|
|
|
};
|
|
};
|
|
|
await updateInfo(updateData);
|
|
await updateInfo(updateData);
|
|
|
- proxy?.$modal.msgSuccess("已恢复合作");
|
|
|
|
|
|
|
+ proxy?.$modal.msgSuccess('已恢复合作');
|
|
|
await getList();
|
|
await getList();
|
|
|
-}
|
|
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
/** 导出按钮操作 */
|
|
/** 导出按钮操作 */
|
|
|
const handleExport = () => {
|
|
const handleExport = () => {
|
|
|
- proxy?.download('customer/info/export', {
|
|
|
|
|
- ...queryParams.value
|
|
|
|
|
- }, `info_${new Date().getTime()}.xlsx`)
|
|
|
|
|
-}
|
|
|
|
|
|
|
+ proxy?.download(
|
|
|
|
|
+ 'customer/info/export',
|
|
|
|
|
+ {
|
|
|
|
|
+ ...queryParams.value
|
|
|
|
|
+ },
|
|
|
|
|
+ `info_${new Date().getTime()}.xlsx`
|
|
|
|
|
+ );
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
/** 获取供应商类型列表 */
|
|
/** 获取供应商类型列表 */
|
|
|
const getSupplierTypeList = async () => {
|
|
const getSupplierTypeList = async () => {
|
|
@@ -865,7 +788,7 @@ const getProductCategoryData = async () => {
|
|
|
} catch (e) {
|
|
} catch (e) {
|
|
|
console.error('获取产品分类失败', e);
|
|
console.error('获取产品分类失败', e);
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
/** 获取人员信息列表 */
|
|
/** 获取人员信息列表 */
|
|
|
const getComStaffData = async () => {
|
|
const getComStaffData = async () => {
|
|
@@ -878,40 +801,40 @@ const getComStaffData = async () => {
|
|
|
} catch (e) {
|
|
} catch (e) {
|
|
|
console.error('获取人员信息失败', e);
|
|
console.error('获取人员信息失败', e);
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
/** 根据供应商类型名称获取显示名称 */
|
|
/** 根据供应商类型名称获取显示名称 */
|
|
|
const getSupplierTypeName = (typeName: string) => {
|
|
const getSupplierTypeName = (typeName: string) => {
|
|
|
- const item = supplierTypeList.value.find(t => t.supplierTypeName === typeName);
|
|
|
|
|
|
|
+ const item = supplierTypeList.value.find((t) => t.supplierTypeName === typeName);
|
|
|
return item ? item.supplierTypeName : typeName;
|
|
return item ? item.supplierTypeName : typeName;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
/** 根据categoryNo获取categoryName */
|
|
/** 根据categoryNo获取categoryName */
|
|
|
const getCategoryName = (categoryNo: string) => {
|
|
const getCategoryName = (categoryNo: string) => {
|
|
|
- const item = productCategoryList.value.find(c => c.categoryNo === categoryNo);
|
|
|
|
|
|
|
+ const item = productCategoryList.value.find((c) => c.categoryNo === categoryNo);
|
|
|
return item ? item.categoryName : categoryNo;
|
|
return item ? item.categoryName : categoryNo;
|
|
|
-}
|
|
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
/** 根据staffId获取staffName */
|
|
/** 根据staffId获取staffName */
|
|
|
const getStaffName = (staffId: string) => {
|
|
const getStaffName = (staffId: string) => {
|
|
|
- const item = comStaffList.value.find(s => s.staffId === staffId);
|
|
|
|
|
|
|
+ const item = comStaffList.value.find((s) => s.staffId === staffId);
|
|
|
return item ? item.staffName : staffId;
|
|
return item ? item.staffName : staffId;
|
|
|
-}
|
|
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
/** 根据状态码获取状态显示名称 */
|
|
/** 根据状态码获取状态显示名称 */
|
|
|
const getStatusDisplayName = (statusCode: number) => {
|
|
const getStatusDisplayName = (statusCode: number) => {
|
|
|
return getSupplierStatusDisplayName(statusCode);
|
|
return getSupplierStatusDisplayName(statusCode);
|
|
|
-}
|
|
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
/** 根据合作状态码获取合作状态显示名称 */
|
|
/** 根据合作状态码获取合作状态显示名称 */
|
|
|
const getCooperationStatusDisplayName = (statusCode: number) => {
|
|
const getCooperationStatusDisplayName = (statusCode: number) => {
|
|
|
return getSupplierCooperationStatusDisplayName(statusCode);
|
|
return getSupplierCooperationStatusDisplayName(statusCode);
|
|
|
-}
|
|
|
|
|
|
|
+};
|
|
|
|
|
|
|
|
/** 格式化省份显示:只显示第一个省份,其余用...表示 */
|
|
/** 格式化省份显示:只显示第一个省份,其余用...表示 */
|
|
|
const formatProvinceDisplay = (province: string) => {
|
|
const formatProvinceDisplay = (province: string) => {
|
|
|
if (!province) return '';
|
|
if (!province) return '';
|
|
|
- const provinces = province.split(',').filter(p => p.trim());
|
|
|
|
|
|
|
+ const provinces = province.split(',').filter((p) => p.trim());
|
|
|
if (provinces.length === 0) return '';
|
|
if (provinces.length === 0) return '';
|
|
|
if (provinces.length === 1) return provinces[0];
|
|
if (provinces.length === 1) return provinces[0];
|
|
|
return `${provinces[0]}...`;
|
|
return `${provinces[0]}...`;
|
|
@@ -920,7 +843,7 @@ const formatProvinceDisplay = (province: string) => {
|
|
|
/** 格式化城市显示:显示前10个城市,其余用...表示 */
|
|
/** 格式化城市显示:显示前10个城市,其余用...表示 */
|
|
|
const formatCityDisplay = (city: string) => {
|
|
const formatCityDisplay = (city: string) => {
|
|
|
if (!city) return '';
|
|
if (!city) return '';
|
|
|
- const cities = city.split(',').filter(c => c.trim());
|
|
|
|
|
|
|
+ const cities = city.split(',').filter((c) => c.trim());
|
|
|
if (cities.length === 0) return '';
|
|
if (cities.length === 0) return '';
|
|
|
if (cities.length <= 10) return cities.join(',');
|
|
if (cities.length <= 10) return cities.join(',');
|
|
|
return `${cities.slice(0, 10).join(',')}...`;
|
|
return `${cities.slice(0, 10).join(',')}...`;
|
|
@@ -945,21 +868,24 @@ onMounted(async () => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
getList();
|
|
getList();
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 禁用表格列宽调整
|
|
// 禁用表格列宽调整
|
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
|
const table = document.querySelector('.no-resize-table');
|
|
const table = document.querySelector('.no-resize-table');
|
|
|
if (table) {
|
|
if (table) {
|
|
|
- table.addEventListener('mousedown', (e: any) => {
|
|
|
|
|
- const target = e.target as HTMLElement;
|
|
|
|
|
- // 阻止在表头边界处的鼠标按下事件
|
|
|
|
|
- if (target.classList.contains('el-table__column-resize-proxy') ||
|
|
|
|
|
- target.closest('.el-table__column-resize-proxy')) {
|
|
|
|
|
- e.preventDefault();
|
|
|
|
|
- e.stopPropagation();
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- }, true);
|
|
|
|
|
|
|
+ table.addEventListener(
|
|
|
|
|
+ 'mousedown',
|
|
|
|
|
+ (e: any) => {
|
|
|
|
|
+ const target = e.target as HTMLElement;
|
|
|
|
|
+ // 阻止在表头边界处的鼠标按下事件
|
|
|
|
|
+ if (target.classList.contains('el-table__column-resize-proxy') || target.closest('.el-table__column-resize-proxy')) {
|
|
|
|
|
+ e.preventDefault();
|
|
|
|
|
+ e.stopPropagation();
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ true
|
|
|
|
|
+ );
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
@@ -1000,7 +926,7 @@ onMounted(async () => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.no-resize-table :deep(.el-table__header th.el-table__cell) {
|
|
.no-resize-table :deep(.el-table__header th.el-table__cell) {
|
|
|
- border-right: 1px solid #EBEEF5;
|
|
|
|
|
|
|
+ border-right: 1px solid #ebeef5;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/* 禁用拖动事件 */
|
|
/* 禁用拖动事件 */
|