| | |
| | | } |
| | | |
| | | const getReportData = () => { |
| | | if(props.childrenData.model!=null){ |
| | | request.post(`${props.childrenData.url}/${basicProp.value.pageNum}/${basicProp.value.pageSize}/${orderInfo.reportFormDate}/${props.childrenData.model}/${props.childrenData.scope}`,filterData.value).then(res => { |
| | | if(res.code === '200'){ |
| | | props.childrenData.data = res.data.data |
| | | basicProp.value.pageTotal = res.data.total.pageTotal |
| | | basicProp.value.dataTotal = res.data.total.total |
| | | orderInfo.reportFormDate = res.data.selectDate |
| | | } |
| | | }) |
| | | return |
| | | } |
| | | request.post(`${props.childrenData.url}/${basicProp.value.pageNum}/${basicProp.value.pageSize}/${orderInfo.reportFormDate}`,filterData.value).then(res => { |
| | | if(res.code === '200'){ |
| | | props.childrenData.data = res.data.data |
| | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="type" |
| | | <input type="text" |
| | | v-model="option.data" |
| | | @keyup.enter.native="$panel.confirmFilter()" |
| | | @input="changeFilterEvent($event, option, $panel)"/> |
| | |
| | | { |
| | | tid: '此面为室内面', title: '此面为室内面', data: '', type: 'text', |
| | | options: { |
| | | field: '', |
| | | title: '此面为室内面', |
| | | testData: '', |
| | | width:100, |
| | | height: 16, |
| | |
| | | { |
| | | tid: '此面为室外面', title: '此面为室外面', data: '', type: 'text', |
| | | options: { |
| | | field: '', |
| | | title: '此面为室外面', |
| | | testData: '', |
| | | width:100, |
| | | height: 16, |
| | |
| | | { |
| | | tid: 'custom1', title: '自定义1', data: '', type: 'text', |
| | | options: { |
| | | field: '', |
| | | title: '自定义1', |
| | | testData: '', |
| | | width:270, |
| | | height: 16, |
| | |
| | | { |
| | | tid: 'custom2', title: '自定义2', data: '', type: 'text', |
| | | options: { |
| | | field: '', |
| | | title: '自定义2', |
| | | testData: '', |
| | | width:270, |
| | | height: 16, |
| | |
| | | { |
| | | tid: 'custom3', title: '自定义3', data: '', type: 'text', |
| | | options: { |
| | | field: '', |
| | | title: '自定义3', |
| | | testData: '', |
| | | width:270, |
| | | height: 16, |
| | |
| | | { |
| | | tid: 'custom4', title: '自定义4', data: '', type: 'text', |
| | | options: { |
| | | field: 'custom4', |
| | | title: '自定义4', |
| | | testData: '', |
| | | width:270, |
| | | height: 16, |
| | |
| | | { |
| | | tid: 'custom5', title: '自定义5', data: '', type: 'text', |
| | | options: { |
| | | field: 'custom4', |
| | | title: '自定义5', |
| | | testData: '', |
| | | width:270, |
| | | height: 16, |
| | |
| | | TgaStyleSet.value.forEach(item => { |
| | | let para = { |
| | | text: item.title, |
| | | field: item.options.field |
| | | field: item.options.field || item.options.title |
| | | } |
| | | list.push(para) |
| | | }) |
| | |
| | | |
| | | const printOrder = (type) => { |
| | | const list = hiprintTemplate.value.getJson() |
| | | |
| | | console.log(list) |
| | | list.panels[0].printElements.forEach(element => { |
| | | element.options.fontFamily = 'Arial' |
| | | if(element.printElementType.title!==''){ |
| | |
| | | url :'/order/getOrderReport', |
| | | exportUrl :'/order/exportOrderReport', |
| | | exportName:t('order.orderDetailsReport'), |
| | | footList:['quantity','grossArea','computeGrossArea','perimeter','price','grossAmount','weight'] |
| | | }) |
| | | footList:['quantity','grossArea','computeGrossArea','perimeter','price','grossAmount','weight'], |
| | | model:0,//0:精确查询 1:模糊查询 |
| | | scope:10 |
| | | |
| | | }) |
| | | const changeModel = () => { |
| | | childrenData.value.model = childrenData.value.model === 0 ? 1 : 0 |
| | | } |
| | | |
| | | </script> |
| | | |
| | |
| | | <basic-table |
| | | :childrenData="childrenData"> |
| | | <template #buttons> |
| | | <el-button>模糊模式</el-button> |
| | | <el-input style="width: 100px" :value="10" :disabled="true"/> |
| | | <el-button |
| | | @click="changeModel" |
| | | type="primary" |
| | | > |
| | | {{childrenData.model === 0 ? '精确模式' : '模糊模式'}}</el-button> |
| | | <el-input |
| | | v-model="childrenData.scope" |
| | | type="number" |
| | | v-show="childrenData.model===1" |
| | | style="width: 140px;margin-left: 5px" |
| | | placeholder="玻璃尺寸范围"/> |
| | | </template> |
| | | |
| | | </basic-table> |
| | |
| | | |
| | | @SaCheckPermission("orderReport.search") |
| | | @ApiOperation("查询订单报表") |
| | | @PostMapping("/getOrderReport/{pageNum}/{pageSize}/{selectDate}") |
| | | @PostMapping("/getOrderReport/{pageNum}/{pageSize}/{selectDate}/{model}/{scope}") |
| | | public Result getOrderReport(@PathVariable Integer pageNum, |
| | | @PathVariable Integer pageSize, |
| | | @PathVariable List<String> selectDate, |
| | | @PathVariable Integer model,//0:精确查找,1:模糊查询 |
| | | @PathVariable Integer scope,//模糊范围 |
| | | @RequestBody OrderDetail orderDetail) { |
| | | return Result.seccess(orderService.getOrderReport(pageNum,pageSize,selectDate,orderDetail)); |
| | | return Result.seccess(orderService.getOrderReport(pageNum,pageSize,selectDate,orderDetail,model,scope)); |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | boolean updateOrderMoney( List<OrderDetail> orderDetails); |
| | | |
| | | List<OrderDetail> getOrderReport(Integer offset, Integer pageSize, String startDate, String endDate, OrderDetail orderDetail); |
| | | List<OrderDetail> getOrderReport(Integer offset, Integer pageSize, String startDate, String endDate, OrderDetail orderDetail, Integer model, Integer scope); |
| | | |
| | | //type为了区别需不需要根据产品分类 |
| | | Map<String,Integer> getOrderReportTotal(Integer offset, Integer pageSize, String startDate, String endDate, OrderDetail orderDetail, String type); |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.dto.sd.OrderDTO; |
| | | import com.example.erp.dto.sd.OrderDetailProductDTO; |
| | | import com.example.erp.dto.sd.OrderSearchDTO; |
| | | import com.example.erp.entity.sd.*; |
| | | import com.example.erp.entity.userInfo.Log; |
| | |
| | | import com.example.erp.mapper.sd.*; |
| | | import com.example.erp.service.userInfo.LogService; |
| | | import com.example.erp.service.userInfo.SysErrorService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.sql.SQLOutput; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static org.apache.coyote.http11.Constants.a; |
| | | |
| | | @Service |
| | | @DS("sd") |
| | |
| | | } |
| | | |
| | | |
| | | public Map<String,Object> getOrderReport(Integer pageNum, Integer pageSize, List<String> selectDate, OrderDetail orderDetail) { |
| | | public Map<String,Object> getOrderReport(Integer pageNum, Integer pageSize, List<String> selectDate, OrderDetail orderDetail, Integer model, Integer scope) { |
| | | Integer offset = (pageNum-1)*pageSize; |
| | | String endDate = LocalDate.now().toString(); |
| | | String startDate = LocalDate.now().minusDays(15).toString(); |
| | |
| | | endDate = selectDate.get(1); |
| | | } |
| | | } |
| | | |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("data",orderDetailMapper.getOrderReport(offset, pageSize, startDate, endDate, orderDetail)); |
| | | map.put("data",orderDetailMapper.getOrderReport(offset, pageSize, startDate, endDate, orderDetail,model,scope)); |
| | | map.put("total",orderDetailMapper.getOrderReportTotal(offset, pageSize, startDate, endDate, orderDetail,"order")); |
| | | List<String> list = new ArrayList<>(); |
| | | list.add(startDate); |
| | |
| | | and a.order_number like concat('%',#{orderDetail.orderNumber},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.width != null and orderDetail.width != ''"> |
| | | <if test="orderDetail.width != null and orderDetail.width != '' and model==0"> |
| | | and a.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','') |
| | | </if> |
| | | |
| | | <if test="orderDetail.height != null and orderDetail.height != ''"> |
| | | <if test="orderDetail.height != null and orderDetail.height != '' and model==0 "> |
| | | and a.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','') |
| | | </if> |
| | | |
| | | <if test="orderDetail.width != null and orderDetail.width != '' and model==1"> |
| | | and a.width >= REGEXP_REPLACE(#{orderDetail.width } - #{scope} ,'\\.0+$','') |
| | | and a.width <= REGEXP_REPLACE(#{orderDetail.width } + #{scope} ,'\\.0+$','') |
| | | |
| | | </if> |
| | | |
| | | <if test="orderDetail.height != null and orderDetail.height != '' and model==1 "> |
| | | and a.height > REGEXP_REPLACE(#{orderDetail.height } - #{scope} ,'\\.0+$','') |
| | | and a.height < REGEXP_REPLACE(#{orderDetail.height } + #{scope} ,'\\.0+$','') |
| | | </if> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <if test="orderDetail.quantity != null and orderDetail.quantity != ''"> |
| | | and a.quantity like concat('%',#{orderDetail.quantity},'%') |
| | | </if> |