<template>
|
<view class="overflow">
|
<cu-custom bgColor="bg-white" :isBack="true">
|
<block slot="backText">
|
</block>
|
<block slot="content">容器回库</block>
|
</cu-custom>
|
<view class="flex justify-end align-center padding_right30rpx padding_top12rpx">
|
<text class="fontSize12rpx"> 操作人:{{operator}} </text>
|
</view>
|
<u-form labelPosition="top" :model="warehouse" ref="warehouseRef">
|
<u-row class="border_bottom margin_top10rpx padding10" style="background-color: #fff;">
|
<u-col span="10">
|
<u-form-item label="容器编号:" prop="Code" required
|
style="font-size: 16px;font-weight: bold;padding: 0 0 10rpx;">
|
<input v-model="warehouse.Code" placeholder="请录入或扫码" @focus="focu=true" @blur="query"
|
class="width padding_left25rpx" style="font-weight: bolder;margin-left: 15rpx;">
|
</input>
|
<u-icon name="close-circle-fill" color="#848484" v-if="warehouse.Code && focu"
|
@click="warehouse.Code=''"></u-icon>
|
</u-form-item>
|
</u-col>
|
<u-col span="2">
|
<u-icon class="iconfont icon-saoma fontSize60rpx"></u-icon>
|
</u-col>
|
</u-row>
|
</u-form>
|
<modal-code ref="resmodal" :rescode='rescode' :resmessage='resmessage' />
|
<!-- <view class="width margin_auto background_fff fixed bottom140">
|
<view class="flex align-center height80rpx padding border border_radius box_sizing justify-between">
|
<view class="fontSize34rpx iconfont icon-zhanghao col-0d11c9">入库口</view>
|
<view class="">
|
<text>{{loca}}</text>
|
<u-icon name="arrow-down" style="color: #b5b5b5;" @click="outlist">
|
</u-icon>
|
</view>
|
</view>
|
<u-select v-model="accshow" :list="accList" @confirm="confirm"></u-select>
|
</view> -->
|
<button-modal :subShow='true' garmenTitle='确认入库' @submit='submit' @reset='rest' />
|
</view>
|
</template>
|
|
<script>
|
import ButtonModal from '../../components/buttonModal.vue'
|
import ModalCode from '../../components/ModalCode.vue'
|
import {
|
list
|
} from '@/api/putIn/three.js'
|
import {
|
stocktakingWhours
|
} from '@/api/check/check.js'
|
export default {
|
data() {
|
return {
|
renameFocus: false,
|
modalshow: false,
|
rescode: 0,
|
resmessage: "",
|
detailshow: false,
|
operator: '',
|
accshow: false, //入库口弹窗
|
accList: [], //入库口列表
|
ware: '', //入库口弹窗
|
loca: '', //入库口回显
|
focu: false,
|
wolist: [{
|
value: 1,
|
label: 801
|
},
|
{
|
value: 1,
|
label: 802
|
}
|
], //出库列表
|
singlist: [
|
// {
|
// "warematerialCode": "string",
|
// "collectNo": "string",
|
// "purchaseNo": "string",
|
// "category": "string",
|
// "wareMaterialTypeName": "string",
|
// "specificationModel": "string",
|
// "long": "string",
|
// "width": "string",
|
// "high": "string",
|
// "weight": "string",
|
// "barCode": "string",
|
// "company": "string",
|
// "uncollectedQuantity": 0,
|
// "id": 0
|
// },
|
], //物料详情
|
options: [{
|
text: '详情',
|
style: {
|
backgroundColor: '#fc9f35'
|
}
|
}],
|
materlist: [],
|
warehouse: {
|
Code: ''
|
},
|
warehouseRules: {
|
Code: [{
|
required: true,
|
message: '容器编号不能为空',
|
trigger: 'blur'
|
}]
|
},
|
};
|
},
|
components: {
|
ButtonModal,
|
ModalCode
|
},
|
onReady() {
|
this.$refs.warehouseRef.setRules(this.warehouseRules)
|
},
|
mounted() {
|
// this.WarehousChangePort()
|
this.operator = JSON.parse(uni.getStorageSync('userInfo')).name
|
// this.outlist()
|
},
|
methods: {
|
//查询物料
|
query(e) {
|
this.$refs.warehouseRef.validate(valid => {
|
if (valid) {
|
setTimeout(() => {
|
this.focu = false
|
}, 200)
|
}
|
})
|
},
|
//入库口
|
outlist() {
|
let params = {
|
PageNo: 1,
|
PageSize: 999
|
}
|
list(params).then((res => {
|
if (res.code == 200) {
|
this.accshow=true
|
this.accList = res.data.rows.filter((item) => {
|
if (item.siteTypeName == '入库' || item.siteTypeName == '出入库') {
|
return item
|
}
|
})
|
this.accList.forEach((item, index) => {
|
item.label = item.name
|
item.value = index + 1
|
})
|
}
|
}))
|
},
|
//选择入库口
|
confirm(e) {
|
this.loca = e[0].label
|
this.ware = this.accList[e[0].value - 1].code
|
},
|
//确认
|
submit() {
|
let params = {
|
createdTime: this.Datetime,
|
updatedTime: this.Datetime,
|
createdUserId: JSON.parse(uni.getStorageSync('userInfo')).id,
|
createdUserName: JSON.parse(uni.getStorageSync('userInfo')).name,
|
updatedUserId: JSON.parse(uni.getStorageSync('userInfo')).id,
|
updatedUserName: JSON.parse(uni.getStorageSync('userInfo')).name,
|
wareContainerCode: this.warehouse.Code,
|
// wareLocationCode: this.ware,
|
wareLocationCode: '',
|
orderType: 9
|
}
|
stocktakingWhours(params).then((res) => {
|
this.rescode = res.code
|
this.resmessage = res.message
|
this.$refs.resmodal.show = true
|
if (res.code == 200) {
|
this.renameFocus = true
|
this.warehouse.Code = ''
|
this.loca = ''
|
this.ware = ''
|
}
|
})
|
}
|
|
},
|
|
}
|
</script>
|
|
<style lang="scss">
|
|
</style>
|