<template>
|
<!-- 包装关系 -->
|
<div style="background-color: white">
|
<!-- <a-spin :spinning="loading"> -->
|
<div class="wms-task-management-detail-div">
|
<div class="drawer-content">
|
<!-- <span style="font-weight:bold;cursor:default;">
|
<a style="cursor:default;">{{ row.no }}</a>单据详情
|
</span> -->
|
物料类型: {{ materialType }}
|
<div style="margin-top: 10px;">
|
<a-table :columns="columns" :data-source="list" row-key="id" :pagination="false" :scroll="{ x: true }">
|
<template slot="index" slot-scope="text, record, index">{{ index + 1 }}</template>
|
<span slot="containerStatusscopedSlots" slot-scope="text">
|
<a-tag :color="text == '1' ? '#daa520' : text == '2' ? '#cd5c5c' : text == '3' ? '#add8e6' : '#696969'">{{
|
'orderdetails_statusenum' | dictType(text)
|
}}</a-tag>
|
</span>
|
|
<!-- <span slot="action" slot-scope="text, record">
|
<a-popconfirm v-if="hasPerm('BaseCustomer:delete')" placement="topRight" title="确认删除?"
|
@confirm="() => itemDelete(record, index)">
|
<a>删除</a>
|
</a-popconfirm>
|
</span> -->
|
</a-table>
|
</div>
|
</div>
|
|
<!-- <p @click="visible = true">新增行</p> -->
|
|
<a-modal title="包装关系" :width="900" :visible="visible" :confirmLoading="confirmLoading" @ok="handleSubmit"
|
@cancel="handleCancel">
|
<show-list ref="showList" @ok="handleOk" />
|
<!-- <a-spin :spinning="confirmLoading"></a-spin> -->
|
</a-modal>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
import { WmsOrderRukuDetail } from '@/api/modular/main/WmsOrderManage'
|
import showList from './index.vue'
|
import {
|
WmsContainerPackagingPage,
|
WmsContainerPackagingDelete,
|
WmsContainerPackagingToExcel
|
} from '@/api/modular/main/WmsBase/WmsContainerPackagingManage'
|
export default {
|
name: 'wmsOrderRukuManagementDetailDrawer',
|
emits: ['update:visible'],
|
props: {
|
visible: {
|
type: Boolean,
|
default: false
|
},
|
row: {
|
type: Object,
|
default: function () {
|
return {}
|
}
|
}
|
},
|
components: {
|
showList
|
},
|
data() {
|
return {
|
loading: false,
|
containerStatusData: [],
|
list: [],
|
columns: [
|
{
|
dataIndex: 'index',
|
title: '序号',
|
fixed: 'left',
|
width: '60',
|
scopedSlots: { customRender: 'index' },
|
align: 'center'
|
},
|
{
|
title: '容器类型名称',
|
align: 'center',
|
customHeaderCell: () => {
|
return {
|
style: {
|
'min-width': '130px' //最小列宽设置
|
}
|
}
|
},
|
customCell: () => {
|
return {
|
style: {
|
'min-width': '130px' //最小列宽设置
|
}
|
}
|
},
|
sorter: true,
|
dataIndex: 'containerTypeName'
|
},
|
{
|
title: '物料类型编号',
|
align: 'center',
|
customHeaderCell: () => {
|
return {
|
style: {
|
'min-width': '130px' //最小列宽设置
|
}
|
}
|
},
|
customCell: () => {
|
return {
|
style: {
|
'min-width': '130px' //最小列宽设置
|
}
|
}
|
},
|
sorter: true,
|
dataIndex: 'materialTypeCode'
|
},
|
{
|
title: '物料类型名称',
|
align: 'center',
|
customHeaderCell: () => {
|
return {
|
style: {
|
'min-width': '130px' //最小列宽设置
|
}
|
}
|
},
|
customCell: () => {
|
return {
|
style: {
|
'min-width': '130px' //最小列宽设置
|
}
|
}
|
},
|
sorter: true,
|
dataIndex: 'materialTypeName'
|
},
|
{
|
title: '物料容器容量',
|
align: 'center',
|
customHeaderCell: () => {
|
return {
|
style: {
|
'min-width': '130px' //最小列宽设置
|
}
|
}
|
},
|
customCell: () => {
|
return {
|
style: {
|
'min-width': '130px' //最小列宽设置
|
}
|
}
|
},
|
sorter: true,
|
dataIndex: 'boxQty'
|
},
|
],
|
// 分页
|
ipagination: {
|
current: 1,
|
pageSize: 10,
|
pageSizeOptions: ['10', '20', '30', '40'],
|
showTotal: (total, range) => {
|
return range[0] + '-' + range[1] + '共' + total + '条'
|
},
|
showQuickJumper: true,
|
showSizeChanger: true,
|
total: 0,
|
size: 'small'
|
},
|
materialType:''
|
}
|
},
|
|
created() {
|
const containerStatusOption = this.$options
|
this.containerStatusData = containerStatusOption.filters['dictData']('orderdetails_statusenum')
|
|
this.columns.push({
|
title: '操作',
|
width: '150px',
|
dataIndex: 'action',
|
scopedSlots: { customRender: 'action' }
|
})
|
},
|
methods: {
|
onClose() {
|
this.close()
|
},
|
close() {
|
this.$emit('update:visible', false)
|
},
|
afterVisibleChange(visible) {
|
if (visible) {
|
this.initShow()
|
} else {
|
this.afterClsoe()
|
}
|
},
|
initShow(materialType) {
|
if(materialType==''||materialType==null||materialType==undefined){
|
this.$message.warning("请选择物料类型")
|
return
|
}
|
this.materialType = materialType
|
this.loading = true
|
this.getList(() => {
|
this.loading = false
|
})
|
},
|
getList(row) {
|
let params = { id: row.id }
|
WmsContainerPackagingPage({
|
// materialTypeCode: 'test2'
|
materialTypeCode: this.materialType
|
})
|
.then(d => {
|
this.list = d.data.rows || []
|
this.$emit('update:visible', true)
|
// callback && callback(true)
|
})
|
.catch(() => {
|
this.$emit('update:visible', false)
|
this.list = []
|
// callback && callback(false)
|
})
|
},
|
afterClsoe() {
|
this.list = []
|
},
|
handleOk(param) {
|
this.list = param
|
},
|
handleSubmit() {
|
this.visible = false
|
},
|
handleCancel() {
|
this.visible = false
|
},
|
itemDelete(record, index) {
|
this.list.splice(index, 1)
|
}
|
}
|
}
|
</script>
|
|
<style lang="less" scoped>
|
.wms-task-management-detail-div {
|
height: 100%;
|
overflow: auto;
|
|
.drawer-content {
|
padding: 16px;
|
}
|
}
|
</style>
|