Browse Source

原料直发客户修改发货数量

dev_pda
李俊城 2 years ago
parent
commit
5e03b8473c
  1. 6
      fe/PDA/mycomponents/comItem/comBalanceItem.vue
  2. 59
      fe/PDA/mycomponents/comItem/comItemTop.vue
  3. 7
      fe/PDA/pages/store/deliverRaw.vue

6
fe/PDA/mycomponents/comItem/comBalanceItem.vue

@ -1,6 +1,6 @@
<template>
<view class="choose_main common_card">
<com-item-top :dataContent="dataContent"></com-item-top>
<com-item-top :dataContent="dataContent" :isEditCount="isEditCount"></com-item-top>
<com-erp-location :erpLocationCode="dataContent.locationErpCode"></com-erp-location>
<com-item-bottom :dataContent="dataContent"></com-item-bottom>
</view>
@ -26,6 +26,10 @@
type: Object,
default: {}
},
isEditCount: {
type: Boolean,
default: false
}
},
data() {
return {

59
fe/PDA/mycomponents/comItem/comItemTop.vue

@ -13,9 +13,16 @@
<view class="text_lightblue font_xs">{{dataContent.itemName }}</view>
<view class="text_lightblue font_xs">{{dataContent.itemDesc1}}</view>
</view>
<view class="ljh_right">
<text class="tnum">{{dataContent.qty}}</text>
<view class="ljh_right uni-row uni-flex u-col-center" style="
align-items: center;">
<text class="tnum" v-if="!isEditCount">{{dataContent.qty}}</text>
<input v-if="isEditCount" type="digit" v-model="countValue" @input="inputClick" style="
width: 180rpx;
height: 70rpx;
text-align: center;
background-color:#DCDCDC" />
<text class="tunit">{{dataContent.uom}}</text>
</view>
</view>
</view>
@ -35,9 +42,25 @@
type: Object,
default: {}
},
isEditCount: {
type: Boolean,
default: false
}
},
watch: {
dataContent: {
handler(newval, oldval) {
this.countValue = this.dataContent.qty
},
immediate: true,
deep: true
}
},
data() {
return {}
return {
countValue: 0
}
},
filters: {
statusStyle: function(val) {
@ -51,7 +74,37 @@
},
methods: {
inputClick(value) {
this.$nextTick(() => {
if(value.detail.value==""){
uni.showToast({
title: "输入数量不能为空"
})
this.dataContent.qty = this.countValue;
return;
}
if (value.detail.value < 0) {
uni.showToast({
title: "输入数量不能小于0"
})
this.countValue = this.dataContent.qty;
return;
}
if (value.detail.value > this.dataContent.recommendQty) {
uni.showToast({
title: "输入数量不能大于库存" + this.dataContent.recommendQty
})
this.countValue = this.dataContent.qty
return;
}
this.dataContent.qty = this.countValue;
})
}
}
}
</script>

7
fe/PDA/pages/store/deliverRaw.vue

@ -11,7 +11,9 @@
<uni-swipe-action>
<uni-swipe-action-item :right-options="options" :auto-close="false"
@click="swipeClick($event,item,index)" style='background-color: #ffffff;'>
<com-balance-item :dataContent="label" style='margin-left: 10px;'>
<com-balance-item :dataContent="label" style='margin-left: 10px;'
:isEditCount="true"
>
</com-balance-item>
<view class="choose_marked">
<image src="@/static/image_marked.svg"></image>
@ -436,7 +438,8 @@
r.handledFromLocationArea = that.toLocation.areaCode;
r.handledFromLocationGroup = that.toLocation.locationGroupCode;
r.handledFromLocationErpCode = that.toLocation.erpLocationCode;
r.handledQty =r.qty;
r.recommendQty =r.handledQty;
r.worker = localStorage.userName
item.details.push(r);
})

Loading…
Cancel
Save