|
@@ -561,6 +561,7 @@ import {
|
|
} from '@/model/warehouse/index'
|
|
} from '@/model/warehouse/index'
|
|
import {
|
|
import {
|
|
gettask,
|
|
gettask,
|
|
|
|
+ getcontract
|
|
} from '@/model/outboundManagement/index'
|
|
} from '@/model/outboundManagement/index'
|
|
import inspectInfoPrint from './component/inspectInfoPrint.vue'
|
|
import inspectInfoPrint from './component/inspectInfoPrint.vue'
|
|
import html2canvas from 'html2canvas'
|
|
import html2canvas from 'html2canvas'
|
|
@@ -714,7 +715,7 @@ export default {
|
|
statusTypetext: '初检',
|
|
statusTypetext: '初检',
|
|
directselling: false,
|
|
directselling: false,
|
|
fleetNameList: [],
|
|
fleetNameList: [],
|
|
- outContractNo: [],
|
|
|
|
|
|
+ outContractNo: {},
|
|
carNumberList: [],
|
|
carNumberList: [],
|
|
warehouseTradeCount: 0,
|
|
warehouseTradeCount: 0,
|
|
warehouseTradeCount1: 0,
|
|
warehouseTradeCount1: 0,
|
|
@@ -938,12 +939,8 @@ export default {
|
|
this.deptBudgetList.contractNo = this.multiSelector1[i].contractNo
|
|
this.deptBudgetList.contractNo = this.multiSelector1[i].contractNo
|
|
|
|
|
|
}
|
|
}
|
|
- for (let q = 0; q < this.outContractNo.length; q++) {
|
|
|
|
- if (this.outContractNo[q].contractNo == this.deptBudgetList.contractNo) {
|
|
|
|
- this.deptBudgetList.goodsName = this.outContractNo[q].goodsName
|
|
|
|
- this.deptBudgetList.goodsNameKey = this.outContractNo[q].goodsNameKey
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ this.deptBudgetList.goodsName = this.outContractNo.goodsName
|
|
|
|
+ this.deptBudgetList.goodsNameKey = this.outContractNo.goodsNameKey
|
|
this.deptBudgetList.outType = '自运'
|
|
this.deptBudgetList.outType = '自运'
|
|
this.goodsdisabled = true
|
|
this.goodsdisabled = true
|
|
this.waterContentChange()
|
|
this.waterContentChange()
|
|
@@ -1408,46 +1405,44 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (!data) return
|
|
if (!data) return
|
|
- for (var i = 0; i < this.outContractNo.length; i++) {
|
|
|
|
- if (
|
|
|
|
- this.outContractNo[i].contractNo == this.deptBudgetList.contractNo
|
|
|
|
- ) {
|
|
|
|
- console.log(this.outContractNo[i])
|
|
|
|
- if (this.outContractNo[i].inOutType == '采购入库') {
|
|
|
|
- if (!this.outContractNo[i].unitContractPrice) {
|
|
|
|
- this.deptBudgetList.tips = '卖方' + this.outContractNo[i].seller
|
|
|
|
|
|
+ getcontract({contractNo:this.deptBudgetList.contractNo,compId:localStorage.getItem('ws-pf_compId')}).toPromise().then((response) => {
|
|
|
|
+ this.outContractNo=response
|
|
|
|
+ console.log(this.outContractNo)
|
|
|
|
+ if (this.outContractNo.inOutType == '采购入库') {
|
|
|
|
+ if (!this.outContractNo.unitContractPrice) {
|
|
|
|
+ this.deptBudgetList.tips = '卖方' + this.outContractNo.seller
|
|
} else {
|
|
} else {
|
|
- this.deptBudgetList.tips = '卖方' + this.outContractNo[i].seller + '( ' + this.outContractNo[i]
|
|
|
|
|
|
+ this.deptBudgetList.tips = '卖方' + this.outContractNo.seller + '( ' + this.outContractNo
|
|
.unitContractPrice + '元/吨)'
|
|
.unitContractPrice + '元/吨)'
|
|
}
|
|
}
|
|
- } else if (this.outContractNo[i].inOutType == '移库入库') {
|
|
|
|
- if (this.outContractNo[i].unitContractPrice) {
|
|
|
|
- this.deptBudgetList.tips = '出货库' + data.sendWarehouse + ' (' + this.outContractNo[i]
|
|
|
|
|
|
+ } else if (this.outContractNo.inOutType == '移库入库') {
|
|
|
|
+ if (this.outContractNo.unitContractPrice) {
|
|
|
|
+ this.deptBudgetList.tips = '出货库' + data.sendWarehouse + ' (' + this.outContractNo
|
|
.unitContractPrice + '元/吨)'
|
|
.unitContractPrice + '元/吨)'
|
|
} else {
|
|
} else {
|
|
this.deptBudgetList.tips = '出货库' + data.sendWarehouse
|
|
this.deptBudgetList.tips = '出货库' + data.sendWarehouse
|
|
}
|
|
}
|
|
- } else if (this.outContractNo[i].inOutType == '移库出库') {
|
|
|
|
|
|
+ } else if (this.outContractNo.inOutType == '移库出库') {
|
|
|
|
|
|
this.deptBudgetList.tips = '入货库' + data.receiveWarehouse
|
|
this.deptBudgetList.tips = '入货库' + data.receiveWarehouse
|
|
- } else if (this.outContractNo[i].inOutType == '退库') {
|
|
|
|
- if (this.outContractNo[i].contractNo) {
|
|
|
|
- this.deptBudgetList.tips = '买方' + this.outContractNo[i].buyer
|
|
|
|
|
|
+ } else if (this.outContractNo.inOutType == '退库') {
|
|
|
|
+ if (this.outContractNo.contractNo) {
|
|
|
|
+ this.deptBudgetList.tips = '买方' + this.outContractNo.buyer
|
|
} else {
|
|
} else {
|
|
this.deptBudgetList.tips = '出货库' + data.sendWarehouse
|
|
this.deptBudgetList.tips = '出货库' + data.sendWarehouse
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- this.deptBudgetList.inOutType = this.outContractNo[i].inOutType
|
|
|
|
- if (this.outContractNo[i].tranCarInfoList) {
|
|
|
|
- this.options2 = this.outContractNo[i].tranCarInfoList
|
|
|
|
- this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
|
|
|
|
|
|
+ this.deptBudgetList.inOutType = this.outContractNo.inOutType
|
|
|
|
+ if (this.outContractNo.tranCarInfoList) {
|
|
|
|
+ this.options2 = this.outContractNo.tranCarInfoList
|
|
|
|
+ this.tranCarInfoList = this.outContractNo.tranCarInfoList
|
|
// this.carstatus = true
|
|
// this.carstatus = true
|
|
} else {
|
|
} else {
|
|
this.options2 = []
|
|
this.options2 = []
|
|
}
|
|
}
|
|
- this.fleetNameList = this.outContractNo[i].tranCarInfoList1
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ this.fleetNameList = this.outContractNo.tranCarInfoList1
|
|
|
|
+
|
|
|
|
+ })
|
|
this.$forceUpdate()
|
|
this.$forceUpdate()
|
|
})
|
|
})
|
|
// if(){
|
|
// if(){
|
|
@@ -3558,47 +3553,43 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (!data) return
|
|
if (!data) return
|
|
- for (var i = 0; i < this.outContractNo.length; i++) {
|
|
|
|
- console.log(this.outContractNo[i].contractNo)
|
|
|
|
- if (
|
|
|
|
- this.outContractNo[i].contractNo == this.deptBudgetList.contractNo
|
|
|
|
- ) {
|
|
|
|
- if(this.outContractNo[i].priceType == "定价收购"){
|
|
|
|
|
|
+ getcontract({contractNo:this.deptBudgetList.contractNo,compId:localStorage.getItem('ws-pf_compId')}).toPromise().then((response) => {
|
|
|
|
+ if(this.outContractNo.priceType == "定价收购"){
|
|
if( this.deptBudgetList.type == "潮粮"){
|
|
if( this.deptBudgetList.type == "潮粮"){
|
|
- this.deptBudgetList.tidalGrainPrice = Number(this.outContractNo[i].unitContractPrice/1000).toFixed(2)
|
|
|
|
|
|
+ this.deptBudgetList.tidalGrainPrice = Number(this.outContractNo.unitContractPrice/1000).toFixed(2)
|
|
}else{
|
|
}else{
|
|
- this.deptBudgetList.dryGrainPrice = Number(this.outContractNo[i].unitContractPrice/1000).toFixed(2)
|
|
|
|
|
|
+ this.deptBudgetList.dryGrainPrice = Number(this.outContractNo.unitContractPrice/1000).toFixed(2)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if(this.serviceManagementType==3){
|
|
if(this.serviceManagementType==3){
|
|
- var arr=this.goodnameList.filter((item)=>{return item.goodsName==this.outContractNo[i].goodsName})
|
|
|
|
|
|
+ var arr=this.goodnameList.filter((item)=>{return item.goodsName==this.outContractNo.goodsName})
|
|
console.log(arr)
|
|
console.log(arr)
|
|
if(arr.length>0){
|
|
if(arr.length>0){
|
|
this.bulkDensityMin=arr[0].bulkDensityMin
|
|
this.bulkDensityMin=arr[0].bulkDensityMin
|
|
- this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
|
|
|
|
- this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
|
|
|
|
|
|
+ this.deptBudgetList.goodsName = this.outContractNo.goodsName
|
|
|
|
+ this.deptBudgetList.goodsNameKey = this.outContractNo.goodsNameKey
|
|
}else{
|
|
}else{
|
|
if(this.deptBudgetList.inOutType!="收购入库"){
|
|
if(this.deptBudgetList.inOutType!="收购入库"){
|
|
this.deptBudgetList.goodsName=''
|
|
this.deptBudgetList.goodsName=''
|
|
this.deptBudgetList.goodsNameKey=''
|
|
this.deptBudgetList.goodsNameKey=''
|
|
this.$message({
|
|
this.$message({
|
|
- message: `当前仓库未设置:`+this.outContractNo[i].goodsName,
|
|
|
|
|
|
+ message: `当前仓库未设置:`+this.outContractNo.goodsName,
|
|
type: 'warning',
|
|
type: 'warning',
|
|
});
|
|
});
|
|
- break;
|
|
|
|
|
|
+ return
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
- this.fireDirectionList=this.outContractNo[i].fireDirectionList
|
|
|
|
- this.shipInfoList=this.outContractNo[i].shipInfoList
|
|
|
|
- this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
|
|
|
|
- this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
|
|
|
|
|
|
+ this.fireDirectionList=this.outContractNo.fireDirectionList
|
|
|
|
+ this.shipInfoList=this.outContractNo.shipInfoList
|
|
|
|
+ this.deptBudgetList.goodsName = this.outContractNo.goodsName
|
|
|
|
+ this.deptBudgetList.goodsNameKey = this.outContractNo.goodsNameKey
|
|
}
|
|
}
|
|
this.goodsNameChange(this.deptBudgetList.goodsName)
|
|
this.goodsNameChange(this.deptBudgetList.goodsName)
|
|
- this.deptBudgetList.grade = this.outContractNo[i].grade
|
|
|
|
- if (this.outContractNo[i].inOutType == '采购入库') {
|
|
|
|
- if(this.outContractNo[i].deliverType==1){
|
|
|
|
- gettask({contractNo:this.outContractNo[i].contractNo,compId:localStorage.getItem('ws-pf_compId')}).toPromise().then((response) => {
|
|
|
|
|
|
+ this.deptBudgetList.grade = this.outContractNo.grade
|
|
|
|
+ if (this.outContractNo.inOutType == '采购入库') {
|
|
|
|
+ if(this.outContractNo.deliverType==1){
|
|
|
|
+ gettask({contractNo:this.outContractNo.contractNo,compId:localStorage.getItem('ws-pf_compId')}).toPromise().then((response) => {
|
|
// console.log(response)
|
|
// console.log(response)
|
|
if(!response){
|
|
if(!response){
|
|
this.$message({
|
|
this.$message({
|
|
@@ -3609,20 +3600,20 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- this.customerName = this.outContractNo[i].buyer
|
|
|
|
- this.customerPhone = this.outContractNo[i].buyerPhone
|
|
|
|
|
|
+ this.customerName = this.outContractNo.buyer
|
|
|
|
+ this.customerPhone = this.outContractNo.buyerPhone
|
|
this.warehouseTradeCount = this.warehouseTradeCount1
|
|
this.warehouseTradeCount = this.warehouseTradeCount1
|
|
this.warehouseTradeCount = '000' + (Number(this.warehouseTradeCount) + 1)
|
|
this.warehouseTradeCount = '000' + (Number(this.warehouseTradeCount) + 1)
|
|
// this.deptBudgetList.qualityNo = 'CGRK' + this.getTime() + this.warehouseNo + this.warehouseTradeCount
|
|
// this.deptBudgetList.qualityNo = 'CGRK' + this.getTime() + this.warehouseNo + this.warehouseTradeCount
|
|
// .substring(this.warehouseTradeCount.length - 4)
|
|
// .substring(this.warehouseTradeCount.length - 4)
|
|
- if (!this.outContractNo[i].unitContractPrice) {
|
|
|
|
- this.deptBudgetList.tips = '卖方' + this.outContractNo[i].seller
|
|
|
|
|
|
+ if (!this.outContractNo.unitContractPrice) {
|
|
|
|
+ this.deptBudgetList.tips = '卖方' + this.outContractNo.seller
|
|
} else {
|
|
} else {
|
|
- this.deptBudgetList.tips = '卖方' + this.outContractNo[i].seller + '( ' + this.outContractNo[i]
|
|
|
|
|
|
+ this.deptBudgetList.tips = '卖方' + this.outContractNo.seller + '( ' + this.outContractNo
|
|
.unitContractPrice + '元/吨)'
|
|
.unitContractPrice + '元/吨)'
|
|
}
|
|
}
|
|
this.deptBudgetList.inOutTypeKey = 1
|
|
this.deptBudgetList.inOutTypeKey = 1
|
|
- } else if (this.outContractNo[i].inOutType == '移库入库') {
|
|
|
|
|
|
+ } else if (this.outContractNo.inOutType == '移库入库') {
|
|
this.customerName = localStorage.getItem('ws-pf_compName')
|
|
this.customerName = localStorage.getItem('ws-pf_compName')
|
|
this.warehouseTradeCount = '000' + (Number(this.warehouseTradeCount) + 1)
|
|
this.warehouseTradeCount = '000' + (Number(this.warehouseTradeCount) + 1)
|
|
// this.deptBudgetList.qualityNo = 'YKRK' + this.getTime() + this.warehouseNo + this.warehouseTradeCount
|
|
// this.deptBudgetList.qualityNo = 'YKRK' + this.getTime() + this.warehouseNo + this.warehouseTradeCount
|
|
@@ -3630,30 +3621,30 @@ export default {
|
|
this.deptBudgetList.goodsName = data.goodsName
|
|
this.deptBudgetList.goodsName = data.goodsName
|
|
this.deptBudgetList.goodsNameKey = data.goodsNameKey
|
|
this.deptBudgetList.goodsNameKey = data.goodsNameKey
|
|
this.deptBudgetList.grade = data.grade
|
|
this.deptBudgetList.grade = data.grade
|
|
- if (this.outContractNo[i].unitContractPrice) {
|
|
|
|
- this.deptBudgetList.tips = '出货库' + data.sendWarehouse + ' (' + this.outContractNo[i].unitContractPrice +
|
|
|
|
|
|
+ if (this.outContractNo.unitContractPrice) {
|
|
|
|
+ this.deptBudgetList.tips = '出货库' + data.sendWarehouse + ' (' + this.outContractNo.unitContractPrice +
|
|
'元/吨)'
|
|
'元/吨)'
|
|
} else {
|
|
} else {
|
|
this.deptBudgetList.tips = '出货库' + data.sendWarehouse
|
|
this.deptBudgetList.tips = '出货库' + data.sendWarehouse
|
|
}
|
|
}
|
|
this.deptBudgetList.inOutTypeKey = 3
|
|
this.deptBudgetList.inOutTypeKey = 3
|
|
- } else if (this.outContractNo[i].inOutType == '移库出库') {
|
|
|
|
|
|
+ } else if (this.outContractNo.inOutType == '移库出库') {
|
|
|
|
|
|
this.deptBudgetList.tips = '入货库' + data.receiveWarehouse
|
|
this.deptBudgetList.tips = '入货库' + data.receiveWarehouse
|
|
- } else if (this.outContractNo[i].inOutType == '暂存入库') {
|
|
|
|
|
|
+ } else if (this.outContractNo.inOutType == '暂存入库') {
|
|
this.deptBudgetList.inOutTypeKey = 4
|
|
this.deptBudgetList.inOutTypeKey = 4
|
|
- } else if (this.outContractNo[i].inOutType == '贸易服务入库') {
|
|
|
|
|
|
+ } else if (this.outContractNo.inOutType == '贸易服务入库') {
|
|
this.deptBudgetList.inOutTypeKey = 5
|
|
this.deptBudgetList.inOutTypeKey = 5
|
|
}
|
|
}
|
|
- else if (this.outContractNo[i].inOutType == '退库') {
|
|
|
|
- if (this.outContractNo[i].contractNo) {
|
|
|
|
- this.deptBudgetList.tips = '买方' + this.outContractNo[i].buyer
|
|
|
|
|
|
+ else if (this.outContractNo.inOutType == '退库') {
|
|
|
|
+ if (this.outContractNo.contractNo) {
|
|
|
|
+ this.deptBudgetList.tips = '买方' + this.outContractNo.buyer
|
|
} else {
|
|
} else {
|
|
this.deptBudgetList.tips = '出货库' + data.sendWarehouse
|
|
this.deptBudgetList.tips = '出货库' + data.sendWarehouse
|
|
}
|
|
}
|
|
this.deptBudgetList.inOutTypeKey = 6
|
|
this.deptBudgetList.inOutTypeKey = 6
|
|
}
|
|
}
|
|
- this.cost = this.outContractNo[i].contractPrice
|
|
|
|
|
|
+ this.cost = this.outContractNo.contractPrice
|
|
if (this.cost) {
|
|
if (this.cost) {
|
|
this.isGetCost = true
|
|
this.isGetCost = true
|
|
this.deptBudgetList.cost = this.cost - this.deptBudgetList.deductionAmount
|
|
this.deptBudgetList.cost = this.cost - this.deptBudgetList.deductionAmount
|
|
@@ -3661,38 +3652,36 @@ export default {
|
|
this.isGetCost = false
|
|
this.isGetCost = false
|
|
this.deptBudgetList.cost = this.deptBudgetList.cost
|
|
this.deptBudgetList.cost = this.deptBudgetList.cost
|
|
}
|
|
}
|
|
- this.deptBudgetList.inOutType = this.outContractNo[i].inOutType
|
|
|
|
- if (this.outContractNo[i].inOutType == '移库入库') {
|
|
|
|
|
|
+ this.deptBudgetList.inOutType = this.outContractNo.inOutType
|
|
|
|
+ if (this.outContractNo.inOutType == '移库入库') {
|
|
this.isSelectType = true
|
|
this.isSelectType = true
|
|
|
|
|
|
} else {
|
|
} else {
|
|
this.isSelectType = true
|
|
this.isSelectType = true
|
|
}
|
|
}
|
|
- // if (this.outContractNo[i].priceType == '随行就市') {
|
|
|
|
|
|
+ // if (this.outContractNo.priceType == '随行就市') {
|
|
// this.disabled1 = !this.disabled1
|
|
// this.disabled1 = !this.disabled1
|
|
// }
|
|
// }
|
|
|
|
|
|
- if (this.outContractNo[i].deliverType == '1') {
|
|
|
|
|
|
+ if (this.outContractNo.deliverType == '1') {
|
|
this.carstatus = true
|
|
this.carstatus = true
|
|
} else {
|
|
} else {
|
|
this.carstatus = false
|
|
this.carstatus = false
|
|
}
|
|
}
|
|
- if (this.outContractNo[i].tranCarInfoList) {
|
|
|
|
- this.options2 = this.outContractNo[i].tranCarInfoList
|
|
|
|
- this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
|
|
|
|
|
|
+ if (this.outContractNo.tranCarInfoList) {
|
|
|
|
+ this.options2 = this.outContractNo.tranCarInfoList
|
|
|
|
+ this.tranCarInfoList = this.outContractNo.tranCarInfoList
|
|
// this.carstatus = true
|
|
// this.carstatus = true
|
|
} else {
|
|
} else {
|
|
this.options2 = []
|
|
this.options2 = []
|
|
this.tranCarInfoList = []
|
|
this.tranCarInfoList = []
|
|
}
|
|
}
|
|
- if(this.outContractNo[i].tranCarInfoList1){
|
|
|
|
- this.fleetNameList = this.outContractNo[i].tranCarInfoList1
|
|
|
|
|
|
+ if(this.outContractNo.tranCarInfoList1){
|
|
|
|
+ this.fleetNameList = this.outContractNo.tranCarInfoList1
|
|
}else{
|
|
}else{
|
|
this.fleetNameList = []
|
|
this.fleetNameList = []
|
|
}
|
|
}
|
|
-
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ })
|
|
},
|
|
},
|
|
selectstorageType() {
|
|
selectstorageType() {
|
|
|
|
|