|
@@ -45,7 +45,7 @@
|
|
<el-input disabled v-model="deptBudgetList.warehouseAddress" placeholder="请输入仓库地址" size="small"></el-input>
|
|
<el-input disabled v-model="deptBudgetList.warehouseAddress" placeholder="请输入仓库地址" size="small"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item prop="goodsName" label="货名">
|
|
<el-form-item prop="goodsName" label="货名">
|
|
- <el-select v-model="deptBudgetList.goodsName" placeholder="请选择货名" @change="dataFlush" filterable clearable>
|
|
|
|
|
|
+ <el-select disabled v-model="deptBudgetList.goodsName" placeholder="请选择货名" @change="dataFlush" filterable clearable>
|
|
<el-option v-for="item in goodsList" :key="item.goodsName" :label="item.goodsName"
|
|
<el-option v-for="item in goodsList" :key="item.goodsName" :label="item.goodsName"
|
|
:value="item.goodsName" >
|
|
:value="item.goodsName" >
|
|
</el-option>
|
|
</el-option>
|
|
@@ -71,18 +71,19 @@
|
|
<el-button @click='selectgoods' type="primary">选择货源</el-button>
|
|
<el-button @click='selectgoods' type="primary">选择货源</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="本单重量(吨)" prop="weight" class="forlist">
|
|
<el-form-item label="本单重量(吨)" prop="weight" class="forlist">
|
|
- <el-input v-model="deptBudgetList.weight" placeholder="输入本次仓单申请所需的重量" size="small" @input='inputChange'>
|
|
|
|
|
|
+ <el-input v-model="deptBudgetList.weight" placeholder="输入本次仓单申请所需的重量" size="small" >
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="折干重量(吨)" prop="weight" class="forlist">
|
|
|
|
+ <el-input v-model="deptBudgetList.dryOutWeight" placeholder="输入折干重量" size="small" @input='inputChange'>
|
|
</el-input>
|
|
</el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="单价(元/吨)" prop="unitPrice" class="forlist">
|
|
<el-form-item label="单价(元/吨)" prop="unitPrice" class="forlist">
|
|
<el-input v-model="deptBudgetList.unitPrice" placeholder="输入粮食单价" size="small" @input='inputChange'></el-input>
|
|
<el-input v-model="deptBudgetList.unitPrice" placeholder="输入粮食单价" size="small" @input='inputChange'></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="总价值(元)" prop="totalValue" class="forlist">
|
|
|
|
|
|
+ <el-form-item label="货值(元)" prop="totalValue" class="forlist">
|
|
<el-input type='number' disabled v-model="deptBudgetList.totalValue" placeholder="自动计算,不可编辑" size="small"></el-input>
|
|
<el-input type='number' disabled v-model="deptBudgetList.totalValue" placeholder="自动计算,不可编辑" size="small"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="申请比例(%)" prop="applicationProportion" class="forlist">
|
|
|
|
- <el-input v-model="deptBudgetList.applicationProportion" placeholder="输入申请比例" size="small"></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
<el-form-item label="申请金额(元)" prop="interest" class="forlist">
|
|
<el-form-item label="申请金额(元)" prop="interest" class="forlist">
|
|
<el-input type='number' v-model="deptBudgetList.interest" placeholder="输入申请金额" size="small"></el-input>
|
|
<el-input type='number' v-model="deptBudgetList.interest" placeholder="输入申请金额" size="small"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -142,7 +143,8 @@
|
|
warehouseNo:'',
|
|
warehouseNo:'',
|
|
warehouseName:'',
|
|
warehouseName:'',
|
|
renown:'',
|
|
renown:'',
|
|
- weight:''
|
|
|
|
|
|
+ weight:'',
|
|
|
|
+ interest:''
|
|
},
|
|
},
|
|
size: 10,
|
|
size: 10,
|
|
compId: '',
|
|
compId: '',
|
|
@@ -169,11 +171,8 @@
|
|
this.deptBudgetList.renown=localStorage.getItem('ws-pf_compName')
|
|
this.deptBudgetList.renown=localStorage.getItem('ws-pf_compName')
|
|
//
|
|
//
|
|
let i = localStorage.getItem('pageUp')
|
|
let i = localStorage.getItem('pageUp')
|
|
- if(i != 1&&!localStorage.getItem('warehouseReceiptdata')){
|
|
|
|
- this.getWarehouse()
|
|
|
|
- // this.getcompList()
|
|
|
|
this.getList()
|
|
this.getList()
|
|
- }
|
|
|
|
|
|
+
|
|
// getcomp({userMobilePhone:JSON.parse(localStorage.getItem('ws_login_getTenantInfoByUser')).loginInfo.userMobilePhone}).toPromise().then((res)=>{
|
|
// getcomp({userMobilePhone:JSON.parse(localStorage.getItem('ws_login_getTenantInfoByUser')).loginInfo.userMobilePhone}).toPromise().then((res)=>{
|
|
console.log(localStorage.getItem('ws-pf_compName'))
|
|
console.log(localStorage.getItem('ws-pf_compName'))
|
|
this.deptBudgetList.renown=localStorage.getItem('ws-pf_compName')
|
|
this.deptBudgetList.renown=localStorage.getItem('ws-pf_compName')
|
|
@@ -185,13 +184,22 @@
|
|
if(data){
|
|
if(data){
|
|
this.deptBudgetList.weight=''
|
|
this.deptBudgetList.weight=''
|
|
var weight = 0
|
|
var weight = 0
|
|
|
|
+ var pureWeight = 0
|
|
if(data.modification&&data.modification.length>0){
|
|
if(data.modification&&data.modification.length>0){
|
|
|
|
|
|
this.goodstext='已选'+data.modification.length+'辆车'
|
|
this.goodstext='已选'+data.modification.length+'辆车'
|
|
for(let i=0;i<data.modification.length;i++){
|
|
for(let i=0;i<data.modification.length;i++){
|
|
weight+=data.modification[i].netWeight
|
|
weight+=data.modification[i].netWeight
|
|
|
|
+ pureWeight+=data.modification[i].netWeight
|
|
}
|
|
}
|
|
|
|
+ this.deptBudgetList.goodsName = data.modification[0].goodsName
|
|
|
|
+ this.dataFlush()
|
|
this.deptBudgetList.weight = weight.toFixed(2)
|
|
this.deptBudgetList.weight = weight.toFixed(2)
|
|
|
|
+ if(this.deptBudgetList.goodsName.indexOf('潮粮')!=-1){
|
|
|
|
+ this.deptBudgetList.dryOutWeight = pureWeight.toFixed(2)
|
|
|
|
+ }else{
|
|
|
|
+ this.deptBudgetList.dryOutWeight = weight.toFixed(2)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -214,8 +222,9 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
inputChange(e) {
|
|
inputChange(e) {
|
|
- if (this.deptBudgetList.unitPrice && this.deptBudgetList.weight) {
|
|
|
|
- this.deptBudgetList.totalValue = this.deptBudgetList.unitPrice * this.deptBudgetList.weight
|
|
|
|
|
|
+ if (this.deptBudgetList.unitPrice && this.deptBudgetList.dryOutWeight) {
|
|
|
|
+ this.deptBudgetList.totalValue = this.deptBudgetList.unitPrice * this.deptBudgetList.dryOutWeight
|
|
|
|
+ this.$set(this.deptBudgetList,'interest',this.deptBudgetList.totalValue)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//银行改变
|
|
//银行改变
|
|
@@ -239,7 +248,7 @@
|
|
getbillno().toPromise().then((response) => {
|
|
getbillno().toPromise().then((response) => {
|
|
this.deptBudgetList.billNo = response
|
|
this.deptBudgetList.billNo = response
|
|
})
|
|
})
|
|
- // this.getWarehouse()
|
|
|
|
|
|
+ this.getWarehouse()
|
|
},
|
|
},
|
|
getcompList() {
|
|
getcompList() {
|
|
//获取公司名头
|
|
//获取公司名头
|
|
@@ -261,37 +270,40 @@
|
|
.then(response => {
|
|
.then(response => {
|
|
console.log(response,76)
|
|
console.log(response,76)
|
|
this.warehouseList = response
|
|
this.warehouseList = response
|
|
- this.deptBudgetList.warehouseName = response[0].warehouseName
|
|
|
|
- this.deptBudgetList.warehouseType = response[0].warehouseType
|
|
|
|
- this.deptBudgetList.warehouseAddress = response[0].warehousePrivate + response[0].warehouseCity + response[0].warehouseArea + response[0].detailedAddress
|
|
|
|
- if(response[0].positionInfos){
|
|
|
|
- this.deptBudgetList.warehouseNoId = response[0].positionInfos.length != 0 ? response[0].positionInfos[0].id : ''
|
|
|
|
- this.cwNumberList = response[0].positionInfos
|
|
|
|
- this.deptBudgetList.warehouseNo = response[0].positionInfos.length != 0 ? response[0].positionInfos[0].binNumber : ''
|
|
|
|
- this.deptBudgetList.baseId = response[0].positionInfos.length != 0 ? response[0].positionInfos[0].baseId : ''
|
|
|
|
- }
|
|
|
|
- if(response[0].goodsNameInfos){
|
|
|
|
- this.goodsList = []
|
|
|
|
- for(let i = 0 ; i < response[0].goodsNameInfos.length ; i++){
|
|
|
|
- if(response[0].goodsNameInfos[i].binNumber == this.deptBudgetList.warehouseNo ){
|
|
|
|
- this.goodsList.push(response[0].goodsNameInfos[i])
|
|
|
|
- }
|
|
|
|
|
|
+ if(!this.deptBudgetList.warehouseName){
|
|
|
|
+ this.deptBudgetList.warehouseName = response[0].warehouseName
|
|
|
|
+ this.deptBudgetList.warehouseType = response[0].warehouseType
|
|
|
|
+ this.deptBudgetList.warehouseAddress = response[0].warehousePrivate + response[0].warehouseCity + response[0].warehouseArea + response[0].detailedAddress
|
|
|
|
+ if(response[0].positionInfos){
|
|
|
|
+ this.deptBudgetList.warehouseNoId = response[0].positionInfos.length != 0 ? response[0].positionInfos[0].id : ''
|
|
|
|
+ this.cwNumberList = response[0].positionInfos
|
|
|
|
+ this.deptBudgetList.warehouseNo = response[0].positionInfos.length != 0 ? response[0].positionInfos[0].binNumber : ''
|
|
|
|
+ this.deptBudgetList.baseId = response[0].positionInfos.length != 0 ? response[0].positionInfos[0].baseId : ''
|
|
}
|
|
}
|
|
- if(this.goodsList.length > 0 ){
|
|
|
|
- this.deptBudgetList.nowWeight = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0].storage : ''
|
|
|
|
- this.deptBudgetList.useWeight = response[0].goodsNameInfos[0].useStorage
|
|
|
|
- this.deptBudgetList.goodsName = this.goodsList[0].goodsName
|
|
|
|
- this.deptBudgetList.goodsNameKey = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0].goodsNameKey : ''
|
|
|
|
- }else {
|
|
|
|
- this.deptBudgetList.nowWeight = ''
|
|
|
|
- this.deptBudgetList.useWeight = ''
|
|
|
|
- this.deptBudgetList.goodsName =''
|
|
|
|
- this.deptBudgetList.goodsNameKey = ''
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
|
|
+ if(response[0].goodsNameInfos){
|
|
|
|
+ this.goodsList = []
|
|
|
|
+ for(let i = 0 ; i < response[0].goodsNameInfos.length ; i++){
|
|
|
|
+ if(response[0].goodsNameInfos[i].binNumber == this.deptBudgetList.warehouseNo ){
|
|
|
|
+ this.goodsList.push(response[0].goodsNameInfos[i])
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(this.goodsList.length > 0 ){
|
|
|
|
+ this.deptBudgetList.nowWeight = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0].storage : ''
|
|
|
|
+ this.deptBudgetList.useWeight = response[0].goodsNameInfos[0].useStorage
|
|
|
|
+ this.deptBudgetList.goodsName = this.goodsList[0].goodsName
|
|
|
|
+ this.deptBudgetList.goodsNameKey = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0].goodsNameKey : ''
|
|
|
|
+ }else {
|
|
|
|
+
|
|
|
|
+ this.deptBudgetList.nowWeight = ''
|
|
|
|
+ this.deptBudgetList.useWeight = ''
|
|
|
|
+ this.deptBudgetList.goodsName =''
|
|
|
|
+ this.deptBudgetList.goodsNameKey = ''
|
|
|
|
+ }
|
|
|
|
|
|
- this.deptBudgetList.warehouseId = response[0].id
|
|
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.deptBudgetList.warehouseId = response[0].id
|
|
|
|
+ }
|
|
if (!this.deptBudgetList.renown) this.deptBudgetList.renown = this.compOptionList[0].compName
|
|
if (!this.deptBudgetList.renown) this.deptBudgetList.renown = this.compOptionList[0].compName
|
|
if (!this.deptBudgetList.renownId) this.deptBudgetList.renownId = this.compOptionList[0].compId
|
|
if (!this.deptBudgetList.renownId) this.deptBudgetList.renownId = this.compOptionList[0].compId
|
|
})
|
|
})
|
|
@@ -352,12 +364,7 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if(this.goodsList.length == 0){
|
|
|
|
- this.deptBudgetList.goodsName = ''
|
|
|
|
- }else{
|
|
|
|
- this.deptBudgetList.goodsName = this.goodsList[0].goodsName
|
|
|
|
- }
|
|
|
|
- this.dataFlush();
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
// 名头切换
|
|
// 名头切换
|
|
changeCompOptionList(val) {
|
|
changeCompOptionList(val) {
|
|
@@ -383,6 +390,7 @@
|
|
if(data.modification&&data.modification.length>0){
|
|
if(data.modification&&data.modification.length>0){
|
|
global.default.deleteDB(this.db,'signalChat',1)
|
|
global.default.deleteDB(this.db,'signalChat',1)
|
|
this.deptBudgetList.weight = ''
|
|
this.deptBudgetList.weight = ''
|
|
|
|
+ this.deptBudgetList.dryOutWeight = ''
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -392,12 +400,9 @@
|
|
this.deptBudgetList.warehouseNo = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0].binNumber : ''
|
|
this.deptBudgetList.warehouseNo = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0].binNumber : ''
|
|
this.deptBudgetList.warehouseAddress = _data[i].warehousePrivate + _data[i].warehouseCity + _data[i].warehouseArea + _data[i].detailedAddress
|
|
this.deptBudgetList.warehouseAddress = _data[i].warehousePrivate + _data[i].warehouseCity + _data[i].warehouseArea + _data[i].detailedAddress
|
|
// this.goodsList = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos : []
|
|
// this.goodsList = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos : []
|
|
- this.deptBudgetList.nowWeight = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos[0].storage : ''
|
|
|
|
- this.deptBudgetList.useWeight =_data[i].goodsNameInfos.length!=0?_data[i].goodsNameInfos[0].useStorage:''
|
|
|
|
- this.deptBudgetList.goodsName = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos[0].goodsName : ''
|
|
|
|
|
|
+
|
|
this.deptBudgetList.warehouseId = _data[i].id
|
|
this.deptBudgetList.warehouseId = _data[i].id
|
|
this.deptBudgetList.warehouseType = _data[i].warehouseType
|
|
this.deptBudgetList.warehouseType = _data[i].warehouseType
|
|
- this.deptBudgetList.goodsNameKey = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos[0].goodsNameKey : ''
|
|
|
|
this.deptBudgetList.warehouseNoId = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0].id : ''
|
|
this.deptBudgetList.warehouseNoId = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0].id : ''
|
|
this.deptBudgetList.baseId = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0].baseId : ''
|
|
this.deptBudgetList.baseId = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0].baseId : ''
|
|
}
|
|
}
|