|
@@ -3,9 +3,7 @@
|
|
|
<div>
|
|
|
<BaseHeaderLayout :leftSpan="20">
|
|
|
<template slot="left">
|
|
|
- <ws-button
|
|
|
- type="primary"
|
|
|
- @click="handleAdd()"
|
|
|
+ <ws-button type="primary" @click="handleAdd()"
|
|
|
><img
|
|
|
width="11"
|
|
|
height="11"
|
|
@@ -16,20 +14,9 @@
|
|
|
添加</ws-button
|
|
|
>
|
|
|
|
|
|
- <ws-button
|
|
|
- @click="handleLook()"
|
|
|
- >查看</ws-button
|
|
|
- >
|
|
|
- <ws-button
|
|
|
- @click="handleEdit()"
|
|
|
-
|
|
|
- >编辑</ws-button
|
|
|
- >
|
|
|
- <ws-button
|
|
|
- @click="handleDelete()"
|
|
|
-
|
|
|
- >删除</ws-button
|
|
|
- >
|
|
|
+ <ws-button @click="handleLook()">查看</ws-button>
|
|
|
+ <ws-button @click="handleEdit()">编辑</ws-button>
|
|
|
+ <ws-button @click="handleDelete()">删除</ws-button>
|
|
|
<ws-button @click="handleLook()">查看</ws-button>
|
|
|
<ws-button @click="handleEdit()">编辑</ws-button>
|
|
|
<ws-button @click="handleDelete()">删除</ws-button>
|
|
@@ -56,11 +43,7 @@
|
|
|
class="findValue"
|
|
|
></ws-input>
|
|
|
<!-- v-hasPermission="'procurement.sparepart.directShip'" -->
|
|
|
- <ws-button
|
|
|
- class="find"
|
|
|
- type="primary"
|
|
|
- @click="find()"
|
|
|
-
|
|
|
+ <ws-button class="find" type="primary" @click="find()"
|
|
|
><img
|
|
|
width="16"
|
|
|
height="16"
|
|
@@ -137,24 +120,13 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="seller" label="出入库" width="300">
|
|
|
<template slot-scope="scope">
|
|
|
- <ws-button
|
|
|
- class="completed"
|
|
|
- @click="nocomplete(scope.row)"
|
|
|
-
|
|
|
- >
|
|
|
+ <ws-button class="completed" @click="nocomplete(scope.row)">
|
|
|
待完成({{ scope.row.number }})
|
|
|
</ws-button>
|
|
|
- <ws-button
|
|
|
- class="putstorage"
|
|
|
- @click="warehousing(scope.row)"
|
|
|
-
|
|
|
- >
|
|
|
+ <ws-button class="putstorage" @click="warehousing(scope.row)">
|
|
|
入库
|
|
|
</ws-button>
|
|
|
- <ws-button
|
|
|
- class="deliverystorage"
|
|
|
- @click="delivery(scope.row)"
|
|
|
- >
|
|
|
+ <ws-button class="deliverystorage" @click="delivery(scope.row)">
|
|
|
出库
|
|
|
</ws-button>
|
|
|
</template>
|
|
@@ -174,12 +146,11 @@
|
|
|
:data="warehouseList"
|
|
|
style="width: 100%; margin-top: 20px"
|
|
|
height="780"
|
|
|
-
|
|
|
>
|
|
|
<el-table-column type="index" label="序号" width="80">
|
|
|
<template scope="scope">
|
|
|
- <span v-if="scope.$index < 9 ">0{{scope.$index +1}}</span>
|
|
|
- <span v-else>{{scope.$index +1}}</span>
|
|
|
+ <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
|
|
|
+ <span v-else>{{ scope.$index + 1 }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="warehouseName" label="仓库名" width="80">
|
|
@@ -220,26 +191,18 @@
|
|
|
style="height: 24px"
|
|
|
v-for="(item, i) in scope.row.warehouseNumViewList"
|
|
|
>
|
|
|
-
|
|
|
- {{ item.inNetWeight - item.outNetWeight}}
|
|
|
+ {{ item.inNetWeight - item.outNetWeight }}
|
|
|
|
|
|
{{ item.storage }}
|
|
|
-
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="seller" label="出入库" width="300">
|
|
|
<template slot-scope="scope">
|
|
|
- <ws-button
|
|
|
- class="completed"
|
|
|
- @click="nocomplete(scope.row)"
|
|
|
- >
|
|
|
+ <ws-button class="completed" @click="nocomplete(scope.row)">
|
|
|
待完成({{ scope.row.number }})
|
|
|
</ws-button>
|
|
|
- <ws-button
|
|
|
- class="putstorage"
|
|
|
- @click="warehousing(scope.row)"
|
|
|
- >
|
|
|
+ <ws-button class="putstorage" @click="warehousing(scope.row)">
|
|
|
入库
|
|
|
</ws-button>
|
|
|
<ws-button
|
|
@@ -254,8 +217,16 @@
|
|
|
<el-table-column prop="address" label="操作" width="200">
|
|
|
<template slot-scope="scope">
|
|
|
<div class="record" @click="record(scope.row)">记录</div>
|
|
|
- <div class="adjustment" v-if="scope.row.clearStatusFlag==1" @click="clearance(scope.row)">清仓</div>
|
|
|
- <div class="adjustment" v-if="scope.row.clearStatusFlag==3" >已清仓</div>
|
|
|
+ <div
|
|
|
+ class="adjustment"
|
|
|
+ v-if="scope.row.clearStatusFlag == 1"
|
|
|
+ @click="clearance(scope.row)"
|
|
|
+ >
|
|
|
+ 清仓
|
|
|
+ </div>
|
|
|
+ <div class="adjustment" v-if="scope.row.clearStatusFlag == 3">
|
|
|
+ 已清仓
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -302,7 +273,7 @@ export default {
|
|
|
showType: true,
|
|
|
// 年
|
|
|
year: '',
|
|
|
- clearancee:{},
|
|
|
+ clearancee: {},
|
|
|
currentPage: 1,
|
|
|
pageSize: 10,
|
|
|
searchType: 1,
|
|
@@ -331,40 +302,47 @@ export default {
|
|
|
},
|
|
|
activated() {
|
|
|
this.getList()
|
|
|
- this.clearancee()
|
|
|
this.showType = this.isShow
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
//清仓
|
|
|
- clearance(row){
|
|
|
-
|
|
|
- this.$confirm(`清仓操作代表库存已清零,清仓后不可进行出库操作,是否确定清仓`,{
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning',
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- clearancee({ id: row.warehouseId })
|
|
|
- .toPromise()
|
|
|
- .then((response) => {
|
|
|
- this.$notify.success({
|
|
|
- title: '成功',
|
|
|
- message: '状态清仓成功',
|
|
|
- })
|
|
|
- this.getList()
|
|
|
- })
|
|
|
- .catch((response) => {
|
|
|
-
|
|
|
- })
|
|
|
+ clearance(row) {
|
|
|
+ console.log(row.outNumber)
|
|
|
+ if (row.outNumber > 0) {
|
|
|
+ this.$confirm(`你还有未完善的出库记录,请完善提交后再进行操作`, {
|
|
|
+ cancelButtonText: '关闭',
|
|
|
})
|
|
|
- .catch(() => {
|
|
|
- return false
|
|
|
- })
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
-
|
|
|
+ .then(() => {})
|
|
|
+ .catch(() => {
|
|
|
+ return false
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$confirm(
|
|
|
+ `清仓操作代表库存已清零,清仓后不可进行出库操作,是否确定清仓`,
|
|
|
+ {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .then(() => {
|
|
|
+ clearancee({ id: row.warehouseId })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.$notify.success({
|
|
|
+ title: '成功',
|
|
|
+ message: '状态清仓成功',
|
|
|
+ })
|
|
|
+ this.getList()
|
|
|
+ })
|
|
|
+ .catch((response) => {})
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ return false
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
//出库
|
|
|
delivery(item) {
|
|
@@ -376,13 +354,12 @@ export default {
|
|
|
warehouseName: item.warehouseName,
|
|
|
binNumber: item.binNumber,
|
|
|
capacity: item.capacity,
|
|
|
- warehouseType: this.warehouseType
|
|
|
+ warehouseType: this.warehouseType,
|
|
|
},
|
|
|
})
|
|
|
},
|
|
|
//入库
|
|
|
warehousing(item) {
|
|
|
-
|
|
|
var free = 0
|
|
|
for (var i = 0; i < item.warehouseNumViewList.length; i++) {
|
|
|
free += Number(item.warehouseNumViewList[i].storage)
|
|
@@ -397,7 +374,7 @@ export default {
|
|
|
capacity: item.capacity - free,
|
|
|
id: item.id,
|
|
|
warehouseType: this.warehouseType,
|
|
|
- createType: item.createType
|
|
|
+ createType: item.createType,
|
|
|
},
|
|
|
})
|
|
|
},
|
|
@@ -599,7 +576,7 @@ export default {
|
|
|
handleCloe() {
|
|
|
this.dialogViewSpareMoney = false
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
history(row) {
|
|
|
billoperatehis({ id: row.id })
|
|
|
.toPromise()
|