|
@@ -13,6 +13,14 @@
|
|
|
<el-option key="全部仓库" label="全部仓库" value="" style="color: #8890b1" />
|
|
|
<el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName" :value="item.warehouseName" style="color: #8890b1" />
|
|
|
</el-select>
|
|
|
+ <div style='width:50%;margin-right:10px;display: flex;'>
|
|
|
+ <el-select v-model="goodsName" filterable placeholder="" @change="goodsNameChange"
|
|
|
+ style="margin: 0 10px">
|
|
|
+ <el-option key="全部货名" label="全部货名" value="0" style="color: #8890b1" />
|
|
|
+ <el-option v-for="(item,index) in goodsList" :key="item.id" :label="item.goodsName"
|
|
|
+ :value="(index+1)" style="color: #8890b1" />
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
<template slot="right">
|
|
|
<ws-input @keyup.enter.native="find()" class='findValue' v-model="searchKeyWord" placeholder="可按货源查找" clearable maxlength="300" type="input"></ws-input>
|
|
@@ -40,6 +48,9 @@
|
|
|
`warehouseManagement.warehousingOrder.View`
|
|
|
">盘亏
|
|
|
</ws-button>
|
|
|
+ <ws-button :type="searchType === '1' ? 'primary' : ''" @click="handle('1')" v-hasPermission="
|
|
|
+ `warehouseManagement.warehousingOrder.View`">待审核
|
|
|
+ </ws-button>
|
|
|
</el-col>
|
|
|
<el-col style='text-align:right;' :span="12">
|
|
|
|
|
@@ -50,14 +61,15 @@
|
|
|
<div>{{item.issuingTime}}</div>
|
|
|
<div>{{item.warehouseName}}入库单<span v-if='item.warehouseType==2'>(临)</span></div>
|
|
|
<div>
|
|
|
- <ws-button type="primary" @click="profit(item.id)" v-hasPermission="
|
|
|
+ <ws-button type="primary" @click="profit(item)" v-hasPermission="
|
|
|
`warehouseManagement.warehousingOrder.surplus`
|
|
|
">盘盈
|
|
|
</ws-button>
|
|
|
- <ws-button type="primary" @click="lose(item.id)" v-hasPermission="
|
|
|
+ <ws-button type="primary" @click="lose(item)" v-hasPermission="
|
|
|
`warehouseManagement.warehousingOrder.loss`
|
|
|
">盘亏
|
|
|
</ws-button>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-table class="wenzi" :data="item.warehousingOrderList" style="width: 100%" >
|
|
@@ -123,6 +135,13 @@
|
|
|
<el-form-item label="实际剩余(吨)">
|
|
|
<el-input :disabled='disabled' v-model="form.num"></el-input>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="仓位">
|
|
|
+ <el-select :disabled='disabled' @focus="warehousefocus" @change="warehousechange" v-model="form.binNo"
|
|
|
+ filterable placeholder="请选择">
|
|
|
+ <el-option v-for="item in options" :key="item.id" :label="item.binNumber" :value="item.binNumber">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
<span v-if='title=="审核"' slot="footer" class="dialog-footer">
|
|
@@ -168,7 +187,8 @@
|
|
|
} from '@/model/outboundManagement/index'
|
|
|
import {
|
|
|
getwarehousingorder,
|
|
|
- editwarehousingorder
|
|
|
+ editwarehousingorder,
|
|
|
+ getposition
|
|
|
} from '@/model/warehouse/index'
|
|
|
import {
|
|
|
downloadFile
|
|
@@ -204,11 +224,13 @@
|
|
|
form:{},
|
|
|
// 表格显示数据
|
|
|
tableDate: [],
|
|
|
-
|
|
|
+ options:[],
|
|
|
// 是否显示
|
|
|
showType: true,
|
|
|
warehouseName:'',
|
|
|
warehouseList:[],
|
|
|
+ goodsList:[],
|
|
|
+ searchType:'1',
|
|
|
// 年
|
|
|
year: '',
|
|
|
title:'',
|
|
@@ -262,7 +284,7 @@
|
|
|
value1: '',
|
|
|
value2: '',
|
|
|
pageSize: 10,
|
|
|
- searchType: 1,
|
|
|
+ searchType: '',
|
|
|
searchTypeText: '待审核',
|
|
|
searchKeyWord: '',
|
|
|
inOutType:'',
|
|
@@ -311,7 +333,66 @@
|
|
|
this.showType = this.isShow
|
|
|
},
|
|
|
methods: {
|
|
|
- warehouseNameChange(){
|
|
|
+ handle(status) {
|
|
|
+ this.currentPage=1
|
|
|
+ this.searchType = status
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ warehousefocus() {
|
|
|
+ getposition({ baseId: this.form.baseId, flag: 1 }).toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ // row.weightedit=false
|
|
|
+ this.options = response
|
|
|
+ })
|
|
|
+ },
|
|
|
+ warehousechange(e) {
|
|
|
+ // console.log(e)
|
|
|
+ for (let i = 0; i < this.options.length; i++) {
|
|
|
+ if (this.options[i].binNumber == e) {
|
|
|
+ this.form.positionId = this.options[i].id
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ warehouseNameChange(e){
|
|
|
+ if (e == '全部仓库' || e == '') {
|
|
|
+ this.warehouseName = ''
|
|
|
+ this.goodsList = []
|
|
|
+ this.goodsName = '0'
|
|
|
+ this.baseId = ''
|
|
|
+ }else{
|
|
|
+ this.goodsList = []
|
|
|
+ for(let i =0 ; i<this.warehouseList.length;i++){
|
|
|
+ if(this.warehouseList[i].warehouseName == e){
|
|
|
+ console.log(this.warehouseList[i])
|
|
|
+ if(this.warehouseList[i].goodsNameInfos){
|
|
|
+ for(let j = 0;j<this.warehouseList[i].goodsNameInfos.length;j++){//构造数据,合并重复货名
|
|
|
+ if(j==0){
|
|
|
+ this.goodsList.push(this.warehouseList[i].goodsNameInfos[j])
|
|
|
+ }else{
|
|
|
+ //
|
|
|
+ if(this.goodsList.every((item)=>{return item.goodsName != this.warehouseList[i].goodsNameInfos[j].goodsName}) ){
|
|
|
+ this.goodsList.push(this.warehouseList[i].goodsNameInfos[j])
|
|
|
+ }else{
|
|
|
+ for(let n = 0;n < this.goodsList.length;n++){
|
|
|
+ if(this.goodsList[n].goodsName == this.warehouseList[i].goodsNameInfos[j].goodsName){
|
|
|
+ this.goodsList[n].storage += this.warehouseList[i].goodsNameInfos[j].storage
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ this.baseId = this.warehouseList[i].id
|
|
|
+
|
|
|
+
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.goodsName= '0'
|
|
|
+ }
|
|
|
this.getList()
|
|
|
},
|
|
|
datechange(e){
|
|
@@ -394,16 +475,18 @@
|
|
|
},
|
|
|
lose(ware){
|
|
|
if(localStorage.getItem('ws-pf_roleName')=='销售内勤'||localStorage.getItem('ws-pf_roleName')=='采购内勤'){
|
|
|
- console.log(this.multipleSelection[ware])
|
|
|
- if(this.multipleSelection[ware]){
|
|
|
- this.form.id=this.multipleSelection[ware].id
|
|
|
- this.form.workflowId=this.multipleSelection[ware].workflowId
|
|
|
- this.form.surplusWeight=this.multipleSelection[ware].surplusWeight
|
|
|
- this.form.profitAndLoss=this.multipleSelection[ware].profitAndLoss
|
|
|
+ console.log(this.multipleSelection[ware.id])
|
|
|
+ if(this.multipleSelection[ware.id]){
|
|
|
+ this.form.baseId=ware.baseId
|
|
|
+ this.form.goodsName=this.multipleSelection[ware.id].goodsName
|
|
|
+ this.form.id=this.multipleSelection[ware.id].id
|
|
|
+ this.form.workflowId=this.multipleSelection[ware.id].workflowId
|
|
|
+ this.form.surplusWeight=this.multipleSelection[ware.id].surplusWeight
|
|
|
+ this.form.profitAndLoss=this.multipleSelection[ware.id].profitAndLoss
|
|
|
this.title='盘亏'
|
|
|
this.slecetwarehouseName=''
|
|
|
// console.log(this.multipleSelection[ware].approveStatus,1111111111111)
|
|
|
- if(this.multipleSelection[ware].inventoryStatus){
|
|
|
+ if(this.multipleSelection[ware.id].inventoryStatus){
|
|
|
this.$notify.warning({
|
|
|
title: '警告',
|
|
|
message: '当前数据审核中',
|
|
@@ -428,13 +511,15 @@
|
|
|
},
|
|
|
profit(ware){
|
|
|
if(localStorage.getItem('ws-pf_roleName')=='销售内勤'||localStorage.getItem('ws-pf_roleName')=='采购内勤'){
|
|
|
- if(this.multipleSelection[ware]){
|
|
|
- this.form.id=this.multipleSelection[ware].id
|
|
|
- this.form.workflowId=this.multipleSelection[ware].workflowId
|
|
|
- this.form.surplusWeight=this.multipleSelection[ware].surplusWeight
|
|
|
- this.form.profitAndLoss=this.multipleSelection[ware].profitAndLoss
|
|
|
+ if(this.multipleSelection[ware.id]){
|
|
|
+ this.form.baseId=ware.baseId
|
|
|
+ this.form.goodsName=this.multipleSelection[ware.id].goodsName
|
|
|
+ this.form.id=this.multipleSelection[ware.id].id
|
|
|
+ this.form.workflowId=this.multipleSelection[ware.id].workflowId
|
|
|
+ this.form.surplusWeight=this.multipleSelection[ware.id].surplusWeight
|
|
|
+ this.form.profitAndLoss=this.multipleSelection[ware.id].profitAndLoss
|
|
|
this.title='盘盈'
|
|
|
- if(this.multipleSelection[ware].inventoryStatus){
|
|
|
+ if(this.multipleSelection[ware.id].inventoryStatus){
|
|
|
this.$notify.warning({
|
|
|
title: '警告',
|
|
|
message: '当前数据审核中',
|
|
@@ -631,7 +716,9 @@
|
|
|
searchKeyWord: this.searchKeyWord,
|
|
|
warehouseName:this.warehouseName,
|
|
|
inOutType:this.inOutType,
|
|
|
- flag:this.flag
|
|
|
+ flag:this.flag,
|
|
|
+ inventoryFlag:1,
|
|
|
+ inventoryStatus:this.searchType
|
|
|
})
|
|
|
.toPromise()
|
|
|
.then((response) => {
|