|
@@ -139,7 +139,6 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
-
|
|
|
|
<script>
|
|
<script>
|
|
import upload from '@/components/upload.vue';
|
|
import upload from '@/components/upload.vue';
|
|
import helper from '@/common/helper.js';
|
|
import helper from '@/common/helper.js';
|
|
@@ -184,19 +183,7 @@
|
|
type: "等外"
|
|
type: "等外"
|
|
}
|
|
}
|
|
],
|
|
],
|
|
- handlerList: [{
|
|
|
|
- name: "张三"
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: "二等"
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: "三等"
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: "等外"
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
|
|
+ handlerList: [],
|
|
warehousingTypeList: [],
|
|
warehousingTypeList: [],
|
|
action: this.$uploadUrl,
|
|
action: this.$uploadUrl,
|
|
maxSize: 50 * 1024 * 1024, //限制文件大小 50M
|
|
maxSize: 50 * 1024 * 1024, //限制文件大小 50M
|
|
@@ -215,20 +202,12 @@
|
|
gradeKey: "",
|
|
gradeKey: "",
|
|
grossWeight: 0,
|
|
grossWeight: 0,
|
|
tare: 0,
|
|
tare: 0,
|
|
- // buckleWeightRatio: 0,
|
|
|
|
- // solidGrainWater: 0,
|
|
|
|
- // tidalGrainWater: 0,
|
|
|
|
- // pureWeight: 0,
|
|
|
|
},
|
|
},
|
|
params: {
|
|
params: {
|
|
year: true,
|
|
year: true,
|
|
month: true,
|
|
month: true,
|
|
day: true,
|
|
day: true,
|
|
- // hour: true,
|
|
|
|
- // minute: true,
|
|
|
|
- // second: true
|
|
|
|
},
|
|
},
|
|
- // inOutDate: "请选择出库日期",
|
|
|
|
netWeight: 0,
|
|
netWeight: 0,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -245,7 +224,7 @@
|
|
this.cangId = options.cangId
|
|
this.cangId = options.cangId
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
- let _data = uni.getStorageSync('erpContractNo')
|
|
|
|
|
|
+ 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;
|
|
@@ -253,7 +232,18 @@
|
|
this.detailData.contractNo = _data.contractNo;
|
|
this.detailData.contractNo = _data.contractNo;
|
|
}
|
|
}
|
|
this.detailData.goodsNameKey = _data.goodsNameKey;
|
|
this.detailData.goodsNameKey = _data.goodsNameKey;
|
|
- if (!_data.tranCarInfoList) _data.tranCarInfoList = []
|
|
|
|
|
|
+ this.detailData.carNo = uni.getStorageSync('erpcarNoCK')
|
|
|
|
+ if (!_data.tranCarInfoList) {
|
|
|
|
+ this.isPC = false
|
|
|
|
+ _data.tranCarInfoList = []
|
|
|
|
+ } else {
|
|
|
|
+ this.isPC = true
|
|
|
|
+ if (uni.getStorageSync('ContractNoCar')) {
|
|
|
|
+ this.detailData.carNo = uni.getStorageSync('ContractNoCar')
|
|
|
|
+ } else {
|
|
|
|
+ this.detailData.carNo = _data.tranCarInfoList[0].carNo
|
|
|
|
+ }
|
|
|
|
+ }
|
|
if (!this.detailData.contractNo) {
|
|
if (!this.detailData.contractNo) {
|
|
this.detailData.contractNo = '请选择合同编号'
|
|
this.detailData.contractNo = '请选择合同编号'
|
|
} else {
|
|
} else {
|
|
@@ -269,10 +259,11 @@
|
|
this.detailData.inOutDate = _day.getFullYear() + "-" + (_day.getMonth() + 1) + "-" + _day.getDate();
|
|
this.detailData.inOutDate = _day.getFullYear() + "-" + (_day.getMonth() + 1) + "-" + _day.getDate();
|
|
//出库类型
|
|
//出库类型
|
|
this.outWarehouse()
|
|
this.outWarehouse()
|
|
- this.detailData.agent = helper.erpWarehouse.personCharge
|
|
|
|
|
|
+ if(helper.erpWarehouse.personCharge){
|
|
|
|
+ this.detailData.agent = helper.erpWarehouse.personCharge
|
|
|
|
+ }
|
|
//经办人
|
|
//经办人
|
|
this.handler()
|
|
this.handler()
|
|
-
|
|
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
//计算纯重
|
|
//计算纯重
|
|
@@ -370,9 +361,9 @@
|
|
(String(this.detailData.grossWeight).indexOf('.') != -1 &&
|
|
(String(this.detailData.grossWeight).indexOf('.') != -1 &&
|
|
String(this.detailData.grossWeight).length -
|
|
String(this.detailData.grossWeight).length -
|
|
(String(this.detailData.grossWeight).indexOf('.') + 1) >
|
|
(String(this.detailData.grossWeight).indexOf('.') + 1) >
|
|
- 1) ||
|
|
|
|
|
|
+ 3) ||
|
|
this.detailData.grossWeight < 1 ||
|
|
this.detailData.grossWeight < 1 ||
|
|
- this.detailData.grossWeight > 100000
|
|
|
|
|
|
+ this.detailData.grossWeight > 10000
|
|
) {
|
|
) {
|
|
this.$api.msg('毛重输入错误!')
|
|
this.$api.msg('毛重输入错误!')
|
|
return
|
|
return
|
|
@@ -385,19 +376,19 @@
|
|
(String(this.detailData.tare).indexOf('.') != -1 &&
|
|
(String(this.detailData.tare).indexOf('.') != -1 &&
|
|
String(this.detailData.tare).length -
|
|
String(this.detailData.tare).length -
|
|
(String(this.detailData.tare).indexOf('.') + 1) >
|
|
(String(this.detailData.tare).indexOf('.') + 1) >
|
|
- 1) ||
|
|
|
|
|
|
+ 3) ||
|
|
this.detailData.tare < 1 ||
|
|
this.detailData.tare < 1 ||
|
|
- this.detailData.tare > 100000
|
|
|
|
|
|
+ this.detailData.tare > 10000
|
|
) {
|
|
) {
|
|
this.$api.msg('皮重输入错误!')
|
|
this.$api.msg('皮重输入错误!')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- if (this.detailData.tare > this.detailData.grossWeight) {
|
|
|
|
|
|
+ if (Number(this.detailData.tare ) > Number(this.detailData.grossWeight)) {
|
|
this.$api.msg('皮重不能大于毛重')
|
|
this.$api.msg('皮重不能大于毛重')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- if (this.netWeight < 0) {
|
|
|
|
- this.$api.msg('净重不能小于0')
|
|
|
|
|
|
+ if (this.netWeight <= 0) {
|
|
|
|
+ this.$api.msg('净重不能小于等于0')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
if (this.detailData.type == "潮粮") {
|
|
if (this.detailData.type == "潮粮") {
|
|
@@ -411,7 +402,7 @@
|
|
(String(this.detailData.buckleWeightRatio).indexOf('.') + 1) >
|
|
(String(this.detailData.buckleWeightRatio).indexOf('.') + 1) >
|
|
2) ||
|
|
2) ||
|
|
this.detailData.buckleWeightRatio < 0 ||
|
|
this.detailData.buckleWeightRatio < 0 ||
|
|
- this.detailData.buckleWeightRatio > 2
|
|
|
|
|
|
+ this.detailData.buckleWeightRatio > 3
|
|
) {
|
|
) {
|
|
this.$api.msg('扣重比输入错误!')
|
|
this.$api.msg('扣重比输入错误!')
|
|
return
|
|
return
|
|
@@ -441,12 +432,12 @@
|
|
(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
|
|
}
|
|
}
|
|
- if (this.detailData.tidalGrainWater < this.detailData.solidGrainWater) {
|
|
|
|
|
|
+ if (this.detailData.tidalGrainWater <= this.detailData.solidGrainWater) {
|
|
this.$api.msg('潮粮水分输入错误!')
|
|
this.$api.msg('潮粮水分输入错误!')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
@@ -581,7 +572,7 @@
|
|
this.detailData.warehouseName = helper.erpWarehouse.warehouseName
|
|
this.detailData.warehouseName = helper.erpWarehouse.warehouseName
|
|
this.detailData.positionId = helper.erpWarehouse.positionId
|
|
this.detailData.positionId = helper.erpWarehouse.positionId
|
|
this.detailData.binNumber = this.binNumber
|
|
this.detailData.binNumber = this.binNumber
|
|
- this.detailData.goodsNameKey = uni.getStorageSync('erpContractNo').goodsNameKey;
|
|
|
|
|
|
+ this.detailData.goodsNameKey = uni.getStorageSync('erpContractNoCK').goodsNameKey;
|
|
this.detailData.compId = helper.erpWarehouse.compId
|
|
this.detailData.compId = helper.erpWarehouse.compId
|
|
this.detailData.netWeight = this.netWeight
|
|
this.detailData.netWeight = this.netWeight
|
|
this.detailData.inOutFlag = 1
|
|
this.detailData.inOutFlag = 1
|
|
@@ -606,7 +597,11 @@
|
|
that.detailData).then(res => {
|
|
that.detailData).then(res => {
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
that.$api.msg(title)
|
|
that.$api.msg(title)
|
|
- uni.navigateBack()
|
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ uni.navigateBack()
|
|
|
|
+ }, 1000)
|
|
|
|
+ }else{
|
|
|
|
+ that.$api.msg(res.data.message)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -615,7 +610,7 @@
|
|
},
|
|
},
|
|
slectcontractNo() {
|
|
slectcontractNo() {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url: '/pages/erp/warehousing/selectContractNo?flag=' + 5
|
|
|
|
|
|
+ url: '/pages/erp/exWarehousing/selectContractNo?flag=' + 5
|
|
})
|
|
})
|
|
},
|
|
},
|
|
slectCarNo() {
|
|
slectCarNo() {
|