|
|
|
@ -59,13 +59,13 @@
|
|
|
|
|
>编辑
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<!-- <el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
@click.native.stop="handleLinkClick(scope.row)"
|
|
|
|
|
>关联自助平台
|
|
|
|
|
</el-button
|
|
|
|
|
>-->
|
|
|
|
|
<!-- <el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
@click.native.stop="handleLinkClick(scope.row)"
|
|
|
|
|
>关联自助平台
|
|
|
|
|
</el-button
|
|
|
|
|
>-->
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
@ -92,6 +92,51 @@
|
|
|
|
|
:close-on-press-escape="false"
|
|
|
|
|
>
|
|
|
|
|
<el-form :model="editQuery" ref="editQuery" :rules="rules">
|
|
|
|
|
<!--<el-row :gutter="20" class="el-row" type="flex">
|
|
|
|
|
<el-col :span="10" class="el-col">
|
|
|
|
|
<div class="text item">
|
|
|
|
|
<div class="text item">
|
|
|
|
|
<el-form-item label="往来单位名称" prop="name">
|
|
|
|
|
<el-input v-model="editQuery.name" auto-complete="off"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="拼音码" prop="pinyinCode">
|
|
|
|
|
<el-input v-model="editQuery.pinyinCode" auto-complete="off" ></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="企业自定义ID" prop="thirdId">
|
|
|
|
|
<el-input v-model="editQuery.thirdId"" auto-complete="off" ></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="社会信用号" prop="creditNo">
|
|
|
|
|
<el-input type="" v-model="editQuery.creditNo" auto-complete="off" :disabled="true"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="10" class="el-col" type="flex">
|
|
|
|
|
<div class="text item">
|
|
|
|
|
<el-form-item label="往来单位编码" prop="contact">
|
|
|
|
|
<el-input v-model="editQuery.contact" auto-complete="off" :disabled="true"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="第三方往来单位ID" prop="thirdId">
|
|
|
|
|
<el-input v-model="editQuery.mobile" auto-complete="off" :disabled="true"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="地址" prop="addr">
|
|
|
|
|
<el-input v-model="editQuery.addr" auto-complete="off" :disabled="true"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item v-if="spellUpdate" label="往来单位类型" prop="corpType">
|
|
|
|
|
<el-select v-model="editQuery.corpType" placeholder="往来单位类型">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in corpTypeList"
|
|
|
|
|
:key="item.value"
|
|
|
|
|
:label="item.label"
|
|
|
|
|
:value="item.value">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>-->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="20" class="el-row" type="flex">
|
|
|
|
|
<el-col :span="10" class="el-col" type="flex">
|
|
|
|
|
<div class="text item">
|
|
|
|
@ -105,17 +150,15 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="10" class="el-col">
|
|
|
|
|
<el-col :span="10" class="el-col" type="flex">
|
|
|
|
|
<div class="text item">
|
|
|
|
|
<div class="text item">
|
|
|
|
|
<el-form-item label="往来单位简写" prop="spell">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="editQuery.spell"
|
|
|
|
|
size="small"
|
|
|
|
|
style="width: 60%"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</div>
|
|
|
|
|
<el-form-item label="拼音码" prop="pinyinCode">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="editQuery.pinyinCode"
|
|
|
|
|
style="width: 60%"
|
|
|
|
|
size="small"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
@ -167,7 +210,6 @@
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="20" class="el-row" type="flex">
|
|
|
|
|
<el-col :span="10" class="el-col" type="flex">
|
|
|
|
|
<div class="text item">
|
|
|
|
@ -180,20 +222,6 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="10" class="el-col" type="flex">
|
|
|
|
|
<div class="text item">
|
|
|
|
|
<el-form-item label="拼音码" prop="pinyinCode">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="editQuery.pinyinCode"
|
|
|
|
|
style="width: 60%"
|
|
|
|
|
size="small"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="20" class="el-row" type="flex">
|
|
|
|
|
<el-col :span="10" class="el-col" type="flex">
|
|
|
|
|
<div class="text item">
|
|
|
|
|
<el-form-item label="往来单位类型" prop="corpType">
|
|
|
|
@ -209,7 +237,6 @@
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
@ -313,260 +340,295 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {
|
|
|
|
|
getUnitMaintain,
|
|
|
|
|
addUnit,
|
|
|
|
|
modifyUnit,
|
|
|
|
|
deleteUnitMaintain
|
|
|
|
|
} from "../../api/receipts/unitMaintain";
|
|
|
|
|
import {
|
|
|
|
|
getPlatform,
|
|
|
|
|
linkPlatform
|
|
|
|
|
} from "../../api/auth/platform";
|
|
|
|
|
import {
|
|
|
|
|
getUnitMaintain,
|
|
|
|
|
addUnit,
|
|
|
|
|
modifyUnit,
|
|
|
|
|
deleteUnitMaintain
|
|
|
|
|
} from "../../api/receipts/unitMaintain";
|
|
|
|
|
import {
|
|
|
|
|
getPlatform,
|
|
|
|
|
linkPlatform
|
|
|
|
|
} from "../../api/auth/platform";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
query: {
|
|
|
|
|
key: "",
|
|
|
|
|
customerId: this.$store.getters.customerId,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20
|
|
|
|
|
},
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
query: {
|
|
|
|
|
key: "",
|
|
|
|
|
customerId: this.$store.getters.customerId,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
editQuery: {
|
|
|
|
|
unitId: null,
|
|
|
|
|
thirdId: null,
|
|
|
|
|
name: null,
|
|
|
|
|
spell: null,
|
|
|
|
|
creditNo: null,
|
|
|
|
|
pinyinCode: null,
|
|
|
|
|
contact: null,
|
|
|
|
|
mobile: null,
|
|
|
|
|
corpType: null,
|
|
|
|
|
outType: null
|
|
|
|
|
},
|
|
|
|
|
editLogin: {
|
|
|
|
|
platformId: null,
|
|
|
|
|
platformUsername: null,
|
|
|
|
|
platformPassword: null,
|
|
|
|
|
appid: null,
|
|
|
|
|
appKey: null,
|
|
|
|
|
sceretKey: null
|
|
|
|
|
},
|
|
|
|
|
editPlatfromQuery: {
|
|
|
|
|
id: null,
|
|
|
|
|
name: null,
|
|
|
|
|
host: null
|
|
|
|
|
},
|
|
|
|
|
spellUpdate: true,
|
|
|
|
|
platformVisible: false,
|
|
|
|
|
editLoginVisible: false,
|
|
|
|
|
checked: false,
|
|
|
|
|
editDialogVisible: false,
|
|
|
|
|
list: [],
|
|
|
|
|
platformList: [],
|
|
|
|
|
total: 0,
|
|
|
|
|
multipleSelection: [],
|
|
|
|
|
rules: {
|
|
|
|
|
name: [
|
|
|
|
|
{required: true, message: "请输入往来单位名称", trigger: "change"}
|
|
|
|
|
],
|
|
|
|
|
creditNo: [
|
|
|
|
|
{required: true, message: "请输入社会信用号", trigger: "change"}
|
|
|
|
|
],
|
|
|
|
|
corpType: [
|
|
|
|
|
{required: true, message: "请选择往来单位类型", trigger: "change"}
|
|
|
|
|
],
|
|
|
|
|
pinyinCode: [
|
|
|
|
|
{required: true, message: "请输入拼音码", trigger: "change"}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
platformRules: {
|
|
|
|
|
platformId: [
|
|
|
|
|
{required: true, message: "请选择自助平台", trigger: "change"}
|
|
|
|
|
],
|
|
|
|
|
userName: [
|
|
|
|
|
{required: true, message: "请输入账号", trigger: "change"}
|
|
|
|
|
],
|
|
|
|
|
password: [
|
|
|
|
|
{required: true, message: "请输入密码", trigger: "change"}
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
editQuery: {
|
|
|
|
|
unitId: null,
|
|
|
|
|
thirdId: null,
|
|
|
|
|
name: null,
|
|
|
|
|
spell: null,
|
|
|
|
|
creditNo: null,
|
|
|
|
|
pinyinCode: null,
|
|
|
|
|
contact: null,
|
|
|
|
|
mobile: null,
|
|
|
|
|
corpType: null,
|
|
|
|
|
outType: null
|
|
|
|
|
},
|
|
|
|
|
editType: 0,
|
|
|
|
|
editTypeMap: {
|
|
|
|
|
0: "新增往来单位",
|
|
|
|
|
1: "编辑往来单位",
|
|
|
|
|
2: "关联自助平台"
|
|
|
|
|
},
|
|
|
|
|
corpTypeList: [
|
|
|
|
|
{
|
|
|
|
|
value: 1,
|
|
|
|
|
label: "客户"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 2,
|
|
|
|
|
label: "供应商"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 4,
|
|
|
|
|
label: "特殊往来"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
coryTypeArr: {
|
|
|
|
|
1: "客户",
|
|
|
|
|
2: "供应商",
|
|
|
|
|
4: "特殊往来"
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
|
onReset() {
|
|
|
|
|
this.$router.push({
|
|
|
|
|
path: ""
|
|
|
|
|
});
|
|
|
|
|
this.query = {
|
|
|
|
|
key: "",
|
|
|
|
|
customerId: this.$store.getters.customerId,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20
|
|
|
|
|
};
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
editLogin: {
|
|
|
|
|
platformId: null,
|
|
|
|
|
platformUsername: null,
|
|
|
|
|
platformPassword: null,
|
|
|
|
|
appid: null,
|
|
|
|
|
appKey: null,
|
|
|
|
|
sceretKey: null
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
getUnitMaintain(this.query)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.list = response.data.list || [];
|
|
|
|
|
this.total = response.data.total || 0;
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.list = [];
|
|
|
|
|
this.total = 0;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
editPlatfromQuery: {
|
|
|
|
|
id: null,
|
|
|
|
|
name: null,
|
|
|
|
|
host: null
|
|
|
|
|
//获取自助平台数据
|
|
|
|
|
getPlatformList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
getPlatform()
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.platformList = response.data.list || [];
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.platformList = [];
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
platformVisible: false,
|
|
|
|
|
editLoginVisible: false,
|
|
|
|
|
checked: false,
|
|
|
|
|
editDialogVisible: false,
|
|
|
|
|
list: [],
|
|
|
|
|
platformList: [],
|
|
|
|
|
total: 0,
|
|
|
|
|
multipleSelection: [],
|
|
|
|
|
rules: {
|
|
|
|
|
name: [
|
|
|
|
|
{ required: true, message: "请输入往来单位名称", trigger: "change" }
|
|
|
|
|
],
|
|
|
|
|
spell: [
|
|
|
|
|
{ required: true, message: "请输入往来单位简写", trigger: "change" }
|
|
|
|
|
],
|
|
|
|
|
creditNo: [
|
|
|
|
|
{ required: true, message: "请输入社会信用号", trigger: "change" }
|
|
|
|
|
],
|
|
|
|
|
corpType: [
|
|
|
|
|
{ required: true, message: "请选择往来单位类型", trigger: "change" }
|
|
|
|
|
],
|
|
|
|
|
pinyinCode: [
|
|
|
|
|
{ required: true, message: "请输入拼音码", trigger: "change" }
|
|
|
|
|
]
|
|
|
|
|
deleteUnit(data) {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
let tquery = {
|
|
|
|
|
id: data.id + ""
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
deleteUnitMaintain(tquery)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
if (response.code == 20000) {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.$message({
|
|
|
|
|
type: "success",
|
|
|
|
|
message: "删除成功!"
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
platformRules: {
|
|
|
|
|
platformId: [
|
|
|
|
|
{ required: true, message: "请选择自助平台", trigger: "change" }
|
|
|
|
|
],
|
|
|
|
|
userName: [
|
|
|
|
|
{ required: true, message: "请输入账号", trigger: "change" }
|
|
|
|
|
],
|
|
|
|
|
password: [
|
|
|
|
|
{ required: true, message: "请输入密码", trigger: "change" }
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
cancelDialog() {
|
|
|
|
|
this.editDialogVisible = false;
|
|
|
|
|
this.editLoginVisible = false;
|
|
|
|
|
},
|
|
|
|
|
editType: 0,
|
|
|
|
|
editTypeMap: {
|
|
|
|
|
0: "新增往来单位",
|
|
|
|
|
1: "编辑往来单位",
|
|
|
|
|
2: "关联自助平台"
|
|
|
|
|
|
|
|
|
|
handleModifyClick(row) {
|
|
|
|
|
this.editType = 1;
|
|
|
|
|
this.editDialogVisible = true;
|
|
|
|
|
this.editQuery = row;
|
|
|
|
|
},
|
|
|
|
|
corpTypeList: [
|
|
|
|
|
{
|
|
|
|
|
value: 1,
|
|
|
|
|
label: "客户"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 2,
|
|
|
|
|
label: "供应商"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 4,
|
|
|
|
|
label: "特殊往来"
|
|
|
|
|
handleLinkClick(row) {
|
|
|
|
|
if (row.platformId != null) {
|
|
|
|
|
//已经绑定过
|
|
|
|
|
this.$confirm("是否需要重新关联自助平台?", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
type: "warning"
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.editType = 2;
|
|
|
|
|
this.editLoginVisible = true;
|
|
|
|
|
this.editLogin = row;
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.editType = 2;
|
|
|
|
|
this.editLoginVisible = true;
|
|
|
|
|
this.editLogin = row;
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
coryTypeArr: {
|
|
|
|
|
1: "客户",
|
|
|
|
|
2: "供应商",
|
|
|
|
|
4: "特殊往来"
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
handleAddClick() {
|
|
|
|
|
this.editType = 0;
|
|
|
|
|
this.editDialogVisible = true;
|
|
|
|
|
this.editQuery = {
|
|
|
|
|
unitId: null,
|
|
|
|
|
thirdId: null,
|
|
|
|
|
name: null,
|
|
|
|
|
spell: null,
|
|
|
|
|
creditNo: null
|
|
|
|
|
};
|
|
|
|
|
var timestamp3 = new Date().getTime();
|
|
|
|
|
this.editQuery.unitId = timestamp3;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
|
onReset() {
|
|
|
|
|
this.$router.push({
|
|
|
|
|
path: ""
|
|
|
|
|
});
|
|
|
|
|
this.query = {
|
|
|
|
|
key: "",
|
|
|
|
|
customerId: this.$store.getters.customerId,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20
|
|
|
|
|
};
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
getUnitMaintain(this.query)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.list = response.data.list || [];
|
|
|
|
|
this.total = response.data.total || 0;
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.list = [];
|
|
|
|
|
this.total = 0;
|
|
|
|
|
change() {
|
|
|
|
|
var pinyin = require("pinyin");
|
|
|
|
|
var py = pinyin(this.editQuery.name, {
|
|
|
|
|
style: pinyin.STYLE_FIRST_LETTER, // 设置拼音风格
|
|
|
|
|
heteronym: true
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
//获取自助平台数据
|
|
|
|
|
getPlatformList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
getPlatform()
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.platformList = response.data.list || [];
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.platformList = [];
|
|
|
|
|
var str = "";
|
|
|
|
|
py.forEach((item) => {
|
|
|
|
|
str = str + item[0];
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
deleteUnit(data) {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
let tquery = {
|
|
|
|
|
id: data.id + ""
|
|
|
|
|
};
|
|
|
|
|
this.editQuery.pinyinCode = str;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
deleteUnitMaintain(tquery)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
if (response.code == 20000) {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.$message({
|
|
|
|
|
type: "success",
|
|
|
|
|
message: "删除成功!"
|
|
|
|
|
});
|
|
|
|
|
formSubmit() {
|
|
|
|
|
this.$refs["editQuery"].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if (this.editType == 0) {
|
|
|
|
|
addUnit(this.editQuery)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
if (response.code == 20000) {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.$message({
|
|
|
|
|
type: "success",
|
|
|
|
|
message: "添加成功"
|
|
|
|
|
});
|
|
|
|
|
this.cancelDialog();
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(response.message);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
modifyUnit(this.editQuery)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
if (response.code == 20000) {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.$message({
|
|
|
|
|
type: "success",
|
|
|
|
|
message: "修改成功"
|
|
|
|
|
});
|
|
|
|
|
this.cancelDialog();
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(response.message);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
cancelDialog() {
|
|
|
|
|
this.editDialogVisible = false;
|
|
|
|
|
this.editLoginVisible = false;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
handleModifyClick(row) {
|
|
|
|
|
this.editType = 1;
|
|
|
|
|
this.editDialogVisible = true;
|
|
|
|
|
this.editQuery = row;
|
|
|
|
|
},
|
|
|
|
|
handleLinkClick(row) {
|
|
|
|
|
if (row.platformId != null) {
|
|
|
|
|
//已经绑定过
|
|
|
|
|
this.$confirm("是否需要重新关联自助平台?", "提示", {
|
|
|
|
|
},
|
|
|
|
|
intentPlatform(value) {
|
|
|
|
|
this.editPlatfromQuery.id = value;
|
|
|
|
|
},
|
|
|
|
|
deleteDialog(rowId) {
|
|
|
|
|
this.$confirm("此操作将永久删除该往来单位信息, 是否继续?", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
type: "warning"
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.editType = 2;
|
|
|
|
|
this.editLoginVisible = true;
|
|
|
|
|
this.editLogin = row;
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.editType = 2;
|
|
|
|
|
this.editLoginVisible = true;
|
|
|
|
|
this.editLogin = row;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
handleAddClick() {
|
|
|
|
|
this.editType = 0;
|
|
|
|
|
this.editDialogVisible = true;
|
|
|
|
|
this.editQuery = {
|
|
|
|
|
unitId: null,
|
|
|
|
|
thirdId: null,
|
|
|
|
|
name: null,
|
|
|
|
|
spell: null,
|
|
|
|
|
creditNo: null
|
|
|
|
|
};
|
|
|
|
|
var timestamp3 = new Date().getTime();
|
|
|
|
|
this.editQuery.unitId = timestamp3;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
change() {
|
|
|
|
|
var pinyin = require("pinyin");
|
|
|
|
|
var py = pinyin(this.editQuery.name, {
|
|
|
|
|
style: pinyin.STYLE_FIRST_LETTER, // 设置拼音风格
|
|
|
|
|
heteronym: true
|
|
|
|
|
});
|
|
|
|
|
var str = "";
|
|
|
|
|
py.forEach((item) => {
|
|
|
|
|
str = str + item[0];
|
|
|
|
|
});
|
|
|
|
|
this.editQuery.pinyinCode = str;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
formSubmit() {
|
|
|
|
|
this.$refs["editQuery"].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if (this.editType == 0) {
|
|
|
|
|
addUnit(this.editQuery)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
if (response.code == 20000) {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.$message({
|
|
|
|
|
type: "success",
|
|
|
|
|
message: "添加成功"
|
|
|
|
|
});
|
|
|
|
|
this.cancelDialog();
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(response.message);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
modifyUnit(this.editQuery)
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
this.deleteUnit(rowId);
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
linkSubmit() {
|
|
|
|
|
this.$refs["editLogin"].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
linkPlatform(this.editLogin)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
if (response.code == 20000) {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.$message({
|
|
|
|
|
type: "success",
|
|
|
|
|
message: "修改成功"
|
|
|
|
|
message: "关联成功"
|
|
|
|
|
});
|
|
|
|
|
this.cancelDialog();
|
|
|
|
|
} else {
|
|
|
|
@ -575,77 +637,41 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
intentPlatform(value) {
|
|
|
|
|
this.editPlatfromQuery.id = value;
|
|
|
|
|
},
|
|
|
|
|
deleteDialog(rowId) {
|
|
|
|
|
this.$confirm("此操作将永久删除该往来单位信息, 是否继续?", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
type: "warning"
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
this.deleteUnit(rowId);
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
linkSubmit() {
|
|
|
|
|
this.$refs["editLogin"].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
linkPlatform(this.editLogin)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
if (response.code == 20000) {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.$message({
|
|
|
|
|
type: "success",
|
|
|
|
|
message: "关联成功"
|
|
|
|
|
});
|
|
|
|
|
this.cancelDialog();
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(response.message);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
exportTxt() {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
exportTxt() {
|
|
|
|
|
},
|
|
|
|
|
handleSelectionChange(val) {
|
|
|
|
|
console.log("----" + val);
|
|
|
|
|
this.multipleSelection = val;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
handleSelectionChange(val) {
|
|
|
|
|
console.log("----" + val);
|
|
|
|
|
this.multipleSelection = val;
|
|
|
|
|
handleCurrentChange(val) {
|
|
|
|
|
this.query.page = val;
|
|
|
|
|
this.getList();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
handleCurrentChange(val) {
|
|
|
|
|
this.query.page = val;
|
|
|
|
|
mounted() {
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.getPlatformList();
|
|
|
|
|
var pinyin = require("pinyin");
|
|
|
|
|
console.log(
|
|
|
|
|
pinyin("中心", {
|
|
|
|
|
style: pinyin.STYLE_FIRST_LETTER, // 设置拼音风格
|
|
|
|
|
heteronym: true
|
|
|
|
|
})
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.getPlatformList();
|
|
|
|
|
var pinyin = require("pinyin");
|
|
|
|
|
console.log(
|
|
|
|
|
pinyin("中心", {
|
|
|
|
|
style: pinyin.STYLE_FIRST_LETTER, // 设置拼音风格
|
|
|
|
|
heteronym: true
|
|
|
|
|
})
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|