Compare commits

...

4 Commits

@ -687,6 +687,14 @@
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/wms/Raw/TemporarilyCollected/index",
"style": {
"navigationBarTitleText": "105过账",
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
}

@ -142,7 +142,7 @@ export default class LoginPage extends BasePage {
// console.log('Version////', this.Version);
}
///******************
version = '0.0.180'; //
version = '0.0.182'; //
//version = '0.0.14'; //
//*************** false true ****************
//isTest = true;

@ -137,11 +137,14 @@
<view class="bottom-bar">
<u-row class="button-bar">
<!-- 确定 -->
<u-col :span="6">
<u-button @click="onSubmit" type="primary">确认收货</u-button>
<u-col :span="4">
<u-button @click="onSubmit" type="primary">103暂收</u-button>
</u-col>
<u-col :span="4">
<u-button :disabled="isDisabled105" @click="handelSubmit105" type="success">105过账</u-button>
</u-col>
<!-- 返回 -->
<u-col :span="6">
<u-col :span="4">
<u-button type="error" @click="uni.navigateBack()"></u-button>
</u-col>
</u-row>
@ -157,6 +160,7 @@ import jPicker from '@/components/J-Picker/jPicker.vue';
import model from './model';
import { session } from '@/store/modules/session';
import dayjs from 'dayjs';
import { removeLeadingZeros } from '@/utils/tool';
interface OptionType {
label: string;
value: string;
@ -233,6 +237,13 @@ export default class receivePO extends BasePage {
oldprodlist: any = [];
oncefouces = true;
twofouces = false;
isDisabled105 = false;
showStatus105 = false;
contentStatus150 = '';
qualityStatusCo = {
Y: '检验合格',
N: '检验不合格',
};
async onReady() {
//await this.model.Stashlist();
//this.whList = model.DictTypeList;
@ -516,6 +527,71 @@ export default class receivePO extends BasePage {
type: 'success',
});
}
/**
* 105过账按钮
* **/
async handelSubmit105() {
this.isDisabled105 = true;
const list = this.list;
let params: any = [];
if (list.length > 0) {
for (const item of list) {
if (!item.orderStatus || item.orderStatus === '0') {
(this.$refs.uToast as any).show({
title: '请先完成收货!',
type: 'default',
duration: 3000,
});
this.isDisabled105 = false;
return;
}
//
if (!item.qualityStatus || item.qualityStatus === 'N') {
this.contentStatus150 = '采购单号:' + item.procureCode + ',物料编码:' + removeLeadingZeros(item.materialCode) + '' + (this.qualityStatusCo[item.qualityStatus] || '未检验');
this.showStatus105 = true;
this.isDisabled105 = false;
return;
}
//rawOrderInId
if (item.rawOrderInId) {
params.push({ id: item.rawOrderInId });
}
}
if (params.length > 0) {
//
params = params.filter((item: any, index: any, self: any) => self.findIndex((t: { [x: string]: any }) => t['id'] === item['id']) === index);
await this.model.sap105temporarilyCollected(params);
this.isDisabled105 = false;
if (this.model.sap105code + '' === '200') {
(this.$refs.uToast as any).show({
title: this.model.sap105msg,
type: 'primary',
duration: 6000,
});
}
await this.query();
} else {
this.isDisabled105 = false;
(this.$refs.uToast as any).show({
title: '无可过账数据',
type: 'default',
duration: 3000,
});
}
} else {
this.isDisabled105 = false;
(this.$refs.uToast as any).show({
title: '未选择数据',
type: 'default',
duration: 3000,
});
}
}
}
</script>
<style lang="scss" scoped>

@ -151,6 +151,19 @@ export class receivePO extends VuexModule {
const byidcardobj = result.data;
return { getidcardcode, byidcardobj };
}
sap105code: any = '';
sap105msg: any = '';
@MutationAction
async sap105temporarilyCollected(data: any) {
const result: any = await http.post(url.lanjuwms.raw.ReceivePO.sap105temporarilyCollected, data);
const sap105code = result.code;
const sap105msg = result.msg;
return {
sap105code,
sap105msg,
};
}
}
export default getModule(receivePO);

@ -136,11 +136,14 @@
<view class="bottom-bar">
<u-row class="button-bar">
<!-- 确定 -->
<u-col :span="6">
<u-button :disabled="isdisabled" @click="onSubmit" type="primary">确认收货</u-button>
<u-col :span="4">
<u-button :disabled="isdisabled" @click="onSubmit" type="primary">103暂收</u-button>
</u-col>
<u-col :span="4">
<u-button :disabled="isDisabled105" @click="handelSubmit105" type="success">105过账</u-button>
</u-col>
<!-- 返回 -->
<u-col :span="6">
<u-col :span="4">
<u-button type="error" @click="uni.navigateBack()"></u-button>
</u-col>
</u-row>
@ -152,6 +155,8 @@
<u-button @click="submiteditor"></u-button>
</u-popup>
<u-toast ref="uToast" />
<u-modal v-model="showStatus105" :content="contentStatus150" title="105过账失败"></u-modal>
</view>
</template>
<script lang="ts">
@ -161,6 +166,8 @@ import jPicker from '@/components/J-Picker/jPicker.vue';
import model from './model';
import { session } from '@/store/modules/session';
import { removeLeadingZeros } from '@/utils/tool';
import LjListRow from '@/components/lanju/lj-list-row/index.vue';
import ljPagination from '@/components/lanju/lj-pagination/index.vue';
interface OptionType {
label: string;
@ -168,6 +175,8 @@ interface OptionType {
}
@Component({
components: {
ljPagination,
LjListRow,
jPicker,
},
})
@ -239,7 +248,13 @@ export default class receiveSRM extends BasePage {
temNumber = '';
editoritem: any = {};
isdisabled = false;
isDisabled105 = false;
showStatus105 = false;
contentStatus150 = '';
qualityStatusCo = {
Y: '检验合格',
N: '检验不合格',
};
//
async onFormDoubleClick(item) {
console.log('双击', item);
@ -261,7 +276,6 @@ export default class receiveSRM extends BasePage {
}
//
async query() {
console.log(session);
if (this.userDefined5 == '' || this.userDefined5.length == 0) {
(this.$refs.uToast as any).show({
title: '请输入送货单',
@ -413,6 +427,70 @@ export default class receiveSRM extends BasePage {
return removeLeadingZeros(item.materialCode) == this.bimWl.value;
});
}
/**
* 105过账按钮
* **/
async handelSubmit105() {
this.isDisabled105 = true;
const list = this.list;
let params: any = [];
if (list.length > 0) {
for (const item of list) {
if (!item.orderStatus || item.orderStatus === '0') {
(this.$refs.uToast as any).show({
title: '请先完成收货!',
type: 'default',
duration: 3000,
});
this.isDisabled105 = false;
return;
}
//
if (!item.qualityStatus || item.qualityStatus === 'N') {
this.contentStatus150 = '采购单号:' + item.procureCode + ',物料编码:' + removeLeadingZeros(item.materialCode) + '' + (this.qualityStatusCo[item.qualityStatus] || '未检验');
this.showStatus105 = true;
this.isDisabled105 = false;
return;
}
//rawOrderInId
if (item.rawOrderInId) {
params.push({ id: item.rawOrderInId });
}
}
if (params.length > 0) {
//
params = params.filter((item: any, index: any, self: any) => self.findIndex((t: { [x: string]: any }) => t['id'] === item['id']) === index);
await this.model.sap105temporarilyCollected(params);
this.isDisabled105 = false;
if (this.model.sap105code + '' === '200') {
(this.$refs.uToast as any).show({
title: this.model.sap105msg,
type: 'primary',
duration: 6000,
});
}
await this.query();
} else {
this.isDisabled105 = false;
(this.$refs.uToast as any).show({
title: '无可过账数据',
type: 'default',
duration: 3000,
});
}
} else {
this.isDisabled105 = false;
(this.$refs.uToast as any).show({
title: '未选择数据',
type: 'default',
duration: 3000,
});
}
}
}
</script>
<style lang="scss" scoped>

@ -168,6 +168,19 @@ export class receiveSRM extends VuexModule {
const editorcode = result.code;
return { editorcode };
}
sap105code: any = '';
sap105msg: any = '';
@MutationAction
async sap105temporarilyCollected(data: any) {
const result: any = await http.post(url.lanjuwms.raw.ReceiveSRM.sap105temporarilyCollected, data);
const sap105code = result.code;
const sap105msg = result.msg;
return {
sap105code,
sap105msg,
};
}
}
export default getModule(receiveSRM);

@ -14,25 +14,21 @@
</u-form>
<!-- 列表 -->
<view class="scroll">
<view v-for="item in sapStockList" :key="item.id">
<u-form style="margin-top: 10rpx" class="form2">
<view>
<lj-list-row label="物料编码:" :value="removeLeadingZeros(item.matnr)" />
<lj-list-row label="物料名称:" :value="item.maktx" />
<lj-list-row label="非限制库存:" :value="removeLastZeros(item.clabs)" />
<lj-list-row label="冻结库存:" :value="removeLastZeros(item.cspem)" />
</view>
</u-form>
</view>
</view>
<scroll-view id="list" scroll-y="true" :style="{ height: listHeight + 'px' }" @scrolltolower="onScrollToLower" :lower-threshold="50">
<!-- 列表 -->
<u-form class="list">
<view class="list-item" v-for="item in sapStockList" :key="item.id">
<lj-list-row label="物料编码:" :value="removeLeadingZeros(item.matnr)" />
<lj-list-row label="物料名称:" :value="item.maktx" />
<lj-list-row label="非限制库存:" :value="removeLastZeros(item.clabs)" />
<lj-list-row label="冻结库存:" :value="removeLastZeros(item.cspem)" />
</view>
</u-form>
</scroll-view>
<!-- 按钮 -->
<view class="bottom-bar">
<view id="button" class="bottom-bar">
<u-row class="button-bar">
<view style="position: absolute; bottom: 120rpx; width: 90%">
<lj-pagination :total="total" :currentPage="queryParams.pageNum" @change="changePage"></lj-pagination>
</view>
<u-col :span="12">
<u-button type="primary" @click="search"></u-button>
</u-col>
@ -48,22 +44,16 @@ import { Component } from 'vue-property-decorator';
import jPicker from '@/components/J-Picker/jPicker.vue';
import LjRowList from '@/components/lanju/lj-list-row/index.vue';
import LjListRow from '@/components/lanju/lj-list-row/index.vue';
import model from './model';
import { getSapStockList } from './model';
import { removeLeadingZeros } from '@/utils/tool';
import ljPagination from '@/components/lanju/lj-pagination/index.vue';
interface QueryParamsPo {
matnr: string;
maktx: string;
pdaSearch: '1';
pageNum: 1;
pageSize: 10;
}
interface SapStockPo {
materialCode: string;
materialDesc: string;
storageAmount: string;
pdaSearch: string;
pageNum: number;
pageSize: number;
}
@Component({
@ -76,11 +66,10 @@ interface SapStockPo {
PageHead,
},
})
export default class sapStockPo extends BasePage implements SapStockPo {
export default class sapStockPo extends BasePage {
materialCode: string;
materialDesc: string;
storageAmount: string;
model = model;
queryParams: QueryParamsPo = {
matnr: undefined,
maktx: undefined,
@ -90,7 +79,32 @@ export default class sapStockPo extends BasePage implements SapStockPo {
};
sapStockList: any[] = [];
total = 0;
listHeight = 500;
onReady() {
//
this.$nextTick(() => {
let buttonTop = 0;
//
const query = uni.createSelectorQuery().in(this);
query
.select('#button')
.boundingClientRect((data) => {
//
buttonTop = data.top;
})
.exec();
//
query
.select('#list')
.boundingClientRect((data) => {
//
const listTop = data.top;
//
this.listHeight = buttonTop - listTop - 10;
})
.exec();
});
}
async search() {
this.queryParams.pageNum = 1;
this.getList();
@ -106,10 +120,11 @@ export default class sapStockPo extends BasePage implements SapStockPo {
this.getList();
}
async getList() {
await this.model.getSapStockList(this.queryParams);
this.sapStockList = this.model.rows;
this.total = this.model.total;
getList() {
getSapStockList(this.queryParams).then((res) => {
this.sapStockList = res.rows;
this.total = res.total;
});
}
removeLastZeros(data: any) {
@ -118,6 +133,16 @@ export default class sapStockPo extends BasePage implements SapStockPo {
}
return data;
}
//
onScrollToLower() {
if (this.total === this.sapStockList.length) {
return;
}
this.queryParams.pageNum = this.queryParams.pageNum + 1;
getSapStockList(this.queryParams).then((res) => {
this.sapStockList = this.sapStockList.concat(res.rows);
});
}
}
</script>
@ -134,16 +159,26 @@ export default class sapStockPo extends BasePage implements SapStockPo {
}
}
.scroll {
height: 100%;
overflow: scroll;
.list {
background-color: #fff;
margin-top: 20rpx;
padding: 20rpx 20rpx 25rpx;
border-radius: 10rpx;
box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
color: #8d8989;
.form2 {
background-color: #fff;
padding: 20rpx 20rpx 25rpx;
border-radius: 10rpx;
box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
color: #8d8989;
.list-item {
padding: 20rpx;
}
/* 奇数行背景色 */
.list-item:nth-child(odd) {
background-color: #ffffff;
}
/* 偶数行背景色 */
.list-item:nth-child(even) {
background-color: #f5f5f5;
}
}

@ -1,33 +1,8 @@
import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators';
import store from '@/store';
import http from '@/utils/request';
import { url } from '@/utils/url';
@Module({
namespaced: true,
dynamic: true,
store,
name: 'page.raw.sapStockPo',
})
export class sapStockPo extends VuexModule {
WlList = [];
rows: any = [];
total = 0;
@MutationAction
async getSapStockList(data: any): Promise<{ rows: any; total: number }> {
const result: any = await http.get(url.lanjuwms.raw.SapStockPo.getSapStockList, {
params: data,
});
let rows: any;
let total: number;
if (result.total > 0) {
rows = result.rows;
total = result.total;
} else {
rows = [];
total = 0;
}
return { rows, total };
}
}
export default getModule(sapStockPo);
export function getSapStockList(data: any): Promise<any> {
return http.get(url.lanjuwms.raw.SapStockPo.getSapStockList, {
params: data,
});
}

@ -0,0 +1,229 @@
<template>
<view class="page-product-receipt">
<!-- 页面头 -->
<page-head title="105过账" />
<!-- 查询条件 -->
<u-form id="query" class="query" ref="query" label-width="180rpx">
<u-form-item label="物料编码">
<u-search placeholder="请输入物料编码" v-model="queryParams.materialCode" @search="search" :show-action="false"></u-search>
</u-form-item>
<u-form-item label="物料名称">
<u-search placeholder="请输入物料名称" v-model="queryParams.materialDesc" @search="search" :show-action="false"></u-search>
</u-form-item>
<u-form-item label="送货单号">
<u-search placeholder="请输入送货单号" v-model="queryParams.orderNo" @search="search" :show-action="false"></u-search>
</u-form-item>
<u-form-item label="采购单号">
<u-search placeholder="请输入采购单号" v-model="queryParams.poNo" @search="search" :show-action="false"></u-search>
</u-form-item>
</u-form>
<scroll-view id="list" scroll-y="true" :style="{ height: listHeight + 'px' }" @scrolltolower="onScrollToLower" :lower-threshold="50">
<!-- 列表 -->
<u-form class="list">
<u-checkbox-group v-if="list.length > 0">
<u-checkbox class="list-item" v-for="(item, index) in list" :key="index" v-model="item.checked">
<view style="margin-left: 20rpx">
<lj-list-row label="物料编码:" :value="removeLeadingZeros(item.materialCode)" />
<lj-list-row label="物料名称:" :value="item.materialDesc" />
<lj-list-row label="送货单号:" :value="item.orderNo" />
<lj-list-row label="采购单号:" :value="item.poNo" />
</view>
</u-checkbox>
</u-checkbox-group>
<view v-else> </view>
</u-form>
</scroll-view>
<!-- 按钮 -->
<view id="button" class="bottom-bar">
<u-row class="button-bar">
<u-col :span="12">
<u-button type="success" @click="onSubmit105()">105</u-button>
</u-col>
</u-row>
</view>
<u-toast ref="uToast" />
</view>
</template>
<script lang="ts">
import LjListRow from '@/components/lanju/lj-list-row/index.vue';
import { Component } from 'vue-property-decorator';
import PageHead from '@/components/lanju/page-head/index.vue';
import { BasePage } from '@/components/base/page';
import { getWmsRawOrderInListToPda, sap105temporarilyCollected } from './model';
import { removeLeadingZeros } from '@/utils/tool';
interface QueryParamsPo {
materialCode: string;
materialDesc: string;
orderNo: string;
poNo: string;
pageNum: number;
pageSize: number;
}
interface ListVo {
materialCode: string;
materialDesc: string;
userDefined1: string;
rawOrderInId: string;
poNo: string;
orderNo: string;
checked: boolean;
}
@Component({
methods: { removeLeadingZeros },
components: { PageHead, LjListRow },
})
export default class TemporarilyCollectedPo extends BasePage {
materialCode: string;
materialDesc: string;
storageAmount: string;
queryParams: QueryParamsPo = {
materialCode: undefined,
materialDesc: undefined,
orderNo: undefined,
poNo: undefined,
pageNum: 1,
pageSize: 10,
};
total: any = 0;
listHeight = 500;
list: Array<ListVo> = [];
value = 'orange';
onLoad() {
this.getList();
}
onReady() {
//
this.$nextTick(() => {
let buttonTop = 0;
//
const query = uni.createSelectorQuery().in(this);
query
.select('#button')
.boundingClientRect((data) => {
//
buttonTop = data.top;
})
.exec();
//
query
.select('#list')
.boundingClientRect((data) => {
//
const listTop = data.top;
//
this.listHeight = buttonTop - listTop - 10;
})
.exec();
});
}
async getList() {
await getWmsRawOrderInListToPda(this.queryParams).then((res) => {
this.total = res.total;
this.list = res.rows;
});
}
search() {
this.queryParams.pageNum = 1;
this.getList();
}
onScrollToLower() {
if (this.total === this.list.length) {
return;
}
this.queryParams.pageNum = this.queryParams.pageNum + 1;
getWmsRawOrderInListToPda(this.queryParams).then((res) => {
this.list = this.list.concat(res.rows);
});
}
onSubmit105() {
const checkedList = [];
for (const item of this.list) {
//
if (item.checked) {
checkedList.push({ id: item.rawOrderInId });
}
}
if (checkedList.length > 0) {
sap105temporarilyCollected(checkedList).then((res) => {
(this.$refs.uToast as any).show({
title: res.msg,
type: 'success',
});
this.search();
});
} else {
(this.$refs.uToast as any).show({
title: '未选择数据',
type: 'default',
});
}
}
}
</script>
<style scoped lang="scss">
.query {
background-color: #fff;
margin-top: 10px;
padding: 20rpx;
border-radius: 10rpx;
box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
.u-form-item {
line-height: 35rpx;
}
}
.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;
}
.list {
background-color: #fff;
margin-top: 20rpx;
padding: 20rpx 20rpx 25rpx;
border-radius: 10rpx;
box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
color: #8d8989;
.list-item {
padding: 20rpx;
}
/* 奇数行背景色 */
.list-item:nth-child(odd) {
background-color: #ffffff;
}
/* 偶数行背景色 */
.list-item:nth-child(even) {
background-color: #f5f5f5;
}
}
::v-deep .u-checkbox__label {
width: 100% !important;
}
::v-deep .list-item {
width: 100% !important;
}
</style>

@ -0,0 +1,14 @@
import http from '@/utils/request';
import { url } from '@/utils/url';
export function getWmsRawOrderInListToPda(data: any): Promise<any> {
return http.get(url.lanjuwms.raw.TemporarilyCollectedPo.getWmsRawOrderInListToPda, {
params: data,
});
}
export function sap105temporarilyCollected(data: any): Promise<any> {
return http.get(url.lanjuwms.raw.TemporarilyCollectedPo.sap105temporarilyCollected, {
params: data,
});
}

@ -49,5 +49,6 @@ export const page = {
ArrivalRecord: '/pages/wms/Raw/ArrivalRecord/index',
ProductionRecord: '/pages/wms/product/ProductionRecord/index',
SapStock: '/pages/wms/Raw/SapStock/index',
TemporarilyCollected: '/pages/wms/Raw/TemporarilyCollected/index',
},
};

@ -122,6 +122,7 @@ export const url = {
listTableCK: qianzhuione + '/wms/WmsToWCSmission/listTableCK',
SweepMaterialCardSC: qianzhuione + '/wms/WmsToWCSmission/SweepMaterialCardSC',
addOrderCardX: qianzhuione + '/wms/WmsToWCSmission/addOrderCardX',
sap105temporarilyCollected: qianzhuione + '/wms/odsRawOrderIn/sap105temporarilyCollected',
},
ReceiveSRM: {
// 手持 --包材采购单采购收货查询
@ -150,6 +151,7 @@ export const url = {
selectCardList: qianzhuione + '/wms/WmsToWCSmission/selectCardList',
addOrderCardXnew: qianzhuione + '/wms/WmsToWCSmission/addOrderCardXNew',
upbatCardXNew: qianzhuione + '/wms/WmsToWCSmission/upbatCardXNew',
sap105temporarilyCollected: qianzhuione + '/wms/odsRawOrderIn/sap105temporarilyCollected',
},
PurchaseWHPO: {
// 手持 --包材采购单采购收货查询
@ -195,6 +197,10 @@ export const url = {
SapStockPo: {
getSapStockList: qianzhuione + '/wms/matetowsn/saplist',
},
TemporarilyCollectedPo: {
getWmsRawOrderInListToPda: qianzhuione + '/wms/odsRawOrderIn/wmsRawOrderInListToPda',
sap105temporarilyCollected: qianzhuione + '/wms/odsRawOrderIn/sap105temporarilyCollected',
},
},
WhiteManagement: {
WhiteInstorage: {

Loading…
Cancel
Save