|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<a-card size="small" :bordered="false" class="warehousingConfirmationList-wrap">
|
|
<a-card size="small" :bordered="false" class="warehousingConfirmationList-wrap">
|
|
- <a-spin :spinning="spinning" tip="Loading...">
|
|
|
|
|
|
+ <a-spin :spinning="spinning" tip="Loading...">
|
|
<!-- 搜索条件 -->
|
|
<!-- 搜索条件 -->
|
|
<div class="table-page-search-wrapper">
|
|
<div class="table-page-search-wrapper">
|
|
<a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
<a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
@@ -29,7 +29,7 @@
|
|
</a-form>
|
|
</a-form>
|
|
</div>
|
|
</div>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
- <div style="margin-bottom: 15px">
|
|
|
|
|
|
+ <div v-if="$hasPermissions('B_warehousingConfirmationpl')" style="margin-bottom: 15px">
|
|
<a-button type="primary" id="warehousingConfirmationList-export" :loading="loading" @click="handleBatchAudit">批量确认</a-button>
|
|
<a-button type="primary" id="warehousingConfirmationList-export" :loading="loading" @click="handleBatchAudit">批量确认</a-button>
|
|
<span style="margin-left: 8px">
|
|
<span style="margin-left: 8px">
|
|
<template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
|
|
<template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
|
|
@@ -47,14 +47,14 @@
|
|
bordered>
|
|
bordered>
|
|
<!-- 入库单号 -->
|
|
<!-- 入库单号 -->
|
|
<template slot="stockPutNo" slot-scope="text, record">
|
|
<template slot="stockPutNo" slot-scope="text, record">
|
|
- <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.stockPutNo }}</span>
|
|
|
|
|
|
+ <span :class="$hasPermissions('B_warehousingConfirmationDetail')?'active':'common'" @click="handleDetail(record)">{{ record.stockPutNo }}</span>
|
|
</template>
|
|
</template>
|
|
<!-- 操作 -->
|
|
<!-- 操作 -->
|
|
<template slot="action" slot-scope="text, record">
|
|
<template slot="action" slot-scope="text, record">
|
|
<a-button
|
|
<a-button
|
|
size="small"
|
|
size="small"
|
|
type="link"
|
|
type="link"
|
|
- v-if="record.auditState=='WAIT'"
|
|
|
|
|
|
+ v-if="record.auditState=='WAIT' && $hasPermissions('B_warehousingConfirmationAlone')"
|
|
class="button-warning"
|
|
class="button-warning"
|
|
@click="handleAudit(record)"
|
|
@click="handleAudit(record)"
|
|
id="warehousingConfirmationList-audit-btn">入库确认</a-button>
|
|
id="warehousingConfirmationList-audit-btn">入库确认</a-button>
|
|
@@ -142,17 +142,21 @@ export default {
|
|
return this.selectedRowKeys.length > 0
|
|
return this.selectedRowKeys.length > 0
|
|
},
|
|
},
|
|
rowSelection () {
|
|
rowSelection () {
|
|
- return {
|
|
|
|
- selectedRowKeys: this.selectedRowKeys,
|
|
|
|
- onChange: (selectedRowKeys, selectedRows) => {
|
|
|
|
- console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
|
|
|
|
- this.onSelectChange(selectedRowKeys)
|
|
|
|
- },
|
|
|
|
- getCheckboxProps: record => ({
|
|
|
|
- props: {
|
|
|
|
- disabled: record.auditState != 'WAIT'
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ if (this.$hasPermissions('B_warehousingConfirmationpl')) {
|
|
|
|
+ return {
|
|
|
|
+ selectedRowKeys: this.selectedRowKeys,
|
|
|
|
+ onChange: (selectedRowKeys, selectedRows) => {
|
|
|
|
+ console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
|
|
|
|
+ this.onSelectChange(selectedRowKeys)
|
|
|
|
+ },
|
|
|
|
+ getCheckboxProps: record => ({
|
|
|
|
+ props: {
|
|
|
|
+ disabled: record.auditState != 'WAIT'
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ return null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -165,9 +169,11 @@ export default {
|
|
},
|
|
},
|
|
// 详情
|
|
// 详情
|
|
handleDetail (row) {
|
|
handleDetail (row) {
|
|
- this.itemSn = row.stockPutSn
|
|
|
|
- this.nowData = row
|
|
|
|
- this.openModal = true
|
|
|
|
|
|
+ if (this.$hasPermissions('B_warehousingConfirmationDetail')) {
|
|
|
|
+ this.itemSn = row.stockPutSn
|
|
|
|
+ this.nowData = row
|
|
|
|
+ this.openModal = true
|
|
|
|
+ }
|
|
},
|
|
},
|
|
closeModal () {
|
|
closeModal () {
|
|
this.itemSn = ''
|
|
this.itemSn = ''
|
|
@@ -175,18 +181,18 @@ export default {
|
|
this.openModal = false
|
|
this.openModal = false
|
|
},
|
|
},
|
|
// 通过
|
|
// 通过
|
|
- handleConfirmationOk(){
|
|
|
|
- if(this.isBatch){ // 批量
|
|
|
|
|
|
+ handleConfirmationOk () {
|
|
|
|
+ if (this.isBatch) { // 批量
|
|
this.auditOrder(this.selectedRowKeys, true)
|
|
this.auditOrder(this.selectedRowKeys, true)
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
this.auditOrder([this.confirmationInfo.stockPutSn], true)
|
|
this.auditOrder([this.confirmationInfo.stockPutSn], true)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 不通过
|
|
// 不通过
|
|
- handleConfirmationFail(){
|
|
|
|
- if(this.isBatch){ // 批量
|
|
|
|
|
|
+ handleConfirmationFail () {
|
|
|
|
+ if (this.isBatch) { // 批量
|
|
this.auditOrder(this.selectedRowKeys, false)
|
|
this.auditOrder(this.selectedRowKeys, false)
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
this.auditOrder([this.confirmationInfo.stockPutSn], false)
|
|
this.auditOrder([this.confirmationInfo.stockPutSn], false)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -215,7 +221,7 @@ export default {
|
|
_this.$refs.table.refresh()
|
|
_this.$refs.table.refresh()
|
|
_this.confirmationModal = false
|
|
_this.confirmationModal = false
|
|
_this.spinning = false
|
|
_this.spinning = false
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
_this.confirmationModal = false
|
|
_this.confirmationModal = false
|
|
_this.spinning = false
|
|
_this.spinning = false
|
|
}
|
|
}
|
|
@@ -245,6 +251,13 @@ export default {
|
|
margin-top: 20px;
|
|
margin-top: 20px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ .active{
|
|
|
|
+ color: #ed1c24;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ }
|
|
|
|
+ .common{
|
|
|
|
+ color: #000;
|
|
|
|
+ }
|
|
.confirmation-modal{
|
|
.confirmation-modal{
|
|
.ant-modal-body{
|
|
.ant-modal-body{
|
|
padding: 32px 32px 24px;
|
|
padding: 32px 32px 24px;
|