cosmoim-852 fix 俄罗斯新增功能
parent
c50b09be1a
commit
10df37e456
@ -0,0 +1,124 @@
|
|||||||
|
/**
|
||||||
|
* 看单明细表格列
|
||||||
|
*/
|
||||||
|
import vm from '@/main';
|
||||||
|
export const headers = [
|
||||||
|
{
|
||||||
|
label: vm.$t('message.Line'),
|
||||||
|
key: 'poLine',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.po_OddNumbers'),
|
||||||
|
key: 'poNo',
|
||||||
|
width: 350,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.Pi_materielNo'),
|
||||||
|
key: 'materialCode',
|
||||||
|
width: 350,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.CommissionedLocation'),
|
||||||
|
key: 'wlCode',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.product_Number'),
|
||||||
|
key: 'receiptAmount',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.Container'),
|
||||||
|
key: 'sn', //容器码
|
||||||
|
width: 700,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
export const Tabheaders = [
|
||||||
|
{
|
||||||
|
label: vm.$t('message.STOInventoryOrderNo'),
|
||||||
|
key: 'stoNo',
|
||||||
|
width: 350,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.STOLine'),
|
||||||
|
key: 'stoItem',
|
||||||
|
width: 350,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.CommissionedLocation'),
|
||||||
|
key: 'wlCode',
|
||||||
|
width: 350,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.Container'),
|
||||||
|
key: 'barCode',
|
||||||
|
width: 350,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.product_Number'),
|
||||||
|
key: 'nowAmount',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
export const ImportPOReceiveListHeaders = [
|
||||||
|
{
|
||||||
|
label: vm.$t('message.po_OddNumbers'),
|
||||||
|
key: 'poNo', //po单号
|
||||||
|
width: 350,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.Line'),
|
||||||
|
key: 'poLine', //行项目
|
||||||
|
// width: 350,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.Pi_materielNo'),
|
||||||
|
key: 'materialCode', //物料号
|
||||||
|
width: 350,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.CommissionedMaterielDesc'),
|
||||||
|
key: 'materialDesc', //物料描述
|
||||||
|
width: 450,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.po_DemandQuantity'),
|
||||||
|
key: 'poAmount', //需求数量
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.Pi_unit'),
|
||||||
|
key: 'unit', //单位
|
||||||
|
},
|
||||||
|
];
|
||||||
|
export const containerListHeaders = [
|
||||||
|
{
|
||||||
|
label: vm.$t('message.Container'),
|
||||||
|
key: 'palletCode', //容器码
|
||||||
|
width: 300,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.po_OddNumbers'),
|
||||||
|
key: 'poNo', //po单号
|
||||||
|
width: 350,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.Line'),
|
||||||
|
key: 'poLine', //行项目
|
||||||
|
// width: 350,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.Pi_materielNo'),
|
||||||
|
key: 'materialCode', //物料号
|
||||||
|
width: 350,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.CommissionedMaterielDesc'),
|
||||||
|
key: 'materialDesc', //物料描述
|
||||||
|
width: 450,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.po_DemandQuantity'),
|
||||||
|
key: 'poAmount', //需求数量
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.Pi_unit'),
|
||||||
|
key: 'unit', //单位
|
||||||
|
},
|
||||||
|
];
|
@ -0,0 +1,607 @@
|
|||||||
|
<template>
|
||||||
|
<view class="page-raw-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.FactorySTOoutbound') }}</view>
|
||||||
|
<view class="right"></view>
|
||||||
|
</view>
|
||||||
|
<view class="content">
|
||||||
|
<!-- DN单号 -->
|
||||||
|
<view class="single">
|
||||||
|
<view class="single-left">
|
||||||
|
<view class="centerstyle">{{ $t('message.dn_OddNumbers') }}</view>
|
||||||
|
<u-search :placeholder="$t('message.dn_PleaseScan')" v-model.trim="dnNo" @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>
|
||||||
|
<!-- DN行项目 -->
|
||||||
|
<view class="Purchase-title">
|
||||||
|
<view class="Purchase">
|
||||||
|
<view>{{ $t('message.DNLine') }}</view>
|
||||||
|
<jPicker sureColor="#ff0000" style="width: 260rpx" @bindpicker="SelectDnLine" showKey="value" valKey="value" :val="DnlineNo.value" class="search" :options="model.DnLineList" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- STO单号 -->
|
||||||
|
<view class="material">
|
||||||
|
<view class="material-right">
|
||||||
|
<view class="material-right-title">{{ $t('message.STOInventoryOrderNo') }}</view>
|
||||||
|
<view class="material-right-code" style="overflow: hidden">{{ TheItem.stoNo }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- STO行项目 -->
|
||||||
|
<view class="material">
|
||||||
|
<view class="material-right">
|
||||||
|
<view class="material-right-title">{{ $t('message.STOLine') }}</view>
|
||||||
|
<view class="material-right-code" style="overflow: hidden">{{ TheItem.stoItem }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 物料编码 -->
|
||||||
|
<view class="material">
|
||||||
|
<view class="material-right">
|
||||||
|
<view class="material-right-title">{{ $t('message.matcode') }}</view>
|
||||||
|
<view class="material-right-code" style="overflow: hidden">{{ TheItem.materialCode }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 物料描述 -->
|
||||||
|
<view class="material">
|
||||||
|
<view class="material-right">
|
||||||
|
<view style="width: 362rpx" class="material-right-title">{{ $t('message.po_MaterielDes') }}</view>
|
||||||
|
<view class="material-right-code" style="overflow: hidden">{{ TheItem.materialDesc }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 计划数量&&已出数量 -->
|
||||||
|
<view class="number">
|
||||||
|
<view class="number-left">
|
||||||
|
<view class="number-left-title">{{ $t('message.plan') }}</view>
|
||||||
|
<u-input v-model="TheItem.orderAmount" placeholder=" " :type="item" :border="border" class="input" disabled style="padding: '0'" />
|
||||||
|
</view>
|
||||||
|
<view class="number-right">
|
||||||
|
<view class="number-right-title">{{ $t('message.OutboundNum') }}</view>
|
||||||
|
<u-input v-model="TheItem.scanAmount" placeholder="" :type="type" :border="border" class="input" disabled style="padding: '0'" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 出库库位 -->
|
||||||
|
<view class="material">
|
||||||
|
<view class="material-right">
|
||||||
|
<view class="material-right-title">{{ $t('message.DeliveryLoc') }}</view>
|
||||||
|
<view class="material-right-code" style="overflow: hidden">{{ TheItem.deliveryRegion }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 扫码 -->
|
||||||
|
<u-form-item :label="$t('message.product_BarCode')">
|
||||||
|
<u-search :placeholder="$t('message.po_PleaseInput')" v-model="barCode" @search="onOk" :focus="firstFocus" :show-action="false"></u-search>
|
||||||
|
</u-form-item>
|
||||||
|
<!-- 库位 -->
|
||||||
|
<view class="library">
|
||||||
|
<view class="library-left">
|
||||||
|
<view>{{ $t('message.CommissionedLocation') }}</view>
|
||||||
|
<u-input v-model="locCode" disabled placeholder="" style="margin-top: 8px; width: 97%" />
|
||||||
|
<!-- <jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="SelectLoc" showKey="value" valKey="value" :val="Loc.value" class="search" :options="LocList" /> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 数量 -->
|
||||||
|
<view class="single">
|
||||||
|
<view class="single-left">
|
||||||
|
<view>{{ $t('message.dn_Number') }}:</view>
|
||||||
|
<u-input v-model="num" disabled placeholder="" style="margin-top: 8px" />
|
||||||
|
</view>
|
||||||
|
<view class="single-right">
|
||||||
|
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 表格展示 -->
|
||||||
|
<wyb-table class="table" ref="table" width="100%" show-left-and-right-border :headers="Tabheaders" :contents="SunmitList" :show-vert-border="false" @onCellClick="deleteItem($event)"></wyb-table>
|
||||||
|
</view>
|
||||||
|
<!-- 底部按钮 -->
|
||||||
|
<view class="bottom-bar">
|
||||||
|
<u-row class="button-bar">
|
||||||
|
<u-col :span="6">
|
||||||
|
<u-button type="primary" @click="Submit">{{ $t('message.dn_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 jPicker from '@/components/J-Picker/jPicker.vue';
|
||||||
|
import { session } from '@/store/modules/session';
|
||||||
|
import model from './model';
|
||||||
|
import { Tabheaders } from './config';
|
||||||
|
@Component({
|
||||||
|
components: {
|
||||||
|
jPicker,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
export default class dnReceiptDom extends BasePage {
|
||||||
|
border = true;
|
||||||
|
firstFocus = false;
|
||||||
|
barCode: any = '';
|
||||||
|
type = 'text';
|
||||||
|
Tabheaders = Tabheaders;
|
||||||
|
model = model;
|
||||||
|
dnNo: any = '';
|
||||||
|
dnNoList: any = [];
|
||||||
|
DnlineNo: any = {};
|
||||||
|
LocList: any = [];
|
||||||
|
Loc: any = {};
|
||||||
|
locCode: any = '';
|
||||||
|
async QueryLoc() {
|
||||||
|
await this.model.QueryLoc(this.TheItem.deliveryRegion);
|
||||||
|
this.LocList = this.model.LocList;
|
||||||
|
this.Loc = this.model.LocList[0];
|
||||||
|
}
|
||||||
|
async query() {
|
||||||
|
if (!this.dnNo) {
|
||||||
|
this.customToast(this.$t('message.Warehouse_Tip1') as any);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.SunmitList.length != 0) {
|
||||||
|
uni.showModal({
|
||||||
|
content: this.$t('message.submitted') as string,
|
||||||
|
cancelText: this.$t('message.Cancel') as string,
|
||||||
|
confirmText: this.$t('message.workArea_Confirm') as string,
|
||||||
|
success: async (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
this.empty();
|
||||||
|
await model.QuerydnNo(this.dnNo);
|
||||||
|
this.dnNoList = this.model.dnNoList;
|
||||||
|
this.DnlineNo = this.model.DnLineList[0];
|
||||||
|
this.TheItem = this.model.dnNoList[0];
|
||||||
|
this.ItemIndex = 0;
|
||||||
|
//await this.QueryLoc();
|
||||||
|
} else if (res.cancel) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
await model.QuerydnNo(this.dnNo);
|
||||||
|
this.dnNoList = this.model.dnNoList;
|
||||||
|
this.DnlineNo = this.model.DnLineList[0];
|
||||||
|
this.TheItem = this.model.dnNoList[0];
|
||||||
|
this.ItemIndex = 0;
|
||||||
|
//await this.QueryLoc();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
TheItem: any = {};
|
||||||
|
ItemIndex: any = 0;
|
||||||
|
async SelectDnLine(e: any) {
|
||||||
|
this.DnlineNo = e.pickerName;
|
||||||
|
this.model.dnNoList.forEach((item: any, index: any) => {
|
||||||
|
if (item.dnItem == this.DnlineNo.value) {
|
||||||
|
this.TheItem = item;
|
||||||
|
this.ItemIndex = index;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//await this.QueryLoc();
|
||||||
|
}
|
||||||
|
item: any = '';
|
||||||
|
SelectLoc(e: any) {
|
||||||
|
this.Loc = e.pickerName;
|
||||||
|
}
|
||||||
|
//扫码查询
|
||||||
|
async onOk() {
|
||||||
|
if (!this.dnNo) {
|
||||||
|
this.customToast(this.$t('message.Warehouse_Tip1') as any);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!this.barCode) {
|
||||||
|
this.customToast(this.$t('message.barcode_PleaseScan') as any);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!this.TheItem.materialCode) {
|
||||||
|
this.customToast(this.$t('message.DNLine_PleaseSelect') as any);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const selctlist = {
|
||||||
|
barcode: this.barCode,
|
||||||
|
productCode: this.TheItem.materialCode,
|
||||||
|
loginName: session.loginName,
|
||||||
|
factoryCode: session.factoryCode,
|
||||||
|
};
|
||||||
|
await this.model.stoDnProdScan(selctlist);
|
||||||
|
if (this.model.res.code == '1') {
|
||||||
|
this.customToast(this.$t('message.Warehouse_Tip9') as any);
|
||||||
|
const data = this.model.res.data;
|
||||||
|
this.locCode = data.locCode;
|
||||||
|
this.num = parseFloat(data.qty) - (data.cpRef4 ? parseFloat(data.cpRef4) : 0);
|
||||||
|
//this.TheItem.scanAmount = this.TheItem.scanAmount + 1;
|
||||||
|
//this.barCode = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
num: any = '';
|
||||||
|
SunmitList: any = [];
|
||||||
|
Add() {
|
||||||
|
if (!this.dnNo) {
|
||||||
|
this.customToast(this.$t('message.Warehouse_Tip1') as any);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!this.TheItem) {
|
||||||
|
this.customToast(this.$t('message.Warehouse_Tip6') as any);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!this.barCode) {
|
||||||
|
this.customToast(this.$t('message.barcode_PleaseScan') as any);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!this.locCode) {
|
||||||
|
this.customToast(this.$t('message.Warehouse_Tip2') as any);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!this.num) {
|
||||||
|
this.customToast(this.$t('message.Summary_PleaseInputNumber') as any);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (parseFloat(this.num) <= 0) {
|
||||||
|
this.customToast(this.$t('message.Commission_tips3') as any);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (parseFloat(this.num) > parseFloat(this.TheItem.orderAmount)) {
|
||||||
|
this.customToast(this.$t('message.Commission_tips4') as any);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (parseFloat(this.num) + parseFloat(this.TheItem.scanAmount) > parseFloat(this.TheItem.orderAmount)) {
|
||||||
|
this.customToast(this.$t('message.Commission_tips4') as any);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.model.dnNoList[this.ItemIndex].scanAmount += parseFloat(this.num);
|
||||||
|
let obj = {
|
||||||
|
loginName: session.loginName,
|
||||||
|
factoryCode: session.factoryCode,
|
||||||
|
dnNo: this.dnNo,
|
||||||
|
dnItem: this.DnlineNo.value,
|
||||||
|
stoNo: this.TheItem.stoNo,
|
||||||
|
stoItem: this.TheItem.stoItem,
|
||||||
|
materialCode: this.TheItem.materialCode,
|
||||||
|
orderAmount: this.TheItem.orderAmount,
|
||||||
|
scanAmount: this.TheItem.orderAmount,
|
||||||
|
wlCode: this.locCode,
|
||||||
|
nowAmount: this.num,
|
||||||
|
barCode: this.barCode,
|
||||||
|
};
|
||||||
|
this.SunmitList.push(obj);
|
||||||
|
this.barCode = '';
|
||||||
|
this.num = '';
|
||||||
|
this.locCode = '';
|
||||||
|
this.firstFocus = false;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.firstFocus = true;
|
||||||
|
});
|
||||||
|
console.log('this.model.dnNoList', this.model.dnNoList);
|
||||||
|
}
|
||||||
|
deleteItem(e: any) {
|
||||||
|
uni.showModal({
|
||||||
|
content: this.$t('message.product_Delete') as string,
|
||||||
|
cancelText: this.$t('message.Cancel') as string,
|
||||||
|
confirmText: this.$t('message.workArea_Confirm') as string,
|
||||||
|
success: (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
this.model.dnNoList.forEach((item: any) => {
|
||||||
|
if (item.dnItem == e.lineData.dnItem) {
|
||||||
|
item.scanAmount -= parseFloat(e.lineData.nowAmount);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.SunmitList.splice(e.contentIndex, 1);
|
||||||
|
console.log('this.model.dnNoList', this.model.dnNoList);
|
||||||
|
} else if (res.cancel) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
async Submit() {
|
||||||
|
let isTrue = true;
|
||||||
|
this.model.dnNoList.forEach((item: any) => {
|
||||||
|
if (item.orderAmount != item.scanAmount) {
|
||||||
|
this.customToast(this.$t('message.AllThem') as any);
|
||||||
|
return (isTrue = false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (isTrue) {
|
||||||
|
await this.model.SubmitList(this.SunmitList);
|
||||||
|
if (this.model.SubCode == 1) {
|
||||||
|
uni.showToast({
|
||||||
|
title: this.$t('message.success') as string,
|
||||||
|
image: '/static/icons/icon-51.png',
|
||||||
|
});
|
||||||
|
this.empty();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
empty() {
|
||||||
|
this.dnNo = '';
|
||||||
|
this.LocList = [];
|
||||||
|
this.locCode = '';
|
||||||
|
this.num = '';
|
||||||
|
this.barCode = '';
|
||||||
|
this.TheItem = {};
|
||||||
|
this.ItemIndex = 0;
|
||||||
|
this.dnNoList = [];
|
||||||
|
this.DnlineNo = {};
|
||||||
|
this.SunmitList = [];
|
||||||
|
this.model.dnNoList.length = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.page-raw-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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
width: 100%;
|
||||||
|
background: white;
|
||||||
|
border-radius: 15rpx;
|
||||||
|
padding: 10rpx;
|
||||||
|
|
||||||
|
.single {
|
||||||
|
width: 100%;
|
||||||
|
height: 100rpx;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.single-left {
|
||||||
|
width: 79%;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.Purchase-title {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.Purchase {
|
||||||
|
width: 60%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
view {
|
||||||
|
width: 234rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// .material {
|
||||||
|
// width: 100%;
|
||||||
|
// height: 100rpx;
|
||||||
|
// display: flex;
|
||||||
|
// .material-left {
|
||||||
|
// width: 100%;
|
||||||
|
// height: 100%;
|
||||||
|
// display: flex;
|
||||||
|
// view {
|
||||||
|
// width: 100rpx;
|
||||||
|
// line-height: 100rpx;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
.material {
|
||||||
|
width: 100%;
|
||||||
|
height: 100rpx;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.material-left {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
view {
|
||||||
|
width: 140rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.material-right {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.material-right-title {
|
||||||
|
width: 246rpx;
|
||||||
|
height: 100%;
|
||||||
|
line-height: 30rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.material-right-code {
|
||||||
|
width: 80%;
|
||||||
|
height: 100%;
|
||||||
|
line-height: 100rpx;
|
||||||
|
text-align: left;
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.number {
|
||||||
|
height: 100rpx;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.number-left {
|
||||||
|
width: 45%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.number-left-title {
|
||||||
|
width: 120rpx;
|
||||||
|
height: 100%;
|
||||||
|
line-height: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input {
|
||||||
|
width: 200rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
margin-top: 15rpx;
|
||||||
|
margin-left: 15rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.number-right {
|
||||||
|
width: 55%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.number-right-title {
|
||||||
|
width: 140rpx;
|
||||||
|
height: 100%;
|
||||||
|
//text-align: center;
|
||||||
|
line-height: 40rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input {
|
||||||
|
width: 200rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
margin-top: 15rpx;
|
||||||
|
margin-left: 15rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// .library {
|
||||||
|
// width: 100%;
|
||||||
|
// height: 100rpx;
|
||||||
|
// display: flex;
|
||||||
|
// .library-left {
|
||||||
|
// width: 50%;
|
||||||
|
// height: 100%;
|
||||||
|
// display: flex;
|
||||||
|
// view {
|
||||||
|
// width: 100rpx;
|
||||||
|
// line-height: 100rpx;
|
||||||
|
// }
|
||||||
|
// .search {
|
||||||
|
// padding-left: 20px;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// .library-right {
|
||||||
|
// width: 50%;
|
||||||
|
// height: 100%;
|
||||||
|
// display: flex;
|
||||||
|
// .library-right-title {
|
||||||
|
// width: 120rpx;
|
||||||
|
// height: 100%;
|
||||||
|
// padding-left: 4px;
|
||||||
|
// line-height: 100rpx;
|
||||||
|
// }
|
||||||
|
// .input {
|
||||||
|
// width: 200rpx;
|
||||||
|
// height: 70rpx;
|
||||||
|
// margin-top: 15rpx;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
.add {
|
||||||
|
width: 100%;
|
||||||
|
height: 100rpx;
|
||||||
|
position: absolute;
|
||||||
|
top: 351px;
|
||||||
|
left: 0;
|
||||||
|
|
||||||
|
button {
|
||||||
|
position: absolute;
|
||||||
|
top: 3rpx;
|
||||||
|
right: 35rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.config {
|
||||||
|
width: 100%;
|
||||||
|
height: 100rpx;
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
// top: 420px;
|
||||||
|
// left: 0;
|
||||||
|
button {
|
||||||
|
position: absolute;
|
||||||
|
// top: 455px;
|
||||||
|
right: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.AddQty {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.centerstyle {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,82 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zhou lei
|
||||||
|
* @Date: 2022-09-28 10:26:36
|
||||||
|
* @LastEditTime: 2023-05-22 16:42:16
|
||||||
|
* @LastEditors: zhou lei
|
||||||
|
* @Description: 修改为扫描条码出库
|
||||||
|
* @FilePath: \hgwms-factory-app\src\pages\raw\STO\FactorySTO-Outbound\model.ts
|
||||||
|
* 联系方式:910592680@qq.com 18669792120 科海达信息技术有限公司
|
||||||
|
*/
|
||||||
|
import { 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';
|
||||||
|
@Module({
|
||||||
|
namespaced: true,
|
||||||
|
dynamic: true,
|
||||||
|
store,
|
||||||
|
name: 'raw.STO.FactorySTO-Outbound.index',
|
||||||
|
})
|
||||||
|
export class ReceiptModule extends VuexModule {
|
||||||
|
//俄罗斯 STO出库 扫描DN单号
|
||||||
|
dnNoList: any = [];
|
||||||
|
DnLineList: any = [];
|
||||||
|
@MutationAction
|
||||||
|
async QuerydnNo(dnNo: any) {
|
||||||
|
console.log('dnNo', dnNo);
|
||||||
|
const res: any = await http.post(url.auth.query.dnNo, {
|
||||||
|
factoryCode: session.factoryCode,
|
||||||
|
loginName: session.loginName,
|
||||||
|
dnNo,
|
||||||
|
});
|
||||||
|
const dnNoList = res.data;
|
||||||
|
const DnLineList = [];
|
||||||
|
dnNoList.forEach((item: any) => {
|
||||||
|
const obj = {
|
||||||
|
value: item.dnItem,
|
||||||
|
lable: item.dnItem,
|
||||||
|
};
|
||||||
|
DnLineList.push(obj);
|
||||||
|
});
|
||||||
|
return { dnNoList, DnLineList };
|
||||||
|
}
|
||||||
|
//俄罗斯 STO出库 查询库位
|
||||||
|
LocList: any = [];
|
||||||
|
@MutationAction
|
||||||
|
async QueryLoc(sendSpot: any) {
|
||||||
|
const res: any = await http.post(url.auth.query.queryByFactoryCodeAndWorkAreaCode, {
|
||||||
|
factoryCode: session.factoryCode,
|
||||||
|
loginName: session.loginName,
|
||||||
|
workArea: session.workareaCode,
|
||||||
|
sendSpot,
|
||||||
|
});
|
||||||
|
const LocList = [];
|
||||||
|
res.forEach((item: any) => {
|
||||||
|
const obj = {
|
||||||
|
value: item.locationCode,
|
||||||
|
lable: item.locationCode,
|
||||||
|
};
|
||||||
|
LocList.push(obj);
|
||||||
|
});
|
||||||
|
return { LocList };
|
||||||
|
}
|
||||||
|
//扫描条码
|
||||||
|
res: any = '';
|
||||||
|
@MutationAction
|
||||||
|
async stoDnProdScan(list: any) {
|
||||||
|
const res: any = await http.post(url.auth.query.barcode, list);
|
||||||
|
//const SubCode = res.code;
|
||||||
|
return { res };
|
||||||
|
}
|
||||||
|
//俄罗斯 出库提交
|
||||||
|
SubCode: any = '';
|
||||||
|
@MutationAction
|
||||||
|
async SubmitList(list: any) {
|
||||||
|
const res: any = await http.post(url.auth.query.factoryrussia, list);
|
||||||
|
const SubCode = res.code;
|
||||||
|
return { SubCode };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default getModule(ReceiptModule);
|
@ -0,0 +1,124 @@
|
|||||||
|
/**
|
||||||
|
* 看单明细表格列
|
||||||
|
*/
|
||||||
|
import vm from '@/main';
|
||||||
|
export const headers = [
|
||||||
|
{
|
||||||
|
label: vm.$t('message.Line'),
|
||||||
|
key: 'poLine',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.po_OddNumbers'),
|
||||||
|
key: 'poNo',
|
||||||
|
width: 350,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.Pi_materielNo'),
|
||||||
|
key: 'materialCode',
|
||||||
|
width: 350,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.CommissionedLocation'),
|
||||||
|
key: 'wlCode',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.product_Number'),
|
||||||
|
key: 'receiptAmount',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.Container'),
|
||||||
|
key: 'sn', //容器码
|
||||||
|
width: 700,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
export const Tabheaders = [
|
||||||
|
{
|
||||||
|
label: vm.$t('message.STOInventoryOrderNo'),
|
||||||
|
key: 'stoNo',
|
||||||
|
width: 350,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.STOLine'),
|
||||||
|
key: 'stoItem',
|
||||||
|
width: 350,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.CommissionedLocation'),
|
||||||
|
key: 'wlCode',
|
||||||
|
width: 350,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.Container'),
|
||||||
|
key: 'barCode',
|
||||||
|
width: 350,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.product_Number'),
|
||||||
|
key: 'nowAmount',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
export const ImportPOReceiveListHeaders = [
|
||||||
|
{
|
||||||
|
label: vm.$t('message.po_OddNumbers'),
|
||||||
|
key: 'poNo', //po单号
|
||||||
|
width: 350,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.Line'),
|
||||||
|
key: 'poLine', //行项目
|
||||||
|
// width: 350,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.Pi_materielNo'),
|
||||||
|
key: 'materialCode', //物料号
|
||||||
|
width: 350,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.CommissionedMaterielDesc'),
|
||||||
|
key: 'materialDesc', //物料描述
|
||||||
|
width: 450,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.po_DemandQuantity'),
|
||||||
|
key: 'poAmount', //需求数量
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.Pi_unit'),
|
||||||
|
key: 'unit', //单位
|
||||||
|
},
|
||||||
|
];
|
||||||
|
export const containerListHeaders = [
|
||||||
|
{
|
||||||
|
label: vm.$t('message.Container'),
|
||||||
|
key: 'palletCode', //容器码
|
||||||
|
width: 300,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.po_OddNumbers'),
|
||||||
|
key: 'poNo', //po单号
|
||||||
|
width: 350,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.Line'),
|
||||||
|
key: 'poLine', //行项目
|
||||||
|
// width: 350,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.Pi_materielNo'),
|
||||||
|
key: 'materialCode', //物料号
|
||||||
|
width: 350,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.CommissionedMaterielDesc'),
|
||||||
|
key: 'materialDesc', //物料描述
|
||||||
|
width: 450,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.po_DemandQuantity'),
|
||||||
|
key: 'poAmount', //需求数量
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.Pi_unit'),
|
||||||
|
key: 'unit', //单位
|
||||||
|
},
|
||||||
|
];
|
@ -0,0 +1,612 @@
|
|||||||
|
<template>
|
||||||
|
<view class="page-raw-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.FactorySTOStorage') }}</view>
|
||||||
|
<view class="right"></view>
|
||||||
|
</view>
|
||||||
|
<view class="content">
|
||||||
|
<!-- DN单号 -->
|
||||||
|
<view class="single">
|
||||||
|
<view class="single-left">
|
||||||
|
<view class="centerstyle">{{ $t('message.dn_OddNumbers') }}</view>
|
||||||
|
<u-search :placeholder="$t('message.dn_PleaseScan')" v-model.trim="dnNo" @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>
|
||||||
|
<!-- DN行项目 -->
|
||||||
|
<view class="Purchase-title">
|
||||||
|
<view class="Purchase">
|
||||||
|
<view>{{ $t('message.DNLine') }}</view>
|
||||||
|
<jPicker sureColor="#ff0000" style="width: 260rpx" @bindpicker="SelectDnLine" showKey="value" valKey="value" :val="DnlineNo.value" class="search" :options="model.DnLineList" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- STO单号 -->
|
||||||
|
<view class="material">
|
||||||
|
<view class="material-right">
|
||||||
|
<view class="material-right-title">{{ $t('message.STOInventoryOrderNo') }}</view>
|
||||||
|
<view class="material-right-code" style="overflow: hidden">{{ TheItem.stoNo }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- STO行项目 -->
|
||||||
|
<view class="material">
|
||||||
|
<view class="material-right">
|
||||||
|
<view class="material-right-title">{{ $t('message.STOLine') }}</view>
|
||||||
|
<view class="material-right-code" style="overflow: hidden">{{ TheItem.stoItem }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 物料编码 -->
|
||||||
|
<view class="material">
|
||||||
|
<view class="material-right">
|
||||||
|
<view class="material-right-title">{{ $t('message.matcode') }}</view>
|
||||||
|
<view class="material-right-code" style="overflow: hidden">{{ TheItem.materialCode }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 物料描述 -->
|
||||||
|
<view class="material">
|
||||||
|
<view class="material-right">
|
||||||
|
<view class="material-right-title">{{ $t('message.po_MaterielDes') }}</view>
|
||||||
|
<view class="material-right-code" style="overflow: hidden">{{ TheItem.materialDesc }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 计划数量&&已入数量 -->
|
||||||
|
<view class="number">
|
||||||
|
<view class="number-left">
|
||||||
|
<view class="number-left-title">{{ $t('message.plan') }}</view>
|
||||||
|
<u-input v-model="TheItem.orderAmount" placeholder=" " :type="item" :border="border" class="input" disabled style="padding: '0'" />
|
||||||
|
</view>
|
||||||
|
<view class="number-right">
|
||||||
|
<view class="number-right-title">{{ $t('message.StorageNum') }}</view>
|
||||||
|
<u-input v-model="TheItem.scanAmount" placeholder="" :type="type" :border="border" class="input" disabled style="padding: '0'" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 出库库位 -->
|
||||||
|
<view class="material">
|
||||||
|
<view class="material-right">
|
||||||
|
<view class="material-right-title">{{ $t('message.StorageLocation') }}</view>
|
||||||
|
<view class="material-right-code" style="overflow: hidden">{{ TheItem.receiveRegion }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 库位 -->
|
||||||
|
<view class="library">
|
||||||
|
<view class="library-left">
|
||||||
|
<view>{{ $t('message.CommissionedLocation') }}</view>
|
||||||
|
<!-- <u-input v-model="locCode" disabled placeholder="" style="margin-top: 8px" /> -->
|
||||||
|
<jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="SelectLoc" showKey="value" valKey="value" :val="Loc.value" class="search" :options="LocList" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 扫码 -->
|
||||||
|
<u-form-item :label="$t('message.product_BarCode')">
|
||||||
|
<u-search :placeholder="$t('message.po_PleaseInput')" v-model="barCode" @search="onOk" :focus="firstFocus" :show-action="false"></u-search>
|
||||||
|
</u-form-item>
|
||||||
|
<!-- 数量 -->
|
||||||
|
<view class="single">
|
||||||
|
<view class="single-left">
|
||||||
|
<view>{{ $t('message.dn_Number') }}:</view>
|
||||||
|
<u-input v-model="num" disabled placeholder="" style="margin-top: 8px" />
|
||||||
|
</view>
|
||||||
|
<view class="single-right">
|
||||||
|
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 表格展示 -->
|
||||||
|
<wyb-table class="table" ref="table" width="100%" show-left-and-right-border :headers="Tabheaders" :contents="SunmitList" :show-vert-border="false" @onCellClick="deleteItem($event)"></wyb-table>
|
||||||
|
</view>
|
||||||
|
<!-- 底部按钮 -->
|
||||||
|
<view class="bottom-bar">
|
||||||
|
<u-row class="button-bar">
|
||||||
|
<u-col :span="6">
|
||||||
|
<u-button type="primary" @click="Submit">{{ $t('message.dn_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 jPicker from '@/components/J-Picker/jPicker.vue';
|
||||||
|
import { session } from '@/store/modules/session';
|
||||||
|
import model from './model';
|
||||||
|
import { Tabheaders } from './config';
|
||||||
|
@Component({
|
||||||
|
components: {
|
||||||
|
jPicker,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
export default class dnReceiptDom extends BasePage {
|
||||||
|
border = true;
|
||||||
|
type = 'text';
|
||||||
|
Tabheaders = Tabheaders;
|
||||||
|
model = model;
|
||||||
|
dnNo: any = '';
|
||||||
|
firstFocus = false;
|
||||||
|
barCode: any = '';
|
||||||
|
dnNoList: any = [];
|
||||||
|
DnlineNo: any = {};
|
||||||
|
LocList: any = [];
|
||||||
|
Loc: any = {};
|
||||||
|
locCode: any = '';
|
||||||
|
async QueryLoc() {
|
||||||
|
await this.model.QueryLoc(this.TheItem.receiveRegion);
|
||||||
|
this.LocList = this.model.LocList;
|
||||||
|
this.Loc = this.model.LocList[0];
|
||||||
|
}
|
||||||
|
async query() {
|
||||||
|
if (!this.dnNo) {
|
||||||
|
this.customToast(this.$t('message.Warehouse_Tip1') as any);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.SunmitList.length != 0) {
|
||||||
|
uni.showModal({
|
||||||
|
content: this.$t('message.submitted') as string,
|
||||||
|
cancelText: this.$t('message.Cancel') as string,
|
||||||
|
confirmText: this.$t('message.workArea_Confirm') as string,
|
||||||
|
success: async (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
this.empty();
|
||||||
|
await model.QuerydnNo(this.dnNo);
|
||||||
|
this.dnNoList = this.model.dnNoList;
|
||||||
|
this.DnlineNo = this.model.DnLineList[0];
|
||||||
|
this.TheItem = this.model.dnNoList[0];
|
||||||
|
this.ItemIndex = 0;
|
||||||
|
await this.QueryLoc();
|
||||||
|
} else if (res.cancel) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
await model.QuerydnNo(this.dnNo);
|
||||||
|
this.dnNoList = this.model.dnNoList;
|
||||||
|
this.DnlineNo = this.model.DnLineList[0];
|
||||||
|
this.TheItem = this.model.dnNoList[0];
|
||||||
|
this.ItemIndex = 0;
|
||||||
|
await this.QueryLoc();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
TheItem: any = {};
|
||||||
|
ItemIndex: any = 0;
|
||||||
|
async SelectDnLine(e: any) {
|
||||||
|
this.DnlineNo = e.pickerName;
|
||||||
|
this.model.dnNoList.forEach((item: any, index: any) => {
|
||||||
|
if (item.dnItem == this.DnlineNo.value) {
|
||||||
|
this.TheItem = item;
|
||||||
|
this.ItemIndex = index;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
await this.QueryLoc();
|
||||||
|
}
|
||||||
|
item: any = '';
|
||||||
|
SelectLoc(e: any) {
|
||||||
|
this.Loc = e.pickerName;
|
||||||
|
}
|
||||||
|
//扫码查询
|
||||||
|
async onOk() {
|
||||||
|
if (!this.dnNo) {
|
||||||
|
this.customToast(this.$t('message.Warehouse_Tip1') as any);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!this.barCode) {
|
||||||
|
this.customToast(this.$t('message.barcode_PleaseScan') as any);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!this.DnlineNo.value) {
|
||||||
|
this.customToast(this.$t('message.DNLine_PleaseSelect') as any);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const selctlist = {
|
||||||
|
dnNo: this.dnNo,
|
||||||
|
barCode: this.barCode,
|
||||||
|
dnItem: this.DnlineNo.value,
|
||||||
|
loginName: session.loginName,
|
||||||
|
factoryCode: session.factoryCode,
|
||||||
|
};
|
||||||
|
await this.model.stoDnProdScan(selctlist);
|
||||||
|
if (this.model.res.code == '1') {
|
||||||
|
this.customToast(this.$t('message.Warehouse_Tip9') as any);
|
||||||
|
const data = this.model.res.data;
|
||||||
|
//this.locCode = data.locCode;
|
||||||
|
this.num = parseFloat(data.scanAmount);
|
||||||
|
//this.TheItem.scanAmount = this.TheItem.scanAmount + 1;
|
||||||
|
//this.barCode = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
num: any = '';
|
||||||
|
SunmitList: any = [];
|
||||||
|
Add() {
|
||||||
|
if (!this.dnNo) {
|
||||||
|
this.customToast(this.$t('message.Warehouse_Tip1') as any);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!this.TheItem) {
|
||||||
|
this.customToast(this.$t('message.Warehouse_Tip6') as any);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!this.barCode) {
|
||||||
|
this.customToast(this.$t('message.barcode_PleaseScan') as any);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!this.Loc) {
|
||||||
|
this.customToast(this.$t('message.Warehouse_Tip2') as any);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// if (!this.Loc) {
|
||||||
|
// this.customToast(this.$t('message.Warehouse_Tip2') as any);
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
if (!this.num) {
|
||||||
|
this.customToast(this.$t('message.Summary_PleaseInputNumber') as any);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (parseFloat(this.num) <= 0) {
|
||||||
|
this.customToast(this.$t('message.Commission_tips3') as any);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (parseFloat(this.num) > parseFloat(this.TheItem.orderAmount)) {
|
||||||
|
this.customToast(this.$t('message.Commission_tips4') as any);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (parseFloat(this.num) + parseFloat(this.TheItem.scanAmount) > parseFloat(this.TheItem.orderAmount)) {
|
||||||
|
this.customToast(this.$t('message.Commission_tips4') as any);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.model.dnNoList[this.ItemIndex].scanAmount += parseFloat(this.num);
|
||||||
|
let obj = {
|
||||||
|
loginName: session.loginName,
|
||||||
|
factoryCode: session.factoryCode,
|
||||||
|
dnNo: this.dnNo,
|
||||||
|
dnItem: this.DnlineNo.value,
|
||||||
|
stoNo: this.TheItem.stoNo,
|
||||||
|
stoItem: this.TheItem.stoItem,
|
||||||
|
materialCode: this.TheItem.materialCode,
|
||||||
|
orderAmount: this.TheItem.orderAmount,
|
||||||
|
scanAmount: this.TheItem.orderAmount,
|
||||||
|
wlCode: this.Loc.value,
|
||||||
|
nowAmount: this.num,
|
||||||
|
barCode: this.barCode,
|
||||||
|
};
|
||||||
|
this.SunmitList.push(obj);
|
||||||
|
this.num = '';
|
||||||
|
this.barCode = '';
|
||||||
|
this.firstFocus = false;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.firstFocus = true;
|
||||||
|
});
|
||||||
|
//this.locCode = '';
|
||||||
|
console.log('this.model.dnNoList', this.model.dnNoList);
|
||||||
|
}
|
||||||
|
deleteItem(e: any) {
|
||||||
|
uni.showModal({
|
||||||
|
content: this.$t('message.product_Delete') as string,
|
||||||
|
cancelText: this.$t('message.Cancel') as string,
|
||||||
|
confirmText: this.$t('message.workArea_Confirm') as string,
|
||||||
|
success: (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
this.model.dnNoList.forEach((item: any) => {
|
||||||
|
if (item.dnItem == e.lineData.dnItem) {
|
||||||
|
item.scanAmount -= parseFloat(e.lineData.nowAmount);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.SunmitList.splice(e.contentIndex, 1);
|
||||||
|
console.log('this.model.dnNoList', this.model.dnNoList);
|
||||||
|
} else if (res.cancel) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
async Submit() {
|
||||||
|
let isTrue = true;
|
||||||
|
this.model.dnNoList.forEach((item: any) => {
|
||||||
|
if (item.orderAmount != item.scanAmount) {
|
||||||
|
this.customToast(this.$t('message.AllThem') as any);
|
||||||
|
return (isTrue = false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (isTrue) {
|
||||||
|
await this.model.SubmitList(this.SunmitList);
|
||||||
|
if (this.model.SubCode == 1) {
|
||||||
|
uni.showToast({
|
||||||
|
title: this.$t('message.success') as string,
|
||||||
|
image: '/static/icons/icon-51.png',
|
||||||
|
});
|
||||||
|
this.empty();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
empty() {
|
||||||
|
this.dnNo = '';
|
||||||
|
this.LocList = [];
|
||||||
|
this.barCode = '';
|
||||||
|
//this.locCode = '';
|
||||||
|
this.Loc = {};
|
||||||
|
this.TheItem = {};
|
||||||
|
this.ItemIndex = 0;
|
||||||
|
this.dnNoList = [];
|
||||||
|
this.DnlineNo = {};
|
||||||
|
this.SunmitList = [];
|
||||||
|
this.model.dnNoList.length = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.page-raw-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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
width: 100%;
|
||||||
|
background: white;
|
||||||
|
border-radius: 15rpx;
|
||||||
|
padding: 10rpx;
|
||||||
|
|
||||||
|
.single {
|
||||||
|
width: 100%;
|
||||||
|
height: 100rpx;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.single-left {
|
||||||
|
width: 79%;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.Purchase-title {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.Purchase {
|
||||||
|
width: 60%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
view {
|
||||||
|
width: 140rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// .material {
|
||||||
|
// width: 100%;
|
||||||
|
// height: 100rpx;
|
||||||
|
// display: flex;
|
||||||
|
// .material-left {
|
||||||
|
// width: 100%;
|
||||||
|
// height: 100%;
|
||||||
|
// display: flex;
|
||||||
|
// view {
|
||||||
|
// width: 100rpx;
|
||||||
|
// line-height: 100rpx;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
.material {
|
||||||
|
width: 100%;
|
||||||
|
height: 100rpx;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.material-left {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
view {
|
||||||
|
width: 140rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.material-right {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.material-right-title {
|
||||||
|
width: 408rpx;
|
||||||
|
height: 100%;
|
||||||
|
line-height: 100rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.material-right-code {
|
||||||
|
width: 80%;
|
||||||
|
height: 100%;
|
||||||
|
line-height: 100rpx;
|
||||||
|
text-align: left;
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.number {
|
||||||
|
height: 100rpx;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.number-left {
|
||||||
|
width: 45%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.number-left-title {
|
||||||
|
width: 120rpx;
|
||||||
|
height: 100%;
|
||||||
|
line-height: 26rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input {
|
||||||
|
width: 200rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
margin-top: 15rpx;
|
||||||
|
margin-left: 15rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.number-right {
|
||||||
|
width: 55%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.number-right-title {
|
||||||
|
width: 140rpx;
|
||||||
|
height: 100%;
|
||||||
|
//text-align: center;
|
||||||
|
line-height: 30rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input {
|
||||||
|
width: 200rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
margin-top: 15rpx;
|
||||||
|
margin-left: 15rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// .library {
|
||||||
|
// width: 100%;
|
||||||
|
// height: 100rpx;
|
||||||
|
// display: flex;
|
||||||
|
// .library-left {
|
||||||
|
// width: 50%;
|
||||||
|
// height: 100%;
|
||||||
|
// display: flex;
|
||||||
|
// view {
|
||||||
|
// width: 100rpx;
|
||||||
|
// line-height: 100rpx;
|
||||||
|
// }
|
||||||
|
// .search {
|
||||||
|
// padding-left: 20px;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// .library-right {
|
||||||
|
// width: 50%;
|
||||||
|
// height: 100%;
|
||||||
|
// display: flex;
|
||||||
|
// .library-right-title {
|
||||||
|
// width: 120rpx;
|
||||||
|
// height: 100%;
|
||||||
|
// padding-left: 4px;
|
||||||
|
// line-height: 100rpx;
|
||||||
|
// }
|
||||||
|
// .input {
|
||||||
|
// width: 200rpx;
|
||||||
|
// height: 70rpx;
|
||||||
|
// margin-top: 15rpx;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
.add {
|
||||||
|
width: 100%;
|
||||||
|
height: 100rpx;
|
||||||
|
position: absolute;
|
||||||
|
top: 351px;
|
||||||
|
left: 0;
|
||||||
|
|
||||||
|
button {
|
||||||
|
position: absolute;
|
||||||
|
top: 3rpx;
|
||||||
|
right: 35rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.config {
|
||||||
|
width: 100%;
|
||||||
|
height: 100rpx;
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
// top: 420px;
|
||||||
|
// left: 0;
|
||||||
|
button {
|
||||||
|
position: absolute;
|
||||||
|
// top: 455px;
|
||||||
|
right: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.AddQty {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.centerstyle {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,82 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zhou lei
|
||||||
|
* @Date: 2022-09-28 10:26:36
|
||||||
|
* @LastEditTime: 2023-05-22 17:35:34
|
||||||
|
* @LastEditors: zhou lei
|
||||||
|
* @Description:
|
||||||
|
* @FilePath: \hgwms-factory-app\src\pages\raw\STO\FactorySTO-Storage\model.ts
|
||||||
|
* 联系方式:910592680@qq.com 18669792120 科海达信息技术有限公司
|
||||||
|
*/
|
||||||
|
import { 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';
|
||||||
|
@Module({
|
||||||
|
namespaced: true,
|
||||||
|
dynamic: true,
|
||||||
|
store,
|
||||||
|
name: 'raw.STO.FactorySTO-Storage.index',
|
||||||
|
})
|
||||||
|
export class ReceiptModule extends VuexModule {
|
||||||
|
//俄罗斯 STO入库 扫描DN单号
|
||||||
|
dnNoList: any = [];
|
||||||
|
DnLineList: any = [];
|
||||||
|
@MutationAction
|
||||||
|
async QuerydnNo(dnNo: any) {
|
||||||
|
console.log('dnNo', dnNo);
|
||||||
|
const res: any = await http.post(url.auth.query.findStoDnReceiveInfo, {
|
||||||
|
factoryCode: session.factoryCode,
|
||||||
|
loginName: session.loginName,
|
||||||
|
dnNo,
|
||||||
|
});
|
||||||
|
const dnNoList = res.data;
|
||||||
|
const DnLineList = [];
|
||||||
|
dnNoList.forEach((item: any) => {
|
||||||
|
const obj = {
|
||||||
|
value: item.dnItem,
|
||||||
|
lable: item.dnItem,
|
||||||
|
};
|
||||||
|
DnLineList.push(obj);
|
||||||
|
});
|
||||||
|
return { dnNoList, DnLineList };
|
||||||
|
}
|
||||||
|
//俄罗斯 STO入库 查询库位
|
||||||
|
LocList: any = [];
|
||||||
|
@MutationAction
|
||||||
|
async QueryLoc(sendSpot: any) {
|
||||||
|
const res: any = await http.post(url.auth.query.queryByFactoryCodeAndWorkAreaCode, {
|
||||||
|
factoryCode: session.factoryCode,
|
||||||
|
loginName: session.loginName,
|
||||||
|
workArea: session.workareaCode,
|
||||||
|
sendSpot,
|
||||||
|
});
|
||||||
|
const LocList = [];
|
||||||
|
res.forEach((item: any) => {
|
||||||
|
const obj = {
|
||||||
|
value: item.locationCode,
|
||||||
|
lable: item.locationCode,
|
||||||
|
};
|
||||||
|
LocList.push(obj);
|
||||||
|
});
|
||||||
|
return { LocList };
|
||||||
|
}
|
||||||
|
//扫描条码
|
||||||
|
res: any = '';
|
||||||
|
@MutationAction
|
||||||
|
async stoDnProdScan(list: any) {
|
||||||
|
const res: any = await http.post(url.auth.query.factorystoDnReceiveScan, list);
|
||||||
|
//const SubCode = res.code;
|
||||||
|
return { res };
|
||||||
|
}
|
||||||
|
//俄罗斯 入库提交
|
||||||
|
SubCode: any = '';
|
||||||
|
@MutationAction
|
||||||
|
async SubmitList(list: any) {
|
||||||
|
const res: any = await http.post(url.auth.query.factorystoDnReceiveConfirm, list);
|
||||||
|
const SubCode = res.code;
|
||||||
|
return { SubCode };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default getModule(ReceiptModule);
|
Loading…
Reference in New Issue