Commit 05e17ab6 authored by 何远江's avatar 何远江

装箱添加弹窗信息

parent 79a4011a
...@@ -8,21 +8,18 @@ ...@@ -8,21 +8,18 @@
<!-- <view class="headerTitle"> <!-- <view class="headerTitle">
<view class="items">箱号:{{ orderBoxNum }}</view> <view class="items">箱号:{{ orderBoxNum }}</view>
</view> --> </view> -->
<view class="" v-if="current === 0" > <view class="" v-if="current === 0">
<view class="btn"> <view class="btn">
<view class="boxSelect"> <view class="boxSelect">
<u-picker v-model="show" mode="selector" :default-selector="[0]" range-key="text" :range="actionSheetList" @confirm="actionSheetCallback"></u-picker> <u-picker v-model="show" mode="selector" :default-selector="[0]" range-key="text"
<u-input v-model="form.ZZXFS" placeholder="请选择装箱方式" type="select" :border="true" @click="show = true" /> :range="actionSheetList" @confirm="actionSheetCallback"></u-picker>
<u-input v-model="form.ZZXFS" placeholder="请选择装箱方式" type="select" :border="true"
@click="show = true" />
</view> </view>
<uni-easyinput prefixIcon="search" class="topSearch" v-model="blNum" focus placeholder="请扫描箱码" @change="handleInputNlpla" :disabled="form.ZZXFS === 'PL'"></uni-easyinput> <uni-easyinput prefixIcon="search" class="topSearch" v-model="blNum" focus placeholder="请扫描箱码"
<uni-easyinput @change="handleInputNlpla" :disabled="form.ZZXFS === 'PL'"></uni-easyinput>
prefixIcon="search" <uni-easyinput prefixIcon="search" :disabled="isDisabled" v-model="wxparams" :focus="isFocus"
:disabled="isDisabled" placeholder="请扫描产品包装条码/外箱码" @input="handleInputPlnr"></uni-easyinput>
v-model="wxparams"
:focus="isFocus"
placeholder="请扫描产品包装条码/外箱码"
@input="handleInputPlnr"
></uni-easyinput>
</view> </view>
<view class="total"> <view class="total">
<view class="left">明细</view> <view class="left">明细</view>
...@@ -33,21 +30,23 @@ ...@@ -33,21 +30,23 @@
</view> </view>
</view> </view>
</StickyNavBar> </StickyNavBar>
<relationships v-show="current === 0" :list="goodsList" @deleGonds="deleGonds"/> <relationships v-show="current === 0" :list="goodsList" @deleGonds="deleGonds" />
<metering v-show="current === 1" :form="form"/> <metering v-show="current === 1" :form="form" />
<BottomBtn :btnArr="btnArr" @getBtnHandle="getBtnHandle" v-if="current === 0"></BottomBtn> <BottomBtn :btnArr="btnArr" @getBtnHandle="getBtnHandle" v-if="current === 0"></BottomBtn>
</view> </view>
</template> </template>
<script> <script>
import StickyNavBar from '@/components/StickyNavBar/index.vue'; import StickyNavBar from '@/components/StickyNavBar/index.vue';
import ContentLoadingMore from '@/components/ContentLoadingMore/index.vue'; import ContentLoadingMore from '@/components/ContentLoadingMore/index.vue';
import BottomBtn from '@/components/BottomBtn/index.vue'; import BottomBtn from '@/components/BottomBtn/index.vue';
import relationships from './relationships.vue'; import relationships from './relationships.vue';
import metering from './metering.vue'; import metering from './metering.vue';
import { parseTime} from "@/utils/ruoyi"; import {
parseTime
} from "@/utils/ruoyi";
export default { export default {
components: { components: {
StickyNavBar, StickyNavBar,
ContentLoadingMore, ContentLoadingMore,
...@@ -61,8 +60,7 @@ export default { ...@@ -61,8 +60,7 @@ export default {
type: 'select', type: 'select',
show: false, show: false,
border: true, border: true,
list: [ list: [{
{
name: '装箱关联' name: '装箱关联'
}, },
{ {
...@@ -71,8 +69,7 @@ export default { ...@@ -71,8 +69,7 @@ export default {
], ],
current: 0, current: 0,
status: 'loadmore', status: 'loadmore',
btnArr: [ btnArr: [{
{
style: '', style: '',
type: 'warning', type: 'warning',
text: '返回', text: '返回',
...@@ -91,8 +88,7 @@ export default { ...@@ -91,8 +88,7 @@ export default {
isDisabled: false, isDisabled: false,
orderBoxNum: '', orderBoxNum: '',
show: false, show: false,
actionSheetList: [ actionSheetList: [{
{
text: 'BL+PL' text: 'BL+PL'
}, },
{ {
...@@ -125,48 +121,61 @@ export default { ...@@ -125,48 +121,61 @@ export default {
// } // }
// }, // },
methods: { methods: {
goSubmit(){ goSubmit() {
if(this.goodsList.length === 0){ if (this.goodsList.length === 0) {
this.$u.toast('暂无提交数据'); this.$u.toast('暂无提交数据');
return return
} }
if(!this.blNum){ if (!this.blNum) {
this.$u.toast('请扫描箱码'); this.$u.toast('请扫描箱码');
return return
} }
if(!this.form.long || !this.form.wide || !this.form.high || !this.form.brgew ||!this.form.zxntgew ){ if (!this.form.long || !this.form.wide || !this.form.high || !this.form.brgew || !this.form.zxntgew) {
this.$u.toast('请填写体积和重量'); uni.showModal({
return title: '提示',
content: '还未填写计量称重信息!是否继续提交?',
success: (res) => {
if (res.confirm) {
console.log('用户点击确定');
this.subRequest()
} else if (res.cancel) {
console.log('用户点击取消');
}
} }
});
} else {
this.subRequest()
}
},
// 请求发送
subRequest() {
const arr = [] const arr = []
this.goodsList.forEach(ele => { this.goodsList.forEach(ele => {
arr.push( arr.push({
{
plnr: ele, plnr: ele,
...this.form, ...this.form,
zxspe: this.form.long +'*'+ this.form.wide +'*'+ this.form.high, zxspe: this.form.long + '*' + this.form.wide + '*' + this.form.high,
zxvolum: (this.form.long * this.form.wide*this.form.high)/1000000, zxvolum: (this.form.long * this.form.wide * this.form.high) / 1000000,
ntgew: (this.form.brgew-0) - (this.form.zxntgew-0), ntgew: (this.form.brgew - 0) - (this.form.zxntgew - 0),
zcode: this.form.ZZXFS === 'PL' ? '' : this.blNum, zcode: this.form.ZZXFS === 'PL' ? '' : this.blNum,
datum: parseTime(new Date(),'{y}{m}{d}'), datum: parseTime(new Date(), '{y}{m}{d}'),
uzeit: parseTime(new Date(),'{h}{i}{s}'), uzeit: parseTime(new Date(), '{h}{i}{s}'),
} })
)
}); });
this.$u.api.sapApi this.$u.api.sapApi
.sapCasePlnr(arr) .sapCasePlnr(arr)
.then((res) => { .then((res) => {
if(!Array.isArray(res)){ if (!Array.isArray(res)) {
return return
} }
if (res.every((item) => item.TYPE === 'S')) { if (res.every((item) => item.TYPE === 'S')) {
this.$u.toast(res[0].MESSAGE); this.$u.toast(res[0].MESSAGE);
setTimeout(()=>{ setTimeout(() => {
this.goBack() this.goBack()
},1000) }, 1000)
} }
const foundObject = res.find(item => item.TYPE === 'E'); const foundObject = res.find(item => item.TYPE === 'E');
if(foundObject && foundObject.MESSAGE){ if (foundObject && foundObject.MESSAGE) {
this.$u.toast(foundObject.MESSAGE); this.$u.toast(foundObject.MESSAGE);
} }
}); });
...@@ -175,10 +184,10 @@ export default { ...@@ -175,10 +184,10 @@ export default {
deleGonds(idx) { deleGonds(idx) {
this.goodsList.splice(idx, 1); this.goodsList.splice(idx, 1);
}, },
handleInputNlpla(e){ handleInputNlpla(e) {
console.log(`output->e`,e) console.log(`output->e`, e)
}, },
reset(){ reset() {
setTimeout(() => { setTimeout(() => {
this.isFocus = true; this.isFocus = true;
this.isDisabled = false; this.isDisabled = false;
...@@ -199,7 +208,7 @@ export default { ...@@ -199,7 +208,7 @@ export default {
// 点击actionSheet回调 // 点击actionSheet回调
actionSheetCallback(index) { actionSheetCallback(index) {
this.form.ZZXFS = this.actionSheetList[index].text; this.form.ZZXFS = this.actionSheetList[index].text;
if(this.form.ZZXFS === 'PL'){ if (this.form.ZZXFS === 'PL') {
this.blNum = '' this.blNum = ''
} }
}, },
...@@ -219,55 +228,67 @@ export default { ...@@ -219,55 +228,67 @@ export default {
this.current = index; this.current = index;
} }
} }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.selectSheet { .selectSheet {
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
} }
/deep/ .u-sticky {
/deep/ .u-sticky {
top: 0 !important; top: 0 !important;
background: #fff; background: #fff;
} }
.contentMore {
.contentMore {
margin: 20rpx; margin: 20rpx;
} }
page {
page {
background: #f8f8f8; background: #f8f8f8;
} }
.headerTitle{
.headerTitle {
padding: 20rpx; padding: 20rpx;
font-weight: 600; font-weight: 600;
.items{
.items {
line-height: 40rpx; line-height: 40rpx;
} }
} }
.btn {
.btn {
padding: 20rpx; padding: 20rpx;
background: #fff; background: #fff;
.boxSelect { .boxSelect {
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
} }
.total {
.total {
background: #fff; background: #fff;
color: #000; color: #000;
padding: 0rpx 40rpx; padding: 0rpx 40rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
font-size: 32rpx; font-size: 32rpx;
.line { .line {
margin: 0px 10rpx; margin: 0px 10rpx;
} }
} }
.meteringTab{
.meteringTab {
// height: 200rpx; // height: 200rpx;
/deep/.u-sticky-wrap{ /deep/.u-sticky-wrap {
height: 170rpx!important; height: 170rpx !important;
}
} }
}
.topSearch{ .topSearch {
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
</style> </style>
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