cosmoim-852 fix 俄罗斯新增半成品SO
parent
9914874d0b
commit
39a15ee288
@ -0,0 +1,78 @@
|
||||
/*
|
||||
* @Author: zhou lei
|
||||
* @Date: 2021-11-11 11:09:57
|
||||
* @LastEditTime: 2021-12-14 10:13:18
|
||||
* @LastEditors: zhou lei
|
||||
* @Description:
|
||||
* @FilePath: /wms_haiwai_app/src/pages/raw/commission/goOut/config.ts
|
||||
* 联系方式:910592680@qq.com 18669792120 科海达信息技术有限公司
|
||||
*/
|
||||
/**
|
||||
* 看单明细表格列
|
||||
*/
|
||||
import vm from '@/main';
|
||||
export const headers = [
|
||||
{
|
||||
label: vm.$t('message.Pi_OrderNo'),
|
||||
key: 'order1',
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.Line'),
|
||||
key: 'order2',
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.matcode'),
|
||||
key: 'productCode',
|
||||
width: 300,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.po_MaterielDes'),
|
||||
key: 'productDescZh',
|
||||
width: 430,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.product_barCode'),
|
||||
key: 'barcode',
|
||||
width: 260,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.CommissionedLocation'),
|
||||
key: 'locCode',
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.Operation'),
|
||||
key: 'createdBy',
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.operatingTime'),
|
||||
key: 'createdDate',
|
||||
width: 470,
|
||||
},
|
||||
];
|
||||
|
||||
export const detailHeader = [
|
||||
{
|
||||
label: vm.$t('message.po_MaterielNo'),
|
||||
key: 'materialCode',
|
||||
width: 301,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.CommissionedLocation'),
|
||||
key: 'locCode',
|
||||
width: 186,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.product_Number'),
|
||||
key: 'qty',
|
||||
width: 186,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.product_barCode'),
|
||||
key: 'barcode',
|
||||
width: 300,
|
||||
},
|
||||
];
|
@ -0,0 +1,73 @@
|
||||
<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.Pi_QueryResults') }}</view>
|
||||
<view class="right"></view>
|
||||
</view>
|
||||
<view class="table-wrapper">
|
||||
<wyb-table class="table" ref="table" width="100%" show-left-and-right-border :headers="headers" :contents="model.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';
|
||||
@Component
|
||||
export default class RawReceiptDetail extends BasePage {
|
||||
model = model;
|
||||
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;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
.table-wrapper {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.form {
|
||||
background-color: #fff;
|
||||
padding: 40rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,552 @@
|
||||
<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.SemiFinished_SO') }}</view>
|
||||
<view class="right"></view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<!-- 单号 -->
|
||||
<view class="single">
|
||||
<view class="single-left">
|
||||
<view>{{ $t('message.CommissionedSingleNumber') }}</view>
|
||||
<u-search :placeholder="$t('message.InventoryPleaseScan')" v-model.trim="form.documentNo" @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>
|
||||
<!-- 物料 -->
|
||||
<view class="material">
|
||||
<view class="material-left">
|
||||
<view>{{ $t('message.CommissionedMaterielNo') }}</view>
|
||||
<jPicker sureColor="#ff0000" style="width: 260rpx" @bindpicker="materialChoice" showKey="value" valKey="value" :val="every.materialCode" class="search" :options="materialList" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="material">
|
||||
<view class="material-right">
|
||||
<view class="material-right-title">{{ $t('message.CommissionedMaterielDesc') }}</view>
|
||||
<view class="material-right-code" style="overflow: hidden">{{ every.materialDesc }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 需求数量 -->
|
||||
<view class="number">
|
||||
<view class="number-left">
|
||||
<view class="number-left-title">{{ $t('message.CommissionedDemandData') }}</view>
|
||||
<u-input v-model="every.orderAmount" placeholder=" " :type="type" :border="border" class="input" disabled style="padding: '0'; flex: 0.9" />
|
||||
</view>
|
||||
<view class="number-right">
|
||||
<view class="number-right-title">{{ $t('message.Cumulative') }}</view>
|
||||
<u-input placeholder=" " v-model="every.outAmount" :type="type" :border="border" class="input" style="padding: '0'" disabled />
|
||||
</view>
|
||||
</view>
|
||||
<!-- 库位 -->
|
||||
<view class="library">
|
||||
<view class="library-left">
|
||||
<view>{{ $t('message.CommissionedLocation') }}</view>
|
||||
<jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="LocationChoice" showKey="value" valKey="value" :val="wlCode.value" class="search" :options="Loc" />
|
||||
</view>
|
||||
<view class="library-right">
|
||||
<view class="library-right-title">{{ $t('message.CommissionedThisNumber') }}</view>
|
||||
<u-input :placeholder="$t('message.po_PleaseInput')" v-model="nowAmount" type="number" :border="border" class="input" />
|
||||
</view>
|
||||
</view>
|
||||
<!-- 条码 -->
|
||||
<view class="single">
|
||||
<view class="single-left">
|
||||
<view>{{ $t('message.product_barCode') }}:</view>
|
||||
<u-search :placeholder="$t('message.PleaseScan')" style="z-index: 10000" v-model="Barcode" @search="searchBarcode" :show-action="false"></u-search>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 添加 -->
|
||||
<view class="add">
|
||||
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
|
||||
</view>
|
||||
<!-- 表格 -->
|
||||
<wyb-table class="table" ref="table" width="100%" show-left-and-right-border :headers="detailHeader" :contents="list" :show-vert-border="false" @onCellClick="deleteItem($event)"></wyb-table>
|
||||
</view>
|
||||
<!-- 底部按钮 -->
|
||||
<view class="bottom-bar">
|
||||
<u-row class="button-bar">
|
||||
<u-col :span="4">
|
||||
<u-button type="primary" @click="bill">{{ $t('message.CommissionedDetails') }}</u-button>
|
||||
</u-col>
|
||||
<u-col :span="4">
|
||||
<u-button type="primary" @click="onSubmit">{{ $t('message.product_Upload') }}</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 } 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 { detailHeader } from './config';
|
||||
import model from './model';
|
||||
@Component({
|
||||
components: {
|
||||
jPicker,
|
||||
},
|
||||
})
|
||||
export default class SemiFinishedSO extends BasePage {
|
||||
model = model;
|
||||
detailHeader = detailHeader;
|
||||
form: any = {
|
||||
documentNo: '',
|
||||
};
|
||||
material: any = {};
|
||||
materialList: any = [];
|
||||
list: any = [];
|
||||
every: any = '';
|
||||
value = '';
|
||||
type = 'text';
|
||||
border = true;
|
||||
nowAmount: any = '';
|
||||
//库位
|
||||
Loc: any = [];
|
||||
//所选择的库位
|
||||
wlCode: any = '';
|
||||
materialIndex: any = null;
|
||||
Barcode: any = '';
|
||||
Container: any = '';
|
||||
async QueryLoc() {
|
||||
await this.model.queryItemLoc({
|
||||
workArea: session.workareaCode,
|
||||
loginName: session.loginName,
|
||||
sendSpot: null,
|
||||
materialCode: this.every.materialCode,
|
||||
factoryCode: session.factoryCode,
|
||||
});
|
||||
this.Loc = [];
|
||||
this.wlCode = '';
|
||||
if (this.model.LocList.length == 0) {
|
||||
uni.showModal({
|
||||
content: this.$t('message.selected') as any,
|
||||
showCancel: false,
|
||||
confirmText: this.$t('message.workArea_Confirm') as any,
|
||||
});
|
||||
} else {
|
||||
this.Loc = this.model.LocList;
|
||||
this.wlCode = this.Loc[0];
|
||||
}
|
||||
}
|
||||
empty() {
|
||||
this.list = [];
|
||||
this.wlCode = '';
|
||||
this.nowAmount = '';
|
||||
this.every = '';
|
||||
this.materialList = [];
|
||||
this.Loc = [];
|
||||
this.Barcode = '';
|
||||
this.Container = '';
|
||||
}
|
||||
//输入单号 查询数据
|
||||
async query() {
|
||||
this.list = [];
|
||||
//this.wlCode = '';
|
||||
this.nowAmount = '';
|
||||
this.every = '';
|
||||
if (this.form.documentNo == '') {
|
||||
this.customToast(this.$t('message.Commission_tips1') as any);
|
||||
return;
|
||||
}
|
||||
let res = await this.model.queryOutsourcing(this.form.documentNo);
|
||||
this.material = res.data;
|
||||
this.materialList = [];
|
||||
this.material.forEach((item: any) => {
|
||||
let pickerName: any = {};
|
||||
pickerName.label = item.materialCode;
|
||||
pickerName.value = item.materialCode;
|
||||
this.materialList.push(pickerName);
|
||||
});
|
||||
this.every = this.material[0];
|
||||
this.materialIndex = 0;
|
||||
// await this.QueryLoc();
|
||||
}
|
||||
materialChoice(e: any) {
|
||||
this.nowAmount = '';
|
||||
this.material.forEach(async (item: any, index: any) => {
|
||||
if (item.materialCode == e.pickerName.value) {
|
||||
this.every = item;
|
||||
this.materialIndex = index;
|
||||
// await this.QueryLoc();
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
LocationChoice(e: any) {
|
||||
this.wlCode = e.pickerName;
|
||||
}
|
||||
async searchBarcode() {
|
||||
if (this.Barcode == '') {
|
||||
this.customToast(this.$t('message.barcode') as string);
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
productCode: this.every.materialCode,
|
||||
barcode: this.Barcode,
|
||||
};
|
||||
await this.model.searchBarcode(params);
|
||||
this.Container = this.model.ContainerCode;
|
||||
this.Loc.push({
|
||||
value: this.Container.locCode,
|
||||
label: this.Container.locCode + '(' + this.Container.locCodesendSpot + ')',
|
||||
});
|
||||
this.wlCode = this.Loc[0];
|
||||
this.nowAmount = 1;
|
||||
}
|
||||
//点击添加
|
||||
Add() {
|
||||
if (this.Container == '') {
|
||||
this.customToast(this.$t('message.scanningContainer') as any);
|
||||
return;
|
||||
}
|
||||
if (this.Container.cpRef4 == null) {
|
||||
if (parseFloat(this.nowAmount) > this.Container.qty) {
|
||||
this.customToast(this.$t('message.AppendMateriel3') as any);
|
||||
console.log('1');
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (parseFloat(this.nowAmount) > this.Container.qty - parseFloat(this.Container.cpRef4)) {
|
||||
this.customToast(this.$t('message.AppendMateriel3') as any);
|
||||
console.log('2');
|
||||
return;
|
||||
}
|
||||
}
|
||||
let codenum = 0;
|
||||
if (this.list.length != 0) {
|
||||
this.list.forEach((item: any) => {
|
||||
if (item.barCode == this.Container.barcode) {
|
||||
num += item.receiptAmount;
|
||||
}
|
||||
});
|
||||
}
|
||||
if (this.Container.cpRef4 == null) {
|
||||
if (parseFloat(this.nowAmount) + codenum > this.Container.qty) {
|
||||
this.customToast(this.$t('message.AppendMateriel3') as any);
|
||||
console.log('3');
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (parseFloat(this.nowAmount) + codenum > this.Container.qty - parseFloat(this.Container.cpRef4)) {
|
||||
this.customToast(this.$t('message.AppendMateriel3') as any);
|
||||
console.log('4');
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!this.every) {
|
||||
this.customToast(this.$t('message.Commission_tips6') as any);
|
||||
return;
|
||||
}
|
||||
if (this.nowAmount == '' || this.wlCode == '') {
|
||||
this.customToast(this.$t('message.Commission_tips2') as any);
|
||||
return;
|
||||
}
|
||||
if (parseFloat(this.nowAmount) <= 0) {
|
||||
this.customToast(this.$t('message.Commission_tips3') as any);
|
||||
return;
|
||||
}
|
||||
let num: number = parseFloat(this.nowAmount) + parseFloat(this.every.outAmount);
|
||||
if (num > parseFloat(this.every.orderAmount)) {
|
||||
// uni.showModal({
|
||||
// title: this.$t('message.Pi_tip') as any,
|
||||
// content: this.$t('message.demandQuantity') as any,
|
||||
// cancelText: this.$t('message.Cancel') as any,
|
||||
// confirmText: this.$t('message.workArea_Confirm') as any,
|
||||
// success: (res) => {
|
||||
// if (res.confirm) {
|
||||
// let arr = {
|
||||
// poNo: this.form.documentNo,
|
||||
// materialCode: this.every.materialCode,
|
||||
// loginName: this.session.loginName,
|
||||
// factoryCode: this.session.factoryCode,
|
||||
// wlCode: this.wlCode.label,
|
||||
// nowAmount: this.nowAmount,
|
||||
// // barCode: this.Container.barcode,
|
||||
// barCode: this.Barcode,
|
||||
// };
|
||||
// this.list.push(arr);
|
||||
// this.material[this.materialIndex].outAmount += parseFloat(this.list[this.list.length - 1].nowAmount);
|
||||
// this.nowAmount = '';
|
||||
// } else if (res.cancel) {
|
||||
// return;
|
||||
// }
|
||||
// },
|
||||
// });
|
||||
this.customToast(this.$t('message.AppendMateriel3') as any);
|
||||
console.log('5');
|
||||
return;
|
||||
} else {
|
||||
let arr = {
|
||||
loginName: this.session.loginName,
|
||||
factoryCode: this.session.factoryCode,
|
||||
nxOutCode: this.form.documentNo,
|
||||
rowItem: this.every.rowItem,
|
||||
materialCode: this.every.materialCode,
|
||||
materialDesc: this.every.materialDesc,
|
||||
locCode: this.wlCode.value,
|
||||
barcode: this.Container.barcode,
|
||||
qty: this.nowAmount,
|
||||
};
|
||||
this.list.push(arr);
|
||||
this.material[this.materialIndex].outAmount += parseFloat(this.list[this.list.length - 1].qty);
|
||||
this.nowAmount = '';
|
||||
this.Barcode = '';
|
||||
this.Container = '';
|
||||
}
|
||||
}
|
||||
deleteItem(e: any) {
|
||||
uni.showModal({
|
||||
content: this.$t('message.product_Delete') as any,
|
||||
cancelText: this.$t('message.Cancel') as any,
|
||||
confirmText: this.$t('message.workArea_Confirm') as any,
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.list.splice(e.contentIndex, 1);
|
||||
let i: any;
|
||||
this.material.forEach((item: any, index: any) => {
|
||||
if (item.materialCode == e.lineData.materialCode) {
|
||||
i = index;
|
||||
}
|
||||
});
|
||||
this.material[i].outAmount -= parseFloat(e.lineData.qty);
|
||||
} else if (res.cancel) {
|
||||
return;
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
async onSubmit() {
|
||||
if (this.list == null || this.list.length == 0) {
|
||||
this.customToast(this.$t('message.Pi_NoData') as any);
|
||||
return;
|
||||
}
|
||||
await this.model.submitOutsourcing(this.list);
|
||||
this.empty();
|
||||
await this.query();
|
||||
}
|
||||
async bill() {
|
||||
if (this.form.documentNo == '') {
|
||||
this.customToast(this.$t('message._tips6') as any);
|
||||
return;
|
||||
}
|
||||
let content = {
|
||||
loginName: session.loginName,
|
||||
order1: this.form.documentNo,
|
||||
factoryCode: session.factoryCode,
|
||||
};
|
||||
await this.model.querydetaildlist(content);
|
||||
this.toPage(this.page.raw.SemiFinished.SemiFinishedSO.detail);
|
||||
}
|
||||
}
|
||||
</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: 80%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
view {
|
||||
width: 130rpx;
|
||||
height: 100%;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
}
|
||||
.single-right {
|
||||
button {
|
||||
margin-top: 15rpx;
|
||||
width: 150rpx;
|
||||
height: 70rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.material {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
.material-left {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
view {
|
||||
width: 140rpx;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
.search {
|
||||
padding-left: 9px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.material {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
.material-right {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
.material-right-title {
|
||||
width: 140rpx;
|
||||
height: 100%;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
.material-right-code {
|
||||
width: 80%;
|
||||
height: 100%;
|
||||
line-height: 100rpx;
|
||||
text-align: left;
|
||||
padding-left: 10px;
|
||||
// line-height: 100rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.number {
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
.number-left {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
.number-left-title {
|
||||
width: 120rpx;
|
||||
height: 100%;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
.input {
|
||||
width: 200rpx;
|
||||
height: 70rpx;
|
||||
margin-top: 15rpx;
|
||||
margin-left: 15rpx;
|
||||
}
|
||||
}
|
||||
.number-right {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
.number-right-title {
|
||||
width: 120rpx;
|
||||
height: 100%;
|
||||
line-height: 100rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.input {
|
||||
width: 200rpx;
|
||||
height: 70rpx;
|
||||
margin-top: 15rpx;
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.library {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
.library-left {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
view {
|
||||
width: 70rpx;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
.search {
|
||||
padding-left: 1px;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
overflow: scroll;
|
||||
}
|
||||
}
|
||||
.library-right {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
.library-right-title {
|
||||
width: 120rpx;
|
||||
height: 100%;
|
||||
line-height: 100rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.input {
|
||||
width: 200rpx;
|
||||
height: 70rpx;
|
||||
margin-top: 15rpx;
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.add {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
position: absolute;
|
||||
top: 349px;
|
||||
left: 0;
|
||||
button {
|
||||
position: absolute;
|
||||
top: 3rpx;
|
||||
right: 35rpx;
|
||||
z-index: 10000;
|
||||
}
|
||||
}
|
||||
}
|
||||
.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,211 @@
|
||||
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';
|
||||
|
||||
class OrderInInfo {
|
||||
stoAmount?: 0;
|
||||
stoNo?: string; //STO采购单号
|
||||
orderAmount?: string; //单据总数
|
||||
Allocated?: string; //已分配
|
||||
Unallocated?: string; //未分配
|
||||
}
|
||||
|
||||
@Module({
|
||||
namespaced: true,
|
||||
dynamic: true,
|
||||
store,
|
||||
name: 'product.outbound.Semi-finished-SO',
|
||||
})
|
||||
export class ReturningModule extends VuexModule {
|
||||
/**
|
||||
* 月台列表
|
||||
*/
|
||||
returningTypeList: any[] = [];
|
||||
detailedList: any;
|
||||
/**
|
||||
* 物料列表
|
||||
*/
|
||||
materielList: any[] = [];
|
||||
locationCodeList: any[] = [];
|
||||
LocList: any[] = [];
|
||||
//条码扫描的返回的结果
|
||||
oneMaterielDetail: any = {};
|
||||
/**
|
||||
* 订单号查询结果
|
||||
*/
|
||||
orderInInfo: OrderInInfo = new OrderInInfo();
|
||||
//记账按钮的code码
|
||||
code = '';
|
||||
/**
|
||||
* 委外出库单号查询
|
||||
* @param orderNo
|
||||
*/
|
||||
@Action
|
||||
async queryOrder(form: any) {
|
||||
const result = await http.post(url.material.commission.goOut.queryOrder, {
|
||||
...form,
|
||||
loginName: session.loginName,
|
||||
factoryCode: session.factoryCode,
|
||||
});
|
||||
const orderInInfo = result.data.records[0] || {};
|
||||
return { orderInInfo };
|
||||
}
|
||||
/**
|
||||
* 库位
|
||||
*/
|
||||
// @MutationAction
|
||||
// async queryByFactoryCodeAndWorkAreaCode() {
|
||||
// const list: [] = await http.post(url.material.commission.goOut.queryByFactoryCodeAndWorkAreaCode, {
|
||||
// factoryCode: session.factoryCode,
|
||||
// whCode: session.warehouseCode,
|
||||
// loginName: session.loginName,
|
||||
// });
|
||||
// const locationCodeList = list.map((item: any) => ({
|
||||
// label: item.locationCode,
|
||||
// value: item.locationCode,
|
||||
// }));
|
||||
// return { locationCodeList };
|
||||
// }
|
||||
/**
|
||||
* 获取物料
|
||||
*
|
||||
* @returns
|
||||
* @memberof ReturningModule
|
||||
*/
|
||||
@MutationAction
|
||||
async outInfo(poNo: string) {
|
||||
const list: [] = await http.post(url.material.commission.goOut.outInfo, {
|
||||
factoryCode: session.factoryCode,
|
||||
poNo: poNo,
|
||||
loginName: session.loginName,
|
||||
});
|
||||
const locationCodeList = list.map((item: any) => ({
|
||||
label: item.locationCode,
|
||||
value: item.locationCode,
|
||||
}));
|
||||
return { locationCodeList };
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交
|
||||
*/
|
||||
@Action
|
||||
async materialComplete(form: any) {
|
||||
const res = await http.post(url.material.commission.goOut.materialComplete, {
|
||||
factoryCode: session.factoryCode,
|
||||
loginName: session.loginName,
|
||||
...form,
|
||||
});
|
||||
console.log(res, '>>>>>res');
|
||||
}
|
||||
|
||||
/**
|
||||
* 扫条码
|
||||
*/
|
||||
@Action
|
||||
async tluSubmit(list: any[]) {
|
||||
const obj = {
|
||||
barcode: list[0].barCode,
|
||||
loginName: session.loginName,
|
||||
};
|
||||
let oneMaterielDetail: any = {};
|
||||
const { data }: any = await http.post(url.outbound.stoOutbound.checkScan, obj);
|
||||
console.log('shneme a ', data.records);
|
||||
oneMaterielDetail = data.records[0];
|
||||
data.records[0].materialCode = list[0].productCode;
|
||||
data.records[0].materialDesc = list[0].productDescZh;
|
||||
console.log('aaaaa', oneMaterielDetail);
|
||||
return oneMaterielDetail;
|
||||
}
|
||||
/**
|
||||
* 确认按钮
|
||||
* @param orderNo
|
||||
*/
|
||||
@MutationAction
|
||||
async confirm(list: any[]) {
|
||||
const { code, data } = await http.post(url.outbound.stoOutbound.Bookkeeping, list);
|
||||
console.log('res数据', data, code);
|
||||
// if (code == '1') {
|
||||
// uni.showToast({ icon: 'success', title: msg });
|
||||
// } else {
|
||||
// uni.showToast({ icon: 'none', title: msg });
|
||||
// }
|
||||
const materielList: any = [];
|
||||
return { code, materielList };
|
||||
}
|
||||
//委外出库 关闭订单
|
||||
@MutationAction
|
||||
async closeCode(poNo: any) {
|
||||
const res: any = await http.post(url.outbound.stoOutbound.close, {
|
||||
poNo,
|
||||
loginName: session.loginName,
|
||||
factoryCode: session.factoryCode,
|
||||
});
|
||||
const code: any = res.code;
|
||||
return { code };
|
||||
}
|
||||
|
||||
//委外出库 初始化获取库位
|
||||
// @Action({ commit: 'updateCheckedOrderInInfoListKw' })
|
||||
@MutationAction
|
||||
async queryCodeAndWorkAreaCode(content: any) {
|
||||
const res: any = await http.post('/wmspda/fg/queryByFactoryCodeAndWorkAreaCode', content);
|
||||
console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>', res);
|
||||
const LocList = res;
|
||||
console.log('LocList', LocList);
|
||||
return { LocList };
|
||||
}
|
||||
@MutationAction
|
||||
async queryItemLoc(params: any = {}) {
|
||||
const res: any = await http.post(url.sortscan.save.queryWlByMat, params);
|
||||
const LocList = [];
|
||||
res.forEach((item: any) => {
|
||||
const arr: any = {
|
||||
label: item.locationCode,
|
||||
value: item.locationCode + '(' + item.sendSpot + ')' + '(' + item.amount + ')',
|
||||
};
|
||||
LocList.push(arr);
|
||||
});
|
||||
return { LocList };
|
||||
}
|
||||
@Action
|
||||
async queryOutsourcing(nxOutCode: any) {
|
||||
const res = await http.post(url.outbound.stoOutbound.findSfgInfoByDN, {
|
||||
nxOutCode,
|
||||
loginName: session.loginName,
|
||||
factoryCode: session.factoryCode,
|
||||
});
|
||||
return res;
|
||||
}
|
||||
|
||||
@Action
|
||||
async submitOutsourcing(upload: any) {
|
||||
const res = await http.post(url.outbound.stoOutbound.confirmSfgDeliver, upload);
|
||||
return res;
|
||||
}
|
||||
//查询明细
|
||||
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
|
||||
async querydetaildlist(content: any) {
|
||||
const res: any = await http.post('/wmspda/fg/querySfgListInfoByDnNo/russia', content);
|
||||
console.log('明细》》》》》》》》》', res.list);
|
||||
this.detailedList = res.data;
|
||||
return res;
|
||||
}
|
||||
ContainerCode: any = '';
|
||||
@MutationAction
|
||||
async searchBarcode(params: any) {
|
||||
const res: any = await http.post(url.auth.query.barcode, {
|
||||
factoryCode: session.factoryCode,
|
||||
loginName: session.loginName,
|
||||
barcode: params.barcode,
|
||||
productCode: params.productCode,
|
||||
});
|
||||
const ContainerCode = res.data;
|
||||
return { ContainerCode };
|
||||
}
|
||||
}
|
||||
|
||||
export default getModule(ReturningModule);
|
@ -0,0 +1,129 @@
|
||||
<template>
|
||||
<view class="page-raw-warehouse">
|
||||
<view class="header">
|
||||
<view class="left">
|
||||
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
|
||||
</view>
|
||||
<view class="title">{{ $t('message.RowWarehouse') }}</view>
|
||||
<view class="right"></view>
|
||||
</view>
|
||||
<view class="container">
|
||||
<u-row :gutter="30">
|
||||
<u-col :span="12" v-for="(item, index) in childData" :key="index">
|
||||
<u-button
|
||||
@click.native="
|
||||
uni.navigateTo({
|
||||
url: item.href,
|
||||
})
|
||||
"
|
||||
>
|
||||
<u-icon size="80" :name="item.iconClass"></u-icon>
|
||||
<text class="name"> {{ session.lang == 'en' ? index + 1 + ' ' + item.engResourceName : index + 1 + ' ' + item.resourceName }}</text>
|
||||
</u-button>
|
||||
</u-col>
|
||||
<!-- <u-col :span="12">
|
||||
<u-button @click="toPage(page.raw.warehouse.rowInventory.index)">
|
||||
<u-icon size="80" name="/static/icons/icon-14.png"></u-icon>
|
||||
<text class="name">4.{{ '原材料盘点' }}</text>
|
||||
</u-button>
|
||||
</u-col> -->
|
||||
<!--
|
||||
<u-col :span="12">
|
||||
<u-button @click="toPage(page.raw.warehouse.rowScrap.index)">
|
||||
<u-icon size="80" name="/static/icons/icon-14.png"></u-icon>
|
||||
<text class="name">2.{{ $t('message.RowScrap') }}</text>
|
||||
</u-button>
|
||||
</u-col>
|
||||
<u-col :span="12">
|
||||
<u-button @click="toPage(page.raw.warehouse.rowCollect.index)">
|
||||
<u-icon size="80" name="/static/icons/icon-14.png"></u-icon>
|
||||
<text class="name">3.{{ $t('message.RowCollectionAndBorrowing') }}</text>
|
||||
</u-button>
|
||||
</u-col> -->
|
||||
</u-row>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component } from 'vue-property-decorator';
|
||||
import { BasePage } from '@/components/base/page';
|
||||
@Component
|
||||
export default class RawAppointment extends BasePage {
|
||||
childData: any;
|
||||
onLoad(option: { childData: any }) {
|
||||
this.childData = JSON.parse(option.childData);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page-raw-warehouse {
|
||||
background-color: #f4f7fc;
|
||||
padding-top: 88rpx;
|
||||
min-height: 100%;
|
||||
|
||||
.header {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
padding-top: 18px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 99;
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
background-color: #255cea;
|
||||
/* height: 46px; */
|
||||
line-height: 46px;
|
||||
color: #fff;
|
||||
font-size: 17px;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
box-shadow: 0 1px 2px #6b90ef;
|
||||
.title {
|
||||
flex: 3;
|
||||
}
|
||||
.left,
|
||||
.right {
|
||||
flex: 1;
|
||||
}
|
||||
.icon {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.container {
|
||||
margin-top: 36rpx;
|
||||
padding: 30rpx 15rpx 0;
|
||||
.u-row {
|
||||
}
|
||||
.u-col {
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.u-btn {
|
||||
height: 160rpx;
|
||||
padding: 0 28rpx;
|
||||
border: 1px solid #f0f5fc;
|
||||
color: #42465a;
|
||||
font-size: 30rpx;
|
||||
font-weight: 400;
|
||||
&:after {
|
||||
border-color: #f0f5fc;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
.name {
|
||||
flex: 1;
|
||||
margin-left: 28rpx;
|
||||
text-align: left;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue