|
@@ -62,7 +62,10 @@
|
|
<el-col style='text-align:right;' :span="12">
|
|
<el-col style='text-align:right;' :span="12">
|
|
<!-- <ws-button v-hasPermission="
|
|
<!-- <ws-button v-hasPermission="
|
|
`warehouseManagement.warehousingOrder.yufu`" type="primary" @click="interestrate()" >{{interestratevalue.value}}利率</ws-button> -->
|
|
`warehouseManagement.warehousingOrder.yufu`" type="primary" @click="interestrate()" >{{interestratevalue.value}}利率</ws-button> -->
|
|
- <ws-button type="primary" @click="exportList()">导出</ws-button>
|
|
|
|
|
|
+ <!-- <ws-button type="primary" @click="awatingransom()">待赎回</ws-button>
|
|
|
|
+ <ws-button type="primary" @click="editRollout()">修改赎回状态</ws-button>
|
|
|
|
+ <ws-button type="primary" @click="goodrollOut()">货权转出</ws-button> -->
|
|
|
|
+ <ws-button type="primary" @click="exportList()">导出</ws-button>
|
|
<ws-button v-hasPermission="
|
|
<ws-button v-hasPermission="
|
|
`warehouseManagement.warehousingOrder.yufu`" type="primary" @click="fieldrations()">折干</ws-button>
|
|
`warehouseManagement.warehousingOrder.yufu`" type="primary" @click="fieldrations()">折干</ws-button>
|
|
<ws-button v-hasPermission="
|
|
<ws-button v-hasPermission="
|
|
@@ -163,6 +166,18 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="outWarehouseWeight" width="80" class="table_td" label="出库重量"></el-table-column>
|
|
<el-table-column prop="outWarehouseWeight" width="80" class="table_td" label="出库重量"></el-table-column>
|
|
|
|
+ <!-- <el-table-column prop="transferOutWeight" width="200" class="table_td" label="转出">
|
|
|
|
+ <template scope="scope">
|
|
|
|
+ <el-popover v-if="scope.row.transferOutWeight>0"
|
|
|
|
+ placement="top-start"
|
|
|
|
+ width="220"
|
|
|
|
+ trigger="hover"
|
|
|
|
+ :content="scope.row.transferOutNo">
|
|
|
|
+ <span slot="reference" :style="scope.row.transferOutWeight>0?'color:#5F7DE9;':''">{{ scope.row.transferOutWeight }} <span v-if="scope.row.redeemFlag=='赎'">(赎)</span></span>
|
|
|
|
+ </el-popover>
|
|
|
|
+ <span v-else>{{ scope.row.transferOutWeight }}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column> -->
|
|
<el-table-column prop="profitAndLoss" class="table_td" label="盈亏(吨)"></el-table-column>
|
|
<el-table-column prop="profitAndLoss" class="table_td" label="盈亏(吨)"></el-table-column>
|
|
<el-table-column prop="surplusWeight" width="80" class="table_td" label="剩余重量"></el-table-column>
|
|
<el-table-column prop="surplusWeight" width="80" class="table_td" label="剩余重量"></el-table-column>
|
|
<el-table-column prop="grainFund" width="80" class="table_td" label="粮款(元)"></el-table-column>
|
|
<el-table-column prop="grainFund" width="80" class="table_td" label="粮款(元)"></el-table-column>
|
|
@@ -467,6 +482,57 @@
|
|
<el-dialog width='30%' :visible.sync="remarkList" title="备注" top="20vh">
|
|
<el-dialog width='30%' :visible.sync="remarkList" title="备注" top="20vh">
|
|
<span>{{ remark }}</span>
|
|
<span>{{ remark }}</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
+ <el-dialog width='50%' :visible.sync="rolloutShow" title="货权转出" top="20vh">
|
|
|
|
+ <div class="form-inline">
|
|
|
|
+ <div style="margin:10px;">
|
|
|
|
+ 选中{{ rolloutData.warehousingOrderList.length }}条:{{rolloutData.warehouseName}} 转出 {{ rolloutData.goodsName }}
|
|
|
|
+ {{ rolloutData.transferOutWeight }}吨 应付{{rolloutData.amountIngPayable}} 已付{{rolloutData.amountEdPayable}}
|
|
|
|
+ 未付{{rolloutData.amountNotPayable}} 平均成本 {{ rolloutData.avgCost }}
|
|
|
|
+ </div>
|
|
|
|
+ <el-form :inline="true" label-width="120px" class="demo-form-inline">
|
|
|
|
+ <el-form-item label="售价(元/吨)">
|
|
|
|
+ <el-input v-model="rolloutData.salePrice" placeholder="输入货权转出售价"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="是否赎回">
|
|
|
|
+ <el-radio v-model="rolloutData.redeemFlag" label="1">暂定赎回</el-radio>
|
|
|
|
+ <el-radio v-model="rolloutData.redeemFlag" label="0">永不赎回</el-radio>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <el-form :inline="true" label-width="120px" class="demo-form-inline">
|
|
|
|
+ <el-form-item label="合同编号">
|
|
|
|
+ <el-select clearable filterable @change="contractNochange" v-model="rolloutData.outContractNo" placeholder="选择合同编号">
|
|
|
|
+ <el-option v-for="item in contractNoList" :key="item.contractNo" :label="item.contractNo" :value="item.contractNo"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <el-form :inline="true" label-width="120px" class="demo-form-inline">
|
|
|
|
+ <el-form-item label="是否赎回">
|
|
|
|
+ <el-radio v-model="rolloutData.systemIdentification" label="1">易粮易运用户</el-radio>
|
|
|
|
+ <el-radio v-model="rolloutData.systemIdentification" label="0">非易粮易运用户</el-radio>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="">
|
|
|
|
+ <el-input v-model="rolloutData.receiveCompName" placeholder="输入货权接收公司全称"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <el-form :inline="true" label-width="120px" v-for="(item,index) in rolloutData.cargoPositionDetailsList" class="demo-form-inline">
|
|
|
|
+ <el-form-item :label="'仓位-'+(index+1)">
|
|
|
|
+ <el-select clearable filterable @change="($event)=>binNumberchange($event,item,index)" v-model="item.binNumber" placeholder="选择仓位">
|
|
|
|
+ <el-option v-for="item1 in binNumberList" :label="item1.binNumber+'('+item1.goodsweight+')'" :value="item1.binNumber"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="出库重量(吨)">
|
|
|
|
+ <el-input @input="weightinput" v-model="item.weight" placeholder="输入该仓位出库重量"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <img width="22" height="22" class="add" @click="add" src="../../../public/img/add.png" alt="" />
|
|
|
|
+ <img width="22" height="22" class="del" @click="del(index)" src="../../../public/img/del.png" alt="" />
|
|
|
|
+ </el-form>
|
|
|
|
+ <div style="text-align: right;margin: 10px;">合计:{{rollweight}}吨</div>
|
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="rolloutShow = false">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="rolloutclick">确 定</el-button>
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
<el-dialog width='50%' :visible.sync="interestrateshow" title="修改利率" top="20vh">
|
|
<el-dialog width='50%' :visible.sync="interestrateshow" title="修改利率" top="20vh">
|
|
<el-input placeholder="" v-model="interestratevalue.value"></el-input>
|
|
<el-input placeholder="" v-model="interestratevalue.value"></el-input>
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
@@ -534,6 +600,7 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
|
|
+import { allRoles } from '@/utils/util'
|
|
import {
|
|
import {
|
|
getoreditoutput,
|
|
getoreditoutput,
|
|
outdelete,
|
|
outdelete,
|
|
@@ -554,7 +621,10 @@ import {
|
|
getbyname,
|
|
getbyname,
|
|
sponsorWithdraw,
|
|
sponsorWithdraw,
|
|
exportOrder,
|
|
exportOrder,
|
|
- getdryweight
|
|
|
|
|
|
+ getdryweight,
|
|
|
|
+ getbinnumber,
|
|
|
|
+ setrollout,
|
|
|
|
+ editrollout
|
|
} from '@/model/warehouse/index'
|
|
} from '@/model/warehouse/index'
|
|
import {
|
|
import {
|
|
selectWarehouseSelf,
|
|
selectWarehouseSelf,
|
|
@@ -570,6 +640,9 @@ import {
|
|
fmoney,
|
|
fmoney,
|
|
EventBus
|
|
EventBus
|
|
} from 'base-core-lib'
|
|
} from 'base-core-lib'
|
|
|
|
+import {
|
|
|
|
+ xialaNo,
|
|
|
|
+ } from '@/model/tasksport/index'
|
|
import { findLastIndexOfIterate } from 'xe-utils/methods'
|
|
import { findLastIndexOfIterate } from 'xe-utils/methods'
|
|
export default {
|
|
export default {
|
|
name: 'viewSpareMoney',
|
|
name: 'viewSpareMoney',
|
|
@@ -599,7 +672,24 @@ export default {
|
|
EndDate:'',
|
|
EndDate:'',
|
|
rejectshow:false,
|
|
rejectshow:false,
|
|
options: [],
|
|
options: [],
|
|
|
|
+ rollweight:0,
|
|
|
|
+ rolloutData:{
|
|
|
|
+ warehouseId:'',
|
|
|
|
+ warehouseName:'',
|
|
|
|
+ goodsName:'',
|
|
|
|
+ transferOutWeight:0,
|
|
|
|
+ amountEdPayable:0,
|
|
|
|
+ amountNotPayable:0,
|
|
|
|
+ amountIngPayable:0,
|
|
|
|
+ avgCost:0,
|
|
|
|
+ redeemFlag:'1',
|
|
|
|
+ systemIdentification:'1',
|
|
|
|
+ warehousingOrderList:[],
|
|
|
|
+ cargoPositionDetailsList:[{binNumber:'',positionId:'',weight:'',goodsweight:''}],
|
|
|
|
+ compId: localStorage.getItem('ws-pf_compId')
|
|
|
|
+ },
|
|
isShowPrintType: false,
|
|
isShowPrintType: false,
|
|
|
|
+ rolloutShow:false,
|
|
// warehouseAllXiaLa:[],
|
|
// warehouseAllXiaLa:[],
|
|
textarea: '',
|
|
textarea: '',
|
|
weightGreater:'',
|
|
weightGreater:'',
|
|
@@ -744,7 +834,9 @@ export default {
|
|
titletype: '',
|
|
titletype: '',
|
|
remark: '',
|
|
remark: '',
|
|
baseId:'',
|
|
baseId:'',
|
|
- auditMind:''
|
|
|
|
|
|
+ auditMind:'',
|
|
|
|
+ contractNoList:[],
|
|
|
|
+ binNumberList:[],
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// activated() {
|
|
// activated() {
|
|
@@ -768,6 +860,285 @@ export default {
|
|
this.showType = this.isShow
|
|
this.showType = this.isShow
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ weightinput(e){
|
|
|
|
+ this.rollweight=0
|
|
|
|
+ for (let i = 0; i < this.rolloutData.cargoPositionDetailsList.length; i++) {
|
|
|
|
+ if(this.rolloutData.cargoPositionDetailsList[i].weight){
|
|
|
|
+ this.rollweight+=Number(this.rolloutData.cargoPositionDetailsList[i].weight)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.rollweight=this.rollweight.toFixed(3)
|
|
|
|
+ },
|
|
|
|
+ contractNochange(e){
|
|
|
|
+ for (let i = 0; i < this.contractNoList.length; i++) {
|
|
|
|
+ if(this.contractNoList[i].contractNo==e){
|
|
|
|
+ this.rolloutData.receiveCompName=this.contractNoList[i].buyer
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ awatingransom(){
|
|
|
|
+ this.$router.push({path: 'awaitRansom'})
|
|
|
|
+ },
|
|
|
|
+ editRollout(){
|
|
|
|
+ var concatarr=[]
|
|
|
|
+ var arr=[]
|
|
|
|
+ for (const key in this.multipleSelection1) {
|
|
|
|
+ concatarr = concatarr.concat(this.multipleSelection1[key])
|
|
|
|
+ }
|
|
|
|
+ if(concatarr.length==0){
|
|
|
|
+ this.$message.error('至少勾选一条!')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ for (const key in this.multipleSelection1) {
|
|
|
|
+ var array = this.multipleSelection1[key]
|
|
|
|
+ for (let i = 0; i < array.length; i++) {
|
|
|
|
+ if(array[i].redeemFlag == '赎'){
|
|
|
|
+ arr.push(array[i])
|
|
|
|
+ }else{
|
|
|
|
+ this.$message.error('请勾选需要赎回的货源!')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ this.$confirm('确定以上货源不再赎回?', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ editrollout({warehousingOrderList:concatarr}).toPromise()
|
|
|
|
+ .then((response) => {
|
|
|
|
+ this.$message.success('操作成功!')
|
|
|
|
+ // row.weightedit=false
|
|
|
|
+ this.getList()
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ rolloutclick(){
|
|
|
|
+ if(!this.rolloutData.salePrice){
|
|
|
|
+ this.$message.error('转出售价不能为空!')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(!this.rolloutData.outContractNo){
|
|
|
|
+ this.$message.error('合同编号不能为空!')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.rolloutData.systemIdentification==1&&!this.rolloutData.receiveCompName){
|
|
|
|
+ this.$message.error('货权接收公司不存在!')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ for (let i = 0; i < this.rolloutData.cargoPositionDetailsList.length; i++) {
|
|
|
|
+ if(!this.rolloutData.cargoPositionDetailsList[i].binNumber){
|
|
|
|
+ this.$message.error('仓位号不能为空!')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(!this.rolloutData.cargoPositionDetailsList[i].weight){
|
|
|
|
+ this.$message.error('出库重量不能为空!')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.rolloutData.cargoPositionDetailsList[i].weight<0||
|
|
|
|
+ String(this.rolloutData.cargoPositionDetailsList[i].weight).indexOf(".") != -1 && String(this.rolloutData.cargoPositionDetailsList[i].weight).split('.')[1].length > 3){
|
|
|
|
+ this.$message.error('出库重量输入错误!')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.rolloutData.cargoPositionDetailsList[i].weight>this.rolloutData.cargoPositionDetailsList[i].goodsweight){
|
|
|
|
+ this.$message.error('出库重量不能超过库存重量!')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ var binNumberdata=this.rolloutData.cargoPositionDetailsList.filter((item)=>{return item.binNumber==this.rolloutData.cargoPositionDetailsList[i].binNumber})
|
|
|
|
+ if(binNumberdata.length>1){
|
|
|
|
+ this.$message.error('仓位号不能重复!')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(this.rollweight!=this.rolloutData.transferOutWeight){
|
|
|
|
+ this.$message.error('输入的出库重量合计须等于勾选的重量合计!')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.$confirm('提交后不可修改,确定转出货权?', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ setrollout(this.rolloutData).toPromise()
|
|
|
|
+ .then((response) => {
|
|
|
|
+ this.rolloutShow=false
|
|
|
|
+ this.$message.success('提交成功!')
|
|
|
|
+ // row.weightedit=false
|
|
|
|
+ this.getList()
|
|
|
|
+ this.rolloutData={
|
|
|
|
+ warehouseId:'',
|
|
|
|
+ warehouseName:'',
|
|
|
|
+ goodsName:'',
|
|
|
|
+ transferOutWeight:0,
|
|
|
|
+ amountEdPayable:0,
|
|
|
|
+ amountNotPayable:0,
|
|
|
|
+ amountIngPayable:0,
|
|
|
|
+ avgCost:0,
|
|
|
|
+ redeemFlag:'1',
|
|
|
|
+ systemIdentification:'1',
|
|
|
|
+ warehousingOrderList:[],
|
|
|
|
+ cargoPositionDetailsList:[{binNumber:'',positionId:'',weight:'',goodsweight:''}],
|
|
|
|
+ compId: localStorage.getItem('ws-pf_compId')
|
|
|
|
+ }
|
|
|
|
+ }).catch((req)=>{
|
|
|
|
+ this.$message.error(req.message)
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ binNumberchange(e,item,index){
|
|
|
|
+ for (let i = 0; i < this.binNumberList.length; i++) {
|
|
|
|
+ if(this.binNumberList[i].binNumber==e){
|
|
|
|
+ item.positionId=this.binNumberList[i].id
|
|
|
|
+ item.weight=this.binNumberList[i].goodsweight
|
|
|
|
+ item.goodsweight=this.binNumberList[i].goodsweight
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.rollweight=0
|
|
|
|
+ for (let i = 0; i < this.rolloutData.cargoPositionDetailsList.length; i++) {
|
|
|
|
+ if(this.rolloutData.cargoPositionDetailsList[i].weight){
|
|
|
|
+ this.rollweight+=Number(this.rolloutData.cargoPositionDetailsList[i].weight)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.rollweight=this.rollweight.toFixed(3)
|
|
|
|
+ },
|
|
|
|
+ del(index){
|
|
|
|
+ if(this.rolloutData.cargoPositionDetailsList.length>1){
|
|
|
|
+ this.rolloutData.cargoPositionDetailsList.splice(index,1)
|
|
|
|
+ }else{
|
|
|
|
+ this.$message.error('至少保留一条仓位!')
|
|
|
|
+ }
|
|
|
|
+ this.rollweight=0
|
|
|
|
+ for (let i = 0; i < this.rolloutData.cargoPositionDetailsList.length; i++) {
|
|
|
|
+ if(this.rolloutData.cargoPositionDetailsList[i].weight){
|
|
|
|
+ this.rollweight+=this.rolloutData.cargoPositionDetailsList[i].weight
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.rollweight=this.rollweight.toFixed(3)
|
|
|
|
+ },
|
|
|
|
+ add(){
|
|
|
|
+ this.rolloutData.cargoPositionDetailsList.push({binNumber:'',positionId:'',weight:'',goodsweight:''})
|
|
|
|
+ console.log(this.rolloutData)
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
+ },
|
|
|
|
+ async goodrollOut(){
|
|
|
|
+ var concatarr=[]
|
|
|
|
+ var arr=[]
|
|
|
|
+ var arr3=[]
|
|
|
|
+ var arr4=[]
|
|
|
|
+ for (const key in this.multipleSelection1) {
|
|
|
|
+ concatarr = concatarr.concat(this.multipleSelection1[key])
|
|
|
|
+ }
|
|
|
|
+ if(concatarr.length==0){
|
|
|
|
+ this.$message.error('至少勾选一条!')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ for (const key in this.multipleSelection1) {
|
|
|
|
+ var array = this.multipleSelection1[key]
|
|
|
|
+ for (let i = 0; i < array.length; i++) {
|
|
|
|
+ if(array[i].amountEdPayable == 0 && !array[i].approveStatus||array[i].amountEdPayable == array[i].grainFund && !array[i].approveStatus){
|
|
|
|
+ arr.push(array[i])
|
|
|
|
+ }else{
|
|
|
|
+ this.$message.error('请选择已付全款或未请款的条目!')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (arr3.length == 0) {
|
|
|
|
+ arr3.push(array[i])
|
|
|
|
+ } else {
|
|
|
|
+ var arr2 = arr3.filter((item) => { return item.warehouseName == array[i].warehouseName })
|
|
|
|
+ if (arr2.length == 0) {
|
|
|
|
+ arr3.push(array[i])
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (arr4.length == 0) {
|
|
|
|
+ arr4.push(array[i])
|
|
|
|
+ } else {
|
|
|
|
+ var arr5 = arr4.filter((item) => { return item.warehouseName == array[i].warehouseName })
|
|
|
|
+ if (arr5.length == 0) {
|
|
|
|
+ arr4.push(array[i])
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ let map = new Map();
|
|
|
|
+ for (let item of arr) {
|
|
|
|
+ map.set(item.goodsName, item);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ var data = [...map.values()];
|
|
|
|
+ if (data.length > 1) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '所选条目货名不一致!',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ });
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (arr3.length > 1) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '所选条目库点不一致!',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ });
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (arr4.length > 1) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '所选条目合同编号不一致!',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ });
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ var num=0
|
|
|
|
+ this.rolloutData.warehousingOrderList=arr
|
|
|
|
+ this.rolloutData.warehouseId=arr[0].baseId
|
|
|
|
+ this.rolloutData.warehouseName=arr[0].warehouseName
|
|
|
|
+ this.rolloutData.goodsName=arr[0].goodsName
|
|
|
|
+ this.rolloutData.transferOutWeight=0
|
|
|
|
+ this.rolloutData.amountEdPayable=0
|
|
|
|
+ this.rolloutData.amountNotPayable=0
|
|
|
|
+ this.rolloutData.amountIngPayable=0
|
|
|
|
+ for (let i = 0; i < arr.length; i++) {
|
|
|
|
+ this.rolloutData.transferOutWeight+=Number(arr[i].surplusWeight)
|
|
|
|
+ this.rolloutData.amountEdPayable+=Number(arr[i].amountEdPayable)
|
|
|
|
+ this.outamountNotPayable+=Number(arr[i].amountNotPayable)
|
|
|
|
+ this.rolloutData.amountIngPayable+=Number(arr[i].grainFund)
|
|
|
|
+ num+=(Number(arr[i].surplusWeight*arr[i].avgCost))
|
|
|
|
+ }
|
|
|
|
+ this.rolloutData.transferOutWeight= this.rolloutData.transferOutWeight.toFixed(3)
|
|
|
|
+ this.rolloutData.avgCost=(num/this.rolloutData.transferOutWeight).toFixed(3)
|
|
|
|
+ this.rolloutData.amountEdPayable=this.rolloutData.amountEdPayable.toFixed(3)
|
|
|
|
+ this.rolloutData.amountNotPayable=this.rolloutData.amountNotPayable.toFixed(3)
|
|
|
|
+ this.rolloutData.amountIngPayable=this.rolloutData.amountIngPayable.toFixed(3)
|
|
|
|
+ this.contractNoList=await xialaNo({compId: localStorage.getItem('ws-pf_compId'),flag: 1}).toPromise()
|
|
|
|
+ var data=await getbinnumber({id: this.rolloutData.warehouseId,}).toPromise()
|
|
|
|
+ for (let i = 0; i < data.warehousePositionInfoList.length; i++) {
|
|
|
|
+ var item=data.warehousePositionInfoList[i]
|
|
|
|
+ if(item.warehousePositionStorageInfoList){
|
|
|
|
+ for (let q = 0; q < item.warehousePositionStorageInfoList.length; q++) {
|
|
|
|
+ if(item.warehousePositionStorageInfoList[q].goodsName==this.rolloutData.goodsName){
|
|
|
|
+ this.$set(item,'goodsweight',item.warehousePositionStorageInfoList[q].storage)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(item.warehousePositionStorageInfoList.filter((item)=>{return item.goodsName==this.rolloutData.goodsName}).length==0){
|
|
|
|
+ this.$set(item,'goodsweight',0)
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ this.$set(item,'goodsweight',0)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ console.log(data.warehousePositionInfoList)
|
|
|
|
+ this.binNumberList = data.warehousePositionInfoList
|
|
|
|
+ // var that = this
|
|
|
|
+ // setTimeout(function(){
|
|
|
|
+ this.rolloutShow=true
|
|
|
|
+ // },1000)
|
|
|
|
+
|
|
|
|
+ },
|
|
exportList() {
|
|
exportList() {
|
|
let date = new Date()
|
|
let date = new Date()
|
|
var year = date.getFullYear();
|
|
var year = date.getFullYear();
|
|
@@ -1122,7 +1493,7 @@ export default {
|
|
type: 'warning',
|
|
type: 'warning',
|
|
})
|
|
})
|
|
.then(() => {
|
|
.then(() => {
|
|
- editwarehousingorder({ id: row.id, inWarehouseWeight: row.inWarehouseWeight1 }).toPromise()
|
|
|
|
|
|
+ editwarehousingorder({ id: row.id, inWarehouseWeight: row.inWarehouseWeight1,flag: 6}).toPromise()
|
|
.then((response) => {
|
|
.then((response) => {
|
|
// row.weightedit=false
|
|
// row.weightedit=false
|
|
this.getList()
|
|
this.getList()
|
|
@@ -1217,6 +1588,13 @@ export default {
|
|
});
|
|
});
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ if (this.multipleSelection1[item.id][i].transferOutWeight > 0) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '已转出的条目禁止请款!',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ });
|
|
|
|
+ return
|
|
|
|
+ }
|
|
if (this.multipleSelection1[item.id][i].amountNotPayable > 0 && this.multipleSelection1[item.id][i].approveStatus
|
|
if (this.multipleSelection1[item.id][i].amountNotPayable > 0 && this.multipleSelection1[item.id][i].approveStatus
|
|
&& this.multipleSelection1[item.id][i].approveStatus !='发起人撤回') {
|
|
&& this.multipleSelection1[item.id][i].approveStatus !='发起人撤回') {
|
|
this.$message({
|
|
this.$message({
|
|
@@ -1528,16 +1906,16 @@ export default {
|
|
// })
|
|
// })
|
|
},
|
|
},
|
|
selectInit(row, index) {
|
|
selectInit(row, index) {
|
|
- if (localStorage.getItem('ws-pf_roleName') == '销售内勤' || localStorage.getItem('ws-pf_roleName') == '采购内勤'||localStorage.getItem('ws-pf_roleName').indexOf('专员')> -1) {
|
|
|
|
|
|
+ var role = allRoles()
|
|
|
|
+ if (role.roleName.indexOf('销售内勤') != -1 ||role.roleName.indexOf('采购内勤') != -1||role.roleName.indexOf('专员') != -1) {
|
|
return true
|
|
return true
|
|
-
|
|
|
|
} else if (localStorage.getItem('ws-pf_staffName') == '杜大光') {
|
|
} else if (localStorage.getItem('ws-pf_staffName') == '杜大光') {
|
|
return true
|
|
return true
|
|
} else if (localStorage.getItem('ws-pf_staffName') == '范占国') {
|
|
} else if (localStorage.getItem('ws-pf_staffName') == '范占国') {
|
|
return true
|
|
return true
|
|
- } else if (localStorage.getItem('ws-pf_roleName') == '财务') {
|
|
|
|
|
|
+ } else if (role.roleName.indexOf('财务') != -1) {
|
|
return true
|
|
return true
|
|
- } else if (localStorage.getItem('ws-pf_roleName') == '出纳') {
|
|
|
|
|
|
+ } else if (role.roleName.indexOf('出纳') != -1) {
|
|
return true
|
|
return true
|
|
}else if (localStorage.getItem('ws-pf_deptName') == '单证中心') {
|
|
}else if (localStorage.getItem('ws-pf_deptName') == '单证中心') {
|
|
return true
|
|
return true
|
|
@@ -2057,14 +2435,14 @@ export default {
|
|
for (let q = 0; q < data.length; q++) {
|
|
for (let q = 0; q < data.length; q++) {
|
|
if (data[q].inType == '收购入库') {
|
|
if (data[q].inType == '收购入库') {
|
|
data[q].inWarehouseWeight1 = Number((data[q].inWarehouseWeight).toFixed(3))
|
|
data[q].inWarehouseWeight1 = Number((data[q].inWarehouseWeight).toFixed(3))
|
|
- data[q].surplusWeight = ((data[q].inWarehouseWeight) - data[q].outWarehouseWeight + data[q].profitAndLoss).toFixed(3)
|
|
|
|
|
|
+ // data[q].surplusWeight = ((data[q].inWarehouseWeight) - data[q].outWarehouseWeight + data[q].profitAndLoss).toFixed(3)
|
|
} else {
|
|
} else {
|
|
|
|
+ console.log( data[q].inWarehouseWeight.toFixed(3))
|
|
data[q].inWarehouseWeight1 = data[q].inWarehouseWeight.toFixed(3)
|
|
data[q].inWarehouseWeight1 = data[q].inWarehouseWeight.toFixed(3)
|
|
- data[q].surplusWeight =(data[q].inWarehouseWeight - data[q].outWarehouseWeight + data[q].profitAndLoss).toFixed(3)
|
|
|
|
|
|
+ // data[q].surplusWeight =(data[q].inWarehouseWeight - data[q].outWarehouseWeight + data[q].profitAndLoss).toFixed(3)
|
|
}
|
|
}
|
|
data[q].avgCost = Number(data[q].avgCost).toFixed(2)
|
|
data[q].avgCost = Number(data[q].avgCost).toFixed(2)
|
|
data[q].amountMoney = Number(data[q].amountMoney).toFixed(4)
|
|
data[q].amountMoney = Number(data[q].amountMoney).toFixed(4)
|
|
- console.log(response.records[i].warehouseType)
|
|
|
|
data[q].select = false
|
|
data[q].select = false
|
|
data[q].weightedit = false
|
|
data[q].weightedit = false
|
|
data[q].edit = false
|
|
data[q].edit = false
|
|
@@ -2415,4 +2793,31 @@ export default {
|
|
text-align: center;
|
|
text-align: center;
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+ /deep/.form-inline .el-form.el-form--inline{
|
|
|
|
+ width:90%;
|
|
|
|
+ position:relative;
|
|
|
|
+ }
|
|
|
|
+ /deep/.form-inline .el-form.el-form--inline .el-form-item{
|
|
|
|
+ width:49%;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ /deep/.form-inline .el-form.el-form--inline .el-form-item .el-form-item__label{
|
|
|
|
+ width:30%;
|
|
|
|
+ }
|
|
|
|
+ /deep/.form-inline .el-form.el-form--inline .el-form-item .el-form-item__content{
|
|
|
|
+ width:70%;
|
|
|
|
+ }
|
|
|
|
+ .add,.del{
|
|
|
|
+ position:absolute;
|
|
|
|
+ top:50%;
|
|
|
|
+ transform:translateY(-50%);
|
|
|
|
+ right:-10px;
|
|
|
|
+ }
|
|
|
|
+ .del{
|
|
|
|
+ right:-40px;
|
|
|
|
+ }
|
|
|
|
+ // {
|
|
|
|
+ // position:absolute;
|
|
|
|
+ // top:50%;
|
|
|
|
+ // }
|
|
</style>
|
|
</style>
|