|
@@ -4789,14 +4789,6 @@ class Sale extends Base
|
|
|
|
|
|
if (empty($order)) return error_show(1003, "数据未找到");
|
|
|
|
|
|
-// $orderCode= isset($this->post['spuCode'])&&$this->post['spuCode']!=''?trim($this->post['spuCode']):"";
|
|
|
-// if($orderCode==""){
|
|
|
-// return error_show(1003,"参数spuCode不能为空");
|
|
|
-// }
|
|
|
-// $order= Db::name("good_zixun")->where(["spuCode"=>$orderCode,"is_del"=>0])->find();
|
|
|
-// if(empty($order)){
|
|
|
-// return error_show(1003,"订单数据未找到");
|
|
|
-// }
|
|
|
$unit = Db::name("unit")->where(["id" => $order['unit_id']])->find();
|
|
|
if ($order['brand_id'] != 0) {
|
|
|
$brand = Db::name("brand")->where(["id" => $order['brand_id']])->find();
|
|
@@ -4818,10 +4810,18 @@ class Sale extends Base
|
|
|
$order['supplier_name'] = $supplier_temp['data'][$order['supplierNo']]??"";
|
|
|
$order["gold_price"] = isset($price['price']) ? $price['price'] : 0;
|
|
|
$order["noble_weight"] = isset($order['weight']) ? $order['weight'] : 0;
|
|
|
- $taxInfo=TaxCategory::where(['id'=>$order['tax_id']])->findOrEmpty();
|
|
|
- $order['tax_name'] = $taxInfo['cat_name']??'';
|
|
|
- $order['tax_short_name'] =$taxInfo['short_name']??'';
|
|
|
- $order['tax_code'] =$taxInfo['merge_code']??'';
|
|
|
+ $tax = TaxCategory::where(['id'=>[$info['tax_id'],$info['out_tax_id']]])->column('shot_name,cat_name,cat_code,merge_code','id');
|
|
|
+ $order['in_tax'] = $tax[$info['tax_id']]??[];
|
|
|
+ $order['out_tax'] = $tax[$info['out_tax_id']]??[];
|
|
|
+ $order['child'] =[];
|
|
|
+ if($order['is_combind']==1){
|
|
|
+ $order['child'] =ConsultTemp::where(['bidNo'=>$bidNo])->select()->each(function(&$item){
|
|
|
+ $tax = TaxCategory::where(['id'=>[$item['tax_id'],$item['out_tax_id']]])->column('shot_name,cat_name,cat_code,merge_code','id');
|
|
|
+ $item['in_tax'] = $tax[$item['tax_id']]??[];
|
|
|
+ $item['out_tax'] = $tax[$item['out_tax_id']]??[];
|
|
|
+ $item['specinfo'] = json_decode($item['specinfo'],true);
|
|
|
+ });
|
|
|
+ }
|
|
|
$good_info = Db::name('good_basic')
|
|
|
->field('id,createrid,creater')
|
|
|
->where('is_del',0)
|