You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
253 lines
6.3 KiB
Vue
253 lines
6.3 KiB
Vue
<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>
|