修改dfArea表名称

master
username 1 year ago
parent 6a4e221f76
commit 201630f861

@ -15,8 +15,8 @@ import com.bs.df.service.IDfBrokerProductService;
import com.bs.df.service.IDfBrokerService; import com.bs.df.service.IDfBrokerService;
import com.bs.df.service.IDfProductPosterService; import com.bs.df.service.IDfProductPosterService;
import com.bs.df.utils.HtmlUtils; import com.bs.df.utils.HtmlUtils;
import com.bs.system.domain.DouArea; import com.bs.system.domain.DfArea;
import com.bs.system.service.IDouAreaService; import com.bs.system.service.IDfAreaService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
@ -56,7 +56,7 @@ public class DfProductInfoController extends BaseController {
@Resource @Resource
private IDfProductPosterService dfProductPosterService; private IDfProductPosterService dfProductPosterService;
@Resource @Resource
private IDouAreaService douAreaService; private IDfAreaService dfAreaService;
@Resource @Resource
private IDfBrokerProductService dfBrokerProductService; private IDfBrokerProductService dfBrokerProductService;
@Resource @Resource
@ -79,8 +79,8 @@ public class DfProductInfoController extends BaseController {
condition(queryWrapper,dfProductInfo); condition(queryWrapper,dfProductInfo);
List<DfProductInfo> list = dfProductInfoService.list(queryWrapper); List<DfProductInfo> list = dfProductInfoService.list(queryWrapper);
Map<String, String> cityMap = new HashMap<>(); Map<String, String> cityMap = new HashMap<>();
List<DouArea> allCities = douAreaService.list(); List<DfArea> allCities = dfAreaService.list();
for (DouArea city : allCities) { for (DfArea city : allCities) {
cityMap.put(city.getAreaId(), city.getName()); cityMap.put(city.getAreaId(), city.getName());
} }
Map<Long, String> brokerProductMap = new HashMap<>(); Map<Long, String> brokerProductMap = new HashMap<>();
@ -150,8 +150,8 @@ public class DfProductInfoController extends BaseController {
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, DfProductInfo dfProductInfo) { public void export(HttpServletResponse response, DfProductInfo dfProductInfo) {
Map<String, String> cityMap = new HashMap<>(); Map<String, String> cityMap = new HashMap<>();
List<DouArea> allCities = douAreaService.list(); List<DfArea> allCities = dfAreaService.list();
for (DouArea city : allCities) { for (DfArea city : allCities) {
cityMap.put(city.getAreaId(), city.getName()); cityMap.put(city.getAreaId(), city.getName());
} }
Map<Long, String> brokerProductMap = new HashMap<>(); Map<Long, String> brokerProductMap = new HashMap<>();
@ -212,9 +212,9 @@ public class DfProductInfoController extends BaseController {
return success(byId); return success(byId);
} }
List<String> businessCityList = Arrays.asList(businessCity.split(",")); List<String> businessCityList = Arrays.asList(businessCity.split(","));
List<DouArea> douAreas = douAreaService.listByIds(businessCityList); List<DfArea> douAreas = dfAreaService.listByIds(businessCityList);
String concatenatedNames = douAreas.stream() String concatenatedNames = douAreas.stream()
.map(DouArea::getName) .map(DfArea::getName)
.collect(Collectors.joining(",")); .collect(Collectors.joining(","));
byId.setBusinessCityByName(concatenatedNames); byId.setBusinessCityByName(concatenatedNames);
return success(byId); return success(byId);

@ -23,33 +23,33 @@ import com.bs.common.enums.BusinessType;
import com.bs.common.utils.poi.ExcelUtil; import com.bs.common.utils.poi.ExcelUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import cn.hutool.core.lang.Validator; import cn.hutool.core.lang.Validator;
import com.bs.system.domain.DouArea; import com.bs.system.domain.DfArea;
import com.bs.system.service.IDouAreaService; import com.bs.system.service.IDfAreaService;
import javax.annotation.Resource; import javax.annotation.Resource;
/** /**
* Controller * Controller
* *
* @author bs * @author bs
* @date 2024-04-08 * @date 2024-04-13
*/ */
@Api(tags = "全国城市") @Api(tags = "全国城市")
@RestController @RestController
@RequestMapping("/system/area") @RequestMapping("/system/area")
public class DouAreaController extends BaseController { public class DfAreaController extends BaseController {
@Resource @Resource
private IDouAreaService douAreaService; private IDfAreaService dfAreaService;
/** /**
* *
*/ */
@ApiOperation("分页查询全国城市列表") @ApiOperation("分页查询全国城市列表")
@GetMapping("/pageList") @GetMapping("/pageList")
public TableDataInfo pageList(DouArea douArea) { public TableDataInfo pageList(DfArea dfArea) {
startPage(); startPage();
LambdaQueryWrapper<DouArea> queryWrapper = new LambdaQueryWrapper(); LambdaQueryWrapper<DfArea> queryWrapper = new LambdaQueryWrapper();
condition(queryWrapper,douArea); condition(queryWrapper,dfArea);
List<DouArea> list = douAreaService.list(queryWrapper); List<DfArea> list = dfAreaService.list(queryWrapper);
return getDataTable(list); return getDataTable(list);
} }
@ -58,10 +58,10 @@ public class DouAreaController extends BaseController {
*/ */
@ApiOperation("查询全国城市列表") @ApiOperation("查询全国城市列表")
@GetMapping("/list") @GetMapping("/list")
public AjaxResult list(DouArea douArea) { public AjaxResult list(DfArea dfArea) {
LambdaQueryWrapper<DouArea> queryWrapper = new LambdaQueryWrapper(); LambdaQueryWrapper<DfArea> queryWrapper = new LambdaQueryWrapper();
condition(queryWrapper,douArea); condition(queryWrapper,dfArea);
List<DouArea> list = douAreaService.list(queryWrapper); List<DfArea> list = dfAreaService.list(queryWrapper);
return success(list); return success(list);
} }
@ -71,11 +71,11 @@ public class DouAreaController extends BaseController {
@ApiOperation("导出全国城市列表") @ApiOperation("导出全国城市列表")
@Log(title = "全国城市导出", businessType = BusinessType.EXPORT) @Log(title = "全国城市导出", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, DouArea douArea) { public void export(HttpServletResponse response, DfArea dfArea) {
LambdaQueryWrapper<DouArea> queryWrapper = new LambdaQueryWrapper(); LambdaQueryWrapper<DfArea> queryWrapper = new LambdaQueryWrapper();
condition(queryWrapper,douArea); condition(queryWrapper,dfArea);
List<DouArea> list = douAreaService.list(queryWrapper); List<DfArea> list = dfAreaService.list(queryWrapper);
ExcelUtil<DouArea> util = new ExcelUtil<DouArea>(DouArea. class); ExcelUtil<DfArea> util = new ExcelUtil<DfArea>(DfArea. class);
util.exportExcel(response, list, "全国城市数据"); util.exportExcel(response, list, "全国城市数据");
} }
@ -85,7 +85,7 @@ public class DouAreaController extends BaseController {
@ApiOperation("获取全国城市详细信息") @ApiOperation("获取全国城市详细信息")
@GetMapping(value = "/{areaId}") @GetMapping(value = "/{areaId}")
public AjaxResult getInfo(@PathVariable("areaId") String areaId) { public AjaxResult getInfo(@PathVariable("areaId") String areaId) {
return success(douAreaService.getById(areaId)); return success(dfAreaService.getById(areaId));
} }
/** /**
@ -94,8 +94,8 @@ public class DouAreaController extends BaseController {
@ApiOperation("新增全国城市") @ApiOperation("新增全国城市")
@Log(title = "全国城市新增", businessType = BusinessType.INSERT) @Log(title = "全国城市新增", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody DouArea douArea) { public AjaxResult add(@RequestBody DfArea dfArea) {
return toAjax(douAreaService.save(douArea)); return toAjax(dfAreaService.save(dfArea));
} }
/** /**
@ -104,8 +104,8 @@ public class DouAreaController extends BaseController {
@ApiOperation("修改全国城市") @ApiOperation("修改全国城市")
@Log(title = "全国城市修改", businessType = BusinessType.UPDATE) @Log(title = "全国城市修改", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody DouArea douArea) { public AjaxResult edit(@RequestBody DfArea dfArea) {
return toAjax(douAreaService.updateById(douArea)); return toAjax(dfAreaService.updateById(dfArea));
} }
/** /**
@ -115,28 +115,63 @@ public class DouAreaController extends BaseController {
@Log(title = "全国城市删除", businessType = BusinessType.DELETE) @Log(title = "全国城市删除", businessType = BusinessType.DELETE)
@DeleteMapping("/{areaIds}") @DeleteMapping("/{areaIds}")
public AjaxResult remove(@PathVariable List<Long> areaIds) { public AjaxResult remove(@PathVariable List<Long> areaIds) {
return toAjax(douAreaService.removeBatchByIds(areaIds)); return toAjax(dfAreaService.removeBatchByIds(areaIds));
} }
/** /**
* *
*/ */
private void condition (LambdaQueryWrapper<DouArea> queryWrapper,DouArea douArea){ private void condition (LambdaQueryWrapper<DfArea> queryWrapper,DfArea dfArea){
//${column.columnComment} //${column.columnComment}
if(Validator.isNotEmpty(douArea.getAreaId())){ if(Validator.isNotEmpty(dfArea.getAreaId())){
queryWrapper.eq(DouArea::getAreaId,douArea.getAreaId()); queryWrapper.eq(DfArea::getAreaId,dfArea.getAreaId());
} }
//${column.columnComment} //${column.columnComment}
if(Validator.isNotEmpty(douArea.getParentId())){ if(Validator.isNotEmpty(dfArea.getParentId())){
queryWrapper.eq(DouArea::getParentId,douArea.getParentId()); queryWrapper.eq(DfArea::getParentId,dfArea.getParentId());
} }
//${column.columnComment} //${column.columnComment}
if(Validator.isNotEmpty(douArea.getName())){ if(Validator.isNotEmpty(dfArea.getName())){
queryWrapper.eq(DouArea::getName,douArea.getName()); queryWrapper.eq(DfArea::getName,dfArea.getName());
}
//${column.columnComment}
if(Validator.isNotEmpty(dfArea.getTenantId())){
queryWrapper.eq(DfArea::getTenantId,dfArea.getTenantId());
}
//${column.columnComment}
if(Validator.isNotEmpty(dfArea.getCreateDept())){
queryWrapper.eq(DfArea::getCreateDept,dfArea.getCreateDept());
}
//${column.columnComment}
if(Validator.isNotEmpty(dfArea.getCreateBy())){
queryWrapper.eq(DfArea::getCreateBy,dfArea.getCreateBy());
}
//${column.columnComment}
if(Validator.isNotEmpty(dfArea.getCreateTime())){
queryWrapper.eq(DfArea::getCreateTime,dfArea.getCreateTime());
}
//${column.columnComment}
if(Validator.isNotEmpty(dfArea.getUpdateBy())){
queryWrapper.eq(DfArea::getUpdateBy,dfArea.getUpdateBy());
}
//${column.columnComment}
if(Validator.isNotEmpty(dfArea.getUpdateTime())){
queryWrapper.eq(DfArea::getUpdateTime,dfArea.getUpdateTime());
}
//${column.columnComment}
if(Validator.isNotEmpty(dfArea.getDelFlag())){
queryWrapper.eq(DfArea::getDelFlag,dfArea.getDelFlag());
} }
} }

@ -12,16 +12,16 @@ import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
/** /**
* dou_area * df_area
* *
* @author bs * @author bs
* @date 2024-04-08 * @date 2024-04-13
*/ */
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Accessors(chain = true) @Accessors(chain = true)
@TableName("dou_area") @TableName("df_area")
@Data @Data
public class DouArea extends BaseEntity{ public class DfArea extends BaseEntity{
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** $column.columnComment */ /** $column.columnComment */

@ -1,14 +1,14 @@
package com.bs.system.mapper; package com.bs.system.mapper;
import com.bs.common.mybatis.mapper.BaseMapperX; import com.bs.common.mybatis.mapper.BaseMapperX;
import com.bs.system.domain.DouArea; import com.bs.system.domain.DfArea;
/** /**
* Mapper * Mapper
* *
* @author bs * @author bs
* @date 2024-04-08 * @date 2024-04-13
*/ */
public interface DouAreaMapper extends BaseMapperX<DouArea> { public interface DfAreaMapper extends BaseMapperX<DfArea> {
} }

@ -1,14 +1,14 @@
package com.bs.system.service; package com.bs.system.service;
import com.github.yulichang.base.MPJBaseService; import com.github.yulichang.base.MPJBaseService;
import com.bs.system.domain.DouArea; import com.bs.system.domain.DfArea;
/** /**
* Service * Service
* *
* @author bs * @author bs
* @date 2024-04-08 * @date 2024-04-13
*/ */
public interface IDouAreaService extends MPJBaseService<DouArea>{ public interface IDfAreaService extends MPJBaseService<DfArea>{
} }

@ -1,8 +1,8 @@
package com.bs.system.service.impl; package com.bs.system.service.impl;
import com.bs.system.mapper.DouAreaMapper; import com.bs.system.mapper.DfAreaMapper;
import com.bs.system.domain.DouArea; import com.bs.system.domain.DfArea;
import com.bs.system.service.IDouAreaService; import com.bs.system.service.IDfAreaService;
import com.github.yulichang.base.MPJBaseServiceImpl; import com.github.yulichang.base.MPJBaseServiceImpl;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -10,10 +10,10 @@ import org.springframework.transaction.annotation.Transactional;
* Service * Service
* *
* @author bs * @author bs
* @date 2024-04-08 * @date 2024-04-13
*/ */
@Service @Service
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public class DouAreaServiceImpl extends MPJBaseServiceImpl<DouAreaMapper, DouArea> implements IDouAreaService { public class DfAreaServiceImpl extends MPJBaseServiceImpl<DfAreaMapper, DfArea> implements IDfAreaService {
} }

@ -2,6 +2,6 @@
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bs.system.mapper.DouAreaMapper"> <mapper namespace="com.bs.system.mapper.DfAreaMapper">
</mapper> </mapper>

@ -1,103 +1,103 @@
<template> <template>
<div class="app-container home"> <!-- <div class="app-container home">-->
<!-- <el-row :gutter="20"> <!-- &lt;!&ndash; <el-row :gutter="20">-->
<el-col :sm="24" :lg="24"> <!-- <el-col :sm="24" :lg="24">-->
</el-col> <!-- </el-col>-->
</el-row> <!-- </el-row>-->
<el-row style="margin-top: 4px; padding: 16px;" :gutter="20"> <!-- <el-row style="margin-top: 4px; padding: 16px;" :gutter="20">-->
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="8" style="margin-top: 20px;"> <!-- <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="8" style="margin-top: 20px;">-->
<div style="height: 400px;box-shadow: 10px 10px 5px #888888;border:1px solid #97a8be;border-radius: 5% 2%;"> <!-- <div style="height: 400px;box-shadow: 10px 10px 5px #888888;border:1px solid #97a8be;border-radius: 5% 2%;">-->
<el-row style="margin-top: 4px; padding: 16px;" :gutter="20"> <!-- <el-row style="margin-top: 4px; padding: 16px;" :gutter="20">-->
<span style="font-size: 20px;font-weight:bold;color: #ff4949">货物过期通知</span> <!-- <span style="font-size: 20px;font-weight:bold;color: #ff4949">货物过期通知</span>-->
</el-row> <!-- </el-row>-->
<el-row style="margin-top: 4px; padding: 16px;" :gutter="20"> <!-- <el-row style="margin-top: 4px; padding: 16px;" :gutter="20">-->
<span style="font-size: 15px;font-weight:bold;">{{ cargoMsg }}</span> <!-- <span style="font-size: 15px;font-weight:bold;">{{ cargoMsg }}</span>-->
</el-row> <!-- </el-row>-->
</div> <!-- </div>-->
</el-col> <!-- </el-col>-->
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="8" style="margin-top: 20px;"> <!-- <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="8" style="margin-top: 20px;">-->
<div style="height: 400px;box-shadow: 10px 10px 5px #888888;border:1px solid #97a8be;border-radius: 5% 2%;"> <!-- <div style="height: 400px;box-shadow: 10px 10px 5px #888888;border:1px solid #97a8be;border-radius: 5% 2%;">-->
<el-row style="margin-top: 4px; padding: 16px;" :gutter="20"> <!-- <el-row style="margin-top: 4px; padding: 16px;" :gutter="20">-->
<span style="font-size: 20px;font-weight:bold;color: #ff4949">仓库过期通知</span> <!-- <span style="font-size: 20px;font-weight:bold;color: #ff4949">仓库过期通知</span>-->
</el-row> <!-- </el-row>-->
<el-row style="margin-top: 4px; padding: 16px;" :gutter="20"> <!-- <el-row style="margin-top: 4px; padding: 16px;" :gutter="20">-->
<span style="font-size: 15px;font-weight:bold;" >{{ stockMsg }}</span> <!-- <span style="font-size: 15px;font-weight:bold;" >{{ stockMsg }}</span>-->
</el-row> <!-- </el-row>-->
</div> <!-- </div>-->
</el-col> <!-- </el-col>-->
</el-row> --> <!-- </el-row> &ndash;&gt;-->
<el-card class="box-card" :body-style="{ padding: '0px' }"> <!-- <el-card class="box-card" :body-style="{ padding: '0px' }">-->
<div slot="header" class="clearfix"> <!-- <div slot="header" class="clearfix">-->
<span>即将过期货物列表</span> <!-- <span>即将过期货物列表</span>-->
<el-button style="float: right; padding: 3px 0" type="text" @click="goMoreCargo"></el-button> <!-- <el-button style="float: right; padding: 3px 0" type="text" @click="goMoreCargo"></el-button>-->
</div> <!-- </div>-->
<el-table v-if="cargoList.length" v-loading="cargoLoading" :data="cargoList" :show-header="true" <!-- <el-table v-if="cargoList.length" v-loading="cargoLoading" :data="cargoList" :show-header="true"-->
:row-class-name="tableRowClassName" @row-dblclick="cargoClick" height="400"> <!-- :row-class-name="tableRowClassName" @row-dblclick="cargoClick" height="400">-->
<el-table-column width="100" label="有效期至" prop="expiryDate" align="center"></el-table-column> <!-- <el-table-column width="100" label="有效期至" prop="expiryDate" align="center"></el-table-column>-->
<el-table-column width="100" label="货物" prop="cargoName" align="center"></el-table-column> <!-- <el-table-column width="100" label="货物" prop="cargoName" align="center"></el-table-column>-->
<el-table-column width="100" label="项号" prop="bookNumber" align="center"></el-table-column> <!-- <el-table-column width="100" label="项号" prop="bookNumber" align="center"></el-table-column>-->
<!-- <el-table-column width="100" label="库场" prop="stockName" align="center"></el-table-column>--> <!--&lt;!&ndash; <el-table-column width="100" label="库场" prop="stockName" align="center"></el-table-column>&ndash;&gt;-->
<el-table-column width="200" label="货主" show-overflow-tooltip prop="custName"></el-table-column> <!-- <el-table-column width="200" label="货主" show-overflow-tooltip prop="custName"></el-table-column>-->
<el-table-column width="150" label="船舶" prop="vesselName"></el-table-column> <!-- <el-table-column width="150" label="船舶" prop="vesselName"></el-table-column>-->
</el-table> <!-- </el-table>-->
<el-empty v-else> <!-- <el-empty v-else>-->
<el-button type="none" plain @click="getCargoList"></el-button> <!-- <el-button type="none" plain @click="getCargoList"></el-button>-->
</el-empty> <!-- </el-empty>-->
<el-pagination layout="prev, pager, next, jumper" :total="cargoTotal" small hide-on-single-page <!-- <el-pagination layout="prev, pager, next, jumper" :total="cargoTotal" small hide-on-single-page-->
:current-page.sync="cargoParam.pageNum" :page-size.sync="cargoParam.pageSize" @current-change="getCargoList" /> <!-- :current-page.sync="cargoParam.pageNum" :page-size.sync="cargoParam.pageSize" @current-change="getCargoList" />-->
</el-card> <!-- </el-card>-->
<el-card class="box-card" :body-style="{ padding: '0px' }"> <!-- <el-card class="box-card" :body-style="{ padding: '0px' }">-->
<div slot="header" class="clearfix"> <!-- <div slot="header" class="clearfix">-->
<span>出库提离即将到期单据列表</span> <!-- <span>出库提离即将到期单据列表</span>-->
<el-button style="float: right; padding: 3px 0" type="text" @click="goMoreBillCargo"></el-button> <!-- <el-button style="float: right; padding: 3px 0" type="text" @click="goMoreBillCargo"></el-button>-->
</div> <!-- </div>-->
<el-table v-if="outBillCargoList.length" v-loading="outBillCargoLoading" :data="outBillCargoList" :show-header="true" <!-- <el-table v-if="outBillCargoList.length" v-loading="outBillCargoLoading" :data="outBillCargoList" :show-header="true"-->
:row-class-name="tableRowClassName" @row-dblclick="outBillCargoClick" height="400"> <!-- :row-class-name="tableRowClassName" @row-dblclick="outBillCargoClick" height="400">-->
<el-table-column width="100" label="有效期至" prop="expiryDate" align="center"></el-table-column> <!-- <el-table-column width="100" label="有效期至" prop="expiryDate" align="center"></el-table-column>-->
<el-table-column width="100" label="报关单号" prop="customsNo" align="center"></el-table-column> <!-- <el-table-column width="100" label="报关单号" prop="customsNo" align="center"></el-table-column>-->
<el-table-column width="100" label="货物" prop="cargoName" align="center"></el-table-column> <!-- <el-table-column width="100" label="货物" prop="cargoName" align="center"></el-table-column>-->
<el-table-column width="100" label="项号" prop="bookNumber" align="center"></el-table-column> <!-- <el-table-column width="100" label="项号" prop="bookNumber" align="center"></el-table-column>-->
<el-table-column width="100" label="单据编号" prop="billNumber" align="center"></el-table-column> <!-- <el-table-column width="100" label="单据编号" prop="billNumber" align="center"></el-table-column>-->
<el-table-column width="100" label="货物流向" prop="cargoFlow" align="center"></el-table-column> <!-- <el-table-column width="100" label="货物流向" prop="cargoFlow" align="center"></el-table-column>-->
<el-table-column width="200" label="货主" show-overflow-tooltip prop="custName"></el-table-column> <!-- <el-table-column width="200" label="货主" show-overflow-tooltip prop="custName"></el-table-column>-->
<el-table-column width="150" label="船舶" prop="vesselName"></el-table-column> <!-- <el-table-column width="150" label="船舶" prop="vesselName"></el-table-column>-->
</el-table> <!-- </el-table>-->
<el-empty v-else> <!-- <el-empty v-else>-->
<el-button type="none" plain @click="getOutBillCargo"></el-button> <!-- <el-button type="none" plain @click="getOutBillCargo"></el-button>-->
</el-empty> <!-- </el-empty>-->
<el-pagination layout="prev, pager, next, jumper" :total="outBillCargoTotal" small hide-on-single-page <!-- <el-pagination layout="prev, pager, next, jumper" :total="outBillCargoTotal" small hide-on-single-page-->
:current-page.sync="outBillCargoParam.pageNum" :page-size.sync="outBillCargoParam.pageSize" @current-change="getOutBillCargo" /> <!-- :current-page.sync="outBillCargoParam.pageNum" :page-size.sync="outBillCargoParam.pageSize" @current-change="getOutBillCargo" />-->
</el-card> <!-- </el-card>-->
<el-card class="box-card" :body-style="{ padding: '0px' }"> <!-- <el-card class="box-card" :body-style="{ padding: '0px' }">-->
<div slot="header" class="clearfix"> <!-- <div slot="header" class="clearfix">-->
<span>即将过期仓库列表</span> <!-- <span>即将过期仓库列表</span>-->
<el-button style="float: right; padding: 3px 0" type="text" @click="goMoreStock"></el-button> <!-- <el-button style="float: right; padding: 3px 0" type="text" @click="goMoreStock"></el-button>-->
</div> <!-- </div>-->
<el-table v-if="stockList.length" v-loading="stockLoading" :data="stockList" :row-class-name="tableRowClassName" <!-- <el-table v-if="stockList.length" v-loading="stockLoading" :data="stockList" :row-class-name="tableRowClassName"-->
@row-dblclick="stockClick" height="400"> <!-- @row-dblclick="stockClick" height="400">-->
<el-table-column width="100" label="有效期至" prop="validityEnd" align="center"></el-table-column> <!-- <el-table-column width="100" label="有效期至" prop="validityEnd" align="center"></el-table-column>-->
<el-table-column width="150" label="仓库代码" prop="stockCode" align="center"></el-table-column> <!-- <el-table-column width="150" label="仓库代码" prop="stockCode" align="center"></el-table-column>-->
<el-table-column label="仓库" prop="stockName" align="center"></el-table-column> <!-- <el-table-column label="仓库" prop="stockName" align="center"></el-table-column>-->
<el-empty slot="empty"> <!-- <el-empty slot="empty">-->
<el-button type="none" plain @click="getStockList"></el-button> <!-- <el-button type="none" plain @click="getStockList"></el-button>-->
</el-empty> <!-- </el-empty>-->
</el-table> <!-- </el-table>-->
<el-empty v-else> <!-- <el-empty v-else>-->
<el-button type="none" plain @click="getCargoList"></el-button> <!-- <el-button type="none" plain @click="getCargoList"></el-button>-->
</el-empty> <!-- </el-empty>-->
<el-pagination layout="prev, pager, next, jumper" :total="stockTotal" small hide-on-single-page <!-- <el-pagination layout="prev, pager, next, jumper" :total="stockTotal" small hide-on-single-page-->
:current-page.sync="stockParam.pageNum" :page-size.sync="stockParam.pageSize" @current-change="getStockList" /> <!-- :current-page.sync="stockParam.pageNum" :page-size.sync="stockParam.pageSize" @current-change="getStockList" />-->
</el-card> <!-- </el-card>-->
<el-dialog title="查看即将过期货物详情" width="70%" :visible.sync="openCargo" append-to-body> <!-- <el-dialog title="查看即将过期货物详情" width="70%" :visible.sync="openCargo" append-to-body>-->
<CargoDesc :cargo-stock-id="cargoStock.id"></CargoDesc> <!-- <CargoDesc :cargo-stock-id="cargoStock.id"></CargoDesc>-->
</el-dialog> <!-- </el-dialog>-->
<el-dialog title="查看即将过期仓库详情" :visible.sync="openStock" append-to-body> <!-- <el-dialog title="查看即将过期仓库详情" :visible.sync="openStock" append-to-body>-->
<StockDesc :stock-id="warehouse.id"></StockDesc> <!-- <StockDesc :stock-id="warehouse.id"></StockDesc>-->
</el-dialog> <!-- </el-dialog>-->
<el-dialog title="查看出库提离即将到期单据详情" :visible.sync="openOutBillCargo" append-to-body> <!-- <el-dialog title="查看出库提离即将到期单据详情" :visible.sync="openOutBillCargo" append-to-body>-->
<OutBillCargoDesc :out-bill-cargo-id="outBillCargo.id"></OutBillCargoDesc> <!-- <OutBillCargoDesc :out-bill-cargo-id="outBillCargo.id"></OutBillCargoDesc>-->
</el-dialog> <!-- </el-dialog>-->
</div> <!-- </div>-->
</template> </template>
<script> <script>
@ -111,130 +111,130 @@ import StockDesc from '@/views/components/StockDesc';
import OutBillCargoDesc from '@/views/components/OutBillCargoDesc'; import OutBillCargoDesc from '@/views/components/OutBillCargoDesc';
export default { // export default {
name: "Warehouse", // name: "Warehouse",
components: { // components: {
CargoDesc, // CargoDesc,
StockDesc, // StockDesc,
OutBillCargoDesc // OutBillCargoDesc
}, // },
data() { // data() {
return { // return {
billCargoMsg: '', // billCargoMsg: '',
cargoMsg: '', // cargoMsg: '',
stockMsg: '', // stockMsg: '',
// // //
version: "3.8.6", // version: "3.8.6",
outBillCargoList: [], // outBillCargoList: [],
cargoList: [], // cargoList: [],
stockList: [], // stockList: [],
outBillCargoLoading: false, // outBillCargoLoading: false,
cargoLoading: false, // cargoLoading: false,
stockLoading: false, // stockLoading: false,
openOutBillCargo: false, // openOutBillCargo: false,
openCargo: false, // openCargo: false,
openStock: false, // openStock: false,
outBillCargo: {}, // outBillCargo: {},
cargoStock: {}, // cargoStock: {},
warehouse: {}, // warehouse: {},
cargoTotal: 0, // cargoTotal: 0,
cargoParam: { // cargoParam: {
pageNum: 1, // pageNum: 1,
pageSize: 8, // pageSize: 8,
// isExpire: '1', // // isExpire: '1',
}, // },
stockTotal: 0, // stockTotal: 0,
stockParam: { // stockParam: {
pageNum: 1, // pageNum: 1,
pageSize: 8, // pageSize: 8,
// isExpire: '1', // // isExpire: '1',
}, // },
outBillCargoTotal: 0, // outBillCargoTotal: 0,
outBillCargoParam: { // outBillCargoParam: {
pageNum: 1, // pageNum: 1,
pageSize: 8, // pageSize: 8,
inoutType: 2, // inoutType: 2,
// isExpire: '1', // // isExpire: '1',
}, // },
}; // };
}, // },
created() { // created() {
// this.getmsg(); // // this.getmsg();
this.getStockList(); // // this.getStockList();
this.getCargoList(); // // this.getCargoList();
this.getOutBillCargo(); // // this.getOutBillCargo();
}, // },
methods: { // methods: {
tableRowClassName({ row, rowIndex }) { // tableRowClassName({ row, rowIndex }) {
const day = getDaysBetweenDate(row.expiryDate || row.validityEnd); // const day = getDaysBetweenDate(row.expiryDate || row.validityEnd);
if (day < 0) { // if (day < 0) {
return 'danger-row'; // return 'danger-row';
} // }
return 'warning-row'; // return 'warning-row';
}, // },
getOutBillCargo() { // getOutBillCargo() {
this.outBillCargoLoading = true; // this.outBillCargoLoading = true;
pageListByBillCargoWithExpire(this.outBillCargoParam).then(res => { // pageListByBillCargoWithExpire(this.outBillCargoParam).then(res => {
this.outBillCargoLoading = false; // this.outBillCargoLoading = false;
this.outBillCargoList = res.rows || []; // this.outBillCargoList = res.rows || [];
this.outBillCargoTotal = res.total; // this.outBillCargoTotal = res.total;
}).catch(e => { // }).catch(e => {
this.outBillCargoLoading = false; // this.outBillCargoLoading = false;
}); // });
}, // },
getStockList() { // getStockList() {
this.stockLoading = true; // this.stockLoading = true;
pageListByWarehouseWithExpire(this.stockParam).then(res => { // pageListByWarehouseWithExpire(this.stockParam).then(res => {
this.stockLoading = false; // this.stockLoading = false;
this.stockList = res.rows || []; // this.stockList = res.rows || [];
this.stockTotal = res.total; // this.stockTotal = res.total;
}).catch(e => { // }).catch(e => {
this.stockLoading = false; // this.stockLoading = false;
}); // });
}, // },
getCargoList() { // getCargoList() {
this.cargoLoading = true; // this.cargoLoading = true;
pageListByExpire(this.cargoParam).then(res => { // pageListByExpire(this.cargoParam).then(res => {
this.cargoLoading = false; // this.cargoLoading = false;
this.cargoList = res.rows || []; // this.cargoList = res.rows || [];
this.cargoTotal = res.total; // this.cargoTotal = res.total;
}).catch(e => { // }).catch(e => {
this.cargoLoading = false; // this.cargoLoading = false;
}); // });
}, // },
goMoreCargo() { // goMoreCargo() {
this.$router.push('manage/ckstock'); // this.$router.push('manage/ckstock');
}, // },
goMoreStock() { // goMoreStock() {
this.$router.push('base/warehouse'); // this.$router.push('base/warehouse');
}, // },
goMoreBillCargo() { // goMoreBillCargo() {
this.$router.push('search/outstock'); // this.$router.push('search/outstock');
}, // },
stockClick(row) { // stockClick(row) {
this.warehouse = row; // this.warehouse = row;
this.openStock = true; // this.openStock = true;
}, // },
cargoClick(row) { // cargoClick(row) {
this.cargoStock = row; // this.cargoStock = row;
this.openCargo = true; // this.openCargo = true;
}, // },
outBillCargoClick(row) { // outBillCargoClick(row) {
this.outBillCargo = row; // this.outBillCargo = row;
this.openOutBillCargo = true; // this.openOutBillCargo = true;
}, // },
getmsg() { // getmsg() {
getIndexMsg().then(response => { // getIndexMsg().then(response => {
this.cargoMsg = response.cargoMsg // this.cargoMsg = response.cargoMsg
this.stockMsg = response.stockMsg // this.stockMsg = response.stockMsg
}).catch(e => { // }).catch(e => {
}) // })
}, // },
goTarget(href) { // goTarget(href) {
window.open(href, "_blank"); // window.open(href, "_blank");
} // }
} // }
}; // };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

Loading…
Cancel
Save