Commit 0190728b authored by xiangzj's avatar xiangzj

装箱和过账UI

parent 7190ef8b
<template>
<view class="contentBox">
<slot></slot>
<u-loadmore class="bottomArea" :status="status" v-if="loadmore" />
<view class="noList" v-if="list.length === 0">
<view v-if="list.length">
<slot></slot>
<u-loadmore class="bottomArea" :status="status" v-if="loadmore" />
</view>
<view class="noList" v-if="list.length === 0 && loadmore">
暂无数据
</view>
</view>
......
{
"easycom": {
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
},
"pages": [
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/sys/login/login"
},
{
"path": "pages/index/index",
"style": {
"navigationStyle": "custom"
},
"app-plus": {
"bounce": "none"
// 将回弹属性关掉
}
},
{
"path": "pages/purchaseStorage/purchaseStorage",
"style": {
"navigationBarTitleText": "采购入库扫描",
"enablePullDownRefresh": false
}
},
{
"path": "pages/positionTansfer/positionTansfer",
"style": {
"navigationBarTitleText": "仓位转移",
"enablePullDownRefresh": false
}
},
{
"path": "pages/confirComplete/confirComplete",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "pages/inventoryCounting/inventoryCounting",
"style": {
"navigationBarTitleText": "库存盘点",
"enablePullDownRefresh": false
}
},
{
"path": "pages/inventoryCounting/inventoryList",
"style": {
"navigationBarTitleText": "库存盘点",
"enablePullDownRefresh": false
}
},
{
"path": "pages/productionIssuance/productionIssuance",
"style": {
"navigationBarTitleText": "生产发料",
"enablePullDownRefresh": false
}
},
{
"path": "pages/productionIssuance/productionIssuanceList",
"style": {
"navigationBarTitleText": "生产发料",
"enablePullDownRefresh": false
}
},
{
"path": "pages/productionIssuance/oddNumList",
"style": {
"navigationBarTitleText": "生产发料",
"enablePullDownRefresh": false
}
},
{
"path": "pages/salesReturns/salesReturns",
"style": {
"navigationBarTitleText": "销售退货",
"enablePullDownRefresh": false
}
},
{
"path": "pages/salesReturns/salesReturnsList",
"style": {
"navigationBarTitleText": "销售退货",
"enablePullDownRefresh": false
}
},
{
"path": "pages/salesOutbound/salesOutbound",
"style": {
"navigationBarTitleText": "销售出库",
"enablePullDownRefresh": false
}
"easycom": {
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
},
{
"path": "pages/salesOutbound/salesOutboundList",
"style": {
"navigationBarTitleText": "销售出库",
"enablePullDownRefresh": false
}
},
{
"path": "pages/salesOutbound/oddNumList",
"style": {
"navigationBarTitleText": "销售出库",
"enablePullDownRefresh": false
}
},
{
"path": "pages/produceReturn/produceReturn",
"style": {
"navigationBarTitleText": "生产退料",
"enablePullDownRefresh": false
}
},
{
"path": "pages/produceReturn/produceReturnList",
"style": {
"navigationBarTitleText": "生产退料",
"enablePullDownRefresh": false
}
},
{
"path": "pages/outsourcedMaterial/outsourcedMaterial",
"style": {
"navigationBarTitleText": "委外发料",
"enablePullDownRefresh": false
}
},
{
"path": "pages/outsourcedMaterial/outsourcedMaterialList",
"style": {
"navigationBarTitleText": "委外发料",
"enablePullDownRefresh": false
}
},
{
"path": "pages/outsourcedReturn/outsourcedReturn",
"style": {
"navigationBarTitleText": "委外退料",
"enablePullDownRefresh": false
}
"pages": [
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/sys/login/login"
},
{
"path": "pages/index/index",
"style": {
"navigationStyle": "custom"
},
"app-plus": {
"bounce": "none"
// 将回弹属性关掉
}
},
{
"path": "pages/purchaseStorage/purchaseStorage",
"style": {
"navigationBarTitleText": "采购入库扫描",
"enablePullDownRefresh": false
}
},
{
"path": "pages/positionTansfer/positionTansfer",
"style": {
"navigationBarTitleText": "仓位转移",
"enablePullDownRefresh": false
}
},
{
"path": "pages/confirComplete/confirComplete",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "pages/inventoryCounting/inventoryCounting",
"style": {
"navigationBarTitleText": "库存盘点",
"enablePullDownRefresh": false
}
},
{
"path": "pages/inventoryCounting/inventoryList",
"style": {
"navigationBarTitleText": "库存盘点",
"enablePullDownRefresh": false
}
},
{
"path": "pages/productionIssuance/productionIssuance",
"style": {
"navigationBarTitleText": "生产发料",
"enablePullDownRefresh": false
}
},
{
"path": "pages/productionIssuance/productionIssuanceList",
"style": {
"navigationBarTitleText": "生产发料",
"enablePullDownRefresh": false
}
},
{
"path": "pages/productionIssuance/oddNumList",
"style": {
"navigationBarTitleText": "生产发料",
"enablePullDownRefresh": false
}
},
{
"path": "pages/salesReturns/salesReturns",
"style": {
"navigationBarTitleText": "销售退货",
"enablePullDownRefresh": false
}
},
{
"path": "pages/salesReturns/salesReturnsList",
"style": {
"navigationBarTitleText": "销售退货",
"enablePullDownRefresh": false
}
},
{
"path": "pages/salesOutbound/salesOutbound",
"style": {
"navigationBarTitleText": "销售出库",
"enablePullDownRefresh": false
}
},
{
"path": "pages/salesOutbound/salesOutboundList",
"style": {
"navigationBarTitleText": "销售出库",
"enablePullDownRefresh": false
}
},
{
"path": "pages/salesOutbound/oddNumList",
"style": {
"navigationBarTitleText": "销售出库",
"enablePullDownRefresh": false
}
},
{
"path": "pages/produceReturn/produceReturn",
"style": {
"navigationBarTitleText": "生产退料",
"enablePullDownRefresh": false
}
},
{
"path": "pages/produceReturn/produceReturnList",
"style": {
"navigationBarTitleText": "生产退料",
"enablePullDownRefresh": false
}
},
{
"path": "pages/outsourcedMaterial/outsourcedMaterial",
"style": {
"navigationBarTitleText": "委外发料",
"enablePullDownRefresh": false
}
},
{
"path": "pages/outsourcedMaterial/outsourcedMaterialList",
"style": {
"navigationBarTitleText": "委外发料",
"enablePullDownRefresh": false
}
},
{
"path": "pages/outsourcedReturn/outsourcedReturn",
"style": {
"navigationBarTitleText": "委外退料",
"enablePullDownRefresh": false
}
},
{
"path": "pages/outsourcedReturn/outsourcedReturnList",
"style": {
"navigationBarTitleText": "委外退料",
"enablePullDownRefresh": false
}
},
{
"path": "pages/packing/packing",
"style": {
"navigationBarTitleText": "委外退料",
"enablePullDownRefresh": false
}
},
{
"path": "pages/packing/packingList",
"style": {
"navigationBarTitleText": "委外退料",
"enablePullDownRefresh": false
}
},
{
"path": "pages/posting/posting",
"style": {
"navigationBarTitleText": "过账",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {
"navigationStyle": "custom",
"navigationBarTextStyle": "black",
"navigationBarTitleText": "MES",
"navigationBarBackgroundColor": "#F8F8F8",
"enablePullDownRefresh": false,
"backgroundColor": "#F8F8F8",
"rpxCalcMaxDeviceWidth": 750,
// rpx 计算所支持的最大设备宽度,单位 px,默认值为 960
"rpxCalcBaseDeviceWidth": 375,
// rpx 计算使用的基准设备宽度,设备实际宽度超出 rpx 计算所支持的最大设备宽度时将按基准宽度计算,单位 px,默认值为 375
"rpxCalcIncludeWidth": 750,
// rpx 计算特殊处理的值,始终按实际的设备宽度计算,单位 rpx,默认值为 750
"app-plus": {
"titleNView": false
}
},
{
"path": "pages/outsourcedReturn/outsourcedReturnList",
"style": {
"navigationBarTitleText": "委外退料",
"enablePullDownRefresh": false
}
"uniIdRouter": {},
"usingComponents": {
"uni-print": "@dcloudio/uni-ui/lib/uni-print"
}
],
"globalStyle": {
"navigationStyle": "custom",
"navigationBarTextStyle": "black",
"navigationBarTitleText": "MES",
"navigationBarBackgroundColor": "#F8F8F8",
"enablePullDownRefresh": false,
"backgroundColor": "#F8F8F8",
"rpxCalcMaxDeviceWidth": 750,
// rpx 计算所支持的最大设备宽度,单位 px,默认值为 960
"rpxCalcBaseDeviceWidth": 375,
// rpx 计算使用的基准设备宽度,设备实际宽度超出 rpx 计算所支持的最大设备宽度时将按基准宽度计算,单位 px,默认值为 375
"rpxCalcIncludeWidth": 750,
// rpx 计算特殊处理的值,始终按实际的设备宽度计算,单位 rpx,默认值为 750
"app-plus": {
"titleNView": false
}
},
"uniIdRouter": {},
"usingComponents": {
"uni-print": "@dcloudio/uni-ui/lib/uni-print"
}
}
\ No newline at end of file
......@@ -301,5 +301,6 @@ page {
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
</style>
\ No newline at end of file
......@@ -78,7 +78,17 @@ export default {
src: require('@/static/images/xsck.png'),
text: '销售拣货',
url: '/pages/salesOutbound/salesOutbound'
}
},
{
src: require('@/static/images/xsck.png'),
text: '装箱',
url: '/pages/packing/packing'
},
{
src: require('@/static/images/xsck.png'),
text: '发货过账',
url: '/pages/posting/posting'
},
]
}
]
......
......@@ -6,10 +6,8 @@
<u-tabs :list="list" :is-scroll="false" :current="current" @change="changeTab"></u-tabs>
</view>
</StickyNavBar>
<ContentLoadingMore class="contentMore">
<waitInventoried v-if="current === 0" />
<inventoryForm v-else />
</ContentLoadingMore>
<BottomBtn :btnArr="btnArr" @getBtnHandle="getBtnHandle" v-if="current === 0"></BottomBtn>
</view>
</template>
......@@ -81,6 +79,7 @@ export default {
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
.contentMore {
margin: 20rpx;
......
......@@ -137,6 +137,7 @@ export default {
<style lang="scss">
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
.planBox {
padding: 20rpx;
......
......@@ -160,6 +160,7 @@ page {
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
.cardBoxTip{
color: #000;
......
......@@ -288,5 +288,6 @@ page {
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
</style>
\ No newline at end of file
......@@ -288,5 +288,6 @@ page {
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
</style>
\ No newline at end of file
......@@ -307,5 +307,6 @@ page {
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
</style>
\ No newline at end of file
......@@ -288,5 +288,6 @@ page {
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
</style>
\ No newline at end of file
......@@ -288,5 +288,6 @@ page {
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
</style>
\ No newline at end of file
<template>
<view class="metering">
<u-row gutter="16" class="itemRow">
<u-col span="2">
长:
</u-col>
<u-col span="6">
<uni-easyinput v-model="orderItem"></uni-easyinput>
</u-col>
</u-row>
<u-row gutter="16" class="itemRow">
<u-col span="2">
宽:
</u-col>
<u-col span="6">
<uni-easyinput v-model="orderItem"></uni-easyinput>
</u-col>
</u-row>
<u-row gutter="16" class="itemRow">
<u-col span="2">
高:
</u-col>
<u-col span="6">
<uni-easyinput v-model="orderItem"></uni-easyinput>
</u-col>
</u-row>
<u-row gutter="16" class="itemRow">
<u-col span="2">
毛重:
</u-col>
<u-col span="6">
<uni-easyinput v-model="orderItem"></uni-easyinput>
</u-col>
</u-row>
<u-row gutter="16" class="itemRow">
<u-col span="2">
箱重:
</u-col>
<u-col span="6">
<uni-easyinput v-model="orderItem"></uni-easyinput>
</u-col>
</u-row>
<u-row gutter="16" class="itemRow">
<u-col span="2">
净重:
</u-col>
<u-col span="6">
<uni-easyinput v-model="orderItem" disabled></uni-easyinput>
</u-col>
</u-row>
</view>
</template>
<script>
export default {
components: {
},
data() {
return {
};
},
created() {
},
props:{
orderItem: {
type: String,
default: '',
},
form: {
type: Object,
default: function () {
return {};
}
}
},
computed:{
},
methods: {
}
};
</script>
<style lang="scss" scoped>
.metering{
border-radius: 20rpx;
margin: 20rpx;
padding: 20rpx;
background: #fff;
}
.itemRow{
margin-bottom: 10rpx;
}
</style>
<template>
<view>
<StickyNavBar>
<NavBar title="装箱"></NavBar>
<view class="btn">
<uni-easyinput
prefixIcon="search"
:disabled="isDisabled"
v-model="wxparams"
:focus="isFocus"
placeholder="请扫描单号"
@input="handleInputPlnr"
></uni-easyinput>
</view>
</StickyNavBar>
<view class="cardBox">
<text class="cardBoxTip">
步骤一 扫描单号
</text>
<u-image class='cardBoxImg' :src="bgSrc" width="560rpx" height="400rpx"></u-image>
<view class="cardBoxTip2">
摄像头对准
</view>
<view class="cardBoxTip3">
装箱二维码
</view>
<view class="cardBoxTip2">
<text class="tipLeft">
点击扫描或
</text>
<text class="tipRight">
点选单号
</text>
</view>
</view>
<!-- <BottomBtn :btnArr="btnArr" @getBtnHandle="getBtnHandle"></BottomBtn> -->
</view>
</template>
<script>
import StickyNavBar from '@/components/StickyNavBar/index.vue';
import ContentLoadingMore from '@/components/ContentLoadingMore/index.vue';
import BottomBtn from '@/components/BottomBtn/index.vue';
export default {
components: {
StickyNavBar,
ContentLoadingMore,
BottomBtn
},
data() {
return {
bgSrc: require('@/static/images/qrcode.png'),
number: 0,
show: true,
nlpla: '',
wxparams: '',
btnArr: [
{
style: '',
type: 'primary',
text: '扫描单号',
way: 'scanning'
},
// {
// style: '',
// type: 'warning',
// text: '查询单号',
// way: 'goClick'
// }
],
goodsList: [],
isFocus: false,
isDisabled: false
};
},
created() {
// this.getPlnr('10000001');
},
methods: {
getBtnHandle(row) {
this[row.way]();
},
goClick() {
uni.navigateTo({
url: `/pages/salesOutbound/oddNumList`
});
},
scanning() {
this.isFocus = true
uni.navigateTo({
url: `/pages/salesOutbound/salesOutboundList`
});
},
handleInputPlnr(e) {
this.isFocus = false;
uni.navigateTo({
url: `/pages/packing/packingList?order=${e}`
});
},
}
};
</script>
<style lang="scss" scoped>
page {
background: #f8f8f8;
}
.btn {
padding: 20rpx;
background: #fff;
.topSearch {
margin-bottom: 20rpx;
}
}
.cardBox {
min-height: calc(100vh - 400rpx);
padding: 0rpx 20rpx;
margin-top: 20rpx;
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
.cardBoxTip{
color: #000;
font-size: 28rpx;
}
.cardBoxTip2{
color: #000;
font-size: 28rpx;
text-align: center;
}
.cardBoxTip3{
color: #3f9dcc;
font-size: 28rpx;
text-align: center;
}
.tipRight{
color: #ff9900;
}
</style>
\ No newline at end of file
<template>
<view class="lists">
<StickyNavBar :class="{'meteringTab':current === 1}">
<NavBar title="装箱"></NavBar>
<view class="selectSheet">
<u-tabs :list="list" :is-scroll="false" :current="current" @change="changeTab"></u-tabs>
</view>
<view class="headerTitle">
<view class="items">箱号:{{ orderBoxNum }}</view>
</view>
<view class="" v-if="current === 0" >
<view class="btn">
<view class="boxSelect">
<u-picker v-model="show" mode="selector" :default-selector="[0]" range-key="text" :range="actionSheetList" @confirm="actionSheetCallback"></u-picker>
<u-input v-model="form.ZZXFS" placeholder="请选择装箱方式" type="select" :border="true" @click="show = true" />
</view>
<uni-easyinput
prefixIcon="search"
:disabled="isDisabled"
v-model="wxparams"
:focus="isFocus"
placeholder="请扫描产品包装条码/外箱码"
@input="handleInputPlnr"
></uni-easyinput>
</view>
<view class="total">
<view class="left">明细</view>
<view class="right">
数量:
<text class="">{{ goodsList.length }}</text>
</view>
</view>
</view>
</StickyNavBar>
<relationships v-show="current === 0" :list="goodsList" @deleGonds="deleGonds"/>
<metering v-show="current === 1" :form="form"/>
<BottomBtn :btnArr="btnArr" @getBtnHandle="getBtnHandle" v-if="current === 0"></BottomBtn>
</view>
</template>
<script>
import StickyNavBar from '@/components/StickyNavBar/index.vue';
import ContentLoadingMore from '@/components/ContentLoadingMore/index.vue';
import BottomBtn from '@/components/BottomBtn/index.vue';
import relationships from './relationships.vue';
import metering from './metering.vue';
export default {
components: {
StickyNavBar,
ContentLoadingMore,
BottomBtn,
relationships,
metering
},
data() {
return {
value: '',
type: 'select',
show: false,
border: true,
list: [
{
name: '装箱关联'
},
{
name: '计量称重'
}
],
current: 0,
status: 'loadmore',
btnArr: [
{
style: '',
type: 'warning',
text: '返回',
way: 'goBack'
},
{
style: '',
type: 'primary',
text: '提交',
way: 'goSubmit'
}
],
wxparams: '',
isFocus: false,
isDisabled: false,
orderBoxNum: '',
show: false,
actionSheetList: [
{
text: 'BL+PL'
},
{
text: 'PL'
},
],
form: {
ZZXFS: '',
},
goodsList: [],
};
},
onLoad(option) {
if(option && option.order){
this.orderBoxNum = option.order
}
},
methods: {
goSubmit(){
if(this.goodsList.length === 0){
this.$u.toast('暂无提交数据');
}
},
// 删除
deleGonds(idx) {
this.goodsList.splice(idx, 1);
},
handleInputPlnr(e) {
this.isFocus = false;
this.isDisabled = true;
e && this.goodsList.push(e)
setTimeout(() => {
this.isFocus = true;
this.isDisabled = false;
this.wxparams = ''
}, 1000);
},
// 点击actionSheet回调
actionSheetCallback(index) {
this.form.ZZXFS = this.actionSheetList[index].text;
},
// 加载更多
onReachBottom() {
console.log('加载更多inventoryCounting');
},
getBtnHandle(row) {
console.log('getBtnHandle', row);
this[row.way]();
},
goBack() {
console.log('返回了');
uni.navigateBack();
},
changeTab(index) {
this.current = index;
}
}
};
</script>
<style lang="scss" scoped>
.selectSheet {
border-bottom: 1px solid #ccc;
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
.contentMore {
margin: 20rpx;
}
page {
background: #f8f8f8;
}
.headerTitle{
padding: 20rpx;
font-weight: 600;
.items{
line-height: 40rpx;
}
}
.btn {
padding: 20rpx;
background: #fff;
.boxSelect {
margin-bottom: 20rpx;
}
}
.total {
background: #fff;
color: #000;
padding: 0rpx 40rpx;
display: flex;
justify-content: space-between;
font-size: 32rpx;
.line {
margin: 0px 10rpx;
}
}
.meteringTab{
// height: 200rpx;
/deep/.u-sticky-wrap{
height: 240rpx!important;
}
}
</style>
<template>
<view class="lists">
<StickyNavBar class="listTitle">
</StickyNavBar>
<ContentLoadingMore class="contentMore" :list='list'>
<view class="cardbox">
<view class="cardContent" v-for="(item, index) in list" :key="item.PLNR">
<!-- <scanningList :item='item'/> -->
<view class="listItemTitle">
<view>
<view class="item">PL号:{{ list[index] }}</view>
<!-- <view class="item">物料编号:{{ item.MATNR }}</view>
<view class="item">物料描述:{{ item.MAKTX }}</view>
<view class="item">数量:{{ item.MAKTX }}</view> -->
</view>
<u-button size="mini" type="primary" plain @click="deleGonds(index)">
<u-icon name="trash" size="28"></u-icon>
删除
</u-button>
</view>
</view>
</view>
</ContentLoadingMore>
<BottomBtn :btnArr="btnArr" @getBtnHandle="getBtnHandle"></BottomBtn>
</view>
</template>
<script>
import StickyNavBar from '@/components/StickyNavBar/index.vue';
import ContentLoadingMore from '@/components/ContentLoadingMore/index.vue';
import BottomBtn from '@/components/BottomBtn/index.vue';
import scanningList from "./scanningList.vue"
import { parseTime} from "@/utils/ruoyi";
export default {
components: {
StickyNavBar,
ContentLoadingMore,
BottomBtn,
scanningList,
},
props:{
list: {
type: Array,
default: function () {
return [];
}
},
},
data() {
return {
type: 'select',
border: true,
current: 0,
status: 'loadmore',
btnArr: [
{
style: '',
type: 'warning',
text: '返回',
way: 'goBack'
},
{
style: '',
type: 'primary',
text: '提交',
way: 'goSubmit'
}
],
nlpla: '',
orderBoxNum: '',
};
},
created() {
},
onLoad(option) {
if(option && option.order){
this.orderBoxNum = option.order
}
},
computed:{
},
methods: {
goSubmit() {
const checkboxArr = this.list.filter(item => item.checkedBox)
if (checkboxArr.length === 0) {
this.$u.toast('暂无提交数据');
return;
}
this.$u.api.sapApi
.sapPickingDn(checkboxArr)
.then((res) => {
this.loading = false;
console.log(res);
if (res.every((item) => item.TYPE === 'S')) {
this.$u.toast('提交成功');
}
res.forEach((ele) => {
if (ele.TYPE === 'E') {
this.$u.toast(ele.MESSAGE);
}
});
});
},
deleGonds(idx) {
this.$emit('deleGonds',idx)
},
// 加载更多
onReachBottom() {
console.log('加载更多inventoryCounting');
},
getBtnHandle(row) {
console.log('getBtnHandle', row);
this[row.way]();
},
goBack() {
console.log('进来');
uni.navigateBack({
delta: 0
});
},
changeTab(index) {
this.current = index;
},
}
};
</script>
<style lang="scss">
.selectSheet {
border-bottom: 1px solid #ccc;
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
.tabTwo{
/deep/ .u-sticky-wrap{
height: 330rpx !important;
}
}
.listTitle{
}
.contentMore {
margin: 20rpx;
}
page {
background: #f8f8f8;
}
.cardbox {
min-height: calc(100vh - 410rpx);
padding: 0rpx 20rpx;
margin-top: 20rpx;
}
.cardContent {
border-radius: 8px;
background: #fff;
margin-bottom: 20rpx;
}
.listItemTitle {
display: flex;
justify-content: space-between;
padding: 20rpx;
border-bottom: 2px solid #f8f8f8;
.u-btn {
width: 150rpx;
margin: 0px;
margin-top: 10rpx;
}
.item {
line-height: 50rpx;
color: #333;
font-size: 28rpx;
font-weight: 500;
word-break: break-all;
font-weight: 600;
}
}
</style>
<template>
<view>
<view class="listItemTitle">
<view>
<!-- pl,物料名,物料号,数量,对应删除 -->
<view class="item">物料编号:{{ item.MATNR }}</view>
<view class="item">物料描述:{{ item.MAKTX }}</view>
</view>
</view>
</view>
</template>
<script>
import StickyNavBar from '@/components/StickyNavBar/index.vue';
import ContentLoadingMore from '@/components/ContentLoadingMore/index.vue';
import BottomBtn from '@/components/BottomBtn/index.vue';
export default {
components: {
StickyNavBar,
ContentLoadingMore,
BottomBtn
},
props: {
item: {
type: Object,
default: function () {
return {};
}
}
},
// watch: {
// goodsList: {
// handler: function(val, oldVal) {
// this.goodsList = val
// },
// immediate: true
// }
// },
data() {
return {
r1:'',
number: 0,
totalNum: 0,
nlpla: '',
wxparams: '',
btnArr: [
{
style: '',
type: 'warning',
text: '返回',
way: 'goBack'
},
{
style: '',
type: 'primary',
text: '提交',
way: 'goSubmit'
}
],
isFocus: false,
show: true,
};
},
methods: {
}
};
</script>
<style lang="scss" scoped>
page {
background: #f8f8f8;
}
.headerTitle {
padding: 20rpx;
font-weight: 600;
.items {
line-height: 40rpx;
}
}
.btn {
padding: 20rpx;
background: #fff;
.topSearch {
margin-bottom: 20rpx;
}
}
.bottomBtn {
position: sticky;
padding: 20rpx;
display: flex;
justify-content: space-between;
background: #fff;
bottom: 0rpx;
margin-top: 20rpx;
.u-btn {
width: 300rpx;
}
}
.blue {
color: #3f9dcc;
}
.total {
background: #fff;
color: #000;
padding: 0rpx 40rpx;
display: flex;
justify-content: space-between;
font-size: 32rpx;
.line {
margin: 0px 10rpx;
}
}
.listItemTitle {
display: flex;
justify-content: space-between;
padding: 20rpx;
border-bottom: 2px solid #f8f8f8;
.u-btn {
width: 150rpx;
margin: 0px;
margin-top: 10rpx;
}
.item {
line-height: 50rpx;
color: #333;
font-size: 28rpx;
font-weight: 500;
word-break: break-all;
font-weight: 600;
}
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
</style>
<template>
<view>
<StickyNavBar>
<NavBar title="发货过账扫描"></NavBar>
<view class="btn">
<!-- <uni-easyinput prefixIcon="search" class="topSearch" v-model="nlpla" focus placeholder="请扫描库位" @change="handleInputNlpla"></uni-easyinput> -->
<uni-easyinput
prefixIcon="search"
:disabled="isDisabled"
v-model="wxparams"
:focus="isFocus"
placeholder="请扫描交货单"
@input="handleInputPlnr"
></uni-easyinput>
</view>
</StickyNavBar>
<ContentLoadingMore class="cardbox" :list='goodsList'>
<view class="cardContent" v-for="(item, index) in goodsList">
<view class="listItemTitle">
<view class="item">交货单号:{{ item.MATNR }}</view>
</view>
</view>
</ContentLoadingMore>
<BottomBtn :btnArr="btnArr" @getBtnHandle="getBtnHandle"></BottomBtn>
</view>
</template>
<script>
import StickyNavBar from '@/components/StickyNavBar/index.vue';
import ContentLoadingMore from '@/components/ContentLoadingMore/index.vue';
import BottomBtn from '@/components/BottomBtn/index.vue';
export default {
components: {
StickyNavBar,
ContentLoadingMore,
BottomBtn
},
data() {
return {
number: 0,
totalNum: 0,
show: true,
nlpla: '',
wxparams: '',
btnArr: [
{
style: '',
type: 'warning',
text: '返回',
way: 'goBack'
},
{
style: '',
type: 'primary',
text: '过账',
way: 'goSubmit'
}
],
goodsList: [],
isFocus: false,
isDisabled: false
};
},
created() {
// this.getPlnr('10000820240325000001|10000320100');
},
methods: {
deleGonds(idx) {
this.goodsList.splice(idx, 1);
this.totalNum = 0;
this.goodsList.forEach((ele) => {
this.totalNum += ele.ERFMG;
});
},
getBtnHandle(row) {
this[row.way]();
},
goBack() {
uni.navigateBack();
},
goSubmit() {
if (this.goodsList.length === 0) {
return;
}
const params = {
"VBELN": this.goodsList[0].VBELN,
"WADAT": parseTime(new Date())
}
this.$u.api.sapApi
.sapDelv(params)
.then((res) => {
this.loading = false;
console.log(res);
if (res.every((item) => item.TYPE === 'S')) {
this.$u.toast('提交成功');
}
res.forEach((ele) => {
if (ele.TYPE === 'E') {
this.$u.toast(ele.MESSAGE);
}
});
});
},
handleInputPlnr(e) {
this.isFocus = false;
// e&& e.length > 79 && this.getPlnr(e);
e && this.getPlnr(e);
},
handleInputNlpla(e) {
if (e) {
this.nlpla = e;
this.goodsList.forEach((ele) => {
this.totalNum += ele.ERFMG;
ele.NLPLA = ele.NLPLA || this.nlpla;
});
}
},
getPlnr(plnr) {
this.totalNum = 0;
this.isDisabled = true;
this.$u.api.sapApi
.sapPlnr({
plnr
})
.then((res) => {
if (res && res.RESULT.TYPE === 'S') {
this.goodsList = this.goodsList.concat(res.DATA);
this.goodsList.forEach((ele) => {
this.totalNum += ele.ERFMG;
ele.NLPLA = ele.NLPLA || this.nlpla;
ele.PLNR = plnr
});
setTimeout(() => {
this.wxparams = '';
this.isFocus = true;
this.isDisabled = false;
}, 1000);
} else {
setTimeout(() => {
this.isFocus = true;
this.isDisabled = false;
}, 1000);
this.$u.toast(res.RESULT.MESSAGE);
}
this.loading = false;
});
}
}
};
</script>
<style lang="scss" scoped>
page {
background: #f8f8f8;
}
.btn {
padding: 20rpx;
background: #fff;
.topSearch {
margin-bottom: 20rpx;
}
}
.bottomBtn {
position: sticky;
padding: 20rpx;
display: flex;
justify-content: space-between;
background: #fff;
bottom: 0rpx;
margin-top: 20rpx;
.u-btn {
width: 300rpx;
}
}
.blue {
color: #3f9dcc;
}
.total {
background: #fff;
color: #000;
padding: 0rpx 40rpx;
display: flex;
justify-content: space-between;
font-size: 32rpx;
.line {
margin: 0px 10rpx;
}
}
.cardbox {
min-height: calc(100vh - 280rpx);
padding: 0rpx 20rpx;
margin-top: 20rpx;
}
.cardContent {
border-radius: 8px;
background: #fff;
}
.listItemTitle {
display: flex;
justify-content: space-between;
padding: 20rpx;
border-bottom: 2px solid #f8f8f8;
.u-btn {
width: 150rpx;
margin: 0px;
margin-top: 10rpx;
}
.item {
line-height: 50rpx;
color: #000;
font-size: 28rpx;
font-weight: 500;
word-break: break-all;
}
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
</style>
\ No newline at end of file
......@@ -160,6 +160,7 @@ page {
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
.cardBoxTip{
color: #000;
......
......@@ -288,5 +288,6 @@ page {
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
</style>
\ No newline at end of file
......@@ -288,5 +288,6 @@ page {
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
</style>
\ No newline at end of file
......@@ -7,7 +7,6 @@
<view class="cardContent" v-for="(item, index) in goodsList">
<view class="listItemTitle" @click="handleClick(item)">
<view>
<view class="item">申请单号:{{ item.applyNo }}</view>
<view class="item">物料编号:{{ item.itemCode }}</view>
<view class="item">物料描述:{{ item.itemName }}</view>
......@@ -17,29 +16,6 @@
<view class="item">计划时间:{{ item.startTime }}</view>
</view>
</view>
<!-- <view class="listBottom">
<view class="bottomTitle" @tap="show = !show">
<view class="desc">卷条码明细</view>
<view class="topIcons">
<view v-if="show">
<u-icon name="arrow-down" color="#aaa" size="32"></u-icon>
展开
</view>
<view v-else>
<u-icon name="arrow-up" color="#aaa" size="32"></u-icon>
收起
</view>
</view>
</view>
<view v-if="!show" class="bottomBox">
<view class="bottomItem">
<view class="items">{{ item.CHARG }}</view>
<view class="items">{{ item.MATNR }}</view>
<view class="items">数量:{{ item.ERFMG }}</view>
<view class="items">生产日期:{{ item.BLDAT }}</view>
</view>
</view>
</view> -->
</view>
</ContentLoadingMore>
<!-- <BottomBtn :btnArr="btnArr" @getBtnHandle="getBtnHandle"></BottomBtn> -->
......@@ -222,6 +198,7 @@ page {
.cardContent {
border-radius: 8px;
background: #fff;
margin-bottom: 20rpx;
}
.listItemTitle {
display: flex;
......@@ -276,5 +253,6 @@ page {
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
</style>
\ No newline at end of file
......@@ -75,7 +75,7 @@ export default {
};
},
created() {
this.getPlnr('SN202400172');
// this.getPlnr('SN202400172');
},
methods: {
getBtnHandle(row) {
......@@ -189,6 +189,7 @@ page {
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
.cardBoxTip{
color: #000;
......
......@@ -311,5 +311,6 @@ page {
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
</style>
\ No newline at end of file
......@@ -413,5 +413,6 @@ page {
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
</style>
\ No newline at end of file
......@@ -251,6 +251,11 @@ export default {
factorial(res,plnr,idx,num=0) {
// const arr = this.list.filter(item => item.itemCode.slice(9, 18) === plnr.slice(20, 29))
// 找出符合条件的数组长度
this.list.forEach(ele => {
console.log(`output->`,ele.itemCode)
console.log(`output->`,ele.itemCode.slice(9, 18))
console.log(`output->thi`,this.list.filter(item => item.itemCode.slice(9, 18) === plnr.slice(20, 29)))
});
const count = this.list.filter(item => item.itemCode.slice(9, 18) === plnr.slice(20, 29)).length
if(!count){
this.$u.toast('没有匹配到对应物料');
......@@ -445,5 +450,6 @@ page {
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
</style>
\ No newline at end of file
......@@ -233,5 +233,6 @@ page {
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
</style>
......@@ -307,5 +307,6 @@ page {
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
</style>
\ No newline at end of file
......@@ -280,5 +280,6 @@ page {
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
</style>
\ No newline at end of file
......@@ -22,7 +22,7 @@
摄像头对准
</view>
<view class="cardBoxTip3">
生产发料单号二维码
销售拣货单号二维码
</view>
<view class="cardBoxTip2">
<text class="tipLeft">
......@@ -33,7 +33,7 @@
</text>
</view>
</view>
<BottomBtn :btnArr="btnArr" @getBtnHandle="getBtnHandle"></BottomBtn>
<!-- <BottomBtn :btnArr="btnArr" @getBtnHandle="getBtnHandle"></BottomBtn> -->
</view>
</template>
......@@ -136,6 +136,7 @@ page {
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
.cardBoxTip{
color: #000;
......
......@@ -6,8 +6,8 @@
<u-tabs :list="list" :is-scroll="false" :current="current" @change="changeTab"></u-tabs>
</view> -->
<view class="headerTitle">
<view class="items">领料申请:MO2024032100001</view>
<view class="items">WC01:数码印刷车间</view>
<view class="items">交货单号:MO2024032100001</view>
<view class="items">600247|李XXXX宁XXX体</view>
<view class="items">计划日期:2024/03/22</view>
</view>
<view class="">
......@@ -23,9 +23,9 @@
></uni-easyinput>
</view>
<view class="total">
<view class="left">物料明细</view>
<view class="left">明细</view>
<view class="right">
物料数量:
<!-- 物料数量: -->
<text class="blue">{{ totalNum }}</text>
<text class="line">/</text>
<text class="">{{ goodsList.length }}</text>
......@@ -35,7 +35,7 @@
</StickyNavBar>
<ContentLoadingMore class="contentMore" :list='goodsList'>
<view class="cardbox">
<view class="cardContent" v-for="(item, index) in goodsList" :key="item.MATNR">
<view class="cardContent" v-for="(item, index) in goodsList" :key="item.PLNR">
<scanningList :item='item'/>
</view>
</view>
......@@ -98,7 +98,6 @@ export default {
nlpla: '',
wxparams: '',
goodsList: [],
totalNum: 0,
orderItem: {},
};
},
......@@ -110,44 +109,36 @@ export default {
this.goodsList = [
...JSON.parse(option.order)
]
this.goodsList.forEach(ele => {
ele.checkedBox = false
});
}
},
computed:{
totalNum(){
const count = this.goodsList.filter(item => item.checkedBox).length
return count || 0
},
},
methods: {
goSubmit() {
if (this.goodsList.length === 0) {
const checkboxArr = this.goodsList.filter(item => item.checkedBox)
if (checkboxArr.length === 0) {
this.$u.toast('暂无提交数据');
return;
}
const chargLength = checkboxArr.filter(item => item.CHARG).length
const chargListLength = this.goodsList.filter(item => item.CHARG).length
if (chargLength > 1 || chargListLength != chargLength) {
this.$u.toast('超过拣配数量');
return;
}
this.$u.api.sapApi
.sapPickingDn(this.goodsList)
.then((res) => {
this.loading = false;
console.log(res);
if (res.every((item) => item.TYPE === 'S')) {
this.goodsList = [];
this.totalNum = 0;
this.nlpla = '';
this.wxparams = '';
this.$u.toast('提交成功');
}
res.forEach((ele) => {
if (ele.TYPE === 'E') {
this.$u.toast(ele.MESSAGE);
}
});
});
},
goCarry(){
const params = {
"VBELN": this.goodsList[0].VBELN,
"WADAT": parseTime(new Date())
}
this.$u.api.sapApi
.sapDelv(params)
.sapPickingDn(checkboxArr)
.then((res) => {
this.loading = false;
console.log(res);
if (res.every((item) => item.TYPE === 'S')) {
this.$u.toast('提交成功');
}
res.forEach((ele) => {
......@@ -158,26 +149,33 @@ export default {
});
},
getPlnr(plnr) {
this.totalNum = 0;
let params = {
ZCODE: plnr.includes('BL') ? plnr : '',
plnr: plnr.includes('BL') ? '': plnr
}
this.$u.api.sapApi
.sapBlpl({
ZCODE: '',
plnr
})
.sapBlpl(params)
.then((res) => {
if (res.MSG[0].TYPE === 'S') {
const data = res.BLPL[0]
this.goodsList.forEach(ele => {
if(ele.MATNR === res.BLPL[0].MATNR){
ele.NLBER = data.NLBER
ele.NLPLA = data.NLPLA
ele.NLTYP = data.NLTYP
ele.CLABS = data.PACMG
}
});
const count = this.goodsList.filter(item => item.PLNR === res.BLPL[0].PLNR).length
if(!count){
this.$u.toast('没有匹配到对应物料');
}else{
this.goodsList.forEach((ele,idx) => {
if(ele.PLNR === res.BLPL[0].PLNR){
this.$set(this.goodsList,idx,{...ele,checkedBox: true})
}
});
}
} else {
this.$u.toast(res.MSG[0].MESSAGE);
}
setTimeout(() => {
this.isFocus = true;
this.isDisabled = false;
this.wxparams = ''
}, 1000);
this.loading = false;
});
},
......@@ -199,13 +197,7 @@ export default {
this.current = index;
},
handleInputNlpla(e) {
if (e) {
this.nlpla = e;
this.goodsList.forEach((ele) => {
this.totalNum += ele.ERFMG;
ele.NLPLA = ele.NLPLA || this.nlpla;
});
}
},
handleInputPlnr(e) {
this.isFocus = false;
......
......@@ -6,42 +6,46 @@
<view class="item">物料描述:{{ item.MAKTX }}</view>
</view>
<view class="right">
<checkbox-group class="checkedBox">
<checkbox value="r1" :checked="item.checkedBox" disabled/>
</checkbox-group>
<text class="blue">{{ item.CLABS }}</text>
<text class="line">/</text>
<text class="">{{item.LFIMG}}pcs</text>
</view>
</view>
<view class="listBottom">
<view class="bottomTitle" @click="show = !show">
<view class="desc">卷条码明细</view>
<view class="topIcons">
<view v-if="show">
<u-icon name="arrow-down" color="#aaa" size="32"></u-icon>
展开
</view>
<view v-else>
<u-icon name="arrow-up" color="#aaa" size="32"></u-icon>
收起
</view>
</view>
<view class="bottomTitle" @click="show = !show">
<view class="desc">卷条码明细</view>
<view class="topIcons">
<view v-if="show">
<u-icon name="arrow-down" color="#aaa" size="32"></u-icon>
展开
</view>
<view v-if="!show" class="bottomBox">
<view class="bottomItem">
<view class="items">装箱号:{{ item.ZCODE }}</view>
<view class="items">物料批号:{{ item.CHARG }}</view>
<view class="items">库位:{{ item.LGORT }}</view>
<!-- <view class="items">{{ item.MATNR }}</view> -->
<view class="items inputItem">
<!-- <u-row gutter="8"> -->
数量:
<uni-easyinput v-model="item.CLABS"></uni-easyinput>
/
{{ item.LFIMG }}
<!-- </u-row> -->
</view>
</view>
<view v-else>
<u-icon name="arrow-up" color="#aaa" size="32"></u-icon>
收起
</view>
</view>
</view>
<view v-if="!show" class="bottomBox">
<view class="bottomItem">
<view class="items">装箱号:{{ item.ZCODE }}</view>
<view class="items">物料批号:{{ item.CHARG }}</view>
<view class="items">库位:{{ item.LGORT }}</view>
<!-- <view class="items">{{ item.MATNR }}</view> -->
<view class="items inputItem">
<!-- <u-row gutter="8"> -->
数量:
{{item.CLABS}}
<!-- <uni-easyinput v-model="item.CLABS"></uni-easyinput> -->
/
{{ item.LFIMG }}
<!-- </u-row> -->
</view>
</view>
</view>
</view>
<!-- <BottomBtn :btnArr="btnArr" @getBtnHandle="getBtnHandle"></BottomBtn> -->
</view>
</template>
......@@ -74,6 +78,7 @@ export default {
// },
data() {
return {
r1:'',
number: 0,
totalNum: 0,
nlpla: '',
......@@ -199,12 +204,19 @@ page {
}
.inputItem{
display: inline-flex;
line-height: 76rpx;
// line-height: 76rpx;
}
}
}
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
.checkedBox{
text-align: right;
}
/deep/ .uni-checkbox-input-disabled:before{
color: #007aff !important;
}
</style>
......@@ -160,6 +160,7 @@ page {
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
.cardBoxTip{
color: #000;
......
......@@ -308,5 +308,6 @@ page {
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment