|
@@ -587,44 +587,9 @@ export default {
|
|
this.tranCarNo = item.tranCarNo
|
|
this.tranCarNo = item.tranCarNo
|
|
this.staffId = item.staffId
|
|
this.staffId = item.staffId
|
|
//this.freightspace[0].agent = this.agent
|
|
//this.freightspace[0].agent = this.agent
|
|
- var tranCarNos = ''
|
|
|
|
this.dialogFormVisible2 = true
|
|
this.dialogFormVisible2 = true
|
|
this.dataList = item
|
|
this.dataList = item
|
|
- paiLook({
|
|
|
|
- contractNo: this.dataList.contractNo
|
|
|
|
- })
|
|
|
|
- .toPromise()
|
|
|
|
- .then(response => {
|
|
|
|
- // this.index = response.length + 1
|
|
|
|
- var tmp1='C00'
|
|
|
|
- if(response.length>0){
|
|
|
|
- this.freightspace = response
|
|
|
|
- console.log(this.freightspace)
|
|
|
|
- }else{
|
|
|
|
- this.freightspace=[{
|
|
|
|
- carNo: '',
|
|
|
|
- boxNo: '',
|
|
|
|
- titleNo: '',
|
|
|
|
- tranCarNo: 'C001',
|
|
|
|
- agent: ''
|
|
|
|
- }]
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if(this.freightspace.length+1>=10){
|
|
|
|
- tmp1='C0'
|
|
|
|
- }if(this.freightspace.length+1>=100){
|
|
|
|
- tmp1='C'
|
|
|
|
- }
|
|
|
|
- this.freightspace.unshift({
|
|
|
|
- carNo: '',
|
|
|
|
- boxNo: '',
|
|
|
|
- titleNo: '',
|
|
|
|
- tranCarNo: tmp1+(this.freightspace.length+1),
|
|
|
|
- agent: this.freightspace[this.freightspace.length-1].agent
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
|
|
+ this.refresh()
|
|
// this.staffQO.roleId = 'd6a5c8a52da544309259f91f75de1ec6'
|
|
// this.staffQO.roleId = 'd6a5c8a52da544309259f91f75de1ec6'
|
|
this.staffQO.roleId = '4be0c38df3e243a9b86446a3c524b91a'
|
|
this.staffQO.roleId = '4be0c38df3e243a9b86446a3c524b91a'
|
|
kuguan(this.staffQO)
|
|
kuguan(this.staffQO)
|
|
@@ -645,18 +610,33 @@ export default {
|
|
.then(response => {
|
|
.then(response => {
|
|
// this.index = response.length + 1
|
|
// this.index = response.length + 1
|
|
this.freightspace = response
|
|
this.freightspace = response
|
|
|
|
+ var tmp = 'C001';
|
|
|
|
+ if(this.freightspace.length >0 ){
|
|
|
|
+ tmp = this.freightspace[0].tranCarNo;
|
|
|
|
+ tmp = parseInt(tmp.replace('C',''));
|
|
|
|
+ tmp++
|
|
|
|
+ if(tmp < 10){
|
|
|
|
+ tmp = 'C00'+ tmp
|
|
|
|
+ }
|
|
|
|
+ else if(tmp < 100){
|
|
|
|
+ tmp = 'C0'+ tmp
|
|
|
|
+ }
|
|
|
|
+ else{
|
|
|
|
+ tmp = 'C'+ tmp
|
|
|
|
+ }
|
|
|
|
+ }
|
|
this.freightspace.unshift({
|
|
this.freightspace.unshift({
|
|
carNo: '',
|
|
carNo: '',
|
|
boxNo: '',
|
|
boxNo: '',
|
|
titleNo: '',
|
|
titleNo: '',
|
|
- tranCarNo: '',
|
|
|
|
- agent: ''
|
|
|
|
|
|
+ tranCarNo: tmp,
|
|
|
|
+ agent: this.agent
|
|
})
|
|
})
|
|
- for (var i = 0; i < this.freightspace.length; i++) {
|
|
|
|
- var index = i + 1
|
|
|
|
- this.freightspace[this.freightspace.length - 1 - i].tranCarNo =
|
|
|
|
- 'C00' + index
|
|
|
|
- }
|
|
|
|
|
|
+ // for (var i = 0; i < this.freightspace.length; i++) {
|
|
|
|
+ // var index = i + 1
|
|
|
|
+ // this.freightspace[this.freightspace.length - 1 - i].tranCarNo =
|
|
|
|
+ // 'C00' + index
|
|
|
|
+ // }
|
|
})
|
|
})
|
|
},
|
|
},
|
|
dateFormat(fmt, date) {
|
|
dateFormat(fmt, date) {
|
|
@@ -787,7 +767,7 @@ export default {
|
|
// }
|
|
// }
|
|
// },
|
|
// },
|
|
add1(item) {
|
|
add1(item) {
|
|
- if (!this.freightspace[0].carNo) {
|
|
|
|
|
|
+ if (!this.freightspace[0].carNo) {
|
|
this.$message({
|
|
this.$message({
|
|
message: '车牌号不能为空',
|
|
message: '车牌号不能为空',
|
|
type: 'warning'
|
|
type: 'warning'
|
|
@@ -835,32 +815,24 @@ export default {
|
|
})
|
|
})
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- var tmp = this.freightspace[0].agent
|
|
|
|
- var tmp1 = this.freightspace.length + 1
|
|
|
|
- var tmp2='C00'
|
|
|
|
- if(tmp1>=10){
|
|
|
|
- tmp2='C0'
|
|
|
|
|
|
+ if (!this.freightspace[0].agent && !this.agent) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '请选择库管',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ })
|
|
|
|
+ return
|
|
}
|
|
}
|
|
- if(tmp1>=100){
|
|
|
|
- tmp2='C'
|
|
|
|
|
|
+ if(this.freightspace[0].agent){
|
|
|
|
+ item.agent = this.freightspace[0].agent
|
|
|
|
+ }
|
|
|
|
+ else{
|
|
|
|
+ item.agent = this.agent
|
|
}
|
|
}
|
|
- this.freightspace.unshift({
|
|
|
|
- carNo: '',
|
|
|
|
- boxNo: '',
|
|
|
|
- titleNo: '',
|
|
|
|
- planId: this.planId,
|
|
|
|
- staffId: this.staffId,
|
|
|
|
- goodsName: this.goodsName,
|
|
|
|
- buyer: this.buyer,
|
|
|
|
- tranCarNo: tmp2 + tmp1,
|
|
|
|
- agent: tmp
|
|
|
|
- })
|
|
|
|
item.planId = this.planId
|
|
item.planId = this.planId
|
|
item.goodsName = this.goodsName
|
|
item.goodsName = this.goodsName
|
|
item.buyer = this.buyer
|
|
item.buyer = this.buyer
|
|
item.contractNo = this.contractNo
|
|
item.contractNo = this.contractNo
|
|
item.staffId = this.staffId
|
|
item.staffId = this.staffId
|
|
-
|
|
|
|
paifa(item)
|
|
paifa(item)
|
|
.toPromise()
|
|
.toPromise()
|
|
.then(response => {
|
|
.then(response => {
|