add:添加调拨其他出库下推功能 fix:修复sys菜单组件名称问题
This commit is contained in:
@@ -26,8 +26,9 @@
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<crudOperation :permission="permission">
|
||||
<el-button slot="right" class="filter-item" type="warning" icon="el-icon-s-promotion" size="mini" :disabled="audit_flag" @click="issueReturnBill">下发回传单</el-button>
|
||||
<crudOperation>
|
||||
<el-button slot="right" class="filter-item" type="warning" icon="el-icon-s-promotion" size="mini" :disabled="audit_flag" @click="issueReturnBill">下发回传</el-button>
|
||||
<el-button slot="right" class="filter-item" type="success" icon="el-icon-s-promotion" size="mini" :disabled="!multipleSelection.length || multipleSelection.length>1" @click="handleBatchPush">下推出库</el-button>
|
||||
</crudOperation>
|
||||
<el-table ref="table" v-loading="crud.loading" size="mini" :data="crud.data" highlight-current-row style="width: 100%;" @selection-change="crud.selectionChangeHandler" @current-change="handleCurrentChange" @select="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
@@ -76,7 +77,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudPurchase from '@/views/wms/pm_manage/allocationOut/purchase'
|
||||
import crudPurchase, {outPush} from '@/views/wms/pm_manage/allocationOut/purchase'
|
||||
import CRUD, { crud, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
@@ -84,6 +85,7 @@ import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import AddDialog from '@/views/wms/pm_manage/purchase/AddDialog'
|
||||
import ViewDialog from '@/views/wms/pm_manage/purchase/ViewDialog'
|
||||
import {push} from "@/views/wms/pm_manage/demand/demand";
|
||||
|
||||
export default {
|
||||
name: 'AllocationOut',
|
||||
@@ -106,6 +108,7 @@ export default {
|
||||
edit: ['admin', 'purchasemst:edit'],
|
||||
del: ['admin', 'purchasemst:del']
|
||||
},
|
||||
multipleSelection: [],
|
||||
viewShow: false,
|
||||
mstrow: {},
|
||||
currentRow: null,
|
||||
@@ -129,6 +132,34 @@ export default {
|
||||
const map = { '0': '未审核', '1': '已审核' }
|
||||
return map[row.status] || row.status || '-'
|
||||
},
|
||||
handleBatchPush() {
|
||||
if (!this.multipleSelection.length) {
|
||||
this.$message.warning('请先勾选要下推的调拨出库单')
|
||||
return
|
||||
}
|
||||
// eslint-disable-next-line eqeqeq
|
||||
const invalidRows = this.multipleSelection.filter(item => String(item.bill_status) === '99')
|
||||
if (invalidRows.length) {
|
||||
this.$message.warning('仅支持批量下推状态为“分配”的需求单')
|
||||
return
|
||||
}
|
||||
this.$confirm(`确认批量下推已勾选的 ${this.multipleSelection.length} 条需求单吗?`, '提示', {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
crudPurchase.outPush(this.multipleSelection[0]).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('下推成功')
|
||||
this.crud.toQuery()
|
||||
} else {
|
||||
this.$message.error(res.message)
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('下推失败')
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
formatDate(val) {
|
||||
if (!val) return ''
|
||||
if (typeof val === 'string') return val
|
||||
@@ -156,6 +187,7 @@ export default {
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
console.log(val.length)
|
||||
this.multipleSelection = val
|
||||
if (val.length == 0) {
|
||||
this.audit_flag = true
|
||||
} else {
|
||||
|
||||
@@ -54,5 +54,12 @@ export function pushZD(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
export function outPush(data) {
|
||||
return request({
|
||||
url: '/api/purchasemst/outPush',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, get, issueReturnBill, print, pushZD }
|
||||
export default { add, edit, del, get, issueReturnBill, print, pushZD, outPush }
|
||||
|
||||
@@ -20,10 +20,9 @@
|
||||
<rrOperation :crud="crud" />
|
||||
</el-form>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;">
|
||||
<crudOperation :permission="permission" />
|
||||
<el-button size="mini" type="success" :disabled="!multipleSelection.length" @click="handleBatchPush">下推</el-button>
|
||||
</div>
|
||||
<crudOperation :permission="permission" >
|
||||
<el-button slot="right" class="filter-item" type="success" icon="el-icon-s-promotion" size="mini" :disabled="!multipleSelection.length" @click="handleBatchPush">下推出库</el-button>
|
||||
</crudOperation>
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="900px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="110px" label-suffix=":" style="border: 1px solid #cfe0df;margin-top: 10px;padding: 10px;">
|
||||
<el-row>
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
</div>
|
||||
<crudOperation :permission="permission">
|
||||
<el-button slot="right" class="filter-item" type="warning" icon="el-icon-s-promotion" size="mini" :disabled="audit_flag" @click="issueReturnBill">下发回传单</el-button>
|
||||
<el-button slot="right" class="filter-item" type="success" icon="el-icon-s-promotion" size="mini" :disabled="!multipleSelection.length || multipleSelection.length>1" @click="handleBatchPush">下推出库</el-button>
|
||||
</crudOperation>
|
||||
<el-table ref="table" v-loading="crud.loading" size="mini" :data="crud.data" highlight-current-row style="width: 100%;" @selection-change="crud.selectionChangeHandler" @current-change="handleCurrentChange" @select="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
@@ -108,6 +109,7 @@ export default {
|
||||
},
|
||||
viewShow: false,
|
||||
mstrow: {},
|
||||
multipleSelection: [],
|
||||
currentRow: null,
|
||||
audit_flag: true,
|
||||
billStatusOptions: [
|
||||
@@ -173,6 +175,35 @@ export default {
|
||||
querytable() {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
handleBatchPush() {
|
||||
if (!this.multipleSelection.length) {
|
||||
this.$message.warning('请先勾选要下推的调拨出库单')
|
||||
return
|
||||
}
|
||||
// eslint-disable-next-line eqeqeq
|
||||
const invalidRows = this.multipleSelection.filter(item => String(item.bill_status) === '99')
|
||||
if (invalidRows.length) {
|
||||
this.$message.warning('仅支持批量下推状态为“分配”的需求单')
|
||||
return
|
||||
}
|
||||
this.$confirm(`确认批量下推已勾选的 ${this.multipleSelection.length} 条需求单吗?`, '提示', {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
crudPurchase.outPush(this.multipleSelection[0]).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('下推成功')
|
||||
this.crud.toQuery()
|
||||
} else {
|
||||
this.$message.error(res.message)
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('下推失败')
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
|
||||
issueReturnBill() {
|
||||
const selections = this.crud.selections
|
||||
if (!selections || selections.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user