edit.html 27.7 KB
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 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402
{include file="kuerp/common/menu" /}
<style>
    .number_td{
        display: none;
    }
</style>
<div class="">
    <a href="{:url('kuerp/prints/prints',['id'=>$row.id,'type'=>3])}" 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>
<div style="clear: both;"></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">{:__('Purchase_code')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-purchase_code" class="form-control" value="{$row.purchase_code|htmlentities}" data-rule="required" name="row[purchase_code]" type="text" placeholder="{:__('Purchase_code')}">
                    <input type="hidden" name="row[old_purchase_code]" value="{$row.purchase_code|htmlentities}">
                </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">{:__('Supplyer_code')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input type="hidden" id="supplyer_code" name="row[supplyer_code]" value="{$row.supplyer_code}">
                    <div id="supplyer_codes" class="xm-select-demo"></div>
                </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_time')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-purchase_time" class="form-control datetime" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[purchase_time]" type="text" value="{$row.purchase_time|date='Y-m-d',###}" placeholder="{:__('Purchase_time')}">
                </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-12" style="text-align: left;">
                    <a href="javascript:;" id="choseEnclosure" style="text-decoration: revert;">选择原始单据 </a>
                    <span>&nbsp;&nbsp;附单据<span class="enclosure_number">{$enclosure_count|default='0'}</span>张</span>
                    <span class="voucherAttachment" {if condition="!empty($enclosure_ids)"}style="display:inline-block;"{/if}><img src="/assets/addons/kuerp/img/voucherAttachment.png"></span>
                </label>
                <input id="c-enclosure" type="hidden" name="row[enclosure]" value="{$enclosure_ids|default=''}">
            </div>
        </div>
    </div>


    <div class="list" style="overflow-x: auto">
        {if condition="$row.examine_status==1 && isset($set['examine']['is_checked']) && $set['examine']['is_checked']==1"}
        <div id="mark" class="has-audit"></div>
        {/if}
        <table>
            <tr>
                <th class="{$exclass|default=''}">
                <th>
                    <span class="must">*</span>
                    商品
                    <span class="smq_switch">
                            <span>--扫码枪录入</span>
                            <span>
                                <input  id="c-switch" name="row[switch]" type="hidden" value="0">
                                <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-switch" data-yes="1" data-no="0" >
                                    <i class="fa fa-toggle-on text-success fa-2x fa-flip-horizontal text-gray"></i>
                                </a>
                            </span>
                        </span>
                </th>
                <th>{:__('Goods_note')}</th>
                <th class="goods_attr_sd">{:__('Goods_attr')}</th>
                <th>{:__('Goods_unit')}</th><th>{:__('Stores_id')}</th><th>{:__('Allow_stock')}</th><th>{:__('Allow_retreat')}</th>
                <th class="goods_batch_sd">批次</th><th class="goods_batch_sd">生产日期</th><th class="goods_batch_sd">保质期(天)</th><th class="goods_batch_sd">有效期至</th>
                <th class="number_td">{:__('Number')}</th><th>{:__('Retreat_number')}</th><th>{:__('Default_unit')}</th><th>{:__('Basic_nmber')}</th><th>{:__('Unit_price')}</th><th class="goods_tax_sd">{:__('Tax_included')}</th><th>{:__('Discount')}</th>
                <th>{:__('Dis_money')}</th><th>{:__('All_money')}</th><th class="goods_tax_sd">{:__('Tax_rate')}</th>
                <th class="goods_tax_sd">{:__('Tax_money')}</th><th class="goods_tax_sd">{:__('Money_tax_price')}</th>
                <th>{:__('Purchase_money')}</th><th>{:__('Remark')}</th><th>{:__('Purchase_order_id')}</th><th>{:__('Purchase_id')}</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>
                    <div class="goods_code_box">
                        <input type="hidden" name="row[goods_code][]" class="goods_code">
                        <span class="goods_code_span"><img src="__CDN__/assets/addons/kuerp/img/more.png"></span>
                        <input type="text" class="ipt goods_name">
                    </div>
                </td>
                <td><div><input type="text" name="row[goods_note][]" class="goods_note" readonly></div></td>
                <td class="goods_attr_sd">
                    <div>
                        <select name="row[goods_attr][]" class="form-control goods_attr">
                            <option value=""></option>
                        </select>
                    </div>
                </td>
                <td>
                    <div>
                        <select name="row[goods_unit][]" class="form-control goods_unit">
                            <option value=""></option>
                        </select>
                    </div>
                </td>
                <td>
                    <div>
                        <select name="row[stores_id][]" class="form-control stores_id">
                            <option value=""></option>
                            {foreach name="storesList" item="vo"}
                            <option value="{$vo.id}">{$vo.name}</option>
                            {/foreach}
                        </select>
                    </div>
                </td>
                <td><div><input type="number" name="row[allow_stock][]" class="allow_stock" readonly><input type="hidden" name="row[info_id][]" value=""></div></td>
                <td><div><input type="number" class="allow_retreat" readonly></div></td>

                <td class="goods_batch_sd">
                    <div>
                        <div class="batch_div">
                            <input name="row[batch][]" class="batch_sec" value="">
                            <input type="hidden" value="" name="row[batch_id][]" class="batch_id">
                            <span class="batch_span"><img src="__CDN__/assets/addons/kuerp/img/more.png"></span>
                        </div>
                    </div>
                </td>
                <td class="goods_batch_sd"><div><input type="text" class="ipt manufacture" name="row[manufacture][]"></div></td>
                <td class="goods_batch_sd"><div><input type="text" class="ipt guarantee" name="row[guarantee][]"></div></td>
                <td class="goods_batch_sd"><div><input type="text" class="ipt validity" name="row[validity][]"></div></td>

                <td class="number_td"><div><input type="number" name="row[number][]" class="number_decimal"></div></td>
                <td><div><input type="number" name="row[retreat_number][]" class="number number_decimal"><input type="hidden" class="period_period" name="row[period_period][]" value=''><input type="hidden" class="retreat_number_ipt" value=""></div></td>
                <td><div><input type="text" readonly class="default_unit"><input type="hidden" name="row[default_unit][]" class="default_unit_id"></div></td>
                <td><div><input type="number" name="row[basic_nmber][]" class="basic_nmber number_decimal" readonly></div></td>
                <td><div><input type="number" name="row[unit_price][]" class="unit_price price_decimal"></div></td>
                <td class="goods_tax_sd"><div><input type="number" name="row[tax_included][]" class="tax_included price_decimal" value=""></div></td>
                <td><div><input type="number" name="row[discount][]" class="discount"></div></td>
                <td><div><input type="number" name="row[dis_money][]" class="dis_money price_decimal"></div></td>
                <td><div><input type="number" name="row[all_money][]" class="all_money price_decimal"></div></td>
                <td class="goods_tax_sd"><div><input type="number" name="row[tax_rate][]" class="tax_rate" value=""></div></td>
                <td class="goods_tax_sd"><div><input type="number" name="row[tax_money][]" class="tax_money price_decimal" value=""></div></td>
                <td class="goods_tax_sd"><div><input type="number" name="row[money_tax_price][]" class="money_tax_price price_decimal" value=""></div></td>
                <td><div><input type="number" name="row[purchase_money][]" class="purchase_money price_decimal"></div></td>
                <td><div><input type="text" name="row[remark][]" class="remark"></div></td>
                <td><div><input type="text" name="row[purchase_order_id][]" readonly></div></td>
                <td><div><input type="text" name="row[purchase_id][]" class="purchase_id" readonly></div></td>
            </tr>
            {foreach name="purchase_info" item="info" key="k"}
            <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>
                    <div class="goods_code_box">
                        {foreach name="goodsList" item="vo"}
                        {if condition="$vo.goods_code==$info.goods_code"}{php}$shelf_life = $vo['shelf_life'];{/php}
                        <input type="hidden" name="row[goods_code][]" class="goods_code" value="{$vo.goods_code}">
                        <span class="goods_code_span"><img src="__CDN__/assets/addons/kuerp/img/more.png"></span>
                        <input type="text" class="ipt goods_name" value="{$vo.goods_code} {$vo.goods_name}">
                        {/if}
                        {/foreach}
                    </div>
                </td>
                <td><div><input type="text" name="row[goods_note][]" class="goods_note" value="{$info.goods_note|htmlentities}" readonly></div></td>
                <td class="goods_attr_sd">
                    <div>
                        <select name="row[goods_attr][]" class="form-control goods_attr">
                            <option value=""></option>
                            {foreach name="info.unit.attr" item="vo"}
                            <option value="{$vo.id}" {if condition="$vo.id==$info.goods_attr"}selected{/if}>{$vo.attr_name}</option>
                            {/foreach}
                        </select>
                    </div>
                </td>
                <td>
                    <div>
                        <select name="row[goods_unit][]" class="form-control goods_unit">
                            <option value=""></option>
                            {foreach name="info.unit.unit" item="vo"}
                            {if condition="$vo.id==$info.goods_unit"}{php}$unit_name=$vo['name'];{/php}{/if}
                            <option value="{$vo.id}" {if condition="$vo.id==$info.goods_unit"}selected{/if}>{$vo.name}</option>
                            {/foreach}
                        </select>
                    </div>
                </td>
                <td>
                    <div>
                        <select name="row[stores_id][]" class="form-control stores_id">
                            <option value=""></option>
                            {foreach name="storesList" item="vo"}
                            <option value="{$vo.id}" {if condition="$vo.id==$info.stores_id"}selected{/if}>{$vo.name}</option>
                            {/foreach}
                        </select>
                    </div>
                </td>
                <td><div><input type="number" name="row[allow_stock][]" value="{$info.allow_stock|htmlentities}" class="allow_stock" readonly><input type="hidden" name="row[info_id][]" value="{$info.purchase_info_id|htmlentities}"></div></td>
                <td><div><input type="number" class="allow_retreat number_decimal" readonly value="{$info.allow_retreat|default=''}"></div></td>

                <td class="goods_batch_sd">
                    <div>
                        <select name="row[batch][]" class="form-control batch_sec">
                            <option value=""></option>
                        </select>
                    </div>
                </td>
                <td class="goods_batch_sd"><div><input type="text" class="ipt manufacture" name="row[manufacture][]" value="{if condition="!empty($info['manufacture'])"}{$info.manufacture|date='Y-m-d',###}{/if}"></div></td>
                <td class="goods_batch_sd"><div><input type="text" class="ipt guarantee" name="row[guarantee][]" value="{if condition="!empty($info['manufacture'])"}{$info.guarantee|htmlentities}{/if}"></div></td>
                <td class="goods_batch_sd"><div><input type="text" class="ipt validity" name="row[validity][]" value="{if condition="!empty($info['validity'])"}{$info.validity|date='Y-m-d',###}{/if}"></div></td>

                <td class="number_td"><div><input type="number" name="row[number][]" value="{$info.number|htmlentities}"></div></td>
                <td><div>
                    <input type="number" name="row[retreat_number][]" class="retreat_number number number_decimal" value="{$info.retreat_number|htmlentities}">
                    <input type="hidden" class="period_period" name="row[period_period][]" value='{$info.period|default=""}'>
                    <input type="hidden" class="retreat_number_ipt" value="1">
                </div></td>
                <td><div><input type="text" readonly class="default_unit" value="{$unit_name|default=''}"><input type="hidden" value="{$info.default_unit|htmlentities}" name="row[default_unit][]" class="default_unit_id"></div></td>
                <td><div><input type="text" name="row[basic_nmber][]" class="basic_nmber" value="{$info.basic_nmber|htmlentities}" readonly></div></td>
                <td><div><input type="number" name="row[unit_price][]" class="unit_price price_decimal" value="{$info.unit_price|htmlentities}"></div></td>
                <td class="goods_tax_sd"><div><input type="number" name="row[tax_included][]" class="tax_included price_decimal" value="{$info.tax_included|htmlentities}"></div></td>
                <td><div><input type="number" name="row[discount][]" class="discount" value="{$info.discount|htmlentities}"></div></td>
                <td><div><input type="number" name="row[dis_money][]" class="dis_money price_decimal" value="{$info.dis_money|htmlentities}"></div></td>
                <td><div><input type="number" name="row[all_money][]" class="all_money price_decimal" value="{$info.all_money|htmlentities}"></div></td>
                <td class="goods_tax_sd"><div><input type="number" name="row[tax_rate][]" class="tax_rate" value="{$info.tax_rate|htmlentities}"></div></td>
                <td class="goods_tax_sd"><div><input type="number" name="row[tax_money][]" class="tax_money price_decimal" value="{$info.tax_money|htmlentities}"></div></td>
                <td class="goods_tax_sd"><div><input type="number" name="row[money_tax_price][]" class="money_tax_price price_decimal" value="{$info.money_tax_price|htmlentities}"></div></td>
                <td><div><input type="number" name="row[purchase_money][]" class="purchase_money price_decimal" value="{$info.purchase_money|htmlentities}"></div></td>
                <td><div><input type="text" name="row[remark][]" class="remark" value="{$info.remark|htmlentities}"></div></td>
                <td><div><input type="text" name="row[purchase_order_id][]" readonly value="{$info.purchase_order_id|htmlentities}"></div></td>
                <td><div><input type="text" name="row[purchase_id][]" class="purchase_id" readonly value="{$info.purchase_id|htmlentities}"></div></td>
            </tr>
            {/foreach}
            {php}for($a=0;$a<(4-sizeof($purchase_info));$a++){ {/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>
                    <div class="goods_code_box">
                        <input type="hidden" name="row[goods_code][]" class="goods_code">
                        <span class="goods_code_span"><img src="__CDN__/assets/addons/kuerp/img/more.png"></span>
                        <input type="text" class="ipt goods_name">
                    </div>
                </td>
                <td><div><input type="text" name="row[goods_note][]" class="goods_note" readonly></div></td>
                <td class="goods_attr_sd">
                    <div>
                        <select name="row[goods_attr][]" class="form-control goods_attr">
                            <option value=""></option>
                        </select>
                    </div>
                </td>
                <td>
                    <div>
                        <select name="row[goods_unit][]" class="form-control goods_unit">
                            <option value=""></option>
                        </select>
                    </div>
                </td>
                <td>
                    <div>
                        <select name="row[stores_id][]" class="form-control stores_id">
                            <option value=""></option>
                            {foreach name="storesList" item="vo"}
                            <option value="{$vo.id}">{$vo.name}</option>
                            {/foreach}
                        </select>
                    </div>
                </td>
                <td><div><input type="number" name="row[allow_stock][]" class="allow_stock" readonly><input type="hidden" name="row[info_id][]" value=""></div></td>
                <td><div><input type="number" class="allow_retreat" readonly></div></td>

                <td class="goods_batch_sd">
                    <div>
                        <div class="batch_div">
                            <input name="row[batch][]" class="batch_sec" value="">
                            <input type="hidden" value="" name="row[batch_id][]" class="batch_id">
                            <span class="batch_span"><img src="__CDN__/assets/addons/kuerp/img/more.png"></span>
                        </div>
                    </div>
                </td>
                <td class="goods_batch_sd"><div><input type="text" class="ipt manufacture" name="row[manufacture][]"></div></td>
                <td class="goods_batch_sd"><div><input type="text" class="ipt guarantee" name="row[guarantee][]"></div></td>
                <td class="goods_batch_sd"><div><input type="text" class="ipt validity" name="row[validity][]"></div></td>

                <td class="number_td"><div><input type="number" name="row[number][]" class="number_decimal"></div></td>
                <td><div><input type="number" name="row[retreat_number][]" class="number number_decimal"><input type="hidden" class="period_period" name="row[period_period][]" value=''><input type="hidden" class="retreat_number_ipt" value=""></div></td>
                <td><div><input type="text" readonly class="default_unit"><input type="hidden" name="row[default_unit][]" class="default_unit_id"></div></td>
                <td><div><input type="number" name="row[basic_nmber][]" class="basic_nmber number_decimal" readonly></div></td>
                <td><div><input type="number" name="row[unit_price][]" class="unit_price price_decimal"></div></td>
                <td class="goods_tax_sd"><div><input type="number" name="row[tax_included][]" class="tax_included price_decimal" value=""></div></td>
                <td><div><input type="number" name="row[discount][]" class="discount"></div></td>
                <td><div><input type="number" name="row[dis_money][]" class="dis_money price_decimal"></div></td>
                <td><div><input type="number" name="row[all_money][]" class="all_money price_decimal"></div></td>
                <td class="goods_tax_sd"><div><input type="number" name="row[tax_rate][]" class="tax_rate" value=""></div></td>
                <td class="goods_tax_sd"><div><input type="number" name="row[tax_money][]" class="tax_money price_decimal" value=""></div></td>
                <td class="goods_tax_sd"><div><input type="number" name="row[money_tax_price][]" class="money_tax_price price_decimal" value=""></div></td>
                <td><div><input type="number" name="row[purchase_money][]" class="purchase_money price_decimal"></div></td>
                <td><div><input type="text" name="row[remark][]" class="remark"></div></td>
                <td><div><input type="text" name="row[purchase_order_id][]" readonly></div></td>
                <td><div><input type="text" name="row[purchase_id][]" class="purchase_id" readonly></div></td>
            </tr>
            {php}}{/php}
        </table>
    </div>
    <div class="chose_goods_boxs"></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.note|htmlentities}</textarea>
        </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">{:__('Preferential_rate')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-preferential_rate" class="form-control" step="0.01" name="row[preferential_rate]" type="number" value="{$row.preferential_rate|htmlentities}" placeholder="{:__('Preferential_rate')}">
                </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">{:__('Preferential_money')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-preferential_money" class="form-control price_decimal" step="0.01" name="row[preferential_money]" type="number" value="{$row.preferential_money|htmlentities}" placeholder="{:__('Preferential_money')}">
                </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">{:__('Real_money')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-real_money" class="form-control" step="0.01" name="row[real_money]" type="number" value="{$row.real_money|htmlentities}" readonly placeholder="{:__('Real_money')}">
                </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">本次退款:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-retreat_money" class="form-control price_decimal" step="0.01" name="row[retreat_money]" type="number" value="{$row.retreat_money|htmlentities}" placeholder="本次退款">
                    <input id="c-arrearss" class="form-control" step="0.01" type="hidden" value="{$goods_purchase.arrears|default=''}">
                    <input id="c-pay_money" class="form-control" step="0.01" type="hidden" value="{$goods_purchase.pay_money|default=''}">
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-xs-12 col-sm-3 col-md-3 col-lg-3">
            <label class="control-label col-xs-12 col-sm-4">结算账户:</label>
            <div class="col-xs-12 col-sm-8">
                <select name="row[account]" id="account" class="form-control">
                    <option value="">请选择结算账户</option>
                    {foreach name="accountsList" item="vo"}
                    <option value="{$vo.id}" {if condition="$vo.id==$row.account"}selected{/if}>{$vo.account_coding} {$vo.account_name}</option>
                    {/foreach}
                </select>
                <input type="hidden" value="{$accountsDefault|default=''}" id="accountsDefault">
            </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">本次欠款:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-arrears" class="form-control" step="0.01" name="row[arrears]" type="number" value="{$row.arrears|htmlentities}" readonly placeholder="本次欠款">
                </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">总欠款:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-add_arrears" class="form-control" step="0.01" name="row[add_arrears]" type="number" value="{$row.all_arrears|htmlentities}" readonly placeholder="总欠款">
                </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">采购费用:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-costs" readonly class="form-control price_decimal" name="row[costs]" type="number" value="{$row.purchase_money|default=''}" placeholder="采购费用">
                    <input type="hidden" id="cost_data" name="row[cost_data]" value='{$row.cost_data|default=""}'>
                </div>
            </div>
        </div>
        <div class="col-xs-12 col-sm-3 col-md-3 col-lg-3">
            <div class="form-group">
                <div>
                    <button type="button" id="add_costs" class="btn btn-default btn-embossed">添加</button>
                    <button type="button" id="sharebtn" class="btn btn-default btn-embossed">分摊</button>
                </div>
            </div>
        </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>