2023-01-07-02

zhc4dev
喻忠伟 2 years ago
parent 2fe1d09cfa
commit 07f0c8af85
  1. 2
      ant-design-vue-jeecg/src/views/activiti/doneManage.vue
  2. 4
      ant-design-vue-jeecg/src/views/activiti/processFinishManage.vue
  3. 4
      ant-design-vue-jeecg/src/views/activiti/processInsManage.vue
  4. 2
      ant-design-vue-jeecg/src/views/activiti/todoManage.vue
  5. 2
      ant-design-vue-jeecg/src/views/jeecg/SelectDemo.vue
  6. 2
      ant-design-vue-jeecg/src/views/jeecg/tablist/form/JeecgOrderCustomerModal.vue
  7. 2
      ant-design-vue-jeecg/src/views/personel/ZyDistributionList.vue
  8. 2
      ant-design-vue-jeecg/src/views/process/modules/ZyOperationtoolModal.vue
  9. 2
      ant-design-vue-jeecg/src/views/process/modules/ZyProcessAccessoriesModal.vue
  10. 2
      ant-design-vue-jeecg/src/views/process/modules/ZyProcessFabricModal.vue
  11. 2
      ant-design-vue-jeecg/src/views/process/modules/ZyProcessMachineModal.vue
  12. 2
      ant-design-vue-jeecg/src/views/system/UserAnnouncementList.vue
  13. 2
      ant-design-vue-jeecg/src/views/system/modules/StaffModal.vue
  14. 103
      ant-design-vue-jeecg/src/views/workorder/WorkOrderList.vue
  15. 137
      ant-design-vue-jeecg/src/views/workorder/modules/WorkOrderForm.vue
  16. 1
      ant-design-vue-jeecg/src/views/workorder/modules/WorkOrderModal__Style#Drawer.vue
  17. 318
      ant-design-vue-jeecg/src/views/zyWorkProduct/ZyProductList.vue
  18. 224
      ant-design-vue-jeecg/src/views/zyWorkProduct/modules/ZyProductForm.vue
  19. 8
      ant-design-vue-jeecg/src/views/zyWorkProduct/modules/ZyProductModal.vue
  20. 9
      ant-design-vue-jeecg/src/views/zyWorkProduct/modules/ZyProductModal__Style#Drawer.vue
  21. 109
      ant-design-vue-jeecg/src/views/zyWorkorderManagement/ZyProductionOrderList.vue
  22. 64
      ant-design-vue-jeecg/src/views/zyWorkorderManagement/ZyWorkOrderList.vue
  23. 2
      ant-design-vue-jeecg/src/views/zystyleaccessories/modules/ZyStyleAccessoriesModal.vue
  24. 2
      ant-design-vue-jeecg/src/views/zystylefabric/modules/ZyStyleFabricModal.vue
  25. 2
      ant-design-vue-jeecg/src/views/zystylemodular/modules/ZyStyleModularModal.vue
  26. 2
      ant-design-vue-jeecg/src/views/zystylemodule/modules/ZyStyleModuleModal.vue
  27. 244
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/controller/WorkOrderController.java
  28. 77
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/entity/WorkOrder.java
  29. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/mapper/WorkOrderMapper.java
  30. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/service/IWorkOrderService.java
  31. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/service/impl/WorkOrderServiceImpl.java
  32. 186
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/vue/modules/WorkOrderForm.vue
  33. 171
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workproduct/controller/ZyProductController.java
  34. 157
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workproduct/entity/ZyProduct.java
  35. 17
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workproduct/mapper/ZyProductMapper.java
  36. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workproduct/mapper/xml/ZyProductMapper.xml
  37. 14
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workproduct/service/IZyProductService.java
  38. 19
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workproduct/service/impl/ZyProductServiceImpl.java

@ -125,7 +125,7 @@
<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { activitiMixin } from '@/views/activiti/mixins/activitiMixin'
import {postFormAction} from "../../api/manage";
import {postFormAction} from "@/api/manage";
export default {
name: "done-manage",
mixins:[activitiMixin,JeecgListMixin],

@ -151,8 +151,8 @@
<script>
import {activitiMixin} from "./mixins/activitiMixin";
import {JeecgListMixin} from "../../mixins/JeecgListMixin";
import {getAction} from "../../api/manage";
import {JeecgListMixin} from "@/mixins/JeecgListMixin";
import {getAction} from "@/api/manage";
export default {
mixins:[JeecgListMixin,activitiMixin],

@ -145,8 +145,8 @@
<script>
import {activitiMixin} from "./mixins/activitiMixin";
import {JeecgListMixin} from "../../mixins/JeecgListMixin";
import {getAction} from "../../api/manage";
import {JeecgListMixin} from "@/mixins/JeecgListMixin";
import {getAction} from "@/api/manage";
export default {
mixins:[activitiMixin,JeecgListMixin],
name: "process-ins-manage",

@ -187,7 +187,7 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { activitiMixin } from '@/views/activiti/mixins/activitiMixin'
import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
import {postFormAction} from "../../api/manage";
import {postFormAction} from "@/api/manage";
export default {
name: "todo-manage",

@ -443,7 +443,7 @@
<script>
import JDictSelectTag from '../../components/dict/JDictSelectTag.vue'
import JDictSelectTag from '@/components/dict/JDictSelectTag.vue'
import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
import JSelectMultiUser from '@/components/jeecgbiz/JSelectMultiUser'

@ -71,7 +71,7 @@
import {httpAction} from '@/api/manage'
import Vue from 'vue'
import {ACCESS_TOKEN} from "@/store/mutation-types"
import JImageUpload from '../../../../components/jeecg/JImageUpload'
import JImageUpload from '@/components/jeecg/JImageUpload'
export default {
name: "JeecgOrderCustomerModal",

@ -63,7 +63,7 @@
</template>
<script>
import {getAction,postAction} from "../../api/manage";
import {getAction,postAction} from "@/api/manage";
export default {
data() {

@ -16,7 +16,7 @@
<script>
import {postAction} from "../../../api/manage";
import {postAction} from "@/api/manage";
import ZyToolList from "./list/ZyToolList";
export default {
name: 'ZyToolModal',

@ -16,7 +16,7 @@
<script>
import {postAction} from "../../../api/manage";
import {postAction} from "@/api/manage";
import ZyAccessoriesList from "./list/ZyAccessoriesList";
export default {
name: 'ZyProcessActionModal',

@ -16,7 +16,7 @@
<script>
import {postAction} from "../../../api/manage";
import {postAction} from "@/api/manage";
import ZyFabricList from "./list/ZyFabricList";
export default {
name: 'ZyProcessActionModal',

@ -15,7 +15,7 @@
<script>
import ZyMachine from "./list/ZyMachine";
import {postAction} from "../../../api/manage";
import {postAction} from "@/api/manage";
export default {
name: 'ZyProcessMachineModal',
components: {

@ -55,7 +55,7 @@
import { getAction,putAction } from '@/api/manage'
import ShowAnnouncement from '@/components/tools/ShowAnnouncement'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import DynamicNotice from '../../components/tools/DynamicNotice'
import DynamicNotice from '@/components/tools/DynamicNotice'
export default {
name: "UserAnnouncementList",

@ -172,7 +172,7 @@
import {addUser,editUser,queryUserRole,queryall } from '@/api/api'
import { disabledAuthFilter } from "@/utils/authFilter"
import {duplicateCheck } from '@/api/api'
import JImageUpload from '../../../components/jeecg/JImageUpload'
import JImageUpload from '@/components/jeecg/JImageUpload'
export default {
name: "StaffModal",

@ -4,33 +4,6 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="工单编号">
<a-input placeholder="请输入工单编号" v-model="queryParam.workCode"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="订单编号">
<a-input placeholder="请输入订单编号" v-model="queryParam.orderCode"></a-input>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="客户名称">
<a-input placeholder="请输入客户名称" v-model="queryParam.customerName"></a-input>
</a-form-item>
</a-col>
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row>
</a-form>
</div>
@ -43,6 +16,8 @@
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
@ -124,6 +99,7 @@
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import WorkOrderModal from './modules/WorkOrderModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'WorkOrderList',
@ -137,7 +113,7 @@
//
columns: [
{
title: '序号',
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
@ -146,40 +122,45 @@
return parseInt(index)+1;
}
},
/* {
title:'工单ID',
align:"center",
dataIndex: 'workId'
},*/
{
title:'工单编号',
align:"center",
dataIndex: 'workCode'
dataIndex: 'productCode'
},
/* {
title:'订单ID',
{
title:'订单',
align:"center",
dataIndex: 'orderId'
},*/
dataIndex: 'ordersId'
},
{
title:'订单编号',
title:'订单商品',
align:"center",
dataIndex: 'orderCode'
dataIndex: 'orderGoodsId'
},
/* {
title:'客户ID',
{
title:'商品数量',
align:"center",
dataIndex: 'customerId'
},*/
dataIndex: 'goodsNum'
},
{
title:'客户名称',
title:'下单时间',
align:"center",
dataIndex: 'customerName'
dataIndex: 'orderTime'
},
{
title:'完工百分比',
title:'交货期',
align:"center",
dataIndex: 'finished'
dataIndex: 'deliveryTime'
},
{
title:'工单状态',
align:"center",
dataIndex: 'workOrderStatus_dictText'
},
{
title:'企业',
align:"center",
dataIndex: 'enterprisesId'
},
{
title: '操作',
@ -191,17 +172,19 @@
}
],
url: {
list: "/workorder/workOrder/list",
delete: "/workorder/workOrder/delete",
deleteBatch: "/workorder/workOrder/deleteBatch",
exportXlsUrl: "/workorder/workOrder/exportXls",
importExcelUrl: "workorder/workOrder/importExcel",
list: "/workOrder/workOrder/list",
delete: "/workOrder/workOrder/delete",
deleteBatch: "/workOrder/workOrder/deleteBatch",
exportXlsUrl: "/workOrder/workOrder/exportXls",
importExcelUrl: "workOrder/workOrder/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
@ -210,6 +193,18 @@
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'productCode',text:'工单编号',dictCode:''})
fieldList.push({type:'string',value:'ordersId',text:'订单',dictCode:''})
fieldList.push({type:'string',value:'orderGoodsId',text:'订单商品',dictCode:''})
fieldList.push({type:'int',value:'goodsNum',text:'商品数量',dictCode:''})
fieldList.push({type:'datetime',value:'orderTime',text:'下单时间'})
fieldList.push({type:'int',value:'deliveryTime',text:'交货期',dictCode:''})
fieldList.push({type:'int',value:'workOrderStatus',text:'工单状态',dictCode:'work_order_status'})
fieldList.push({type:'string',value:'enterprisesId',text:'企业',dictCode:''})
this.superFieldList = fieldList
}
}
}

@ -1,48 +1,50 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form :form="form" slot="detail">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<!-- <a-col :span="24">
<a-form-item label="工单ID" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['workId']" placeholder="请输入工单ID"></a-input>
</a-form-item>
</a-col>-->
<a-col :span="24">
<a-form-item label="工单编号" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['workCode']" placeholder="请输入工单编号"></a-input>
</a-form-item>
<a-form-model-item label="工单编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productCode">
<a-input v-model="model.productCode" placeholder="请输入工单编号" ></a-input>
</a-form-model-item>
</a-col>
<!-- <a-col :span="24">
<a-form-item label="订单ID" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['orderId']" placeholder="请输入订单ID"></a-input>
</a-form-item>
</a-col>-->
<a-col :span="24">
<a-form-item label="订单编号" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['orderCode']" placeholder="请输入订单编号"></a-input>
</a-form-item>
<a-form-model-item label="订单" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ordersId">
<a-input v-model="model.ordersId" placeholder="请输入订单" ></a-input>
</a-form-model-item>
</a-col>
<!-- <a-col :span="24">
<a-form-item label="客户ID" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['customerId']" placeholder="请输入客户ID"></a-input>
</a-form-item>
</a-col>-->
<a-col :span="24">
<a-form-item label="客户名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['customerName']" placeholder="请输入客户名称"></a-input>
</a-form-item>
<a-form-model-item label="订单商品" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderGoodsId">
<a-input v-model="model.orderGoodsId" placeholder="请输入订单商品" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-item label="完工百分比" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['finished']" placeholder="请输入完工百分比"></a-input>
</a-form-item>
<a-form-model-item label="商品数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="goodsNum">
<a-input-number v-model="model.goodsNum" placeholder="请输入商品数量" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col v-if="showFlowSubmitButton" :span="24" style="text-align: center">
<a-button @click="submitForm"> </a-button>
<a-col :span="24">
<a-form-model-item label="下单时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderTime">
<j-date placeholder="请选择下单时间" v-model="model.orderTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="交货期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deliveryTime">
<a-input-number v-model="model.deliveryTime" placeholder="请输入交货期" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="工单状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workOrderStatus">
<j-dict-select-tag type="list" v-model="model.workOrderStatus" dictCode="work_order_status" placeholder="请选择工单状态" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterprisesId">
<a-input v-model="model.enterprisesId" placeholder="请输入企业" ></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form>
</a-form-model>
</j-form-container>
</a-spin>
</template>
@ -50,28 +52,13 @@
<script>
import { httpAction, getAction } from '@/api/manage'
import pick from 'lodash.pick'
import { validateDuplicateValue } from '@/utils/util'
import JFormContainer from '@/components/jeecg/JFormContainer'
export default {
name: 'WorkOrderForm',
components: {
JFormContainer,
},
props: {
//data
formData: {
type: Object,
default: ()=>{},
required: false
},
//true false
formBpm: {
type: Boolean,
default: false,
required: false
},
//
disabled: {
type: Boolean,
@ -81,8 +68,8 @@
},
data () {
return {
form: this.$form.createForm(this),
model: {},
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
@ -95,63 +82,34 @@
validatorRules: {
},
url: {
add: "/workorder/workOrder/add",
edit: "/workorder/workOrder/edit",
queryById: "/workorder/workOrder/queryById"
add: "/workOrder/workOrder/add",
edit: "/workOrder/workOrder/edit",
queryById: "/workOrder/workOrder/queryById"
}
}
},
computed: {
formDisabled(){
if(this.formBpm===true){
if(this.formData.disabled===false){
return false
}
return true
}
return this.disabled
},
showFlowSubmitButton(){
if(this.formBpm===true){
if(this.formData.disabled===false){
return true
}
}
return false
}
},
created () {
//data
this.showFlowData();
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit({});
this.edit(this.modelDefault);
},
edit (record) {
this.form.resetFields();
this.model = Object.assign({}, record);
this.visible = true;
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'workId','workCode','orderId','orderCode','customerId','customerName','finished'))
})
},
//
showFlowData(){
if(this.formBpm === true){
let params = {id:this.formData.dataId};
getAction(this.url.queryById,params).then((res)=>{
if(res.success){
this.edit (res.result);
}
});
}
},
submitForm () {
const that = this;
//
this.form.validateFields((err, values) => {
if (!err) {
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
@ -162,9 +120,7 @@
httpurl+=this.url.edit;
method = 'put';
}
let formData = Object.assign(this.model, values);
console.log("表单提交数据",formData)
httpAction(httpurl,formData,method).then((res)=>{
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
@ -175,12 +131,9 @@
that.confirmLoading = false;
})
}
})
},
popupCallback(row){
this.form.setFieldsValue(pick(row,'workId','workCode','orderId','orderCode','customerId','customerName','finished'))
},
}
}
</script>

@ -5,6 +5,7 @@
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<work-order-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></work-order-form>
<div class="drawer-footer">

@ -0,0 +1,318 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('产品表')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<zy-product-modal ref="modalForm" @ok="modalFormOk"></zy-product-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyProductModal from './modules/ZyProductModal'
export default {
name: 'ZyProductList',
mixins:[JeecgListMixin, mixinDevice],
components: {
ZyProductModal
},
data () {
return {
description: '产品表管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'产品编号',
align:"center",
dataIndex: 'productCode'
},
{
title:'工单',
align:"center",
dataIndex: 'workOrderId'
},
{
title:'生产时间',
align:"center",
dataIndex: 'produceTime'
},
{
title:'合计(手工TMU)',
align:"center",
dataIndex: 'totalManualTmu'
},
{
title:'合计(设备TMU)',
align:"center",
dataIndex: 'totalMachineTmu'
},
{
title:'合计(手工秒)',
align:"center",
dataIndex: 'totalMaunal'
},
{
title:'合计(设备秒)',
align:"center",
dataIndex: 'totalMachine'
},
{
title:'企业',
align:"center",
dataIndex: 'enterprisesId'
},
{
title:'用户',
align:"center",
dataIndex: 'userId'
},
{
title:'结构图',
align:"center",
dataIndex: 'structureDiagram',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'排料图',
align:"center",
dataIndex: 'layoutDiagram',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'产品图片',
align:"center",
dataIndex: 'productPicture',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'身高',
align:"center",
dataIndex: 'height'
},
{
title:'体重',
align:"center",
dataIndex: 'weight'
},
{
title:'下摆',
align:"center",
dataIndex: 'hem'
},
{
title:'袖口',
align:"center",
dataIndex: 'cuff'
},
{
title:'袖长',
align:"center",
dataIndex: 'sleeveLength'
},
{
title:'胸围',
align:"center",
dataIndex: 'bust'
},
{
title:'腰围',
align:"center",
dataIndex: 'theWaist'
},
{
title:'肩宽',
align:"center",
dataIndex: 'shoulderwidth'
},
{
title:'前身长',
align:"center",
dataIndex: 'forebodylength'
},
{
title:'领围',
align:"center",
dataIndex: 'neck'
},
{
title:'臀围',
align:"center",
dataIndex: 'hipline'
},
{
title:'衣长',
align:"center",
dataIndex: 'length'
},
{
title:'胸距',
align:"center",
dataIndex: 'sternalDistance'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/zyproduct/zyProduct/list",
delete: "/zyproduct/zyProduct/delete",
deleteBatch: "/zyproduct/zyProduct/deleteBatch",
exportXlsUrl: "/zyproduct/zyProduct/exportXls",
importExcelUrl: "zyproduct/zyProduct/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'productCode',text:'产品编号',dictCode:''})
fieldList.push({type:'string',value:'workOrderId',text:'工单',dictCode:''})
fieldList.push({type:'int',value:'produceTime',text:'生产时间',dictCode:''})
fieldList.push({type:'double',value:'totalManualTmu',text:'合计(手工TMU)',dictCode:''})
fieldList.push({type:'double',value:'totalMachineTmu',text:'合计(设备TMU)',dictCode:''})
fieldList.push({type:'int',value:'totalMaunal',text:'合计(手工秒)',dictCode:''})
fieldList.push({type:'int',value:'totalMachine',text:'合计(设备秒)',dictCode:''})
fieldList.push({type:'string',value:'enterprisesId',text:'企业',dictCode:''})
fieldList.push({type:'string',value:'userId',text:'用户',dictCode:''})
fieldList.push({type:'string',value:'structureDiagram',text:'结构图',dictCode:''})
fieldList.push({type:'string',value:'layoutDiagram',text:'排料图',dictCode:''})
fieldList.push({type:'string',value:'productPicture',text:'产品图片',dictCode:''})
fieldList.push({type:'double',value:'height',text:'身高',dictCode:''})
fieldList.push({type:'double',value:'weight',text:'体重',dictCode:''})
fieldList.push({type:'double',value:'hem',text:'下摆',dictCode:''})
fieldList.push({type:'double',value:'cuff',text:'袖口',dictCode:''})
fieldList.push({type:'double',value:'sleeveLength',text:'袖长',dictCode:''})
fieldList.push({type:'double',value:'bust',text:'胸围',dictCode:''})
fieldList.push({type:'double',value:'theWaist',text:'腰围',dictCode:''})
fieldList.push({type:'double',value:'shoulderwidth',text:'肩宽',dictCode:''})
fieldList.push({type:'double',value:'forebodylength',text:'前身长',dictCode:''})
fieldList.push({type:'double',value:'neck',text:'领围',dictCode:''})
fieldList.push({type:'double',value:'hipline',text:'臀围',dictCode:''})
fieldList.push({type:'double',value:'length',text:'衣长',dictCode:''})
fieldList.push({type:'double',value:'sternalDistance',text:'胸距',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,224 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="产品编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productCode">
<a-input v-model="model.productCode" placeholder="请输入产品编号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="工单" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workOrderId">
<a-input v-model="model.workOrderId" placeholder="请输入工单" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="生产时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="produceTime">
<a-input-number v-model="model.produceTime" placeholder="请输入生产时间" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="合计(手工TMU)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="totalManualTmu">
<a-input-number v-model="model.totalManualTmu" placeholder="请输入合计(手工TMU)" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="合计(设备TMU)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="totalMachineTmu">
<a-input-number v-model="model.totalMachineTmu" placeholder="请输入合计(设备TMU)" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="合计(手工秒)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="totalMaunal">
<a-input-number v-model="model.totalMaunal" placeholder="请输入合计(手工秒)" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="合计(设备秒)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="totalMachine">
<a-input-number v-model="model.totalMachine" placeholder="请输入合计(设备秒)" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterprisesId">
<a-input v-model="model.enterprisesId" placeholder="请输入企业" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
<a-input v-model="model.userId" placeholder="请输入用户" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="结构图" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="structureDiagram">
<j-image-upload isMultiple v-model="model.structureDiagram" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="排料图" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="layoutDiagram">
<j-image-upload isMultiple v-model="model.layoutDiagram" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="产品图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productPicture">
<j-image-upload isMultiple v-model="model.productPicture" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="身高" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="height">
<a-input-number v-model="model.height" placeholder="请输入身高" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="体重" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="weight">
<a-input-number v-model="model.weight" placeholder="请输入体重" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="下摆" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hem">
<a-input-number v-model="model.hem" placeholder="请输入下摆" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="袖口" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cuff">
<a-input-number v-model="model.cuff" placeholder="请输入袖口" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="袖长" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sleeveLength">
<a-input-number v-model="model.sleeveLength" placeholder="请输入袖长" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="胸围" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bust">
<a-input-number v-model="model.bust" placeholder="请输入胸围" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="腰围" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="theWaist">
<a-input-number v-model="model.theWaist" placeholder="请输入腰围" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="肩宽" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shoulderwidth">
<a-input-number v-model="model.shoulderwidth" placeholder="请输入肩宽" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="前身长" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="forebodylength">
<a-input-number v-model="model.forebodylength" placeholder="请输入前身长" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="领围" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="neck">
<a-input-number v-model="model.neck" placeholder="请输入领围" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="臀围" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hipline">
<a-input-number v-model="model.hipline" placeholder="请输入臀围" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="衣长" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="length">
<a-input-number v-model="model.length" placeholder="请输入衣长" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="胸距" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sternalDistance">
<a-input-number v-model="model.sternalDistance" placeholder="请输入胸距" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'ZyProductForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/zyproduct/zyProduct/add",
edit: "/zyproduct/zyProduct/edit",
queryById: "/zyproduct/zyProduct/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
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;
})
}
})
},
}
}
</script>

@ -8,17 +8,17 @@
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<work-order-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></work-order-form>
<zy-product-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zy-product-form>
</j-modal>
</template>
<script>
import WorkOrderForm from './WorkOrderForm'
import ZyProductForm from './ZyProductForm'
export default {
name: 'WorkOrderModal',
name: 'ZyProductModal',
components: {
WorkOrderForm
ZyProductForm
},
data () {
return {

@ -5,8 +5,9 @@
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<work-order-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></work-order-form>
<zy-product-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></zy-product-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
@ -16,12 +17,12 @@
<script>
import WorkOrderForm from './WorkOrderForm'
import ZyProductForm from './ZyProductForm'
export default {
name: 'WorkOrderModal',
name: 'ZyProductModal',
components: {
WorkOrderForm
ZyProductForm
},
data () {
return {

@ -77,19 +77,19 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('订单基本信息管理')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
<!--<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
<!--<a-button type="primary" icon="download" @click="handleExportXls('订单基本信息管理')">导出</a-button>-->
<!--<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!--<a-button type="primary" icon="import">导入</a-button>-->
<!--</a-upload>-->
<!--&lt;!&ndash; 高级查询区域 &ndash;&gt;-->
<!--<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<!--<a-dropdown v-if="selectedRowKeys.length > 0">-->
<!--<a-menu slot="overlay">-->
<!--<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
<!--</a-menu>-->
<!--<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
<!--</a-dropdown>-->
</div>
<!-- table区域-begin -->
@ -137,15 +137,18 @@
</template>
<span slot="action" slot-scope="text, record">
<a @click="chaidan(record)">拆单</a>
<a-divider type="vertical" />
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a v-if="record.deliveryStatus==2" @click="paidan(record)">派单</a>
<a-divider v-if="record.deliveryStatus==2" type="vertical" />
<!--<a @click="handleEdit(record)">编辑</a>-->
<!--<a-divider type="vertical" />-->
<a @click="handleDetail(record)">详情</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
<!--<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
<!--<a>删除</a>-->
<!--</a-popconfirm>-->
</span>
</a-table>
@ -160,20 +163,20 @@
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyOrdersModal from '../zyorders/modules/ZyOrdersModal'
import ZyOrdersModal from '@/views/zyorders/modules/ZyOrdersModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import Area from '@/components/_util/Area'
import { httpAction, getAction } from '@/api/manage'
export default {
name: 'ZyOrdersList',
name: 'ZyProductionOrderList',
mixins:[JeecgListMixin, mixinDevice],
components: {
ZyOrdersModal
},
data () {
return {
description: '订单基本信息管理管理页面',
description: '派单订单基本信息管理页面',
//
columns: [
{
@ -186,15 +189,15 @@
return parseInt(index)+1;
}
},
// {
// title:'',
// align:"center",
// dataIndex: 'ischild_dictText'
// },
{
title:'是否子单',
align:"center",
dataIndex: 'ischild_dictText'
},
{
title:'原订单',
title:'订单编号',
align:"center",
dataIndex: 'orderId_dictText'
dataIndex: 'ordersNum'
},
{
title:'下单时间',
@ -204,11 +207,11 @@
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'订单编号',
align:"center",
dataIndex: 'ordersNum'
},
// {
// title:'',
// align:"center",
// dataIndex: 'ordersNum'
// },
{
title:'总金额(元)',
align:"center",
@ -244,11 +247,11 @@
align:"center",
dataIndex: 'userId_dictText'
},
{
title:'商品条目数量',
align:"center",
dataIndex: 'goodsQuantity'
},
// {
// title:'',
// align:"center",
// dataIndex: 'goodsQuantity'
// },
{
title:'支付方式',
align:"center",
@ -368,12 +371,12 @@
}
],
url: {
list: "/zyorders/zyOrders/list",
list: "/workOrder/workOrder/productionlist",
delete: "/zyorders/zyOrders/delete",
deleteBatch: "/zyorders/zyOrders/deleteBatch",
exportXlsUrl: "/zyorders/zyOrders/exportXls",
importExcelUrl: "zyorders/zyOrders/importExcel",
chaidan:"/zyorders/zyOrders/chaidan",
paidan:"/workorder/workOrder/paidan",
},
dictOptions:{},
@ -391,19 +394,15 @@
},
},
methods: {
chaidan(record){
if(record.ischild===0){
getAction(this.url.chaidan,{id:record.id}).then((res) => {
if (res.success) {
this.$message.success("拆单成功!");
this.loadData();
}else{
this.$message.error(res.message);
}
})
}else{
this.$message.warning("该订单为子单,不可进行拆单!");
}
paidan(record){
getAction(this.url.paidan,{id:record.id}).then((res) => {
if (res.success) {
this.$message.success("派单成功!");
this.loadData();
}else{
this.$message.error(res.message);
}
})
},
getPcaText(code){
return this.pcaData.getText(code);

@ -93,22 +93,11 @@
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<!--<a @click="handleEdit(record)">编辑</a>-->
<!--<a-divider type="vertical" />-->
<a @click="handleDetail(record)">详情</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
@ -123,21 +112,21 @@
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import WorkOrderModal from './modules/WorkOrderModal'
import WorkOrderModal from '@/views/workorder/modules/WorkOrderModal'
export default {
name: 'WorkOrderList',
name: 'ZyWorkOrderList',
mixins:[JeecgListMixin, mixinDevice],
components: {
WorkOrderModal
},
data () {
return {
description: '工单订单完工管理页面',
description: '工单管理页面',
//
columns: [
{
title: '#',
title: '序号',
dataIndex: '',
key:'rowIndex',
width:60,
@ -147,39 +136,44 @@
}
},
{
title:'工单ID',
title:'工单编号',
align:"center",
dataIndex: 'workId'
dataIndex: 'productCode'
},
{
title:'工单编号',
title:'订单',
align:"center",
dataIndex: 'workCode'
dataIndex: 'ordersId'
},
{
title:'订单ID',
title:'订单商品',
align:"center",
dataIndex: 'orderId'
dataIndex: 'orderGoodsId'
},
{
title:'订单编号',
title:'商品数量',
align:"center",
dataIndex: 'orderCode'
dataIndex: 'goodsNum'
},
{
title:'客户ID',
title:'下单时间',
align:"center",
dataIndex: 'customerId'
dataIndex: 'orderTime'
},
{
title:'客户名称',
title:'交货期',
align:"center",
dataIndex: 'customerName'
dataIndex: 'deliveryTime'
},
{
title:'完工百分比',
title:'工单状态',
align:"center",
dataIndex: 'finished'
dataIndex: 'workOrderStatus_dictText'
},
{
title:'企业',
align:"center",
dataIndex: 'enterprisesId'
},
{
title: '操作',
@ -191,12 +185,12 @@
}
],
url: {
list: "/workorder/workOrder/list",
list: "/workorder/workOrder/workList",
delete: "/workorder/workOrder/delete",
deleteBatch: "/workorder/workOrder/deleteBatch",
exportXlsUrl: "/workorder/workOrder/exportXls",
importExcelUrl: "workorder/workOrder/importExcel",
},
dictOptions:{},
}

@ -18,7 +18,7 @@
// import ZyStyleAccessoriesForm from './ZyStyleAccessoriesForm'
import ZyAccessoriesList from "./ZyAccessoriesList";
import {postAction} from "../../../api/manage";
import {postAction} from "@/api/manage";
export default {
name: 'ZyStyleAccessoriesModal',

@ -15,7 +15,7 @@
<script>
import ZyFabricList from "./ZyFabricList";
import {postAction} from "../../../api/manage";
import {postAction} from "@/api/manage";
export default {
name: 'ZyStyleFabricModal',
components: {

@ -13,7 +13,7 @@
</template>
<script>
import {postAction} from "../../../api/manage";
import {postAction} from "@/api/manage";
import ZyProcessList from "./ZyProcessList";
export default {
name: 'ZyStyleModularModal',

@ -18,7 +18,7 @@
import ZyStyleModuleForm from './ZyStyleModuleForm'
import ZyClothsModularList from "./ZyClothsModularList";
import {postAction} from "../../../api/manage";
import {postAction} from "@/api/manage";
export default {
name: 'ZyStyleModuleModal',

@ -12,14 +12,25 @@ import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.workorder.entity.WorkOrder;
import org.jeecg.modules.workorder.service.IWorkOrderService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.demo.customermeasure.entity.CustomerMeasure;
import org.jeecg.modules.demo.customermeasure.service.ICustomerMeasureService;
import org.jeecg.modules.demo.ordergoods.entity.OrderGoods;
import org.jeecg.modules.demo.ordergoods.service.IOrderGoodsService;
import org.jeecg.modules.demo.zyorders.entity.ZyOrders;
import org.jeecg.modules.demo.zyorders.service.IZyOrdersService;
import org.jeecg.modules.workorder.entity.WorkOrder;
import org.jeecg.modules.workorder.service.IWorkOrderService;
import org.jeecg.modules.workproduct.entity.ZyProduct;
import org.jeecg.modules.workproduct.service.IZyProductService;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
import org.jeecg.modules.zystylemodel.service.IZyStyleModelService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
@ -39,17 +50,40 @@ import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 工单订单完工
* @Author: jeecg-boot
* @Date: 2021-11-12
* @Date: 2023-01-07
* @Version: V1.0
*/
@Api(tags="工单订单完工")
@RestController
@RequestMapping("/workorder/workOrder")
@RequestMapping("/workOrder/workOrder")
@Slf4j
public class WorkOrderController extends JeecgController<WorkOrder, IWorkOrderService> {
@Autowired
private IWorkOrderService workOrderService;
//订单
@Autowired
private IZyOrdersService zyOrdersService;
//订单商品
@Autowired
private IOrderGoodsService orderGoodsService;
//工单产品
@Autowired
private IZyProductService zyProductService;
//款式
@Autowired
private IZyClothsStyleService zyClothsStyleService;
//型号
@Autowired
private IZyStyleModelService zyStyleModelService;
//顾客测体
@Autowired
private ICustomerMeasureService customerMeasureService;
/**
* 分页列表查询
*
@ -69,7 +103,7 @@ public class WorkOrderController extends JeecgController<WorkOrder, IWorkOrderSe
QueryWrapper<WorkOrder> queryWrapper = QueryGenerator.initQueryWrapper(workOrder, req.getParameterMap());
Page<WorkOrder> page = new Page<WorkOrder>(pageNo, pageSize);
IPage<WorkOrder> pageList = workOrderService.page(page, queryWrapper);
return Result.ok(pageList);
return Result.OK(pageList);
}
/**
@ -83,7 +117,7 @@ public class WorkOrderController extends JeecgController<WorkOrder, IWorkOrderSe
@PostMapping(value = "/add")
public Result<?> add(@RequestBody WorkOrder workOrder) {
workOrderService.save(workOrder);
return Result.ok("添加成功!");
return Result.OK("添加成功!");
}
/**
@ -97,7 +131,7 @@ public class WorkOrderController extends JeecgController<WorkOrder, IWorkOrderSe
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody WorkOrder workOrder) {
workOrderService.updateById(workOrder);
return Result.ok("编辑成功!");
return Result.OK("编辑成功!");
}
/**
@ -111,7 +145,7 @@ public class WorkOrderController extends JeecgController<WorkOrder, IWorkOrderSe
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
workOrderService.removeById(id);
return Result.ok("删除成功!");
return Result.OK("删除成功!");
}
/**
@ -125,7 +159,7 @@ public class WorkOrderController extends JeecgController<WorkOrder, IWorkOrderSe
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.workOrderService.removeByIds(Arrays.asList(ids.split(",")));
return Result.ok("批量删除成功!");
return Result.OK("批量删除成功!");
}
/**
@ -142,7 +176,7 @@ public class WorkOrderController extends JeecgController<WorkOrder, IWorkOrderSe
if(workOrder==null) {
return Result.error("未找到对应数据");
}
return Result.ok(workOrder);
return Result.OK(workOrder);
}
/**
@ -168,4 +202,192 @@ public class WorkOrderController extends JeecgController<WorkOrder, IWorkOrderSe
return super.importExcel(request, response, WorkOrder.class);
}
////////////////////////////////////生产计划管理子计划-工单管理-工单列表/////////////////////////////////////////////
/**
* YU 0107
* 分页列表查询
*
* @param zyOrders
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "订单基本信息管理-分页列表查询")
@ApiOperation(value="订单基本信息管理-分页列表查询", notes="订单基本信息管理-分页列表查询")
@GetMapping(value = "/productionlist")
public Result<?> queryPageProductionList(ZyOrders zyOrders,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyOrders> queryWrapper = QueryGenerator.initQueryWrapper(zyOrders, req.getParameterMap());
Page<ZyOrders> page = new Page<ZyOrders>(pageNo, pageSize);
queryWrapper.eq("delivery_status",2);
IPage<ZyOrders> pageList = zyOrdersService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 工单管理-分页列表查询
*
* @param workOrder
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "工单管理-分页列表查询")
@ApiOperation(value="工单管理-分页列表查询", notes="工单管理工-分页列表查询")
@GetMapping(value = "/workList")
public Result<?> queryPageWorkList(WorkOrder workOrder,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<WorkOrder> queryWrapper = QueryGenerator.initQueryWrapper(workOrder, req.getParameterMap());
Page<WorkOrder> page = new Page<WorkOrder>(pageNo, pageSize);
IPage<WorkOrder> pageList = workOrderService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 派单讲订单转为工单
*
* @param
* @return
*/
@AutoLog(value = "派单")
@ApiOperation(value="派单", notes="派单")
@GetMapping(value = "/paidan")
public Result<?> paidan(@RequestParam(name="id",required=true) String id,HttpServletRequest req) {
ZyOrders zyOrders = zyOrdersService.getById(id);
if(zyOrders==null) {
return Result.error("未找到对应数据!");
}else{
//查找工单是否已有该订单,没有保存,有提示
if(zyOrders.getDeliveryStatus()==3){
return Result.error("该订单已经派单,请不要重复操作!");
}
else {//start for 1
//商品订单是否存在
QueryWrapper<OrderGoods> ogWrapper=new QueryWrapper<OrderGoods>();
ogWrapper.eq("orders_id",id);
List<OrderGoods> ogList=orderGoodsService.list(ogWrapper);
if(ogList.size()>0)
{//start if 02
// 保存工单
OrderGoods ogModel=ogList.get(0);
//服装款式
//QueryWrapper<ZyClothsStyle> csWrapper=new QueryWrapper<ZyClothsStyle>();
ZyClothsStyle csModel=zyClothsStyleService.getById(ogModel.getStyleId());
//服装型号
//QueryWrapper<ZyStyleModel> sm=new QueryWrapper<ZyStyleModel>();
ZyStyleModel smModel=zyStyleModelService.getById(ogModel.getModelId());
int goodNum=ogModel.getGoodsNum();
WorkOrder workOrder=new WorkOrder();
workOrder.setProductCode(CreateWorkCode(csModel.getNums(),smModel.getModelNumber()));//工单编号
workOrder.setOrdersId(id);//订单id
workOrder.setOrderGoodsId(ogModel.getId());// 订单商品
workOrder.setGoodsNum(goodNum);//商品数量
workOrder.setOrderTime(zyOrders.getOrderTime());//下单时间
workOrder.setDeliveryTime(zyOrders.getDeliveryTime());//交货期
workOrder.setWorkOrderStatus(0);//工单状态
//暂时存疑
//workOrder.setEnterprisesId();//企业id
workOrderService.save(workOrder);
//保存产品
if(ogModel.getGoodsNum()>0)
{
//量体数据
CustomerMeasure mesureModel=customerMeasureService.getById(ogModel.getMeasureId());
if(mesureModel==null) {
return Result.error("未找到对客户量体数据!");
}
for(int i=0;i<goodNum;i++)
{
ZyProduct productModel=new ZyProduct();
productModel.setProductCode(CreateProductCode(workOrder.getProductCode()));// 产品编号
productModel.setWorkOrderId(workOrder.getId());//_ 工单id
// productModel.setProduceTime("");// 生产时间
// productModel.setTotalManualTmu("");// 合计(手工TMU)
// productModel.setTotalMachineTmu("");// 合计(设备TMU)
// productModel.setTotalMaunal("");// 合计(手工秒)
// productModel.setTotalMachine("");// 合计(设备秒)
// productModel.setEnterprisesId("");//_id 企业id
productModel.setUserId(zyOrders.getUserId());//_id 用户id
// productModel.setStructureDiagram("");//_diagram 结构图
// productModel.setLayoutDiagram("");//_diagram 排料图
// productModel.setProductPicture("");//_picture 产品图片
productModel.setHeight(mesureModel.getHeight());// 身高
productModel.setWeight(mesureModel.getWeight());// 体重
productModel.setHem(mesureModel.getHem());// 下摆
productModel.setCuff(mesureModel.getCuff());// 袖口
productModel.setSleeveLength(mesureModel.getSleeveLength());//_length 袖长
productModel.setBust(mesureModel.getBust()) ;//胸围
productModel.setTheWaist(mesureModel.getTheWaist());//_waist 腰围
productModel.setShoulderwidth(mesureModel.getShoulderWidth());// width 肩宽
productModel.setForebodylength(mesureModel.getForebodyLength()) ;//length 前身长
productModel.setNeck(mesureModel.getNeck());// 领围
productModel.setHipline(mesureModel.getHipline());// 臀围
productModel.setLength(mesureModel.getLength());// 衣长
productModel.setSternalDistance(mesureModel.getSternalDistance());//distance 胸距
zyProductService.save(productModel);
}
}else
{
return Result.error("订单商品数量小于0!");
}
}else//end if 02
{
return Result.error("订单商品数据未找到!");
}
}//end for 1
}
return Result.OK("成功");
}
//生成工单编号
/**
*
* @param styleCode 款式编号
* @param modelCode 型号编号
* @return
*/
private String CreateWorkCode(String styleCode,String modelCode)
{//编号规则:款式编号(10)+型号(4)+顺序号(8)
String mrstr = "00000000";
int listsize = workOrderService.count();
int strsize = listsize+1;
String str = strsize+"";
int strlength = str.length();
String substr = mrstr.substring(0,mrstr.length()-strlength);
String workCode = styleCode+modelCode+substr+str;
return workCode;
}
/**
*
* @param workCode 工单编号
* @return
*/
private String CreateProductCode(String workCode)
{//编号规则:工单编号(22)+顺序号(8)
String mrstr = "00000000";
int listsize = zyProductService.count();
int strsize = listsize+1;
String str = strsize+"";
int strlength = str.length();
String substr = mrstr.substring(0,mrstr.length()-strlength);
String produceCode = workCode+substr+str;
return produceCode;
}
}

@ -20,7 +20,7 @@ import lombok.experimental.Accessors;
/**
* @Description: 工单订单完工
* @Author: jeecg-boot
* @Date: 2021-11-12
* @Date: 2023-01-07
* @Version: V1.0
*/
@Data
@ -34,52 +34,65 @@ public class WorkOrder implements Serializable {
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
private String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
private String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
private Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
private String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
private Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode;
/**工单ID*/
@Excel(name = "工单ID", width = 15)
@ApiModelProperty(value = "工单ID")
private java.lang.String workId;
private String sysOrgCode;
/**工单编号*/
@Excel(name = "工单编号", width = 15)
@ApiModelProperty(value = "工单编号")
private java.lang.String workCode;
/**订单ID*/
@Excel(name = "订单ID", width = 15)
@ApiModelProperty(value = "订单ID")
private java.lang.String orderId;
/**订单编号*/
@Excel(name = "订单编号", width = 15)
@ApiModelProperty(value = "订单编号")
private java.lang.String orderCode;
/**客户ID*/
@Excel(name = "客户ID", width = 15)
@ApiModelProperty(value = "客户ID")
private java.lang.String customerId;
/**客户名称*/
@Excel(name = "客户名称", width = 15)
@ApiModelProperty(value = "客户名称")
private java.lang.String customerName;
/**完工百分比*/
@Excel(name = "完工百分比", width = 15)
@ApiModelProperty(value = "完工百分比")
private java.lang.String finished;
private String productCode;
// /**订单*/
// @Excel(name = "订单", width = 15)
// @ApiModelProperty(value = "订单")
// private String ordersId;
/**原订单id*/
@Excel(name = "订单", width = 15)
@Dict(dictTable = "zy_orders", dicText = "orders_num", dicCode = "id")
@ApiModelProperty(value = "订单")
private java.lang.String ordersId;
/**订单商品*/
@Excel(name = "订单商品", width = 15)
@ApiModelProperty(value = "订单商品")
private String orderGoodsId;
/**商品数量*/
@Excel(name = "商品数量", width = 15)
@ApiModelProperty(value = "商品数量")
private Integer goodsNum;
/**下单时间*/
@Excel(name = "下单时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "下单时间")
private Date orderTime;
/**交货期*/
@Excel(name = "交货期", width = 15)
@ApiModelProperty(value = "交货期")
private Integer deliveryTime;
/**工单状态*/
@Excel(name = "工单状态", width = 15, dicCode = "work_order_status")
@Dict(dicCode = "work_order_status")
@ApiModelProperty(value = "工单状态")
private Integer workOrderStatus;
/**企业*/
@Excel(name = "企业", width = 15)
@ApiModelProperty(value = "企业")
private String enterprisesId;
}

@ -3,13 +3,13 @@ package org.jeecg.modules.workorder.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.workorder.entity.WorkOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.workorder.entity.WorkOrder;
/**
* @Description: 工单订单完工
* @Author: jeecg-boot
* @Date: 2021-11-12
* @Date: 2023-01-07
* @Version: V1.0
*/
public interface WorkOrderMapper extends BaseMapper<WorkOrder> {

@ -1,12 +1,13 @@
package org.jeecg.modules.workorder.service;
import org.jeecg.modules.workorder.entity.WorkOrder;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.workorder.entity.WorkOrder;
/**
* @Description: 工单订单完工
* @Author: jeecg-boot
* @Date: 2021-11-12
* @Date: 2023-01-07
* @Version: V1.0
*/
public interface IWorkOrderService extends IService<WorkOrder> {

@ -1,5 +1,6 @@
package org.jeecg.modules.workorder.service.impl;
import org.jeecg.modules.workorder.entity.WorkOrder;
import org.jeecg.modules.workorder.mapper.WorkOrderMapper;
import org.jeecg.modules.workorder.service.IWorkOrderService;
@ -10,7 +11,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 工单订单完工
* @Author: jeecg-boot
* @Date: 2021-11-12
* @Date: 2023-01-07
* @Version: V1.0
*/
@Service

@ -1,186 +0,0 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form :form="form" slot="detail">
<a-row>
<a-col :span="24">
<a-form-item label="工单ID" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['workId']" placeholder="请输入工单ID"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="工单编号" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['workCode']" placeholder="请输入工单编号"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="订单ID" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['orderId']" placeholder="请输入订单ID"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="订单编号" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['orderCode']" placeholder="请输入订单编号"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="客户ID" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['customerId']" placeholder="请输入客户ID"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="客户名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['customerName']" placeholder="请输入客户名称"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="完工百分比" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['finished']" placeholder="请输入完工百分比"></a-input>
</a-form-item>
</a-col>
<a-col v-if="showFlowSubmitButton" :span="24" style="text-align: center">
<a-button @click="submitForm"> </a-button>
</a-col>
</a-row>
</a-form>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import pick from 'lodash.pick'
import { validateDuplicateValue } from '@/utils/util'
import JFormContainer from '@/components/jeecg/JFormContainer'
export default {
name: 'WorkOrderForm',
components: {
JFormContainer,
},
props: {
//流程表单data
formData: {
type: Object,
default: ()=>{},
required: false
},
//表单模式:true流程表单 false普通表单
formBpm: {
type: Boolean,
default: false,
required: false
},
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
form: this.$form.createForm(this),
model: {},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/workorder/workOrder/add",
edit: "/workorder/workOrder/edit",
queryById: "/workorder/workOrder/queryById"
}
}
},
computed: {
formDisabled(){
if(this.formBpm===true){
if(this.formData.disabled===false){
return false
}
return true
}
return this.disabled
},
showFlowSubmitButton(){
if(this.formBpm===true){
if(this.formData.disabled===false){
return true
}
}
return false
}
},
created () {
//如果是流程中表单,则需要加载流程表单data
this.showFlowData();
},
methods: {
add () {
this.edit({});
},
edit (record) {
this.form.resetFields();
this.model = Object.assign({}, record);
this.visible = true;
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'workId','workCode','orderId','orderCode','customerId','customerName','finished'))
})
},
//渲染流程表单数据
showFlowData(){
if(this.formBpm === true){
let params = {id:this.formData.dataId};
getAction(this.url.queryById,params).then((res)=>{
if(res.success){
this.edit (res.result);
}
});
}
},
submitForm () {
const that = this;
// 触发表单验证
this.form.validateFields((err, values) => {
if (!err) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
let formData = Object.assign(this.model, values);
console.log("表单提交数据",formData)
httpAction(httpurl,formData,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
popupCallback(row){
this.form.setFieldsValue(pick(row,'workId','workCode','orderId','orderCode','customerId','customerName','finished'))
},
}
}
</script>

@ -0,0 +1,171 @@
package org.jeecg.modules.workproduct.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.workproduct.entity.ZyProduct;
import org.jeecg.modules.workproduct.service.IZyProductService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 产品表
* @Author: jeecg-boot
* @Date: 2023-01-07
* @Version: V1.0
*/
@Api(tags="产品表")
@RestController
@RequestMapping("/zyproduct/zyProduct")
@Slf4j
public class ZyProductController extends JeecgController<ZyProduct, IZyProductService> {
@Autowired
private IZyProductService zyProductService;
/**
* 分页列表查询
*
* @param zyProduct
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "产品表-分页列表查询")
@ApiOperation(value="产品表-分页列表查询", notes="产品表-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(ZyProduct zyProduct,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyProduct> queryWrapper = QueryGenerator.initQueryWrapper(zyProduct, req.getParameterMap());
Page<ZyProduct> page = new Page<ZyProduct>(pageNo, pageSize);
IPage<ZyProduct> pageList = zyProductService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param zyProduct
* @return
*/
@AutoLog(value = "产品表-添加")
@ApiOperation(value="产品表-添加", notes="产品表-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyProduct zyProduct) {
zyProductService.save(zyProduct);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param zyProduct
* @return
*/
@AutoLog(value = "产品表-编辑")
@ApiOperation(value="产品表-编辑", notes="产品表-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ZyProduct zyProduct) {
zyProductService.updateById(zyProduct);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "产品表-通过id删除")
@ApiOperation(value="产品表-通过id删除", notes="产品表-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
zyProductService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "产品表-批量删除")
@ApiOperation(value="产品表-批量删除", notes="产品表-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.zyProductService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "产品表-通过id查询")
@ApiOperation(value="产品表-通过id查询", notes="产品表-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
ZyProduct zyProduct = zyProductService.getById(id);
if(zyProduct==null) {
return Result.error("未找到对应数据");
}
return Result.OK(zyProduct);
}
/**
* 导出excel
*
* @param request
* @param zyProduct
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ZyProduct zyProduct) {
return super.exportXls(request, zyProduct, ZyProduct.class, "产品表");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, ZyProduct.class);
}
}

@ -0,0 +1,157 @@
package org.jeecg.modules.workproduct.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 产品表
* @Author: jeecg-boot
* @Date: 2023-01-07
* @Version: V1.0
*/
@Data
@TableName("zy_product")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="zy_product对象", description="产品表")
public class ZyProduct implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private String sysOrgCode;
/**产品编号*/
@Excel(name = "产品编号", width = 15)
@ApiModelProperty(value = "产品编号")
private String productCode;
/**工单*/
@Excel(name = "工单", width = 15)
@ApiModelProperty(value = "工单")
private String workOrderId;
/**生产时间*/
@Excel(name = "生产时间", width = 15)
@ApiModelProperty(value = "生产时间")
private Integer produceTime;
/**合计(手工TMU)*/
@Excel(name = "合计(手工TMU)", width = 15)
@ApiModelProperty(value = "合计(手工TMU)")
private Double totalManualTmu;
/**合计(设备TMU)*/
@Excel(name = "合计(设备TMU)", width = 15)
@ApiModelProperty(value = "合计(设备TMU)")
private Double totalMachineTmu;
/**合计(手工秒)*/
@Excel(name = "合计(手工秒)", width = 15)
@ApiModelProperty(value = "合计(手工秒)")
private Integer totalMaunal;
/**合计(设备秒)*/
@Excel(name = "合计(设备秒)", width = 15)
@ApiModelProperty(value = "合计(设备秒)")
private Integer totalMachine;
/**企业*/
@Excel(name = "企业", width = 15)
@ApiModelProperty(value = "企业")
private String enterprisesId;
/**用户*/
@Excel(name = "用户", width = 15)
@ApiModelProperty(value = "用户")
private String userId;
/**结构图*/
@Excel(name = "结构图", width = 15)
@ApiModelProperty(value = "结构图")
private String structureDiagram;
/**排料图*/
@Excel(name = "排料图", width = 15)
@ApiModelProperty(value = "排料图")
private String layoutDiagram;
/**产品图片*/
@Excel(name = "产品图片", width = 15)
@ApiModelProperty(value = "产品图片")
private String productPicture;
/**身高*/
@Excel(name = "身高", width = 15)
@ApiModelProperty(value = "身高")
private Double height;
/**体重*/
@Excel(name = "体重", width = 15)
@ApiModelProperty(value = "体重")
private Double weight;
/**下摆*/
@Excel(name = "下摆", width = 15)
@ApiModelProperty(value = "下摆")
private Double hem;
/**袖口*/
@Excel(name = "袖口", width = 15)
@ApiModelProperty(value = "袖口")
private Double cuff;
/**袖长*/
@Excel(name = "袖长", width = 15)
@ApiModelProperty(value = "袖长")
private Double sleeveLength;
/**胸围*/
@Excel(name = "胸围", width = 15)
@ApiModelProperty(value = "胸围")
private Double bust;
/**腰围*/
@Excel(name = "腰围", width = 15)
@ApiModelProperty(value = "腰围")
private Double theWaist;
/**肩宽*/
@Excel(name = "肩宽", width = 15)
@ApiModelProperty(value = "肩宽")
private Double shoulderwidth;
/**前身长*/
@Excel(name = "前身长", width = 15)
@ApiModelProperty(value = "前身长")
private Double forebodylength;
/**领围*/
@Excel(name = "领围", width = 15)
@ApiModelProperty(value = "领围")
private Double neck;
/**臀围*/
@Excel(name = "臀围", width = 15)
@ApiModelProperty(value = "臀围")
private Double hipline;
/**衣长*/
@Excel(name = "衣长", width = 15)
@ApiModelProperty(value = "衣长")
private Double length;
/**胸距*/
@Excel(name = "胸距", width = 15)
@ApiModelProperty(value = "胸距")
private Double sternalDistance;
}

@ -0,0 +1,17 @@
package org.jeecg.modules.workproduct.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.workproduct.entity.ZyProduct;
/**
* @Description: 产品表
* @Author: jeecg-boot
* @Date: 2023-01-07
* @Version: V1.0
*/
public interface ZyProductMapper extends BaseMapper<ZyProduct> {
}

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.workproduct.mapper.ZyProductMapper">
</mapper>

@ -0,0 +1,14 @@
package org.jeecg.modules.workproduct.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.workproduct.entity.ZyProduct;
/**
* @Description: 产品表
* @Author: jeecg-boot
* @Date: 2023-01-07
* @Version: V1.0
*/
public interface IZyProductService extends IService<ZyProduct> {
}

@ -0,0 +1,19 @@
package org.jeecg.modules.workproduct.service.impl;
import org.jeecg.modules.workproduct.entity.ZyProduct;
import org.jeecg.modules.workproduct.mapper.ZyProductMapper;
import org.jeecg.modules.workproduct.service.IZyProductService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 产品表
* @Author: jeecg-boot
* @Date: 2023-01-07
* @Version: V1.0
*/
@Service
public class ZyProductServiceImpl extends ServiceImpl<ZyProductMapper, ZyProduct> implements IZyProductService {
}
Loading…
Cancel
Save