wms到货登记记录&&jpacker组件修改
parent
48670d1e78
commit
0da43799fc
@ -0,0 +1,312 @@
|
||||
<template>
|
||||
<view class="page-product-receipt">
|
||||
<view class="header" :style="{ backgroundColor: `rgba(250, 53, 52, ${scrollTop / 100})` }">
|
||||
<view class="left">
|
||||
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack({})" />
|
||||
</view>
|
||||
<view class="title">到货登记记录</view>
|
||||
<view class="right"></view>
|
||||
</view>
|
||||
<view class="fiexdcontent">
|
||||
<u-form class="form" ref="form" label-width="80rpx">
|
||||
<u-form-item label="时间" prop="name">
|
||||
<view style="display: flex; flex-direction: row; justify-content: space-between; width: 100%">
|
||||
<picker mode="date" :value="startdate" @change="startchange">
|
||||
<view class="uni-input">{{ startdate }}</view>
|
||||
</picker>
|
||||
<view> 至 </view>
|
||||
<picker mode="date" :value="enddate" @change="endchange">
|
||||
<view class="uni-input">{{ enddate }}</view>
|
||||
</picker>
|
||||
</view>
|
||||
<uni-icons type="closeempty" size="20" @click="mepty"></uni-icons>
|
||||
|
||||
<!-- <button size="default" type="default" @click="mepty">重制</button> -->
|
||||
</u-form-item>
|
||||
<u-form-item label="采购单" prop="name">
|
||||
<u-input placeholder="请输入单号" v-model="procureCode" />
|
||||
</u-form-item>
|
||||
<u-form-item label="物料号" prop="name">
|
||||
<u-input placeholder="请输入物料号" v-model="materialCode" />
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
</view>
|
||||
<view class="scroll">
|
||||
<view v-for="item in receivedlist" :key="item.id" @dblclick="onFormDoubleClick(item)">
|
||||
<u-form style="margin-top: 10rpx" class="form2">
|
||||
<view class="list">
|
||||
<!-- <view class="righttitle">
|
||||
<view class="boder-icon-top zhuangtai" data-state="0">已收货</view>
|
||||
</view> -->
|
||||
<view class="row-list">
|
||||
<view class="list-item"> 采购单号: </view>
|
||||
<view> {{ item.procureCode }} </view>
|
||||
</view>
|
||||
<view class="row-list">
|
||||
<view class="list-item"> 物料编码: </view>
|
||||
<view> {{ item.materialCode }}</view>
|
||||
</view>
|
||||
<view class="row-list">
|
||||
<view class="list-item"> 物料描述: </view>
|
||||
<view>{{ item.materialDesc }}</view>
|
||||
</view>
|
||||
<view class="row-list">
|
||||
<view class="list-item"> 计划数量: </view>
|
||||
<view>{{ item.planNumber }}</view>
|
||||
</view>
|
||||
<view class="row-list">
|
||||
<view class="list-item"> 登记数量: </view>
|
||||
<view>{{ item.operationNumber }}</view>
|
||||
</view>
|
||||
<view class="row-list">
|
||||
<view class="list-item"> 时间: </view>
|
||||
<view>{{ item.lastUpdateDate }}</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</u-form>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view style="height: 14rpx"></view> -->
|
||||
<view class="bottom-bar">
|
||||
<u-row class="button-bar">
|
||||
<!-- 确定 -->
|
||||
<u-col :span="6">
|
||||
<u-button @click="onSubmit" type="primary">查询</u-button>
|
||||
</u-col>
|
||||
<!-- 返回 -->
|
||||
<u-col :span="6">
|
||||
<u-button type="error" @click="uni.navigateBack({})">返回</u-button>
|
||||
</u-col>
|
||||
</u-row>
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { Component } from 'vue-property-decorator';
|
||||
import { BasePage } from '@/components/base/page';
|
||||
import { session } from '@/store/modules/session';
|
||||
import model from './model';
|
||||
import dayjs from 'dayjs';
|
||||
interface OptionType {
|
||||
label: string;
|
||||
value: string;
|
||||
}
|
||||
//import { session } from '@/store/modules/session';
|
||||
@Component({
|
||||
components: {
|
||||
//MxDatePicker
|
||||
},
|
||||
})
|
||||
export default class ArrivalRecord extends BasePage {
|
||||
model = model;
|
||||
startdateValue = dayjs().format('YYYY-MM-DD');
|
||||
startdate = dayjs().format('YYYY-MM-DD');
|
||||
enddate = dayjs().format('YYYY-MM-DD');
|
||||
procureCode = '';
|
||||
materialCode = '';
|
||||
receivedlist= [];
|
||||
border = true;
|
||||
async onReady() {}
|
||||
|
||||
startchange(e) {
|
||||
this.startdate = e.detail.value;
|
||||
}
|
||||
endchange(e) {
|
||||
this.enddate = e.detail.value;
|
||||
}
|
||||
async onSubmit() {
|
||||
if (this.procureCode == '' || this.procureCode.length == 0) {
|
||||
(this.$refs.uToast as any).show({
|
||||
title: '请输入采购单号',
|
||||
type: 'default',
|
||||
});
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
factoryCode:session.FactoryCode,
|
||||
...(this.materialCode!==''&&{materialCode:this.materialCode}) ,
|
||||
procureCode:this.procureCode,
|
||||
...(this.startdate !== '请选择' && { lastUpdateDateMIN: this.startdate }),
|
||||
...(this.enddate !== '请选择' && { lastUpdateDateMAX: this.enddate })
|
||||
}
|
||||
await this.model.getArrivalRecord(params);
|
||||
if(this.model.responseCode == '200'){
|
||||
this.receivedlist
|
||||
let showlist = model.responseData;
|
||||
this.receivedlist = showlist.map(item=>{
|
||||
let newmaterialCode = item.materialCode.slice(item.materialCode.search(/[1-9]/));
|
||||
return {
|
||||
...item,
|
||||
materialCode:newmaterialCode
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
mepty() {
|
||||
this.startdate = '请选择';
|
||||
this.enddate = '请选择';
|
||||
//this.startdateValue = dayjs().format('YYYY-MM-DD');
|
||||
//this.model.mepty();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
body {
|
||||
background-color: rgb(242, 242, 242);
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
.page-product-receipt {
|
||||
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #f8262c 51%, #d9001b 100%) no-repeat;
|
||||
background-size: 100% 600rpx;
|
||||
padding: 118rpx 30rpx 162rpx;
|
||||
min-height: 100%;
|
||||
|
||||
.header {
|
||||
position: fixed;
|
||||
top: 0rpx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 99;
|
||||
display: flex;
|
||||
height: 120rpx;
|
||||
line-height: 88rpx;
|
||||
color: #fff;
|
||||
font-size: 34rpx;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
padding: 45rpx 0rpx 0rpx;
|
||||
|
||||
.title {
|
||||
flex: 3;
|
||||
}
|
||||
|
||||
.left,
|
||||
.right {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.icon {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.fiexdcontent {
|
||||
position: fixed;
|
||||
width: 92%;
|
||||
box-shadow: 0 0 14px 0 rgb(128 128 128 / 46%);
|
||||
z-index: 100;
|
||||
}
|
||||
.form {
|
||||
background-color: #fff;
|
||||
padding: 15rpx;
|
||||
border-radius: 10rpx;
|
||||
//box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
|
||||
|
||||
.u-form-item {
|
||||
padding: 20rpx 0;
|
||||
line-height: 35rpx;
|
||||
|
||||
.Transfer {
|
||||
width: 280rpx;
|
||||
height: 64rpx;
|
||||
background: rgb(242, 242, 242);
|
||||
border-radius: 110rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.single {
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
display: flex;
|
||||
|
||||
.single-left {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
|
||||
view {
|
||||
width: 190rpx;
|
||||
height: 100%;
|
||||
line-height: 55rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.single-right {
|
||||
button {
|
||||
// margin-top: 15rpx;
|
||||
width: 140rpx;
|
||||
height: 70rpx;
|
||||
background-color: #fa3534;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-around;
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.scroll {
|
||||
// margin-top: 2rpx;
|
||||
height: 780rpx;
|
||||
position: absolute;
|
||||
width: 92%;
|
||||
top:444rpx;
|
||||
/* bottom: 40px; */
|
||||
overflow: auto;
|
||||
// background-color: #f2f2f2;
|
||||
.form2 {
|
||||
background-color: #fff;
|
||||
padding: 20rpx 20rpx 20rpx;
|
||||
border-radius: 10rpx;
|
||||
box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
|
||||
color: #8d8989;
|
||||
.list {
|
||||
// display: flex;
|
||||
// flex-direction: cloumn;
|
||||
|
||||
.row-list {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
.list-item{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.button-bar {
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
@ -0,0 +1,24 @@
|
||||
import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators';
|
||||
import store from '@/store';
|
||||
import http from '@/utils/request';
|
||||
import { url } from '@/utils/url';
|
||||
//import { session } from '@/store/modules/session';
|
||||
@Module({
|
||||
namespaced: true,
|
||||
dynamic: true,
|
||||
store,
|
||||
name: 'page.Raw.ArrivalRecord',
|
||||
})
|
||||
export class ArrivalRecord extends VuexModule {
|
||||
responseCode: any = '';
|
||||
responseData: any = [];
|
||||
@MutationAction
|
||||
async getArrivalRecord(params: any) {
|
||||
const result: any = await http.post(url.lanjuwms.raw.ArrivalRecord.getArrivalRecord, params);
|
||||
const responseCode = result.code;
|
||||
const responseData = result.data;
|
||||
return { responseCode, responseData };
|
||||
}
|
||||
}
|
||||
|
||||
export default getModule(ArrivalRecord);
|
Loading…
Reference in New Issue