|
@@ -219,7 +219,7 @@
|
|
|
pcFlag: 0,
|
|
|
contractNo: {},
|
|
|
carNo: {},
|
|
|
- warehouseName:{},
|
|
|
+ warehouseName: {},
|
|
|
},
|
|
|
WarehouseInOutInfo1: {
|
|
|
contractNo: {},
|
|
@@ -235,7 +235,7 @@
|
|
|
maxSize: 5 * 1024 * 1024, //限制文件大小 5M
|
|
|
btnLoading: false, //防止重复点击
|
|
|
imgUrls: [],
|
|
|
- binNumber:[],
|
|
|
+ binNumber: [],
|
|
|
warehouse: [],
|
|
|
warehouseIndex: -1,
|
|
|
warehouse1: [],
|
|
@@ -249,7 +249,7 @@
|
|
|
},
|
|
|
show: false,
|
|
|
license1: "",
|
|
|
- ids:"",
|
|
|
+ ids: "",
|
|
|
|
|
|
}
|
|
|
},
|
|
@@ -267,23 +267,6 @@
|
|
|
}
|
|
|
return year + '-' + month + "-" + date1
|
|
|
},
|
|
|
- // time:{
|
|
|
- // var date = new Date()
|
|
|
- // var year = date.getFullYear()
|
|
|
- // var month = date.getMonth()
|
|
|
- // var date1 = date.getDate()
|
|
|
- // set() {
|
|
|
- // if (month + 1 < 10) {
|
|
|
- // month = "0" + (month + 1)
|
|
|
- // }
|
|
|
- // if (date1 + 1 < 10) {
|
|
|
- // date1 = "0" + date1
|
|
|
- // }
|
|
|
- // },
|
|
|
- // get() {
|
|
|
- // return year + '-' + month + "-" + date1
|
|
|
- // },
|
|
|
- // },
|
|
|
startDate() {
|
|
|
return new Date(new Date(new Date().toLocaleDateString()).getTime() - (1 * 60 * 60 * 1000))
|
|
|
},
|
|
@@ -303,9 +286,12 @@
|
|
|
this.WarehouseInOutInfo.warehouseName = option.warehouseName
|
|
|
this.getList(this.WarehouseInOutInfo.id)
|
|
|
},
|
|
|
- onShow() {
|
|
|
- this.$api.doRequest('get', '/warehouseInOutInfo/selectCompId', {contractNo:this.WarehouseInOutInfo.contractNo,warehouseType:1,}).then(res => {
|
|
|
- if(res.data.code==200){
|
|
|
+ onShow() {
|
|
|
+ this.$api.doRequest('get', '/warehouseInOutInfo/selectCompId', {
|
|
|
+ contractNo: this.WarehouseInOutInfo.contractNo,
|
|
|
+ warehouseType: 1,
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouse', {
|
|
|
compId: res.data.data,
|
|
|
warehouseType: 1,
|
|
@@ -313,66 +299,88 @@
|
|
|
if (res.data.code == 200) {
|
|
|
var arr = []
|
|
|
for (var i = 0; i < res.data.data.length; i++) {
|
|
|
- if (res.data.data[i].warehouseName == this.WarehouseInOutInfo.warehouseName) {
|
|
|
+ if (res.data.data[i].warehouseName == this.WarehouseInOutInfo
|
|
|
+ .warehouseName) {
|
|
|
this.warehouseIndex = i
|
|
|
this.ids = res.data.data[i].id
|
|
|
}
|
|
|
arr.push(res.data.data[i].warehouseName)
|
|
|
}
|
|
|
this.warehouselist = res.data.data
|
|
|
+
|
|
|
this.warehouse = arr
|
|
|
+ for (var i = 0; i < this.warehouselist.length; i++) {
|
|
|
+ if (this.warehouselist[i].warehouseName == this.WarehouseInOutInfo.warehouseName) {
|
|
|
+ var id = this.warehouselist[i].id
|
|
|
+ this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
|
|
|
+ id: id,
|
|
|
+ }).then(res => {
|
|
|
+ var arr = []
|
|
|
+ for (var i = 0; i < res.data.data.warehousePositionInfoList
|
|
|
+ .length; i++) {
|
|
|
+ if (res.data.data.warehousePositionInfoList[i]
|
|
|
+ .binNumber == this.WarehouseInOutInfo.binNumber) {
|
|
|
+ this.warehouseIndex1 = i
|
|
|
+ }
|
|
|
+ arr.push(res.data.data.warehousePositionInfoList[i]
|
|
|
+ .binNumber)
|
|
|
+ }
|
|
|
+ this.warehouse1 = arr
|
|
|
+ this.warehouselist11 = res.data.data
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
- }
|
|
|
- })
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
methods: {
|
|
|
getList(id1) {
|
|
|
var that = this
|
|
|
this.$api.doRequest('get', '/warehouseInOutInfo/getInfo', {
|
|
|
id: id1
|
|
|
}).then(res => {
|
|
|
- if(res.data.code == 200){
|
|
|
+ if (res.data.code == 200) {
|
|
|
this.WarehouseInOutInfo = res.data.data
|
|
|
- if (this.WarehouseInOutInfo.warehouseInOutDetail != null ) {
|
|
|
- this.list = this.WarehouseInOutInfo.warehouseInOutDetail
|
|
|
- }
|
|
|
- if(this.WarehouseInOutInfo.inOutTypeKey != null){
|
|
|
- this.ruIndex = this.WarehouseInOutInfo.inOutTypeKey
|
|
|
- }
|
|
|
- if(this.WarehouseInOutInfo.warehouseNameKey != null){
|
|
|
- this.warehouseIndex = this.WarehouseInOutInfo.warehouseNameKey
|
|
|
- }
|
|
|
- this.warehouseIndex1 = this.WarehouseInOutInfo.binNumberKey
|
|
|
-
|
|
|
- if(this.WarehouseInOutInfo.gradeKey != null){
|
|
|
- this.pinIndex = this.WarehouseInOutInfo.gradeKey
|
|
|
- }
|
|
|
- var positionid
|
|
|
- for (var i = 0; i < this.warehouselist.length; i++) {
|
|
|
- if (this.warehouselist[i].warehouseName == this.WarehouseInOutInfo.warehouseName) {
|
|
|
- this.warehouseIndex = i
|
|
|
- positionid = this.warehouselist[i].id
|
|
|
- }
|
|
|
+ if (this.WarehouseInOutInfo.warehouseInOutDetail != null) {
|
|
|
+ this.list = this.WarehouseInOutInfo.warehouseInOutDetail
|
|
|
+ }
|
|
|
+ if (this.WarehouseInOutInfo.inOutTypeKey != null) {
|
|
|
+ this.ruIndex = this.WarehouseInOutInfo.inOutTypeKey
|
|
|
+ }
|
|
|
+ if (this.WarehouseInOutInfo.warehouseNameKey != null) {
|
|
|
+ this.warehouseIndex = this.WarehouseInOutInfo.warehouseNameKey
|
|
|
+ }
|
|
|
+ this.warehouseIndex1 = this.WarehouseInOutInfo.binNumberKey
|
|
|
+
|
|
|
+ if (this.WarehouseInOutInfo.gradeKey != null) {
|
|
|
+ this.pinIndex = this.WarehouseInOutInfo.gradeKey
|
|
|
+ }
|
|
|
+ var positionid
|
|
|
+ for (var i = 0; i < this.warehouselist.length; i++) {
|
|
|
+ if (this.warehouselist[i].warehouseName == this.WarehouseInOutInfo.warehouseName) {
|
|
|
+ this.warehouseIndex = i
|
|
|
+ positionid = this.warehouselist[i].id
|
|
|
}
|
|
|
+ }
|
|
|
this.warehouseChange3(positionid)
|
|
|
- for (var i = 0; i < this.warehouse1.length; i++) {
|
|
|
- if (this.warehouse1[i] == this.WarehouseInOutInfo.binNumber) {
|
|
|
- this.warehouseIndex1 = i
|
|
|
- }
|
|
|
+ for (var i = 0; i < this.warehouse1.length; i++) {
|
|
|
+ if (this.warehouse1[i] == this.WarehouseInOutInfo.binNumber) {
|
|
|
+ this.warehouseIndex1 = i
|
|
|
}
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
.catch(res => {
|
|
|
- if(res.errmsg){
|
|
|
+ if (res.errmsg) {
|
|
|
uni.showToast({
|
|
|
title: res.errmsg,
|
|
|
icon: 'none',
|
|
|
duration: 2000
|
|
|
})
|
|
|
- }
|
|
|
- else{
|
|
|
+ } else {
|
|
|
uni.showToast({
|
|
|
title: "系统异常,请联系管理员",
|
|
|
icon: 'none',
|
|
@@ -381,27 +389,27 @@
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- async warehouseChange3(id){
|
|
|
- var that = this
|
|
|
- this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
|
|
|
- id: id,
|
|
|
- }).then(res => {
|
|
|
- if(res.data.code == 200 ){
|
|
|
- that.binNumber=res.data.data.warehousePositionInfoList
|
|
|
- var arr = []
|
|
|
- for (var i = 0; i < res.data.data.warehousePositionInfoList.length; i++) {
|
|
|
- arr.push(res.data.data.warehousePositionInfoList[i].binNumber)
|
|
|
- }
|
|
|
- that.warehouse1 = arr
|
|
|
- for(var i = 0 ; i < that.warehouse1.length ; i++){
|
|
|
- if(that.warehouse1[i] == that.WarehouseInOutInfo.binNumber){
|
|
|
- that.warehouseIndex1 = i
|
|
|
+ async warehouseChange3(id) {
|
|
|
+ var that = this
|
|
|
+ this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
|
|
|
+ id: id,
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.binNumber = res.data.data.warehousePositionInfoList
|
|
|
+ var arr = []
|
|
|
+ for (var i = 0; i < res.data.data.warehousePositionInfoList.length; i++) {
|
|
|
+ arr.push(res.data.data.warehousePositionInfoList[i].binNumber)
|
|
|
+ }
|
|
|
+ that.warehouse1 = arr
|
|
|
+ for (var i = 0; i < that.warehouse1.length; i++) {
|
|
|
+ if (that.warehouse1[i] == that.WarehouseInOutInfo.binNumber) {
|
|
|
+ that.warehouseIndex1 = i
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- })
|
|
|
- return that.warehouse1
|
|
|
- },
|
|
|
+ })
|
|
|
+ return that.warehouse1
|
|
|
+ },
|
|
|
warehouseChange(e) {
|
|
|
var id = ''
|
|
|
this.warehouseIndex = e.detail.value
|
|
@@ -414,7 +422,7 @@
|
|
|
this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
|
|
|
id: id,
|
|
|
}).then(res => {
|
|
|
- this.binNumber=res.data.data
|
|
|
+ this.binNumber = res.data.data
|
|
|
var arr = []
|
|
|
for (var i = 0; i < res.data.data.warehousePositionInfoList.length; i++) {
|
|
|
// console.log(res.data.data.warehousePositionInfoList[i])
|
|
@@ -429,8 +437,8 @@
|
|
|
this.WarehouseInOutInfo.binNumberKey = this.warehouseIndex1
|
|
|
this.WarehouseInOutInfo.binNumber = this.warehouse1[this.warehouseIndex1]
|
|
|
for (var i = 0; i < this.binNumber.length; i++) {
|
|
|
- if(this.binNumber[i].binNumber==this.warehouse1[this.warehouseIndex1]){
|
|
|
- this.WarehouseInOutInfo.baseId=this.binNumber[i].baseId
|
|
|
+ if (this.binNumber[i].binNumber == this.warehouse1[this.warehouseIndex1]) {
|
|
|
+ this.WarehouseInOutInfo.baseId = this.binNumber[i].baseId
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -503,12 +511,13 @@
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
- if(this.list.bulkDensity&&this.list.bulkDensity<500||this.list.bulkDensity&&this.list.bulkDensity>1000){
|
|
|
+ if (this.list.bulkDensity && this.list.bulkDensity < 500 || this.list.bulkDensity && this.list
|
|
|
+ .bulkDensity > 1000) {
|
|
|
this.$api.msg('容重输入错误')
|
|
|
return
|
|
|
}
|
|
|
- if(this.list.bulkDensity&&this.list.bulkDensity.indexOf('.')!=-1){
|
|
|
- if(this.list.bulkDensity.split('.')[1].length>2){
|
|
|
+ if (this.list.bulkDensity && this.list.bulkDensity.indexOf('.') != -1) {
|
|
|
+ if (this.list.bulkDensity.split('.')[1].length > 2) {
|
|
|
this.$api.msg('容重输入错误')
|
|
|
return
|
|
|
}
|
|
@@ -564,6 +573,9 @@
|
|
|
if (this.imgUrls.length > 0) {
|
|
|
this.WarehouseInOutInfo.addressUrl = this.imgUrls[0]
|
|
|
}
|
|
|
+ console.log(this.WarehouseInOutInfo)
|
|
|
+ return
|
|
|
+
|
|
|
this.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse', this.WarehouseInOutInfo).then(res => {
|
|
|
if (res.data.code == 200) {
|
|
|
uni.showToast({
|
|
@@ -659,12 +671,13 @@
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
- if(this.list.bulkDensity&&this.list.bulkDensity<500||this.list.bulkDensity&&this.list.bulkDensity>1000){
|
|
|
+ if (this.list.bulkDensity && this.list.bulkDensity < 500 || this.list.bulkDensity && this.list
|
|
|
+ .bulkDensity > 1000) {
|
|
|
this.$api.msg('容重输入错误')
|
|
|
return
|
|
|
}
|
|
|
- if(this.list.bulkDensity&&this.list.bulkDensity.indexOf('.')!=-1){
|
|
|
- if(this.list.bulkDensity.split('.')[1].length>2){
|
|
|
+ if (this.list.bulkDensity && this.list.bulkDensity.indexOf('.') != -1) {
|
|
|
+ if (this.list.bulkDensity.split('.')[1].length > 2) {
|
|
|
this.$api.msg('容重输入错误')
|
|
|
return
|
|
|
}
|
|
@@ -718,8 +731,8 @@
|
|
|
this.WarehouseInOutInfo.warehouseInOutDetail = this.list
|
|
|
this.WarehouseInOutInfo.statusFlag = 3
|
|
|
this.WarehouseInOutInfo.pcFlag = 0
|
|
|
- for(let i = 0 ;i < this.warehouselist.length ; i++){
|
|
|
- if(this.warehouselist[i].warehouseName == this.WarehouseInOutInfo.warehouseName){
|
|
|
+ for (let i = 0; i < this.warehouselist.length; i++) {
|
|
|
+ if (this.warehouselist[i].warehouseName == this.WarehouseInOutInfo.warehouseName) {
|
|
|
this.WarehouseInOutInfo.baseId = this.warehouselist[i].id
|
|
|
}
|
|
|
}
|
|
@@ -727,7 +740,7 @@
|
|
|
uni.showLoading({
|
|
|
title: "正在提交"
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
this.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse', this.WarehouseInOutInfo).then(res => {
|
|
|
if (res.data.code == 200) {
|
|
|
uni.showToast({
|