cosmoim-852 fix 新增半成品交接出库
parent
5c7956f2da
commit
23f1bfd330
@ -0,0 +1,39 @@
|
||||
/**
|
||||
* 看单交接明细表格列
|
||||
*/
|
||||
import vm from '@/main';
|
||||
export const headers = [
|
||||
{
|
||||
label: vm.$t('message.Pi_OrderNo'),
|
||||
key: 'proMoveCode', //单号
|
||||
width: 250,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.ModelCode'),
|
||||
key: 'materialCode', //型号编码
|
||||
width: 220,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.ModelName'),
|
||||
key: 'materialDesc', //型号名称
|
||||
width: 430,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.product_barCode'),
|
||||
key: 'barCode', //条码号
|
||||
width: 260,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.SourceLocation'),
|
||||
key: 'wlFromCode', //源库位
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.Warehouse_TargetLocation'),
|
||||
key: 'wlToCode', //目标库位
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.operatingTime'),
|
||||
key: 'moveTime', //操作时间
|
||||
width: 465,
|
||||
},
|
||||
];
|
@ -0,0 +1,100 @@
|
||||
<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%" show-left-and-right-border :headers="headers" :contents="model.detailList" :show-vert-border="false" />
|
||||
</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 KanDanHandOverDetails extends BasePage {
|
||||
order = '';
|
||||
headers = headers;
|
||||
model = model;
|
||||
}
|
||||
</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,226 @@
|
||||
<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.outbound') }}</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.Batch')" 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 :label="$t('message.Quantity')">
|
||||
<u-input :disabled="true" v-model="every.qty" placeholder="" />
|
||||
</u-form-item>
|
||||
<!-- 已扫数量 -->
|
||||
<u-form-item :label="$t('message.SweptQuantity')">
|
||||
<u-input :disabled="true" v-model="every.actualQty" placeholder="" />
|
||||
</u-form-item>
|
||||
<!-- 半成品编码 -->
|
||||
<u-form-item :required="true" :label="$t('message.coding')">
|
||||
<jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="materialConfirm" showKey="value" valKey="value" :val="every.productCode" class="search" :options="model.materielList" />
|
||||
</u-form-item>
|
||||
<!-- 半成品名称 -->
|
||||
<u-form-item :label="$t('message.SemiFinishedName')">
|
||||
<u-input :disabled="true" v-model="every.productDescZh" placeholder="" style="overflow: hidden" />
|
||||
</u-form-item>
|
||||
<!-- 目标工位 -->
|
||||
<u-form-item :label="$t('message.target')">
|
||||
<u-input :disabled="true" v-model="every.aimWl" placeholder="" />
|
||||
</u-form-item>
|
||||
<!-- 半成品条码 -->
|
||||
<u-form-item :required="true" :label="$t('message.product_barCode')" prop="orderNo">
|
||||
<u-search :placeholder="$t('message.Commission_tips1')" v-model.trim="barcode" @search="SearchBarcode" :show-action="false"></u-search>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="bottom-bar">
|
||||
<u-row class="button-bar">
|
||||
<!-- 明细 -->
|
||||
<u-col :span="6">
|
||||
<u-button type="primary" @click="bill">{{ $t('message.detailed') }}</u-button>
|
||||
</u-col>
|
||||
<!-- 确定 -->
|
||||
<!-- <u-col :span="4">
|
||||
<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 {
|
||||
model = model;
|
||||
border = true;
|
||||
order3 = '';
|
||||
every: any = '';
|
||||
barcode: any = '';
|
||||
//查询单号
|
||||
async query() {
|
||||
if (this.order3 == '') {
|
||||
this.customToast(this.$t('message.batch') as string);
|
||||
return;
|
||||
}
|
||||
await this.model.takeYKOrder({
|
||||
order3: this.order3,
|
||||
});
|
||||
if (this.model.code == '1') {
|
||||
uni.showToast({
|
||||
title: this.$t('message.successful') as string,
|
||||
duration: 2000,
|
||||
image: '/static/icons/icon-51.png',
|
||||
});
|
||||
this.every = this.model.orderInInfoList[0];
|
||||
}
|
||||
}
|
||||
//选择物料回调函数
|
||||
materialConfirm(v: any) {
|
||||
this.model.materielList.forEach((item: any) => {
|
||||
if (v.pickerName.productCode == item.productCode) {
|
||||
this.every = item;
|
||||
}
|
||||
});
|
||||
}
|
||||
async SearchBarcode() {
|
||||
if (this.order3 === '') {
|
||||
this.customToast(this.$t('message.batch') as string);
|
||||
return;
|
||||
}
|
||||
if (!this.every) {
|
||||
this.customToast(this.$t('message.batchCode') as string);
|
||||
return;
|
||||
}
|
||||
if (this.barcode === '') {
|
||||
this.customToast(this.$t('message.barcode') as string);
|
||||
return;
|
||||
}
|
||||
await this.model.SearchBarcode({
|
||||
barcode: this.barcode,
|
||||
productCode: this.every.productCode,
|
||||
locCode: this.every.originWl,
|
||||
});
|
||||
if (this.model.SearchCode == '1') {
|
||||
await this.submit();
|
||||
}
|
||||
}
|
||||
//提交数据
|
||||
async submit() {
|
||||
const submitList = [
|
||||
{
|
||||
...this.model.SearchCodeList,
|
||||
originWl: this.every.originWl,
|
||||
barCode: this.every.barcode,
|
||||
aimWl: this.every.aimWl,
|
||||
type: '2',
|
||||
orderType: '5',
|
||||
keepBy: session.loginName as string,
|
||||
factoryCode: session.factoryCode as string,
|
||||
order3: this.every.order3,
|
||||
costCenter: this.every.costCenter,
|
||||
fileNo: this.every.fileNo,
|
||||
},
|
||||
];
|
||||
await this.model.submit(submitList);
|
||||
if (this.model.submitCode == '1') {
|
||||
this.barcode = '';
|
||||
this.every = '';
|
||||
this.model.materielList.length = 0;
|
||||
this.model.orderInInfoList.length = 0;
|
||||
await this.query();
|
||||
}
|
||||
}
|
||||
async bill() {
|
||||
if (this.order3 === '') {
|
||||
this.customToast(this.$t('message.batch') as string);
|
||||
return;
|
||||
}
|
||||
await this.model.queryDetail(this.order3);
|
||||
this.toPage(this.page.raw.SemiFinished.SemiFinishedRowTcransfer.detail);
|
||||
}
|
||||
}
|
||||
</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,92 @@
|
||||
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';
|
||||
class OrderInInfo {
|
||||
checked?: boolean;
|
||||
poNo?: string;
|
||||
kw?: string;
|
||||
userDefined10?: string;
|
||||
orderStatus?: string;
|
||||
}
|
||||
@Module({
|
||||
namespaced: true,
|
||||
dynamic: true,
|
||||
store,
|
||||
name: 'Semi-finished-rowTransfer',
|
||||
})
|
||||
export class rowTransfer extends VuexModule {
|
||||
cboPlaceList = [];
|
||||
poNo = '';
|
||||
orderInInfo: OrderInInfo = new OrderInInfo();
|
||||
orderInInfoList: OrderInInfo[] = [];
|
||||
materielList = [];
|
||||
code = '';
|
||||
@MutationAction
|
||||
async takeYKOrder(order3: any) {
|
||||
const res: any = await http.post(url.warehouse.rowTransfer.listByOrder, {
|
||||
...order3,
|
||||
orderType: 'SFG',
|
||||
page: 1,
|
||||
rows: 50,
|
||||
factoryCode: session.factoryCode,
|
||||
loginName: session.loginName,
|
||||
});
|
||||
console.log('res', res);
|
||||
const code = res.code;
|
||||
const orderInInfoList = res.data.records;
|
||||
const materielList = orderInInfoList.map((item: any) => ({
|
||||
label: item.productCode,
|
||||
value: item.productCode,
|
||||
...item,
|
||||
}));
|
||||
console.log('materielList', materielList);
|
||||
return { orderInInfoList, materielList, code };
|
||||
}
|
||||
SearchCode: any = '';
|
||||
SearchCodeList: any = '';
|
||||
@MutationAction
|
||||
async SearchBarcode(params: any) {
|
||||
const res: any = await http.post(url.warehouse.rowTransfer.getOdsRawStorageSnNew, {
|
||||
factoryCode: session.factoryCode,
|
||||
loginName: session.loginName,
|
||||
...params,
|
||||
});
|
||||
console.log('rrrrr', res);
|
||||
const SearchCode = res.code;
|
||||
const SearchCodeList = res.data;
|
||||
return { SearchCode, SearchCodeList };
|
||||
}
|
||||
@MutationAction
|
||||
async onTakeoutConfirm(list: any) {
|
||||
const records: any = await http.post(url.warehouse.rowTransfer.commit, list);
|
||||
const code = records.code;
|
||||
return { code };
|
||||
}
|
||||
submitCode: any = '';
|
||||
@MutationAction
|
||||
async submit(submitList: any) {
|
||||
const res: any = await http.post(url.warehouse.rowTransfer.confirmMove, submitList);
|
||||
console.log(res);
|
||||
const submitCode = res.code;
|
||||
return { submitCode };
|
||||
}
|
||||
detailList: any = [];
|
||||
@MutationAction
|
||||
async queryDetail(proMoveCode: any) {
|
||||
const res = await http.post(url.warehouse.rowTransfer.queryListByMoveCode, {
|
||||
factoryCode: session.factoryCode,
|
||||
loginName: session.loginName,
|
||||
proMoveCode,
|
||||
});
|
||||
const detailList = res.data;
|
||||
return { detailList };
|
||||
}
|
||||
@MutationAction
|
||||
async empty() {
|
||||
const materielList = null;
|
||||
return { materielList };
|
||||
}
|
||||
}
|
||||
export default getModule(rowTransfer);
|
Loading…
Reference in New Issue