优化
This commit is contained in:
@@ -82,7 +82,7 @@
|
||||
size="small"
|
||||
:controls="false"
|
||||
controls-position="right"
|
||||
precision="3"
|
||||
precision="1"
|
||||
:min="0"
|
||||
@change="change($event,crud.data[scope.$index],scope.$index)"
|
||||
/>
|
||||
@@ -95,7 +95,7 @@
|
||||
size="small"
|
||||
:controls="false"
|
||||
controls-position="right"
|
||||
precision="3"
|
||||
precision="1"
|
||||
:min="0"
|
||||
@change="change($event,crud.data[scope.$index],scope.$index)"
|
||||
/>
|
||||
|
||||
@@ -71,16 +71,6 @@
|
||||
>
|
||||
添加物料
|
||||
</el-button>
|
||||
<!-- <el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
@click="delRow"
|
||||
>
|
||||
删除一行
|
||||
</el-button>-->
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -96,10 +86,10 @@
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column show-overflow-tooltip v-if="false" prop="material_id" label="物料id" align="center" />
|
||||
<el-table-column show-overflow-tooltip v-if="false" prop="base_unit_id" label="单位id" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="备件物料编码" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="备件物料名称" align="center" />
|
||||
<el-table-column v-if="false" prop="material_id" label="物料id" align="center" />
|
||||
<el-table-column v-if="false" prop="base_unit_id" label="单位id" align="center" />
|
||||
<el-table-column prop="material_code" label="备件物料编码" align="center" />
|
||||
<el-table-column prop="material_name" label="备件物料名称" align="center" />
|
||||
<el-table-column prop="qty" label="标准数量" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
@@ -112,7 +102,7 @@
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="base_unit_id_name" label="单位" align="center" />
|
||||
<el-table-column prop="base_unit_id_name" label="单位" align="center" />
|
||||
<el-table-column prop="dtl_remark" label="备注" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-show="!scope.row.edit" v-model="scope.row.dtl_remark" class="input-with-select" :disabled="crud.status.view > 0" />
|
||||
@@ -194,8 +184,6 @@ export default {
|
||||
}
|
||||
crudMaterialbase.getMaterOptType(param).then(res => {
|
||||
this.class_idStr = res.class_idStr
|
||||
// this.crud.query.class_idStr = this.class_idStr
|
||||
// this.crud.toQuery()
|
||||
this.queryClassId()
|
||||
})
|
||||
const data = {
|
||||
@@ -236,7 +224,6 @@ export default {
|
||||
})
|
||||
},
|
||||
[CRUD.HOOK.afterToCU](crud, form) {
|
||||
debugger
|
||||
if (!form.device_bom_code) {
|
||||
this.queryClassId()
|
||||
} else {
|
||||
@@ -247,9 +234,7 @@ export default {
|
||||
}
|
||||
},
|
||||
getSubTypes(id) {
|
||||
debugger
|
||||
crudClassstandard.getClassSuperior2(id).then(res => {
|
||||
debugger
|
||||
const date = res.content
|
||||
this.buildClass(date)
|
||||
this.classes = date
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<el-row>
|
||||
<el-col span="12">
|
||||
<el-form-item label="故障编码:" prop="device_faultclass_code">
|
||||
<el-input v-model="form.device_faultclass_name" style="width: 280px;" disabled placeholder="系统生成" />
|
||||
<el-input v-model="form.device_faultclass_code" style="width: 280px;" disabled placeholder="系统生成" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="12">
|
||||
|
||||
@@ -251,6 +251,17 @@ export default {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
[CRUD.HOOK.afterToCU](crud, form) {
|
||||
debugger
|
||||
if (!form.maint_item_code) {
|
||||
this.queryClassId()
|
||||
} else {
|
||||
const data = {}
|
||||
data.id = form.material_type_id
|
||||
data.goal_id = this.classBj_id
|
||||
this.getSubTypes(data)
|
||||
}
|
||||
},
|
||||
changeQuery() {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
@@ -290,6 +301,25 @@ export default {
|
||||
return obj
|
||||
})
|
||||
})
|
||||
},
|
||||
getSubTypes(id) {
|
||||
debugger
|
||||
crudClassstandard.getClassSuperior2(id).then(res => {
|
||||
debugger
|
||||
const date = res.content
|
||||
this.buildClass(date)
|
||||
this.classes = date
|
||||
})
|
||||
},
|
||||
buildClass(classes) {
|
||||
classes.forEach(data => {
|
||||
if (data.children) {
|
||||
this.buildClass(data.children)
|
||||
}
|
||||
if (data.hasChildren && !data.children) {
|
||||
data.children = null
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,6 +187,16 @@ export default {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
[CRUD.HOOK.afterToCU](crud, form) {
|
||||
if (!form.repair_item_code) {
|
||||
this.queryClassId()
|
||||
} else {
|
||||
const data = {}
|
||||
data.id = form.material_type_id
|
||||
data.goal_id = this.classBj_id
|
||||
this.getSubTypes(data)
|
||||
}
|
||||
},
|
||||
loadClass({ action, parentNode, callback }) {
|
||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
||||
@@ -214,6 +224,25 @@ export default {
|
||||
return obj
|
||||
})
|
||||
})
|
||||
},
|
||||
getSubTypes(id) {
|
||||
debugger
|
||||
crudClassstandard.getClassSuperior2(id).then(res => {
|
||||
debugger
|
||||
const date = res.content
|
||||
this.buildClass(date)
|
||||
this.classes = date
|
||||
})
|
||||
},
|
||||
buildClass(classes) {
|
||||
classes.forEach(data => {
|
||||
if (data.children) {
|
||||
this.buildClass(data.children)
|
||||
}
|
||||
if (data.hasChildren && !data.children) {
|
||||
data.children = null
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,11 +33,11 @@
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
@input="onInput()"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@input="onInput()"
|
||||
@change="mytoQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -246,8 +246,8 @@
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :selectable="checkboxT" type="selection" min-width="35" />
|
||||
<el-table-column prop="workorder_date" min-width="83" label="工令日期" :formatter="workorder_dateFormat"/>
|
||||
<el-table-column :selectable="checkboxT" type="selection" min-width="35" />
|
||||
<el-table-column prop="workorder_date" min-width="83" label="工令日期" :formatter="workorder_dateFormat" />
|
||||
<el-table-column prop="workorder_code" min-width="130" label="工令号">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.workorder_code }}</el-link>
|
||||
@@ -255,28 +255,28 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="org_id" :formatter="orgFormat" min-width="105" label="所属组织" />
|
||||
<el-table-column prop="workorder_type" :formatter="bill_typeFormat" min-width="75" label="工令类型" />
|
||||
<el-table-column :formatter="stateFormat" min-width="75" prop="status" label="工令状态" />
|
||||
<el-table-column prop="device_name" min-width="80" label="设备"/>
|
||||
<el-table-column prop="material_code" min-width="130" label="物料编码"/>
|
||||
<el-table-column prop="old_mark" min-width="100" label="牌号"/>
|
||||
<el-table-column :formatter="stateFormat" min-width="75" prop="status" label="工令状态" />
|
||||
<el-table-column prop="device_name" min-width="80" label="设备" />
|
||||
<el-table-column prop="material_code" min-width="130" label="物料编码" />
|
||||
<el-table-column prop="old_mark" min-width="100" label="牌号" />
|
||||
<el-table-column :formatter="seriesFormat" min-width="65" prop="product_series_id" label="系列" />
|
||||
<el-table-column prop="pcsn" min-width="85" label="批次"/>
|
||||
<el-table-column prop="workorder_qty" min-width="75" label="计划重量" :formatter="crud.formatNum0"/>
|
||||
<el-table-column prop="pcsn" min-width="85" label="批次" />
|
||||
<el-table-column prop="workorder_qty" min-width="75" label="计划重量" :formatter="crud.formatNum0" />
|
||||
<el-table-column prop="bill_qty" min-width="90" label="开单总重量" :formatter="crud.formatNum3" />
|
||||
<el-table-column prop="productin_qty" min-width="90" label="实投总重量" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="qty_unit_name" min-width="75" label="单位"/>
|
||||
<el-table-column prop="planstart_time" min-width="100" label="计划开始时间" :formatter="workorder_dateFormat"/>
|
||||
<el-table-column prop="planend_time" min-width="100" label="计划结束时间" :formatter="planend_timeFormat" />
|
||||
<el-table-column prop="realstart_time" min-width="135" label="实际开始时间"/>
|
||||
<el-table-column prop="realend_time" min-width="135" label="实际结束时间"/>
|
||||
<el-table-column min-width="70" prop="source_bill_type" :formatter="workorder_typeFormat2" label="源类型" />
|
||||
<el-table-column prop="productin_qty" min-width="90" label="实投总重量" :formatter="crud.formatNum3" />
|
||||
<el-table-column prop="qty_unit_name" min-width="75" label="单位" />
|
||||
<el-table-column prop="planstart_time" min-width="100" label="计划开始时间" :formatter="workorder_dateFormat" />
|
||||
<el-table-column prop="planend_time" min-width="100" label="计划结束时间" :formatter="planend_timeFormat" />
|
||||
<el-table-column prop="realstart_time" min-width="135" label="实际开始时间" />
|
||||
<el-table-column prop="realend_time" min-width="135" label="实际结束时间" />
|
||||
<el-table-column min-width="70" prop="source_bill_type" :formatter="workorder_typeFormat2" label="源类型" />
|
||||
<el-table-column prop="source_bill_code" label="来源单据编号" min-width="105" />
|
||||
<el-table-column min-width="75" prop="workprocedure_id" label="当前工序" :formatter="seriesFormat2" />
|
||||
<el-table-column prop="startwork_name" min-width="60" label="开工人"/>
|
||||
<el-table-column prop="endwork_name" min-width="60" label="完工人"/>
|
||||
<el-table-column prop="create_name" min-width="60" label="创建人"/>
|
||||
<el-table-column prop="update_optname" min-width="60" label="修改人"/>
|
||||
<el-table-column prop="remark" min-width="180" label="备注"/>
|
||||
<el-table-column prop="startwork_name" min-width="60" label="开工人" />
|
||||
<el-table-column prop="endwork_name" min-width="60" label="完工人" />
|
||||
<el-table-column prop="create_name" min-width="60" label="创建人" />
|
||||
<el-table-column prop="update_optname" min-width="60" label="修改人" />
|
||||
<el-table-column prop="remark" min-width="180" label="备注" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
@@ -297,16 +297,16 @@ import pagination from '@crud/Pagination'
|
||||
import AddDialog from '@/views/wms/pdm/produce/workorder/AddDialog'
|
||||
import ViewDialog from '@/views/wms/pdm/produce/workorder/ViewDialog'
|
||||
import ChangeDialog from '@/views/wms/pdm/produce/workorder/ChangeDialog'
|
||||
import crudseriesProcessRoute from "@/api/wms/pdm/seriesProcessRoute";
|
||||
import {getLodop} from "@/assets/js/lodop/LodopFuncs";
|
||||
import Date from "@/utils/datetime";
|
||||
import crudWorkProcedure from "@/api/wms/basedata/pdm/workProcedure";
|
||||
import crudseriesProcessRoute from '@/api/wms/pdm/seriesProcessRoute'
|
||||
import { getLodop } from '@/assets/js/lodop/LodopFuncs'
|
||||
import Date from '@/utils/datetime'
|
||||
import crudWorkProcedure from '@/api/wms/basedata/pdm/workProcedure'
|
||||
import { download } from '@/api/data'
|
||||
import { downloadFile } from '@/utils'
|
||||
import producetask from '@/api/wms/pdm/producetask'
|
||||
|
||||
export default {
|
||||
name: 'workorder',
|
||||
name: 'Workorder',
|
||||
components: { ChangeDialog, ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({ title: '工令',
|
||||
@@ -378,7 +378,7 @@ export default {
|
||||
return row.status !== '10'
|
||||
},
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
if(this.query_flag){
|
||||
if (this.query_flag) {
|
||||
this.crud.query.begin_time = (new Date()).strftime('%F', 'zh')
|
||||
this.crud.query.end_time = (new Date().daysLater(2)).strftime('%F', 'zh')
|
||||
this.query_flag = false
|
||||
@@ -413,16 +413,14 @@ export default {
|
||||
if (rows[i].status > '40' || rows.length !== 1) {
|
||||
this.change_flag = true
|
||||
}
|
||||
//选择工令标识的工令状态必须为50开工,选择工令标识的工序任务状态必须全为99结束生产
|
||||
if (rows[i].status !== '50') {//后台校验工序任务
|
||||
if (rows[i].status !== '50') { // 后台校验工序任务
|
||||
this.confirm_flag = true
|
||||
}
|
||||
//选择工令标识,若产品工艺路线第一个工序为配粉,工令状态必须40已开单; 否则,工令状态必须20已提交
|
||||
if (!'40,20'.includes(rows[i].status)) {//后台校验首道工序
|
||||
if (!'40,20'.includes(rows[i].status)) { // 后台校验首道工序
|
||||
this.open_flag = true
|
||||
}
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
this.handleCurrentChange()
|
||||
}
|
||||
},
|
||||
@@ -476,7 +474,7 @@ export default {
|
||||
},
|
||||
typeChange() {
|
||||
this.checkrows = this.$refs.table.selection
|
||||
if(this.checkrows.length !== 1 ){
|
||||
if (this.checkrows.length !== 1) {
|
||||
this.crud.notify('只能勾选一条记录修改工令类型!')
|
||||
return false
|
||||
}
|
||||
@@ -488,13 +486,17 @@ export default {
|
||||
},
|
||||
submit(status) {
|
||||
this.checkrows = this.$refs.table.selection
|
||||
if(this.checkrows.length === 0 ){
|
||||
if (this.checkrows.length === 0) {
|
||||
this.crud.notify('请勾选需要操作的记录!')
|
||||
return false
|
||||
}
|
||||
workorder.submit({ 'status': status, rows: this.checkrows}).then(res => {
|
||||
this.crud.loading = true
|
||||
workorder.submit({ 'status': status, rows: this.checkrows }).then(res => {
|
||||
this.crud.notify('操作成功!')
|
||||
this.crud.loading = false
|
||||
this.querytable()
|
||||
}).catch(() => {
|
||||
this.crud.loading = false
|
||||
})
|
||||
},
|
||||
downdData() {
|
||||
@@ -508,31 +510,42 @@ export default {
|
||||
},
|
||||
openWork() {
|
||||
this.checkrows = this.$refs.table.selection
|
||||
if(this.checkrows.length === 0 ){
|
||||
if (this.checkrows.length === 0) {
|
||||
this.crud.notify('请勾选需要操作的记录!')
|
||||
return false
|
||||
}
|
||||
workorder.openWork({ rows: this.checkrows}).then(res => {
|
||||
this.open_flag = true
|
||||
this.crud.loading = true
|
||||
workorder.openWork({ rows: this.checkrows }).then(res => {
|
||||
this.crud.notify('操作成功!')
|
||||
this.crud.loading = false
|
||||
this.open_flag = false
|
||||
this.querytable()
|
||||
}).catch(() => {
|
||||
this.crud.loading = false
|
||||
this.open_flag = false
|
||||
})
|
||||
},
|
||||
confirmWork() {
|
||||
this.checkrows = this.$refs.table.selection
|
||||
if(this.checkrows.length === 0 ){
|
||||
if (this.checkrows.length === 0) {
|
||||
this.crud.notify('请勾选需要操作的记录!')
|
||||
return false
|
||||
}
|
||||
workorder.confirmWork({ rows: this.checkrows}).then(res => {
|
||||
this.crud.loading = true
|
||||
workorder.confirmWork({ rows: this.checkrows }).then(res => {
|
||||
this.crud.notify('操作成功!')
|
||||
this.crud.loading = false
|
||||
this.querytable()
|
||||
}).catch(() => {
|
||||
this.crud.loading = false
|
||||
})
|
||||
},
|
||||
mytoQuery(array1){
|
||||
if(array1 === null){
|
||||
mytoQuery(array1) {
|
||||
if (array1 === null) {
|
||||
this.crud.query.begin_time = ''
|
||||
this.crud.query.end_time = ''
|
||||
}else{
|
||||
} else {
|
||||
this.crud.query.begin_time = array1[0]
|
||||
this.crud.query.end_time = array1[1]
|
||||
}
|
||||
|
||||
@@ -133,6 +133,7 @@ export default {
|
||||
name: 'Devicerepairrequest',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, DateRangePicker, Treeselect, PicDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
dicts: ['EM_FAULT_LEVEL'],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '设备报修处理',
|
||||
@@ -212,14 +213,8 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
formaLevelName(row, cloum) {
|
||||
if (row.fault_level === '01') {
|
||||
return '一级'
|
||||
} else if (row.fault_level === '02') {
|
||||
return '二级'
|
||||
} else if (row.fault_level === '03') {
|
||||
return '三级'
|
||||
}
|
||||
formaLevelName(row) {
|
||||
return this.dict.label.EM_FAULT_LEVEL[row.fault_level]
|
||||
},
|
||||
formatStatusName(row, cloum) {
|
||||
if (row.status === '01') {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<el-form ref="form" :inline="true" :model="form4" size="mini" label-width="120px" label-suffix=":">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="维修人" prop="update_optname">
|
||||
<el-form-item label="保养人" prop="update_optname">
|
||||
<el-input v-model="form4.update_optname" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<el-form ref="form" :inline="true" :model="form4" size="mini" label-width="120px" label-suffix=":">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="维修人" prop="update_optname">
|
||||
<el-form-item label="保养人" prop="update_optname">
|
||||
<el-input v-model="form4.update_optname" style="width: 200px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@@ -114,17 +114,6 @@
|
||||
>
|
||||
开始保养
|
||||
</el-button>
|
||||
<!-- <el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="execu_flag"
|
||||
@click="executeMaintain"
|
||||
>
|
||||
保养执行
|
||||
</el-button>-->
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
|
||||
Reference in New Issue
Block a user