rev:修改工单页面crud
This commit is contained in:
@@ -1,45 +1,50 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
:before-close="crud.cancelCU"
|
||||
:visible="crud.status.cu > 0"
|
||||
:title="crud.status.title"
|
||||
width="500px"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
||||
<el-form-item label="物料系列" prop="code">
|
||||
<el-input v-model="form.material_spec" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工序调度编号">
|
||||
<el-input v-model="form.process_id" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 字典列表 -->
|
||||
<el-card class="box-card">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="设备编号模糊查询"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<rrOperation :permission="permission" />
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="90px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="生产车间">
|
||||
<el-select
|
||||
v-model="form.product_area"
|
||||
placeholder=""
|
||||
style="width: 200px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.product_area"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备编号">
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="设备编号模糊查询"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备编号">
|
||||
<rrOperation :permission="permission" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<crudOperation :permission="permission" />
|
||||
<crudOperation v-show="false" :permission="permission" />
|
||||
</div>
|
||||
<!--表格渲染-->
|
||||
|
||||
@@ -79,12 +84,6 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<MaterDtl
|
||||
:dialog-show.sync="materialShow"
|
||||
:is-single="true"
|
||||
:mater-opt-code="materType"
|
||||
@setMaterValue="setMaterValue"
|
||||
/>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</el-card>
|
||||
@@ -97,13 +96,13 @@ import CRUD, { presenter, header, form } from '@crud/crud'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
||||
|
||||
const defaultForm = { product_area: 'A1', workprocedure_id: '1535144552481034240', device_code: null, material_id: null, material_name: null, material_spec: null, deviceinstor_qty: null, deviceinstor_weight: null, remark: null }
|
||||
|
||||
export default {
|
||||
name: 'SKdevice',
|
||||
components: { crudOperation, pagination, rrOperation, MaterDtl },
|
||||
components: { crudOperation, pagination, rrOperation },
|
||||
dicts: ['product_area'],
|
||||
cruds() {
|
||||
return [
|
||||
CRUD({ title: '深坑设备物料', url: 'api/specialDevice/query', query: { product_area: 'A1', workprocedure_id: '1535144552481034240' }, idField: 'device_code', crudMethod: { ...crudDevice }})
|
||||
@@ -141,13 +140,6 @@ export default {
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
setMaterValue(row) {
|
||||
this.nowrow.material_id = row.material_id
|
||||
this.nowrow.material_code = row.material_code
|
||||
this.nowrow.material_name = row.material_name
|
||||
this.nowrow.material_spec = row.material_spec
|
||||
this.tableData.splice(this.nowindex, 1, this.nowrow) // 通过splice 替换数据 触发视图更新
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
156
mes/qd/src/views/wms/device_manage/deviceMaterial/备份.vue
Normal file
156
mes/qd/src/views/wms/device_manage/deviceMaterial/备份.vue
Normal file
@@ -0,0 +1,156 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
:before-close="crud.cancelCU"
|
||||
:visible="crud.status.cu > 0"
|
||||
:title="crud.status.title"
|
||||
width="500px"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
||||
<el-form-item label="物料系列" prop="code">
|
||||
<el-input v-model="form.material_spec" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工序调度编号">
|
||||
<el-input v-model="form.process_id" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 字典列表 -->
|
||||
<el-card class="box-card">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="设备编号模糊查询"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<rrOperation :permission="permission" />
|
||||
</div>
|
||||
<crudOperation :permission="permission" />
|
||||
</div>
|
||||
<!--表格渲染-->
|
||||
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
highlight-current-row
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="product_area" label="生产车间" width="100px" show-overflow-tooltip />
|
||||
<el-table-column prop="device_code" label="设备编码" width="100px" show-overflow-tooltip />
|
||||
<el-table-column prop="material_id" label="物料id" width="200px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.material_id">
|
||||
<el-button slot="append" icon="el-icon-plus" @click="queryMater(scope.$index, scope.row)" />
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="material_name" label="物料名称" width="200px" show-overflow-tooltip />
|
||||
<el-table-column prop="material_spec" label="物料规格" width="200px" show-overflow-toolti />
|
||||
<el-table-column prop="deviceinstor_qty" label="物料数量(个)" align="center" width="120px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.deviceinstor_qty" /></template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="deviceinstor_weight" label="物料重量(g)" align="center" width="120px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.deviceinstor_weight" /></template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" width="200px" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="150px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" style="margin-left: -1px;margin-right: 2px" type="text" @click="updateSKMaterial(scope.row)">提交修改</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<MaterDtl
|
||||
:dialog-show.sync="materialShow"
|
||||
:is-single="true"
|
||||
:mater-opt-code="materType"
|
||||
@setMaterValue="setMaterValue"
|
||||
/>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudDevice from '@/views/wms/device_manage/deviceMaterial/deviceMaterial.js'
|
||||
import CRUD, { presenter, header, form } from '@crud/crud'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
||||
|
||||
const defaultForm = { product_area: 'A1', workprocedure_id: '1535144552481034240', device_code: null, material_id: null, material_name: null, material_spec: null, deviceinstor_qty: null, deviceinstor_weight: null, remark: null }
|
||||
|
||||
export default {
|
||||
name: 'SKdevice',
|
||||
components: { crudOperation, pagination, rrOperation, MaterDtl },
|
||||
cruds() {
|
||||
return [
|
||||
CRUD({ title: '深坑设备物料', url: 'api/specialDevice/query', query: { product_area: 'A1', workprocedure_id: '1535144552481034240' }, idField: 'device_code', crudMethod: { ...crudDevice }})
|
||||
]
|
||||
},
|
||||
mixins: [presenter(), header(), form(defaultForm)],
|
||||
data() {
|
||||
return {
|
||||
materialShow: false,
|
||||
queryTypeOptions: [
|
||||
{ key: 'name', display_name: '字典名称' },
|
||||
{ key: 'description', display_name: '描述' }
|
||||
],
|
||||
rules: {
|
||||
material_spec: [
|
||||
{ required: true, message: '请输入编码', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
permission: {
|
||||
add: ['admin', 'dict:add'],
|
||||
edit: ['admin', 'dict:edit'],
|
||||
del: ['admin', 'dict:del']
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
queryMater(index, row) {
|
||||
this.materialShow = true
|
||||
this.nowindex = index
|
||||
this.nowrow = row
|
||||
},
|
||||
updateSKMaterial(row) {
|
||||
crudDevice.edit(row).then(() => {
|
||||
this.notify('保存成功', 'success')
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
setMaterValue(row) {
|
||||
this.nowrow.material_id = row.material_id
|
||||
this.nowrow.material_code = row.material_code
|
||||
this.nowrow.material_name = row.material_name
|
||||
this.nowrow.material_spec = row.material_spec
|
||||
this.tableData.splice(this.nowindex, 1, this.nowrow) // 通过splice 替换数据 触发视图更新
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -48,7 +48,16 @@
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="设备搜索">
|
||||
<el-input
|
||||
v-model="query.device_code"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="设备编号"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label=" 工单状态">
|
||||
<el-select
|
||||
v-model="order_status"
|
||||
@@ -384,19 +393,16 @@
|
||||
<!-- <el-table-column prop="workprocedure_code" label="工序编码" />-->
|
||||
<el-table-column prop="product_area" label="生产车间" />
|
||||
<el-table-column prop="plan_qty" label="计划数量" />
|
||||
<el-table-column prop="real_qty" label="报工总数" />
|
||||
<el-table-column prop="nok_qty" label="报废总数" />
|
||||
<el-table-column prop="report_qty" label="报修总数" />
|
||||
<el-table-column prop="person_real_qty" label="人员实际数量" width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="dq_real_qty" label="电气实际数量" width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="material_name" label="物料名称" width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="real_qty" label="报工总数" />
|
||||
<el-table-column prop="material_spec" label="物料规格" width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="device_code" label="当前设备编码" width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="workprocedure_name" label="工序名称" width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="material_weight" label="物料单重" width="100" :formatter="crud.formatQlNum4" />
|
||||
<el-table-column prop="planproducestart_date" label="计划开始时间" width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="planproduceend_date" label="计划结束时间" width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="realproducestart_date" label="实际开始时间" width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="realproduceend_date" label="实际结束时间" width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="device_code" label="当前设备编码" width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="is_canupdate_update" label="允许修改报工数" :formatter="formatBoolean" width="200" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column prop="is_needmove" label="是否搬运" :formatter="formatBoolean" />
|
||||
@@ -413,6 +419,9 @@
|
||||
<el-table-column prop="is_error" :formatter="formatBoolean" label="是否异常"></el-table-column>
|
||||
<el-table-column prop="error_info" label="异常信息" show-overflow-tooltip />
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<el-table-column prop="nok_qty" label="报废总数" />
|
||||
<el-table-column prop="report_qty" label="报修总数" />
|
||||
<el-table-column prop="person_real_qty" label="人员实际数量" width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="current_produce_person_name" label="操作工" show-overflow-tooltip />
|
||||
<el-table-column prop="create_name" label="创建人" show-overflow-tooltip />
|
||||
<el-table-column prop="create_time" label="创建时间" show-overflow-tooltip />
|
||||
@@ -579,6 +588,9 @@ export default {
|
||||
this.initClass3()
|
||||
},
|
||||
methods: {
|
||||
databaseUploadApi(){
|
||||
|
||||
},
|
||||
formatBoolean: function(row, column) {
|
||||
var ret = ''
|
||||
if (row[column.property] === true) {
|
||||
|
||||
@@ -106,7 +106,7 @@ export function getReportWork(data) {
|
||||
export function reportQuery(data) {
|
||||
return request({
|
||||
url: '/api/produceWorkorder/reportQuery2',
|
||||
method: 'post',
|
||||
method: 'get',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -4,29 +4,51 @@
|
||||
append-to-body
|
||||
fullscreen
|
||||
:visible.sync="dialogVisible"
|
||||
@open="open"
|
||||
@close="close"
|
||||
>
|
||||
<el-card class="box-card" shadow="never">
|
||||
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="mini" label-width="180px">
|
||||
<div>
|
||||
<el-form ref="form" :inline="true" :rules="rules" size="mini" label-width="180px">
|
||||
<el-form-item label="工单编码">
|
||||
<el-input v-model="form.workorder_code" style="width: 200px;" clearable/>
|
||||
<el-input v-model="query.workorder_code" style="width: 200px;" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="班次类型" prop="shift_type_scode">
|
||||
<el-select
|
||||
v-model="query.shift_type_scode"
|
||||
style="width: 200px"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.PDM_BI_SHIFTTYPE"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产日期">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00','23:59:59']"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="只显示未审核">
|
||||
<el-switch
|
||||
v-model="form.is_report"
|
||||
v-model="query.is_report"
|
||||
active-color="#409EFF"
|
||||
inactive-color="#F56C6C"
|
||||
active-value='true'
|
||||
inactive-valu='false'
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-dropdown split-button type="primary" class="filter-item" @click="report()">
|
||||
<i class="el-icon-search el-icon--left" />查询
|
||||
</el-dropdown>
|
||||
<rrOperation :crud="crud" />
|
||||
</el-form>
|
||||
|
||||
</el-card>
|
||||
</div>
|
||||
<div class="crud-opts2" style="margin-top: 30px;margin-bottom: 15px">
|
||||
<span class="role-span">工单生产记录详情</span>
|
||||
<span class="crud-opts-right2">
|
||||
@@ -38,7 +60,8 @@
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tableData"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
style="width: 100%;"
|
||||
max-height="600"
|
||||
border
|
||||
@@ -60,17 +83,17 @@
|
||||
<el-input v-model = scope.row.report_qty></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="nok_qty" label="报废数量" >
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model = scope.row.nok_qty></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="repare_qty" label="报修数量" >
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model = scope.row.repare_qty></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="person_finish_qty" label="人员期末数量" />
|
||||
<!-- <el-table-column prop="nok_qty" label="报废数量" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-input v-model = scope.row.nok_qty></el-input>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="repare_qty" label="报修数量" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-input v-model = scope.row.repare_qty></el-input>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="person_finish_qty" label="人员期末数量" />-->
|
||||
<el-table-column prop="operatetime_start" label="开工时间" />
|
||||
<el-table-column prop="operatetime_end" label="完工时间" />
|
||||
<el-table-column prop="report_status" label="报工状态" >
|
||||
@@ -89,8 +112,7 @@
|
||||
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<!-- <pagination />-->
|
||||
|
||||
<pagination />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = false">确定</el-button>
|
||||
@@ -101,12 +123,56 @@
|
||||
<script>
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import crudProduceshiftorder from '@/views/wms/product_manage/workorder/produceshiftorder'
|
||||
import CRUD, { presenter, header, form } from '@crud/crud'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
|
||||
const defaultForm = { sale_id: null,
|
||||
is_report: null,
|
||||
workorder_id: null,
|
||||
workorder_code: null,
|
||||
producedeviceorder_code: null,
|
||||
shift_type_scode: null,
|
||||
workprocedure_id: null,
|
||||
produce_date: null,
|
||||
plan_qty: null,
|
||||
real_qty: null,
|
||||
report_qty: null,
|
||||
material_id: null,
|
||||
material_code: null,
|
||||
material_weight: null,
|
||||
planproducestart_date: null,
|
||||
planproduceend_date: null,
|
||||
realproducestart_date: null,
|
||||
realproduceend_date: null,
|
||||
order_status: null,
|
||||
is_needmove: null,
|
||||
order_type_scode: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
update_optid: null,
|
||||
update_optname: null,
|
||||
update_time: null,
|
||||
sysdeptid: null,
|
||||
syscompanyid: null,
|
||||
is_delete: null,
|
||||
material_name: null,
|
||||
device_id: null,
|
||||
is_canupdate_update: null,
|
||||
material_spec: null }
|
||||
|
||||
export default {
|
||||
name: 'ViewDialog',
|
||||
components: { },
|
||||
components: { crudOperation, pagination, rrOperation },
|
||||
cruds() {
|
||||
return [
|
||||
CRUD({ title: '报工审核', url: '/api/produceWorkorder/reportQuery2', query: {}, idField: 'macoperate_id', crudMethod: { ...crudProduceshiftorder }})
|
||||
]
|
||||
},
|
||||
dicts: ['PDM_BI_SHIFTTYPE', 'MPS_BD_ORDERSTATUS', 'is_used', 'PDM_BI_ORDERTYPE', 'IS_OR_NOT'],
|
||||
mixins: [],
|
||||
mixins: [presenter(), header(), form(defaultForm)],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
@@ -194,8 +260,7 @@ export default {
|
||||
const arr = []
|
||||
arr.push(data)
|
||||
crudProduceshiftorder.reportApprove(arr).then(res => {
|
||||
this.tableData = res.content
|
||||
this.report()
|
||||
//todo:刷新数据
|
||||
})
|
||||
},
|
||||
setForm() {
|
||||
|
||||
208
mes/qd/src/views/wms/product_manage/workorder/reportDialog3.vue
Normal file
208
mes/qd/src/views/wms/product_manage/workorder/reportDialog3.vue
Normal file
@@ -0,0 +1,208 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--表单组件-->
|
||||
<!-- 字典列表 -->
|
||||
<el-card class="box-card">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-form ref="form" :inline="true" :rules="rules" size="mini" label-width="180px">
|
||||
<el-form-item label="工单编码">
|
||||
<el-input v-model="query.workorder_code" style="width: 200px;" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="班次类型" prop="shift_type_scode">
|
||||
<el-select
|
||||
v-model="query.shift_type_scode"
|
||||
style="width: 200px"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.PDM_BI_SHIFTTYPE"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产日期">
|
||||
<el-date-picker
|
||||
v-model="query.create_time"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00','23:59:59']"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="只显示未审核">
|
||||
<el-switch
|
||||
v-model="query.is_report"
|
||||
active-color="#409EFF"
|
||||
inactive-color="#F56C6C"
|
||||
active-value='true'
|
||||
inactive-valu='false'
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-dropdown split-button type="primary" class="filter-item" @click="report()">
|
||||
<i class="el-icon-search el-icon--left" />查询
|
||||
</el-dropdown>
|
||||
</el-form>
|
||||
</div>
|
||||
<crudOperation v-show="false" :permission="permission" />
|
||||
</div>
|
||||
<!--表格渲染-->
|
||||
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
highlight-current-row
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="workorder_code" label="工单编号" />
|
||||
<el-table-column prop="seq_number" label="报工顺序号" />
|
||||
<el-table-column prop="shift_type_scode" label="班次类型">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.PDM_BI_SHIFTTYPE[scope.row.shift_type_scode] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="product_area" label="生产车间" />
|
||||
<el-table-column prop="device_code" label="设备编码" align="center" />
|
||||
<el-table-column prop="needproduct_qty" label="待生产数" />
|
||||
<el-table-column prop="report_qty" label="报工数量" >
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model = scope.row.report_qty></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="nok_qty" label="报废数量" >
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model = scope.row.nok_qty></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="repare_qty" label="报修数量" >
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model = scope.row.repare_qty></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="person_finish_qty" label="人员期末数量" />
|
||||
<el-table-column prop="operatetime_start" label="开工时间" />
|
||||
<el-table-column prop="operatetime_end" label="完工时间" />
|
||||
<el-table-column prop="report_status" label="报工状态" >
|
||||
<template slot-scope="scope">
|
||||
{{ reportStatus[scope.row.report_status-1].label }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="produce_person_name" label="操作人" align="center" />
|
||||
<el-table-column prop="confirm_name" label="审核人" align="center" />
|
||||
<el-table-column prop="confirm_time" label="审核时间" align="center" />
|
||||
<el-table-column label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="scope.row.report_status =='3'" size="mini" style="margin-left: -1px;margin-right: 2px" type="text" @click="reportApprove(scope.row)">提交审核</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudReport from '@/views/wms/product_manage/workorder/produceshiftorder'
|
||||
import CRUD, { presenter, header, form } from '@crud/crud'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
const defaultForm = { sale_id: null,
|
||||
is_report: null,
|
||||
workorder_id: null,
|
||||
workorder_code: null,
|
||||
producedeviceorder_code: null,
|
||||
shift_type_scode: null,
|
||||
workprocedure_id: null,
|
||||
produce_date: null,
|
||||
plan_qty: null,
|
||||
real_qty: null,
|
||||
report_qty: null,
|
||||
material_id: null,
|
||||
material_code: null,
|
||||
material_weight: null,
|
||||
planproducestart_date: null,
|
||||
planproduceend_date: null,
|
||||
realproducestart_date: null,
|
||||
realproduceend_date: null,
|
||||
order_status: null,
|
||||
is_needmove: null,
|
||||
order_type_scode: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
update_optid: null,
|
||||
update_optname: null,
|
||||
update_time: null,
|
||||
sysdeptid: null,
|
||||
syscompanyid: null,
|
||||
is_delete: null,
|
||||
material_name: null,
|
||||
device_id: null,
|
||||
is_canupdate_update: null,
|
||||
material_spec: null }
|
||||
|
||||
export default {
|
||||
name: 'reportDialog',
|
||||
components: { crudOperation, pagination, rrOperation },
|
||||
dicts: ['product_area'],
|
||||
cruds() {
|
||||
return [
|
||||
CRUD({ title: '报工审核', url: '/api/produceWorkorder/reportQuery2', query: {}, idField: 'macoperate_id', crudMethod: { ...crudReport }})
|
||||
]
|
||||
},
|
||||
mixins: [presenter(), header(), form(defaultForm)],
|
||||
data() {
|
||||
return {
|
||||
trueorfalse: [{ value: true, label: '是' }, { value: false, label: '否' }],
|
||||
reportStatus: [{ value: '1', label: '创建记录' }, { value: '2', label: '报工完成' }, { value: '3', label: '审核完成' }],
|
||||
queryTypeOptions: [
|
||||
{ key: 'name', display_name: '字典名称' },
|
||||
{ key: 'description', display_name: '描述' }
|
||||
],
|
||||
rules: {
|
||||
material_spec: [
|
||||
{ required: true, message: '请输入编码', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
permission: {
|
||||
add: ['admin', 'dict:add'],
|
||||
edit: ['admin', 'dict:edit'],
|
||||
del: ['admin', 'dict:del']
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
report() {
|
||||
crudReport.reportQuery({ workorder_code: this.form.workorder_code, is_report: this.form.is_report }).then(res => {
|
||||
this.tableData = res.content
|
||||
})
|
||||
},
|
||||
reportApprove(data) {
|
||||
const arr = []
|
||||
arr.push(data)
|
||||
crudReport.reportApprove(arr).then(res => {
|
||||
this.tableData = res.content
|
||||
this.report()
|
||||
})
|
||||
},
|
||||
setForm() {
|
||||
this.dialogVisible = true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -151,21 +151,21 @@
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="50" />
|
||||
<el-table-column prop="product_area" label="生产车间" />
|
||||
<el-table-column prop="task_code" label="任务编码" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="table_fk_id" label="业务编码" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column v-if="true" prop="task_id" label="任务标识" min-width="150" show-overflow-tooltip />
|
||||
<el-table-column v-if="true" prop="material_id" label="物料标识" min-width="150" show-overflow-tooltip />
|
||||
<el-table-column prop = "acs_task_type" label="acs任务类型" min-width="120" show-overflow-tooltip :formatter = "acsTypeName"></el-table-column>
|
||||
<el-table-column v-if="true" prop="material_spec" label="物料标识" min-width="150" show-overflow-tooltip />
|
||||
<el-table-column prop="task_name" label="任务类型" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop = "acs_task_type" label="acs任务类型" min-width="120" show-overflow-tooltip :formatter = "acsTypeName"></el-table-column>
|
||||
<el-table-column v-if="false" prop="task_status" label="任务状态" />
|
||||
<el-table-column prop="task_status_name" label="任务状态" width="120px" :formatter="formatTaskStatusName" />
|
||||
<el-table-column prop="point_code1" label="起点" width="100" />
|
||||
<el-table-column prop="point1_region_name" label="起点区域" width="120" />
|
||||
<el-table-column prop="point_code2" label="终点" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="point2_region_name" label="终点区域" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="point_code3" label="返回点" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="product_area" label="生产车间" />
|
||||
<el-table-column prop="point1_region_name" label="起点区域" width="120" />
|
||||
<el-table-column prop="point2_region_name" label="终点区域" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="point3_region_name" label="返回点区域" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="vehicle_code" label="载具编码1" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="vehicle_code2" label="载具编码2" min-width="100" show-overflow-tooltip />
|
||||
|
||||
Reference in New Issue
Block a user