dggjimai/application/admin/view/consignment_order/shelves.html

167 lines
6.0 KiB
HTML
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{extend name="layout1" /}
{block name='content'}
<style>
.layui-form-label{
width:180px;
}
.div-flex {
display: flex;
align-items: center;
justify-content: left;
}
.width-160 {
width: 200px;
float: left;
display: block;
padding: 9px 15px;
font-weight: 400;
}
.layui-table th {
text-align: center;
}
.table-margin{
margin-left: 50px;
margin-right: 50px;
text-align: center;
}
.image{
height:50px;
width: 50px;
}
.mt50{
margin-left: 50px;
}
</style>
<div class="layui-card-body" >
<!--基本信息-->
<div class="layui-form" lay-filter="layuiadmin-form-order" id="layuiadmin-form-order" >
<input type="hidden" class="order_id" name="order_id" value="{$detail.id}">
<div class="layui-form-item">
<fieldset class="layui-elem-field layui-field-title">
<legend>商品信息</legend>
</fieldset>
</div>
<div class="layui-form-item table-margin">
<table class="layui-table">
<colgroup>
<col width="250">
<col width="200">
<col width="200">
<col width="100">
</colgroup>
<thead>
<tr>
<th>图片</th>
<th>商品名称</th>
<th>商品信息</th>
<th>操作</th>
</tr>
</thead>
<tbody>
{foreach $detail.consignment_order_goods as $k => $goods}
<tr>
<td>
<div style="text-align: left">
{foreach $goods.img_list as $k1 => $img}
<div style="float:left; margin-right: 10px;">
<img src="{$img.ori_image}" class="image-show image" >
</div>
{/foreach}
</div>
</td>
<td>
<div style="text-align: left">
{$goods.goods_name}
</div>
</td>
<td>
<div style="text-align: left">
<div class="layui-col-md9">
<p style="margin-top: 10px">购买价格:{$goods.goods_price}</p>
<p>尺寸:{$goods.item_value}</p>
<p>品牌:{$goods.brand_name}</p>
<p>品类:{$goods.class_name}</p>
<p>品相:{$goods.phase_name}</p>
<p>购买渠道:{$goods.channel_name}</p>
</div>
</div>
</td>
<td>
{if condition="$goods.refund_status=='1'"}
<button type="submit" class="layui-btn layui-btn-sm layui-btn-normal width_160 shelves" goods_id="{$goods.id}">上架</button>
{/if}
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
<script type="text/javascript">
//注意:选项卡 依赖 element 模块,否则无法进行功能性操作
layui.config({
version:"2.6.6.20211117",
base: '/static/layui-admin/dist/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'element', 'jquery', 'like'], function () {
var $ = layui.$;
var like = layui.like;
//主图放大
$(document).on('click', '.image-show', function () {
var src = $(this).attr('src');
like.showImg(src,400);
});
//上架
$('.shelves').click(function () {
var id=$(this).attr('goods_id');
layer.confirm(
"商品编号:"+"<input type=text name='goods_sn' id='goods_sn' placeholder='请输入商品编号' autocomplete=off class=layui-input style='height:30px'>", {
btn: ['确认','取消'] //按钮
}, function(){
var goods_sn = $('#goods_sn').val();
if (goods_sn == null || goods_sn == undefined || goods_sn == ''){
layer.msg('请填写商品编号!');
return false;
}
like.ajax({
url: '{:url("consignment_order/shelveshandle")}'
, data: {'id': id,'goods_sn':goods_sn}
, type: 'post'
, success: function (res) {
if (res.code == 1) {
layui.layer.msg(res.msg, {
offset: '15px'
, icon: 1
, time: 1000
},function () {
if(res.data==1){
var index = parent.layer.getFrameIndex(window.name);
parent.location.reload();
parent.layer.close(index);
}else{
location.reload();
}
});
}else{
layui.layer.msg(res.msg, {
offset: '15px'
, icon: 2
, time: 1000
})
}
}
});
return false;
});
});
});
</script>
{/block}