|
|
|
|
<template>
|
|
|
|
|
<view class="page-product-receipt">
|
|
|
|
|
<view class="header" :style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }">
|
|
|
|
|
<view class="left">
|
|
|
|
|
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack({ delta: 1 })" />
|
|
|
|
|
</view>
|
|
|
|
|
<view class="title">{{ $t('message.CollectionAndBorrowing') }}</view>
|
|
|
|
|
<view class="right"></view>
|
|
|
|
|
</view>
|
|
|
|
|
<u-form class="form" ref="form" :model="form" label-width="180rpx">
|
|
|
|
|
<!-- 条码 -->
|
|
|
|
|
<u-form-item :required="true" :label="$t('message.product_barCode')" prop="productCode">
|
|
|
|
|
<u-search :placeholder="$t('message.po_PleaseInput')" v-model="form.productCode" @search="model.getProductCode" :show-action="false"></u-search>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 成品编码 -->
|
|
|
|
|
<u-form-item :label="$t('message.product_FGCode')">
|
|
|
|
|
<u-input :disabled="true" v-model="model.orderInInfo.productCode" placeholder="" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 成品描述 -->
|
|
|
|
|
<u-form-item :label="$t('message.product_FGDes')">
|
|
|
|
|
<u-input :disabled="true" v-model="model.orderInInfo.productDescZh" placeholder="" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 数量 -->
|
|
|
|
|
<u-form-item :label="$t('message.product_Number')">
|
|
|
|
|
<u-input :disabled="true" v-model="model.orderInInfo.qty" placeholder="" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 库位 -->
|
|
|
|
|
<u-form-item :label="$t('message.product_Location')">
|
|
|
|
|
<u-input :disabled="true" v-model="model.orderInInfo.locCode" placeholder="" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 成本中心 -->
|
|
|
|
|
<u-form-item :required="true" :label="$t('message.product_costCenter')">
|
|
|
|
|
<u-input v-model="model.orderInInfo.costCenter" :placeholder="$t('message.po_PleaseInput')" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</u-form>
|
|
|
|
|
<view class="bottom-bar">
|
|
|
|
|
<u-row class="button-bar">
|
|
|
|
|
<u-col :span="6">
|
|
|
|
|
<u-button type="primary" @click="onSubmit">{{ $t('message.workArea_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>
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts">
|
|
|
|
|
import { Component, Ref } from 'vue-property-decorator';
|
|
|
|
|
import { BasePage } from '@/components/base/page';
|
|
|
|
|
import { VForm, VFormRules } from 'vue/types/form';
|
|
|
|
|
import model from './model';
|
|
|
|
|
import { session } from '@/store/modules/session';
|
|
|
|
|
interface OptionType {
|
|
|
|
|
label: string;
|
|
|
|
|
value: string;
|
|
|
|
|
}
|
|
|
|
|
@Component
|
|
|
|
|
export default class ProductCheckReceipt extends BasePage {
|
|
|
|
|
@Ref('form') readonly $form!: VForm;
|
|
|
|
|
model = model;
|
|
|
|
|
//表单
|
|
|
|
|
form = {
|
|
|
|
|
...this.model.orderInInfo,
|
|
|
|
|
originWl: {} as OptionType,
|
|
|
|
|
aimWl: {} as OptionType,
|
|
|
|
|
qty: {} as OptionType,
|
|
|
|
|
};
|
|
|
|
|
originWlSelect = false;
|
|
|
|
|
aimWlSelect = false;
|
|
|
|
|
cboPlaceSelect = false;
|
|
|
|
|
rules: VFormRules<any> = {
|
|
|
|
|
documentNo: [{ required: true, message: this.$t('message.Warehouse_Tip1') as string }],
|
|
|
|
|
originWl: [{ required: true, message: this.$t('message.Warehouse_Tip2') as string }],
|
|
|
|
|
aimWl: [{ required: true, message: this.$t('message.Warehouse_Tip3') as string }],
|
|
|
|
|
cboPlace: [{ required: true, message: this.$t('message.Warehouse_Tip4') as string }],
|
|
|
|
|
};
|
|
|
|
|
value = '';
|
|
|
|
|
show = false;
|
|
|
|
|
// 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
|
|
|
|
|
onReady() {
|
|
|
|
|
this.model.orderInInfo.productDescZh = '';
|
|
|
|
|
this.model.orderInInfo.productCode = '';
|
|
|
|
|
this.model.orderInInfo.qty = '';
|
|
|
|
|
this.model.orderInInfo.locCode = '';
|
|
|
|
|
this.model.orderInInfo.costCenter = '';
|
|
|
|
|
this.$form.setRules(this.rules);
|
|
|
|
|
this.model.queryLocation();
|
|
|
|
|
}
|
|
|
|
|
onSubmit() {
|
|
|
|
|
this.$form.validate((valid: boolean) => {
|
|
|
|
|
if (!valid) return;
|
|
|
|
|
if (!this.form.productCode) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.Warehouse_Tip5') as string,
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (!this.model.orderInInfo.costCenter) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.Warehouse_Tip8') as string,
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
console.log('orderlist');
|
|
|
|
|
const orderlist = [
|
|
|
|
|
{
|
|
|
|
|
...this.model.orderInInfo,
|
|
|
|
|
// originWl: this.form.originWl.value,
|
|
|
|
|
originWl: this.model.orderInInfo.locCode,
|
|
|
|
|
// aimWl: this.form.aimWl.value, custcode
|
|
|
|
|
type: '0',
|
|
|
|
|
orderType: '2',
|
|
|
|
|
keepBy: session.loginName,
|
|
|
|
|
factoryCode: session.factoryCode,
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
console.log('orderlist', orderlist);
|
|
|
|
|
this.model.onTakeoutConfirm(orderlist);
|
|
|
|
|
this.model.orderInInfo.productDescZh = '';
|
|
|
|
|
this.model.orderInInfo.productCode = '';
|
|
|
|
|
this.model.orderInInfo.qty = '';
|
|
|
|
|
this.model.orderInInfo.locCode = '';
|
|
|
|
|
this.model.orderInInfo.costCenter = '';
|
|
|
|
|
this.form.productCode = '';
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.page-product-receipt {
|
|
|
|
|
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 {
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.button-bar {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|