| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254 |
- <template>
- <el-dialog
- :visible.sync="equipmentdialog"
- :before-close="handleClose"
- :close-on-click-modal="true"
- :close-on-press-escape="false"
- append-to-body
- width="70%"
- title="生产订单"
- >
- <div>
- <el-row>
- <el-col :span="24" class="table_col" v-if="equipmentdialog">
- <ele-pro-table
- ref="equiTable"
- :columns="columns"
- :datasource="datasource"
- :selection.sync="selection"
- :current.sync="current"
- highlight-current-row
-
- row-key="id"
- height="50vh"
- @done="onDone"
- >
- </ele-pro-table>
- </el-col>
- </el-row>
- </div>
- <div class="btns">
- <el-button type="primary" size="small" @click="selected">选择</el-button>
- <el-button size="small" @click="handleClose">关闭</el-button>
- </div>
- </el-dialog>
- </template>
- <script>
- import { workOrder} from '@/api/aps/index.js';
- export default {
- components: {},
- props: {
- selectList: Array,
- type: {
- default: 2//1多选 2单选
- }
- },
- data() {
- return {
- equipmentdialog: false,
- current: null,
- planType: [
- { label: '所有计划类型', value: null },
- { label: '内销计划', value: '1' },
- { label: '外销计划', value: '2' },
- { label: '预制计划', value: '3' }
- ],
- columns: [
- {
- width: 45,
- type: 'selection',
- columnKey: 'selection',
- align: 'center',
- reserveSelection: true,
- show:this.type==1
- },
- {
- columnKey: 'index',
- label: '序号',
- type: 'index',
- width: 55,
- align: 'center',
- showOverflowTooltip: true,
- fixed: 'left'
- },
- {
- label: '生产订单号',
- align: 'center',
- minWidth: 110,
- prop: 'code',
- },
- {
- prop: 'productionPlanCode',
- label: '计划编号',
- align: 'center'
- },
- {
- prop: 'produceRoutingName',
- label: '工艺路线',
- align: 'center'
- },
- {
- prop: 'productCode',
- label: '产品编码',
- align: 'center'
- },
- {
- prop: 'productName',
- label: '产品名称',
- align: 'center'
- },
- {
- prop: 'brandNo',
- label: '牌号',
- align: 'center'
- },
- {
- prop: 'batchNo',
- label: '批号',
- align: 'center',
- minWidth: 100,
- showOverflowTooltip: true
- },
- {
- prop: 'model',
- label: '型号',
- align: 'center'
- },
-
- {
- prop: 'priority',
- label: '优先级',
- align: 'center',
- minWidth: 120,
- sortable: 'custom'
- },
- {
- prop: 'formingNum',
- label: '要求生产数量',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 110
- },
- {
- prop: 'formingWeight',
- label: '要求生产重量',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 110,
- },
- {
- prop: 'planStartTime',
- label: '计划开始时间',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 110
- },
- {
- prop: 'planCompleteTime',
- label: '计划结束时间',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 110
- },
- {
- prop: 'createTime',
- label: '创建时间',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 110
- },
-
- {
- prop: 'serialNo',
- label: '客户代号',
- align: 'center',
- showOverflowTooltip: true
- },
- {
- prop: 'simpleName',
- label: '客户简称',
- align: 'center',
- showOverflowTooltip: true
- },
- ],
- categoryLevelId: null,
- code: null,
- selection: [],
- ids:[]
- };
- },
- watch: {},
- methods: {
- datasource({ page, where, limit }) {
- return workOrder({
- ...where,
- pageNum: page,
- size: limit
- });
- },
- open(ids) {
-
- this.equipmentdialog = true;
-
- },
- onDone(){
- this.$nextTick(() => {
- this.$refs.equiTable.setSelectedRowKeys(this.ids);
- });
- },
- handleClose() {
- this.equipmentdialog = false;
- this.$refs.equiTable.clearSelection();
- },
- // 选择
- selected() {
- let data=this.type==1?JSON.parse(JSON.stringify(this.selection)):JSON.parse(JSON.stringify(this.current))
- data['productNumber']=data.formingNum
- this.$emit('choose', data);
- this.handleClose();
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .tree_col {
- border: 1px solid #eee;
- padding: 10px 0;
- box-sizing: border-box;
- max-height: 530px;
- overflow: auto;
- }
- .table_col {
- padding-left: 10px;
- ::v-deep .el-table th.el-table__cell {
- background: #f2f2f2;
- }
- }
- .pagination {
- text-align: right;
- padding: 10px 0;
- }
- .btns {
- text-align: center;
- padding: 10px 0;
- }
- .topsearch {
- margin-bottom: 15px;
- }
- </style>
|