add:外协发货功能修改

This commit is contained in:
zhangzhiqiang
2023-01-11 17:19:03 +08:00
parent 310a5931d2
commit 10348780b4
6 changed files with 231 additions and 6 deletions

View File

@@ -0,0 +1,135 @@
<template>
<el-dialog
title="库存明细桶查询"
append-to-body
:visible.sync="dialogVisible"
destroy-on-close
width="1000px"
@close="close"
@open="open"
>
<div class="head-container">
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation />
<!--表格渲染-->
<el-table
ref="deviceTable"
v-loading="crud.loading"
:data="crud.data"
style="width: 100%;"
size="mini"
@selection-change="crud.selectionChangeHandler"
>
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="托盘号" />
<el-table-column show-overflow-tooltip prop="bucketunique" label="桶号" width="150px">
<template slot-scope="scope">
<el-link type="warning" @click="openBag(scope.row)">{{ scope.row.bucketunique }}</el-link>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip min-width="130" prop="material_code" label="物料编码" />
<el-table-column show-overflow-tooltip min-width="130" prop="material_name" label="物料名称" />
<el-table-column show-overflow-tooltip prop="material_spec" label="规格" />
<el-table-column show-overflow-tooltip prop="material_model" label="型号" />
<el-table-column show-overflow-tooltip min-width="130" prop="pcsn" label="批次" />
<el-table-column show-overflow-tooltip prop="quality_scode" label="品质类型" :formatter="format_quality_scode"/>
<el-table-column show-overflow-tooltip prop="ivt_level" label="库存等级" :formatter="format_ivt_level"/>
<el-table-column show-overflow-tooltip prop="is_active" label="是否可用" :formatter="format_is_active"/>
<el-table-column show-overflow-tooltip prop="storage_qty" label="重量" :formatter="crud.formatNum3"/>
<el-table-column show-overflow-tooltip prop="record_order" label="顺序号" />
<el-table-column show-overflow-tooltip prop="bag_qty" label="袋数" />
<el-table-column show-overflow-tooltip prop="unit_name" label="单位" />
</el-table>
<!--分页组件-->
<pagination />
<BagDialog :dialog-show.sync="bagDialog" :open-param-one="openParamOne"/>
</div>
</el-dialog>
</template>
<script>
import CRUD, { presenter, header } from '@crud/crud'
import crudOperation from '@crud/CRUD.operation'
import pagination from '@crud/Pagination'
import crudOrderproc from '@/api/wms/pcs/orderproc'
import BagDialog from '@/views/wms/statistics/ivtQuery/BagDialog'
export default {
name: 'ReceiveDialog',
dicts: ['ST_QUALITY_SCODE', 'ST_IVT_LEVEL', 'is_usable'],
components: { crudOperation, pagination, BagDialog },
mixins: [presenter(), header()],
cruds() {
return CRUD({
url: 'api/ivtQuery/bucketQuery',
idField: 'id',
sort: 'id,desc',
crudMethod: { ... crudOrderproc },
optShow: {
add: false,
edit: false,
del: false,
download: false,
reset: false
}
})
},
props: {
dialogShow: {
type: Boolean,
default: false
},
openParam: {
type: String
}
},
data() {
return {
dialogVisible: false,
openParamOne: null,
bagDialog: false
}
},
watch: {
dialogShow: {
handler(newValue, oldValue) {
this.dialogVisible = newValue
this.crud.query.storagevehicle_code = this.openParam
}
}
},
methods: {
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
done()
})
.catch(_ => {
})
},
close() {
this.$emit('update:dialogShow', false)
},
open() {
this.crud.toQuery()
},
format_quality_scode(row, column) {
return this.dict.label.ST_QUALITY_SCODE[row.quality_scode]
},
format_ivt_level(row, column) {
return this.dict.label.ST_IVT_LEVEL[row.ivt_level]
},
format_is_active(row, column) {
return this.dict.label.is_usable[row.is_active]
},
openBag(row) {
this.openParamOne = row.bucketunique
this.bagDialog = true
}
}
}
</script>
<style scoped>
</style>

View File

@@ -121,6 +121,16 @@
>
确认发货
</el-button>
<el-button
slot="right"
class="filter-item"
type="success"
icon="el-icon-check"
size="mini"
@click="downExcel"
>
导出Excel
</el-button>
</crudOperation>
<!--表格渲染-->
<el-table
@@ -140,7 +150,11 @@
<el-table-column prop="pcsn" label="批次" min-width="100" />
<el-table-column :formatter="crud.formatNum3" prop="workorder_qty" label="重量" width="150px" />
<el-table-column prop="workorder_status" label="工令状态" width="150px" :formatter="stateFormat" />
<el-table-column prop="storagevehicle_code" label="托盘号" />
<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>
</template>
</el-table-column>
<el-table-column prop="num_bucket" label="桶数" />
<el-table-column prop="total_qty" label="托盘重量" min-width="120px" />
<el-table-column prop="create_name" label="组盘人" />
@@ -154,6 +168,7 @@
<!--分页组件-->
<pagination />
</div>
<BucketDialog :dialog-show.sync="bucketDialog" :open-param="openParam" />
</div>
</template>
@@ -165,11 +180,14 @@ import crudOperation from '@crud/CRUD.operation'
import pagination from '@crud/Pagination'
import report from '@/api/wms/statistics/report'
import workorder from '@/api/wms/pdm/workorder'
import BucketDialog from '@/views/wms/statistics/sendOutQuery/BucketDialog'
import { download } from '@/api/data'
import { downloadFile } from '@/utils'
export default {
name: 'SendOutQuery',
dicts: ['workorder_status', 'ST_INV_TYPE_RC'],
components: { pagination, crudOperation, rrOperation },
components: { pagination, crudOperation, rrOperation, BucketDialog },
mixins: [presenter(), header(), crud()],
cruds() {
return CRUD({
@@ -181,7 +199,7 @@ export default {
// 每页数据条数
size: 20
},
query: { is_send: '1' },
query: { },
crudMethod: { ...crudInspectionsheetmst },
optShow: {
add: false,
@@ -193,12 +211,13 @@ export default {
},
data() {
return {
bucketDialog: false,
statusList: [],
resultList: [],
currentRow: {},
Depts: [],
resultPutDialog: false,
openParam: {},
openParam: null,
query_flag: true,
passList: [
{ 'label': '未出库', 'value': '0' },
@@ -221,6 +240,17 @@ export default {
checkboxT(row) {
return row.is_send === '1'
},
downExcel() {
if (this.currentRow !== null) {
crud.downloadLoading = true
download('/api/statistical/download', this.crud.query).then(result => {
downloadFile(result, '外协发货单', 'xlsx')
crud.downloadLoading = false
}).catch(() => {
crud.downloadLoading = false
})
}
},
typeChange() {
this.checkrows = this.$refs.table.selection
this.$confirm('是否确认发货?', '提示', {
@@ -233,6 +263,10 @@ export default {
})
})
},
openBucket(row) {
this.openParam = row.storagevehicle_code
this.bucketDialog = true
},
orgFormat(row) {
for (const item of this.Depts) {
if (item.id === row.org_id) {