|
@@ -97,7 +97,7 @@
|
|
|
<text class="tit">出库日期</text>
|
|
|
|
|
|
<view class="con-list" @click="show = true">
|
|
|
- {{WarehouseInOutInfo.inOutDate!='' || WarehouseInOutInfo.inOutDate != null ? WarehouseInOutInfo.inOutDate : time1}}
|
|
|
+ {{ WarehouseInOutInfo.inOutDate != null ? WarehouseInOutInfo.inOutDate : time1}}
|
|
|
</view>
|
|
|
<u-picker :params='params' :default-time='time1' @confirm="DateChange" v-model="show" mode="time">
|
|
|
</u-picker>
|
|
@@ -290,9 +290,19 @@
|
|
|
return new Date()
|
|
|
}
|
|
|
},
|
|
|
- onShow() {
|
|
|
+ onLoad(option) {
|
|
|
+ this.WarehouseInOutInfo.contractNo = option.contractNo
|
|
|
+ this.WarehouseInOutInfo.goodsName = option.goodsName
|
|
|
+ this.WarehouseInOutInfo.consignee = option.consignee
|
|
|
+ this.WarehouseInOutInfo.boxNo = option.boxNo
|
|
|
+ this.WarehouseInOutInfo.tranCarNo = option.tranCarNo
|
|
|
+ this.WarehouseInOutInfo.titleNo = option.titleNo
|
|
|
+ this.WarehouseInOutInfo.id = option.id
|
|
|
+ this.WarehouseInOutInfo.carNo = option.carNo
|
|
|
+ this.WarehouseInOutInfo.warehouseName = option.warehouseName
|
|
|
this.getList(this.WarehouseInOutInfo.id)
|
|
|
- console.log( this.WarehouseInOutInfo)
|
|
|
+ },
|
|
|
+ onShow() {
|
|
|
this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouse', {
|
|
|
compId: '2710b21efc1e4393930c5dc800010dc4',
|
|
|
warehouseType: 1,
|
|
@@ -302,7 +312,6 @@
|
|
|
for (var i = 0; i < res.data.data.length; i++) {
|
|
|
if (res.data.data[i].warehouseName == this.WarehouseInOutInfo.warehouseName) {
|
|
|
this.warehouseIndex = i
|
|
|
- console.log(res.data.data,"dsd")
|
|
|
this.ids = res.data.data[i].id
|
|
|
}
|
|
|
arr.push(res.data.data[i].warehouseName)
|
|
@@ -310,7 +319,6 @@
|
|
|
this.warehouselist = res.data.data
|
|
|
this.warehouse = arr
|
|
|
}
|
|
|
-
|
|
|
})
|
|
|
// this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
|
|
|
// id: this.ids,
|
|
@@ -324,63 +332,46 @@
|
|
|
// this.warehouselist11 = res.data.data
|
|
|
// })
|
|
|
},
|
|
|
- onLoad(option) {
|
|
|
- this.WarehouseInOutInfo.contractNo = option.contractNo
|
|
|
- this.WarehouseInOutInfo.goodsName = option.goodsName
|
|
|
- this.WarehouseInOutInfo.consignee = option.consignee
|
|
|
- this.WarehouseInOutInfo.boxNo = option.boxNo
|
|
|
- this.WarehouseInOutInfo.tranCarNo = option.tranCarNo
|
|
|
- this.WarehouseInOutInfo.titleNo = option.titleNo
|
|
|
- this.WarehouseInOutInfo.id = option.id
|
|
|
- this.WarehouseInOutInfo.carNo = option.carNo
|
|
|
- this.WarehouseInOutInfo.warehouseName = option.warehouseName
|
|
|
- // var date = new Date()
|
|
|
- // var year = date.getFullYear()
|
|
|
- // var month = date.getMonth()
|
|
|
- // var date1 = date.getDate()
|
|
|
- // if (month + 1 < 10) {
|
|
|
- // month = "0" + (month + 1)
|
|
|
- // }
|
|
|
- // this.time = year + '-' + month + "-" + date1
|
|
|
- this.getList(this.WarehouseInOutInfo.id)
|
|
|
- },
|
|
|
+
|
|
|
methods: {
|
|
|
getList(id1) {
|
|
|
var that = this
|
|
|
this.$api.doRequest('get', '/warehouseInOutInfo/getInfo', {
|
|
|
id: id1
|
|
|
}).then(res => {
|
|
|
- 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
|
|
|
- }
|
|
|
- }
|
|
|
- // this.warehouse1 = this.warehouseChange3(positionid)
|
|
|
- // console.log(this.warehouse1,"仓库号")
|
|
|
- for (var i = 0; i < this.warehouse1.length; i++) {
|
|
|
- if (this.warehouse1[i] == this.WarehouseInOutInfo.binNumber) {
|
|
|
- this.warehouseIndex1 = i
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
+ 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
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.warehouseChange3(positionid)
|
|
|
+ for (var i = 0; i < this.warehouse1.length; i++) {
|
|
|
+ if (this.warehouse1[i] == this.WarehouseInOutInfo.binNumber) {
|
|
|
+ this.warehouseIndex1 = i
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
})
|
|
|
.catch(res => {
|
|
|
uni.showToast({
|
|
@@ -395,18 +386,22 @@
|
|
|
this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse', {
|
|
|
id: id,
|
|
|
}).then(res => {
|
|
|
- var arr = []
|
|
|
- for (var i = 0; i < res.data.data.warehousePositionInfoList.length; i++) {
|
|
|
-
|
|
|
- arr.push(res.data.data.warehousePositionInfoList[i].binNumber)
|
|
|
- }
|
|
|
- that.warehouse1 = arr
|
|
|
- this.warehouselist11 = res.data.data
|
|
|
+ if(res.data.code == 200 ){
|
|
|
+ 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
|
|
|
},
|
|
|
warehouseChange(e) {
|
|
|
- console.log(e)
|
|
|
var id = ''
|
|
|
this.warehouseIndex = e.detail.value
|
|
|
this.WarehouseInOutInfo.warehouseName = this.warehouse[this.warehouseIndex]
|
|
@@ -420,11 +415,10 @@
|
|
|
}).then(res => {
|
|
|
var arr = []
|
|
|
for (var i = 0; i < res.data.data.warehousePositionInfoList.length; i++) {
|
|
|
- console.log(res.data.data.warehousePositionInfoList[i])
|
|
|
+ // console.log(res.data.data.warehousePositionInfoList[i])
|
|
|
arr.push(res.data.data.warehousePositionInfoList[i].binNumber)
|
|
|
}
|
|
|
this.warehouse1 = arr
|
|
|
- this.warehouselist11 = res.data.data
|
|
|
})
|
|
|
},
|
|
|
warehouseChange1(e) {
|
|
@@ -450,7 +444,6 @@
|
|
|
}
|
|
|
},
|
|
|
getImgUrl(res) {
|
|
|
- console.log(res)
|
|
|
this.imgUrls.push(res);
|
|
|
},
|
|
|
onRemove(index) {
|
|
@@ -565,7 +558,6 @@
|
|
|
if (this.imgUrls.length > 0) {
|
|
|
this.WarehouseInOutInfo.addressUrl = this.imgUrls[0]
|
|
|
}
|
|
|
- console.log(this.WarehouseInOutInfo, "出库暂存对象")
|
|
|
this.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse', this.WarehouseInOutInfo).then(res => {
|
|
|
if (res.data.code == 200) {
|
|
|
uni.showToast({
|
|
@@ -573,6 +565,9 @@
|
|
|
icon: 'none',
|
|
|
duration: 2000
|
|
|
})
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages/task/my_task`,
|
|
|
+ })
|
|
|
|
|
|
// setTimeout(() => {
|
|
|
// uni.navigateBack({})
|
|
@@ -616,8 +611,8 @@
|
|
|
this.$api.msg('毛重输入错误')
|
|
|
return
|
|
|
}
|
|
|
- if (this.WarehouseInOutInfo.grossWeight.indexOf('.') != -1) {
|
|
|
- if (this.WarehouseInOutInfo.grossWeight.split('.')[1].length > 2) {
|
|
|
+ if (this.WarehouseInOutInfo.grossWeight.toString().indexOf('.') != -1) {
|
|
|
+ if (this.WarehouseInOutInfo.grossWeight.toString().split('.')[1].length > 2) {
|
|
|
this.$api.msg('毛重输入错误')
|
|
|
return
|
|
|
}
|
|
@@ -729,9 +724,12 @@
|
|
|
title: '提交成功',
|
|
|
icon: 'none'
|
|
|
})
|
|
|
- setTimeout(() => {
|
|
|
- uni.navigateBack({})
|
|
|
- }, 200)
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages/task/my_task`,
|
|
|
+ })
|
|
|
+ // setTimeout(() => {
|
|
|
+ // uni.navigateBack({})
|
|
|
+ // }, 200)
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: res.data.message,
|