修改
This commit is contained in:
@@ -68,9 +68,12 @@
|
|||||||
FROM
|
FROM
|
||||||
pdm_bi_devicerunstatusrecord run
|
pdm_bi_devicerunstatusrecord run
|
||||||
LEFT JOIN pdm_bi_device device ON device.device_id = run.device_id
|
LEFT JOIN pdm_bi_device device ON device.device_id = run.device_id
|
||||||
|
WHERE
|
||||||
|
run.status_type = '05'
|
||||||
GROUP BY
|
GROUP BY
|
||||||
run.device_id
|
run.device_id
|
||||||
LIMIT 10
|
ORDER BY err_num desc
|
||||||
|
LIMIT 10
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|||||||
@@ -15,12 +15,13 @@ import org.springframework.http.ResponseEntity;
|
|||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author qinx
|
* @author qinx
|
||||||
* @date 2022-05-24
|
* @date 2022-05-24
|
||||||
**/
|
**/
|
||||||
@RestController
|
@RestController
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Api(tags = "工单管理")
|
@Api(tags = "工单管理")
|
||||||
@@ -34,24 +35,35 @@ public class ProduceshiftorderController {
|
|||||||
@Log("查询工单")
|
@Log("查询工单")
|
||||||
@ApiOperation("查询工单")
|
@ApiOperation("查询工单")
|
||||||
//@PreAuthorize("@el.check('produceshiftorder:list')")
|
//@PreAuthorize("@el.check('produceshiftorder:list')")
|
||||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page){
|
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
|
||||||
return new ResponseEntity<>(produceshiftorderService.queryAll(whereJson,page),HttpStatus.OK);
|
return new ResponseEntity<>(produceshiftorderService.queryAll(whereJson, page), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@Log("新增工单")
|
@Log("新增工单")
|
||||||
@ApiOperation("新增工单")
|
@ApiOperation("新增工单")
|
||||||
//@PreAuthorize("@el.check('produceshiftorder:add')")
|
//@PreAuthorize("@el.check('produceshiftorder:add')")
|
||||||
public ResponseEntity<Object> create(@Validated @RequestBody ProduceshiftorderDto dto){
|
public ResponseEntity<Object> create(@Validated @RequestBody ProduceshiftorderDto dto) {
|
||||||
produceshiftorderService.create(dto);
|
produceshiftorderService.create(dto);
|
||||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/addRows")
|
||||||
|
@Log("批量新增工单")
|
||||||
|
@ApiOperation("批量新增工单")
|
||||||
|
//@PreAuthorize("@el.check('produceshiftorder:add')")
|
||||||
|
public ResponseEntity<Object> create(@Validated @RequestBody List<ProduceshiftorderDto> rows) {
|
||||||
|
for (ProduceshiftorderDto dto : rows) {
|
||||||
|
produceshiftorderService.create(dto);
|
||||||
|
}
|
||||||
|
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||||
|
}
|
||||||
|
|
||||||
@PutMapping
|
@PutMapping
|
||||||
@Log("修改工单")
|
@Log("修改工单")
|
||||||
@ApiOperation("修改工单")
|
@ApiOperation("修改工单")
|
||||||
//@PreAuthorize("@el.check('produceshiftorder:edit')")
|
//@PreAuthorize("@el.check('produceshiftorder:edit')")
|
||||||
public ResponseEntity<Object> update(@Validated @RequestBody ProduceshiftorderDto dto){
|
public ResponseEntity<Object> update(@Validated @RequestBody ProduceshiftorderDto dto) {
|
||||||
produceshiftorderService.update(dto);
|
produceshiftorderService.update(dto);
|
||||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
}
|
}
|
||||||
@@ -69,7 +81,7 @@ public class ProduceshiftorderController {
|
|||||||
@Log("工单下发")
|
@Log("工单下发")
|
||||||
@ApiOperation("工单下发")
|
@ApiOperation("工单下发")
|
||||||
//@PreAuthorize("@el.check('produceshiftorder:edit')")
|
//@PreAuthorize("@el.check('produceshiftorder:edit')")
|
||||||
public ResponseEntity<Object> submits(@RequestBody JSONObject param){
|
public ResponseEntity<Object> submits(@RequestBody JSONObject param) {
|
||||||
produceshiftorderService.submits(param);
|
produceshiftorderService.submits(param);
|
||||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
}
|
}
|
||||||
@@ -78,23 +90,23 @@ public class ProduceshiftorderController {
|
|||||||
@Log("根据登录用户设备下拉")
|
@Log("根据登录用户设备下拉")
|
||||||
@ApiOperation("根据登录用户设备下拉")
|
@ApiOperation("根据登录用户设备下拉")
|
||||||
//@PreAuthorize("@el.check('produceshiftorder:list')")
|
//@PreAuthorize("@el.check('produceshiftorder:list')")
|
||||||
public ResponseEntity<Object> getDevice(@RequestBody JSONObject param){
|
public ResponseEntity<Object> getDevice(@RequestBody JSONObject param) {
|
||||||
return new ResponseEntity<>(produceshiftorderService.getDevice(param),HttpStatus.OK);
|
return new ResponseEntity<>(produceshiftorderService.getDevice(param), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/getTable")
|
@PostMapping("/getTable")
|
||||||
@Log("获取工单生产记录")
|
@Log("获取工单生产记录")
|
||||||
@ApiOperation("获取工单生产记录")
|
@ApiOperation("获取工单生产记录")
|
||||||
//@PreAuthorize("@el.check('produceshiftorder:list')")
|
//@PreAuthorize("@el.check('produceshiftorder:list')")
|
||||||
public ResponseEntity<Object> getTable(@RequestBody JSONObject param){
|
public ResponseEntity<Object> getTable(@RequestBody JSONObject param) {
|
||||||
return new ResponseEntity<>(produceshiftorderService.getTable(param),HttpStatus.OK);
|
return new ResponseEntity<>(produceshiftorderService.getTable(param), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/openStart")
|
@PostMapping("/openStart")
|
||||||
@Log("看板开工")
|
@Log("看板开工")
|
||||||
@ApiOperation("看板开工")
|
@ApiOperation("看板开工")
|
||||||
//@PreAuthorize("@el.check('produceshiftorder:list')")
|
//@PreAuthorize("@el.check('produceshiftorder:list')")
|
||||||
public ResponseEntity<Object> openStart(@RequestBody JSONObject param){
|
public ResponseEntity<Object> openStart(@RequestBody JSONObject param) {
|
||||||
produceshiftorderService.openStart(param);
|
produceshiftorderService.openStart(param);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
@@ -103,7 +115,7 @@ public class ProduceshiftorderController {
|
|||||||
@Log("看板报工")
|
@Log("看板报工")
|
||||||
@ApiOperation("看板报工")
|
@ApiOperation("看板报工")
|
||||||
//@PreAuthorize("@el.check('produceshiftorder:list')")
|
//@PreAuthorize("@el.check('produceshiftorder:list')")
|
||||||
public ResponseEntity<Object> saveReport(@RequestBody JSONObject param){
|
public ResponseEntity<Object> saveReport(@RequestBody JSONObject param) {
|
||||||
produceshiftorderService.saveReport(param);
|
produceshiftorderService.saveReport(param);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
@@ -112,7 +124,7 @@ public class ProduceshiftorderController {
|
|||||||
@Log("看板强制完成")
|
@Log("看板强制完成")
|
||||||
@ApiOperation("看板强制完成")
|
@ApiOperation("看板强制完成")
|
||||||
//@PreAuthorize("@el.check('produceshiftorder:list')")
|
//@PreAuthorize("@el.check('produceshiftorder:list')")
|
||||||
public ResponseEntity<Object> finish(@RequestBody JSONObject param){
|
public ResponseEntity<Object> finish(@RequestBody JSONObject param) {
|
||||||
produceshiftorderService.finish(param);
|
produceshiftorderService.finish(param);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
@@ -121,15 +133,15 @@ public class ProduceshiftorderController {
|
|||||||
@Log("获取当前报工记录")
|
@Log("获取当前报工记录")
|
||||||
@ApiOperation("获取当前报工记录")
|
@ApiOperation("获取当前报工记录")
|
||||||
//@PreAuthorize("@el.check('produceshiftorder:list')")
|
//@PreAuthorize("@el.check('produceshiftorder:list')")
|
||||||
public ResponseEntity<Object> getReportWork(@RequestBody JSONObject param){
|
public ResponseEntity<Object> getReportWork(@RequestBody JSONObject param) {
|
||||||
return new ResponseEntity<>(produceshiftorderService.getReportWork(param),HttpStatus.OK);
|
return new ResponseEntity<>(produceshiftorderService.getReportWork(param), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/forceFinish")
|
@PostMapping("/forceFinish")
|
||||||
@Log("工单强制完成")
|
@Log("工单强制完成")
|
||||||
@ApiOperation("工单强制完成")
|
@ApiOperation("工单强制完成")
|
||||||
//@PreAuthorize("@el.check('produceshiftorder:list')")
|
//@PreAuthorize("@el.check('produceshiftorder:list')")
|
||||||
public ResponseEntity<Object> forceFinish(@RequestBody JSONObject param){
|
public ResponseEntity<Object> forceFinish(@RequestBody JSONObject param) {
|
||||||
produceshiftorderService.forceFinish(param);
|
produceshiftorderService.forceFinish(param);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
@@ -138,8 +150,8 @@ public class ProduceshiftorderController {
|
|||||||
@Log("获取当前工单下的工单生产记录")
|
@Log("获取当前工单下的工单生产记录")
|
||||||
@ApiOperation("获取当前工单下的工单生产记录")
|
@ApiOperation("获取当前工单下的工单生产记录")
|
||||||
//@PreAuthorize("@el.check('produceshiftorder:list')")
|
//@PreAuthorize("@el.check('produceshiftorder:list')")
|
||||||
public ResponseEntity<Object> getDtl(@RequestBody JSONObject param){
|
public ResponseEntity<Object> getDtl(@RequestBody JSONObject param) {
|
||||||
return new ResponseEntity<>(produceshiftorderService.getDtl(param),HttpStatus.OK);
|
return new ResponseEntity<>(produceshiftorderService.getDtl(param), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -124,6 +124,7 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService {
|
|||||||
JwtUserDto currentUser = (JwtUserDto) SecurityUtils.getCurrentUser();
|
JwtUserDto currentUser = (JwtUserDto) SecurityUtils.getCurrentUser();
|
||||||
Long deptId = currentUser.getDeptId();
|
Long deptId = currentUser.getDeptId();
|
||||||
String newCode = CodeUtil.getNewCode("PDM_SHIFTORDER");
|
String newCode = CodeUtil.getNewCode("PDM_SHIFTORDER");
|
||||||
|
dto.setProduce_date(dto.getProduce_date().substring(0,10));
|
||||||
dto.setProduceorder_id(IdUtil.getSnowflake(1, 1).nextId());
|
dto.setProduceorder_id(IdUtil.getSnowflake(1, 1).nextId());
|
||||||
dto.setProduceorder_code(newCode);
|
dto.setProduceorder_code(newCode);
|
||||||
dto.setProducedeviceorder_code(newCode);
|
dto.setProducedeviceorder_code(newCode);
|
||||||
|
|||||||
Binary file not shown.
@@ -8,6 +8,14 @@ export function add(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function addRows(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/produceshiftorder/addRows',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function del(ids) {
|
export function del(ids) {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/produceshiftorder/',
|
url: 'api/produceshiftorder/',
|
||||||
@@ -96,4 +104,4 @@ export function getDtl(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { add, edit, del, submits, getDevice, getTable, openStart, saveReport, finish, getReportWork, forceFinish, getDtl }
|
export default { add, addRows, edit, del, submits, getDevice, getTable, openStart, saveReport, finish, getReportWork, forceFinish, getDtl }
|
||||||
|
|||||||
287
mes/qd/src/views/wms/mps/produce/AddDialog.vue
Normal file
287
mes/qd/src/views/wms/mps/produce/AddDialog.vue
Normal file
@@ -0,0 +1,287 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
title="批量新增"
|
||||||
|
append-to-body
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
fullscreen
|
||||||
|
destroy-on-close
|
||||||
|
width="1000px"
|
||||||
|
@close="close"
|
||||||
|
@open="open"
|
||||||
|
>
|
||||||
|
<div class="crud-opts2" style="margin-bottom: 5px;">
|
||||||
|
<span class="crud-opts-right2">
|
||||||
|
<!--左侧插槽-->
|
||||||
|
<slot name="left"/>
|
||||||
|
<el-button type="primary" @click="insertDtl">新增一行</el-button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
ref="table"
|
||||||
|
:data="tableData"
|
||||||
|
style="width: 100%;"
|
||||||
|
border
|
||||||
|
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" label="序号" width="50" align="center"/>
|
||||||
|
<el-table-column align="center" label="操作" width="100" fixed="right">
|
||||||
|
<template scope="scope">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
class="filter-item"
|
||||||
|
size="mini"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click.native.prevent="deleteRow(scope.$index, tableData)"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="order_type_scode" label="工单类型" align="center" width="120px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-select
|
||||||
|
v-model="scope.row.order_type_scode"
|
||||||
|
class="filter-item"
|
||||||
|
:disabled="scope.row.edit"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.PDM_BI_ORDERTYPE"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="workprocedure_id" label="所属工序" align="center" width="150px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-select
|
||||||
|
v-model="scope.row.workprocedure_id"
|
||||||
|
class="filter-item"
|
||||||
|
:disabled="scope.row.edit"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in workprocedureList"
|
||||||
|
:key="item.workprocedure_id"
|
||||||
|
:label="item.workprocedure_name"
|
||||||
|
:value="item.workprocedure_id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column prop="produce_date" label="生产日期" align="center" width="250px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-date-picker v-model="scope.row.produce_date" type="date" value-format="yyyy-MM-dd"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column v-if="false" prop="material_id" label="物料标识" align="center"/>
|
||||||
|
<el-table-column prop="material_code" label="物料编码" align="center" width="190px">
|
||||||
|
<template scope="scope">
|
||||||
|
<el-input v-model="scope.row.material_code" disabled class="input-with-select">
|
||||||
|
<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="物料名称" align="center" width="250px"/>
|
||||||
|
<el-table-column prop="material_spec" label="物料规格" align="center" width="150px"/>
|
||||||
|
<el-table-column show-overflow-tooltip prop="plan_qty" label="计划数量" align="center" width="100px">
|
||||||
|
<template scope="scope">
|
||||||
|
<el-input v-show="!scope.row.edit" v-model="scope.row.plan_qty" size="mini"/>
|
||||||
|
<span v-show="scope.row.edit">{{ scope.row.plan_qty }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="planproducestart_date" label="计划开始时间" align="center" width="250px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="scope.row.planproducestart_date"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
type="datetime"
|
||||||
|
style="width: 200px;"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="shift_type_scode" label="班次类型" align="center" width="110px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-select
|
||||||
|
v-model="scope.row.shift_type_scode"
|
||||||
|
class="filter-item"
|
||||||
|
:disabled="scope.row.edit"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.PDM_BI_SHIFTTYPE"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip prop="sale_id" label="销售单标识" align="center" width="150px">
|
||||||
|
<template scope="scope">
|
||||||
|
<el-input v-model="scope.row.sale_id"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip prop="is_needmove" label="是否搬运" align="center" width="150px">
|
||||||
|
<template scope="scope">
|
||||||
|
<el-radio
|
||||||
|
v-for="item in dict.IS_OR_NOT"
|
||||||
|
:key="item.id"
|
||||||
|
v-model="scope.row.is_needmove"
|
||||||
|
:label="item.value"
|
||||||
|
>{{ item.label }}
|
||||||
|
</el-radio>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip prop="is_canupdate_update" label="允许修改报工数量" align="center" width="200px">
|
||||||
|
<template scope="scope">
|
||||||
|
<el-radio
|
||||||
|
v-for="item in dict.IS_OR_NOT"
|
||||||
|
:key="item.id"
|
||||||
|
v-model="scope.row.is_canupdate_update"
|
||||||
|
:label="item.value"
|
||||||
|
>{{ item.label }}
|
||||||
|
</el-radio>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||||
|
<el-button :loading="crud.cu === 2" type="primary" @click="submit">确认</el-button>
|
||||||
|
</div>
|
||||||
|
<MaterDtl :dialog-show.sync="materialShow" :is-single="true" :mater-opt-code="materType"
|
||||||
|
@setMaterValue="setMaterValue"/>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import CRUD, {crud, header, presenter} from '@crud/crud'
|
||||||
|
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
||||||
|
import crudWorkProcedure from "@/api/wms/basedata/pdm/workProcedure"
|
||||||
|
import crudProduceshiftorder from '@/api/wms/mps/produceshiftorder'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'AddDtl',
|
||||||
|
components: {MaterDtl},
|
||||||
|
dicts: ['PDM_BI_SHIFTTYPE', 'MPS_BD_ORDERSTATUS', 'is_used', 'PDM_BI_ORDERTYPE', 'IS_OR_NOT'],
|
||||||
|
mixins: [presenter(), header(), crud()],
|
||||||
|
props: {
|
||||||
|
dialogShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogVisible: false,
|
||||||
|
materType: '01',
|
||||||
|
workprocedureList: [],
|
||||||
|
rows: [],
|
||||||
|
materialShow: false,
|
||||||
|
tableData: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
dialogShow: {
|
||||||
|
handler(newValue, oldValue) {
|
||||||
|
this.dialogVisible = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
insertDtl() {
|
||||||
|
const date = this.dateFormatter(new Date())
|
||||||
|
this.tableData.push({
|
||||||
|
produceorder_id: '',
|
||||||
|
produceorder_code: '',
|
||||||
|
producedeviceorder_code: '',
|
||||||
|
shift_type_scode: '01',
|
||||||
|
workprocedure_id: '',
|
||||||
|
produce_date: date,
|
||||||
|
plan_qty: '',
|
||||||
|
real_qty: '',
|
||||||
|
report_qty: '',
|
||||||
|
material_id: '',
|
||||||
|
material_code: '',
|
||||||
|
material_weight: '',
|
||||||
|
planproducestart_date: date,
|
||||||
|
planproduceend_date: '',
|
||||||
|
realproducestart_date: '',
|
||||||
|
realproduceend_date: '',
|
||||||
|
order_status: '00',
|
||||||
|
is_needmove: '0',
|
||||||
|
order_type_scode: '01',
|
||||||
|
material_name: '',
|
||||||
|
device_id: '',
|
||||||
|
is_canupdate_update: '1',
|
||||||
|
material_spec: '',
|
||||||
|
sale_id: ''
|
||||||
|
})
|
||||||
|
},
|
||||||
|
open() {
|
||||||
|
// 查询工序
|
||||||
|
crudWorkProcedure.downSelect({}).then(res => {
|
||||||
|
this.workprocedureList = res
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
this.$emit('AddChanged')
|
||||||
|
this.tableData = []
|
||||||
|
},
|
||||||
|
queryMater(index, row) {
|
||||||
|
this.materialShow = true
|
||||||
|
this.nowindex = index
|
||||||
|
this.nowrow = row
|
||||||
|
},
|
||||||
|
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 替换数据 触发视图更新
|
||||||
|
},
|
||||||
|
dateFormatter(str) {
|
||||||
|
const d = new Date(str)
|
||||||
|
const year = d.getFullYear()
|
||||||
|
const month = (d.getMonth() + 1) < 10 ? '0' + (d.getMonth() + 1) : (d.getMonth() + 1)
|
||||||
|
const day = d.getDate() < 10 ? '0' + d.getDate() : d.getDate()
|
||||||
|
const hour = d.getHours() < 10 ? '0' + d.getHours() : d.getHours()
|
||||||
|
const minute = d.getMinutes() < 10 ? '0' + d.getMinutes() : d.getMinutes()
|
||||||
|
const second = d.getSeconds() < 10 ? '0' + d.getSeconds() : d.getSeconds()
|
||||||
|
return [year, month, day].join('-') + ' ' + [hour, minute, second].join(':')
|
||||||
|
},
|
||||||
|
deleteRow(index, rows) {
|
||||||
|
rows.splice(index, 1)
|
||||||
|
}
|
||||||
|
,
|
||||||
|
submit() {
|
||||||
|
for (let i = 0; i < this.tableData.length; i++) {
|
||||||
|
const row = this.tableData[i]
|
||||||
|
if (!row.workprocedure_id) {
|
||||||
|
this.crud.notify('所属工序不能为空!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if (!row.produce_date) {
|
||||||
|
this.crud.notify('生产日期不能为空!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if (!row.material_id) {
|
||||||
|
this.crud.notify('物料编码不能为空!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if (!row.plan_qty) {
|
||||||
|
this.crud.notify('计划数量不能为空!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if (!row.planproducestart_date) {
|
||||||
|
this.crud.notify('计划开始时间不能为空!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
crudProduceshiftorder.addRows(this.tableData)
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
@@ -118,11 +118,21 @@
|
|||||||
class="filter-item"
|
class="filter-item"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<rrOperation :crud="crud" />
|
<rrOperation :crud="crud"/>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
<crudOperation :permission="permission">
|
<crudOperation :permission="permission">
|
||||||
|
<el-button
|
||||||
|
slot="right"
|
||||||
|
class="filter-item"
|
||||||
|
type="success"
|
||||||
|
icon="el-icon-position"
|
||||||
|
size="mini"
|
||||||
|
@click="add"
|
||||||
|
>
|
||||||
|
批量新增
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
slot="right"
|
slot="right"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
@@ -154,7 +164,7 @@
|
|||||||
:title="crud.status.title"
|
:title="crud.status.title"
|
||||||
width="1200px"
|
width="1200px"
|
||||||
>
|
>
|
||||||
<!-- <el-form ref="form" :inline="true" :model="form" :rules="rules" size="mini" label-width="160px">
|
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="mini" label-width="160px">
|
||||||
<el-form-item label="工单类型" prop="order_type_scode">
|
<el-form-item label="工单类型" prop="order_type_scode">
|
||||||
<el-select v-model="form.order_type_scode" style="width: 200px" filterable placeholder="请选择">
|
<el-select v-model="form.order_type_scode" style="width: 200px" filterable placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
@@ -182,10 +192,10 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="生产日期" prop="produce_date">
|
<el-form-item label="生产日期" prop="produce_date">
|
||||||
<el-date-picker v-model="form.produce_date" type="date" value-format="yyyy-MM-dd" style="width: 200px;" />
|
<el-date-picker v-model="form.produce_date" type="date" value-format="yyyy-MM-dd" style="width: 200px;"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="false" label="物料标识" prop="material_id">
|
<el-form-item v-if="false" label="物料标识" prop="material_id">
|
||||||
<el-input v-model="form.material_id" style="width: 200px;" />
|
<el-input v-model="form.material_id" style="width: 200px;"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="物料编码" prop="material_code">
|
<el-form-item label="物料编码" prop="material_code">
|
||||||
<el-input
|
<el-input
|
||||||
@@ -211,10 +221,10 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="物料单重" prop="material_weight">
|
<el-form-item label="物料单重" prop="material_weight">
|
||||||
<el-input v-model="form.material_weight" style="width: 200px;" />
|
<el-input v-model="form.material_weight" style="width: 200px;"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="计划数量" prop="plan_qty">
|
<el-form-item label="计划数量" prop="plan_qty">
|
||||||
<el-input v-model="form.plan_qty" style="width: 200px;" />
|
<el-input v-model="form.plan_qty" style="width: 200px;"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="计划开始时间" prop="planproducestart_date">
|
<el-form-item label="计划开始时间" prop="planproducestart_date">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
@@ -233,7 +243,10 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="crud.status.edit" label="报工数量" prop="report_qty">
|
<el-form-item v-if="crud.status.edit" label="报工数量" prop="report_qty">
|
||||||
<el-input v-model="form.report_qty" style="width: 200px;" />
|
<el-input v-model="form.report_qty" style="width: 200px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="crud.status.edit" label="实际数量" prop="report_qty">
|
||||||
|
<el-input v-model="form.real_qty" style="width: 200px;"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="班次类型" prop="shift_type_scode">
|
<el-form-item label="班次类型" prop="shift_type_scode">
|
||||||
<el-select
|
<el-select
|
||||||
@@ -252,7 +265,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="销售单标识">
|
<el-form-item label="销售单标识">
|
||||||
<el-input v-model="form.sale_id" style="width: 200px;" />
|
<el-input v-model="form.sale_id" style="width: 200px;"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否搬运" prop="is_needmove">
|
<el-form-item label="是否搬运" prop="is_needmove">
|
||||||
<el-radio
|
<el-radio
|
||||||
@@ -273,150 +286,10 @@
|
|||||||
>{{ item.label }}
|
>{{ item.label }}
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>-->
|
</el-form>
|
||||||
|
|
||||||
<!--表格渲染-->
|
|
||||||
<el-table
|
|
||||||
ref="table"
|
|
||||||
:data="form.tableData"
|
|
||||||
style="width: 100%;"
|
|
||||||
border
|
|
||||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
|
||||||
>
|
|
||||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
|
||||||
<el-table-column prop="order_type_scode" label="工单类型" align="center" width="110px">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-select
|
|
||||||
v-model="scope.row.order_type_scode"
|
|
||||||
class="filter-item"
|
|
||||||
:disabled="scope.row.edit"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in dict.PDM_BI_ORDERTYPE"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="workprocedure_id" label="所属工序" align="center" width="110px">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-select
|
|
||||||
v-model="scope.row.workprocedure_id"
|
|
||||||
class="filter-item"
|
|
||||||
:disabled="scope.row.edit"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in workprocedureList"
|
|
||||||
:key="item.workprocedure_id"
|
|
||||||
:label="item.workprocedure_name"
|
|
||||||
:value="item.workprocedure_id"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column prop="produce_date" label="生产日期" align="center" width="110px">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-date-picker v-model="scope.row.produce_date" type="date" value-format="yyyy-MM-dd" style="width: 200px;" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column v-if="false" prop="material_id" label="物料标识" align="center"/>
|
|
||||||
<el-table-column prop="material_code" label="物料编码" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-input v-show="!scope.row.edit" v-model="scope.row.material_code" @focus="materialShow=true" class="input-with-select"/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="material_name" label="物料名称" align="center"/>
|
|
||||||
<el-table-column prop="material_spec" label="物料规格" align="center"/>
|
|
||||||
<el-table-column show-overflow-tooltip prop="material_weight" label="物料单重" align="center">
|
|
||||||
<template scope="scope">
|
|
||||||
<el-input v-show="!scope.row.edit" v-model="scope.row.material_weight" size="mini" />
|
|
||||||
<span v-show="scope.row.edit">{{ scope.row.material_weight }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column show-overflow-tooltip prop="plan_qty" label="计划数量" align="center">
|
|
||||||
<template scope="scope">
|
|
||||||
<el-input v-show="!scope.row.edit" v-model="scope.row.plan_qty" size="mini" />
|
|
||||||
<span v-show="scope.row.edit">{{ scope.row.plan_qty }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="planproducestart_date" label="计划开始时间" align="center" width="110px">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="scope.row.planproducestart_date"
|
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
type="datetime"
|
|
||||||
style="width: 200px;"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="planproduceend_date" label="计划结束时间" align="center" width="110px">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="scope.row.planproduceend_date"
|
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
type="datetime"
|
|
||||||
style="width: 200px;"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column show-overflow-tooltip prop="report_qty" label="报工数量" align="center">
|
|
||||||
<template scope="scope">
|
|
||||||
<el-input v-show="!scope.row.edit" v-model="scope.row.report_qty" size="mini" />
|
|
||||||
<span v-show="scope.row.edit">{{ scope.row.report_qty }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="shift_type_scode" label="班次类型" align="center" width="110px">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-select
|
|
||||||
v-model="scope.row.shift_type_scode"
|
|
||||||
class="filter-item"
|
|
||||||
:disabled="scope.row.edit"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in dict.PDM_BI_SHIFTTYPE"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column show-overflow-tooltip prop="sale_id" label="销售单标识" align="center">
|
|
||||||
<template scope="scope">
|
|
||||||
<el-input v-show="!scope.row.edit" v-model="scope.row.sale_id" size="mini" />
|
|
||||||
<span v-show="scope.row.edit">{{ scope.row.sale_id }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column show-overflow-tooltip prop="is_needmove" label="是否搬运" align="center">
|
|
||||||
<template scope="scope">
|
|
||||||
<el-radio
|
|
||||||
v-for="item in dict.IS_OR_NOT"
|
|
||||||
:key="item.id"
|
|
||||||
v-model="scope.row.is_needmove"
|
|
||||||
:label="item.value"
|
|
||||||
>{{ item.label }}
|
|
||||||
</el-radio>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column show-overflow-tooltip prop="is_canupdate_update" label="允许修改报工数量" align="center">
|
|
||||||
<template scope="scope">
|
|
||||||
<el-radio
|
|
||||||
v-for="item in dict.IS_OR_NOT"
|
|
||||||
:key="item.id"
|
|
||||||
v-model="scope.row.is_canupdate_update"
|
|
||||||
:label="item.value"
|
|
||||||
>{{ item.label }}
|
|
||||||
</el-radio>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<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">取消</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">确认</el-button>
|
||||||
<el-button type="primary" @click="insertDtl">新增一行</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
@@ -428,14 +301,14 @@
|
|||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
@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="produceorder_id" label="生产班次工单标识" />
|
<el-table-column v-if="false" prop="produceorder_id" label="生产班次工单标识"/>
|
||||||
<el-table-column prop="produceorder_code" label="工单编号" width="140px">
|
<el-table-column prop="produceorder_code" label="工单编号" width="140px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-link type="warning" @click="toView(scope.row)">{{ scope.row.produceorder_code }}</el-link>
|
<el-link type="warning" @click="toView(scope.row)">{{ scope.row.produceorder_code }}</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="producedeviceorder_code" label="机台工单号" width="100px" />
|
<el-table-column prop="producedeviceorder_code" label="机台工单号" width="100px"/>
|
||||||
<el-table-column prop="order_status" label="工单状态">
|
<el-table-column prop="order_status" label="工单状态">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ dict.label.MPS_BD_ORDERSTATUS[scope.row.order_status] }}
|
{{ dict.label.MPS_BD_ORDERSTATUS[scope.row.order_status] }}
|
||||||
@@ -446,22 +319,22 @@
|
|||||||
{{ dict.label.PDM_BI_SHIFTTYPE[scope.row.shift_type_scode] }}
|
{{ dict.label.PDM_BI_SHIFTTYPE[scope.row.shift_type_scode] }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column v-if="false" prop="workprocedure_id" label="工序标识" />
|
<el-table-column v-if="false" prop="workprocedure_id" label="工序标识"/>
|
||||||
<el-table-column prop="produce_date" label="生产日期" width="100px" />
|
<el-table-column prop="produce_date" label="生产日期" width="100px"/>
|
||||||
<el-table-column prop="plan_qty" label="计划数量" />
|
<el-table-column prop="plan_qty" label="计划数量"/>
|
||||||
<el-table-column prop="real_qty" label="实际数量" />
|
<el-table-column prop="real_qty" label="实际数量"/>
|
||||||
<el-table-column prop="report_qty" label="报工数量" />
|
<el-table-column prop="report_qty" label="报工数量"/>
|
||||||
<el-table-column v-if="false" prop="material_id" label="物料标识" />
|
<el-table-column v-if="false" prop="material_id" label="物料标识"/>
|
||||||
<el-table-column prop="material_code" label="物料编码" width="100" show-overflow-tooltip />
|
<el-table-column prop="material_code" label="物料编码" width="100" show-overflow-tooltip/>
|
||||||
<el-table-column prop="material_name" label="物料名称" width="100" show-overflow-tooltip />
|
<el-table-column prop="material_name" label="物料名称" width="100" show-overflow-tooltip/>
|
||||||
<el-table-column prop="material_spec" label="物料规格" width="100" show-overflow-tooltip />
|
<el-table-column prop="material_spec" label="物料规格" width="100" show-overflow-tooltip/>
|
||||||
<el-table-column prop="sale_id" label="销售单标识" width="100" show-overflow-tooltip />
|
<el-table-column prop="sale_id" label="销售单标识" width="100" show-overflow-tooltip/>
|
||||||
<el-table-column prop="class_name" label="产品系列" width="100" show-overflow-tooltip />
|
<el-table-column prop="class_name" label="产品系列" width="100" show-overflow-tooltip/>
|
||||||
<el-table-column prop="material_weight" label="物料单重" :formatter="rounding" />
|
<el-table-column prop="material_weight" label="物料单重" :formatter="rounding"/>
|
||||||
<el-table-column prop="planproducestart_date" label="计划生产开始时间" width="150" />
|
<el-table-column prop="planproducestart_date" label="计划生产开始时间" width="150"/>
|
||||||
<el-table-column prop="planproduceend_date" label="计划生产结束时间" width="150" />
|
<el-table-column prop="planproduceend_date" label="计划生产结束时间" width="150"/>
|
||||||
<el-table-column prop="realproducestart_date" label="实际生产开始时间" width="150" />
|
<el-table-column prop="realproducestart_date" label="实际生产开始时间" width="150"/>
|
||||||
<el-table-column prop="realproduceend_date" label="实际生产结束时间" width="150" />
|
<el-table-column prop="realproduceend_date" label="实际生产结束时间" width="150"/>
|
||||||
<el-table-column prop="is_needmove" label="是否搬运">
|
<el-table-column prop="is_needmove" label="是否搬运">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ dict.label.IS_OR_NOT[scope.row.is_needmove] }}
|
{{ dict.label.IS_OR_NOT[scope.row.is_needmove] }}
|
||||||
@@ -472,10 +345,10 @@
|
|||||||
{{ dict.label.PDM_BI_ORDERTYPE[scope.row.order_type_scode] }}
|
{{ dict.label.PDM_BI_ORDERTYPE[scope.row.order_type_scode] }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="create_name" label="创建人" />
|
<el-table-column prop="create_name" label="创建人"/>
|
||||||
<el-table-column prop="create_time" label="创建时间" width="150" />
|
<el-table-column prop="create_time" label="创建时间" width="150"/>
|
||||||
<el-table-column prop="update_optname" label="修改人" />
|
<el-table-column prop="update_optname" label="修改人"/>
|
||||||
<el-table-column prop="update_time" label="修改时间" width="150" />
|
<el-table-column prop="update_time" label="修改时间" width="150"/>
|
||||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<udOperation
|
<udOperation
|
||||||
@@ -486,7 +359,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination/>
|
||||||
</div>
|
</div>
|
||||||
<MaterDtl
|
<MaterDtl
|
||||||
:dialog-show.sync="materialShow"
|
:dialog-show.sync="materialShow"
|
||||||
@@ -495,12 +368,13 @@
|
|||||||
@setMaterValue="setMaterValue"
|
@setMaterValue="setMaterValue"
|
||||||
/>
|
/>
|
||||||
<ViewDialog ref="child3"/>
|
<ViewDialog ref="child3"/>
|
||||||
|
<AddDialog :dialog-show.sync="addShow" @AddChanged="querytable"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import crudProduceshiftorder from '@/api/wms/mps/produceshiftorder'
|
import crudProduceshiftorder from '@/api/wms/mps/produceshiftorder'
|
||||||
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
import CRUD, {presenter, header, form, crud} 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 udOperation from '@crud/UD.operation'
|
||||||
@@ -509,12 +383,11 @@ import crudWorkProcedure from '@/api/wms/basedata/pdm/workProcedure'
|
|||||||
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
||||||
import Treeselect, {LOAD_CHILDREN_OPTIONS} from '@riophae/vue-treeselect'
|
import Treeselect, {LOAD_CHILDREN_OPTIONS} from '@riophae/vue-treeselect'
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
|
||||||
import ViewDialog from '@/views/wms/mps/produce/ViewDialog'
|
import ViewDialog from '@/views/wms/mps/produce/ViewDialog'
|
||||||
import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
||||||
|
import AddDialog from '@/views/wms/mps/produce/AddDialog'
|
||||||
|
|
||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
tableData: [],
|
|
||||||
produceorder_id: null,
|
produceorder_id: null,
|
||||||
produceorder_code: null,
|
produceorder_code: null,
|
||||||
producedeviceorder_code: null,
|
producedeviceorder_code: null,
|
||||||
@@ -532,7 +405,7 @@ const defaultForm = {
|
|||||||
realproducestart_date: null,
|
realproducestart_date: null,
|
||||||
realproduceend_date: null,
|
realproduceend_date: null,
|
||||||
order_status: '00',
|
order_status: '00',
|
||||||
is_needmove: '1',
|
is_needmove: '0',
|
||||||
order_type_scode: '01',
|
order_type_scode: '01',
|
||||||
create_id: null,
|
create_id: null,
|
||||||
create_name: null,
|
create_name: null,
|
||||||
@@ -551,7 +424,7 @@ const defaultForm = {
|
|||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
name: 'Produceshiftorder',
|
name: 'Produceshiftorder',
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation, MaterDtl, Treeselect, ViewDialog },
|
components: {AddDialog, pagination, crudOperation, rrOperation, udOperation, MaterDtl, Treeselect, ViewDialog},
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
dicts: ['PDM_BI_SHIFTTYPE', 'MPS_BD_ORDERSTATUS', 'is_used', 'PDM_BI_ORDERTYPE', 'IS_OR_NOT'],
|
dicts: ['PDM_BI_SHIFTTYPE', 'MPS_BD_ORDERSTATUS', 'is_used', 'PDM_BI_ORDERTYPE', 'IS_OR_NOT'],
|
||||||
cruds() {
|
cruds() {
|
||||||
@@ -567,7 +440,7 @@ export default {
|
|||||||
query: {
|
query: {
|
||||||
order_status: '-1'
|
order_status: '-1'
|
||||||
},
|
},
|
||||||
crudMethod: { ...crudProduceshiftorder }
|
crudMethod: {...crudProduceshiftorder}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -575,51 +448,46 @@ export default {
|
|||||||
classes3: [],
|
classes3: [],
|
||||||
materType: '01',
|
materType: '01',
|
||||||
materialShow: false,
|
materialShow: false,
|
||||||
|
addShow: false,
|
||||||
workprocedureList: [],
|
workprocedureList: [],
|
||||||
order_status: ['-1'],
|
order_status: ['-1'],
|
||||||
permission: {},
|
permission: {},
|
||||||
rules: {
|
rules: {
|
||||||
produceorder_code: [
|
produceorder_code: [
|
||||||
{ required: true, message: '生产班次工单编号不能为空', trigger: 'blur' }
|
{required: true, message: '生产班次工单编号不能为空', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
producedeviceorder_code: [
|
producedeviceorder_code: [
|
||||||
{ required: true, message: '机台工单号不能为空', trigger: 'blur' }
|
{required: true, message: '机台工单号不能为空', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
shift_type_scode: [
|
shift_type_scode: [
|
||||||
{ required: true, message: '班次类型不能为空', trigger: 'blur' }
|
{required: true, message: '班次类型不能为空', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
workprocedure_id: [
|
workprocedure_id: [
|
||||||
{ required: true, message: '工序标识不能为空', trigger: 'blur' }
|
{required: true, message: '工序标识不能为空', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
produce_date: [
|
produce_date: [
|
||||||
{ required: true, message: '生产日期不能为空', trigger: 'blur' }
|
{required: true, message: '生产日期不能为空', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
plan_qty: [
|
plan_qty: [
|
||||||
{ required: true, message: '计划数量不能为空', trigger: 'blur' }
|
{required: true, message: '计划数量不能为空', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
material_code: [
|
material_code: [
|
||||||
{ required: true, message: '物料编码不能为空', trigger: 'change' }
|
{required: true, message: '物料编码不能为空', trigger: 'change'}
|
||||||
],
|
|
||||||
material_weight: [
|
|
||||||
{ required: true, message: '物料单重不能为空', trigger: 'blur' }
|
|
||||||
],
|
],
|
||||||
planproducestart_date: [
|
planproducestart_date: [
|
||||||
{ required: true, message: '计划生产开始时间不能为空', trigger: 'blur' }
|
{required: true, message: '计划生产开始时间不能为空', trigger: 'blur'}
|
||||||
],
|
|
||||||
planproduceend_date: [
|
|
||||||
{ required: true, message: '计划生产结束时间不能为空', trigger: 'blur' }
|
|
||||||
],
|
],
|
||||||
order_status: [
|
order_status: [
|
||||||
{ required: true, message: '工单状态不能为空', trigger: 'blur' }
|
{required: true, message: '工单状态不能为空', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
is_needmove: [
|
is_needmove: [
|
||||||
{ required: true, message: '是否搬运不能为空', trigger: 'blur' }
|
{required: true, message: '是否搬运不能为空', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
order_type_scode: [
|
order_type_scode: [
|
||||||
{ required: true, message: '工单类型不能为空', trigger: 'blur' }
|
{required: true, message: '工单类型不能为空', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
is_canupdate_update: [
|
is_canupdate_update: [
|
||||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
{required: true, message: '不能为空', trigger: 'blur'}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -653,10 +521,10 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取子节点数据
|
// 获取子节点数据
|
||||||
loadChildNodes({ action, parentNode, callback }) {
|
loadChildNodes({action, parentNode, callback}) {
|
||||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||||
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
crudClassstandard.getClass({pid: parentNode.id}).then(res => {
|
||||||
parentNode.children = res.content.map(function(obj) {
|
parentNode.children = res.content.map(function (obj) {
|
||||||
if (obj.hasChildren) {
|
if (obj.hasChildren) {
|
||||||
obj.children = null
|
obj.children = null
|
||||||
}
|
}
|
||||||
@@ -678,6 +546,9 @@ export default {
|
|||||||
this.classes3 = data
|
this.classes3 = data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
querytable() {
|
||||||
|
this.crud.toQuery()
|
||||||
|
},
|
||||||
// 工单状态多选搜索
|
// 工单状态多选搜索
|
||||||
handTaskStatus(value) {
|
handTaskStatus(value) {
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
@@ -696,7 +567,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 强制完成
|
// 强制完成
|
||||||
forceFinish(data) {
|
forceFinish(data) {
|
||||||
crudProduceshiftorder.forceFinish({ row: data }).then(res => {
|
crudProduceshiftorder.forceFinish({row: data}).then(res => {
|
||||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
})
|
})
|
||||||
@@ -728,38 +599,13 @@ export default {
|
|||||||
},
|
},
|
||||||
// 下发
|
// 下发
|
||||||
submits(row) {
|
submits(row) {
|
||||||
crudProduceshiftorder.submits({ produceorder_id: row.produceorder_id }).then(res => {
|
crudProduceshiftorder.submits({produceorder_id: row.produceorder_id}).then(res => {
|
||||||
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
insertDtl() {
|
add() {
|
||||||
this.form.tableData.push({
|
this.addShow = true
|
||||||
produceorder_id: '',
|
|
||||||
produceorder_code: '',
|
|
||||||
producedeviceorder_code: '',
|
|
||||||
shift_type_scode: '01',
|
|
||||||
workprocedure_id: '',
|
|
||||||
produce_date: '',
|
|
||||||
plan_qty: '',
|
|
||||||
real_qty: '',
|
|
||||||
report_qty: '',
|
|
||||||
material_id: '',
|
|
||||||
material_code: '',
|
|
||||||
material_weight: '',
|
|
||||||
planproducestart_date: '',
|
|
||||||
planproduceend_date: '',
|
|
||||||
realproducestart_date: '',
|
|
||||||
realproduceend_date: '',
|
|
||||||
order_status: '00',
|
|
||||||
is_needmove: '1',
|
|
||||||
order_type_scode: '01',
|
|
||||||
material_name: '',
|
|
||||||
device_id: '',
|
|
||||||
is_canupdate_update: '1',
|
|
||||||
material_spec: '',
|
|
||||||
sale_id: ''
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,6 +117,18 @@
|
|||||||
:min-width="item.width"
|
:min-width="item.width"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
<el-table-column label="是否启用" align="center" prop="is_active">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-switch
|
||||||
|
v-model="scope.row.is_active"
|
||||||
|
active-color="#409EFF"
|
||||||
|
inactive-color="#F56C6C"
|
||||||
|
active-value="1"
|
||||||
|
inactive-value="0"
|
||||||
|
@change="changeEnabled(scope.row, scope.row.is_active)"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<udOperation
|
<udOperation
|
||||||
@@ -145,12 +157,14 @@ import pagination from '@crud/Pagination'
|
|||||||
import DeviceItemDialog from '@/views/wms/pdm/device/DeviceItemDialog'
|
import DeviceItemDialog from '@/views/wms/pdm/device/DeviceItemDialog'
|
||||||
import DeviceInfoDialog from '@/views/wms/pdm/device/DeviceInfoDialog'
|
import DeviceInfoDialog from '@/views/wms/pdm/device/DeviceInfoDialog'
|
||||||
import CopyDialog from '@/views/wms/pdm/device/CopyDialog'
|
import CopyDialog from '@/views/wms/pdm/device/CopyDialog'
|
||||||
|
import crudSectattr from "@/api/wms/basedata/st/sectattr";
|
||||||
|
|
||||||
const defaultForm = { device_id: null, device_code: null, device_name: null, device_model: null, workprocedure_id: null, extend_code: null, devicebill_id: null, remark: null, is_active: null, create_id: null, create_name: null, create_time: null, is_delete: null, productivity: null }
|
const defaultForm = { device_id: null, device_code: null, device_name: null, device_model: null, workprocedure_id: null, extend_code: null, devicebill_id: null, remark: null, is_active: null, create_id: null, create_name: null, create_time: null, is_delete: null, productivity: null }
|
||||||
export default {
|
export default {
|
||||||
name: 'Device',
|
name: 'Device',
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation, DeviceItemDialog, CopyDialog, DeviceInfoDialog },
|
components: { pagination, crudOperation, rrOperation, udOperation, DeviceItemDialog, CopyDialog, DeviceInfoDialog },
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
|
dicts: ['is_used'],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({ title: '生产设备', url: 'api/device', idField: 'device_id', sort: 'device_id,desc',
|
return CRUD({ title: '生产设备', url: 'api/device', idField: 'device_id', sort: 'device_id,desc',
|
||||||
optShow: {
|
optShow: {
|
||||||
@@ -191,6 +205,38 @@ export default {
|
|||||||
this.getHeader(this.query.search, this.query.workprocedure_id)
|
this.getHeader(this.query.search, this.query.workprocedure_id)
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
|
// 改变状态
|
||||||
|
format_is_used(is_used) {
|
||||||
|
return is_used === '1'
|
||||||
|
},
|
||||||
|
changeEnabled(data, val) {
|
||||||
|
debugger
|
||||||
|
this.$confirm('此操作将 "' + this.dict.label.is_used[val] + '" ' + data.device_code + ', 是否继续?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
crudDevice.edit(data).then(res => {
|
||||||
|
this.crud.notify(this.dict.label.is_used[val] + '成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
}).catch(() => {
|
||||||
|
if (data.is_active === '0') {
|
||||||
|
data.is_active = '1'
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (data.is_active === '1') {
|
||||||
|
data.is_active = '0'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
if (data.is_active === '0') {
|
||||||
|
data.is_active = '1'
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (data.is_active === '1') {
|
||||||
|
data.is_active = '0'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
getWorkprocedure() {
|
getWorkprocedure() {
|
||||||
crudDevice.getWorkprocedure().then(res => {
|
crudDevice.getWorkprocedure().then(res => {
|
||||||
this.workList = res
|
this.workList = res
|
||||||
|
|||||||
Reference in New Issue
Block a user