企业往来单位

master
薛宇 2 years ago
parent da85a6459b
commit 95576a1f4f

@ -38,6 +38,8 @@ import DictTag from '@/components/DictTag'
import VueMeta from 'vue-meta' import VueMeta from 'vue-meta'
// 字典数据组件 // 字典数据组件
import DictData from '@/components/DictData' import DictData from '@/components/DictData'
// 富文本编辑器
import cusEditor from '@/views/components/cusEditor.vue'
// 去除控制台的 Vue warn 警告信息 // 去除控制台的 Vue warn 警告信息
Vue.config.silent = true; Vue.config.silent = true;
@ -62,6 +64,7 @@ Vue.component('Editor', Editor)
Vue.component('FileUpload', FileUpload) Vue.component('FileUpload', FileUpload)
Vue.component('ImageUpload', ImageUpload) Vue.component('ImageUpload', ImageUpload)
Vue.component('ImagePreview', ImagePreview) Vue.component('ImagePreview', ImagePreview)
Vue.component("cusEditor", cusEditor)
Vue.use(directive) Vue.use(directive)
Vue.use(plugins) Vue.use(plugins)

@ -3,19 +3,32 @@
<el-card class="el-card"> <el-card class="el-card">
<el-form :model="query" label-width="100px" class="query-form" size="mini" v-show="showSearch"> <el-form :model="query" label-width="100px" class="query-form" size="mini" v-show="showSearch">
<el-row> <el-row>
<el-col span="6"> <el-col type="flex" :span="8">
<el-form-item label="搜索:"> <el-form-item label="注册企业名称:">
<el-input v-model="query.key" placeholder="搜索" style="width: 90%" clearable="true"></el-input> <el-input
v-model="query.companyName"
style="width: 90%"
placeholder="注册企业名称:"
clearable
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col span="6"> <el-col type="flex" :span="8">
<el-form-item label="往来单位名称:">
<el-input
v-model="query.name"
style="width: 90%"
placeholder="往来单位名称"
clearable
></el-input>
</el-form-item>
</el-col>
<el-col span="8">
<el-form-item label="往来单位类型:"> <el-form-item label="往来单位类型:">
<el-select v-model="query.corpType" style="width: 90%" placeholder="请选择往来单位类型"> <el-select v-model="query.corpType" style="width: 90%" placeholder="请选择往来单位类型">
<el-option label="全部" value=""></el-option> <el-option label="全部" value=""></el-option>
<el-option label="客户" value="1"></el-option> <el-option label="客户" value="1"></el-option>
<el-option label="供应商" value="2"></el-option> <el-option label="供应商" value="2"></el-option>
<el-option label="特殊科室" value="3"></el-option>
<el-option label="特殊往来" value="4"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -28,31 +41,33 @@
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button> <el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="search"></el-button> <el-button type="primary" icon="el-icon-search" @click="search"></el-button>
<el-button type="primary" icon="el-icon-plus" @click.native="handleForm(null, null)" <!-- <el-button type="primary" icon="el-icon-plus" @click.native="handleForm(null, null)"-->
:disabled="!configParms.basicCorp">新增 <!-- :disabled="!configParms.basicCorp">新增-->
</el-button> <!-- </el-button>-->
<el-button type="primary" icon="el-icon-bottom-right" @click="intentDetail"></el-button> <!-- <el-button type="primary" icon="el-icon-plus" @click.native="handleForm(null, null)">新增</el-button>-->
<!-- <el-button type="primary" icon="el-icon-bottom-right" @click="intentDetail"></el-button>-->
</el-button-group> </el-button-group>
</div> </div>
<el-divider style="margin: 15px"></el-divider> <el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row <el-table v-loading="loading" :data="list" border highlight-current-row>
@selection-change="handleSelectionChange"> <el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column type="selection" width="55"></el-table-column> <el-table-column label="注册企业" prop="companyName" width="230"></el-table-column>
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="往来单位" prop="name" width="230"></el-table-column>
<el-table-column label="往来单位编码" prop="erpId" show-overflow-tooltip></el-table-column> <el-table-column label="往来单位编码" prop="erpId" width="120" show-overflow-tooltip></el-table-column>
<el-table-column label="第三方主系统ID" prop="thirdId" show-overflow-tooltip></el-table-column> <el-table-column label="第三方主系统ID" prop="thirdId" width="120" show-overflow-tooltip></el-table-column>
<el-table-column label="名称" prop="name" show-overflow-tooltip></el-table-column> <!-- <el-table-column label="名称" prop="name" show-overflow-tooltip></el-table-column>-->
<el-table-column label="简写" prop="spell" show-overflow-tooltip></el-table-column> <el-table-column label="简写" prop="spell" show-overflow-tooltip></el-table-column>
<el-table-column label="社会信用号" prop="creditNo" show-overflow-tooltip></el-table-column> <el-table-column label="社会信用号" prop="creditNo" width="230" show-overflow-tooltip></el-table-column>
<el-table-column label="地址" prop="addr" show-overflow-tooltip></el-table-column> <el-table-column label="地址" prop="addr" width="230" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="120"> <el-table-column label="操作" width="180" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click.native="handleForm(scope.$index, scope.row)">编辑</el-button> <el-button type="text" @click.native="handleForm(scope.$index, scope.row)">编辑</el-button>
<el-button type="text" :disabled="!configParms.basicCorp" @click.native.stop="deleteDialog(scope.row)"> <el-button type="text" @click.native="handCert(scope.$index, scope.row)">资质证书</el-button>
删除 <!-- <el-button type="text" @click.native.stop="deleteDialog(scope.row)">-->
</el-button> <!-- 删除-->
<!-- </el-button>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -89,8 +104,6 @@
<selectSingleUnit v-on:cancelDialog="cancelDialog" :corpData="corpData" <selectSingleUnit v-on:cancelDialog="cancelDialog" :corpData="corpData"
:defaultSys="defaultSys"></selectSingleUnit> :defaultSys="defaultSys"></selectSingleUnit>
</el-dialog> </el-dialog>
<!--表单--> <!--表单-->
<el-dialog <el-dialog
:title="formMap[formName]" :title="formMap[formName]"
@ -98,95 +111,185 @@
:before-close="hideForm" :before-close="hideForm"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
width="60%" width="80%"
top="5vh" top="5vh"
> >
<el-table :data="sysList" style="width: 100%" border v-if="formName=='update'"> <el-form :model="editQuery" :rules="formRules" style="margin-top: -30px" label-width="150px" ref="dataForm">
<el-table-column label="序号" type="index"></el-table-column> <el-card class="el-card">
<el-table-column label="第三方系统名称" prop="sysName" show-overflow-tooltip></el-table-column> <div style="clear: both;height: 60px;text-align: right;">
<el-table-column label="第三方往来单位ID" prop="thirdId" show-overflow-tooltip></el-table-column>
<el-table-column label="第三方往来单位名称" prop="thirdName" show-overflow-tooltip></el-table-column> <el-button type="primary" @click.native="formSubmit()" :loading="formLoading">提交</el-button>
<el-table-column label="操作">
<template slot-scope="scope"> </div>
<el-button type="text" size="small" @click="intentSelect(scope.row)" :disabled="!configParms.basicCorp"> <el-row type="flex">
关联 <el-col :span="12" type="flex">
</el-button> <el-form-item label="往来单位名称" prop="name">
<el-button type="text" size="small" @click.native.stop="removeErp(scope.row)" <el-input v-model="editQuery.name" size="small" style="width: 90%" auto-complete="off" @input="change()"
:disabled="scope.row.thirdId=='' ||scope.row.thirdId==null || !configParms.basicCorp">解绑 splaceholder="请输入往来单位名称"></el-input>
</el-button> </el-form-item>
</template> </el-col>
</el-table-column> <el-col :span="12" type="flex">
</el-table> <el-form-item label="往来单位编码" prop="erpId">
<el-form :model="editQuery" :rules="formRules" style="margin-top: 20px" label-width="120px" ref="dataForm"> <el-input v-model="editQuery.erpId" style="width: 90%" auto-complete="off" disabled="true"
<el-row type="flex"> splaceholder="请输入往来单位编码"></el-input>
<el-col :span="12" type="flex"> </el-form-item>
<el-form-item label="往来单位名称" prop="name"> </el-col>
<el-input v-model="editQuery.name" size="small" style="width: 90%" auto-complete="off" @input="change()" </el-row>
splaceholder="请输入往来单位名称"></el-input> <el-row type="flex">
</el-form-item> <el-col :span="12" type="flex">
</el-col> <el-form-item label="社会信用号" prop="creditNo">
<el-col :span="12" type="flex"> <el-input v-model="editQuery.creditNo" style="width: 90%" splaceholder="请输入社会信用号"
<el-form-item label="往来单位编码" prop="erpId"> auto-complete="off"></el-input>
<el-input v-model="editQuery.erpId" style="width: 90%" auto-complete="off" disabled="true" </el-form-item>
splaceholder="请输入往来单位编码"></el-input> </el-col>
</el-form-item> <el-col :span="12" type="flex">
</el-col> <el-form-item label="联系人" prop="contact">
</el-row> <el-input v-model="editQuery.contact" splaceholder="请输入联系人" style="width: 90%"
<el-row type="flex"> auto-complete="off"></el-input>
<el-col :span="12" type="flex"> </el-form-item>
<el-form-item label="社会信用号" prop="creditNo"> </el-col>
<el-input v-model="editQuery.creditNo" style="width: 90%" splaceholder="请输入社会信用号" </el-row>
auto-complete="off"></el-input> <el-row :type="flex">
</el-form-item> <el-col :span="12" type="flex">
</el-col> <el-form-item label="地址" prop="addr">
<el-col :span="12" type="flex"> <el-input type="" v-model="editQuery.addr" splaceholder="请输入地址" style="width: 90%"
<el-form-item label="联系人" prop="contact"> auto-complete="off"></el-input>
<el-input v-model="editQuery.contact" splaceholder="请输入联系人" style="width: 90%" </el-form-item>
auto-complete="off"></el-input> </el-col>
</el-form-item> <el-col :span="12" type="flex">
</el-col> <el-form-item label="联系电话" prop="mobile">
</el-row> <el-input v-model="editQuery.mobile" splaceholder="请输入联系电话" auto-complete="off"
<el-row :type="flex"> style="width: 90%"></el-input>
<el-col :span="12" type="flex"> </el-form-item>
<el-form-item label="地址" prop="addr"> </el-col>
<el-input type="" v-model="editQuery.addr" splaceholder="请输入地址" style="width: 90%" </el-row>
auto-complete="off"></el-input> <el-row :type="flex">
</el-form-item> <el-col :span="12" type="flex">
</el-col> <el-form-item label="往来单位类型" prop="corpType">
<el-col :span="12" type="flex"> <el-select v-model="editQuery.corpType" style="width: 90%" placeholder="请选择往来单位类型">
<el-form-item label="联系电话" prop="mobile"> <el-option
<el-input v-model="editQuery.mobile" splaceholder="请输入联系电话" auto-complete="off" v-for="item in corpTypeList"
style="width: 90%"></el-input> :key="item.value"
</el-form-item> :label="item.label"
</el-col> :value="item.value">
</el-row> </el-option>
<el-row :type="flex"> </el-select>
<el-col :span="12" type="flex"> </el-form-item>
<el-form-item label="往来单位类型" prop="corpType"> </el-col>
<el-select v-model="editQuery.corpType" style="width: 90%" placeholder="请选择往来单位类型"> <el-col :span="12" type="flex">
<el-option <el-form-item label="拼音码" prop="spell">
v-for="item in corpTypeList" <el-input v-model="editQuery.spell" placeholder="请输入拼音码" auto-complete="off"
:key="item.value" style="width: 90%"></el-input>
:label="item.label" </el-form-item>
:value="item.value"> </el-col>
</el-option> </el-row>
</el-select> </el-card>
</el-form-item> <!--分割线-------------------------------------------------------->
</el-col>
<el-col :span="12" type="flex">
<el-form-item label="拼音码" prop="spell">
<el-input v-model="editQuery.spell" placeholder="请输入拼音码" auto-complete="off"
style="width: 90%"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
<div style='text-align: center; margin-bottom: 10px;'> <el-card class="el-card" v-if="this.formName == 'cert'">
<el-button @click.native="hideForm">取消</el-button> <div style="float:right ">
<el-button type="primary" @click.native="formSubmit()" :loading="formLoading" <!-- <el-button type="primary" size="mini" icon="search" @click="selectCert"-->
:disabled="!configParms.basicCorp">提交 <!-- >选入资质证书-->
</el-button> <!-- </el-button-->
</div> <!-- >-->
<el-button
type="primary"
size="mini"
icon="search"
@click="addCert()"
>添加资质证书
</el-button
>
</div>
<el-table v-loading="certLoading" :data="certList" style="width: 100%;margin-top: 40px" border
highlight-current-row>
<el-table-column type="index" label="序号" width="50"></el-table-column>
<el-table-column label="证书名称" prop="name"></el-table-column>
<el-table-column label="证书编号" prop="code"></el-table-column>
<el-table-column label="生效期" prop="vailDate"></el-table-column>
<el-table-column label="失效期" prop="expireDate"></el-table-column>
<el-table-column label="审核状态" prop="auditStatus" width="120">
<template slot-scope="scope">
<el-tag :type="(scope.row.auditStatus) | statusFilterType">
{{ checkFlag[scope.row.auditStatus] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="状态" prop="status" width="120">
<template slot-scope="scope">
<el-tag :type="(scope.row.status) | statusType">
{{ statusFlag[scope.row.status] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark"></el-table-column>
<el-table-column label="操作" width="150">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native="addCert(scope.row)"
>编辑
</el-button
>
<el-button type="text" size="mini" @click.native="showImgViewer(scope.row)">预览</el-button>
<el-button
type="text"
size="small"
:disabled="scope.row.auditStatus === 1"
@click.native="deleteCompanyCert(scope.row)"
>删除
</el-button
>
<el-button
type="text"
size="small"
v-if="scope.row.auditStatus === 2"
@click.native.stop="rejectInfo(scope.row)"
>说明
</el-button>
</template>
</el-table-column>
</el-table>
<el-image-viewer v-if="imgViewerVisible" style="z-index:9999" :on-close="closeImgViewer"
:url-list="imgList"/>
<pagination
v-show="certTotal>0"
:total="certTotal"
:page.sync="certQuery.page"
:limit.sync="certQuery.limit"
@pagination="certHandleCurrentChange"
></pagination>
</el-card>
<el-dialog
title="添加资质证书"
:visible.sync="addCertVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="70%"
v-if="addCertVisible"
append-to-body
@close='closeLocalDialog'
>
<companyAddCert
:closeDialog="closeLocalDialog"
:inputQuery="inputQuery"
:addType="addType"
:editTye="editTye"
></companyAddCert>
</el-dialog>
<!-- <div style='text-align: center; margin-bottom: 10px;'>-->
<!-- <el-button @click.native="hideForm">取消</el-button>-->
<!-- &lt;!&ndash; <el-button type="primary" @click.native="formSubmit()" :loading="formLoading"&ndash;&gt;-->
<!-- &lt;!&ndash; :disabled="!configParms.basicCorp">提交&ndash;&gt;-->
<!-- &lt;!&ndash; </el-button>&ndash;&gt;-->
<!-- <el-button type="primary" @click.native="formSubmit()" :loading="formLoading">提交</el-button>-->
<!-- </div>-->
</el-dialog> </el-dialog>
</el-card> </el-card>
</div> </div>
@ -205,17 +308,73 @@ import selectUnit from "./corpRelevance";
import selectSingleUnit from "./corpSingleRelevance"; import selectSingleUnit from "./corpSingleRelevance";
import {getBasicThirdSys} from "@/api/basic/basicThirdSys"; import {getBasicThirdSys} from "@/api/basic/basicThirdSys";
import {findConfig} from "@/api/sync/spsSyncStatus"; import {findConfig} from "@/api/sync/spsSyncStatus";
import {getSupComapnys, previewImage} from "@/api/purchase/supCompany";
import {deleteCompanyCert, filterCompanyCert} from "@/api/purchase/companyCert";
import companyAddCert from "@/views/purchase/cert/supCertAddDialog.vue";
import {getUUID} from "@/utils/strUtil";
import {getCompanyList} from "@/api/purchase/supManufacturer";
var pinyin = require("pinyin"); var pinyin = require("pinyin");
export default { export default {
props: {
closeRegistrationDialog: {
type: Function,
required: true,
},
inputQuery: {
type: Object,
required: true,
},
editType: {
type: Object,
required: true,
},
currentManufacturer: {
type: Object,
required: true,
}
},
data() { data() {
return { return {
pmQuery: {
customerId: null,
companyIdFk: null,
companyName: null,
page: 1,
limit: 10,
},
cuStatus: 0,
imgViewerVisible: false,
imgList: [],
certTotal: 0,
addCertVisible: false,
addType: "4", //1:2.3. 4
editTye: 1,
certQuery: {
customerId: null,
companyIdFk: null,
manufacturerIdFk: null,
page: 1,
limit: 20
},
query: { query: {
key: "", key: "",
corpType: "2",
page: 1, page: 1,
limit: 20, limit: 20,
}, },
checkFlag: {
0: "草稿",
1: "已通过",
2: "已拒绝",
3: "变更未审核",
6: "未审核",
},
statusFlag: {
0: "有效",
1: "失效",
},
showSearch: true, showSearch: true,
erpIdColumn: false, erpIdColumn: false,
thirdIdColumn: false, thirdIdColumn: false,
@ -237,7 +396,8 @@ export default {
formName: null, formName: null,
formMap: { formMap: {
add: "新增", add: "新增",
update: "编辑" update: "编辑",
cert: "添加资质证书"
}, },
formLoading: false, formLoading: false,
formVisible: false, formVisible: false,
@ -256,16 +416,19 @@ export default {
value: 2, value: 2,
label: "供应商" label: "供应商"
}, },
{ // {
value: 3, // value: 3,
label: "特殊科室" // // label: ""
}, // label: ""
{ // },
value: 4, // {
label: "特殊往来" // value: 4,
} // label: ""
// }
], ],
certLoading: false,
certList: [],
formRules: { formRules: {
name: [ name: [
{required: true, message: "请输入名称", trigger: "blur"} {required: true, message: "请输入名称", trigger: "blur"}
@ -275,6 +438,9 @@ export default {
// ], // ],
creditNo: [ creditNo: [
{required: true, message: "请输入社会信用号", trigger: "blur"} {required: true, message: "请输入社会信用号", trigger: "blur"}
],
corpType: [
{required: true, message: "请选择往来单位类型", trigger: "blur"}
] ]
}, },
spellUpdate: false, spellUpdate: false,
@ -289,17 +455,36 @@ export default {
thirdSys: [], thirdSys: [],
thirdSysFk: null, thirdSysFk: null,
defaultSys: null, defaultSys: null,
companyIdFk: null,
configParms: {}, configParms: {},
}; };
}, },
methods: { methods: {
//
addCert(row) {
console.log(this.row);
if (this.$isNotBlank(row)) {
this.formName = 2
this.inputQuery = row;
this.editTye = 2;
this.inputQuery.companyIdFk=row.companyIdFk;
console.log("编辑"+this.inputQuery);
} else {
this.inputQuery=this.list;
this.inputQuery.companyIdFk=this.curProductQuery.companyIdFk;
}
this.addCertVisible = true;
},
onReset() { onReset() {
this.$router.push({ this.$router.push({
path: "", path: "",
}); });
this.query = { this.query = {
key: "", key: "",
corpType: "2",
page: 1, page: 1,
limit: 20, limit: 20,
}; };
@ -309,13 +494,42 @@ export default {
this.query.page = 1; this.query.page = 1;
this.getList(); this.getList();
}, },
findPMMethod(key) {
this.fromPMOptions = [];
this.pmQuery.companyName = key;
getCompanyList(this.pmQuery)
.then((response) => {
this.loading = false;
this.fromPMOptions = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.fromPMOptions = [];
this.total = 0;
});
},
findMethod(query) {
this.fromOptions = [];
let cQuery = {
companyName: query,
};
getSupComapnys(cQuery)
.then((response) => {
this.loading = false;
this.fromOptions = response.data.list || [];
})
.catch(() => {
this.loading = false;
});
},
getList() { getList() {
this.loading = true; this.loading = true;
this.erpIdColumn = false; this.erpIdColumn = false;
this.thirdIdColumn = false; this.thirdIdColumn = false;
getBasicUnitMaintains(this.query) getBasicUnitMaintains(this.query)
.then((response) => { .then((response) => {
this.getSystemParamConfig(); //this.getSystemParamConfig();
this.loading = false; this.loading = false;
this.list = response.data.list || []; this.list = response.data.list || [];
this.total = response.data.total || 0; this.total = response.data.total || 0;
@ -345,6 +559,96 @@ export default {
this.getList(); this.getList();
} }
}, },
closeLocalDialog() {
this.addCertVisible = false;
this.selectCertVisible = false;
this.getCompanyCertList();
},
certHandleCurrentChange(val) {
this.certQuery.page = val.page;
this.getCompanyCertList();
},
getCompanyCertList() {
this.certLoading = true;
this.certQuery.companyIdFk = this.curProductQuery.companyIdFk;
this.certQuery.type=4;
// this.certQuery.manufacturerIdFk = this.inputQuery.manufacturerIdFk;
// this.certQuery.productIdFk = this.inputQuery.productId;
filterCompanyCert(this.certQuery)
.then((response) => {
this.certLoading = false;
this.certList = response.data.list || [];
this.certTotal = response.data.total
})
.catch(() => {
this.certLoading = false;
this.certList = [];
});
},
closeImgViewer() {
this.imgViewerVisible = false;
const m = (e) => {
e.preventDefault()
};
document.body.style.overflow = 'auto';
document.removeEventListener("touchmove", m, true);
},
rejectInfo(row) {
this.$confirm(row.auditComment, "拒绝说明", {
confirmButtonText: "确定",
type: "warning",
showCancelButton: false,
})
.then(() => {
});
},
deleteCompanyCert(row) {
this.$confirm("是否删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.certLoading = true;
let tquery = {
id: row.id,
filePath: row.filePath,
};
deleteCompanyCert(tquery)
.then((response) => {
this.certLoading = false;
if (response.code === 20000) {
this.getCompanyCertList();
this.$message({
type: "success",
message: "删除成功!",
});
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.certLoading = false;
});
}).catch(() => {
});
},
showImgViewer(row) {
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
this.imgList = [];
previewImage({imageUrl: row.filePath, certFileUrl: this.certFileUrl}).then(response => {
if (response.code === 20000) {
this.imgList=response.data;
}
});
this.imgViewerVisible = true;
const m = (e) => {
e.preventDefault()
};
document.body.style.overflow = 'hidden';
document.addEventListener("touchmove", m, false); //
},
// //
hideForm() { hideForm() {
// //
@ -352,6 +656,59 @@ export default {
this.getList(); this.getList();
return true; return true;
}, },
handCert(index, row) {
this.registrationId = row.id;
this.curProductQuery = row;
// this.curProductQuery.cuStatus = this.currentManufacturer.auditStatus;
// this.curProductQuery.companyIdFk =
// this.list.companyIdFk;
console.log(this.curProductQuery)
if (this.editType == 0) {
// this.inputQuery.productId = getUUID("");
this.inputQuery.companyIdFk = this.list.companyIdFk;
} else {
this.getCompanyCertList();
this.pmQuery.companyIdFk = this.curProductQuery.companyIdFk;
console.log("2"+ this.list.companyIdFk);
}
this.cuStatus = this.certList.auditStatus;
this.findMethod();
this.findPMMethod();
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
console.log("666666666666:"+this.cuStatus);
this.formName = "cert";
this.editProductType = 1;
this.formVisible = true;
// this.formName = "add";
this.spellUpdate = false;
if (index !== null) {
this.index = index;
this.formName = "cert";
this.spellUpdate = true;
this.editQuery = row;
} else {
this.editQuery = {
id: "",
thirdId: "",
erpId: "",
name: "",
spell: "",
addr: "",
status: "",
type: "",
creditNo: "",
contact: "",
mobile: ""
};
}
//this.getThirdSysDetail();
},
// //
handleForm(index, row) { handleForm(index, row) {
this.formVisible = true; this.formVisible = true;
@ -379,7 +736,7 @@ export default {
}; };
} }
this.getThirdSysDetail(); //this.getThirdSysDetail();
}, },
formSubmit() { formSubmit() {
if (this.$isBlank(this.editQuery.corpType)) { if (this.$isBlank(this.editQuery.corpType)) {
@ -457,7 +814,7 @@ export default {
this.editDialogVisible = false; this.editDialogVisible = false;
this.selectSingleUnitVisible = false; this.selectSingleUnitVisible = false;
this.getList(); this.getList();
this.getThirdSysDetail(); //this.getThirdSysDetail();
}, },
closeMain(val) { closeMain(val) {
this.selectDrugDialogVisible = false; this.selectDrugDialogVisible = false;
@ -476,7 +833,7 @@ export default {
this.editQuery = row; this.editQuery = row;
this.getThirdSysDetail(); //this.getThirdSysDetail();
}, },
deleteDialog(rowId) { deleteDialog(rowId) {
@ -607,15 +964,29 @@ export default {
} }
, ,
components: { components: {
companyAddCert,
selectUnit, selectSingleUnit selectUnit, selectSingleUnit
} }
, ,
created() { created() {
this.getList(); this.getList();
this.getSyncConfig(); //this.getSyncConfig();
this.getBasicThirdSys(); //this.getBasicThirdSys();
} }
, ,
filters: {
statusFilterType(status) {
const statusMap = {
0: "warning",
1: "success",
2: "danger",
6: "warning",
};
return statusMap[status];
},
},
} }
; ;
</script> </script>
@ -642,5 +1013,9 @@ export default {
flex-wrap: wrap; flex-wrap: wrap;
} }
.el-card {
margin-right: 20px;
margin-top: 15px;
/*transition: all .5s;*/
}
</style> </style>

@ -1,98 +1,98 @@
<template> <template>
<div> <div>
<el-card class="el-card" v-if="checked"> <el-card class="el-card" v-if="checked">
<el-form size="mini" :model="erpQuery" label-width="100px" v-show="showSearch"> <el-form size="mini" :model="erpQuery" label-width="100px" v-show="showSearch">
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="往来单位ID:"> <el-form-item label="往来单位ID:">
<el-input v-model="erpQuery.unitId" placeholder="请输入往来单位ID" style="width: 90%" clearable></el-input> <el-input v-model="erpQuery.unitId" placeholder="请输入往来单位ID" style="width: 90%" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="往来单位:"> <el-form-item label="往来单位:">
<el-input v-model="erpQuery.name" placeholder="往来单位" style="width: 90%" clearable></el-input> <el-input v-model="erpQuery.name" placeholder="往来单位" style="width: 90%" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div class="top-right-btn"> <div class="top-right-btn">
<el-button-group style="display:flex;"> <el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button> <el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<el-button type="primary" icon="el-icon-search" @click="getErpList"></el-button> <el-button type="primary" icon="el-icon-search" @click="getErpList"></el-button>
</el-button-group> </el-button-group>
</div> </div>
<el-divider style="margin: 15px"></el-divider> <el-divider style="margin: 15px"></el-divider>
<el-table :data="erpList" style="width: 100%" border highlight-current-row @current-change="handleCurrentChange"> <el-table :data="erpList" style="width: 100%" border highlight-current-row @current-change="handleCurrentChange">
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="第三方往来单位ID" prop="customid" width="200"></el-table-column> <el-table-column label="第三方往来单位ID" prop="customid" width="200"></el-table-column>
<el-table-column label="往来单位名称" prop="customname" width="400"></el-table-column> <el-table-column label="往来单位名称" prop="customname" width="400"></el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="erpTotal>0" v-show="erpTotal>0"
:total="erpTotal" :total="erpTotal"
:page.sync="erpQuery.page" :page.sync="erpQuery.page"
:limit.sync="erpQuery.limit" :limit.sync="erpQuery.limit"
@pagination="handleErppageChange" @pagination="handleErppageChange"
></pagination> ></pagination>
</el-card> </el-card>
<el-card class="el-card"> <el-card class="el-card">
<el-form :model="unitQuery" size="mini" label-width="100px" v-show="showSearch"> <el-form :model="unitQuery" size="mini" label-width="100px" v-show="showSearch">
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="往来单位编码:"> <el-form-item label="往来单位编码:">
<el-input v-model="unitQuery.unitId" style="width: 90%" placeholder="请输入往来单位编码" clearable></el-input> <el-input v-model="unitQuery.unitId" style="width: 90%" placeholder="请输入往来单位编码" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="请设置主系统:"> <el-form-item label="请设置主系统:">
<el-select v-model="thirdSysFk" style="width: 90%" placeholder="请设置主系统" disabled> <el-select v-model="thirdSysFk" style="width: 90%" placeholder="请设置主系统" disabled>
<el-option <el-option
v-for="item in thirdSys" v-for="item in thirdSys"
:key="item.value" :key="item.value"
:label="item.thirdName" :label="item.thirdName"
:value="item.thirdId"> :value="item.thirdId">
<span style="float: left">{{ item.thirdName }}</span> <span style="float: left">{{ item.thirdName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.thirdId }}</span> <span style="float: right; color: #8492a6; font-size: 13px">{{ item.thirdId }}</span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div class="top-right-btn"> <div class="top-right-btn">
<el-button-group style="display:flex;"> <el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button> <el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="search"></el-button> <el-button type="primary" icon="el-icon-search" @click="search"></el-button>
<el-button type="primary" size="mini" icon="el-icon-bottom-right" @click="combine"></el-button> <el-button type="primary" size="mini" icon="el-icon-bottom-right" @click="combine"></el-button>
<el-button type="primary" size="mini" icon="el-icon-bottom-right" @click="combineAll"></el-button> <el-button type="primary" size="mini" icon="el-icon-bottom-right" @click="combineAll"></el-button>
</el-button-group> </el-button-group>
</div> </div>
<el-divider style="margin: 15px"></el-divider> <el-divider style="margin: 15px"></el-divider>
<el-table :data="unitlList" style="width: 100%" @selection-change="handleSelectionUdiChange" border highlight-current-row> <el-table :data="unitlList" style="width: 100%" @selection-change="handleSelectionUdiChange" border highlight-current-row>
<el-table-column type="selection" width="55" :selectable="checkSelectable"></el-table-column> <el-table-column type="selection" width="55" :selectable="checkSelectable"></el-table-column>
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="往来单位编码" prop="id"></el-table-column> <el-table-column label="往来单位编码" prop="id"></el-table-column>
<el-table-column label="往来单位名称"prop="name" show-overflow-tooltip></el-table-column> <el-table-column label="往来单位名称"prop="name" show-overflow-tooltip></el-table-column>
<el-table-column label="往来单位简写" show-overflow-tooltip prop="spell"></el-table-column> <el-table-column label="往来单位简写" show-overflow-tooltip prop="spell"></el-table-column>
<el-table-column label="地址" prop="addr" show-overflow-tooltip></el-table-column> <el-table-column label="地址" prop="addr" show-overflow-tooltip></el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
:page.sync="unitQuery.page" :page.sync="unitQuery.page"
:limit.sync="unitQuery.limit" :limit.sync="unitQuery.limit"
@pagination="handlepageChange" @pagination="handlepageChange"
></pagination> ></pagination>
</div> </div>
</template> </template>
<script> <script>
@ -101,167 +101,167 @@ import {getBasicThirdSys} from "@/api/basic/basicThirdSys";
export default { export default {
data() { data() {
return { return {
showSearch: true, showSearch: true,
unitQuery: { unitQuery: {
page: 1, page: 1,
limit: 10, limit: 10,
key: "", key: "",
thirdSys: null, thirdSys: null,
}, },
combineQuery: { combineQuery: {
thirdSys: "", thirdSys: "",
keys: [], keys: [],
custmandocResponses: [], custmandocResponses: [],
}, },
total: 0, total: 0,
erpTotal: 0, erpTotal: 0,
checked: false, checked: false,
unitlList: [], unitlList: [],
erpList: [], erpList: [],
currentRow: null, currentRow: null,
multipleUdiSelection: [], multipleUdiSelection: [],
thirdSys: [], thirdSys: [],
thirdSysFk: null, thirdSysFk: null,
}; };
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.unitQuery = {
key: "",
page: 1,
limit: 10,
thirdSys: null,
};
this.getList();
}, },
methods: { hideSearch() {
onReset() { this.showSearch = !this.showSearch;
this.$router.push({ },
path: "", handlepageChange(val) {
}); this.unitQuery.page = val.page;
this.unitQuery = { this.getList();
key: "", },
page: 1, handleErppageChange(val) {
limit: 10, this.erpQuery.page = val;
thirdSys: null, this.getErpList();
}; },
this.getList(); checkSelectable(row) {
}, return !row.checked;
hideSearch() { },
this.showSearch = !this.showSearch; search() {
}, this.unitQuery.page = 1;
handlepageChange(val) { this.getList();
this.unitQuery.page = val.page; },
this.getList(); getList() {
}, this.loading = true;
handleErppageChange(val) { this.unitQuery.thirdSys = this.thirdSysFk;
this.erpQuery.page = val; ucloudUnit(this.unitQuery)
this.getErpList(); .then((response) => {
}, this.loading = false;
checkSelectable(row) {
return !row.checked;
},
search() {
this.unitQuery.page = 1;
this.getList();
},
getList() {
this.loading = true;
this.unitQuery.thirdSys = this.thirdSysFk;
ucloudUnit(this.unitQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) { if (response.code == 20000) {
this.unitlList = response.data.list || []; this.unitlList = response.data.list || [];
this.total = response.data.total || 0; this.total = response.data.total || 0;
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
this.unitlList = []; this.unitlList = [];
this.total = 0; this.total = 0;
} }
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
this.unitlList = []; this.unitlList = [];
this.total = 0; this.total = 0;
}); });
}, },
intentBack() { intentBack() {
this.$router.go(-1); this.$router.go(-1);
}, },
getBasicThirdSys() { getBasicThirdSys() {
let query = { let query = {
enabled: true, enabled: true,
mainSys: true, mainSys: true,
}; };
getBasicThirdSys(query) getBasicThirdSys(query)
.then((response) => { .then((response) => {
this.thirdSys = response.data.list || []; this.thirdSys = response.data.list || [];
this.thirdSysFk = this.thirdSys[0].thirdId; this.thirdSysFk = this.thirdSys[0].thirdId;
this.getList(); this.getList();
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
this.list = []; this.list = [];
}); });
}, },
combine() { combine() {
let selectData = this.multipleUdiSelection; let selectData = this.multipleUdiSelection;
var ids = []; var ids = [];
selectData.forEach((obj) => { selectData.forEach((obj) => {
ids.push(obj); ids.push(obj);
}); });
if (ids.length == 0) { if (ids.length == 0) {
this.$message.warning("请选择往来单位信息!"); this.$message.warning("请选择往来单位信息!");
return; return;
} }
this.combineQuery.thirdSys = this.thirdSysFk; this.combineQuery.thirdSys = this.thirdSysFk;
this.combineQuery.custmandocResponses = ids; this.combineQuery.custmandocResponses = ids;
combine(this.combineQuery) combine(this.combineQuery)
.then((response) => { .then((response) => {
if (response.code == 20000) { if (response.code == 20000) {
this.$emit("closeMain", true); this.$emit("closeMain", true);
} else { } else {
this.$emit("closeMain", false); this.$emit("closeMain", false);
} }
}) })
.catch(() => { .catch(() => {
this.$emit("closeMain", false); this.$emit("closeMain", false);
}); });
}, },
combineAll() { combineAll() {
this.$confirm("此操作将在后台自动选入所有查询结果, 是否继续?", "提示", { this.$confirm("此操作将在后台自动选入所有查询结果, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
})
.then(() => {
this.unitQuery.thirdSys = this.thirdSysFk;
combineAll(this.unitQuery)
.then((response) => {
if (response.code == 20000) {
this.$emit("closeMain", true);
} else {
this.$emit("closeMain", false);
}
}) })
.then(() => { .catch(() => {
this.unitQuery.thirdSys = this.thirdSysFk; this.$emit("closeMain", false);
combineAll(this.unitQuery) });
.then((response) => { })
if (response.code == 20000) { .catch(() => {
this.$emit("closeMain", true); });
} else {
this.$emit("closeMain", false);
}
})
.catch(() => {
this.$emit("closeMain", false);
});
})
.catch(() => {
});
},
handleCurrentChange(val) {
this.currentRow = val;
this.unitQuery.key = this.currentRow.name;
},
handleSelectionUdiChange(val) {
this.multipleUdiSelection = val;
},
}, },
created() { handleCurrentChange(val) {
this.getBasicThirdSys(); this.currentRow = val;
this.unitQuery.key = this.currentRow.name;
},
handleSelectionUdiChange(val) {
this.multipleUdiSelection = val;
}, },
},
created() {
this.getBasicThirdSys();
},
}; };
</script> </script>

@ -1,96 +1,96 @@
<template> <template>
<div> <div>
<el-card class="el-card" v-if="checked"> <el-card class="el-card" v-if="checked">
<el-form :inline="true" :model="erpQuery" size="mini" label-width="100px" v-show="showSearch"> <el-form :inline="true" :model="erpQuery" size="mini" label-width="100px" v-show="showSearch">
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="单位编码:"> <el-form-item label="单位编码:">
<el-input v-model="erpQuery.customname" placeholder="搜索" style="width: 90%"></el-input> <el-input v-model="erpQuery.customname" placeholder="搜索" style="width: 90%"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div class="top-right-btn"> <div class="top-right-btn">
<el-button-group style="display:flex;"> <el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button> <el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<el-button type="primary" icon="el-icon-search" @click="getErpList"></el-button> <el-button type="primary" icon="el-icon-search" @click="getErpList"></el-button>
</el-button-group> </el-button-group>
</div> </div>
<el-divider style="margin: 15px"></el-divider> <el-divider style="margin: 15px"></el-divider>
<el-table :data="erpList" style="width: 100%" border highlight-current-row @current-change="handleCurrentChange"> <el-table :data="erpList" style="width: 100%" border highlight-current-row @current-change="handleCurrentChange">
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="第三方往来单位ID" prop="customid" width="200"></el-table-column> <el-table-column label="第三方往来单位ID" prop="customid" width="200"></el-table-column>
<el-table-column label="往来单位名称" prop="customname" width="400"></el-table-column> <el-table-column label="往来单位名称" prop="customname" width="400"></el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="erpTotal>0" v-show="erpTotal>0"
:total="erpTotal" :total="erpTotal"
:page.sync="erpQuery.page" :page.sync="erpQuery.page"
:limit.sync="erpQuery.limit" :limit.sync="erpQuery.limit"
@pagination="handleErppageChange" @pagination="handleErppageChange"
></pagination> ></pagination>
</el-card> </el-card>
<el-card class="el-card"> <el-card class="el-card">
<el-form :model="unitQuery" label-width="100px" v-show="showSearch" size="mini"> <el-form :model="unitQuery" label-width="100px" v-show="showSearch" size="mini">
<el-row> <el-row>
<el-col span="6"> <el-col span="6">
<el-form-item label="往来单位编码:"> <el-form-item label="往来单位编码:">
<el-input v-model="unitQuery.unitId" style="width: 90%" placeholder="往来单位编码" clearable></el-input> <el-input v-model="unitQuery.unitId" style="width: 90%" placeholder="往来单位编码" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col span="6"> <el-col span="6">
<el-form-item label="往来单位:"> <el-form-item label="往来单位:">
<el-input v-model="unitQuery.name" style="width: 90%" placeholder="往来单位" clearable></el-input> <el-input v-model="unitQuery.name" style="width: 90%" placeholder="往来单位" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col span="6"> <el-col span="6">
<el-form-item label="外部系统:"> <el-form-item label="外部系统:">
<el-select v-model="thirdSysFk" style="width: 90%" placeholder="请选择第三方系统" disabled="true"> <el-select v-model="thirdSysFk" style="width: 90%" placeholder="请选择第三方系统" disabled="true">
<el-option <el-option
v-for="item in thirdSys" v-for="item in thirdSys"
:key="item.value" :key="item.value"
:label="item.thirdName" :label="item.thirdName"
:value="item.thirdId"> :value="item.thirdId">
<span style="float: left">{{ item.thirdName }}</span> <span style="float: left">{{ item.thirdName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.thirdId }}</span> <span style="float: right; color: #8492a6; font-size: 13px">{{ item.thirdId }}</span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div class="top-right-btn"> <div class="top-right-btn">
<el-button-group style="display:flex;"> <el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button> <el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="searchList"></el-button> <el-button type="primary" icon="el-icon-search" @click="searchList"></el-button>
<el-button type="primary" size="mini" icon="el-icon-bottom-right" @click="combine" :loading="combineLoading">选入</el-button> <el-button type="primary" size="mini" icon="el-icon-bottom-right" @click="combine" :loading="combineLoading">选入</el-button>
</el-button-group> </el-button-group>
</div> </div>
<el-divider style="margin: 15px"></el-divider> <el-divider style="margin: 15px"></el-divider>
<el-table border highlight-current-row @current-change="handleCurrentChange" :data="unitlList" :row-class-name="tableRowClassName" style="width: 100%"> <el-table border highlight-current-row @current-change="handleCurrentChange" :data="unitlList" :row-class-name="tableRowClassName" style="width: 100%">
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="往来单位编码" prop="id"></el-table-column> <el-table-column label="往来单位编码" prop="id"></el-table-column>
<el-table-column label="往来单位名称" prop="name" show-overflow-tooltip></el-table-column> <el-table-column label="往来单位名称" prop="name" show-overflow-tooltip></el-table-column>
<el-table-column label="往来单位简写" show-overflow-tooltip prop="spell"></el-table-column> <el-table-column label="往来单位简写" show-overflow-tooltip prop="spell"></el-table-column>
<el-table-column label="地址" prop="addr"></el-table-column> <el-table-column label="地址" prop="addr"></el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
:page.sync="unitQuery.page" :page.sync="unitQuery.page"
:limit.sync="unitQuery.limit" :limit.sync="unitQuery.limit"
@pagination="handlepageChange" @pagination="handlepageChange"
></pagination> ></pagination>
</div> </div>
</template> </template>
<script> <script>
@ -98,171 +98,171 @@ import {combineSingle, ucloudUnit, removeRl} from "@/api/basic/basicUnitMaintain
import {getBasicThirdSys} from "@/api/basic/basicThirdSys"; import {getBasicThirdSys} from "@/api/basic/basicThirdSys";
export default { export default {
name: "combinType", name: "combinType",
props: { props: {
corpData: { corpData: {
type: Object, type: Object,
required: true, required: true,
},
defaultSys: {
type: Object,
required: true,
}
}, },
data() { defaultSys: {
return { type: Object,
showSearch: true, required: true,
unitQuery: { }
page: 1, },
limit: 10, data() {
key: "", return {
thirdSys: null, showSearch: true,
}, unitQuery: {
combineQuery: { page: 1,
thirdSys: "", limit: 10,
key: null, key: "",
basicErpUnitsResponse: [], thirdSys: null,
}, },
total: 0, combineQuery: {
erpTotal: 0, thirdSys: "",
checked: false, key: null,
unitlList: [], basicErpUnitsResponse: [],
erpList: [], },
currentRow: null, total: 0,
multipleUdiSelection: [], erpTotal: 0,
thirdSys: [], checked: false,
thirdSysFk: null, unitlList: [],
combineLoading: false, erpList: [],
}; currentRow: null,
multipleUdiSelection: [],
thirdSys: [],
thirdSysFk: null,
combineLoading: false,
};
},
methods: {
handlepageChange(val) {
this.unitQuery.page = val.page;
this.getList();
}, },
methods: { handleErppageChange(val) {
handlepageChange(val) { this.erpQuery.page = val;
this.unitQuery.page = val.page; this.getErpList();
this.getList(); },
}, searchList() {
handleErppageChange(val) { this.unitQuery.page = 1;
this.erpQuery.page = val; this.getList();
this.getErpList(); },
}, hideSearch() {
searchList() { this.showSearch = !this.showSearch;
this.unitQuery.page = 1; },
this.getList(); onReset() {
}, this.unitQuery = {
hideSearch() { page: 1,
this.showSearch = !this.showSearch; limit: 10,
}, key: "",
onReset() { thirdSys: null,
this.unitQuery = { }
page: 1, this.total = 0;
limit: 10, this.getList();
key: "", },
thirdSys: null, getList() {
} this.loading = true;
this.total = 0; this.unitQuery.thirdSys = this.thirdSysFk;
this.getList(); ucloudUnit(this.unitQuery)
}, .then((response) => {
getList() { console.log(response);
this.loading = true; this.loading = false;
this.unitQuery.thirdSys = this.thirdSysFk;
ucloudUnit(this.unitQuery)
.then((response) => {
console.log(response);
this.loading = false;
if (response.code == 20000) {
this.unitlList = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
this.unitlList = [];
this.total = 0;
}
}) if (response.code == 20000) {
.catch(() => { this.unitlList = response.data.list || [];
this.loading = false; this.total = response.data.total || 0;
this.unitlList = []; } else {
this.total = 0; this.$message.error(response.message);
}); this.unitlList = [];
}, this.total = 0;
}
intentBack() { })
this.$router.go(-1); .catch(() => {
}, this.loading = false;
getBasicThirdSys() { this.unitlList = [];
let query = { this.total = 0;
enabled: true, });
}; },
getBasicThirdSys(query)
.then((response) => {
this.thirdSys = response.data.list || [];
this.thirdSysFk = this.thirdSys[0].thirdId;
if (this.defaultSys != null) {
this.thirdSysFk = this.defaultSys;
}
})
.catch(() => {
this.loading = false;
this.list = [];
});
},
handleCurrentChange(val) { intentBack() {
console.log(val); this.$router.go(-1);
this.combineQuery.thirdSys = this.thirdSysFk; },
this.combineQuery.key = this.corpData.id; getBasicThirdSys() {
this.combineQuery.basicErpUnitsResponse = val; let query = {
}, enabled: true,
combine() { };
getBasicThirdSys(query)
.then((response) => {
this.thirdSys = response.data.list || [];
this.thirdSysFk = this.thirdSys[0].thirdId;
if (this.defaultSys != null) {
this.thirdSysFk = this.defaultSys;
}
})
.catch(() => {
this.loading = false;
this.list = [];
});
},
if (this.combineQuery.key == null) { handleCurrentChange(val) {
this.$message.warning("未选择往来单位!"); console.log(val);
return; this.combineQuery.thirdSys = this.thirdSysFk;
} this.combineQuery.key = this.corpData.id;
if (this.combineQuery.basicErpUnitsResponse.checked == true) { this.combineQuery.basicErpUnitsResponse = val;
this.$message.warning("该往来单位已被关联,不能重复选入!"); },
return; combine() {
}
this.combineLoading = true; if (this.combineQuery.key == null) {
combineSingle(this.combineQuery) this.$message.warning("未选择往来单位!");
.then((response) => { return;
this.combineLoading = false; }
this.$emit("cancelDialog", true); if (this.combineQuery.basicErpUnitsResponse.checked == true) {
if (response.code == 20000) { this.$message.warning("该往来单位已被关联,不能重复选入!");
this.$message.success("关联成功!"); return;
} else { }
this.$message.error(response.message);
}
})
.catch(() => {
this.combineLoading = false;
this.$emit("cancelDialog", false);
});
},
tableRowClassName({row}) {
if (row.checked) return "warning-row";
return "";
},
handleSelectionUdiChange(val) {
console.log("----" + val[0].id);
this.multipleUdiSelection = val;
},
this.combineLoading = true;
combineSingle(this.combineQuery)
.then((response) => {
this.combineLoading = false;
this.$emit("cancelDialog", true);
if (response.code == 20000) {
this.$message.success("关联成功!");
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.combineLoading = false;
this.$emit("cancelDialog", false);
});
}, },
created() { tableRowClassName({row}) {
this.getBasicThirdSys(); if (row.checked) return "warning-row";
return "";
}, },
handleSelectionUdiChange(val) {
console.log("----" + val[0].id);
this.multipleUdiSelection = val;
},
},
created() {
this.getBasicThirdSys();
},
}; };
</script> </script>
<style scoped> <style scoped>
div /deep/ .el-table .warning-row { div /deep/ .el-table .warning-row {
background: #bebebe; background: #bebebe;
} }
div /deep/ .el-table .success-row { div /deep/ .el-table .success-row {
background: #ffffff; background: #ffffff;
} }
</style> </style>

@ -0,0 +1,128 @@
<template>
<div>
<p style="color: red;">建议上传[*]不超过[794px*1123px]的图片</p>
<div style="width: 100%;">
<Editor v-model="html" :init="init" :toolbar="toolbar" :plugins="plugins"
:disabled="disabled" :placeholder="placeholder"/>
</div>
</div>
</template>
<script>
import Editor from '@tinymce/tinymce-vue'
import tinymce from 'tinymce/tinymce'
import 'tinymce/themes/silver'
import 'tinymce/icons/default'
import 'tinymce/models/dom'
//
import 'tinymce/plugins/code' //
import 'tinymce/plugins/image' //
import 'tinymce/plugins/link' //
import 'tinymce/plugins/preview' //
import 'tinymce/plugins/table' //
import 'tinymce/plugins/lists' //
import 'tinymce/plugins/advlist' //
import request from "@/utils/request";
let type = ''
let filePrefix = ''
let uploadUrl = ''
export default {
components: {
Editor
},
name: "cusEditor",
props: {
content: {
type: String,
required: true
},
type: {
type: String,
required: true
},
},
data() {
return {
uploadUrl: '',
toolbar: "undo redo | preview image forecolor backcolor bold italic underline strikethrough link | blocks fontfamily fontsize | \
alignleft aligncenter alignright alignjustify outdent indent lineheight | bullist numlist | \
table | code selectall",
plugins: "code image link preview table lists advlist",
placeholder: "请输入...",
disabled: false,
editor: null,
init: {
language_url: '/tinymce/langs/zh_CN.js',
language: 'zh_CN',
skin_url: '/tinymce/skins/ui/oxide',
content_css: '/tinymce/skins/content/default/content.css',
menubar: false,
statusbar: true,
plugins: this.plugins,
toolbar: this.toolbar,
fontsize_formats: '12px 14px 16px 18px 20px 22px 24px 28px 32px 36px 48px 56px 72px',
height: this.height || '500',
placeholder: this.placeholder,
branding: false,
resize: true,
elementpath: true,
content_style: '',
images_upload_handler(blobInfo, progress) {
// return new Promise((resolve, reject) => {
// return resolve("data:image/*;base64," + blobInfo.base64())
// })
return new Promise((resolve, reject) => {
let param = new FormData(); //form
param.append('file', blobInfo.blob(), blobInfo.filename());//appendform
param.append("type", type);
let config = {
headers: {
"Content-Type": 'multipart/form-data',
}
}; //
request.post(uploadUrl, param, config)
.then((res) => {
if (res.code === 20000) {
return resolve(res.data.name)
} else {
return reject('err:' + res.message)
}
}).catch((err) => {
return reject('err:' + err)
})
})
},
setup: (editor) => {
this.editor = editor
editor.on('init', function () {
this.getBody().style.fontSize = '14px'
})
}
},
html: this.content,
}
},
mounted() {
tinymce.init(this.init)
},
created() {
type = this.type
// this.$imageHost().then(res => {
// filePrefix = res
// })
uploadUrl = process.env.VUE_APP_BASE_API + "/udiwms/upload/register/file";
if (this.content) {
this.html = this.content
}
},
beforeDestroy() {
this.editor.destroy();
},
methods: {}
}
</script>

@ -97,41 +97,50 @@
<!-- </el-col>--> <!-- </el-col>-->
<!-- </el-row>--> <!-- </el-row>-->
<el-row> <!-- <el-row>-->
<el-col :span="3"> <!-- <el-col :span="3">-->
<div class="ao-text"> <!-- <div class="ao-text">-->
<span>文件</span> <!-- <span>文件</span>-->
</div> <!-- </div>-->
</el-col> <!-- </el-col>-->
<el-col :span="8"> <!-- <el-col :span="8">-->
<el-form-item> <!-- <el-form-item>-->
<el-upload <!-- <el-upload-->
:disabled="formData.auditStatus == 1" <!-- :disabled="formData.auditStatus == 1"-->
class="upload-demo" <!-- class="upload-demo"-->
ref="upload" <!-- ref="upload"-->
:action="this.uploadUrl" <!-- :action="this.uploadUrl"-->
:on-preview="uploadHandlePreview" <!-- :on-preview="uploadHandlePreview"-->
:on-remove="uploadHandleRemove" <!-- :on-remove="uploadHandleRemove"-->
:headers="headers" <!-- :headers="headers"-->
:on-exceed="uploadHandleExceed" <!-- :on-exceed="uploadHandleExceed"-->
accept=".jpg,.png" <!-- accept=".jpg,.png"-->
:on-change="uploadOnchange" <!-- :on-change="uploadOnchange"-->
:on-success="uploadHandleSuccess" <!-- :on-success="uploadHandleSuccess"-->
:on-error="uploadHandleError" <!-- :on-error="uploadHandleError"-->
:file-list="fileList" <!-- :file-list="fileList"-->
:data="{type:'image2'}" <!-- :data="{type:'image2'}"-->
:auto-upload="true"> <!-- :auto-upload="true">-->
<el-button slot="trigger" size="small" type="primary" :disabled="formData.auditStatus == 1"> <!-- <el-button slot="trigger" size="small" type="primary" :disabled="formData.auditStatus == 1">-->
{{ choiceFile }} <!-- {{ choiceFile }}-->
</el-button> <!-- </el-button>-->
<div>只能上传 jpg,png 文件且不超过 3 MB</div> <!-- <div>只能上传 jpg,png 文件且不超过 3 MB</div>-->
</el-upload> <!-- </el-upload>-->
<!-- <el-button type="primary" size="mini" icon="search" @click="toViewCompanyCert"--> <!-- &lt;!&ndash; <el-button type="primary" size="mini" icon="search" @click="toViewCompanyCert"&ndash;&gt;-->
<!-- style="text-align:right"--> <!-- &lt;!&ndash; style="text-align:right"&ndash;&gt;-->
<!-- >文件预览--> <!-- &lt;!&ndash; >文件预览&ndash;&gt;-->
<!-- </el-button--> <!-- &lt;!&ndash; </el-button&ndash;&gt;-->
<!-- >--> <!-- &lt;!&ndash; >&ndash;&gt;-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row gutter="20" class="el-row" type="flex">
<el-col :span="11" class="el-col">
<el-form-item label="文件:" prop="filePath">
<cusEditor ref="editorRef" style="width:90vh;height: 100%;overflow: auto; " :content="formData.filePath"
:type="`image2`"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -146,6 +155,7 @@ import draggable from "vuedraggable";
import store from "../../../store"; import store from "../../../store";
import {insertCompanyCert, updateCompanyCert} from "../../../api/purchase/companyCert"; import {insertCompanyCert, updateCompanyCert} from "../../../api/purchase/companyCert";
import ElImageViewer from "element-ui/packages/image/src/image-viewer" import ElImageViewer from "element-ui/packages/image/src/image-viewer"
import {lo} from "pinyin/data/dict-zi-web";
export default { export default {
name: "supCompanyCertAdd", name: "supCompanyCertAdd",
@ -181,6 +191,7 @@ export default {
code: null, code: null,
name: null, name: null,
manufacturerIdFk: null, manufacturerIdFk: null,
companyIdFk: null,
auditStatus: 6 auditStatus: 6
}, },
formRules: { formRules: {
@ -205,7 +216,6 @@ export default {
}, },
methods: { methods: {
submitUpload() { submitUpload() {
this.$refs["dataForm"].validate(valid => { this.$refs["dataForm"].validate(valid => {
if (valid) { if (valid) {
if (this.formData.auditStatus == 1) { if (this.formData.auditStatus == 1) {
@ -230,22 +240,23 @@ export default {
onConfirmSubmit(val) { onConfirmSubmit(val) {
this.formData.repeatUpload = val; this.formData.repeatUpload = val;
console.log(this.formData) console.log(this.formData)
if (this.$isNotBlank(this.formData.filePath)) { this.onSubmit();
if (this.$refs.upload.uploadFiles.length > 0) { // if (this.$isNotBlank(this.formData.filePath)) {
this.$refs.upload.submit(); // if (this.$refs.upload.uploadFiles.length > 0) {
this.onSubmit(); // this.$refs.upload.submit();
} else { // this.onSubmit();
this.onSubmit(); // } else {
} // this.onSubmit();
// }
} else { //
console.log(this.$refs.upload.uploadFiles.length); // } else {
if (this.$refs.upload.uploadFiles.length > 0) { // console.log(this.$refs.upload.uploadFiles.length);
this.$refs.upload.submit(); // if (this.$refs.upload.uploadFiles.length > 0) {
} else { // this.$refs.upload.submit();
this.$message.warning(`请选择文件`); // } else {
} // this.$message.warning(``);
} // }
// }
}, },
@ -255,18 +266,21 @@ export default {
this.formData.customerId = store.getters.customerId this.formData.customerId = store.getters.customerId
} }
this.formData.type = this.addType; this.formData.type = this.addType;
//1:2.3. //1:2.3. 4
if (this.addType == 2) { if (this.addType == 2) {
this.formData.manufacturerIdFk = this.inputQuery.manufacturerId; this.formData.manufacturerIdFk = this.inputQuery.manufacturerId;
} else if (this.addType == 3) { } else if (this.addType == 3) {
this.formData.manufacturerIdFk = this.inputQuery.manufacturerIdFk; this.formData.manufacturerIdFk = this.inputQuery.manufacturerIdFk;
this.formData.productIdFk = this.inputQuery.productId; this.formData.productIdFk = this.inputQuery.productId;
}else if (this.addType==4){
this.formData.companyIdFk = this.inputQuery.companyIdFk;
console.log(this.inputQuery.companyIdFk);
} }
if (this.formData.auditStatus != 1) if (this.formData.auditStatus != 1)
this.formData.auditStatus = "6"; this.formData.auditStatus = "6";
this.formData.filePath = this.$refs.editorRef.html
if (this.editTye == 1) { if (this.editTye == 1) {
//isertCert
insertCompanyCert(this.formData).then(response => { insertCompanyCert(this.formData).then(response => {
this.loading = false; this.loading = false;
if (response.code === 20000) { if (response.code === 20000) {
@ -363,14 +377,20 @@ export default {
ADMIN_ID: store.getters.adminId, ADMIN_ID: store.getters.adminId,
ADMIN_TOKEN: store.getters.token, ADMIN_TOKEN: store.getters.token,
}; };
if (this.inputQuery.formData == null) { console.log(this.inputQuery)
this.formData = {} if (this.inputQuery.type==4){
} else if (this.inputQuery.formData != null && this.inputQuery.formData.addType == 1) { this.formData = this.inputQuery;
this.formData = {} }else {
} else { if (this.inputQuery.formData == null) {
this.formData = this.inputQuery.formData; this.formData = {}
console.log(this.inputQuery.formData); } else if (this.inputQuery.formData != null && this.inputQuery.formData.addType == 1) {
this.formData = {}
} else {
this.formData = this.inputQuery.formData;
console.log(this.inputQuery.formData);
}
} }
console.log("66"+this.inputQuery.formData);
if (this.formData.filePath != null) { if (this.formData.filePath != null) {
this.choiceFile = "更换文件"; this.choiceFile = "更换文件";
this.isCleck = true; this.isCleck = true;
@ -380,7 +400,8 @@ export default {
}, },
}; };
</script> </script>
<style> <style scoped>
.ao-text { .ao-text {
width: 100%; width: 100%;

Loading…
Cancel
Save