Browse Source

国际化修改

1219
zhang 2 months ago
parent
commit
dfea03b980
  1. 96
      lms/nladmin-ui/src/views/wms/pdm/ivt/hotpointivt/pointIvt.vue
  2. 55
      lms/nladmin-ui/src/views/wms/pdm/ivt/hotpointivt/taskDtl.vue
  3. 125
      lms/nladmin-ui/src/views/wms/pdm/order/rawfoilworkorder/index.vue

96
lms/nladmin-ui/src/views/wms/pdm/ivt/hotpointivt/pointIvt.vue

@ -11,17 +11,17 @@
label-width="90px" label-width="90px"
label-suffix=":" label-suffix=":"
> >
<el-form-item label="点位编码"> <el-form-item :label="$t('hotpointivt.placeholder.point_code')">
<el-input <el-input
v-model="query.point_code" v-model="query.point_code"
clearable clearable
placeholder="输入点位编码" :placeholder="$t('hotpointivt.placeholder.input')"
style="width: 185px;" style="width: 185px;"
class="filter-item" class="filter-item"
@keyup.enter.native="crud.toQuery" @keyup.enter.native="crud.toQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="点位状态"> <el-form-item :label="$t('hotpointivt.placeholder.point_status')">
<el-select <el-select
v-model="query.point_status" v-model="query.point_status"
clearable clearable
@ -33,12 +33,13 @@
> >
<el-option <el-option
v-for="item in dict.sch_hot_point_status" v-for="item in dict.sch_hot_point_status"
:key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="生产区域"> <el-form-item :label="$t('hotpointivt.placeholder.product_area')">
<el-select <el-select
v-model="query.product_area" v-model="query.product_area"
clearable clearable
@ -50,12 +51,13 @@
> >
<el-option <el-option
v-for="item in dict.product_area" v-for="item in dict.product_area"
:key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="是否启用"> <el-form-item :label="$t('hotpointivt.placeholder.is_enable')">
<el-switch <el-switch
v-model="query.is_used" v-model="query.is_used"
active-value="0" active-value="0"
@ -65,7 +67,7 @@
@change="hand" @change="hand"
/> />
</el-form-item> </el-form-item>
<el-form-item label="生产位置"> <el-form-item :label="$t('hotpointivt.placeholder.point_location')">
<el-select <el-select
v-model="query.point_location" v-model="query.point_location"
clearable clearable
@ -76,18 +78,19 @@
> >
<el-option <el-option
v-for="item in dict.point_location" v-for="item in dict.point_location"
:key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="入箱时间"> <el-form-item :label="$t('hotpointivt.placeholder.create_time')">
<el-date-picker <el-date-picker
v-model="query.createTime" v-model="query.createTime"
type="daterange" type="daterange"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
start-placeholder="开始日期" :start-placeholder="$t('hotpointivt.placeholder.start_time')"
end-placeholder="结束日期" :end-placeholder="$t('hotpointivt.placeholder.end_time')"
:default-time="['00:00:00', '23:59:59']" :default-time="['00:00:00', '23:59:59']"
@change="crud.toQuery" @change="crud.toQuery"
/> />
@ -106,17 +109,22 @@
:disabled="crud.selections.length !== 1" :disabled="crud.selections.length !== 1"
@click="uploadMES" @click="uploadMES"
> >
回传MES {{ $t('hotpointivt.title3') }}
</el-button> </el-button>
</crudOperation> </crudOperation>
<!--表单组件--> <!--表单组件-->
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" <el-dialog
:title="crud.status.title" width="520px"> :close-on-click-modal="false"
:before-close="crud.cancelCU"
:visible.sync="crud.status.cu > 0"
:title="crud.status.title"
width="520px"
>
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px">
<el-form-item label="点位编码" prop="point_code"> <el-form-item :label="$t('hotpointivt.placeholder.point_code')" prop="point_code">
<el-input v-model="form.point_code" style="width: 370px;" /> <el-input v-model="form.point_code" style="width: 370px;" />
</el-form-item> </el-form-item>
<el-form-item label="生产区域"> <el-form-item :label="$t('hotpointivt.placeholder.product_area')">
<el-select <el-select
v-model="query.product_area" v-model="query.product_area"
clearable clearable
@ -127,12 +135,13 @@
> >
<el-option <el-option
v-for="item in dict.product_area" v-for="item in dict.product_area"
:key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="点位状态" prop="point_status"> <el-form-item :label="$t('hotpointivt.placeholder.point_status')" prop="point_status">
<el-select <el-select
v-model="form.point_status" v-model="form.point_status"
clearable clearable
@ -143,56 +152,63 @@
> >
<el-option <el-option
v-for="item in dict.sch_hot_point_status" v-for="item in dict.sch_hot_point_status"
:key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="母卷号"> <el-form-item :label="$t('hotpointivt.placeholder.container_name')">
<el-input v-model="form.container_name" style="width: 370px;" /> <el-input v-model="form.container_name" style="width: 370px;" />
</el-form-item> </el-form-item>
<el-form-item label="温度"> <el-form-item :label="$t('hotpointivt.placeholder.temperature')">
<el-input v-model="form.temperature" style="width: 370px;" /> <el-input v-model="form.temperature" style="width: 370px;" />
</el-form-item> </el-form-item>
<el-form-item label="是否启用" prop="is_used"> <el-form-item :label="$t('hotpointivt.placeholder.is_enable')" prop="is_used">
<el-switch v-model="form.is_used" active-value="1" inactive-value="0" /> <el-switch v-model="form.is_used" active-value="1" inactive-value="0" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">取消</el-button> <el-button type="text" @click="crud.cancelCU">{{ $t('hotpointivt.dialog.cancel') }}</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button> <el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('hotpointivt.dialog.confirm') }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
<!--表格渲染--> <!--表格渲染-->
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" <el-table
@selection-change="crud.selectionChangeHandler"> ref="table"
v-loading="crud.loading"
:data="crud.data"
size="mini"
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
>
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column prop="point_code" width="120px" show-overflow-tooltip label="点位编码"/> <el-table-column prop="point_code" width="120px" show-overflow-tooltip :label="$t('hotpointivt.placeholder.point_code')" />
<el-table-column prop="point_status" label="点位状态"> <el-table-column prop="point_status" :label="$t('hotpointivt.placeholder.point_status')">
<template slot-scope="scope"> <template slot-scope="scope">
{{ dict.label.sch_hot_point_status[scope.row.point_status] }} {{ dict.label.sch_hot_point_status[scope.row.point_status] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="container_name" label="母卷号" width="150px" show-overflow-tooltip/> <el-table-column prop="container_name" :label="$t('hotpointivt.placeholder.container_name')" width="150px" show-overflow-tooltip />
<el-table-column prop="ivt_qty" label="库存数" :formatter="crud.formatNum3"/> <el-table-column prop="ivt_qty" :label="$t('hotpointivt.dialog.ivt_qty')" :formatter="crud.formatNum3" />
<el-table-column prop="instorage_time" label="入箱时间" width="150px" show-overflow-tooltip/> <el-table-column prop="instorage_time" :label="$t('hotpointivt.placeholder.create_time')" width="150px" show-overflow-tooltip />
<el-table-column prop="product_area" label="生产区域"> <el-table-column prop="product_area" :label="$t('hotpointivt.placeholder.product_area')">
<template slot-scope="scope"> <template slot-scope="scope">
{{ dict.label.product_area[scope.row.product_area] }} {{ dict.label.product_area[scope.row.product_area] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="temperature" label="温度"/> <el-table-column prop="temperature" :label="$t('hotpointivt.placeholder.temperature')" />
<el-table-column prop="last_time" label="倒计时" width="120"/> <el-table-column prop="last_time" :label="$t('hotpointivt.dialog.last_time')" width="120" />
<el-table-column prop="group_name" label="组别"/> <el-table-column prop="group_name" :label="$t('hotpointivt.dialog.group_name')" />
<el-table-column prop="ext_code" label="外部编码" width="130"/> <el-table-column prop="ext_code" :label="$t('hotpointivt.dialog.ext_code')" width="130" />
<el-table-column prop="is_used" label="是否启用"> <el-table-column prop="is_used" :label="$t('hotpointivt.dialog.is_enable')">
<template slot-scope="scope"> <template slot-scope="scope">
{{ dict.label.is_used[scope.row.is_used] }} {{ dict.label.is_used[scope.row.is_used] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="remark" label="备注"/> <el-table-column prop="remark" :label="$t('hotpointivt.dialog.remark')" />
<el-table-column prop="update_time" label="修改时间" min-width="150" show-overflow-tooltip/> <el-table-column prop="update_time" :label="$t('hotpointivt.dialog.update_time')" min-width="150" show-overflow-tooltip />
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right"> <el-table-column v-permission="[]" :label="$t('hotpointivt.dialog.operate')" width="120px" align="center" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<udOperation <udOperation
:data="scope.row" :data="scope.row"
@ -217,7 +233,7 @@ import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation' import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination' import pagination from '@crud/Pagination'
import Dialog from '@/views/wms/pdm/ivt/hotpointivt/Dialog.vue' import Dialog from '@/views/wms/pdm/ivt/hotpointivt/Dialog.vue'
import i18n from '@/i18n'
const defaultForm = { const defaultForm = {
ivt_id: null, ivt_id: null,
point_code: null, point_code: null,
@ -250,7 +266,7 @@ export default {
mixins: [presenter(), header(), form(defaultForm), crud()], mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() { cruds() {
return CRUD({ return CRUD({
title: '烘烤区点位库存', title: i18n.t('hotpointivt.title'),
url: 'api/hotpointivt', url: 'api/hotpointivt',
idField: 'ivt_id', idField: 'ivt_id',
sort: 'ivt_id,desc', sort: 'ivt_id,desc',
@ -271,10 +287,10 @@ export default {
dialogShow: false, dialogShow: false,
rules: { rules: {
point_code: [ point_code: [
{ required: true, message: '点位编码不能为空', trigger: 'blur' } { required: true, message: this.$t('hotpointivt.msg.isNotEmpty'), trigger: 'blur' }
], ],
point_status: [ point_status: [
{ required: true, message: '点位状态不能为空', trigger: 'blur' } { required: true, message: this.$t('hotpointivt.msg.isNotEmpty'), trigger: 'blur' }
] ]
} }
} }

55
lms/nladmin-ui/src/views/wms/pdm/ivt/hotpointivt/taskDtl.vue

@ -11,63 +11,63 @@
label-width="90px" label-width="90px"
label-suffix=":" label-suffix=":"
> >
<el-form-item label="单据编码"> <el-form-item :label="$t('hotpointivt.placeholder.point_code')">
<el-input <el-input
v-model="query.bill_code" v-model="query.bill_code"
clearable clearable
placeholder="单据编码" :placeholder="$t('hotpointivt.placeholder.point_code')"
style="width: 185px;" style="width: 185px;"
class="filter-item" class="filter-item"
@keyup.enter.native="crud.toQuery" @keyup.enter.native="crud.toQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="任务编码"> <el-form-item :label="$t('hotpointivt.placeholder.task_code')">
<el-input <el-input
v-model="query.task_code" v-model="query.task_code"
clearable clearable
placeholder="任务编码" :placeholder="$t('hotpointivt.placeholder.task_code')"
style="width: 185px;" style="width: 185px;"
class="filter-item" class="filter-item"
@keyup.enter.native="crud.toQuery" @keyup.enter.native="crud.toQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="起点编码"> <el-form-item :label="$t('hotpointivt.placeholder.start_point_code')">
<el-input <el-input
v-model="query.start_point_code" v-model="query.start_point_code"
clearable clearable
placeholder="起点编码" :placeholder="$t('hotpointivt.placeholder.start_point_code')"
style="width: 185px;" style="width: 185px;"
class="filter-item" class="filter-item"
@keyup.enter.native="crud.toQuery" @keyup.enter.native="crud.toQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="终点编码"> <el-form-item :label="$t('hotpointivt.placeholder.end_point_code')">
<el-input <el-input
v-model="query.next_point_code" v-model="query.next_point_code"
clearable clearable
placeholder="终点编码" :placeholder="$t('hotpointivt.placeholder.end_point_code')"
style="width: 185px;" style="width: 185px;"
class="filter-item" class="filter-item"
@keyup.enter.native="crud.toQuery" @keyup.enter.native="crud.toQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="母卷号"> <el-form-item :label="$t('hotpointivt.placeholder.container_name')">
<el-input <el-input
v-model="query.container_name" v-model="query.container_name"
clearable clearable
placeholder="母卷号" :placeholder="$t('hotpointivt.placeholder.container_name')"
style="width: 185px;" style="width: 185px;"
class="filter-item" class="filter-item"
@keyup.enter.native="crud.toQuery" @keyup.enter.native="crud.toQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="创建时间"> <el-form-item :label="$t('hotpointivt.placeholder.createTime')">
<el-date-picker <el-date-picker
v-model="query.createTime" v-model="query.createTime"
type="daterange" type="daterange"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
start-placeholder="开始日期" :start-placeholder="$t('hotpointivt.placeholder.start_time')"
end-placeholder="结束日期" :end-placeholder="$t('hotpointivt.placeholder.end_time')"
:default-time="['00:00:00', '23:59:59']" :default-time="['00:00:00', '23:59:59']"
@change="crud.toQuery" @change="crud.toQuery"
/> />
@ -79,17 +79,17 @@
<crudOperation :permission="permission" /> <crudOperation :permission="permission" />
<!--表格渲染--> <!--表格渲染-->
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler"> <el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
<el-table-column prop="bill_code" label="单据编码" :min-width="flexWidth('bill_code',crud.data,'单据编码')" /> <el-table-column prop="bill_code" :label="$t('hotpointivt.placeholder.bill_code')" :min-width="flexWidth('bill_code',crud.data,'单据编码')" />
<el-table-column prop="container_name" label="母卷号" :min-width="flexWidth('container_name',crud.data,'母卷号')" /> <el-table-column prop="container_name" :label="$t('hotpointivt.placeholder.container_name')" :min-width="flexWidth('container_name',crud.data,'母卷号')" />
<el-table-column prop="start_point_code" label="起始点位" :min-width="flexWidth('start_point_code',crud.data,'起始点位')" /> <el-table-column prop="start_point_code" :label="$t('hotpointivt.placeholder.start_point_code')" :min-width="flexWidth('start_point_code',crud.data,'起始点位')" />
<el-table-column prop="end_point_code" label="终点点位" :min-width="flexWidth('end_point_code',crud.data,'终点点位')" /> <el-table-column prop="end_point_code" :label="$t('hotpointivt.placeholder.end_point_code')" :min-width="flexWidth('end_point_code',crud.data,'终点点位')" />
<el-table-column prop="temperature" label="烤箱温度" :min-width="flexWidth('temperature',crud.data,'烤箱温度')" /> <el-table-column prop="temperature" :label="$t('hotpointivt.placeholder.temperature')" :min-width="flexWidth('temperature',crud.data,'烤箱温度')" />
<el-table-column prop="oven_time" label="烘烤时间" :min-width="flexWidth('oven_time',crud.data,'烘烤时间')" /> <el-table-column prop="oven_time" :label="$t('hotpointivt.dialog.oven_time')" :min-width="flexWidth('oven_time',crud.data,'烘烤时间')" />
<el-table-column prop="task_code" label="任务编码" :min-width="flexWidth('task_code',crud.data,'任务编码')" /> <el-table-column prop="task_code" :label="$t('hotpointivt.placeholder.task_code')" :min-width="flexWidth('task_code',crud.data,'任务编码')" />
<el-table-column prop="create_name" label="创建人" :min-width="flexWidth('create_name',crud.data,'创建人')" /> <el-table-column prop="create_name" :label="$t('hotpointivt.dialog.create_name')" :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="create_time" :label="$t('hotpointivt.dialog.create_time')" :min-width="flexWidth('create_time',crud.data,'创建时间')" />
<el-table-column prop="confirm_optname" label="确认人" :min-width="flexWidth('confirm_optname',crud.data,'确认人')" /> <el-table-column prop="confirm_optname" :label="$t('hotpointivt.dialog.confirm_optname')" :min-width="flexWidth('confirm_optname',crud.data,'确认人')" />
<el-table-column prop="confirm_time" label="确认时间" :min-width="flexWidth('confirm_time',crud.data,'确认时间')" /> <el-table-column prop="confirm_time" :label="$t('hotpointivt.dialog.confirm_time')" :min-width="flexWidth('confirm_time',crud.data,'确认时间')" />
</el-table> </el-table>
<!--分页组件--> <!--分页组件-->
<pagination /> <pagination />
@ -102,18 +102,17 @@ import crudHotpointivt from './hotpointivt'
import CRUD, { crud, form, header, presenter } from '@crud/crud' import CRUD, { crud, form, header, presenter } from '@crud/crud'
import rrOperation from '@crud/RR.operation' import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation' import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination' import pagination from '@crud/Pagination'
import i18n from '@/i18n'
const defaultForm = { } const defaultForm = { }
export default { export default {
name: 'HotPointIvtTask', name: 'HotPointIvtTask',
components: { pagination, crudOperation, rrOperation, udOperation }, components: { pagination, crudOperation, rrOperation },
dicts: [], dicts: [],
mixins: [presenter(), header(), form(defaultForm), crud()], mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() { cruds() {
return CRUD({ return CRUD({
title: '烘烤区任务明细', title: i18n.t('hotpointivt.title'),
url: 'api/hotpointivt/taskDtlQuery', url: 'api/hotpointivt/taskDtlQuery',
idField: 'ivt_id', idField: 'ivt_id',
sort: 'ivt_id,desc', sort: 'ivt_id,desc',

125
lms/nladmin-ui/src/views/wms/pdm/order/rawfoilworkorder/index.vue

@ -12,68 +12,70 @@
label-suffix=":" label-suffix=":"
> >
<el-form-item label="生产区域"> <el-form-item :label="$t('rawworkorder.placeholder.product_area')">
<el-select <el-select
v-model="query.product_area" v-model="query.product_area"
clearable clearable
size="mini" size="mini"
placeholder="请选择" :placeholder="$t('rawworkorder.placeholder.product_area')"
class="filter-item" class="filter-item"
@change="hand" @change="hand"
> >
<el-option <el-option
v-for="item in dict.product_area" v-for="item in dict.product_area"
:key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="机台编码"> <el-form-item :label="$t('rawworkorder.placeholder.resource_name')">
<el-input <el-input
v-model="query.resource_name" v-model="query.resource_name"
clearable clearable
size="mini" size="mini"
placeholder="机台编码" :placeholder="$t('rawworkorder.placeholder.resource_name')"
@keyup.enter.native="crud.toQuery" @keyup.enter.native="crud.toQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="母卷号"> <el-form-item :label="$t('rawworkorder.placeholder.container_name')">
<label slot="label">&nbsp;&nbsp;&nbsp;&nbsp;:</label> <label slot="label">{{ $t('rawworkorder.placeholder.container_name') }}:</label>
<el-input <el-input
v-model="query.container_name" v-model="query.container_name"
clearable clearable
size="mini" size="mini"
placeholder="母卷号" :placeholder="$t('rawworkorder.placeholder.container_name')"
@keyup.enter.native="crud.toQuery" @keyup.enter.native="crud.toQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="工单状态"> <el-form-item :label="$t('rawworkorder.placeholder.product_status')">
<el-select <el-select
v-model="query.status" v-model="query.status"
clearable clearable
size="mini" size="mini"
placeholder="工单状态" :placeholder="$t('rawworkorder.placeholder.product_status')"
class="filter-item" class="filter-item"
@change="hand" @change="hand"
> >
<el-option <el-option
v-for="item in dict.product_status" v-for="item in dict.product_status"
:key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="工单日期"> <el-form-item :label="$t('rawworkorder.placeholder.create_time')">
<el-date-picker <el-date-picker
v-model="query.createTime" v-model="query.createTime"
type="daterange" type="daterange"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
start-placeholder="开始日期" :start-placeholder="$t('rawworkorder.placeholder.start_time')"
end-placeholder="结束日期" :end-placeholder="$t('rawworkorder.placeholder.end_time')"
:default-time="['00:00:00', '23:59:59']" :default-time="['00:00:00', '23:59:59']"
@change="crud.toQuery" @change="crud.toQuery"
/> />
@ -93,7 +95,7 @@
:disabled="crud.selections.length !== 1" :disabled="crud.selections.length !== 1"
@click="compelEnd" @click="compelEnd"
> >
强制结束 {{ $t('rawworkorder.placeholder.compelEnd') }}
</el-button> </el-button>
<el-button <el-button
slot="right" slot="right"
@ -104,7 +106,7 @@
:disabled="crud.selections.length !== 1" :disabled="crud.selections.length !== 1"
@click="weigh" @click="weigh"
> >
称重 {{ $t('rawworkorder.placeholder.weigh') }}
</el-button> </el-button>
</crudOperation> </crudOperation>
<!--表单组件--> <!--表单组件-->
@ -118,12 +120,12 @@
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="110px"> <el-form ref="form" :model="form" :rules="rules" size="mini" label-width="110px">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="母卷号" prop="container_name"> <el-form-item :label="$t('rawworkorder.placeholder.container_name')" prop="container_name">
<el-input v-model="form.container_name" style="width: 250px;" /> <el-input v-model="form.container_name" style="width: 250px;" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="机台编码" prop="resource_name"> <el-form-item :label="$t('rawworkorder.placeholder.resource_name')" prop="resource_name">
<el-input v-model="form.resource_name" style="width: 250px;" /> <el-input v-model="form.resource_name" style="width: 250px;" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -131,12 +133,12 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="生产工单" prop="mfg_order_name"> <el-form-item :label="$t('rawworkorder.dialog.mfg_order_name')" prop="mfg_order_name">
<el-input v-model="form.mfg_order_name" style="width: 250px;" /> <el-input v-model="form.mfg_order_name" style="width: 250px;" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="产品编码" prop="product_name"> <el-form-item :label="$t('rawworkorder.dialog.product_name')" prop="product_name">
<el-input v-model="form.product_name" style="width: 250px;" /> <el-input v-model="form.product_name" style="width: 250px;" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -144,12 +146,12 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="产品名称" prop="description"> <el-form-item :label="$t('rawworkorder.dialog.description')" prop="description">
<el-input v-model="form.description" style="width: 250px;" /> <el-input v-model="form.description" style="width: 250px;" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="理论长度" prop="theory_height"> <el-form-item :label="$t('rawworkorder.dialog.theory_height')" prop="theory_height">
<el-input v-model="form.theory_height" style="width: 250px;" /> <el-input v-model="form.theory_height" style="width: 250px;" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -157,33 +159,33 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="设备生产速度" prop="eqp_velocity"> <el-form-item :label="$t('rawworkorder.dialog.eqp_velocity')" prop="eqp_velocity">
<el-input v-model="form.eqp_velocity" style="width: 250px;" /> <el-input v-model="form.eqp_velocity" style="width: 250px;" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="上卷开始时间" prop="up_coiler_date"> <el-form-item :label="$t('rawworkorder.dialog.up_coiler_date')" prop="up_coiler_date">
<!-- <el-date-picker v-model="form.up_coiler_date" type="date" placeholder="选择日期" style="width: 250px" value-format="yyyy-MM-dd" />--> <!-- <el-date-picker v-model="form.up_coiler_date" type="date" placeholder="选择日期" style="width: 250px" value-format="yyyy-MM-dd" />-->
<el-date-picker <el-date-picker
v-model="form.up_coiler_date" v-model="form.up_coiler_date"
type="datetime" type="datetime"
placeholder="选择日期时间" :placeholder="$t('rawworkorder.dialog.select_time')"
style="width: 250px" style="width: 250px"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
default-time="12:00:00"> default-time="12:00:00"
</el-date-picker> />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="重量"> <el-form-item :label="$t('rawworkorder.dialog.productin_qty')">
<el-input v-model="form.productin_qty" style="width: 250px;" /> <el-input v-model="form.productin_qty" style="width: 250px;" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="车号"> <el-form-item :label="$t('rawworkorder.dialog.agvno')">
<el-input v-model="form.agvno" style="width: 250px;" /> <el-input v-model="form.agvno" style="width: 250px;" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -191,22 +193,22 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="备注"> <el-form-item :label="$t('rawworkorder.dialog.remark')">
<el-input v-model="form.remark" style="width: 250px;" /> <el-input v-model="form.remark" style="width: 250px;" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="是否重新更新"> <el-form-item :label="$t('rawworkorder.dialog.is_reload_send')">
<el-radio v-model="form.is_reload_send" label="0"></el-radio> <el-radio v-model="form.is_reload_send" label="0">{{ $t('rawworkorder.dialog.no') }}</el-radio>
<el-radio v-model="form.is_reload_send" label="1"></el-radio> <el-radio v-model="form.is_reload_send" label="1">{{ $t('rawworkorder.dialog.yes') }}</el-radio>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">取消</el-button> <el-button type="text" @click="crud.cancelCU">{{ $t('rawworkorder.dialog.cancel') }}</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button> <el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('rawworkorder.dialog.confirm') }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
<!--表格渲染--> <!--表格渲染-->
@ -219,23 +221,23 @@
@selection-change="crud.selectionChangeHandler" @selection-change="crud.selectionChangeHandler"
> >
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column v-if="false" prop="workorder_id" label="工单标识" /> <el-table-column v-if="false" prop="workorder_id" :label="$t('rawworkorder.dialog.workorder_id')" />
<el-table-column prop="mfg_order_name" label="工单号" :min-width="flexWidth('mfg_order_name',crud.data,'工单号')" /> <el-table-column prop="mfg_order_name" :label="$t('rawworkorder.dialog.mfg_order_name')" :min-width="flexWidth('mfg_order_name',crud.data,'工单号')" />
<el-table-column prop="status" label="工单状态" :min-width="flexWidth('status',crud.data,'工单状态')" :formatter="formatStatusName"/> <el-table-column prop="status" :label="$t('rawworkorder.placeholder.status')" :min-width="flexWidth('status',crud.data,'工单状态')" :formatter="formatStatusName" />
<el-table-column prop="container_name" label="母卷号" :min-width="flexWidth('container_name',crud.data,'母卷号')" /> <el-table-column prop="container_name" :label="$t('rawworkorder.placeholder.container_name')" :min-width="flexWidth('container_name',crud.data,'母卷号')" />
<el-table-column prop="point_code2" label="点位编码" :min-width="flexWidth('point_code2',crud.data,'点位编码')" /> <el-table-column prop="point_code2" :label="$t('rawworkorder.dialog.point_code2')" :min-width="flexWidth('point_code2',crud.data,'点位编码')" />
<el-table-column prop="resource_name" label="机台编码" :min-width="flexWidth('resource_name',crud.data,'机台编码')" /> <el-table-column prop="resource_name" :label="$t('rawworkorder.placeholder.resource_name')" :min-width="flexWidth('resource_name',crud.data,'机台编码')" />
<el-table-column prop="product_name" label="产品编码" :min-width="flexWidth('product_name',crud.data,'产品编码')" /> <el-table-column prop="product_name" :label="$t('rawworkorder.dialog.product_name')" :min-width="flexWidth('product_name',crud.data,'产品编码')" />
<el-table-column prop="theory_height" label="理论长度" :min-width="flexWidth('theory_height',crud.data,'理论长度')" /> <el-table-column prop="theory_height" :label="$t('rawworkorder.dialog.theory_height')" :min-width="flexWidth('theory_height',crud.data,'理论长度')" />
<el-table-column prop="realstart_time" label="开始时间" :min-width="flexWidth('realstart_time',crud.data,'开始时间')" /> <el-table-column prop="realstart_time" :label="$t('rawworkorder.placeholder.start_time')" :min-width="flexWidth('realstart_time',crud.data,'开始时间')" />
<el-table-column prop="realend_time" label="结束时间" :min-width="flexWidth('realend_time',crud.data,'结束时间')" /> <el-table-column prop="realend_time" :label="$t('rawworkorder.placeholder.end_time')" :min-width="flexWidth('realend_time',crud.data,'结束时间')" />
<el-table-column prop="productin_qty" label="重量" :min-width="flexWidth('productin_qty',crud.data,'重量')" :formatter="crud.formatNum3" /> <el-table-column prop="productin_qty" :label="$t('rawworkorder.dialog.productin_qty')" :min-width="flexWidth('productin_qty',crud.data,'重量')" :formatter="crud.formatNum3" />
<el-table-column prop="agvno" label="车号" :min-width="flexWidth('agvno',crud.data,'车号')" /> <el-table-column prop="agvno" :label="$t('rawworkorder.dialog.agvno')" :min-width="flexWidth('agvno',crud.data,'车号')" />
<el-table-column prop="product_area" label="生产区域" :min-width="flexWidth('product_area',crud.data,'生产区域')" /> <el-table-column prop="product_area" :label="$t('rawworkorder.placeholder.product_area')" :min-width="flexWidth('product_area',crud.data,'生产区域')" />
<el-table-column prop="is_baking" label="请求烘烤" :min-width="flexWidth('is_baking',crud.data,'请求烘烤')" :formatter="formatBakeIsOrNot"/> <el-table-column prop="is_baking" :label="$t('rawworkorder.dialog.is_baking')" :min-width="flexWidth('is_baking',crud.data,'请求烘烤')" :formatter="formatBakeIsOrNot" />
<el-table-column prop="is_instor" label="请求入半成品库" :min-width="flexWidth('is_instor',crud.data,'请求入半成品库')" :formatter="formatStorIsOrNot"/> <el-table-column prop="is_instor" :label="$t('rawworkorder.dialog.is_instor')" :min-width="flexWidth('is_instor',crud.data,'请求入半成品库')" :formatter="formatStorIsOrNot" />
<el-table-column prop="update_time" label="更新时间" :min-width="flexWidth('update_time',crud.data,'更新时间')" /> <el-table-column prop="update_time" :label="$t('rawworkorder.dialog.update_time')" :min-width="flexWidth('update_time',crud.data,'更新时间')" />
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right"> <el-table-column v-permission="[]" :label="$t('rawworkorder.dialog.operate')" width="120px" align="center" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<udOperation <udOperation
:data="scope.row" :data="scope.row"
@ -261,6 +263,7 @@ import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation' import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation' import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination' import pagination from '@crud/Pagination'
import i18n from '@/i18n'
const defaultForm = { const defaultForm = {
workorder_id: null, workorder_id: null,
@ -295,7 +298,7 @@ export default {
mixins: [presenter(), header(), form(defaultForm), crud()], mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() { cruds() {
return CRUD({ return CRUD({
title: '生箔工序工单', title: i18n.t('rawworkorder.title'),
url: 'api/rawfoilworkorder', url: 'api/rawfoilworkorder',
idField: 'workorder_id', idField: 'workorder_id',
sort: 'workorder_id,desc', sort: 'workorder_id,desc',
@ -316,28 +319,28 @@ export default {
permission: {}, permission: {},
rules: { rules: {
container_name: [ container_name: [
{ required: true, message: '母卷号不能为空', trigger: 'blur' } { required: true, message: this.$t('rawworkorder.msg.isNotEmpty'), trigger: 'blur' }
], ],
resource_name: [ resource_name: [
{ required: true, message: '机台编码不能为空', trigger: 'blur' } { required: true, message: this.$t('rawworkorder.msg.isNotEmpty'), trigger: 'blur' }
], ],
mfg_order_name: [ mfg_order_name: [
{ required: true, message: '生产工单不能为空', trigger: 'blur' } { required: true, message: this.$t('rawworkorder.msg.isNotEmpty'), trigger: 'blur' }
], ],
product_name: [ product_name: [
{ required: true, message: '产品编码不能为空', trigger: 'blur' } { required: true, message: this.$t('rawworkorder.msg.isNotEmpty'), trigger: 'blur' }
], ],
description: [ description: [
{ required: true, message: '产品名称不能为空', trigger: 'blur' } { required: true, message: this.$t('rawworkorder.msg.isNotEmpty'), trigger: 'blur' }
], ],
theory_height: [ theory_height: [
{ required: true, message: '理论长度不能为空', trigger: 'blur' } { required: true, message: this.$t('rawworkorder.msg.isNotEmpty'), trigger: 'blur' }
], ],
eqp_velocity: [ eqp_velocity: [
{ required: true, message: '设备生产速度不能为空', trigger: 'blur' } { required: true, message: this.$t('rawworkorder.msg.isNotEmpty'), trigger: 'blur' }
], ],
p_coiler_date: [ p_coiler_date: [
{ required: true, message: '上卷开始时间不能为空', trigger: 'blur' } { required: true, message: this.$t('rawworkorder.msg.isNotEmpty'), trigger: 'blur' }
] ]
} }
} }
@ -363,11 +366,11 @@ export default {
const _selectData = this.$refs.table.selection const _selectData = this.$refs.table.selection
const data = _selectData[0] const data = _selectData[0]
if (data.status === '09') { if (data.status === '09') {
return this.crud.notify('不能对完成状态的工单强制结束', CRUD.NOTIFICATION_TYPE.INFO) return this.crud.notify(this.$t('rawworkorder.msg.notFinish'), CRUD.NOTIFICATION_TYPE.INFO)
} }
crudRawfoilworkorder.compelEnd(data).then(res => { crudRawfoilworkorder.compelEnd(data).then(res => {
this.crud.toQuery() this.crud.toQuery()
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS) this.crud.notify(this.$t('rawworkorder.msg.success'), CRUD.NOTIFICATION_TYPE.SUCCESS)
}) })
}, },
weigh() { weigh() {

Loading…
Cancel
Save