|
@@ -843,6 +843,7 @@
|
|
|
this.$api.doRequest('get', '/inOutWarehouseTask/getContractNo', {
|
|
|
warehouseName: this.gridList.warehouseName
|
|
|
}).then(res => {
|
|
|
+ uni.hideLoading();
|
|
|
// console.log(res)
|
|
|
if (res.data.data.contractManagementInfoList) {
|
|
|
for (let i = 0; i < res.data.data.contractManagementInfoList.length; i++) {
|
|
@@ -859,16 +860,16 @@
|
|
|
}
|
|
|
// this.taskNolist=res.data.data
|
|
|
})
|
|
|
- this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList', {
|
|
|
- flag: this.contractFlag,
|
|
|
+ // this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList', {
|
|
|
+ // flag: this.contractFlag,
|
|
|
|
|
|
- }).then(res => {
|
|
|
- if (res.data.data) {
|
|
|
- console.log(res.data.data)
|
|
|
- uni.hideLoading();
|
|
|
- }
|
|
|
- this.contractNolist = res.data.data
|
|
|
- })
|
|
|
+ // }).then(res => {
|
|
|
+ // if (res.data.data) {
|
|
|
+ // console.log(res.data.data)
|
|
|
+ //
|
|
|
+ // }
|
|
|
+ // this.contractNolist = res.data.data
|
|
|
+ // })
|
|
|
|
|
|
if (uni.getStorageSync('checkcustomer')) {
|
|
|
|
|
@@ -1060,21 +1061,22 @@
|
|
|
} else {
|
|
|
this.gridList.contractNo = this.taskNolist[e[0]].moveTaskNo
|
|
|
}
|
|
|
- for (let i = 0; i < this.contractNolist.length; i++) {
|
|
|
-
|
|
|
- if (this.gridList.contractNo == this.contractNolist[i].contractNo) {
|
|
|
+ this.$api.doRequest('get', '/contractManagementInfo/getInContract', {
|
|
|
+ contractNo:this.gridList.contractNo,compId:'2710b21efc1e4393930c5dc800010dc4'
|
|
|
+ }).then(res => {
|
|
|
+ this.contractNolist=res
|
|
|
if (this.typevalue == 3) {
|
|
|
var gooddata = this.goodsList.filter((item) => {
|
|
|
- return item.goodsName == this.contractNolist[i].goodsName
|
|
|
+ return item.goodsName == this.contractNolist.goodsName
|
|
|
})
|
|
|
- if(this.contractNolist[i].priceType == "定价收购" && this.inType == "收购入库"){
|
|
|
- this.gridList.dryGrainPrice = Number(this.contractNolist[i].unitContractPrice/1000).toFixed(2)
|
|
|
+ if(this.contractNolist.priceType == "定价收购" && this.inType == "收购入库"){
|
|
|
+ this.gridList.dryGrainPrice = Number(this.contractNolist.unitContractPrice/1000).toFixed(2)
|
|
|
}
|
|
|
if (gooddata.length > 0) {
|
|
|
// 收购入库
|
|
|
for (let q = 0; q < this.goodsList.length; q++) {
|
|
|
- if (this.goodsList[q].goodsName == this.contractNolist[i].goodsName) {
|
|
|
- this.gridList.goodsName = this.contractNolist[i].goodsName
|
|
|
+ if (this.goodsList[q].goodsName == this.contractNolist.goodsName) {
|
|
|
+ this.gridList.goodsName = this.contractNolist.goodsName
|
|
|
this.setGoodName([q])
|
|
|
}
|
|
|
}
|
|
@@ -1097,38 +1099,38 @@
|
|
|
|
|
|
}
|
|
|
} else {
|
|
|
- this.gridList.goodsName = this.contractNolist[i].goodsName
|
|
|
+ this.gridList.goodsName = this.contractNolist.goodsName
|
|
|
if (this.gridList.goodsName == '玉米') {
|
|
|
this.gridList.type = '干粮'
|
|
|
- if (this.contractNolist[i].priceType != '随行就市') {
|
|
|
- this.gridList.dryGrainPrice = this.contractNolist[i].contractPrice
|
|
|
+ if (this.contractNolist.priceType != '随行就市') {
|
|
|
+ this.gridList.dryGrainPrice = this.contractNolist.contractPrice
|
|
|
}
|
|
|
this.edit = true
|
|
|
} else if (this.gridList.goodsName == '玉米(潮粮)') {
|
|
|
this.gridList.type = '潮粮'
|
|
|
this.edit = true
|
|
|
- if (this.contractNolist[i].priceType != '随行就市') {
|
|
|
- this.gridList.tidalGrainPrice = this.contractNolist[i].contractPrice
|
|
|
+ if (this.contractNolist.priceType != '随行就市') {
|
|
|
+ this.gridList.tidalGrainPrice = this.contractNolist.contractPrice
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
this.gridList.type = '干粮'
|
|
|
this.edit = false
|
|
|
- if (this.contractNolist[i].priceType != '随行就市') {
|
|
|
- this.gridList.dryGrainPrice = this.contractNolist[i].contractPrice
|
|
|
+ if (this.contractNolist.priceType != '随行就市') {
|
|
|
+ this.gridList.dryGrainPrice = this.contractNolist.contractPrice
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- this.gridList.goodsNameKey = this.contractNolist[i].goodsNameKey
|
|
|
- this.gridList.grade = this.contractNolist[i].grade
|
|
|
- this.gridList.inOutType = this.contractNolist[i].inOutType
|
|
|
+ this.gridList.goodsNameKey = this.contractNolist.goodsNameKey
|
|
|
+ this.gridList.grade = this.contractNolist.grade
|
|
|
+ this.gridList.inOutType = this.contractNolist.inOutType
|
|
|
if (this.gridList.inOutType == '采购入库') {
|
|
|
this.warehouseTradeCount = '000' + this.warehouseTradeCount
|
|
|
// this.gridList.qualityNo='CGRK'+this.getdate()+this.commonWarehouseNo+this.warehouseTradeCount.substring(this.warehouseTradeCount.length - 4)
|
|
|
- if (!this.contractNolist[i].unitContractPrice) {
|
|
|
- this.gridList.tips = '卖方' + this.contractNolist[i].seller
|
|
|
+ if (!this.contractNolist.unitContractPrice) {
|
|
|
+ this.gridList.tips = '卖方' + this.contractNolist.seller
|
|
|
} else {
|
|
|
- this.gridList.tips = '卖方' + this.contractNolist[i].seller + '( ' + this.contractNolist[i]
|
|
|
+ this.gridList.tips = '卖方' + this.contractNolist.seller + '( ' + this.contractNolist[i]
|
|
|
.unitContractPrice + '元/吨)'
|
|
|
}
|
|
|
|
|
@@ -1136,32 +1138,32 @@
|
|
|
} else if (this.gridList.inOutType == '移库入库') {
|
|
|
this.warehouseTradeCount = '000' + this.warehouseTradeCount
|
|
|
// this.gridList.qualityNo='YKRK'+this.getdate()+this.commonWarehouseNo+this.warehouseTradeCount.substring(this.warehouseTradeCount.length - 4)
|
|
|
- if (this.contractNolist[i].unitContractPrice) {
|
|
|
- this.gridList.tips = '出货库' + data.sendWarehouse + ' (' + this.contractNolist[i]
|
|
|
+ if (this.contractNolist.unitContractPrice) {
|
|
|
+ this.gridList.tips = '出货库' + data.sendWarehouse + ' (' + this.contractNolist
|
|
|
.unitContractPrice + '元/吨)'
|
|
|
} else {
|
|
|
this.gridList.tips = '出货库' + data.sendWarehouse
|
|
|
}
|
|
|
this.gridList.inOutTypeKey = 3
|
|
|
- } else if (this.contractNolist[i].inOutType == '移库出库') {
|
|
|
+ } else if (this.contractNolist.inOutType == '移库出库') {
|
|
|
this.gridList.tips = '入货库' + data.receiveWarehouse
|
|
|
- } else if (this.contractNolist[i].inOutType == '暂存入库') {
|
|
|
+ } else if (this.contractNolist.inOutType == '暂存入库') {
|
|
|
this.gridList.inOutTypeKey = 4
|
|
|
- } else if (this.contractNolist[i].inOutType == '贸易服务入库') {
|
|
|
+ } else if (this.contractNolist.inOutType == '贸易服务入库') {
|
|
|
this.gridList.inOutTypeKey = 5
|
|
|
- } else if (this.contractNolist[i].inOutType == '退库') {
|
|
|
+ } else if (this.contractNolist.inOutType == '退库') {
|
|
|
|
|
|
this.warehouseTradeCount = '000' + this.warehouseTradeCount
|
|
|
// this.gridList.qualityNo = 'CGRK' + this.getdate() + this.commonWarehouseNo + this
|
|
|
// .warehouseTradeCount.substring(this.warehouseTradeCount.length - 4)
|
|
|
- if (this.contractNolist[i].contractNo) {
|
|
|
- this.gridList.tips = '买方' + this.contractNolist[i].buyer
|
|
|
+ if (this.contractNolist.contractNo) {
|
|
|
+ this.gridList.tips = '买方' + this.contractNolist.buyer
|
|
|
} else {
|
|
|
this.gridList.tips = '出货库' + data.sendWarehouse
|
|
|
}
|
|
|
this.gridList.inOutTypeKey = 6
|
|
|
}
|
|
|
- this.cost = this.contractNolist[i].contractPrice
|
|
|
+ this.cost = this.contractNolist.contractPrice
|
|
|
if (this.cost) {
|
|
|
this.isGetCost = true
|
|
|
this.gridList.cost = this.cost - this.gridList.deductionAmount
|
|
@@ -1169,40 +1171,38 @@
|
|
|
this.isGetCost = false
|
|
|
this.gridList.cost = this.gridList.cost
|
|
|
}
|
|
|
- if (this.contractNolist[i].inOutType == '移库入库') {
|
|
|
+ if (this.contractNolist.inOutType == '移库入库') {
|
|
|
this.isSelectType = false
|
|
|
} else {
|
|
|
this.isSelectType = true
|
|
|
}
|
|
|
- if (this.contractNolist[i].priceType == '随行就市') {
|
|
|
+ if (this.contractNolist.priceType == '随行就市') {
|
|
|
this.disabled1 = true
|
|
|
} else {
|
|
|
this.disabled1 = false
|
|
|
}
|
|
|
- if (this.contractNolist[i].deliverType == '1') {
|
|
|
+ if (this.contractNolist.deliverType == '1') {
|
|
|
this.carstatus = true
|
|
|
} else {
|
|
|
this.carstatus = false
|
|
|
}
|
|
|
this.tranCarInfoList = []
|
|
|
- if (this.contractNolist[i].tranCarInfoList) {
|
|
|
- for (var q = 0; q < this.contractNolist[i].tranCarInfoList.length; q++) {
|
|
|
- this.contractNolist[i].tranCarInfoList[q].carNo1 = this.contractNolist[i].tranCarInfoList[q].carNo
|
|
|
- if(this.contractNolist[i].tranCarInfoList[q].tranCarNo){
|
|
|
- this.contractNolist[i].tranCarInfoList[q].carNo1=this.contractNolist[i].tranCarInfoList[q].carNo+'('+this.contractNolist[i].tranCarInfoList[q].tranCarNo+')'
|
|
|
+ if (this.contractNolist.tranCarInfoList) {
|
|
|
+ for (var q = 0; q < this.contractNolist.tranCarInfoList.length; q++) {
|
|
|
+ this.contractNolist.tranCarInfoList[q].carNo1 = this.contractNolist.tranCarInfoList[q].carNo
|
|
|
+ if(this.contractNolist.tranCarInfoList[q].tranCarNo){
|
|
|
+ this.contractNolist.tranCarInfoList[q].carNo1=this.contractNolist.tranCarInfoList[q].carNo+'('+this.contractNolist.tranCarInfoList[q].tranCarNo+')'
|
|
|
}else{
|
|
|
- this.contractNolist[i].tranCarInfoList[q].carNo1=this.contractNolist[i].tranCarInfoList.carNo
|
|
|
+ this.contractNolist.tranCarInfoList[q].carNo1=this.contractNolist.tranCarInfoList.carNo
|
|
|
}
|
|
|
}
|
|
|
- this.tranCarInfoList = this.contractNolist[i].tranCarInfoList
|
|
|
+ this.tranCarInfoList = this.contractNolist.tranCarInfoList
|
|
|
// this.carstatus = true
|
|
|
} else {
|
|
|
this.tranCarInfoList = []
|
|
|
}
|
|
|
- this.fleetNameList = this.contractNolist[i].tranCarInfoList1
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
+ this.fleetNameList = this.contractNolist.tranCarInfoList1
|
|
|
+ })
|
|
|
this.$forceUpdate()
|
|
|
console.log(this.gridList)
|
|
|
},
|