闫增涛
2025-04-14 729e47e5aa77d73914de4353e95f56350611f820
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
{extend name="../../base/view/common/base" /}
<!-- 主体 -->
{block name="body"}
<div class="layui-form p-page">
    <h3 class="pb-3">无发票回款详情</h3>
    <table class="layui-table layui-table-form">
        <tr>
            <td class="layui-td-gray">预回款金额(元)</td>
            <td class="blue">{$detail.amount}</td>
            <td class="layui-td-gray">收款主体</td>
            <td colspan="3">{$detail.subject}</td>
        </tr>
        <tr>
            <td class="layui-td-gray">付款主体</td>
            <td>
                {eq name="$detail.types" value="1"}企业{/eq}
                {eq name="$detail.types" value="2"}个人{/eq}
            </td>
            <td class="layui-td-gray-2">付款方名称</td>
            <td>{$detail.invoice_title}</td>
            <td class="layui-td-gray">电话号码</td>
            <td>{$detail.invoice_phone}</td>
        </tr>
        <tr class="invoice-type" {eq name="$detail.types" value="1"}style="display:none"{/eq}>
            <td class="layui-td-gray-2">纳税人识别号</td>
            <td>{$detail.invoice_tax}</td>
            <td class="layui-td-gray">开户行</td>
            <td>{$detail.invoice_bank}</td>
            <td class="layui-td-gray">银行账号</td>
            <td>{$detail.invoice_account}</td>
        </tr>
        <tr class="invoice-type" {eq name="$detail.types" value="1"}style="display:none"{/eq}>
            <td class="layui-td-gray-2">银行营业网点</td>
            <td>{$detail.invoice_banking}</td>
            <td class="layui-td-gray">地址</td>
            <td colspan="3">{$detail.invoice_address}</td>
        </tr>
        {if condition="$detail.contract_id > 0"}
        <tr>
        <td class="layui-td-gray">关联的合同</td>
            <td colspan="5">{$detail.contract_name|default=''}</td>
        </tr>
        {/if}
        {if condition="$detail.project_id > 0"}
        <tr>
        <td class="layui-td-gray">关联的项目</td>
            <td colspan="5">{$detail.project_name|default=''}</td>
        </tr>
        {/if}
        {notempty name="$detail.remark"}
        <tr>
            <td class="layui-td-gray">备注信息</td>
            <td colspan="5">{$detail.remark}</td>
        </tr>
        {/notempty}
        {notempty name="$detail.file_ids"}
        <tr>
            <td class="layui-td-gray">关联附件</td>
            <td colspan="5" style="line-height:inherit">
                <div class="layui-row">
                    {volist name="$detail.file_array" id="vo"}
                    <div class="layui-col-md4" id="uploadImg{$vo.id}">{:file_card($vo,'view')}</div>
                    {/volist}
                </div>
            </td>
        </tr>
        {/notempty}
        {if ( $detail.open_status gt 0)}
        <tr>
            <td class="layui-td-gray">发票号码</td>
            <td>{$detail.code}{eq name="$detail.open_status" value="2"}<span class="yellow">『已作废』</span>{/eq}</td>
            <td class="layui-td-gray">开票人</td>
            <td>{$detail.open_admin_name}</td>
            <td class="layui-td-gray">开票日期</td>
            <td colspan="3">{$detail.open_time|date='Y-m-d'}</td>
        </tr>
        <tr>
            <td class="layui-td-gray">物流单号</td>
            <td colspan="5">{$detail.delivery}</td>
        </tr>
        <tr>
            <td class="layui-td-gray">            
                <div class="layui-input-inline">发票附件</div>
                <div class="layui-input-inline">
                    <button type="button" class="layui-btn layui-btn-xs" id="uploadBtn"><i class="layui-icon"></i></button>
                </div>
            </td>
            <td colspan="5" style="line-height:inherit">
                <div class="layui-row" id="uploadBox">
                    <input type="hidden" data-type="file" name="other_file_ids" value="{$detail.other_file_ids}">
                    {notempty name="$detail.other_file_ids"}
                    {volist name="$detail.other_file_array" id="vo"}
                    <div class="layui-col-md4" id="uploadImg{$vo.id}">{:file_card($vo)}</div>
                    {/volist}
                    {/notempty}
                </div>
            </td>
        </tr>
        {/if}
    </table>
    <div id="checkBox" class="pt-3" data-status="{$detail.check_status}" data-id="{$detail.id}" data-checkflowid="{$detail.check_flow_id}"></div>
</div>
{/block}
<!-- /主体 -->
 
<!-- 脚本 -->
{block name="script"}
<script>
const invoice_id = {$detail.id};
const moduleInit = ['tool','oaCheck','uploadPlus'];
function gouguInit() {
    var form = layui.form,tool=layui.tool, oaCheck=layui.oaCheck,uploadPlus = layui.uploadPlus;    
    oaCheck.init({
        check_name:'invoicea'
    });
    //相关附件上传
    var attachment = new uploadPlus({
        "attachment":{
            uidDelete:true,
            ajaxSave:function(val){
                $.ajax({
                    url: "/finance/api/upload_invoice",
                    type:'post',
                    data:{
                        id:invoice_id,
                        other_file_ids:val
                    },
                    success: function (e) {
                        location.reload();
                    }
                })
            },
            ajaxDelete:function(val){
                $.ajax({
                    url: "/finance/api/upload_invoice",
                    type:'post',
                    data:{
                        id:invoice_id,
                        other_file_ids:val
                    },
                    success: function (e) {
                        location.reload();
                    }
                })
            }
        }
    })
}
</script>
{/block}
<!-- /脚本 -->