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

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

@ -1,14 +1,14 @@
package com.bs.system.mapper;
import com.bs.common.mybatis.mapper.BaseMapperX;
import com.bs.system.domain.DouArea;
import com.bs.system.domain.DfArea;
/**
* Mapper
*
* @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;
import com.github.yulichang.base.MPJBaseService;
import com.bs.system.domain.DouArea;
import com.bs.system.domain.DfArea;
/**
* Service
*
* @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;
import com.bs.system.mapper.DouAreaMapper;
import com.bs.system.domain.DouArea;
import com.bs.system.service.IDouAreaService;
import com.bs.system.mapper.DfAreaMapper;
import com.bs.system.domain.DfArea;
import com.bs.system.service.IDfAreaService;
import com.github.yulichang.base.MPJBaseServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -10,10 +10,10 @@ import org.springframework.transaction.annotation.Transactional;
* Service
*
* @author bs
* @date 2024-04-08
* @date 2024-04-13
*/
@Service
@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
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bs.system.mapper.DouAreaMapper">
<mapper namespace="com.bs.system.mapper.DfAreaMapper">
</mapper>

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

Loading…
Cancel
Save