提交 70c7480c 编写于 作者: D devil_gong

细节优化

上级 f63e1389
......@@ -570,6 +570,12 @@
{{if !empty($v['desc'])}}
<span class="am-text-xs am-text-warning am-margin-left-xs">{{$v.desc}}</span>
{{/if}}
{{if !empty($v['tips'])}}
<div class="am-alert am-alert-warning am-margin-0" data-am-alert>
<button type="button" class="am-close">&times;</button>
<p>{{$v.tips|raw}}</p>
</div>
{{/if}}
{{if !empty($v['element'])}}
{{foreach $v.element as $element}}
<div class="am-form-group">
......
......@@ -215,12 +215,14 @@ class BuyService
$v['spec_weight'] = $goods_base['data']['spec_base']['weight'];
$v['spec_coding'] = $goods_base['data']['spec_base']['coding'];
$v['spec_barcode'] = $goods_base['data']['spec_base']['barcode'];
$v['extends'] = $goods_base['data']['spec_base']['extends'];
} else {
$v['is_invalid'] = 1;
$v['inventory'] = 0;
$v['spec_weight'] = 0;
$v['spec_coding'] = '';
$v['spec_barcode'] = '';
$v['extends'] = '';
}
// 基础信息
......@@ -926,12 +928,14 @@ class BuyService
$order_id = Db::name('Order')->insertGetId($order);
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);
if($detail_ret['code'] != 0)
if($detail_ret['code'] == 0)
{
$buy['data']['goods'][$k]['id'] = $detail_ret['data'];
} else {
Db::rollback();
return $ret;
}
......
......@@ -91,7 +91,7 @@ $(function()
var spec_max = $('#goods-nav-operations').data('spec-add-max-number') || 3;
if($('.specifications-table th.table-title').length >= spec_max)
{
Prompt('最多添加'+spec_max+'列规格');
Prompt('最多添加'+spec_max+'列规格,可在后台管理[系统设置-后台配置]中配置');
return false;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册