|
@@ -241,11 +241,12 @@
|
|
|
}
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
- this.detailData = JSON.parse(options.data)
|
|
|
+ this.detailData =JSON.parse(options.data)
|
|
|
this.netWeight = this.detailData.netWeight
|
|
|
this.binNumber = this.detailData.binNumber
|
|
|
this.warehouseName = this.detailData.warehouseName
|
|
|
this.compId = helper.erpWarehouse.compId
|
|
|
+ console.log(this.detailData.addressUrl)
|
|
|
if(this.detailData.addressUrl){
|
|
|
this.imgUrl.push({
|
|
|
url: this.detailData.addressUrl.split(",")[0]
|
|
@@ -256,28 +257,26 @@
|
|
|
...mapState(['hasLogin', 'userInfo']),
|
|
|
},
|
|
|
onShow() {
|
|
|
+ this.getContractNoList();
|
|
|
if (this.detailData.inOutType == '采购入库'&&this.detailData.status!='已暂存') {
|
|
|
this.detailData.freight = 0
|
|
|
}
|
|
|
- if (!this.detailData.tranCarInfoList) this.detailData.tranCarInfoList = []
|
|
|
- if (!this.detailData.contractNo) {
|
|
|
- this.detailData.contractNo = '请选择合同编号'
|
|
|
- } else {
|
|
|
- if (this.detailData.tranCarInfoList.length == 0) {
|
|
|
- this.isPC = false
|
|
|
- }
|
|
|
+ // if (!this.detailData.tranCarInfoList) this.detailData.tranCarInfoList = []
|
|
|
+ // if (!this.detailData.contractNo) {
|
|
|
+ // this.detailData.contractNo = '请选择合同编号'
|
|
|
+ // } else {
|
|
|
+ // if (this.detailData.tranCarInfoList.length == 0) {
|
|
|
+ // this.isPC = false
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // if (!this.detailData.goodsName) {
|
|
|
+ // this.detailData.goodsName = '货名'
|
|
|
+ // }
|
|
|
+ let _data = uni.getStorageSync('erpContractNo')
|
|
|
+ if(_data){
|
|
|
+ this.detailData.contractNo = _data
|
|
|
}
|
|
|
- if (!this.detailData.goodsName) {
|
|
|
- this.detailData.goodsName = '货名'
|
|
|
- }
|
|
|
- let _data = uni.getStorageSync('erpContractNo')==''?{}:uni.getStorageSync('erpContractNo')
|
|
|
- this.detailData.contractNo = _data.contractNo
|
|
|
- if (!_data.tranCarInfoList){
|
|
|
- this.isPC = false
|
|
|
- this.detailData.carNo = ""
|
|
|
- _data.tranCarInfoList = []
|
|
|
- } else{
|
|
|
- this.isPC = true
|
|
|
+
|
|
|
if(uni.getStorageSync('ContractNoCar')){
|
|
|
this.detailData.carNo = uni.getStorageSync('ContractNoCar')
|
|
|
this.$api.doRequest('get', '/warehouseBaseInfo/selectCost', {
|
|
@@ -289,15 +288,9 @@
|
|
|
}
|
|
|
})
|
|
|
}else{
|
|
|
- this.detailData.carNo = _data.tranCarInfoList[0].carNo
|
|
|
+ // this.detailData.carNo = uni.setStorageSync('erpContractNoList')[0].carNo
|
|
|
}
|
|
|
- }
|
|
|
- if(this.detailData.carNo){
|
|
|
- for(let i = 0 ; i < uni.getStorageSync('erpContractNo').tranCarInfoList.length ;i++){
|
|
|
- if(uni.getStorageSync('erpContractNo').tranCarInfoList[i].carNo == this.detailData.carNo)
|
|
|
- this.detailData.tranCarNo = uni.getStorageSync('erpContractNo').tranCarInfoList[i].tranCarNo
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
// 获取入库类型
|
|
|
this.getrkType()
|
|
|
//获取经办人
|
|
@@ -309,6 +302,41 @@
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ getContractNoList() {
|
|
|
+ this.imgUrl = []
|
|
|
+ this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList', {
|
|
|
+ compId: this.compId,
|
|
|
+ flag: 7,
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.code == 200) {debugger
|
|
|
+ console.log(res.data.data)
|
|
|
+ console.log(this.id)
|
|
|
+ for (let i = 0; i < res.data.data.length; i++) {
|
|
|
+ console.log(this.contractNo)
|
|
|
+ if (res.data.data[i].contractNo == this.detailData.contractNo) {
|
|
|
+ if (res.data.data[i].tranCarInfoList) {
|
|
|
+ this.isPC = true
|
|
|
+ uni.setStorageSync('erpContractNoCarList', res.data.data[i].tranCarInfoList);
|
|
|
+
|
|
|
+ if(this.detailData.carNo){debugger
|
|
|
+ console.log(uni.getStorageSync('erpContractNoCarList'))
|
|
|
+ for(let i = 0 ; i < uni.getStorageSync('erpContractNoCarList').length;i++){
|
|
|
+ console.log(uni.getStorageSync('erpContractNoCarList'))
|
|
|
+ if(uni.getStorageSync('erpContractNoCarList')[i].carNo == this.detailData.carNo)
|
|
|
+ this.detailData.tranCarNo = uni.getStorageSync('erpContractNoCarList')[i].tranCarNo
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // uni.setStorageSync('erpContractNoList', res.data.data[i].tranCarInfoList);
|
|
|
+ // this.detailData.tranCarInfoList = res.data.data[i].tranCarInfoList
|
|
|
+ } else {
|
|
|
+ this.isPC = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
//计算纯重
|
|
|
pureWeightCount() {
|
|
|
if (this.netWeight && this.detailData.buckleWeightRatio && this.detailData.solidGrainWater && this
|