123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315 |
- {extend name="common/base"/}
- <!-- 主体 -->
- {block name="body"}
- <div class="p-3">
- <form class="layui-form gg-form-bar border-t border-x">
- <div class="layui-input-inline" style="width:300px;">
- <input type="text" name="keywords" placeholder="请输入关键字" class="layui-input" autocomplete="off"/>
- </div>
- <div class="layui-input-inline">
- <button type="button" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="searchform">提交搜索</button>
- </div>
- </form>
- <table class="layui-hide" id="cost_project" lay-filter="cost_project"></table>
- </div>
- <div id="selectBox2" style="display: none;">
- <div id="financialSelect2"></div>
- <div id="companySelect2"></div>
- <button id="cc">1111</button>
- </div>
- <script type="text/html" id="toolbarDemo">
- <div class="layui-btn-container">
- </div>
- </script>
- <script type="text/html" id="barDemo">
- <div class="layui-btn-group">
- <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a>
- <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="receive">接收</a>
- </div>
- </script>
- {/block}
- <!-- /主体 -->
- <!-- 脚本 -->
- {block name="script"}
- <script>
- const moduleInit = ['tool'];
- var listount;
- var select_Data
- var financial = [
- {nickname: "hhh1", id: 1},
- {nickname: "hhh2", id: 2},
- {nickname: "hhh3", id: 3},
- ]
- function gouguInit() {
- var table = layui.table, tool = layui.tool, form = layui.form;
- var allcount;
- layui.pageTable = table.render({
- elem: '#cost_project',
- title: '造价项目列表',
- toolbar: '#toolbarDemo',
- url: '/admin/project.audit_company/datalist',
- page: true,
- limit: 20,
- parseData: function(res) { // 数据解析回调函数
- // 在这里可以获取数据总数
- allcount = res.count;
- return {
- code: res.code, // 数据状态码
- msg: res.msg, // 状态信息
- count: res.count, // 数据总数
- data: res.data // 当前页数据
- };
- },
- cols: [
- [
- {fixed: 'left', field: 'id', title: '编号', align: 'center', width: 80,
- templet: function(d){
- return allcount - (d.LAY_NUM-1);
- }
- },
- {
- field: 'project_status',
- title: '项目状态',
- align: 'center',
- width: 100,
- templet: function (item) {
- var html;
- if (item.project_status === 3) {
- html = '<span class="layui-badge layui-bg-orange">待接收</span> ';
- }
- return html;
- }
- },
- {
- field: 'project_name',
- title: '项目名称',
- align: 'center',
- width: 200
- }, {
- field: 'project_num',
- title: '项目编号',
- align: 'center',
- width: 150
- }, {
- field: 'project_time',
- title: '项目周期',
- align: 'center',
- width: 250,
- templet: function (item) {
- var html;
- html =
- "<div>" +
- layui.util.toDateString(item.project_start_time * 1000, 'yyyy-MM-dd') +
- "~" +
- layui.util.toDateString(item.project_end_time * 1000, 'yyyy-MM-dd') +
- "</div>";
- return html;
- }
- }, {
- field: 'entrust_unit_name',
- title: '委托单位',
- align: 'center',
- width: 150
- }, {
- field: 'entrust_head',
- title: '委托单位负责人',
- align: 'center',
- width: 150
- }, {
- field: 'entrust_head_phone',
- title: '委托单位负责人电话',
- align: 'center',
- width: 150
- }, {
- field: 'sent_review_unit',
- title: '送审单位',
- align: 'center',
- width: 100
- }, {
- field: 'sent_review_head',
- title: '送审单位负责人',
- align: 'center',
- width: 150
- }, {
- field: 'sent_review_phone',
- title: '送审单位负责人电话',
- align: 'center',
- width: 150
- }, {
- field: 'project_scale',
- title: '项目规模',
- align: 'center',
- width: 150
- }, {
- field: 'engineering_category',
- title: '工程类别',
- align: 'center',
- width: 150
- }, {
- field: 'engineering_type',
- title: '项目类型',
- align: 'center',
- width: 150
- }, {
- field: 'project_region',
- title: '项目区域',
- align: 'center',
- width: 150
- }, {
- field: 'fiscal_nature',
- title: '财政性质',
- align: 'center',
- width: 150
- }, {
- field: 'sent_review_cost',
- title: '送审服务费',
- align: 'center',
- width: 150
- }, {
- field: 'preparation_amount',
- title: '编制金额',
- align: 'center',
- width: 150
- }, {
- field: 'sent_review_amount',
- title: '送审金额',
- align: 'center',
- width: 150
- }, {
- field: 'authorize_amount',
- title: '审定金额',
- align: 'center',
- width: 150
- }, {
- field: 'review_add_amount',
- title: '审增金额',
- align: 'center',
- width: 150
- }, {
- field: 'review_reduce_amount',
- title: '审减金额',
- align: 'center',
- width: 150
- }, {
- field: 'report_time',
- title: '报告时间',
- align: 'center',
- width: 150,
- templet: function (d) {
- if (d.report_time) {
- return layui.util.toDateString(d.report_time * 1000, "yyyy-MM-dd")
- } else {
- return "";
- }
- }
- }, {
- field: 'charge_standard',
- title: '收费标准',
- align: 'center',
- width: 150
- }, {
- field: 'invoicing__amount',
- title: '开票金额',
- align: 'center',
- width: 150
- }, {
- field: 'invoicing__num',
- title: '开票编号',
- align: 'center',
- width: 150
- }, {
- field: 'operate_head_name',
- title: '作业负责人',
- align: 'center',
- width: 150
- }, {
- field: 'operate_team_names',
- title: '作业成员',
- align: 'center',
- width: 300
- }, {
- field: 'create_time',
- title: '项目创建日期',
- align: 'center',
- width: 120,
- templet: "<div>{{layui.util.toDateString(d.updated, 'yyyy-MM-dd')}}</div>"
- }, {
- field: 'project_dead_time',
- title: '项目归档日期',
- align: 'center',
- width: 120
- },
- {
- fixed: 'right',
- field: 'right',
- title: '操作',
- toolbar: '#barDemo',
- width: 136,
- align: 'center'
- }
- ]
- ],
- done: function (res, curr, count) {
- listount = count;
- }
- });
- //监听表格行工具事件
- table.on('tool(cost_project)', function (obj) {
- var data = obj.data;
- if (obj.event === 'read') {
- // console.log(obj.data.getTrusteeName.institution)
- tool.side('/admin/project.audit_company/read?id=' + obj.data.id);
- } else if (obj.event === 'edit') {
- tool.side('/admin/project.audit_company/edit?id=' + obj.data.id);
- } else if (obj.event === 'receive') {
- var index = layer.confirm("确认是否接收此项目?", function () {
- layer.close(index);
- let callback = function (e) {
- layer.msg(e.msg);
- listount--;
- if (listount == 0) {
- parent.showhongdian()
- }
- if (e.code == 0) {
- obj.del();
- }
- }
- tool.delete("/admin/project.audit_company/receive", {
- id: data.id,
- }, callback);
- })
- return false;
- }
- })
-
-
- //监听搜索提交
- form.on('submit(searchform)', function (data) {
- layui.pageTable.reload({
- where: {
- keywords: data.field.keywords
- },
- page: {
- curr: 1
- }
- });
-
- return false;
- });
- }
- </script>
- {/block}
- <!-- /脚本 -->
|