260 行
9.7 KiB
HTML
可执行文件
260 行
9.7 KiB
HTML
可执行文件
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title>进货单详情</title>
|
|
<link href="__PUBLIC__/Retail/css/base.css" rel="stylesheet">
|
|
<script src="__PUBLIC__/jquery/js/jquery-2.0.3.min.js"></script>
|
|
<link href="__PUBLIC__/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
|
<link href="__PUBLIC__/Retail/css/store.css" rel="stylesheet">
|
|
<link rel="stylesheet" type="text/css" href="__PUBLIC__/layui/css/layui.css"/>
|
|
<style>
|
|
body{
|
|
cursor: pointer;
|
|
box-sizing: border-box;
|
|
padding-top: 10px;
|
|
}
|
|
#app{
|
|
position: relative;
|
|
with:100%;
|
|
height: 100%;
|
|
}
|
|
.content-head span{
|
|
font-size: 16px;
|
|
}
|
|
.content-head1{
|
|
display: flex;
|
|
width:100%;
|
|
text-align: left;
|
|
padding: 0px 30px;
|
|
box-sizing: border-box;
|
|
margin-top: 10px;
|
|
}
|
|
.content{
|
|
margin-left: 30px;
|
|
}
|
|
.content div{
|
|
font-size: 14px;
|
|
margin:5px 0;
|
|
}
|
|
.Business_tb1 table tr th {
|
|
border-color: #000;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
.Business_tb1 table tr td {
|
|
border-color: #000;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="app">
|
|
<div class="Business" id="printhtml">
|
|
<div class="Business_tb1">
|
|
<div class="content-head">
|
|
<span>进货单详情</span>
|
|
</div>
|
|
<div class="content-head1">
|
|
<div class="content">
|
|
<div>供货商:{$supplier['supplier_name']}</div>
|
|
<div>门店:{$store['storetag']}</div>
|
|
<div>单据号:{$order['ordernum']}</div>
|
|
</div>
|
|
<div class="content">
|
|
<div>供货商联系方式:{$supplier['phone']}</div>
|
|
<div>门店联系方式:{$manager['mobile']}</div>
|
|
<div>打印日期:{$time}</div>
|
|
</div>
|
|
</div>
|
|
<hr>
|
|
<table border="1" cellspacing="0" cellpadding="0">
|
|
<tr id="tabletitle">
|
|
<th >序</th>
|
|
<th colspan="4">商品名称</th>
|
|
<th >货号</th>
|
|
<th >条码</th>
|
|
<th >进货量</th>
|
|
<th >赠送量</th>
|
|
<th >单位</th>
|
|
<th >规格</th>
|
|
<th >进价</th>
|
|
<th >小计</th>
|
|
</tr>
|
|
<template v-for="(item,index) in goodsarr">
|
|
<tr>
|
|
<td >{{index+1}}</td>
|
|
<td colspan="4" style="max-width: 200px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
|
|
{{item.goods_name}}
|
|
</td>
|
|
<td>
|
|
{{item.good_number}}
|
|
</td>
|
|
<td>
|
|
{{item.goods_code}}
|
|
</td>
|
|
<td>
|
|
{{item.num}}
|
|
</td>
|
|
<td>
|
|
{{item.givenum}}
|
|
</td>
|
|
<td>
|
|
{{item.company}}
|
|
</td>
|
|
<td>
|
|
{{item.specifications}}
|
|
</td>
|
|
<td>
|
|
{{item.purch_price}}
|
|
</td>
|
|
<td>
|
|
{{Math.round(100*item.num*item.purch_price) / 100}}
|
|
</td>
|
|
</tr>
|
|
</template>
|
|
</table>
|
|
<hr>
|
|
<div style="display: flex">
|
|
<div>
|
|
<span>商品种类:</span>
|
|
<span style="border-bottom: 1px solid #333;">{{goodsarr.length}}</span>
|
|
</div>
|
|
<div style="width: 150px;">
|
|
<span>进货量:</span>
|
|
<span style="border-bottom: 1px solid #333;">{{floworderdata.allnum}}</span>
|
|
</div>
|
|
<div style="width: 150px;">
|
|
<span>赠送量:</span>
|
|
<span style="border-bottom: 1px solid #333;">{{floworderdata.allgivenum}}</span>
|
|
</div>
|
|
</div>
|
|
<div style="margin-top: 5px;display: flex">
|
|
<div style="margin-top: 5px;">
|
|
<span>总金额:</span>
|
|
<span style="border-bottom: 1px solid #333;">{{floworderdata.allmoney}}</span>
|
|
</div>
|
|
<div style="width: 150px;margin-top: 5px;">
|
|
<span>优惠金额:</span>
|
|
<span style="border-bottom: 1px solid #333;">{{dismoney}}</span>
|
|
</div>
|
|
<div style="width: 150px;margin-top: 5px;">
|
|
<span>支付金额:</span>
|
|
<span style="border-bottom: 1px solid #333;">{{Math.round((floworderdata.allmoney-dismoney) * 100) / 100}}</span>
|
|
</div>
|
|
</div>
|
|
<div style="margin-top: 20px;">
|
|
<div style="width: 200px;display: flex;flex-direction: row;margin-top: 20px;">
|
|
<span>收货人签名:</span>
|
|
<span style="flex:1;border-bottom: 1px solid #333;"></span>
|
|
</div>
|
|
<div style="width: 200px;display: flex;flex-direction: row;margin-top: 20px;">
|
|
<span>供货商签名:</span>
|
|
<span style="flex: 1;border-bottom: 1px solid #333;"></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<input type="hidden" id="supplier_idhide" value="{$order['supplier_id']}">
|
|
<input type="hidden" id="floworderid" value="{$order['id']}">
|
|
<script type="text/javascript" src="__PUBLIC__/layui/layui.js"></script>
|
|
<script type="text/javascript" src="__PUBLIC__/flow/js/vue.js"></script>
|
|
<script type="text/javascript">
|
|
layui.use(['layer', 'form'], function () {
|
|
var layer = layui.layer;
|
|
var app = new Vue({
|
|
el: '#app',
|
|
data: function () {
|
|
return {
|
|
supplier_id:$('#supplier_idhide').val(),
|
|
myfile:"",
|
|
dismoney:"{$order['dismoney']}",
|
|
showgoods:false,
|
|
floworderid:$('#floworderid').val(),
|
|
canchangenum:false,
|
|
settimeouttimer:"",
|
|
shade:false,
|
|
keyword:"",
|
|
shade2:false,
|
|
searchgoodsinfo:{},
|
|
goodsarr:[]
|
|
}
|
|
},
|
|
created:function () {
|
|
// console.log(this.supplier_id);
|
|
$('.showgoodsitembox').css({'opacity':1});
|
|
this.getgoodsarr();
|
|
},
|
|
methods:{
|
|
getgoodsarr:function () {
|
|
var floworderid = this.floworderid;
|
|
var app = this;
|
|
$.ajax({
|
|
url:"{:U('getgoodsarr')}",
|
|
data:{
|
|
floworderid:floworderid
|
|
},
|
|
type:'post',
|
|
success:function (res) {
|
|
if(res.status==1){
|
|
app.goodsarr = res.data;
|
|
}else{
|
|
app.goodsarr = [];
|
|
}
|
|
},
|
|
error:function (error) {
|
|
layer.msg('错误了。。。')
|
|
}
|
|
})
|
|
},
|
|
// 返回进货单
|
|
doconfirm:function () {
|
|
window.location.replace("{:U('order')}");
|
|
},
|
|
doexport:function () {
|
|
window.location.href="{:U('expUser')}?id="+$('#floworderid').val();
|
|
},
|
|
doprint:function doPrint() {
|
|
bdhtml=$('#printhtml')[0].innerHTML;
|
|
window.document.body.innerHTML=bdhtml;
|
|
window.print();
|
|
}
|
|
},
|
|
computed:{
|
|
floworderdata:function () {
|
|
var allnum = 0;
|
|
var allgivenum = 0;
|
|
var allmoney = 0;
|
|
var goodsarr = this.goodsarr;
|
|
for(var i=0;i<goodsarr.length;i++){
|
|
allnum = allnum+goodsarr[i]['num']*1;
|
|
allgivenum = allgivenum+goodsarr[i]['givenum']*1;
|
|
allmoney = allmoney+goodsarr[i]['num']*goodsarr[i]['purch_price'];
|
|
}
|
|
allnum = Math.round(allnum);
|
|
allgivenum = Math.round(allgivenum);
|
|
allmoney = Math.round(allmoney*100)/100;
|
|
return {
|
|
allnum:allnum,
|
|
allgivenum:allgivenum,
|
|
allmoney:allmoney
|
|
};
|
|
}
|
|
},
|
|
watch:{
|
|
goodsarr:function (n,o) {
|
|
if(n.length>0){
|
|
this.$nextTick(function () {
|
|
isgetgoodsarr = true;
|
|
})
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
var isgetgoodsarr = false;
|
|
</script>
|
|
</body>
|
|
</html>
|