Browse Source

客户列表增加主体

dev
马远东 1 month ago
parent
commit
855f79033f
  1. 406
      src/views/basicdata/brand/basicClient.vue

406
src/views/basicdata/brand/basicClient.vue

@ -10,21 +10,12 @@
<el-form-item label="客户类型:"> <el-form-item label="客户类型:">
<el-select v-model="query.clientType" class="m-2" placeholder="请选择客户端类型"> <el-select v-model="query.clientType" class="m-2" placeholder="请选择客户端类型">
<el-option <el-option v-for="item in clientType" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
v-for="item in clientType"
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictKey"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="地址:"> <el-form-item label="地址:">
<el-cascader <el-cascader :options="optioner" v-model="query.bladeRegionProvinceId" :props="{ checkStrictly: true }">
:options="optioner"
v-model="query.bladeRegionProvinceId"
:props="{ checkStrictly: true }"
>
<template #default="{ node, data }"> <template #default="{ node, data }">
<span>{{ data.label }}</span> <span>{{ data.label }}</span>
<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span> <span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
@ -33,18 +24,9 @@
</el-form-item> </el-form-item>
<el-form-item label="合同开始时间:" class="el-times"> <el-form-item label="合同开始时间:" class="el-times">
<el-date-picker <el-date-picker v-model="dataShi" type="daterange" unlink-panels range-separator=""
v-model="dataShi" start-placeholder="开始时间" end-placeholder="结束时间" :shortcuts="shortcuts" :size="'default'"
type="daterange" format="YYYY/MM/DD" value-format="YYYY-MM-DD HH:mm:ss" />
unlink-panels
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
:shortcuts="shortcuts"
:size="'default'"
format="YYYY/MM/DD"
value-format="YYYY-MM-DD HH:mm:ss"
/>
</el-form-item> </el-form-item>
<!-- <el-form-item label="合同结束时间:">--> <!-- <el-form-item label="合同结束时间:">-->
<!-- <el-input v-model="query.contractEntTime" placeholder="请输入合同结束时间"></el-input>--> <!-- <el-input v-model="query.contractEntTime" placeholder="请输入合同结束时间"></el-input>-->
@ -61,9 +43,7 @@
<!-- 头部左侧按钮模块 --> <!-- 头部左侧按钮模块 -->
<div class="avue-crud__left"> <div class="avue-crud__left">
<el-button type="primary" icon="el-icon-plus" @click="handleAdd"> </el-button> <el-button type="primary" icon="el-icon-plus" @click="handleAdd"> </el-button>
<el-button type="danger" icon="el-icon-delete" @click="handleDelete" plain <el-button type="danger" icon="el-icon-delete" @click="handleDelete" plain> </el-button>
> </el-button
>
<el-button type="danger" icon="Upload" @click="handleImport"> </el-button> <el-button type="danger" icon="Upload" @click="handleImport"> </el-button>
</div> </div>
<!-- 头部右侧按钮模块 --> <!-- 头部右侧按钮模块 -->
@ -74,25 +54,12 @@
</div> </div>
</div> </div>
</el-row> </el-row>
<tablecmt <tablecmt class="tableNode" :columnList="columnList" :tableData="data" :loading="loading" @inputTxt="inputsc"
class="tableNode" @timeCheck="timesc" @btnCheck="btnsc" @selectCheck="selectsc" @selection="selectionChange"
:columnList="columnList" @makeCargo="makeCargo">
:tableData="data"
:loading="loading"
@inputTxt="inputsc"
@timeCheck="timesc"
@btnCheck="btnsc"
@selectCheck="selectsc"
@selection="selectionChange"
@makeCargo="makeCargo"
>
<template #default="slotProps"> <template #default="slotProps">
<el-text type="primary" text icon="el-icon-view" @click="handleView(slotProps.scope.row)" <el-text type="primary" text icon="el-icon-view" @click="handleView(slotProps.scope.row)">查看</el-text>
>查看</el-text <el-text type="primary" text icon="el-icon-edit" @click="handleEdit(slotProps.scope.row)">编辑</el-text>
>
<el-text type="primary" text icon="el-icon-edit" @click="handleEdit(slotProps.scope.row)"
>编辑</el-text
>
<el-text type="primary" text icon="el-icon-delete" @click="rowDel(slotProps.scope.row)"> <el-text type="primary" text icon="el-icon-delete" @click="rowDel(slotProps.scope.row)">
删除 删除
</el-text> </el-text>
@ -138,27 +105,13 @@
<div class="avue-crud__pagination flex-c-sb" style="width: 100%"> <div class="avue-crud__pagination flex-c-sb" style="width: 100%">
<div style="font-size: 14px">勾选数量: {{ selectionList.length }}</div> <div style="font-size: 14px">勾选数量: {{ selectionList.length }}</div>
<!-- 分页模块 --> <!-- 分页模块 -->
<el-pagination <el-pagination align="right" background @size-change="sizeChange" @current-change="currentChange"
align="right" :current-page="page.currentPage" :page-sizes="[30, 50, 80, 120, 5000]" :page-size="page.pageSize"
background layout="total, sizes, prev, pager, next, jumper" :total="page.total">
@size-change="sizeChange"
@current-change="currentChange"
:current-page="page.currentPage"
:page-sizes="[30, 50, 80, 120, 5000]"
:page-size="page.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="page.total"
>
</el-pagination> </el-pagination>
</div> </div>
<el-dialog <el-dialog :modal-append-to-body="false" :append-to-body="false" title="客户导入" append-to-body v-model="excelBox"
:modal-append-to-body="false" width="555px">
:append-to-body="false"
title="客户导入"
append-to-body
v-model="excelBox"
width="555px"
>
<!-- <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter"> <!-- <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
<template #excelTemplate> <template #excelTemplate>
<a <a
@ -190,45 +143,25 @@
</div> </div>
<div v-loading="loadingObj.UploadLoadong"> <div v-loading="loadingObj.UploadLoadong">
<el-upload <el-upload class="upload-demo" drag :headers="headers"
class="upload-demo" action="/api/logpm-basicdata/basicdataClient/import-basicDataClient" :before-upload="handleBeforeUpload"
drag :on-success="handleSuccess" :on-error="handleClose" multiple>
:headers="headers"
action="/api/logpm-basicdata/basicdataClient/import-basicDataClient"
:before-upload="handleBeforeUpload"
:on-success="handleSuccess"
:on-error="handleClose"
multiple
>
<el-icon class="el-icon--upload"><upload-filled /></el-icon> <el-icon class="el-icon--upload"><upload-filled /></el-icon>
<div class="el-upload__text">拖拽文件或 <em>点击上传</em></div> <div class="el-upload__text">拖拽文件或 <em>点击上传</em></div>
</el-upload> </el-upload>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog <el-dialog :modal-append-to-body="false" :append-to-body="false" title="文件校验" append-to-body
:modal-append-to-body="false" v-model="Fileverification" width="555px">
:append-to-body="false"
title="文件校验"
append-to-body
v-model="Fileverification"
width="555px"
>
<div> <div>
<el-divider content-position="left">文件校验</el-divider> <el-divider content-position="left">文件校验</el-divider>
</div> </div>
<div v-loading="FileverificationLoadong"> <div v-loading="FileverificationLoadong">
<el-upload <el-upload class="upload-demo" drag :headers="headers"
class="upload-demo" action="/api/logpm-basicdata/basicdataClient/checkImportBasicDataClient" :before-upload="handleBeforeUpload"
drag :on-success="handleSuccess" :on-error="handleClose" multiple>
:headers="headers"
action="/api/logpm-basicdata/basicdataClient/checkImportBasicDataClient"
:before-upload="handleBeforeUpload"
:on-success="handleSuccess"
:on-error="handleClose"
multiple
>
<el-icon class="el-icon--upload"><upload-filled /></el-icon> <el-icon class="el-icon--upload"><upload-filled /></el-icon>
<div class="el-upload__text">拖拽文件或 <em>点击上传</em></div> <div class="el-upload__text">拖拽文件或 <em>点击上传</em></div>
</el-upload> </el-upload>
@ -236,19 +169,8 @@
</el-dialog> </el-dialog>
<!-- 表单模块 --> <!-- 表单模块 -->
<el-dialog <el-dialog destroy-on-close :modal-append-to-body="false" :append-to-body="false" :title="title" v-model="box"
destroy-on-close width="40%" align-center :before-close="beforeClose" :close-on-click-modal="false" append-to-body draggable>
:modal-append-to-body="false"
:append-to-body="false"
:title="title"
v-model="box"
width="40%"
align-center
:before-close="beforeClose"
:close-on-click-modal="false"
append-to-body
draggable
>
<div v-loading="loadingObj.submitLoading"> <div v-loading="loadingObj.submitLoading">
<el-form :disabled="view" ref="form" :model="form" :rules="rules" label-width="120px"> <el-form :disabled="view" ref="form" :model="form" :rules="rules" label-width="120px">
<!-- 表单字段 --> <!-- 表单字段 -->
@ -256,73 +178,41 @@
<!-- :validate-method="validateInput" --> <!-- :validate-method="validateInput" -->
<!-- :disabled="viewClientEntd" --> <!-- :disabled="viewClientEntd" -->
<el-input <el-input v-model="form.clientCode" placeholder="请输入客户编码" style="width: 100%" disabled />
v-model="form.clientCode"
placeholder="请输入客户编码"
style="width: 100%"
disabled
/>
</el-form-item> </el-form-item>
<el-form-item label="客户名称" prop="clientName"> <el-form-item label="客户名称" prop="clientName">
<el-input <el-input v-model.trim="form.clientName" placeholder="请输入客户名称" style="width: 100%" />
v-model.trim="form.clientName"
placeholder="请输入客户名称"
style="width: 100%"
/>
</el-form-item> </el-form-item>
<el-form-item label="客户类型" prop="clientType"> <el-form-item label="客户类型" prop="clientType">
<el-select <el-select v-model="form.clientType" class="m-2" placeholder="请选择客户端类型" style="width: 100%">
v-model="form.clientType" <el-option v-for="item in clientType" :key="item.dictKey" :label="item.dictValue"
class="m-2" :value="item.dictKey" />
placeholder="请选择客户端类型"
style="width: 100%"
>
<el-option
v-for="item in clientType"
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictKey"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="结算对象类型" prop="cleanObjType"> <el-form-item label="结算对象类型" prop="cleanObjType">
<el-select <el-select v-model="form.cleanObjType" class="m-2" placeholder="请选择客户端类型" style="width: 100%">
v-model="form.cleanObjType" <el-option v-for="item in Settlementobjecttype" :key="item.dictKey" :label="item.dictValue"
class="m-2" :value="item.dictKey" />
placeholder="请选择客户端类型" </el-select>
style="width: 100%" </el-form-item>
>
<el-option <el-form-item label="客户主体" v-if="form.cleanObjType !=3">
v-for="item in Settlementobjecttype" <el-select v-model="form.mainId" class="m-2" placeholder="请选择客户主体" style="width: 100%" filterable>
:key="item.dictKey" <el-option v-for="item in dictList" :key="item.id" :label="item.name" :value="item.id" />
:label="item.dictValue"
:value="item.dictKey"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="服务类型" prop="typeServiceList"> <el-form-item label="服务类型" prop="typeServiceList">
<el-select <el-select v-model="form.typeServiceList" multiple placeholder="请选择" style="width: 100%"
v-model="form.typeServiceList" @change="coverCharge">
multiple <el-option v-for="item in freightType" :key="item.dictKey" :label="item.dictValue"
placeholder="请选择" :value="item.dictKey">
style="width: 100%"
@change="coverCharge"
>
<el-option
v-for="item in freightType"
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictKey"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="配送类型" prop="businessType" v-if="distriType"> <el-form-item label="配送类型" prop="businessType" v-if="distriType">
<el-radio-group <el-radio-group v-model="form.businessType" class="ml-4" v-for="item in distributionType">
v-model="form.businessType"
class="ml-4"
v-for="item in distributionType"
>
<el-radio :label="item.dictKey" size="large" style="margin-right: 25px">{{ <el-radio :label="item.dictKey" size="large" style="margin-right: 25px">{{
item.dictValue item.dictValue
}}</el-radio> }}</el-radio>
@ -330,29 +220,15 @@
</el-form-item> </el-form-item>
<el-form-item label="联系人" prop="linkman" v-if="viewEntd"> <el-form-item label="联系人" prop="linkman" v-if="viewEntd">
<el-input <el-input v-model.trim="form.linkman" placeholder="请输入联系人" style="width: 100%" />
v-model.trim="form.linkman"
placeholder="请输入联系人"
style="width: 100%"
/>
</el-form-item> </el-form-item>
<el-form-item label="联系电话" prop="phone" v-if="viewEntd"> <el-form-item label="联系电话" prop="phone" v-if="viewEntd">
<el-input <el-input v-model.trim="form.phone" placeholder="请输入联系电话" style="width: 100%" />
v-model.trim="form.phone"
placeholder="请输入联系电话"
style="width: 100%"
/>
</el-form-item> </el-form-item>
<el-form-item label="地址" prop="bladeRegionProvinceId"> <el-form-item label="地址" prop="bladeRegionProvinceId">
<el-cascader <el-cascader :options="optioner" style="width: 100%" v-model="form.bladeRegionProvinceId" :props="{
:options="optioner"
style="width: 100%"
v-model="form.bladeRegionProvinceId"
:props="{
checkStrictly: true, checkStrictly: true,
}" }" filterable>
filterable
>
<template #default="{ node, data }"> <template #default="{ node, data }">
<span>{{ data.label }}</span> <span>{{ data.label }}</span>
<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span> <span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
@ -360,80 +236,43 @@
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="详细地址"> <el-form-item label="详细地址">
<el-input <el-input v-model.trim="form.detailedly" placeholder="请填写详细地址" style="width: 100%" />
v-model.trim="form.detailedly"
placeholder="请填写详细地址"
style="width: 100%"
/>
</el-form-item> </el-form-item>
<el-form-item label="默认付款方式" prop="defaultPaymentMethods"> <el-form-item label="默认付款方式" prop="defaultPaymentMethods">
<el-select v-model="form.defaultPaymentMethods" placeholder="请选择默认付款方式"> <el-select v-model="form.defaultPaymentMethods" placeholder="请选择默认付款方式">
<el-option <el-option v-for="item in defaultPaymentMethodsOptions" :key="item.value" :label="item.dictValue"
v-for="item in defaultPaymentMethodsOptions" :value="item.dictKey" />
:key="item.value"
:label="item.dictValue"
:value="item.dictKey"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="合同附件" prop="leaseAccessories" style="width: 100%"> <el-form-item label="合同附件" prop="leaseAccessories" style="width: 100%">
<el-upload <el-upload v-model:file-list="fileList" class="upload-demo" :action="action" :headers="headers" multiple
v-model:file-list="fileList" :on-preview="handlePreview" :on-success="(response, file, fileList) => {
class="upload-demo"
:action="action"
:headers="headers"
multiple
:on-preview="handlePreview"
:on-success="
(response, file, fileList) => {
uploadSuccess(fileList); uploadSuccess(fileList);
} }
" " :on-remove="handleRemove" :before-remove="beforeRemove" :before-upload="beforeUploadFn" :limit="3"
:on-remove="handleRemove" :on-exceed="handleExceed">
:before-remove="beforeRemove"
:before-upload="beforeUploadFn"
:limit="3"
:on-exceed="handleExceed"
>
<el-button type="Primary" icon="Position">上传</el-button> <el-button type="Primary" icon="Position">上传</el-button>
<template #tip> <template #tip>
<div class="el-upload__tip">大小不超过500KB的jpg/png文件</div> <div class="el-upload__tip">大小不超过500KB的jpg/png文件</div>
</template> </template>
</el-upload> </el-upload>
<el-image-viewer <el-image-viewer v-if="showImgViewer" :url-list="imgPreviewUrl" @close="handleCo" :z-index="300"
v-if="showImgViewer" fit="cover" />
:url-list="imgPreviewUrl"
@close="handleCo"
:z-index="300"
fit="cover"
/>
</el-form-item> </el-form-item>
<el-form-item label="合同开始时间" prop="contractStartTime" label-width="120px"> <el-form-item label="合同开始时间" prop="contractStartTime" label-width="120px">
<el-date-picker <el-date-picker v-model="form.contractStartTime" type="date" placeholder="选择时间" format="YYYY/MM/DD"
v-model="form.contractStartTime" value-format="YYYY-MM-DD" />
type="date"
placeholder="选择时间"
format="YYYY/MM/DD"
value-format="YYYY-MM-DD"
/>
</el-form-item> </el-form-item>
<el-form-item label="合同结束时间" prop="contractEntTime" label-width="120px"> <el-form-item label="合同结束时间" prop="contractEntTime" label-width="120px">
<el-date-picker <el-date-picker v-model="form.contractEntTime" type="date" placeholder="选择时间" format="YYYY/MM/DD"
v-model="form.contractEntTime" value-format="YYYY-MM-DD" />
type="date"
placeholder="选择时间"
format="YYYY/MM/DD"
value-format="YYYY-MM-DD"
/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- 表单按钮 --> <!-- 表单按钮 -->
<div v-if="!view" class="flex-c-c"> <div v-if="!view" class="flex-c-c">
<el-button type="primary" icon="el-icon-circle-check" @click="handleSubmit('form')" <el-button type="primary" icon="el-icon-circle-check" @click="handleSubmit('form')"> </el-button>
> </el-button
>
<el-button icon="el-icon-circle-close" @click="box = false"> </el-button> <el-button icon="el-icon-circle-close" @click="box = false"> </el-button>
</div> </div>
</div> </div>
@ -442,36 +281,16 @@
<!-- 账号绑定弹出框页面 <!-- 账号绑定弹出框页面
1显示登录账号 1显示登录账号
2显示账号的名称 --> 2显示账号的名称 -->
<el-dialog <el-dialog :modal-append-to-body="false" :append-to-body="false" title="开通账号" v-model="openAcountStatus">
:modal-append-to-body="false" <el-form :disabled="view" ref="openAcountorm" :model="openAcountform" :rules="openAcountrules"
:append-to-body="false" label-width="120px">
title="开通账号"
v-model="openAcountStatus"
>
<el-form
:disabled="view"
ref="openAcountorm"
:model="openAcountform"
:rules="openAcountrules"
label-width="120px"
>
<el-form-item label="姓名" prop="linkman"> <el-form-item label="姓名" prop="linkman">
<el-input <el-input v-model="openAcountform.name" placeholder="请输入联系人" maxlength="20" style="width: 100%" />
v-model="openAcountform.name"
placeholder="请输入联系人"
maxlength="20"
style="width: 100%"
/>
</el-form-item> </el-form-item>
<el-form-item label="账号" prop="linkman"> <el-form-item label="账号" prop="linkman">
<el-input <el-input v-model="openAcountform.phone" placeholder="请输入电话" type="number" maxlength="11"
v-model="openAcountform.phone" style="width: 100%" />
placeholder="请输入电话"
type="number"
maxlength="11"
style="width: 100%"
/>
</el-form-item> </el-form-item>
<el-form-item label="密码"> <el-form-item label="密码">
<span style="color: red">默认系统初始化密码</span> <span style="color: red">默认系统初始化密码</span>
@ -480,24 +299,14 @@
<template #footer> <template #footer>
<span v-if="!view" class="dialog-footer"> <span v-if="!view" class="dialog-footer">
<el-button type="primary" icon="el-icon-circle-check" @click="handleSubmit('form')" <el-button type="primary" icon="el-icon-circle-check" @click="handleSubmit('form')"> </el-button>
> </el-button <el-button icon="el-icon-circle-close" @click="openAcountStatus = false"> </el-button>
>
<el-button icon="el-icon-circle-close" @click="openAcountStatus = false"
> </el-button
>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
<el-drawer <el-drawer title="子表操作" append-to-body size="60%" v-model="drawer" :direction="direction"
title="子表操作" :before-close="handleDrawerClose">
append-to-body
size="60%"
v-model="drawer"
:direction="direction"
:before-close="handleDrawerClose"
>
<BasicShopSub :mainId="basicClientId"></BasicShopSub> <BasicShopSub :mainId="basicClientId"></BasicShopSub>
</el-drawer> </el-drawer>
<!-- <el-drawer--> <!-- <el-drawer-->
@ -512,15 +321,8 @@
</div> </div>
<!-- 日志 --> <!-- 日志 -->
<el-dialog <el-dialog :modal-append-to-body="false" :append-to-body="false" title="客户日志" width="70%" :align-center="true"
:modal-append-to-body="false" v-model="popUpShow.logVisted" isNotSave>
:append-to-body="false"
title="客户日志"
width="70%"
:align-center="true"
v-model="popUpShow.logVisted"
isNotSave
>
<tablecmt ref="tableLogNode" class="mt10" :columnList="columnLogList" :tableData="logData"> <tablecmt ref="tableLogNode" class="mt10" :columnList="columnLogList" :tableData="logData">
<template #default="{ scope }"> </template> <template #default="{ scope }"> </template>
</tablecmt> </tablecmt>
@ -540,6 +342,7 @@ import {
$_getListlistName, $_getListlistName,
getClientLogList, getClientLogList,
$_exportclientTemplate, $_exportclientTemplate,
$_mainList,
} from '@/api/basicdata/basicClient'; } from '@/api/basicdata/basicClient';
import option from '@/option/basicdata/basicClient'; import option from '@/option/basicdata/basicClient';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
@ -561,6 +364,8 @@ export default {
data() { data() {
return { return {
excelForm: {}, excelForm: {},
clientloading: false,
dictList: [],
fromloading: true, fromloading: true,
excelBox: false, excelBox: false,
Fileverification: false, Fileverification: false,
@ -682,6 +487,17 @@ export default {
sortable: true, sortable: true,
head: false, head: false,
}, },
{
prop: 'mainName',
label: '客户主体',
type: 2,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{ {
prop: 'linkman', prop: 'linkman',
label: '联系人', label: '联系人',
@ -1013,7 +829,6 @@ export default {
logData: [], logData: [],
}; };
}, },
created() {},
mounted() { mounted() {
this.init(); this.init();
}, },
@ -1260,6 +1075,28 @@ export default {
encodeURIComponent(Base64.encode(row.leaseAccessories)) encodeURIComponent(Base64.encode(row.leaseAccessories))
); );
}, },
async changeclientId() {
$_mainList(
{
current: 1,
size: 1,
}
)
.then(res => {
console.log(res, '客户');
if (res.data.code == 200 && res.data.data?.length) {
this.dictList = res.data.data
} else {
this.dictList = [];
}
})
.catch(error => {
console.log(error);
})
},
// //
makeCargo(row) { makeCargo(row) {
console.log('控货操作!!', row); console.log('控货操作!!', row);
@ -1348,8 +1185,7 @@ export default {
}, },
handleExceed(files, fileList) { handleExceed(files, fileList) {
this.$message.warning( this.$message.warning(
`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${ `当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length
files.length + fileList.length
} 个文件` } 个文件`
); );
}, },
@ -1416,7 +1252,7 @@ export default {
// //
return; return;
} }
} catch (error) {} } catch (error) { }
if (!this.form.typeServiceList.includes('3')) { if (!this.form.typeServiceList.includes('3')) {
delete this.form.businessType; delete this.form.businessType;
} }
@ -1470,6 +1306,10 @@ export default {
}); });
return; return;
} }
if(this.form.mainId){
this.form.mainName = this.dictList.find(item=>item.id == this.form.mainId).name;//
}
await add(this.form); await add(this.form);
this.box = false; this.box = false;
this.onLoad(this.page); this.onLoad(this.page);
@ -1510,6 +1350,9 @@ export default {
}); });
return; return;
} }
if(this.form.mainId){
this.form.mainName = this.dictList.find(item=>item.id == this.form.mainId).name;//
}
await update(this.form); await update(this.form);
this.box = false; this.box = false;
this.onLoad(this.page); this.onLoad(this.page);
@ -1569,7 +1412,7 @@ export default {
getDetail(row.id).then(res => { getDetail(row.id).then(res => {
console.log(res.data.data, 'res.data.data'); console.log(res.data.data, 'res.data.data');
this.form = res.data.data; this.form = res.data.data;
this.form.mainId = res.data.data.mainId
if (this.form.detailedly == '0' || this.form.detailedly == '-1') { if (this.form.detailedly == '0' || this.form.detailedly == '-1') {
this.form.detailedly = ''; this.form.detailedly = '';
} }
@ -1953,6 +1796,9 @@ export default {
} }
}, },
}, },
created() {
this.changeclientId()
},
}; };
</script> </script>

Loading…
Cancel
Save