cosmoim-852 fix 俄罗斯新增原材料报废功能
parent
461785dc7b
commit
4fe22d715d
@ -0,0 +1,45 @@
|
|||||||
|
/**
|
||||||
|
* 看单交接明细表格列
|
||||||
|
*/
|
||||||
|
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.product_costCenter'),
|
||||||
|
key: 'costCenter',
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// 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.borrow_CollectionAndBorrowingDetails') }}</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 { session } from '@/store/modules/session';
|
||||||
|
// 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';
|
||||||
|
|
||||||
|
@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 = '2';
|
||||||
|
});
|
||||||
|
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,241 @@
|
|||||||
|
<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.RowCollectionAndBorrowing') }}</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" disabled />
|
||||||
|
</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.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" placeholder="" />
|
||||||
|
</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;
|
||||||
|
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.takeLYOrder({
|
||||||
|
order3: this.order3,
|
||||||
|
});
|
||||||
|
if (this.model.code == '1') {
|
||||||
|
uni.showToast({
|
||||||
|
//icon: 'success',
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
let orderlist = [];
|
||||||
|
this.Some.type = '1';
|
||||||
|
this.Some.keepBy = session.loginName;
|
||||||
|
this.Some.orderType = '2';
|
||||||
|
orderlist.push(this.Some);
|
||||||
|
await model.onTakeoutConfirm(orderlist);
|
||||||
|
if (this.model.code == '1') {
|
||||||
|
uni.showToast({
|
||||||
|
//icon: 'success',
|
||||||
|
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.rowCollect',
|
||||||
|
})
|
||||||
|
export class rowCollect extends VuexModule {
|
||||||
|
/**
|
||||||
|
* sap库存地点列表
|
||||||
|
*/
|
||||||
|
cboPlaceList = [];
|
||||||
|
/**
|
||||||
|
* 隐藏看单号
|
||||||
|
*/
|
||||||
|
poNo = '';
|
||||||
|
/**
|
||||||
|
* 看单号查询结果
|
||||||
|
*/
|
||||||
|
orderInInfo: OrderInInfo = new OrderInInfo();
|
||||||
|
/**
|
||||||
|
* 看单明细
|
||||||
|
*/
|
||||||
|
orderInInfoList: OrderInInfo[] = [];
|
||||||
|
code: any = '';
|
||||||
|
/**
|
||||||
|
* 看单明细未通过明细
|
||||||
|
*/
|
||||||
|
// orderInInfoListEx: OrderInInfo[] = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
// * 查询看单号
|
||||||
|
* @param poNo
|
||||||
|
*/
|
||||||
|
@MutationAction
|
||||||
|
async takeLYOrder(order3: any) {
|
||||||
|
try {
|
||||||
|
const records: any = await http.post(url.warehouse.rowTransfer.list, {
|
||||||
|
...order3,
|
||||||
|
orderType: 'LY',
|
||||||
|
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(rowCollect);
|
Loading…
Reference in New Issue