|
|
|
@ -60,7 +60,7 @@
|
|
|
|
|
<el-button type="danger" icon="el-icon-delete" @click="handleDelete" plain |
|
|
|
|
>删 除</el-button |
|
|
|
|
> |
|
|
|
|
<el-button type="danger" icon="el-icon-delete" @click="handleImport">导 入 </el-button> |
|
|
|
|
<el-button type="danger" icon="Upload" @click="handleImport">导 入 </el-button> |
|
|
|
|
</div> |
|
|
|
|
<!-- 头部右侧按钮模块 --> |
|
|
|
|
<div class="avue-crud__right"> |
|
|
|
@ -184,195 +184,201 @@
|
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
append-to-body |
|
|
|
|
> |
|
|
|
|
<el-form :disabled="view" ref="form" :model="form" :rules="rules" label-width="120px"> |
|
|
|
|
<!-- 表单字段 --> |
|
|
|
|
<el-form-item label="客户编码" prop="clientCode"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="form.clientCode" |
|
|
|
|
:validate-method="validateInput" |
|
|
|
|
placeholder="请输入客户编码" |
|
|
|
|
style="width: 100%" |
|
|
|
|
:disabled="viewClientEntd" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="客户名称" prop="clientName"> |
|
|
|
|
<el-input v-model="form.clientName" placeholder="请输入客户名称" style="width: 100%" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="客户类型" prop="clientType"> |
|
|
|
|
<!-- <el-input v-model="form.clientName" placeholder="请输入客户名称" style="width: 100%"/>--> |
|
|
|
|
<!-- <el-select v-model="form.clientType" class="m-2" placeholder="请选择客户类型" style="width: 100%">--> |
|
|
|
|
<!-- <el-option label="发货方" value="1"/>--> |
|
|
|
|
<!-- <el-option label="收货方" value="2"/>--> |
|
|
|
|
<!-- </el-select>--> |
|
|
|
|
<el-select |
|
|
|
|
v-model="form.clientType" |
|
|
|
|
class="m-2" |
|
|
|
|
placeholder="请选择客户端类型" |
|
|
|
|
style="width: 100%" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in clientType" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictKey" |
|
|
|
|
<div v-loading="loadingObj.submitLoading"> |
|
|
|
|
<el-form :disabled="view" ref="form" :model="form" :rules="rules" label-width="120px"> |
|
|
|
|
<!-- 表单字段 --> |
|
|
|
|
<el-form-item label="客户编码" prop="clientCode"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="form.clientCode" |
|
|
|
|
:validate-method="validateInput" |
|
|
|
|
placeholder="请输入客户编码" |
|
|
|
|
style="width: 100%" |
|
|
|
|
:disabled="viewClientEntd" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="服务类型" prop="typeServiceList"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="form.typeServiceList" |
|
|
|
|
multiple |
|
|
|
|
placeholder="请选择" |
|
|
|
|
style="width: 100%" |
|
|
|
|
@change="coverCharge" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in freightType" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictKey" |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="客户名称" prop="clientName"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="form.clientName" |
|
|
|
|
placeholder="请输入客户名称" |
|
|
|
|
style="width: 100%" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="客户类型" prop="clientType"> |
|
|
|
|
<!-- <el-input v-model="form.clientName" placeholder="请输入客户名称" style="width: 100%"/>--> |
|
|
|
|
<!-- <el-select v-model="form.clientType" class="m-2" placeholder="请选择客户类型" style="width: 100%">--> |
|
|
|
|
<!-- <el-option label="发货方" value="1"/>--> |
|
|
|
|
<!-- <el-option label="收货方" value="2"/>--> |
|
|
|
|
<!-- </el-select>--> |
|
|
|
|
<el-select |
|
|
|
|
v-model="form.clientType" |
|
|
|
|
class="m-2" |
|
|
|
|
placeholder="请选择客户端类型" |
|
|
|
|
style="width: 100%" |
|
|
|
|
> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="配送类型" prop="businessType" v-if="distriType"> |
|
|
|
|
<el-radio-group |
|
|
|
|
v-model="form.businessType" |
|
|
|
|
class="ml-4" |
|
|
|
|
v-for="item in distributionType" |
|
|
|
|
> |
|
|
|
|
<el-radio :label="item.dictKey" size="large" style="margin-right: 25px">{{ |
|
|
|
|
item.dictValue |
|
|
|
|
}}</el-radio> |
|
|
|
|
<!-- <el-radio label="2" size="large">Option 2</el-radio>--> |
|
|
|
|
</el-radio-group> |
|
|
|
|
<!-- </div>--> |
|
|
|
|
</el-form-item> |
|
|
|
|
<!-- <el-form-item label="客户端类型" prop="typeService"> |
|
|
|
|
<!– <el-input v-model="form.typeService" placeholder="请输入客户类型"/>–> |
|
|
|
|
<!– <el-input v-model="form.typeService" placeholder="请输入客户类型;1 C端 2 B端"/>–> |
|
|
|
|
<el-select v-model="form.typeService" class="m-2" placeholder="请选择客户端类型" style="width: 100%"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in clientType" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictKey" |
|
|
|
|
|
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item>--> |
|
|
|
|
<el-form-item label="联系人" prop="linkman" v-if="viewEntd"> |
|
|
|
|
<el-input v-model="form.linkman" placeholder="请输入联系人" style="width: 100%" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="联系电话" prop="phone" v-if="viewEntd"> |
|
|
|
|
<el-input v-model="form.phone" placeholder="请输入联系电话" style="width: 100%" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="地址" prop="bladeRegionProvinceId"> |
|
|
|
|
<!-- <el-input v-model="form.bladeRegionProvinceId" placeholder="请输入省份"/>--> |
|
|
|
|
<el-cascader |
|
|
|
|
:options="optioner" |
|
|
|
|
style="width: 100%" |
|
|
|
|
v-model="form.bladeRegionProvinceId" |
|
|
|
|
:props="{ |
|
|
|
|
checkStrictly: false, |
|
|
|
|
}" |
|
|
|
|
filterable |
|
|
|
|
> |
|
|
|
|
<template #default="{ node, data }"> |
|
|
|
|
<span>{{ data.label }}</span> |
|
|
|
|
<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span> |
|
|
|
|
</template> |
|
|
|
|
</el-cascader> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="详细地址" prop="detailedly"> |
|
|
|
|
<el-input v-model="form.detailedly" placeholder="请填写详细地址" style="width: 100%" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<!-- <el-form-item label="三方商城" prop="tripartiteMall">--> |
|
|
|
|
<!-- <el-input v-model="form.tripartiteMall" placeholder="请填写三方商城" style="width: 100%" />--> |
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
<!-- <el-form-item label="开票信息" prop="billingInformation">--> |
|
|
|
|
<!-- <el-input v-model="form.billingInformation" placeholder="请填写开票信息" style="width: 100%" />--> |
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
<!-- <el-form-item label="市" prop="bladeRegionCityId">--> |
|
|
|
|
<!-- <el-input v-model="form.bladeRegionCityId" placeholder="请输入市"/>--> |
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
<!-- <el-form-item label="区/县" prop="bladeRegionAreaId">--> |
|
|
|
|
<!-- <el-input v-model="form.bladeRegionAreaId" placeholder="请输入区/县"/>--> |
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
<el-form-item label="合同附件" prop="leaseAccessories" style="width: 100%"> |
|
|
|
|
<!-- <el-input v-model="form.leaseAccessories" placeholder="请输入合同附件"/>--> |
|
|
|
|
<el-upload |
|
|
|
|
v-model:file-list="fileList" |
|
|
|
|
class="upload-demo" |
|
|
|
|
:action="action" |
|
|
|
|
:headers="headers" |
|
|
|
|
multiple |
|
|
|
|
:on-preview="handlePreview" |
|
|
|
|
:on-success=" |
|
|
|
|
(response, file, fileList) => { |
|
|
|
|
uploadSuccess(fileList); |
|
|
|
|
} |
|
|
|
|
" |
|
|
|
|
:on-remove="handleRemove" |
|
|
|
|
:before-remove="beforeRemove" |
|
|
|
|
:before-upload="beforeUploadFn" |
|
|
|
|
:limit="3" |
|
|
|
|
:on-exceed="handleExceed" |
|
|
|
|
> |
|
|
|
|
<el-button>上传</el-button> |
|
|
|
|
<template #tip> |
|
|
|
|
<div class="el-upload__tip">大小不超过500KB的jpg/png文件。</div> |
|
|
|
|
</template> |
|
|
|
|
</el-upload> |
|
|
|
|
<el-image-viewer |
|
|
|
|
v-if="showImgViewer" |
|
|
|
|
:url-list="imgPreviewUrl" |
|
|
|
|
@close="handleCo" |
|
|
|
|
:z-index="300" |
|
|
|
|
fit="cover" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="合同开始时间" prop="contractStartTime" label-width="120px"> |
|
|
|
|
<!-- <el-input v-model="form.contractStartTime" placeholder="请输入合同开始时间"/>--> |
|
|
|
|
<div class="demo-date-picker" style="width: 60%"> |
|
|
|
|
<div class="block"> |
|
|
|
|
<!-- <span class="demonstration">Default</span>--> |
|
|
|
|
<el-date-picker |
|
|
|
|
v-model="form.contractStartTime" |
|
|
|
|
type="date" |
|
|
|
|
placeholder="选择时间" |
|
|
|
|
format="YYYY/MM/DD HH:mm:ss" |
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss" |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in clientType" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictKey" |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="服务类型" prop="typeServiceList"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="form.typeServiceList" |
|
|
|
|
multiple |
|
|
|
|
placeholder="请选择" |
|
|
|
|
style="width: 100%" |
|
|
|
|
@change="coverCharge" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in freightType" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictKey" |
|
|
|
|
> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="配送类型" prop="businessType" v-if="distriType"> |
|
|
|
|
<el-radio-group |
|
|
|
|
v-model="form.businessType" |
|
|
|
|
class="ml-4" |
|
|
|
|
v-for="item in distributionType" |
|
|
|
|
> |
|
|
|
|
<el-radio :label="item.dictKey" size="large" style="margin-right: 25px">{{ |
|
|
|
|
item.dictValue |
|
|
|
|
}}</el-radio> |
|
|
|
|
<!-- <el-radio label="2" size="large">Option 2</el-radio>--> |
|
|
|
|
</el-radio-group> |
|
|
|
|
<!-- </div>--> |
|
|
|
|
</el-form-item> |
|
|
|
|
<!-- <el-form-item label="客户端类型" prop="typeService"> |
|
|
|
|
<!– <el-input v-model="form.typeService" placeholder="请输入客户类型"/>–> |
|
|
|
|
<!– <el-input v-model="form.typeService" placeholder="请输入客户类型;1 C端 2 B端"/>–> |
|
|
|
|
<el-select v-model="form.typeService" class="m-2" placeholder="请选择客户端类型" style="width: 100%"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in clientType" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictKey" |
|
|
|
|
|
|
|
|
|
<el-form-item label="合同结束时间" prop="contractEntTime" label-width="120px"> |
|
|
|
|
<!-- <el-input v-model="form.contractEntTime" placeholder="请输入合同结束时间"/>--> |
|
|
|
|
<div class="demo-date-picker"> |
|
|
|
|
<div class="block"> |
|
|
|
|
<!-- <span class="demonstration">Default</span>--> |
|
|
|
|
<el-date-picker |
|
|
|
|
v-model="form.contractEntTime" |
|
|
|
|
type="date" |
|
|
|
|
placeholder="选择时间" |
|
|
|
|
format="YYYY/MM/DD HH:mm:ss" |
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item>--> |
|
|
|
|
<el-form-item label="联系人" prop="linkman" v-if="viewEntd"> |
|
|
|
|
<el-input v-model="form.linkman" placeholder="请输入联系人" style="width: 100%" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="联系电话" prop="phone" v-if="viewEntd"> |
|
|
|
|
<el-input v-model="form.phone" placeholder="请输入联系电话" style="width: 100%" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="地址" prop="bladeRegionProvinceId"> |
|
|
|
|
<!-- <el-input v-model="form.bladeRegionProvinceId" placeholder="请输入省份"/>--> |
|
|
|
|
<el-cascader |
|
|
|
|
:options="optioner" |
|
|
|
|
style="width: 100%" |
|
|
|
|
v-model="form.bladeRegionProvinceId" |
|
|
|
|
:props="{ |
|
|
|
|
checkStrictly: false, |
|
|
|
|
}" |
|
|
|
|
filterable |
|
|
|
|
> |
|
|
|
|
<template #default="{ node, data }"> |
|
|
|
|
<span>{{ data.label }}</span> |
|
|
|
|
<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span> |
|
|
|
|
</template> |
|
|
|
|
</el-cascader> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="详细地址" prop="detailedly"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="form.detailedly" |
|
|
|
|
placeholder="请填写详细地址" |
|
|
|
|
style="width: 100%" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="默认付款方式" prop="defaultPaymentMethods"> |
|
|
|
|
<el-select v-model="form.defaultPaymentMethods" placeholder="请选择默认付款方式"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in defaultPaymentMethodsOptions" |
|
|
|
|
:key="item.value" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value" |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<!-- 表单按钮 --> |
|
|
|
|
<template #footer> |
|
|
|
|
<span v-if="!view" class="dialog-footer"> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<!-- <el-form-item label="三方商城" prop="tripartiteMall">--> |
|
|
|
|
<!-- <el-input v-model="form.tripartiteMall" placeholder="请填写三方商城" style="width: 100%" />--> |
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
<!-- <el-form-item label="开票信息" prop="billingInformation">--> |
|
|
|
|
<!-- <el-input v-model="form.billingInformation" placeholder="请填写开票信息" style="width: 100%" />--> |
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
<!-- <el-form-item label="市" prop="bladeRegionCityId">--> |
|
|
|
|
<!-- <el-input v-model="form.bladeRegionCityId" placeholder="请输入市"/>--> |
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
<!-- <el-form-item label="区/县" prop="bladeRegionAreaId">--> |
|
|
|
|
<!-- <el-input v-model="form.bladeRegionAreaId" placeholder="请输入区/县"/>--> |
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
<el-form-item label="合同附件" prop="leaseAccessories" style="width: 100%"> |
|
|
|
|
<!-- <el-input v-model="form.leaseAccessories" placeholder="请输入合同附件"/>--> |
|
|
|
|
<el-upload |
|
|
|
|
v-model:file-list="fileList" |
|
|
|
|
class="upload-demo" |
|
|
|
|
:action="action" |
|
|
|
|
:headers="headers" |
|
|
|
|
multiple |
|
|
|
|
:on-preview="handlePreview" |
|
|
|
|
:on-success=" |
|
|
|
|
(response, file, fileList) => { |
|
|
|
|
uploadSuccess(fileList); |
|
|
|
|
} |
|
|
|
|
" |
|
|
|
|
:on-remove="handleRemove" |
|
|
|
|
:before-remove="beforeRemove" |
|
|
|
|
:before-upload="beforeUploadFn" |
|
|
|
|
:limit="3" |
|
|
|
|
:on-exceed="handleExceed" |
|
|
|
|
> |
|
|
|
|
<el-button type="Primary" icon="Position">上传</el-button> |
|
|
|
|
<template #tip> |
|
|
|
|
<div class="el-upload__tip">大小不超过500KB的jpg/png文件。</div> |
|
|
|
|
</template> |
|
|
|
|
</el-upload> |
|
|
|
|
<el-image-viewer |
|
|
|
|
v-if="showImgViewer" |
|
|
|
|
:url-list="imgPreviewUrl" |
|
|
|
|
@close="handleCo" |
|
|
|
|
:z-index="300" |
|
|
|
|
fit="cover" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="合同开始时间" prop="contractStartTime" label-width="120px"> |
|
|
|
|
<el-date-picker |
|
|
|
|
v-model="form.contractStartTime" |
|
|
|
|
type="date" |
|
|
|
|
placeholder="选择时间" |
|
|
|
|
format="YYYY/MM/DD HH:mm:ss" |
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="合同结束时间" prop="contractEntTime" label-width="120px"> |
|
|
|
|
<el-date-picker |
|
|
|
|
v-model="form.contractEntTime" |
|
|
|
|
type="date" |
|
|
|
|
placeholder="选择时间" |
|
|
|
|
format="YYYY/MM/DD HH:mm:ss" |
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<!-- 表单按钮 --> |
|
|
|
|
<div v-if="!view" class="flex-c-c"> |
|
|
|
|
<el-button type="primary" icon="el-icon-circle-check" @click="handleSubmit('form')" |
|
|
|
|
>提 交</el-button |
|
|
|
|
> |
|
|
|
|
<el-button icon="el-icon-circle-close" @click="box = false">取 消</el-button> |
|
|
|
|
</span> |
|
|
|
|
</template> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<!-- 账号绑定弹出框页面 |
|
|
|
@ -756,24 +762,26 @@ export default {
|
|
|
|
|
{ required: true, message: '请输入客户名称', trigger: 'blur' }, |
|
|
|
|
// { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' } |
|
|
|
|
], |
|
|
|
|
typeService: [{ required: true, message: '请选择客户端类型', trigger: 'blur' }], |
|
|
|
|
typeService: [{ required: true, message: '请选择客户端类型', trigger: ['blur', 'change'] }], |
|
|
|
|
businessType: [ |
|
|
|
|
{ required: true, message: '请选择配送业务类型', trigger: 'change' }, |
|
|
|
|
// { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' } |
|
|
|
|
// { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: ['blur', 'change'] } |
|
|
|
|
], |
|
|
|
|
clientType: [{ required: true, message: '请选择客户类型', trigger: 'change' }], |
|
|
|
|
typeServiceList: [{ required: true, message: '请选择服务类型', trigger: 'change' }], |
|
|
|
|
linkman: [{ required: true, message: '请填写联系人', trigger: 'blur' }], |
|
|
|
|
detailedly: [{ required: true, message: '请填写详细地址', trigger: 'blur' }], |
|
|
|
|
phone: [{ required: true, message: '请填写联系电话', trigger: 'blur' }], |
|
|
|
|
contractEntTime: [ |
|
|
|
|
{ type: 'date', required: true, message: '请选择合同结束时间', trigger: 'change' }, |
|
|
|
|
], |
|
|
|
|
contractStartTime: [ |
|
|
|
|
{ type: 'date', required: true, message: '请选择合同开始时间', trigger: 'change' }, |
|
|
|
|
], |
|
|
|
|
linkman: [{ required: true, message: '请填写联系人', trigger: ['blur', 'change'] }], |
|
|
|
|
detailedly: [{ required: true, message: '请填写详细地址', trigger: ['blur', 'change'] }], |
|
|
|
|
phone: [{ required: true, message: '请填写联系电话', trigger: ['blur', 'change'] }], |
|
|
|
|
// contractEntTime: [ |
|
|
|
|
// { type: 'date', required: true, message: '请选择合同结束时间', trigger: 'change' }, |
|
|
|
|
// ], |
|
|
|
|
// contractStartTime: [ |
|
|
|
|
// { type: 'date', required: true, message: '请选择合同开始时间', trigger: 'change' }, |
|
|
|
|
// ], |
|
|
|
|
bladeRegionProvinceId: [{ required: true, message: '请选择地址', trigger: 'change' }], |
|
|
|
|
// leaseAccessories: [{ required: true, message: '请上传合同文件', trigger: 'blur' }], |
|
|
|
|
defaultPaymentMethods: [ |
|
|
|
|
{ required: true, message: '请选择默认付款方式', trigger: 'change' }, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
bianji: false, |
|
|
|
|
|
|
|
|
@ -782,6 +790,32 @@ export default {
|
|
|
|
|
name: '', |
|
|
|
|
phone: '', |
|
|
|
|
}, |
|
|
|
|
/** 付款方式 */ |
|
|
|
|
defaultPaymentMethodsOptions: [ |
|
|
|
|
{ |
|
|
|
|
value: '1', |
|
|
|
|
label: '现付', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
value: '2', |
|
|
|
|
label: '到付', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
value: '3', |
|
|
|
|
label: '月结', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
value: '4', |
|
|
|
|
label: '回付', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
value: '5', |
|
|
|
|
label: '内部结算', |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
loadingObj: { |
|
|
|
|
submitLoading: false, |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
created() {}, |
|
|
|
@ -1168,42 +1202,56 @@ export default {
|
|
|
|
|
|
|
|
|
|
if (!this.form.id) { |
|
|
|
|
console.log('添加提交的数据:', this.form); |
|
|
|
|
this.$refs[from].validate(valid => { |
|
|
|
|
this.$refs[from].validate(async valid => { |
|
|
|
|
if (valid) { |
|
|
|
|
// this.form.typeService = !!this.form.typeService ? parseInt(this.form.typeService) : undefined; |
|
|
|
|
this.form.bladeRegionCityId = this.form.bladeRegionProvinceId[1]; |
|
|
|
|
this.form.bladeRegionAreaId = this.form.bladeRegionProvinceId[2]; |
|
|
|
|
this.form.bladeRegionProvinceId = this.form.bladeRegionProvinceId[0]; |
|
|
|
|
console.log('上传llll>>>', this.form); |
|
|
|
|
add(this.form).then(() => { |
|
|
|
|
try { |
|
|
|
|
this.loadingObj.submitLoading = true; |
|
|
|
|
|
|
|
|
|
// this.form.typeService = !!this.form.typeService ? parseInt(this.form.typeService) : undefined; |
|
|
|
|
this.form.bladeRegionCityId = this.form.bladeRegionProvinceId[1]; |
|
|
|
|
this.form.bladeRegionAreaId = this.form.bladeRegionProvinceId[2]; |
|
|
|
|
this.form.bladeRegionProvinceId = this.form.bladeRegionProvinceId[0]; |
|
|
|
|
console.log('上传llll>>>', this.form); |
|
|
|
|
await add(this.form); |
|
|
|
|
this.box = false; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.$message({ |
|
|
|
|
type: 'success', |
|
|
|
|
message: '操作成功!', |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} catch (error) { |
|
|
|
|
console.log('error :>> ', error); |
|
|
|
|
} finally { |
|
|
|
|
this.loadingObj.submitLoading = false; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
console.log('error submit!!'); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
this.$refs[from].validate(valid => { |
|
|
|
|
this.$refs[from].validate(async valid => { |
|
|
|
|
if (valid) { |
|
|
|
|
console.log('修改提交的数据:', this.form); |
|
|
|
|
// this.form.typeService = !!this.form.typeService ? parseInt(this.form.typeService) : undefined; |
|
|
|
|
this.form.bladeRegionCityId = this.form.bladeRegionProvinceId[1]; |
|
|
|
|
this.form.bladeRegionAreaId = this.form.bladeRegionProvinceId[2]; |
|
|
|
|
this.form.bladeRegionProvinceId = this.form.bladeRegionProvinceId[0]; |
|
|
|
|
update(this.form).then(() => { |
|
|
|
|
try { |
|
|
|
|
this.loadingObj.submitLoading = true; |
|
|
|
|
|
|
|
|
|
console.log('修改提交的数据:', this.form); |
|
|
|
|
// this.form.typeService = !!this.form.typeService ? parseInt(this.form.typeService) : undefined; |
|
|
|
|
this.form.bladeRegionCityId = this.form.bladeRegionProvinceId[1]; |
|
|
|
|
this.form.bladeRegionAreaId = this.form.bladeRegionProvinceId[2]; |
|
|
|
|
this.form.bladeRegionProvinceId = this.form.bladeRegionProvinceId[0]; |
|
|
|
|
await update(this.form); |
|
|
|
|
this.box = false; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.$message({ |
|
|
|
|
type: 'success', |
|
|
|
|
message: '操作成功!', |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} catch (error) { |
|
|
|
|
console.log('error :>> ', error); |
|
|
|
|
} finally { |
|
|
|
|
this.loadingObj.submitLoading = false; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
console.log('error submit!!'); |
|
|
|
|
return false; |
|
|
|
@ -1218,6 +1266,10 @@ export default {
|
|
|
|
|
this.box = true; |
|
|
|
|
this.distriType = false; |
|
|
|
|
this.viewClientEntd = false; |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
this.$refs.form.resetFields(); |
|
|
|
|
this.form.defaultPaymentMethods = '1'; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleAddSon(row) { |
|
|
|
|
console.log(row); |
|
|
|
@ -1455,102 +1507,104 @@ export default {
|
|
|
|
|
this.query.bladeRegionAreaId = this.query.bladeRegionProvinceId[2]; |
|
|
|
|
this.query.bladeRegionProvinceId = this.query.bladeRegionProvinceId[0]; |
|
|
|
|
} |
|
|
|
|
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
|
|
|
|
const data = res.data.data; |
|
|
|
|
console.log(data); |
|
|
|
|
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)) |
|
|
|
|
.then(res => { |
|
|
|
|
const data = res.data.data; |
|
|
|
|
console.log(data); |
|
|
|
|
|
|
|
|
|
data.records.forEach(i => { |
|
|
|
|
let ke = this.clientType.find(kh => parseInt(kh.dictKey) == parseInt(i.clientType)); |
|
|
|
|
// console.log("客户类型<><><>",ke); |
|
|
|
|
if (!!ke) { |
|
|
|
|
i.clientTypeName = ke.dictValue; |
|
|
|
|
// console.log('==-=-=', i.clientType, ke.dictKey, ke.dictValue); |
|
|
|
|
} |
|
|
|
|
if (!i.clientType) { |
|
|
|
|
i.clientTypeName = '无'; |
|
|
|
|
} |
|
|
|
|
let typeServiceName = []; |
|
|
|
|
|
|
|
|
|
if (!i.typeServiceBusiness) { |
|
|
|
|
i.typeServiceName = '无'; |
|
|
|
|
} else { |
|
|
|
|
i.typeServiceBusiness.forEach(ty => { |
|
|
|
|
let fuw = this.freightType.find( |
|
|
|
|
fw => parseInt(fw.dictKey) == parseInt(ty.typeService) |
|
|
|
|
); |
|
|
|
|
if (!!fuw) { |
|
|
|
|
// console.log("fuw",fuw); |
|
|
|
|
typeServiceName.push(fuw.dictValue); |
|
|
|
|
// console.log('==-=-=', i.typeService, fuw.dictKey, fuw.dictValue); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
i.typeServiceNameFy = typeServiceName.join(','); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
// 缺少判断 |
|
|
|
|
// let dz = ''; |
|
|
|
|
// data.records.forEach(it => { |
|
|
|
|
// let arrsheng = this.optioner.filter(i => { |
|
|
|
|
// return it.bladeRegionProvinceId == i.value; |
|
|
|
|
// }); |
|
|
|
|
// if (arrsheng.length == 0) return; |
|
|
|
|
// // console.log("========",JSON.parse(JSON.stringify(arrsheng)) ); |
|
|
|
|
// let arrshi = arrsheng[0].children.filter(i => { |
|
|
|
|
// return it.bladeRegionCityId == i.value; |
|
|
|
|
// }); |
|
|
|
|
// // console.log("========",JSON.parse(JSON.stringify(arrsheng)) ); |
|
|
|
|
// let arrqu = arrshi[0].children.filter(i => { |
|
|
|
|
// return it.bladeRegionAreaId == i.value; |
|
|
|
|
// }); |
|
|
|
|
data.records.forEach(i => { |
|
|
|
|
let ke = this.clientType.find(kh => parseInt(kh.dictKey) == parseInt(i.clientType)); |
|
|
|
|
// console.log("客户类型<><><>",ke); |
|
|
|
|
if (!!ke) { |
|
|
|
|
i.clientTypeName = ke.dictValue; |
|
|
|
|
// console.log('==-=-=', i.clientType, ke.dictKey, ke.dictValue); |
|
|
|
|
} |
|
|
|
|
if (!i.clientType) { |
|
|
|
|
i.clientTypeName = '无'; |
|
|
|
|
} |
|
|
|
|
let typeServiceName = []; |
|
|
|
|
|
|
|
|
|
// // console.log("========",JSON.parse(JSON.stringify(arrsheng)) ); |
|
|
|
|
// dz = |
|
|
|
|
// arrsheng[0].label + |
|
|
|
|
// (arrshi[0].label ? `/${arrshi[0].label}` : ``) + |
|
|
|
|
// (arrqu[0]?.label ? `/${arrqu[0]?.label}` : ''); |
|
|
|
|
// it.bladeRegionProvinceId = dz; |
|
|
|
|
// }); |
|
|
|
|
// 修改后 |
|
|
|
|
let dz = ''; |
|
|
|
|
data.records.forEach(it => { |
|
|
|
|
let arrsheng = this.optioner.filter(i => { |
|
|
|
|
return it.bladeRegionProvinceId == i.value; |
|
|
|
|
if (!i.typeServiceBusiness) { |
|
|
|
|
i.typeServiceName = '无'; |
|
|
|
|
} else { |
|
|
|
|
i.typeServiceBusiness.forEach(ty => { |
|
|
|
|
let fuw = this.freightType.find( |
|
|
|
|
fw => parseInt(fw.dictKey) == parseInt(ty.typeService) |
|
|
|
|
); |
|
|
|
|
if (!!fuw) { |
|
|
|
|
// console.log("fuw",fuw); |
|
|
|
|
typeServiceName.push(fuw.dictValue); |
|
|
|
|
// console.log('==-=-=', i.typeService, fuw.dictKey, fuw.dictValue); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
i.typeServiceNameFy = typeServiceName.join(','); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
let shengLabel = arrsheng.length > 0 ? arrsheng[0].label : ''; // 保存省级地址 |
|
|
|
|
// 缺少判断 |
|
|
|
|
// let dz = ''; |
|
|
|
|
// data.records.forEach(it => { |
|
|
|
|
// let arrsheng = this.optioner.filter(i => { |
|
|
|
|
// return it.bladeRegionProvinceId == i.value; |
|
|
|
|
// }); |
|
|
|
|
// if (arrsheng.length == 0) return; |
|
|
|
|
// // console.log("========",JSON.parse(JSON.stringify(arrsheng)) ); |
|
|
|
|
// let arrshi = arrsheng[0].children.filter(i => { |
|
|
|
|
// return it.bladeRegionCityId == i.value; |
|
|
|
|
// }); |
|
|
|
|
// // console.log("========",JSON.parse(JSON.stringify(arrsheng)) ); |
|
|
|
|
// let arrqu = arrshi[0].children.filter(i => { |
|
|
|
|
// return it.bladeRegionAreaId == i.value; |
|
|
|
|
// }); |
|
|
|
|
|
|
|
|
|
if (arrsheng.length === 0) { |
|
|
|
|
it.bladeRegionProvinceId = shengLabel; // 若未找到省数据,直接将省级地址作为结果 |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
// // console.log("========",JSON.parse(JSON.stringify(arrsheng)) ); |
|
|
|
|
// dz = |
|
|
|
|
// arrsheng[0].label + |
|
|
|
|
// (arrshi[0].label ? `/${arrshi[0].label}` : ``) + |
|
|
|
|
// (arrqu[0]?.label ? `/${arrqu[0]?.label}` : ''); |
|
|
|
|
// it.bladeRegionProvinceId = dz; |
|
|
|
|
// }); |
|
|
|
|
// 修改后 |
|
|
|
|
let dz = ''; |
|
|
|
|
data.records.forEach(it => { |
|
|
|
|
let arrsheng = this.optioner.filter(i => { |
|
|
|
|
return it.bladeRegionProvinceId == i.value; |
|
|
|
|
}); |
|
|
|
|
let shengLabel = arrsheng.length > 0 ? arrsheng[0].label : ''; // 保存省级地址 |
|
|
|
|
|
|
|
|
|
let arrshi = arrsheng[0].children.filter(i => { |
|
|
|
|
return it.bladeRegionCityId == i.value; |
|
|
|
|
}); |
|
|
|
|
let shiLabel = arrshi.length > 0 ? arrshi[0].label : ''; // 保存市级地址 |
|
|
|
|
if (arrsheng.length === 0) { |
|
|
|
|
it.bladeRegionProvinceId = shengLabel; // 若未找到省数据,直接将省级地址作为结果 |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (arrshi.length === 0) { |
|
|
|
|
dz = shengLabel; // 若未找到市数据,直接将省级地址作为结果 |
|
|
|
|
} else { |
|
|
|
|
let arrqu = arrshi[0].children.filter(i => { |
|
|
|
|
return it.bladeRegionAreaId == i.value; |
|
|
|
|
let arrshi = arrsheng[0].children.filter(i => { |
|
|
|
|
return it.bladeRegionCityId == i.value; |
|
|
|
|
}); |
|
|
|
|
let shiLabel = arrshi.length > 0 ? arrshi[0].label : ''; // 保存市级地址 |
|
|
|
|
|
|
|
|
|
let quLabel = arrqu.length > 0 ? arrqu[0].label : ''; // 保存区级地址 |
|
|
|
|
if (arrshi.length === 0) { |
|
|
|
|
dz = shengLabel; // 若未找到市数据,直接将省级地址作为结果 |
|
|
|
|
} else { |
|
|
|
|
let arrqu = arrshi[0].children.filter(i => { |
|
|
|
|
return it.bladeRegionAreaId == i.value; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
dz = shengLabel + (shiLabel ? `/${shiLabel}` : '') + (quLabel ? `/${quLabel}` : ''); |
|
|
|
|
} |
|
|
|
|
let quLabel = arrqu.length > 0 ? arrqu[0].label : ''; // 保存区级地址 |
|
|
|
|
|
|
|
|
|
it.bladeRegionProvinceId = dz; |
|
|
|
|
dz = shengLabel + (shiLabel ? `/${shiLabel}` : '') + (quLabel ? `/${quLabel}` : ''); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
it.bladeRegionProvinceId = dz; |
|
|
|
|
}); |
|
|
|
|
this.page.total = data.total; |
|
|
|
|
this.data = data.records; |
|
|
|
|
this.data = this.$functions.newdatas(this.columnList, this.data); |
|
|
|
|
this.loading = false; |
|
|
|
|
this.selectionClear(); |
|
|
|
|
}) |
|
|
|
|
.catch(() => { |
|
|
|
|
this.data = []; |
|
|
|
|
this.loading = false; |
|
|
|
|
}); |
|
|
|
|
this.page.total = data.total; |
|
|
|
|
this.data = data.records; |
|
|
|
|
this.data = this.$functions.newdatas(this.columnList, this.data); |
|
|
|
|
this.loading = false; |
|
|
|
|
this.selectionClear(); |
|
|
|
|
}).catch(()=>{ |
|
|
|
|
this.data =[] |
|
|
|
|
this.loading = false; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
@ -1577,4 +1631,13 @@ export default {
|
|
|
|
|
:deep(.el-cascader) { |
|
|
|
|
width: 100%; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
:deep(.el-date-editor.el-input) { |
|
|
|
|
height: 100% !important; |
|
|
|
|
width: 100% !important; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
:deep(.el-select) { |
|
|
|
|
width: 100% !important; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|