付款详情-备货单

This commit is contained in:
2025-09-23 18:26:17 +08:00
parent 1d6caad7b0
commit 870bca5e57
@@ -4,6 +4,7 @@ namespace app\common\controller;
use app\common\controller\BaseController;
use app\common\model\Country;
use app\common\model\FinPaymentStock;
use app\common\model\SysAccount;
use app\common\model\SysCurrency;
use app\common\model\SysDictItem;
@@ -39,7 +40,7 @@ class FinPaymentApplyController extends BaseController
if (isset($data['account_id'])) //收款账号
$data['account_name'] = SysAccount::where('id', $data['account_id'])->first()->account_name;
if (isset($data['country_id'])) //付款来源国家
$data['country_name'] = Country::where('id', $data['currency_id'])->first()->cn_addr;
$data['country_name'] = Country::where('id', $data['country_id'])->first()->cn_addr;
if (isset($data['currency_id'])) //付款币种
$data['currency_name'] = SysCurrency::where('id', $data['currency_id'])->first()->currency_name;
if (isset($data['submit_files']))
@@ -68,7 +69,7 @@ class FinPaymentApplyController extends BaseController
if (isset($data['account_id'])) //收款账号
$data['account_name'] = SysAccount::where('id', $data['account_id'])->first()->account_name;
if (isset($data['country_id'])) //付款来源国家
$data['country_name'] = Country::where('id', $data['currency_id'])->first()->cn_addr;
$data['country_name'] = Country::where('id', $data['country_id'])->first()->cn_addr;
if (isset($data['currency_id'])) //付款币种
$data['currency_name'] = SysCurrency::where('id', $data['currency_id'])->first()->currency_name;
if (isset($data['submit_files']))
@@ -77,6 +78,14 @@ class FinPaymentApplyController extends BaseController
$data['created_at'] = date('Y-m-d H:i:s', $data['created_at']);
if (isset($data['updated_at']))
$data['updated_at'] = date('Y-m-d H:i:s', $data['updated_at']);
$finPaymentStock = FinPaymentStock::where('payment_apply_id', $data['id'])->get();
$stock = [];
foreach ($finPaymentStock as $v) {
$stock[$v['pi_no']] = ['pi_no' => $v['pi_no']];
$stock[$v['pi_no']]['stock_id'] = [$v['stock_id']];
}
$data['stock'] = $stock;
return $data;
}
}