Merge branch 'master' of http://106.12.13.113:3000/lanju/lanju-app
commit
dfc30bb8f1
@ -0,0 +1,501 @@
|
||||
<template>
|
||||
<view class="page-product-receipt">
|
||||
<view class="header" :style="{ backgroundColor: `rgba(250, 53, 52, ${scrollTop / 100})` }">
|
||||
<view class="left">
|
||||
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack({})" />
|
||||
</view>
|
||||
<view class="title">库内转存</view>
|
||||
<view class="right"></view>
|
||||
</view>
|
||||
<view class="fiexdcontent">
|
||||
<u-form class="form" ref="form" label-width="180rpx">
|
||||
<!-- 单号 -->
|
||||
<view class="single">
|
||||
<view class="single-left">
|
||||
<view>托盘码:</view>
|
||||
<u-search placeholder="请扫描" v-model="rfidNo" @search="query" :show-action="false"></u-search>
|
||||
</view>
|
||||
<!-- <view class="single-right">
|
||||
<u-button type="primary" @click="query">提单</u-button>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- 订单 -->
|
||||
<u-form-item label="目标库位">
|
||||
<u-input :border="true" v-model="mubiaowlcode" placeholder="" style="overflow: hidden" />
|
||||
<!-- <jPicker sureColor="#ff0000" @bindpicker="bookTypeChange" showKey="label" valKey="value" :val="aimWl.value" :options="materilist" /> -->
|
||||
</u-form-item>
|
||||
<!-- <u-form-item label="当前位置是否为空">
|
||||
|
||||
<jPicker sureColor="#ff0000" @bindpicker="userDefined1Change" showKey="label" valKey="value" :val="bimWl.value" :options="userDefined1list" />
|
||||
</u-form-item> -->
|
||||
</u-form>
|
||||
</view>
|
||||
<!-- <view style="height: 14rpx"></view> -->
|
||||
<view v-show="Object.keys(list).length > 0" style="margin-top: 30rpx" class="scroll">
|
||||
<!-- <view v-for="item in list" :key="item.id"> -->
|
||||
<u-form style="margin-top: 10rpx" class="form2">
|
||||
<view class="list">
|
||||
<view class="row-list">
|
||||
<view class="list-item"> 物料编码: </view>
|
||||
<view> {{ list.materialCode }} </view>
|
||||
</view>
|
||||
<view class="row-list">
|
||||
<view class="list-item"> 物料描述: </view>
|
||||
<view> {{ list.materialDesc }} </view>
|
||||
</view>
|
||||
<view class="row-list">
|
||||
<view class="row-list-item">
|
||||
<view class="list-item"> 数量: </view>
|
||||
<view> {{ list.amount }} </view>
|
||||
</view>
|
||||
<view class="row-list-item">
|
||||
<view class="list-item"> 原库位: </view>
|
||||
<view> {{ list.wlCode }} </view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-form>
|
||||
<!-- </view> -->
|
||||
</view>
|
||||
<view class="bottom-bar">
|
||||
<u-row class="button-bar">
|
||||
<!-- 返回 -->
|
||||
<u-col :span="6">
|
||||
<u-button type="error" @click="uni.navigateBack({})">取消</u-button>
|
||||
</u-col>
|
||||
<!-- 确定 -->
|
||||
<u-col :span="6">
|
||||
<u-button @click="onSubmit" type="primary">移库</u-button>
|
||||
</u-col>
|
||||
</u-row>
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { Component } from 'vue-property-decorator';
|
||||
import { BasePage } from '@/components/base/page';
|
||||
import jPicker from '@/components/J-Picker/jPicker.vue';
|
||||
import model from './model';
|
||||
import { session } from '@/store/modules/session';
|
||||
interface OptionType {
|
||||
label: string;
|
||||
value: string;
|
||||
}
|
||||
//import { session } from '@/store/modules/session';
|
||||
@Component({
|
||||
components: {
|
||||
jPicker,
|
||||
},
|
||||
})
|
||||
export default class TransferInlibrary extends BasePage {
|
||||
model = model;
|
||||
location = '';
|
||||
rfidNo = '';
|
||||
list: any = {};
|
||||
aimWl = {} as OptionType;
|
||||
bimWl = {} as OptionType;
|
||||
mubiaowlcode = '';
|
||||
border = true;
|
||||
async onReady() {
|
||||
// await this.model.getwarehouselist();
|
||||
// this.warehouselist = model.warehouselist;
|
||||
// const cimWl = this.warehouselist.find((item) => item.value === 'WH02');
|
||||
// if (cimWl) {
|
||||
// this.cimWl = cimWl;
|
||||
// } else {
|
||||
// this.cimWl = this.warehouselist[0];
|
||||
// }
|
||||
}
|
||||
async query() {
|
||||
if (this.rfidNo == '') {
|
||||
(this.$refs.uToast as any).show({
|
||||
title: '请输入托盘码',
|
||||
// url: '/pages/user/index'
|
||||
});
|
||||
return;
|
||||
}
|
||||
await this.model.scanquery(this.rfidNo);
|
||||
if (this.model.scanquerydata) {
|
||||
this.list = this.model.scanquerydata;
|
||||
}
|
||||
}
|
||||
async onSubmit() {
|
||||
if (this.rfidNo == '') {
|
||||
(this.$refs.uToast as any).show({
|
||||
title: '请输入托盘码',
|
||||
// url: '/pages/user/index'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.mubiaowlcode == '') {
|
||||
(this.$refs.uToast as any).show({
|
||||
title: '请输入目标库位',
|
||||
// url: '/pages/user/index'
|
||||
});
|
||||
return;
|
||||
}
|
||||
let item: any = {};
|
||||
item.factoryCode = session.FactoryCode;
|
||||
item.tOwlCode = this.mubiaowlcode;
|
||||
item.wlCode = this.list.wlCode;
|
||||
item.materialCode = this.list.materialCode;
|
||||
item.materialDesc = this.list.materialDesc;
|
||||
item.amount = this.list.amount;
|
||||
item.sn = this.rfidNo;
|
||||
item.createBy = session.loginName;
|
||||
await this.model.out(item);
|
||||
if (this.model.SubmitCode == '200') {
|
||||
(this.$refs.uToast as any).show({
|
||||
title: '成功',
|
||||
type: 'success',
|
||||
});
|
||||
this.mepty();
|
||||
//this.getlist();
|
||||
} else {
|
||||
(this.$refs.uToast as any).show({
|
||||
title: '失败',
|
||||
type: 'error',
|
||||
});
|
||||
//this.getlist();
|
||||
}
|
||||
}
|
||||
mepty() {
|
||||
this.rfidNo = '';
|
||||
this.mubiaowlcode = '';
|
||||
this.list = {};
|
||||
//this.bimWl = {} as OptionType;
|
||||
//this.model.mepty();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
body {
|
||||
background-color: rgb(242, 242, 242);
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
.page-product-receipt {
|
||||
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #f8262c 51%, #d9001b 100%) no-repeat;
|
||||
background-size: 100% 600rpx;
|
||||
padding: 118rpx 30rpx 162rpx;
|
||||
min-height: 100%;
|
||||
|
||||
.header {
|
||||
position: fixed;
|
||||
top: 0rpx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 99;
|
||||
display: flex;
|
||||
height: 120rpx;
|
||||
line-height: 88rpx;
|
||||
color: #fff;
|
||||
font-size: 34rpx;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
padding: 45rpx 0rpx 0rpx;
|
||||
|
||||
.title {
|
||||
flex: 3;
|
||||
}
|
||||
|
||||
.left,
|
||||
.right {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.icon {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.fiexdcontent {
|
||||
position: fixed;
|
||||
width: 92%;
|
||||
box-shadow: 0 0 14px 0 rgb(128 128 128 / 46%);
|
||||
z-index: 100;
|
||||
}
|
||||
.form {
|
||||
background-color: #fff;
|
||||
padding: 15rpx;
|
||||
border-radius: 10rpx;
|
||||
//box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
|
||||
|
||||
.u-form-item {
|
||||
padding: 20rpx 0;
|
||||
line-height: 35rpx;
|
||||
|
||||
.Transfer {
|
||||
width: 280rpx;
|
||||
height: 64rpx;
|
||||
background: rgb(242, 242, 242);
|
||||
border-radius: 110rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.single {
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
display: flex;
|
||||
|
||||
.single-left {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
|
||||
view {
|
||||
width: 190rpx;
|
||||
height: 100%;
|
||||
line-height: 55rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.single-right {
|
||||
button {
|
||||
// margin-top: 15rpx;
|
||||
width: 140rpx;
|
||||
height: 70rpx;
|
||||
background-color: #fa3534;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-around;
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
.form3 {
|
||||
background-color: #fff;
|
||||
padding: 20rpx 20rpx 20rpx;
|
||||
border-radius: 10rpx;
|
||||
height: 210rpx;
|
||||
overflow: scroll;
|
||||
//box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
|
||||
//color: #8d8989;
|
||||
// .list {
|
||||
// display: flex;
|
||||
// flex-direction: row;
|
||||
// }
|
||||
.row-list {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
.row-list-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
width: 40%;
|
||||
}
|
||||
.row-list-item1 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
width: 50%;
|
||||
}
|
||||
.row-list-item2 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
width: 40%;
|
||||
}
|
||||
.list-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
// flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.righttitle {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
.boder-icon-rigth {
|
||||
border: 1rpx solid #fa3534;
|
||||
width: 130rpx;
|
||||
text-align: center;
|
||||
background: #fa3534;
|
||||
color: #ffffff;
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.form4 {
|
||||
background-color: #fff;
|
||||
padding: 18rpx;
|
||||
border-radius: 10rpx;
|
||||
margin-top: 2rpx;
|
||||
.u-input__input {
|
||||
min-height: 36px;
|
||||
}
|
||||
}
|
||||
|
||||
.scroll {
|
||||
position: absolute;
|
||||
width: 92%;
|
||||
top: 150px;
|
||||
// margin-top: 2rpx;
|
||||
// height: 680rpx;
|
||||
// position: absolute;
|
||||
// width: 92%;
|
||||
// top: 740rpx;
|
||||
/* bottom: 40px; */
|
||||
// overflow: auto;
|
||||
// background-color: #f2f2f2;
|
||||
.form2 {
|
||||
background-color: #fff;
|
||||
padding: 25rpx 25rpx 25rpx;
|
||||
border-radius: 10rpx;
|
||||
box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
|
||||
|
||||
.row-list {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
.row-list-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
width: 40%;
|
||||
}
|
||||
.list-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.righttitle {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
.boder-icon-rigth {
|
||||
border: 1rpx solid #fa3534;
|
||||
width: 130rpx;
|
||||
text-align: center;
|
||||
background: #fa3534;
|
||||
color: #ffffff;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.zhuangtai {
|
||||
background: #a7a0a04a;
|
||||
width: 224rpx;
|
||||
margin-right: -27rpx;
|
||||
border: 2rpx solid #a7a0a04a;
|
||||
border-radius: 12rpx;
|
||||
text-align: center;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.zhuangtai[data-state='1'] {
|
||||
color: green;
|
||||
}
|
||||
|
||||
.zhuangtai[data-state='0'] {
|
||||
color: blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-bar {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 99;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.button-bar {
|
||||
}
|
||||
|
||||
.photoList {
|
||||
display: flex;
|
||||
padding-top: 12rpx;
|
||||
|
||||
.chooseBtn {
|
||||
width: 202rpx;
|
||||
height: 202rpx;
|
||||
background: #fafafa;
|
||||
border-radius: 12rpx;
|
||||
border: 2rpx dashed #e2e2e2;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.inner {
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.desc {
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #24252a;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.img {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
margin-bottom: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.photoBox {
|
||||
width: 202rpx;
|
||||
height: 202rpx;
|
||||
background: #fafafa;
|
||||
border-radius: 12rpx;
|
||||
position: relative;
|
||||
|
||||
.closeBtn {
|
||||
position: absolute;
|
||||
top: -12rpx;
|
||||
right: -12rpx;
|
||||
z-index: 2;
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
|
||||
.img {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.img {
|
||||
width: 202rpx;
|
||||
height: 202rpx;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.itemBox {
|
||||
flex: 0 0 202rpx;
|
||||
margin-right: 20rpx;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// /deep/ .remarksBox textarea {
|
||||
// font-size: 24rpx;
|
||||
// }
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,32 @@
|
||||
import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators';
|
||||
import store from '@/store';
|
||||
import http from '@/utils/request';
|
||||
import { url } from '@/utils/url';
|
||||
import { session } from '@/store/modules/session';
|
||||
@Module({
|
||||
namespaced: true,
|
||||
dynamic: true,
|
||||
store,
|
||||
name: 'page.WhiteManagement.TransferInlibrary',
|
||||
})
|
||||
export class TransferInlibrary extends VuexModule {
|
||||
SubmitCode: any = '';
|
||||
@MutationAction
|
||||
async out(params: any) {
|
||||
const result: any = await http.post(url.lanjuwms.WhiteManagement.TransferInlibrary.WhiteWarehouseDump, params);
|
||||
const SubmitCode = result.code;
|
||||
return { SubmitCode };
|
||||
}
|
||||
scanquerydata: any = {};
|
||||
@MutationAction
|
||||
async scanquery(params: any) {
|
||||
const result: any = await http.post(url.lanjuwms.WhiteManagement.WhiteOutstorage.selectQueryTrayInfor, {
|
||||
sn: params,
|
||||
factoryCode: session.FactoryCode,
|
||||
});
|
||||
const scanquerydata = result.data;
|
||||
return { scanquerydata };
|
||||
}
|
||||
}
|
||||
|
||||
export default getModule(TransferInlibrary);
|
@ -0,0 +1,78 @@
|
||||
import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators';
|
||||
import store from '@/store';
|
||||
import http from '@/utils/request';
|
||||
import { url } from '@/utils/url';
|
||||
import { session } from '@/store/modules/session';
|
||||
@Module({
|
||||
namespaced: true,
|
||||
dynamic: true,
|
||||
store,
|
||||
name: 'page.WhiteManagement.WhiteInstorage',
|
||||
})
|
||||
// http.defaults.headers.common['poolName'] = session.PoolName;
|
||||
export class WhiteInstorage extends VuexModule {
|
||||
WlList = [];
|
||||
orderNoItemList: any = {};
|
||||
Picilist: any = [];
|
||||
@MutationAction
|
||||
async queryOrderNo(orderNo: any) {
|
||||
const result: any = await http.post(url.lanjuwms.WhiteManagement.WhiteInstorage.selectWmsOdsWhiteEmbryoInhAnd, {
|
||||
orderCode: orderNo,
|
||||
siteCode: session.FactoryCode,
|
||||
// headers: {
|
||||
// poolName: session.PoolName,
|
||||
// },
|
||||
});
|
||||
// http.defaults.headers.common['Accept-Language'] = session.PoolName;
|
||||
const orderNoItemList = result.data;
|
||||
const proOrderWorkorderBatchList = result.data.proOrderWorkorderBatchList;
|
||||
const Picilist = proOrderWorkorderBatchList.map((item) => ({
|
||||
...item,
|
||||
label: item.batchCode,
|
||||
value: item.batchCode,
|
||||
}));
|
||||
return { orderNoItemList, Picilist };
|
||||
}
|
||||
productCodeList: any = [];
|
||||
@MutationAction
|
||||
async list(orderNo: any) {
|
||||
const result: any = await http.get(url.lanjuwms.product.OfflineStorage.list + '/' + orderNo, {});
|
||||
const productCodeList = result.data;
|
||||
return { productCodeList };
|
||||
}
|
||||
SubmitCode: any = '';
|
||||
@MutationAction
|
||||
async insertTary(params: any) {
|
||||
const result: any = await http.post(url.lanjuwms.product.OfflineStorage.insertTary, params);
|
||||
const SubmitCode = result.code;
|
||||
return { SubmitCode };
|
||||
}
|
||||
@MutationAction
|
||||
async deleteTray(item: any) {
|
||||
console.log(item);
|
||||
const result: any = await http.delete(url.lanjuwms.product.OfflineStorage.deleteTray + '/' + item.sn + '/' + item.orderNo);
|
||||
const SubmitCode = result.code;
|
||||
return { SubmitCode };
|
||||
}
|
||||
@MutationAction
|
||||
async handPut(params: any) {
|
||||
const result: any = await http.post(url.lanjuwms.WhiteManagement.WhiteInstorage.addtWmsOdsWhiteEmbryoInhAnd, params);
|
||||
const SubmitCode = result.code;
|
||||
return { SubmitCode };
|
||||
}
|
||||
warehouselist: any = [];
|
||||
@MutationAction
|
||||
async getwarehouselist() {
|
||||
const result = await http.post(url.lanjuwms.raw.ProductionREQ.warehouselist, {
|
||||
factoryCode: session.FactoryCode,
|
||||
});
|
||||
const warehouselist = result.data.map((element: any) => ({
|
||||
label: element.warehouseName,
|
||||
value: element.warehouseCode,
|
||||
...element,
|
||||
}));
|
||||
return { warehouselist };
|
||||
}
|
||||
}
|
||||
|
||||
export default getModule(WhiteInstorage);
|
@ -0,0 +1,651 @@
|
||||
<template>
|
||||
<view class="page-product-receipt">
|
||||
<view class="header" :style="{ backgroundColor: `rgba(250, 53, 52, ${scrollTop / 100})` }">
|
||||
<view class="left">
|
||||
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack({})" />
|
||||
</view>
|
||||
<view class="title">白胚出库</view>
|
||||
<view class="right"></view>
|
||||
</view>
|
||||
<view class="fiexdcontent">
|
||||
<u-form class="form" ref="form" label-width="180rpx">
|
||||
<!-- 单号 -->
|
||||
<view class="single">
|
||||
<view class="single-left">
|
||||
<view>领料单号:</view>
|
||||
<u-search placeholder="请扫描" v-model="orderNo" @search="query" :show-action="false"></u-search>
|
||||
</view>
|
||||
<!-- <view class="single-right">
|
||||
<u-button type="primary" @click="query">提单</u-button>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- 订单 -->
|
||||
<u-form-item label="物料编码">
|
||||
<!-- <u-input :border="true" v-model="histroyItem.productDescZh" placeholder="" style="overflow: hidden" /> -->
|
||||
<jPicker sureColor="#ff0000" @bindpicker="bookTypeChange" showKey="label" valKey="value" :val="aimWl.value" :options="materilist" />
|
||||
</u-form-item>
|
||||
<!-- 机台 -->
|
||||
<!-- <u-form-item label="出库仓库"> 成品库 </u-form-item> -->
|
||||
</u-form>
|
||||
<u-form style="margin-top: 1rpx" class="form3">
|
||||
<view class="list">
|
||||
<view class="row-list">
|
||||
<view class="list-item"> 物料编码: </view>
|
||||
<view> {{ orderNoItemList && orderNoItemList.materialCode }} </view>
|
||||
</view>
|
||||
<view class="row-list">
|
||||
<view class="list-item"> 物料名称: </view>
|
||||
<view> {{ orderNoItemList && orderNoItemList.materialDesc }} </view>
|
||||
</view>
|
||||
<view class="row-list">
|
||||
<view class="row-list-item">
|
||||
<view class="list-item"> 应出/已出: </view>
|
||||
<view> {{ orderNoItemList && orderNoItemList.planNumber }}/{{ outNumber }} </view>
|
||||
</view>
|
||||
<view class="row-list-item">
|
||||
<view class="list-item"> 单位: </view>
|
||||
<view> {{ orderNoItemList && orderNoItemList.unit }} </view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="row-list">
|
||||
<view class="list-item">捡货数量: </view>
|
||||
<view> {{ outnumber }} </view>
|
||||
</view> -->
|
||||
</view>
|
||||
</u-form>
|
||||
<u-form class="form4">
|
||||
<u-search placeholder="请扫托盘" @search="addlist" v-model="boxnumber" :show-action="false"></u-search>
|
||||
<!-- <u-input style="border: 0.5rpx solid #8d8989; border-radius: 10rpx" v-model="boxnumber" @click="clickscan"></u-input> -->
|
||||
</u-form>
|
||||
</view>
|
||||
<view style="height: 14rpx"></view>
|
||||
<view class="scroll">
|
||||
<view v-for="(item, index) in list" :key="item.id">
|
||||
<u-form style="margin-top: 10rpx" class="form2">
|
||||
<view class="list">
|
||||
<view class="rowleft">
|
||||
<view class="row-list">
|
||||
<view class="row-list-item">
|
||||
<view class="list-item"> 托盘号: </view>
|
||||
<view> {{ item.sn }}</view>
|
||||
</view>
|
||||
<view class="row-list-item">
|
||||
<view class="list-item"> 批次号: </view>
|
||||
<view style="word-break: break-word"> {{ item.batchCode }} </view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="row-list">
|
||||
<view class="row-list-item">
|
||||
<view class="list-item"> 库位码: </view>
|
||||
<view> {{ item.wlCode }} </view>
|
||||
</view>
|
||||
<view class="row-list-item">
|
||||
<view class="list-item"> 出库数量: </view>
|
||||
<view> {{ item.amount }} </view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="rowright">
|
||||
<view class="righttitle">
|
||||
<view @click.stop="ondelete(item, index)" class="boder-icon-rigth"> 删除 </view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-form>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom-bar">
|
||||
<u-row class="button-bar">
|
||||
<!-- 确定 -->
|
||||
<u-col :span="6">
|
||||
<u-button @click="onSubmit" type="primary">出库</u-button>
|
||||
</u-col>
|
||||
<!-- 返回 -->
|
||||
<u-col :span="6">
|
||||
<u-button type="error" @click="uni.navigateBack({})">返回</u-button>
|
||||
</u-col>
|
||||
</u-row>
|
||||
</view>
|
||||
<u-modal v-model="showmodal" @confirm="confirm" :content="content" :show-cancel-button="true"></u-modal>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { Component } from 'vue-property-decorator';
|
||||
import { BasePage } from '@/components/base/page';
|
||||
import jPicker from '@/components/J-Picker/jPicker.vue';
|
||||
import model from './model';
|
||||
import { session } from '@/store/modules/session';
|
||||
interface OptionType {
|
||||
label: string;
|
||||
value: string;
|
||||
}
|
||||
//import { session } from '@/store/modules/session';
|
||||
@Component({
|
||||
components: {
|
||||
jPicker,
|
||||
},
|
||||
})
|
||||
export default class WhiteOutstorage extends BasePage {
|
||||
model = model;
|
||||
list: any = [];
|
||||
aimWl = {} as OptionType;
|
||||
boxnumber: any = '';
|
||||
materilist = [];
|
||||
showmodal = false;
|
||||
content: any = '';
|
||||
outNumber = 0;
|
||||
// remove: any = {};
|
||||
// async onReady() {
|
||||
// await this.model.queryLocation();
|
||||
// this.remove = this.model.WlList[0];
|
||||
// }
|
||||
// selectItem(e: any) {
|
||||
// this.remove = e.pickerName;
|
||||
// }
|
||||
orderNo: any = '';
|
||||
border = true;
|
||||
orderNoItemList: any = [];
|
||||
showProduceCodeList: any = [];
|
||||
itemdetail: any = '';
|
||||
delindex: any = -1;
|
||||
outnumber: any = 0;
|
||||
bookTypeChange(e: any) {
|
||||
this.aimWl = e.pickerName;
|
||||
this.orderNoItemList = e.pickerName;
|
||||
this.outNumber = this.orderNoItemList.outNumber;
|
||||
this.list = [];
|
||||
// this.getlist();
|
||||
// this.queryinformation();
|
||||
}
|
||||
//收货按钮
|
||||
async ondelete(item, index) {
|
||||
console.log('1234567', item);
|
||||
this.itemdetail = item;
|
||||
this.delindex = index;
|
||||
this.showmodal = true;
|
||||
this.content = '是否删除?';
|
||||
}
|
||||
async confirm() {
|
||||
this.itemdetail.orderNo = this.orderNo;
|
||||
console.log(this.itemdetail, this.orderNo);
|
||||
this.outNumber -= parseFloat(this.itemdetail.amount);
|
||||
// if(this.itemdetail.batchCode === this.cimWl.value){
|
||||
// this.actplanQuantity+=this.itemdetail.batchQuantity;
|
||||
// }
|
||||
this.list.splice(this.delindex, 1);
|
||||
}
|
||||
//查询货单关联采购单信息
|
||||
async query() {
|
||||
if (this.orderNo == '' || this.orderNo.length == 0) {
|
||||
(this.$refs.uToast as any).show({
|
||||
title: '请输入备货单号',
|
||||
// url: '/pages/user/index'
|
||||
});
|
||||
return;
|
||||
}
|
||||
await this.model.showProduceCode(this.orderNo);
|
||||
if (model.orderNoItemList) {
|
||||
this.materilist = [];
|
||||
let a: any = {};
|
||||
model.orderNoItemList.forEach((item) => {
|
||||
a.label = item.materialDesc;
|
||||
a.value = item.materialCode;
|
||||
this.materilist.push({ ...a, ...item });
|
||||
});
|
||||
this.aimWl = this.materilist[0];
|
||||
this.orderNoItemList = this.materilist[0];
|
||||
this.outNumber = this.orderNoItemList.outNumber;
|
||||
// this.queryinformation();
|
||||
// this.getlist();
|
||||
} else {
|
||||
this.materilist = [];
|
||||
}
|
||||
}
|
||||
//查询货单关联采购单信息
|
||||
async queryinformation() {
|
||||
if (this.orderNo == '' || this.orderNo.length == 0) {
|
||||
(this.$refs.uToast as any).show({
|
||||
title: '请输入备货单号',
|
||||
// url: '/pages/user/index'
|
||||
});
|
||||
return;
|
||||
}
|
||||
let item: any = {};
|
||||
item.orderNo = this.orderNo;
|
||||
item.value = this.aimWl.value;
|
||||
await this.model.queryinformation(item);
|
||||
if (model.information) {
|
||||
this.orderNoItemList = model.information;
|
||||
} else {
|
||||
this.orderNoItemList = {};
|
||||
}
|
||||
// this.getlist();
|
||||
}
|
||||
async getlist() {
|
||||
let item: any = {};
|
||||
item.orderNo = this.orderNo;
|
||||
item.value = this.aimWl.value;
|
||||
await (this.model as any).showTrays(item);
|
||||
if (model.TraysList.length > 0) {
|
||||
this.list = model.TraysList;
|
||||
this.outnumber = model.TraysList.length;
|
||||
} else {
|
||||
this.list = [];
|
||||
this.outnumber = 0;
|
||||
}
|
||||
console.log(model.TraysList);
|
||||
}
|
||||
async addlist() {
|
||||
if (this.boxnumber == '') {
|
||||
(this.$refs.uToast as any).show({
|
||||
title: '请输入或扫描托盘',
|
||||
// url: '/pages/user/index'
|
||||
});
|
||||
return;
|
||||
}
|
||||
// let item: any = {};
|
||||
// item.productCode = this.aimWl.value;
|
||||
// item.barcode = this.boxnumber;
|
||||
await this.model.selloutconntray(this.boxnumber);
|
||||
if (this.model.SubmitCode == '200') {
|
||||
// (this.$refs.uToast as any).show({
|
||||
// title: '成功',
|
||||
// type: 'success',
|
||||
// });
|
||||
// this.getlist();
|
||||
let scandata = this.model.scanreturndata;
|
||||
this.list.push({ batchCode: scandata.barCode, amount: scandata.amount, sn: scandata.sn, wlCode: scandata.wlCode, materialCode: scandata.materialCode, emOrderInSnId: scandata.emOrderInSnId });
|
||||
this.boxnumber = '';
|
||||
this.outNumber += parseFloat(scandata.amount);
|
||||
} else {
|
||||
(this.$refs.uToast as any).show({
|
||||
title: '失败',
|
||||
type: 'error',
|
||||
});
|
||||
// this.getlist();
|
||||
this.boxnumber = '';
|
||||
}
|
||||
// //入库后的查询下面列表的接口
|
||||
// await this.model.queryOrderNo(this.form5);
|
||||
// this.list = model.orderNoItemList;
|
||||
}
|
||||
async onSubmit() {
|
||||
if (this.orderNo == '' || this.orderNo.length == 0) {
|
||||
(this.$refs.uToast as any).show({
|
||||
title: '请输入备货单号',
|
||||
// url: '/pages/user/index'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.list.length == 0 || this.list == '') {
|
||||
(this.$refs.uToast as any).show({
|
||||
title: '请先扫描托盘',
|
||||
// url: '/pages/user/index'
|
||||
});
|
||||
return;
|
||||
}
|
||||
let insertTarynumber = 0;
|
||||
this.list.forEach((item) => {
|
||||
insertTarynumber = insertTarynumber + parseFloat(item.amount);
|
||||
});
|
||||
let params = {
|
||||
siteCode: session.FactoryCode,
|
||||
orderCode: this.orderNo,
|
||||
materialCode: this.orderNoItemList.materialCode,
|
||||
materialDesc: this.orderNoItemList.materialDesc,
|
||||
unit: this.orderNoItemList.unit,
|
||||
planNumber: insertTarynumber,
|
||||
// userDefined1:'?',
|
||||
createBy: session.loginName,
|
||||
wmsOdsEmStorageNewsSns: this.list,
|
||||
};
|
||||
console.log('params', params);
|
||||
await this.model.out(params);
|
||||
if (this.model.SubmitCode == '200') {
|
||||
(this.$refs.uToast as any).show({
|
||||
title: '成功',
|
||||
type: 'success',
|
||||
});
|
||||
this.list = [];
|
||||
this.query();
|
||||
// this.getlist();
|
||||
} else {
|
||||
(this.$refs.uToast as any).show({
|
||||
title: '失败',
|
||||
type: 'error',
|
||||
});
|
||||
// this.getlist();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.page-product-receipt {
|
||||
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #f8262c 51%, #d9001b 100%) no-repeat;
|
||||
background-size: 100% 600rpx;
|
||||
padding: 118rpx 30rpx 162rpx;
|
||||
min-height: 100%;
|
||||
|
||||
.header {
|
||||
position: fixed;
|
||||
top: 0rpx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 99;
|
||||
display: flex;
|
||||
height: 120rpx;
|
||||
line-height: 88rpx;
|
||||
color: #fff;
|
||||
font-size: 34rpx;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
padding: 45rpx 0rpx 0rpx;
|
||||
|
||||
.title {
|
||||
flex: 3;
|
||||
}
|
||||
|
||||
.left,
|
||||
.right {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.icon {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.fiexdcontent {
|
||||
position: fixed;
|
||||
width: 92%;
|
||||
box-shadow: 0 0 14px 0 rgb(128 128 128 / 46%);
|
||||
z-index: 100;
|
||||
}
|
||||
.form {
|
||||
background-color: #fff;
|
||||
padding: 30rpx;
|
||||
border-radius: 10rpx;
|
||||
//box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
|
||||
|
||||
.u-form-item {
|
||||
padding: 20rpx 0;
|
||||
line-height: 35rpx;
|
||||
|
||||
.Transfer {
|
||||
width: 280rpx;
|
||||
height: 64rpx;
|
||||
background: rgb(242, 242, 242);
|
||||
border-radius: 110rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.single {
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
display: flex;
|
||||
|
||||
.single-left {
|
||||
width: 80%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
|
||||
view {
|
||||
width: 142rpx;
|
||||
height: 100%;
|
||||
line-height: 55rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.single-right {
|
||||
button {
|
||||
// margin-top: 15rpx;
|
||||
width: 140rpx;
|
||||
height: 70rpx;
|
||||
background-color: #fa3534;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-around;
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
.form3 {
|
||||
background-color: #fff;
|
||||
padding: 25rpx 25rpx 25rpx;
|
||||
border-radius: 10rpx;
|
||||
//box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
|
||||
//color: #8d8989;
|
||||
// .list {
|
||||
// display: flex;
|
||||
// flex-direction: row;
|
||||
// }
|
||||
.row-list {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
.row-list-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
width: 40%;
|
||||
}
|
||||
.list-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.righttitle {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
.boder-icon-rigth {
|
||||
border: 1rpx solid #fa3534;
|
||||
width: 130rpx;
|
||||
text-align: center;
|
||||
background: #fa3534;
|
||||
color: #ffffff;
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.form4 {
|
||||
background-color: #fff;
|
||||
padding: 18rpx;
|
||||
border-radius: 10rpx;
|
||||
margin-top: 2rpx;
|
||||
.u-input__input {
|
||||
min-height: 36px;
|
||||
}
|
||||
}
|
||||
|
||||
.scroll {
|
||||
// margin-top: 2rpx;
|
||||
height: 460rpx;
|
||||
position: absolute;
|
||||
width: 92%;
|
||||
top: 770rpx;
|
||||
/* bottom: 40px; */
|
||||
overflow: auto;
|
||||
.form2 {
|
||||
background-color: #fff;
|
||||
padding: 25rpx 25rpx 25rpx;
|
||||
border-radius: 10rpx;
|
||||
box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
|
||||
color: #8d8989;
|
||||
.list {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
.rowleft {
|
||||
width: 90%;
|
||||
.row-list {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
.row-list-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
width: 48%;
|
||||
}
|
||||
.list-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
.rowright {
|
||||
width: 20%;
|
||||
display: flex;
|
||||
justify-content: right;
|
||||
.righttitle {
|
||||
width: 60%;
|
||||
background-color: #8d898947;
|
||||
color: red;
|
||||
text-align: center;
|
||||
/* margin: auto; */
|
||||
height: 100%;
|
||||
line-height: 70rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// .righttitle {
|
||||
// display: flex;
|
||||
// justify-content: flex-end;
|
||||
|
||||
// .boder-icon-rigth {
|
||||
// border: 1rpx solid #fa3534;
|
||||
// width: 130rpx;
|
||||
// text-align: center;
|
||||
// background: #fa3534;
|
||||
// color: #ffffff;
|
||||
// margin-top: 10px;
|
||||
// }
|
||||
|
||||
// .zhuangtai {
|
||||
// background: #a7a0a04a;
|
||||
// width: 224rpx;
|
||||
// margin-right: -27rpx;
|
||||
// border: 2rpx solid #a7a0a04a;
|
||||
// border-radius: 12rpx;
|
||||
// text-align: center;
|
||||
// margin-bottom: 10rpx;
|
||||
// }
|
||||
|
||||
// .zhuangtai[data-state='1'] {
|
||||
// color: green;
|
||||
// }
|
||||
|
||||
// .zhuangtai[data-state='0'] {
|
||||
// color: blue;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-bar {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 99;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.button-bar {
|
||||
}
|
||||
|
||||
.photoList {
|
||||
display: flex;
|
||||
padding-top: 12rpx;
|
||||
|
||||
.chooseBtn {
|
||||
width: 202rpx;
|
||||
height: 202rpx;
|
||||
background: #fafafa;
|
||||
border-radius: 12rpx;
|
||||
border: 2rpx dashed #e2e2e2;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.inner {
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.desc {
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #24252a;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.img {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
margin-bottom: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.photoBox {
|
||||
width: 202rpx;
|
||||
height: 202rpx;
|
||||
background: #fafafa;
|
||||
border-radius: 12rpx;
|
||||
position: relative;
|
||||
|
||||
.closeBtn {
|
||||
position: absolute;
|
||||
top: -12rpx;
|
||||
right: -12rpx;
|
||||
z-index: 2;
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
|
||||
.img {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.img {
|
||||
width: 202rpx;
|
||||
height: 202rpx;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.itemBox {
|
||||
flex: 0 0 202rpx;
|
||||
margin-right: 20rpx;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// /deep/ .remarksBox textarea {
|
||||
// font-size: 24rpx;
|
||||
// }
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,66 @@
|
||||
import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators';
|
||||
import store from '@/store';
|
||||
import http from '@/utils/request';
|
||||
import { url } from '@/utils/url';
|
||||
import { session } from '@/store/modules/session';
|
||||
@Module({
|
||||
namespaced: true,
|
||||
dynamic: true,
|
||||
store,
|
||||
name: 'page.WhiteManagement.WhiteOutstorage',
|
||||
})
|
||||
export class WhiteOutstorage extends VuexModule {
|
||||
orderNoItemList: any = [];
|
||||
@MutationAction
|
||||
async showProduceCode(orderNo: any) {
|
||||
const result: any = await http.post(url.lanjuwms.WhiteManagement.WhiteOutstorage.selectWhiteEmbryoDeliveryOrder, {
|
||||
produceCode: orderNo,
|
||||
siteCode: session.FactoryCode,
|
||||
});
|
||||
// http.defaults.headers.common['Accept-Language'] = session.PoolName;
|
||||
const orderNoItemList = result.data.list;
|
||||
return { orderNoItemList };
|
||||
}
|
||||
information: any = [];
|
||||
@MutationAction
|
||||
async queryinformation(item) {
|
||||
console.log(item);
|
||||
const result: any = await http.get(url.lanjuwms.product.SaleOutWH.queryinformation + '/' + item.orderNo + '/' + item.value, {});
|
||||
const information = result.data;
|
||||
return { information };
|
||||
}
|
||||
TraysList: any = [];
|
||||
@MutationAction
|
||||
async showTrays(item: any) {
|
||||
const result: any = await http.get(url.lanjuwms.product.SaleOutWH.showTrays + '/' + item.orderNo + '/' + item.value, {});
|
||||
const TraysList = result.data;
|
||||
return { TraysList };
|
||||
}
|
||||
SubmitCode: any = '';
|
||||
scanreturndata: any = {};
|
||||
@MutationAction
|
||||
async selloutconntray(boxnumber: string) {
|
||||
const result: any = await http.post(url.lanjuwms.WhiteManagement.WhiteOutstorage.selectQueryTrayInfor, {
|
||||
sn: boxnumber,
|
||||
factoryCode: session.FactoryCode,
|
||||
});
|
||||
const scanreturndata = result.data;
|
||||
const SubmitCode = result.code;
|
||||
return { scanreturndata, SubmitCode };
|
||||
}
|
||||
@MutationAction
|
||||
async deleteTray(item: any) {
|
||||
console.log(item);
|
||||
const result: any = await http.delete(url.lanjuwms.product.SaleOutWH.deleteTray + '/' + item.barcode);
|
||||
const SubmitCode = result.code;
|
||||
return { SubmitCode };
|
||||
}
|
||||
@MutationAction
|
||||
async out(params: any) {
|
||||
const result: any = await http.post(url.lanjuwms.WhiteManagement.WhiteOutstorage.WhiteEmbryoOutbound, params);
|
||||
const SubmitCode = result.code;
|
||||
return { SubmitCode };
|
||||
}
|
||||
}
|
||||
|
||||
export default getModule(WhiteOutstorage);
|
Loading…
Reference in New Issue