rev: 修改物料、组盘、工单
This commit is contained in:
@@ -2,6 +2,32 @@
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="90px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="所属车间">
|
||||
<el-select
|
||||
v-model="query.workshop_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="所属车间"
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in workShopList"
|
||||
:label="item.workshop_name"
|
||||
:value="item.workshop_code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表单组件-->
|
||||
@@ -23,16 +49,29 @@
|
||||
<el-input v-model="form.point_name" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否满托">
|
||||
<el-input v-model="form.is_full" style="width: 240px;" />
|
||||
<el-radio-group v-model="form.is_full" style="width: 240px">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次">
|
||||
<el-input v-model="form.pcsn" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="入库时间">
|
||||
<el-input v-model="form.instorage_time" style="width: 240px;" />
|
||||
<el-date-picker
|
||||
v-model="form.instorage_time"
|
||||
type="datetime"
|
||||
style="width: 240px;"
|
||||
placeholder="选择日期时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="静置时间(分钟)">
|
||||
<el-input v-model="form.standing_time" style="width: 240px;" />
|
||||
<el-input-number
|
||||
v-model.number="form.standing_time"
|
||||
:min="1"
|
||||
:max="999"
|
||||
style="width: 240px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料数量">
|
||||
<el-input v-model="form.material_qty" style="width: 240px;" />
|
||||
@@ -43,6 +82,24 @@
|
||||
<el-form-item label="工单编码">
|
||||
<el-input v-model="form.workorder_code" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料来源">
|
||||
<el-radio-group v-model="choose" size="mini" style="width: 240px;">
|
||||
<el-radio-button label="物料" />
|
||||
<el-radio-button label="工单" />
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="false" label="物料名称">
|
||||
<el-input suffix-icon="el-icon-date" v-model="form.material_id" clearable style="width: 370px;" @focus="getMaterial" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称">
|
||||
<el-input @clear="clearMaterial" clearable v-model="form.material_name" style="width: 240px;" @focus="getMaterial" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码">
|
||||
<el-input v-model="form.material_code" disabled style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料规格">
|
||||
<el-input v-model="form.material_spec" disabled style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="组盘次数">
|
||||
<el-input v-model="form.group_number" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
@@ -53,7 +110,20 @@
|
||||
<el-input v-model="form.workshop_code" style="width: 240px;" />
|
||||
</el-form-item>-->
|
||||
<el-form-item label="组盘状态">
|
||||
<el-input v-model="form.group_status" style="width: 240px;" />
|
||||
<el-select
|
||||
v-model="form.group_status"
|
||||
size="mini"
|
||||
placeholder="点位状态"
|
||||
class="filter-item"
|
||||
style="width: 240px;"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.group_status"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="是否首个流程任务">
|
||||
<el-input v-model="form.is_first_flow_task" style="width: 240px;" />
|
||||
@@ -88,7 +158,7 @@
|
||||
<el-table-column prop="source_vehicle_code" label="来源载具" :min-width="flexWidth('source_vehicle_code',crud.data,'来源载具')" />
|
||||
<el-table-column prop="point_code" label="点位编码" :min-width="flexWidth('point_code',crud.data,'点位编码')" />
|
||||
<el-table-column prop="point_name" label="点位名称" :min-width="flexWidth('point_name',crud.data,'点位名称')" />
|
||||
<el-table-column prop="point_name" label="所属区域" :min-width="flexWidth('point_name',crud.data,'所属区域')" />
|
||||
<el-table-column prop="region_name" label="所属区域" :min-width="flexWidth('region_name',crud.data,'所属区域')" />
|
||||
<el-table-column prop="is_full" label="是否满托" :min-width="flexWidth('is_full',crud.data,'是否满托')" />
|
||||
<el-table-column prop="pcsn" label="批次" :min-width="flexWidth('pcsn',crud.data,'批次')" />
|
||||
<el-table-column prop="workorder_code" label="工单编码" :min-width="flexWidth('workorder_code',crud.data,'工单编码')" />
|
||||
@@ -122,6 +192,8 @@
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<MaterialDialog :dialog-show.sync="materialDialog" @tableChanged="tableChanged"/>
|
||||
<WorkOrderDialog :dialog-show.sync="workOrderDialog" @tableChanged="tableChanged"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -132,6 +204,9 @@ import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudMdBaseWorkShop from '@/views/wms/basedata/workshop/mdBaseWorkshop'
|
||||
import MaterialDialog from '@/views/wms/sch/group/MaterialDialog.vue'
|
||||
import WorkOrderDialog from '@/views/wms/sch/group/WorkOrderDialog.vue'
|
||||
|
||||
const defaultForm = {
|
||||
vehicle_code: null,
|
||||
@@ -140,7 +215,7 @@ const defaultForm = {
|
||||
source_vehicle_code: null,
|
||||
point_code: null,
|
||||
point_name: null,
|
||||
is_full: null,
|
||||
is_full: true,
|
||||
pcsn: null,
|
||||
instorage_time: null,
|
||||
standing_time: null,
|
||||
@@ -172,7 +247,8 @@ const defaultForm = {
|
||||
}
|
||||
export default {
|
||||
name: 'VehicleMaterialGroup',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
dicts: ['group_status'],
|
||||
components: { WorkOrderDialog, MaterialDialog, pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
@@ -190,17 +266,52 @@ export default {
|
||||
crudMethod: { ...crudSchBaseVehiclematerialgroup }
|
||||
})
|
||||
},
|
||||
created() {
|
||||
this.getWorkShopList()
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {
|
||||
},
|
||||
rules: {
|
||||
}}
|
||||
},
|
||||
workShopList: [],
|
||||
choose: '物料',
|
||||
materialDialog: false,
|
||||
workOrderDialog: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
getWorkShopList() { // 获取车间列表
|
||||
crudMdBaseWorkShop.getWorkShopList().then(res => {
|
||||
this.workShopList = res
|
||||
})
|
||||
},
|
||||
getMaterial() {
|
||||
if (this.choose === '物料') {
|
||||
this.materialDialog = true
|
||||
} else {
|
||||
this.workOrderDialog = true
|
||||
}
|
||||
},
|
||||
tableChanged(row) {
|
||||
this.form.material_name = row.material_name
|
||||
this.form.material_id = row.material_id
|
||||
this.form.material_spec = row.material_spec
|
||||
this.form.material_code = row.material_code
|
||||
if (this.choose === '工单') {
|
||||
this.form.workorder_code = row.workorder_code
|
||||
}
|
||||
},
|
||||
clearMaterial() {
|
||||
this.form.material_name = null
|
||||
this.form.material_id = null
|
||||
this.form.material_spec = null
|
||||
this.form.material_code = null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user