overseamom-481 feat 手工单增加手持页面

master
mabaoyan 3 years ago
parent 7a7d8a4708
commit 59dbdeb209

@ -240,6 +240,9 @@ export default {
Relocation: '成品移库',
Scrap: '成品报废',
CollectionAndBorrowing: '成品领用借用',
FgTransfer: '成品移库-Vn',
FgScrap: '成品报废-Vn',
FgCostCenter: '成品成本中心-Vn',
Inventory: '成品盘点',
raw_Inventory: '原材料盘点',
Transfer: '移库码',
@ -253,6 +256,9 @@ export default {
RowScrap: '原材料报废',
RowRelocation: '原材料移库',
RowCollectionAndBorrowing: '原材料领用借用',
RawScrap: '原材料报废-Vn',
RawTransfer: '原材料移库-Vn',
RawConsuming: '原材料成本中心-Vn',
InventoryOrderNo: '单号',
InventoryMaterielNo: '物料号',
InventoryMateriel: '物料名',

@ -240,6 +240,9 @@ export default {
Relocation: 'FG transfer',
Scrap: 'FG scrap',
CollectionAndBorrowing: 'FG cost center',
FgTransfer: 'FG transfer-Vn',
FgScrap: 'FG scrap-Vn',
FgCostCenter: 'FG cost center-Vn',
Inventory: 'FG PSV',
raw_Inventory: 'Raw Inventory',
Transfer: 'Code',
@ -253,6 +256,9 @@ export default {
RowScrap: 'RAW scrap',
RowRelocation: 'RAW transfer',
RowCollectionAndBorrowing: 'RAW cost center',
RawScrap: 'RAW scrap-Vn',
RawTransfer: 'RAW transfer-Vn',
RawConsuming: 'RAW cost center-Vn',
InventoryOrderNo: 'Order',
InventoryMaterielNo: 'MAT code',
InventoryMateriel: 'MAT name',

@ -252,6 +252,8 @@ export default {
SemiProductZC: 'Перемещение полуфабрикатов на хранение',
RowScrap: 'Брак сырья',
RowRelocation: 'Передача сырья',
RawScrap: 'Брак сырья-Vn',
RawTransfer: 'Передача сырья-Vn',
RowCollectionAndBorrowing: 'Заимствование сырья',
InventoryOrderNo: 'Номер заказа',
InventoryMaterielNo: 'Номер материала',

@ -114,6 +114,30 @@
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/product/warehouse/fgScrap/index",
"style": {
"navigationBarTitleText": "成品报废",//
"navigationStyle": "custom", //
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/product/warehouse/fgConsuming/index",
"style": {
"navigationBarTitleText": "成品领用",//
"navigationStyle": "custom", //
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/product/warehouse/fgTransfer/index",
"style": {
"navigationBarTitleText": "成品移库",//
"navigationStyle": "custom", //
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/product/warehouse/wholeLnventory/index",
"style": {
@ -330,6 +354,30 @@
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/raw/warehouse/rawTransfer/index",
"style": {
"navigationBarTitleText": "越南移库",//
"navigationStyle": "custom", //
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/raw/warehouse/rawScrap/index",
"style": {
"navigationBarTitleText": "报废",//
"navigationStyle": "custom", //
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/raw/warehouse/rawConsuming/index",
"style": {
"navigationBarTitleText": "成本中心",//
"navigationStyle": "custom", //
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/raw/warehouse/Container-consolidation/index",
"style": {

@ -0,0 +1,48 @@
/**
*
*/
import vm from '@/main';
export const headers = [
//条码号
{
label: vm.$t('message.product_barCode'),
key: 'barCode',
width: 300,
},
//单号
{
label: vm.$t('message.borrow_OrderNo'),
key: 'proMoveCode',
width: 300,
},
//型号编码
{
label: vm.$t('message.ModelCode'),
key: 'materialCode',
width: 300,
},
//型号名称
{
label: vm.$t('message.ModelName'),
key: 'materialDesc',
width: 300,
},
//源库位
{
label: vm.$t('message.SourceLocation'),
key: 'wlFromCode',
width: 300,
},
//目标库位
{
label: vm.$t('message.Warehouse_TargetLocation'),
key: 'wlToCode',
width: 300,
},
// //操作时间
{
label: vm.$t('message.operatingTime'),
key: 'moveTime',
width: 300,
},
];

@ -0,0 +1,170 @@
<template>
<view class="page-receipt-detail">
<view class="header">
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
</view>
<view class="title">{{ $t('message.usingDetail') }}</view>
<view class="right"></view>
</view>
<view class="table-wrapper">
<wyb-table class="table" ref="table" width="100%" enable-check="multiple" show-left-and-right-border :headers="headers" :contents="model.materielList" :show-vert-border="false"></wyb-table>
</view>
<view class="bottom-bar">
<div class="extra">
<u-row class="bottom-info">
<u-col :span="12">{{ $t('message.po_Total') }} {{ model.materielList.length }} {{ $t('message.po_Records') }}</u-col>
<!-- <u-col :span="2">数量</u-col>-->
<!-- <u-col :span="4"><u-input v-model="locationCode"></u-input></u-col>-->
<!-- <u-col :span="3">-->
<!-- <u-button-->
<!-- size="mini"-->
<!-- type="warning"-->
<!-- :loading="$wait.is('*changeOrderInLocation')"-->
<!-- @click="changeLocation"-->
<!-- >-->
<!-- 拒收-->
<!-- </u-button>-->
<!-- </u-col>-->
</u-row>
</div>
<!-- <div class="container">-->
<!-- <u-row>-->
<!-- <u-col :span="4">-->
<!-- <u-button type="primary" @click="model.checkAllOrderInInfoList(!model.isCheckedAll)">-->
<!-- {{-->
<!-- model.isCheckedAll-->
<!-- ? this.$t('message.po_noSelectAll')-->
<!-- : this.$t('message.po_SelectAll')-->
<!-- }}-->
<!-- </u-button>-->
<!-- </u-col>-->
<!-- <u-col :span="4">-->
<!-- <u-button type="success" :loading="$wait.is('*submitOrderInEnter')" @click="onSubmit">-->
<!-- {{ $t('message.po_Submit') }}-->
<!-- </u-button>-->
<!-- </u-col>-->
<!-- <u-col :span="4">-->
<!-- <u-button @click="uni.navigateBack()">{{ $t('message.po_Return') }}</u-button>-->
<!-- </u-col>-->
<!-- </u-row>-->
<!-- </div>-->
</view>
</view>
</template>
<script lang="ts">
import { Component } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import model from './model';
import { headers } from './config';
@Component
export default class RawReceiptDetail extends BasePage {
/**
* 页面Module
*/
model = model;
/**
* 库位
*/
locationCode = '';
/**
* 表头
*/
headers = headers;
/**
* 逐条修改
*/
// changeLocation() {
// if (!this.model.hasChecked) {
// uni.showToast({
// icon: 'none',
// title: '',
// });
// return;
// }
// this.model.changeOrderInLocation(this.locationCode);
// }
/**
* 提交
*/
// async onSubmit() {
// await this.model.submitOrderInEnter();
// this.locationCode = '';
// }
}
</script>
<style lang="scss" scoped>
.page-receipt-detail {
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background-size: 100% 600rpx;
padding: 30rpx;
min-height: 100%;
padding-top: 118rpx;
.header {
position: fixed;
top: 36rpx;
left: 0;
right: 0;
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;
}
}
.table-wrapper {
background-color: #fff;
}
.form {
background-color: #fff;
padding: 40rpx;
border-radius: 10rpx;
}
.bottom-bar {
z-index: 21;
position: fixed;
bottom: 0;
left: 0;
right: 0;
.container {
background: #ffffff;
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
padding: 20rpx;
}
.extra {
background-color: #fff;
margin: 5px;
border-radius: 5px;
padding: 0 10px;
}
}
}
</style>

@ -0,0 +1,379 @@
<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">
<!-- 领用单 -->
<view class="single">
<view class="single-left">
<view>{{ $t('message.InventoryOrderNo') }}</view>
<u-search :placeholder="$t('message.collecting')" 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.product_FGCode')">
<jPicker sureColor="#ff0000" style="width: 260rpx" @bindpicker="materialChoice" showKey="value" valKey="value" :val="wl.value" class="search" :options="model.choiceCodeList" />
</u-form-item>
<!-- 成品描述 -->
<u-form-item :label="$t('message.product_FGDes')">
<u-input :disabled="true" v-model="Some.productDescZh" placeholder="" style="overflow: hidden" />
</u-form-item>
<!-- 数量 -->
<u-form-item :label="$t('message.product_Number')">
<u-input :disabled="true" v-model="Some.qty" placeholder="" />
</u-form-item>
<!-- 源库位 -->
<u-form-item :label="$t('message.SourceLocation')">
<u-input :disabled="true" v-model="Some.originWl" placeholder="" />
</u-form-item>
<!-- 成本中心 -->
<u-form-item :label="$t('message.product_costCenter')">
<u-input v-model="Some.costCenter" placeholder="" />
</u-form-item>
<!-- 已扫 -->
<u-form-item :label="$t('message.product_Swept')">
<u-input :disabled="true" v-model="Some.actualQty" placeholder="" />
</u-form-item>
<!-- 条码 -->
<u-form-item :label="$t('message.product_BarCode')">
<u-search :placeholder="$t('message.barcode')" v-model.trim="form.barcode" @search="scanning" :show-action="false"></u-search>
</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="3">
<u-button type="primary" @click="closure">{{ $t('message.closure') }}</u-button>
</u-col>
<u-col :span="3">
<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 } from 'vue/types/form';
import model from './model';
import jPicker from '@/components/J-Picker/jPicker.vue';
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;
//
form = {
order3: '',
barcode: '',
};
wl: any = {};
Some: any = {};
// onReadyonLoad
onReady() {
this.model.orderInInfo.productDescZh = '';
this.model.orderInInfo.productCode = '';
this.model.orderInInfo.qty = '';
this.model.orderInInfo.locCode = '';
this.model.orderInInfo.costCenter = '';
}
//
async query() {
if (!this.form.order3) {
this.customToast(this.$t('message.Commission_tips1') as string);
return;
}
let param = {
factoryCode: session.factoryCode,
loginName: session.loginName,
order3: this.form.order3,
orderType: 'LY',
orderSourceSys: 'FG',
page: '1',
rows: '50',
};
await this.model.queryConsumingInfoFg(param);
if (this.model.code == '1') {
//this.customToast(this.$t('message.product_Tip8') as string);
uni.showToast({
//icon: 'success',
title: this.$t('message.product_Tip8') as string,
duration: 2000,
image: '/static/icons/icon-51.png',
});
this.wl.value = this.model.choiceCodeList[0].value;
this.Some = this.model.recordsList[0];
}
}
//
materialChoice(e: any) {
this.wl = e.pickerName;
this.model.recordsList.forEach((item: any) => {
if (item.productCode == e.pickerName.value) {
this.Some = item;
}
});
}
//
async scanning() {
if (!this.form.order3) {
this.customToast(this.$t('message.scrapForm') as string);
}
if (!this.Some) {
this.customToast(this.$t('message.finishedProduct') as string);
}
if (!this.form.barcode) {
this.customToast(this.$t('message.barcode') as string);
return;
}
if (this.Some.actualQty >= this.Some.qty) {
this.customToast(this.$t('message.product_Tip10') as string);
return;
}
let params = {
factoryCode: session.factoryCode,
loginName: session.loginName,
barcode: this.form.barcode,
productCode: this.wl.value,
locCode: this.Some.originWl,
order1: this.form.order3,
};
await this.model.getProductCode(params);
if (this.model.code == '1') {
//this.customToast(this.$t('message.product_Tip8') as string);
uni.showToast({
//icon: 'success',
title: this.$t('message.product_Tip8') as string,
duration: 2000,
image: '/static/icons/icon-51.png',
});
//this.Some.actualQty += 1;
this.onSubmit();
}
if (this.model.code == '2') {
uni.showModal({
content: this.$t('message.sweep') as string,
confirmText: this.$t('message.workArea_Confirm') as string,
cancelText: this.$t('message.product_Cancel') as string,
success: async (res) => {
if (res.confirm) {
let params = {
barCode: this.form.barcode,
orderType: '2',
order3: this.form.order3,
factoryCode: session.factoryCode,
loginName: session.loginName,
};
await this.model.codeDel(params);
if (this.model.delCode == '1') {
this.customToast(this.$t('message.success') as string);
this.form.barcode = '';
}
} else if (res.cancel) {
this.form.barcode = '';
return;
}
},
});
}
}
//
async onSubmit() {
const orderlist = [
{
...this.model.orderInInfo,
originWl: this.Some.originWl,
barCode: this.form.barcode,
aimWl: this.Some.aimWl,
type: '0',
orderType: '2',
keepBy: session.loginName as string,
factoryCode: session.factoryCode as string,
order3: this.form.order3,
costCenter: this.Some.costCenter,
},
];
await this.model.consumingConfirmFg(orderlist);
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.wl = {};
// this.form.order3 = '';
this.form.barcode = '';
this.query();
}
//
async closure() {
if (!this.form.order3) {
this.customToast(this.$t('message.Commission_tips1') as string);
return;
}
if (this.Some.actualQty == this.Some.qty) {
//this.customToast(this.$t('message.Commission_tips8') as string);
uni.showModal({
content: this.$t('message.Commission_tips8') as string,
confirmText: this.$t('message.workArea_Confirm') as string,
cancelText: this.$t('message.Cancel') as string,
success: (res: any) => {
if (res.confirm) {
//debugger;
console.log('////111111');
this.model.close(this.form.order3);
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.Some.fileNo = ' ';
this.wl = {};
this.form.order3 = '';
this.form.barcode = '';
}
} else if (res.cancel) {
return;
}
},
});
return;
}
await this.model.close(this.form.order3);
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.Some.fileNo = ' ';
// this.wl = {};
// this.form.order3 = '';
// this.form.barcode = '';
}
}
//
async bill() {
if (!this.form.order3) {
this.customToast(this.$t('message.Commission_tips1') as string);
return;
}
await this.model.queryDetailed(this.form.order3);
this.toPage(this.page.product.warehouse.wholeCollect.stoOutboundDetail);
}
}
</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;
}
.single {
width: 100%;
height: 100rpx;
display: flex;
.single-left {
width: 80%;
height: 100%;
display: flex;
view {
width: 110rpx;
height: 100%;
line-height: 30rpx;
display: flex;
align-items: center;
}
}
.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>

@ -0,0 +1,195 @@
import { Action, 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';
// import { page } from '@/utils/page';
class OrderInInfo {
productDescZh?: string;
qty?: string;
custCode?: string;
custCodeName?: string;
productCode?: string;
locCode?: string;
costCenter?: string;
}
@Module({
namespaced: true,
dynamic: true,
store,
name: 'product.warehouse.wholeCollect',
})
export class wholeCollect extends VuexModule {
/**
*
*/
WlList = [];
code: any = '';
delCode: any = '';
recordsList: any = [];
choiceCodeList: any = [];
materielList: any = [];
/**
*
*/
// modelType = [
// { label: '内销', value: '0' },
// { label: '外销', value: '1' },
// { label: '样机', value: '2' },
// { label: '半成品', value: '4' },
// ];
/**
*
*/
dnNo = '';
/**
*
*/
orderInInfo: OrderInInfo = new OrderInInfo();
// /**
// * 更新看单明细库位
// * @param kw 库位
// */
// @Mutation
// updateOrderInInfoListKw(kw: string) {
// this.orderInInfoList = this.orderInInfoList.map((item) => {
// item.kw = kw;
// return item;
// });
// }
/**
*
*/
@MutationAction
async queryLocationFgConsuming() {
const result: any = await http.get(url.warehouse.wholeTransfer.list, {
params: {
factoryCode: session.factoryCode,
loginName: session.loginName,
},
});
// console.log('库位数据',result)
const WlList = result.data.map((_: any) => ({
label: _.locationCode,
value: _.locationCode,
}));
return { WlList };
}
@MutationAction
async queryConsumingInfoFg(param: any) {
const res: any = await http.post(url.warehouse.manualOrder.list, param);
const code = res.code;
console.log('res', res);
const recordsList = res.data.records;
const choiceCodeList = [];
recordsList.forEach((item: any) => {
const arr: any = {};
arr.label = item.productCode;
arr.value = item.productCode;
choiceCodeList.push(arr);
});
console.log('choiceCodeList', choiceCodeList);
return { code, recordsList, choiceCodeList };
}
/**
*
* DN
* @param dnNo
*/
@MutationAction
async getProductCode(params: any) {
const res: any = await http.post(url.warehouse.wholeTransfer.content, params);
const orderInInfo = res.data.records[0];
const code = res.code;
return { code, orderInInfo };
}
//退扫
@MutationAction
async codeDel(params: any) {
const res: any = await http.post(url.warehouse.wholeTransfer.del, params);
const delCode = res.code;
return { delCode };
}
@MutationAction
async consumingConfirmFg(list: any[]) {
const records: any = await http.post(url.warehouse.manualOrder.confirmFg, list);
const code = records.code;
return { code };
}
// /**
// * 提交看单明细
// */
// @MutationAction
// async submitOrderInEnter() {
// const list = (this.state as any).orderInInfoList.map((item: any) => {
// item.orderStatus = item.checked ? '2' : '1';
// item.requestAmount = item.checked ? item.y : '0';
// return item;
// });
// const result: any = await http.post(url.material.DNorderin.enter, {
// dnNo: this.dnNo,
// factoryCode: '1999',
// loginName: '1999',
// list,
// });
// uni.showToast({
// icon: 'none',
// title: result.msg,
// });
// const orderInInfoList = result.list.sort(
// (a: any, b: any) => Number(a.accountingStatus) - Number(b.accountingStatus),
// );
// return { orderInInfoList };
// }
/**
*
*/
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
async changeOrderInLocation(kw: string) {
await http.post('/wmspda/material/orderin/enter', {
loginName: session.loginName,
warehouseCode: '',
factoryCode: session.factoryCode,
locationCode: kw,
});
return kw;
}
/**
*
* DN
* @param dnNo
*/
@MutationAction
async queryDetailed(proMoveCode: any) {
const { code, data } = await http.post(url.warehouse.rowTransfer.queryListByMoveCode, {
proMoveCode,
factoryCode: session.factoryCode as string,
loginName: session.loginName as string,
});
const materielList = data;
return { materielList, code };
}
/**
*
* DN
* @param dnNo
*/
@MutationAction
async close(proMoveCode: any) {
const { code } = await http.post(url.warehouse.rowTransfer.close, {
factoryCode: session.factoryCode as string,
loginName: session.loginName as string,
proMoveCode,
});
//const materielList = data;
return { code };
}
}
export default getModule(wholeCollect);

@ -0,0 +1,48 @@
/**
*
*/
import vm from '@/main';
export const headers = [
//条码号
{
label: vm.$t('message.product_barCode'),
key: 'barCode',
width: 300,
},
//单号
{
label: vm.$t('message.Scrap_ScrapNo'),
key: 'proMoveCode',
width: 300,
},
//型号编码
{
label: vm.$t('message.ModelCode'),
key: 'materialCode',
width: 300,
},
//型号名称
{
label: vm.$t('message.ModelName'),
key: 'materialDesc',
width: 300,
},
//源库位
{
label: vm.$t('message.SourceLocation'),
key: 'wlFromCode',
width: 300,
},
//目标库位
{
label: vm.$t('message.Warehouse_TargetLocation'),
key: 'wlToCode',
width: 300,
},
// //操作时间
{
label: vm.$t('message.operatingTime'),
key: 'moveTime',
width: 300,
},
];

@ -0,0 +1,104 @@
<template>
<view class="page-receipt-detail">
<view class="header">
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
</view>
<view class="title">{{ $t('message.finishedProductReport') }}</view>
<view class="right"></view>
</view>
<view class="table-wrapper">
<wyb-table class="table" ref="table" width="100%" enable-check="multiple" show-left-and-right-border :headers="headers" :contents="model.materielList" :show-vert-border="false"></wyb-table>
</view>
<view class="bottom-bar">
<div class="extra">
<u-row class="bottom-info">
<u-col :span="12">{{ $t('message.po_Total') }} {{ model.materielList.length }} {{ $t('message.po_Records') }}</u-col>
</u-row>
</div>
</view>
</view>
</template>
<script lang="ts">
import { Component } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import model from './model';
import { headers } from './config';
@Component
export default class RawReceiptDetail extends BasePage {
model = model;
locationCode = '';
headers = headers;
}
</script>
<style lang="scss" scoped>
.page-receipt-detail {
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background-size: 100% 600rpx;
padding: 30rpx;
min-height: 100%;
padding-top: 118rpx;
.header {
position: fixed;
top: 36rpx;
left: 0;
right: 0;
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;
}
}
.table-wrapper {
background-color: #fff;
}
.form {
background-color: #fff;
padding: 40rpx;
border-radius: 10rpx;
}
.bottom-bar {
z-index: 21;
position: fixed;
bottom: 0;
left: 0;
right: 0;
.container {
background: #ffffff;
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
padding: 20rpx;
}
.extra {
background-color: #fff;
margin: 5px;
border-radius: 5px;
padding: 0 10px;
}
}
}
</style>

@ -0,0 +1,417 @@
<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.Scrap') }}</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.InventoryOrderNo') }}</view>
<u-search :placeholder="$t('message.Scrap_Tip')" 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.product_FGCode')">
<jPicker sureColor="#ff0000" style="width: 260rpx" @bindpicker="materialChoice" showKey="value" valKey="value" :val="wl.value" class="search" :options="model.choiceCodeList" />
</u-form-item>
<!-- 成品描述 -->
<u-form-item :label="$t('message.product_FGDes')">
<u-input :disabled="true" v-model="Some.productDescZh" placeholder="" style="overflow: hidden" />
</u-form-item>
<!-- 数量 -->
<u-form-item :label="$t('message.product_Number')">
<u-input :disabled="true" v-model="Some.qty" placeholder="" />
</u-form-item>
<!-- 源库位 -->
<u-form-item :label="$t('message.SourceLocation')">
<u-input :disabled="true" v-model="Some.originWl" placeholder="" />
</u-form-item>
<!-- 目标库位 -->
<!-- <u-form-item :label="$t('message.Warehouse_TargetLocation')" prop="aimWl">
<u-input :disabled="true" v-model="Some.aimWl" placeholder="" />
</u-form-item> -->
<!-- 成本中心 -->
<u-form-item :label="$t('message.product_costCenter')">
<u-input v-model="Some.costCenter" :disabled="true" placeholder="" />
</u-form-item>
<!-- 文件号 -->
<u-form-item :label="$t('message.DocumentNumber')">
<u-input v-model="Some.fileNo" :border="border" :placeholder="$t('message.fileNumber')" />
</u-form-item>
<!-- 责任人 -->
<u-form-item :label="$t('message.personLiable')">
<u-input v-model="dockCode" :placeholder="$t('message.PleaseOne')" :border="border" />
</u-form-item>
<!-- 不良原因 -->
<u-form-item :label="$t('message.CausesOfDefects')">
<u-input v-model="dockName" :placeholder="$t('message.PleaseTwo')" :border="border" />
</u-form-item>
<!-- 已扫 -->
<u-form-item :label="$t('message.product_Swept')">
<u-input :disabled="true" v-model="Some.actualQty" placeholder="" />
</u-form-item>
<!-- 条码 -->
<u-form-item :label="$t('message.product_BarCode')">
<u-search :placeholder="$t('message.barcode')" v-model.trim="form.barcode" @search="scanning" :show-action="false"></u-search>
</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="3">
<u-button type="primary" @click="closure">{{ $t('message.closure') }}</u-button>
</u-col>
<u-col :span="3">
<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: '',
};
dockCode: any = '';
dockName: any = '';
wl: any = {};
Some: any = {};
//
materialChoice(e: any) {
this.wl = e.pickerName;
this.model.recordsList.forEach((item: any) => {
if (item.productCode == e.pickerName.value) {
this.Some = item;
}
});
}
//
async scanning() {
if (!this.form.order3) {
this.customToast(this.$t('message.scrapForm') as string);
}
if (!this.Some) {
this.customToast(this.$t('message.finishedProduct') as string);
}
if (!this.form.barcode) {
this.customToast(this.$t('message.barcode') as string);
return;
}
if (this.Some.actualQty >= this.Some.qty) {
this.customToast(this.$t('message.product_Tip10') as string);
return;
}
let params = {
factoryCode: session.factoryCode,
loginName: session.loginName,
barcode: this.form.barcode,
productCode: this.wl.value,
locCode: this.Some.originWl,
order1: this.form.order3,
};
await this.model.getProductCode(params);
if (this.model.code == '1') {
//this.customToast(this.$t('message.product_Tip8') as string);
uni.showToast({
//icon: 'success',
title: this.$t('message.product_Tip8') as string,
duration: 2000,
image: '/static/icons/icon-51.png',
});
// this.Some.actualQty += 1;
this.onSubmit();
}
if (this.model.code == '2') {
uni.showModal({
content: this.$t('message.sweep') as string,
confirmText: this.$t('message.workArea_Confirm') as string,
cancelText: this.$t('message.product_Cancel') as string,
success: async (res) => {
if (res.confirm) {
let params = {
barCode: this.form.barcode,
orderType: '1',
factoryCode: session.factoryCode,
loginName: session.loginName,
order3: this.form.order3,
};
await this.model.codeDel(params);
if (this.model.delCode == '1') {
this.customToast(this.$t('message.success') as string);
this.form.barcode = '';
}
} else if (res.cancel) {
this.form.barcode = '';
return;
}
},
});
}
}
// onReadyonLoad
onReady() {
this.model.orderInInfo.productDescZh = '';
this.model.orderInInfo.productCode = '';
this.model.orderInInfo.qty = '';
this.model.orderInInfo.locCode = '';
this.model.orderInInfo.costCenter = '';
this.model.choiceCodeList.length = 0;
}
//
async query() {
if (!this.form.order3) {
this.customToast(this.$t('message.Commission_tips1') as string);
return;
}
let param = {
factoryCode: session.factoryCode,
loginName: session.loginName,
order3: this.form.order3,
orderType: 'BF',
orderSourceSys: 'FG',
page: '1',
rows: '50',
};
await this.model.queryScrapInfoFg(param);
if (this.model.code == '1') {
//this.customToast(this.$t('message.product_Tip8') as string);
this.model.recordsList.forEach((item: any) => {
item.fileNo = ' ';
});
this.wl.value = this.model.choiceCodeList[0].value;
this.Some = this.model.recordsList[0];
}
}
//
async onSubmit() {
if (!this.Some.fileNo) {
this.customToast(this.$t('message.fileNumber') as string);
return;
}
const orderlist = [
{
...this.model.orderInInfo,
originWl: this.Some.originWl,
barCode: this.form.barcode,
aimWl: this.Some.aimWl,
type: '0',
orderType: '1',
dockCode: this.dockCode,
dockName: this.dockName,
keepBy: session.loginName as string,
factoryCode: session.factoryCode as string,
order3: this.form.order3,
costCenter: this.Some.costCenter,
fileNo: this.Some.fileNo,
},
];
await this.model.scrapConfirmFg(orderlist);
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.Some.fileNo = ' ';
this.wl = {};
this.dockCode = '';
this.dockName = '';
// this.form.order3 = '';
this.form.barcode = '';
this.query();
}
}
//
async closure() {
if (!this.form.order3) {
this.customToast(this.$t('message.Commission_tips1') as string);
return;
}
if (this.Some.actualQty == this.Some.qty) {
//this.customToast(this.$t('message.Commission_tips8') as string);
uni.showModal({
content: this.$t('message.Commission_tips8') as string,
confirmText: this.$t('message.workArea_Confirm') as string,
cancelText: this.$t('message.Cancel') as string,
success: (res: any) => {
if (res.confirm) {
model.close(this.form.order3);
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.Some.fileNo = ' ';
this.wl = {};
this.form.order3 = '';
this.form.barcode = '';
}
} else if (res.cancel) {
return;
}
},
});
return;
}
await this.model.close(this.form.order3);
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.Some.fileNo = ' ';
// this.wl = {};
// this.form.order3 = '';
// this.form.barcode = '';
}
}
//
async bill() {
if (!this.form.order3) {
this.customToast(this.$t('message.Commission_tips1') as string);
return;
}
await this.model.queryDetailed(this.form.order3);
this.toPage(this.page.product.warehouse.wholeScrap.stoOutboundDetail);
}
}
</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: 30rpx;
display: flex;
align-items: center;
}
}
.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>

@ -0,0 +1,201 @@
import { Action, 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';
// import { page } from '@/utils/page';
class OrderInInfo {
productDescZh?: string;
qty?: string;
custCode?: string;
custCodeName?: string;
productCode?: string;
locCode?: string;
barcode?: string;
costCenter?: string;
}
@Module({
namespaced: true,
dynamic: true,
store,
name: 'product.warehouse.wholeScrap',
})
export class wholeScrap extends VuexModule {
/**
*
*/
WlList = [];
code: any = '';
delCode: any = '';
recordsList: any = [];
choiceCodeList: any = [];
materielList: any = [];
/**
*
*/
// modelType = [
// { label: '内销', value: '0' },
// { label: '外销', value: '1' },
// { label: '样机', value: '2' },
// { label: '半成品', value: '4' },
// ];
/**
*
*/
dnNo = '';
/**
*
*/
orderInInfo: OrderInInfo = new OrderInInfo();
// /**
// * 更新看单明细库位
// * @param kw 库位
// */
// @Mutation
// updateOrderInInfoListKw(kw: string) {
// this.orderInInfoList = this.orderInInfoList.map((item) => {
// item.kw = kw;
// return item;
// });
// }
/**
*
*/
@MutationAction
async queryLocationFgScrap() {
const result: any = await http.get(url.warehouse.wholeTransfer.list, {
params: {
// factoryCode: '1999',
factoryCode: session.factoryCode,
loginName: session.loginName,
// loginName: '1999',
},
});
// console.log('库位数据',result)
const WlList = result.data.map((_: any) => ({
label: _.locationCode,
value: _.locationCode,
}));
return { WlList };
}
/**
*
* DN
* @param dnNo
*/
@MutationAction
async getProductCode(params: any) {
const res: any = await http.post(url.warehouse.wholeTransfer.content, params);
const orderInInfo = res.data.records[0];
const code = res.code;
return { code, orderInInfo };
}
//退扫
@MutationAction
async codeDel(params: any) {
const res: any = await http.post(url.warehouse.wholeTransfer.del, params);
const delCode = res.code;
return { delCode };
}
@MutationAction
async scrapConfirmFg(list: any) {
const records: any = await http.post(url.warehouse.manualOrder.confirmFg, list);
const code = records.code;
return { code };
}
/**
*
* DN
* @param dnNo
*/
@MutationAction
async queryDetailed(proMoveCode: any) {
const { code, data } = await http.post(url.warehouse.rowTransfer.queryListByMoveCode, {
proMoveCode,
factoryCode: session.factoryCode as string,
loginName: session.loginName as string,
});
const materielList = data;
return { materielList, code };
}
/**
*
* DN
* @param dnNo
*/
@MutationAction
async close(proMoveCode: any) {
const { code } = await http.post(url.warehouse.rowTransfer.close, {
factoryCode: session.factoryCode as string,
loginName: session.loginName as string,
proMoveCode,
});
//const materielList = data;
return { code };
}
@MutationAction
async queryScrapInfoFg(param: any) {
const res: any = await http.post(url.warehouse.manualOrder.list, param);
const code = res.code;
console.log('res', res);
const recordsList = res.data.records;
const choiceCodeList = [];
recordsList.forEach((item: any) => {
const arr: any = {};
arr.label = item.productCode;
arr.value = item.productCode;
choiceCodeList.push(arr);
});
console.log('choiceCodeList', choiceCodeList);
return { code, recordsList, choiceCodeList };
}
// /**
// * 提交看单明细
// */
// @MutationAction
// async submitOrderInEnter() {
// const list = (this.state as any).orderInInfoList.map((item: any) => {
// item.orderStatus = item.checked ? '2' : '1';
// item.requestAmount = item.checked ? item.y : '0';
// return item;
// });
// const result: any = await http.post(url.material.DNorderin.enter, {
// dnNo: this.dnNo,
// factoryCode: '1999',
// loginName: '1999',
// list,
// });
// uni.showToast({
// icon: 'none',
// title: result.msg,
// });
// const orderInInfoList = result.list.sort(
// (a: any, b: any) => Number(a.accountingStatus) - Number(b.accountingStatus),
// );
// return { orderInInfoList };
// }
/**
*
*/
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
async changeOrderInLocation(kw: string) {
await http.post('/wmspda/material/orderin/enter', {
loginName: session.loginName,
// loginName: '1999',
warehouseCode: '',
factoryCode: session.factoryCode,
// factoryCode: '1999',
locationCode: kw,
});
return kw;
}
}
export default getModule(wholeScrap);

@ -0,0 +1,128 @@
<template>
<view class="page-receipt-detail">
<view class="header">
<view class="left">
<u-icon class="icon" name="arrow-left" @click="go" />
</view>
<view class="title">{{ $t('message.Pi_QueryResults') }}</view>
<view class="right"></view>
</view>
<u-form class="form" ref="form" style="padding-left: 30px" label-width="180rpx">
<u-form-item :label="$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.Query') }}</u-button>
</u-form-item>
</u-form>
<view class="table-wrapper">
<wyb-table class="table" ref="table" width="100%" show-left-and-right-border :headers="headers" :contents="detailedList" :show-vert-border="false"></wyb-table>
</view>
</view>
</template>
<script lang="ts">
import { Component } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import { Headers } from './config';
import model from './model';
import { session } from '@/store/modules/session';
@Component
export default class RawReceiptDetail extends BasePage {
model = model;
headers = Headers;
detailedList: any = [];
userDefined4: any = '';
async onReady() {
this.userDefined4 = JSON.parse(uni.getStorageSync('userDefined4'));
await this.generate();
}
async generate() {
if (this.userDefined4 == ' ' || this.userDefined4.length == 0) {
this.customToast(this.$t('message._tips6') as any);
return;
}
let content = {
loginName: session.loginName,
factoryCode: session.factoryCode,
// cpRef4: model.userDefined,
proMoveCode: this.userDefined4,
};
await this.model.querydetaildlist(content);
let arr = this.model.detailedList;
arr.forEach((item: any) => {
if (item.oiType == 10 || item.oiType == '10') {
item.oiType = this.$t('message.enter');
} else {
item.oiType = this.$t('message.Out');
}
});
this.detailedList = arr;
}
go() {
this.redirectTo(this.page.product.warehouse.wholeTransfer.index);
}
}
</script>
<style lang="scss" scoped>
.page-receipt-detail {
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background-size: 100% 600rpx;
padding: 30rpx;
min-height: 100%;
padding-top: 118rpx;
padding-bottom: 162rpx;
.header {
position: fixed;
top: 36rpx;
left: 0;
right: 0;
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;
.Transfer {
width: 180rpx;
height: 64rpx;
background: rgb(242, 242, 242);
border-radius: 110rpx;
}
}
}
.table-wrapper {
background-color: #fff;
}
.form {
background-color: #fff;
// padding: 40rpx;
border-radius: 10rpx;
}
}
</style>

@ -0,0 +1,214 @@
/**
*
*/
import vm from '@/main';
export const headers = [
{
label: vm.$t('message.Pi_OrderNo'),
key: 'prdOrder',
width: 550,
},
];
/**
*
*/
export const resultHeaders = [
{
label: vm.$t('message.po_MaterielNo'),
key: 'materialCode',
width: 220,
},
{
label: vm.$t('message.po_DemandQuantity'),
key: 'amount',
},
{
label: vm.$t('message.Pi_CumulativePickingQuantity'),
key: 'totalMoAmount',
width: 300,
},
{
label: vm.$t('message.Pi_HandoverQuantity'),
key: 'totalHvAmount',
},
{
label: vm.$t('message.Pi_factory'),
key: 'sapFactoryCode',
},
{
label: vm.$t('message.Pi_Station'),
key: 'sendSpot',
},
{
label: vm.$t('message.po_MaterielDes'),
key: 'materialDesc',
width: 350,
},
{
label: 'MRP',
key: 'mrpCode',
},
{
label: vm.$t('message.Pi_unit'),
key: 'unit',
},
{
label: vm.$t('message.Pi_OrderNo'),
key: 'prdOrder',
},
{
label: vm.$t('message.Pi_FinishedProductModel'),
key: 'prdMaterialDesc',
width: 300,
},
{
label: vm.$t('message.po_Location'),
key: 'wkposCode',
},
];
/**
*
*/
export const summaryHeaders = [
{
label: vm.$t('message.po_MaterielNo'),
key: 'materialCode',
width: 220,
},
{
label: vm.$t('message.po_DemandQuantity'),
key: 'amount',
},
{
label: vm.$t('message.Pi_CurrentPickingQuantity'),
key: 'currentAmount',
width: 300,
},
{
label: vm.$t('message.Pi_PickedQuantity'),
key: 'totalMoAmount',
},
{
label: vm.$t('message.Pi_QuantityHandedOver'),
key: 'totalHvAmount',
},
{
label: vm.$t('message.po_Location'),
// key: 'currentWkposCode',
key: 'wkposCode',
},
{
label: vm.$t('message.po_MaterielDes'),
key: 'materialDesc',
width: 350,
},
{
label: vm.$t('message.Pi_unit'),
key: 'unit',
},
// {
// label: '成品型号',
// key: 'prdMaterialDesc',
// width: 300,
// },
// {
// label: '工位',
// key: 'sendSpot',
// },
// {
// label: '工厂',
// key: 'sapFactoryCode',
// },
];
/**
*
*/
export const orderHeaders = [
{
label: vm.$t('message.po_MaterielNo'),
key: 'materialCode',
width: 220,
},
{
label: vm.$t('message.po_DemandQuantity'),
key: 'amount',
},
{
label: vm.$t('message.Pi_CurrentPickingQuantity'),
key: 'currentAmount',
width: 300,
},
{
label: vm.$t('message.Pi_PickedQuantity'),
key: 'totalMoAmount',
},
{
label: vm.$t('message.Pi_QuantityHandedOver'),
key: 'totalHvAmount',
},
{
label: vm.$t('message.po_Location'),
// key: 'currentWkposCode',
key: 'wkposCode',
},
{
label: vm.$t('message.po_MaterielDes'),
key: 'materialDesc',
width: 350,
},
{
label: vm.$t('message.Pi_unit'),
key: 'unit',
},
{
label: vm.$t('message.Pi_FinishedProductModel'),
key: 'prdMaterialDesc',
width: 300,
},
{
label: vm.$t('message.Pi_factory'),
key: 'sapFactoryCode',
},
{
label: vm.$t('message.Pi_Station'),
key: 'sendSpot',
},
{
label: vm.$t('message.Pi_OrderNo'),
key: 'prdOrder',
},
];
export const Headers = [
{
label: vm.$t('message.product_barCode'),
key: 'barCode', //条码
width: 220,
},
{
label: vm.$t('message.transfer_barcode'),
key: 'proMoveCode', //移库批次
},
{
label: vm.$t('message.Product_code'),
key: 'materialCode', //产品编码
width: 300,
},
// {
// label: vm.$t('message.Access_type'),
// key: 'oiType', //出入类型
// },
//源库位
{
label: vm.$t('message.SourceLocation'),
key: 'wlFromCode',
width: 300,
},
{
label: vm.$t('message.Warehouse_TargetLocation'),
key: 'wlToCode', //库位
},
];

@ -0,0 +1,369 @@
<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({})" />
</view>
<view class="title">{{ $t('message.Relocation') }}</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.Transfer') }}</view>
<u-search :placeholder="$t('message.barcode')" class="Transfer" v-model.trim="userDefined4" @search="QueryHistory" :show-action="false"></u-search>
</view>
<view class="single-right">
<u-button type="primary" style="height: 60rpx; width: 140rpx" @click="generate">{{ $t('message.generate') }}</u-button>
</view>
</view>
<!-- 总数 -->
<u-form-item :label="$t('message.Warehouse_TotalNumber')">
<u-input :disabled="true" v-model="allNum" placeholder="" />
</u-form-item>
<!-- 已扫 -->
<!-- <u-form-item :label="$t('message.product_Swept')">
<u-input :disabled="true" v-model="model.orderInInfo.actualQty" placeholder="" />
</u-form-item> -->
<!-- 成品编码 -->
<u-form-item :label="$t('message.product_FGCode')">
<!-- <u-input :disabled="true" v-model="model.orderInInfo.productCode" placeholder="" /> -->
<jPicker sureColor="#ff0000" @bindpicker="selectItem" showKey="value" valKey="value" :val="remove.value" :options="model.removeMaterialList" />
</u-form-item>
<!-- 成品描述 -->
<u-form-item :label="$t('message.product_FGDes')">
<u-input :disabled="true" v-model="histroyItem.materialDesc" placeholder="" style="overflow: hidden" />
</u-form-item>
<!-- 数量 -->
<u-form-item :label="$t('message.product_Number')">
<u-input :disabled="true" v-model="histroyItem.proNum" placeholder="" />
</u-form-item>
<!-- 条码 -->
<u-form-item :required="true" :label="$t('message.product_barCode')" prop="productCode">
<u-search :placeholder="$t('message.po_PleaseInput')" v-model.trim="form.productCode" @search="query" :show-action="false"></u-search>
</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.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-col>
<!-- 确定 -->
<u-col :span="4">
<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-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';
interface OptionType {
label: string;
value: string;
}
@Component({
components: {
jPicker,
},
})
export default class productCheckReceipt extends BasePage {
//
@Ref('form') readonly $form!: VForm;
model = model;
form = {
aimWl: {} as OptionType,
productCode: '',
};
remove: any = {};
allNum = 0;
userDefined4: any = '';
histroyItem: any = {};
aimWlSelect = false;
cboPlaceSelect = false;
rules: VFormRules<any> = {
documentNo: [{ required: true, message: this.$t('message.Warehouse_Tip1') 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;
//
bookTypeChange(e: any) {
this.form.aimWl = e.pickerName;
}
selectItem(e: any) {
this.remove = e.pickerName;
this.model.removeList.forEach((item: any) => {
if (item.materialCode == this.remove.value) {
this.histroyItem = item;
console.log('this.histroyItem', this.histroyItem);
}
});
}
//
async query() {
if (this.form.productCode == ' ' || this.form.productCode.length == 0) {
this.customToast(this.$t('message.product_unit7') as string);
return;
}
if (this.userDefined4 == '' || this.userDefined4.length == 0) {
this.customToast(this.$t('message.Warehouse_Tip') as string);
return;
}
let params = {
barcode: this.form.productCode,
order1: this.userDefined4,
factoryCode: session.factoryCode,
loginName: session.loginName,
};
await model.getProductCode(params);
if (this.model.code == '1') {
uni.showToast({
//icon: 'success',
title: this.$t('message.successful') as string,
duration: 2000,
image: '/static/icons/icon-51.png',
});
}
if (this.model.code == '2') {
uni.showModal({
content: this.$t('message.sweep') as string,
confirmText: this.$t('message.workArea_Confirm') as string,
cancelText: this.$t('message.product_Cancel') as string,
success: async (res) => {
if (res.confirm) {
let params = {
barCode: this.form.productCode,
orderType: '0',
order3: this.userDefined4,
factoryCode: session.factoryCode,
loginName: session.loginName,
};
await this.model.codeDel(params);
if (this.model.delCode == '1') {
this.customToast(this.$t('message.success') as string);
this.form.productCode = '';
}
} else if (res.cancel) {
this.form.productCode = '';
return;
}
},
});
}
}
//
async QueryHistory() {
if (this.userDefined4 == ' ' || this.userDefined4.length == 0) {
this.customToast(this.$t('message.barcode') as string);
return;
}
this.allNum = 0;
let params = {
loginName: session.loginName,
factoryCode: session.factoryCode,
proMoveCode: this.userDefined4,
};
await this.model.QueryHistory(params);
this.model.removeList.forEach((item: any) => {
this.allNum += parseFloat(item.proNum);
});
if (this.model.removeMaterialList.length == 0) {
this.remove = {};
this.histroyItem.proNum = 0;
this.histroyItem.materialDesc = '';
console.log('11111111111111111');
console.log('this.histroyItem', this.histroyItem);
} else {
this.remove = this.model.removeMaterialList[0];
this.model.removeList.forEach((item: any) => {
if (item.materialCode == this.remove.value) {
this.histroyItem = item;
}
});
}
}
//
async onReady() {
this.$form.setRules(this.rules);
this.model.empty();
await this.model.queryLocationFgTransfer();
this.form.aimWl = this.model.WlList[0];
this.userDefined4 = JSON.parse(uni.getStorageSync('userDefined4'));
uni.removeStorageSync('userDefined4');
}
//
async generate() {
await this.model.getTransferNo({
loginName: session.loginName,
});
this.userDefined4 = model.userDefined;
}
//
async bill() {
uni.setStorageSync('userDefined4', JSON.stringify(this.userDefined4));
this.redirectTo(this.page.product.warehouse.wholeTransfer.Local);
}
//
onSubmit() {
this.$form.validate(async (valid: boolean) => {
if (!valid) return;
if (this.userDefined4 == ' ' || this.userDefined4.length == 0) {
this.customToast(this.$t('message.LibraryCode') as string);
return;
}
if (!this.form.productCode) {
this.customToast(this.$t('message.Warehouse_Tip5') as string);
return;
}
if (!this.form.aimWl.value) {
this.customToast(this.$t('message.Warehouse_Tip3') as string);
return;
}
if (this.form.aimWl.value == model.orderInInfo.locCode) {
this.customToast(this.$t('message.TargetLocation') as string);
return;
}
const orderlist = [
{
...this.model.orderInInfo,
originWl: this.model.orderInInfo.locCode,
barCode: this.model.orderInInfo.barcode,
aimWl: this.form.aimWl.value,
type: '0',
orderType: '0',
keepBy: session.loginName as string,
factoryCode: session.factoryCode as string,
userDefined4: this.userDefined4,
},
];
await this.model.transferConfirmFg(orderlist);
if (model.code == '1') {
this.customToast(this.$t('message.Warehouse_Tip9') as string);
// this.form.productCode = '';
this.model.empty();
// this.query()
this.form.productCode = '';
this.allNum = 0;
this.QueryHistory();
// setTimeout(() => {
// this.$forceUpdate();
// }, 2000);
}
});
}
}
</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;
.Transfer {
width: 280rpx;
height: 64rpx;
background: rgb(242, 242, 242);
border-radius: 110rpx;
}
}
.single {
width: 100%;
height: 100rpx;
display: flex;
.single-left {
width: 80%;
height: 100%;
display: flex;
view {
width: 170rpx;
height: 100%;
line-height: 30rpx;
display: flex;
align-items: center;
}
}
.single-right {
button {
margin-top: 15rpx;
width: 140rpx;
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;
}
.button-bar {
}
}
</style>

@ -0,0 +1,202 @@
import { Action, 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';
import vm from '@/main';
// import { page } from '@/utils/page';
class OrderInInfo {
productDescZh?: string;
qty?: string;
custCode?: string;
custCodeName?: string;
productCode?: string;
locCode?: string;
barcode?: string;
// actualQty?: string;
}
@Module({
namespaced: true,
dynamic: true,
store,
name: 'product.warehouse.wholeTransfer',
})
export class wholeTransfer extends VuexModule {
/**
*
*/
WlList = [];
userDefined: any = '';
detailedList: any;
code = '';
delCode = '';
removeList: any = [];
removeMaterialList: any = [];
/**
*
*/
// modelType = [
// { label: '内销', value: '0' },
// { label: '外销', value: '1' },
// { label: '样机', value: '2' },
// { label: '半成品', value: '4' },
// ];
/**
*
*/
dnNo = '';
/**
*
*/
orderInInfo: OrderInInfo = new OrderInInfo();
// /**
// * 更新看单明细库位
// * @param kw 库位
// */
// @Mutation
// updateOrderInInfoListKw(kw: string) {
// this.orderInInfoList = this.orderInInfoList.map((item) => {
// item.kw = kw;
// return item;
// });
// }
/**
*
*/
@MutationAction
async queryLocationFgTransfer() {
const result: any = await http.get(url.warehouse.wholeTransfer.list, {
params: {
factoryCode: session.factoryCode,
loginName: session.loginName,
},
});
console.log('库位数据', result);
const WlList = result.data.map((_: any) => ({
label: _.locationCode,
value: _.locationCode,
}));
return { WlList };
}
/**
*
* DN
* @param dnNo
*/
@MutationAction
async getProductCode(params: any) {
const res: any = await http.post(url.warehouse.wholeTransfer.content, params);
const code = res.code;
const orderInInfo = res.data.records[0];
if (orderInInfo.custCode == '0') {
orderInInfo.custCodeName = vm.$t('message.Warehouse_NX') as any;
} else if (orderInInfo.custCode == '1') {
orderInInfo.custCodeName = vm.$t('message.Warehouse_WX') as any;
} else if (orderInInfo.custCode == '2') {
orderInInfo.custCodeName = vm.$t('message.Warehouse_YJ') as any;
} else if (orderInInfo.custCode == '4') {
orderInInfo.custCodeName = vm.$t('message.Warehouse_BCP') as any;
}
return { orderInInfo, code };
}
//退扫
@MutationAction
async codeDel(params: any) {
const res: any = await http.post(url.warehouse.wholeTransfer.del, params);
const delCode = res.code;
return { delCode };
}
//清除数据
@MutationAction
async empty() {
const orderInInfo: any = [];
// const userDefined = '';
// const WlList = [];
const code = '';
return { orderInInfo, code };
}
@MutationAction
async transferConfirmFg(list: any) {
const records: any = await http.post(url.warehouse.manualOrder.confirmFg, list);
const code = records.code;
return { code };
}
//生成移库码
@MutationAction
async getTransferNo(loginName: any) {
const res: any = await http.post(url.warehouse.rowTransfer.getCode, loginName);
const userDefined: any = res.data;
return { userDefined };
}
//查询已扫物料
@MutationAction
async QueryHistory(params: any = {}) {
const res: any = await http.post(url.warehouse.rowTransfer.queryGroupLis, params);
const removeList: any = res.data;
const removeMaterialList: any = [];
res.data.forEach((item: any) => {
const arr: any = {
value: item.materialCode,
laber: item.materialCode,
};
removeMaterialList.push(arr);
});
return { removeList, removeMaterialList };
}
//查询明细
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
async querydetaildlist(content: any) {
const res: any = await http.post('/wmspda/fg/queryListByMoveCode', content);
console.log('明细》》》》》》》》》', res.list);
this.detailedList = res.data;
return res;
}
// /**
// * 提交看单明细
// */
// @MutationAction
// async submitOrderInEnter() {
// const list = (this.state as any).orderInInfoList.map((item: any) => {
// item.orderStatus = item.checked ? '2' : '1';
// item.requestAmount = item.checked ? item.y : '0';
// return item;
// });
// const result: any = await http.post(url.material.DNorderin.enter, {
// dnNo: this.dnNo,
// factoryCode: '1999',
// loginName: '1999',
// list,
// });
// uni.showToast({
// icon: 'none',
// title: result.msg,
// });
// const orderInInfoList = result.list.sort(
// (a: any, b: any) => Number(a.accountingStatus) - Number(b.accountingStatus),
// );
// return { orderInInfoList };
// }
/**
*
*/
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
async changeOrderInLocation(kw: string) {
await http.post('/wmspda/material/orderin/enter', {
loginName: session.loginName,
// loginName: '1999',
warehouseCode: '',
factoryCode: session.factoryCode,
// factoryCode: '1999',
locationCode: kw,
});
return kw;
}
}
export default getModule(wholeTransfer);

@ -0,0 +1,45 @@
/**
*
*/
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.product_costCenter'),
key: 'costCenter',
},
// {
// label: '库存地点',
// key: 'wkposCode',
// },
// {
// label: '校验状态',
// key: 'checkResult',
// },
// {
// label: '看单号',
// key: 'kdOrderNo',
// },
];

@ -0,0 +1,163 @@
<template>
<view class="page-kan-dan-detail">
<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.borrow_CollectionAndBorrowingDetails') }}</view>
<view class="right"></view>
</view>
<wyb-table class="table" ref="table" width="100%" enable-check="multiple" show-left-and-right-border :headers="headers" :contents="model.orderInInfoList" :show-vert-border="false" />
<view class="bottom-bar">
<!-- <view class="extra">
<u-row>
<u-col :span="2"> 看单号: </u-col>
<u-col :span="8">
<u-input v-model="order3" @confirm="onKdOrderNoConfirm" placeholder="看单号" />
</u-col>
</u-row>
<u-row>
<u-col :span="2"> 接收人 </u-col>
<u-col :span="3">
<u-input v-model="receiverName" @confirm="onReceiverNameConfirm" placeholder="接收人" />
</u-col>
<u-col :span="2"> 口令 </u-col>
<u-col :span="3">
<u-input v-model="operatorPass" placeholder="口令" />
</u-col>
</u-row>
</view> -->
<view class="container">
<u-row>
<u-col :span="6">
<u-button type="primary" @click="Confirm">{{ $t('message.dn_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>
</view>
</template>
<script lang="ts">
import { Component } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import model from './model';
import { session } from '@/store/modules/session';
// import { order, OrderDetail } from '@/pages/raw/warehouse/transfer/model';
// import { auth } from '@/store/modules/auth';
// import { pick, omit, cloneDeep } from 'lodash/fp';
import { headers } from './config';
@Component
export default class KanDanHandOverDetails extends BasePage {
order = '';
headers = headers;
/**
* 页面Module
*/
model = model;
async Confirm() {
const orderlist: any = [];
this.model.orderInInfoList.forEach((item: any) => {
if (item.checked) {
orderlist.push(item);
}
});
if (orderlist.length == 0) {
this.customToast(this.$t('message.Pi_tip18') as string);
return;
}
orderlist.forEach((item: any) => {
item.type = '1';
item.keepBy = session.loginName;
item.orderType = '2';
});
await model.consumingConfirmRaw(orderlist);
setTimeout(() => {
uni.navigateBack({ delta: 1 });
}, 2000);
}
}
</script>
<style lang="scss" scoped>
.page-kan-dan-detail {
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 {
z-index: 21;
position: fixed;
bottom: 0;
left: 0;
right: 0;
.container {
background: #ffffff;
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
padding: 20rpx;
}
.extra {
background-color: #fff;
margin: 5px;
border-radius: 5px;
padding: 0 10px;
}
.bottom-info {
.u-form-item {
padding: 0;
}
}
}
}
</style>

@ -0,0 +1,249 @@
<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.RowCollectionAndBorrowing') }}</view>
<view class="right"></view>
</view>
<u-form class="form" label-width="130rpx">
<!-- 单号 -->
<view class="single">
<view class="single-left">
<view>{{ $t('message.CommissionedSingleNumber') }}</view>
<u-search :placeholder="$t('message.Commission_tips1')" v-model.trim="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.po_MaterielNo')">
<jPicker sureColor="#ff0000" style="width: 260rpx" @bindpicker="materialChoice" showKey="value" valKey="value" :val="wl.value" class="search" :options="MaterialList" />
</u-form-item>
<!-- 物料描述 -->
<u-form-item :label="$t('message.po_MaterielDes')">
<u-input :disabled="true" v-model="Some.productDescZh" placeholder="" style="overflow: hidden" />
</u-form-item>
<!-- 数量 -->
<u-form-item :label="$t('message.Summary_Number')">
<u-input v-model="Some.qty" placeholder="" type="number" disabled />
</u-form-item>
<!-- 原库位 -->
<u-form-item :label="$t('message.Warehouse_OriginalLocation')">
<u-input :disabled="true" v-model="Some.originWl" placeholder="" />
</u-form-item>
<!-- 成本中心 -->
<u-form-item :label="$t('message.product_costCenter')">
<u-input v-model="Some.costCenter" placeholder="" />
</u-form-item>
<!-- GL account -->
<u-form-item label="GL account">
<u-input v-model="Some.cpRef5" placeholder="" />
</u-form-item>
<!-- 文件号 -->
<!-- <u-form-item :label="$t('message.DocumentNumber')">
<u-input v-model="Some.fileNo" placeholder="" />
</u-form-item> -->
<u-row class="button-bar">
<u-col :span="6">
<u-button type="error" @click="uni.navigateBack({})">{{ $t('message.po_Return') }}</u-button>
</u-col>
<u-col :span="6">
<u-button type="primary" @click="submit">{{ $t('message.InventoryFinish') }} </u-button></u-col
>
</u-row>
</u-form>
</view>
</template>
<script lang="ts">
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 {
//
order3 = '';
model = model;
wl: any = {};
Some: any = {};
MaterialList: any = [];
//
async query() {
if (this.order3 === '') {
this.customToast(this.$t('message.Commission_tips1') as string);
return;
} else {
await this.model.queryConsumingInfoRaw({
order3: this.order3,
});
if (this.model.code == '1') {
uni.showToast({
//icon: 'success',
title: this.$t('message.successful') as string,
duration: 2000,
image: '/static/icons/icon-51.png',
});
this.model.orderInInfoList.forEach((item: any) => {
//item.fileNo = '';
let arr: any = {
label: item.productCode,
value: item.productCode,
};
this.MaterialList.push(arr);
});
this.Some = this.model.orderInInfoList[0];
this.wl = this.MaterialList[0];
}
}
}
//
materialChoice(e: any) {
this.wl = e.pickerName;
this.model.orderInInfoList.forEach((item: any) => {
if (item.productCode == e.pickerName.value) {
this.Some = item;
}
});
}
//
async submit() {
if (this.order3 === '') {
this.customToast(this.$t('message.Commission_tips1') as string);
return;
}
if (!this.Some) {
this.customToast(this.$t('message.Warehouse_Tip5') as string);
return;
}
// if (this.Some.fileNo == '' || this.Some.fileNo == null || this.Some.fileNo == undefined) {
// this.customToast(this.$t('message.fileNumber') as string);
// return;
// }
let orderlist = [];
this.Some.type = '1';
this.Some.keepBy = session.loginName;
this.Some.orderType = '2';
orderlist.push(this.Some);
await model.consumingConfirmRaw(orderlist);
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.Some.fileNo = ' ';
this.wl = {};
this.MaterialList = [];
this.query();
}
}
}
</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: 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 {
// line-height: 35rpx;
// background-color: #f7f6fb;
// padding: 10rpx 30rpx;
// border-radius: 8rpx;
// &:after {
// border-bottom-width: 0;
// }
// }
.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;
}
}
}
.title {
margin-bottom: 40rpx;
color: #1a1a1a;
font-size: 30rpx;
font-weight: 500;
}
.button-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,80 @@
import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators';
import store from '@/store';
import http from '@/utils/request';
import { url } from '@/utils/url';
// import { page } from '@/utils/page'
import { session } from '@/store/modules/session';
import vm from '@/main';
class OrderInInfo {
checked?: boolean;
poNo?: string;
kw?: string;
userDefined10?: string;
orderStatus?: string;
}
@Module({
namespaced: true,
dynamic: true,
store,
name: 'raw.warehouse.rowCollect',
})
export class rowCollect extends VuexModule {
/**
* sap
*/
cboPlaceList = [];
/**
*
*/
poNo = '';
/**
*
*/
orderInInfo: OrderInInfo = new OrderInInfo();
/**
*
*/
orderInInfoList: OrderInInfo[] = [];
code: any = '';
/**
*
*/
// orderInInfoListEx: OrderInInfo[] = [];
/**
// * 查询看单号
* @param poNo
*/
@MutationAction
async queryConsumingInfoRaw(order3: any) {
try {
const records: any = await http.post(url.warehouse.manualOrder.list, {
...order3,
orderType: 'LY',
orderSourceSys: 'RAW',
page: 1,
rows: 50,
factoryCode: session.factoryCode,
loginName: session.loginName,
});
const orderInInfoList = records.data.records;
const code = records.code;
console.log('获取来的数据', orderInInfoList);
return { orderInInfoList, code };
} catch {
//uni.showToast({ icon: 'none', title: vm.$t('message.Warehouse_Tip11') as any });
vm.customToast(vm.$t('message.Warehouse_Tip11') as any);
}
}
@MutationAction
async consumingConfirmRaw(list: any) {
const records: any = await http.post(url.warehouse.manualOrder.confirmRaw, list);
const code = records.code;
return { code };
}
}
export default getModule(rowCollect);

@ -0,0 +1,53 @@
/**
*
*/
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',
},
{
label: vm.$t('message.product_costCenter'),
key: 'costCenter',
},
{
label: vm.$t('message.DocumentNumber'),
key: 'fileNo',
},
// {
// label: '库存地点',
// key: 'wkposCode',
// },
// {
// label: '校验状态',
// key: 'checkResult',
// },
// {
// label: '看单号',
// key: 'kdOrderNo',
// },
];

@ -0,0 +1,163 @@
<template>
<view class="page-kan-dan-detail">
<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.Scrap_ScrapDetails') }}</view>
<view class="right"></view>
</view>
<wyb-table class="table" ref="table" width="100%" enable-check="multiple" show-left-and-right-border :headers="headers" :contents="model.orderInInfoList" :show-vert-border="false" />
<view class="bottom-bar">
<!-- <view class="extra">
<u-row>
<u-col :span="2"> 看单号: </u-col>
<u-col :span="8">
<u-input v-model="order3" @confirm="onKdOrderNoConfirm" placeholder="看单号" />
</u-col>
</u-row>
<u-row>
<u-col :span="2"> 接收人 </u-col>
<u-col :span="3">
<u-input v-model="receiverName" @confirm="onReceiverNameConfirm" placeholder="接收人" />
</u-col>
<u-col :span="2"> 口令 </u-col>
<u-col :span="3">
<u-input v-model="operatorPass" placeholder="口令" />
</u-col>
</u-row>
</view> -->
<view class="container">
<u-row>
<u-col :span="6">
<u-button type="primary" @click="Confirm">{{ $t('message.dn_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>
</view>
</template>
<script lang="ts">
import { Component } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import model from './model';
// import { auth } from '@/store/modules/auth';
// import { pick, omit, cloneDeep } from 'lodash/fp';
import { headers } from './config';
import { session } from '@/store/modules/session';
@Component
export default class KanDanHandOverDetails extends BasePage {
order = '';
headers = headers;
/**
* 页面Module
*/
model = model;
async Confirm() {
const orderlist: any = [];
this.model.orderInInfoList.forEach((item: any) => {
if (item.checked) {
orderlist.push(item);
}
});
if (orderlist.length == 0) {
this.customToast(this.$t('message.Pi_tip18') as string);
return;
}
orderlist.forEach((item: any) => {
item.type = '1';
item.keepBy = session.loginName;
item.orderType = '1';
});
await model.scrapConfirmRaw(orderlist);
// uni.navigateBack({ delta: 1 });
setTimeout(() => {
uni.navigateBack({ delta: 1 });
}, 2000);
}
}
</script>
<style lang="scss" scoped>
.page-kan-dan-detail {
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 {
z-index: 21;
position: fixed;
bottom: 0;
left: 0;
right: 0;
.container {
background: #ffffff;
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
padding: 20rpx;
}
.extra {
background-color: #fff;
margin: 5px;
border-radius: 5px;
padding: 0 10px;
}
.bottom-info {
.u-form-item {
padding: 0;
}
}
}
}
</style>

@ -0,0 +1,250 @@
<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.RowScrap') }}</view>
<view class="right"></view>
</view>
<u-form class="form" label-width="130rpx">
<!-- 单号 -->
<view class="single">
<view class="single-left">
<view>{{ $t('message.CommissionedSingleNumber') }}</view>
<u-search :placeholder="$t('message.Commission_tips1')" v-model.trim="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.po_MaterielNo')">
<jPicker sureColor="#ff0000" style="width: 260rpx" @bindpicker="materialChoice" showKey="value" valKey="value" :val="wl.value" class="search" :options="MaterialList" />
</u-form-item>
<!-- 物料描述 -->
<u-form-item :label="$t('message.po_MaterielDes')">
<u-input :disabled="true" v-model="Some.productDescZh" placeholder="" style="overflow: hidden" />
</u-form-item>
<!-- 数量 -->
<u-form-item :label="$t('message.dn_Number')">
<u-input v-model="Some.qty" :disabled="true" placeholder="" type="number" />
</u-form-item>
<!-- 原库位 -->
<u-form-item :label="$t('message.Warehouse_OriginalLocation')">
<u-input :disabled="true" v-model="Some.originWl" placeholder="" />
</u-form-item>
<!-- 目标库位 -->
<!-- <u-form-item :label="$t('message.Warehouse_TargetLocation')">
<u-input :disabled="true" v-model="Some.aimWl" placeholder="" />
</u-form-item> -->
<!-- 成本中心 -->
<u-form-item :label="$t('message.product_costCenter')">
<u-input :disabled="true" v-model="Some.costCenter" placeholder="" />
</u-form-item>
<!-- 文件号 -->
<u-form-item :label="$t('message.DocumentNumber')">
<u-input v-model="Some.fileNo" :border="border" :placeholder="$t('message.fileNumber')" />
</u-form-item>
<u-row class="button-bar">
<u-col :span="6">
<u-button type="error" @click="uni.navigateBack()">{{ $t('message.po_Return') }}</u-button>
</u-col>
<u-col :span="6">
<u-button type="primary" @click="submit">{{ $t('message.InventoryFinish') }} </u-button></u-col
>
</u-row>
</u-form>
</view>
</template>
<script lang="ts">
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 {
//
order3 = '';
model = model;
border = true;
wl: any = {};
Some: any = {};
MaterialList: any = [];
//
async query() {
if (this.order3 === '') {
this.customToast(this.$t('message.Commission_tips1') as string);
return;
} else {
await this.model.queryScrapInfoRaw({
order3: this.order3,
});
if (this.model.code == '1') {
uni.showToast({
//icon: 'success',
title: this.$t('message.successful') as string,
duration: 2000,
image: '/static/icons/icon-51.png',
});
this.model.orderInInfoList.forEach((item: any) => {
item.fileNo = '';
let arr: any = {
label: item.productCode,
value: item.productCode,
};
this.MaterialList.push(arr);
});
this.Some = this.model.orderInInfoList[0];
this.wl = this.MaterialList[0];
}
}
}
//
materialChoice(e: any) {
this.wl = e.pickerName;
this.model.orderInInfoList.forEach((item: any) => {
if (item.productCode == e.pickerName.value) {
this.Some = item;
}
});
}
//
async submit() {
if (this.order3 === '') {
this.customToast(this.$t('message.Commission_tips1') as string);
return;
}
if (!this.Some) {
this.customToast(this.$t('message.Warehouse_Tip5') as string);
return;
}
if (this.Some.fileNo == '' || this.Some.fileNo == null || this.Some.fileNo == undefined) {
this.customToast(this.$t('message.fileNumber') as string);
return;
}
let orderlist = [];
this.Some.type = '1';
this.Some.keepBy = session.loginName;
this.Some.orderType = '1';
orderlist.push(this.Some);
await model.scrapConfirmRaw(orderlist);
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.Some.fileNo = ' ';
this.wl = {};
this.MaterialList = [];
this.query();
}
}
}
</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: 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 {
// line-height: 35rpx;
// background-color: #f7f6fb;
// padding: 10rpx 30rpx;
// border-radius: 8rpx;
// &:after {
// border-bottom-width: 0;
// }
// }
.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;
}
}
}
.title {
margin-bottom: 40rpx;
color: #1a1a1a;
font-size: 30rpx;
font-weight: 500;
}
.button-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,80 @@
import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators';
import store from '@/store';
import http from '@/utils/request';
import { url } from '@/utils/url';
// import { page } from '@/utils/page';
import { session } from '@/store/modules/session';
import vm from '@/main';
class OrderInInfo {
checked?: boolean;
poNo?: string;
kw?: string;
userDefined10?: string;
orderStatus?: string;
}
@Module({
namespaced: true,
dynamic: true,
store,
name: 'raw.warehouse.rowScrap',
})
export class rowScrap extends VuexModule {
/**
* sap
*/
cboPlaceList = [];
/**
*
*/
poNo = '';
/**
*
*/
orderInInfo: OrderInInfo = new OrderInInfo();
/**
*
*/
orderInInfoList: OrderInInfo[] = [];
code: any = '';
/**
*
*/
// orderInInfoListEx: OrderInInfo[] = [];
/**
// * 查询看单号
* @param poNo
*/
@MutationAction
async queryScrapInfoRaw(order3: any) {
try {
const records: any = await http.post(url.warehouse.manualOrder.list, {
...order3,
orderType: 'BF',
orderSourceSys: 'RAW',
page: 1,
rows: 50,
factoryCode: session.factoryCode,
loginName: session.loginName,
});
const orderInInfoList = records.data.records;
const code = records.code;
console.log('获取来的数据', orderInInfoList);
return { orderInInfoList, code };
} catch {
//uni.showToast({ icon: 'none', title: vm.$t('message.Warehouse_Tip11') as any });
vm.customToast(vm.$t('message.Warehouse_Tip11') as any);
}
}
@MutationAction
async scrapConfirmRaw(list: any) {
const records: any = await http.post(url.warehouse.manualOrder.confirmRaw, list);
const code = records.code;
return { code };
}
}
export default getModule(rowScrap);

@ -0,0 +1,41 @@
/**
*
*/
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', //目标库位
},
// {
// label: '校验状态',
// key: 'checkResult',
// },
// {
// label: '看单号',
// key: 'kdOrderNo',
// },
];

@ -0,0 +1,185 @@
<template>
<view class="page-kan-dan-detail">
<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.Warehouse_TransferDetails') }}</view>
<view class="right"></view>
</view>
<wyb-table class="table" ref="table" width="100%" enable-check="multiple" show-left-and-right-border :headers="headers" :contents="model.orderInInfoList" :show-vert-border="false" />
<view class="bottom-bar">
<!-- <view class="extra">
<u-row>
<u-col :span="2"> 看单号: </u-col>
<u-col :span="8">
<u-input v-model="order3" @confirm="onKdOrderNoConfirm" placeholder="看单号" />
</u-col>
</u-row>
<u-row>
<u-col :span="2"> 接收人 </u-col>
<u-col :span="3">
<u-input v-model="receiverName" @confirm="onReceiverNameConfirm" placeholder="接收人" />
</u-col>
<u-col :span="2"> 口令 </u-col>
<u-col :span="3">
<u-input v-model="operatorPass" placeholder="口令" />
</u-col>
</u-row>
</view> -->
<view class="container">
<u-row>
<u-col :span="6">
<u-button type="primary" @click="Confirm">{{ $t('message.dn_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>
</view>
</template>
<script lang="ts">
import { Component } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import model from './model';
// import { order, OrderDetail } from '@/pages/raw/warehouse/transfer/model';
// import { auth } from '@/store/modules/auth';
// import { pick, omit, cloneDeep } from 'lodash/fp';
import { headers } from './config';
import { session } from '@/store/modules/session';
@Component
export default class KanDanHandOverDetails extends BasePage {
order = '';
headers = headers;
/**
* 页面Module
*/
model = model;
// details: Array<OrderDetail> = [
// // {
// // orderNo: 'SGC2012230010',
// // barcode: '',
// // productCode: 'CBAH90E00',
// // productDescZh: 'HWM70-M1201 西',
// // createdDate: '2020-12-23 08:09:19',
// // createdBy: 'admin',
// // },
// // {
// // orderNo: 'SGC2012230009',
// // barcode: 'sss',
// // productCode: 'BH03YME00',
// // productDescZh: 'AQR-S541XA(BL)',
// // createdDate: '2020-12-23 08:09:19',
// // createdBy: 'admin',
// // },
// ];
// async mounted() {
// }
// beforeDestroy() {
// }
async Confirm() {
const orderlist: any = [];
this.model.orderInInfoList.forEach((item: any) => {
if (item.checked) {
orderlist.push(item);
}
});
if (orderlist.length == 0) {
this.customToast(this.$t('message.Pi_tip18') as string);
return;
}
orderlist.forEach((item: any) => {
item.type = '1';
item.keepBy = session.loginName;
item.orderType = '0';
});
await model.transferConfirmRaw(orderlist);
setTimeout(() => {
uni.navigateBack({ delta: 1 });
}, 2000);
}
}
</script>
<style lang="scss" scoped>
.page-kan-dan-detail {
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 {
z-index: 21;
position: fixed;
bottom: 0;
left: 0;
right: 0;
.container {
background: #ffffff;
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
padding: 20rpx;
}
.extra {
background-color: #fff;
margin: 5px;
border-radius: 5px;
padding: 0 10px;
}
.bottom-info {
.u-form-item {
padding: 0;
}
}
}
}
</style>

@ -0,0 +1,221 @@
<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.RowRelocation') }}</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.InventoryOrderNo')" prop="orderNo">
<u-search :placeholder="$t('message.Commission_tips1')" v-model.trim="order3" @search="query" :show-action="false"></u-search>
<view class="single-right">
<u-button type="primary" @click="query">{{ $t('message.Query') }}</u-button>
</view>
</u-form-item>
<!-- 物料号选择 -->
<u-form-item :required="true" :label="$t('message.CommissionedMaterielNo')">
<jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="materialConfirm" showKey="value" valKey="value" :val="orderlist.productCode" class="search" :options="model.materielList" />
</u-form-item>
<!-- 物料描述 -->
<u-form-item :label="$t('message.po_MaterielDes')">
<u-input :disabled="true" v-model="orderlist.productDescZh" placeholder="" style="overflow: hidden" />
</u-form-item>
<!-- 出库库位 -->
<u-form-item :label="$t('message.Outbound')">
<u-input :disabled="true" v-model="orderlist.originWl" placeholder="" />
</u-form-item>
<!-- 入库库位 -->
<u-form-item :label="$t('message.Warehousing')">
<u-input :disabled="true" v-model="orderlist.aimWl" placeholder="" />
</u-form-item>
<!-- 源工厂 -->
<u-form-item :label="$t('message.SourceFactory')">
<u-input :disabled="true" v-model="orderlist.factoryFrom" placeholder="" />
</u-form-item>
<!-- 目标 -->
<u-form-item :label="$t('message.Targetfactory')">
<u-input :disabled="true" v-model="orderlist.factoryTo" placeholder="" />
</u-form-item>
<!-- 需求总数 -->
<u-form-item :label="$t('message.reqQty')">
<u-input :disabled="true" v-model="orderlist.qty" placeholder="" />
</u-form-item>
<!-- 累计数量 -->
<u-form-item :label="$t('message.finQty')">
<u-input :disabled="true" v-model="orderlist.actualQty" placeholder="" />
</u-form-item>
<!-- 本次数量 -->
<u-form-item :label="$t('message.CommissionedThisNumber')">
<u-input v-model="NEWqty" :placeholder="$t('message.Summary_PleaseInputNumber')" :border="border" type="number" />
</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 { Component } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import model from './model';
import { session } from '@/store/modules/session';
import jPicker from '@/components/J-Picker/jPicker.vue';
@Component({
components: {
jPicker,
},
})
export default class KanDanHandOver extends BasePage {
order3 = '';
NEWqty = '';
model = model;
border = true;
materialCodeSelect = false;
orderlist: any = [];
//
async query() {
if (this.order3 === '') {
this.customToast(this.$t('message.Warehouse_Tip') as string);
return;
} else {
await this.model.queryTransferInfoRaw({
order3: this.order3,
});
if (model.code == '1') {
uni.showToast({
//icon: 'success',
title: this.$t('message.successful') as string,
duration: 2000,
image: '/static/icons/icon-51.png',
});
this.orderlist = model.materielList[0];
this.NEWqty = model.materielList[0].qty;
}
}
}
//
materialConfirm(v: any) {
this.orderlist.productCode = v.pickerName.productCode;
model.materielList.forEach((item: any) => {
if (this.orderlist.productCode == item.productCode) {
this.orderlist = item;
this.NEWqty = item.qty;
}
});
}
//
async submit() {
if (this.order3 == '') {
this.customToast(this.$t('message.InventoryPleaseScan') as string);
return;
}
if (this.orderlist.length == 0) {
this.customToast(this.$t('message.Commission_tips6') as string);
return;
}
if (this.NEWqty == '' || parseFloat(this.NEWqty) == 0) {
this.customToast(this.$t('message.PleaseQuantity') as string);
return;
}
if (parseFloat(this.NEWqty) > parseFloat(this.orderlist.qty)) {
this.customToast(this.$t('message.greater') as string);
return;
}
this.orderlist.type = '1';
this.orderlist.keepBy = session.loginName;
this.orderlist.orderType = '0';
this.orderlist.qty = this.NEWqty;
let arr = [];
arr.push(this.orderlist);
await model.transferConfirmRaw(arr);
if (model.code == '1') {
uni.showToast({
title: this.$t('message.Warehouse_Tip9') as string,
duration: 2000,
image: '/static/icons/icon-51.png',
});
this.orderlist = {};
this.model.materielList.length = 0;
this.NEWqty = '';
this.query();
}
}
}
</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: 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-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,94 @@
import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators';
import store from '@/store';
import http from '@/utils/request';
import { url } from '@/utils/url';
// import { page } from '@/utils/page';
import { session } from '@/store/modules/session';
import vm from '@/main';
class OrderInInfo {
checked?: boolean;
poNo?: string;
kw?: string;
userDefined10?: string;
orderStatus?: string;
}
@Module({
namespaced: true,
dynamic: true,
store,
name: 'raw.warehouse.rawTransfer',
})
export class rawTransfer extends VuexModule {
/**
* sap
*/
cboPlaceList = [];
/**
*
*/
poNo = '';
/**
*
*/
orderInInfo: OrderInInfo = new OrderInInfo();
/**
*
*/
orderInInfoList: OrderInInfo[] = [];
materielList = [];
code = '';
/**
*
*/
// orderInInfoListEx: OrderInInfo[] = [];
/**
// * 查询看单号
* @param poNo
*/
@MutationAction
async queryTransferInfoRaw(order3: any) {
// console.log('获取来的数据咋啊啊啊');
try {
const records: any = await http.post(url.warehouse.manualOrder.list, {
...order3,
orderType: 'YK',
orderSourceSys: 'RAW',
page: 1,
rows: 50,
factoryCode: session.factoryCode,
loginName: session.loginName,
});
console.log('records', records);
const code = records.code;
const orderInInfoList = records.data.records;
const materielList = orderInInfoList.map((item: any) => ({
label: item.productCode,
value: item.productCode,
...item,
}));
console.log('materielList', materielList);
return { orderInInfoList, materielList, code };
} catch {
//uni.showToast({ icon: 'none', title: vm.$t('message.Warehouse_Tip11') as any });
vm.customToast(vm.$t('message.Warehouse_Tip11') as any);
}
}
@MutationAction
async transferConfirmRaw(list: any) {
const records: any = await http.post(url.warehouse.manualOrder.confirmRaw, list);
const code = records.code;
return { code };
}
//清除数据
@MutationAction
async empty() {
const materielList = null;
return { materielList };
}
}
export default getModule(rawTransfer);

@ -63,6 +63,21 @@ export const page = {
wholeLnventory: {
index: '/pages/product/warehouse/wholeLnventory/index',
},
fgScrap: {
//成品报废 越南工厂
index: '/pages/product/warehouse/fgScrap/index',
stoOutboundDetail: '/pages/product/warehouse/fgScrap/detail',
},
fgConsuming: {
//成品领用 越南工厂
index: '/pages/product/warehouse/fgConsuming/index',
stoOutboundDetail: '/pages/product/warehouse/fgConsuming/detail',
},
fgTransfer: {
//成品移库 越南工厂
index: '/pages/product/warehouse/fgTransfer/index',
Local: '/pages/product/warehouse/fgTransfer/Local-details',
},
},
},
raw: {
@ -214,6 +229,18 @@ export const page = {
rowInventory: {
index: '/pages/raw/warehouse/rowInventory/index',
},
rawTransfer: {
index: '/pages/raw/warehouse/rawTransfer/index',
details: '/pages/raw/warehouse/rawTransfer/details',
},
rawScrap: {
index: '/pages/raw/warehouse/rawScrap/index',
details: '/pages/raw/warehouse/rawScrap/details',
},
rawConsuming: {
index: '/pages/raw/warehouse/rawConsuming/index',
details: '/pages/raw/warehouse/rawConsuming/details',
},
},
commission: {
index: '/pages/raw/commission/index',

@ -301,6 +301,11 @@ export const url = {
preScrapSfgConfirm: '/wmspda/fg/preScrapSfgConfirm',
preScrapRawConfirm: '/wmspda/fg/preScrapRawConfirm',
},
manualOrder: {
list: '/wmspda/fg/manualOrderInfo',
confirmRaw: '/wmspda/fg/confirmManualRaw',
confirmFg: '/wmspda/fg/confirmManualFg',
},
rowScrap: {
list: '/wmspda/fg/listByOrder',
},

Loading…
Cancel
Save