更新社区街道列表

This commit is contained in:
dengxin
2024-02-21 10:41:51 +08:00
parent ecd03d7876
commit 56ca749c31
3 changed files with 304 additions and 364 deletions

View File

@@ -1,149 +1,68 @@
<template>
<basic-container>
<avue-crud
:option="option"
:table-loading="loading "
:data="data"
ref="crud"
v-model="form"
:permission="permissionList"
:before-open="beforeOpen"
:before-close="beforeClose"
:page.sync="page"
@row-update="rowUpdate"
@row-save="rowSave"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
:upload-before="uploadBefore"
>
<avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form"
:permission="permissionList" :before-open="beforeOpen" :before-close="beforeClose" :page.sync="page"
@row-update="rowUpdate" @row-save="rowSave" @search-change="searchChange" @search-reset="searchReset"
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
@refresh-change="refreshChange" @on-load="onLoad" :upload-before="uploadBefore">
<template slot="menuLeft">
<el-button
v-if="vaildData(permission.manage_compan_companyList_addUser, false)"
size="small"
@click.stop="handleAddUser"
type="primary"
:disabled="selectionList.length === 0"
>添加账号</el-button
>
<el-button
v-if="vaildData(permission.manage_compan_companyList_config, false)"
size="small"
@click.stop="handleConfig"
type="primary"
:disabled="selectionList.length === 0"
>服务设置</el-button
>
<el-button
v-if="vaildData(permission.manage_compan_companyList_check, false)"
size="small"
@click.stop="handleCheck"
type="primary"
:disabled="selectionList.length === 0"
>审核</el-button
>
<el-button v-if="vaildData(permission.manage_compan_companyList_addUser, false)" size="small"
@click.stop="handleAddUser" type="primary" :disabled="selectionList.length === 0">添加账号</el-button>
<el-button v-if="vaildData(permission.manage_compan_companyList_config, false)" size="small"
@click.stop="handleConfig" type="primary" :disabled="selectionList.length === 0">服务设置</el-button>
<el-button v-if="vaildData(permission.manage_compan_companyList_check, false)" size="small"
@click.stop="handleCheck" type="primary" :disabled="selectionList.length === 0">审核</el-button>
</template>
<template slot-scope="scope" slot="menu">
<el-button
type="text"
size="small"
@click.stop="rowStop(scope.row.id)"
v-if="
scope.row.status == 0 &&
vaildData(permission.manage_compan_companyList_stop, false)
"
>终止合作</el-button
><!--只有已审核的企业才显示终止合作按钮-->
<el-button
type="text"
size="small"
@click.stop="rowStart(scope.row.id)"
v-if="
scope.row.status === 9 &&
vaildData(permission.manage_compan_companyList_start, false)
"
>合作恢复</el-button
>
<el-button type="text" size="small" @click.stop="rowStop(scope.row.id)" v-if="scope.row.status == 0 &&
vaildData(permission.manage_compan_companyList_stop, false)
">终止合作</el-button><!--只有已审核的企业才显示终止合作按钮-->
<el-button type="text" size="small" @click.stop="rowStart(scope.row.id)" v-if="scope.row.status === 9 &&
vaildData(permission.manage_compan_companyList_start, false)
">合作恢复</el-button>
</template>
<template slot="cityIdForm" slot-scope="{ disabled }">
<jl-city-cascader
:disabled="disabled"
v-model="form.cityId"
></jl-city-cascader>
<jl-city-cascader :disabled="disabled" v-model="form.cityId"></jl-city-cascader>
</template>
<template slot="authUrlIdImgForm">
<el-image
style="width: 100px; height: 100px"
:src="form.authUrlId"
:preview-src-list="[form.authUrlId]"
>
<el-image style="width: 100px; height: 100px" :src="form.authUrlId" :preview-src-list="[form.authUrlId]">
</el-image>
</template>
<template slot="identityUrl4IdImgForm">
<el-image
style="width: 100px; height: 100px"
:src="form.identityUrl4Id"
:preview-src-list="[form.identityUrl4Id]"
></el-image>
<el-image style="width: 100px; height: 100px" :src="form.identityUrl4Id"
:preview-src-list="[form.identityUrl4Id]"></el-image>
</template>
<template slot="identityUrl5IdImgForm">
<el-image
style="width: 100px; height: 100px"
:src="form.identityUrl5Id"
:preview-src-list="[form.identityUrl5Id]"
></el-image>
<el-image style="width: 100px; height: 100px" :src="form.identityUrl5Id"
:preview-src-list="[form.identityUrl5Id]"></el-image>
</template>
<template slot="signSrcUrlForm">
<el-image
style="width: 100px; height: 100px"
:src="form.signSrcUrl"
:preview-src-list="[form.signSrcUrl]"
></el-image>
<el-image style="width: 100px; height: 100px" :src="form.signSrcUrl"
:preview-src-list="[form.signSrcUrl]"></el-image>
</template>
<template slot="letterOfAttorneyUrlForm">
<el-image
style="width: 100px; height: 100px"
:src="form.letterOfAttorneyUrl"
:preview-src-list="[form.letterOfAttorneyUrl]"
></el-image>
<el-image style="width: 100px; height: 100px" :src="form.letterOfAttorneyUrl"
:preview-src-list="[form.letterOfAttorneyUrl]"></el-image>
</template>
<template slot="motoleyUrlImgForm">
<div v-if="imgList.length>0">
<span v-for="(item,index) in imgList" :key="index" class="motoley-img">
<el-image
style="width: 100px; height: 100px"
:src="item.url"
:preview-src-list="[item.url]"
></el-image>
<div v-if="imgList.length > 0">
<span v-for="(item, index) in imgList" :key="index" class="motoley-img">
<el-image style="width: 100px; height: 100px" :src="item.url" :preview-src-list="[item.url]"></el-image>
</span>
</div>
<div class="el-image__error" style="width: 100px; height: 100px" v-else>加载失败</div>
</span>
</div>
<div class="el-image__error" style="width: 100px; height: 100px" v-else>加载失败</div>
</template>
<template slot="recordForm" slot-scope="{ row }">
<company-record :data="row"></company-record>
</template>
<template slot="motoleyUrlForm">
<el-upload
class="companyList-upload"
list-type="picture-card"
:auto-upload="true"
:file-list="imgList"
:limit="5"
:action="mutiPutFile"
:on-preview="handlePictureCardPreview"
:on-exceed="handleImgLimit"
:on-success="handleImgSuccess"
:on-remove="handleImgRemove"
:before-remove="beforeRemove"
:before-upload="beforeAvatarUpload"
>
<i slot="default" class="el-icon-plus avue-upload__icon"></i>
<el-upload class="companyList-upload" list-type="picture-card" :auto-upload="true" :file-list="imgList" :limit="5"
:action="mutiPutFile" :on-preview="handlePictureCardPreview" :on-exceed="handleImgLimit"
:on-success="handleImgSuccess" :on-remove="handleImgRemove" :before-remove="beforeRemove"
:before-upload="beforeAvatarUpload">
<i slot="default" class="el-icon-plus avue-upload__icon"></i>
</el-upload>
</template>
<!--服务费-->
@@ -173,18 +92,9 @@
<!--保证金状态搜索栏trialOn-->
<template slot="trialOnSearch">
<el-select
v-model="query.trialOn"
placeholder="保证金"
@change="selectTrailTyepChange"
>
<el-option
v-for="(item, index) in bondList"
:key="index"
:label="item.label"
:value="item.value"
>{{ item.label }}</el-option
>
<el-select v-model="query.trialOn" placeholder="保证金" @change="selectTrailTyepChange">
<el-option v-for="(item, index) in bondList" :key="index" :label="item.label" :value="item.value">{{ item.label
}}</el-option>
</el-select>
</template>
</avue-crud>
@@ -232,40 +142,40 @@ export default {
components: { addAccount, companyConfig, companyCheck, companyRecord },
name: "manage_compan_companyList",
data() {
const validateTradeId=(rule,value,callback)=>{
if(value==''){
callback(new Error('请选择所属行业'));
}else{
callback();
}
const validateTradeId = (rule, value, callback) => {
if (value == '') {
callback(new Error('请选择所属行业'));
} else {
callback();
}
}
return {
insureTypeList:[//商保下拉框
{
label: "停用",
value: 0,
},
{
label: "启用",
value: 1,
},
insureTypeList: [//商保下拉框
{
label: "停用",
value: 0,
},
{
label: "启用",
value: 1,
},
],
bondList:[//保证金
{
label: "已缴",
value: 0,
},
{
label: "未缴",
value: 1,
},
{
label: "免缴",
value: 2,
},
bondList: [//保证金
{
label: "已缴",
value: 0,
},
{
label: "未缴",
value: 1,
},
{
label: "免缴",
value: 2,
},
],
mutiPutFile:putFile,
imgList:[],
mutiPutFile: putFile,
imgList: [],
form: {},
selectionList: [],
query: {},
@@ -286,7 +196,7 @@ export default {
selection: true,
viewBtn: true,
addBtn: true,
editBtn:true,
editBtn: true,
addBtnText: "企业开户",
addTitle: "新增企业",
delBtn: false,
@@ -296,20 +206,6 @@ export default {
dialogType: "drawer",
dialogFullscreen: true,
column: [
{
label: "创建日期",
prop: "createTime",
type: "datetime",
format: "yyyy-MM-dd",
display: false,
},
{
label: "审核日期",
prop: "reviewTime",
type: "datetime",
format: "yyyy-MM-dd",
display: false,
},
{
label: "公司名称",
prop: "companyName",
@@ -332,139 +228,181 @@ export default {
value: "stationId",
},
},
// {
// type: "input",
// label: "所在地区",
// display: false,
// prop: "cityId",
// dicData: [
// {
// label: "男",
// value: 1,
// },
// {
// label: "女",
// value: 2,
// },
// ],
// },
{
label: "企业状态",
prop: "status",
type: "select",
search: true,
dicData: companyStatus,
type: "tree",
label: "所属行业",
display: false,
span: 24,
searchSpan: 4,
prop: "tradeId",
},
{
label: "商保状态",
prop: "insuranceOn",
type: "select",
// search: true,
// searchslot:false,
// searchSpan: 4,
dicData: [
{
label: "停用",
value: 0,
},
{
label: "启用",
value: 1,
}
],
type: "tree",
label: "联系人姓名",
display: false,
prop: "masterName",
},
// {
// label: "企业状态",
// prop: "status",
// type: "select",
// search: true,
// dicData: companyStatus,
// display: false,
// span: 24,
// searchSpan: 4,
// },
// {
// label: "商保状态",
// prop: "insuranceOn",
// type: "select",
// // search: true,
// // searchslot:false,
// // searchSpan: 4,
// dicData: [
// {
// label: "停用",
// value: 0,
// },
// {
// label: "启用",
// value: 1,
// }
// ],
// display: false,
// },
// {
// label: "先开票",
// prop: "invoiceOn",
// type: "select",
// dicData: [
// {
// label: "停用",
// value: 0,
// },
// {
// label: "启用",
// value: 1,
// },
// {
// label: "-",
// value: -1,
// },
// ],
// display: false,
// },
// {
// label: "银联代发",
// prop: "payType",
// type: "select",
// dicData: [
// {
// label: "停用",
// value: 0,
// },
// {
// label: "启用",
// value: 1,
// },
// {
// label: "-",
// value: -1,
// },
// ],
// display: false,
// },
// {
// label: "保证金",
// prop: "trialOn",
// type: "select",
// // search: true,
// // searchslot:false,
// // searchLabelWidth: 66,
// // searchSpan: 5,
// dicData: [
// {
// label: "已缴",
// value: 0,
// },
// {
// label: "未缴",
// value: 1,
// },
// {
// label: "免缴",
// value: 2,
// }
// ],
// display: false,
// },
// {
// label: "签订合同",
// prop: "isSign",
// dicData: [
// {
// label: "未签",
// value: 0,
// },
// {
// label: "已签",
// value: 1,
// },
// ],
// display: false,
// },
// {
// label:'电子合同',
// prop:'contractOn',
// type:'select',
// dicData:[
// {
// label:'关闭',
// value:0
// },
// {
// label:'开启',
// value:1
// }
// ],
// display:false,
// },
// {
// label: "服务费",
// prop: "serveCost",
// slot: true,
// display: false,
// },
// {
// label: "驳回原因",
// prop: "remarks",
// display: false,
// },
{
label: "创建日期",
prop: "createTime",
type: "datetime",
format: "yyyy-MM-dd",
display: false,
},
{
label: "先开票",
prop: "invoiceOn",
type: "select",
dicData: [
{
label: "停用",
value: 0,
},
{
label: "启用",
value: 1,
},
{
label: "-",
value: -1,
},
],
display: false,
},
{
label: "银联代发",
prop: "payType",
type: "select",
dicData: [
{
label: "停用",
value: 0,
},
{
label: "启用",
value: 1,
},
{
label: "-",
value: -1,
},
],
display: false,
},
{
label: "保证金",
prop: "trialOn",
type: "select",
// search: true,
// searchslot:false,
// searchLabelWidth: 66,
// searchSpan: 5,
dicData: [
{
label: "已缴",
value: 0,
},
{
label: "未缴",
value: 1,
},
{
label: "免缴",
value: 2,
}
],
display: false,
},
{
label: "签订合同",
prop: "isSign",
dicData: [
{
label: "未签",
value: 0,
},
{
label: "已签",
value: 1,
},
],
display: false,
},
{
label:'电子合同',
prop:'contractOn',
type:'select',
dicData:[
{
label:'关闭',
value:0
},
{
label:'开启',
value:1
}
],
display:false,
},
{
label: "服务费",
prop: "serveCost",
slot: true,
display: false,
},
{
label: "驳回原因",
prop: "remarks",
label: "审核日期",
prop: "reviewTime",
type: "datetime",
format: "yyyy-MM-dd",
display: false,
},
],
@@ -501,8 +439,8 @@ export default {
size: "small",
prop: "tradeId",
rules: [
{
required:true,validator:validateTradeId,trigger:'blur'
{
required: true, validator: validateTradeId, trigger: 'blur'
}
],
filterable: true,
@@ -512,9 +450,9 @@ export default {
value: "id",
},
dicFormatter(resp) {
var result=[];
var result = [];
resp.data.forEach(ele => {
if(ele.name!="1"){
if (ele.name != "1") {
result.push(ele)
}
});
@@ -998,7 +936,7 @@ export default {
this.loading = false;
});
})
.catch(() => {});
.catch(() => { });
},
rowStart(id) {
let h = this.$createElement;
@@ -1026,7 +964,7 @@ export default {
this.loading = false;
});
})
.catch(() => {});
.catch(() => { });
},
searchReset() {
this.query = {};
@@ -1048,25 +986,25 @@ export default {
},
beforeOpen(done, type) {
if (["add", "edit"].includes(type)) {
this.imgList=[];
this.imgList = [];
this.initData();
done();
}
if (["edit", "view"].includes(type)) {
this.imgList=[];
this.imgList = [];
this.loading = true;
getDetail(this.form.id).then((res) => {
this.loading = false;
this.form = res.data.data;
if(this.form.motoleyUrl!=""){
var strList=this.form.motoleyUrl.split(',');
for(var i in strList){
this.imgList.push({url:strList[i]})
if (this.form.motoleyUrl != "") {
var strList = this.form.motoleyUrl.split(',');
for (var i in strList) {
this.imgList.push({ url: strList[i] })
}
}
if (this.form.tradeId == 1) {
this.form.tradeId = '';
}
if(this.form.tradeId==1){
this.form.tradeId='';
}
done();
});
}
@@ -1100,50 +1038,50 @@ export default {
moneyFormat,
/*多张图片上传*/
handleImgLimit(){
handleImgLimit() {
this.$message.warning('当前最多上传5张图片');
},
handleImgSuccess(res){
if(res.code==200){
this.imgList.push({url:res.data.link});
handleImgSuccess(res) {
if (res.code == 200) {
this.imgList.push({ url: res.data.link });
var str="";
for(var i=0;i<this.imgList.length;i++){
str+=this.imgList[i]['url']+",";
var str = "";
for (var i = 0; i < this.imgList.length; i++) {
str += this.imgList[i]['url'] + ",";
}
if (str.length > 0) {
str = str.substr(0, str.length - 1);
}
this.form.motoleyUrl = str;
}
if(str.length>0){
str=str.substr(0,str.length-1);
}
this.form.motoleyUrl=str;
}
else{
else {
this.$message.error('上传失败');
}
},
handleImgRemove(file){
let index=0;
for(let i in this.imgList){
if(this.imgList[i]['uid']==file.uid){
index=i;
handleImgRemove(file) {
let index = 0;
for (let i in this.imgList) {
if (this.imgList[i]['uid'] == file.uid) {
index = i;
break;
}
}
this.imgList.splice(index,1);
var str="";
for(var i=0;i<this.imgList.length;i++){
str+=this.imgList[i]['url']+",";
this.imgList.splice(index, 1);
var str = "";
for (var i = 0; i < this.imgList.length; i++) {
str += this.imgList[i]['url'] + ",";
}
if(str.length>0){
str=str.substr(0,str.length-1);
if (str.length > 0) {
str = str.substr(0, str.length - 1);
}
this.form.motoleyUrl=str;
this.form.motoleyUrl = str;
},
selectInsureTyepChange(val){
this.query.insuranceOn=val
selectInsureTyepChange(val) {
this.query.insuranceOn = val
},
selectTrailTyepChange(val){
this.query.trialOn=val;
selectTrailTyepChange(val) {
this.query.trialOn = val;
},
},
watch: {},
@@ -1151,19 +1089,22 @@ export default {
</script>
<style>
.companyList-upload .el-upload--picture-card{
width: 178px;
height: 178px;
background-color: #ffffff;
}
.companyList-upload .el-input__inner{
border: 1px solid #DCDFE6;
}
.companyList-upload .el-upload-list--picture-card .el-upload-list__item{
width: 178px;
height: 178px;
}
.motoley-img{
margin-right: 10px;
}
.companyList-upload .el-upload--picture-card {
width: 178px;
height: 178px;
background-color: #ffffff;
}
.companyList-upload .el-input__inner {
border: 1px solid #DCDFE6;
}
.companyList-upload .el-upload-list--picture-card .el-upload-list__item {
width: 178px;
height: 178px;
}
.motoley-img {
margin-right: 10px;
}
</style>

View File

@@ -24,8 +24,8 @@ module.exports = {
proxy: {
"/api": {
// target: 'http://192.168.3.104:8000', // 本地服务接口地址
target: "http://39.98.184.58:8000", // 阿里云后台地址
// target: "http://192.168.3.111:8000", // 本地
// target: "http://39.98.184.58:8000", // 阿里云后台地址
target: "http://192.168.3.111:8000", // 本地
ws: true,
changeOrigin: true,
pathRewrite: {

View File

@@ -1 +0,0 @@
network-timeout 600000