Commit a43b1d99 by zhaoxiqing

gsb

parent b8e56857
var system = require("../../system")
var settings = require("../../../config/settings");
const CtlBase = require("../ctl.base");
class BusistatCtl extends CtlBase {
constructor() {
super(CtlBase.getServiceName(BusistatCtl));
this.departmentSve = system.getObject("service.departmentSve")
}
async suggest(query,qobj,req){
var name = this.trim(qobj.name);
if (!name) {
return system.getResult2([])
}
var list = await this.departmentSve.suggestByName(name);
return system.getResult2(list);
}
}
}
module.exports = BusistatCtl;
const system = require("../../system");
const Dao = require("../dao.base");
class BusistatDao extends Dao {
constructor() {
super(Dao.getModelName(BusistatDao));
}
extraWhere(qobj, qw, qc) {
qc.raw = true;
return qw;
}
}
module.exports = BusistatDao;
const system = require("../../system");
const settings = require("../../../config/settings");
const uiconfig = system.getUiConfig2(settings.wxconfig.appId);
module.exports = (db, DataTypes) => {
return db.define("busistat", {
busi_id: DataTypes.STRING,
user_id: DataTypes.INTEGER,
stat_day: DataTypes.INTEGER,
busi_name: DataTypes.STRING,
user_name: DataTypes.STRING,
user_department_name: DataTypes.STRING(64),
times: DataTypes.INTEGER,
amt : DataTypes.INTEGER,
actual_amt : DataTypes.INTEGER,
deduct_amt : DataTypes.INTEGER,
income_tax : DataTypes.INTEGER,
service_tax : DataTypes.INTEGER,
added_value_tax : DataTypes.INTEGER,
}, {
paranoid: true, //假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'c_busi_stat',
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");
class BusistatService extends ServiceBase {
constructor() {
super(ServiceBase.getDaoName(BusistatService));
}
}
module.exports = BusistatService;
......@@ -4,12 +4,19 @@
<el-card style="background-color: #FFFFFF;padding:10px 10px 30px 10px;margin-top: 20px;">
<div style="width:100%;line-height: 40px;">
<div style="float:left;width: 300px;">
<span style="color:2F2F2F;font-size: 14px;" >模板名称: </span>
<span style="color:2F2F2F;font-size: 14px;" >开始时间: </span>
<el-input v-model="search.name" placeholder="请输入开始时间" maxlength="100" clearable style="max-width:200px;height: 36px;" ></el-input>
</div>
<div style="float:left;width: 300px;">
<span style="color:2F2F2F;font-size: 14px;" >结束时间: </span>
<el-input v-model="search.name" placeholder="请输入结束时间" maxlength="100" clearable style="max-width:200px;height: 36px;" ></el-input>
</div>
<div style="float:left;width: 300px;">
<span style="color:2F2F2F;font-size: 14px;" >企业名称: </span>
<el-input v-model="search.name" placeholder="请输入模板名称" maxlength="100" clearable style="max-width:200px;height: 36px;" ></el-input>
</div>
<div style="float:left;">
<span style="color:2F2F2F;font-size: 14px;" >所属公司</span>
<span style="color:2F2F2F;font-size: 14px;" >部门</span>
<el-select
v-model="search.ecompanyName"
filterable
......@@ -42,8 +49,7 @@
<div>
<div style="line-height: 36px;padding-bottom: 20px;">
<span style="float:left;color:#2F2F2F;font-size: 14px;">共{{search.total}}条记录</span>
<el-button @click="exportList()" style="float:right;width:110px;height:36px;color: #FFFFFF;font-weight: 400;border-radius: 4px;font-size: 14px;background-color: #59C1A6;padding-top:11px">导出二维码</el-button>
<el-button @click="openEdit()" style="float:right;width:100px;height:36px;color: #FFFFFF;font-weight: 400;border-radius: 4px;font-size: 14px;background-color: #59C1A6;padding-top:11px">新增模板</el-button>
<el-button @click="exportList()" style="float:right;width:110px;height:36px;color: #FFFFFF;font-weight: 400;border-radius: 4px;font-size: 14px;background-color: #59C1A6;padding-top:11px">导出</el-button>
</div>
<div>
<el-table
......@@ -56,29 +62,17 @@
header-cell-style="background-color: #F5F5F5;color: #2F2F2F;font-size: 14px;font-weight:400;"
row-style="height:50px;" >
<el-table-column prop="id" label="序号" :formatter="onColFormater" width="80" align="center" ></el-table-column>
<el-table-column prop="name" label="模板名称" :formatter="onColFormater" align="center" ></el-table-column>
<el-table-column prop="ecompany.name" label="公司名称" :formatter="onColFormater" align="center" ></el-table-column>
<el-table-column prop="ecompanyMain.alias" label="签约主体" :formatter="onColFormater" align="center" ></el-table-column>
<el-table-column label="二维码" >
<template slot-scope="scope" >
<a v-if="scope.row.qrcodeurl" :href="scope.row.qrcodeurl" target="_blank" style="text-decoration: none;color:#59C1A6;font-size: 14px;">二维码</a>
</template>
</el-table-column>
<el-table-column label="模板文件" >
<template slot-scope="scope" >
<a v-if="scope.row.filepath" :href="scope.row.filepath" target="_blank" style="text-decoration: none;color:#59C1A6;font-size: 14px;">查看</a>
</template>
</el-table-column>
<el-table-column prop="filekey" label="模板key" :formatter="onColFormater" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="created_at" label="创建日期" :formatter="onColFormater" align="center" ></el-table-column>
<el-table-column prop="updated_at" label="修改日期" :formatter="onColFormater" align="center" ></el-table-column>
<el-table-column label="操作" align="center" >
<template slot-scope="scope">
<a href="javascript:;" @click="openEdit(scope.row.id)" style="text-decoration: none;color:#59C1A6;font-size: 14px;">修改</a>
<a href="javascript:;" @click="relevance(scope.row.id)" style="text-decoration: none;color:#59C1A6;font-size: 14px;">关联</a>
</template>
</el-table-column>
<el-table-column prop="name" label="部门名称" :formatter="onColFormater" align="center" ></el-table-column>
<el-table-column prop="ecompany.name" label="业务员" :formatter="onColFormater" align="center" ></el-table-column>
<el-table-column prop="ecompanyMain.alias" label="商户号" :formatter="onColFormater" align="center" ></el-table-column>
<el-table-column prop="ecompanyMain.alias" label="商户名称" :formatter="onColFormater" align="center" ></el-table-column>
<el-table-column prop="ecompanyMain.alias" label="公司名称" :formatter="onColFormater" align="center" ></el-table-column>
<el-table-column prop="ecompanyMain.alias" label="实发金额" :formatter="onColFormater" align="center" ></el-table-column>
<el-table-column prop="ecompanyMain.alias" label="服务费金额" :formatter="onColFormater" align="center" ></el-table-column>
<el-table-column prop="ecompanyMain.alias" label="总扣除金额" :formatter="onColFormater" align="center" ></el-table-column>
<el-table-column prop="ecompanyMain.alias" label="个税金额" :formatter="onColFormater" align="center" ></el-table-column>
<el-table-column prop="ecompanyMain.alias" label="增值税金额" :formatter="onColFormater" align="center" ></el-table-column>
<el-table-column prop="ecompanyMain.alias" label="发薪笔数" :formatter="onColFormater" align="center" ></el-table-column>
</el-table>
<div style="width:100%;text-align: center;margin-top: 20px">
<el-pagination
......
......@@ -233,7 +233,7 @@
getCompanyNames(query) {
var self = this;
self.nameLoading = true;
self.$root.postReq("/web/ecompanyCtl/suggest", {
self.$root.postReq("/web/busistatCtl/suggest", {
name: query
}).then(function (d) {
self.nameLoading = false;
......
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