|
|
|
|
<template>
|
|
|
|
|
<view class="page-product-receipt">
|
|
|
|
|
<view class="top"></view>
|
|
|
|
|
<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.rejectsOffline') }}</view>
|
|
|
|
|
<view class="right"></view>
|
|
|
|
|
</view>
|
|
|
|
|
<u-form class="form" ref="form" :model="form" label-width="180rpx">
|
|
|
|
|
<!-- 半成品条码 -->
|
|
|
|
|
<view class="single">
|
|
|
|
|
<view class="single-left">
|
|
|
|
|
<view>{{ $t('message.product_barCode') }}</view>
|
|
|
|
|
<u-search :placeholder="$t('message.barcode')" v-model.trim="form.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.Pi_OrderNo')">
|
|
|
|
|
<u-input :disabled="true" v-model="Some.proMoveCode" placeholder="" style="overflow: hidden" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 型号名称 -->
|
|
|
|
|
<u-form-item :label="$t('message.ModelName')">
|
|
|
|
|
<u-input :disabled="true" v-model="Some.materialDesc" placeholder="" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 型号编码 -->
|
|
|
|
|
<u-form-item :label="$t('message.ModelCode')">
|
|
|
|
|
<u-input :disabled="true" v-model="Some.materialCode" placeholder="" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 原因 -->
|
|
|
|
|
<u-form-item :label="$t('message.CausesOfDefects')">
|
|
|
|
|
<u-input v-model="Some.reason" placeholder="" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 责任人 -->
|
|
|
|
|
<u-form-item :label="$t('message.personLiable')">
|
|
|
|
|
<u-input v-model="Some.responsibleUser" placeholder="" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 责任工序 -->
|
|
|
|
|
<u-form-item :label="$t('message.ResponsibleProcess')">
|
|
|
|
|
<u-input v-model="Some.responsibleProcess" placeholder="" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</u-form>
|
|
|
|
|
<view class="bottom-bar">
|
|
|
|
|
<u-row class="button-bar">
|
|
|
|
|
<!-- <u-col :span="3">
|
|
|
|
|
<u-button type="primary" @click="bill">{{ $t('message.detailed') }}</u-button>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col :span="3">
|
|
|
|
|
<u-button type="primary" @click="scanning">{{ $t('message.scanning') }}</u-button>
|
|
|
|
|
</u-col> -->
|
|
|
|
|
<u-col :span="6">
|
|
|
|
|
<u-button type="primary" @click="closure">{{ $t('message.workArea_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 { Component, Ref } from 'vue-property-decorator';
|
|
|
|
|
import { BasePage } from '@/components/base/page';
|
|
|
|
|
import jPicker from '@/components/J-Picker/jPicker.vue';
|
|
|
|
|
import { VForm } from 'vue/types/form';
|
|
|
|
|
import model from './model';
|
|
|
|
|
import { session } from '@/store/modules/session';
|
|
|
|
|
|
|
|
|
|
interface OptionType {
|
|
|
|
|
label: string;
|
|
|
|
|
value: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
components: {
|
|
|
|
|
jPicker,
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
export default class productCheckReceipt extends BasePage {
|
|
|
|
|
@Ref('form') readonly $form!: VForm;
|
|
|
|
|
model = model;
|
|
|
|
|
border = true;
|
|
|
|
|
form = {
|
|
|
|
|
productCode: '',
|
|
|
|
|
order3: '',
|
|
|
|
|
barcode: '',
|
|
|
|
|
aimWl: {} as OptionType,
|
|
|
|
|
};
|
|
|
|
|
dockCode: any = '';
|
|
|
|
|
dockName: any = '';
|
|
|
|
|
wl: any = {};
|
|
|
|
|
Some: any = {};
|
|
|
|
|
//选择目标库位回调函数
|
|
|
|
|
bookTypeChange(e: any) {
|
|
|
|
|
this.form.aimWl = e.pickerName;
|
|
|
|
|
}
|
|
|
|
|
// 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
|
|
|
|
|
//页面初始化
|
|
|
|
|
async onReady() {
|
|
|
|
|
//
|
|
|
|
|
}
|
|
|
|
|
//条码查询
|
|
|
|
|
async query() {
|
|
|
|
|
if (!this.form.order3) {
|
|
|
|
|
this.customToast(this.$t('message.Commission_tips1') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let param = {
|
|
|
|
|
factoryCode: session.factoryCode,
|
|
|
|
|
loginName: session.loginName,
|
|
|
|
|
barCode: this.form.order3,
|
|
|
|
|
};
|
|
|
|
|
await this.model.getInfoByDoorBarcode(param);
|
|
|
|
|
if (this.model.code == '1') {
|
|
|
|
|
this.Some = this.model.resdata;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//关闭
|
|
|
|
|
async closure() {
|
|
|
|
|
if (!this.form.order3) {
|
|
|
|
|
this.customToast(this.$t('message.Commission_tips1') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (!this.Some.reason) {
|
|
|
|
|
this.customToast(this.$t('message.PleaseTwo') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (!this.Some.responsibleUser) {
|
|
|
|
|
this.customToast(this.$t('message.PleaseOne') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (!this.Some.responsibleProcess) {
|
|
|
|
|
this.customToast(this.$t('message.PleaseThere') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
await this.model.scrapSfgOfflineConfirm({
|
|
|
|
|
orderNo: this.Some.proMoveCode,
|
|
|
|
|
productCode: this.Some.materialCode,
|
|
|
|
|
productDesc: this.Some.materialDesc,
|
|
|
|
|
factoryCode: session.factoryCode,
|
|
|
|
|
loginName: session.loginName,
|
|
|
|
|
barcode: this.form.order3,
|
|
|
|
|
reason: this.Some.reason,
|
|
|
|
|
responsibleUser: this.Some.responsibleUser,
|
|
|
|
|
responsibleProcess: this.Some.responsibleProcess,
|
|
|
|
|
});
|
|
|
|
|
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.form.order3 = '';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</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%;
|
|
|
|
|
.top {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 20px;
|
|
|
|
|
position: fixed;
|
|
|
|
|
top: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
background-color: rgb(23, 83, 234);
|
|
|
|
|
z-index: 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;
|
|
|
|
|
}
|
|
|
|
|
.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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.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>
|