This commit is contained in:
zds
2022-11-14 19:54:37 +08:00
parent fcd828d13f
commit 06a3ea258d
19 changed files with 582 additions and 142 deletions

View File

@@ -62,7 +62,7 @@
>
<el-table-column type="index" label="序号" width="100" align="center" />
<template v-for="(col,index) in cols">
<el-table-column v-if="col" :prop="col.prop" :label="col.label" />
<el-table-column v-if="col" :prop="col.prop" width="90" :label="col.label" />
</template>
</el-table>
<!--分页组件-->

View File

@@ -198,15 +198,15 @@
>
<el-table-column type="selection" width="55" />
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column show-overflow-tooltip prop="bill_code" width="130" label="订单编码" />
<el-table-column show-overflow-tooltip :formatter="stateFormat" width="100" prop="bill_status" label="单据状态" />
<el-table-column prop="bill_code" width="130" label="订单编码" />
<el-table-column :formatter="stateFormat" width="100" prop="bill_status" label="单据状态" />
<el-table-column prop="stor_name" label="仓库" width="100" />
<el-table-column prop="io_type" label="出入库类型" :formatter="ioFormat" min-width="100" show-overflow-tooltip />
<el-table-column show-overflow-tooltip prop="bill_type" :formatter="bill_typeFormat" min-width="120" label="业务类型" />
<el-table-column show-overflow-tooltip width="135" prop="biz_date" label="业务日期" />
<el-table-column show-overflow-tooltip :formatter="create_modeFormat" prop="create_mode" label="生成方式" width="100" />
<el-table-column prop="io_type" label="出入库类型" :formatter="ioFormat" min-width="100" />
<el-table-column prop="bill_type" :formatter="bill_typeFormat" min-width="120" label="业务类型" />
<el-table-column width="135" prop="biz_date" label="业务日期" />
<el-table-column :formatter="create_modeFormat" prop="create_mode" label="生成方式" width="100" />
<el-table-column label="明细数" align="center" prop="detail_count" width="100" />
<el-table-column label="总重量" align="center" prop="total_qty">
<el-table-column label="总重量" align="center" prop="total_qty" width="100">
<template slot-scope="scope">
{{ fun(scope.row.total_qty) }}
</template>
@@ -247,7 +247,7 @@ export default {
props: {
// 每页数据条数
size: 20
},idField: 'iostorinv_id', url: 'api/checkoutbill', crudMethod: { ...checkoutbill },
},idField: 'iostorinv_id', url: 'api/checkoutbill/checkoutbill2', crudMethod: { ...checkoutbill },
optShow: {
add: false,
edit: false,

View File

@@ -160,7 +160,7 @@
<el-table-column prop="stor_name" label="仓库" />
<el-table-column prop="sect_name" label="库区" min-width="100" />
<el-table-column prop="struct_code" label="货位编码" width="120" />
<el-table-column prop="struct_name" label="货位名称" min-width="150" show-overflow-tooltip />
<el-table-column prop="struct_name" label="货位名称" min-width="150" />
<el-table-column prop="storagevehicle_code" label="托盘号">
<template slot-scope="scope">
<el-link type="warning" @click="openBucket(scope.row)">{{ scope.row.storagevehicle_code }}</el-link>
@@ -174,11 +174,11 @@
<el-table-column prop="quality_scode" label="品质类型" :formatter="format_quality_scode" />
<el-table-column prop="ivt_level" label="库存等级" :formatter="format_ivt_level" />
<el-table-column prop="is_active" label="是否可用" :formatter="format_is_active" />
<el-table-column prop="bucket_num" :formatter="crud.formatNum0" label="桶数" min-width="80" />
<el-table-column prop="ivt_qty" label="库存重量" :formatter="formatQty" />
<el-table-column prop="canuse_qty" label="可用重量" :formatter="formatQty" />
<el-table-column prop="frozen_qty" label="冻结数" :formatter="formatQty" />
<el-table-column prop="warehousing_qty" label="待入数" :formatter="formatQty" />
<el-table-column prop="bucket_num" :formatter="crud.formatNum0" label="桶数" min-width="100" />
<el-table-column prop="ivt_qty" label="库存重量" :formatter="formatQty" min-width="100" />
<el-table-column prop="canuse_qty" label="可用重量" :formatter="formatQty" min-width="100" />
<el-table-column prop="frozen_qty" label="冻结数" :formatter="formatQty" min-width="100" />
<el-table-column prop="warehousing_qty" label="待入数" :formatter="formatQty" min-width="100" />
<el-table-column prop="qty_unit_name" label="单位" />
<el-table-column prop="instorage_time" label="入库时间" width="135" />
</el-table>

View File

@@ -62,6 +62,7 @@
<el-table-column prop="material_code" label="物料编码" width="150" align="center"/>
<el-table-column prop="old_mark" label="粉料牌号" width="150" align="center"/>
<el-table-column min-width="90" prop="pcsn" label="批次号" align="center"/>
<el-table-column prop="org_id" :formatter="orgFormat" min-width="105" label="所属组织" />
<el-table-column prop="qty" label="入库重量" :formatter="crud.formatNum3" width="150" align="center"/>
<el-table-column prop="create_time" label="入库时间" width="150" align="center"/>
<el-table-column prop="create_name" label="操作工" align="center" width="110px"/>
@@ -85,6 +86,7 @@ import crudStorattr from '@/api/wms/basedata/st/storattr'
import Date from '@/utils/datetime'
import StructIvt from '@/views/wms/statistics/outStorQuery/StructIvt'
import crudRawAssist from '@/api/wms/st/core/inbill/rawassist'
import workorder from '@/api/wms/pdm/workorder'
const start = new Date()
export default {
@@ -119,6 +121,8 @@ export default {
structshow: false,
currentRow: null,
storlist: [],
sum: 0,
Depts: [],
billtypelist: []
}
},
@@ -135,6 +139,9 @@ export default {
crudRawAssist.getType({ 'io_code': '0103', 'io_flag': '01' }).then(res => {
this.billtypelist = res
})
workorder.getDepts().then(res => {
this.Depts = res
})
},
methods: {
onInput() {
@@ -143,6 +150,13 @@ export default {
async queryMater() {
this.structshow = true
},
orgFormat(row) {
for (const item of this.Depts) {
if (item.id === row.org_id) {
return item.name
}
}
},
queryTableDtl(rows) {
let devices = ''
for (let i = 0; i < rows.length; i++) {

View File

@@ -81,24 +81,20 @@
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission"/>
<!--表格渲染-->
<el-table ref="table" :cell-style="cellStyleMst" show-summary :summary-method="getSum" :max-height="590" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
<el-table ref="table" :cell-style="cellStyleMst" :max-height="590" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
<el-table-column prop="stor_name" label="仓库"/>
<el-table-column prop="class_code" label="物料分类编码" width="100px" />
<el-table-column prop="class_name" label="物料分类名称" width="100px" />
<el-table-column prop="material_code" label="物料编码" min-width="150" show-overflow-tooltip/>
<el-table-column prop="material_name" label="物料名称" min-width="150" show-overflow-tooltip/>
<el-table-column prop="material_model" label="型号/牌号" min-width="150" show-overflow-tooltip/>
<el-table-column prop="material_code" label="物料编码" min-width="150" />
<el-table-column prop="material_name" label="物料名称" min-width="150" />
<el-table-column prop="material_model" label="型号/牌号" min-width="150" />
<el-table-column prop="unit_name" label="主单位"/>
<el-table-column prop="pcsn" label="批次号" min-width="120" show-overflow-tooltip/>
<el-table-column prop="dept_name" label="所属组织" min-width="120" show-overflow-tooltip/>
<!-- <el-table-column prop="quality_scode" label="品质类型" :formatter="formatQualityName" />-->
<el-table-column prop="pcsn" label="批次号" min-width="120" />
<el-table-column prop="dept_name" label="所属组织" min-width="120" />
<el-table-column prop="ivt_level" label="质量等级" :formatter="formatIvtName" />
<!-- <el-table-column prop="is_active" label="是否可用" :formatter="formatIsName" />-->
<el-table-column prop="start_num" label="期初主数量" :formatter="crud.formatNum3" width="100px" />
<el-table-column prop="in_num" label="入库主数量" :formatter="crud.formatNum3" width="100px" />
<el-table-column prop="out_num" label="出库主数量" :formatter="crud.formatNum3" width="100px" />
<!-- <el-table-column prop="less_num" label="其他出" :formatter="crud.formatNum3"/>-->
<!-- <el-table-column prop="more_num" label="其他入" :formatter="crud.formatNum3"/>-->
<el-table-column prop="end_num" label="结存主数量" :formatter="crud.formatNum3" width="100px" />
</el-table>
<!--分页组件-->
@@ -251,83 +247,6 @@ export default {
return '否'
}
},
getSum(param) {
// 将所有number的字段合计
const {columns, data} = param
const sums = []
let values = []
columns.forEach((column, index) => {
if (index === 1) {
sums[index] = '合计'
return
}
values = data.map(item => Number(item[column.property]))
if (column.property === 'start_num') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] = sums[index].toFixed(3) + 'kg' // 保留三位小数
} else if (column.property === 'in_num') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] = sums[index].toFixed(3) + 'kg' // 保留三位小数
} else if (column.property === 'out_num') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] = sums[index].toFixed(3) + 'kg' // 保留三位小数
} else if (column.property === 'end_num') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] = sums[index].toFixed(3) + 'kg' // 保留三位小数
} else if (column.property === 'more_num') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] = sums[index].toFixed(3) + 'kg' // 保留三位小数
} else if (column.property === 'less_num') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] = sums[index].toFixed(3) + 'kg' // 保留三位小数
} else {
sums[index] = '--'
}
})
return sums
},
cellStyleMst({ row, column, rowIndex, columnIndex }) {
if (column.property === 'dept_name') {
if (row.is_yellow !== undefined) {