Commit bf916b64 by sxy

del: 删除文件

parent 695f9b4a
var system = require("../../../system");
const http = require("http");
const querystring = require('querystring');
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
const moment = require("moment");
class BizOptCtl extends CtlBase {
constructor() {
super("bizchance", CtlBase.getServiceName(BizOptCtl));
}
async findAndCountAll(pobj, qobj, req) {
//设置查询条件
const rs = await this.service.findAndCountAll(pobj);
if (rs.results && rs.results.rows) {
let result = [];
for (let val of rs.results.rows) {
val.company_name = val.business_info.company;
val.customer_number = val.business_info.contactsPhone;
val.customer_name = val.business_info.contactsName;
val.updated_at = moment(val.updated_at).format('YYYY-MM-DD HH:mm:ss');
val.created_at = moment(val.created_at).format('YYYY-MM-DD HH:mm:ss');
val.schemeStatus = val["scheme.scheme_status"];
result.push(val);
}
rs.results.rows = result;
}
return system.getResult(rs);
}
async findBizAndSheme(pobj, qobj, req) {
if (!pobj.id) {
return system.getResult(null, "id can not be empty,100290");
}
const rs = await this.service.findBizAndSheme(pobj);
return system.getResult(rs);
}
async closeBiz(pobj, qobj, req) {
if (!pobj.bizId) {
return system.getResult(null, "bizId can not be empty,100290");
}
if (!pobj.close_reason) {
return system.getResult(null, "close_reason can not be empty,100290");
}
try {
await this.service.closeBiz(pobj);
return system.getResultSuccess();
} catch (err) {
return system.getResult(null, err.message);
}
}
}
module.exports = BizOptCtl;
var system = require("../../../system");
const http = require("http");
const querystring = require('querystring');
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
const moment = require("moment");
class SchemeCtl extends CtlBase {
constructor() {
super("bizchance", CtlBase.getServiceName(SchemeCtl));
}
async create(pobj, qobj, req) {
if (!pobj.bizopt_id) {
return system.getResult(null, "bizopt_id can not be empty,100290");
}
try {
let data = await this.service.create(pobj);
return system.getResult(data);
} catch (err) {
return system.getResult(null, err.message)
}
}
async findOne(pobj, qobj, req) {
if (!pobj.bizopt_id) {
return system.getResult(null, "bizopt_id can not be empty,100290");
}
const rs = await this.service.findOne({ bizopt_id: pobj.bizopt_id });
return system.getResult(rs);
}
}
module.exports = SchemeCtl;
var system = require("../../../system");
const http = require("http");
const querystring = require('querystring');
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
const moment = require("moment");
class DeliverCtl extends CtlBase {
constructor() {
super("delivery", CtlBase.getServiceName(DeliverCtl));
}
async findAndCountAll(pobj, qobj, req) {
//设置查询条件
const rs = await this.service.findAndCountAll(pobj);
let result = [];
for (let val of rs.results.rows) {
val.company_name = val.delivery_info.companyName;
val.customer_number = val.delivery_info.contactsPhone;
val.customer_name = val.delivery_info.contactsName;
val.service_address = val.delivery_info.serviceName;
val.updated_at = moment(val.updated_at).format('YYYY-MM-DD HH:mm:ss');
val.created_at = moment(val.created_at).format('YYYY-MM-DD HH:mm:ss');
if (val.delivery_status === system.ANNUALREPORT.TAKEEFFECT) {
val.delivery_status = val['annualreports.status'] || system.ANNUALREPORT.WAITDECLARE;
}
result.push(val);
}
rs.results.rows = result;
return system.getResult(rs);
}
// 查询 详情
async findInfo(pobj, qobj, req) {
if (!pobj.id) {
return system.getResult(null, "id can not be empty,100290");
}
try {
const rs = await this.service.findInfo(pobj);
return system.getResult(rs);
} catch (err) {
return system.getResult(null, err.message)
}
}
async temporarySave(pobj, qobj, req) {
if (!pobj.deliver_id) {
return system.getResult(null, "deliver_id can not be empty,100290");
}
try {
let rs = await this.service.temporarySave(pobj);
return system.getResult(rs);
} catch (err) {
return system.getResult(null, err.message)
}
}
async findTemporary(pobj, qobj, req) {
if (!pobj.deliver_id) {
return system.getResult(null, "deliver_id can not be empty,100290");
}
const rs = await this.service.findTemporary(pobj);
return system.getResultSuccess(rs);
}
// 提交材料
async submitMaterials(pobj, qobj, req) {
//TODO:各种参数校验
if (!pobj.deliver_id) {
return system.getResult(null, "deliver_id can not be empty,100290");
}
try {
let rs = await this.service.submitMaterials(pobj);
return system.getResult(rs);
} catch (err) {
return system.getResult(null, err.message)
}
}
async changeDeliveryStatus(pobj, qobj, req) {
if (!pobj.id) {
return system.getResult(null, "deliver_id can not be empty,100290");
}
try {
let rs = await this.service.changeDeliveryStatus(pobj);
return system.getResult(rs);
} catch (err) {
return system.getResult(null, err.message)
}
}
async addQualification(pobj, qobj, req) {
if (!pobj.deliver_id) {
return system.getResult(null, "deliver_id can not be empty,100290");
}
try {
let rs = await this.service.addQualification(pobj);
return system.getResult(rs);
} catch (err) {
return system.getResult(null, err.message)
}
}
async closeDeliver(pobj) {
if (!pobj.id) {
return system.getResult(null, "id can not be empty,100290");
}
try {
let rs = await this.service.closeDeliver(pobj);
return system.getResult(rs);
} catch (err) {
return system.getResult(null, err.message)
}
}
async addMail(pobj) {
if (!pobj.id) {
return system.getResult(null, "id can not be empty,100290");
}
try {
let rs = await this.service.addMail(pobj);
return system.getResult(rs);
} catch (err) {
return system.getResult(null, err.message)
}
}
async findAnnualReportInfo(pobj) {
if (!pobj.id) {
return system.getResult(null, "id can not be empty,100290");
}
try {
const rs = await this.service.findAnnualReportInfo(pobj);
return system.getResult(rs);
} catch (err) {
return system.getResult(null, err.message)
}
}
async declareReport(pobj) {
if (!pobj.id) {
return system.getResult(null, "id can not be empty,100290");
}
if (!pobj.file || !pobj.file.url) {
return system.getResult(null, "file can not be empty,100290");
}
try {
const rs = await this.service.declareReport(pobj);
return system.getResult(rs);
} catch (err) {
return system.getResult(null, err.message)
}
}
async toCollecting(pobj) {
if (!pobj.id) {
return system.getResult(null, "deliver_id can not be empty,100290");
}
try {
let rs = await this.service.toCollecting(pobj);
return system.getResult(rs);
} catch (err) {
return system.getResult(null, err.message)
}
}
}
module.exports = DeliverCtl;
const system = require("../../../system");
const Sequelize = require('sequelize');
const Dao = require("../../dao.base");
const url = require("url");
class BizoptDao extends Dao {
constructor() {
super(Dao.getModelName(BizoptDao));
}
orderBy() {
return [["updated_at", "DESC"]];
}
extraWhere(qobj, qw, qc) {
// 权限添加
//需要添加公司查询条件
qc.where["facilitator_id"] = Number(qobj.company_id || -1);
// 组织结构
if (qobj.opath && qobj.opath != "") {
qc.where["salesman_opcode"] = { [this.db.Op.like]: `'%${qobj.opath}%'` }
}
qc.raw = true;
qc.where.business_type = qc.where.business_type ? qc.where.business_type : {
$in: [system.SERVICECODE.EDI, system.SERVICECODE.ICP]
}
switch (qobj.bizpath) {
case "/businessManagement/wailt":
qc.where.business_status = qc.where.business_status || {
$in: [system.BUSSTATUS.WAITINGSCHEME, system.BUSSTATUS.WAITINGCONFIRM]
}
break
case "/businessManagement/all":
break
}
// ---- JSON 查询 start-----
qc.where["$and"] = []
if (qc.where.linkman) {
qc.where["$and"].push(Sequelize.where(
Sequelize.literal('business_info->"$.contactsName"'),
qc.where.linkman));
delete qc.where.linkman;
}
if (qc.where.phone_number) {
qc.where["$and"].push(Sequelize.where(
Sequelize.literal('business_info->"$.contactsPhone"'),
qc.where.phone_number));
delete qc.where.phone_number;
}
// ---- JSON 查询 end-----
qc.include = [
{
model: this.db.models.scheme,
attributes: ["scheme_status"]
}
]
return qw;
}
async findBizAndSheme(id) {
const result = await this.model.findOne({
where: {
id
},
include: [
{
model: this.db.models.scheme,
raw: false
}
],
raw: false
});
return result;
}
}
module.exports = BizoptDao;
const system = require("../../../system");
const Dao = require("../../dao.base");
class SchemeDao extends Dao {
constructor() {
super(Dao.getModelName(SchemeDao));
}
}
module.exports = SchemeDao;
const system = require("../../../system");
const Dao = require("../../dao.base");
class StatuslogDao extends Dao {
constructor() {
super(Dao.getModelName(StatuslogDao));
}
}
module.exports = StatuslogDao;
const system = require("../../../system");
const Dao = require("../../dao.base");
const url = require("url");
class AnnualreportDao extends Dao {
constructor() {
super(Dao.getModelName(AnnualreportDao));
}
}
module.exports = AnnualreportDao;
const system = require("../../../system");
const Dao = require("../../dao.base");
const url = require("url");
class CacheinfoDao extends Dao {
constructor() {
super(Dao.getModelName(CacheinfoDao));
}
async createOrUpdate(pobj, t) {
const cacheinf = await this.findOne({
deliver_id: pobj.deliver_id
});
let result = {};
if (cacheinf) {
//更新
await this.updateByWhere({
cache_info: pobj.cache_info
}, {
deliver_id: pobj.deliver_id
}, t);
result = { id: cacheinf.id }
} else {
// 创建
let data = await this.create(pobj, t);
result = { id: data.id };
}
return result
}
}
module.exports = CacheinfoDao;
const system = require("../../../system");
const Dao = require("../../dao.base");
const url = require("url");
class CompanyDao extends Dao {
constructor() {
super(Dao.getModelName(CompanyDao));
}
async createOrUpdate(pobj, t) {
const companyData = await this.findOne({
enterpriseCode: pobj.enterpriseCode
});
let result = {};
if (companyData) {
//更新
delete pobj.firstBuyTime
await this.updateByWhere(pobj, {
enterpriseCode: pobj.enterpriseCode
}, t);
result = { id: companyData.id }
} else {
// 创建
let data = await this.create(pobj, t);
result = { id: data.id };
}
return result
}
}
module.exports = CompanyDao;
const system = require("../../../system");
const Dao = require("../../dao.base");
const url = require("url");
class DeliverDao extends Dao {
constructor() {
super(Dao.getModelName(DeliverDao));
}
orderBy() {
return [["updated_at", "DESC"]];
}
extraWhere(qobj, qw, qc) {
// 权限添加
//需要添加公司查询条件
qc.where["facilitator_id"] = Number(qobj.company_id || -1);
// 组织结构
if (qobj.opath && qobj.opath != "") {
qc.where["salesman_opcode"] = { [this.db.Op.like]: `'%${qobj.opath}%'` }
}
qc.raw = true;
let type = qobj.bizpath.split('/')[1];
if (type === 'deliveryManagement') {
qc.where.product_code = qc.where.product_code && [system.SERVICECODE.EDI, system.SERVICECODE.ICP].includes(qc.where.product_code) ? qc.where.product_code : {
$in: [system.SERVICECODE.EDI, system.SERVICECODE.ICP]
}
switch (qobj.bizpath) {
case "/deliveryManagement/wait":
qc.where.delivery_status = qc.where.delivery_status || {
$in: [system.SERVERSESTATUS.RECEIVED, system.SERVERSESTATUS.COLLECTING,
system.SERVERSESTATUS.SUBMITING, system.SERVERSESTATUS.DISPOSEING, system.SERVERSESTATUS.POSTING
]
}
break
case "/deliveryManagement/all":
break
}
} else if (type === "annualReport") {
qc.where.product_code = qc.where.product_code && [system.SERVICECODE.ICPANNUALREPORT, system.SERVICECODE.EDIANNUALREPORT].includes(qc.where.product_code) ? qc.where.product_code : {
$in: [system.SERVICECODE.EDIANNUALREPORT, system.SERVICECODE.ICPANNUALREPORT]
}
// ---- 兼容 年报 状态 未申报、已申报 start
let status;
if ([system.ANNUALREPORT.WAITDECLARE, system.ANNUALREPORT.DECLARESUCCESS].includes(qc.where.delivery_status)) {
status = qc.where.delivery_status;
delete qc.where.delivery_status;
qobj.bizpath = "/annualReport/wait";
}
let include = {
model: this.db.models.annualreport,
attributes: ['status', "year"],
where: {
year: {
$or: [
new Date().getFullYear(),
null
]
},
},
required: false
}
if (status) {
include.where.status = status;
delete include.required;
}
qc.include = [
include
]
// ---- 兼容 年报 状态 未申报、已申报 end
switch (qobj.bizpath) {
case "/annualReport/wait":
qc.where.delivery_status = qc.where.delivery_status || {
$in: [system.ANNUALREPORT.TAKEEFFECT]
}
break
case "/annualReport/all":
qc.where.delivery_status = qc.where.delivery_status || {
$in: [system.ANNUALREPORT.TAKEEFFECT, system.ANNUALREPORT.SUCCESS]
}
break
}
}
return qw;
}
async findInfo(pobj) {
const result = await this.model.findOne({
where: {
id: pobj.id
},
include: [
{
model: this.db.models.qualification,
// attributes: ['id', 'certificateNumber', 'businessTypes', 'businessScope', 'serviceProject', 'startAt', 'endAt', 'file'],
raw: false
}, {
model: this.db.models.material,
raw: false
}
],
raw: false
});
return result;
}
async findAnnualReportInfo(pobj) {
const result = await this.model.findOne({
where: {
id: pobj.id
},
include: [
{
model: this.db.models.annualreport,
// attributes: ['id', 'certificateNumber', 'businessTypes', 'businessScope', 'serviceProject', 'startAt', 'endAt', 'file'],
}
],
raw: false
});
return result;
}
}
module.exports = DeliverDao;
const system = require("../../../system");
const Dao = require("../../dao.base");
const url = require("url");
class MaterialDao extends Dao {
constructor() {
super(Dao.getModelName(MaterialDao));
}
async createOrUpdate(pobj, t) {
const materialData = await this.findOne({
deliver_id: pobj.deliver_id
});
let result = {};
let dataInfo = {
proposerInfo: pobj.cache_info.proposerInfo,
shareholderData: pobj.cache_info.shareholderData,
implementationPlanInfo: pobj.cache_info.implementationPlanInfo,
safetyInfo: pobj.cache_info.safetyInfo,
otherMaterialsInfo: pobj.cache_info.otherMaterialsInfo,
deliver_id: pobj.deliver_id,
ifDownload: false
}
dataInfo.proposerInfo.businessInformation.ifListed = dataInfo.proposerInfo.businessInformation.ifListed === "true"
if (materialData) {
//更新
await this.updateByWhere(dataInfo, {
deliver_id: pobj.deliver_id
}, t);
result = { id: materialData.id }
} else {
// 创建
let data = await this.create(dataInfo, t);
result = { id: data.id };
}
return result
}
}
module.exports = MaterialDao;
const system = require("../../../system");
const Dao = require("../../dao.base");
const url = require("url");
class QualificationDao extends Dao {
constructor() {
super(Dao.getModelName(QualificationDao));
}
async createOrUpdate(pobj, t) {
const qualificationData = await this.findOne({
deliver_id: pobj.deliver_id
});
let result = {};
let info = {
businessScope: pobj.businessScope,
businessTypes: pobj.businessTypes,
certificateNumber: pobj.certificateNumber,
endAt: pobj.endAt,
file: pobj.file,
serviceProject: pobj.serviceProject,
startAt: pobj.startAt,
deliver_id: pobj.deliver_id
}
if (qualificationData) {
//更新
await this.updateByWhere(info, {
deliver_id: pobj.deliver_id
}, t);
result = { id: qualificationData.id }
} else {
// 创建
let data = await this.create(info, t);
result = { id: data.id };
}
return result
}
}
module.exports = QualificationDao;
const system=require("../../../system");
const Dao=require("../../dao.base");
class MsgHistoryDao extends Dao{
constructor(){
super(Dao.getModelName(MsgHistoryDao));
}
extraWhere(obj,w){
if(obj.ukstr && obj.ukstr!=""){
// w={[this.db.Op.or]:[
// {[this.db.Op.and]:[{sender:obj.ukstr},{target:obj.extra}]},
// {[this.db.Op.and]:[{sender:obj.extra},{target:obj.ukstr}]},
// ]
// };
w[this.db.Op.or]=[
{[this.db.Op.and]:[{sender:obj.ukstr},{target:obj.extra}]},
{[this.db.Op.and]:[{sender:obj.extra},{target:obj.ukstr}]},
];
}
return w;
}
orderBy(){
//return {"key":"include","value":{model:this.db.models.app}};
return [["id","DESC"]];
}
}
module.exports=MsgHistoryDao;
const system=require("../../../system");
const Dao=require("../../dao.base");
class MsgNoticeDao extends Dao{
constructor(){
super(Dao.getModelName(MsgNoticeDao));
}
async saveNotice(msg, t) {
var noticeFrom = await super.findOne({fromId : msg.senderId, toId : msg.targetId});
if(noticeFrom) {
var set = {lastMsgId:msg.id};
if(msg.businessLicense_id) {
set.businessLicense_id = msg.businessLicense_id;
}
await super.updateByWhere(set, {where:{id:noticeFrom.id}}, t);
} else {
noticeFrom = {
fromuser: msg.sender,
fromId:msg.senderId,
touser: msg.target,
toId:msg.targetId,
isAccepted:true,
lastMsgId:msg.id,
businessLicense_id : msg.businessLicense_id || 0
};
await super.create(noticeFrom, t);
}
var noticeTo = await super.findOne({fromId : msg.targetId, toId : msg.senderId});
if(noticeTo) {
var set = {lastMsgId:msg.id};
if(msg.businessLicense_id) {
set.businessLicense_id = msg.businessLicense_id;
}
await super.updateByWhere(set, {where:{id:noticeTo.id}}, t);
} else {
noticeTo = {
fromuser: msg.target,
fromId:msg.targetId,
touser: msg.sender,
toId:msg.senderId,
isAccepted:true,
lastMsgId:msg.id,
businessLicense_id : msg.businessLicense_id || 0
};
await super.create(noticeTo, t);
}
}
orderBy(){
//return {"key":"include","value":{model:this.db.models.app}};
return [["id","DESC"]];
}
}
module.exports=MsgNoticeDao;
const system = require("../../../system");
const settings = require("../../../../config/settings");
const appconfig = system.getSysConfig();
/**
* 年报信息表
*/
module.exports = (db, DataTypes) => {
return db.define("annualreport", {
year: {
allowNull: false,
type: DataTypes.INTEGER
},
status: {
allowNull: false,
type: DataTypes.STRING
},
file: {
allowNull: true,
type: DataTypes.JSON
}
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'annual_report',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const appconfig = system.getSysConfig();
/**
* 商机表
*/
module.exports = (db, DataTypes) => {
return db.define("bizopt", {
demand_code: { // 需求编码
allowNull: false,
type: DataTypes.STRING
},
business_type: { // 商机类型
allowNull: false,
type: DataTypes.STRING
},
business_status: { // 商机状态
allowNull: false,
type: DataTypes.STRING
},
business_info: { // 商机详情
allowNull: false,
type: DataTypes.JSON
},
source_number: { // 来源单号 (下单时产生的编号)
allowNull: true,
type: DataTypes.STRING
},
source_name: { //渠道来源
allowNull: true,
type: DataTypes.STRING
},
service_address: { // 区域地址
allowNull: false,
type: DataTypes.STRING
},
close_reason: { // 关闭理由
allowNull: true,
type: DataTypes.STRING
},
facilitator_id: { // 服务商id
allowNull: true,
type: DataTypes.STRING
},
facilitator_name: { // 服务商名称
allowNull: true,
type: DataTypes.STRING
},
salesman_opcode: { // 组织架构路径
allowNull: true,
type: DataTypes.STRING
},
salesman_id: {// 业务员id
allowNull: true,
type: DataTypes.STRING
},
salesman_name: { // 业务员姓名
allowNull: true,
type: DataTypes.STRING
},
salesman_phone: { // 业务员联系方式
allowNull: true,
type: DataTypes.STRING
}
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'bussiness_opportunity',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const appconfig = system.getSysConfig();
/**
* 材料缓存表
*/
module.exports = (db, DataTypes) => {
return db.define("cacheinfo", {
cache_info: {
allowNull: false,
type: DataTypes.JSON
},
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'cache_information',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const appconfig = system.getSysConfig();
/**
* 公司主体表
*/
module.exports = (db, DataTypes) => {
//TODO:
return db.define("company1", {
name: {
allowNull: false,
type: DataTypes.STRING
},
enterpriseCode: {
allowNull: false,
type: DataTypes.STRING
},
type: {
allowNull: false,
type: DataTypes.STRING
},
createdAt: {
allowNull: false,
type: DataTypes.DATE
},
legalRepresentative: {
allowNull: false,
type: DataTypes.STRING
},
businessTerm: {
allowNull: false,
type: DataTypes.STRING
},
registeredCapital: {
allowNull: false,
type: DataTypes.STRING
},
address: {
allowNull: false,
type: DataTypes.STRING
},
lastContactInfo: {
allowNull: false,
type: DataTypes.JSON
},
firstBuyTime: {
allowNull: false,
type: DataTypes.DATE
}
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'company',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const appconfig = system.getSysConfig();
/**
* 交付单表
*/
module.exports = (db, DataTypes) => {
return db.define("deliver", {
delivery_code: { //交付单编号
allowNull: true,
type: DataTypes.STRING
},
source_number: { // 来源单号
allowNull: true,
type: DataTypes.STRING
},
source_name: { // 渠道名称
allowNull: true,
type: DataTypes.STRING
},
demand_code: {// 商机编号
allowNull: true,
type: DataTypes.STRING
},
scheme_number: {// 方案编号
allowNull: true,
type: DataTypes.STRING
},
product_code: { // 产品编码
allowNull: false,
type: DataTypes.STRING
},
product_name: { // 产品名称
allowNull: false,
type: DataTypes.STRING
},
service_address: { // 区域地址
allowNull: false,
type: DataTypes.STRING
},
delivery_info: { //服务概况
allowNull: false,
type: DataTypes.JSON
},
delivery_status: {// 服务单流转状态
allowNull: false,
type: DataTypes.STRING
},
selling_price: {//售价
allowNull: false,
type: DataTypes.INTEGER
},
cost_price: {//成本价
allowNull: true,
type: DataTypes.INTEGER
},
close_reason: {//关闭理由
allowNull: true,
type: DataTypes.STRING
},
facilitator_id: { // 服务商id
allowNull: true,
type: DataTypes.STRING
},
facilitator_name: { // 服务商名称
allowNull: true,
type: DataTypes.STRING
},
salesman_opcode: { // 组织架构路径
allowNull: true,
type: DataTypes.STRING
},
salesman_id: {// 业务员id
allowNull: true,
type: DataTypes.STRING
},
salesman_name: { // 业务员姓名
allowNull: true,
type: DataTypes.STRING
},
salesman_phone: { // 业务员联系方式
allowNull: true,
type: DataTypes.STRING
},
sku_code: {
allowNull: true,
type: DataTypes.STRING
},
master_source_number: { //业务主订单号
allowNull: true,
type: DataTypes.STRING
}
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'delivery_bill',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const appconfig = system.getSysConfig();
/**
* 材料表
*/
module.exports = (db, DataTypes) => {
return db.define("material", {
proposerInfo: {
allowNull: false,
type: DataTypes.JSON
},
shareholderData: {
allowNull: false,
type: DataTypes.JSON
},
implementationPlanInfo: {
allowNull: false,
type: DataTypes.JSON
},
safetyInfo: {
allowNull: false,
type: DataTypes.JSON
},
otherMaterialsInfo: {
allowNull: false,
type: DataTypes.JSON
},
ifDownload: {//是否生成下载文件
type: DataTypes.BOOLEAN,
defaultValue: false
},
downloadUrl: {
allowNull: true,
type: DataTypes.STRING
}
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'materials_info',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const appconfig = system.getSysConfig();
/**
* 资质信息表
*/
module.exports = (db, DataTypes) => {
return db.define("qualification", {
certificateNumber: {
allowNull: false,
type: DataTypes.STRING
},
businessTypes: {
allowNull: false,
type: DataTypes.STRING
},
businessScope: {
allowNull: false,
type: DataTypes.TEXT
},
serviceProject: {
allowNull: false,
type: DataTypes.STRING
},
startAt: {
allowNull: false,
type: DataTypes.DATE
},
endAt: {
allowNull: false,
type: DataTypes.DATE
},
file: {
allowNull: false,
type: DataTypes.JSON
}
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'qualification_info',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../../system");
const moment = require('moment');
const settings = require("../../../../config/settings");
const appconfig = system.getSysConfig();
/**
* 方案表
*/
module.exports = (db, DataTypes) => {
return db.define("scheme", {
demand_code: { // 需求编码
allowNull: false,
type: DataTypes.STRING
},
scheme_number: { //方案编号
allowNull: true,
type: DataTypes.STRING
},
scheme_info: {//方案详情
allowNull: false,
type: DataTypes.JSON
},
scheme_status: { //方案状态
allowNull: false,
type: DataTypes.STRING
},
reject_reason: {//驳回理由
allowNull: true,
type: DataTypes.STRING
},
remark_info: { //备注
allowNull: true,
type: DataTypes.STRING
},
bizopt_id: { //商机id
allowNull: false,
type: DataTypes.STRING
},
facilitator_id: { //服务商id
allowNull: true,
type: DataTypes.STRING
},
facilitator_name: { //服务商名称
allowNull: true,
type: DataTypes.STRING
},
salesman_opcode: { //组织架构路径
allowNull: true,
type: DataTypes.STRING
},
salesman_id: { //业务员id
allowNull: true,
type: DataTypes.STRING
},
salesman_name: { //业务员名称
allowNull: true,
type: DataTypes.STRING
},
salesman_phone: { //业务员联系方式
allowNull: true,
type: DataTypes.STRING
}
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'scheme_information',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const appconfig = system.getSysConfig();
/**
* 状态流转记录表
*/
module.exports = (db, DataTypes) => {
return db.define("statuslog", {
flow_type: { // 流程类型 (商机、方案、交付单)
allowNull: false,
type: DataTypes.STRING
},
flow_id: { // 流程对应id
allowNull: false,
type: DataTypes.STRING
},
status_reason: { // 状态日期
allowNull: true,
type: DataTypes.STRING
},
status_code: { // 流转状态
allowNull: false,
type: DataTypes.STRING
},
salesman_id: {
allowNull: true,
type: DataTypes.STRING
},
salesman_name: {
allowNull: true,
type: DataTypes.STRING
}
}, {
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'status_log',
validate: {
},
indexes: [
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../../system");
const settings = require("../../../../config/settings");
const appconfig=system.getSysConfig();
module.exports = (db, DataTypes) => {
return db.define("msghistory", {
msgType:{
type:DataTypes.ENUM,
allowNull: false,
values: Object.keys(appconfig.pdict.msgType),
},
app_id:DataTypes.INTEGER,
company_id:DataTypes.INTEGER,
sender:DataTypes.STRING,
senderId:DataTypes.INTEGER,
target:DataTypes.STRING,
targetId:DataTypes.INTEGER,
content: {
type: DataTypes.TEXT('long'),
allowNull: false,
},//需要在后台补充
isRead:{
type:DataTypes.BOOLEAN,
defaultValue: false,
}
},{
paranoid: false,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'msghistory',
validate: {
},
indexes:[
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
module.exports = (db, DataTypes) => {
return db.define("msgnotice", {
fromuser: DataTypes.STRING,//需要在后台补充
fromId:DataTypes.INTEGER,
touser: DataTypes.STRING,//需要在后台补充
toId:DataTypes.INTEGER,
isAccepted:DataTypes.BOOLEAN,
lastMsgId:DataTypes.INTEGER
},{
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'msgnotice',
validate: {
},
indexes:[
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
const moment = require("moment");
const pushTx = require("../../../utils/totxClient")
class BizoptService extends ServiceBase {
constructor() {
super("bizchance", ServiceBase.getDaoName(BizoptService));
this.schemeDao = system.getObject("db.bizchance.schemeDao");
this.statuslogDao = system.getObject("db.bizchance.statuslogDao");
}
async findBizAndSheme(pobj) {
let data = await this.dao.findBizAndSheme(pobj.id);
if (data) {
data = JSON.parse(JSON.stringify(data));
let bussinessData = {
id: data.id,
demand_code: data.demand_code,
business_type: data.business_type,
company_name: data.business_info.companyName,
customer_name: data.business_info.contactsName,
customer_number: data.business_info.contactsPhone,
annual_report: data.business_info.annual_report || false,
content: data.business_info.memoInfo,
service_address: data.business_info.serviceName,
source_name: data.source_name,
business_status: data.business_status,
source_number: data.source_number,
updated_at: moment(data.updated_at).format('YYYY-MM-DD HH:mm:ss'),
created_at: moment(data.created_at).format('YYYY-MM-DD HH:mm:ss'),
close_reason: data.close_reason
};
let schemeData = null;
if (data.scheme) {
schemeData = {
id: data.scheme.id,
scheme_number: data.scheme.scheme_number,
scheme_status: data.scheme.scheme_status,
reject_reason: data.scheme.reject_reason,
company_name: data.scheme.scheme_info.company,
address: data.scheme.scheme_info.address,
annual_report: data.scheme.scheme_info.annual_report || false,
remark_info: data.scheme.remark_info,
updated_at: moment(data.scheme.updated_at).format('YYYY-MM-DD HH:mm:ss'),
created_at: moment(data.scheme.created_at).format('YYYY-MM-DD HH:mm:ss'),
}
}
return {
bussinessData,
schemeData
}
}
return data
}
async closeBiz(pobj) {
/**
* 1. 回传给腾讯
* 2. 判断是否可以关闭
* 3. 更改 商机、方案状态
* 4. 插入更改记录
* 5. 查询 是否有权限
*/
const bizResult = await this.dao.findOne({
id: pobj.bizId
});
if (!bizResult) {
throw new Error("查不到该商机");
}
if ([system.BUSSTATUS.CLOSED, system.BUSSTATUS.SUCCESS].includes(bizResult.business_status)) {
throw new Error("此商机状态下不可操作");
}
const schemeResult = await this.schemeDao.findOne({
bizopt_id: pobj.bizId
});
await pushTx.pushCloseNeed(bizResult, pobj.close_reason);
return this.db.transaction(async (t) => {
await this.dao.updateByWhere({
business_status: system.BUSSTATUS.CLOSED,
close_reason: pobj.close_reason
}, {
id: pobj.bizId
}, t);
this.statuslogDao.create({
flow_type: system.FLOWCODE.BIZ,
flow_id: pobj.bizId,
status_code: system.BUSSTATUS.CLOSED,
salesman_id: pobj.userid,
salesman_name: pobj.username
});
if (schemeResult) {
await this.schemeDao.updateByWhere({
scheme_status: system.SCHEMESTATUS.CLOSED
}, {
id: schemeResult.id
}, t);
this.statuslogDao.create({
flow_type: system.FLOWCODE.SCHEME,
flow_id: schemeResult.id,
status_code: system.SCHEMESTATUS.CLOSED,
salesman_id: pobj.userid,
salesman_name: pobj.username
});
}
return "success"
})
}
}
module.exports = BizoptService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
const settings = require("../../../../config/settings");
const moment = require("moment");
const pushTx = require("../../../utils/totxClient")
class SchemeService extends ServiceBase {
constructor() {
super("bizchance", ServiceBase.getDaoName(SchemeService));
this.bizoptDao = system.getObject("db.bizchance.bizoptDao");
this.statuslogDao = system.getObject("db.bizchance.statuslogDao");
}
async create(data) {
// TODO: 权限判断
let bizData = await this.bizoptDao.findOne({
id: data.bizopt_id
});
if (!bizData) {
throw new Error("查不到该商机");
}
if ([system.BUSSTATUS.CLOSED, system.BUSSTATUS.SUCCESS, system.BUSSTATUS.WAITINGCONFIRM].includes(bizData.business_status)) {
throw new Error("此商机状态下不可操作");
}
let schemeData = await this.dao.findOne({
bizopt_id: data.bizopt_id
})
if (schemeData && [system.SCHEMESTATUS.WAITINGCONFIRM, system.SCHEMESTATUS.CLOSED].includes(schemeData.scheme_status)) {
throw new Error("此方案状态下不可操作");
}
// scheme_number 提交到腾讯 获取更新 方案编号
data.scheme_number = await pushTx.pushScheme(bizData, schemeData || data);
return this.db.transaction(async (t) => {
/**
* 1. 更改 商机状态
* 2. 查询 是否有方案及方案状态
* 3. 新增 或更改 方案
* 4. 添加 状态记录更改
*/
try {
await this.bizoptDao.updateByWhere({
business_status: system.BUSSTATUS.WAITINGCONFIRM
}, {
id: data.bizopt_id
}, t);
this.statuslogDao.create({
flow_type: system.FLOWCODE.BIZ,
flow_id: data.bizopt_id,
status_code: system.BUSSTATUS.WAITINGCONFIRM,
salesman_id: data.userid,
salesman_name: data.username
});
let scheme_id = null;
if (schemeData) {
await this.dao.updateByWhere({
...data,
demand_code: bizData.demand_code,
scheme_status: system.SCHEMESTATUS.WAITINGCONFIRM
}, {
id: schemeData.id
}, t);
scheme_id = schemeData.id
} else {
let schemeResult = await this.dao.create({
...data,
demand_code: bizData.demand_code,
scheme_status: system.SCHEMESTATUS.WAITINGCONFIRM,
bizopt_id: data.bizopt_id
}, t);
scheme_id = schemeResult.id;
}
this.statuslogDao.create({
flow_type: system.FLOWCODE.SCHEME,
flow_id: scheme_id,
status_code: system.SCHEMESTATUS.WAITINGCONFIRM,
salesman_id: data.userid,
salesman_name: data.username
});
return { bizId: data.bizopt_id };
} catch (err) {
console.log(err)
}
});
}
}
module.exports = SchemeService;
const system=require("../../../system");
const ServiceBase=require("../../sve.base");
class MsgHistoryService extends ServiceBase{
constructor(){
super(ServiceBase.getDaoName(MsgHistoryService));
this.msgnoticeDao = system.getObject("db.msg.msgnoticeDao");
this.userDao = system.getObject("db.auth.userDao");
this.redisClient = system.getObject("util.redisClient");
}
async saveMsg(msg) {
var self = this;
console.log("save msg ", msg);
// 事务
await this.db.transaction(async function (t){
// 1.保存聊天信息
msg = await self.dao.create(msg, t);
// 2.保存好友信息
await self.msgnoticeDao.saveNotice(msg, t);
});
return msg;
}
async pushBusinessLicenseMsg(senderId, targetId, businessLicense_id) {
if(!businessLicense_id) {
return 0;
}
var notice = await this.msgnoticeDao.findOne({fromId : senderId, toId : targetId});
if(notice && notice.businessLicense_id == businessLicense_id) {
return 0;
}
var senderUser = await this.userDao.findById(senderId);
var targetUser = await this.userDao.findById(targetId);
var senderChannel = senderUser.app_id + "¥" + senderUser.id;
var targetChannel = targetUser.app_id + "¥" + targetUser.id;
var sender = senderUser.app_id + "¥" + senderUser.id + "¥" + senderUser.headUrl;
var target = targetUser.app_id + "¥" + targetUser.id + "¥" + targetUser.headUrl;
var msg = {
msgType: "mryzLicense",
sender:sender,
senderId:senderId,
target:target,
targetId:targetId,
content:businessLicense_id,
isRead:false,
businessLicense_id:businessLicense_id
}
var obj = await this.saveMsg(msg);
var bl = await this.businesslicenseDao.findById(businessLicense_id);
msg.businessLicense = bl;
msg.id = obj.id;
msg.created_at = obj.created_at;
this.redisClient.publish(senderChannel, JSON.stringify(msg));
this.redisClient.publish(targetChannel, JSON.stringify(msg));
return 1;
}
async getChatList(senderId, targetId, maxId, pageSize) {
let sql = "SELECT * FROM `msghistory` WHERE id < :maxId AND ((senderId = :senderId AND targetId = :targetId) OR (targetId = :senderId AND senderId = :targetId)) ORDER BY id DESC LIMIT :pageSize "
let params = {senderId:senderId, targetId: targetId, maxId: maxId, pageSize: pageSize};
var list = await this.dao.customQuery(sql, params);
if(!list || list.length == 0) {
return [];
}
var licenseIds = [];
var msgIds = [];
list.forEach(item => {
if(item.msgType == 'mryzLicense') {
licenseIds.push(Number(item.businessLicense_id));
}
msgIds.push(item.id);
});
if(licenseIds.length > 0) {
let licenseSql = "SELECT * FROM yz_business_license WHERE id IN (" + licenseIds.join(",") + ") ";
var licenseList = await this.businesslicenseDao.customQuery(licenseSql);
var licenseMap = [];
licenseList.forEach(item => {
licenseMap["id" + item.id] = item;
});
list.forEach(item => {
if(item.msgType == 'mryzLicense') {
item.businessLicense = licenseMap['id' + item.businessLicense_id];
}
});
}
var self = this;
setTimeout(function(){
self.setRead(senderId, targetId, list);
}, 1000);
return list;
}
async setRead(senderId, targetId, list) {
if(!list || list.length == 0) {
return;
}
var target = await this.userDao.findById(targetId);
if(!target) {
return;
}
var pushIds = [];
for(var item of list) {
if(item.isRead || senderId != item.targetId) {
continue;
}
pushIds.push(item.id);
}
if(pushIds.length == 0) {
return;
}
this.dao.updateByWhere({isRead: true}, {where:{id:{[this.db.Op.in]:pushIds}}});
var channel = target.app_id + "¥" + target.id;
var rs = await this.redisClient.publish(channel, JSON.stringify({type:"readmsg", data : pushIds}));
console.log(rs, "------------------------------------------ publish result ");
}
async readMsg(userId, id) {
var msg = await this.dao.findById(id);
if(!msg || userId != msg.targetId) {
return 0;
}
msg.isRead = true;
await msg.save();
var user = await this.userDao.findById(msg.senderId);
if(!user) {
return 0;
}
var channel = user.app_id + "¥" + user.id;
return await this.redisClient.publish(channel, JSON.stringify({type:"readmsg", data : [msg.id]}));
}
}
module.exports=MsgHistoryService;
const system = require("../../../system");
const ServiceBase = require("../../sve.base");
class MsgNoticeService extends ServiceBase {
constructor() {
super(ServiceBase.getDaoName(MsgNoticeService));
this.userDao = system.getObject("db.auth.userDao");
this.msghistoryDao = system.getObject("db.msg.msghistoryDao");
}
getApp(appkey) {
return this.cacheManager["AppCache"].cacheApp(appkey);
}
async getUserList(userId) {
var list = await this.dao.model.findAll({
where: {
fromId: userId
},
order: [
["updated_at", "DESC"]
],
raw: true
});
if (!list || list.length == 0) {
return [];
}
var msgIds = [];
var businessLicenseIds = [];
var userIds = [];
for (var item of list) {
msgIds.push(item.lastMsgId);
businessLicenseIds.push(item.businessLicense_id);
userIds.push(item.toId);
}
var msgMap = [];
var businessLicenseMap = [];
var userMap = [];
var unreadMap = [];
// 最后一条聊天记录
if (msgIds.length > 0) {
var msgList = await this.msghistoryDao.customQuery("SELECT * FROM msghistory WHERE id IN (" + msgIds.join(",") + ") ");
msgList.forEach(item => {
msgMap["id" + item.id] = item;
});
}
// 最后一次聊天关联执照
if (businessLicenseIds.length > 0) {
var licenseList = await this.businesslicenseDao.customQuery("SELECT * FROM yz_business_license WHERE id IN (" + businessLicenseIds.join(",") + ") ");
var serviceTypeIds = [];
for (var item of licenseList) {
serviceTypeIds.push(item.serviceTypeOneId);
serviceTypeIds.push(item.serviceTypeTwoId);
}
if (serviceTypeIds.length > 0) {
var sql = "SELECT id, name FROM `p_service_type` WHERE id IN (" + serviceTypeIds.join(",") + ") ";
var typeList = await this.dao.customQuery(sql);
var typeMap = [];
if (typeList && typeList.length > 0) {
for (var t of typeList) {
typeMap["type_id_" + t.id] = t.name;
if (t.id == item.serviceTypeOneId) {
item.serviceTypeOneName = t.name;
} else if (t.id == item.serviceTypeTwoId) {
item.serviceTypeTwoName = t.name;
} else {}
}
}
}
for (var item of licenseList) {
item.serviceTypeOneName = typeMap["type_id_" + item.serviceTypeOneId];
item.serviceTypeTwoName = typeMap["type_id_" + item.serviceTypeTwoId];
}
licenseList.forEach(item => {
businessLicenseMap["id" + item.id] = item;
});
}
// 聊天好友用户信息
if (userIds.length > 0) {
var userList = await this.userDao.customQuery("SELECT * FROM p_user WHERE id IN (" + userIds.join(",") + ") ");
userList.forEach(item => {
userMap["id" + item.id] = item;
});
}
// 未读消息数量
var unreadList = await this.userDao.customQuery("SELECT senderId, COUNT(1) AS num FROM `msghistory` WHERE isRead = 0 AND targetId = " + userId + " GROUP BY senderId ");
unreadList.forEach(item => {
unreadMap["id" + item.senderId] = item.num;
});
var rs = [];
for (var i in list) {
var item = list[i];
item.lastMsg = msgMap["id" + item.lastMsgId];
item.businessLicense = businessLicenseMap["id" + item.businessLicense_id];
item.friend = userMap["id" + item.toId];
item.unreadCount = unreadMap["id" + item.toId] || 0;
rs.push(item);
}
return rs;
}
async countUnread(userId) {
debugger;
var unreadList = await this.userDao.customQuery("SELECT COUNT(1) AS num FROM `msghistory` WHERE isRead = 0 AND targetId = " + userId);
var count = 0;
if (unreadList && unreadList.length > 0) {
count = unreadList[0].num || 0;
}
return count;
}
}
module.exports = MsgNoticeService;
\ No newline at end of file
...@@ -277,59 +277,6 @@ Date.prototype.Format = function (fmt) { //author: meizz ...@@ -277,59 +277,6 @@ Date.prototype.Format = function (fmt) { //author: meizz
return fmt; return fmt;
} }
/**
* 常用 ENUM
*/
// 表分类
System.FLOWCODE = {
BIZ: "BIZ",//商机表
SCHEME: "SCHEME",//方案表
DELIVERY: "DELIVERY",//服务单表
ANNUALREPORT: "ANNUALREPORT"//年报表
}
// 服务名称
System.SERVICECODE = {
ICP: "ICP",
EDI: 'EDI',
ICPANNUALREPORT: "ICPANNUALREPORT",
EDIANNUALREPORT: "EDIANNUALREPORT"
}
// 商机状态
System.BUSSTATUS = {
WAITINGSCHEME: "beforeSubmission",//待提交方案
WAITINGCONFIRM: "beforeConfirmation",//待用户确认
SUCCESS: "isFinished",//已成交
CLOSED: "isClosed"//需求关闭
}
// 方案状态
System.SCHEMESTATUS = {
WAITINGCONFIRM: "beforeConfirmation",//待用户确认.
CLOSED: "isClosed",//方案关闭
REJECT: "isReject"//方案被拒绝
}
// 资质服务单状态
System.SERVERSESTATUS = {
RECEIVED: "received",//已接单
COLLECTING: "collecting",//收集材料中
SUBMITING: "submiting",//递交材料中
DISPOSEING: "disposeing",//工信部处理中
POSTING: "posting",//证书已邮寄
SUCCESS: "success",//服务已完成
CLOSED: "closed",//已关闭
}
// 年报服务单状态
System.ANNUALREPORT = {
RECEIVED: "received",//已接单
WAITDECLARE: "waitdeclare",//待申报
DECLARESUCCESS: "declaresuccess",//申报成功
SUCCESS: "success",//服务已完成
CLOSED: "closed",//已关闭
TAKEEFFECT: "takeeffect"//生效
}
/* /*
编码说明, 编码说明,
1000----1999 为请求参数验证和app权限验证 1000----1999 为请求参数验证和app权限验证
......
This source diff could not be displayed because it is too large. You can view the blob instead.
.error-page{width:100%;height:100%;position:relative;background:#f8f8f9}.error-page .content-con{width:700px;height:600px;position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-60%);transform:translate(-50%,-60%)}.error-page .content-con img{display:block;width:100%;height:100%}.error-page .content-con .text-con{position:absolute;left:0;top:0}.error-page .content-con .text-con h4{position:absolute;left:0;top:0;font-size:80px;font-weight:700;color:#348eed}.error-page .content-con .text-con h5{position:absolute;width:700px;left:0;top:100px;font-size:20px;font-weight:700;color:#67647d}.error-page .content-con .back-btn-group{position:absolute;right:0;bottom:20px}
\ No newline at end of file
.content{padding:20px;background-color:#fff}.content h3{margin-top:10px;margin-bottom:10px}.content .steps{margin-bottom:10px;margin-left:30px}.content .shareholder_info h3{display:inline-block;margin-top:10px;margin-bottom:30px}.content .shareholder_info .button{margin-right:20px;float:right}.content .shareholder_info .button button{margin-left:10px}.footer-button button{margin-top:10px;margin-right:5px}.demo-drawer-footer{width:100%;position:absolute;bottom:0;left:0;border-top:1px solid #e8e8e8;padding:10px 16px;text-align:right;background:#fff}
\ No newline at end of file
.error-page{width:100%;height:100%;position:relative;background:#f8f8f9}.error-page .content-con{width:700px;height:600px;position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-60%);transform:translate(-50%,-60%)}.error-page .content-con img{display:block;width:100%;height:100%}.error-page .content-con .text-con{position:absolute;left:0;top:0}.error-page .content-con .text-con h4{position:absolute;left:0;top:0;font-size:80px;font-weight:700;color:#348eed}.error-page .content-con .text-con h5{position:absolute;width:700px;left:0;top:100px;font-size:20px;font-weight:700;color:#67647d}.error-page .content-con .back-btn-group{position:absolute;right:0;bottom:20px}
\ No newline at end of file
.error-page{width:100%;height:100%;position:relative;background:#f8f8f9}.error-page .content-con{width:700px;height:600px;position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-60%);transform:translate(-50%,-60%)}.error-page .content-con img{display:block;width:100%;height:100%}.error-page .content-con .text-con{position:absolute;left:0;top:0}.error-page .content-con .text-con h4{position:absolute;left:0;top:0;font-size:80px;font-weight:700;color:#348eed}.error-page .content-con .text-con h5{position:absolute;width:700px;left:0;top:100px;font-size:20px;font-weight:700;color:#67647d}.error-page .content-con .back-btn-group{position:absolute;right:0;bottom:20px}
\ No newline at end of file
.button button{margin-right:20px;margin-bottom:20px}.vertical-center-modal{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.vertical-center-modal .ivu-modal{top:0}
\ No newline at end of file
.common{float:left;height:100%;display:table;text-align:center}.size{width:100%;height:100%}.middle-center{display:table-cell;vertical-align:middle}.info-card-wrapper{overflow:hidden}.info-card-wrapper,.info-card-wrapper .ivu-card-body{width:100%;height:100%}.info-card-wrapper .content-con{width:100%;height:100%;position:relative}.info-card-wrapper .content-con .left-area{float:left;height:100%;display:table;text-align:center}.info-card-wrapper .content-con .left-area>.icon{display:table-cell;vertical-align:middle}.info-card-wrapper .content-con .right-area{float:left;height:100%;display:table;text-align:center}.info-card-wrapper .content-con .right-area>div{display:table-cell;vertical-align:middle}.count-to-wrapper .content-outer{display:inline-block}.count-to-wrapper .content-outer .count-to-unit-text{font-style:normal}.count-style{font-size:50px}
\ No newline at end of file
button{margin-left:10px}.content{margin-top:20px;padding:20px;background-color:#fff}.content h3{margin-bottom:15px}.content .steps{margin-bottom:20px;margin-left:30px}.demo-drawer-footer{width:100%;position:absolute;bottom:0;left:0;border-top:1px solid #e8e8e8;padding:10px 16px;text-align:right;background:#fff}.info{background:#fff;-webkit-box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 3px 0 rgba(0,0,0,.2);box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 3px 0 rgba(0,0,0,.2);padding:15px;margin-bottom:5px}.info .ivu-form-item-content span{font-size:12px;font-family:Helvetica;color:#000;line-height:14px}.strengthenSpan{word-break:normal;width:auto;display:block;white-space:pre-wrap;word-wrap:break-word;overflow:auto;height:200px}
\ No newline at end of file
.info{background:#fff;-webkit-box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 3px 0 rgba(0,0,0,.2);box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 3px 0 rgba(0,0,0,.2);padding:15px;margin-bottom:20px}.info h3{margin-bottom:5px}.info .ivu-form-item-content span{font-size:12px;font-family:Helvetica;color:#000;line-height:14px}
\ No newline at end of file
.message-page-con{height:calc(100vh - 176px);display:inline-block;vertical-align:top;position:relative}.message-page-con.message-category-con{border-right:1px solid #e6e6e6;width:200px}.message-page-con.message-list-con{border-right:1px solid #e6e6e6;width:230px}.message-page-con.message-view-con{position:absolute;left:446px;top:16px;right:16px;bottom:16px;overflow:auto;padding:12px 20px 0}.message-page-con.message-view-con .message-view-header{margin-bottom:20px}.message-page-con.message-view-con .message-view-header .message-view-title{display:inline-block}.message-page-con.message-view-con .message-view-header .message-view-time{margin-left:20px}.message-page-con .category-title{display:inline-block;width:65px}.message-page-con .gray-dadge{background:#dcdcdc}.message-page-con .not-unread-list .msg-title{color:#aaa9a9}.message-page-con .not-unread-list .ivu-menu-item .ivu-btn.ivu-btn-text.ivu-btn-small.ivu-btn-icon-only{display:none}.message-page-con .not-unread-list .ivu-menu-item:hover .ivu-btn.ivu-btn-text.ivu-btn-small.ivu-btn-icon-only{display:inline-block}
\ No newline at end of file
.org-tree-container{display:inline-block;padding:15px;background-color:#fff}.org-tree{display:table;text-align:center}.org-tree:after,.org-tree:before{content:"";display:table;pointer-events:none}.org-tree:after{clear:both;pointer-events:none}.org-tree-node,.org-tree-node-children{position:relative;margin:0 auto;padding:0;list-style-type:none}.org-tree-node-children:after,.org-tree-node-children:before,.org-tree-node:after,.org-tree-node:before{-webkit-transition:all .35s;transition:all .35s;pointer-events:none}.org-tree-node-label{position:relative;display:inline-block}.org-tree-node-label .org-tree-node-label-inner{padding:10px 15px;text-align:center;border-radius:3px;-webkit-box-shadow:0 1px 5px rgba(0,0,0,.15);box-shadow:0 1px 5px rgba(0,0,0,.15)}.org-tree-button-wrapper{position:absolute;top:100%;left:50%;width:0;height:0;z-index:10;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.org-tree-button-wrapper>*{position:absolute;top:50%;left:50%}.org-tree-button-wrapper .org-tree-node-btn{position:relative;display:inline-block;width:20px;height:20px;background-color:#fff;border:1px solid #ccc;border-radius:50%;-webkit-box-shadow:0 0 2px rgba(0,0,0,.15);box-shadow:0 0 2px rgba(0,0,0,.15);cursor:pointer;-webkit-transition:all .35s ease;transition:all .35s ease;-webkit-transform:translate(-50%,9px);transform:translate(-50%,9px)}.org-tree-button-wrapper .org-tree-node-btn:hover{background-color:#e7e8e9;-webkit-transform:translate(-50%,9px) scale(1.15);transform:translate(-50%,9px) scale(1.15)}.org-tree-button-wrapper .org-tree-node-btn:after,.org-tree-button-wrapper .org-tree-node-btn:before{content:"";position:absolute;pointer-events:none}.org-tree-button-wrapper .org-tree-node-btn:before{top:50%;left:4px;right:4px;height:0;border-top:1px solid #ccc}.org-tree-button-wrapper .org-tree-node-btn:after{top:4px;left:50%;bottom:4px;width:0;border-left:1px solid #ccc;pointer-events:none}.org-tree-button-wrapper .org-tree-node-btn.expanded:after{border:none;pointer-events:none}.org-tree-node{padding-top:20px;display:table-cell;vertical-align:top}.org-tree-node.collapsed,.org-tree-node.is-leaf{padding-left:10px;padding-right:10px}.org-tree-node:after,.org-tree-node:before{pointer-events:none;content:"";position:absolute;top:0;left:0;width:50%;height:19px}.org-tree-node:after{left:50%;border-left:1px solid #ddd;pointer-events:none}.org-tree-node:not(:first-child):before,.org-tree-node:not(:last-child):after{border-top:1px solid #ddd;pointer-events:none}.collapsable .org-tree-node.collapsed{padding-bottom:30px}.collapsable .org-tree-node.collapsed .org-tree-node-label:after{content:"";position:absolute;top:100%;left:0;width:50%;height:20px;border-right:1px solid #ddd;pointer-events:none}.org-tree>.org-tree-node{padding-top:0}.org-tree>.org-tree-node:after{border-left:0;pointer-events:none}.org-tree-node-children{padding-top:20px;display:table}.org-tree-node-children:before{content:"";position:absolute;top:0;left:50%;width:0;height:20px;border-left:1px solid #ddd}.org-tree-node-children:after{content:"";display:table;clear:both;pointer-events:none}.horizontal .org-tree-node{display:table-cell;float:none;padding-top:0;padding-left:20px}.horizontal .org-tree-node.collapsed,.horizontal .org-tree-node.is-leaf{padding-top:10px;padding-bottom:10px}.horizontal .org-tree-node:after,.horizontal .org-tree-node:before{width:19px;height:50%;pointer-events:none}.horizontal .org-tree-node:after{top:50%;left:0;border-left:0;pointer-events:none}.horizontal .org-tree-node:only-child:before{top:1px;border-bottom:1px solid #ddd}.horizontal .org-tree-node:not(:first-child):before,.horizontal .org-tree-node:not(:last-child):after{border-top:0;border-left:1px solid #ddd;pointer-events:none}.horizontal .org-tree-node:not(:only-child):after{border-top:1px solid #ddd;pointer-events:none}.horizontal .org-tree-node .org-tree-node-inner{display:table}.horizontal .org-tree-node-label{display:table-cell;vertical-align:middle}.horizontal.collapsable .org-tree-node.collapsed{padding-right:30px}.horizontal.collapsable .org-tree-node.collapsed .org-tree-node-label:after{top:0;left:100%;width:20px;height:50%;border-right:0;border-bottom:.625em solid #ddd;pointer-events:none}.horizontal .org-tree-button-wrapper{position:absolute;top:50%;left:100%;width:0;height:0;z-index:10;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.horizontal .org-tree-button-wrapper>*{position:absolute;top:50%;left:50%}.horizontal .org-tree-button-wrapper .org-tree-node-btn{display:inline-block;-webkit-transform:translate(9PX,-50%);transform:translate(9PX,-50%)}.horizontal>.org-tree-node:only-child:before{border-bottom:0}.horizontal .org-tree-node-children{display:table-cell;padding-top:0;padding-left:20px}.horizontal .org-tree-node-children:before{top:50%;left:0;width:20px;height:0;border-left:0;border-top:1px solid #ddd}.horizontal .org-tree-node-children:after{display:none}.horizontal .org-tree-node-children>.org-tree-node{display:block}
\ No newline at end of file
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<!--
2013-9-30: Created.
-->
<svg>
<metadata>
Created by iconfont
</metadata>
<defs>
<font id="iconfont" horiz-adv-x="1024" >
<font-face
font-family="iconfont"
font-weight="500"
font-stretch="normal"
units-per-em="1024"
ascent="896"
descent="-128"
/>
<missing-glyph />
<glyph glyph-name="bear" unicode="&#58880;" d="M1024 683.008q0-70.656-46.08-121.856 46.08-89.088 46.08-193.536 0-96.256-39.936-181.248t-109.568-147.968-162.816-99.328-199.68-36.352-199.68 36.352-162.304 99.328-109.568 147.968-40.448 181.248q0 104.448 46.08 193.536-46.08 51.2-46.08 121.856 0 37.888 13.824 71.168t37.376 58.368 55.808 39.424 68.096 14.336q43.008 0 78.848-18.432t59.392-50.176q46.08 17.408 96.256 26.624t102.4 9.216 102.4-9.216 96.256-26.624q24.576 31.744 59.904 50.176t78.336 18.432q36.864 0 68.608-14.336t55.296-39.424 37.376-58.368 13.824-71.168zM205.824 268.288q10.24 0 18.944 10.24t15.36 28.672 10.24 42.496 3.584 51.712-3.584 51.712-10.24 41.984-15.36 28.16-18.944 10.24q-9.216 0-17.92-10.24t-15.36-28.16-10.752-41.984-4.096-51.712 4.096-51.712 10.752-42.496 15.36-28.672 17.92-10.24zM512-31.744000000000028q53.248 0 99.84 13.312t81.408 35.84 54.784 52.736 19.968 65.024q0 33.792-19.968 64t-54.784 52.736-81.408 35.84-99.84 13.312-99.84-13.312-81.408-35.84-54.784-52.736-19.968-64q0-34.816 19.968-65.024t54.784-52.736 81.408-35.84 99.84-13.312zM818.176 268.288q10.24 0 18.944 10.24t15.36 28.672 10.24 42.496 3.584 51.712-3.584 51.712-10.24 41.984-15.36 28.16-18.944 10.24q-9.216 0-17.92-10.24t-15.36-28.16-10.752-41.984-4.096-51.712 4.096-51.712 10.752-42.496 15.36-28.672 17.92-10.24zM512 235.51999999999998q39.936 0 68.096-9.728t28.16-24.064-28.16-24.064-68.096-9.728-68.096 9.728-28.16 24.064 28.16 24.064 68.096 9.728z" horiz-adv-x="1024" />
<glyph glyph-name="resize-vertical" unicode="&#59331;" d="M512 896C229.248 896 0 666.752 0 384s229.248-512 512-512 512 229.248 512 512S794.752 896 512 896zM576 192l64 0-128-128-128 128 64 0L448 576l-64 0 128 128 128-128-64 0L576 192z" horiz-adv-x="1024" />
<glyph glyph-name="chuizhifanzhuan" unicode="&#58977;" d="M286.01856 645.08416l472.4224 0 0-146.2784-472.4224 0 0 146.2784ZM87.19872 420.37248l885.80096 0 0-70.87104-885.80096 0 0 70.87104ZM773.55008 268.05248l0-31.0016L270.6688 237.05088l0 31.0016L773.55008 268.05248zM773.55008 121.4208l0-31.0016L270.6688 90.4192l0 31.0016L773.55008 121.4208zM742.54848 240.75776l31.0016 0 0-123.04896-31.0016 0L742.54848 240.75776zM270.70464 240.57856l31.0016 0 0-123.04896-31.0016 0L270.70464 240.57856z" horiz-adv-x="1024" />
<glyph glyph-name="shuipingfanzhuan" unicode="&#58978;" d="M252.76928 596.096l146.2784 0 0-472.42752-146.2784 0 0 472.42752ZM477.48096 810.65472l70.87104 0 0-885.80608-70.87104 0 0 885.80608ZM629.80096 611.2l31.0016 0 0-502.88128-31.0016 0L629.80096 611.2zM776.42752 611.2l31.0016 0 0-502.88128-31.0016 0L776.42752 611.2zM657.09056 580.1984l0 31.0016 123.04896 0 0-31.0016L657.09056 580.1984zM657.27488 108.35456l0 31.0016 123.04896 0 0-31.0016L657.27488 108.35456z" horiz-adv-x="1024" />
<glyph glyph-name="qq" unicode="&#58889;" d="M147.372058 491.394284c-5.28997-13.909921 2.431986-22.698872 0-75.732573-0.682996-14.25092-62.165649-78.762555-86.569511-145.791177-24.192863-66.517625-27.519845-135.978232 9.811944-163.285078 37.419789-27.305846 72.191593 90.879487 76.757567 73.685584 1.961989-7.509958 4.436975-15.317914 7.423958-23.338868a331.945126 331.945126 0 0 1 61.140655-101.162429c5.929967-6.783962-36.009797-19.199892-61.140655-61.99365-25.173858-42.751759 7.209959-120.49032 132.223254-120.49032 161.27909 0 197.288886 56.70368 200.574868 56.447681 12.031932-0.895995 12.841928 0 25.599855 0 15.572912 0 9.129948-1.279993 23.593867 0 7.807956 0.682996 86.186514-67.839617 194.686901-56.447681 184.873956 19.45589 156.586116 81.40754 142.079198 120.48932-15.103915 40.83277-68.692612 59.946662-66.303626 62.549647 44.28775 48.938724 51.285711 79.018554 66.346626 123.9463 6.143965 18.473896 49.066723-101.674426 82.089537-73.685584 13.781922 11.690934 41.301767 60.24566 13.781922 163.285078-27.519845 102.996419-80.767544 126.505286-79.615551 145.791177 2.389987 40.191773 1.023994 68.436614-1.023994 75.732573-9.812945 35.4128-30.378829 27.604844-30.378829 35.4128C858.450044 730.752933 705.10691 896 515.966978 896s-342.398067-165.289067-342.398068-369.192916c0-16.169909-14.378919-4.223976-26.154852-35.4128z" horiz-adv-x="1024" />
<glyph glyph-name="frown" unicode="&#59262;" d="M336 475m-48 0a48 48 0 1 1 96 0 48 48 0 1 1-96 0ZM688 475m-48 0a48 48 0 1 1 96 0 48 48 0 1 1-96 0ZM512 832C264.6 832 64 631.4 64 384s200.6-448 448-448 448 200.6 448 448S759.4 832 512 832z m263-711c-34.2-34.2-74-61-118.3-79.8C611 21.8 562.3 12 512 12c-50.3 0-99 9.8-144.8 29.2-44.3 18.7-84.1 45.6-118.3 79.8-34.2 34.2-61 74-79.8 118.3C149.8 285 140 333.7 140 384s9.8 99 29.2 144.8c18.7 44.3 45.6 84.1 79.8 118.3 34.2 34.2 74 61 118.3 79.8C413 746.2 461.7 756 512 756c50.3 0 99-9.8 144.8-29.2 44.3-18.7 84.1-45.6 118.3-79.8 34.2-34.2 61-74 79.8-118.3C874.2 483 884 434.3 884 384s-9.8-99-29.2-144.8c-18.7-44.3-45.6-84.1-79.8-118.2zM512 363c-85.5 0-155.6-67.3-160-151.6-0.2-4.6 3.4-8.4 8-8.4h48.1c4.2 0 7.8 3.2 8.1 7.4C420 259.9 461.5 299 512 299s92.1-39.1 95.8-88.6c0.3-4.2 3.9-7.4 8.1-7.4H664c4.6 0 8.2 3.8 8 8.4-4.4 84.3-74.5 151.6-160 151.6z" horiz-adv-x="1024" />
<glyph glyph-name="meh" unicode="&#59264;" d="M336 475m-48 0a48 48 0 1 1 96 0 48 48 0 1 1-96 0ZM688 475m-48 0a48 48 0 1 1 96 0 48 48 0 1 1-96 0ZM512 832C264.6 832 64 631.4 64 384s200.6-448 448-448 448 200.6 448 448S759.4 832 512 832z m263-711c-34.2-34.2-74-61-118.3-79.8C611 21.8 562.3 12 512 12c-50.3 0-99 9.8-144.8 29.2-44.3 18.7-84.1 45.6-118.3 79.8-34.2 34.2-61 74-79.8 118.3C149.8 285 140 333.7 140 384s9.8 99 29.2 144.8c18.7 44.3 45.6 84.1 79.8 118.3 34.2 34.2 74 61 118.3 79.8C413 746.2 461.7 756 512 756c50.3 0 99-9.8 144.8-29.2 44.3-18.7 84.1-45.6 118.3-79.8 34.2-34.2 61-74 79.8-118.3C874.2 483 884 434.3 884 384s-9.8-99-29.2-144.8c-18.7-44.3-45.6-84.1-79.8-118.2zM664 331H360c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h304c4.4 0 8 3.6 8 8v48c0 4.4-3.6 8-8 8z" horiz-adv-x="1024" />
<glyph glyph-name="smile" unicode="&#59267;" d="M336 475m-48 0a48 48 0 1 1 96 0 48 48 0 1 1-96 0ZM688 475m-48 0a48 48 0 1 1 96 0 48 48 0 1 1-96 0ZM512 832C264.6 832 64 631.4 64 384s200.6-448 448-448 448 200.6 448 448S759.4 832 512 832z m263-711c-34.2-34.2-74-61-118.3-79.8C611 21.8 562.3 12 512 12c-50.3 0-99 9.8-144.8 29.2-44.3 18.7-84.1 45.6-118.3 79.8-34.2 34.2-61 74-79.8 118.3C149.8 285 140 333.7 140 384s9.8 99 29.2 144.8c18.7 44.3 45.6 84.1 79.8 118.3 34.2 34.2 74 61 118.3 79.8C413 746.2 461.7 756 512 756c50.3 0 99-9.8 144.8-29.2 44.3-18.7 84.1-45.6 118.3-79.8 34.2-34.2 61-74 79.8-118.3C874.2 483 884 434.3 884 384s-9.8-99-29.2-144.8c-18.7-44.3-45.6-84.1-79.8-118.2zM664 363h-48.1c-4.2 0-7.8-3.2-8.1-7.4C604 306.1 562.5 267 512 267s-92.1 39.1-95.8 88.6c-0.3 4.2-3.9 7.4-8.1 7.4H360c-4.6 0-8.2-3.8-8-8.4 4.4-84.3 74.5-151.6 160-151.6s155.6 67.3 160 151.6c0.2 4.6-3.4 8.4-8 8.4z" horiz-adv-x="1024" />
<glyph glyph-name="man" unicode="&#59362;" d="M874 776H622c-3.3 0-6-2.7-6-6v-56c0-3.3 2.7-6 6-6h160.4L583.1 508.7c-50 38.5-111 59.3-175.1 59.3-76.9 0-149.3-30-203.6-84.4S120 356.9 120 280s30-149.3 84.4-203.6C258.7 22 331.1-8 408-8s149.3 30 203.6 84.4C666 130.7 696 203.1 696 280c0 64.1-20.8 124.9-59.2 174.9L836 654.1V494c0-3.3 2.7-6 6-6h56c3.3 0 6 2.7 6 6V746c0 16.5-13.5 30-30 30zM408 68c-116.9 0-212 95.1-212 212s95.1 212 212 212 212-95.1 212-212-95.1-212-212-212z" horiz-adv-x="1024" />
<glyph glyph-name="woman" unicode="&#59365;" d="M909.7 739.4l-42.2 42.2c-3.1 3.1-8.2 3.1-11.3 0L764 689.4l-84.2 84.2c-3.1 3.1-8.2 3.1-11.3 0l-42.1-42.1c-3.1-3.1-3.1-8.1 0-11.3l84.2-84.2-135.5-135.3c-50 38.5-111 59.3-175.1 59.3-76.9 0-149.3-30-203.6-84.4S112 348.9 112 272s30-149.3 84.4-203.6C250.7 14 323.1-16 400-16s149.3 30 203.6 84.4C658 122.7 688 195.1 688 272c0 64.2-20.9 125.1-59.3 175.1l135.4 135.4 84.2-84.2c3.1-3.1 8.2-3.1 11.3 0l42.1 42.1c3.1 3.1 3.1 8.1 0 11.3l-84.2 84.2 92.2 92.2c3.1 3.1 3.1 8.2 0 11.3zM400 60c-116.9 0-212 95.1-212 212s95.1 212 212 212 212-95.1 212-212-95.1-212-212-212z" horiz-adv-x="1024" />
</font>
</defs></svg>
This source diff could not be displayed because it is too large. You can view the blob instead.
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/ccc.png><title></title><link href=/css/chunk-14b9857b.0dc416de.css rel=prefetch><link href=/css/chunk-181796ce.3a534050.css rel=prefetch><link href=/css/chunk-2c359864.0dc416de.css rel=prefetch><link href=/css/chunk-3385141a.0dc416de.css rel=prefetch><link href=/css/chunk-35539824.dce456a2.css rel=prefetch><link href=/css/chunk-387757f6.d8ccc255.css rel=prefetch><link href=/css/chunk-5333ee4c.c315c3ce.css rel=prefetch><link href=/css/chunk-7bf33228.e4a5d5d6.css rel=prefetch><link href=/css/chunk-c398284c.8797b2b5.css rel=prefetch><link href=/js/chunk-14b9857b.e06dda10.js rel=prefetch><link href=/js/chunk-181796ce.4b0df82b.js rel=prefetch><link href=/js/chunk-2c359864.9d8434e5.js rel=prefetch><link href=/js/chunk-2d0cf4f6.9c0adc06.js rel=prefetch><link href=/js/chunk-2dc328be.3afa5d77.js rel=prefetch><link href=/js/chunk-3385141a.08e9c836.js rel=prefetch><link href=/js/chunk-35539824.a08559bf.js rel=prefetch><link href=/js/chunk-387757f6.7f75df75.js rel=prefetch><link href=/js/chunk-506e0b77.a19da622.js rel=prefetch><link href=/js/chunk-5333ee4c.6a2cfd3b.js rel=prefetch><link href=/js/chunk-7211d8cd.2d4f1888.js rel=prefetch><link href=/js/chunk-7bf33228.fe059599.js rel=prefetch><link href=/js/chunk-c398284c.f608bebc.js rel=prefetch><link href=/css/app.ecfe1570.css rel=preload as=style><link href=/css/chunk-vendors.1d90d08d.css rel=preload as=style><link href=/js/app.7c722c3a.js rel=preload as=script><link href=/js/chunk-vendors.405adcc0.js rel=preload as=script><link href=/css/chunk-vendors.1d90d08d.css rel=stylesheet><link href=/css/app.ecfe1570.css rel=stylesheet></head><body><noscript><strong>We're sorry but iview-admin doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.405adcc0.js></script><script src=/js/app.7c722c3a.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-14b9857b"],{"0eb4":function(t,e,n){},3026:function(t,e,n){t.exports=n.p+"img/error-401.98bba5b1.svg"},9454:function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"error-page"},[n("div",{staticClass:"content-con"},[n("img",{attrs:{src:t.src,alt:t.code}}),n("div",{staticClass:"text-con"},[n("h4",[t._v(t._s(t.code))]),n("h5",[t._v(t._s(t.desc))])]),n("back-btn-group",{staticClass:"back-btn-group"})],1)])},c=[],o=(n("0eb4"),function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Button",{attrs:{size:"large",type:"text"},on:{click:t.backHome}},[t._v("返回首页")]),n("Button",{attrs:{size:"large",type:"text"},on:{click:t.backPrev}},[t._v("返回上一页("+t._s(t.second)+"s)")])],1)}),s=[],a=(n("a481"),{name:"backBtnGroup",data:function(){return{second:5,timer:null}},methods:{backHome:function(){this.$router.replace({name:this.$config.homeName})},backPrev:function(){this.$router.go(-1)}},mounted:function(){var t=this;this.timer=setInterval((function(){0===t.second?t.backPrev():t.second--}),1e3)},beforeDestroy:function(){clearInterval(this.timer)}}),i=a,u=n("2877"),l=Object(u["a"])(i,o,s,!1,null,null,null),b=l.exports,d={name:"error_content",components:{backBtnGroup:b},props:{code:String,desc:String,src:String}},f=d,p=Object(u["a"])(f,r,c,!1,null,null,null);e["a"]=p.exports},f94f:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("error-content",{attrs:{code:"401",desc:"Oh~~您没有浏览这个页面的权限~",src:t.src}})},c=[],o=n("3026"),s=n.n(o),a=n("9454"),i={name:"error_401",components:{errorContent:a["a"]},data:function(){return{src:s.a}}},u=i,l=n("2877"),b=Object(l["a"])(u,r,c,!1,null,null,null);e["default"]=b.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2c359864"],{"0eb4":function(t,e,n){},4740:function(t,e,n){t.exports=n.p+"img/error-500.a371eabc.svg"},"88b2":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("error-content",{attrs:{code:"500",desc:"Oh~~鬼知道服务器经历了什么~",src:t.src}})},c=[],o=n("4740"),s=n.n(o),a=n("9454"),i={name:"error_500",components:{errorContent:a["a"]},data:function(){return{src:s.a}}},u=i,l=n("2877"),d=Object(l["a"])(u,r,c,!1,null,null,null);e["default"]=d.exports},9454:function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"error-page"},[n("div",{staticClass:"content-con"},[n("img",{attrs:{src:t.src,alt:t.code}}),n("div",{staticClass:"text-con"},[n("h4",[t._v(t._s(t.code))]),n("h5",[t._v(t._s(t.desc))])]),n("back-btn-group",{staticClass:"back-btn-group"})],1)])},c=[],o=(n("0eb4"),function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Button",{attrs:{size:"large",type:"text"},on:{click:t.backHome}},[t._v("返回首页")]),n("Button",{attrs:{size:"large",type:"text"},on:{click:t.backPrev}},[t._v("返回上一页("+t._s(t.second)+"s)")])],1)}),s=[],a=(n("a481"),{name:"backBtnGroup",data:function(){return{second:5,timer:null}},methods:{backHome:function(){this.$router.replace({name:this.$config.homeName})},backPrev:function(){this.$router.go(-1)}},mounted:function(){var t=this;this.timer=setInterval((function(){0===t.second?t.backPrev():t.second--}),1e3)},beforeDestroy:function(){clearInterval(this.timer)}}),i=a,u=n("2877"),l=Object(u["a"])(i,o,s,!1,null,null,null),d=l.exports,p={name:"error_content",components:{backBtnGroup:d},props:{code:String,desc:String,src:String}},b=p,f=Object(u["a"])(b,r,c,!1,null,null,null);e["a"]=f.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0cf4f6"],{"62bf":function(e,t,s){"use strict";s.r(t);var r=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("CaseForm",{key:this.$route.query.bizId,ref:"caseinfo",attrs:{fminfo:e.metaInfo,noExpandAuth:""},scopedSlots:e._u([{key:"default",fn:function(t){return[s("Button",{on:{click:e.subcaseclick}},[e._v("提交")])]}}])})],1)},a=[],n=(s("28a5"),s("0086")),o=s("db7f"),i=s("7e1e"),l={name:"creatScheme",data:function(){return{metaInfos:{ICP:{name:"ICP许可证申请方案",main:[{title:"方案信息",key:"baseinfo",cols:1,ctls:[{type:"label",label:"服务类型",prop:"business_type_name",style:"width: 60%; transform: translateX(10px)",disabled:!1,rules:[]},{type:"input",prop:"company_name",label:"公司名称",placeHolder:"请输入企业名称",style:"width: 60%; ",disabled:!1,rules:[{required:!0,message:"请输入企业名称",trigger:"blur"}]},{type:"adds-select",label:"申请区域",isMulti:!1,prop:"address",style:"width: 60%;",productName:"icp",rules:[{required:!0,message:"请选择申请区域",trigger:"blur"}]},{type:"switch",label:"年报服务",prop:"annual_report",opentext:"是",closetext:"否",style:"",rules:[],remark:"注:该服务包含一个ICP许可证有效期限内(5年)年报服务。"},{type:"textarea",label:"方案备注",prop:"remark",placeHolder:"请输入该方案备注",style:"width: 60%; transform: translateX(10px)",disabled:!1,rules:[]}]}],lists:[]},EDI:{name:"EDI许可证申请方案",main:[{title:"方案信息",key:"baseinfo",cols:1,ctls:[{type:"label",label:"服务类型",prop:"business_type_name",style:"width: 60%; transform: translateX(10px)",disabled:!1,rules:[{required:!0,message:" ",trigger:"blur"}]},{type:"input",prop:"company_name",label:"公司名称",placeHolder:"请输入企业名称",style:"width: 60%; ",disabled:!1,rules:[{required:!0,message:" ",trigger:"blur"}]},{type:"adds-select",label:"申请区域",isMulti:!1,prop:"address",productName:"edi",style:"width: 60%;",rules:[{required:!0,message:"请选择申请区域",trigger:"blur"}]},{type:"switch",label:"年报服务",prop:"annual_report",opentext:"是",closetext:"否",style:"",rules:[],remark:"注:该服务包含一个EDI许可证有效期限内(5年)年报服务。"},{type:"textarea",label:"方案备注",prop:"remark",placeHolder:"请输入该方案其他备注",style:"width: 60%; transform: translateX(10px)",disabled:!1,rules:[]}]}],lists:[]}},bizType:this.$route.query.type}},components:{CaseForm:n["a"]},mounted:function(){this.initDataSource()},computed:{metaInfo:function(){return this.metaInfos[this.bizType]}},watch:{$route:function(e,t){this.initDataSource()}},methods:{initDataSource:function(){var e=this;this.bizType=this.$route.query.type,this.$nextTick((function(){e.$refs.caseinfo.formModel.business_type_name=o["a"]["business_type"][e.bizType],"update"===e.$route.query.operation&&Object(i["p"])({bizopt_id:e.$route.query.bizId}).then((function(t){var s=t.data;0===s.status?(s=s.data,e.$refs.caseinfo.formModel.company_name=s.scheme_info.company,e.$refs.caseinfo.formModel.address="".concat(s.scheme_info.addressCode,"-").concat(s.scheme_info.address),e.$refs.caseinfo.formModel.annual_report=s.scheme_info.annual_report,e.$refs.caseinfo.formModel.remark=s.remark_info):(console.log(s),e.$Message.error("获取数据错误"))}))}))},subcaseclick:function(){var e=this;this.$refs.caseinfo.validate((function(t){if(t){var s=e.$refs.caseinfo.formModel;s={scheme_info:{address:s.address.split("-")[1],addressCode:s.address.split("-")[0],company:s.company_name,annual_report:s.annual_report},remark_info:s.remark,bizopt_id:e.$route.query.bizId},Object(i["g"])(s).then((function(t){var s=t.data;0===s.status?(e.$Message.success("当前操作已完成"),e.$router.push({name:"wailtingDispose"})):e.$Message.error(s.msg)}))}}))}}},u=l,p=s("2877"),d=Object(p["a"])(u,r,a,!1,null,null,null);t["default"]=d.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2dc328be"],{"391e":function(e,t,a){"use strict";var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:"framediv"}},[e._t("default",null,{adjustHeight:e.frameHeight})],2)},r=[],i=a("6db5"),o=i["a"],u=a("2877"),s=Object(u["a"])(o,n,r,!1,null,null,null);t["a"]=s.exports},"446f":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var n=t.adjustHeight;return[a("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,metaName:"delivery_info",packageName:"delivery",modelName:"deliver",tblheight:n-120,refvalidatemethod:e.validmethod,savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onexec:e.onexec}})]}}])})},r=[],i=(a("96cf"),a("3b8d")),o=a("06d3"),u=a("391e"),s=a("db7f"),c=a("7e1e"),d={name:"deliveryList",watch:{$route:function(e,t){this.$refs.bt.fetchData()}},data:function(){return{}},components:{BizTable:o["a"],PageSpace:u["a"]},methods:{beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,a){return a(t)},onexec:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(t,a){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:e.t0=t,e.next="info"===e.t0?3:13;break;case 3:return e.prev=3,e.next=6,Object(c["v"])({id:a.id});case 6:this.$router.push({name:"delivery_info",query:{id:a.id}}),e.next=12;break;case 9:e.prev=9,e.t1=e["catch"](3),this.$Message.error(e.t1.message);case 12:return e.abrupt("break",13);case 13:case"end":return e.stop()}}),e,this,[[3,9]])})));function t(t,a){return e.apply(this,arguments)}return t}(),validmethod:function(e,t,a){return a()},formatCol:function(e,t,a){return"delivery_status"===t?s["a"]["delivery_status"][e.delivery_status]:"product_code"===t?s["a"]["business_type"][e.product_code]:void 0}}},f=d,l=a("2877"),h=Object(l["a"])(f,n,r,!1,null,null,null);t["default"]=h.exports},"6db5":function(e,t,a){"use strict";(function(e){a("c5f6");t["a"]={name:"pagespace_page",prop:{tweak:Number},data:function(){return{frameHeight:0,advalue:this.tweak?this.tweak:0}},components:{},mounted:function(){var t=this;this.setHeight(),e(window).resize((function(){t.setHeight()}))},methods:{setHeight:function(){var t=this;this.$nextTick((function(){var a=e("#framediv"),n=a.get()[0]||0,r=window.innerHeight-n.offsetTop-t.advalue;t.frameHeight=r,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,a("a336"))}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3385141a"],{"0eb4":function(t,e,n){},"35f5":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("error-content",{attrs:{code:"404",desc:"Oh~~您的页面好像飞走了~",src:t.src}})},c=[],o=n("c436"),s=n.n(o),a=n("9454"),i={name:"error_404",components:{errorContent:a["a"]},data:function(){return{src:s.a}}},u=i,l=n("2877"),d=Object(l["a"])(u,r,c,!1,null,null,null);e["default"]=d.exports},9454:function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"error-page"},[n("div",{staticClass:"content-con"},[n("img",{attrs:{src:t.src,alt:t.code}}),n("div",{staticClass:"text-con"},[n("h4",[t._v(t._s(t.code))]),n("h5",[t._v(t._s(t.desc))])]),n("back-btn-group",{staticClass:"back-btn-group"})],1)])},c=[],o=(n("0eb4"),function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Button",{attrs:{size:"large",type:"text"},on:{click:t.backHome}},[t._v("返回首页")]),n("Button",{attrs:{size:"large",type:"text"},on:{click:t.backPrev}},[t._v("返回上一页("+t._s(t.second)+"s)")])],1)}),s=[],a=(n("a481"),{name:"backBtnGroup",data:function(){return{second:5,timer:null}},methods:{backHome:function(){this.$router.replace({name:this.$config.homeName})},backPrev:function(){this.$router.go(-1)}},mounted:function(){var t=this;this.timer=setInterval((function(){0===t.second?t.backPrev():t.second--}),1e3)},beforeDestroy:function(){clearInterval(this.timer)}}),i=a,u=n("2877"),l=Object(u["a"])(i,o,s,!1,null,null,null),d=l.exports,f={name:"error_content",components:{backBtnGroup:d},props:{code:String,desc:String,src:String}},p=f,m=Object(u["a"])(p,r,c,!1,null,null,null);e["a"]=m.exports},c436:function(t,e,n){t.exports=n.p+"img/error-404.94756dcf.svg"}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-35539824"],{"1f02":function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("PageSpace",{key:this.$route.query.id},[a("div",{staticClass:"button"},[a("Button",{directives:[{name:"show",rawName:"v-show",value:e.closeShow,expression:"closeShow"}],on:{click:function(t){e.showModel=!0}}},[e._v("关闭商机")]),a("Button",{directives:[{name:"show",rawName:"v-show",value:e.createShow,expression:"createShow"}],attrs:{type:"primary"},on:{click:e.doCreate}},[e._v("新建方案")]),a("Button",{directives:[{name:"show",rawName:"v-show",value:e.updateShow,expression:"updateShow"}],attrs:{type:"primary"},on:{click:e.doUpdate}},[e._v("修改方案")])],1),a("FormAccount",{ref:"bizchanceInfo",attrs:{fminfo:e.form[this.$route.query.type].formInfo,noExpandAuth:""}}),a("FormAccount",{directives:[{name:"show",rawName:"v-show",value:e.showScheme,expression:"showScheme"}],ref:"schemeInfo",attrs:{fminfo:e.form[e.type].schemeInfo,noExpandAuth:""}})],1),a("div",[a("Modal",{attrs:{title:"关闭商机",width:"500",loading:e.loading},on:{"on-ok":e.ok,"on-cancel":e.cancel},model:{value:e.showModel,callback:function(t){e.showModel=t},expression:"showModel"}},[a("Divider",{staticStyle:{height:"20px",width:"3px","background-color":"blue"},attrs:{type:"vertical"}}),e._v("关闭原因\n "),a("Form",{ref:"formItem",attrs:{model:e.formItem,"label-width":70,rules:e.ruleValidate,"class-name":"vertical-center-modal"}},[a("FormItem",{attrs:{label:"商机编号"}},[a("span",[e._v(e._s(e.formItem.demand_code))])]),a("FormItem",{attrs:{label:"关闭理由",prop:"close_reason"}},[a("Input",{attrs:{type:"textarea",autosize:{minRows:2,maxRows:5},placeholder:"请输入关闭理由"},model:{value:e.formItem.close_reason,callback:function(t){e.$set(e.formItem,"close_reason",t)},expression:"formItem.close_reason"}})],1)],1)],1)],1)],1)},o=[],n=(a("96cf"),a("3b8d")),r=a("0086"),l=a("7e1e"),i=a("db7f"),c=a("391e"),u={name:"wailtingDispose",components:{FormAccount:r["a"],PageSpace:c["a"]},data:function(){return{form:{ICP:{formInfo:{name:"ICP商机详情",main:[{title:"基本信息",key:"baseinfo",ctls:[{type:"label",label:"创建时间",prop:"created_at",style:"",disabled:!0},{type:"label",label:"商机状态",prop:"business_status",style:""},{type:"label",label:"商机编号",prop:"demand_code",style:""},{type:"label",label:"商机类型",prop:"business_type",style:""},{type:"label",label:"公司名称",prop:"company_name",style:""},{type:"label",label:"公司区域",prop:"service_address",style:""},{type:"label",label:"联系人姓名",prop:"customer_name",style:""},{type:"label",label:"联系电话",prop:"customer_number",style:""},{type:"label",label:"商机内容",prop:"content",style:""},{type:"label",label:"关闭原因",prop:"close_reason",style:""}]}]},schemeInfo:{name:"方案详情",main:[{title:"基本信息",key:"baseinfo",ctls:[{type:"label",label:"创建时间",prop:"created_at",style:""},{type:"label",label:"服务类型",prop:"business_type",style:""},{type:"label",label:"年报服务",prop:"annual_report",style:""},{type:"label",label:"申请区域",prop:"address",style:""},{type:"label",label:"公司名称",prop:"company_name",style:""},{type:"label",label:"备注",prop:"remark_info",style:""},{type:"label",label:"退回原因",prop:"reject_reason",style:""}]}]}},EDI:{formInfo:{name:"EDI商机详情",main:[{title:"基本信息",key:"baseinfo",ctls:[{type:"label",label:"创建时间",prop:"created_at",style:"",disabled:!0},{type:"label",label:"商机状态",prop:"business_status",style:""},{type:"label",label:"商机编号",prop:"demand_code",style:""},{type:"label",label:"商机类型",prop:"business_type",style:""},{type:"label",label:"公司名称",prop:"company_name",style:""},{type:"label",label:"公司区域",prop:"service_address",style:""},{type:"label",label:"联系人姓名",prop:"customer_name",style:""},{type:"label",label:"联系电话",prop:"customer_number",style:""},{type:"label",label:"商机内容",prop:"content",style:""},{type:"label",label:"关闭原因",prop:"close_reason",style:""}]}]},schemeInfo:{name:"方案详情",main:[{title:"基本信息",key:"baseinfo",ctls:[{type:"label",label:"创建时间",prop:"created_at",style:""},{type:"label",label:"服务类型",prop:"business_type",style:""},{type:"label",label:"年报服务",prop:"annual_report",style:""},{type:"label",label:"申请区域",prop:"address",style:""},{type:"label",label:"公司名称",prop:"company_name",style:""},{type:"label",label:"备注",prop:"remark_info",style:""},{type:"label",label:"退回原因",prop:"reject_reason",style:""}]}]}}},bizchanceData:null,showScheme:!0,type:this.$route.query.type,closeShow:!1,createShow:!1,updateShow:!1,bizStatus:"",schemeStatus:"",showModel:!1,formItem:{demand_code:"",close_reason:""},ruleValidate:{close_reason:[{required:!0,message:"关闭理由不能为空",trigger:"blur"}]},loading:!0,key:"".concat(this.$route.query.type,"_").concat(this.$route.query.id)}},watch:{$route:function(e,t){this.initDataSource(e.query.id)}},methods:{initDataSource:function(e){var t=this;this.key="".concat(this.$route.query.type,"_").concat(this.$route.query.id),Object(l["k"])({id:e}).then((function(e){var a=e.data;0===a.status?(a=a.data,t.bizchanceData=a,t.type=a.bussinessData.business_type,a.bussinessData.business_type=i["a"].business_type[a.bussinessData.business_type],t.bizStatus=a.bussinessData.business_status,a.bussinessData.business_status=i["a"].business_status[a.bussinessData.business_status],a.bussinessData.annual_report=a.bussinessData.annual_report?"有":"无",t.formItem.demand_code=a.bussinessData.demand_code,t.$nextTick((function(){t.$refs.bizchanceInfo.formModel=a.bussinessData,a.schemeData?(t.showScheme=!0,a.schemeData.business_type=a.bussinessData.business_type,a.schemeData.annual_report=a.schemeData.annual_report?"有":"无",t.schemeStatus=a.schemeData.scheme_status,t.$refs.schemeInfo.formModel=a.schemeData):(t.showScheme=!1,t.schemeStatus=null),t.showButton(t.bizStatus,t.schemeStatus)}))):t.$Message.error("获取数据错误")}))},beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,a){return a(t)},onexec:function(e,t){},validmethod:function(e,t,a){return a()},formatCol:function(e,t,a){return e[t]},doUpdate:function(){this.$router.push({name:"createdScheme",query:{bizId:this.$route.query.id,type:this.type,operation:"update"}})},doClose:function(){var e=Object(n["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(l["e"])({bizId:this.$route.query.id,close_reason:t});case 3:this.loading=!1,this.showModel=!1,this.$Message.success("当前操作已完成"),this.initDataSource(this.$route.query.id),e.next=14;break;case 9:e.prev=9,e.t0=e["catch"](0),this.loading=!1,this.showModel=!0,this.$Message.error(e.t0.message);case 14:case"end":return e.stop()}}),e,this,[[0,9]])})));function t(t){return e.apply(this,arguments)}return t}(),doCreate:function(){this.$router.push({name:"createdScheme",query:{bizId:this.$route.query.id,type:this.type,operation:"create"}})},showButton:function(e,t){switch(e){case"beforeSubmission":t&&"isReject"===t?(this.closeShow=!0,this.createShow=!1,this.updateShow=!0):(this.closeShow=!0,this.createShow=!0,this.updateShow=!1);break;case"beforeConfirmation":this.closeShow=!0,this.createShow=!1,this.updateShow=!1;break;case"isFinished":case"isClosed":this.closeShow=!1,this.createShow=!1,this.updateShow=!1;break}},ok:function(){var e=this;this.$refs["formItem"].validate(function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(a){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=5;break}return t.next=3,e.doClose(e.formItem.close_reason);case 3:t.next=7;break;case 5:e.loading=!1,e.showModel=!0;case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},cancel:function(){this.loading=!0,this.showModel=!1}},mounted:function(){this.initDataSource(this.$route.query.id)}},p=u,h=(a("40a0"),a("2877")),b=Object(h["a"])(p,s,o,!1,null,null,null);t["default"]=b.exports},"391e":function(e,t,a){"use strict";var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:"framediv"}},[e._t("default",null,{adjustHeight:e.frameHeight})],2)},o=[],n=a("6db5"),r=n["a"],l=a("2877"),i=Object(l["a"])(r,s,o,!1,null,null,null);t["a"]=i.exports},"40a0":function(e,t,a){"use strict";var s=a("8259"),o=a.n(s);o.a},"6db5":function(e,t,a){"use strict";(function(e){a("c5f6");t["a"]={name:"pagespace_page",prop:{tweak:Number},data:function(){return{frameHeight:0,advalue:this.tweak?this.tweak:0}},components:{},mounted:function(){var t=this;this.setHeight(),e(window).resize((function(){t.setHeight()}))},methods:{setHeight:function(){var t=this;this.$nextTick((function(){var a=e("#framediv"),s=a.get()[0]||0,o=window.innerHeight-s.offsetTop-t.advalue;t.frameHeight=o,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,a("a336"))},8259:function(e,t,a){}}]);
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-506e0b77"],{"391e":function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"framediv"}},[e._t("default",null,{adjustHeight:e.frameHeight})],2)},i=[],s=n("6db5"),r=s["a"],o=n("2877"),c=Object(o["a"])(r,a,i,!1,null,null,null);t["a"]=c.exports},"6db5":function(e,t,n){"use strict";(function(e){n("c5f6");t["a"]={name:"pagespace_page",prop:{tweak:Number},data:function(){return{frameHeight:0,advalue:this.tweak?this.tweak:0}},components:{},mounted:function(){var t=this;this.setHeight(),e(window).resize((function(){t.setHeight()}))},methods:{setHeight:function(){var t=this;this.$nextTick((function(){var n=e("#framediv"),a=n.get()[0]||0,i=window.innerHeight-a.offsetTop-t.advalue;t.frameHeight=i,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,n("a336"))},c18d:function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var a=t.adjustHeight;return[n("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,metaName:"bizchance_info",packageName:"bizchance",modelName:"bizopt",tblheight:a-120,refvalidatemethod:e.validmethod,savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onexec:e.onexec,oninitbtn:e.oninitbtn}})]}}])})},i=[],s=n("06d3"),r=n("391e"),o=n("db7f"),c={name:"businessList",data:function(){return{}},components:{BizTable:s["a"],PageSpace:r["a"]},watch:{$route:function(e,t){this.$refs.bt.fetchData()}},methods:{beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,n){return n(t)},onexec:function(e,t){switch(e){case"info":this.$router.push({name:"bizchanceinfo",query:{id:t.id,type:t.business_type}});break;case"created_scheme":this.$router.push({name:"createdScheme",query:{bizId:t.id,type:t.business_type}});break}},validmethod:function(e,t,n){return n()},formatCol:function(e,t,n){var a=e[t];return o["a"][t]&&o["a"][t][e[t]]&&(a=o["a"][t][e[t]]),a},oninitbtn:function(e,t){switch(t.business_status){case"beforeSubmission":"created_scheme"===e.key&&("isReject"===t.schemeStatus?e.ishide=!0:e.ishide=!1);break;case"beforeConfirmation":case"isFinished":case"isClosed":"created_scheme"===e.key&&(e.ishide=!0);break}}}},u=c,f=n("2877"),d=Object(f["a"])(u,a,i,!1,null,null,null);t["default"]=d.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7211d8cd"],{"391e":function(e,t,a){"use strict";var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:"framediv"}},[e._t("default",null,{adjustHeight:e.frameHeight})],2)},r=[],i=a("6db5"),o=i["a"],u=a("2877"),s=Object(u["a"])(o,n,r,!1,null,null,null);t["a"]=s.exports},"6db5":function(e,t,a){"use strict";(function(e){a("c5f6");t["a"]={name:"pagespace_page",prop:{tweak:Number},data:function(){return{frameHeight:0,advalue:this.tweak?this.tweak:0}},components:{},mounted:function(){var t=this;this.setHeight(),e(window).resize((function(){t.setHeight()}))},methods:{setHeight:function(){var t=this;this.$nextTick((function(){var a=e("#framediv"),n=a.get()[0]||0,r=window.innerHeight-n.offsetTop-t.advalue;t.frameHeight=r,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,a("a336"))},"88e5":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var n=t.adjustHeight;return[a("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,metaName:"annualReport_info",packageName:"delivery",modelName:"deliver",tblheight:n-120,refvalidatemethod:e.validmethod,savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onexec:e.onexec}})]}}])})},r=[],i=a("06d3"),o=a("391e"),u=a("db7f"),s={name:"deliveryList",watch:{$route:function(e,t){this.$refs.bt.fetchData()}},data:function(){return{}},components:{BizTable:i["a"],PageSpace:o["a"]},methods:{beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,a){return a(t)},onexec:function(e,t){switch(e){case"info":this.$router.push({name:"annualReportInfo",query:{id:t.id}});break}},validmethod:function(e,t,a){return a()},formatCol:function(e,t,a){return"delivery_status"===t?u["a"]["annualreport_status"][e.delivery_status]:"product_code"===t?u["a"]["annualreport_type"][e.product_code]:void 0}}},c=s,d=a("2877"),f=Object(d["a"])(c,n,r,!1,null,null,null);t["default"]=f.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7bf33228"],{1663:function(t,e,a){"use strict";var s=a("c612"),n=a.n(s);n.a},"391e":function(t,e,a){"use strict";var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:"framediv"}},[t._t("default",null,{adjustHeight:t.frameHeight})],2)},n=[],i=a("6db5"),r=i["a"],o=a("2877"),u=Object(o["a"])(r,s,n,!1,null,null,null);e["a"]=u.exports},"6db5":function(t,e,a){"use strict";(function(t){a("c5f6");e["a"]={name:"pagespace_page",prop:{tweak:Number},data:function(){return{frameHeight:0,advalue:this.tweak?this.tweak:0}},components:{},mounted:function(){var e=this;this.setHeight(),t(window).resize((function(){e.setHeight()}))},methods:{setHeight:function(){var e=this;this.$nextTick((function(){var a=t("#framediv"),s=a.get()[0]||0,n=window.innerHeight-s.offsetTop-e.advalue;e.frameHeight=n,e.$emit("sizechange",e.frameHeight)}))}}}}).call(this,a("a336"))},c612:function(t,e,a){},ccb2:function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("PageSpace",[a("div",{staticClass:"info"},[a("h3",[t._v("营业执照")]),a("Form",{attrs:{model:t.businessLicense,"label-position":"left","label-width":180}},[a("Row",[a("Col",{attrs:{span:"12"}},[a("FormItem",{attrs:{label:"公司名称"}},[a("span",[t._v(t._s(t.businessLicense.name))])])],1),a("Col",{attrs:{span:"12"}},[a("FormItem",{attrs:{label:"住所"}},[a("span",[t._v(t._s(t.businessLicense.address))])])],1)],1),a("Row",[a("Col",{attrs:{span:"12"}},[a("FormItem",{attrs:{label:"成立时间"}},[a("span",[t._v(t._s(t.buildDate(t.businessLicense.createdAt)))])])],1),a("Col",{attrs:{span:"12"}},[a("FormItem",{attrs:{label:"公司类型"}},[a("span",[t._v(t._s(t.businessLicense.type))])])],1)],1),a("Row",[a("Col",{attrs:{span:"12"}},[a("FormItem",{attrs:{label:"注册资本"}},[a("span",[t._v(t._s(t.businessLicense.registeredCapital))])])],1),a("Col",{attrs:{span:"12"}},[a("FormItem",{attrs:{label:"营业期限"}},[a("span",[t._v(t._s(t.businessLicense.businessTerm))])])],1)],1),a("Row",[a("Col",{attrs:{span:"12"}},[a("FormItem",{attrs:{label:"企业统一社会信通代码"}},[a("span",[t._v(t._s(t.businessLicense.enterpriseCode))])])],1),a("Col",{attrs:{span:"12"}},[a("FormItem",{attrs:{label:"法定代表人"}},[a("span",[t._v(t._s(t.businessLicense.legalRepresentative))])])],1)],1),a("Row",[a("Col",{attrs:{span:"12"}},[a("FormItem",{attrs:{label:"经营范围"}},[a("span",[t._v(t._s(t.businessLicense.scopeBusiness))])])],1)],1)],1)],1),a("div",{staticClass:"info"},[a("h3",[t._v("资质信息")]),a("Form",{attrs:{model:t.qualificationData,"label-position":"left","label-width":180}},[a("Row",[a("Col",{attrs:{span:"12"}},[a("FormItem",{attrs:{label:"证书编号"}},[a("span",[t._v(t._s(t.qualificationData.certificateNumber))])])],1),a("Col",{attrs:{span:"12"}},[a("FormItem",{attrs:{label:"业务种类"}},[a("span",[t._v(t._s(t.qualificationData.businessTypes))])])],1)],1),a("Row",[a("Col",{attrs:{span:"12"}},[a("FormItem",{attrs:{label:"证书文件"}},[a("ShowFile",{attrs:{url:t.qualificationData.file&&t.qualificationData.file.url,name:t.qualificationData.file&&t.qualificationData.file.name}})],1)],1),a("Col",{attrs:{span:"12"}},[a("FormItem",{attrs:{label:"服务项目"}},[a("span",[t._v(t._s(t.qualificationData.serviceProject))])])],1)],1),a("Row",[a("Col",{attrs:{span:"12"}},[a("FormItem",{attrs:{label:"发证日期"}},[a("span",[t._v(t._s(t.buildDate(t.qualificationData.startAt)))])])],1),a("Col",{attrs:{span:"12"}},[a("FormItem",{attrs:{label:"有效期至"}},[a("span",[t._v(t._s(t.buildDate(t.qualificationData.endAt)))]),t._v("       \n "),a("span",{staticStyle:{"font-family":"PingFangSC-Regular, PingFang SC","font-weight":"400",color:"rgba(236, 148, 5, 1)","line-height":"17px"}},[t._v(t._s(t.expireTime))])])],1)],1),a("Row",[a("Col",{attrs:{span:"12"}},[a("FormItem",{attrs:{label:"业务覆盖范围"}},[a("span",[t._v(t._s(t.qualificationData.businessScope))])])],1)],1)],1)],1),a("div",{staticClass:"info"},[a("h3",[t._v("年报信息")]),a("Table",{attrs:{border:"",columns:t.annualReportColumns,data:t.annualReportInfo},scopedSlots:t._u([{key:"year",fn:function(e){var s=e.row;return[a("span",[t._v(t._s(s.year)+"年")])]}},{key:"status",fn:function(e){var s=e.row;return[a("span",[t._v(t._s(t.buildStatus(s.status)))])]}},{key:"time",fn:function(e){var s=e.row;return[a("span",{directives:[{name:"show",rawName:"v-show",value:"declaresuccess"===s.status,expression:"row.status ==='declaresuccess'"}]},[t._v(t._s(t.buildDate(s.updated_at,"YYYY-MM-DD HH:mm:ss")))])]}},{key:"operation",fn:function(e){var s=e.row,n=e.index;return[a("uploadImg",{attrs:{file:s.file,type:"again"},on:{change:function(e,a){t.doDeclare(e,a,n)}}})]}}])})],1)])},n=[],i=(a("96cf"),a("3b8d")),r=a("de52"),o=a.n(r),u=(a("f1c3"),a("391e")),c=a("db7f"),l=a("7e1e"),f={name:"annualReportInfo",watch:{$route:function(t,e){this.initData()}},components:{PageSpace:u["a"]},computed:{expireTime:function(){var t=this.buildDate(new Date),e=this.buildDate(new Date(this.qualificationData.endAt));t=o()(t,"YYYY-MM-DD"),e=o()(e,"YYYY-MM-DD");var a=e.diff(t,"days"),s="";if(a>0){s="剩余",a=o.a.preciseDiff(t,e,!0);var n=a,i=n.years,r=n.months,u=n.days;0!==i&&(s="".concat(s).concat(i,"年")),0!==r&&(s="".concat(s).concat(r,"个月")),0!==u&&(s="".concat(s).concat(u,"天"))}else s="已到期";return"(".concat(s,")")}},data:function(){return{businessLicense:{},qualificationData:{},annualReportColumns:[{title:"年份",slot:"year"},{title:"状态",slot:"status"},{title:"上传时间",slot:"time"},{title:"操作",slot:"operation"}],annualReportInfo:[]}},methods:{buildDate:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MM-DD";return o()(t).format(e)},buildStatus:function(t){return c["a"].annualreport_status[t]},doDeclare:function(){var t=Object(i["a"])(regeneratorRuntime.mark((function t(e,a,s){var n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:n=this.annualReportInfo[s],t.t0=e,t.next="add"===t.t0?4:15;break;case 4:return t.prev=4,t.next=7,Object(l["i"])({id:n.id,file:a});case 7:this.$Message.success("申报成功"),this.initData(),t.next=14;break;case 11:t.prev=11,t.t1=t["catch"](4),this.$Message.error(t.t1.message);case 14:return t.abrupt("break",15);case 15:case"end":return t.stop()}}),t,this,[[4,11]])})));function e(e,a,s){return t.apply(this,arguments)}return e}(),initData:function(){var t=Object(i["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(l["j"])({id:this.$route.query.id});case 3:e=t.sent,this.businessLicense=e.businessLicense,this.qualificationData=e.qualification,this.annualReportInfo=e.annualreports,t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](0),this.$Message.error(t.t0.message);case 12:case"end":return t.stop()}}),t,this,[[0,9]])})));function e(){return t.apply(this,arguments)}return e}()},created:function(){this.initData()}},p=f,m=(a("1663"),a("2877")),d=Object(m["a"])(p,s,n,!1,null,null,null);e["default"]=d.exports},f1c3:function(t,e,a){if("undefined"===typeof s)var s=a("de52");(function(t){var e={nodiff:"",year:"year",years:"years",month:"month",months:"months",day:"day",days:"days",hour:"hour",hours:"hours",minute:"minute",minutes:"minutes",second:"second",seconds:"seconds",delimiter:" "};function a(t,a){return t+" "+e[a+(1===t?"":"s")]}function s(t,s,n,i,r,o){var u=[];return t&&u.push(a(t,"year")),s&&u.push(a(s,"month")),n&&u.push(a(n,"day")),i&&u.push(a(i,"hour")),r&&u.push(a(r,"minute")),o&&u.push(a(o,"second")),u.join(e.delimiter)}function n(t,e,a,s,n,i,r){return{years:t,months:e,days:a,hours:s,minutes:n,seconds:i,firstDateWasLater:r}}t.fn.preciseDiff=function(e,a){return t.preciseDiff(this,e,a)},t.preciseDiff=function(a,i,r){var o,u=t(a),c=t(i);if(u.add(c.utcOffset()-u.utcOffset(),"minutes"),u.isSame(c))return r?n(0,0,0,0,0,0,!1):e.nodiff;if(u.isAfter(c)){var l=u;u=c,c=l,o=!0}else o=!1;var f=c.year()-u.year(),p=c.month()-u.month(),m=c.date()-u.date(),d=c.hour()-u.hour(),h=c.minute()-u.minute(),b=c.second()-u.second();if(b<0&&(b=60+b,h--),h<0&&(h=60+h,d--),d<0&&(d=24+d,m--),m<0){var v=t(c.year()+"-"+(c.month()+1),"YYYY-MM").subtract(1,"M").daysInMonth();m=v<u.date()?v+m+(u.date()-v):v+m,p--}return p<0&&(p=12+p,f--),r?n(f,p,m,d,h,b,o):s(f,p,m,d,h,b)}})(s)}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c398284c"],{3759:function(e,t,s){"use strict";s.r(t);var a=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("Card",{attrs:{shadow:""}},[s("div",[s("div",{staticClass:"message-page-con message-category-con"},[s("Menu",{attrs:{width:"auto","active-name":"unread"},on:{"on-select":e.handleSelect}},[s("MenuItem",{attrs:{name:"unread"}},[s("span",{staticClass:"category-title"},[e._v("未读消息")]),s("Badge",{staticStyle:{"margin-left":"10px"},attrs:{count:e.messageUnreadCount}})],1),s("MenuItem",{attrs:{name:"readed"}},[s("span",{staticClass:"category-title"},[e._v("已读消息")]),s("Badge",{staticStyle:{"margin-left":"10px"},attrs:{"class-name":"gray-dadge",count:e.messageReadedCount}})],1),s("MenuItem",{attrs:{name:"trash"}},[s("span",{staticClass:"category-title"},[e._v("回收站")]),s("Badge",{staticStyle:{"margin-left":"10px"},attrs:{"class-name":"gray-dadge",count:e.messageTrashCount}})],1)],1)],1),s("div",{staticClass:"message-page-con message-list-con"},[e.listLoading?s("Spin",{attrs:{fix:"",size:"large"}}):e._e(),s("Menu",{class:e.titleClass,attrs:{width:"auto","active-name":""},on:{"on-select":e.handleView}},e._l(e.messageList,(function(t){return s("MenuItem",{key:"msg_"+t.msg_id,attrs:{name:t.msg_id}},[s("div",[s("p",{staticClass:"msg-title"},[e._v(e._s(t.title))]),s("Badge",{attrs:{status:"default",text:t.create_time}}),s("Button",{directives:[{name:"show",rawName:"v-show",value:"unread"!==e.currentMessageType,expression:"currentMessageType !== 'unread'"}],staticStyle:{float:"right","margin-right":"20px"},style:{display:t.loading?"inline-block !important":""},attrs:{loading:t.loading,size:"small",icon:"readed"===e.currentMessageType?"md-trash":"md-redo",title:"readed"===e.currentMessageType?"删除":"还原",type:"text"},nativeOn:{click:function(s){return s.stopPropagation(),e.removeMsg(t)}}})],1)])})),1)],1),s("div",{staticClass:"message-page-con message-view-con"},[e.contentLoading?s("Spin",{attrs:{fix:"",size:"large"}}):e._e(),s("div",{staticClass:"message-view-header"},[s("h2",{staticClass:"message-view-title"},[e._v(e._s(e.showingMsgItem.title))]),s("time",{staticClass:"message-view-time"},[e._v(e._s(e.showingMsgItem.create_time))])]),s("div",{domProps:{innerHTML:e._s(e.messageContent)}})],1)])])},n=[],i=(s("8e6e"),s("ac6a"),s("456d"),s("7514"),s("bd86")),r=s("2f62");function o(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,a)}return s}function c(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?o(Object(s),!0).forEach((function(t){Object(i["a"])(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):o(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}var g={unread:"messageUnreadList",readed:"messageReadedList",trash:"messageTrashList"},d={name:"message_page",data:function(){return{listLoading:!0,contentLoading:!1,currentMessageType:"unread",messageContent:"",showingMsgItem:{}}},computed:c({},Object(r["e"])({messageUnreadList:function(e){return e.user.messageUnreadList},messageReadedList:function(e){return e.user.messageReadedList},messageTrashList:function(e){return e.user.messageTrashList},messageList:function(){return this[g[this.currentMessageType]]},titleClass:function(){return{"not-unread-list":"unread"!==this.currentMessageType}}}),{},Object(r["c"])(["messageUnreadCount","messageReadedCount","messageTrashCount"])),methods:c({},Object(r["d"])([]),{},Object(r["b"])(["getContentByMsgId","getMessageList","hasRead","removeReaded","restoreTrash"]),{stopLoading:function(e){this[e]=!1},handleSelect:function(e){this.currentMessageType=e},handleView:function(e){var t=this;this.contentLoading=!0,this.getContentByMsgId({msg_id:e}).then((function(s){t.messageContent=s;var a=t.messageList.find((function(t){return t.msg_id===e}));a&&(t.showingMsgItem=a),"unread"===t.currentMessageType&&t.hasRead({msg_id:e}),t.stopLoading("contentLoading")})).catch((function(){t.stopLoading("contentLoading")}))},removeMsg:function(e){e.loading=!0;var t=e.msg_id;"readed"===this.currentMessageType?this.removeReaded({msg_id:t}):this.restoreTrash({msg_id:t})}}),mounted:function(){var e=this;this.listLoading=!0,this.getMessageList().then((function(){return e.stopLoading("listLoading")})).catch((function(){return e.stopLoading("listLoading")}))}},u=d,m=(s("ac69"),s("2877")),l=Object(m["a"])(u,a,n,!1,null,null,null);t["default"]=l.exports},ac69:function(e,t,s){"use strict";var a=s("e850"),n=s.n(a);n.a},e850:function(e,t,s){}}]);
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
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