|
|
@@ -53,27 +53,41 @@
|
|
|
<!-- 表格-->
|
|
|
<table class="table table-striped table-bordered table-hover text-nowrap waybill-table td-min-width-80"
|
|
|
style="background: #fff;" id="table">
|
|
|
+<!-- v-if="item.asnStatus!=99"-->
|
|
|
<tr v-for="(item,i) in resData.details.data" :key="i">
|
|
|
<td class="td-warm text-muted"><span>@{{ i+1 }}</span></td>
|
|
|
<td class="td-warm text-muted"><span>@{{ item.customerName }}</span></td>
|
|
|
<td class="td-warm text-muted"><span>@{{ item.receiveTaskNo }}</span></td>
|
|
|
<td class="td-warm text-muted"><span>@{{ item.reservationNo }}</span></td>
|
|
|
<td class="td-warm text-muted"><span>@{{ item.status }}</span></td>
|
|
|
- <td class="td-warm text-muted"><span>@{{ item.asnNo }}</span></td>
|
|
|
+ <td class="td-warm text-muted">
|
|
|
+ <span>@{{ item.asnNo }}</span>
|
|
|
+ <span
|
|
|
+ style="display: inline-block;width: 15px;height: 15px;border-radius: 50%;position: relative;top: 3px; margin-left: 3px;box-shadow: 0 0 3px #211f1f"
|
|
|
+ :style="item.asnStatus!=99?'background-color:#4ed32d':'background-color:#e83939'"></span>
|
|
|
+ </td>
|
|
|
<td class="td-warm text-muted"><span>@{{ item.createSingleTime }}</span></td>
|
|
|
<td class="td-warm text-muted"><span>@{{ item.finishedReceiveTime }}</span></td>
|
|
|
- <td class="td-warm text-muted"><span>@{{ item.receivePerson }}</span></td>
|
|
|
+ <td class="td-warm text-muted"><span v-if="item.asnStatus==99">@{{ item.receivePerson }}</span></td>
|
|
|
<td class="td-warm text-muted"><span>@{{ item.expectancyAmount }}</span></td>
|
|
|
<td class="td-warm text-muted"><span>@{{ item.receivedAmount }}</span></td>
|
|
|
<td class="td-warm text-muted"><span>@{{ item.unfinishedReceiveAmount }}</span></td>
|
|
|
<td class="td-warm text-muted"><span>@{{ item.receiveConsumeDuration }}</span></td>
|
|
|
<td class="td-warm text-muted">
|
|
|
- <button @click="showDetail(item.receiveTaskNo,item.reservationNo,item.asnNo)" type="button"
|
|
|
+ <button @click="showDetail(item)" type="button"
|
|
|
class="btn btn-primary" data-toggle="modal"
|
|
|
data-target="#staticBackdrop">
|
|
|
查看明细
|
|
|
</button>
|
|
|
</td>
|
|
|
+ <td class="td-warm text-muted">
|
|
|
+ @can('入库管理-实时收货看板-关单')
|
|
|
+ <button v-if="item.asnStatus!=99" @click="closeAsn(item)" type="button"
|
|
|
+ class="btn btn-success">
|
|
|
+ 关单
|
|
|
+ </button>
|
|
|
+ @endcan
|
|
|
+ </td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
|
|
|
@@ -92,32 +106,43 @@
|
|
|
<!-- Modal -->
|
|
|
<div class="modal fade" id="staticBackdrop" tabindex="-1" aria-labelledby="staticBackdropLabel"
|
|
|
aria-hidden="true">
|
|
|
- <div class="modal-dialog modal-xl">
|
|
|
+ <div class="modal-dialog modal-xl" style="max-width:70% !important;">
|
|
|
<div class="modal-content">
|
|
|
<div class="modal-header">
|
|
|
<h5 class="modal-title" id="staticBackdropLabel">明细</h5>
|
|
|
+
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
<span aria-hidden="true">×</span>
|
|
|
</button>
|
|
|
</div>
|
|
|
<div class="modal-body">
|
|
|
- <!-- Scrollable modal -->
|
|
|
<div class="modal-dialog-scrollable">
|
|
|
- <table class="table table-sm"
|
|
|
+ <table class="table table-sm text-nowrap"
|
|
|
style="background: #fff;" id="table_inner">
|
|
|
<tr v-for="(item,i) in resData.itemDetail" :key="i">
|
|
|
- <td class="td-warm text-muted"><span>@{{ i+1 }}</span></td>
|
|
|
- <td class="td-warm text-muted"><span>@{{ item.receiveTaskNo }}</span></td>
|
|
|
- <td class="td-warm text-muted"><span>@{{ item.asnNo }}</span></td>
|
|
|
- <td class="td-warm text-muted"><span>@{{ item.reservationNo }}</span></td>
|
|
|
- <td class="td-warm text-muted"><span>@{{ item.descr }}</span></td>
|
|
|
- <td class="td-warm text-muted"><span>@{{ item.sku }}</span></td>
|
|
|
- <td class="td-warm text-muted"><span>@{{ item.expectedQty }}</span></td>
|
|
|
- <td class="td-warm text-muted"><span>@{{ item.receivedQty }}</span></td>
|
|
|
- <td class="td-warm text-muted"><span>@{{ item.unfinishedReceiveQty }}</span></td>
|
|
|
+ <td class="td-warm text-muted text-center"><span>@{{ i+1 }}</span></td>
|
|
|
+ <td class="td-warm text-muted text-center"><span>@{{ item.receiveTaskNo }}</span></td>
|
|
|
+ <td class="td-warm text-muted text-center"><span>@{{ item.asnNo }}</span></td>
|
|
|
+ <td class="td-warm text-muted text-center"><span>@{{ item.reservationNo }}</span></td>
|
|
|
+ <td class="td-warm text-muted text-center"><span>@{{ item.descr }}</span></td>
|
|
|
+ <td class="td-warm text-muted text-center"><span>@{{ item.sku }}</span></td>
|
|
|
+ <td class="td-warm text-muted text-center"><span>@{{ item.expectedQty }}</span></td>
|
|
|
+ <td class="td-warm text-muted text-center"><span>@{{ item.receivedQty }}</span></td>
|
|
|
+ <td class="td-warm text-muted text-center"><span>@{{ item.receivePerson }}</span></td>
|
|
|
+ <td class="td-warm text-muted text-center"><span>@{{ item.putawayQty }}</span></td>
|
|
|
+ <td class="td-warm text-muted text-center"><span>@{{ item.putawayPerson }}</span></td>
|
|
|
+ <td class="td-warm text-muted text-center"><span>@{{ item.unfinishedReceiveQty }}</span></td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
+ <div style="width: 100%">
|
|
|
+ @can('入库管理-实时收货看板-关单')
|
|
|
+ <button @click="closeAsnDetail()" type="button" class="btn btn-success float-right" v-if="resData.asnStatus !== '99'">
|
|
|
+ 关单
|
|
|
+ </button>
|
|
|
+ @endcan
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -153,6 +178,7 @@
|
|
|
let vue = new Vue({
|
|
|
el: "#list",
|
|
|
data: {
|
|
|
+ user: '{!! $user !!}',
|
|
|
timer: null,
|
|
|
resData: {
|
|
|
details: {
|
|
|
@@ -162,6 +188,12 @@
|
|
|
pages: null,
|
|
|
size: 50,
|
|
|
},
|
|
|
+ asnStatus: null,
|
|
|
+ asnType:null,
|
|
|
+ customerId:null,
|
|
|
+ asnNo:null,
|
|
|
+ warehouseId:null,
|
|
|
+ receiveTaskNo:null,
|
|
|
itemDetail: null,
|
|
|
},
|
|
|
searchSelects: {
|
|
|
@@ -180,6 +212,13 @@
|
|
|
finishedReceiveTime: null,
|
|
|
receivePerson: null,
|
|
|
},
|
|
|
+ closeAsnParam:{
|
|
|
+ asnType:null,
|
|
|
+ customerId:null,
|
|
|
+ asnNo:null,
|
|
|
+ warehouseId:null,
|
|
|
+ user:null,
|
|
|
+ },
|
|
|
size: 50,
|
|
|
current: 1,
|
|
|
},
|
|
|
@@ -202,13 +241,15 @@
|
|
|
{name: 'asnNo', value: 'ASN单号'},
|
|
|
{name: 'createSingleTime', value: '开单时间'},
|
|
|
{name: 'finishedReceiveTime', value: '完成收货时间'},
|
|
|
- {name: 'receivePerson', value: '收货员'},
|
|
|
+ {name: 'receivePerson', value: '关单员'},
|
|
|
{name: 'expectancyAmount', value: ' 预期数'},
|
|
|
{name: 'receivedAmount', value: '已收数'},
|
|
|
{name: 'unfinishedReceiveAmount', value: '未收数'},
|
|
|
{name: 'receiveConsumeDuration', value: '收货时间'},
|
|
|
{name: 'action', value: '查看明细'},
|
|
|
-
|
|
|
+ @can('入库管理-实时收货看板-关单')
|
|
|
+ {name: 'closeAsn', value: '关单'},
|
|
|
+ @endcan
|
|
|
];
|
|
|
new Header({
|
|
|
el: "table",
|
|
|
@@ -225,8 +266,11 @@
|
|
|
{name: 'descr', value: '商品名称'},
|
|
|
{name: 'sku', value: 'SKU'},
|
|
|
{name: 'expectedQty', value: '预期数'},
|
|
|
- {name: 'receivedQty', value: '已收数(上架)'},
|
|
|
- {name: 'unfinishedReceiveQty', value: '未收数'},
|
|
|
+ {name: 'receivedQty', value: '收货数'},
|
|
|
+ {name: 'receivePerson', value: '收货人'},
|
|
|
+ {name: 'putawayQty',class:"text-danger font-weight-bold", value: '上架数'},
|
|
|
+ {name: 'putawayPerson', value: '上架人'},
|
|
|
+ {name: 'unfinishedReceiveQty',class:"text-danger font-weight-bold", value: '未收数'},
|
|
|
];
|
|
|
new Header({
|
|
|
el: "table_inner",
|
|
|
@@ -239,9 +283,7 @@
|
|
|
},
|
|
|
methods: {
|
|
|
getPageResult(url) {
|
|
|
- tempTip.showSuccess('开始查询,请稍后!');
|
|
|
axios.post(url, this.getSearch()).then(res => {
|
|
|
- tempTip.showSuccess('查询成功!');
|
|
|
if (res.data.code !== 200) {
|
|
|
this.resData.details.data = [];
|
|
|
this.resData.details.total = 0
|
|
|
@@ -261,7 +303,6 @@
|
|
|
let search = Object.assign({}, this.search);
|
|
|
search.startTime += ' 00:00:00';
|
|
|
search.endTime += ' 23:59:59';
|
|
|
- console.log(search);
|
|
|
return search;
|
|
|
},
|
|
|
//初始化日期为今天和昨天
|
|
|
@@ -300,18 +341,85 @@
|
|
|
let url = this.getBaseUrl() + `/api/receiveBoard/formList?size=${this.size}¤t=${this.current}`
|
|
|
this.getPageResult(url);
|
|
|
},
|
|
|
- showDetail(receiveTaskNo, reservationNo, asnNo) {
|
|
|
+ showDetail({receiveTaskNo, reservationNo, asnNo,asnStatus,asnType,customerCode,warehouseId}) {
|
|
|
let url = this.getBaseUrl() + `/api/receiveBoard/receiveDetail?receiveTaskNo=${receiveTaskNo}&reservationNo=${reservationNo}&asnNo=${asnNo}`
|
|
|
- tempTip.showSuccess('开始查询,请稍后!');
|
|
|
axios.get(url, this.getSearch()).then(res => {
|
|
|
- tempTip.showSuccess('查询成功!');
|
|
|
if (res.data.code !== 200) {
|
|
|
this.resData.itemDetail = null;
|
|
|
} else {
|
|
|
+ this.resData.asnStatus = asnStatus;
|
|
|
+ this.resData.asnType=asnType;
|
|
|
+ this.resData.customerId=customerCode;
|
|
|
+ this.resData.asnNo=asnNo;
|
|
|
+ this.resData.warehouseId=warehouseId;
|
|
|
+ this.resData.receiveTaskNo=receiveTaskNo;
|
|
|
this.resData.itemDetail = res.data.data;
|
|
|
}
|
|
|
});
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ getCloseAsnParam(item){
|
|
|
+ this.closeAsnParam.asnType=item.asnType;
|
|
|
+ this.closeAsnParam.customerId=item.customerCode;
|
|
|
+ this.closeAsnParam.asnNo=item.asnNo;
|
|
|
+ this.closeAsnParam.warehouseId=item.warehouseId;
|
|
|
+ this.closeAsnParam.user=this.user;
|
|
|
+ return Object.assign({}, this.closeAsnParam);
|
|
|
+ },
|
|
|
+ getCloseAsnDetailParam(){
|
|
|
+ this.closeAsnParam.asnType=this.resData.asnType;
|
|
|
+ this.closeAsnParam.customerId=this.resData.customerId;
|
|
|
+ this.closeAsnParam.asnNo=this.resData.asnNo;
|
|
|
+ this.closeAsnParam.warehouseId=this.resData.warehouseId;
|
|
|
+ this.closeAsnParam.user=this.user;
|
|
|
+ return Object.assign({}, this.closeAsnParam);
|
|
|
+ },
|
|
|
+ cleanCloseAsnParam(){
|
|
|
+ this.closeAsnParam.asnNo=null;
|
|
|
+ this.closeAsnParam.asnType=null;
|
|
|
+ this.closeAsnParam.customerId=null;
|
|
|
+ this.closeAsnParam.warehouseId=null;
|
|
|
+ this.closeAsnParam.user=null;
|
|
|
+ },
|
|
|
+ closeAsn(item) {
|
|
|
+ if(!confirm('确定要关闭ASN单号为:“'+item.asnNo+'”的订单吗?')){return};
|
|
|
+ let url = this.getBaseUrl() + `/api/receiveBoard/closeAsn`
|
|
|
+ axios.post(url, this.getCloseAsnParam(item)).then(res => {
|
|
|
+ if (res.data.code !== 200 || !res.data.data) {
|
|
|
+ window.tempTip.setDuration(2000);
|
|
|
+ window.tempTip.show("关单失败!");
|
|
|
+ } else {
|
|
|
+ window.tempTip.setDuration(2000);
|
|
|
+ window.tempTip.showSuccess("关单成功!");
|
|
|
+ this.resData.details.data.forEach(i=>{
|
|
|
+ if (i.receiveTaskNo===item.receiveTaskNo){
|
|
|
+ i.asnStatus='99';
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.cleanCloseAsnParam();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ closeAsnDetail() {
|
|
|
+ if(!confirm('确定要关闭ASN单号为:“'+this.resData.asnNo+'”的订单吗?')){return};
|
|
|
+ let url = this.getBaseUrl() + `/api/receiveBoard/closeAsn`
|
|
|
+ axios.post(url,this.getCloseAsnDetailParam()).then(res => {
|
|
|
+ if (res.data.code !== 200 || !res.data.data) {
|
|
|
+ window.tempTip.setDuration(2000);
|
|
|
+ window.tempTip.show("关单失败!");
|
|
|
+ } else {
|
|
|
+ window.tempTip.setDuration(2000);
|
|
|
+ window.tempTip.showSuccess("关单成功!");
|
|
|
+ this.resData.details.data.forEach(i=>{
|
|
|
+ if (i.receiveTaskNo===this.resData.receiveTaskNo){
|
|
|
+ i.asnStatus='99';
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.cleanCloseAsnParam();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
|
|
|
},
|
|
|
|