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 @@ ...@@ -4,12 +4,19 @@
<el-card style="background-color: #FFFFFF;padding:10px 10px 30px 10px;margin-top: 20px;"> <el-card style="background-color: #FFFFFF;padding:10px 10px 30px 10px;margin-top: 20px;">
<div style="width:100%;line-height: 40px;"> <div style="width:100%;line-height: 40px;">
<div style="float:left;width: 300px;"> <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> <el-input v-model="search.name" placeholder="请输入模板名称" maxlength="100" clearable style="max-width:200px;height: 36px;" ></el-input>
</div> </div>
<div style="float:left;"> <div style="float:left;">
<span style="color:2F2F2F;font-size: 14px;" >所属公司</span> <span style="color:2F2F2F;font-size: 14px;" >部门</span>
<el-select <el-select
v-model="search.ecompanyName" v-model="search.ecompanyName"
filterable filterable
...@@ -30,7 +37,7 @@ ...@@ -30,7 +37,7 @@
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
<div style="float:left;margin-top:5px;"> <div style="float:left;margin-top:5px;">
<el-button @click="resetSearch()" style="float:right;width:68px;height:36px;background-color: #54C4A7;color: #FFFFFF;font-size: 14px;padding-top:10px;" >重置</el-button> <el-button @click="resetSearch()" style="float:right;width:68px;height:36px;background-color: #54C4A7;color: #FFFFFF;font-size: 14px;padding-top:10px;" >重置</el-button>
<el-button @click="opSearch" style="float:right;width:68px;height:36px;background-color: #54C4A7;color: #FFFFFF;font-size: 14px;padding-top:10px;margin-right: 10px;" >搜索</el-button> <el-button @click="opSearch" style="float:right;width:68px;height:36px;background-color: #54C4A7;color: #FFFFFF;font-size: 14px;padding-top:10px;margin-right: 10px;" >搜索</el-button>
...@@ -42,11 +49,10 @@ ...@@ -42,11 +49,10 @@
<div> <div>
<div style="line-height: 36px;padding-bottom: 20px;"> <div style="line-height: 36px;padding-bottom: 20px;">
<span style="float:left;color:#2F2F2F;font-size: 14px;">共{{search.total}}条记录</span> <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="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>
</div> </div>
<div> <div>
<el-table <el-table
stripe stripe
fix="true" fix="true"
:data="search.list" :data="search.list"
...@@ -56,29 +62,17 @@ ...@@ -56,29 +62,17 @@
header-cell-style="background-color: #F5F5F5;color: #2F2F2F;font-size: 14px;font-weight:400;" header-cell-style="background-color: #F5F5F5;color: #2F2F2F;font-size: 14px;font-weight:400;"
row-style="height:50px;" > row-style="height:50px;" >
<el-table-column prop="id" label="序号" :formatter="onColFormater" width="80" align="center" ></el-table-column> <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="name" label="部门名称" :formatter="onColFormater" align="center" ></el-table-column>
<el-table-column prop="ecompany.name" label="公司名称" :formatter="onColFormater" align="center" ></el-table-column> <el-table-column prop="ecompany.name" label="业务员" :formatter="onColFormater" align="center" ></el-table-column>
<el-table-column prop="ecompanyMain.alias" label="签约主体" :formatter="onColFormater" align="center" ></el-table-column> <el-table-column prop="ecompanyMain.alias" label="商户号" :formatter="onColFormater" align="center" ></el-table-column>
<el-table-column label="二维码" > <el-table-column prop="ecompanyMain.alias" label="商户名称" :formatter="onColFormater" align="center" ></el-table-column>
<template slot-scope="scope" > <el-table-column prop="ecompanyMain.alias" label="公司名称" :formatter="onColFormater" align="center" ></el-table-column>
<a v-if="scope.row.qrcodeurl" :href="scope.row.qrcodeurl" target="_blank" style="text-decoration: none;color:#59C1A6;font-size: 14px;">二维码</a> <el-table-column prop="ecompanyMain.alias" label="实发金额" :formatter="onColFormater" align="center" ></el-table-column>
</template> <el-table-column prop="ecompanyMain.alias" label="服务费金额" :formatter="onColFormater" align="center" ></el-table-column>
</el-table-column> <el-table-column prop="ecompanyMain.alias" label="总扣除金额" :formatter="onColFormater" align="center" ></el-table-column>
<el-table-column label="模板文件" > <el-table-column prop="ecompanyMain.alias" label="个税金额" :formatter="onColFormater" align="center" ></el-table-column>
<template slot-scope="scope" > <el-table-column prop="ecompanyMain.alias" label="增值税金额" :formatter="onColFormater" align="center" ></el-table-column>
<a v-if="scope.row.filepath" :href="scope.row.filepath" target="_blank" style="text-decoration: none;color:#59C1A6;font-size: 14px;">查看</a> <el-table-column prop="ecompanyMain.alias" label="发薪笔数" :formatter="onColFormater" align="center" ></el-table-column>
</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> </el-table>
<div style="width:100%;text-align: center;margin-top: 20px"> <div style="width:100%;text-align: center;margin-top: 20px">
<el-pagination <el-pagination
...@@ -133,7 +127,7 @@ ...@@ -133,7 +127,7 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="签约主体:" prop="ecompanyMainId" > <el-form-item label="签约主体:" prop="ecompanyMainId" >
<el-select v-model="etemplate.ecompanyMainId" style="width:468px;" filterable placeholder="请选择"> <el-select v-model="etemplate.ecompanyMainId" style="width:468px;" filterable placeholder="请选择">
<el-option <el-option
...@@ -145,7 +139,7 @@ ...@@ -145,7 +139,7 @@
</el-select> </el-select>
<!-- <el-input v-model="etemplate.nameA" placeholder="请输入签约主体" maxlength="50" style="width:468px;" clearable ></el-input> --> <!-- <el-input v-model="etemplate.nameA" placeholder="请输入签约主体" maxlength="50" style="width:468px;" clearable ></el-input> -->
</el-form-item> </el-form-item>
<el-form-item label="签约协议:" prop="filepath"> <el-form-item label="签约协议:" prop="filepath">
<gsb-upload3 ref="upload3" v-model="uploadResult" @uploadsuccess="uploadsuccess" :fileList="fileList" filetype="pdf"></gsb-upload3> <gsb-upload3 ref="upload3" v-model="uploadResult" @uploadsuccess="uploadsuccess" :fileList="fileList" filetype="pdf"></gsb-upload3>
...@@ -214,4 +208,4 @@ ...@@ -214,4 +208,4 @@
</div> </div>
</gsb-pcpage> </gsb-pcpage>
\ No newline at end of file
...@@ -233,7 +233,7 @@ ...@@ -233,7 +233,7 @@
getCompanyNames(query) { getCompanyNames(query) {
var self = this; var self = this;
self.nameLoading = true; self.nameLoading = true;
self.$root.postReq("/web/ecompanyCtl/suggest", { self.$root.postReq("/web/busistatCtl/suggest", {
name: query name: query
}).then(function (d) { }).then(function (d) {
self.nameLoading = false; self.nameLoading = false;
...@@ -370,4 +370,4 @@ ...@@ -370,4 +370,4 @@
} }
}, },
vname: "gsb-ecompanyadmin" vname: "gsb-ecompanyadmin"
} }
\ No newline at end of file
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