生产
This commit is contained in:
@@ -5,13 +5,10 @@
|
||||
<el-form-item label="工单名称" prop="name" v-if='!isBind'>
|
||||
<el-input v-model="form.name"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="工单名称" prop="workOrderId" v-if='isBind'>
|
||||
<el-select v-model="form.workOrderId" placeholder="请选择" style="width: 100%;" filterable @change="getWorkOrderMsg">
|
||||
<el-option
|
||||
v-for="item in workOrderList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
<el-form-item label="工单名称" prop="workOrderId" v-if='isBind'>
|
||||
<el-select v-model="form.workOrderId" placeholder="请选择" style="width: 100%;" filterable
|
||||
@change="getWorkOrderMsg">
|
||||
<el-option v-for="item in workOrderList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -23,11 +20,8 @@
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label="产品名称" prop="planProductId">
|
||||
<el-select v-model="form.planProductId" placeholder="请选择" disabled style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in productList"
|
||||
:key="item.id"
|
||||
:label="item.name+' | '+item.specifications"
|
||||
<el-select v-model="form.planProductId" placeholder="请选择" disabled style="width: 100%;">
|
||||
<el-option v-for="item in productList" :key="item.id" :label="item.name+' | '+item.specifications"
|
||||
:value="item.id">
|
||||
<span style="float: left">{{ item.name }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.specifications }}</span>
|
||||
@@ -37,13 +31,8 @@
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label="计划开始时间">
|
||||
<el-date-picker
|
||||
v-model="planStartTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
style="width: 100%;"
|
||||
placeholder="选择日期"
|
||||
:disabled="isBind">
|
||||
<el-date-picker v-model="planStartTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
style="width: 100%;" placeholder="选择日期" :disabled="isBind">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -51,34 +40,27 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span='6'>
|
||||
<el-form-item label="计划完成时间">
|
||||
<el-date-picker
|
||||
v-model="planFinishTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
style="width: 100%;"
|
||||
placeholder="选择日期"
|
||||
:disabled="isBind">
|
||||
<el-date-picker v-model="planFinishTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
style="width: 100%;" placeholder="选择日期" :disabled="isBind">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label="计划投入数量" prop="planAssignQuantity">
|
||||
<el-input-number v-model="form.planAssignQuantity" :min="0" :max="9999999999999" :disabled="isBind" style="width: 100%;"></el-input-number>
|
||||
<el-input-number v-model="form.planAssignQuantity" :min="0" :max="9999999999999" :disabled="isBind"
|
||||
style="width: 100%;"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label="计划生产数量" prop="planQuantity">
|
||||
<el-input-number v-model="form.planQuantity" :min="0" :max="9999999999999" :disabled="isBind" style="width: 100%;"></el-input-number>
|
||||
<el-input-number v-model="form.planQuantity" :min="0" :max="9999999999999" :disabled="isBind"
|
||||
style="width: 100%;"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label="关联工艺" prop="processFlowId">
|
||||
<el-select v-model="form.processFlowId" placeholder="请选择" disabled style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in processFlowList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
<el-option v-for="item in processFlowList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -96,10 +78,7 @@
|
||||
<el-col :span='6'>
|
||||
<el-form-item label="优先级" prop="priority">
|
||||
<el-select v-model="form.priority" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
||||
<el-option
|
||||
v-for="item in getDictDatas(DICT_TYPE.ORDER_PRIORITY)"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
<el-option v-for="item in getDictDatas(DICT_TYPE.ORDER_PRIORITY)" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
@@ -108,11 +87,7 @@
|
||||
<el-col :span='6'>
|
||||
<el-form-item label="工单类型" prop="type">
|
||||
<el-select v-model="form.type" placeholder="请选择" style="width: 100%;" :disabled="isBind">
|
||||
<el-option
|
||||
v-for="item in workOrderTypeList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
<el-option v-for="item in workOrderTypeList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -120,11 +95,7 @@
|
||||
<el-col :span='6'>
|
||||
<el-form-item label="关联产线" prop="productLineId">
|
||||
<el-select v-model="form.productLineId" placeholder="请选择" multiple style="width: 100%;" :disabled="isBind">
|
||||
<el-option
|
||||
v-for="item in productLineList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
<el-option v-for="item in productLineList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -136,9 +107,18 @@
|
||||
<el-input v-model="form.workers" :disabled="isBind"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label="负责部门" prop="deptId">
|
||||
<el-select v-model="form.deptId" placeholder="请选择关联产线" style="width: 100%;">
|
||||
<el-option v-for="item in deptList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='6'>
|
||||
<el-form-item label="计划分配订单量" prop="planAssignmentQuantity">
|
||||
<el-input-number v-model="form.planAssignmentQuantity" :min="0" :max="9999999999999" style="width: 100%;"></el-input-number>
|
||||
<el-input-number v-model="form.planAssignmentQuantity" :min="0" :max="9999999999999" style="width: 100%;">
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -148,6 +128,7 @@
|
||||
import { getProductAll } from '@/api/base/product'
|
||||
import { getProcessFlowList, getWorkOrderCode, orderIssue, workOrderList, getWorkOrderById } from '@/api/base/orderManage'
|
||||
import { getLineAll } from '@/api/base/productionLine'
|
||||
import { listDept } from '@/api/system/dept';
|
||||
import moment from 'moment'
|
||||
export default {
|
||||
name: 'AddWorkOrder',
|
||||
@@ -162,6 +143,7 @@ export default {
|
||||
planStartTime: '',
|
||||
planFinishTime: '',
|
||||
planAssignQuantity: 0,
|
||||
deptId:undefined,
|
||||
planQuantity: 0,
|
||||
processFlowId: '',
|
||||
materialMethod: 1,
|
||||
@@ -171,6 +153,7 @@ export default {
|
||||
workers: '',
|
||||
planAssignmentQuantity: ''
|
||||
},
|
||||
deptList:[],
|
||||
rules: {
|
||||
name: [{ required: true, message: "工单名称不能为空", trigger: "blur" }],
|
||||
planProductId: [{ required: true, message: "产品名称不能为空", trigger: "change" }],
|
||||
@@ -209,6 +192,9 @@ export default {
|
||||
}
|
||||
},
|
||||
getList() {
|
||||
listDept().then(res => {
|
||||
this.deptList = res.data || []
|
||||
})
|
||||
// 产品
|
||||
getProductAll().then(res => {
|
||||
this.productList = res.data || []
|
||||
|
||||
Reference in New Issue
Block a user