Commit 2ffe417c by 朱继来

调整审单temp

parent 5d370327
......@@ -902,6 +902,19 @@ Class OrderController extends Controller
// $resData['is_manager'] = $auditor_role == 3 ? 0 : 1; // 角色为‘查看自己’时,is_manager = 0
// }
// 若采购员选择‘平台’,校验自营库存
$order_goods_type = $request->input('order_goods_type', 1);
if ($order_goods_type == 1) {
$pingtai_id = Config('config.pingtai_id');
foreach ($resData['change_info'] as $v) {
if ($v['buyer_id'] == $pingtai_id) {
}
}
}
$url = Config('website.api_domain').'order/changeOrder';
}
// dd(curlApi($url, $resData, "POST"));
......@@ -1614,7 +1627,7 @@ Class OrderController extends Controller
$response['is_dgk_exists'] = $is_dgk_exists;
// 获取数组中的采购人id的名字
$this->getBuyerName($response);
// $this->getBuyerName($response);
return $response;
}
......
......@@ -40,4 +40,8 @@ return [
's_standard_brand' => 'StandardBrand', // 缓存key
's_standard_brand_expire' => 7200, // 缓存两小时
// 平台邮箱后台ID (pingtai@ichunt.com)
'pingtai_id' => 1605,
];
......@@ -111,6 +111,15 @@ input[type="color"],
padding-left: 5px;
}
@media screen and (max-width: 1550px) {
.order-change-table input[type="text"] {
width: 100px;
}
.select-standard-brand {
width: 25px;
}
}
/*按钮样式*/
.nbtn{
border: none;
......
......@@ -433,11 +433,16 @@
if (business_type == 0) {
var change_price = false;
var change_goods_number = false;
var change_buyer_id = false;
var change_batch = false;
var change_str = '';
$('.order-change-table').find('tbody tr').each(function(){
var goods_number = $(this).find('.change_goods_number').val();
var price = $(this).find('.price').val();
var goods_name = $(this).find('.change_goods_name').val();
var buyer_id = $(this).find('.change_buyer_id').selectpicker('val');
var batch = $(this).find('.change_batch').val();
if (goods_number == '' || goods_number == 0) {
change_goods_number = true;
......@@ -448,9 +453,19 @@
change_price = true;
change_str += goods_name+'单价不能为0或空 ';
}
if (order_goods_type == 1 && buyer_id == '') {
change_buyer_id = true;
change_str += goods_name+'采购员不能为空 ';
}
if (order_goods_type == 1 && batch == '') {
change_batch = true;
change_str += goods_name+'批次不能为空 ';
}
})
if (change_price || change_goods_number) {
if (change_price || change_goods_number || change_buyer_id || change_batch) {
layer.alert(change_str)
return false;
}
......@@ -684,6 +699,9 @@
if (!items[i].is_add) {
$('.change_item_'+i).find('.change_goods_price').val(items[i].goods_price);
$('.change_item_'+i).find('.change_goods_number').val(items[i].goods_number);
// $('.change_item_'+i).find('.change_buyer_id').val(items[i].buyer_id);
$('.change_item_'+i).find('.change_buyer_id').selectpicker('val', items[i].buyer_id);
$('.change_item_'+i).find('.change_batch').click().val(items[i].batch);
$('.change_item_'+i).find('.change_standard_brand_id').val(items[i].standard_brand_id);
$('.change_item_'+i).find('.change_standard_brand_name').val(items[i].standard_brand_name);
......
......@@ -131,7 +131,7 @@
</div>
<!-- 调价 -->
<table class="table table-bordered table-hover order-change-table shop-table">
<table class="table table-bordered table-hover text-nowrap order-change-table shop-table">
<thead>
<th width="5%">序号</th>
<th width="10%">供应商</th>
......@@ -140,16 +140,21 @@
@if ($order_info['order_goods_type'] == 1)
<th width="11%">标准品牌</th>
@endif
<th width="10%">调整数量</th>
<th width="10%">调整单价</th>
<th width="5%">调整数量</th>
<th width="5%">调整单价</th>
<!-- 销售类型为预售时展示 -->
@if ($order_info['sale_type'] == 2)
<th width="10%">交期时间/天</th>
<th width="10%">锁定库存</th>
@endif
<td width="5%">状态</td>
<th width="5%">操作</th>
@if ($order_info['order_goods_type'] == 1)
<th width="5%">采购员</th>
<th width="5%">批次</th>
@endif
<th width="3%">状态</th>
<th width="3%">操作</th>
</thead>
<tbody>
......@@ -184,10 +189,10 @@
</td>
@endif
<td>
<input class="only_number num change_goods_number" name="change_info[{{$v['rec_id']}}][goods_number]" value="{{$v['goods_number']}}" <?= $v['status'] == -1 ? 'readonly' : '' ?>>
<input type="text" class="only_number num change_goods_number" name="change_info[{{$v['rec_id']}}][goods_number]" value="{{$v['goods_number']}}" <?= $v['status'] == -1 ? 'readonly' : '' ?>>
</td>
<td>
<input class="price only_number change_goods_price" name="change_info[{{$v['rec_id']}}][goods_price]" data-origin="{{$v['original_price']}}" data-price="{{$v['goods_price']}}" value="{{$v['goods_price']}}" <?= $v['status'] == -1 ? 'readonly' : '' ?>>
<input type="text" class="price only_number change_goods_price" name="change_info[{{$v['rec_id']}}][goods_price]" data-origin="{{$v['original_price']}}" data-price="{{$v['goods_price']}}" value="{{$v['goods_price']}}" <?= $v['status'] == -1 ? 'readonly' : '' ?>>
</td>
<!-- 销售类型为预售时展示 -->
@if ($order_info['sale_type'] == 2)
......@@ -205,6 +210,22 @@
</td>
@endif
@if ($order_info['order_goods_type'] == 1)
<td>
<select class="form-control change_buyer_id selectpicker" name="change_info[{{ $v['rec_id'] }}][buyer_id]" data-live-search="true" data-size="5" title="请选择采购员">
<option value="">请选择采购员</option>
@if (!empty($buyers))
@foreach ($buyers as $val)
<option value="{{ $val->userId }}">{{ $val->name }}</option>
@endforeach
@endif
</select>
</td>
<td>
<input type="text" class="form-control change_batch" name="change_info[{{ $v['rec_id'] }}][batch]" value="">
</td>
@endif
<td>
<input class="change_status" type="hidden" name="change_info[{{$v['rec_id']}}][status]" value="{{$v['status']}}">
<span class="change_status_val"><?= $v['status'] == 1 ? '正常' : '<i class="error">已取消</i>' ?></span>
......
......@@ -32,7 +32,9 @@
<th width="20%">标准品牌</th>
<th>调整数量</th>
<th>调整单价</th>
<th width="20%">状态</th>
<th>采购员</th>
<th>批次</th>
<th>状态</th>
</tr>
</thead>
......@@ -44,6 +46,8 @@
<td>{{ isset($v['standard_brand_name']) ? $v['standard_brand_name'] : '' }}</td>
<td>{{$v['goods_number']}}</td>
<td>{{$v['goods_price']}}</td>
<td>{{ App\Http\Controllers\getSalesName($v['buyer_id']) }}</td>
<td>{{$v['batch']}}</td>
<td>
<?= $v['status'] == 1 ? '正常' : '<i style="color: red;">已取消</i>' ?>
......
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