2db47680
hexiaodong
chore: 初始提交 php 遗...
|
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
|
{include file="kuerp/common/menu" /}
<div class="">
<a href="{:url('kuerp/prints/prints',['id'=>$row.id,'type'=>'hxd'])}" target="_blank" class="layui-btn layui-icon-btn layui-btn-sm layui-btn-danger fright {if condition="$auth->check($nowmenu.'/printss')!=1"}hiddens{/if}" style="margin-left: 10px;padding-left: 10px;">打印</a>
</div>
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="row">
<div class="col-xs-12 col-sm-3 col-md-3 col-lg-3">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-4">{:__('Business_type')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-business_type" data-rule="required" class="form-control selectpicker" name="row[business_type]">
{foreach name="businessTypeList" item="vo"}
<option value="{$key}" {if condition="isset($row['business_type']) && $key==$row.business_type"}selected{/if}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-3 col-md-3 col-lg-3">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-4">{:__('Purchase_code')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-purchase_code" class="form-control" data-rule="required" value="{$row.purchase_code|default=''}" name="row[purchase_code]" type="text" placeholder="{:__('Purchase_code')}">
</div>
</div>
</div>
<div class="col-xs-12 col-sm-3 col-md-3 col-lg-3 chose_customers_id chose_u {if condition='$row.business_type==1 || $row.business_type==3'}{else/}hiddens{/if}">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-4">{:__('Customers_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input type="hidden" id="customers_id" name="row[customers_id]" value="">
<div id="customers_ids" class="xm-select-demo"></div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-3 col-md-3 col-lg-3 chose_customers_out_id chose_u {if condition='$row.business_type<3 || $row.business_type>4'}hiddens{/if}">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-4">{:__('转出客户')}:</label>
<div class="col-xs-12 col-sm-8">
<input type="hidden" id="customers_out_id" name="row[customers_out_id]" value="">
<div id="customers_out_ids" class="xm-select-demo"></div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-3 col-md-3 col-lg-3 chose_customers_enter_id chose_u {if condition='$row.business_type!=4'}hiddens{/if}">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-4">{:__('转入客户')}:</label>
<div class="col-xs-12 col-sm-8">
<input type="hidden" id="customers_enter_id" name="row[customers_enter_id]" value="">
<div id="customers_enter_ids" class="xm-select-demo"></div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-3 col-md-3 col-lg-3 chose_suppliers_id chose_u {if condition='$row.business_type<2 || $row.business_type>3'}hiddens{/if}">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-4">{:__('Suppliers_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input type="hidden" id="suppliers_id" name="row[suppliers_id]" value="">
<div id="suppliers_ids" class="xm-select-demo"></div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-3 col-md-3 col-lg-3 chose_suppliers_out_id chose_u {if condition='$row.business_type!=5'}hiddens{/if}">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-4">{:__('转出供应商')}:</label>
<div class="col-xs-12 col-sm-8">
<input type="hidden" id="suppliers_out_id" name="row[suppliers_out_id]" value="">
<div id="suppliers_out_ids" class="xm-select-demo"></div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-3 col-md-3 col-lg-3 chose_suppliers_enter_id chose_u {if condition='$row.business_type!=5'}hiddens{/if}">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-4">{:__('转入供应商')}:</label>
<div class="col-xs-12 col-sm-8">
<input type="hidden" id="suppliers_enter_id" name="row[suppliers_enter_id]" value="">
<div id="suppliers_enter_ids" class="xm-select-demo"></div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-3 col-md-3 col-lg-3">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-4">{:__('Purchase_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-purchase_time" class="form-control datetime" name="row[purchase_time]" type="text" value="{:date('Y-m-d')}" placeholder="{:__('Purchase_time')}">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<div class="form-group" style="margin: 0;text-align: right">
<button type="button" id="chose_advance" data-id="account_table" class="btn btn-default btn-embossed chose_advance chose_btn {if condition='$row.business_type!=1'}hiddens{/if}">选择预收单据</button>
<button type="button" id="chose_pay" data-id="account_table" class="btn btn-default btn-embossed chose_pay chose_btn {if condition='$row.business_type!=2'}hiddens{/if}">选择预付单据</button>
<button type="button" id="chose_receivable" data-id="account_table" class="btn btn-default btn-embossed chose_receivable chose_btn {if condition='$row.business_type<3 || $row.business_type>4'}hiddens{/if}">选择应收单据</button>
<button type="button" id="chose_cope" data-id="account_table" class="btn btn-default btn-embossed chose_cope chose_btn {if condition='$row.business_type!=5'}hiddens{/if}">选择应付单据</button>
</div>
</div>
</div>
<div class="table_box" style="position: relative">
{if condition="$row.examine_status==1 && isset($set['examine']['is_checked']) && $set['examine']['is_checked']==1"}
<div id="mark" class="has-audit"></div>
{/if}
<div class="list" style="overflow-x: auto">
<table id="account_table">
<tr>
<th class="{$exclass|default=''}"></th><th>源单编号</th><th>业务类别</th><th>单据日期</th><th>单据金额</th><th>已核销金额</th><th>未核销金额</th><th>本次核销金额</th><th class="hiddens"></th><th class="hiddens"></th>
</tr>
<tr style="display: none;">
<td class="{$exclass|default=''}"><div class="btn"><span class="add"><i class="fa fa-plus"></i></span><span class="del"><i class="fa fa-trash"></i></span></div></td>
<td><input type="text" readonly name="account[purchase_number][]" class="purchase_number"></td>
<td><input type="text" readonly name="account[business_type][]" class="business_type"></td>
<td><input type="text" readonly name="account[times][]" class="times"></td>
<td><input type="text" readonly name="account[sale_money][]" class="sale_money"></td>
<td><input type="text" readonly name="account[write_off][]" class="write_off"></td>
<td><input type="text" readonly name="account[write_off_money][]" class="write_off_money"></td>
<td><input type="number" name="account[write_off_price][]" class="write_off_price number_decimal"></td>
<td class="hiddens"><input type="text" readonly name="account[purchase_type][]" class="purchase_type"></td>
<td class="hiddens"><input type="text" readonly name="account[purchase_numbers][]" class="purchase_numbers"></td>
</tr>
{php}$a=0;$sale_money_hj=0;$write_off_hj=0;$write_off_money_hj=0;$write_off_price_hj=0;{/php}
{foreach name="info" item="vo" key="k"}
{if condition="$vo.top==1"}
{php} $a+=1; $sale_money_hj+=$vo['money']; $write_off_hj+=$vo['write_off']; $write_off_money_hj+=$vo['write_off_money']; $write_off_price_hj+=$vo['write_off_price']; {/php}
<tr>
<td class="{$exclass|default=''}"><div class="btn"><span class="add"><i class="fa fa-plus"></i></span><span class="del"><i class="fa fa-trash"></i></span></div></td>
<td><input type="text" readonly name="account[purchase_number][]" value="{if condition='$vo.purchase_type>4'}{$vo.business_name|default=''}{else/}{$vo.purchase_number}{/if}" class="purchase_number"></td>
<td><input type="text" readonly name="account[business_type][]" value="{$vo.business_name|default=''}" class="business_type"></td>
<td><input type="text" readonly name="account[times][]" value="{$vo.times|date='Y-m-d',###}" class="times"></td>
<td><input type="text" readonly name="account[sale_money][]" value="{$vo.money}" class="sale_money"></td>
<td><input type="text" readonly name="account[write_off][]" value="{$vo.write_off}" class="write_off"></td>
<td><input type="text" readonly name="account[write_off_money][]" value="{$vo.write_off_money}" class="write_off_money"></td>
<td><input type="number" name="account[write_off_price][]" value="{$vo.write_off_price}" class="write_off_price number_decimal"></td>
<td class="hiddens"><input type="text" readonly name="account[purchase_type][]" class="purchase_type" value="{$vo.source_id}"></td>
<td class="hiddens"><input type="text" readonly name="account[purchase_numbers][]" class="purchase_type" value="{$vo.purchase_number}"></td>
</tr>
{/if}
{/foreach}
{php}for($b=0;$b<(4-$a);$b++){ {/php}
<tr>
<td class="{$exclass|default=''}"><div class="btn"><span class="add"><i class="fa fa-plus"></i></span><span class="del"><i class="fa fa-trash"></i></span></div></td>
<td><input type="text" readonly name="account[purchase_number][]" class="purchase_number"></td>
<td><input type="text" readonly name="account[business_type][]" class="business_type"></td>
<td><input type="text" readonly name="account[times][]" class="times"></td>
<td><input type="text" readonly name="account[sale_money][]" class="sale_money"></td>
<td><input type="text" readonly name="account[write_off][]" class="write_off"></td>
<td><input type="text" readonly name="account[write_off_money][]" class="write_off_money"></td>
<td><input type="number" name="account[write_off_price][]" class="write_off_price number_decimal"></td>
<td class="hiddens"><input type="text" readonly name="account[purchase_type][]" class="purchase_type"></td>
<td class="hiddens"><input type="text" readonly name="account[purchase_numbers][]" class="purchase_type"></td>
</tr>
{php}}{/php}
<tr>
<td class="{$exclass|default=''}"></td>
<td><div>合计:</div></td>
<td></td>
<td></td>
<td><input type="text" readonly class="sale_money_hj" value="{$sale_money_hj}"></td>
<td><input type="text" readonly class="write_off_hj" value="{$write_off_hj}"></td>
<td><input type="text" readonly class="write_off_money_hj" value="{$write_off_money_hj}"></td>
<td><input type="text" readonly class="write_off_price_hj" value="{$write_off_price_hj}"></td>
<td class="hiddens"></td>
<td class="hiddens"></td>
</tr>
</table>
</div>
</div>
<div class="row choses {if condition='$row.business_type>3'}hiddens{/if}">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<div class="form-group" style="margin: 0;text-align: right">
<button type="button" id="choses_receivable" data-id="sale_table" class="btn btn-default btn-embossed chose_receivable chose_btn {if condition='$row.business_type==1'}{else/}hiddens{/if}">选择应收单据</button>
<button type="button" id="choses_cope" data-id="sale_table" class="btn btn-default btn-embossed chose_cope chose_btn {if condition='$row.business_type<2 || $row.business_type>3'}hiddens{/if}">选择应付单据</button>
</div>
</div>
</div>
<div class="table_box choses {if condition='$row.business_type>3'}hiddens{/if}">
<div class="list" style="overflow-x: auto">
<table id="sale_table">
<tr>
<th></th><th>源单编号</th><th>业务类别</th><th>单据日期</th><th>单据金额</th><th>已核销金额</th><th>未核销金额</th><th>本次核销金额</th><th class="hiddens"></th><th class="hiddens"></th>
</tr>
<tr style="display: none;">
<td><div class="btn"><span class="add"><i class="fa fa-plus"></i></span><span class="del"><i class="fa fa-trash"></i></span></div></td>
<td><input type="text" readonly name="sale[purchase_number][]" class="purchase_number"></td>
<td><input type="text" readonly name="sale[business_type][]" class="business_type"></td>
<td><input type="text" readonly name="sale[times][]" class="times"></td>
<td><input type="text" readonly name="sale[sale_money][]" class="sale_money"></td>
<td><input type="text" readonly name="sale[write_off][]" class="write_off"></td>
<td><input type="text" readonly name="sale[write_off_money][]" class="write_off_money"></td>
<td><input type="number" name="sale[write_off_price][]" class="write_off_price number_decimal"></td>
<td class="hiddens"><input type="text" readonly name="sale[purchase_type][]" class="purchase_type"></td>
<td class="hiddens"><input type="text" readonly name="sale[purchase_numbers][]" class="purchase_numbers"></td>
</tr>
{php}$a=0;$sale_money_hj=0;$write_off_hj=0;$write_off_money_hj=0;$write_off_price_hj=0;{/php}
{foreach name="info" item="vo" key="k"}
{if condition="$vo.top==2"}
{php} $a+=1; $sale_money_hj+=$vo['money']; $write_off_hj+=$vo['write_off']; $write_off_money_hj+=$vo['write_off_money']; $write_off_price_hj+=$vo['write_off_price']; {/php}
<tr>
<td><div class="btn"><span class="add"><i class="fa fa-plus"></i></span><span class="del"><i class="fa fa-trash"></i></span></div></td>
<td><input type="text" readonly name="sale[purchase_number][]" value="{if condition='$vo.purchase_type>4'}{$vo.business_name|default=''}{else/}{$vo.purchase_number}{/if}" class="purchase_number"></td>
<td><input type="text" readonly name="sale[business_type][]" value="{$vo.business_name|default=''}" class="business_type"></td>
<td><input type="text" readonly name="sale[times][]" value="{$vo.times|date='Y-m-d',###}" class="times"></td>
<td><input type="text" readonly name="sale[sale_money][]" value="{$vo.money}" class="sale_money"></td>
<td><input type="text" readonly name="sale[write_off][]" value="{$vo.write_off}" class="write_off"></td>
<td><input type="text" readonly name="sale[write_off_money][]" value="{$vo.write_off_money}" class="write_off_money"></td>
<td><input type="number" name="sale[write_off_price][]" value="{$vo.write_off_price}" class="write_off_price number_decimal"></td>
<td class="hiddens"><input type="text" readonly name="sale[purchase_type][]" class="purchase_type" value="{$vo.source_id}"></td>
<td class="hiddens"><input type="text" readonly name="sale[purchase_numbers][]" class="purchase_numbers" value="{$vo.purchase_number}"></td>
</tr>
{/if}
{/foreach}
{php}for($b=0;$b<(4-$a);$b++){ {/php}
<tr>
<td><div class="btn"><span class="add"><i class="fa fa-plus"></i></span><span class="del"><i class="fa fa-trash"></i></span></div></td>
<td><input type="text" readonly name="sale[purchase_number][]" class="purchase_number"></td>
<td><input type="text" readonly name="sale[business_type][]" class="business_type"></td>
<td><input type="text" readonly name="sale[times][]" class="times"></td>
<td><input type="text" readonly name="sale[sale_money][]" class="sale_money"></td>
<td><input type="text" readonly name="sale[write_off][]" class="write_off"></td>
<td><input type="text" readonly name="sale[write_off_money][]" class="write_off_money"></td>
<td><input type="number" name="sale[write_off_price][]" class="write_off_price number_decimal"></td>
<td class="hiddens"><input type="text" readonly name="sale[purchase_type][]" class="purchase_type"></td>
<td class="hiddens"><input type="text" readonly name="sale[purchase_numbers][]" class="purchase_numbers"></td>
</tr>
{php}}{/php}
<tr>
<td></td>
<td><div>合计:</div></td>
<td></td>
<td></td>
<td><input type="text" readonly class="sale_money_hj" value="{$sale_money_hj}"></td>
<td><input type="text" readonly class="write_off_hj" value="{$write_off_hj}"></td>
<td><input type="text" readonly class="write_off_money_hj" value="{$write_off_money_hj}"></td>
<td><input type="text" readonly class="write_off_price_hj" value="{$write_off_price_hj}"></td>
<td class="hiddens"></td>
<td class="hiddens"></td>
</tr>
</table>
</div>
</div>
<div class="row" style="margin-bottom: 10px;">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<textarea id="c-note" class="form-control" rows="4" name="row[note]" cols="30" placeholder="备注信息">{$row.remarks|default=''}</textarea>
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
|