318 行
13 KiB
HTML
可执行文件
318 行
13 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 10px;
|
|
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="allocationApplyApp" v-cloak>
|
|
<div class="center-content">
|
|
<div>
|
|
<el-input placeholder="调拨单号"
|
|
type="text"
|
|
style="width: 200px;"
|
|
clearable
|
|
size="small"
|
|
@keydown.enter.exact.native.prevent="search"
|
|
v-model="order_number"></el-input>
|
|
<template>
|
|
<date-picker-range :date-time.sync="add_time"></date-picker-range>
|
|
|
|
<el-select v-model="status" placeholder="状态" size="small">
|
|
<el-option value="" label="所有状态"></el-option>
|
|
<el-option value="1" label="申请"></el-option>
|
|
<el-option value="2" label="已出库"></el-option>
|
|
<el-option value="3" label="已入库"></el-option>
|
|
</el-select>
|
|
</template>
|
|
<el-button type="primary" plain @click="search" size="small">搜索</el-button>
|
|
<if condition="$authArr['addOrder'] eq true">
|
|
<el-button type="primary" plain @click="addOrder" size="small">新增</el-button>
|
|
</if>
|
|
<if condition="$global_store_jurisdiction && ($global_store_jurisdiction['data_export'] eq '2') && $identity eq 2">
|
|
<else/>
|
|
<if condition="$authArr['exportOperation'] eq true">
|
|
<el-button type="primary" plain @click="exportOperation" size="small">导出</el-button>
|
|
</if>
|
|
</if>
|
|
</div>
|
|
</div>
|
|
<div style="border: 1px solid #e6e6e6;max-width: calc(100vw - 208px);">
|
|
<el-table border :data="OrderList" 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="operator" label="操作人" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="add_time" label="申请时间" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="stock_time" label="出库时间" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="storage_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_goods_species" label="申请合计(种)" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="goods_species" label="应收合计(种)" show-overflow-tooltip v-if=""></el-table-column>
|
|
<el-table-column prop="money_total" label="应收金额" show-overflow-tooltip
|
|
v-if="showPrice != 2 || identity == 1"></el-table-column>
|
|
<el-table-column prop="accept_goods_species" label="实收合计(种)" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="accept_money_total" label="实收金额" show-overflow-tooltip
|
|
v-if="showPrice != 2 || identity == 1"></el-table-column>
|
|
<el-table-column prop="refuse_goods_species" label="拒收合计(种)" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="refuse_total_stock_money" label="拒收金额" show-overflow-tooltip
|
|
v-if="showPrice != 2 || identity == 1"></el-table-column>
|
|
<el-table-column prop="remarks" label="备注" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="status_name" label="状态" show-overflow-tooltip></el-table-column>
|
|
<el-table-column fixed="right" label="操作" width="200px" style="border-right: none;">
|
|
<template slot-scope="scope">
|
|
<el-dropdown>
|
|
<el-button type="primary" size="mini">
|
|
操作<i class="el-icon-arrow-down el-icon--right"></i>
|
|
</el-button>
|
|
<el-dropdown-menu slot="dropdown">
|
|
<if condition="$authArr['apply'] eq true">
|
|
<el-dropdown-item @click.native="apply(scope.row.id,scope.row.operator)">订单详情
|
|
</el-dropdown-item>
|
|
</if>
|
|
<if condition="$authArr['warehousingOperation'] eq true">
|
|
<el-dropdown-item
|
|
@click.native="warehousingOperation(scope.row.id,scope.row.stock_order_id)"
|
|
v-if="scope.row.status == 2 && scope.row.refuse_status == 1">入库
|
|
</el-dropdown-item>
|
|
</if>
|
|
<if condition="$authArr['refuse'] eq true">
|
|
<el-dropdown-item
|
|
@click.native="refuseOperation(scope.row.stock_order_id,scope.row.warehouse_order_id,scope.row.id)"
|
|
v-if="scope.row.status == 2 && scope.row.refuse_status == 1">
|
|
拒收
|
|
</el-dropdown-item>
|
|
</if>
|
|
<el-dropdown-item @click.native="refuseInfo(scope.row.stock_order_id)"
|
|
v-if="scope.row.refuse_status == 2">拒收详情
|
|
</el-dropdown-item>
|
|
</el-dropdown-menu>
|
|
</el-dropdown>
|
|
</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 allocationApplyApp = new Vue({
|
|
el: "#allocationApplyApp",
|
|
data: function () {
|
|
return {
|
|
showPrice: "{$showPrice}",
|
|
identity: "{$identity}",
|
|
order_number: "",
|
|
add_time: "",
|
|
status: "",
|
|
OrderList: [],
|
|
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;
|
|
that.loading = true;
|
|
var page = that.currentPage;
|
|
var limit = that.currentLimit;
|
|
var order_number = that.order_number;
|
|
var add_time = that.add_time;
|
|
var status = that.status;
|
|
$.ajax({
|
|
url: "{:U('OrderList')}",
|
|
type: "post",
|
|
data: {
|
|
page: page,
|
|
limit: limit,
|
|
order_number: order_number,
|
|
add_time: add_time,
|
|
status: status
|
|
},
|
|
success: function (res) {
|
|
that.OrderList = res.data;
|
|
that.loading = false;
|
|
that.$nextTick(function () {
|
|
that.currentLen = parseInt(res.count);
|
|
})
|
|
}
|
|
})
|
|
},
|
|
//新增
|
|
addOrder: function () {
|
|
var that = this;
|
|
layer.open({
|
|
type: 2,
|
|
content: "{:U('addOrder')}",
|
|
title: "申请调拨单",
|
|
area: ['calc(100% - 160px)', 'calc(100% - 65px)'],
|
|
offset: 'rb',
|
|
shade: 0,
|
|
btnAlign: 'c',
|
|
end: function () {
|
|
that.getData();
|
|
}
|
|
})
|
|
},
|
|
//订单详情
|
|
apply: function (id, operator) {
|
|
var that = this;
|
|
layer.open({
|
|
type: 2,
|
|
content: "{:U('apply_details')}?id=" + id + '&operator=' + operator,
|
|
title: "详情",
|
|
area: ['calc(100% - 160px)', 'calc(100% - 65px)'],
|
|
offset: 'rb',
|
|
shade: 0,
|
|
btnAlign: 'c',
|
|
})
|
|
},
|
|
//入库
|
|
warehousingOperation: function (id, stock_order_id) {
|
|
var that = this;
|
|
layer.open({
|
|
type: 2,
|
|
content: "{:U('warehousingInfo')}?id=" + id + "&stock_order_id=" + stock_order_id,
|
|
title: "详情",
|
|
area: ['calc(100% - 160px)', 'calc(100% - 65px)'],
|
|
offset: 'rb',
|
|
shade: 0,
|
|
btnAlign: 'c',
|
|
end: function () {
|
|
that.getData();
|
|
}
|
|
})
|
|
},
|
|
//导出
|
|
exportOperation: function () {
|
|
var that = this;
|
|
var order_number = that.order_number;
|
|
var add_time = that.add_time;
|
|
var status = that.status;
|
|
window.location.href = "{:U('export')}?order_number=" + order_number + "&status=" + status + "&add_time=" + add_time
|
|
},
|
|
//拒收
|
|
refuseOperation: function (stock_order_id, warehouse_order_id, id) {
|
|
var that = this;
|
|
that.$confirm('此操作将拒收此单所有商品, 是否继续?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
$.ajax({
|
|
url: "{:U('refuse')}",
|
|
type: "post",
|
|
data: {
|
|
stock_out_id: stock_order_id,
|
|
warehousing_id: warehouse_order_id,
|
|
id: id
|
|
},
|
|
success: function (res) {
|
|
if (res.status == 1) {
|
|
that.$message({
|
|
type: "success",
|
|
message: res.message,
|
|
duration: 1000,
|
|
onClose: function () {
|
|
that.getData();
|
|
}
|
|
})
|
|
} else {
|
|
that.$message.error(res.message);
|
|
}
|
|
}
|
|
})
|
|
}).catch(() => {
|
|
that.$message({
|
|
type: 'info',
|
|
message: '已取消操作'
|
|
});
|
|
});
|
|
},
|
|
//拒收详情
|
|
refuseInfo: function (id) {
|
|
var that = this;
|
|
layer.open({
|
|
type: 2,
|
|
content: "{:U('StockOutOrder/refuseInfo')}?id=" + id,
|
|
title: "详情",
|
|
area: ['calc(100% - 160px)', 'calc(100% - 65px)'],
|
|
offset: 'rb',
|
|
shade: 0,
|
|
btnAlign: 'c',
|
|
})
|
|
}
|
|
},
|
|
created: function () {
|
|
this.getData();
|
|
}
|
|
})
|
|
</script> |