...
|
...
|
@@ -26,8 +26,73 @@ |
|
|
-moz-transform: translate(-50%, -50%);
|
|
|
-o-transform: translate(-50%, -50%);
|
|
|
}
|
|
|
.tx_mask_delete {
|
|
|
display: none;
|
|
|
z-index: 2;
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
position: fixed;
|
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
|
}
|
|
|
|
|
|
.delete_school {
|
|
|
font-size: 0.32rem;
|
|
|
color: #333;
|
|
|
text-align: center;
|
|
|
}
|
|
|
|
|
|
.delete_btn {
|
|
|
display: flex;
|
|
|
display: -webkit-flex;
|
|
|
justify-content: space-around;
|
|
|
align-items: center;
|
|
|
}
|
|
|
|
|
|
.tx_maskcancel {
|
|
|
width: 100%;
|
|
|
height: 0.8rem;
|
|
|
background: #f2f2f2;
|
|
|
border-radius: 0.08rem;
|
|
|
text-align: center;
|
|
|
line-height: 0.8rem;
|
|
|
color: #333;
|
|
|
font-size: 0.32rem;
|
|
|
margin-top: 0.4rem;
|
|
|
margin-right: 0.5rem;
|
|
|
}
|
|
|
|
|
|
.tx_maskYes {
|
|
|
width: 100%;
|
|
|
height: 0.8rem;
|
|
|
background: linear-gradient(338deg, rgba(255, 78, 0, 1) 0%, rgba(255, 157, 45, 1) 100%);
|
|
|
border-radius: 0.08rem;
|
|
|
text-align: center;
|
|
|
line-height: 0.8rem;
|
|
|
color: white;
|
|
|
font-size: 0.32rem;
|
|
|
margin-top: 0.4rem;
|
|
|
margin-left: 0.5rem;
|
|
|
}
|
|
|
</style>
|
|
|
<body>
|
|
|
|
|
|
<!-- 删除弹窗 -->
|
|
|
<div class="tx_mask_delete" onclick="$(this).hide()">
|
|
|
<div class="tx_maskCon" onclick="zZFun(this)">
|
|
|
<div class="tx_maskCon2" style="border-radius: 0.1rem;">
|
|
|
<div class="delete_school">
|
|
|
是否确定删除?
|
|
|
</div>
|
|
|
|
|
|
<div class="delete_btn">
|
|
|
<div class="tx_maskcancel">取消</div>
|
|
|
<div class="tx_maskYes">确定</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
|
|
|
<!-- 弹窗 -->
|
|
|
<div class="tx_mask" onclick="$(this).hide()">
|
|
|
<div class="tx_maskCon_money" onclick="zZFun(this)">
|
...
|
...
|
@@ -99,7 +164,7 @@ |
|
|
<div class="log_five_handle_img">
|
|
|
<img src="__TMPL__/public/assets/images/86.png" alt="" />
|
|
|
</div>
|
|
|
<div class="log_five_handle_word log_five_handle_del" onclick="goods_del({$vo.id})" style="cursor: pointer;">
|
|
|
<div class="log_five_handle_word log_five_handle_del" data-id="{$vo.id}" style="cursor: pointer;">
|
|
|
删除
|
|
|
</div>
|
|
|
</div>
|
...
|
...
|
@@ -134,6 +199,52 @@ |
|
|
<script src="__TMPL__/public/assets/js/jquery.js"></script>
|
|
|
<script src="__TMPL__/public/assets/js/base.js"></script>
|
|
|
<script>
|
|
|
let index = '';
|
|
|
let id
|
|
|
//删除商品
|
|
|
$('.log_five_handle_del').each(function() {
|
|
|
$(this).click(function() {
|
|
|
id = $(this).data("id");
|
|
|
index = $(this).parents(".com").index();
|
|
|
console.log(index)
|
|
|
$(".tx_mask_delete").css({
|
|
|
display: "block"
|
|
|
});
|
|
|
})
|
|
|
})
|
|
|
$(".tx_maskYes").click(function() {
|
|
|
console.log(index)
|
|
|
|
|
|
var len = $(".com");
|
|
|
console.log(len)
|
|
|
for(var i = 0; i < len.length; i++) {
|
|
|
if(i == index) {
|
|
|
$(len[i]).remove()
|
|
|
};
|
|
|
$(".tx_mask_delete").css({
|
|
|
display: "none"
|
|
|
});
|
|
|
}
|
|
|
$.post("{:url('Salesmangoods/goods_del')}",{goods_id:id},function(data){
|
|
|
if(data){
|
|
|
$('.del'+id).remove();
|
|
|
}else{
|
|
|
alert('删除失败!');
|
|
|
}
|
|
|
});
|
|
|
|
|
|
})
|
|
|
$(".tx_maskcancel").click(function() {
|
|
|
$(".tx_mask_delete").css({
|
|
|
display: "none"
|
|
|
});
|
|
|
})
|
|
|
|
|
|
function zZFun(e) {
|
|
|
window.event ? (window.event.cancelBubble = true) : e.stopPropagation();
|
|
|
}
|
|
|
</script>
|
|
|
<script>
|
|
|
function zZFun(e) {
|
|
|
window.event ? (window.event.cancelBubble = true) : e.stopPropagation();
|
|
|
}
|
...
|
...
|
@@ -157,13 +268,7 @@ |
|
|
*点击删除
|
|
|
*/
|
|
|
function goods_del(id){
|
|
|
$.post("{:url('Salesmangoods/goods_del')}",{goods_id:id},function(data){
|
|
|
if(data){
|
|
|
$('.del'+id).remove();
|
|
|
}else{
|
|
|
alert('删除失败!');
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
|