|
@@ -206,7 +206,7 @@
|
|
|
binNumber: '',
|
|
|
detailData: {
|
|
|
contractNo: "请选择合同编号或移库任务编号",
|
|
|
- type: "请选择类型",
|
|
|
+ type: "干粮",
|
|
|
grade: "请输入品级",
|
|
|
agent: "请选择经办人",
|
|
|
inOutDate: "请选择出库日期",
|
|
@@ -218,11 +218,11 @@
|
|
|
year: true,
|
|
|
month: true,
|
|
|
day: true,
|
|
|
- hour: true,
|
|
|
- minute: true,
|
|
|
- second: true
|
|
|
+ // hour: true,
|
|
|
+ // minute: true,
|
|
|
+ // second: true
|
|
|
},
|
|
|
- // inOutDate1: "",
|
|
|
+ // inOutDate: "请选择出库日期",
|
|
|
netWeight: ""
|
|
|
}
|
|
|
},
|
|
@@ -242,19 +242,20 @@
|
|
|
this.binNumber = helper.erpWarehouse.binNumber
|
|
|
this.warehouseName = helper.erpWarehouse.warehouseName
|
|
|
this.detailData.goodsName = uni.getStorageSync('erpContractNo').goodsName;
|
|
|
- if(uni.getStorageSync('erpContractNo').contractNo){
|
|
|
+ if (uni.getStorageSync('erpContractNo').contractNo) {
|
|
|
this.detailData.contractNo = uni.getStorageSync('erpContractNo').contractNo;
|
|
|
}
|
|
|
this.detailData.goodsNameKey = uni.getStorageSync('erpContractNo').goodsNameKey;
|
|
|
if (!uni.getStorageSync('erpContractNo').tranCarInfoList)
|
|
|
- uni.getStorageSync('erpContractNo').tranCarInfoList = []
|
|
|
+ uni.getStorageSync('erpContractNo').tranCarInfoList = []
|
|
|
if (!this.detailData.contractNo) {
|
|
|
this.detailData.contractNo = '请选择合同编号'
|
|
|
} else {
|
|
|
- if(uni.getStorageSync('erpContractNo').tranCarInfoList){
|
|
|
- if (uni.getStorageSync('erpContractNo').tranCarInfoList.length == 0) {
|
|
|
- this.isPC = false
|
|
|
- }}
|
|
|
+ if (uni.getStorageSync('erpContractNo').tranCarInfoList) {
|
|
|
+ if (uni.getStorageSync('erpContractNo').tranCarInfoList.length == 0) {
|
|
|
+ this.isPC = false
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
if (!this.detailData.goodsName) {
|
|
|
this.detailData.goodsName = '货名'
|
|
@@ -305,8 +306,7 @@
|
|
|
this.detailData.agent = this.handlerList[e].staffName
|
|
|
},
|
|
|
dateChange(e) {
|
|
|
- this.detailData.inOutDate = e.year + "-" + e.month + "-" + e.day + " " + e.hour + ":" + e.minute +":" + e.second
|
|
|
- // this.inOutDate1 = e.year + "-" + e.month + "-" + e.day + " " + e.hour + ":" + e.minute
|
|
|
+ this.detailData.inOutDate = e.year + "-" + e.month + "-" + e.day
|
|
|
},
|
|
|
warehousingTypePicker(e) {
|
|
|
this.detailData.inOutType = this.warehousingTypeList[e].constValue
|
|
@@ -330,48 +330,29 @@
|
|
|
},
|
|
|
getImgUrl(res) {
|
|
|
this.detailData.addressUrl = res
|
|
|
- console.log(res)
|
|
|
- console.log('------------res-----------')
|
|
|
},
|
|
|
onError(error) {
|
|
|
- alert(error)
|
|
|
console.log('------------error-----------')
|
|
|
console.log(error)
|
|
|
},
|
|
|
binNumberpicker(e) {
|
|
|
this.detailData.binNumber = this.positionList[e[0]].binNumber
|
|
|
},
|
|
|
- // getWeighingManagement() {
|
|
|
- // this.$api.doRequest('get', '/weighingManagement/getWeighingManagement', {
|
|
|
- // id: this.id
|
|
|
- // }).then(res => {
|
|
|
- // if (res.data.code == 200) {
|
|
|
- // this.detailData = res.data.data
|
|
|
- // }
|
|
|
- // })
|
|
|
- // this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
|
|
|
- // id: this.cangId
|
|
|
- // }).then(res => {
|
|
|
- // if (res.data.code == 200) {
|
|
|
- // this.positionList = res.data.data.warehousePositionInfoList
|
|
|
- // }
|
|
|
- // })
|
|
|
- // this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList', {
|
|
|
- // compId: '',
|
|
|
- // flag: 5
|
|
|
- // }).then(res => {
|
|
|
- // if (res.data.code == 200) {
|
|
|
- // this.contractNoList = res.data.data
|
|
|
- // }
|
|
|
- // })
|
|
|
- // },
|
|
|
onProgress(e) {},
|
|
|
- onRemove(index) {},
|
|
|
+ onRemove() {
|
|
|
+ this.detailData.addressUrl = ""
|
|
|
+ },
|
|
|
submit(num) {
|
|
|
- if (!this.detailData.grossWeight) {
|
|
|
- this.$api.msg('毛重不能为空')
|
|
|
+ if (!this.detailData.contractNo) {
|
|
|
+ this.$api.msg('合同编号不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.detailData.goodsName) {
|
|
|
+ this.$api.msg('货名不能为空')
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
if (!this.detailData.grossWeight) {
|
|
|
this.$api.msg('毛重不能为空')
|
|
|
return
|
|
@@ -387,6 +368,200 @@
|
|
|
this.$api.msg('毛重输入错误!')
|
|
|
return
|
|
|
}
|
|
|
+ if (!this.detailData.tare) {
|
|
|
+ this.$api.msg('皮重不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (isNaN(this.detailData.tare) ||
|
|
|
+ (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
|
|
|
+ ) {
|
|
|
+ this.$api.msg('皮重输入错误!')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.detailData.tare > this.detailData.grossWeight) {
|
|
|
+ this.$api.msg('皮重不能大于毛重')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.netWeight < 0) {
|
|
|
+ this.$api.msg('净重不能小于0')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.detailData.type == "潮粮") {
|
|
|
+ if (!this.detailData.buckleWeightRatio) {
|
|
|
+ this.$api.msg('扣重比不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (isNaN(this.detailData.buckleWeightRatio) ||
|
|
|
+ (String(this.detailData.buckleWeightRatio).indexOf('.') != -1 &&
|
|
|
+ String(this.detailData.buckleWeightRatio).length -
|
|
|
+ (String(this.detailData.buckleWeightRatio).indexOf('.') + 1) >
|
|
|
+ 2) ||
|
|
|
+ this.detailData.buckleWeightRatio < 0 ||
|
|
|
+ this.detailData.buckleWeightRatio > 2
|
|
|
+ ) {
|
|
|
+ this.$api.msg('扣重比输入错误!')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.detailData.solidGrainWater) {
|
|
|
+ this.$api.msg('干粮水分不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (isNaN(this.detailData.solidGrainWater) ||
|
|
|
+ (String(this.detailData.solidGrainWater).indexOf('.') != -1 &&
|
|
|
+ String(this.detailData.solidGrainWater).length -
|
|
|
+ (String(this.detailData.solidGrainWater).indexOf('.') + 1) >
|
|
|
+ 1) ||
|
|
|
+ this.detailData.solidGrainWater < 1 ||
|
|
|
+ this.detailData.solidGrainWater > 40
|
|
|
+ ) {
|
|
|
+ this.$api.msg('干粮水分输入错误!')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.detailData.tidalGrainWater) {
|
|
|
+ this.$api.msg('潮粮水分不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (isNaN(this.detailData.tidalGrainWater) ||
|
|
|
+ (String(this.detailData.tidalGrainWater).indexOf('.') != -1 &&
|
|
|
+ String(this.detailData.tidalGrainWater).length -
|
|
|
+ (String(this.detailData.tidalGrainWater).indexOf('.') + 1) >
|
|
|
+ 1) ||
|
|
|
+ this.detailData.tidalGrainWater < 1 ||
|
|
|
+ this.detailData.tidalGrainWater > 40
|
|
|
+ ) {
|
|
|
+ this.$api.msg('潮粮水分输入错误!')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.detailData.tidalGrainWater < this.detailData.solidGrainWater) {
|
|
|
+ this.$api.msg('潮粮水分输入错误!')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.detailData.pureWeight) {
|
|
|
+ this.$api.msg('纯重不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.detailData.grade == "请输入品级") {
|
|
|
+ this.$api.msg('品级不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.detailData.agent == "请选择经办人") {
|
|
|
+ this.$api.msg('经办人不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.detailData.inOutDate == "请选择出库日期") {
|
|
|
+ this.$api.msg('出库日期不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.detailData.inOutType == "请选择出库类型") {
|
|
|
+ this.$api.msg('出库类型不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.detailData.carNo) {
|
|
|
+ this.$api.msg('车牌号不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.detailData.addressUrl) {
|
|
|
+ this.$api.msg('请上传磅单')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.detailData.warehouseInOutDetail.qualityInspector) {
|
|
|
+ if (this.detailData.warehouseInOutDetail.qualityInspector < 2 || this.detailData.warehouseInOutDetail
|
|
|
+ .qualityInspector > 10) {
|
|
|
+ this.$api.msg('质检员姓名需要2-10个字')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.detailData.warehouseInOutDetail.waterContent) {
|
|
|
+ if (this.detailData.type == "潮粮" && this.detailData.warehouseInOutDetail.waterContent != this
|
|
|
+ .detailData.tidalGrainWater) {
|
|
|
+ this.$api.msg('水分占比与潮粮水分不一致')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ 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('热损伤占比输入错误')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.detailData.warehouseInOutDetail.bulkDensity) {
|
|
|
+ if (this.detailData.warehouseInOutDetail.bulkDensity < 500 || this.detailData.warehouseInOutDetail
|
|
|
+ .bulkDensity > 1000) {
|
|
|
+ this.$api.msg('容重输入错误')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (String(this.detailData.warehouseInOutDetail.bulkDensity).indexOf('.') != -1 && String(this
|
|
|
+ .detailData.warehouseInOutDetail.bulkDensity).length - (
|
|
|
+ String(this.detailData.warehouseInOutDetail.bulkDensity).indexOf('.') + 1) > 0) {
|
|
|
+ this.$api.msg('容重输入错误')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.detailData.warehouseInOutDetail.jiaorenli) {
|
|
|
+ if (this.detailData.warehouseInOutDetail.jiaorenli < 0 || this.detailData.warehouseInOutDetail
|
|
|
+ .jiaorenli > 40) {
|
|
|
+ this.$api.msg('热损伤占比输入错误')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (String(this.detailData.warehouseInOutDetail.jiaorenli).indexOf('.') != -1 && String(this.detailData
|
|
|
+ .warehouseInOutDetail.jiaorenli).length - (String(
|
|
|
+ this.detailData.warehouseInOutDetail.jiaorenli).indexOf('.') + 1) > 1) {
|
|
|
+ this.$api.msg('热损伤占比输入错误')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.detailData.warehouseInOutDetail.impurity) {
|
|
|
+ if (this.detailData.warehouseInOutDetail.impurity < 0 || this.detailData.warehouseInOutDetail
|
|
|
+ .impurity > 40) {
|
|
|
+ this.$api.msg('杂质占比输入错误')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (String(this.detailData.warehouseInOutDetail.impurity).indexOf('.') != -1 && String(this.detailData
|
|
|
+ .warehouseInOutDetail.impurity).length - (String(
|
|
|
+ this.detailData.warehouseInOutDetail.impurity).indexOf('.') + 1) > 1) {
|
|
|
+ this.$api.msg('杂质占比输入错误')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.detailData.warehouseInOutDetail.mildewGrain) {
|
|
|
+ if (this.detailData.warehouseInOutDetail.mildewGrain < 0 || this.detailData.warehouseInOutDetail
|
|
|
+ .mildewGrain > 40) {
|
|
|
+ this.$api.msg('霉变粒占比输入错误')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (String(this.detailData.warehouseInOutDetail.mildewGrain).indexOf('.') != -1 && String(this.detailData
|
|
|
+ .warehouseInOutDetail.mildewGrain).length - (String(
|
|
|
+ this.detailData.warehouseInOutDetail.mildewGrain).indexOf('.') + 1) > 1) {
|
|
|
+ this.$api.msg('霉变粒占比输入错误')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.detailData.warehouseInOutDetail.imperfectGrain) {
|
|
|
+ if (this.detailData.warehouseInOutDetail.imperfectGrain < 0 || this.detailData.warehouseInOutDetail
|
|
|
+ .imperfectGrain > 40) {
|
|
|
+ this.$api.msg('不完整粒占比输入错误')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (String(this.detailData.warehouseInOutDetail.imperfectGrain).indexOf('.') != -1 && String(this.detailData
|
|
|
+ .warehouseInOutDetail.imperfectGrain).length - (String(
|
|
|
+ this.detailData.warehouseInOutDetail.imperfectGrain).indexOf('.') + 1) > 1) {
|
|
|
+ this.$api.msg('不完整粒占比输入错误')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
this.detailData.baseId = helper.erpWarehouse.warehouseId
|
|
|
this.detailData.warehouseName = helper.erpWarehouse.warehouseName
|
|
|
this.detailData.positionId = helper.erpWarehouse.positionId
|