cosmoim-852 fix 新增线边库半成品报废
parent
9e8fd75d80
commit
ff07f722c9
@ -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,252 @@
|
||||
<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.Sofspinlew') }}</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.Container')" prop="orderNo">
|
||||
<u-search :placeholder="$t('message.TargetContainer')" v-model.trim="barcode" @search="query" :show-action="false"></u-search>
|
||||
</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>
|
||||
<!-- 成本中心 -->
|
||||
<u-form-item :label="$t('message.product_costCenter')">
|
||||
<u-input v-model="costCenter" :border="border" :placeholder="$t('message.Warehouse_Tip8')" />
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<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 jPicker from '@/components/J-Picker/jPicker.vue';
|
||||
import { session } from '@/store/modules/session';
|
||||
@Component({
|
||||
components: {
|
||||
jPicker,
|
||||
},
|
||||
})
|
||||
export default class KanDanHandOver extends BasePage {
|
||||
TargetTitle = TargetTitle;
|
||||
border = true;
|
||||
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;
|
||||
}
|
||||
}
|
||||
costCenter = '';
|
||||
async submit() {
|
||||
if (this.barcode == '' || this.barcode.length == 0) {
|
||||
this.customToast(this.$t('message.scanningContainer') as string);
|
||||
return;
|
||||
}
|
||||
if (this.every == {} || !this.every.barcode) {
|
||||
this.customToast(this.$t('message.scanningContainer') as string);
|
||||
return;
|
||||
}
|
||||
if (this.costCenter == '') {
|
||||
this.customToast(this.$t('message.Warehouse_Tip8') as string);
|
||||
return;
|
||||
}
|
||||
// if (this.every.qty != 0) {
|
||||
// this.customToast(this.$t('message.scrapped') as string);
|
||||
// return;
|
||||
// }
|
||||
let params = {
|
||||
barCode: this.every.barcode,
|
||||
materialCode: this.every.productCode,
|
||||
materialDesc: this.every.productDescZh,
|
||||
wlFromCode: this.every.locCode,
|
||||
costCenter: this.costCenter,
|
||||
factoryCode: session.factoryCode,
|
||||
loginName: session.loginName,
|
||||
};
|
||||
await this.model.submit(params);
|
||||
if (this.model.submitCode == '1') {
|
||||
this.customToast(this.$t('message.success') as string);
|
||||
this.barcode = '';
|
||||
this.every = {};
|
||||
this.costCenter = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
</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: relative;
|
||||
|
||||
// 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,49 @@
|
||||
/*
|
||||
* @Author: zhou lei
|
||||
* @Date: 2022-09-29 13:45:51
|
||||
* @LastEditTime: 2022-09-29 15:56:26
|
||||
* @LastEditors: zhou lei
|
||||
* @Description:
|
||||
* @FilePath: \hgwms-factory-app\src\pages\raw\Semi-finished\LineEdge-scrap\model.ts
|
||||
* 联系方式:910592680@qq.com 18669792120 科海达信息技术有限公司
|
||||
*/
|
||||
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.Semi-finished.LineEdge-scrap',
|
||||
})
|
||||
export class semifinished extends VuexModule {
|
||||
//目标容器查询
|
||||
SearchCode: any = '';
|
||||
CodeDetail: any = '';
|
||||
@MutationAction
|
||||
async searchBarcode(barcode: any) {
|
||||
const res: any = await http.post(url.warehouse.container.getOdsRawStorageSnNewHalf, {
|
||||
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 };
|
||||
}
|
||||
//提交数据
|
||||
submitCode: any = '';
|
||||
@MutationAction
|
||||
async submit(params: any) {
|
||||
const res: any = await http.post(url.warehouse.container.odsRawStorageSnNewScrapped, params);
|
||||
const submitCode = res.code;
|
||||
return { submitCode };
|
||||
}
|
||||
}
|
||||
|
||||
export default getModule(semifinished);
|
Loading…
Reference in New Issue