Merge pull request '5.26功能上线' (#345) from feature/add_item into release

Reviewed-on: http://8.136.139.249:3000/wmtx/platform/pulls/345
master
郑永星 4 years ago
commit 19de7660c6

@ -406,7 +406,7 @@ class CompanyStatementOfflineController extends ThinkController
if (count($_REQUEST['info']) < 2) {
$this->error("未添加剩余打款金额");
}
// dump($_REQUEST['info']);die();
if(!isset($_REQUEST['info'])) $this->error("参数错误");
$info = $_REQUEST['info'];
$ydata = [];
@ -418,6 +418,11 @@ class CompanyStatementOfflineController extends ThinkController
foreach($info as $k=>$v){
$ydata = $CompanyInfo->where("id= '{$k}'")->find();
$sumPartInfo = M("company_statement_info_part","tab_")
->field("sum(statement_money) statement_money")
->where(['info_id'=>$k])
->find();
$company_info = json_decode($ydata['company_info'],true);
if($ydata['verify_status'] == 2){
$company_info['payee_name'] = $v['payee_name'];
@ -444,12 +449,14 @@ class CompanyStatementOfflineController extends ThinkController
// array_pop($info);
$id = $ydata["id"];
unset($ydata["id"]);
$sumUnPayAmount = array_sum(array_column($info,'unpay_amount'));
if ($sumUnPayAmount > $ydata['statement_money'] ) {
// dump($sumUnPayAmount+$sumPartInfo['statement_money']);die();
if (($sumUnPayAmount+$sumPartInfo['statement_money']) > $ydata['statement_money'] ) {
$this->error("剩余打款金额超过结算金额");
}

@ -167,14 +167,14 @@
<td></td>
<else />
<td></td>
<td><input data-index_num="2" type="text" class="txt paymentset" data-id="{$vo.id}" name="payee_name" value="{$vo.company_info.payee_name}" placeholder="银行帐户名"></td>
<td><input data-index_num="2" type="text" class="txt paymentset" data-id="{$vo.id}" name="bank_account" value="{$vo.company_info.bank_account}" placeholder="银行帐号"></td>
<td><input data-index_num="2" type="text" class="txt paymentset" data-id="{$vo.id}" name="opening_bank" value="{$vo.company_info.opening_bank}" placeholder="开户行"></td>
<td><input data-index_num="1" type="text" class="txt paymentset" data-id="{$vo.id}" name="payee_name" value="{$vo.company_info.payee_name}" placeholder="银行帐户名"></td>
<td><input data-index_num="1" type="text" class="txt paymentset" data-id="{$vo.id}" name="bank_account" value="{$vo.company_info.bank_account}" placeholder="银行帐号"></td>
<td><input data-index_num="1" type="text" class="txt paymentset" data-id="{$vo.id}" name="opening_bank" value="{$vo.company_info.opening_bank}" placeholder="开户行"></td>
</if>
<td>{$vo.statement_num}</td>
<td><input data-index_num="2" value="0" style="width: 80px;" type="number" onblur="if(value<0) value=0" data-id="{$vo.id}" name="unpay_amount" class="unpay_amount"></td>
<td><input data-index_num="2" type="text" class="txt paymentset unPayRemark" data-id="{$vo.id}" name="remark" value="" placeholder="备注"></td>
<td><input data-index_num="1" value="0" style="width: 80px;" type="number" onblur="if(value<0) value=0" data-id="{$vo.id}" name="unpay_amount" class="unpay_amount"></td>
<td><input data-index_num="1" type="text" class="txt paymentset unPayRemark" data-id="{$vo.id}" name="remark" value="" placeholder="备注"></td>
<td><a class="add_one" href="#">新增</a></td>
</tr>
<else />
@ -250,6 +250,7 @@
</div>
<script>
unPayAmount();
$("#setPayment").on("click",function(){
var sendObj = {};
var url = "{:U('editPartPayment')}";

Loading…
Cancel
Save