|
@@ -966,25 +966,8 @@ export default {
|
|
|
this.deptBudgetList.customerPhone = customers[1].split(')')[0]
|
|
|
},
|
|
|
waterContentChange(type) {
|
|
|
- if (this.deptBudgetList.goodsName && type != 'water') {
|
|
|
- if (this.deptBudgetList.goodsName.indexOf('潮粮') != -1) {
|
|
|
- this.deptBudgetList.type = '潮粮'
|
|
|
- } else {
|
|
|
- this.deptBudgetList.type = '干粮'
|
|
|
- }
|
|
|
- if (!this.deptBudgetList.dryGrainPrice || this.deptBudgetList.dryGrainPrice == 0) {
|
|
|
- getDryGrainPrice({
|
|
|
- warehouseId: this.cangid,
|
|
|
- goodsName: this.deptBudgetList.goodsName
|
|
|
- })
|
|
|
- .toPromise()
|
|
|
- .then((response) => {
|
|
|
- this.$set(this.deptBudgetList, 'dryGrainPrice', response)
|
|
|
- })
|
|
|
- }
|
|
|
- // debugger
|
|
|
- //客户
|
|
|
- if(this.serviceManagementType==3){
|
|
|
+ //客户
|
|
|
+ if(this.serviceManagementType==3){
|
|
|
getcustomer({
|
|
|
warehouseId: this.cangid,
|
|
|
goodsName: this.deptBudgetList.goodsName
|
|
@@ -1008,7 +991,26 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
+ if(this.deptBudgetList.inOutType=="收购入库"){ //收购入库 价格取至合同
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.deptBudgetList.goodsName && type != 'water') {
|
|
|
+ if (this.deptBudgetList.goodsName.indexOf('潮粮') != -1) {
|
|
|
+ this.deptBudgetList.type = '潮粮'
|
|
|
+ } else {
|
|
|
+ this.deptBudgetList.type = '干粮'
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.dryGrainPrice || this.deptBudgetList.dryGrainPrice == 0) {
|
|
|
+ getDryGrainPrice({
|
|
|
+ warehouseId: this.cangid,
|
|
|
+ goodsName: this.deptBudgetList.goodsName
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.$set(this.deptBudgetList, 'dryGrainPrice', response)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // debugger
|
|
|
for (var i = 0; i < this.purchasePriceList.length; i++) {
|
|
|
if (this.purchasePriceList[i].goodsName == this.deptBudgetList.goodsName) {
|
|
|
this.$set(this.deptBudgetList, 'buckleWeightRatio', this.purchasePriceList[i].deductWeight)
|
|
@@ -1070,6 +1072,9 @@ export default {
|
|
|
|
|
|
}
|
|
|
});
|
|
|
+ }else{
|
|
|
+ if(this.deptBudgetList.inOutType=="收购入库"){ //收购入库 价格取至合同
|
|
|
+ return
|
|
|
}else{
|
|
|
getinspectLookUnitPrice({
|
|
|
warehouseId: this.cangid,
|
|
@@ -1081,11 +1086,9 @@ export default {
|
|
|
if(response){
|
|
|
this.deptBudgetList.dryGrainPrice = response
|
|
|
}
|
|
|
-
|
|
|
})
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
},
|
|
|
opendBtn() {
|
|
|
html2canvas(this.$refs.saveImg.$el).then(canvas => {
|
|
@@ -1324,7 +1327,6 @@ export default {
|
|
|
})
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
- // debugger
|
|
|
console.log(response)
|
|
|
this.deptBudgetList = response
|
|
|
if (this.statusTypetext == '复检') {
|
|
@@ -3328,6 +3330,15 @@ export default {
|
|
|
var data = this.taskNolist[i]
|
|
|
if (this.taskNolist[i].inOutType == '移库入库') {
|
|
|
this.deptBudgetList.contractNo = this.taskNolist[i].moveTaskNo
|
|
|
+ }else if(this.taskNolist[i].inOutType == '收购入库'){
|
|
|
+ this.deptBudgetList.contractNo = this.taskNolist[i].contractNo
|
|
|
+ this.deptBudgetList.inOutType == this.taskNolist[i].inOutType
|
|
|
+ this.deptBudgetList.goodsName = this.taskNolist[i].goodsName
|
|
|
+ if(this.taskNolist[i].goodsName.indexOf("潮粮") != -1){ //收购从合同中带出货名 单价等信息 用货名是否带有潮粮字符来判断干潮类型
|
|
|
+ this.deptBudgetList.type = "潮粮"
|
|
|
+ }else{
|
|
|
+ this.deptBudgetList.type = "干粮"
|
|
|
+ }
|
|
|
} else {
|
|
|
if (this.taskNolist[i].contractNo) {
|
|
|
// console.log(this.taskNolist[i])
|
|
@@ -3344,7 +3355,9 @@ export default {
|
|
|
if (
|
|
|
this.outContractNo[i].contractNo == this.deptBudgetList.contractNo
|
|
|
) {
|
|
|
- console.log(this.outContractNo[i])
|
|
|
+ if(this.outContractNo[i].priceType == "定价收购"){
|
|
|
+ this.deptBudgetList.dryGrainPrice = Number(this.outContractNo[i].unitContractPrice/1000).toFixed(2)
|
|
|
+ }
|
|
|
if(this.serviceManagementType==3){
|
|
|
var arr=this.goodnameList.filter((item)=>{return item.goodsName==this.outContractNo[i].goodsName})
|
|
|
console.log(arr)
|
|
@@ -3353,13 +3366,15 @@ export default {
|
|
|
this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
|
|
|
this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
|
|
|
}else{
|
|
|
- this.deptBudgetList.goodsName=''
|
|
|
- this.deptBudgetList.goodsNameKey=''
|
|
|
- this.$message({
|
|
|
- message: `当前仓库未设置:`+this.outContractNo[i].goodsName,
|
|
|
- type: 'warning',
|
|
|
- });
|
|
|
- break;
|
|
|
+ if(this.deptBudgetList.inOutType!="收购入库"){
|
|
|
+ this.deptBudgetList.goodsName=''
|
|
|
+ this.deptBudgetList.goodsNameKey=''
|
|
|
+ this.$message({
|
|
|
+ message: `当前仓库未设置:`+this.outContractNo[i].goodsName,
|
|
|
+ type: 'warning',
|
|
|
+ });
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
}else{
|
|
|
this.shipInfoList=this.outContractNo[i].shipInfoList
|