|
@@ -1232,7 +1232,12 @@
|
|
this.getList()
|
|
this.getList()
|
|
},
|
|
},
|
|
add() {
|
|
add() {
|
|
- this.outType = ''
|
|
|
|
|
|
+ if(this.serviceManagementType == 3){
|
|
|
|
+ this.outType = '他运'
|
|
|
|
+ }else{
|
|
|
|
+ this.outType = ''
|
|
|
|
+ }
|
|
|
|
+
|
|
this.deptBudgetList = {
|
|
this.deptBudgetList = {
|
|
type: '',
|
|
type: '',
|
|
freight: 0,
|
|
freight: 0,
|
|
@@ -1323,6 +1328,397 @@
|
|
},
|
|
},
|
|
//确认初检信息
|
|
//确认初检信息
|
|
checkOk() {
|
|
checkOk() {
|
|
|
|
+ if (!this.deptBudgetList.binNumber) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '请选择仓位号',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!this.deptBudgetList.goodsName) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '货名不能为空',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!String(this.deptBudgetList.deductionAmount) && this.statusTypetext != '复检') {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '扣款不能为空',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!String(this.deptBudgetList.reDeductionAmount) && this.statusTypetext == '复检') {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '复检扣款不能为空',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ // if (
|
|
|
|
+ // this.deptBudgetList.deductionAmount < 0 ||
|
|
|
|
+ // this.deptBudgetList.deductionAmount > 10000 ||
|
|
|
|
+ // (String(this.deptBudgetList.deductionAmount).indexOf('.') != -1 &&
|
|
|
|
+ // String(this.deptBudgetList.deductionAmount).length -
|
|
|
|
+ // (String(this.deptBudgetList.deductionAmount).indexOf('.') + 1) >
|
|
|
|
+ // 2)
|
|
|
|
+ // ) {
|
|
|
|
+ // this.$message({
|
|
|
|
+ // message: '扣款输入错误',
|
|
|
|
+ // type: 'warning',
|
|
|
|
+ // })
|
|
|
|
+ // return
|
|
|
|
+ // }
|
|
|
|
+ console.log(this.serviceManagementType)
|
|
|
|
+ if (this.serviceManagementType == 1) {
|
|
|
|
+ if (!this.deptBudgetList.cost) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '未获取到成本,请编辑后提交',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.deptBudgetList.dryGrainPrice = parseFloat(this.deptBudgetList.cost / 1000).toFixed(3)
|
|
|
|
+ if (
|
|
|
|
+ this.deptBudgetList.cost < 0 ||
|
|
|
|
+ this.deptBudgetList.cost > 20000 ||
|
|
|
|
+ (String(this.deptBudgetList.cost).indexOf('.') != -1 &&
|
|
|
|
+ String(this.deptBudgetList.cost).length -
|
|
|
|
+ (String(this.deptBudgetList.cost).indexOf('.') + 1) >
|
|
|
|
+ 2)
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '成本输入错误',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!String(this.deptBudgetList.freight)) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '运费不能为空',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ this.deptBudgetList.freight < 0 ||
|
|
|
|
+ this.deptBudgetList.freight > 100000 ||
|
|
|
|
+ (String(this.deptBudgetList.freight).indexOf('.') != -1 &&
|
|
|
|
+ String(this.deptBudgetList.freight).length -
|
|
|
|
+ (String(this.deptBudgetList.freight).indexOf('.') + 1) >
|
|
|
|
+ 2)
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '运费输入错误',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!this.deptBudgetList.inOutDate) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '入库日期不能为空!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!this.deptBudgetList.inOutType) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '入库类型不能为空!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (this.serviceManagementType == 3) {
|
|
|
|
+
|
|
|
|
+ if (!this.deptBudgetList.customerName) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '客户不能为空',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (!this.outType) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '请选择运输方式!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.deptBudgetList.warehouseInOutDetail.reGrade = this.deptBudgetList.reGrade
|
|
|
|
+ if (!this.deptBudgetList.reGrade && this.statusTypetext == '复检') {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '复检等级不能为空!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!this.deptBudgetList.carNo) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '车牌号不能为空',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (this.deptBudgetList.carNo.length > 7) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '车牌号输入错误,请输入7个字符之内',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (this.directselling) {
|
|
|
|
+ if (!this.deptBudgetList.boxNo) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '箱号-1不能为空',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!this.deptBudgetList.titleNo) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '封号-1不能为空',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (this.deptBudgetList.boxNo && !this.deptBudgetList.titleNo) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '封号-1不能为空',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (this.deptBudgetList.boxNoOther && !this.deptBudgetList.titleNoOther) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '封号-2不能为空',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (this.deptBudgetList.boxNo && this.deptBudgetList.boxNo.length > 20) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '箱号-1输入错误',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ this.deptBudgetList.boxNoOther &&
|
|
|
|
+ this.deptBudgetList.boxNoOther.length > 20
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '箱号-2输入错误',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ this.deptBudgetList.titleNo &&
|
|
|
|
+ this.deptBudgetList.titleNo.length > 20
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '封号-1输入错误',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ this.deptBudgetList.titleNoOther &&
|
|
|
|
+ this.deptBudgetList.titleNoOther.length > 20
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '封号-2输入错误',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (this.serviceManagementType == 1 || this.serviceManagementType == 3 && this.deptBudgetList.outType == '自运') {
|
|
|
|
+ if (!this.deptBudgetList.contractNo) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '合同编号不能为空',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (this.deptBudgetList.reWaterContent) {
|
|
|
|
+ if (isNaN(this.deptBudgetList.reWaterContent)) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '复检水分(%)非数字!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ this.deptBudgetList.reWaterContent < 0 ||
|
|
|
|
+ this.deptBudgetList.reWaterContent > 40 ||
|
|
|
|
+ (String(this.deptBudgetList.reWaterContent).indexOf('.') != -1 &&
|
|
|
|
+ String(this.deptBudgetList.reWaterContent)
|
|
|
|
+ .length -
|
|
|
|
+ (String(
|
|
|
|
+ this.deptBudgetList.reWaterContent
|
|
|
|
+ ).indexOf('.') +
|
|
|
|
+ 1) >
|
|
|
|
+ 2)
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '复检水分(%)输入错误! 取值范围0-40之间且可以保留2小数',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.deptBudgetList.warehouseInOutDetail.reImpurity = this.deptBudgetList.reImpurity
|
|
|
|
+ if (this.deptBudgetList.reImpurity) {
|
|
|
|
+ if (isNaN(this.deptBudgetList.reImpurity)) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '复检杂质(%)非数字!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ this.deptBudgetList.reImpurity < 0 ||
|
|
|
|
+ this.deptBudgetList.reImpurity > 40 ||
|
|
|
|
+ (String(this.deptBudgetList.reImpurity).indexOf('.') != -1 &&
|
|
|
|
+ String(this.deptBudgetList.reImpurity).length -
|
|
|
|
+ (String(this.deptBudgetList.reImpurity).indexOf('.') + 1) > 2)
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '复检杂质(%)输入错误! 取值范围0-40之间且可以保留2小数',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.deptBudgetList.warehouseInOutDetail.reMildewGrain = this.deptBudgetList.reMildewGrain
|
|
|
|
+ if (this.deptBudgetList.reMildewGrain) {
|
|
|
|
+ if (isNaN(this.deptBudgetList.reMildewGrain)) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '复检霉变粒(%)非数字!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ this.deptBudgetList.reMildewGrain < 0 ||
|
|
|
|
+ this.deptBudgetList.reMildewGrain > 40 ||
|
|
|
|
+ (String(this.deptBudgetList.reMildewGrain).indexOf(
|
|
|
|
+ '.'
|
|
|
|
+ ) != -1 &&
|
|
|
|
+ String(this.deptBudgetList.reMildewGrain)
|
|
|
|
+ .length -
|
|
|
|
+ (String(
|
|
|
|
+ this.deptBudgetList.reMildewGrain
|
|
|
|
+ ).indexOf('.') +
|
|
|
|
+ 1) >
|
|
|
|
+ 2)
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '复检霉变粒(%)输入错误! 取值范围0-40之间且可以保留2小数',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.deptBudgetList.warehouseInOutDetail.reJiaorenli = this.deptBudgetList.reJiaorenli
|
|
|
|
+ if (this.deptBudgetList.reJiaorenli) {
|
|
|
|
+ if (isNaN(this.deptBudgetList.reJiaorenli)) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '复检热损伤(%)非数字!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ this.deptBudgetList.reJiaorenli < 0 ||
|
|
|
|
+ this.deptBudgetList.reJiaorenli > 40 ||
|
|
|
|
+ (String(this.deptBudgetList.reJiaorenli).indexOf(
|
|
|
|
+ '.'
|
|
|
|
+ ) != -1 &&
|
|
|
|
+ String(this.deptBudgetList.reJiaorenli).length -
|
|
|
|
+ (String(
|
|
|
|
+ this.deptBudgetList.reJiaorenli
|
|
|
|
+ ).indexOf('.') +
|
|
|
|
+ 1) >
|
|
|
|
+ 2)
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '复检热损伤(%)输入错误! 取值范围0-40之间且可以保留2小数',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.deptBudgetList.warehouseInOutDetail.reImperfectGrain = this.deptBudgetList.reImperfectGrain
|
|
|
|
+ if (this.deptBudgetList.reImperfectGrain) {
|
|
|
|
+ if (isNaN(this.deptBudgetList.reImperfectGrain)) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '复检不完善粒(%)非数字!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ this.deptBudgetList.reImperfectGrain < 0 ||
|
|
|
|
+ this.deptBudgetList.reImperfectGrain > 40 ||
|
|
|
|
+ (String(
|
|
|
|
+ this.deptBudgetList.reImperfectGrain
|
|
|
|
+ ).indexOf('.') != -1 &&
|
|
|
|
+ String(this.deptBudgetList.reImperfectGrain)
|
|
|
|
+ .length -
|
|
|
|
+ (String(
|
|
|
|
+ this.deptBudgetList.reImperfectGrain
|
|
|
|
+ ).indexOf('.') +
|
|
|
|
+ 1) >
|
|
|
|
+ 2)
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '复检不完善粒(%)输入错误! 取值范围0-40之间且可以保留2小数',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.deptBudgetList.warehouseInOutDetail.reBulkDensity = this.deptBudgetList.reBulkDensity
|
|
|
|
+ if (this.deptBudgetList.reBulkDensity) {
|
|
|
|
+ if (isNaN(this.deptBudgetList.reBulkDensity)) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '复检容重(克/升)非数字!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ (this.deptBudgetList.reBulkDensity &&
|
|
|
|
+ String(
|
|
|
|
+ this.deptBudgetList.reBulkDensity
|
|
|
|
+ ).indexOf('.') != -1 &&
|
|
|
|
+ String(this.deptBudgetList.reBulkDensity)
|
|
|
|
+ .length -
|
|
|
|
+ (String(
|
|
|
|
+ this.deptBudgetList.reBulkDensity
|
|
|
|
+ ).indexOf('.') +
|
|
|
|
+ 1) >
|
|
|
|
+ 2) ||
|
|
|
|
+ this.deptBudgetList.reBulkDensity > 1000 ||
|
|
|
|
+ this.deptBudgetList.reBulkDensity < 0
|
|
|
|
+ ) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '复检容重输入错误',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
this.$confirm('确定初检信息后,初检员不需要再次确认质检信息,是否确认提交', '提示', {
|
|
this.$confirm('确定初检信息后,初检员不需要再次确认质检信息,是否确认提交', '提示', {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
@@ -2074,19 +2470,17 @@
|
|
// deptBudgetList.qualityNo//业务编号改为后端生成
|
|
// deptBudgetList.qualityNo//业务编号改为后端生成
|
|
delete this.deptBudgetList.qualityNo
|
|
delete this.deptBudgetList.qualityNo
|
|
if(this.serviceManagementType == 1){
|
|
if(this.serviceManagementType == 1){
|
|
- if(this.deptBudgetList.inOutType == '移库入库'){
|
|
|
|
- this.deptBudgetList.numberLetter = "YKRK"
|
|
|
|
|
|
+ if(this.deptBudgetList.inOutType == '移库入库'){
|
|
|
|
+ this.deptBudgetList.numberLetter = "YKRK"
|
|
}else{
|
|
}else{
|
|
- this.deptBudgetList.numberLetter = "CGRK"
|
|
|
|
|
|
+ this.deptBudgetList.numberLetter = "CGRK"
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
this.deptBudgetList.numberLetter = "SGRK"
|
|
this.deptBudgetList.numberLetter = "SGRK"
|
|
}
|
|
}
|
|
-
|
|
|
|
this.deptBudgetList.warehouseNo = this.warehouseNo
|
|
this.deptBudgetList.warehouseNo = this.warehouseNo
|
|
console.log(this.deptBudgetList, '入库对象')
|
|
console.log(this.deptBudgetList, '入库对象')
|
|
// return
|
|
// return
|
|
-
|
|
|
|
this.$confirm(`确定提交入库信息`, {
|
|
this.$confirm(`确定提交入库信息`, {
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
@@ -2419,13 +2813,12 @@
|
|
},
|
|
},
|
|
warehousetypechange(status) {
|
|
warehousetypechange(status) {
|
|
this.serviceManagementType = status
|
|
this.serviceManagementType = status
|
|
- // if (status == 3) {
|
|
|
|
|
|
+ if (status == 3) {
|
|
// //解决冲突别解决没了(注意)
|
|
// //解决冲突别解决没了(注意)
|
|
- // this.outType = '他运'
|
|
|
|
- // this.warehouseCount = '000' + Number(this.warehouseCount + 1)
|
|
|
|
- // this.deptBudgetList.qualityNo = 'SGRK' + this.getTime() + this.warehouseNo + this.warehouseCount.substring(
|
|
|
|
- // this.warehouseCount.length - 4)
|
|
|
|
- // }
|
|
|
|
|
|
+ this.outType = '他运'
|
|
|
|
+ }else{
|
|
|
|
+ this.outType = ''
|
|
|
|
+ }
|
|
this.getList()
|
|
this.getList()
|
|
},
|
|
},
|
|
// 默认按钮暂时不用
|
|
// 默认按钮暂时不用
|