cosmoim-852 fix 俄罗斯新增容器整理功能

master
hou 3 years ago
parent ce4d9e84d9
commit d499208d92

@ -504,5 +504,11 @@ export default {
SemiFinishedName: '半成品名称',
batch: '请输入批次码',
batchCode: '请先扫描批次码',
consolidation: '容器整理',
Target: '目标容器',
TargetContainer: '请扫描目标容器条码',
source: '源容器',
barcodeSource: '请扫描源容器条码',
ContainerBarcode: '容器条码',
},
};

@ -511,5 +511,11 @@ export default {
SemiFinishedName: 'Name',
batch: 'Please enter the batch code',
batchCode: 'Please scan the batch code first',
consolidation: 'Container consolidation',
Target: 'Target',
TargetContainer: 'Scan the bar code of the target container',
source: 'Source',
barcodeSource: 'Scan the barcode of the source container',
ContainerBarcode: 'Container barcode',
},
};

@ -322,6 +322,22 @@
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/raw/warehouse/Container-consolidation/index",
"style": {
"navigationBarTitleText": "容器整理",
"navigationStyle": "custom", //
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/raw/warehouse/Container-consolidation/details",
"style": {
"navigationBarTitleText": "容器整理明细",
"navigationStyle": "custom", //
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/raw/ingoods/poReceipt/index",
"style": {

@ -0,0 +1,84 @@
/**
*
*/
import vm from '@/main';
export const headers = [
{
label: vm.$t('message.Warehouse_OrderNo'),
key: 'orderNo', //单号
// width: '15%',
},
{
label: vm.$t('message.po_MaterielNo'),
key: 'productCode', //物料号
// width: '15%',
},
{
label: vm.$t('message.po_MaterielDes'),
key: 'productDescZh', //物料描述
width: 350,
},
{
label: vm.$t('message.dn_Number'),
key: 'qty', //数量
},
{
label: vm.$t('message.Warehouse_OriginalLocation'),
key: 'originWl', //原库位
},
{
label: vm.$t('message.Warehouse_TargetLocation'),
key: 'aimWl', //目标库位
},
];
export const RUSdetailHeader = [
{
label: vm.$t('message.Warehouse_OrderNo'),
key: 'orderNo', //单号
width: 270,
},
{
label: vm.$t('message.po_MaterielNo'),
key: 'productCode', //物料号
width: 270,
},
{
label: vm.$t('message.po_MaterielDes'),
key: 'productDescZh', //物料描述
width: 520,
},
{
label: vm.$t('message.Container'),
key: 'barCode', //物料描述
width: 400,
},
{
label: vm.$t('message.dn_Number'),
key: 'qty', //数量
},
{
label: vm.$t('message.Warehouse_OriginalLocation'),
key: 'originWl', //原库位
},
{
label: vm.$t('message.Warehouse_TargetLocation'),
key: 'aimWl', //目标库位
},
];
export const TargetTitle = [
{
label: vm.$t('message.ContainerBarcode'),
key: 'barcode', //容器条码
width: 270,
},
{
label: vm.$t('message.dn_Number'),
key: 'qty', //数量
// width: 270,
},
{
label: vm.$t('message.CommissionedLocation'),
key: 'locCode', //库位
width: 250,
},
];

@ -0,0 +1,115 @@
<template>
<view class="page-kan-dan-detail">
<view class="header" :style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }">
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
</view>
<view class="title">{{ $t('message.Warehouse_TransferDetails') }}</view>
<view class="right"></view>
</view>
<!-- <wyb-table class="table" ref="table" width="100%" enable-check="multiple" show-left-and-right-border :headers="headers" :contents="model.orderInInfoList" :show-vert-border="false" /> -->
<view class="bottom-bar">
<view class="container">
<u-row>
<u-col :span="6">
<u-button type="primary" @click="Confirm">{{ $t('message.dn_Confirm') }}</u-button>
</u-col>
<u-col :span="6">
<u-button type="error" @click="uni.navigateBack({ delta: 1 })">{{ $t('message.po_Return') }}</u-button>
</u-col>
</u-row>
</view>
</view>
</view>
</template>
<script lang="ts">
import { Component } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import model from './model';
import { headers } from './config';
@Component
export default class KanDanHandOverDetails extends BasePage {
order = '';
headers = headers;
model = model;
async Confirm() {
console.log(1);
}
}
</script>
<style lang="scss" scoped>
.page-kan-dan-detail {
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background-size: 100% 600rpx;
padding: 118rpx 30rpx 162rpx;
min-height: 100%;
.header {
position: fixed;
top: 36rpx;
left: 0;
right: 0;
z-index: 99;
display: flex;
height: 88rpx;
line-height: 88rpx;
color: #fff;
font-size: 34rpx;
font-weight: 500;
text-align: center;
.title {
flex: 3;
}
.left,
.right {
flex: 1;
}
.icon {
display: flex;
justify-content: center;
align-items: center;
width: 88rpx;
height: 88rpx;
}
}
.form {
background-color: #fff;
padding: 40rpx;
border-radius: 10rpx;
box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
.u-form-item {
padding: 30rpx 0;
line-height: 35rpx;
}
}
.bottom-bar {
z-index: 21;
position: fixed;
bottom: 0;
left: 0;
right: 0;
.container {
background: #ffffff;
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
padding: 20rpx;
}
.extra {
background-color: #fff;
margin: 5px;
border-radius: 5px;
padding: 0 10px;
}
.bottom-info {
.u-form-item {
padding: 0;
}
}
}
}
</style>

@ -0,0 +1,318 @@
<template>
<view class="page-kan-dan-index">
<view class="header" :style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }">
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack({})" />
</view>
<view class="title">{{ $t('message.consolidation') }}</view>
<view class="right"></view>
</view>
<u-form class="form" ref="form" :error-type="['toast']" label-width="150rpx">
<!-- 目标容器 -->
<u-form-item :required="true" :label="$t('message.Target')" prop="orderNo">
<u-search :placeholder="$t('message.TargetContainer')" v-model.trim="barcode" @search="query" :show-action="false"></u-search>
<view class="single-right">
<u-button type="primary" @click="query">{{ $t('message.Query') }}</u-button>
</view>
</u-form-item>
<!-- 物料编码 -->
<u-form-item :label="$t('message.matcode')">
<u-input :disabled="true" v-model="every.productCode" placeholder="" style="overflow: hidden" />
</u-form-item>
<!-- 物料描述 -->
<u-form-item :label="$t('message.po_MaterielDes')">
<u-input :disabled="true" v-model="every.productDescZh" placeholder="" style="overflow: hidden" />
</u-form-item>
<!-- 数量 -->
<u-form-item :label="$t('message.dn_Number')">
<u-input :disabled="true" v-model="every.qty" placeholder="" />
</u-form-item>
<!-- 库位 -->
<u-form-item :label="$t('message.CommissionedLocation')">
<u-input :disabled="true" v-model="every.locCode" placeholder="" />
</u-form-item>
<!-- 源容器 -->
<view class="single">
<view class="single-left">
<view>{{ $t('message.source') }}:</view>
<u-search :placeholder="$t('message.barcodeSource')" style="z-index: 10000" v-model="NextCode" @search="searchSource" :show-action="false"></u-search>
</view>
</view>
<view class="add">
<u-button type="primary" @click="searchSource">{{ $t('message.Query') }}</u-button>
</view>
<!-- 本次数量 -->
<view class="single">
<view class="single-left">
<view>{{ $t('message.CommissionedThisNumber') }}:</view>
<u-input v-model="NewQty" :placeholder="$t('message.Summary_PleaseInputNumber')" style="margin-top: 8px" />
</view>
</view>
<view class="NumAdd">
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
</view>
</u-form>
<wyb-table class="table" ref="table" width="100%" show-left-and-right-border :headers="TargetTitle" :contents="Submitlist" :show-vert-border="false" @onCellClick="deleteItem($event)"></wyb-table>
<view class="bottom-bar">
<u-row class="button-bar">
<!-- 确定 -->
<u-col :span="6">
<u-button type="primary" @click="submit">{{ $t('message.product_Confirm') }}</u-button>
</u-col>
<!-- 返回 -->
<u-col :span="6">
<u-button type="error" @click="uni.navigateBack()">{{ $t('message.po_Return') }}</u-button>
</u-col>
</u-row>
</view>
</view>
</template>
<script lang="ts">
import { TargetTitle } from './config';
import { Component } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import model from './model';
import { session } from '@/store/modules/session';
import jPicker from '@/components/J-Picker/jPicker.vue';
@Component({
components: {
jPicker,
},
})
export default class KanDanHandOver extends BasePage {
TargetTitle = TargetTitle;
model = model;
barcode = '';
every: any = {};
async query() {
if (this.barcode == '' || this.barcode.length == 0) {
this.customToast(this.$t('message.Commission_tips1') as string);
return;
}
await this.model.searchBarcode(this.barcode);
if (this.model.SearchCode == '1') {
uni.showToast({
title: this.$t('message.successful') as string,
duration: 2000,
image: '/static/icons/icon-51.png',
});
this.every = this.model.CodeDetail;
}
}
NextCode: any = '';
async searchSource() {
if (this.NextCode == '' || this.NextCode.length == 0) {
this.customToast(this.$t('message.Commission_tips1') as string);
return;
}
let params = {
locCode: this.every.locCode,
productCode: this.every.productCode,
barcode: this.NextCode,
factoryCode: session.factoryCode,
loginName: session.loginName,
};
await this.model.searchSource(params);
if (this.model.SourceCode == '1') {
uni.showToast({
title: this.$t('message.successful') as string,
duration: 2000,
image: '/static/icons/icon-51.png',
});
this.NewQty = '';
}
}
NewQty: any = '';
Submitlist: any = [];
Add() {
if (this.NewQty == '') {
this.customToast(this.$t('message.Summary_PleaseInputNumber') as string);
return;
}
if (parseFloat(this.NewQty) <= 0) {
this.customToast(this.$t('message.Commission_tips3') as string);
return;
}
if (parseFloat(this.NewQty) > parseFloat(this.every.qty)) {
this.customToast(this.$t('message.Commission_tips4') as string);
return;
}
if (parseFloat(this.NewQty) > parseFloat(this.model.SourceDetail.qty)) {
this.customToast(this.$t('message.Commission_tips4') as string);
return;
}
let arr = {
barcode: this.model.SourceDetail.barcode,
productCode: this.every.productCode,
productDescZh: this.every.productDescZh,
locCode: this.every.locCode,
qty: this.NewQty,
};
this.Submitlist.push(arr);
this.every.qty -= parseFloat(this.NewQty);
this.model.SourceDetail.qty -= parseFloat(this.NewQty);
}
deleteItem(e: any) {
uni.showModal({
content: this.$t('message.product_Delete') as string,
cancelText: this.$t('message.Cancel') as string,
confirmText: this.$t('message.workArea_Confirm') as string,
success: (res) => {
if (res.confirm) {
this.Submitlist.splice(e.contentIndex, 1);
this.every.qty += parseFloat(e.lineData.qty);
this.model.SourceDetail.qty += parseFloat(e.lineData.qty);
} else if (res.cancel) {
return;
}
},
});
}
async submit() {
if (this.Submitlist.length == 0) {
this.customToast(this.$t('message.Pi_NoData') as string);
return;
}
let params = {
factoryCode: session.factoryCode,
loginName: session.loginName,
barcode: this.barcode,
productCode: this.every.productCode,
productDescZh: this.every.productDescZh,
locCode: this.every.locCode,
list: this.Submitlist,
};
await this.model.submit(params);
if (this.model.submitCode == '1') {
uni.showToast({
title: this.$t('message.Warehouse_Tip9') as string,
duration: 2000,
image: '/static/icons/icon-51.png',
});
this.Submitlist = [];
this.every = '';
this.NewQty = '';
this.NextCode = '';
await this.query();
}
}
}
</script>
<style lang="scss" scoped>
.page-kan-dan-index {
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background-size: 100% 600rpx;
padding: 118rpx 30rpx 162rpx;
min-height: 100%;
.header {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 99;
display: flex;
height: 67px;
line-height: 88rpx;
color: #fff;
font-size: 34rpx;
font-weight: 500;
text-align: center;
padding-top: 19px;
.title {
flex: 3;
}
.left,
.right {
flex: 1;
}
.icon {
display: flex;
justify-content: center;
align-items: center;
width: 88rpx;
height: 88rpx;
}
}
.form {
background-color: #fff;
padding: 40rpx;
border-radius: 10rpx;
box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
.u-form-item {
padding: 30rpx 0;
line-height: 35rpx;
}
.single {
width: 100%;
height: 100rpx;
display: flex;
.single-left {
width: 80%;
height: 100%;
display: flex;
view {
width: 110rpx;
height: 100%;
line-height: 100rpx;
z-index: 10000;
}
}
.single-right {
button {
margin-top: 15rpx;
width: 150rpx;
height: 70rpx;
}
}
}
.add {
width: 100%;
height: 100rpx;
position: absolute;
top: 442px;
left: 0;
button {
position: absolute;
top: 3rpx;
right: 35rpx;
z-index: 10000;
}
}
.NumAdd {
width: 100%;
height: 100rpx;
position: absolute;
top: 496px;
left: 0;
button {
position: absolute;
top: 3rpx;
right: 35rpx;
z-index: 10000;
}
}
.newly {
display: flex;
}
}
.single-right {
button {
//margin-top: 15rpx;
width: 110rpx;
height: 70rpx;
}
}
.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;
}
}
</style>

@ -0,0 +1,53 @@
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: 'raw.warehouse.Container-consolidation',
})
export class rowTransfer extends VuexModule {
//目标容器查询
SearchCode: any = '';
CodeDetail: any = '';
@MutationAction
async searchBarcode(barcode: any) {
const res: any = await http.post(url.warehouse.container.getRawStorageSnNew, {
barcode,
factoryCode: session.factoryCode,
loginName: session.loginName,
});
const SearchCode = res.code;
const CodeDetail = res.data;
if (CodeDetail.cpRef4 != null) {
CodeDetail.qty = parseFloat(CodeDetail.qty) - parseFloat(CodeDetail.cpRef4);
}
return { SearchCode, CodeDetail };
}
//源容器查询
SourceCode: any = '';
SourceDetail: any = '';
@MutationAction
async searchSource(params: any) {
const res: any = await http.post(url.warehouse.container.getOdsRawStorageSnNew, params);
const SourceCode = res.code;
const SourceDetail = res.data;
if (SourceDetail.cpRef4 != null) {
SourceDetail.qty = parseFloat(SourceDetail.qty) - parseFloat(SourceDetail.cpRef4);
}
return { SourceCode, SourceDetail };
}
//提交数据
submitCode: any = '';
@MutationAction
async submit(params: any) {
const res: any = await http.post(url.warehouse.container.russia, params);
const submitCode = res.code;
return { submitCode };
}
}
export default getModule(rowTransfer);

@ -232,6 +232,11 @@ export const url = {
queryListByMoveCode: '/wmspda/fg/queryListByMoveCode',
close: '/wmspda/fg/closeHandOrder',
},
container: {
getRawStorageSnNew: '/wmspda/material/getRawStorageSnNew',
getOdsRawStorageSnNew: '/wmspda/bl/getOdsRawStorageSnNew',
russia: '/wmspda/material/restructureContainer/russia',
},
rowScrap: {
list: '/wmspda/fg/listByOrder',
},

Loading…
Cancel
Save