|
|
|
@ -94,6 +94,12 @@
|
|
|
|
|
>导出
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<!--
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button type="primary" plain icon="el-icon-edit" size="mini" @click="handleAutoSplit" v-hasPermi="['mes:pro:order:edit']">自动排产
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
-->
|
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
@ -105,8 +111,9 @@
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
max-height="480"
|
|
|
|
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
|
|
|
|
@selection-change="handleAutoSplitSelection"
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
<el-table-column type="selection" width="30"></el-table-column>
|
|
|
|
|
<el-table-column width="150" label="订单号" align="center" prop="orderCode"
|
|
|
|
|
:formatter="orderCodeFormate"
|
|
|
|
|
/>
|
|
|
|
@ -133,8 +140,8 @@
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column width="100" align="center" label="计划工厂编码" prop="planFactoryCode"/>
|
|
|
|
|
<el-table-column label="订单类型" align="center" prop="orderType">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="订单类型" align="center" prop="orderType"></el-table-column>
|
|
|
|
|
<el-table-column label="订单版本" align="center" prop="atrr2"></el-table-column>
|
|
|
|
|
<el-table-column label="产品类型" align="center" prop="prodType">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.product_type" :value="scope.row.prodType"/>
|
|
|
|
@ -470,6 +477,63 @@
|
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<!-- 自动排产规划 -->
|
|
|
|
|
<el-dialog :title="titleAutoSplit" :visible.sync="openAutoSplit" width="1000px">
|
|
|
|
|
<el-table v-loading="autoSplitLoading" :data="autoSplitList" ref="autoSplitTable">
|
|
|
|
|
<el-table-column label="订单号" width="150" align="left" prop="orderCode" />
|
|
|
|
|
<el-table-column label="产品编码" width="150" align="left" prop="prodCode" :formatter="productCodeFormate"/>
|
|
|
|
|
<el-table-column label="产品名称" width="150" align="left" prop="prodDesc" :show-overflow-tooltip="true" />
|
|
|
|
|
<el-table-column width="90" label="订单数量" align="center" prop="quantity"/>
|
|
|
|
|
<el-table-column width="70" label="单位" align="center" prop="unit"/>
|
|
|
|
|
<el-table-column label="任务清单" align="center" prop="workerOrder" width="100"/>
|
|
|
|
|
<el-table-column width="120" label="计划生产日期" align="center" prop="planProDate">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ parseTime(scope.row.planProDate, '{y}-{m}-{d}') }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="排产顺序" align="center" prop="useMan">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input type="number" size="small" v-model="scope.row.useMan" @change="handleEdit(scope.$index,scope.row)"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<el-button type="primary autoSplitBtn">自动拆分</el-button>
|
|
|
|
|
<el-divider content-position="center" >拆分结果</el-divider>
|
|
|
|
|
<el-table
|
|
|
|
|
border
|
|
|
|
|
:data="splitData"
|
|
|
|
|
v-if="refreshWorkerTable"
|
|
|
|
|
v-loading="workerLoading"
|
|
|
|
|
row-key="workorderCode"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
max-height="240"
|
|
|
|
|
default-expand-all
|
|
|
|
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column width="50" align="center" type="selection"/>
|
|
|
|
|
<el-table-column width="160" align="center" prop="workorderCode" label="母工单号"></el-table-column>
|
|
|
|
|
<el-table-column width="70" align="center" prop="quantitySplit" label="母单物料编码"></el-table-column>
|
|
|
|
|
<el-table-column width="70" align="center" prop="quantitySplit" label="母单物料名称"></el-table-column>
|
|
|
|
|
<el-table-column width="70" align="center" prop="quantitySplit" label="母单数量"></el-table-column>
|
|
|
|
|
<el-table-column width="60" label="单位" align="center" prop="unit"/>
|
|
|
|
|
<el-table-column width="160" align="center" prop="workorderCode" label="子工单号"></el-table-column>
|
|
|
|
|
<el-table-column width="70" align="center" prop="quantitySplit" label="子单物料编码"></el-table-column>
|
|
|
|
|
<el-table-column width="70" align="center" prop="quantitySplit" label="子单物料名称"></el-table-column>
|
|
|
|
|
<el-table-column width="70" align="center" prop="quantitySplit" label="子单数量"></el-table-column>
|
|
|
|
|
<el-table-column width="60" label="单位" align="center" prop="unit"/>
|
|
|
|
|
<el-table-column width="100" align="center" prop="productDate" label="工单日期"></el-table-column>
|
|
|
|
|
<el-table-column width="150" align="center" prop="prodLineCode" label="生产线体设备"></el-table-column>
|
|
|
|
|
|
|
|
|
|
<el-table-column width="90" label="工艺编码" align="center" prop="routeCode"/>
|
|
|
|
|
<el-table-column width="70" label="班次" align="center" prop="shiftDesc"/>
|
|
|
|
|
<el-table-column width="160" align="center" prop="batchCodeList" label="批次号"></el-table-column>
|
|
|
|
|
<el-table-column width="100" align="center" prop="batchNumList" label="批次数量"></el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button type="primary">提 交</el-button>
|
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
@ -484,7 +548,7 @@ import {
|
|
|
|
|
listOrder,
|
|
|
|
|
addOrder,
|
|
|
|
|
updateOrder,
|
|
|
|
|
syncSAP, selectMaterielList
|
|
|
|
|
syncSAP, selectMaterielList,getAutoSplitList
|
|
|
|
|
} from '@/api/plan/order'
|
|
|
|
|
import Treeselect from '@riophae/vue-treeselect'
|
|
|
|
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
|
|
|
@ -598,7 +662,12 @@ export default {
|
|
|
|
|
addrules: {},
|
|
|
|
|
/**********************************/
|
|
|
|
|
eRouteProps: {multiple: true},
|
|
|
|
|
eRouteOptions: []
|
|
|
|
|
eRouteOptions: [],
|
|
|
|
|
titleAutoSplit:"订单排产",
|
|
|
|
|
openAutoSplit:false,
|
|
|
|
|
orderCodes:[],
|
|
|
|
|
autoSplitList:[],
|
|
|
|
|
autoSplitLoading: true
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
@ -1303,7 +1372,21 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
/**自动排产**/
|
|
|
|
|
// 多选框选中数据
|
|
|
|
|
handleAutoSplitSelection(selection) {
|
|
|
|
|
|
|
|
|
|
this.orderCodes = selection
|
|
|
|
|
},
|
|
|
|
|
//排产优先级
|
|
|
|
|
handleAutoSplit(row) {
|
|
|
|
|
debugger
|
|
|
|
|
this.autoSplitLoading = true;
|
|
|
|
|
this.autoSplitList = this.orderCodes;
|
|
|
|
|
this.openAutoSplit = true;
|
|
|
|
|
this.autoSplitLoading = false;
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -1349,4 +1432,7 @@ export default {
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
margin-left: 650px;
|
|
|
|
|
}
|
|
|
|
|
.autoSplitBtn{
|
|
|
|
|
margin: 1px 40%;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|