| | |
| | | add:'Add', |
| | | delete:'Delete', |
| | | edit:'Edit', |
| | | cancel:'cancel', |
| | | restore:'restore', |
| | | selectSame:'Select same', |
| | | sameAfterwards:'Same afterwards', |
| | | clearSelection:'Clear selection', |
| | |
| | | importMaxCheckFailFirst:'Import ', |
| | | importMaxCheckFailMid:' the data can not exceed ', |
| | | importMaxCheckFailLast:' pieces, please import in multiple orders', |
| | | updateAmountSuccessfully:'Updated amount successfully' |
| | | updateAmountSuccessfully:'Updated amount successfully', |
| | | updateOrderState:'Order status update succeeded', |
| | | } |
| | | |
| | | }, |
| | |
| | | add:'添加', |
| | | delete:'删除', |
| | | edit:'编辑', |
| | | cancel:'作废', |
| | | restore:'还原', |
| | | selectSame:'选中相同', |
| | | sameAfterwards:'之后相同', |
| | | clearSelection:'清除选中', |
| | |
| | | importMaxCheckFailFirst:'导入', |
| | | importMaxCheckFailMid:'条,$数据不能超过', |
| | | importMaxCheckFailLast:'条,请分订单导入', |
| | | updateAmountSuccessfully:'更新金额成功' |
| | | updateAmountSuccessfully:'更新金额成功', |
| | | updateOrderState:'更新订单状态成功', |
| | | } |
| | | |
| | | }, |
| | |
| | | reviewOrder(0) |
| | | break |
| | | } |
| | | case 'cancelOrder':{ |
| | | cancelOrder() |
| | | break |
| | | } |
| | | case 'saveOrder': { |
| | | if ($grid.getTableData().tableData.length === 0){ |
| | | ElMessage.error( t('order.msg.tableLengthNot')) |
| | |
| | | } |
| | | |
| | | //按钮审核过后变为反审 |
| | | if(res.data.order.orderReview === 2){ |
| | | if(Math.abs(res.data.order.orderReview) === 2){ |
| | | gridOptions.toolbarConfig.buttons[2].disabled = false |
| | | gridOptions.toolbarConfig.buttons[2].code='reviews' |
| | | gridOptions.toolbarConfig.buttons[2].name=t('basicData.cancelReview') |
| | | gridOptions.toolbarConfig.buttons[3].disabled = false |
| | | const button = {'code': 'cancelOrder', |
| | | status: 'primary', |
| | | 'name': (res.data.order.orderReview>0?t('basicData.cancel'):t('basicData.restore'))} |
| | | gridOptions.toolbarConfig.buttons.push(button) |
| | | } |
| | | if(res.data.order.productionOrder !==0 ){ |
| | | gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | |
| | | } |
| | | |
| | | //加载副表数据 |
| | |
| | | }) |
| | | }) |
| | | |
| | | const cancelOrder = () => { |
| | | request.post(`/order/cancelOrder/${titleUploadData.value.orderId}`).then((res) =>{ |
| | | if (res.code== 200){ |
| | | ElMessage.success(t('order.msg.updateOrderState')) |
| | | router.push({path:'/main/order/createOrder',query:{orderId:titleUploadData.value.orderId,random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.error(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | //页面第一次加载执行 |
| | | request.get(`/basicData/orderBasicData`).then((res) => { |
| | | |
| | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">{{ $t('basicData.edit') }}</el-button> |
| | | <el-popconfirm @confirm="getTableRow(row,'delete')" :title="$t('basicData.deleteConfirm')"> |
| | | <el-popconfirm @confirm="getTableRow(row,'delete')" :title="$t('searchOrder.deleteConfirm')"> |
| | | <template #reference> |
| | | <el-button link type="primary" size="small">{{ $t('basicData.delete') }}</el-button> |
| | | </template> |
| | |
| | | {field: 'process',width:120, title: t('craft.process'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'icon',width:120, title: t('order.icon'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'orderDetail.processingNote',width:120, title: t('order.processingNote'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'orderDetail.remarks',width:120, title: t('order.remarks'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'orderDetail.remarks',width:120, title: t('basicData.remarks'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'orderDetail.edgingType',width:120, title: t('order.edgingType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged} |
| | | ],//表头按钮 |
| | | mergeCells: [ |
| | | /*{ row: 0, col: 1, rowspan: 4, colspan: 1 }, |
| | | { row: 0, col: 2, rowspan: 4, colspan: 1 }, |
| | | { row: 0, col: 4, rowspan: 4, colspan: 1 }, |
| | | { row: 0, col: 5, rowspan: 4, colspan: 1 }, |
| | | { row: 0, col: 6, rowspan: 4, colspan: 1 }, |
| | | { row: 0, col: 7, rowspan: 4, colspan: 1 }, |
| | | { row: 0, col: 8, rowspan: 4, colspan: 1 },*/ |
| | | // { row: 0, col: 1, rowspan: 4, colspan: 1 }, |
| | | // { row: 0, col: 2, rowspan: 4, colspan: 1 }, |
| | | // { row: 0, col: 4, rowspan: 4, colspan: 1 }, |
| | | // { row: 0, col: 5, rowspan: 4, colspan: 1 }, |
| | | // { row: 0, col: 6, rowspan: 4, colspan: 1 }, |
| | | // { row: 0, col: 7, rowspan: 4, colspan: 1 }, |
| | | // { row: 0, col: 8, rowspan: 4, colspan: 1 }, |
| | | ], |
| | | toolbarConfig: { |
| | | buttons: [ |
| | |
| | | public Result deleteOrder(@PathVariable String id) { |
| | | return Result.seccess(orderService.deleteOrder(id)); |
| | | } |
| | | |
| | | @ApiOperation("订单作废") |
| | | @PostMapping("/cancelOrder/{id}") |
| | | public Result cancelOrder(@PathVariable String id) { |
| | | return Result.seccess(orderService.cancelOrder(id)); |
| | | } |
| | | |
| | | @ApiOperation("根据id获取订单信息") |
| | | @PostMapping("/getOrderById/{id}") |
| | | public Result getOrderById(@PathVariable String id) { |
| | |
| | | boolean reviewProcessById(String id, Integer status); |
| | | |
| | | boolean updateMoney(@Param("order") Order order); |
| | | |
| | | Integer cancelOrder(String id); |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | public Integer cancelOrder(String id) { |
| | | return orderMapper.cancelOrder(id); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | pd.glass_sort, |
| | | if(pd.glass_sort=1,'(外)',if(pd2.glass_sort=pd.glass_sort,'(内)','')), |
| | | pd.detail, |
| | | od.width, |
| | | if( od.bend_radius!='', |
| | | round(od.width*(od.bend_radius-round(sum(t.thicknessCount),2))/od.bend_radius,0), |
| | | od.width |
| | | ), |
| | | od.height, |
| | | od.area, |
| | | od.gross_area, |
| | |
| | | on od.product_id = pd.prod_id and pd.detail_type='glass' |
| | | LEFT JOIN (SELECT max(id) as id ,max(glass_sort) as glass_sort from product_detail GROUP BY prod_id)as pd2 |
| | | on pd2.id=pd.id |
| | | left join ( |
| | | select |
| | | a.prod_id, |
| | | a.sort_num, |
| | | a.glass_sort, |
| | | (case |
| | | when a.sort_num=1 |
| | | then left(detail,LOCATE('mm',detail)-1)/2 |
| | | else |
| | | left(detail,LOCATE('mm',detail)-1) |
| | | end) as 'thicknessCount' |
| | | |
| | | from product_detail as a |
| | | group by prod_id,a.sort_num |
| | | ) as t |
| | | ON t.prod_id = od.product_id and t.sort_num <=pd.sort_num |
| | | |
| | | |
| | | where od.order_id = #{orderId} |
| | | group by od.order_number,pd.glass_sort |
| | | ORDER BY od.order_number |
| | | </insert> |
| | | |
| | |
| | | update `order` set money = #{order.money} where order_id = #{order.orderId} |
| | | </update> |
| | | |
| | | <update id="cancelOrder"> |
| | | update `order` as a set |
| | | a.create_order = - a.create_order, |
| | | a.process_review = - a.process_review, |
| | | a.order_review = - a.order_review, |
| | | a.production_order = - a.production_order, |
| | | a.processing_card = - a.processing_card, |
| | | a.warehousing = - a.warehousing, |
| | | a.delivery = - a.delivery |
| | | where order_id = #{order.orderId} |
| | | </update> |
| | | |
| | | </mapper> |
| | |
| | | pd.glass_sort, |
| | | if(pd.glass_sort=1,'(外)',if(pd2.glass_sort=pd.glass_sort,'(内)','')), |
| | | pd.detail, |
| | | od.width, |
| | | if( od.bend_radius!='', |
| | | round(od.width*(od.bend_radius-round(sum(t.thicknessCount),2))/od.bend_radius,0), |
| | | od.width |
| | | ), |
| | | od.height, |
| | | od.area, |
| | | od.gross_area, |
| | |
| | | on od.product_id = pd.prod_id and pd.detail_type='glass' |
| | | LEFT JOIN (SELECT max(id) as id ,max(glass_sort) as glass_sort from product_detail GROUP BY prod_id)as pd2 |
| | | on pd2.id=pd.id |
| | | left join ( |
| | | select |
| | | a.prod_id, |
| | | a.sort_num, |
| | | a.glass_sort, |
| | | (case |
| | | when a.sort_num=1 |
| | | then left(detail,LOCATE('mm',detail)-1)/2 |
| | | else |
| | | left(detail,LOCATE('mm',detail)-1) |
| | | end) as 'thicknessCount' |
| | | |
| | | from product_detail as a |
| | | group by prod_id,a.sort_num |
| | | ) as t |
| | | ON t.prod_id = od.product_id and t.sort_num <=pd.sort_num |
| | | |
| | | |
| | | where od.order_id = #{orderId} |
| | | group by od.order_number,pd.glass_sort |
| | | ORDER BY od.order_number |
| | | </insert> |
| | | |
| | |
| | | update `order` set money = #{order.money} where order_id = #{order.orderId} |
| | | </update> |
| | | |
| | | <update id="cancelOrder"> |
| | | update `order` as a set |
| | | a.create_order = - a.create_order, |
| | | a.process_review = - a.process_review, |
| | | a.order_review = - a.order_review, |
| | | a.production_order = - a.production_order, |
| | | a.processing_card = - a.processing_card, |
| | | a.warehousing = - a.warehousing, |
| | | a.delivery = - a.delivery |
| | | where order_id = #{order.orderId} |
| | | </update> |
| | | |
| | | </mapper> |