李永德
1 year ago
23 changed files with 530 additions and 69 deletions
@ -0,0 +1,14 @@ |
|||
package org.nl.wms.ext.mes.service.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Author: lyd |
|||
* @Description: 客户信息 |
|||
* @Date: 2023/10/23 |
|||
*/ |
|||
@Data |
|||
public class CusterVo { |
|||
private String CUSTER_NO; |
|||
private String CUSTER_NAME; |
|||
} |
@ -0,0 +1,27 @@ |
|||
package org.nl.wms.ext.mes.service.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Author: lyd |
|||
* @Description: mes的订单信息DTO |
|||
* @Date: 2023/10/23 |
|||
*/ |
|||
@Data |
|||
public class MesOrderInfo { |
|||
/** |
|||
* 订单号 |
|||
*/ |
|||
private String FORDER_NO; |
|||
private String FPLANSTART_DATE; |
|||
private String FPLANFINISH_DATE; |
|||
private String FMATERIAL_ID; |
|||
private String FMATERIAL_NAME; |
|||
private String FMATSPEC; |
|||
private String FMATMODEL; |
|||
private String FSALE_NO; |
|||
private int FORDER_SUBNUM; |
|||
private String BC; |
|||
private String BZ; |
|||
private int GUADANSUM; |
|||
} |
@ -0,0 +1,143 @@ |
|||
<template> |
|||
<el-dialog |
|||
title="选择包装订单" |
|||
append-to-body |
|||
:visible.sync="dialogVisible" |
|||
destroy-on-close |
|||
width="1000px" |
|||
@close="close" |
|||
@open="open" |
|||
> |
|||
<!--表格渲染--> |
|||
<el-table |
|||
ref="table" |
|||
v-loading="crud.loading" |
|||
:data="crud.data" |
|||
style="width: 100%;" |
|||
size="mini" |
|||
border |
|||
:cell-style="{'text-align':'center'}" |
|||
:header-cell-style="{background:'#f5f7fa',color:'#606266','text-align':'center'}" |
|||
@select="handleSelectionChange" |
|||
@select-all="onSelectAll" |
|||
@current-change="clickChange" |
|||
> |
|||
<el-table-column v-if="!isSingle" type="selection" width="55" /> |
|||
<el-table-column v-if="isSingle" label="选择" width="55"> |
|||
<template slot-scope="scope"> |
|||
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="FORDER_NO" label="订单号" width="160" /> |
|||
<el-table-column prop="FORDER_SUBNUM" label="总数量" width="160" /> |
|||
<el-table-column prop="GUADANSUM" label="包装数量" width="160" /> |
|||
<el-table-column prop="FMATERIAL_NAME" label="物料名称" width="180" show-overflow-tooltip /> |
|||
<el-table-column prop="FMATSPEC" label="物料规格" width="140" /> |
|||
<el-table-column prop="FMATMODEL" label="物料型号" width="130px" /> |
|||
</el-table> |
|||
<!--分页组件--> |
|||
<pagination /> |
|||
<span slot="footer" class="dialog-footer"> |
|||
<el-button @click="dialogVisible = false">取 消</el-button> |
|||
<el-button type="primary" @click="submit">确 定</el-button> |
|||
</span> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<script> |
|||
import CRUD, { header, presenter } from '@crud/crud' |
|||
import rrOperation from '@crud/RR.operation' |
|||
import pagination from '@crud/Pagination' |
|||
import '@riophae/vue-treeselect/dist/vue-treeselect.css' |
|||
|
|||
export default { |
|||
name: 'ProductionOrder', |
|||
components: { rrOperation, pagination }, |
|||
dicts: ['is_used'], |
|||
cruds() { |
|||
return CRUD({ |
|||
title: '包装订单', |
|||
url: 'api/pdmBdWorkorder/mesOrder', |
|||
optShow: {}, |
|||
query: { |
|||
material_code: null |
|||
} |
|||
}) |
|||
}, |
|||
mixins: [presenter(), header()], |
|||
props: { |
|||
dialogShow: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
isSingle: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
materialCode: { |
|||
type: String, |
|||
default: null |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
dialogVisible: false, |
|||
tableRadio: null, |
|||
tableData: [] |
|||
} |
|||
}, |
|||
watch: { |
|||
dialogShow: { |
|||
handler(newValue) { |
|||
this.dialogVisible = newValue |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
clickChange(item) { |
|||
this.tableRadio = item |
|||
}, |
|||
open() { |
|||
this.crud.query.materialId = this.materialCode |
|||
this.crud.toQuery() |
|||
}, |
|||
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.crud.resetQuery(false) |
|||
this.$emit('update:dialogShow', false) |
|||
}, |
|||
submit() { |
|||
// 处理单选 |
|||
if (this.isSingle && this.tableRadio) { |
|||
this.$emit('update:dialogShow', false) |
|||
this.$emit('recordMesOrder', this.tableRadio) |
|||
return |
|||
} |
|||
this.rows = this.$refs.table.selection |
|||
if (this.rows.length <= 0) { |
|||
this.$message('请先勾选订单') |
|||
return |
|||
} |
|||
this.crud.resetQuery(false) |
|||
this.$emit('update:dialogShow', false) |
|||
this.$emit('recordMesOrder', this.rows) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style rel="stylesheet/scss" lang="scss" scoped> |
|||
::v-deep .el-dialog__body { |
|||
padding-top: 0px; |
|||
} |
|||
</style> |
|||
|
Loading…
Reference in new issue