Browse Source

报废出库修改原因输入

hella_online_20240927
lijuncheng 2 months ago
parent
commit
720554fe28
  1. 25
      src/pages/scrap/record/scrapRecord.vue

25
src/pages/scrap/record/scrapRecord.vue

@ -8,11 +8,11 @@
<view class="" style=" text-align: center;font-size: 32rpx;font-weight: 700;margin-left: 20rpx;"> <view class="" style=" text-align: center;font-size: 32rpx;font-weight: 700;margin-left: 20rpx;">
报废原因 : 报废原因 :
</view> </view>
<uni-data-picker v-if="detailSource.length>0" style="padding: 20rpx; background-color:#fff;" <view class="" style="width: 75%;">
class='uni-data-picker' placeholder="请选择原因" popup-title="选择报废原因" :localdata="reasonList" <uni-easyinput v-if="detailSource.length>0" v-model="reasonText" placeholder="请输入报废原因"></uni-easyinput>
@change="reasonChange">
</uni-data-picker>
</view> </view>
</view>
<view class='split_line'></view>
<view class="page-main"> <view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
@ -102,7 +102,6 @@
businessType: {}, businessType: {},
reasonList: [], reasonList: [],
reasonText: "", reasonText: "",
reasonCode:"",
}; };
}, },
onLoad(option) { onLoad(option) {
@ -226,10 +225,6 @@
}, },
commit() { commit() {
if(this.reasonText==""){
this.showErrorMessage("请先选择报废原因")
return;
}
// //
uni.showLoading({ uni.showLoading({
title: "提交中....", title: "提交中....",
@ -277,7 +272,7 @@
submitItem.fromLocationCode = detail.locationCode; submitItem.fromLocationCode = detail.locationCode;
submitItem.toLocationCode = ""; submitItem.toLocationCode = "";
submitItem.reason = this.reasonCode; submitItem.reason = this.reasonText;
submitItem.qty = detail.handleQty; submitItem.qty = detail.handleQty;
submitItem.package =""; submitItem.package ="";
subList.push(submitItem) subList.push(submitItem)
@ -316,7 +311,6 @@
}) })
}, },
clearData(){ clearData(){
this.reasonCode = "";
this.fromLocationCode = ""; this.fromLocationCode = "";
this.reasonText = ""; this.reasonText = "";
this.detailSource = []; this.detailSource = [];
@ -333,15 +327,6 @@
this.detailSource.splice(i, 1) this.detailSource.splice(i, 1)
} }
} }
},
reasonChange(e) {
if (e.detail.value.length == 0) {
this.reasonCode = ""
this.reasonText = ""
} else {
this.reasonCode = e.detail.value[0].value
this.reasonText = e.detail.value[0].text
}
} }
} }
} }

Loading…
Cancel
Save