文件

285 行
12 KiB
HTML
可执行文件

<!--[1.7.90]-->
<style>
th {
background-color: #f5f7fa !important;
}
th > .cell {
white-space: nowrap !important;
text-align: center;
}
th, td {
text-align: center;
line-height: 30px;
padding: 0;
}
th > .cell, td > .cell {
text-align: center;
}
.el-pagination {
padding: 8px;
}
.el-table__row > td:last-child > .cell {
white-space: nowrap;
}
.center-content {
margin: 0 0 20px;
display: flex;
justify-content: space-between;
align-items: center;
}
.center-content .el-input__inner {
padding: 0 15px;
text-align: left;
}
.el-input{
margin-bottom: 10px;
}
.el-range-editor--small .el-range-separator{
line-height: 32px;
}
</style>
<div class="purchaseBox" id="purchase" v-cloak>
<div style="margin:0 0 20px;">
<el-collapse accordion>
<el-collapse-item>
<template slot="title">
门店调拨管理须知>>></i>
</template>
<div>1.记录门店与门店之间的调拨情况</div>
<div>2.若货至门店未入库则显示未入库,货至门店已入库则显示入库详情</div>
</el-collapse-item>
</el-collapse>
</div>
<div class="center-content">
<div>
<el-input placeholder="调拨单号"
style="width: 200px"
clearable
size="small"
type="text"
@keydown.enter.exact.native.prevent="search"
v-model="order_number"></el-input>
<date-picker-range :date-time.sync="add_time"></date-picker-range>
<template>
<el-select v-model="store_id" placeholder="门店" size="small">
<el-option value="">所有门店</el-option>
<el-option
v-for="item in store"
:key="item.id"
:label="item.storetag"
:value="item.id">
</el-option>
</el-select>
<el-select v-model="examine_status" placeholder="状态" size="small">
<el-option value="" label="所有状态"></el-option>
<el-option value="0" label="未审核"></el-option>
<el-option value="1" label="审核通过"></el-option>
<el-option value="3" label="审核通过未入库"></el-option>
<el-option value="4" label="审核通过已入库"></el-option>
<el-option value="2" label="审核拒绝"></el-option>
</el-select>
</template>
<el-button type="primary" plain @click="search" size="small">搜索</el-button>
<if condition="$authArr['exportOperation'] eq true">
<el-button @click="exportOperation" size="small">导出</el-button>
</if>
</div>
</div>
<div style="border: 1px solid #e6e6e6;max-width: calc(100vw - 208px);">
<el-table border :data="allOrderList" style="width: calc(100vw - 208px);border: none;"
size="mini"
max-height="500"
v-loading="loading"
element-loading-text="数据获取中"
element-loading-spinner="el-icon-loading">
<el-table-column prop="index" label="序号" show-overflow-tooltip></el-table-column>
<el-table-column prop="add_time" label="调拨时间" show-overflow-tooltip></el-table-column>
<el-table-column prop="warehouse_time" label="入库时间" show-overflow-tooltip></el-table-column>
<el-table-column prop="order_number" label="调拨单号" show-overflow-tooltip></el-table-column>
<el-table-column prop="store_name" label="调拨门店" show-overflow-tooltip></el-table-column>
<el-table-column prop="transfer_name" label="货至门店" show-overflow-tooltip>
<template slot-scope="scope" slot="header">
<el-popover
placement="top-start"
title="详解"
width="100"
trigger="hover"
content="商品被调拨到的目标门店">
<span slot="reference" size="mini">货至门店 <i class="el-icon-question"></i></span>
</el-popover>
</template>
</el-table-column>
<el-table-column prop="goods_species" label="应收合计(种)" show-overflow-tooltip></el-table-column>
<el-table-column prop="money_total" label="应收金额" show-overflow-tooltip></el-table-column>
<el-table-column prop="real_goods_species" label="实收合计(种)" show-overflow-tooltip></el-table-column>
<el-table-column prop="real_money_total" label="实收金额" show-overflow-tooltip></el-table-column>
<el-table-column prop="remarks" label="备注" show-overflow-tooltip></el-table-column>
<el-table-column prop="examine_name" label="货至状态" show-overflow-tooltip></el-table-column>
<el-table-column fixed="right" label="操作" width="150px" style="border-right: none;">
<template slot-scope="scope">
<if condition="$authArr['adopt'] eq true">
<el-button v-if="scope.row.examine_status == 0" @click="adopt(scope.row.id,1)" type="text" size="small">通过 </el-button>
<el-button v-if="scope.row.examine_status == 0" @click="adopt(scope.row.id,2)" type="text" size="small">拒绝 </el-button>
</if>
<if condition="$authArr['OrderInfo'] eq true">
<el-button @click="OrderInfo(scope.row.id)" type="text" size="small">调拨详情 </el-button>
</if>
<if condition="$authArr['WarehouseInfo'] eq true">
<el-button v-if="scope.row.warehousing_status ==1" @click="WarehouseInfo(scope.row.id)" type="text" size="small" >入库详情</el-button>
</if>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[10, 15, 20, 25, 30, 35, 40, 45, 50]"
:page-size="100"
layout="total, sizes, prev, pager, next, jumper"
:total="currentLen">
</el-pagination>
</div>
</div>
<script type="text/javascript">
var purchase = new Vue({
el:"#purchase",
data:function(){
return{
order_number:"",
add_time:"",
store:{$store},
store_id:"",
examine_status:"",
allOrderList:[],
currentPage:1,
currentLimit:10,
currentLen:0,
loading:true,
}
},
methods:{
handleSizeChange:function (val) {
this.currentLimit = val;//切换每页数量
this.currentPage = 1;
this.getData();
},
handleCurrentChange:function (val) {
this.currentPage = val;
this.getData();//切换页数
},
//搜索
search:function () {
this.currentPage = 1;
this.getData();
},
//查询
getData:function () {
var that = this;
var page = that.currentPage;
var limit = that.currentLimit;
var order_number = that.order_number;
var add_time = that.add_time;
var store_id = that.store_id;
var examine_status = that.examine_status;
$.ajax({
url:"{:U('allOrderList')}",
type:"post",
data:{
page:page,
limit:limit,
order_number:order_number,
add_time:add_time,
store_id:store_id,
examine_status:examine_status
},
success:function (res) {
that.allOrderList = res.data;
that.loading = false;
that.$nextTick(function () {
that.currentLen = parseInt(res.count);
})
}
})
},
//通过
adopt:function (id,type) {
var that = this;
that.loading = true;
$.ajax({
url:"{:U('adopt')}",
type:"post",
data:{id:id,type:type},
success:function (res) {
if(res.status == 1){
that.$message({
type:"success",
message:res.msg,
duration:1000,
onClose:function () {
that.loading = false;
that.getData();
}
})
}else{
that.$message({
type:"error",
message:res.msg,
duration:1000,
onClose:function () {
that.loading = false;
}
})
}
}
})
},
//调拨详情
OrderInfo:function (id) {
var that = this;
layer.open({
type: 2,
content: "{:U('details')}?id=" + id,
title: "详情",
area: ['calc(100% - 160px)', 'calc(100% - 65px)'],
offset: 'rb',
shade: 0,
btnAlign: 'c',
})
},
//入库详情
WarehouseInfo:function (id) {
var that = this;
layer.open({
type: 2,
content: "{:U('allocation')}?id=" + id,
title: "详情",
area: ['calc(100% - 160px)', 'calc(100% - 65px)'],
offset: 'rb',
shade: 0,
btnAlign: 'c',
})
},
//导出
exportOperation:function () {
var that = this;
var order_number = that.order_number;
var add_time = that.add_time;
var store_id = that.store_id;
var examine_status = that.examine_status;
window.location.href="{:U('export')}?order_number=" + order_number + "&store_id=" + store_id + "&examine_status=" + examine_status + "&add_time=" + add_time
}
},
created:function () {
this.getData();
}
})
</script>