Commit a174098c by zhaoxiqing

gsb

parent 4b8462e2
...@@ -232,6 +232,7 @@ class EtemplateCtl extends CtlBase { ...@@ -232,6 +232,7 @@ class EtemplateCtl extends CtlBase {
template.filepath = qobj.filepath; template.filepath = qobj.filepath;
template.remark = qobj.remark || ""; template.remark = qobj.remark || "";
template.isLegal = qobj.isLegal;
template.ecompanyMainId = ecompanyMain.id; template.ecompanyMainId = ecompanyMain.id;
template.mainId = ecompanyMain.mainId || ""; template.mainId = ecompanyMain.mainId || "";
template.nameA = ecompanyMain.name; template.nameA = ecompanyMain.name;
...@@ -245,6 +246,7 @@ class EtemplateCtl extends CtlBase { ...@@ -245,6 +246,7 @@ class EtemplateCtl extends CtlBase {
template.placeholderkey = qobj.placeholderkey; template.placeholderkey = qobj.placeholderkey;
template.remark = qobj.remark || ""; template.remark = qobj.remark || "";
template.isLegal = qobj.isLegal;
template.ecompanyMainId = ecompanyMain.id; template.ecompanyMainId = ecompanyMain.id;
template.mainId = ecompanyMain.mainId || ""; template.mainId = ecompanyMain.mainId || "";
template.nameA = ecompanyMain.name; template.nameA = ecompanyMain.name;
......
...@@ -21,6 +21,9 @@ module.exports = (db, DataTypes) => { ...@@ -21,6 +21,9 @@ module.exports = (db, DataTypes) => {
allowNull: false, allowNull: false,
defaultValue: true defaultValue: true
}, },
isLegal:{
type:DataTypes.INTEGER,
},
qrcodeurl:DataTypes.STRING, qrcodeurl:DataTypes.STRING,
remark:DataTypes.STRING(300), remark:DataTypes.STRING(300),
},{ },{
......
...@@ -34,7 +34,7 @@ class EtemplateService extends ServiceBase{ ...@@ -34,7 +34,7 @@ class EtemplateService extends ServiceBase{
["id", 'desc'] ["id", 'desc']
]; ];
var attributes = ["id", "name", "ecompanyMainId", "mainId", "nameA", "filekey", "filepath", "created_at", "updated_at", "qrcodeurl", "ecompany_id"]; var attributes = ["id", "name", "ecompanyMainId", "mainId", "nameA", "filekey", "isLegal", "filepath", "created_at", "updated_at", "qrcodeurl", "ecompany_id"];
var page = await this.getPageList(currentPage, pageSize, where, orderby, attributes); var page = await this.getPageList(currentPage, pageSize, where, orderby, attributes);
if (page && page.rows) { if (page && page.rows) {
var ecompanyIds = []; var ecompanyIds = [];
...@@ -43,6 +43,7 @@ class EtemplateService extends ServiceBase{ ...@@ -43,6 +43,7 @@ class EtemplateService extends ServiceBase{
} }
await this.setCompany(page.rows); await this.setCompany(page.rows);
await this.setMain(page.rows); await this.setMain(page.rows);
await this.setLegal(page.rows);
} }
return page; return page;
} }
...@@ -83,9 +84,24 @@ class EtemplateService extends ServiceBase{ ...@@ -83,9 +84,24 @@ class EtemplateService extends ServiceBase{
} }
} }
async setLegal(list){
if (!list || list.length == 0) {
return;
}
for (var item of list){
if(item.isLegal == 0){
item.begUrl = "https://bpohhr.gongsibao.com/ec3rd?appId="+item.ecompany_id+"&ecid="+item.id+"&&legal=1";
}else {
item.begUrl = "https://bpohhr.gongsibao.com/ec3rd?appId="+item.ecompany_id+"&ecid="+item.id;
}
}
}
async getInfo(id) { async getInfo(id) {
var attrs = ["id", "name", "ecompanyMainId", "mainId", "nameA", "templateid", "filekey", "filepath", "qrcodeurl", var attrs = ["id", "name", "ecompanyMainId", "mainId", "nameA", "templateid", "filekey", "filepath", "qrcodeurl",
"placeholderkey", "isEnabled", "created_at", "updated_at", "ecompany_id"]; "placeholderkey", "isEnabled","isLegal", "created_at", "updated_at", "ecompany_id"];
return await this.dao.model.findOne({ return await this.dao.model.findOne({
where: { id: id }, attrs, raw: true where: { id: id }, attrs, raw: true
}); });
......
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
<el-table-column prop="name" label="模板名称" :formatter="onColFormater" align="center" ></el-table-column> <el-table-column prop="name" label="模板名称" :formatter="onColFormater" align="center" ></el-table-column>
<el-table-column prop="ecompany.name" label="公司名称" :formatter="onColFormater" align="center" ></el-table-column> <el-table-column prop="ecompany.name" label="公司名称" :formatter="onColFormater" align="center" ></el-table-column>
<el-table-column prop="ecompanyMain.alias" label="签约主体" :formatter="onColFormater" align="center" ></el-table-column> <el-table-column prop="ecompanyMain.alias" label="签约主体" :formatter="onColFormater" align="center" ></el-table-column>
<el-table-column prop="begUrl" label="签约地址" :formatter="onColFormater" align="center" ></el-table-column>
<el-table-column label="二维码" > <el-table-column label="二维码" >
<template slot-scope="scope" > <template slot-scope="scope" >
<a v-if="scope.row.qrcodeurl" :href="scope.row.qrcodeurl" target="_blank" style="text-decoration: none;color:#59C1A6;font-size: 14px;">二维码</a> <a v-if="scope.row.qrcodeurl" :href="scope.row.qrcodeurl" target="_blank" style="text-decoration: none;color:#59C1A6;font-size: 14px;">二维码</a>
...@@ -72,7 +73,7 @@ ...@@ -72,7 +73,7 @@
<el-table-column prop="filekey" label="模板key" :formatter="onColFormater" align="center" show-overflow-tooltip></el-table-column> <el-table-column prop="filekey" label="模板key" :formatter="onColFormater" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="created_at" label="创建日期" :formatter="onColFormater" align="center" ></el-table-column> <el-table-column prop="created_at" label="创建日期" :formatter="onColFormater" align="center" ></el-table-column>
<el-table-column prop="updated_at" label="修改日期" :formatter="onColFormater" align="center" ></el-table-column> <!-- <el-table-column prop="updated_at" label="修改日期" :formatter="onColFormater" align="center" ></el-table-column>-->
<el-table-column label="操作" align="center" > <el-table-column label="操作" align="center" >
<template slot-scope="scope"> <template slot-scope="scope">
<a href="javascript:;" @click="openEdit(scope.row.id)" style="text-decoration: none;color:#59C1A6;font-size: 14px;">修改</a> <a href="javascript:;" @click="openEdit(scope.row.id)" style="text-decoration: none;color:#59C1A6;font-size: 14px;">修改</a>
...@@ -151,6 +152,13 @@ ...@@ -151,6 +152,13 @@
<gsb-upload3 ref="upload3" v-model="uploadResult" @uploadsuccess="uploadsuccess" :fileList="fileList" filetype="pdf"></gsb-upload3> <gsb-upload3 ref="upload3" v-model="uploadResult" @uploadsuccess="uploadsuccess" :fileList="fileList" filetype="pdf"></gsb-upload3>
</el-form-item> </el-form-item>
<el-form-item label="是否法人:" prop="isLegal" >
<template>
<el-radio v-model="isLegal" label="1"></el-radio>
<el-radio v-model="isLegal" label="0"></el-radio>
</template>
</el-form-item>
<el-form-item label="备注信息:" prop="remark" > <el-form-item label="备注信息:" prop="remark" >
<el-input type="textarea" v-model="etemplate.remark" placeholder="请输入备注信息" maxlength="50" style="width:468px;" clearable ></el-input> <el-input type="textarea" v-model="etemplate.remark" placeholder="请输入备注信息" maxlength="50" style="width:468px;" clearable ></el-input>
</el-form-item> </el-form-item>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
showrelevances: false, showrelevances: false,
saveLoading: false, saveLoading: false,
busiData:[], busiData:[],
isLegal : "",
nameLoading: false, nameLoading: false,
nameList: [], nameList: [],
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
}, },
created: function () {}, created: function () {},
methods: { methods: {
getEmptySearch() { getEmptySearch() {
return { return {
list: [], list: [],
...@@ -141,6 +142,8 @@ ...@@ -141,6 +142,8 @@
if(d.data) { if(d.data) {
d.data.isEnabled = d.data.isEnabled ? true : false; d.data.isEnabled = d.data.isEnabled ? true : false;
} }
console.log("=====================================asdas",d.data.isLegal);
self.isLegal = d.data.isLegal.toString();
self.etemplate = d.data; self.etemplate = d.data;
if(self.etemplate.filepath) { if(self.etemplate.filepath) {
self.fileList = [{ self.fileList = [{
...@@ -188,6 +191,7 @@ ...@@ -188,6 +191,7 @@
this.getEtemplate(id); this.getEtemplate(id);
} else { } else {
this.editTitle = "新增"; this.editTitle = "新增";
this.isLegal = '1';
this.etemplate = {isEnabled:true}; this.etemplate = {isEnabled:true};
} }
this.showEdit = true; this.showEdit = true;
...@@ -306,6 +310,7 @@ ...@@ -306,6 +310,7 @@
setTimeout(() => { setTimeout(() => {
self.saveLoading = false; self.saveLoading = false;
}, 15000); }, 15000);
self.etemplate.isLegal = self.isLegal;
self.$root.postReq("/web/etemplateCtl/mysave", self.etemplate).then(function (d) { self.$root.postReq("/web/etemplateCtl/mysave", self.etemplate).then(function (d) {
if (d.status == 0) { if (d.status == 0) {
self.$message.success(`保存成功`); self.$message.success(`保存成功`);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment