任务模块更新
This commit is contained in:
@@ -23,31 +23,23 @@
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0"
|
||||
:title="crud.status.title"
|
||||
width="500px"
|
||||
width="550px"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px">
|
||||
<el-form-item label="区域编码" prop="region_code">
|
||||
<el-input v-model="form.region_code" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="区域名称" prop="region_name">
|
||||
<el-input v-model="form.region_name" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="生产区域">
|
||||
<el-select
|
||||
v-model="form.product_area"
|
||||
filterable
|
||||
style="width: 370px"
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.product_area"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-form-item label="点位类型说明">
|
||||
<el-input v-model="form.point_type_explain" type="textarea" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="点位状态说明">
|
||||
<el-input v-model="form.point_status_explain" type="textarea" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form.remark" style="width: 370px;" />
|
||||
<el-input v-model="form.remark" type="textarea" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@@ -66,23 +58,13 @@
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column v-if="false" prop="region_id" label="区域标识" />
|
||||
<el-table-column prop="region_code" label="区域编码" />
|
||||
<el-table-column prop="region_name" label="区域名称" />
|
||||
<el-table-column prop="region_code" label="区域编码" min-width="120" />
|
||||
<el-table-column prop="region_name" label="区域名称" min-width="130" />
|
||||
<el-table-column prop="point_type_explain" label="点位类型说明" min-width="150" />
|
||||
<el-table-column prop="point_status_explain" label="点位状态说明" min-width="120" />
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<el-table-column label="是否启用" align="center" prop="is_used">
|
||||
<template slot-scope="scope">
|
||||
<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="create_name" label="创建人" />
|
||||
<el-table-column prop="create_time" label="创建时间" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="update_optname" label="修改人" />
|
||||
<el-table-column prop="update_time" label="修改时间" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="create_time" label="创建时间" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
@@ -99,7 +81,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudRegion, { changeActive } from '@/views/wms/sch/region/region'
|
||||
import crudRegion, { changeActive } from '@/views/wms/sch/region'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
@@ -110,9 +92,7 @@ const defaultForm = {
|
||||
region_id: null,
|
||||
region_code: null,
|
||||
region_name: null,
|
||||
product_area: null,
|
||||
remark: null,
|
||||
is_used: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
@@ -124,7 +104,6 @@ export default {
|
||||
name: 'Region',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
dicts: ['product_area'],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '区域管理',
|
||||
@@ -158,28 +137,6 @@ export default {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
format_is_used(is_used) {
|
||||
return is_used === '1'
|
||||
},
|
||||
changeEnabled(data, val) {
|
||||
let msg = '此操作将停用点位,是否继续!'
|
||||
if (val !== '1') {
|
||||
msg = '此操作将启用点位,是否继续!'
|
||||
}
|
||||
this.$confirm(msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
changeActive(data).then(res => {
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
data.is_used = !data.is_used
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user