opt:代码优化
This commit is contained in:
@@ -90,15 +90,14 @@
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { crud, header, presenter } from '@crud/crud'
|
||||
import CRUD, { header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudSectattr from '@/views/wms/basedata/sectattr/sectattr'
|
||||
|
||||
export default {
|
||||
name: 'StructDiv',
|
||||
components: { crudOperation, rrOperation, pagination },
|
||||
components: { rrOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '库存物料',
|
||||
|
||||
@@ -58,6 +58,8 @@
|
||||
<el-table-column width="200" prop="pcsn" label="批次号" />
|
||||
<el-table-column show-overflow-tooltip width="170" prop="qty" label="数量" />
|
||||
<el-table-column show-overflow-tooltip width="170" prop="qty_unit_name" label="计量单位名称" />
|
||||
<el-table-column prop="ext_code" label="来源单号" :min-width="flexWidth('ext_code',crud.data,'来源单号')" />
|
||||
<el-table-column prop="ext_type" label="来源单据类型" :min-width="flexWidth('ext_type',crud.data,'来源单据类型')" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
|
||||
@@ -1,113 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="载具明细"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
width="1000px"
|
||||
@close="close"
|
||||
>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table2"
|
||||
:data="this.bucketParam"
|
||||
style="width: 100%;"
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@select="handleSelectionChange"
|
||||
@select-all="onSelectAll"
|
||||
>
|
||||
<el-table-column prop="bucketunique" label="桶号" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="label" label="桶类别" />
|
||||
<el-table-column prop="material_code" label="物料编码" width="120px" />
|
||||
<el-table-column prop="material_name" label="物料名称" min-width="120" />
|
||||
<el-table-column prop="pcsn" label="批次" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="storage_qty" label="数量">
|
||||
<template slot-scope="scope">
|
||||
{{ fun(scope.row.storage_qty) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="qty_unit_name" label="单位" />
|
||||
<el-table-column prop="quality_scode" :formatter="qualityFormat" label="品质类型" />
|
||||
<el-table-column prop="ivt_level" :formatter="ivtFormat" label="库存等级" />
|
||||
<el-table-column prop="is_active" :formatter="activeFormat" label="是否可用" />
|
||||
<el-table-column prop="storagevehicle_code" label="载具号" />
|
||||
<el-table-column prop="record_order" label="顺序号" />
|
||||
<el-table-column prop="bag_qty" label="袋数" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
||||
export default {
|
||||
name: 'BucketDtlDiv',
|
||||
components: { crudOperation, pagination },
|
||||
mixins: [crud()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
bucketParam: {
|
||||
type: Array,
|
||||
default: () => { return [] }
|
||||
}
|
||||
},
|
||||
dicts: ['MD_BUCKET_TYPE', 'bucket_status', 'ST_QUALITY_SCODE', 'ST_IVT_LEVEL', 'IS_OR_NOT'],
|
||||
data() {
|
||||
return {
|
||||
sects: [],
|
||||
classes: [],
|
||||
dialogVisible: false,
|
||||
checkrow: {},
|
||||
rows: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
fun(val) {
|
||||
return Number(val).toFixed(3)
|
||||
},
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
if (val.length > 1) {
|
||||
this.$refs.table.clearSelection()
|
||||
this.$refs.table.toggleRowSelection(val.pop())
|
||||
} else {
|
||||
this.checkrow = row
|
||||
}
|
||||
},
|
||||
onSelectAll() {
|
||||
this.$refs.table.clearSelection()
|
||||
},
|
||||
close() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
qualityFormat(row, column) {
|
||||
return this.dict.label.ST_QUALITY_SCODE[row.quality_scode]
|
||||
},
|
||||
ivtFormat(row, column) {
|
||||
return this.dict.label.ST_IVT_LEVEL[row.ivt_level]
|
||||
},
|
||||
activeFormat(row, column) {
|
||||
return this.dict.label.IS_OR_NOT[row.is_active]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
<!-- <el-table-column prop="sap_pcsn" label="SAP批次号" width="150" align="center" />-->
|
||||
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||
<el-table-column prop="qty_unit_name" label="单位" align="center" />
|
||||
<el-table-column prop="source_bill_type" label="源单类型" align="center" width="130px" :formatter="invtypeFormat" />
|
||||
<el-table-column prop="source_bill_type" label="源单类型" align="center" width="130px" />
|
||||
<el-table-column prop="source_bill_code" label="源单号" align="center" width="130px" />
|
||||
<el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center" />
|
||||
</el-table>
|
||||
|
||||
@@ -218,7 +218,6 @@ import DateRangePicker from '@/components/DateRangePicker/index'
|
||||
import AddDialog from '@/views/wms/st/inbill/AddDialog'
|
||||
import DivDialog from '@/views/wms/st/inbill/DivDialog'
|
||||
import ViewDialog from '@/views/wms/st/inbill/ViewDialog'
|
||||
// import TaskDialog from '@/views/wms/st/inbill/TaskDialog'
|
||||
import { mapGetters } from 'vuex'
|
||||
import crudBsrealstorattr from '@/views/wms/basedata/bsrealstorattr/bsrealstorattr'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user