Commit 843d3c3d by 朱继来

Merge branch 'master' of http://119.23.72.7/zhujilai/Order into zjl_exception_20181221

parents 4707b1b6 52ae82c6
......@@ -82,4 +82,12 @@ class ApiController extends Controller
private function ApiConfirmOrder($request){
echo (new PcbServerModel())->confirmOrder($request->user->userId,$request->input("purchase_id"),$request->input("status"));
}
//pcb后台点击采购确认
private function ApiOfflinePay($request){
echo (new PcbServerModel())->offlinePay($request->user->userId,$request->input("order_id"),$request->input("pay_money"));
}
//pcb后台点击采购确认
private function ApiSetOrderProduct($request){
echo (new PcbServerModel())->setOrdserProduct($request->user->userId,$request->input("purchase_id"));
}
}
......@@ -358,8 +358,8 @@ Class OrderController extends Controller
$info = $this->getOrderInfo($request, 1);
$info['title'] = '平台订单';
// 若为京东自营、自营客服、财务角色,则跳转到自营列表
if (in_array($info['role'], [6, 7, 9])) {
// 若为京东自营、自营客服角色,则跳转到自营列表
if (in_array($info['role'], [6, 7])) {
return redirect('self_order');
}
......
......@@ -6,6 +6,7 @@ use App\Http\Page;
use App\Map\PcbOrderInvoiceMap;
use App\Map\PcbOrderMap;
use App\Map\PcbOrderShippingMap;
use App\Map\PcbPurchaseMap;
use App\Model\PaymentDaysModel;
use App\Model\Pcb\PcbOrderModel;
use App\Model\Pcb\PcbPublicModel;
......@@ -107,8 +108,8 @@ class WebController extends Controller
//订单费用明细
$orderAuditDetail = $con->table('order_audit_detail')->where(['order_id' => $order_id])->first();
//采购审核意见备注
$orderAuditReason2 = $con->table('order_audit_reason')->where(['order_id' => $order_id,'type'=>2])->orderBy("id","desc")->first();
$orderAuditReason1 = $con->table('order_audit_reason')->where(['order_id' => $order_id,'type'=>1])->orderBy("id","desc")->first();
$orderAuditReason2 = $con->table('order_audit_reason')->where(['order_id' => $order_id,'type'=>2,'status'=>1])->orderBy("id","desc")->first();
$orderAuditReason1 = $con->table('order_audit_reason')->where(['order_id' => $order_id,'type'=>1,'status'=>1])->orderBy("id","desc")->first();
//订单详细信息
$orderInfo = $con->table('order_info')->where(['order_id' => $order_id])->first();
......@@ -185,7 +186,7 @@ class WebController extends Controller
private function PcbPurchaseList($request,$data,$id){
$data['title']='PCB交易列表';
$data['order_type'] = PcbOrderMap::$order_type;
$data['status'] = PcbOrderMap::$status;
$data['status'] = PcbPurchaseMap::$status;
//分页
$response = (new PcbPurchaseModel())->getList();
$page = new Page($response[3], 10);
......@@ -212,8 +213,8 @@ class WebController extends Controller
}
//采购信息
$purchase = $con->table('purchase')->where(['order_id' => $order_id])->first();
//订单费用明细
$orderAuditDetail = $con->table('order_audit_detail')->where(['order_id' => $order_id])->first();
//采购费用明细
$purchaseAuditDetail = $con->table('purchase_audit_detail')->where(['purchase_id' => $purchase_id])->first();
//订单详细信息
$orderInfo = $con->table('order_info')->where(['order_id' => $order_id])->first();
//订单发票信息
......@@ -221,14 +222,13 @@ class WebController extends Controller
//物流信息
$shipping = $con->table('shipping')->where(['relevance_id' => $purchase_id,'shipping_type'=>3])->first();
//供应商审核结果
$orderAuditReason2 = $con->table('order_audit_reason')->where(['order_id' => $order_id,'type'=>2])->orderBy("id","desc")->first();
$orderAuditReason2 = $con->table('order_audit_reason')->where(['order_id' => $order_id,'type'=>2,'status'=>1])->orderBy("id","desc")->first();
//查询操作日志
$actionLog = $con->table("action_log")->where(["type"=>1,'oid'=>$order_id])->orderBy("id","desc")->get();
//拼接基本信息
$orderBase = objectToArray($orderBase);
$orderBase['order_type'] = PcbOrderMap::$order_type[$orderBase['order_type']];
$orderBase['status_name'] = PcbOrderMap::$status[$orderBase['status']];
$orderBase['create_time'] = $orderBase['create_time'] > 0 ? date('Y-m-d H:i:s',$orderBase['create_time']) : "";
$orderBase['finish_time'] = $orderBase['finish_time'] > 0 ? date('Y-m-d H:i:s',$orderBase['finish_time']) : "";
$orderBase['pay_time'] = $orderBase['pay_time'] > 0 ? date('Y-m-d H:i:s',$orderBase['pay_time']) : "";
......@@ -240,7 +240,9 @@ class WebController extends Controller
$purchase = objectToArray($purchase);
$purchase['shipping_time'] = $purchase['shipping_time'] > 0 ? date('Y-m-d H:i:s',$purchase['shipping_time']) : "";
$purchase['purchase_amount'] = $purchase['purchase_amount'] > 0 ? $purchase['purchase_amount'] : "";
$purchase['pay_time'] = $purchase['pay_time'] > 0 ? date('Y-m-d H:i:s',$purchase['pay_time']): "";
$purchase['order_pay_type'] = PcbOrderMap::$order_pay_type[$purchase['order_pay_type']];
$purchase['status_name'] = @PcbPurchaseMap::$status[$purchase['status']];
if($purchase['purchase_amount'] == 0){
$orderBase['tiaojia'] = "";
}else{
......@@ -258,7 +260,7 @@ class WebController extends Controller
$data['orderBase'] = $orderBase;
$data['purchase'] = $purchase;
$data['liexinInfo'] = config("params.liexin_info");
$data['orderAuditDetail'] = objectToArray($orderAuditDetail);
$data['purchaseAuditDetail'] = objectToArray($purchaseAuditDetail);
$data['orderAuditReason2'] = objectToArray($orderAuditReason2);
$data['orderInfo'] = objectToArray($orderInfo);
$data['orderInvoice'] = $orderInvoice;
......
......@@ -18,7 +18,6 @@ class PcbOrderMap{
"15"=>"已发货给客户",
"20"=>"交易完成",
];
/*
* 支付方式
*/
......
<?php
namespace App\Map;
class PcbPurchaseMap{
//类型 :1付预付款单 2退预付款单 3收款 4付款
//订单状态
public static $status=[
"-1"=>"已取消",
"2"=>"采购中",
"3"=>"采购完成待确认",
"4"=>"确认不通过",
"5"=>"确认通过",
"12"=>"生产中",
"13"=>"生产完成",
"14"=>"已发货到猎芯",
"15"=>"猎芯已收货",
"20"=>"交易完成",
];
}
\ No newline at end of file
......@@ -237,7 +237,7 @@ class OrderModel extends Model
})
->where('it.status', '<>', -1)
->where('o.order_goods_type', '=', $map['order_goods_type'])
->select('it.goods_id', 'it.goods_name', 'it.goods_number', 'it.goods_price', 'it.single_pre_price', 'it.brand_name', 'it.supplier_name', 'o.order_id', 'o.order_sn', 'o.order_pay_type', 'o.order_goods_type', 'o.order_source', 'o.create_time', 'o.status', 'o.order_amount', 'o.currency', 'o.sale_id', 'o.cancel_reason', 'i.tax_title', 'i.inv_type', 'i.invoice_status', 'i.tax_title', 'i.company_address', 'i.company_phone', 'i.tax_no', 'i.bank_name', 'i.bank_account', 'a.consignee', 'a.address', 's.status as shipping_status', 'u.user_id', 'u.mobile', 'u.email', 'u.client_source', 'u.is_new', 'c.com_name', 'oe.send_remark', 'oe.is_new as is_new_order')
->select('it.goods_id', 'it.goods_name', 'it.goods_number', 'it.goods_price', 'it.single_pre_price', 'it.brand_name', 'it.supplier_name', 'it.order_source as items_source', 'o.order_id', 'o.order_sn', 'o.order_pay_type', 'o.order_goods_type', 'o.order_source', 'o.create_time', 'o.status', 'o.order_amount', 'o.currency', 'o.sale_id', 'o.cancel_reason', 'i.tax_title', 'i.inv_type', 'i.invoice_status', 'i.tax_title', 'i.company_address', 'i.company_phone', 'i.tax_no', 'i.bank_name', 'i.bank_account', 'a.consignee', 'a.address', 's.status as shipping_status', 'u.user_id', 'u.mobile', 'u.email', 'u.client_source', 'u.is_new', 'c.com_name', 'oe.send_remark', 'oe.is_new as is_new_order')
->groupBy('it.rec_id')
->orderBy('o.create_time', 'DESC')
->get()
......@@ -249,9 +249,9 @@ class OrderModel extends Model
// 标题
if ($map['order_goods_type'] == 1) {
$headerCell = ['订单ID', '订单编号', '会员账号', '是否为新订单', '收货人', '下单日期', '下单时间', '客户名称', '商品型号', '制造商', '供应商', '数量', '单价', '均摊后单价', '商品小计', '币种', $sale_name, '商品总额', '运费', '附加费', '优惠券', '订单总额', '订单类型', '订单状态', '发货状态', '收货地址', '发票类型', '发票状态', '发票抬头', '公司注册地址', '公司电话', 'adtags来源', '新用户来源', '取消原因', '推送备注'];
$headerCell = ['订单ID', '订单编号', '会员账号', '是否为新订单', '收货人', '下单日期', '下单时间', '客户名称', '明细来源', '商品型号', '制造商', '供应商', '数量', '单价', '均摊后单价', '商品小计', '币种', $sale_name, '商品总额', '运费', '附加费', '优惠券', '订单总额', '订单类型', '订单状态', '发货状态', '收货地址', '发票类型', '发票状态', '发票抬头', '公司注册地址', '公司电话', 'adtags来源', '新用户来源', '取消原因', '推送备注'];
} else {
$headerCell = ['订单ID', '订单编号', '会员账号', '收货人', '下单日期', '下单时间', '客户名称', '商品型号', '制造商', '供应商', '数量', '单价', '均摊后单价', '商品小计', '币种', $sale_name, '商品总额', '运费', '附加费', '优惠券', '订单总额', '订单类型', '订单状态', '发货状态', '收货地址', '发票类型', '发票状态', '发票抬头', '公司注册地址', '公司电话', 'adtags来源', '新用户来源', '取消原因', '推送备注'];
$headerCell = ['订单ID', '订单编号', '会员账号', '收货人', '下单日期', '下单时间', '客户名称', '明细来源', '商品型号', '制造商', '供应商', '数量', '单价', '均摊后单价', '商品小计', '币种', $sale_name, '商品总额', '运费', '附加费', '优惠券', '订单总额', '订单类型', '订单状态', '发货状态', '收货地址', '发票类型', '发票状态', '发票抬头', '公司注册地址', '公司电话', 'adtags来源', '新用户来源', '取消原因', '推送备注'];
}
array_unshift($cellData, $headerCell);
......@@ -345,6 +345,8 @@ class OrderModel extends Model
$tmp[$i]['create_time_date'] = date('Y-m-d', $order[$i]['create_time']);
$tmp[$i]['create_time_sec'] = date('H:i:s', $order[$i]['create_time']);
$tmp[$i]['com_name'] = !empty($order[$i]['tax_title']) ? $order[$i]['tax_title'] : $order[$i]['com_name'];
$tmp[$i]['items_source'] = $order[$i]['items_source'];
// 自营商品名称换成商品型号
$tmp[$i]['goods_name'] = $order[$i]['order_goods_type'] == 1 ? $order[$i]['goods_name'] : $this->getGoodsName($order[$i]['goods_id']);
$tmp[$i]['brand_name'] = $order[$i]['brand_name'];
......
......@@ -3,6 +3,7 @@
namespace App\Model\Pcb;
use App\Map\PcbOrderMap;
use App\Map\PcbPurchaseMap;
use Illuminate\Database\Eloquent\Model;
use Request;
use DB;
......@@ -72,7 +73,7 @@ class PcbPurchaseModel extends Model
$v['order_pay_type'] = PcbOrderMap::$order_pay_type[$v['order_pay_type']];
$v['order_type'] = PcbOrderMap::$order_type[$v['order_type']];
$v['status_name'] = PcbOrderMap::$status[$v['status']];
$v['status_name'] = @PcbPurchaseMap::$status[$v['status']];
$v['create_time'] = date('Y-m-d H:i:s',$v['create_time']);
$v['pay_time'] = $v['pay_time'] > 0 ? date('Y-m-d H:i:s',$v['pay_time']) : "";
$shipping = $con->table('shipping')->where(['relevance_id' => $v['order_id'],'shipping_type'=>1])->first();
......
......@@ -37,10 +37,42 @@ class PcbServerModel
'status'=> $status ,
];
$res = curlApi($this->PcbUrl.'/pcb/adminapi/confirmOrder',$param,'POST');
$json = json_decode($res);
$json = json_decode($res,true);
if ($json['err_code'] == 0){
PcbActionLogModel::log(1,'confirm_order',"采购确认","",$purchase_id,$admin_id);
}
return $res;
}
/*
*线下支付
* @param int $order_id 订单id
* @param int $status 状态
*/
public function offlinePay($admin_id,$order_id,$pay_money){
$param = [
'order_id'=> $order_id ,
'pay_money'=> $pay_money ,
];
$res = curlApi($this->PcbUrl.'/pcb/adminapi/offline_payment',$param,'POST');
$json = json_decode($res,true);
if ($json['err_code'] == 0){
PcbActionLogModel::log(1,'offline_payment',"线下支付",$order_id,$admin_id);
}
return $res;
}
/*
* 确定货已入库
* @param int $purchase_id 采购ID
*/
public function setOrdserProduct($admin_id,$purchase_id){
$param = [
'purchase_id'=> $purchase_id ,
];
$res = curlApi($this->PcbUrl.'/pcb/adminapi/setOrderProduct',$param,'POST');
$json = json_decode($res,true);
if ($json['err_code'] == 0){
PcbActionLogModel::log(1,'setOrderProduct',"确定货已入库",$purchase_id,$admin_id);
}
return $res;
}
}
\ No newline at end of file
......@@ -10,7 +10,7 @@ return [
'search'=> 'http://' . env('LOGIN_DOMAIN', '') . '/api/search',
],
'domain' => 'liexin.com',
'domain' => 'liexin.net',
// 订单系统
'order_url' => 'http://order.liexin.net',
......
......@@ -101,7 +101,18 @@ layui.use(['table','form','element','layer', 'laydate'], function() {
content: $("#sendPurchase")
});
}))
//线下支付
form.on('submit(OfflinePay)',(function (data) {
$("#offline_order_id").val($(this).attr("order_id"))
$("#offline_order_sn").val($(this).attr("order_sn"))
layer.open({
type: 1,
title:"线下支付",
skin: 'layui-layer-rim', //加上边框
area: ['420px', '260px'], //宽高
content: $("#OfflinePay")
});
}))
//关闭订单
form.on('submit(ClosePurchase)',(function () {
var picking_id = $(this).attr('picking_id')
......@@ -185,3 +196,30 @@ function AddPurchase(order_id) {
})
return false;
}
//线下支付
function OfflinePay() {
layer.msg('加载中', {
icon: 16
,shade: 0.01
});
$.ajax({
url:'/api/ApiOfflinePay',
type:'post',
data:{"order_id":$("#offline_order_id").val(),"pay_money":$("#pay_money").val()},
async: false,
dataType:'json',
timeout:10000,
success:function (res) {
if(res.err_code == 0){
alert_succ(res.err_msg,function () {
window.location.href='/web/PcbOrderList';
})
}else{
alert_err(res.err_msg)
}
},
done:function () {
layer.closeAll();
}
})
}
\ No newline at end of file
......@@ -101,6 +101,7 @@ function confirmOrder(purchase_id) {
confirmOrder2(purchase_id,-1); //不通过
});
}
//采购确认
function confirmOrder2(purchase_id,status) {
$.ajax({
url:'/api/ApiConfirmOrder',
......@@ -111,12 +112,34 @@ function confirmOrder2(purchase_id,status) {
timeout:10000,
success:function (res) {
if(res.err_code == 0){
alert_succ(res.errmsg,function () {
alert_succ(res.err_msg,function () {
window.location.reload()
})
}else{
alert_err(res.err_msg)
}
}
})
}
//货已到猎芯
function setOrderProduct(purchase_id) {
alert_confirm("确认货已入库?",function () {
$.ajax({
url:'/api/ApiSetOrderProduct ',
type:'post',
data:{"purchase_id":purchase_id},
async: false,
dataType:'json',
timeout:10000,
success:function (res) {
if(res.err_code == 0){
alert_succ(res.err_msg,function () {
window.location.reload()
})
}else{
alert_err(res.errmsg)
alert_err(res.err_msg)
}
}
})
})
}
\ No newline at end of file
......@@ -404,6 +404,7 @@
$('.shop-table').delegate('.goods_num', 'blur', function() {
var self = $(this);
var num = self.val();
var min_buy = Number(self.parents('tr').attr('min_buy'));
var cart_id = self.parents('tr').data('cid');
var type = self.parents('tr').data('type');
var user_id = 0;
......@@ -415,8 +416,16 @@
user_id = internal_uid ? internal_uid : user_id;
if (num < min_buy) {
num = min_buy;
layer.msg('购买数量低于最小起订量,默认调整为最小起订量');
}
if (goods_type == 1) { // 联营需要选择交货地
delivery_place = $('input[name=delivery_place]:checked').val();
} else { // 自营数量需要结合倍数
var mpl = Number(self.parents('tr').find('.goods_mpl').text()); // 倍数
num = Math.ceil(num / mpl) * mpl;
}
$.ajax({
......@@ -724,12 +733,17 @@
if (len > 0) {
// 购物车列表
for (var i = 0; i < len; i++) {
html += '<tr data-cid="'+list[i].cart_id+'" data-type="'+list[i].type+'">'+
html += '<tr data-cid="'+list[i].cart_id+'" data-type="'+list[i].type+'" min_buy="'+list[i].min_buy+'">'+
'<td>'+(i+1)+'</td>'+
'<td class="goods_id">'+list[i].goods_id+'</td>'+
'<td>'+list[i].goods_name+'</td>'+
'<td>'+list[i].brand_name+'</td>'+
'<td><input type="text" class="goods_num" name="goods_num" value="'+list[i].goods_number+'"></td>'+
'<td>'+list[i].brand_name+'</td>';
if (goods_type == 2) {
html += '<td><span class="goods_mpl">'+list[i].mpl+'</span></td>';
}
html += '<td><input type="text" class="goods_num" name="goods_num" value="'+list[i].goods_number+'"></td>'+
'<td class="goods_price">'+list[i].goods_price+'</td>'+
'<td class="goods_amount">'+list[i].goods_amount_format+'</td>'+
'<td>'+list[i].delivery_time+'</td>'+
......@@ -748,6 +762,41 @@
var address_id = $('.address_id').val();
self.confirm(user_id, address_id, cart_ids, user_coupon_id, goods_type, is_online); // 确认订单信息
}
// 自营商品检查数量
if (goods_type == 2) {
var changeGoods = [];
$('.shop-table tbody tr').each(function() {
var goods_id = $(this).find('.goods_id').text();
var num = Number($(this).find('.goods_num').val());
var mpl = Number($(this).find('.goods_mpl').text());
var cart_id = $(this).data('cid');
var type = $(this).data('type');
if (num % mpl != 0) {
num = Math.ceil(num / mpl) * mpl;
$.ajax({
type: "POST",
url: '/ajax/changeNum',
data: {uid: user_id, num: num, cart_id: cart_id, type: type, goods_type: goods_type},
dataType: "json",
async: false,
success: function(resp){
if (resp.errcode == 0) {
changeGoods.push(goods_id);
}
},
})
}
})
if (changeGoods.length > 0) {
layer.alert('已按倍数调整购买数量,商品ID:'+changeGoods.join(', '));
self.lists(user_id, goods_type, is_online, delivery_place); // 加载购物车列表
}
}
} else {
$('.shop-lists').hide();
......
......@@ -19,8 +19,8 @@
<th>会员账号</th>
<th>交易订单编号</th>
<th>是否调价</th>
<th>订单金额</th>
<th>调整后金额</th>
<th>订单金额(含税10%)</th>
<th>调整后金额(含税10%)</th>
<th>订单状态</th>
</tr>
<tr>
......@@ -33,7 +33,7 @@
</tr>
<tr class="c2">
<th>订单类型</th>
<th>是否返单</th>
<th>支付方式</th>
<th>公司名称</th>
<th>Adtag或其它</th>
<th>下单时间</th>
......@@ -41,27 +41,27 @@
</tr>
<tr >
<td><?= @$orderBase['order_type'] ?></td>
<td><?= $orderBase['is_return_order'] ? "是" : "否" ?></td>
<td><?= $orderBase['order_pay_type'] ?></td>
<td><?= $orderBase['company_name'] ?></td>
<td><?= @$orderBase['adtag'] ?></td>
<td><?= @$orderBase['create_time'] ?></td>
<td><?= @$orderBase['pay_time'] ?></td>
</tr>
<tr >
<th class="c2">支付方式</th>
<th class="c2">采购订单编号</th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
<tr style="height: 30px;">
<td><?= $orderBase['order_pay_type'] ?></td>
<td><?= @$purchase['purchase_sn'] ?></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
......@@ -219,15 +219,21 @@
<th>内层铜厚</th>
<th>生产周期</th>
<th>交货日期</th>
<th></th>
<th>板材</th>
</tr>
<tr>
<td><?= @$orderInfo['surface'] ?></td>
<td><?= $orderInfo['via_process'] ?></td>
<td><?= $orderInfo['copper_thickness'] ?></td>
<td><?= $orderInfo['inside_copper_thickness'] ?></td>
<td><?= @$orderAuditDetail['text'] ?></td>
<td><?= $purchase['finish_time'] ?></td>
<td></td>
<td><?= $orderInfo['material'] ?></td>
</tr>
<tr class="c2">
<th>过孔</th>
</tr>
<tr>
<td><?= $orderInfo['min_hole_size'].'mm' ?></td>
</tr>
<tr>
<th class="c2">其他要求</th>
......@@ -292,13 +298,13 @@
<tr>
<td><?= $orderAuditDetail['pcb_ccf_net'] ?></td>
<td><?= $orderAuditDetail['pcb_jjf_net'] ?></td>
<td><?= $orderAuditDetail['pcb_sf_net'] ?></td>
<td><?= $orderBase['invoice_type'] > 0 ? $orderAuditDetail['price']*0.1 : 0; ?></td>
<td><?= $orderAuditDetail['pcb_kdf_net'] ?></td>
<td><?= $orderAuditDetail['pcb_other_net'] ?></td>
<td></td>
</tr>
<tr>
<th class="c2">总计</th>
<th class="c2">总计(含税10%)</th>
<th colspan="2"><?= $orderBase['order_amount'] ?></th>
<th class="c2">获得积分</th>
<th colspan="2"><?= $orderBase['integral'] ?></th>
......
......@@ -98,8 +98,8 @@
<th class="pl30" style="background-color: #f2f2f2">交易订单编号</th>
<th class="pl30" style="background-color: #f2f2f2">采购订单编号</th>
<th class="pl30" style="background-color: #f2f2f2">是否调价</th>
<th class="pl30" style="background-color: #f2f2f2">订单金额</th>
<th class="pl30" style="background-color: #f2f2f2">调整后订单金额</th>
<th class="pl30" style="background-color: #f2f2f2">订单金额(含税10%)</th>
<th class="pl30" style="background-color: #f2f2f2">调整后订单金额(含税10%)</th>
<th class="pl30" style="background-color: #f2f2f2">订单状态</th>
<th class="pl30" style="background-color: #f2f2f2">订单类型</th>
<th class="pl30" style="background-color: #f2f2f2">支付方式</th>
......@@ -128,6 +128,8 @@
<button class="btn btn-xs btn-outline btn-danger" lay-submit="" order_id="<?= $v['order_id'] ?>" order_sn="<?= $v['order_sn'] ?>" onclick="AddPurchase(<?= $v['order_id'] ?>)">发起采购</button> &nbsp;&nbsp;
<?php } if($v['status'] == 14 && $v['shipping_time'] == 0) { ?>
<button class="btn btn-xs btn-outline btn-danger" lay-submit="" order_id="<?= $v['order_id'] ?>" order_sn="<?= $v['order_sn'] ?>" lay-filter="SendPurchase">发货</button>
<?php } if($v['status'] == 10) { //待支付 ?>
<button class="btn btn-xs btn-outline btn-danger" lay-submit="" order_id="<?= $v['order_id'] ?>" order_sn="<?= $v['order_sn'] ?>" lay-filter="OfflinePay">线下支付</button>
<?php } ?>
</div>
</td>
......@@ -171,7 +173,7 @@
<?php echo $page; ?>
</div>
<!--弹出层-->
<!--弹出层填写快递单号-->
<div id="sendPurchase" style="display: none">
<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;配送快递:&nbsp;&nbsp;
<select type='text' style='width: 200px;height: 30px;' id="shipping_id">
......@@ -181,6 +183,14 @@
</select><br/><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;快递单号:&nbsp;&nbsp;<input type='text' id="shipping_no" style='width: 200px;height: 30px;' ><br/><br/>
<input type='hidden' id='sure_order_id'> <input type='hidden' id='sure_order_sn'>
&nbsp;&nbsp;&nbsp;&nbsp;<button class='layui-btn' onclick='SendStock()' style="margin-left: 130px;">确定发货</button>
&nbsp;&nbsp;&nbsp;&nbsp;<button class='layui-btn' onclick='SendStock()' style="margin-left: 130px;">确定</button>
</div>
<!--弹出层线下支付-->
<div id="OfflinePay" style="display: none">
<br/><br/>
&nbsp;&nbsp;&nbsp;付款金额:&nbsp;&nbsp;<input type='text' id="pay_money" style='width: 200px;height: 30px;' ><br/><br/>
<input type='hidden' id='offline_order_id'> <input type='hidden' id='offline_order_sn'>
&nbsp;&nbsp;&nbsp;&nbsp;<button class='layui-btn' onclick='OfflinePay()' style="margin-left: 130px;">确定</button>
</div>
......@@ -18,9 +18,9 @@
<th>采购订单编号</th>
<th>交易订单编号</th>
<th>是否调价</th>
<th>调整前订单金额</th>
<th>调整后金额</th>
<th>订单状态</th>
<th>调整前订单金额(含税10%)</th>
<th>调整后金额(含税10%)</th>
<th>采购状态</th>
</tr>
<tr>
<td><?= @$purchase['purchase_sn'] ?></td>
......@@ -28,7 +28,7 @@
<td><?= @$orderBase['tiaojia'] ?></td>
<td><?= @$orderBase['order_amount'] ?></td>
<td><?= @$purchase['purchase_amount']; ?></td>
<td><?= @$orderBase['status_name'] ?></td>
<td><?= @$purchase['status_name'] ?></td>
</tr>
<tr>
<th class="c2">订单类型</th>
......@@ -41,7 +41,7 @@
<tr>
<td><?= @$orderBase['order_type'] ?></td>
<td><?= @$orderBase['create_time'] ?></td>
<td><?= @$orderBase['pay_time'] ?></td>
<td><?= @$purchase['pay_time'] ?></td>
<td><?= @$purchase['order_pay_type'] ?></td>
<td></td>
</tr>
......@@ -169,15 +169,21 @@
<th class="c2">内层铜厚</th>
<th class="c2">生产周期</th>
<th class="c2">交货日期</th>
<th></th>
<th>板材</th>
</tr>
<tr>
<td><?= @$orderInfo['surface'] ?></td>
<td><?= $orderInfo['via_process'] ?></td>
<td><?= $orderInfo['copper_thickness'] ?></td>
<td><?= @$orderAuditDetail['text'] ?></td>
<td><?= $purchase['finish_time'] ?></td>
<td></td>
<td><?= $orderInfo['inside_copper_thickness'] ?></td>
<td><?= @$purchaseAuditDetail['text'] ?></td>
<td><?= $purchase['finish_time'] > 0 ? date("Y-m-d H:i:s",$purchase['finish_time']) : "" ?></td>
<td><?= $orderInfo['material'] ?></td>
</tr>
<tr class="c2">
<th>过孔</th>
</tr>
<tr>
<td><?= $orderInfo['min_hole_size'].'mm' ?></td>
</tr>
<tr>
<th class="c2">其他要求</th>
......@@ -220,12 +226,12 @@
<th>颜色费</th>
</tr>
<tr>
<td><?= $orderAuditDetail['pcb_gcf_net'] ?></td>
<td><?= $orderAuditDetail['pcb_pinban_net'] ?></td>
<td><?= $orderAuditDetail['pcb_bf_net'] ?></td>
<td><?= $orderAuditDetail['pcb_flf_net'] ?></td>
<td><?= $orderAuditDetail['pdf_net'] ?></td>
<td><?= $orderAuditDetail['pcb_ysf_net'] ?></td>
<td><?= $purchaseAuditDetail['pcb_gcf_net'] ?></td>
<td><?= $purchaseAuditDetail['pcb_pinban_net'] ?></td>
<td><?= $purchaseAuditDetail['pcb_bf_net'] ?></td>
<td><?= $purchaseAuditDetail['pcb_flf_net'] ?></td>
<td><?= $purchaseAuditDetail['pdf_net'] ?></td>
<td><?= $purchaseAuditDetail['pcb_ysf_net'] ?></td>
</tr>
<tr>
<th class="c2">测试费</th>
......@@ -236,16 +242,16 @@
<th></th>
</tr>
<tr>
<td><?= $orderAuditDetail['pcb_ccf_net'] ?></td>
<td><?= $orderAuditDetail['pcb_jjf_net'] ?></td>
<td><?= $orderAuditDetail['pcb_sf_net'] ?></td>
<td><?= $orderAuditDetail['pcb_kdf_net'] ?></td>
<td><?= $orderAuditDetail['pcb_other_net'] ?></td>
<td><?= $purchaseAuditDetail['pcb_ccf_net'] ?></td>
<td><?= $purchaseAuditDetail['pcb_jjf_net'] ?></td>
<td><?= $purchaseAuditDetail['pcb_sf_net'] ?></td>
<td><?= $purchaseAuditDetail['pcb_kdf_net'] ?></td>
<td><?= $purchaseAuditDetail['pcb_other_net'] ?></td>
<td></td>
</tr>
<tr>
<th class="c2">总计</th>
<th colspan="2"><?= $orderBase['order_amount'] ?></th>
<th colspan="2"><?= $purchaseAuditDetail['price'] ?></th>
<th class="c2">获得积分</th>
<th colspan="2"><?= $orderBase['integral'] ?></th>
</tr>
......
......@@ -29,7 +29,7 @@
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">订单状态:</label>
<label class="layui-form-label">采购状态:</label>
<div class="layui-input-inline">
<div class="layui-input-inline payment-status" style="width: 800px !important;">
<input type="hidden" name="status" value="">
......@@ -76,9 +76,9 @@
<th class="pl30" style="background-color: #f2f2f2">交易订单编号</th>
<th class="pl30" style="background-color: #f2f2f2">采购订单编号</th>
<th class="pl30" style="background-color: #f2f2f2">是否调价</th>
<th class="pl30" style="background-color: #f2f2f2">订单金额</th>
<th class="pl30" style="background-color: #f2f2f2">调整后订单金额</th>
<th class="pl30" style="background-color: #f2f2f2">订单状态</th>
<th class="pl30" style="background-color: #f2f2f2">订单金额(含税10%)</th>
<th class="pl30" style="background-color: #f2f2f2">调整后订单金额(含税10%)</th>
<th class="pl30" style="background-color: #f2f2f2">采购状态</th>
<th class="pl30" style="background-color: #f2f2f2">订单类型</th>
<th class="pl30" style="background-color: #f2f2f2">支付方式</th>
<th class="pl30" style="background-color: #f2f2f2">下单时间</th>
......@@ -104,6 +104,9 @@
<?php if($v['status'] == 3 ) {?>
<button class="btn btn-xs btn-outline btn-danger" lay-submit="" order_id="{{ $v['purchase_id'] }}" order_sn="{{ $v['purchase_sn'] }}" onclick="confirmOrder({{ $v['purchase_id'] }})">采购确认</button>
<?php } ?>
<?php if($v['status'] == 13 ) {?>
<button class="btn btn-xs btn-outline btn-danger" lay-submit="" order_id="{{ $v['purchase_id'] }}" order_sn="{{ $v['purchase_sn'] }}" onclick="setOrderProduct({{ $v['purchase_id'] }})">确认入库</button>
<?php } ?>
</div>
</td>
</tr>
......
......@@ -186,10 +186,11 @@
<th width="15%">SKUID</th>
<th width="20%">商品名称</th>
<th width="10%">制造商</th>
<th width="5%">倍数</th>
<th width="10%">采购数量</th>
<th width="10%">采购单价</th>
<th width="10%">小计</th>
<th width="10%">货期</th>
<th width="6%">货期</th>
<th width="10%">供应商</th>
<th width="5%">操作</th>
</tr>
......@@ -202,7 +203,7 @@
<!-- 订单金额 -->
<div class="amount-section">
<p>应付金额:<span class="text-danger order_amount"></span></p>
<p>(95折后)应付金额:<span class="text-danger order_amount"></span></p>
</div>
</div>
......
......@@ -322,10 +322,11 @@
<th width="15%">SKUID</th>
<th width="20%">商品名称</th>
<th width="10%">制造商</th>
<th width="5%">倍数</th>
<th width="10%">采购数量</th>
<th width="10%">采购单价</th>
<th width="10%">小计</th>
<th width="10%">货期</th>
<th width="6%">货期</th>
<th width="10%">供应商</th>
<th width="5%">操作</th>
</tr>
......
......@@ -467,7 +467,7 @@
@if ($order_info['order_remark'])
<tr>
<td>订单备注信息:</td>
<td colspan="8">{{$order_info['order_remark']}}</td>
<td colspan="10">{{$order_info['order_remark']}}</td>
</tr>
@endif
</tfoot>
......@@ -502,7 +502,7 @@
@if ($order_price_info['discount_amount'] != 0)
<tr>
<td>优惠</td>
<td>优惠金额</td>
<td class="edit-parent-td">
{{$currency}}<span id="other_money">{{$order_price_info['discount_amount']}}</span>
</td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment