|
@@ -80,8 +80,11 @@
|
|
|
</u-picker>
|
|
|
</view>
|
|
|
<view class="row row-bottom">
|
|
|
+ <!-- <view class="left">车牌号</view>
|
|
|
+ <input v-model='detailData.carNo' class="right-bottom" placeholder="请输入车牌号"></input> -->
|
|
|
<view class="left">车牌号</view>
|
|
|
- <input v-model='detailData.carNo' class="right-bottom" placeholder="请输入车牌号"></input>
|
|
|
+ <input v-if="!isPC" v-model='detailData.carNo' class="right-bottom" placeholder="请输入车牌号"></input>
|
|
|
+ <view @click='slectCarNo' v-if="isPC">{{detailData.carNo}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="content2">
|
|
@@ -158,9 +161,7 @@
|
|
|
show5: false,
|
|
|
show6: false,
|
|
|
show7: false,
|
|
|
- contractNoList: [{
|
|
|
- contractNo: ""
|
|
|
- }],
|
|
|
+ isPC:true,
|
|
|
typeList: [{
|
|
|
type: "干粮"
|
|
|
},
|
|
@@ -219,16 +220,18 @@
|
|
|
onLoad(options) {
|
|
|
this.detailData = JSON.parse(options.data)
|
|
|
this.netWeight = this.detailData.netWeight
|
|
|
- this.imgUrl.push({
|
|
|
+ if(this.detailData.addressUrl){
|
|
|
+ this.imgUrl.push({
|
|
|
url: this.detailData.addressUrl.split(",")[0]
|
|
|
})
|
|
|
+ }
|
|
|
this.cangId = options.cangId
|
|
|
},
|
|
|
onShow() {
|
|
|
this.binNumber = helper.erpWarehouse.binNumber
|
|
|
this.warehouseName = helper.erpWarehouse.warehouseName
|
|
|
- this.detailData.goodsName = uni.getStorageSync('erpContractNo').goodsName;
|
|
|
- this.detailData.contractNo = uni.getStorageSync('erpContractNo').contractNo;
|
|
|
+ // this.detailData.goodsName = uni.getStorageSync('erpContractNo').goodsName;
|
|
|
+ // this.detailData.contractNo = uni.getStorageSync('erpContractNo').contractNo;
|
|
|
this.detailData.goodsNameKey = uni.getStorageSync('erpContractNo').goodsNameKey;
|
|
|
if (!this.detailData.contractNo) {
|
|
|
this.detailData.contractNo = '请选择合同编号'
|
|
@@ -236,6 +239,24 @@
|
|
|
if (!this.detailData.goodsName) {
|
|
|
this.detailData.goodsName = '货名'
|
|
|
}
|
|
|
+ let _data = uni.getStorageSync('erpContractNoCK') == '' ? {} : uni.getStorageSync('erpContractNoCK')
|
|
|
+ if (!_data.tranCarInfoList) {
|
|
|
+ this.isPC = false
|
|
|
+ _data.tranCarInfoList = []
|
|
|
+ } else {
|
|
|
+ this.isPC = true
|
|
|
+ if (uni.getStorageSync('ContractNoCarCK')) {
|
|
|
+ this.detailData.carNo = uni.getStorageSync('ContractNoCarCK')
|
|
|
+ } else {
|
|
|
+ this.detailData.carNo = _data.tranCarInfoList[0].carNo
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(this.detailData.carNo){
|
|
|
+ for(let i = 0 ; i < uni.getStorageSync('erpContractNoCK').tranCarInfoList.length ;i++){
|
|
|
+ if(uni.getStorageSync('erpContractNoCK').tranCarInfoList[i].carNo == this.detailData.carNo)
|
|
|
+ this.detailData.tranCarNo = uni.getStorageSync('erpContractNoCK').tranCarInfoList[i].tranCarNo
|
|
|
+ }
|
|
|
+ }
|
|
|
//出库类型
|
|
|
this.outWarehouse()
|
|
|
//经办人
|
|
@@ -286,6 +307,18 @@
|
|
|
},
|
|
|
warehousingTypePicker(e) {
|
|
|
this.detailData.inOutType = this.warehousingTypeList[e].constValue
|
|
|
+ if (this.detailData.inOutType == '销售出库') {
|
|
|
+ this.detailData.inOutTypeKey = 1
|
|
|
+ } else if (this.detailData.inOutType == '移库出库') {
|
|
|
+ this.detailData.inOutTypeKey = 3
|
|
|
+ } else if (this.detailData.inOutType == '暂存出库') {
|
|
|
+ this.detailData.inOutTypeKey = 4
|
|
|
+ } else if (this.detailData.inOutType == '贸易服务出库') {
|
|
|
+ this.detailData.inOutTypeKey = 5
|
|
|
+ } else if (this.detailData.inOutType == '采购出库') {
|
|
|
+ this.detailData.inOutTypeKey = 6
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
filterFileType(index, lists) {
|
|
|
if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
|
|
@@ -328,8 +361,6 @@
|
|
|
this.$api.msg('货名不能为空')
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
if (!this.detailData.grossWeight) {
|
|
|
this.$api.msg('毛重不能为空')
|
|
|
return
|
|
@@ -338,9 +369,9 @@
|
|
|
(String(this.detailData.grossWeight).indexOf('.') != -1 &&
|
|
|
String(this.detailData.grossWeight).length -
|
|
|
(String(this.detailData.grossWeight).indexOf('.') + 1) >
|
|
|
- 1) ||
|
|
|
- this.detailData.grossWeight < 1 ||
|
|
|
- this.detailData.grossWeight > 100000
|
|
|
+ 3) ||
|
|
|
+ this.detailData.grossWeight < 0 ||
|
|
|
+ this.detailData.grossWeight > 10000
|
|
|
) {
|
|
|
this.$api.msg('毛重输入错误!')
|
|
|
return
|
|
@@ -353,9 +384,9 @@
|
|
|
(String(this.detailData.tare).indexOf('.') != -1 &&
|
|
|
String(this.detailData.tare).length -
|
|
|
(String(this.detailData.tare).indexOf('.') + 1) >
|
|
|
- 1) ||
|
|
|
- this.detailData.tare < 1 ||
|
|
|
- this.detailData.tare > 100000
|
|
|
+ 3) ||
|
|
|
+ this.detailData.tare < 0 ||
|
|
|
+ this.detailData.tare > 10000
|
|
|
) {
|
|
|
this.$api.msg('皮重输入错误!')
|
|
|
return
|
|
@@ -414,7 +445,7 @@
|
|
|
this.$api.msg('潮粮水分输入错误!')
|
|
|
return
|
|
|
}
|
|
|
- if (this.detailData.tidalGrainWater < this.detailData.solidGrainWater) {
|
|
|
+ if (this.detailData.tidalGrainWater <= this.detailData.solidGrainWater) {
|
|
|
this.$api.msg('潮粮水分输入错误!')
|
|
|
return
|
|
|
}
|
|
@@ -467,16 +498,16 @@
|
|
|
if (this.detailData.type == "干粮") {
|
|
|
if (this.detailData.warehouseInOutDetail.waterContent < 0 || this.detailData.warehouseInOutDetail
|
|
|
.waterContent > 40) {
|
|
|
- this.$api.msg('热损伤占比输入错误')
|
|
|
- return
|
|
|
- }
|
|
|
- if (String(this.detailData.warehouseInOutDetail.waterContent).indexOf('.') != -1 && String(this
|
|
|
- .detailData.warehouseInOutDetail.jiaorenli).length - (String(
|
|
|
- this.detailData.warehouseInOutDetail.waterContent).indexOf('.') + 1) > 1) {
|
|
|
- this.$api.msg('热损伤占比输入错误')
|
|
|
+ this.$api.msg('水分占比输入错误')
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
+ if (String(this.detailData.warehouseInOutDetail.waterContent).indexOf('.') != -1 && String(this
|
|
|
+ .detailData.warehouseInOutDetail.waterContent).length - (String(
|
|
|
+ this.detailData.warehouseInOutDetail.waterContent).indexOf('.') + 1) > 1) {
|
|
|
+ this.$api.msg('水分占比输入错误')
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
if (this.detailData.warehouseInOutDetail.bulkDensity) {
|
|
|
if (this.detailData.warehouseInOutDetail.bulkDensity < 500 || this.detailData.warehouseInOutDetail
|
|
@@ -563,6 +594,8 @@
|
|
|
title = "暂存成功"
|
|
|
} else if (num == 2) {
|
|
|
this.detailData.statusFlag = 3
|
|
|
+ this.detailData.backOffice = this.userInfo.userName
|
|
|
+ this.detailData.backOfficeId = this.userInfo.id
|
|
|
title = "提交成功"
|
|
|
}
|
|
|
let that = this
|
|
@@ -687,10 +720,12 @@
|
|
|
}
|
|
|
|
|
|
.bottom-btn {
|
|
|
+ padding: 30rpx;
|
|
|
+ background: #FFFFFF;
|
|
|
width: 92%;
|
|
|
position: fixed;
|
|
|
- bottom: 40rpx;
|
|
|
+ bottom: 0rpx;
|
|
|
display: flex;
|
|
|
- z-index: 2;
|
|
|
+ z-index: 9999;
|
|
|
}
|
|
|
</style>
|