|
|
|
@ -1,147 +1,72 @@
|
|
|
|
|
<template>
|
|
|
|
|
<view class="page-product-receipt">
|
|
|
|
|
<view
|
|
|
|
|
class="header"
|
|
|
|
|
:style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }"
|
|
|
|
|
>
|
|
|
|
|
<view class="header" :style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }">
|
|
|
|
|
<view class="left">
|
|
|
|
|
<u-icon class="icon" name="arrow-left" @click="back" />
|
|
|
|
|
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
|
|
|
|
|
</view>
|
|
|
|
|
<view class="title">{{ $t("message.Relocation") }}</view>
|
|
|
|
|
<view class="title">{{ $t('message.Relocation') }}</view>
|
|
|
|
|
<view class="right"></view>
|
|
|
|
|
</view>
|
|
|
|
|
<u-form class="form" ref="form" :model="form" label-width="180rpx">
|
|
|
|
|
<u-form-item :label="this.$t('message.Transfer')">
|
|
|
|
|
<u-input v-model="userDefined4" placeholder="" class="Transfer" />
|
|
|
|
|
<u-button
|
|
|
|
|
type="primary"
|
|
|
|
|
style="height: 60rpx; margin-left: 20rpx"
|
|
|
|
|
@click="generate"
|
|
|
|
|
>{{ $t("message.generate") }}</u-button
|
|
|
|
|
>
|
|
|
|
|
<!-- 移库码 -->
|
|
|
|
|
<u-form-item :label="$t('message.Transfer')">
|
|
|
|
|
<u-input v-model="model.userDefined4" placeholder="" class="Transfer" />
|
|
|
|
|
<u-button type="primary" style="height: 60rpx; margin-left: 20rpx" @click="generate">{{ $t('message.generate') }}</u-button>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item
|
|
|
|
|
:required="true"
|
|
|
|
|
:label="this.$t('message.product_barCode')"
|
|
|
|
|
prop="productCode"
|
|
|
|
|
>
|
|
|
|
|
<u-search
|
|
|
|
|
:placeholder="this.$t('message.po_PleaseInput')"
|
|
|
|
|
v-model="form.productCode"
|
|
|
|
|
@search="model.getProductCode"
|
|
|
|
|
:show-action="false"
|
|
|
|
|
></u-search>
|
|
|
|
|
<!-- 条码 -->
|
|
|
|
|
<u-form-item :required="true" :label="$t('message.product_barCode')" prop="productCode">
|
|
|
|
|
<u-search :placeholder="$t('message.po_PleaseInput')" v-model="form.productCode" @search="query" :show-action="false"></u-search>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item :label="this.$t('message.product_FGCode')">
|
|
|
|
|
<u-input
|
|
|
|
|
:disabled="true"
|
|
|
|
|
v-model="model.orderInInfo.productCode"
|
|
|
|
|
placeholder=""
|
|
|
|
|
/>
|
|
|
|
|
<!-- 成品编码 -->
|
|
|
|
|
<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="this.$t('message.product_FGDes')">
|
|
|
|
|
<u-input
|
|
|
|
|
:disabled="true"
|
|
|
|
|
v-model="model.orderInInfo.productDescZh"
|
|
|
|
|
placeholder=""
|
|
|
|
|
/>
|
|
|
|
|
<!-- 成品描述 -->
|
|
|
|
|
<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="this.$t('message.product_Number')">
|
|
|
|
|
<u-input
|
|
|
|
|
:disabled="true"
|
|
|
|
|
v-model="model.orderInInfo.qty"
|
|
|
|
|
placeholder=""
|
|
|
|
|
/>
|
|
|
|
|
<!-- 数量 -->
|
|
|
|
|
<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="类型:" prop="cboPlace">
|
|
|
|
|
<u-input
|
|
|
|
|
v-model="model.orderInInfo.custCode"
|
|
|
|
|
type="select"
|
|
|
|
|
@click="cboPlaceSelect = true"
|
|
|
|
|
/>
|
|
|
|
|
<u-select
|
|
|
|
|
v-model="cboPlaceSelect"
|
|
|
|
|
:list="model.modelType"
|
|
|
|
|
@confirm="(v) => (form.cboPlace = v[0])"
|
|
|
|
|
></u-select>
|
|
|
|
|
</u-form-item> -->
|
|
|
|
|
<!-- <u-form-item label="类型">
|
|
|
|
|
<u-input v-model="model.orderInInfo.custCodeName" />
|
|
|
|
|
</u-form-item> -->
|
|
|
|
|
<u-form-item :label="this.$t('message.product_Location')">
|
|
|
|
|
<u-input
|
|
|
|
|
:disabled="true"
|
|
|
|
|
v-model="model.orderInInfo.locCode"
|
|
|
|
|
placeholder=""
|
|
|
|
|
/>
|
|
|
|
|
<!-- 库位 -->
|
|
|
|
|
<u-form-item :label="$t('message.product_Location')">
|
|
|
|
|
<u-input :disabled="true" v-model="model.orderInInfo.locCode" placeholder="" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- <u-form-item label="库位:" prop="originWl">
|
|
|
|
|
<u-input v-model="form.originWl.label" type="select" @click="originWlSelect = true" />
|
|
|
|
|
<u-select
|
|
|
|
|
v-model="originWlSelect"
|
|
|
|
|
:list="model.WlList"
|
|
|
|
|
@confirm="(v) => (form.originWl = v[0])"
|
|
|
|
|
></u-select>
|
|
|
|
|
</u-form-item> -->
|
|
|
|
|
<!-- <u-form-item label="目标库位:" prop="aimWl">
|
|
|
|
|
<u-input v-model="form.aimWl.label" type="select" @click="aimWlSelect = true" />
|
|
|
|
|
<u-select
|
|
|
|
|
v-model="aimWlSelect"
|
|
|
|
|
:list="model.WlList"
|
|
|
|
|
@confirm="(v) => (form.aimWl = v[0])"
|
|
|
|
|
></u-select>
|
|
|
|
|
</u-form-item> -->
|
|
|
|
|
<u-form-item
|
|
|
|
|
:required="true"
|
|
|
|
|
:label="this.$t('message.Warehouse_TargetLocation')"
|
|
|
|
|
prop="aimWl"
|
|
|
|
|
>
|
|
|
|
|
<!-- <u-input v-model="form.aimWl.value" type="select" @click="aimWlSelect1 = true" /> -->
|
|
|
|
|
<jPicker
|
|
|
|
|
sureColor="#ff0000"
|
|
|
|
|
@bindpicker="bookTypeChange"
|
|
|
|
|
showKey="value"
|
|
|
|
|
valKey="value"
|
|
|
|
|
:val="form.aimWl.value"
|
|
|
|
|
:options="model.WlList"
|
|
|
|
|
/>
|
|
|
|
|
<!-- 目标库位 -->
|
|
|
|
|
<u-form-item :required="true" :label="$t('message.Warehouse_TargetLocation')" prop="aimWl">
|
|
|
|
|
<jPicker sureColor="#ff0000" @bindpicker="bookTypeChange" showKey="value" valKey="value" :val="form.aimWl.value" :options="model.WlList" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</u-form>
|
|
|
|
|
<view class="bottom-bar">
|
|
|
|
|
<u-row class="button-bar">
|
|
|
|
|
<!-- 移库明细 -->
|
|
|
|
|
<u-col :span="4">
|
|
|
|
|
<u-button type="primary" @click="bill">{{
|
|
|
|
|
$t("message.Warehouse_TransferDetails")
|
|
|
|
|
}}</u-button>
|
|
|
|
|
<u-button type="primary" @click="bill">{{ $t('message.Warehouse_TransferDetails') }}</u-button>
|
|
|
|
|
</u-col>
|
|
|
|
|
<!-- 确定 -->
|
|
|
|
|
<u-col :span="4">
|
|
|
|
|
<u-button type="primary" @click="onSubmit">{{
|
|
|
|
|
$t("message.workArea_Confirm")
|
|
|
|
|
}}</u-button>
|
|
|
|
|
<u-button type="primary" @click="onSubmit">{{ $t('message.workArea_Confirm') }}</u-button>
|
|
|
|
|
</u-col>
|
|
|
|
|
<!-- 返回 -->
|
|
|
|
|
<u-col :span="4">
|
|
|
|
|
<u-button type="error" @click="uni.navigateBack()">{{
|
|
|
|
|
$t("message.po_Return")
|
|
|
|
|
}}</u-button>
|
|
|
|
|
<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, VFormRules } from "vue/types/form";
|
|
|
|
|
import model from "./model";
|
|
|
|
|
import { session } from "@/store/modules/session";
|
|
|
|
|
|
|
|
|
|
import { Component, Ref } from 'vue-property-decorator';
|
|
|
|
|
import { BasePage } from '@/components/base/page';
|
|
|
|
|
import jPicker from '@/components/J-Picker/jPicker.vue';
|
|
|
|
|
import { VForm, VFormRules } from 'vue/types/form';
|
|
|
|
|
import model from './model';
|
|
|
|
|
import { session } from '@/store/modules/session';
|
|
|
|
|
interface OptionType {
|
|
|
|
|
label: string;
|
|
|
|
|
value: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
components: {
|
|
|
|
|
jPicker,
|
|
|
|
@ -151,149 +76,115 @@ export default class productCheckReceipt extends BasePage {
|
|
|
|
|
/**
|
|
|
|
|
* 表单引用
|
|
|
|
|
*/
|
|
|
|
|
@Ref("form") readonly $form!: VForm;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 页面Module
|
|
|
|
|
*/
|
|
|
|
|
@Ref('form') readonly $form!: VForm;
|
|
|
|
|
model = model;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 表单数据
|
|
|
|
|
*/
|
|
|
|
|
form = {
|
|
|
|
|
// originWl: {} as OptionType,
|
|
|
|
|
aimWl: {} as OptionType,
|
|
|
|
|
// qty: {} as OptionType,
|
|
|
|
|
productCode: "",
|
|
|
|
|
productCode: '',
|
|
|
|
|
};
|
|
|
|
|
userDefined4: any = "";
|
|
|
|
|
// originWlSelect = false;
|
|
|
|
|
aimWlSelect = false;
|
|
|
|
|
// aimWlSelect1 = false;
|
|
|
|
|
cboPlaceSelect = false;
|
|
|
|
|
rules: VFormRules<any> = {
|
|
|
|
|
documentNo: [
|
|
|
|
|
{ required: true, message: this.$t("message.Warehouse_Tip1") as string },
|
|
|
|
|
],
|
|
|
|
|
documentNo: [{ required: true, message: this.$t('message.Warehouse_Tip1') as string }],
|
|
|
|
|
// originWl: [{ required: true, message: '请选择库位地点' }],
|
|
|
|
|
aimWl: [
|
|
|
|
|
{ required: true, message: this.$t("message.Warehouse_Tip3") as string },
|
|
|
|
|
],
|
|
|
|
|
cboPlace: [
|
|
|
|
|
{ required: true, message: this.$t("message.Warehouse_Tip4") as string },
|
|
|
|
|
],
|
|
|
|
|
aimWl: [{ required: true, message: this.$t('message.Warehouse_Tip3') as string }],
|
|
|
|
|
cboPlace: [{ required: true, message: this.$t('message.Warehouse_Tip4') as string }],
|
|
|
|
|
};
|
|
|
|
|
back() {
|
|
|
|
|
uni.navigateBack({ delta: 1 });
|
|
|
|
|
this.model.orderInInfo.productDescZh = "";
|
|
|
|
|
}
|
|
|
|
|
value = "";
|
|
|
|
|
// back() {
|
|
|
|
|
// uni.navigateBack({ delta: 1 });
|
|
|
|
|
// }
|
|
|
|
|
value = '';
|
|
|
|
|
show = false;
|
|
|
|
|
|
|
|
|
|
//选择目标库位回调函数
|
|
|
|
|
bookTypeChange(e: any) {
|
|
|
|
|
this.form.aimWl = e.pickerName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
|
|
|
|
|
//扫描条码回车
|
|
|
|
|
async query() {
|
|
|
|
|
if (this.form.productCode == ' ' || this.form.productCode.length == 0) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.product_unit7') as string,
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
await model.getProductCode(this.form.productCode);
|
|
|
|
|
if (model.code == '1') {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.successful') as string,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//页面初始化
|
|
|
|
|
onReady() {
|
|
|
|
|
this.model.orderInInfo.productDescZh = "";
|
|
|
|
|
this.model.orderInInfo.productCode = "";
|
|
|
|
|
this.model.orderInInfo.qty = "";
|
|
|
|
|
this.model.orderInInfo.locCode = "";
|
|
|
|
|
this.$form.setRules(this.rules);
|
|
|
|
|
this.model.queryLocation();
|
|
|
|
|
}
|
|
|
|
|
//点击生成随机移库码
|
|
|
|
|
async generate() {
|
|
|
|
|
let person = JSON.parse(
|
|
|
|
|
localStorage.getItem("__GWMS_APP_STATE_DATA__") as any
|
|
|
|
|
);
|
|
|
|
|
let person = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any);
|
|
|
|
|
let loginName = person.session.user.loginName;
|
|
|
|
|
await this.model.getCpMoveBatchNo({ loginName });
|
|
|
|
|
this.userDefined4 = model.userDefined4;
|
|
|
|
|
}
|
|
|
|
|
//移库明细
|
|
|
|
|
async bill() {
|
|
|
|
|
// if (this.form.documentNo == "") {
|
|
|
|
|
// uni.showToast({
|
|
|
|
|
// icon: "none",
|
|
|
|
|
// title: "请先输入要查询的单号" as any,
|
|
|
|
|
// });
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// let person = JSON.parse(
|
|
|
|
|
// localStorage.getItem("__GWMS_APP_STATE_DATA__") as any
|
|
|
|
|
// );
|
|
|
|
|
// let content = {
|
|
|
|
|
// loginName: person.session.user.loginName,
|
|
|
|
|
// poNo: this.form.documentNo,
|
|
|
|
|
// factoryCode: person.session.user.factoryCode,
|
|
|
|
|
// };
|
|
|
|
|
// await this.model.querydetaildlist(content);
|
|
|
|
|
this.model.detailedList = [];
|
|
|
|
|
this.redirectTo(this.page.product.warehouse.wholeTransfer.Local);
|
|
|
|
|
}
|
|
|
|
|
//移库确认
|
|
|
|
|
onSubmit() {
|
|
|
|
|
this.$form.validate((valid: boolean) => {
|
|
|
|
|
if (!valid) return;
|
|
|
|
|
if (model.userDefined4 == ' ' || model.userDefined4.length == 0) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.LibraryCode') as string,
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (!this.form.productCode) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: "none",
|
|
|
|
|
title: this.$t("message.Warehouse_Tip5") as string,
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.Warehouse_Tip5') as string,
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// if (!this.form.cboPlace.value) {
|
|
|
|
|
// uni.showToast({
|
|
|
|
|
// icon: 'none',
|
|
|
|
|
// title: '请选择类型!',
|
|
|
|
|
// });
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// if (!this.form.originWl.value) {
|
|
|
|
|
// uni.showToast({
|
|
|
|
|
// icon: 'none',
|
|
|
|
|
// title: '请选择库位!',
|
|
|
|
|
// });
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
if (!this.form.aimWl.value) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: "none",
|
|
|
|
|
title: this.$t("message.Warehouse_Tip3") as string,
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.Warehouse_Tip3') as string,
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.form.aimWl.value == model.orderInInfo.locCode) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.TargetLocation') as string,
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
console.log("orderlist");
|
|
|
|
|
|
|
|
|
|
const orderlist = [
|
|
|
|
|
{
|
|
|
|
|
...this.model.orderInInfo,
|
|
|
|
|
originWl: this.model.orderInInfo.locCode,
|
|
|
|
|
barCode: this.model.orderInInfo.barcode,
|
|
|
|
|
aimWl: this.form.aimWl.value,
|
|
|
|
|
type: "0",
|
|
|
|
|
orderType: "0",
|
|
|
|
|
type: '0',
|
|
|
|
|
orderType: '0',
|
|
|
|
|
keepBy: session.loginName as string,
|
|
|
|
|
factoryCode: session.factoryCode as string,
|
|
|
|
|
userDefined4: this.userDefined4,
|
|
|
|
|
userDefined4: model.userDefined4,
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
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.form.productCode = "";
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.page-product-receipt {
|
|
|
|
|
background: #f2f2f2
|
|
|
|
|
linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
|
|
|
|
|
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
|
|
|
|
|
background-size: 100% 600rpx;
|
|
|
|
|
padding: 118rpx 30rpx 162rpx;
|
|
|
|
|
min-height: 100%;
|
|
|
|
|