|
@@ -594,7 +594,8 @@ export default {
|
|
},
|
|
},
|
|
accessoryTFs: false,
|
|
accessoryTFs: false,
|
|
param: 9600,
|
|
param: 9600,
|
|
- allowEdit:true
|
|
|
|
|
|
+ allowEdit:true,
|
|
|
|
+ result1:'00'
|
|
}
|
|
}
|
|
},
|
|
},
|
|
activated() {
|
|
activated() {
|
|
@@ -609,14 +610,14 @@ export default {
|
|
this.deptBudgetList1.binNumber = this.$route.query.binNumber
|
|
this.deptBudgetList1.binNumber = this.$route.query.binNumber
|
|
this.getList()
|
|
this.getList()
|
|
this.dataList.id = this.$route.query.id
|
|
this.dataList.id = this.$route.query.id
|
|
- this.dataList.grossWeight = this.$route.query.grossWeight*1000
|
|
|
|
|
|
+ this.dataList.grossWeight = Math.round(this.$route.query.grossWeight*1000)
|
|
this.dataList.contractNo = this.$route.query.contractNo
|
|
this.dataList.contractNo = this.$route.query.contractNo
|
|
this.dataList.baseId = this.$route.query.baseId
|
|
this.dataList.baseId = this.$route.query.baseId
|
|
this.dataList.positionId = this.$route.query.positionId
|
|
this.dataList.positionId = this.$route.query.positionId
|
|
this.dataList.warehouseName = this.$route.query.warehouseName
|
|
this.dataList.warehouseName = this.$route.query.warehouseName
|
|
this.dataList.binNumber = this.$route.query.binNumber
|
|
this.dataList.binNumber = this.$route.query.binNumber
|
|
- this.dataList.tare = this.$route.query.tare*1000
|
|
|
|
- this.dataList.netWeight = this.$route.query.netWeight*1000
|
|
|
|
|
|
+ this.dataList.tare = Math.round(this.$route.query.tare*1000)
|
|
|
|
+ this.dataList.netWeight = Math.round(this.$route.query.netWeight*1000)
|
|
this.dataList.grade = this.$route.query.grade
|
|
this.dataList.grade = this.$route.query.grade
|
|
this.dataList.agent = this.$route.query.agent
|
|
this.dataList.agent = this.$route.query.agent
|
|
this.dataList.carNo = this.$route.query.carNo
|
|
this.dataList.carNo = this.$route.query.carNo
|
|
@@ -639,9 +640,9 @@ export default {
|
|
this.dataList.buckleWeightRatio=this.$route.query.buckleWeightRatio
|
|
this.dataList.buckleWeightRatio=this.$route.query.buckleWeightRatio
|
|
this.dataList.tidalGrainWater=this.$route.query.tidalGrainWater
|
|
this.dataList.tidalGrainWater=this.$route.query.tidalGrainWater
|
|
this.dataList.solidGrainWater=this.$route.query.solidGrainWater
|
|
this.dataList.solidGrainWater=this.$route.query.solidGrainWater
|
|
- this.dataList.pureWeight=this.$route.query.pureWeight*1000
|
|
|
|
|
|
+ this.dataList.pureWeight=Math.round(this.$route.query.pureWeight*1000)
|
|
this.dataList.deductionAmount=this.$route.query.deductionAmount/1000
|
|
this.dataList.deductionAmount=this.$route.query.deductionAmount/1000
|
|
- this.dataList.deductionWeight=this.$route.query.deductionWeight*1000
|
|
|
|
|
|
+ this.dataList.deductionWeight=Math.round(this.$route.query.deductionWeight*1000)
|
|
this.dataList.inOutTypeFlag=1
|
|
this.dataList.inOutTypeFlag=1
|
|
this.dataList.inOutTaskNo = this.$route.query.inOutTaskNo
|
|
this.dataList.inOutTaskNo = this.$route.query.inOutTaskNo
|
|
if(this.dataList.cost){
|
|
if(this.dataList.cost){
|
|
@@ -688,6 +689,7 @@ export default {
|
|
// var receData = HexConvert.ByteToString(value);
|
|
// var receData = HexConvert.ByteToString(value);
|
|
// console.log("receData",receData);
|
|
// console.log("receData",receData);
|
|
var flag = false;
|
|
var flag = false;
|
|
|
|
+ var flag1 = false;
|
|
// for (var i = 0; i < value.length; i++) {
|
|
// for (var i = 0; i < value.length; i++) {
|
|
// var tmp = String.fromCharCode(value[i])
|
|
// var tmp = String.fromCharCode(value[i])
|
|
// if (tmp == '+') {
|
|
// if (tmp == '+') {
|
|
@@ -700,7 +702,7 @@ export default {
|
|
// if(parseInt(result)){
|
|
// if(parseInt(result)){
|
|
// this.dataList.tare = parseInt(result)
|
|
// this.dataList.tare = parseInt(result)
|
|
// }
|
|
// }
|
|
- if(this.warehouseName&&this.warehouseName == '山东诸城迈饶库'){
|
|
|
|
|
|
+ if(this.deptBudgetList1.warehouseName&&(this.deptBudgetList.warehouseName == '山东诸城迈饶库'||this.deptBudgetList.warehouseName == '克东千红库')){
|
|
for (var i = 0; i < value.length; i++) {
|
|
for (var i = 0; i < value.length; i++) {
|
|
var tmp = String.fromCharCode(value[i])
|
|
var tmp = String.fromCharCode(value[i])
|
|
if (tmp == '+') {
|
|
if (tmp == '+') {
|
|
@@ -717,24 +719,31 @@ export default {
|
|
else{
|
|
else{
|
|
for(var i=0;i<value.length;i++){
|
|
for(var i=0;i<value.length;i++){
|
|
var tmp = String.fromCharCode(value[i])
|
|
var tmp = String.fromCharCode(value[i])
|
|
- if(value[0] != 49 && value[0] != 2){
|
|
|
|
- break
|
|
|
|
|
|
+
|
|
|
|
+ if((value[0] != 49 && value[0] != 2)){
|
|
|
|
+ if((value[value.length-1] == 48&&value[value.length-2] == 48)){
|
|
|
|
+ flag1 = true
|
|
|
|
+ }
|
|
|
|
+ else{
|
|
|
|
+ break
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if (tmp == String.fromCharCode(32) ) {
|
|
if (tmp == String.fromCharCode(32) ) {
|
|
- flag = true
|
|
|
|
|
|
+ flag = true
|
|
}
|
|
}
|
|
- if (flag && result.length < 7 && tmp != String.fromCharCode(32)) {
|
|
|
|
- // if(i-1 >=0 &&tmp == String.fromCharCode(48) && value[i-1] == 32){
|
|
|
|
- // continue
|
|
|
|
- // }
|
|
|
|
- // if(i-2 >=0 &&tmp == String.fromCharCode(48) && value[i-2] == 32){
|
|
|
|
- // continue
|
|
|
|
- // }
|
|
|
|
- result += tmp
|
|
|
|
|
|
+ if (flag && result.length < 7 && tmp != String.fromCharCode(32)&&!(value[value.length-1] == 48&&value[value.length-2] == 48)) {
|
|
|
|
+ result += tmp
|
|
|
|
+ }
|
|
|
|
+ if (flag1 && tmp != String.fromCharCode(32)) {
|
|
|
|
+ if((value[value.length-1] == 48&&value[value.length-2] == 48)){
|
|
|
|
+ if(i == 0 ){
|
|
|
|
+ this.result1 = tmp + '0'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if(parseInt(result)|| parseInt(result) == 0){
|
|
if(parseInt(result)|| parseInt(result) == 0){
|
|
- this.dataList.tare = parseInt(result)*100
|
|
|
|
|
|
+ this.dataList.tare = parseInt(result+this.result1)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
setTimeout(1000)
|
|
setTimeout(1000)
|
|
@@ -1362,24 +1371,31 @@ export default {
|
|
.then(() => {
|
|
.then(() => {
|
|
this.$refs.dataList.validate((valid) => {
|
|
this.$refs.dataList.validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
|
|
+ debugger
|
|
this.dataList.compId = sessionStorage.getItem('ws-pf_compId')
|
|
this.dataList.compId = sessionStorage.getItem('ws-pf_compId')
|
|
this.dataList.inOutFlag = 2
|
|
this.dataList.inOutFlag = 2
|
|
this.dataList.statusFlag = 3
|
|
this.dataList.statusFlag = 3
|
|
- this.dataList.grossWeight /= 1000
|
|
|
|
- this.dataList.tare /= 1000
|
|
|
|
- this.dataList.netWeight /= 1000
|
|
|
|
- this.dataList.pureWeight /= 1000
|
|
|
|
|
|
+ this.dataList.grossWeight = (this.dataList.grossWeight/1000).toFixed(2)
|
|
|
|
+ this.dataList.tare = (this.dataList.tare/1000).toFixed(2)
|
|
|
|
+ this.dataList.netWeight = (this.dataList.netWeight/1000).toFixed(2)
|
|
|
|
+ this.dataList.pureWeight = (this.dataList.pureWeight/1000).toFixed(2)
|
|
if(!this.dataList.deductionWeight){
|
|
if(!this.dataList.deductionWeight){
|
|
this.dataList.deductionWeight = 0
|
|
this.dataList.deductionWeight = 0
|
|
}
|
|
}
|
|
if(!this.dataList.deductionAmount){
|
|
if(!this.dataList.deductionAmount){
|
|
this.dataList.deductionAmount = 0
|
|
this.dataList.deductionAmount = 0
|
|
}
|
|
}
|
|
- this.dataList.deductionWeight /= 1000
|
|
|
|
- this.dataList.deductionAmount *= 1000
|
|
|
|
|
|
+ this.dataList.deductionWeight = (this.dataList.deductionWeight/1000).toFixed(2)
|
|
|
|
+ this.dataList.deductionAmount = Math.round(this.dataList.deductionAmount*1000)
|
|
|
|
+
|
|
addstorageputList(this.dataList)
|
|
addstorageputList(this.dataList)
|
|
.toPromise()
|
|
.toPromise()
|
|
.then((response) => {
|
|
.then((response) => {
|
|
|
|
+ this.dataList.grossWeight = Math.round(this.dataList.grossWeight*1000)
|
|
|
|
+ this.dataList.tare = Math.round(this.dataList.tare*1000)
|
|
|
|
+ this.dataList.netWeight = Math.round(this.dataList.netWeight*1000)
|
|
|
|
+ this.dataList.pureWeight = Math.round(this.dataList.pureWeight*1000)
|
|
|
|
+ this.dataList.deductionWeight = Math.round(this.dataList.deductionWeight*1000)
|
|
this.$message.success('提交成功')
|
|
this.$message.success('提交成功')
|
|
this.$confirm(`是否打印磅单`, {
|
|
this.$confirm(`是否打印磅单`, {
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
@@ -1394,8 +1410,9 @@ export default {
|
|
.then((response) => {
|
|
.then((response) => {
|
|
window.open( '../../../../static/weightCheckInOut.html?type=2&tableData=' +JSON.stringify(response))
|
|
window.open( '../../../../static/weightCheckInOut.html?type=2&tableData=' +JSON.stringify(response))
|
|
})
|
|
})
|
|
- this.$router.push({ path: 'warehouseManagementList' })
|
|
|
|
|
|
+
|
|
})
|
|
})
|
|
|
|
+ this.$router.push({ path: 'warehouseManagementList' })
|
|
.catch(() => {
|
|
.catch(() => {
|
|
return false
|
|
return false
|
|
})
|
|
})
|