| | |
| | | router.push({path: '/main/processCard/PrintFlowCard', query: {id: row.id}}) |
| | | break |
| | | } |
| | | case 'delete': { |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | |
| | | case 'setType': { |
| | | alert('我接收到子组件传送的排版状态') |
| | | break |
| | |
| | | } |
| | | }) |
| | | } else if (inputVal != null && selectState == 1) { |
| | | |
| | | //根据订单号查询未排产数据 |
| | | request.post(`/productionScheduling/selectScheduling/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | |
| | | {field: 'product_name', title: '产品名称', width: 140}, |
| | | {field: 'shape', title: '形状', width: 80}, |
| | | {field: 'notes', title: '备注', editRender: {name: 'input', attrs: {placeholder: ''}}, width: 120}, |
| | | {field: 'scheduling_id', title: '排产编号',width: 120}, |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | |
| | | }, |
| | | data: [],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = ['数量', '面积', '排产数量', '已排产数量', '已排产面积', '未排产数量', '未排产面积'] |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | | ] |
| | | } |
| | | // footerMethod({columns, data}) {//页脚函数 |
| | | // let footList = ['数量', '面积', '排产数量', '已排产数量', '已排产面积', '未排产数量', '未排产面积'] |
| | | // return [ |
| | | // columns.map((column, columnIndex) => { |
| | | // if (columnIndex === 0) { |
| | | // return '合计:' |
| | | // } |
| | | // if (footList.includes(column.field)) { |
| | | // return sumNum(data, column.field) |
| | | // } |
| | | // return '' |
| | | // }) |
| | | // ] |
| | | // } |
| | | |
| | | }) |
| | | |
| | | //删除 |
| | | |
| | | |
| | | const gridEvents = { |
| | | toolbarButtonClick({code}) { |
| | | async toolbarButtonClick({code}) { |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (code) { |
| | |
| | | processes: selectProcesses,//工序 |
| | | userName: username//审核人 |
| | | }) |
| | | console.log(schedulingData.value) |
| | | //保存排产数据 |
| | | request.post("/productionScheduling/addScheduling", schedulingData.value).then((res) => { |
| | | if (res.code == 200) { |
| | |
| | | location.reload(); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | |
| | | } |
| | | }) |
| | | |
| | | } |
| | | return; |
| | | |
| | | } |
| | | |
| | | case 'delete': { |
| | | const $table = xGrid.value |
| | | const selectRecords = $table.getCheckboxRecords() |
| | | if ($table) { |
| | | if (selectRecords.length == 0) { |
| | | ElMessage.warning("请勾选排产数据") |
| | | return; |
| | | } |
| | | const type = await VXETable.modal.confirm('您确定要删除该数据?') |
| | | if (type === 'confirm') { |
| | | //保存排产数据 |
| | | request.post("/productionScheduling/addScheduling").then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success("保存成功") |
| | | location.reload(); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | const $grid = xGrid.value |
| | | const table = $grid.getTableData().fullData |
| | | const selectRecords = $grid.getCheckboxRecords() |
| | | console.log(selectRecords) |
| | | table.forEach((selectRecords) => { |
| | | if (selectRecords.scheduling_quantity > selectRecords.pendingProductionQuantity) { |
| | | ElMessage.warning("排产数量不能大于待排产数量") |
| | |
| | | |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | </script> |
| | |
| | | |
| | | /> |
| | | |
| | | <el-input v-model="form.orderId" placeholder="销售单号" style="width: 110px"></el-input> |
| | | <el-input v-model="form.orderId" placeholder="销售单号" clearable style="width: 110px"></el-input> |
| | | |
| | | <el-select v-model="value" class="m-2" placeholder="工序" style="width: 90px;"> |
| | | <el-select v-model="value" class="m-2" placeholder="工序" clearable style="width: 90px;"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | |
| | | ref="xGrid" |
| | | class="mytable-scrollbar" |
| | | max-height="100%" |
| | | height="100%" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | @filter-change="filterChanged" |
| | |
| | | |
| | | #selectForm { |
| | | width: 70%; |
| | | height: 6%; |
| | | text-align: center; |
| | | } |
| | | </style> |
| | |
| | | |
| | | } |
| | | |
| | | //点击查询排版数据 |
| | | //点击查询排版数据(带订单号查询) |
| | | @PostMapping ("/selectSchedulingNot/{selectTime1}/{selectTime2}/{orderId}/{processes}/{state}") |
| | | public Result SelectSchedulingNot( |
| | | @PathVariable String selectTime1, |
| | |
| | | /*返工部分*/ |
| | | //返工班组 |
| | | private String reworkTeam; |
| | | //待返工数量 |
| | | private Integer waitReworkQuantity; |
| | | //返工审核状态 |
| | | private Integer reviewerState; |
| | | //返工审核人 |
| | |
| | | //带时间查询 |
| | | public Map<String, Object> SelectSchedulingSv(String selectTime1, String selectTime2, String orderId,String processes, Integer state, ProductionScheduling productionScheduling ) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if(orderId.equals("null")){ |
| | | orderId=""; |
| | | } |
| | | if (processes.equals("null")){ |
| | | |
| | | processes=""; |
| | | } |
| | | |
| | | if (state==2){//已排产 |
| | | map.put("data", productionSchedulingMapper.SelectOkSchedulingMp(selectTime1, selectTime2,orderId,processes, productionScheduling)); |
| | |
| | | <result column="processes" property="processes"/> |
| | | <result column="scheduling_quantity" property="schedulingQuantity"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | | <result column="scheduling_id" property="schedulingId"/> |
| | | <!--接收其他外键实体类数据--> |
| | | <association property="order" javaType="com.example.erp.entity.sd.Order"> |
| | | <result column="project" property="project"/> |
| | |
| | | od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity, |
| | | round(od.width*od.height*od.quantity/1000000,2) as area, |
| | | ps.scheduling_quantity, |
| | | (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity, |
| | | round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea, |
| | | # (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity, |
| | | # round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea, |
| | | IFNULL(ps.scheduling_quantity,0) as productionScheduledQuantity, |
| | | round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2) as productionScheduledArea, |
| | | IF(ps.review_status=0,"未审核","已审核") as review_status, |
| | | ps.reviewer, |
| | | od.product_name,od.shape |
| | | od.product_name,od.shape,ps.scheduling_id |
| | | from sd.order_detail as od |
| | | left join sd.order as o on od.order_id=o.order_id |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where ps.scheduling_id IS NOT NULL |
| | | and od.create_time between #{selectTime1} and #{selectTime2} |
| | | <if test="processes!=null and processes!=''"> |
| | | and ps.processes regexp #{processes} |
| | | </if> |
| | | |
| | | and position(#{processes} in ps.processes) |
| | | and position(#{orderId} in ps.order_id) |
| | | |
| | | </select> |
| | | |
| | |
| | | od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity, |
| | | round(od.width*od.height*od.quantity/1000000,2) as area, |
| | | ps.scheduling_quantity, |
| | | (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity, |
| | | round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea, |
| | | # (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity, |
| | | # round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea, |
| | | IFNULL(ps.scheduling_quantity,0) as productionScheduledQuantity, |
| | | round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2) as productionScheduledArea, |
| | | IF(ps.review_status=0,"未审核","已审核") as review_status, |
| | | ps.reviewer, |
| | | od.product_name,od.shape |
| | | od.product_name,od.shape,ps.scheduling_id |
| | | from sd.order_detail as od |
| | | left join sd.order as o on od.order_id=o.order_id |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where ps.scheduling_id IS NOT NULL |
| | | and od.order_id regexp #{orderId} |
| | | |
| | | <if test="processes!=null and processes!=''"> |
| | | and ps.processes regexp #{processes} |
| | | </if> |
| | | where (ps.scheduling_id IS NOT NULL ) |
| | | and position(#{processes} in ps.processes) |
| | | and position(#{orderId} in ps.order_id) |
| | | |
| | | </select> |
| | | <!-- 查询未排产数据--> |
| | |
| | | od.product_name,od.shape |
| | | from sd.order_detail as od left join sd.order as o on od.order_id=o.order_id |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where isnull(ps.scheduling_id) and od.create_time between #{selectTime1} and #{selectTime2} |
| | | <if test="orderId!=null and orderId!=''"> |
| | | and od.order_id regexp #{orderId} |
| | | where od.quantity-IFNULL(ps.scheduling_quantity,0)>0 and od.create_time between #{selectTime1} and #{selectTime2} |
| | | |
| | | </if> |
| | | and position(#{orderId} in ps.order_id) |
| | | group by od.order_id,od.order_number |
| | | </select> |
| | | <!-- 首次查询排产数据--> |
| | |
| | | od.product_name,od.shape |
| | | from sd.order_detail as od left join sd.order as o on od.order_id=o.order_id |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where od.create_time between #{selectTime1} and #{selectTime2} |
| | | where od.create_time between #{selectTime1} and #{selectTime2} and od.quantity-IFNULL(ps.scheduling_quantity,0)>0 |
| | | </select> |
| | | |
| | | <select id="selectMaxId"> |
| | |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | od.shape, |
| | | fc.quantity - IFNULL(fc.number_patches,0)-IFNULL(rwd.completed_quantity,0)-IFNULL(rwd.breakage_quantity,0)-IFNULL((rwd.breakage_quantity-rwd.rework_quantity),0) |
| | | fc.quantity - IFNULL(fc.number_patches,0)-IFNULL(rwd.completed_quantity,0)-IFNULL(rwd.breakage_quantity,0)-IFNULL((rwd.wait_rework_quantity),0) |
| | | as quantity |
| | | FROM |
| | | sd.order_detail AS od |
| | |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | od.shape, |
| | | reportingwork_num -IFNULL(rwd.completed_quantity,0)-IFNULL(rwd.breakage_quantity,0)-IFNULL((rwd.breakage_quantity-rwd.rework_quantity),0) as quantity |
| | | reportingwork_num -IFNULL(rwd.completed_quantity,0)-IFNULL(rwd.breakage_quantity,0)-IFNULL((rwd.wait_rework_quantity),0) as quantity |
| | | FROM sd.order_detail as od |
| | | left join sd.order_glass_detail as ogd |
| | | on od.order_id = ogd.order_id and od.order_number = ogd.order_number |
| | |
| | | <result column="processes" property="processes"/> |
| | | <result column="scheduling_quantity" property="schedulingQuantity"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | | <result column="scheduling_id" property="schedulingId"/> |
| | | <!--接收其他外键实体类数据--> |
| | | <association property="order" javaType="com.example.erp.entity.sd.Order"> |
| | | <result column="project" property="project"/> |
| | |
| | | od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity, |
| | | round(od.width*od.height*od.quantity/1000000,2) as area, |
| | | ps.scheduling_quantity, |
| | | (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity, |
| | | round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea, |
| | | # (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity, |
| | | # round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea, |
| | | IFNULL(ps.scheduling_quantity,0) as productionScheduledQuantity, |
| | | round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2) as productionScheduledArea, |
| | | IF(ps.review_status=0,"未审核","已审核") as review_status, |
| | | ps.reviewer, |
| | | od.product_name,od.shape |
| | | od.product_name,od.shape,ps.scheduling_id |
| | | from sd.order_detail as od |
| | | left join sd.order as o on od.order_id=o.order_id |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where ps.scheduling_id IS NOT NULL |
| | | and od.create_time between #{selectTime1} and #{selectTime2} |
| | | <if test="processes!=null and processes!=''"> |
| | | and ps.processes regexp #{processes} |
| | | </if> |
| | | |
| | | and position(#{processes} in ps.processes) |
| | | and position(#{orderId} in ps.order_id) |
| | | |
| | | </select> |
| | | |
| | |
| | | od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity, |
| | | round(od.width*od.height*od.quantity/1000000,2) as area, |
| | | ps.scheduling_quantity, |
| | | (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity, |
| | | round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea, |
| | | # (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity, |
| | | # round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea, |
| | | IFNULL(ps.scheduling_quantity,0) as productionScheduledQuantity, |
| | | round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2) as productionScheduledArea, |
| | | IF(ps.review_status=0,"未审核","已审核") as review_status, |
| | | ps.reviewer, |
| | | od.product_name,od.shape |
| | | od.product_name,od.shape,ps.scheduling_id |
| | | from sd.order_detail as od |
| | | left join sd.order as o on od.order_id=o.order_id |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where ps.scheduling_id IS NOT NULL |
| | | and od.order_id regexp #{orderId} |
| | | |
| | | <if test="processes!=null and processes!=''"> |
| | | and ps.processes regexp #{processes} |
| | | </if> |
| | | where (ps.scheduling_id IS NOT NULL ) |
| | | and position(#{processes} in ps.processes) |
| | | and position(#{orderId} in ps.order_id) |
| | | |
| | | </select> |
| | | <!-- 查询未排产数据--> |
| | |
| | | od.product_name,od.shape |
| | | from sd.order_detail as od left join sd.order as o on od.order_id=o.order_id |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where isnull(ps.scheduling_id) and od.create_time between #{selectTime1} and #{selectTime2} |
| | | <if test="orderId!=null and orderId!=''"> |
| | | and od.order_id regexp #{orderId} |
| | | where od.quantity-IFNULL(ps.scheduling_quantity,0)>0 and od.create_time between #{selectTime1} and #{selectTime2} |
| | | |
| | | </if> |
| | | and position(#{orderId} in ps.order_id) |
| | | group by od.order_id,od.order_number |
| | | </select> |
| | | <!-- 首次查询排产数据--> |
| | |
| | | od.product_name,od.shape |
| | | from sd.order_detail as od left join sd.order as o on od.order_id=o.order_id |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where od.create_time between #{selectTime1} and #{selectTime2} |
| | | where od.create_time between #{selectTime1} and #{selectTime2} and od.quantity-IFNULL(ps.scheduling_quantity,0)>0 |
| | | </select> |
| | | |
| | | <select id="selectMaxId"> |
| | |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | od.shape, |
| | | fc.quantity - IFNULL(fc.number_patches,0)-IFNULL(rwd.completed_quantity,0)-IFNULL(rwd.breakage_quantity,0)-IFNULL((rwd.breakage_quantity-rwd.rework_quantity),0) |
| | | fc.quantity - IFNULL(fc.number_patches,0)-IFNULL(rwd.completed_quantity,0)-IFNULL(rwd.breakage_quantity,0)-IFNULL((rwd.wait_rework_quantity),0) |
| | | as quantity |
| | | FROM |
| | | sd.order_detail AS od |
| | |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | od.shape, |
| | | reportingwork_num -IFNULL(rwd.completed_quantity,0)-IFNULL(rwd.breakage_quantity,0)-IFNULL((rwd.breakage_quantity-rwd.rework_quantity),0) as quantity |
| | | reportingwork_num -IFNULL(rwd.completed_quantity,0)-IFNULL(rwd.breakage_quantity,0)-IFNULL((rwd.wait_rework_quantity),0) as quantity |
| | | FROM sd.order_detail as od |
| | | left join sd.order_glass_detail as ogd |
| | | on od.order_id = ogd.order_id and od.order_number = ogd.order_number |