细节优化
parent
f63e13896d
commit
70c7480cea
|
|
@ -570,6 +570,12 @@
|
||||||
{{if !empty($v['desc'])}}
|
{{if !empty($v['desc'])}}
|
||||||
<span class="am-text-xs am-text-warning am-margin-left-xs">{{$v.desc}}</span>
|
<span class="am-text-xs am-text-warning am-margin-left-xs">{{$v.desc}}</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{if !empty($v['tips'])}}
|
||||||
|
<div class="am-alert am-alert-warning am-margin-0" data-am-alert>
|
||||||
|
<button type="button" class="am-close">×</button>
|
||||||
|
<p>{{$v.tips|raw}}</p>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
{{if !empty($v['element'])}}
|
{{if !empty($v['element'])}}
|
||||||
{{foreach $v.element as $element}}
|
{{foreach $v.element as $element}}
|
||||||
<div class="am-form-group">
|
<div class="am-form-group">
|
||||||
|
|
|
||||||
|
|
@ -215,12 +215,14 @@ class BuyService
|
||||||
$v['spec_weight'] = $goods_base['data']['spec_base']['weight'];
|
$v['spec_weight'] = $goods_base['data']['spec_base']['weight'];
|
||||||
$v['spec_coding'] = $goods_base['data']['spec_base']['coding'];
|
$v['spec_coding'] = $goods_base['data']['spec_base']['coding'];
|
||||||
$v['spec_barcode'] = $goods_base['data']['spec_base']['barcode'];
|
$v['spec_barcode'] = $goods_base['data']['spec_base']['barcode'];
|
||||||
|
$v['extends'] = $goods_base['data']['spec_base']['extends'];
|
||||||
} else {
|
} else {
|
||||||
$v['is_invalid'] = 1;
|
$v['is_invalid'] = 1;
|
||||||
$v['inventory'] = 0;
|
$v['inventory'] = 0;
|
||||||
$v['spec_weight'] = 0;
|
$v['spec_weight'] = 0;
|
||||||
$v['spec_coding'] = '';
|
$v['spec_coding'] = '';
|
||||||
$v['spec_barcode'] = '';
|
$v['spec_barcode'] = '';
|
||||||
|
$v['extends'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// 基础信息
|
// 基础信息
|
||||||
|
|
@ -926,12 +928,14 @@ class BuyService
|
||||||
$order_id = Db::name('Order')->insertGetId($order);
|
$order_id = Db::name('Order')->insertGetId($order);
|
||||||
if($order_id > 0)
|
if($order_id > 0)
|
||||||
{
|
{
|
||||||
foreach($buy['data']['goods'] as $v)
|
foreach($buy['data']['goods'] as $k=>$v)
|
||||||
{
|
{
|
||||||
// 添加订单详情数据
|
// 添加订单详情数据,data返回自增id
|
||||||
$detail_ret = self::OrderDetailInsert($order_id, $params['user']['id'], $v);
|
$detail_ret = self::OrderDetailInsert($order_id, $params['user']['id'], $v);
|
||||||
if($detail_ret['code'] != 0)
|
if($detail_ret['code'] == 0)
|
||||||
{
|
{
|
||||||
|
$buy['data']['goods'][$k]['id'] = $detail_ret['data'];
|
||||||
|
} else {
|
||||||
Db::rollback();
|
Db::rollback();
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ $(function()
|
||||||
var spec_max = $('#goods-nav-operations').data('spec-add-max-number') || 3;
|
var spec_max = $('#goods-nav-operations').data('spec-add-max-number') || 3;
|
||||||
if($('.specifications-table th.table-title').length >= spec_max)
|
if($('.specifications-table th.table-title').length >= spec_max)
|
||||||
{
|
{
|
||||||
Prompt('最多添加'+spec_max+'列规格');
|
Prompt('最多添加'+spec_max+'列规格,可在后台管理[系统设置-后台配置]中配置');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue