|
@@ -35,6 +35,8 @@
|
|
</ws-button>
|
|
</ws-button>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col style='text-align:right;' :span="12">
|
|
<el-col style='text-align:right;' :span="12">
|
|
|
|
+ <ws-button type="primary" @click="distribution()" >预付款分配</ws-button>
|
|
|
|
+ <ws-button type="primary" @click="marginAllocation()">保证金分配</ws-button>
|
|
<!-- <el-button type="primary" @click="warehousingorder()" v-hasPermission="
|
|
<!-- <el-button type="primary" @click="warehousingorder()" v-hasPermission="
|
|
`warehouseManagement.warehouse.warehouseInfoTask.add`
|
|
`warehouseManagement.warehouse.warehouseInfoTask.add`
|
|
">出单
|
|
">出单
|
|
@@ -46,8 +48,8 @@
|
|
<div>{{item.issuingTime}}</div>
|
|
<div>{{item.issuingTime}}</div>
|
|
<div>{{item.warehouseName}}入库单<span v-if='item.warehouseType==2'>(临)</span></div>
|
|
<div>{{item.warehouseName}}入库单<span v-if='item.warehouseType==2'>(临)</span></div>
|
|
<div>
|
|
<div>
|
|
- <ws-button type="primary" @click="distribution(item)" >预付款分配</ws-button>
|
|
|
|
- <ws-button type="primary" @click="marginAllocation(item)">保证金分配</ws-button>
|
|
|
|
|
|
+ <!-- <ws-button type="primary" @click="distribution(item)" >预付款分配</ws-button>
|
|
|
|
+ <ws-button type="primary" @click="marginAllocation(item)">保证金分配</ws-button> -->
|
|
<ws-button v-if='item.payshow' type="primary" @click="payout(item)" v-hasPermission="
|
|
<ws-button v-if='item.payshow' type="primary" @click="payout(item)" v-hasPermission="
|
|
`warehouseManagement.warehousingOrder.appl`
|
|
`warehouseManagement.warehousingOrder.appl`
|
|
">请款
|
|
">请款
|
|
@@ -582,9 +584,28 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
|
|
|
|
|
|
|
|
|
|
},
|
|
},
|
|
- marginAllocation(item){
|
|
|
|
|
|
+ marginAllocation(){
|
|
let _this= this
|
|
let _this= this
|
|
- var arr1=this.multipleSelection1[item.id]
|
|
|
|
|
|
+ var arr=[]
|
|
|
|
+ var currectData=[]
|
|
|
|
+ for (const key in this.multipleSelection1) {
|
|
|
|
+ var array=this.multipleSelection1[key]
|
|
|
|
+ for (let i = 0; i < array.length; i++) {
|
|
|
|
+ arr.push(array[i])
|
|
|
|
+ }
|
|
|
|
+ if(array.length>0){
|
|
|
|
+ currectData=array
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(arr.length>1){
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '一次只能分配一条入库记录',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ });
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ // console.log(currectData)
|
|
|
|
+ var arr1=currectData
|
|
for (let i = 0; i < arr1.length; i++) {
|
|
for (let i = 0; i < arr1.length; i++) {
|
|
if(arr1[i].amountNotPayable<0){
|
|
if(arr1[i].amountNotPayable<0){
|
|
this.$message({
|
|
this.$message({
|
|
@@ -616,12 +637,32 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
|
|
return
|
|
return
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- this.currectdata=item
|
|
|
|
|
|
+ this.currectdata=currectData
|
|
this.marginshow=true
|
|
this.marginshow=true
|
|
},
|
|
},
|
|
- distribution(item){
|
|
|
|
|
|
+ distribution(){
|
|
let _this= this
|
|
let _this= this
|
|
- var arr1=this.multipleSelection1[item.id]
|
|
|
|
|
|
+ console.log(this.multipleSelection1)
|
|
|
|
+ var arr=[]
|
|
|
|
+ var currectData=[]
|
|
|
|
+ for (const key in this.multipleSelection1) {
|
|
|
|
+ var array=this.multipleSelection1[key]
|
|
|
|
+ for (let i = 0; i < array.length; i++) {
|
|
|
|
+ arr.push(array[i])
|
|
|
|
+ }
|
|
|
|
+ if(array.length>0){
|
|
|
|
+ currectData=array
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(arr.length>1){
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '一次只能分配一条入库记录',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ });
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ // console.log(currectData)
|
|
|
|
+ var arr1=currectData
|
|
for (let i = 0; i < arr1.length; i++) {
|
|
for (let i = 0; i < arr1.length; i++) {
|
|
if(arr1[i].amountNotPayable<0){
|
|
if(arr1[i].amountNotPayable<0){
|
|
this.$message({
|
|
this.$message({
|
|
@@ -653,7 +694,8 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
|
|
return
|
|
return
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- this.currectdata=item
|
|
|
|
|
|
+ // this.currectdata=item
|
|
|
|
+ this.currectdata=arr1
|
|
|
|
|
|
this.distributionshow=true
|
|
this.distributionshow=true
|
|
|
|
|
|
@@ -820,7 +862,7 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
|
|
})
|
|
})
|
|
},
|
|
},
|
|
marginsubmit(item){
|
|
marginsubmit(item){
|
|
- var arr2=this.multipleSelection1[this.currectdata.id]
|
|
|
|
|
|
+ var arr2=this.currectdata
|
|
if(this.form.distributionIng>this.form.distributionCan){
|
|
if(this.form.distributionIng>this.form.distributionCan){
|
|
this.$message({
|
|
this.$message({
|
|
message: '超出可分配金额',
|
|
message: '超出可分配金额',
|
|
@@ -850,8 +892,8 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
|
|
});
|
|
});
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- distributionsubmit(item){
|
|
|
|
- var arr2=this.multipleSelection1[this.currectdata.id]
|
|
|
|
|
|
+ distributionsubmit(){
|
|
|
|
+ var arr2=this.currectdata
|
|
if(this.form.distributionIng>this.form.distributionCan){
|
|
if(this.form.distributionIng>this.form.distributionCan){
|
|
this.$message({
|
|
this.$message({
|
|
message: '超出可分配金额',
|
|
message: '超出可分配金额',
|