Gitea 1 year ago
parent e816ee151c
commit 51ed3a5dbf
  1. 40
      ant-design-vue-jeecg/src/views/productrecord/ProductRecordList1.vue
  2. 21
      ant-design-vue-jeecg/src/views/sensorrecord/SensorRecordList1.vue
  3. 163
      ant-design-vue-jeecg/src/views/team/modules/StationModal1.vue
  4. 30
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/controller/WorkOrderController.java

@ -93,6 +93,12 @@
下载
</a-button>
</template>
<template slot="gw" slot-scope="text, record">
<a @click="gw(record.stationId)">{{text}}</a>
</template>
<template slot="gd" slot-scope="text, record">
<a @click="gd(record.orderCode)">{{text}}</a>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
@ -122,6 +128,8 @@
</a-tab-pane>
</a-tabs>
<product-record-modal ref="modalForm" @ok="modalFormOk"></product-record-modal>
<station-modal1 ref="modalFormgw"></station-modal1>
<work-order-modal ref="modalFormgd"></work-order-modal>
</a-card>
</template>
@ -133,13 +141,18 @@
import ProductRecordModal from './modules/ProductRecordModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import SensorRecordList1 from '../sensorrecord/SensorRecordList1'
import {deleteAction, getAction} from "@api/manage";
import StationModal1 from '../team/modules/StationModal1'
import WorkOrderModal from '../workorder/modules/WorkOrderModal'
export default {
name: 'ProductRecordList',
mixins:[JeecgListMixin, mixinDevice],
components: {
SensorRecordList1,
ProductRecordModal
ProductRecordModal,
StationModal1,
WorkOrderModal
},
data () {
return {
@ -159,12 +172,14 @@
{
title:'工位',
align:"center",
dataIndex: 'stationId_dictText'
dataIndex: 'stationId_dictText',
scopedSlots: {customRender: 'gw'}
},
{
title:'工单编号',
align:"center",
dataIndex: 'orderCode'
dataIndex: 'orderCode',
scopedSlots: {customRender: 'gd'}
},
{
title:'生产开始时间',
@ -216,6 +231,25 @@
},
},
methods: {
gw(stationId){
getAction("/team/station/queryById", {id: stationId}).then((res) => {
if (res.success) {
this.$refs.modalFormgw.edit(res.result);
this.$refs.modalFormgw.title="详情";
} else {
}
})
},
gd(orderCode){
getAction("/workOrder/workOrder/queryByOrderCode", {orderCode: orderCode}).then((res) => {
if (res.success) {
this.$refs.modalFormgd.edit(res.result);
this.$refs.modalFormgd.title="详情";
this.$refs.modalFormgd.disableSubmit = true;
} else {
}
})
},
initDictConfig(){
},
getSuperFieldList(){

@ -66,6 +66,9 @@
下载
</a-button>
</template>
<template slot="gw" slot-scope="text, record">
<a @click="gw(record.stationId)">{{text}}</a>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
@ -90,6 +93,7 @@
</div>
<sensor-record-modal ref="modalForm" @ok="modalFormOk"></sensor-record-modal>
<station-modal1 ref="modalFormgw"></station-modal1>
</a-card>
</template>
@ -100,12 +104,15 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import SensorRecordModal from './modules/SensorRecordModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import StationModal1 from '../team/modules/StationModal1'
import {deleteAction, getAction} from "@api/manage";
export default {
name: 'SensorRecordList1',
mixins:[JeecgListMixin, mixinDevice],
components: {
SensorRecordModal
SensorRecordModal,
StationModal1
},
data () {
return {
@ -135,7 +142,8 @@
{
title:'工位',
align:"center",
dataIndex: 'stationId_dictText'
dataIndex: 'stationId_dictText',
scopedSlots: {customRender: 'gw'}
},
{
title:'进出标记',
@ -182,6 +190,15 @@
},
},
methods: {
gw(stationId){
getAction("/team/station/queryById", {id: stationId}).then((res) => {
if (res.success) {
this.$refs.modalFormgw.edit(res.result);
this.$refs.modalFormgw.title="详情";
} else {
}
})
},
initDictConfig(){
},
getSuperFieldList(){

@ -0,0 +1,163 @@
<template>
<j-modal
:title="title"
:width="800"
:visible="visible"
:confirmLoading="confirmLoading"
switchFullscreen
@cancel="handleCancel"
@ok="handleCancel"
cancelText="关闭">
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules">
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="departId" label="车间名称">
<!-- <j-dict-select-tag type="list" v-model="model.departId" dictCode="sys_depart,depart_name,id,org_category='2'" placeholder="请选择车间" />-->
<!-- <j-tree-select v-model="model.departId"
dict="sys_depart,depart_name,id"
pidField="parent_id"
placeholder="请选择车间"
condition='{"org_category":"2"}'
hasChildField="1"
>
</j-tree-select>-->
<j-dict-select-tag type="list" v-model="model.departId"
dictCode="sys_depart,depart_name,id,org_category='2'"
placeholder="请选择车间"/>
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stationName" label="工位名称">
<a-input placeholder="请输入工位名称" v-model="model.stationName"/>
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stationNum" label="工位序号">
<a-input-number v-model="model.stationNum"/>
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="description" label="备注">
<a-input placeholder="请输入备注" v-model="model.description"/>
</a-form-model-item>
</a-form-model>
</j-form-container>
</a-spin>
</j-modal>
</template>
<script>
import {getAction, httpAction} from '@/api/manage'
import moment from "moment"
export default {
name: "StationModal",
data() {
return {
title: "操作",
visible: false,
formDisabled:true,
model: {},
labelCol: {
xs: {span: 24},
sm: {span: 5},
},
wrapperCol: {
xs: {span: 24},
sm: {span: 16},
},
confirmLoading: false,
validatorRules: {
departId: [
{required: true, message: "部门不能为空"},
],
stationName: [
{required: true,message:"工位名称不能为空"},
{pattern: /(^[\u4e00-\u9fa5_a-zA-Z0-9_]{1,10}$)/, message: '工位名称为空且长度不能超过10!'}
],
stationNum: [
{required: true,message:"工位序号不能不空"},
{pattern: /^[1-9]{0,100}$/, message: '工位序号不能为空且长度为(1-100)间正整数'}
],
},
url: {
add: "/team/station/add",
edit: "/team/station/edit",
},
}
},
created() {
},
methods: {
async bianhao() {
//var n=6
getAction(this.url.sort, {id: this.model.clothsTypeId}).then((res) => {
//let num = res.result;
console.log("+6++++aaa: " + res.result)
//num=num.toString()
//while(num.length<n){
//num="0"+num
//}
//console.log(num)
this.model.nums = res.result;
})
},
add() {
//
this.edit({});
},
edit(record) {
this.model = Object.assign({}, record);
this.visible = true;
},
close() {
this.$emit('close');
this.visible = false;
this.$refs.form.clearValidate();
},
handleOk() {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if (!this.model.id) {
httpurl += this.url.add;
method = 'post';
} else {
httpurl += this.url.edit;
method = 'put';
}
httpAction(httpurl, this.model, method).then((res) => {
if (res.success) {
that.$message.success(res.message);
that.$emit('ok');
} else {
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
that.close();
})
} else {
return false;
}
})
},
handleCancel() {
this.close()
},
}
}
</script>
<style lang="less" scoped>
</style>

@ -112,7 +112,7 @@ public class WorkOrderController extends JeecgController<WorkOrder, IWorkOrderSe
IPage<WorkOrder> pageList = workOrderService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
@ -126,7 +126,7 @@ public class WorkOrderController extends JeecgController<WorkOrder, IWorkOrderSe
workOrderService.save(workOrder);
return Result.OK("添加成功!");
}
/**
* 编辑
*
@ -140,7 +140,7 @@ public class WorkOrderController extends JeecgController<WorkOrder, IWorkOrderSe
workOrderService.updateById(workOrder);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
@ -154,7 +154,7 @@ public class WorkOrderController extends JeecgController<WorkOrder, IWorkOrderSe
workOrderService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
@ -168,7 +168,7 @@ public class WorkOrderController extends JeecgController<WorkOrder, IWorkOrderSe
this.workOrderService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
@ -186,6 +186,26 @@ public class WorkOrderController extends JeecgController<WorkOrder, IWorkOrderSe
return Result.OK(workOrder);
}
/**
* 通过orderCode查询
*
* @param orderCode
* @return
*/
@AutoLog(value = "工单订单完工-通过id查询")
@ApiOperation(value="工单订单完工-通过id查询", notes="工单订单完工-通过id查询")
@GetMapping(value = "/queryByOrderCode")
public Result<?> queryByOrderCode(@RequestParam(name="orderCode",required=true) String orderCode,HttpServletRequest req) {
WorkOrder workOrder = new WorkOrder();
QueryWrapper<WorkOrder> queryWrapper = QueryGenerator.initQueryWrapper(workOrder, req.getParameterMap());
queryWrapper.eq("product_code",orderCode);
workOrder = workOrderService.list(queryWrapper).get(0);
if(workOrder==null) {
return Result.error("未找到对应数据");
}
return Result.OK(workOrder);
}
/**
* 导出excel
*

Loading…
Cancel
Save