flat: zanc

This commit is contained in:
Apcallover
2024-05-11 18:01:56 +08:00
parent 1628473959
commit 48af499b2f

View File

@@ -1,13 +1,13 @@
<template> <template>
<basic-container> <basic-container>
<avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form" <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" :permission="permissionList" :before-open="beforeOpen" :before-close="beforeClose" :page.sync="page"
@row-update="rowUpdate" @row-save="rowSave" @search-change="searchChange" @search-reset="searchReset" @row-update="rowUpdate" @row-save="rowSave" @search-change="searchChange" @search-reset="searchReset"
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
@refresh-change="refreshChange" @on-load="onLoad" :upload-before="uploadBefore"> @refresh-change="refreshChange" @on-load="onLoad" :upload-before="uploadBefore">
<template slot="menuLeft"> <template slot="menuLeft">
<!-- <el-button v-if="vaildData(permission.manage_compan_companyList_addUser, false)" size="small"--> <!-- <el-button v-if="vaildData(permission.manage_compan_companyList_addUser, false)" size="small"-->
<!-- @click.stop="handleAddUser" type="primary" :disabled="selectionList.length === 0">关联账号</el-button>--> <!-- @click.stop="handleAddUser" type="primary" :disabled="selectionList.length === 0">关联账号</el-button>-->
<!-- <el-button v-if="vaildData(permission.manage_compan_companyList_config, false)" size="small" <!-- <el-button v-if="vaildData(permission.manage_compan_companyList_config, false)" size="small"
@click.stop="handleConfig" type="primary" :disabled="selectionList.length === 0">服务设置</el-button> --> @click.stop="handleConfig" type="primary" :disabled="selectionList.length === 0">服务设置</el-button> -->
<!-- <el-button v-if="vaildData(permission.manage_compan_companyList_check, false)" size="small" <!-- <el-button v-if="vaildData(permission.manage_compan_companyList_check, false)" size="small"
@@ -16,11 +16,14 @@
<template slot="cityIdForm" slot-scope="{ disabled }"> <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>
<template slot="cityId" slot-scope="{ row }">
{{ row.cityId === -1 ? '' : row.cityId }}
</template>
<template slot="companyAddressForm" slot-scope="{ disabled }"> <template slot="companyAddressForm" slot-scope="{ disabled }">
<select-map <select-map
ref="selectMap" ref="selectMap"
@addAddress="addAddress" @addAddress="addAddress"
@addressDel = "addressDel" @addressDel="addressDel"
:isCanEdit="!disabled" :isCanEdit="!disabled"
:lng="obj.lon" :lng="obj.lon"
:lat="obj.lat" :lat="obj.lat"
@@ -34,20 +37,20 @@
</template> </template>
<template slot="identityUrl4IdImgForm"> <template slot="identityUrl4IdImgForm">
<el-image style="width: 100px; height: 100px" :src="form.identityUrl4Id" <el-image style="width: 100px; height: 100px" :src="form.identityUrl4Id"
:preview-src-list="[form.identityUrl4Id]"></el-image> :preview-src-list="[form.identityUrl4Id]"></el-image>
</template> </template>
<template slot="identityUrl5IdImgForm"> <template slot="identityUrl5IdImgForm">
<el-image style="width: 100px; height: 100px" :src="form.identityUrl5Id" <el-image style="width: 100px; height: 100px" :src="form.identityUrl5Id"
:preview-src-list="[form.identityUrl5Id]"></el-image> :preview-src-list="[form.identityUrl5Id]"></el-image>
</template> </template>
<template slot="signSrcUrlForm"> <template slot="signSrcUrlForm">
<el-image style="width: 100px; height: 100px" :src="form.signSrcUrl" <el-image style="width: 100px; height: 100px" :src="form.signSrcUrl"
:preview-src-list="[form.signSrcUrl]"></el-image> :preview-src-list="[form.signSrcUrl]"></el-image>
</template> </template>
<template slot="letterOfAttorneyUrlForm"> <template slot="letterOfAttorneyUrlForm">
<el-image style="width: 100px; height: 100px" :src="form.letterOfAttorneyUrl" <el-image style="width: 100px; height: 100px" :src="form.letterOfAttorneyUrl"
:preview-src-list="[form.letterOfAttorneyUrl]"></el-image> :preview-src-list="[form.letterOfAttorneyUrl]"></el-image>
</template> </template>
<template slot="motoleyUrlImgForm"> <template slot="motoleyUrlImgForm">
<div v-if="imgList.length > 0"> <div v-if="imgList.length > 0">
@@ -62,18 +65,19 @@
<company-record :data="row"></company-record> <company-record :data="row"></company-record>
</template> </template>
<template slot="motoleyUrlForm"> <template slot="motoleyUrlForm">
<el-upload class="companyList-upload" list-type="picture-card" :auto-upload="true" :file-list="imgList" :limit="5" <el-upload class="companyList-upload" list-type="picture-card" :auto-upload="true" :file-list="imgList"
:action="mutiPutFile" :on-preview="handlePictureCardPreview" :on-exceed="handleImgLimit" :limit="5"
:on-success="handleImgSuccess" :on-remove="handleImgRemove" :before-remove="beforeRemove" :action="mutiPutFile" :on-preview="handlePictureCardPreview" :on-exceed="handleImgLimit"
:before-upload="beforeAvatarUpload"> :on-success="handleImgSuccess" :on-remove="handleImgRemove" :before-remove="beforeRemove"
:before-upload="beforeAvatarUpload">
<i slot="default" class="el-icon-plus avue-upload__icon"></i> <i slot="default" class="el-icon-plus avue-upload__icon"></i>
</el-upload> </el-upload>
</template> </template>
<!--服务费--> <!--服务费-->
<template slot="serveCost" slot-scope="{ row }"> <template slot="serveCost" slot-scope="{ row }">
<span v-if="row.serveCost != -1 && row.serveCost">{{ <span v-if="row.serveCost != -1 && row.serveCost">{{
moneyFormat(row.serveCost) moneyFormat(row.serveCost)
}}</span> }}</span>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
@@ -95,12 +99,13 @@
</template> --> </template> -->
<!--保证金状态搜索栏trialOn--> <!--保证金状态搜索栏trialOn-->
<template slot="trialOnSearch"> <template slot="trialOnSearch">
<el-select v-model="query.trialOn" placeholder="保证金" @change="selectTrailTyepChange"> <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 v-for="(item, index) in bondList" :key="index" :label="item.label" :value="item.value">{{
}}</el-option> item.label
}}
</el-option>
</el-select> </el-select>
</template> </template>
</avue-crud> </avue-crud>
@@ -119,18 +124,19 @@ import {
stop, stop,
start, start,
} from "@/api/manage/company"; } from "@/api/manage/company";
import { getStationDic } from "@/api/manage/station"; import {getStationDic} from "@/api/manage/station";
import { getTradeDic } from "@/api/manage/trade"; import {getTradeDic} from "@/api/manage/trade";
import { mapGetters } from "vuex"; import {mapGetters} from "vuex";
import addAccount from "./addAccount"; import addAccount from "./addAccount";
import companyConfig from "./companyConfig"; import companyConfig from "./companyConfig";
import companyCheck from "./companyCheck"; import companyCheck from "./companyCheck";
import { putFile } from "@/api/resource/oss"; import {putFile} from "@/api/resource/oss";
import { check18IdCardNo } from "@/util/validate"; import {check18IdCardNo} from "@/util/validate";
import { moneyFormat } from "@/util/money"; import {moneyFormat} from "@/util/money";
import companyRecord from "./companyRecord"; import companyRecord from "./companyRecord";
import { companyStatus } from "@/const/company"; import {companyStatus} from "@/const/company";
import SelectMap from "@/components/map/selectLocation"; import SelectMap from "@/components/map/selectLocation";
const accept = [ const accept = [
"image/png", "image/png",
"image/jpeg", "image/jpeg",
@@ -140,7 +146,7 @@ const accept = [
]; ];
function getPath(path) { function getPath(path) {
if(path) { if (path) {
const arr = path.split(","); const arr = path.split(",");
return arr[arr.length - 1]; return arr[arr.length - 1];
} }
@@ -148,7 +154,7 @@ function getPath(path) {
} }
export default { export default {
components: { addAccount, companyConfig, companyCheck, companyRecord, SelectMap }, components: {addAccount, companyConfig, companyCheck, companyRecord, SelectMap},
name: "manage_compan_companyList", name: "manage_compan_companyList",
data() { data() {
const validateTradeId = (rule, value, callback) => { const validateTradeId = (rule, value, callback) => {
@@ -234,7 +240,7 @@ export default {
indexLabel: "序号", indexLabel: "序号",
selection: true, selection: true,
viewBtn: true, viewBtn: true,
addBtn: true, addBtn: false,
editBtn: true, editBtn: true,
addBtnText: "社区街道登记", addBtnText: "社区街道登记",
addTitle: "新增机构名称", addTitle: "新增机构名称",
@@ -254,17 +260,15 @@ export default {
display: false, display: false,
}, },
{ {
type: "tree",
label: "联系人姓名", label: "联系人姓名",
display: false, display: false,
prop: "masterName", prop: "masterName",
}, },
{ {
label: "创建日期", label: "地区",
prop: "createTime",
type: "datetime",
format: "yyyy-MM-dd",
display: false, display: false,
prop: "cityId",
slot: true,
}, },
], ],
group: [ group: [
@@ -346,7 +350,7 @@ export default {
this.obj.lon = form.lng; this.obj.lon = form.lng;
this.form.companyAddress = form.address + (form.title || ""); this.form.companyAddress = form.address + (form.title || "");
}, },
addressDel(){ addressDel() {
this.form.companyAddress = this.obj.address = ""; this.form.companyAddress = this.obj.address = "";
}, },
// uploadBefore(file, done, loading) { // uploadBefore(file, done, loading) {
@@ -436,7 +440,7 @@ export default {
row.identityUrl4Id = getPath(row.identityUrl4Id); row.identityUrl4Id = getPath(row.identityUrl4Id);
row.identityUrl5Id = getPath(row.identityUrl5Id); row.identityUrl5Id = getPath(row.identityUrl5Id);
const copyRow = {...row} const copyRow = {...row}
if(this.obj.address) { if (this.obj.address) {
copyRow.companyAddress = this.obj.address copyRow.companyAddress = this.obj.address
} }
update(copyRow).then( update(copyRow).then(
@@ -458,7 +462,7 @@ export default {
rowStop(id) { rowStop(id) {
let h = this.$createElement; let h = this.$createElement;
this.$confirm( this.$confirm(
h("p", { style: "color: #F56C6C" }, "一旦终止合作社区街道将无法操作系统"), h("p", {style: "color: #F56C6C"}, "一旦终止合作社区街道将无法操作系统"),
"您确定要终止与此公司的合作吗?", "您确定要终止与此公司的合作吗?",
{ {
confirmButtonText: "确定", confirmButtonText: "确定",
@@ -481,12 +485,13 @@ export default {
this.loading = false; this.loading = false;
}); });
}) })
.catch(() => { }); .catch(() => {
});
}, },
rowStart(id) { rowStart(id) {
let h = this.$createElement; let h = this.$createElement;
this.$confirm( this.$confirm(
h("p", { style: "color: #F56C6C" }, "一旦恢复合作社区街道所有账号均可使用"), h("p", {style: "color: #F56C6C"}, "一旦恢复合作社区街道所有账号均可使用"),
"您确定要恢复与此公司的合作吗?", "您确定要恢复与此公司的合作吗?",
{ {
confirmButtonText: "确定", confirmButtonText: "确定",
@@ -509,7 +514,8 @@ export default {
this.loading = false; this.loading = false;
}); });
}) })
.catch(() => { }); .catch(() => {
});
}, },
searchReset() { searchReset() {
this.query = {}; this.query = {};
@@ -544,7 +550,7 @@ export default {
if (this.form.motoleyUrl) { if (this.form.motoleyUrl) {
var strList = this.form.motoleyUrl.split(','); var strList = this.form.motoleyUrl.split(',');
for (var i in strList) { for (var i in strList) {
this.imgList.push({ url: strList[i] }) this.imgList.push({url: strList[i]})
} }
} }
if (this.form.tradeId == 1) { if (this.form.tradeId == 1) {
@@ -588,7 +594,7 @@ export default {
}, },
handleImgSuccess(res) { handleImgSuccess(res) {
if (res.code == 200) { if (res.code == 200) {
this.imgList.push({ url: res.data.link }); this.imgList.push({url: res.data.link});
var str = ""; var str = "";
for (var i = 0; i < this.imgList.length; i++) { for (var i = 0; i < this.imgList.length; i++) {
@@ -598,8 +604,7 @@ export default {
str = str.substr(0, str.length - 1); str = str.substr(0, str.length - 1);
} }
this.form.motoleyUrl = str; this.form.motoleyUrl = str;
} } else {
else {
this.$message.error('上传失败'); this.$message.error('上传失败');
} }