|
|
@ -37,13 +37,12 @@ |
|
|
|
<el-form-item label="区域类型"> |
|
|
|
<el-select |
|
|
|
v-model="query.region_code" |
|
|
|
@clear="handleClear" |
|
|
|
clearable |
|
|
|
filterable |
|
|
|
size="mini" |
|
|
|
placeholder="区域类型" |
|
|
|
class="filter-item" |
|
|
|
@change="getPointStatusAndTypeList(query.region_code, 1)" |
|
|
|
@change="hand" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in regionList" |
|
|
@ -62,7 +61,8 @@ |
|
|
|
@change="hand" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in pointTypesList" |
|
|
|
v-for="item in dict.sch_point_type" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
/> |
|
|
@ -79,7 +79,8 @@ |
|
|
|
@change="hand" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in pointStatusList" |
|
|
|
v-for="item in dict.sch_point_status" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
/> |
|
|
@ -183,7 +184,6 @@ |
|
|
|
v-model="form.region_code" |
|
|
|
placeholder="请选择" |
|
|
|
style="width: 370px;" |
|
|
|
@change="getPointStatusAndTypeList(form.region_code, 2)" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in regionList" |
|
|
@ -198,7 +198,7 @@ |
|
|
|
<el-form-item label="点位名称" prop="point_name"> |
|
|
|
<el-input v-model="form.point_name" style="width: 370px;" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item v-if="pointStatusDialogList.length > 0" label="点位状态" prop="point_status"> |
|
|
|
<el-form-item label="点位状态" prop="point_status"> |
|
|
|
<el-select |
|
|
|
v-model="form.point_status" |
|
|
|
size="mini" |
|
|
@ -208,13 +208,14 @@ |
|
|
|
clearable |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in pointStatusDialogList" |
|
|
|
v-for="item in dict.sch_point_status" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item v-show="pointTypesDialogList.length > 0" label="点位类型" prop="device_point_type"> |
|
|
|
<el-form-item label="点位类型" prop="device_point_type"> |
|
|
|
<el-select |
|
|
|
v-model="form.point_type" |
|
|
|
size="mini" |
|
|
@ -223,7 +224,8 @@ |
|
|
|
style="width: 370px;" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in pointTypesDialogList" |
|
|
|
v-for="item in dict.sch_point_type" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
/> |
|
|
@ -282,14 +284,7 @@ |
|
|
|
<el-table-column prop="region_code" label="区域编码" :min-width="flexWidth('region_code',crud.data,'区域编码')" /> |
|
|
|
<el-table-column prop="region_name" label="区域名称" :min-width="flexWidth('region_name',crud.data,'区域名称')" /> |
|
|
|
<el-table-column prop="point_type_name" label="点位类型" :min-width="flexWidth('point_type_name',crud.data,'点位类型')"/> |
|
|
|
<el-table-column prop="point_status_name" label="点位状态" :min-width="flexWidth('point_status_name',crud.data,'点位类型')"/> |
|
|
|
<!-- <el-table-column prop="point_type" label="点位类型" :min-width="flexWidth('point_type',crud.data,'点位类型')" />--> |
|
|
|
<!-- <el-table-column prop="point_status" label="点位状态" :min-width="flexWidth('point_status',crud.data,'点位状态')" />--> |
|
|
|
<el-table-column prop="vehicle_type" label="载具类型" :min-width="flexWidth('vehicle_type',crud.data,'载具类型', 30)"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ dict.label.vehicle_type[scope.row.vehicle_type] }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="point_status" label="点位状态" :formatter="bill_typeFormat" :min-width="flexWidth('point_status',crud.data,'点位类型')"/> |
|
|
|
<el-table-column prop="vehicle_code" label="载具编码" :min-width="flexWidth('vehicle_code',crud.data,'载具编码')" /> |
|
|
|
<el-table-column prop="vehicle_qty" label="载具数量" :min-width="flexWidth('vehicle_qty',crud.data,'载具数量')" /> |
|
|
|
<el-table-column label="是否锁定" :min-width="flexWidth('vehicle_qty',crud.data,'是否锁定')"> |
|
|
@ -297,31 +292,26 @@ |
|
|
|
{{scope.row.ing_task_code?'是':'否'}} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'载具数量')" /> |
|
|
|
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'载具数量')" /> |
|
|
|
<el-table-column prop="material_spec" label="物料规格" :min-width="flexWidth('material_spec',crud.data,'载具数量')" /> |
|
|
|
<el-table-column prop="material_model" label="物料型号" :min-width="flexWidth('material_model',crud.data,'载具数量')" /> |
|
|
|
<el-table-column prop="material_qty" label="物料数量" :min-width="flexWidth('material_qty',crud.data,'载具数量')" /> |
|
|
|
<el-table-column prop="parent_point_code" label="父点位编码" :min-width="flexWidth('parent_point_code',crud.data,'父点位编码')"/> |
|
|
|
<el-table-column prop="ing_task_code" label="在执行的任务标识" :min-width="flexWidth('ing_task_code',crud.data,'在执行的任务标识')" /> |
|
|
|
<el-table-column prop="is_has_workder" label="是否有工单" :min-width="flexWidth('is_has_workder',crud.data,'是否有工单')"> |
|
|
|
<el-table-column label="是否启用" align="center" prop="is_used" :min-width="flexWidth('is_used',crud.data,'是否启用')"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{scope.row.is_has_workder?'是':'否'}} |
|
|
|
<el-switch |
|
|
|
:value="format_is_used(scope.row.is_used)" |
|
|
|
active-color="#409EFF" |
|
|
|
inactive-color="#F56C6C" |
|
|
|
@change="changeEnabled(scope.row, scope.row.is_used)" |
|
|
|
/> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'载具数量')" /> |
|
|
|
<el-table-column prop="material_name" label="物料名称" :min-width="flexWidth('material_name',crud.data,'载具数量')" /> |
|
|
|
<el-table-column prop="material_qty" label="物料数量" :min-width="flexWidth('material_qty',crud.data,'载具数量')" /> |
|
|
|
<el-table-column prop="ing_task_code" label="当前任务号" :min-width="flexWidth('ing_task_code',crud.data,'在执行的任务标识')" /> |
|
|
|
<el-table-column prop="is_auto" label="是否自动" :min-width="flexWidth('is_auto',crud.data,'是否自动')"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{scope.row.is_auto?'是':'否'}} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="remark" label="备注" :min-width="flexWidth('remark',crud.data,'备注')" /> |
|
|
|
<el-table-column prop="is_used" label="是否启用" :min-width="flexWidth('is_used',crud.data,'是否启用')"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{scope.row.is_used?'是':'否'}} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="create_name" label="创建人" :min-width="flexWidth('create_name',crud.data,'创建人')" /> |
|
|
|
<el-table-column prop="create_time" label="创建时间" :min-width="flexWidth('create_time',crud.data,'创建时间')" /> |
|
|
|
<el-table-column prop="update_name" label="修改人" :min-width="flexWidth('update_name',crud.data,'修改人')" /> |
|
|
|
<el-table-column prop="update_time" label="修改时间" :min-width="flexWidth('update_time',crud.data,'修改时间')" /> |
|
|
|
<el-table-column v-permission="[]" label="操作" width="200px" align="center" fixed="right"> |
|
|
@ -361,6 +351,7 @@ import udOperation from '@crud/UD.operation' |
|
|
|
import pagination from '@crud/Pagination' |
|
|
|
import ViewDialog from '@/views/wms/sch/point/ViewDialog' |
|
|
|
import PointDialog from '@/views/wms/sch/point/PointDialog' |
|
|
|
import crudStructattr from '@/views/wms/basedata/structattr/structattr' |
|
|
|
|
|
|
|
const defaultForm = { |
|
|
|
point_code: null, |
|
|
@ -395,7 +386,7 @@ const defaultForm = { |
|
|
|
} |
|
|
|
export default { |
|
|
|
name: 'Point', |
|
|
|
dicts: ['vehicle_type', 'TrueOrFalse'], |
|
|
|
dicts: ['vehicle_type', 'TrueOrFalse', 'sch_point_status', 'sch_point_type'], |
|
|
|
components: { PointDialog, ViewDialog, pagination, crudOperation, rrOperation, udOperation }, |
|
|
|
mixins: [presenter(), header(), form(defaultForm), crud()], |
|
|
|
cruds() { |
|
|
@ -436,12 +427,9 @@ export default { |
|
|
|
] |
|
|
|
}, |
|
|
|
workShopList: [ |
|
|
|
{ 'name': '第一车间', 'code': 'A1' } |
|
|
|
{ 'name': 'A车间', 'code': 'A' } |
|
|
|
], |
|
|
|
regionList: [], |
|
|
|
pointTypesList: [], |
|
|
|
pointStatusList: [], |
|
|
|
pointStatusDialogList: [], |
|
|
|
pointTypesDialogList: [], |
|
|
|
pointDialog: false |
|
|
|
} |
|
|
@ -458,11 +446,6 @@ export default { |
|
|
|
this.form.is_has_workder = this.form.is_has_workder.toString() |
|
|
|
this.form.is_auto = this.form.is_auto.toString() |
|
|
|
}, |
|
|
|
[CRUD.HOOK.afterToCU]() { |
|
|
|
if (this.form.region_code) { |
|
|
|
this.getPointStatusAndTypeList(this.form.region_code, 2) |
|
|
|
} |
|
|
|
}, |
|
|
|
hand(value) { |
|
|
|
this.crud.toQuery() |
|
|
|
}, |
|
|
@ -471,32 +454,8 @@ export default { |
|
|
|
this.regionList = res |
|
|
|
}) |
|
|
|
}, |
|
|
|
getPointStatusAndTypeList(id, flag) { |
|
|
|
if (id) { |
|
|
|
this.getPointStatusList(id, flag) |
|
|
|
this.getPointTypeList(id, flag) |
|
|
|
} |
|
|
|
if (flag === 1) { |
|
|
|
this.crud.toQuery() |
|
|
|
} |
|
|
|
}, |
|
|
|
getPointStatusList(id, flag) { |
|
|
|
crudSchBaseRegion.getPointStatusSelectById(id).then(res => { |
|
|
|
if (flag === 1) { |
|
|
|
this.pointStatusList = res |
|
|
|
} else { |
|
|
|
this.pointStatusDialogList = res |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
getPointTypeList(id, flag) { |
|
|
|
crudSchBaseRegion.getPointTypeSelectById(id).then(res => { |
|
|
|
if (flag === 1) { |
|
|
|
this.pointTypesList = res |
|
|
|
} else { |
|
|
|
this.pointTypesDialogList = res |
|
|
|
} |
|
|
|
}) |
|
|
|
bill_typeFormat(row, column) { |
|
|
|
return this.dict.label.sch_point_status[row.point_status] |
|
|
|
}, |
|
|
|
changeUsed(data, flag) { // 更改启用状态 |
|
|
|
const param = {} |
|
|
@ -524,11 +483,32 @@ export default { |
|
|
|
getParentPoint() { |
|
|
|
this.pointDialog = true |
|
|
|
}, |
|
|
|
handleClear() { |
|
|
|
this.crud.query.region_code = null |
|
|
|
this.crud.query.point_type = null |
|
|
|
this.crud.query.point_status = null |
|
|
|
this.hand() |
|
|
|
format_is_used(is_used) { |
|
|
|
return is_used === '1' |
|
|
|
}, |
|
|
|
changeEnabled(data, val) { |
|
|
|
const param = {} |
|
|
|
param.data = [] |
|
|
|
param.data.push(data) |
|
|
|
param.used = 0 |
|
|
|
let msg = '此操作将停用,是否继续!' |
|
|
|
if (val !== '1') { |
|
|
|
msg = '此操作将启用,是否继续!' |
|
|
|
param.used = 1 |
|
|
|
} |
|
|
|
this.$confirm(msg, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
crudSchBasePoint.changeUsed(param).then(res => { |
|
|
|
this.crud.toQuery() |
|
|
|
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS) |
|
|
|
}).catch(() => { |
|
|
|
data.is_used = !data.is_used |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
}) |
|
|
|
}, |
|
|
|
changeLock(data) { |
|
|
|
const param = {} |
|
|
|