cosmoim-852 fix 新增备件入库功能
parent
f4631b7dcf
commit
e5cf803cd7
@ -0,0 +1,26 @@
|
||||
/**
|
||||
* 看单明细表格列
|
||||
*/
|
||||
import vm from '@/main';
|
||||
export const headers = [
|
||||
{
|
||||
label: vm.$t('message.product_barCode'),
|
||||
key: 'barcode',
|
||||
width: 300,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.product_FGCode'),
|
||||
key: 'productCode',
|
||||
width: 300,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.product_FGDes'),
|
||||
key: 'productDescZh',
|
||||
width: 300,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.Line'),
|
||||
key: 'order2',
|
||||
width: 300,
|
||||
},
|
||||
];
|
@ -0,0 +1,231 @@
|
||||
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.SpareDeliverGoods',
|
||||
})
|
||||
export class ReturningModule extends VuexModule {
|
||||
/**
|
||||
* 月台列表
|
||||
*/
|
||||
returningTypeList: any[] = [];
|
||||
PostingCode: any = '';
|
||||
/**
|
||||
* 物料列表
|
||||
*/
|
||||
materielList: any[] = [];
|
||||
|
||||
//条码扫描的返回的结果
|
||||
oneMaterielDetail: any = {};
|
||||
/**
|
||||
* 订单号查询结果
|
||||
*/
|
||||
orderInInfo: OrderInInfo = new OrderInInfo();
|
||||
resCode: any = '';
|
||||
//记账按钮的code码
|
||||
code = '';
|
||||
DNcode: any = '';
|
||||
/**
|
||||
* 查询月台列表
|
||||
*/
|
||||
@MutationAction
|
||||
async queryReturningTypeList() {
|
||||
const list: [] = await http.post(url.outbound.stoOutbound.yuetaiType, {
|
||||
factoryCode: session.factoryCode,
|
||||
whCode: session.warehouseCode,
|
||||
loginName: session.loginName,
|
||||
});
|
||||
const returningTypeList = list.map((item: any) => ({
|
||||
label: item.dockName,
|
||||
value: item.dockCode,
|
||||
}));
|
||||
return { returningTypeList };
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单号
|
||||
* @param orderNo
|
||||
*/
|
||||
@MutationAction
|
||||
async queryOrderInInfo(nxOutCode: string) {
|
||||
const result = await http.post(url.outbound.stoOutbound.info, {
|
||||
nxOutCode,
|
||||
deleteFlag: 2,
|
||||
finalState: 3,
|
||||
loginName: session.loginName,
|
||||
});
|
||||
let stoAmount = 0;
|
||||
result.data.records.forEach((item: any) => {
|
||||
stoAmount += item.orderAmount;
|
||||
});
|
||||
const materielList = result.data.records.map((item: any) => ({
|
||||
label: item.materialCode,
|
||||
value: item.stoItem,
|
||||
...item,
|
||||
}));
|
||||
console.log('materielList', materielList);
|
||||
if (result.data.records[0]) {
|
||||
result.data.records[0].stoAmount = stoAmount;
|
||||
}
|
||||
const orderInInfo = result.data.records[0] || {};
|
||||
return { orderInInfo, materielList };
|
||||
}
|
||||
/**
|
||||
* 查询订单号
|
||||
*/
|
||||
@MutationAction
|
||||
async findProdInfoByDN(nxOutCode: string) {
|
||||
const result: any = await http.post(url.outbound.stoOutbound.findProdInfoByDN, {
|
||||
nxOutCode,
|
||||
loginName: session.loginName,
|
||||
factoryCode: session.factoryCode,
|
||||
});
|
||||
console.log('resule>>>>>>>>>>>>>>>>>>>>>>>', result);
|
||||
let stoAmount = 0;
|
||||
const DNcode = result.code;
|
||||
result.data.forEach((item: any) => {
|
||||
stoAmount += item.orderAmount;
|
||||
});
|
||||
const materielList = result.data.map((item: any) => ({
|
||||
value: item.materialCode,
|
||||
rowItem: item.rowItem,
|
||||
label: item.rowItem + '(' + item.materialCode + ')',
|
||||
...item,
|
||||
}));
|
||||
console.log('materielList', materielList);
|
||||
if (result.data[0]) {
|
||||
result.data[0].stoAmount = stoAmount;
|
||||
}
|
||||
const orderInInfo = result.data[0] || {};
|
||||
return { orderInInfo, materielList, DNcode };
|
||||
}
|
||||
//退扫
|
||||
@MutationAction
|
||||
async delCode(params: any = {}) {
|
||||
const res: any = await http.post(url.outbound.stoOutbound.del, params);
|
||||
const resCode = res.code;
|
||||
return { resCode };
|
||||
}
|
||||
/**
|
||||
* 扫条码
|
||||
*/
|
||||
@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;
|
||||
}
|
||||
/**
|
||||
* 扫条码
|
||||
*/
|
||||
@Action
|
||||
async getMaterialByCode(list: any = {}) {
|
||||
let oneMaterielDetail: any = {};
|
||||
const { data }: any = await http.post(url.outbound.stoOutbound.getMaterialByCode, list);
|
||||
oneMaterielDetail = data.records[0];
|
||||
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 };
|
||||
}
|
||||
/**
|
||||
* 确认按钮
|
||||
* @param orderNo
|
||||
*/
|
||||
@MutationAction
|
||||
async confirmMove(list: any) {
|
||||
const res: any = await http.post(url.outbound.stoOutbound.Bookkeeping, list);
|
||||
console.log('res数据', res);
|
||||
const code = res.code;
|
||||
// if (code == '1') {
|
||||
// uni.showToast({ icon: 'success', title: msg });
|
||||
// } else {
|
||||
// uni.showToast({ icon: 'none', title: msg });
|
||||
// }
|
||||
const materielList: any = [];
|
||||
return { code, materielList };
|
||||
}
|
||||
/**
|
||||
* 查询详细
|
||||
* @param orderNo
|
||||
*/
|
||||
@MutationAction
|
||||
async queryDetailed(order1: string) {
|
||||
const { code, data } = await http.post(url.outbound.stoOutbound.getDetailByorderNo, {
|
||||
order1,
|
||||
loginName: session.loginName,
|
||||
factoryCode: session.factoryCode,
|
||||
});
|
||||
console.log('res数据', data, code);
|
||||
const materielList = data;
|
||||
console.log('>>>>>>>', materielList);
|
||||
return { code, materielList };
|
||||
}
|
||||
|
||||
//退扫接口
|
||||
@MutationAction
|
||||
async BackSweep(params: any) {
|
||||
const res: any = await http.post(url.outbound.stoOutbound.scanBarcodeDN, params);
|
||||
console.log('res>>>>>>>>>>>>>>>>>>>>>>>>.', res);
|
||||
const code = res.code;
|
||||
return { code };
|
||||
}
|
||||
//退扫查询接口
|
||||
@MutationAction
|
||||
async queryAmount(params: any) {
|
||||
const res: any = await http.post(url.outbound.stoOutbound.queryAmount, params);
|
||||
console.log('退扫>>>>>>>>>>>>>>>>>>>>>>>>.', res);
|
||||
return {};
|
||||
}
|
||||
//过账
|
||||
@MutationAction
|
||||
async Posting(params: any) {
|
||||
const res: any = await http.post(url.outbound.stoOutbound.Posting, params);
|
||||
const PostingCode = res.code;
|
||||
return { PostingCode };
|
||||
}
|
||||
@MutationAction
|
||||
async empty() {
|
||||
const orderInInfo = {};
|
||||
return { orderInInfo };
|
||||
}
|
||||
}
|
||||
|
||||
export default getModule(ReturningModule);
|
@ -0,0 +1,112 @@
|
||||
<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>
|
||||
<u-form class="form" ref="form" style="padding-left: 30px" label-width="180rpx">
|
||||
<u-form-item :label="$t('message.Pi_OrderNo')">
|
||||
<u-input v-model="prdOrder" placeholder="" class="Transfer" />
|
||||
<u-button type="primary" style="height: 60rpx; margin-left: 20rpx" @click="generate">{{ $t('message.Query') }}</u-button>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="table-wrapper">
|
||||
<wyb-table class="table" ref="table" width="100%" show-left-and-right-border :headers="bjheaders" :contents="model.bjDetailList" :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 { bjheaders } from './config';
|
||||
import model from './model';
|
||||
import { session } from '@/store/modules/session';
|
||||
@Component
|
||||
export default class RawReceiptDetail extends BasePage {
|
||||
model = model;
|
||||
bjheaders = bjheaders;
|
||||
prdOrder: any = '';
|
||||
onLoad() {
|
||||
this.model.bjDetailList.length = 0;
|
||||
}
|
||||
async generate() {
|
||||
if (this.prdOrder == '') {
|
||||
this.customToast(this.$t('message._tips6') as any);
|
||||
return;
|
||||
}
|
||||
let content = {
|
||||
loginName: session.loginName,
|
||||
prdOrder: this.prdOrder,
|
||||
factoryCode: session.factoryCode,
|
||||
};
|
||||
await this.model.querybjdetail(content);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.page-receipt-detail {
|
||||
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
|
||||
background-size: 100% 600rpx;
|
||||
padding: 30rpx;
|
||||
min-height: 100%;
|
||||
padding-top: 118rpx;
|
||||
padding-bottom: 162rpx;
|
||||
|
||||
.header {
|
||||
position: fixed;
|
||||
top: 36rpx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
color: #fff;
|
||||
font-size: 34rpx;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
.title {
|
||||
flex: 3;
|
||||
}
|
||||
.left,
|
||||
.right {
|
||||
flex: 1;
|
||||
}
|
||||
.icon {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
}
|
||||
}
|
||||
.form {
|
||||
background-color: #fff;
|
||||
// padding: 40rpx;
|
||||
border-radius: 10rpx;
|
||||
box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
|
||||
|
||||
.u-form-item {
|
||||
// padding: 30rpx 0;
|
||||
line-height: 35rpx;
|
||||
.Transfer {
|
||||
width: 180rpx;
|
||||
height: 64rpx;
|
||||
background: rgb(242, 242, 242);
|
||||
border-radius: 110rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.table-wrapper {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.form {
|
||||
background-color: #fff;
|
||||
// padding: 40rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,132 @@
|
||||
/**
|
||||
* 补料明细表格列
|
||||
*/
|
||||
import vm from '@/main';
|
||||
export const headers = [
|
||||
{
|
||||
label: vm.$t('message.InventoryOrderNo'),
|
||||
key: 'prdOrder', //单号
|
||||
width: 220,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.po_MaterielNo'),
|
||||
key: 'materialCode', //物料号
|
||||
width: 220,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.po_MaterielDes'),
|
||||
key: 'materialDesc', //物料描述
|
||||
width: 350,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.po_ActualQuantity'),
|
||||
key: 'fillAmount', //实际数量
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.Summary_Number'),
|
||||
key: 'amount', //可退数量
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.Feeding_ReplenishedQuantity'),
|
||||
key: 'totalFillAmount', //已拣数量
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.po_Location'),
|
||||
key: 'locationCode', //库存地点
|
||||
},
|
||||
];
|
||||
export const bjheaders = [
|
||||
{
|
||||
label: vm.$t('message.InventoryOrderNo'),
|
||||
key: 'prdOrder', //单号
|
||||
width: 220,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.CommissionedMaterielNo'),
|
||||
key: 'materialCode', //物料号
|
||||
width: 220,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.CommissionedMaterielDesc'),
|
||||
key: 'materialDesc', //物料描述
|
||||
width: 450,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.CommissionedLocation'),
|
||||
key: 'userDefined1', //库位
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.CommissionedNumber'),
|
||||
key: 'amount', //入库数量
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.Operation'),
|
||||
key: 'createBy', //操作人
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.StorageTime'),
|
||||
key: 'gmtCreate', //入库时间
|
||||
width: 550,
|
||||
},
|
||||
];
|
||||
export const detailHeader = [
|
||||
{
|
||||
label: vm.$t('message.Pi_OrderNo'),
|
||||
key: 'prdOrder',
|
||||
width: 270,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.po_MaterielNo'),
|
||||
key: 'materialCode',
|
||||
width: 270,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.CommissionedLocation'),
|
||||
key: 'wlCode',
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.CommissionedNumber'),
|
||||
key: 'qty',
|
||||
},
|
||||
];
|
||||
export const PropoHeader = [
|
||||
{
|
||||
label: vm.$t('message.po_MaterielNo'),
|
||||
key: 'materialCode',
|
||||
width: 300,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.po_MaterielDes'),
|
||||
key: 'materialDesc',
|
||||
width: 450,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.Pi_unit'),
|
||||
key: 'unit',
|
||||
width: 300,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.Production'),
|
||||
key: 'prdOrder',
|
||||
width: 300,
|
||||
},
|
||||
];
|
||||
export const CreteListHeader = [
|
||||
{
|
||||
label: vm.$t('message.po_MaterielNo'),
|
||||
key: 'materialCode',
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.receiveAStation'),
|
||||
key: 'sendSpot',
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.Production'),
|
||||
key: 'prdOrder',
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.quantityNum'),
|
||||
key: 'amount',
|
||||
},
|
||||
];
|
@ -0,0 +1,421 @@
|
||||
<template>
|
||||
<view class="page-raw-receipt">
|
||||
<view class="top"></view>
|
||||
<view class="header">
|
||||
<view class="left">
|
||||
<u-icon class="icon" name="arrow-left" @click="back" />
|
||||
</view>
|
||||
<view class="title">{{ $t('message.Inbound') }}</view>
|
||||
<view class="right"></view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<!-- 单号 -->
|
||||
<view class="single">
|
||||
<view class="single-left">
|
||||
<view>{{ $t('message.InventoryOrderNo') }}:</view>
|
||||
<u-search :placeholder="$t('message.InventoryPleaseScan')" v-model="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-right">
|
||||
<view class="material-right-title">{{ $t('message.CommissionedMaterielNo') }}:</view>
|
||||
<view class="material-right-code" style="overflow: hidden">{{ some.materialCode }}</view>
|
||||
</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">{{ some.materialDesc }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="material">
|
||||
<view class="material-right">
|
||||
<view class="material-right-title">{{ $t('message.orderNum') }}:</view>
|
||||
<view class="material-right-code" style="overflow: hidden">{{ some.amount }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="material">
|
||||
<view class="material-right">
|
||||
<view class="material-right-title">{{ $t('message.totalNum') }}:</view>
|
||||
<view class="material-right-code" style="overflow: hidden" disabled>{{ some.totalProductAmount }}</view>
|
||||
<!-- <u-input placeholder=" " v-model="some.fillAmount" :type="type" :border="border" class="input" style="margin-top: 8px;padding: 0;height: 38px;" 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="Location" />
|
||||
</view>
|
||||
<view class="library-right">
|
||||
<view class="library-right-title">{{ $t('message.CommissionedThisNumber') }}:</view>
|
||||
<u-input :placeholder="$t('message.po_PleaseInput')" v-model="qty" type="number" :border="border" class="input" />
|
||||
</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="LocationList" :show-vert-border="false" @onCellClick="deleteItem($event)"></wyb-table>
|
||||
</view>
|
||||
<view class="bottom-bar">
|
||||
<div class="container">
|
||||
<u-row>
|
||||
<u-col :span="4">
|
||||
<u-button type="primary" class="appoint" @click="bill">{{ $t('message.InboundDetail') }}</u-button>
|
||||
</u-col>
|
||||
<u-col :span="4">
|
||||
<u-button type="success" @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>
|
||||
</div>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Ref } from 'vue-property-decorator';
|
||||
import { BasePage } from '@/components/base/page';
|
||||
import model from './model';
|
||||
import { session } from '@/store/modules/session';
|
||||
import { VForm } from 'vue/types/form';
|
||||
import { detailHeader } from './config';
|
||||
import jPicker from '@/components/J-Picker/jPicker.vue';
|
||||
@Component({
|
||||
components: {
|
||||
jPicker,
|
||||
},
|
||||
})
|
||||
export default class RawReceiptDetail extends BasePage {
|
||||
@Ref('form') readonly $form!: VForm;
|
||||
detailHeader = detailHeader;
|
||||
model = model;
|
||||
type = 'text';
|
||||
wlCode: any = '';
|
||||
border = true;
|
||||
LocationList: any = [];
|
||||
Location: any = [];
|
||||
some: any = {};
|
||||
qty: any = '';
|
||||
form: any = {
|
||||
documentNo: '',
|
||||
};
|
||||
async back() {
|
||||
uni.navigateBack({ delta: 1 });
|
||||
}
|
||||
async onReady() {
|
||||
let content = {
|
||||
loginName: session.loginName,
|
||||
sendSpot: null,
|
||||
factoryCode: session.factoryCode,
|
||||
workArea: session.workareaCode,
|
||||
};
|
||||
let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content);
|
||||
res.forEach((item: any) => {
|
||||
let pickerName: any = {};
|
||||
pickerName.label = item.locationCode;
|
||||
pickerName.value = item.locationCode + '(' + item.sendSpot + ')';
|
||||
pickerName.sendSpot = item.sendSpot;
|
||||
this.Location.push(pickerName);
|
||||
});
|
||||
this.model.blDetailList.length = 0;
|
||||
this.wlCode = this.Location[0];
|
||||
}
|
||||
async query() {
|
||||
if (this.form.documentNo == '') {
|
||||
this.customToast(this.$t('message.Commission_tips1') as string);
|
||||
}
|
||||
await this.model.queryBlDetailList(this.form.documentNo);
|
||||
this.some = this.model.blDetailList;
|
||||
}
|
||||
LocationChoice(e: any) {
|
||||
this.wlCode = e.pickerName;
|
||||
}
|
||||
Add() {
|
||||
if (this.qty == '' || this.wlCode == '') {
|
||||
this.customToast(this.$t('message.AppendMateriel1') as string);
|
||||
return;
|
||||
}
|
||||
if (parseFloat(this.qty) <= 0) {
|
||||
this.customToast(this.$t('message.AppendMateriel2') as string);
|
||||
return;
|
||||
}
|
||||
if (parseFloat(this.qty) > parseFloat(this.some.amount)) {
|
||||
this.customToast(this.$t('message.AppendMateriel3') as string);
|
||||
return;
|
||||
}
|
||||
if (parseFloat(this.qty) + parseFloat(this.some.totalProductAmount) > parseFloat(this.some.amount)) {
|
||||
this.customToast(this.$t('message.AppendMateriel3') as string);
|
||||
return;
|
||||
}
|
||||
let arr = {
|
||||
prdOrder: this.some.prdOrder,
|
||||
materialCode: this.some.materialCode,
|
||||
wlCode: this.wlCode.label,
|
||||
qty: this.qty,
|
||||
};
|
||||
this.LocationList.push(arr);
|
||||
this.some.wlList.push({
|
||||
wlCode: this.wlCode.label,
|
||||
qty: this.qty,
|
||||
});
|
||||
this.some.totalProductAmount += parseFloat(this.qty);
|
||||
}
|
||||
deleteItem(e: any): void {
|
||||
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) {
|
||||
let lineData = e.lineData;
|
||||
let i: number;
|
||||
this.LocationList.forEach((item: any, index: any) => {
|
||||
if (item.wlCode == lineData.wlCode && item.qty == lineData.qty) {
|
||||
i = index;
|
||||
}
|
||||
});
|
||||
this.LocationList.splice(i, 1);
|
||||
this.some.wlList.splice(i, 1);
|
||||
} else if (res.cancel) {
|
||||
return;
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
async onSubmit() {
|
||||
await this.model.saveBlDetailUpload(this.some).then(() => {
|
||||
this.qty = '';
|
||||
this.LocationList = [];
|
||||
this.query();
|
||||
});
|
||||
}
|
||||
async bill() {
|
||||
this.toPage(this.page.raw.ingoods.SpareInboun.details);
|
||||
}
|
||||
}
|
||||
</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: 110rpx;
|
||||
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: 145rpx;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
.search {
|
||||
padding-left: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.material {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
.material-right {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
.material-right-title {
|
||||
width: 145rpx;
|
||||
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: 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: 19px;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.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: 15rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.add {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
position: relative;
|
||||
button {
|
||||
position: absolute;
|
||||
top: 10rpx;
|
||||
right: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.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,219 @@
|
||||
import { Action, getModule, Module, Mutation, 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.ingoods.SpareInbound.Inbound',
|
||||
})
|
||||
export class FeedingModule extends VuexModule {
|
||||
/**
|
||||
* 补料明细列表
|
||||
*/
|
||||
blDetailList: any[] = [];
|
||||
detailedList: any;
|
||||
LocList: any = [];
|
||||
submitListCode: any = '';
|
||||
|
||||
/**
|
||||
* 库位列表
|
||||
*/
|
||||
locationList = [];
|
||||
MaterialList: any = [];
|
||||
bjDetailList: any = [];
|
||||
|
||||
/**
|
||||
* 补料明细列表是否有选择项
|
||||
*/
|
||||
get hasBlDetailChecked() {
|
||||
return this.checkedBlDetailList.length > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取选中的补料明细列表
|
||||
*/
|
||||
get checkedBlDetailList() {
|
||||
return this.blDetailList.filter((_: any) => _.checked);
|
||||
}
|
||||
|
||||
/**
|
||||
* 补料明细列表中是否有本次补料数量
|
||||
*/
|
||||
get hasBlDetailFillAmount() {
|
||||
return this.blDetailList.findIndex((_: any) => _.fillAmount) > -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取补料明细上传列表数据
|
||||
*/
|
||||
get blDetailUploadList() {
|
||||
return this.blDetailList.map((item: any) => {
|
||||
if (!item.checked) {
|
||||
item.fillAmount = 0;
|
||||
}
|
||||
return item;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 清理状态数据
|
||||
*/
|
||||
@Mutation
|
||||
clearState() {
|
||||
this.blDetailList = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认选中补料明细列表
|
||||
* @param params
|
||||
*/
|
||||
@Mutation
|
||||
confirmCheckedBlDetailList(params: { locationCode: string; amount: number }) {
|
||||
this.blDetailList
|
||||
.filter((_: any) => _.checked)
|
||||
.forEach((item: any) => {
|
||||
if (params.locationCode) {
|
||||
item.wkposCodeP = params.locationCode;
|
||||
}
|
||||
if (params.amount) {
|
||||
item.fillAmount = params.amount;
|
||||
}
|
||||
});
|
||||
}
|
||||
@MutationAction
|
||||
async queryItemLoc(params: any = {}) {
|
||||
const res: any = await http.post(url.sortscan.save.queryWlByMatBL, params);
|
||||
const LocList = [];
|
||||
res.forEach((item: any) => {
|
||||
const arr: any = {
|
||||
label: item.locationCode,
|
||||
value: item.locationCode + '(' + item.sendSpot + ')',
|
||||
};
|
||||
LocList.push(arr);
|
||||
});
|
||||
console.log('res', res);
|
||||
console.log('LocList', LocList);
|
||||
return { LocList };
|
||||
}
|
||||
/**
|
||||
* 上传补料明细列表
|
||||
*/
|
||||
@Action({ commit: 'clearState' })
|
||||
async saveBlDetailUpload(params: any) {
|
||||
await http.post(url.bj.submit, {
|
||||
...params,
|
||||
factoryCode: session.factoryCode,
|
||||
loginName: session.loginName,
|
||||
});
|
||||
uni.showToast({
|
||||
title: 'success',
|
||||
duration: 2000,
|
||||
image: '/static/icons/icon-51.png',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 解锁补料明细列表数据
|
||||
*/
|
||||
@Action
|
||||
async unlockBlDetailList() {
|
||||
try {
|
||||
const sapSupplyIdList = this.blDetailList.map((_) => _.sapSupplyId);
|
||||
const params = {
|
||||
factoryCode: session.factoryCode,
|
||||
loginName: session.loginName,
|
||||
sapSupplyIdList,
|
||||
};
|
||||
await http.post(url.bl.unlock, params, {
|
||||
custom: { hideError: true },
|
||||
} as any);
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询补料明细列表
|
||||
*/
|
||||
@MutationAction
|
||||
async queryBlDetailList(order: any) {
|
||||
const res: any = await http.post(url.bj.query, {
|
||||
factoryCode: session.factoryCode,
|
||||
loginName: session.loginName,
|
||||
prdOrder: order,
|
||||
});
|
||||
res.data.wlList = [];
|
||||
const blDetailList: any = res.data;
|
||||
return { blDetailList };
|
||||
}
|
||||
//查询明细
|
||||
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
|
||||
async querydetaildlist(content: any) {
|
||||
const res: any = await http.post('/wmspda/tl/getBlListSn', content);
|
||||
console.log('明细》》》》》》》》》', res.list);
|
||||
this.detailedList = res.list;
|
||||
return res;
|
||||
}
|
||||
/**
|
||||
* 查询库位列表
|
||||
*/
|
||||
@MutationAction
|
||||
async queryLocationList() {
|
||||
const result: any = await http.post(url.auth.query.location, {
|
||||
factoryCode: session.factoryCode,
|
||||
loginName: session.loginName,
|
||||
workareaCode: session.workareaCode,
|
||||
});
|
||||
const locationList = result.list.map((_: any) => ({
|
||||
label: _.locationCode,
|
||||
value: _.locationCode,
|
||||
}));
|
||||
return { locationList };
|
||||
}
|
||||
|
||||
@MutationAction
|
||||
async queryMaterialList(params: any) {
|
||||
const res: any = await http.post(url.auth.query.queryAppendDetail, {
|
||||
factoryCode: session.factoryCode,
|
||||
loginName: session.loginName,
|
||||
prdOrder: params.prdOrder,
|
||||
materialCode: params.materialCode,
|
||||
});
|
||||
const MaterialList = res.list;
|
||||
return { MaterialList };
|
||||
}
|
||||
@MutationAction
|
||||
async submitList(params: any) {
|
||||
const res: any = await http.post(url.auth.query.createAppendList, params);
|
||||
const submitListCode = res.code;
|
||||
return { submitListCode };
|
||||
}
|
||||
//补料解锁
|
||||
@MutationAction
|
||||
async lock(sapSupplyIdList: any) {
|
||||
const res: any = await http.post(url.auth.query.lock, {
|
||||
factoryCode: session.factoryCode,
|
||||
loginName: session.loginName,
|
||||
sapSupplyIdList,
|
||||
});
|
||||
console.log(res);
|
||||
return {};
|
||||
}
|
||||
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
|
||||
async queryByFactoryCodeAndWorkAreaCode(content: any) {
|
||||
const res = await http.post('/wmspda/fg/queryByFactoryCodeAndWorkAreaCode', content);
|
||||
return res;
|
||||
}
|
||||
@MutationAction
|
||||
async querybjdetail(prdOrder) {
|
||||
const res: any = await http.post(url.bj.detail, prdOrder);
|
||||
const bjDetailList: any = res.data;
|
||||
return { bjDetailList };
|
||||
}
|
||||
}
|
||||
|
||||
export default getModule(FeedingModule);
|
@ -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