|
|
@@ -18,7 +18,6 @@
|
|
|
:selection.sync="selection"
|
|
|
:current.sync="current"
|
|
|
highlight-current-row
|
|
|
-
|
|
|
row-key="id"
|
|
|
height="50vh"
|
|
|
@done="onDone"
|
|
|
@@ -35,15 +34,14 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { workOrder} from '@/api/aps/index.js';
|
|
|
-
|
|
|
+import { workOrder } from '@/api/aps/index.js';
|
|
|
|
|
|
export default {
|
|
|
components: {},
|
|
|
props: {
|
|
|
selectList: Array,
|
|
|
type: {
|
|
|
- default: 2//1多选 2单选
|
|
|
+ default: 2 //1多选 2单选
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
|
@@ -63,130 +61,126 @@ export default {
|
|
|
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'
|
|
|
- },
|
|
|
-
|
|
|
+ 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: 'priority',
|
|
|
- label: '优先级',
|
|
|
- align: 'center',
|
|
|
- minWidth: 120,
|
|
|
- sortable: 'custom'
|
|
|
- },
|
|
|
+ {
|
|
|
+ prop: 'batchNo',
|
|
|
+ label: '批号',
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 100,
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'model',
|
|
|
+ label: '型号',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
|
|
|
- {
|
|
|
- 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: 'priority',
|
|
|
+ label: '优先级',
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 120,
|
|
|
+ sortable: 'custom'
|
|
|
+ },
|
|
|
|
|
|
- {
|
|
|
- prop: 'planCompleteTime',
|
|
|
- label: '计划结束时间',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
- },
|
|
|
+ {
|
|
|
+ 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: 'createTime',
|
|
|
- label: '创建时间',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 110
|
|
|
- },
|
|
|
-
|
|
|
+ {
|
|
|
+ prop: 'planCompleteTime',
|
|
|
+ label: '计划结束时间',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
|
|
|
- {
|
|
|
- prop: 'serialNo',
|
|
|
- label: '客户代号',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
+ {
|
|
|
+ prop: 'createTime',
|
|
|
+ label: '创建时间',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
|
|
|
- {
|
|
|
- prop: 'simpleName',
|
|
|
- label: '客户简称',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
+ {
|
|
|
+ prop: 'serialNo',
|
|
|
+ label: '客户代号',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
|
|
|
+ {
|
|
|
+ prop: 'simpleName',
|
|
|
+ label: '客户简称',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ }
|
|
|
],
|
|
|
categoryLevelId: null,
|
|
|
code: null,
|
|
|
selection: [],
|
|
|
- ids:[]
|
|
|
+ ids: []
|
|
|
};
|
|
|
},
|
|
|
|
|
|
@@ -200,12 +194,9 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
open(ids) {
|
|
|
-
|
|
|
this.equipmentdialog = true;
|
|
|
-
|
|
|
-
|
|
|
},
|
|
|
- onDone(){
|
|
|
+ onDone() {
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.equiTable.setSelectedRowKeys(this.ids);
|
|
|
});
|
|
|
@@ -216,9 +207,21 @@ export default {
|
|
|
},
|
|
|
// 选择
|
|
|
selected() {
|
|
|
- let data=this.type==1?JSON.parse(JSON.stringify(this.selection)):JSON.parse(JSON.stringify(this.current))
|
|
|
- data['productNumber']=data.formingNum
|
|
|
-
|
|
|
+ let data =
|
|
|
+ this.type == 1
|
|
|
+ ? JSON.parse(JSON.stringify(this.selection))
|
|
|
+ : JSON.parse(JSON.stringify(this.current));
|
|
|
+ data['productList'] = [
|
|
|
+ {
|
|
|
+ productCode: data.productCode,
|
|
|
+ productName: data.productName,
|
|
|
+ specification: data.model,
|
|
|
+ batchNo: data.batchNo,
|
|
|
+ brandNo: data.brandNo,
|
|
|
+ productNumber: data.formingNum
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ console.log(data)
|
|
|
this.$emit('choose', data);
|
|
|
this.handleClose();
|
|
|
}
|