|
@@ -224,7 +224,7 @@
|
|
this.cangId = options.cangId
|
|
this.cangId = options.cangId
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
- let _data = uni.getStorageSync('erpContractNoCK')==''?{}:uni.getStorageSync('erpContractNoCK')
|
|
|
|
|
|
+ let _data = uni.getStorageSync('erpContractNoCK') == '' ? {} : uni.getStorageSync('erpContractNoCK')
|
|
this.binNumber = helper.erpWarehouse.binNumber
|
|
this.binNumber = helper.erpWarehouse.binNumber
|
|
this.warehouseName = helper.erpWarehouse.warehouseName
|
|
this.warehouseName = helper.erpWarehouse.warehouseName
|
|
this.detailData.goodsName = _data.goodsName;
|
|
this.detailData.goodsName = _data.goodsName;
|
|
@@ -232,18 +232,23 @@
|
|
this.detailData.contractNo = _data.contractNo;
|
|
this.detailData.contractNo = _data.contractNo;
|
|
}
|
|
}
|
|
this.detailData.goodsNameKey = _data.goodsNameKey;
|
|
this.detailData.goodsNameKey = _data.goodsNameKey;
|
|
- this.detailData.carNo = uni.getStorageSync('erpcarNoCK')
|
|
|
|
if (!_data.tranCarInfoList) {
|
|
if (!_data.tranCarInfoList) {
|
|
this.isPC = false
|
|
this.isPC = false
|
|
_data.tranCarInfoList = []
|
|
_data.tranCarInfoList = []
|
|
} else {
|
|
} else {
|
|
this.isPC = true
|
|
this.isPC = true
|
|
- if (uni.getStorageSync('ContractNoCar')) {
|
|
|
|
- this.detailData.carNo = uni.getStorageSync('ContractNoCar')
|
|
|
|
|
|
+ if (uni.getStorageSync('ContractNoCarCK')) {
|
|
|
|
+ this.detailData.carNo = uni.getStorageSync('ContractNoCarCK')
|
|
} else {
|
|
} else {
|
|
this.detailData.carNo = _data.tranCarInfoList[0].carNo
|
|
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
|
|
|
|
+ }
|
|
|
|
+ }
|
|
if (!this.detailData.contractNo) {
|
|
if (!this.detailData.contractNo) {
|
|
this.detailData.contractNo = '请选择合同编号'
|
|
this.detailData.contractNo = '请选择合同编号'
|
|
} else {
|
|
} else {
|
|
@@ -259,7 +264,7 @@
|
|
this.detailData.inOutDate = _day.getFullYear() + "-" + (_day.getMonth() + 1) + "-" + _day.getDate();
|
|
this.detailData.inOutDate = _day.getFullYear() + "-" + (_day.getMonth() + 1) + "-" + _day.getDate();
|
|
//出库类型
|
|
//出库类型
|
|
this.outWarehouse()
|
|
this.outWarehouse()
|
|
- if(helper.erpWarehouse.personCharge){
|
|
|
|
|
|
+ if (helper.erpWarehouse.personCharge) {
|
|
this.detailData.agent = helper.erpWarehouse.personCharge
|
|
this.detailData.agent = helper.erpWarehouse.personCharge
|
|
}
|
|
}
|
|
//经办人
|
|
//经办人
|
|
@@ -298,7 +303,7 @@
|
|
this.detailData.type = this.typeList[e].type
|
|
this.detailData.type = this.typeList[e].type
|
|
},
|
|
},
|
|
pjPicker(e) {
|
|
pjPicker(e) {
|
|
- this.detailData.gradeKey = e[0]
|
|
|
|
|
|
+ this.detailData.gradeKey = e[0] + 1
|
|
this.detailData.grade = this.pjList[e].type
|
|
this.detailData.grade = this.pjList[e].type
|
|
},
|
|
},
|
|
handlerPicker(e) {
|
|
handlerPicker(e) {
|
|
@@ -310,6 +315,17 @@
|
|
},
|
|
},
|
|
warehousingTypePicker(e) {
|
|
warehousingTypePicker(e) {
|
|
this.detailData.inOutType = this.warehousingTypeList[e].constValue
|
|
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) {
|
|
filterFileType(index, lists) {
|
|
if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
|
|
if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
|
|
@@ -362,7 +378,7 @@
|
|
String(this.detailData.grossWeight).length -
|
|
String(this.detailData.grossWeight).length -
|
|
(String(this.detailData.grossWeight).indexOf('.') + 1) >
|
|
(String(this.detailData.grossWeight).indexOf('.') + 1) >
|
|
3) ||
|
|
3) ||
|
|
- this.detailData.grossWeight < 1 ||
|
|
|
|
|
|
+ this.detailData.grossWeight < 0 ||
|
|
this.detailData.grossWeight > 10000
|
|
this.detailData.grossWeight > 10000
|
|
) {
|
|
) {
|
|
this.$api.msg('毛重输入错误!')
|
|
this.$api.msg('毛重输入错误!')
|
|
@@ -377,13 +393,14 @@
|
|
String(this.detailData.tare).length -
|
|
String(this.detailData.tare).length -
|
|
(String(this.detailData.tare).indexOf('.') + 1) >
|
|
(String(this.detailData.tare).indexOf('.') + 1) >
|
|
3) ||
|
|
3) ||
|
|
- this.detailData.tare < 1 ||
|
|
|
|
|
|
+ this.detailData.tare < 0 ||
|
|
this.detailData.tare > 10000
|
|
this.detailData.tare > 10000
|
|
) {
|
|
) {
|
|
this.$api.msg('皮重输入错误!')
|
|
this.$api.msg('皮重输入错误!')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- if (Number(this.detailData.tare ) > Number(this.detailData.grossWeight)) {
|
|
|
|
|
|
+ if (Number(this.detailData.tare) > Number(this.detailData.grossWeight)) {
|
|
|
|
+
|
|
this.$api.msg('皮重不能大于毛重')
|
|
this.$api.msg('皮重不能大于毛重')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
@@ -432,7 +449,7 @@
|
|
(String(this.detailData.tidalGrainWater).indexOf('.') + 1) >
|
|
(String(this.detailData.tidalGrainWater).indexOf('.') + 1) >
|
|
1) ||
|
|
1) ||
|
|
this.detailData.tidalGrainWater < 1 ||
|
|
this.detailData.tidalGrainWater < 1 ||
|
|
- this.detailData.tidalGrainWater > 40
|
|
|
|
|
|
+ this.detailData.tidalGrainWater > 40
|
|
) {
|
|
) {
|
|
this.$api.msg('潮粮水分输入错误!')
|
|
this.$api.msg('潮粮水分输入错误!')
|
|
return
|
|
return
|
|
@@ -490,15 +507,16 @@
|
|
if (this.detailData.type == "干粮") {
|
|
if (this.detailData.type == "干粮") {
|
|
if (this.detailData.warehouseInOutDetail.waterContent < 0 || this.detailData.warehouseInOutDetail
|
|
if (this.detailData.warehouseInOutDetail.waterContent < 0 || this.detailData.warehouseInOutDetail
|
|
.waterContent > 40) {
|
|
.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
|
|
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) {
|
|
@@ -586,6 +604,8 @@
|
|
title = "暂存成功"
|
|
title = "暂存成功"
|
|
} else if (num == 2) {
|
|
} else if (num == 2) {
|
|
this.detailData.statusFlag = 3
|
|
this.detailData.statusFlag = 3
|
|
|
|
+ this.detailData.backOffice = this.userInfo.userName
|
|
|
|
+ this.detailData.backOfficeId = this.userInfo.id
|
|
title = "提交成功"
|
|
title = "提交成功"
|
|
}
|
|
}
|
|
let that = this
|
|
let that = this
|
|
@@ -595,12 +615,13 @@
|
|
if (res.confirm) {
|
|
if (res.confirm) {
|
|
that.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse',
|
|
that.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse',
|
|
that.detailData).then(res => {
|
|
that.detailData).then(res => {
|
|
|
|
+ console.log(res,"报异常")
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
that.$api.msg(title)
|
|
that.$api.msg(title)
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
uni.navigateBack()
|
|
uni.navigateBack()
|
|
}, 1000)
|
|
}, 1000)
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
that.$api.msg(res.data.message)
|
|
that.$api.msg(res.data.message)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -710,10 +731,12 @@
|
|
}
|
|
}
|
|
|
|
|
|
.bottom-btn {
|
|
.bottom-btn {
|
|
|
|
+ padding: 30rpx;
|
|
|
|
+ background: #FFFFFF;
|
|
width: 92%;
|
|
width: 92%;
|
|
position: fixed;
|
|
position: fixed;
|
|
- bottom: 40rpx;
|
|
|
|
|
|
+ bottom: 0rpx;
|
|
display: flex;
|
|
display: flex;
|
|
- z-index: 2;
|
|
|
|
|
|
+ z-index: 9999;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|