248 lines
7.7 KiB
Vue
248 lines
7.7 KiB
Vue
<template>
|
||
<view class="wrap">
|
||
<view class="uni-padding-wrap uni-common-mt" style="padding: 10px;">
|
||
<view class="row">
|
||
<scroll-view class="chen-scroll" scroll-y="true" scroll-x="true">
|
||
<u-table>
|
||
<u-tr class="u-tr">
|
||
<u-th width="25%" class="u-th">单号</u-th>
|
||
<u-th width="25%" class="u-th">物料</u-th>
|
||
<u-th width="25%" class="u-th">描述</u-th>
|
||
<u-th width="15%" class="u-th">入库数量</u-th>
|
||
<u-th width="25%" class="u-th">操作</u-th>
|
||
</u-tr>
|
||
<u-tr class="u-tr" style="height: 30px;" v-for="(item,index) in itemList" :key="index">
|
||
<u-td width="25%" style="overflow: hidden; white-space: normal;" class="u-td">
|
||
{{item.documentNo}}
|
||
</u-td>
|
||
<u-td width="25%" style="overflow: hidden; white-space: normal;" class="u-td">
|
||
{{item.item}}
|
||
</u-td>
|
||
<u-td width="25%" style="overflow: hidden; white-space: normal;" class="u-td">
|
||
{{item.itemDesc}}
|
||
</u-td>
|
||
<u-td width="15%" style="overflow: hidden; white-space: normal;" class="u-td">
|
||
{{item.requiredQty}}
|
||
</u-td>
|
||
<u-td width="25%" class="u-td">
|
||
<u-row>
|
||
<u-button style="width:50%; color: black" size="mini" type="warning" v-if="item.isReceOut =='Y' && item.inIninvFlag == 'Y'" @click="navToItemFormDetail(item)">入库接收</u-button>
|
||
<u-button style="width:50%; color: black" size="mini" type="success" v-if="item.isReceOut == 'Y' && item.receiveComplete == 'Y'" @click="receiveInv(item)">接收完成</u-button>
|
||
<u-button style="width:50%; color: black" size="mini" type="primary" v-if="item.isReceOut == 'Y' && item.receiveExecute == 'Y'" @click="inInv(item)">入库执行</u-button>
|
||
<u-button style="width:50%; color: black" size="mini" type="info" v-if="item.isReceOut =='Y' && item.finishInInvFlag == 'Y'" @click="finishInInv(item)">入库完成</u-button>
|
||
<u-button style="width:50%; color: black" size="mini" type="primary" v-if="item.isReceOut == 'N'" @click="inInv(item)">入库执行</u-button>
|
||
<u-button style="width:50%;" size="mini" type="info" v-if="item.isReceOut =='N'" @click="finishInInv(item)">入库完成</u-button>
|
||
</u-row>
|
||
</u-td>
|
||
</u-tr>
|
||
</u-table>
|
||
</scroll-view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
import {isBlank} from "utils/string";
|
||
import {inputFocus} from 'utils/common';
|
||
import {add} from 'utils/number';
|
||
import URow from "../../../uview-ui/components/u-row/u-row";
|
||
|
||
export default {
|
||
components: {URow},
|
||
data() {
|
||
return {
|
||
site: this.vuex_tenantId,
|
||
isUse: false,
|
||
wms_document_save: false,
|
||
formObj: {},
|
||
documentNo: "",
|
||
itemForm: {},
|
||
submitList: [],
|
||
codeList: [],
|
||
verifyDefaultStorageBin: "",
|
||
dialogItemType1FormVisible: true,
|
||
itemList: [],
|
||
initData: {
|
||
documentNo: "",
|
||
itemList: [],
|
||
site: this.vuex_tenantId,
|
||
},
|
||
receive: this.$u.api.nlvWms.storag_request_detail.receive,
|
||
checkReceive: this.$u.api.nlvWms.storag_request_detail.checkReceive,
|
||
receiveExecute : this.$u.api.nlvWms.storag_request_detail.receiveExecute,
|
||
receiveComplete: this.$u.api.nlvWms.storag_request_detail.receiveComplete,
|
||
};
|
||
},
|
||
|
||
onLoad() {
|
||
let me = this;
|
||
me.site = me.vuex_tenantId;
|
||
me.loadData();
|
||
},
|
||
onShow() {
|
||
let me = this;
|
||
me.loadData();
|
||
},
|
||
|
||
methods: {
|
||
loadData() {
|
||
let me = this
|
||
this.$u.api.nlvWms.production_warehousing.selectDocumentNo().then((res)=> {
|
||
me.itemList = res.data;
|
||
console.log(me.itemList)
|
||
}).catch((e)=> {
|
||
console.log(e)
|
||
})
|
||
},
|
||
//入库接收
|
||
receiveInv(row,index) {
|
||
let me = this;
|
||
let param = {
|
||
documentNo: row.documentNo,
|
||
item: row.item,
|
||
}
|
||
me.receive(param).then((res) => {
|
||
me.$u.toast("接收完成");
|
||
me.loadData();
|
||
}).catch((e)=> {
|
||
console.log(e)
|
||
})
|
||
},
|
||
//入库执行(Y)
|
||
inInv(row,index) {
|
||
let me = this;
|
||
let param = {
|
||
documentNo: row.documentNo,
|
||
item: row.item,
|
||
}
|
||
me.receiveExecute(param).then((res) => {
|
||
if (res.code == 0) {
|
||
me.navToReceiveExecuteDetail(row)
|
||
}
|
||
}).catch((e)=> {
|
||
console.log(e)
|
||
})
|
||
},
|
||
//入库完成(Y)
|
||
finishInInv(row,index) {
|
||
let me = this;
|
||
let param = {
|
||
documentNo: row.documentNo,
|
||
item: row.item,
|
||
}
|
||
me.receiveComplete(param).then((res) => {
|
||
if (res.code == 0) {
|
||
me.$u.toast("入库完成");
|
||
me.loadData();
|
||
}
|
||
}).catch((e)=> {
|
||
console.log(e)
|
||
})
|
||
},
|
||
getList(documentNo) {
|
||
let me = this;
|
||
let param = {
|
||
documentNo: documentNo
|
||
}
|
||
this.$u.api.nlvWms.production_warehousing.selectDocumentNo(param).then((res)=> {
|
||
me.itemList = res.data;
|
||
}).catch((e)=> {
|
||
console.log(e)
|
||
})
|
||
},
|
||
|
||
isNotBank(str) {
|
||
return !isBlank(str);
|
||
},
|
||
|
||
inputConfirm(target, id) {
|
||
let me = this;
|
||
switch (id) {
|
||
case "item":
|
||
if (target.inventoryQty < 0) {
|
||
me.$set(target, "inventoryQty", 0);
|
||
} else {
|
||
me.$set(target, "inventoryQty", me.toFixed(target.inventoryQty, 4));
|
||
}
|
||
}
|
||
},
|
||
//-------------------------------------------------------------------------------------------
|
||
checkReceiveAndNavToItemFormDetail(row) {
|
||
let me = this;
|
||
let param = {
|
||
documentNo: row.originalDocumentNo,
|
||
item: row.item,
|
||
}
|
||
me.checkReceive(param).then(res => {
|
||
if (res.code == 0) {
|
||
me.navToItemFormDetail(row)
|
||
}
|
||
}).catch(e => {
|
||
console.log(e)
|
||
})
|
||
},
|
||
navToItemFormDetail(row) {
|
||
let me = this;
|
||
console.log(row)
|
||
uni.navigateTo({
|
||
url: '/pages/nlv-wms/production-warehousing/itemFormDetail?params=' + encodeURIComponent(JSON.stringify({
|
||
site: me.site,
|
||
documentNo: row.documentNo,
|
||
//originalDocumentNo: row.originalDocumentNo,
|
||
item : row.item,
|
||
itemBo: row.itemBo,
|
||
requiredQty: row.requiredQty,
|
||
qty: row.qty
|
||
})),
|
||
fail: function (e) {
|
||
console.log(e);
|
||
}
|
||
});
|
||
},
|
||
navToReceiveExecuteDetail(row) {
|
||
let me = this;
|
||
uni.navigateTo({
|
||
url: '/pages/nlv-wms/production-warehousing/receiveExecuteDetail?params=' + encodeURIComponent(JSON.stringify({
|
||
site: me.site,
|
||
documentNo: row.documentNo,
|
||
//originalDocumentNo: row.originalDocumentNo,
|
||
item: row.item,
|
||
itemBo: row.itemBo,
|
||
itemDesc: row.itemDesc,
|
||
unit: row.unit,
|
||
requiredQty: row.requiredQty,
|
||
qty: row.qty,
|
||
lotNumber: row.lotNumber
|
||
})),
|
||
fail: function (e) {
|
||
console.log(e);
|
||
}
|
||
})
|
||
},
|
||
},
|
||
|
||
};
|
||
</script>
|
||
|
||
<style scoped>
|
||
.uni-form-item .title {
|
||
padding: 10px;
|
||
padding-left: 0px;
|
||
}
|
||
|
||
.stay-below {
|
||
width: 98%;
|
||
position: fixed;
|
||
bottom: 0;
|
||
}
|
||
|
||
.inputBorder {
|
||
display: flex;
|
||
justify-content: flex-end;
|
||
border: 1px solid #dcdfe6;
|
||
border-radius: 4px;
|
||
}
|
||
|
||
</style>
|