Merge pull request 'dev' (#368) from dev into main
Reviewed-on: https://gitea.lihaink.cn/mkm/multi-store/pulls/368
This commit is contained in:
commit
9d8cceb1e4
@ -145,6 +145,8 @@ class BeforehandOrderLists extends BaseAdminDataLists implements ListsSearchInte
|
|||||||
$address = '';
|
$address = '';
|
||||||
$arrival_time = '';
|
$arrival_time = '';
|
||||||
$pay_price = '';
|
$pay_price = '';
|
||||||
|
$warehousing_price='';
|
||||||
|
$outbound_price='';
|
||||||
if($export==2){
|
if($export==2){
|
||||||
if($item['order_sn']!=''){
|
if($item['order_sn']!=''){
|
||||||
$find=StoreOrder::where('order_id',$item['order_sn'])->field('paid,pay_type,pay_price')->find();
|
$find=StoreOrder::where('order_id',$item['order_sn'])->field('paid,pay_type,pay_price')->find();
|
||||||
@ -179,10 +181,18 @@ class BeforehandOrderLists extends BaseAdminDataLists implements ListsSearchInte
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($item['warehousing_id']>0){
|
if($item['warehousing_id']>0){
|
||||||
$order_rk=WarehouseOrder::where('id',$item['warehousing_id'])->value('code');
|
$warehouseOrder=WarehouseOrder::where('id',$item['warehousing_id'])->field('code,total_price')->find();
|
||||||
|
if($warehouseOrder){
|
||||||
|
$order_rk=$warehouseOrder['code'];
|
||||||
|
$warehousing_price=$warehouseOrder['total_price'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if($item['outbound_id']>0){
|
if($item['outbound_id']>0){
|
||||||
$order_ck=WarehouseOrder::where('id',$item['outbound_id'])->value('code');
|
$warehouseOrder=WarehouseOrder::where('id',$item['outbound_id'])->field('code,total_price')->find();
|
||||||
|
if($warehouseOrder){
|
||||||
|
$order_ck=$warehouseOrder['code'];
|
||||||
|
$outbound_price=$warehouseOrder['total_price'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$nickname = $item->other_data?->nickname??'';
|
$nickname = $item->other_data?->nickname??'';
|
||||||
$phone = $item->other_data?->phone??'';
|
$phone = $item->other_data?->phone??'';
|
||||||
@ -193,6 +203,8 @@ class BeforehandOrderLists extends BaseAdminDataLists implements ListsSearchInte
|
|||||||
$item['pay_type_name'] = $pay_type_name;
|
$item['pay_type_name'] = $pay_type_name;
|
||||||
$item['order_ck'] = $order_ck;
|
$item['order_ck'] = $order_ck;
|
||||||
$item['order_rk'] = $order_rk;
|
$item['order_rk'] = $order_rk;
|
||||||
|
$item['warehousing_price']=$warehousing_price;
|
||||||
|
$item['outbound_price']=$outbound_price;
|
||||||
$item['nickname'] = $nickname;
|
$item['nickname'] = $nickname;
|
||||||
$item['phone'] = $phone;
|
$item['phone'] = $phone;
|
||||||
$item['address'] = $address;
|
$item['address'] = $address;
|
||||||
@ -245,7 +257,9 @@ class BeforehandOrderLists extends BaseAdminDataLists implements ListsSearchInte
|
|||||||
'system_store' => '门店',
|
'system_store' => '门店',
|
||||||
'admin_name' => '门店',
|
'admin_name' => '门店',
|
||||||
'warehousing' => '入库',
|
'warehousing' => '入库',
|
||||||
|
'warehousing_price' => '入库金额',
|
||||||
'outbound' => '出库',
|
'outbound' => '出库',
|
||||||
|
'outbound_price' => '出库金额',
|
||||||
'total_price' => '总价',
|
'total_price' => '总价',
|
||||||
'admin_name' => '用户',
|
'admin_name' => '用户',
|
||||||
'mark' => '备注',
|
'mark' => '备注',
|
||||||
|
@ -279,4 +279,35 @@ class IndexController extends BaseApiController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notes 采购商品下载
|
||||||
|
*/
|
||||||
|
public function wps_product()
|
||||||
|
{
|
||||||
|
$data = $this->request->post();
|
||||||
|
if ($data) {
|
||||||
|
if ($data['product_id'] > 0) {
|
||||||
|
$find = Db::name('wps_product')->where('product_id', $data['product_id'])->find();
|
||||||
|
$arr = [];
|
||||||
|
if ($data['purchase'] > 0) {
|
||||||
|
$arr['purchase'] = $data['purchase'];
|
||||||
|
}
|
||||||
|
if ($data['cost'] > 0) {
|
||||||
|
$arr['cost'] = $data['cost'];
|
||||||
|
}
|
||||||
|
if ($data['price'] > 0) {
|
||||||
|
$arr['price'] = $data['price'];
|
||||||
|
}
|
||||||
|
if ($find) {
|
||||||
|
Db::name('wps_product')->where('id', $find['id'])->update($arr);
|
||||||
|
} else {
|
||||||
|
$arr['product_id']=$data['product_id'];
|
||||||
|
$arr['name']=$data['name'];
|
||||||
|
Db::name('wps_product')->insert($arr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return $this->fail('时间不能为空');
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user