cosmoim-852 fix 俄罗斯新增原材料移库功能
parent
e553ee10fb
commit
658efba7a6
@ -0,0 +1,53 @@
|
||||
/**
|
||||
* 看单交接明细表格列
|
||||
*/
|
||||
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',
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.product_costCenter'),
|
||||
key: 'costCenter',
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.DocumentNumber'),
|
||||
key: 'fileNo',
|
||||
},
|
||||
// {
|
||||
// label: '库存地点',
|
||||
// key: 'wkposCode',
|
||||
// },
|
||||
// {
|
||||
// label: '校验状态',
|
||||
// key: 'checkResult',
|
||||
// },
|
||||
// {
|
||||
// label: '看单号',
|
||||
// key: 'kdOrderNo',
|
||||
// },
|
||||
];
|
@ -0,0 +1,163 @@
|
||||
<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.Scrap_ScrapDetails') }}</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="extra">
|
||||
<u-row>
|
||||
<u-col :span="2"> 看单号: </u-col>
|
||||
<u-col :span="8">
|
||||
<u-input v-model="order3" @confirm="onKdOrderNoConfirm" placeholder="看单号" />
|
||||
</u-col>
|
||||
</u-row>
|
||||
<u-row>
|
||||
<u-col :span="2"> 接收人 </u-col>
|
||||
<u-col :span="3">
|
||||
<u-input v-model="receiverName" @confirm="onReceiverNameConfirm" placeholder="接收人" />
|
||||
</u-col>
|
||||
<u-col :span="2"> 口令 </u-col>
|
||||
<u-col :span="3">
|
||||
<u-input v-model="operatorPass" placeholder="口令" />
|
||||
</u-col>
|
||||
</u-row>
|
||||
</view> -->
|
||||
<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 { auth } from '@/store/modules/auth';
|
||||
// import { pick, omit, cloneDeep } from 'lodash/fp';
|
||||
import { headers } from './config';
|
||||
import { session } from '@/store/modules/session';
|
||||
|
||||
@Component
|
||||
export default class KanDanHandOverDetails extends BasePage {
|
||||
order = '';
|
||||
headers = headers;
|
||||
|
||||
/**
|
||||
* 页面Module
|
||||
*/
|
||||
model = model;
|
||||
|
||||
async Confirm() {
|
||||
const orderlist: any = [];
|
||||
this.model.orderInInfoList.forEach((item: any) => {
|
||||
if (item.checked) {
|
||||
orderlist.push(item);
|
||||
}
|
||||
});
|
||||
if (orderlist.length == 0) {
|
||||
this.customToast(this.$t('message.Pi_tip18') as string);
|
||||
return;
|
||||
}
|
||||
orderlist.forEach((item: any) => {
|
||||
item.type = '1';
|
||||
item.keepBy = session.loginName;
|
||||
item.orderType = '1';
|
||||
});
|
||||
await model.onTakeoutConfirm(orderlist);
|
||||
// uni.navigateBack({ delta: 1 });
|
||||
setTimeout(() => {
|
||||
uni.navigateBack({ delta: 1 });
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
</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,243 @@
|
||||
<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.RowScrap') }}</view>
|
||||
<view class="right"></view>
|
||||
</view>
|
||||
<u-form class="form" label-width="130rpx">
|
||||
<!-- 单号 -->
|
||||
<view class="single">
|
||||
<view class="single-left">
|
||||
<view>{{ $t('message.CommissionedSingleNumber') }}</view>
|
||||
<u-search :placeholder="$t('message.Commission_tips1')" v-model.trim="order3" @search="query" :show-action="false"></u-search>
|
||||
</view>
|
||||
<view class="single-right">
|
||||
<u-button type="primary" @click="query">{{ $t('message.Query') }}</u-button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 物料号 -->
|
||||
<u-form-item :label="$t('message.po_MaterielNo')">
|
||||
<jPicker sureColor="#ff0000" style="width: 260rpx" @bindpicker="materialChoice" showKey="value" valKey="value" :val="wl.value" class="search" :options="MaterialList" />
|
||||
</u-form-item>
|
||||
<!-- 物料描述 -->
|
||||
<u-form-item :label="$t('message.po_MaterielDes')">
|
||||
<u-input :disabled="true" v-model="Some.productDescZh" placeholder="" style="overflow: hidden" />
|
||||
</u-form-item>
|
||||
<!-- 数量 -->
|
||||
<u-form-item :label="$t('message.Summary_Number')">
|
||||
<u-input v-model="Some.qty" placeholder="" type="number" />
|
||||
</u-form-item>
|
||||
<!-- 原库位 -->
|
||||
<u-form-item :label="$t('message.Warehouse_OriginalLocation')">
|
||||
<u-input :disabled="true" v-model="Some.originWl" placeholder="" />
|
||||
</u-form-item>
|
||||
<!-- 目标库位 -->
|
||||
<u-form-item :label="$t('message.Warehouse_TargetLocation')">
|
||||
<u-input :disabled="true" v-model="Some.aimWl" placeholder="" />
|
||||
</u-form-item>
|
||||
<!-- 成本中心 -->
|
||||
<u-form-item :label="$t('message.product_costCenter')">
|
||||
<u-input :disabled="true" v-model="Some.costCenter" placeholder="" />
|
||||
</u-form-item>
|
||||
<!-- 文件号 -->
|
||||
<u-form-item :label="$t('message.DocumentNumber')">
|
||||
<u-input v-model="Some.fileNo" :border="border" :placeholder="$t('message.fileNumber')" />
|
||||
</u-form-item>
|
||||
<u-row class="button-bar">
|
||||
<u-col :span="6">
|
||||
<u-button type="error" @click="uni.navigateBack()">{{ $t('message.po_Return') }}</u-button>
|
||||
</u-col>
|
||||
<u-col :span="6">
|
||||
<u-button type="primary" @click="submit">{{ $t('message.InventoryFinish') }} </u-button></u-col
|
||||
>
|
||||
</u-row>
|
||||
</u-form>
|
||||
</view>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { Component } from 'vue-property-decorator';
|
||||
import { BasePage } from '@/components/base/page';
|
||||
import model from './model';
|
||||
import jPicker from '@/components/J-Picker/jPicker.vue';
|
||||
import { session } from '@/store/modules/session';
|
||||
@Component({
|
||||
components: {
|
||||
jPicker,
|
||||
},
|
||||
})
|
||||
export default class KanDanHandOver extends BasePage {
|
||||
order3 = '';
|
||||
model = model;
|
||||
border = true;
|
||||
wl: any = {};
|
||||
Some: any = {};
|
||||
MaterialList: any = [];
|
||||
async query() {
|
||||
if (this.order3 === '') {
|
||||
this.customToast(this.$t('message.Commission_tips1') as string);
|
||||
return;
|
||||
} else {
|
||||
await this.model.takeOrder({
|
||||
order3: this.order3,
|
||||
});
|
||||
if (this.model.code == '1') {
|
||||
uni.showToast({
|
||||
title: this.$t('message.successful') as string,
|
||||
duration: 2000,
|
||||
image: '/static/icons/icon-51.png',
|
||||
});
|
||||
this.model.orderInInfoList.forEach((item: any) => {
|
||||
item.fileNo = '';
|
||||
let arr: any = {
|
||||
label: item.productCode,
|
||||
value: item.productCode,
|
||||
};
|
||||
this.MaterialList.push(arr);
|
||||
});
|
||||
this.Some = this.model.orderInInfoList[0];
|
||||
this.wl = this.MaterialList[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
materialChoice(e: any) {
|
||||
this.wl = e.pickerName;
|
||||
this.model.orderInInfoList.forEach((item: any) => {
|
||||
if (item.productCode == e.pickerName.value) {
|
||||
this.Some = item;
|
||||
}
|
||||
});
|
||||
}
|
||||
async submit() {
|
||||
if (this.order3 === '') {
|
||||
this.customToast(this.$t('message.Commission_tips1') as string);
|
||||
return;
|
||||
}
|
||||
if (!this.Some) {
|
||||
this.customToast(this.$t('message.Warehouse_Tip5') as string);
|
||||
return;
|
||||
}
|
||||
if (this.Some.fileNo == '' || this.Some.fileNo == null || this.Some.fileNo == undefined) {
|
||||
this.customToast(this.$t('message.fileNumber') as string);
|
||||
return;
|
||||
}
|
||||
let orderlist = [];
|
||||
this.Some.type = '1';
|
||||
this.Some.keepBy = session.loginName;
|
||||
this.Some.orderType = '1';
|
||||
orderlist.push(this.Some);
|
||||
await model.onTakeoutConfirm(orderlist);
|
||||
if (this.model.code == '1') {
|
||||
uni.showToast({
|
||||
title: this.$t('message.success') as string,
|
||||
duration: 2000,
|
||||
image: '/static/icons/icon-51.png',
|
||||
});
|
||||
this.Some = {};
|
||||
this.Some.fileNo = ' ';
|
||||
this.wl = {};
|
||||
this.MaterialList = [];
|
||||
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: 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 {
|
||||
// line-height: 35rpx;
|
||||
// background-color: #f7f6fb;
|
||||
// padding: 10rpx 30rpx;
|
||||
// border-radius: 8rpx;
|
||||
// &:after {
|
||||
// border-bottom-width: 0;
|
||||
// }
|
||||
// }
|
||||
.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;
|
||||
}
|
||||
}
|
||||
.single-right {
|
||||
button {
|
||||
margin-top: 15rpx;
|
||||
width: 150rpx;
|
||||
height: 70rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.title {
|
||||
margin-bottom: 40rpx;
|
||||
color: #1a1a1a;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.button-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,79 @@
|
||||
import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators';
|
||||
import store from '@/store';
|
||||
import http from '@/utils/request';
|
||||
import { url } from '@/utils/url';
|
||||
// import { page } from '@/utils/page';
|
||||
import { session } from '@/store/modules/session';
|
||||
import vm from '@/main';
|
||||
|
||||
class OrderInInfo {
|
||||
checked?: boolean;
|
||||
poNo?: string;
|
||||
kw?: string;
|
||||
userDefined10?: string;
|
||||
orderStatus?: string;
|
||||
}
|
||||
|
||||
@Module({
|
||||
namespaced: true,
|
||||
dynamic: true,
|
||||
store,
|
||||
name: 'raw.warehouse.rowScrap',
|
||||
})
|
||||
export class rowScrap extends VuexModule {
|
||||
/**
|
||||
* sap库存地点列表
|
||||
*/
|
||||
cboPlaceList = [];
|
||||
/**
|
||||
* 隐藏看单号
|
||||
*/
|
||||
poNo = '';
|
||||
/**
|
||||
* 看单号查询结果
|
||||
*/
|
||||
orderInInfo: OrderInInfo = new OrderInInfo();
|
||||
/**
|
||||
* 看单明细
|
||||
*/
|
||||
orderInInfoList: OrderInInfo[] = [];
|
||||
code: any = '';
|
||||
/**
|
||||
* 看单明细未通过明细
|
||||
*/
|
||||
// orderInInfoListEx: OrderInInfo[] = [];
|
||||
|
||||
/**
|
||||
// * 查询看单号
|
||||
* @param poNo
|
||||
*/
|
||||
@MutationAction
|
||||
async takeOrder(order3: any) {
|
||||
try {
|
||||
const records: any = await http.post(url.warehouse.rowTransfer.list, {
|
||||
...order3,
|
||||
orderType: 'BF',
|
||||
page: 1,
|
||||
rows: 50,
|
||||
factoryCode: session.factoryCode,
|
||||
loginName: session.loginName,
|
||||
});
|
||||
const orderInInfoList = records.data.records;
|
||||
const code = records.code;
|
||||
console.log('获取来的数据', orderInInfoList);
|
||||
return { orderInInfoList, code };
|
||||
} catch {
|
||||
//uni.showToast({ icon: 'none', title: vm.$t('message.Warehouse_Tip11') as any });
|
||||
vm.customToast(vm.$t('message.Warehouse_Tip11') as any);
|
||||
}
|
||||
}
|
||||
|
||||
@MutationAction
|
||||
async onTakeoutConfirm(list: any) {
|
||||
const records: any = await http.post(url.warehouse.rowTransfer.commit, list);
|
||||
const code = records.code;
|
||||
return { code };
|
||||
}
|
||||
}
|
||||
|
||||
export default getModule(rowScrap);
|
@ -0,0 +1,67 @@
|
||||
/**
|
||||
* 看单交接明细表格列
|
||||
*/
|
||||
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', //目标库位
|
||||
},
|
||||
];
|
@ -0,0 +1,185 @@
|
||||
<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="extra">
|
||||
<u-row>
|
||||
<u-col :span="2"> 看单号: </u-col>
|
||||
<u-col :span="8">
|
||||
<u-input v-model="order3" @confirm="onKdOrderNoConfirm" placeholder="看单号" />
|
||||
</u-col>
|
||||
</u-row>
|
||||
<u-row>
|
||||
<u-col :span="2"> 接收人 </u-col>
|
||||
<u-col :span="3">
|
||||
<u-input v-model="receiverName" @confirm="onReceiverNameConfirm" placeholder="接收人" />
|
||||
</u-col>
|
||||
<u-col :span="2"> 口令 </u-col>
|
||||
<u-col :span="3">
|
||||
<u-input v-model="operatorPass" placeholder="口令" />
|
||||
</u-col>
|
||||
</u-row>
|
||||
</view> -->
|
||||
<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 { order, OrderDetail } from '@/pages/raw/warehouse/transfer/model';
|
||||
// import { auth } from '@/store/modules/auth';
|
||||
// import { pick, omit, cloneDeep } from 'lodash/fp';
|
||||
import { headers } from './config';
|
||||
import { session } from '@/store/modules/session';
|
||||
|
||||
@Component
|
||||
export default class KanDanHandOverDetails extends BasePage {
|
||||
order = '';
|
||||
headers = headers;
|
||||
|
||||
/**
|
||||
* 页面Module
|
||||
*/
|
||||
model = model;
|
||||
// details: Array<OrderDetail> = [
|
||||
// // {
|
||||
// // orderNo: 'SGC2012230010',
|
||||
// // barcode: '',
|
||||
// // productCode: 'CBAH90E00',
|
||||
// // productDescZh: 'HWM70-M1201 马来西亚',
|
||||
// // createdDate: '2020-12-23 08:09:19',
|
||||
// // createdBy: 'admin',
|
||||
// // },
|
||||
// // {
|
||||
// // orderNo: 'SGC2012230009',
|
||||
// // barcode: 'sss',
|
||||
// // productCode: 'BH03YME00',
|
||||
// // productDescZh: 'AQR-S541XA(BL)',
|
||||
// // createdDate: '2020-12-23 08:09:19',
|
||||
// // createdBy: 'admin',
|
||||
// // },
|
||||
// ];
|
||||
// async mounted() {
|
||||
// }
|
||||
// beforeDestroy() {
|
||||
// }
|
||||
|
||||
async Confirm() {
|
||||
const orderlist: any = [];
|
||||
this.model.orderInInfoList.forEach((item: any) => {
|
||||
if (item.checked) {
|
||||
orderlist.push(item);
|
||||
}
|
||||
});
|
||||
if (orderlist.length == 0) {
|
||||
this.customToast(this.$t('message.Pi_tip18') as string);
|
||||
return;
|
||||
}
|
||||
orderlist.forEach((item: any) => {
|
||||
item.type = '1';
|
||||
item.keepBy = session.loginName;
|
||||
item.orderType = '0';
|
||||
});
|
||||
await model.onTakeoutConfirm(orderlist);
|
||||
setTimeout(() => {
|
||||
uni.navigateBack({ delta: 1 });
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
</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,312 @@
|
||||
<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.RowRelocation') }}</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.InventoryOrderNo')" prop="orderNo">
|
||||
<u-search :placeholder="$t('message.Commission_tips1')" v-model.trim="order3" @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 :required="true" :label="$t('message.CommissionedMaterielNo')">
|
||||
<jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="materialConfirm" showKey="value" valKey="value" :val="orderlist.productCode" class="search" :options="model.materielList" />
|
||||
</u-form-item>
|
||||
<!-- 物料描述 -->
|
||||
<u-form-item :label="$t('message.po_MaterielDes')">
|
||||
<u-input :disabled="true" v-model="orderlist.productDescZh" placeholder="" style="overflow: hidden" />
|
||||
</u-form-item>
|
||||
<!-- 出库库位 -->
|
||||
<u-form-item :label="$t('message.Outbound')">
|
||||
<u-input :disabled="true" v-model="orderlist.originWl" placeholder="" />
|
||||
</u-form-item>
|
||||
<!-- 入库库位 -->
|
||||
<u-form-item :label="$t('message.Warehousing')">
|
||||
<u-input :disabled="true" v-model="orderlist.aimWl" placeholder="" />
|
||||
</u-form-item>
|
||||
<view class="newly">
|
||||
<!-- 需求数 -->
|
||||
<u-form-item :label="$t('message.DemandQuantity')" style="width: 50%">
|
||||
<u-input style="flex: 0.9" v-model="orderlist.qty" placeholder=" " :disabled="true" />
|
||||
</u-form-item>
|
||||
<!-- 累计 -->
|
||||
<u-col :span="6">
|
||||
<u-form-item :label="$t('message.Cumulative')" prop="sapFactoryCode">
|
||||
<u-input style="flex: 0.9" :disabled="true" v-model="orderlist.actualQty" placeholder="" />
|
||||
</u-form-item>
|
||||
</u-col>
|
||||
</view>
|
||||
<!-- 容器编码 -->
|
||||
<view class="single">
|
||||
<view class="single-left">
|
||||
<view>{{ $t('message.Container') }}:</view>
|
||||
<u-search :placeholder="$t('message.PleaseScan')" style="z-index: 10000" v-model="Barcode" @search="searchBarcode" :show-action="false"></u-search>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 添加 -->
|
||||
<view class="add">
|
||||
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
|
||||
</view>
|
||||
<!-- 本次数量 -->
|
||||
<u-form-item :label="$t('message.CommissionedThisNumber')">
|
||||
<u-input :disabled="true" v-model="Container.qty" placeholder="" />
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<wyb-table class="table" ref="table" width="100%" show-left-and-right-border :headers="RUSdetailHeader" :contents="SubmitOrderlist" :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 { RUSdetailHeader } 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 {
|
||||
RUSdetailHeader = RUSdetailHeader;
|
||||
order3 = '';
|
||||
model = model;
|
||||
border = true;
|
||||
orderlist: any = [];
|
||||
orderlistIndex = 0;
|
||||
Barcode: any = '';
|
||||
SubmitOrderlist: any = [];
|
||||
Container: any = '';
|
||||
async query() {
|
||||
if (this.order3 === '') {
|
||||
this.customToast(this.$t('message.Warehouse_Tip') as string);
|
||||
return;
|
||||
} else {
|
||||
await this.model.takeYKOrder({
|
||||
order3: this.order3,
|
||||
});
|
||||
if (model.code == '1') {
|
||||
uni.showToast({
|
||||
title: this.$t('message.successful') as string,
|
||||
duration: 2000,
|
||||
image: '/static/icons/icon-51.png',
|
||||
});
|
||||
this.orderlist = model.materielList[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
materialConfirm(v: any) {
|
||||
this.orderlist.productCode = v.pickerName.productCode;
|
||||
model.materielList.forEach((item: any, index: any) => {
|
||||
if (this.orderlist.productCode == item.productCode) {
|
||||
this.orderlist = item;
|
||||
this.orderlistIndex = index;
|
||||
}
|
||||
});
|
||||
}
|
||||
async searchBarcode() {
|
||||
if (this.Barcode == '') {
|
||||
this.customToast(this.$t('message.barcode') as string);
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
productCode: this.orderlist.productCode,
|
||||
barcode: this.Barcode,
|
||||
locCode: this.orderlist.originWl,
|
||||
};
|
||||
await this.model.searchBarcode(params);
|
||||
this.Container = this.model.ContainerCode;
|
||||
}
|
||||
Add() {
|
||||
if (this.Container == '' || !this.Container.barcode) {
|
||||
this.customToast(this.$t('message.scanningContainer') as string);
|
||||
return;
|
||||
}
|
||||
if (this.orderlist.length == 0) {
|
||||
this.customToast(this.$t('message.Commission_tips6') as string);
|
||||
return;
|
||||
}
|
||||
if (parseFloat(this.orderlist.actualQty) + parseFloat(this.Container.qty) > parseFloat(this.orderlist.qty)) {
|
||||
this.customToast(this.$t('message.Commission_tips4') as string);
|
||||
return;
|
||||
}
|
||||
this.SubmitOrderlist.push(JSON.parse(JSON.stringify(this.orderlist)));
|
||||
this.SubmitOrderlist[this.SubmitOrderlist.length - 1].type = '1';
|
||||
this.SubmitOrderlist[this.SubmitOrderlist.length - 1].keepBy = session.loginName;
|
||||
this.SubmitOrderlist[this.SubmitOrderlist.length - 1].orderType = '0';
|
||||
this.SubmitOrderlist[this.SubmitOrderlist.length - 1].barCode = this.Container.barcode;
|
||||
if (this.Container.cpRef4 == null) {
|
||||
this.SubmitOrderlist[this.SubmitOrderlist.length - 1].qty = parseFloat(this.Container.qty);
|
||||
} else {
|
||||
this.SubmitOrderlist[this.SubmitOrderlist.length - 1].qty = parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4);
|
||||
}
|
||||
this.model.materielList[this.orderlistIndex].actualQty += parseFloat(this.SubmitOrderlist[this.SubmitOrderlist.length - 1].qty);
|
||||
this.Barcode = '';
|
||||
this.Container = '';
|
||||
}
|
||||
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.model.materielList.forEach((item: any) => {
|
||||
if (item.productCode == e.lineData.productCode) {
|
||||
item.actualQty -= parseFloat(e.lineData.qty);
|
||||
}
|
||||
});
|
||||
this.SubmitOrderlist.splice(e.contentIndex, 1);
|
||||
} else if (res.cancel) {
|
||||
return;
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
//提交数据
|
||||
async submit() {
|
||||
if (this.SubmitOrderlist.length == 0) {
|
||||
this.customToast(this.$t('message.Pi_NoData') as string);
|
||||
return;
|
||||
}
|
||||
await model.onTakeoutConfirm(this.SubmitOrderlist);
|
||||
if (model.code == '1') {
|
||||
uni.showToast({
|
||||
title: this.$t('message.Warehouse_Tip9') as string,
|
||||
duration: 2000,
|
||||
image: '/static/icons/icon-51.png',
|
||||
});
|
||||
this.orderlist = {};
|
||||
this.model.materielList.length = 0;
|
||||
this.SubmitOrderlist = [];
|
||||
this.Barcode = '';
|
||||
this.Container = '';
|
||||
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: 493px;
|
||||
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,79 @@
|
||||
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';
|
||||
import vm from '@/main';
|
||||
class OrderInInfo {
|
||||
checked?: boolean;
|
||||
poNo?: string;
|
||||
kw?: string;
|
||||
userDefined10?: string;
|
||||
orderStatus?: string;
|
||||
}
|
||||
@Module({
|
||||
namespaced: true,
|
||||
dynamic: true,
|
||||
store,
|
||||
name: 'raw.warehouse.RUSrowTransfer',
|
||||
})
|
||||
export class rowTransfer extends VuexModule {
|
||||
cboPlaceList = [];
|
||||
poNo = '';
|
||||
orderInInfo: OrderInInfo = new OrderInInfo();
|
||||
orderInInfoList: OrderInInfo[] = [];
|
||||
materielList = [];
|
||||
code = '';
|
||||
ContainerCode: any = '';
|
||||
//单号查询数据
|
||||
@MutationAction
|
||||
async takeYKOrder(order3: any) {
|
||||
try {
|
||||
const records: any = await http.post(url.warehouse.rowTransfer.list, {
|
||||
...order3,
|
||||
orderType: 'YK',
|
||||
page: 1,
|
||||
rows: 50,
|
||||
factoryCode: session.factoryCode,
|
||||
loginName: session.loginName,
|
||||
});
|
||||
const code = records.code;
|
||||
const orderInInfoList = records.data.records;
|
||||
const materielList = orderInInfoList.map((item: any) => ({
|
||||
label: item.productCode,
|
||||
value: item.productCode,
|
||||
...item,
|
||||
}));
|
||||
return { orderInInfoList, materielList, code };
|
||||
} catch {
|
||||
vm.customToast(vm.$t('message.Warehouse_Tip11') as any);
|
||||
}
|
||||
}
|
||||
//提交移库数据
|
||||
@MutationAction
|
||||
async onTakeoutConfirm(list: any) {
|
||||
const records: any = await http.post(url.warehouse.rowTransfer.russia, list);
|
||||
const code = records.code;
|
||||
return { code };
|
||||
}
|
||||
//将数据置空
|
||||
@MutationAction
|
||||
async empty() {
|
||||
const materielList = null;
|
||||
return { materielList };
|
||||
}
|
||||
@MutationAction
|
||||
async searchBarcode(params: any) {
|
||||
const res: any = await http.post(url.auth.query.barcode, {
|
||||
factoryCode: session.factoryCode,
|
||||
loginName: session.loginName,
|
||||
barcode: params.barcode,
|
||||
productCode: params.productCode,
|
||||
locCode: params.locCode,
|
||||
});
|
||||
const ContainerCode = res.data;
|
||||
return { ContainerCode };
|
||||
}
|
||||
}
|
||||
|
||||
export default getModule(rowTransfer);
|
Loading…
Reference in New Issue