Browse Source

Merge remote-tracking branch 'origin/master'

master
djz8236 2 years ago
parent
commit
a447018767
  1. 87
      docs/databases/table_create_report-inventory.sql
  2. 14
      supervise-customer-ui/src/api/supervise/gdinventorylog.js
  3. 2
      supervise-customer-ui/src/router/modules/codemenu.js
  4. 248
      supervise-customer-ui/src/views/daydataupload/gdinventory/index.vue
  5. 17573
      supervise-flowable-ui/package-lock.json
  6. 10
      supervise-flowable-ui/src/api/login.js
  7. 28
      supervise-flowable-ui/src/router/index.js
  8. 961
      warehousing-system/docs/sheji/warehouse数据库设计文档_2.0.0.docx
  9. 4
      yxt-portal-ui/.env.development
  10. BIN
      yxt-portal-ui/src/assets/home/bIcon11.png
  11. 10
      yxt-portal-ui/src/views/Home/Home.vue
  12. 3
      yxt-supervise-cyf/docs/databases/data_modify.sql
  13. 24
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/finishproductinventory/FinishProductInventory.java
  14. 25
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/finishproductinventory/FinishProductInventoryDto.java
  15. 26
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/finishproductinventory/FinishProductInventoryQuery.java
  16. 29
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/finishproductinventory/FinishProductInventoryVo.java
  17. 6
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/packaginginventoryrecord/PackagingInventoryRecord.java
  18. 2
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/packaginginventoryrecord/PackagingInventoryRecordDto.java
  19. 9
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/productinformation/ProductInformationVo.java
  20. 24
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/producttype/ProductType.java
  21. 27
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/producttype/ProductTypeDto.java
  22. 25
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/producttype/ProductTypeQuery.java
  23. 29
      yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/producttype/ProductTypeVo.java
  24. 10
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/config/SaTokenConfigure.java
  25. 26
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/finishproductinventory/FinishProductInventoryMapper.java
  26. 16
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/finishproductinventory/FinishProductInventoryMapper.xml
  27. 51
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/finishproductinventory/FinishProductInventoryRest.java
  28. 63
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/finishproductinventory/FinishProductInventoryService.java
  29. 6
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/materialinventoryrecord/MaterialInventoryRecordService.java
  30. 2
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/packaginginventoryrecord/PackagingInventoryRecordMapper.xml
  31. 11
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/packaginginventoryrecord/PackagingInventoryRecordService.java
  32. 2
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/packagingoutbound/PackagingOutboundService.java
  33. 2
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/packagingstorage/PackagingStorageService.java
  34. 5
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/productinformation/ProductInformationMapper.java
  35. 8
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/productinformation/ProductInformationMapper.xml
  36. 10
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/productinformation/ProductInformationService.java
  37. 28
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/producttype/ProductTypeMapper.java
  38. 23
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/producttype/ProductTypeMapper.xml
  39. 58
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/producttype/ProductTypeRest.java
  40. 102
      yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/producttype/ProductTypeService.java
  41. 6
      yxt-supervise-cyf/yxt-supervise-cyf-ui/.env.development
  42. 48
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/baseInfo/becomeoil/index.js
  43. 24
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/baseInfo/commodityBrand/index.js
  44. 94
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/packagInAndOutBound/packagInAndOutBound.js
  45. 910
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/layout/components/Sidebar/index.vue
  46. 77
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/router/index.js
  47. 164
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/becomeoil/commodity.vue
  48. 299
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/becomeoil/index.vue
  49. 8
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/commodityBrand/index.vue
  50. 397
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/commodityFily/commodity.vue
  51. 243
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/commodityFily/index.vue
  52. 4
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/oilTankInfo/index.vue
  53. 389
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/packagInBoundList/index.vue
  54. 384
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/packagInventoryList/index.vue
  55. 382
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/packagOutBoundList/index.vue
  56. 4
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/supervise/oilTypeInBound/index.vue
  57. 4
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/supervise/oilTypeOutBound/index.vue
  58. 322
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/supervise/packagInBound/index.vue
  59. 282
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/supervise/packagInventory/index.vue
  60. 275
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/supervise/packagOutBound/index.vue
  61. 18
      yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/gdinventoryok/GdInventoryOk.java
  62. 21
      yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventorylog/GdInventoryLogRest.java
  63. 24
      yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventorylog/GdInventoryLogService.java
  64. 86
      yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventoryok/GdInventoryOkService.java
  65. 2
      yxt_supervise/supervise-customer/supervise-customer-biz/src/main/resources/logback-spring.xml

87
docs/databases/table_create_report-inventory.sql

@ -0,0 +1,87 @@
DROP TABLE IF EXISTS `report_inventory_day_gather`;
CREATE TABLE `report_inventory_day_gather` (
`id` BIGINT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号',
`createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
`remarks` VARCHAR(100) DEFAULT NULL COMMENT '备注说明',
`orderDate` VARCHAR(100) DEFAULT NULL COMMENT '单据日期',
`serialNumber` VARCHAR(100) DEFAULT NULL COMMENT '编号',
`reportTime` VARCHAR(100) DEFAULT NULL COMMENT '上报时间',
`storeType` VARCHAR(100) DEFAULT NULL COMMENT '仓库类型',
`storeNumber` int(11) DEFAULT 1 COMMENT '仓库数量',
`productCountNumber` int(11) DEFAULT 1 COMMENT '品种数量',
`productAmount` DOUBLE(12,2) DEFAULT 0 COMMENT '货值',
`countAmount` DOUBLE(12,2) DEFAULT 0 COMMENT '合计货值',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB COMMENT='库存汇总表-库存汇总日报表';
DROP TABLE IF EXISTS `report_inventory_day_store`;
CREATE TABLE `report_inventory_day_store` (
`id` BIGINT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号',
`createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
`remarks` VARCHAR(100) DEFAULT NULL COMMENT '备注说明',
`orderDate` VARCHAR(100) DEFAULT NULL COMMENT '单据日期',
`serialNumber` VARCHAR(100) DEFAULT NULL COMMENT '编号',
`reportTime` VARCHAR(100) DEFAULT NULL COMMENT '上报时间',
`warehouseType` int(11) DEFAULT NULL COMMENT '仓库类型',
`storeCode` VARCHAR(100) DEFAULT NULL COMMENT '门店编号',
`storeCodeName` VARCHAR(100) DEFAULT NULL COMMENT '[门店编号]门店名称',
`productCountNumber` int(11) DEFAULT 1 COMMENT '品种数量',
`productAmount` DOUBLE(12,2) DEFAULT 0 COMMENT '货值',
`countAmount` double(12,2) DEFAULT NULL COMMENT '合计货值',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB COMMENT='库存汇总表-仓库库存明细表';
DROP TABLE IF EXISTS `report_inventory_day_tobacco_store`;
CREATE TABLE `report_inventory_day_tobacco_store` (
`id` BIGINT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号',
`createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
`remarks` VARCHAR(100) DEFAULT NULL COMMENT '备注说明',
`orderDate` VARCHAR(100) DEFAULT NULL COMMENT '单据日期',
`serialNumber` VARCHAR(100) DEFAULT NULL COMMENT '编号',
`reportTime` VARCHAR(100) DEFAULT NULL COMMENT '上报时间',
`warehouseType` int(11) DEFAULT NULL COMMENT '仓库类型',
`storeCode` VARCHAR(100) DEFAULT NULL COMMENT '门店编号',
`storeCodeName` VARCHAR(100) DEFAULT NULL COMMENT '[门店编号]门店名称',
`productCountNumber` int(11) DEFAULT 1 COMMENT '品种数量',
`productAmount` DOUBLE(12,2) DEFAULT 0 COMMENT '货值',
`countAmount` double(12,2) DEFAULT NULL COMMENT '合计货值',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB COMMENT='库存汇总表-烟草仓库库存明细表';
DROP TABLE IF EXISTS `report_inventory_day_product`;
CREATE TABLE `report_inventory_day_product` (
`id` BIGINT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID,唯一编号',
`createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
`remarks` VARCHAR(100) DEFAULT NULL COMMENT '备注说明',
`orderDate` VARCHAR(100) DEFAULT NULL COMMENT '单据日期',
`serialNumber` VARCHAR(100) DEFAULT NULL COMMENT '编号',
`productNumber` VARCHAR(100) DEFAULT NULL COMMENT '商品数量',
`reportTime` VARCHAR(100) DEFAULT NULL COMMENT '上报时间',
`prodCode` varchar(100) DEFAULT NULL COMMENT '商品编码',
`prodBarCode` varchar(100) DEFAULT NULL COMMENT '商品条码',
`prodName` varchar(100) DEFAULT NULL COMMENT '商品名称',
`prodNum` int(11) DEFAULT NULL COMMENT '商品数量',
`prodValue` double(12,2) DEFAULT NULL COMMENT '商品货值',
`typeCode` varchar(100) DEFAULT NULL COMMENT '类别编号',
`typeName` varchar(100) DEFAULT NULL COMMENT '类别名称',
`typeOne` varchar(100) DEFAULT NULL COMMENT '一级类别名称',
`typeTwo` varchar(100) DEFAULT NULL COMMENT '二级类别名称',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB COMMENT='库存汇总表-商品库存';

14
supervise-customer-ui/src/api/supervise/gdinventorylog.js

@ -5,7 +5,7 @@ export default {
// 查询分页列表
listPage: function(params) {
return request({
url: '/supervise/v1/gdinventorylog/listPage',
url: '/customer/v1/gdinventorylog/listPage',
method: 'post',
data: params
})
@ -13,7 +13,7 @@ export default {
// 保存新增记录
saveOrUpdate: function(params) {
return request({
url: '/supervise/v1/gdinventorylog/save',
url: '/customer/v1/gdinventorylog/save',
method: 'post',
data: params
})
@ -21,7 +21,7 @@ export default {
// 通过sid删除一条或多条记录
delBySids: function(params) {
return request({
url: '/supervise/v1/gdinventorylog/delBySids',
url: '/customer/v1/gdinventorylog/delBySids',
method: 'delete',
data: params
})
@ -29,13 +29,13 @@ export default {
// 通过sid查询一条记录
fetchBySid: function(sid) {
return request({
url: '/supervise/v1/gdinventorylog/fetchDetailsBySid/' + sid
url: '/customer/v1/gdinventorylog/fetchDetailsBySid/' + sid
})
},
// 提交
doSubmit: function(params) {
return request({
url: '/supervise/v1/gdinventorylog/doSubmit',
url: '/customer/v1/gdinventorylog/doSubmit',
method: 'post',
data: params
})
@ -43,7 +43,7 @@ export default {
// 导入
importExcel: function(params) {
return request({
url: '/supervise/v1/gdinventorylog/importExcel',
url: '/customer/v1/gdinventorylog/importExcel',
method: 'post',
data: params
})
@ -51,7 +51,7 @@ export default {
// 导出
exportExcel: function(params) {
return request({
url: '/supervise/v1/gdinventorylog/exportExcel',
url: '/customer/v1/gdinventorylog/exportExcel',
method: 'post',
data: params
})

2
supervise-customer-ui/src/router/modules/codemenu.js

@ -336,7 +336,7 @@ const codemenu = [{
children: [{
path: '/daydataupload/gdinventory',
component: () => import('@/views/daydataupload/gdinventory/index.vue'),
name: 'DaydatauploadGdinventory',
name: 'DaydatauploadGdinventoryLog',
meta: {
title: '库存信息上传',
noCache: true

248
supervise-customer-ui/src/views/daydataupload/gdinventory/index.vue

@ -1,63 +1,148 @@
<template>
<div class="app-container">
<button-bar ref="btnbar" view-title="采购订单列表" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>导入库存信息查询</span>
<el-button style="float: right; padding: 3px 0" type="text" @click="resetCache">缓存数据重置(监管商品仓店索引供应商索引)</el-button>
<button-bar ref="btnbar" view-title="库存信息" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form :inline="true" :model="queryParams" class="tab-header">
<el-form-item label="数据日期">
<el-date-picker v-model="queryParams.params.dataDateStart" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择数据开始日期" />
<span style="padding: 0 8px"></span>
<el-date-picker v-model="queryParams.params.dataDateEnd" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择数据结束日期" />
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</div>
</div>
</div>
<div>
<el-upload
ref="upload"
class="upload-demo"
:action="updateAction"
:on-change="handleChange"
:on-progress="handleProgress"
:on-preview="handlePreview"
:on-remove="handleRemove"
:on-success="handleSuccess"
:file-list="fileList"
:auto-upload="false"
:multiple="false"
:limit="1"
>
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button>
<div slot="tip" class="el-upload__tip">上传 库存信息查询.xlsx文件</div>
</el-upload>
<!-- Start 项目列表头部 -->
<div class="listtop">
<div class="tit">库存信息导入日志列表</div>
<pageye v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
</div>
<div>
<h3>文件上传结果</h3>
<el-card class="box-card">
<div>{{ uploadResultMesssage }}</div>
</el-card>
<!-- End 项目列表头部 -->
<!-- Start 项目列表 -->
<div class="">
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%">
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column prop="orderDate" label="数据日期" align="center" width="200" />
<el-table-column prop="createTime" label="导入时间" align="center" width="200" />
<el-table-column prop="allNum" label="总记录数" align="center" width="200" />
<el-table-column prop="validNum" label="普通商品数" align="center" width="200" />
<el-table-column prop="errRowNum" label="烟草商品数" align="center" width="200" />
<el-table-column label="操作" wid align="center">
<template slot-scope="scope">
<el-button type="text" @click="toRelevancy(scope.row)">下载库存日报表</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div>
<h3>库存汇总数据</h3>
<el-card class="box-card">
<div>{{ hzResultMesssage }}</div>
<div>
<el-button :disabled="!hzFilePath" size="small" type="primary" @click="doDownloadHz">下载库存汇总文件</el-button>
<!-- <el-button :disabled="!ychzFilePath" size="small" type="primary" @click="doDownloadHzYc">下载烟草汇总文件</el-button> -->
</div>
</el-card>
<!-- End 项目列表 -->
<div class="pages">
<div class="tit" />
<!-- 翻页 -->
<pagination
v-show="dataList.length > 0"
:total="queryParams.total"
:page.sync="queryParams.current"
:limit.sync="queryParams.size"
class="pagination"
@pagination="loadList"
/>
</div>
</el-card>
</div>
<el-dialog title="上传<汇融银行_库存信息查询.xlsx>" :visible.sync="dialogVisible" width="60%" :before-close="dialogClose">
<el-card class="box-card">
<div>
<el-upload
ref="upload"
class="upload-demo"
:action="updateAction"
:on-change="handleChange"
:on-progress="handleProgress"
:on-preview="handlePreview"
:on-remove="handleRemove"
:on-success="handleSuccess"
:file-list="fileList"
:auto-upload="false"
:multiple="false"
:limit="1"
>
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button>
<div slot="tip" class="el-upload__tip">上传 汇融银行_库存信息查询.xlsx文件</div>
</el-upload>
</div>
<div>
<h3>文件上传结果</h3>
<el-card class="box-card">
<div>{{ uploadResultMesssage }}</div>
</el-card>
</div>
<div>
<h3>库存汇总数据</h3>
<el-card class="box-card">
<div>{{ hzResultMesssage }}</div>
<div>
<el-button :disabled="!hzFilePath" size="small" type="primary" @click="doDownloadHz">下载库存汇总文件</el-button>
<!-- <el-button :disabled="!ychzFilePath" size="small" type="primary" @click="doDownloadHzYc">下载烟草汇总文件</el-button> -->
</div>
</el-card>
</div>
</el-card>
</el-dialog>
</div>
</template>
<script>
import {
kchz,
resetAllCache
} from '@/api/kucun/kucun'
import ButtonBar from '@/components/ButtonBar'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import req from '@/api/supervise/gdinventorylog'
export default {
name: 'KucunKcxxcxIndex',
// components: { },
name: 'DaydatauploadGdinventoryLog',
components: {
ButtonBar,
Pagination,
pageye
},
data() {
return {
btndisabled: false,
updateAction: process.env.VUE_APP_BASE_API + '/kucun/uploadGdData',
viewState: 1, // 1 2 3 4
isSearchShow: false,
searchxianshitit: '显示查询条件',
queryParams: {
current: 1,
size: 10,
total: 0,
params: {
dataDateStart: '',
dataDateEnd: ''
}
},
tableLoading: false,
dataList: [],
btnList: [
{
type: 'primary',
size: 'small',
icon: 'upload',
btnKey: 'showUploadXlsx',
btnLabel: '上传库存信息'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}],
dialogVisible: false,
updateAction: '/api/customer' + '/v1/gdinventoryok/uploadGdData',
name: '库存数据导入',
fileList: [],
uploadResultMesssage: '',
@ -71,29 +156,73 @@
this.$refs['btnbar'].setButtonList(this.btnList)
},
created() {
//
this.init()
//
// this.getList()
this.loadList()
},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
switch (btnKey) {
case 'toUploadXlsx':
this.toUploadXlsx()
case 'showUploadXlsx':
this.showUploadXlsx()
break
case 'filing':
this.filing()
break
case 'doDel':
this.doDel()
case 'doClose':
this.doClose()
break
default:
break
}
},
init() {},
getList() {},
dosearch() {
this.queryParams.current = 1
this.loadList()
},
resetQuery() {
this.queryParams = {
current: 1,
size: 10,
total: 0,
params: {
dataDateStart: '',
dataDateEnd: ''
}
}
this.loadList()
},
//
indexMethod(index) {
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
var pageindex = index + 1 + pagestart
return pageindex
},
loadList() {
req.listPage(this.queryParams).then(res => {
this.queryParams.total = res.data.total
this.dataList = res.data.records
}).catch(e => {
console.log('GdinventoryLog-loadList-ee:', e)
})
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
},
showUploadXlsx() {
this.dialogVisible = true
},
dialogClose() {
this.currentLog = {}
this.fileList = []
this.filecandown = true
this.dialogVisible = false
},
//
handleReturn() {
this.$router.go(-1)
@ -214,4 +343,3 @@
overflow-x: hidden;
}
</style>

17573
supervise-flowable-ui/package-lock.json

File diff suppressed because it is too large

10
supervise-flowable-ui/src/api/login.js

@ -1,17 +1,19 @@
import request from '@/utils/request'
// 登录方法
export function login(username, password, code, uuid) {
export function login(userName, password, code, uuid) {
const data = {
username,
userName,
password,
code,
uuid
}
return request({
url: '/login',
// url: '/login',
url: '/portal/v1/sysuser/login',
method: 'post',
data: data
data: data,
headers: { 'Content-Type': 'application/json' }
})
}
// 获取用户详细信息

28
supervise-flowable-ui/src/router/index.js

@ -75,19 +75,21 @@ export const constantRoutes = [{
icon: 'user'
}
}]
},{
path: '/tool',
component: Layout,
hidden: true,
children: [
{
path: 'build/index',
component: (resolve) => require(['@/views/tool/build/index'], resolve),
name: 'FormBuild',
meta: { title: '表单配置', icon: '' }
}
]
}]
},
// {
// path: '/tool',
// component: Layout,
// hidden: true,
// children: [
// {
// path: 'build/index',
// component: (resolve) => require(['@/views/tool/build/index'], resolve),
// name: 'FormBuild',
// meta: { title: '表单配置', icon: '' }
// }
// ]
// },
]
export default new Router({
mode: 'history', // 去掉url中的#

961
warehousing-system/docs/sheji/warehouse数据库设计文档_2.0.0.docx

@ -0,0 +1,961 @@
数据库表结构文档
数据库名:warehouse2
文档版本:1.0.0
文档描述:数据库设计文档
公共字段
编号
名称
数据类型
长度
小数位
允许空值
主键
默认值
说明
1
id
int
19
0
N
Y
id
2
sid
Sid
3
lockVersion
版本锁
4
createTime
创建时间
5
modifyTime
修改时间
6
isEnable
是否可用:1可用,0不可用
7
state
状态
8
isDelete
是否删除:0未删除,1已删除
9
remarks
备注
10
createBySid
创建人sid
11
updateBySid
修改人sid
表in_storehouse_main 货物入库质押申请/批准单
编号
名称
数据类型
长度
小数位
允许空值
主键
默认值
说明
1
no
varchar
50
编号
2
applicationDate
date
50
制单日期
3
creatorSid
varchar
64
制单人Sid
4
creatorName
varchar
50
制单人姓名
5
custerSid
varchar
64
客户Sid(企业)
6
custerName
varchar
100
客户名称(企业)
7
storeHouseSid
varchar
64
仓库Sid
8
storeHouseName
varchar
100
仓库名称
9
auditorSid
varchar
64
审核人Sid
10
auditorName
varchar
50
审核人姓名
11
state
varchar
50
审核状态
12
approvedDate
varchar
50
审核日期
13
approvedRemark
varchar
50
审核备注
表in_storehouse_listing 货物入库质押申请/批准单明细表
编号
名称
数据类型
长度
小数位
允许空值
主键
默认值
说明
1
custerSid
varchar
64
客户Sid(企业)
2
custerName
varchar
100
客户名称(企业)
3
storeHouseSid
varchar
64
仓库Sid
4
storeHouseName
varchar
100
仓库名称
5
proName
varchar
50
质物名称
6
proModel
varchar
50
规格(型号)
proUnit
varchar
50
规格单位
7
manufacturer
varchar
50
生成厂家(产地)
8
num
varchar
10
数量
9
weight
varchar
50
重量
10
confirmedPrice
decime
50
2
质权人确认的单价
11
calculatedValue
decime
50
2
核算的价值
12
locationNumber
varchar
10
货位号
13
mainSid
varchar
50
申请单的sid
表out_storehouse_main 质物解除质押出库申请/批准单
编号
名称
数据类型
长度
小数位
允许空值
主键
默认值
说明
1
creatorSid
varchar
64
制单人Sid
2
creatorName
varchar
50
制单人姓名
3
custerSid
varchar
64
客户Sid(企业)
4
custerName
varchar
100
客户名称(企业)
5
storeHouseSid
varchar
64
仓库Sid
6
storeHouseName
varchar
100
仓库名称
7
auditorSid
varchar
64
审核人Sid
8
auditorName
varchar
50
审核人姓名
9
no
varchar
50
编号
10
applicationDate
date
50
制单日期
11
state
varchar
50
审核状态
12
approvedDate
varchar
50
审核日期
13
approvedRemark
varchar
50
审核备注
表out_storehouse_listing 质物解除质押出库申请/批准单明细表
编号
名称
数据类型
长度
小数位
允许空值
主键
默认值
说明
1
custerSid
varchar
64
客户Sid(企业)
2
custerName
varchar
100
客户名称(企业)
3
storeHouseSid
varchar
64
仓库Sid
4
storeHouseName
varchar
100
仓库名称
5
proName
varchar
50
质物名称
6
proModel
varchar
50
规格(型号)
proUnit
varchar
50
规格单位
7
manufacturer
varchar
50
生成厂家(产地)
8
estimateNum
varchar
10
预计数量
9
estimateWeight
varchar
50
预计重量
10
estimateConfirmedPrice
decime
50
2
预计质权人确认的单价
11
estimateCalculatedValue
decime
50
2
预计核算的价值
12
realityNum
varchar
10
实际数量
13
realityWeight
varchar
50
实际重量
14
realityConfirmedPrice
decime
50
2
实际质权人确认的单价
15
realityCalculatedValue
decime
50
2
实际核算的价值
16
locationNumber
varchar
10
货位号
17
mainSid
varchar
50
申请单的sid
表stock 质物库存表
编号
名称
数据类型
长度
小数位
允许空值
主键
默认值
说明
1
proName
varchar
50
质物名称
2
proModel
varchar
50
规格(型号)
3
manufacturer
varchar
50
生成厂家(产地)
4
num
varchar
10
数量
5
weight
varchar
50
重量
6
confirmedPrice
decime
50
2
质权人确认的单价
7
calculatedValue
decime
50
2
核算的价值
8
locationNumber
varchar
10
货位号
9
custerName
varchar
50
客户名称(企业)
proUnit
varchar
50
规格单位
custerSid
varchar
64
客户Sid(企业)
custerName
varchar
100
客户名称(企业)
storeHouseSid
varchar
64
仓库Sid
storeHouseName
varchar
100
仓库名称
locationNumber
varchar
10
货位号
备注:台账的数据是实时最新的。
问题:
同一个出质人两次入库单的同一种商品的单价、核算的价值不一致如何处理。(台账中同一个商品出现的单价不一致的情况)
同一个出质人两次出库单的同一种商品的预计质权人确认的单价、预计核算的价值、实际质权人确认的单价、实际核算的价值不一致如何处理。(台账中同一个商品出现的价值不一致的情况)
出库的商品与入库的商品是不是只按照同一个客户下的同一商品名称做对应。
4、出现下述情况如何处理:
康师傅矿泉水1000瓶。500瓶在A货位,500瓶在B货位。
填写的单子需要按照如下方式填写。
质物名称
规格
生产厂家
数量
重量
质权人确认的单价
核算的价值
货位号
备注
康师傅矿泉水
500ML
康师傅
1000
500
1000
1000
A、B
质物名称
规格
生产厂家
数量
重量
质权人确认的单价
核算的价值
货位号
备注
康师傅矿泉水
500ML
康师傅
500
250
500
500
A
康师傅矿泉水
500ML
康师傅
500
250
500
500
B
入库接口格式
{
"no": "202305160001",
"custerName": "国大36524",
"applicationDate": "20230516",
"listing": [
{
"proName": "康师傅矿泉水",
"proModel": "500ml",
"manufacturer": "康师傅",
"num": "1000",
"weight": "250公斤",
"locationNumber": "A货位",
"calculatedValue": "1000",
"confirmedPrice": "1000"
},
{
"proName": "康师傅矿泉水",
"proModel": "500ml",
"manufacturer": "康师傅",
"num": "1000",
"weight": "250公斤",
"locationNumber": "B货位",
"calculatedValue": "1000",
"confirmedPrice": "1000"
}
]
}
5、关于包装、标记字段如何处理。
关于质押物的有效期、质押期限字段。
重量的单位。
出库接口格式
{
"no": "202305160001",
"custerName": "国大36524",
"applicationDate": "20230516",
"listing": [
{
"proName": "康师傅矿泉水",
"proModel": "500ml",
"manufacturer": "康师傅",
"estimateNum": "1000",
"estimateweight": "250公斤",
"locationNumber": "A货位",
"estimatecalculatedValue": "1000",
"estimateconfirmedPrice": "1000",
"realityCalculatedValue": "1000",
"realityConfirmedPrice": "1000",
"realityWeight": "250公斤",
"realityNum": "1000"
},
{
"proName": "康师傅矿泉水",
"proModel": "500ml",
"manufacturer": "康师傅",
"estimateNum": "1000",
"estimateweight": "250公斤",
"locationNumber": "A货位",
"estimatecalculatedValue": "1000",
"estimateconfirmedPrice": "1000",
"realityCalculatedValue": "1000",
"realityConfirmedPrice": "1000",
"realityWeight": "250公斤",
"realityNum": "1000"
}
]
}
8、Apifox中的接口

4
yxt-portal-ui/.env.development

@ -5,5 +5,5 @@ ENV = 'development'
VUE_APP_BASE_API = '/api'
## 配置测试和本地开发时的 接口地址
VUE_APP_URL = "http://127.0.0.1:8112"
##VUE_APP_URL = "http://8.130.39.13:8112"
##VUE_APP_URL = "http://127.0.0.1:8112"
VUE_APP_URL = "http://8.130.39.13:8112"

BIN
yxt-portal-ui/src/assets/home/bIcon11.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

10
yxt-portal-ui/src/views/Home/Home.vue

@ -260,6 +260,10 @@
imgUrl: require('@/assets/home/bbicon.png'),
title: '仓库集控'
},
{
imgUrl: require('@/assets/home/bIcon11.png'),
title: '机器人巡检'
},
{
imgUrl: require('@/assets/home/bIcon8.png'),
title: '系统管理'
@ -433,7 +437,7 @@
defaultOrgPathName: this.defaultOrgPathName,
defaultOrgPath: this.defaultOrgPath
}
if (index === 10) {
if (index === 11) {
window.open('/#/index', '_blank')
} else if (index === 0) {
// window.open('http://127.0.0.1:9531/#/' + '?token=' + getStorage(), '_blank')
@ -460,6 +464,10 @@
} else if (index === 9) {
// window.open('http://192.168.3.8:9532/#/' + '?token=' + getStorage(), '_blank')
window.open('http://jianguan.yyundong.com/warehouse/#/' + '?token=' + getStorage(), '_blank')
}else if (index === 10) {
//
// window.open('http://192.168.3.8:9532/#/' + '?token=' + getStorage(), '_blank')
// window.open('http://jianguan.yyundong.com/warehouse/#/' + '?token=' + getStorage(), '_blank')
}
}
}

3
yxt-supervise-cyf/docs/databases/data_modify.sql

@ -0,0 +1,3 @@
insert into app_version(appName,versionCode,versionName,downloadUrl,versionInfo,fileName)
values ('醇油坊',1000,'1.0.0.0','http://cyf.yyundong.com/apks/cyf-1000.apk','初始版本。','cyf-1000.apk');

24
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/finishproductinventory/FinishProductInventory.java

@ -0,0 +1,24 @@
package com.yxt.supervise.cyf.api.finishproductinventory;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yxt.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import lombok.Data;
/**
* @author feikefei
* @create 2023-05-22-16:07
*/
@Data
@ApiModel(value = "成品油 库存信息", description = "成品油 库存信息")
@TableName("finish_product_inventory")
public class FinishProductInventory extends BaseEntity {
//数量
private Double amount;
//产品sid
private String prodSid;
//编号
private String number;
//单价
private Double price;
}

25
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/finishproductinventory/FinishProductInventoryDto.java

@ -0,0 +1,25 @@
package com.yxt.supervise.cyf.api.finishproductinventory;
import com.yxt.common.core.dto.Dto;
import io.swagger.annotations.ApiModel;
import lombok.Data;
/**
* @author feikefei
* @create 2023-05-22-16:12
*/
@Data
@ApiModel(value = "成品油 库存信息 传输对象数据", description = "成品油 库存信息 传输对象数据")
public class FinishProductInventoryDto implements Dto{
private String id;
private String sid;
//数量
private Double amount;
//产品sid
private String prodSid;
//编号
private String number;
//单价
private Double price;
}

26
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/finishproductinventory/FinishProductInventoryQuery.java

@ -0,0 +1,26 @@
package com.yxt.supervise.cyf.api.finishproductinventory;
import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModel;
import lombok.Data;
/**
* @author feikefei
* @create 2023-05-23-9:36
*/
@Data
@ApiModel(value = "成品油 库存信息 分页传输对象", description = "成品油 库存信息 分页传输对象")
public class FinishProductInventoryQuery implements Query {
private String id;
private String sid;
//数量
private Double amount;
//产品sid
private String prodSid;
//编号
private String number;
//单价
private Double price;
private String InformationNumber;
}

29
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/finishproductinventory/FinishProductInventoryVo.java

@ -0,0 +1,29 @@
package com.yxt.supervise.cyf.api.finishproductinventory;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import lombok.Data;
/**
* @author feikefei
* @create 2023-05-23-9:36
*/
@Data
@ApiModel(value = "成品油 库存信息 返回视图对象字段", description = "成品油 库存信息 返回视图对象字段")
public class FinishProductInventoryVo implements Vo {
private String id;
private String sid;
//数量
private Double amount;
//产品sid
private String prodSid;
//编号
private String number;
//单价
private Double price;
//品牌名称
private String name;
//品牌编号
private String InformationNumber;
}

6
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/packaginginventoryrecord/PackagingInventoryRecord.java

@ -11,14 +11,14 @@ import lombok.Data;
*/
@Data
@ApiModel(value = "包装物盘库记录信息", description = "包装物盘库记录信息")
@TableName("material_inventory_record")
@TableName("packaging_inventory_record")
public class PackagingInventoryRecord extends BaseEntity {
//盘库日期
private String inventoryDate;
//盘库库存
private double inventory;
//包装物类型
private String typeSid;
//包装物库存sid
private String inventorySid;
//价值
private double value;
}

2
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/packaginginventoryrecord/PackagingInventoryRecordDto.java

@ -19,7 +19,7 @@ public class PackagingInventoryRecordDto implements Dto {
//盘库库存
private double inventory;
//包装物类型
private String typeSid;
private String inventorySid;
//价值
private double value;
}

9
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/productinformation/ProductInformationVo.java

@ -15,8 +15,13 @@ public class ProductInformationVo implements Vo {
private String id;
private String sid;
//产品类型名称
//品牌名称
private String name;
//产品类型编号
//品牌编号
private String number;
//品牌初始库存
private Double inventoryQuantity;
//品牌现有库存
private Double amount;
}

24
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/producttype/ProductType.java

@ -0,0 +1,24 @@
package com.yxt.supervise.cyf.api.producttype;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yxt.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import lombok.Data;
/**
* @author feikefei
* @create 2023-05-22-15:48
*/
@Data
@ApiModel(value = "商品类型信息", description = "商品类型信息")
@TableName("product_type")
public class ProductType extends BaseEntity {
//商品类型名称
private String name;
//商品类型编号
private String number;
//上级sid
private String pSid;
//产品sid
private String prodSid;
}

27
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/producttype/ProductTypeDto.java

@ -0,0 +1,27 @@
package com.yxt.supervise.cyf.api.producttype;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.util.List;
/**
* @author feikefei
* @create 2023-05-22-15:53
*/
@Data
@ApiModel(value = "产品类型信息 数据传输对象", description = "产品类型信息 数据传输对象")
public class ProductTypeDto {
private String id;
private String sid;
//商品类型名称
private String name;
//商品类型编号
private String number;
//上级sid
private String pSid;
//产品sid
private String prodSid;
private List<ProductTypeDto> typeList;
}

25
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/producttype/ProductTypeQuery.java

@ -0,0 +1,25 @@
package com.yxt.supervise.cyf.api.producttype;
import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModel;
import lombok.Data;
/**
* @author feikefei
* @create 2023-05-23-9:21
*/
@Data
@ApiModel(value = "商品类型信息 分页传输对象数据", description = "商品类型信息 分页传输对象数据")
public class ProductTypeQuery implements Query {
private String id;
private String sid;
//商品类型名称
private String name;
//商品类型编号
private String number;
//上级sid
private String pSid;
//产品sid
private String prodSid;
}

29
yxt-supervise-cyf/yxt-supervise-cyf-api/src/main/java/com/yxt/supervise/cyf/api/producttype/ProductTypeVo.java

@ -0,0 +1,29 @@
package com.yxt.supervise.cyf.api.producttype;
import com.yxt.common.core.vo.Vo;
import io.swagger.annotations.ApiModel;
import lombok.Data;
/**
* @author feikefei
* @create 2023-05-23-9:23
*/
@Data
@ApiModel(value = "商品类型信息 视图返回字段", description = "商品类型信息 视图返回字段")
public class ProductTypeVo implements Vo {
private String id;
private String sid;
//商品类型名称
private String name;
//商品类型编号
private String number;
//上级sid
private String pSid;
//产品sid
private String prodSid;
//品牌名称
private String informationName;
//品牌编号
private String informationNumber;
}

10
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/config/SaTokenConfigure.java

@ -17,10 +17,10 @@ public class SaTokenConfigure implements WebMvcConfigurer {
@Override
public void addInterceptors(InterceptorRegistry registry) {
// 注册 Sa-Token 拦截器,校验规则为 StpUtil.checkLogin() 登录校验。
// registry.addInterceptor(new SaInterceptor(handle -> StpUtil.checkLogin()))
// .addPathPatterns("/**")
// .excludePathPatterns("/cyf/sys/doLogin")
// .excludePathPatterns("/cyf/app/sys/doLogin")
// .excludePathPatterns("/cyf/appVersion/versioninfo");
registry.addInterceptor(new SaInterceptor(handle -> StpUtil.checkLogin()))
.addPathPatterns("/**")
.excludePathPatterns("/cyf/sys/doLogin")
.excludePathPatterns("/cyf/app/sys/doLogin")
.excludePathPatterns("/cyf/appVersion/versioninfo");
}
}

26
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/finishproductinventory/FinishProductInventoryMapper.java

@ -0,0 +1,26 @@
package com.yxt.supervise.cyf.biz.finishproductinventory;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.yxt.supervise.cyf.api.finishproductinventory.FinishProductInventory;
import com.yxt.supervise.cyf.api.finishproductinventory.FinishProductInventoryVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
/**
* @author feikefei
* @create 2023-05-23-10:45
*/
@Mapper
public interface FinishProductInventoryMapper extends BaseMapper<FinishProductInventory> {
IPage<FinishProductInventoryVo> selectPageVo(IPage<FinishProductInventory> page, @Param(Constants.WRAPPER) Wrapper<FinishProductInventory> qw);
FinishProductInventory selectPriceByProdSid(@Param("prodSid") String prodSid);
@Select("select count(*) from finish_product_inventory where prodSid = #{prodSid)")
Integer selectByProdSid(@Param("prodSid") String prodSid);
}

16
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/finishproductinventory/FinishProductInventoryMapper.xml

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yxt.supervise.cyf.biz.finishproductinventory.FinishProductInventoryMapper">
<select id="selectPageVo" resultType="com.yxt.supervise.cyf.api.finishproductinventory.FinishProductInventoryVo">
select p.*,i.name,i.number InformationNumber
from finish_product_inventory p
inner join product_information i on p.prodSid = i.sid
<where>
${ew.sqlSegment}
</where>
</select>
<select id="selectPriceByProdSid" resultType="com.yxt.supervise.cyf.api.finishproductinventory.FinishProductInventory">
select * from finish_product_inventory where prodSid = #{prodSid}
</select>
</mapper>

51
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/finishproductinventory/FinishProductInventoryRest.java

@ -0,0 +1,51 @@
package com.yxt.supervise.cyf.biz.finishproductinventory;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import com.yxt.supervise.cyf.api.finishproductinventory.FinishProductInventoryDto;
import com.yxt.supervise.cyf.api.finishproductinventory.FinishProductInventoryQuery;
import com.yxt.supervise.cyf.api.finishproductinventory.FinishProductInventoryVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* @author feikefei
* @create 2023-05-23-10:42
*/
@Api(tags = "成品油 库存信息")
@RestController
@RequestMapping("cyf/inventory")
public class FinishProductInventoryRest {
@Autowired
private FinishProductInventoryService finishProductInventoryService;
@ApiOperation("增加")
@PostMapping("/save")
public ResultBean save(@RequestBody FinishProductInventoryDto dto){
return finishProductInventoryService.save(dto);
}
@ApiOperation("删除")
@GetMapping("/delete/{sid}")
public ResultBean delete(@PathVariable String sid){
return finishProductInventoryService.delete(sid);
}
@ApiOperation("修改")
@PostMapping("/update")
public ResultBean update(@RequestBody FinishProductInventoryDto dto){
return finishProductInventoryService.update(dto);
}
@ApiOperation("成品库记录 分页查询")
@PostMapping("/listPage")
public ResultBean<PagerVo<FinishProductInventoryVo>> listPage(PagerQuery<FinishProductInventoryQuery> pq){
ResultBean rb = ResultBean.fireFail();
PagerVo<FinishProductInventoryVo> listPage = finishProductInventoryService.listPage(pq);
return rb.success().setData(listPage);
}
}

63
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/finishproductinventory/FinishProductInventoryService.java

@ -0,0 +1,63 @@
package com.yxt.supervise.cyf.biz.finishproductinventory;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import com.yxt.supervise.cyf.api.finishproductinventory.FinishProductInventory;
import com.yxt.supervise.cyf.api.finishproductinventory.FinishProductInventoryDto;
import com.yxt.supervise.cyf.api.finishproductinventory.FinishProductInventoryQuery;
import com.yxt.supervise.cyf.api.finishproductinventory.FinishProductInventoryVo;
import org.springframework.stereotype.Service;
/**
* @author feikefei
* @create 2023-05-23-10:45
*/
@Service
public class FinishProductInventoryService extends MybatisBaseService<FinishProductInventoryMapper, FinishProductInventory> {
public ResultBean save(FinishProductInventoryDto dto){
ResultBean rb = ResultBean.fireFail();
Integer integer = baseMapper.selectByProdSid(dto.getProdSid());
if (integer != 0){
return rb.success().setMsg("该品牌已存在库存");
}
FinishProductInventory record = new FinishProductInventory();
BeanUtil.copyProperties(dto,record,"id","sid");
baseMapper.insert(record);
return rb.success().setMsg("添加成功");
}
public ResultBean delete(String sid){
ResultBean rb = ResultBean.fireFail();
baseMapper.delete(new QueryWrapper<FinishProductInventory>().eq("sid",sid));
return rb.success().setMsg("删除成功");
}
public ResultBean update(FinishProductInventoryDto dto){
ResultBean rb = ResultBean.fireFail();
FinishProductInventory finishProductInventory = fetchBySid(dto.getSid());
BeanUtil.copyProperties(dto,finishProductInventory,"id","sid");
baseMapper.updateById(finishProductInventory);
return rb.success().setMsg("修改成功");
}
public PagerVo<FinishProductInventoryVo> listPage(PagerQuery<FinishProductInventoryQuery> pq){
FinishProductInventoryQuery params = pq.getParams();
QueryWrapper<FinishProductInventory> wq = new QueryWrapper<>();
if (params != null){
if (!params.getInformationNumber().equals("")){
wq.eq("i.number",params.getInformationNumber());
}
}
IPage<FinishProductInventory> page = PagerUtil.queryToPage(pq);
IPage<FinishProductInventoryVo> pageVo = baseMapper.selectPageVo(page, wq);
PagerVo<FinishProductInventoryVo> pageToVo = PagerUtil.pageToVo(pageVo, null);
return pageToVo;
}
}

6
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/materialinventoryrecord/MaterialInventoryRecordService.java

@ -1,6 +1,7 @@
package com.yxt.supervise.cyf.biz.materialinventoryrecord;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.common.base.service.MybatisBaseService;
@ -15,6 +16,8 @@ import com.yxt.supervise.cyf.api.materialinventoryrecord.MaterialInventoryRecord
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Date;
/**
* @author wangpengfei
* @date 2023/5/4 14:37
@ -42,6 +45,9 @@ public class MaterialInventoryRecordService extends MybatisBaseService<MaterialI
ResultBean rb=new ResultBean();
MaterialInventoryRecord entity=new MaterialInventoryRecord();
BeanUtil.copyProperties(dto, entity, "id", "sid");
Date curDate = new Date();
String dfmt = DateUtil.format(curDate, "yyyy-MM-dd");
entity.setInventoryDate(dfmt);
baseMapper.insert(entity);
return rb.success().setMsg("新增成功");
}

2
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/packaginginventoryrecord/PackagingInventoryRecordMapper.xml

@ -5,7 +5,7 @@
<!-- ${ew.customSqlSegment} -->
<select id="selectPageVo" resultType="com.yxt.supervise.cyf.api.packaginginventoryrecord.PackagingInventoryRecordVo">
SELECT
*,i.name as name,i.inventory as inventory,t.name as typeName;
*,i.name as name,i.inventory as inventory,t.name as typeName
FROM
packaging_inventory_record r
left join packaging_inventory i on r.inventorySid =i.sid

11
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/packaginginventoryrecord/PackagingInventoryRecordService.java

@ -1,6 +1,7 @@
package com.yxt.supervise.cyf.biz.packaginginventoryrecord;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.common.base.service.MybatisBaseService;
@ -8,13 +9,18 @@ import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import com.yxt.supervise.cyf.api.packaginginventory.PackagingInventory;
import com.yxt.supervise.cyf.api.packaginginventoryrecord.PackagingInventoryRecord;
import com.yxt.supervise.cyf.api.packaginginventoryrecord.PackagingInventoryRecordDto;
import com.yxt.supervise.cyf.api.packaginginventoryrecord.PackagingInventoryRecordQuery;
import com.yxt.supervise.cyf.api.packaginginventoryrecord.PackagingInventoryRecordVo;
import com.yxt.supervise.cyf.biz.packaginginventory.PackagingInventoryService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
/**
* @author wangpengfei
* @date 2023/5/4 14:37
@ -22,6 +28,8 @@ import org.springframework.stereotype.Service;
@Service
public class PackagingInventoryRecordService extends MybatisBaseService<PackagingInventoryRecordMapper, PackagingInventoryRecord> {
@Autowired
PackagingInventoryService packagingInventoryService;
public PagerVo<PackagingInventoryRecordVo> listPageVo(PagerQuery<PackagingInventoryRecordQuery> pq) {
PackagingInventoryRecordQuery query = pq.getParams();
@ -42,6 +50,9 @@ public class PackagingInventoryRecordService extends MybatisBaseService<Packagin
ResultBean rb=new ResultBean();
PackagingInventoryRecord entity=new PackagingInventoryRecord();
BeanUtil.copyProperties(dto, entity, "id", "sid");
Date curDate = new Date();
String dfmt = DateUtil.format(curDate, "yyyy-MM-dd");
entity.setInventoryDate(dfmt);
baseMapper.insert(entity);
return rb.success().setMsg("新增成功");
}

2
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/packagingoutbound/PackagingOutboundService.java

@ -38,7 +38,7 @@ public class PackagingOutboundService extends MybatisBaseService<PackagingOutbou
PackagingOutboundQuery query = pq.getParams();
QueryWrapper<PackagingOutbound> qw = new QueryWrapper<>();
if (StringUtils.isNotBlank(query.getDate())) {
qw.eq("STR_TO_DATE(o.deliverDate,'%Y-%m-%d')", query.getDate());
qw.eq("STR_TO_DATE(o.deliveryDate,'%Y-%m-%d')", query.getDate());
}
if (StringUtils.isNotBlank(query.getContractNumber())) {
qw.like("o.salesContractNumber", query.getContractNumber());

2
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/packagingstorage/PackagingStorageService.java

@ -40,7 +40,7 @@ public class PackagingStorageService extends MybatisBaseService<PackagingStorage
qw.eq("STR_TO_DATE(s.warehousingDate,'%Y-%m-%d')", query.getDate());
}
if (StringUtils.isNotBlank(query.getContractNumber())) {
qw.like("s.salesContractNumber", query.getContractNumber());
qw.like("s.contractNumber", query.getContractNumber());
}
IPage<PackagingStorage> page = PagerUtil.queryToPage(pq);
IPage<PackagingStorageVo> pagging = baseMapper.selectPageVo(page, qw);

5
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/productinformation/ProductInformationMapper.java

@ -24,4 +24,9 @@ public interface ProductInformationMapper extends BaseMapper<ProductInformation>
@Select("select * from product_information")
List<ProductInformation> selectList();
@Select("select count(*) from product_information where number = #{number}")
Integer selectInformationByNumber(@Param("number") String number);
@Select("select count(*) from product_information where name = #{name}")
Integer selectInformationByName(@Param("name") String name);
}

8
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/productinformation/ProductInformationMapper.xml

@ -4,10 +4,10 @@
<!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} -->
<select id="selectPageVo" resultType="com.yxt.supervise.cyf.api.productinformation.ProductInformationVo">
SELECT
*
FROM
product_information
select i.*,r.inventoryQuantity,p.amount
from product_information i
left join finis_prod_inven_record r on i.sid = r.prodSid
left join finish_product_inventory p on i.sid = p.prodSid
<where>
${ew.sqlSegment}
</where>

10
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/productinformation/ProductInformationService.java

@ -25,6 +25,14 @@ public class ProductInformationService extends MybatisBaseService<ProductInforma
public ResultBean save(ProductInformationDto dto){
ResultBean rb = ResultBean.fireFail();
Integer integer = baseMapper.selectInformationByNumber(dto.getNumber());
if (integer != 0){
return rb.setMsg("该品牌编码已占用");
}
Integer integer1 = baseMapper.selectInformationByName(dto.getName());
if (integer1 != 0){
return rb.setMsg("该品牌名称已存在");
}
ProductInformation information = new ProductInformation();
BeanUtil.copyProperties(dto,information,"id","sid");
baseMapper.insert(information);
@ -50,7 +58,7 @@ public class ProductInformationService extends MybatisBaseService<ProductInforma
ProductInformationQuery params = pq.getParams();
QueryWrapper<ProductInformation> qw = new QueryWrapper<>();
if (params.getName() != null && !params.getName().equals("")){
qw.eq("name",params.getName());
qw.eq("i.name",params.getName());
}
IPage<ProductInformation> page = PagerUtil.queryToPage(pq);
IPage<ProductInformationVo> vo = baseMapper.selectPageVo(page, qw);

28
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/producttype/ProductTypeMapper.java

@ -0,0 +1,28 @@
package com.yxt.supervise.cyf.biz.producttype;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.yxt.supervise.cyf.api.producttype.ProductType;
import com.yxt.supervise.cyf.api.producttype.ProductTypeVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author feikefei
* @create 2023-05-23-9:04
*/
@Mapper
public interface ProductTypeMapper extends BaseMapper<ProductType> {
IPage<ProductTypeVo> selectPageVo(IPage<ProductType> page, @Param(Constants.WRAPPER) Wrapper<ProductType> qw);
List<ProductType> selectProductType(@Param("sid") String sid);
Integer selectProductTypeByName(@Param("name") String name,@Param("prodSid") String prodSid);
Integer selectProductTypeByNumber(@Param("number") String number,@Param("prodSid") String prodSid);
}

23
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/producttype/ProductTypeMapper.xml

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yxt.supervise.cyf.biz.producttype.ProductTypeMapper">
<select id="selectPageVo" resultType="com.yxt.supervise.cyf.api.producttype.ProductTypeVo">
select p.id,p.sid,p.name,p.number,p.pSid,p.prodSid,i.name informationName,i.number informationNumber from product_type p
right join product_information i on p.prodSid = i.sid
<where>
${ew.sqlSegment}
</where>
</select>
<select id="selectProductType" resultType="com.yxt.supervise.cyf.api.producttype.ProductType">
select * from product_type where pSid = #{sid}
</select>
<select id="selectProductTypeByName" resultType="int">
select count(*) from product_type where name = #{name} and prodSid = #{prodSid}
</select>
<select id="selectProductTypeByNumber" resultType="int">
select count(*) from product_type where number = #{number} and prodSid = #{prodSid}
</select>
</mapper>

58
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/producttype/ProductTypeRest.java

@ -0,0 +1,58 @@
package com.yxt.supervise.cyf.biz.producttype;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import com.yxt.supervise.cyf.api.producttype.ProductTypeDto;
import com.yxt.supervise.cyf.api.producttype.ProductTypeQuery;
import com.yxt.supervise.cyf.api.producttype.ProductTypeVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* @author feikefei
* @create 2023-05-23-9:03
*/
@Api(tags = "商品类型信息")
@RestController
@RequestMapping("cyf/productType")
public class ProductTypeRest {
@Autowired
private ProductTypeService productTypeService;
@ApiOperation("增加")
@PostMapping("/save")
public ResultBean save(@RequestBody ProductTypeDto dto){
return productTypeService.save(dto);
}
@ApiOperation("删除")
@DeleteMapping("/delete/{sid}")
public ResultBean del(@PathVariable String sid){
return productTypeService.del(sid);
}
@ApiOperation("修改")
@PostMapping("/update")
public ResultBean update(@RequestBody ProductTypeDto dto){
return productTypeService.update(dto);
}
@ApiOperation("商品类型信息分页查询")
@PostMapping("/listPage")
public ResultBean<PagerVo<ProductTypeDto>> listPage(@RequestBody PagerQuery<ProductTypeQuery> pq){
ResultBean rb = ResultBean.fireFail();
PagerVo<ProductTypeVo> vo = productTypeService.listPage(pq);
return rb.success().setData(vo);
}
@ApiOperation("查询当前商品类别")
@GetMapping("/selectProductType/{sid}")
public ResultBean selectProductType(@PathVariable String sid){
return productTypeService.selectProductType(sid);
}
}

102
yxt-supervise-cyf/yxt-supervise-cyf-biz/src/main/java/com/yxt/supervise/cyf/biz/producttype/ProductTypeService.java

@ -0,0 +1,102 @@
package com.yxt.supervise.cyf.biz.producttype;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import com.yxt.supervise.cyf.api.producttype.ProductType;
import com.yxt.supervise.cyf.api.producttype.ProductTypeDto;
import com.yxt.supervise.cyf.api.producttype.ProductTypeQuery;
import com.yxt.supervise.cyf.api.producttype.ProductTypeVo;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author feikefei
* @create 2023-05-23-9:04
*/
@Service
public class ProductTypeService extends MybatisBaseService<ProductTypeMapper, ProductType> {
public ResultBean save(ProductTypeDto dto){
ResultBean rb = ResultBean.fireFail();
//拿到该品牌商品下的类别
List<ProductTypeDto> typeList = dto.getTypeList();
if (dto.getSid() != null){
for (ProductTypeDto productTypeDto : typeList){
Integer integer = baseMapper.selectProductTypeByName(productTypeDto.getName(),dto.getProdSid());
if (integer != 0) {
return rb.setMsg("该品牌商品已有此类型名称");
}
Integer integer1 = baseMapper.selectProductTypeByNumber(productTypeDto.getNumber(),dto.getProdSid());
if (integer1 != 0){
return rb.setMsg("该编码已有品牌商品类型占用");
}
ProductType type1 = new ProductType();
BeanUtil.copyProperties(productTypeDto,type1,"id","sid");
type1.setPSid(dto.getSid());
baseMapper.insert(type1);
}
return rb.success().setMsg("添加成功");
}else {
Integer integer = baseMapper.selectProductTypeByName(dto.getName(),dto.getProdSid());
if (integer != 0) {
return rb.setMsg("该品牌已有该商品");
}
Integer integer1 = baseMapper.selectProductTypeByNumber(dto.getNumber(),dto.getProdSid());
if (integer1 != 0){
return rb.setMsg("该编码已有品牌商品占用");
}
ProductType type = new ProductType();
BeanUtil.copyProperties(dto,type,"id","sid","typeList");
baseMapper.insert(type);
for (ProductTypeDto productTypeDto : typeList) {
ProductType type1 = new ProductType();
BeanUtil.copyProperties(productTypeDto,type1,"id","sid");
type1.setPSid(type.getSid());
baseMapper.insert(type1);
}
return rb.success().setMsg("添加成功");
}
}
public ResultBean del(String sid){
ResultBean rb = ResultBean.fireFail();
baseMapper.delete(new QueryWrapper<ProductType>().eq("sid",sid));
return rb.success().setMsg("删除成功");
}
public ResultBean update(ProductTypeDto dto){
ResultBean rb = ResultBean.fireFail();
ProductType productType = fetchBySid(dto.getSid());
BeanUtil.copyProperties(dto,productType,"id","sid");
baseMapper.updateById(productType);
return rb.success().setMsg("修改成功");
}
public PagerVo<ProductTypeVo> listPage(PagerQuery<ProductTypeQuery> pq){
ProductTypeQuery params = pq.getParams();
QueryWrapper<ProductType> wq = new QueryWrapper<>();
if (params != null){
if (!params.getName().equals("")){
wq.eq("p.name",params.getName());
}
}
wq.eq("pSid",'0');
IPage<ProductType> page = PagerUtil.queryToPage(pq);
IPage<ProductTypeVo> pageVo = baseMapper.selectPageVo(page, wq);
PagerVo<ProductTypeVo> vo = PagerUtil.pageToVo(pageVo, null);
return vo;
}
public ResultBean selectProductType(String sid){
ResultBean rb = ResultBean.fireFail();
List<ProductType> productTypes = baseMapper.selectProductType(sid);
return rb.success().setData(productTypes);
}
}

6
yxt-supervise-cyf/yxt-supervise-cyf-ui/.env.development

@ -5,9 +5,9 @@ ENV = 'development'
VUE_APP_BASE_API = '/api'
## 配置测试和本地开发时的 接口地址
# VUE_APP_URL = "http://5wchzg.natappfree.cc"
VUE_APP_URL = "http://192.168.1.177:7101"
VUE_APP_URL = "http://cg9jzr.natappfree.cc"
## VUE_APP_URL = "http://192.168.1.177:7101"
# VUE_APP_URL = "http://192.168.1.193:7101"
## VUE_APP_URL = "http://192.168.1.193:7101"
##VUE_APP_URL = "http://8.130.39.13:8112"

48
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/baseInfo/becomeoil/index.js

@ -0,0 +1,48 @@
import request from '@/utils/request'
let tokens = window.sessionStorage.getItem('tokenValue')
export default {
// 新增商品品牌
save: function(params) {
return request({
url: '/cyf/inventory/save',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json',
'token': tokens
}
})
},
// 查询产品
selectList: function(data) {
return request({
url: '/cyf/productInfo/selectList',
method: 'get',
data: data,
headers: {
'Content-Type': 'application/json',
'token': tokens
}
})
},
// 查询成品油库
listPage: function(params) {
return request({
url: '/cyf/inventory/listPage ',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json',
'token': tokens
}
})
},
// 查看类别
selectProductType: function(sid) {
return request({
url: '/cyf/productType/selectProductType/' + sid,
method: 'get'
})
},
}

24
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/baseInfo/commodityBrand/index.js

@ -69,6 +69,30 @@ export default {
}
})
},
// 添加类别
saveList: function(params) {
return request({
url: '/cyf/productType/save ',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json',
'token': tokens
}
})
},
// 修改商品名称
updateShop: function(params) {
return request({
url: '/cyf/productType/update ',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json',
'token': tokens
}
})
},
}

94
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/packagInAndOutBound/packagInAndOutBound.js

@ -0,0 +1,94 @@
import request from '@/utils/request'
let tokens = window.sessionStorage.getItem('tokenValue')
export default {
// 获取包装物类型
typeList: function(params) {
return request({
url: '/cyf/packtype/typeList',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json',
'token': tokens
}
})
},
// 获取包装物信息 by 类型sid
PackagList: function(sid) {
return request({
url: '/cyf/packinventory/getInventory/' + sid
})
},
// 入库
logPagerList: function(params) {
return request({
url: '/cyf/packstorage/listPage',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json',
'token': tokens
}
})
},
intAddInfo: function(data) {
return request({
url: '/cyf/packstorage/save',
method: 'post',
data: data
});
},
// 出库
// 查询分页列表
in112PagerList: function(params) {
return request({
url: '/cyf/packoutbound/listPage',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json',
'token': tokens
}
})
},
outAddInfo: function(data) {
return request({
url: '/cyf/packoutbound/save',
method: 'post',
data: data
});
},
// 盘库
inventoryPagerList: function(params) {
return request({
url: '/cyf/packrecord/listPage',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json',
'token': tokens
}
})
},
inventoryAddInfo: function(data) {
return request({
url: '/cyf/packrecord/save',
method: 'post',
data: data
});
},
}

910
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/layout/components/Sidebar/index.vue

@ -2,470 +2,530 @@
<div :class="{ 'has-logo': showLogo }">
<logo v-if="showLogo" :collapse="isCollapse" />
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-menu
:default-active="$route.path"
:background-color="variables.menuBg"
:text-color="variables.menuText"
:unique-opened="false"
:active-text-color="variables.menuActiveText"
:collapse-transition="false"
mode="vertical"
>
<sidebar-item
v-for="route in routes"
:key="route.path"
:item="route"
:base-path="route.path"
/>
<el-menu :default-active="$route.path" :background-color="variables.menuBg" :text-color="variables.menuText"
:unique-opened="false" :active-text-color="variables.menuActiveText" :collapse-transition="false"
mode="vertical">
<sidebar-item v-for="route in routes" :key="route.path" :item="route" :base-path="route.path" />
</el-menu>
</el-scrollbar>
</div>
</template>
<script>
import { mapGetters } from "vuex";
import Logo from "./Logo";
import SidebarItem from "./SidebarItem";
import variables from "@/styles/variables.scss";
import { getrolemenus, loginDetails } from "@/api/system/Role/role.js";
import { getStorage } from "@/utils/auth";
export default {
components: {
SidebarItem,
Logo,
},
data() {
return {
YongHuid: [],
// routes: [],
params: {
sourceSid: "9d048c07-7677-4774-9177-aa02b049ff06",
userSid: "",
},
routes: [
{
alwaysShow: true,
component: "supervise",
meta: {
icon: "el-icon-menu",
title: "库房登记",
},
name: "",
path: "/supervise",
children: [
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "油罐库存登记",
},
name: "/supervise/recordOilTank",
path: "/supervise/recordOilTank",
import {
mapGetters
} from "vuex";
import Logo from "./Logo";
import SidebarItem from "./SidebarItem";
import variables from "@/styles/variables.scss";
import {
getrolemenus,
loginDetails
} from "@/api/system/Role/role.js";
import {
getStorage
} from "@/utils/auth";
export default {
components: {
SidebarItem,
Logo,
},
data() {
return {
YongHuid: [],
// routes: [],
params: {
sourceSid: "9d048c07-7677-4774-9177-aa02b049ff06",
userSid: "",
},
routes: [{
alwaysShow: true,
component: "supervise",
meta: {
icon: "el-icon-menu",
title: "库房登记",
},
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "原油入库登记",
name: "",
path: "/supervise",
children: [{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "油罐库存登记",
},
name: "/supervise/recordOilTank",
path: "/supervise/recordOilTank",
},
name: "/supervise/oilTypeInBound",
path: "/supervise/oilTypeInBound",
},
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "原油出库登记",
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "原油入库登记",
},
name: "/supervise/oilTypeInBound",
path: "/supervise/oilTypeInBound",
},
name: "/supervise/oilTypeOutBound",
path: "/supervise/oilTypeOutBound",
},
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "成品入库登记",
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "原油出库登记",
},
name: "/supervise/oilTypeOutBound",
path: "/supervise/oilTypeOutBound",
},
name: "/supervise/EnterRegister",
path: "/supervise/EnterRegister",
},
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "成品出库登记",
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "包装物入库登记",
},
name: "/supervise/packagInBound",
path: "/supervise/packagInBound",
},
name: "/supervise/OutRegister",
path: "/supervise/OutRegister",
},
],
},
{
alwaysShow: true,
component: "inventory",
meta: {
icon: "el-icon-menu",
title: "库存管理",
},
name: "",
path: "/inventory",
children: [
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "油罐库存记录",
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "包装物出库登记",
},
name: "/supervise/packagOutBound",
path: "/supervise/packagOutBound",
},
name: "/inventory/oilTankList",
path: "/inventory/oilTankList",
},
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "原油入库记录",
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "包装物盘库登记",
},
name: "/supervise/packagInventory",
path: "/supervise/packagInventory",
},
name: "/inventory/oilTypeInBoundList",
path: "/inventory/oilTypeInBoundList",
},
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "原油出库记录",
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "成品入库登记",
},
name: "/supervise/EnterRegister",
path: "/supervise/EnterRegister",
},
name: "/inventory/oilTypeOutBoundList",
path: "/inventory/oilTypeOutBoundList",
},
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "库存信息",
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "成品出库登记",
},
name: "/supervise/OutRegister",
path: "/supervise/OutRegister",
},
name: "/inventory/oilTankInfo",
path: "/inventory/oilTankInfo",
],
},
{
alwaysShow: true,
component: "inventory",
meta: {
icon: "el-icon-menu",
title: "库存管理",
},
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "成品入库记录",
name: "",
path: "/inventory",
children: [{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "油罐登记库存记录",
},
name: "/inventory/oilTankList",
path: "/inventory/oilTankList",
},
name: "/inventory/EnterRecord",
path: "/inventory/EnterRecord",
},
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "成品出库记录",
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "原油入库记录",
},
name: "/inventory/oilTypeInBoundList",
path: "/inventory/oilTypeInBoundList",
},
name: "/inventory/OutRecord",
path: "/inventory/OutRecord",
},
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "商品盘库记录",
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "原油出库记录",
},
name: "/inventory/oilTypeOutBoundList",
path: "/inventory/oilTypeOutBoundList",
},
name: "/inventory/shopRecord",
path: "/inventory/shopRecord",
},
],
},
{
alwaysShow: true,
component: "baseInfo",
meta: {
icon: "el-icon-menu",
title: "基础信息",
},
name: "",
path: "/baseInfo",
children: [
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "原料类型",
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "油罐库存信息",
},
name: "/inventory/oilTankInfo",
path: "/inventory/oilTankInfo",
},
name: "/baseInfo/materialType",
path: "/baseInfo/materialType",
},
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "原料信息",
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "包装物入库记录",
},
name: "/inventory/packagInBoundList",
path: "/inventory/packagInBoundList",
},
name: "/baseInfo/materialInfo",
path: "/baseInfo/materialInfo",
},
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "包装物类型",
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "包装物出库记录",
},
name: "/inventory/packagOutBoundList",
path: "/inventory/packagOutBoundList",
},
name: "/baseInfo/packagType",
path: "/baseInfo/packagType",
},
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "包装物信息",
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "包装物盘库记录",
},
name: "/inventory/packagInventoryList",
path: "/inventory/packagInventoryList",
},
name: "/baseInfo/packagInfo",
path: "/baseInfo/packagInfo",
},
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "原油类型",
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "成品入库记录",
},
name: "/inventory/EnterRecord",
path: "/inventory/EnterRecord",
},
name: "/baseInfo/oilType",
path: "/baseInfo/oilType",
},
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "油罐信息",
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "成品出库记录",
},
name: "/inventory/OutRecord",
path: "/inventory/OutRecord",
},
name: "/baseInfo/oilTank",
path: "/baseInfo/oilTank",
},
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "流量仪器",
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "商品盘库记录",
},
name: "/inventory/shopRecord",
path: "/inventory/shopRecord",
},
name: "/baseInfo/flowInstrument",
path: "/baseInfo/flowInstrument",
],
},
{
alwaysShow: true,
component: "baseInfo",
meta: {
icon: "el-icon-menu",
title: "基础信息",
},
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "供应商信息",
name: "",
path: "/baseInfo",
children: [{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "原料类型",
},
name: "/baseInfo/materialType",
path: "/baseInfo/materialType",
},
name: "/baseInfo/supplier",
path: "/baseInfo/supplier",
},
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "商品品牌",
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "原料信息",
},
name: "/baseInfo/materialInfo",
path: "/baseInfo/materialInfo",
},
name: "/baseInfo/commodityBrand",
path: "/baseInfo/commodityBrand",
},
{
{
path: '/baseInfo/packagType',
component: () =>
import('@/views/baseInfo/packagType/index.vue'),
name: 'index',
meta: {
title: '包装物类型'
}
},
{
path: '/baseInfo/packagInfo',
component: () =>
import('@/views/baseInfo/packagInfo/index.vue'),
name: 'index',
meta: {
title: '包装物信息'
}
},
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "原油类型",
},
name: "/baseInfo/oilType",
path: "/baseInfo/oilType",
},
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "油罐信息",
},
name: "/baseInfo/oilTank",
path: "/baseInfo/oilTank",
},
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "流量仪器",
},
name: "/baseInfo/flowInstrument",
path: "/baseInfo/flowInstrument",
},
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "供应商信息",
},
name: "/baseInfo/supplier",
path: "/baseInfo/supplier",
},
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "商品品牌",
},
name: "/baseInfo/commodityBrand",
path: "/baseInfo/commodityBrand",
},
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "商品类别",
},
name: "/baseInfo/commodityFily",
path: "/baseInfo/commodityFily",
},
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "商品类别",
title: "成品油库存",
},
name: "/baseInfo/commodityFily",
path: "/baseInfo/commodityFily",
name: "/baseInfo/becomeoil",
path: "/baseInfo/becomeoil",
},
],
},
// {
// alwaysShow: true,
// component: 'index',
// meta: {
// icon: "el-icon-menu",
// title: ""
// },
// name: "/rawMaterialType/index",
// path: "/rawMaterialType/index"
// }, {
// alwaysShow: true,
// component: 'index',
// meta: {
// icon: "el-icon-menu",
// title: ""
// },
// name: "/rawMaterialInfo/index",
// path: "/rawMaterialInfo/index"
// }, {
// alwaysShow: true,
// component: 'index',
// meta: {
// icon: "el-icon-menu",
// title: ""
// },
// name: "/oilType/index",
// path: "/oilType/index"
// },
// {
// alwaysShow: true,
// component: 'index',
// meta: {
// icon: "el-icon-menu",
// title: ""
// },
// name: "/oilTank/index",
// path: "/oilTank/index"
// },
// {
// alwaysShow: true,
// component: 'index',
// meta: {
// icon: "el-icon-menu",
// title: ""
// },
// name: "/flowInstrument/index",
// path: "/flowInstrument/index"
// },
// {
// alwaysShow: true,
// component: 'index',
// meta: {
// icon: "el-icon-menu",
// title: ""
// },
// name: "/oilTypeInAndOutBound/index",
// path: "/oilTypeInAndOutBound/index"
// },
// {
// alwaysShow: true,
// component: 'index',
// meta: {
// icon: "el-icon-menu",
// title: ""
// },
// name: "/rawMaterialInAndOutBound/index",
// path: "/rawMaterialInAndOutBound/index"
// },
],
},
// {
// alwaysShow: true,
// component: 'index',
// meta: {
// icon: "el-icon-menu",
// title: ""
// },
// name: "/rawMaterialType/index",
// path: "/rawMaterialType/index"
// }, {
// alwaysShow: true,
// component: 'index',
// meta: {
// icon: "el-icon-menu",
// title: ""
// },
// name: "/rawMaterialInfo/index",
// path: "/rawMaterialInfo/index"
// }, {
// alwaysShow: true,
// component: 'index',
// meta: {
// icon: "el-icon-menu",
// title: ""
// },
// name: "/oilType/index",
// path: "/oilType/index"
// },
// {
// alwaysShow: true,
// component: 'index',
// meta: {
// icon: "el-icon-menu",
// title: ""
// },
// name: "/oilTank/index",
// path: "/oilTank/index"
// },
// {
// alwaysShow: true,
// component: 'index',
// meta: {
// icon: "el-icon-menu",
// title: ""
// },
// name: "/flowInstrument/index",
// path: "/flowInstrument/index"
// },
// {
// alwaysShow: true,
// component: 'index',
// meta: {
// icon: "el-icon-menu",
// title: ""
// },
// name: "/oilTypeInAndOutBound/index",
// path: "/oilTypeInAndOutBound/index"
// },
// {
// alwaysShow: true,
// component: 'index',
// meta: {
// icon: "el-icon-menu",
// title: ""
// },
// name: "/rawMaterialInAndOutBound/index",
// path: "/rawMaterialInAndOutBound/index"
// },
// {
// alwaysShow: true,
// component: 'index',
// meta: {
// icon: "el-icon-menu",
// title: ""
// },
// name: "/project/index",
// path: "/project/index"
// },
],
};
},
computed: {
...mapGetters(["sidebar"]),
// routes() {
// f4d2e507-c4ed-451c-b364-04c08f962045
// console.log('78979789', this.$router.options.routes)
// return this.$router.options.routes
// },
activeMenu() {
// const route = this.$route
// const {
// meta,
// path
// } = route
// // if set path, the sidebar will highlight the path you set
// if (meta.activeMenu) {
// return meta.activeMenu
// }
return "/index";
},
showLogo() {
return this.$store.state.settings.sidebarLogo;
},
variables() {
return variables;
// {
// alwaysShow: true,
// component: 'index',
// meta: {
// icon: "el-icon-menu",
// title: ""
// },
// name: "/project/index",
// path: "/project/index"
// },
],
};
},
isCollapse() {
return !this.sidebar.opened;
computed: {
...mapGetters(["sidebar"]),
// routes() {
// f4d2e507-c4ed-451c-b364-04c08f962045
// console.log('78979789', this.$router.options.routes)
// return this.$router.options.routes
// },
activeMenu() {
// const route = this.$route
// const {
// meta,
// path
// } = route
// // if set path, the sidebar will highlight the path you set
// if (meta.activeMenu) {
// return meta.activeMenu
// }
return "/index";
},
showLogo() {
return this.$store.state.settings.sidebarLogo;
},
variables() {
return variables;
},
isCollapse() {
return !this.sidebar.opened;
},
},
},
created() {
this.postHuoquyonghu();
},
methods: {
//
postHuoquyonghu() {
// var token = getStorage()
// loginDetails(token).then((response) => {
// console.log('resss', response)
// if (response.code === '200') {
// this.YongHuid = response.data
// this.params.userSid = this.YongHuid.sid
// getrolemenus(this.params).then((res) => {
// const userRoles = this.resRouter(res.data)
this.routes.push({
path: "*",
redirect: "/404",
hidden: true,
});
console.log("左侧菜单", this.routes);
return this.routes;
// })
// }
// })
created() {
this.postHuoquyonghu();
},
resRouter(menus) {
//
for (var i = 0; i < menus.length; i++) {
if (menus[i].children && menus[i].children.length != 0) {
this.resRouter(menus[i].children);
}
if (menus[i].children.length == 0) {
delete menus[i].children;
delete menus[i].redirect;
}
if (menus[i].component == "") {
console.log("55555", menus[i]);
menus[i] = {
path: menus[i].path,
component: "",
redirect: menus[i].path,
children: [menus[i]],
};
} else {
// menus[i] = {
// path: menus[i].path,
// component: '',
// redirect: menus[i].path,
// children: [menus[i]],
// }
methods: {
//
postHuoquyonghu() {
// var token = getStorage()
// loginDetails(token).then((response) => {
// console.log('resss', response)
// if (response.code === '200') {
// this.YongHuid = response.data
// this.params.userSid = this.YongHuid.sid
// getrolemenus(this.params).then((res) => {
// const userRoles = this.resRouter(res.data)
this.routes.push({
path: "*",
redirect: "/404",
hidden: true,
});
console.log("左侧菜单", this.routes);
return this.routes;
// })
// }
// })
},
resRouter(menus) {
//
for (var i = 0; i < menus.length; i++) {
if (menus[i].children && menus[i].children.length != 0) {
this.resRouter(menus[i].children);
}
if (menus[i].children.length == 0) {
delete menus[i].children;
delete menus[i].redirect;
}
if (menus[i].component == "") {
console.log("55555", menus[i]);
menus[i] = {
path: menus[i].path,
component: "",
redirect: menus[i].path,
children: [menus[i]],
};
} else {
// menus[i] = {
// path: menus[i].path,
// component: '',
// redirect: menus[i].path,
// children: [menus[i]],
// }
}
}
}
this.routes = menus;
console.log("左侧菜单", this.routes);
return menus;
this.routes = menus;
console.log("左侧菜单", this.routes);
return menus;
},
},
},
};
};
</script>

77
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/router/index.js

@ -68,7 +68,7 @@ export const constantRoutes = [{
meta: {
title: '原料信息'
}
},{
}, {
path: '/baseInfo/packagType',
component: () =>
import('@/views/baseInfo/packagType/index.vue'),
@ -137,7 +137,16 @@ export const constantRoutes = [{
import('@/views/baseInfo/commodityFily/index.vue'),
name: 'index',
meta: {
title: '商品档案'
title: '商品类别'
}
},
{
path: '/baseInfo/becomeoil',
component: () =>
import('@/views/baseInfo/becomeoil/index.vue'),
name: 'index',
meta: {
title: '商品类别'
}
},
]
@ -175,6 +184,33 @@ export const constantRoutes = [{
title: '原油出库登记'
}
},
{
path: '/supervise/packagInBound',
component: () =>
import('@/views/supervise/packagInBound/index.vue'),
name: 'index',
meta: {
title: '包装物入库登记'
}
},
{
path: '/supervise/packagOutBound',
component: () =>
import('@/views/supervise/packagOutBound/index.vue'),
name: 'index',
meta: {
title: '包装物出库登记'
}
},
{
path: '/supervise/packagInventory',
component: () =>
import('@/views/supervise/packagInventory/index.vue'),
name: 'index',
meta: {
title: '包装物盘库登记'
}
},
{
path: '/supervise/EnterRegister',
component: () =>
@ -203,14 +239,22 @@ export const constantRoutes = [{
},
children: [
{
path: '/inventory/oilTankInfo',
component: () =>
import('@/views/inventory/oilTankInfo/index.vue'),
name: 'index',
meta: {
title: '油罐库存信息'
}
},{
path: '/inventory/oilTankList',
component: () =>
import('@/views/inventory/oilTankList/index.vue'),
name: 'index',
meta: {
title: '油罐库存记录'
title: '油罐登记库存记录'
}
},{
}, {
path: '/inventory/oilTypeInBoundList',
component: () =>
import('@/views/inventory/oilTypeInBoundList/index.vue'),
@ -228,13 +272,32 @@ export const constantRoutes = [{
title: '原油出库记录'
}
},
{
path: '/inventory/oilTankInfo',
path: '/supervise/packagInBound',
component: () =>
import('@/views/inventory/oilTankInfo/index.vue'),
import('@/views/supervise/packagInBound/index.vue'),
name: 'index',
meta: {
title: '包装物入库登记'
}
},
{
path: '/supervise/packagOutBound',
component: () =>
import('@/views/supervise/packagOutBound/index.vue'),
name: 'index',
meta: {
title: '包装物出库登记'
}
},
{
path: '/supervise/packagInventory',
component: () =>
import('@/views/supervise/packagInventory/index.vue'),
name: 'index',
meta: {
title: '库存信息'
title: '包装物盘库登记'
}
},
{

164
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/becomeoil/commodity.vue

@ -0,0 +1,164 @@
<template>
<div>
<div class="tab-header webtop">
<!-- 标题 -->
<div>成品油库存添加</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="listconadd">
<el-card class="box-card">
<div class="item">
<span class="item_text">商品名称:</span>
<el-select v-model="formobj.prodSid" placeholder="" class="item_input" >
<el-option v-for="(item,i) in sidlist" :key="i" :label="item.name" :value="item.sid" />
</el-select>
</div>
<div class="item">
<span class="item_text">数量:</span>
<el-input v-model="formobj.amount" placeholder="请输入数量" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">编号:</span>
<el-input v-model="formobj.number" placeholder="请输入编码" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">单价():</span>
<el-input v-model="formobj.price" placeholder="请输入单价" class="item_input" clearable />
</div>
</el-card>
</div>
</div>
</template>
<script>
import req from '@/api/baseInfo/becomeoil/index.js'
export default {
data() {
return {
submitdisabled: false,
crudeLists: [],
crudeList: [],
sidlist:[],
formobj: {
amount: "",
number: "",
price:'',
prodSid:'',
},
}
},
created() {
this.last()
},
methods: {
saveOrUpdate() {
req.save(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
},
last(){
req.selectList().then((response) => {
this.listLoading = false
if (response.success) {
this.sidlist = response.data
} else {
this.sidlist = []
}
})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
name: "",
number: "",
}
this.$emit('doback')
},
}
}
</script>
<style lang="scss">
.box-card {
margin-left: 60px;
margin-right: 60px;
min-width: 70%;
margin-top: 20px;
.item {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 15px;
height: 40px;
line-height: 40px;
.item_text {
flex: 0.8;
font-size: 18px;
text-align: right;
}
.item_input {
flex: 4;
font-size: 16px;
margin-left: 10px;
margin-right: 80px;
}
.item_left_input {
width: 20%;
}
.item_left_text {
height: 30px;
margin-left: 20px;
line-height: 30px;
color: #018AD2;
padding: 0px 15px;
border: 1.5px solid #018AD2;
border-radius: 5px;
}
.item_right {
flex: 1;
justify-items: center;
.item_right_list_text {
font-size: 16px;
}
.item_right_list_delect {
color: #5E94FF;
margin-left: 20px;
font-size: 16px;
text-decoration: underline;
}
}
}
}
</style>

299
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/becomeoil/index.vue

@ -0,0 +1,299 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<button-bar
view-title="成品油类型"
ref="btnbar"
:btndisabled="btndisabled"
@btnhandle="btnHandle"
/>
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{
searchxianshitit
}}</el-button>
<div v-show="isSearchShow" class="search">
<el-form
ref="listQueryform"
:inline="true"
:model="listQuery"
label-width="80px"
class="tab-header"
>
<el-form-item label="成品油名称">
<el-input
v-model="listQuery.params.name"
maxlength="20"
placeholder="请输入成品油名称"
class="addinputw"
clearable
/>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center">
<el-button
type="primary"
icon="el-icon-search"
size="small"
@click="handleReset"
>查询</el-button
>
<el-button
type="primary"
icon="el-icon-refresh"
size="small"
@click="handleFilter"
>重置</el-button
>
</div>
</div>
</div>
<div class="listtop">
<div class="tit">成品油列表</div>
</div>
<div class="">
<el-table
v-loading="listLoading"
:data="list"
border
style="width: 100%"
>
<!-- <el-table-column type="selection" align="center" width="50"/> -->
<el-table-column
label="序号"
type="index"
width="80"
:index="indexMethod"
align="center"
/>
<el-table-column label="操作" align="center" width="150px">
<template slot-scope="scope">
<el-button
type="primary"
size="mini"
@click="purchase(scope.row)"
>
编辑
</el-button>
</template>
</el-table-column>
<el-table-column label="品牌名称" prop="name" align="center" />
<el-table-column label="品牌编号" prop="informationNumber" align="center" />
<el-table-column label="数量" prop="amount" align="center" />
<el-table-column label="单价" prop="price" align="center" />
<el-table-column label="成品油编号" prop="number" align="center" />
</el-table>
</div>
<div class="pages">
<pagination
v-show="list.length > 0"
:total="listQuery.total"
:page.sync="listQuery.current"
:limit.sync="listQuery.size"
class="pagination"
@pagination="getList"
/>
</div>
</div>
</div>
<oilTankAdd
v-show="viewState == 2 || viewState == 3"
ref="divAdd"
@doback="resetState"
@reloadlist="getList"
/>
<!-- <oilTypeInfo v-show="viewState ==4" ref="divInfo" @doback="resetState" @reloadlist="getList" /> -->
<el-dialog title="修改产品类型" :visible.sync="editDialog" width="40%">
<table class="e-table" cellspacing="0">
<tr>
<td>类型名称</td>
<td>
<el-input v-model="form.name" style="width: 300px"></el-input>
</td>
</tr>
<tr>
<td>类型编号</td>
<td>
<el-input v-model="form.number" style="width: 300px"></el-input>
</td>
</tr>
</table>
<div style="margin-top: 20px; text-align: center">
<el-button type="primary" @click="save()">保存</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import req from "@/api/baseInfo/becomeoil/index.js";
import Pagination from "@/components/pagination";
import pageye from "@/components/pagination/pageye";
import ButtonBar from "@/components/ButtonBar";
import oilTankAdd from "./commodity.vue";
// import oilTypeInfo from './oilTypeInfo.vue'
export default {
name: "CustomerManagement",
components: {
Pagination,
pageye,
ButtonBar,
oilTankAdd,
// oilTypeInfo,
},
data() {
return {
listLoading: false,
btndisabled: false,
editDialog: false,
form: {
name: "",
number: "",
sid: "",
},
btnList: [
{
type: "primary",
size: "small",
icon: "plus",
btnKey: "toAdd",
btnLabel: "新增",
},
{
type: "info",
size: "small",
icon: "cross",
btnKey: "doClose",
btnLabel: "关闭",
},
],
isSearchShow: false,
searchxianshitit: "显示查询条件",
list: [],
listQuery: {
current: 1,
size: 10,
params: {
name: "",
},
total: 0,
},
viewState: 1,
};
},
mounted() {
this.$refs["btnbar"].setButtonList(this.btnList);
},
created() {
this.init();
//
},
methods: {
btnHandle(btnKey) {
switch (btnKey) {
case "toAdd":
this.toAdd();
break;
case "doClose":
this.doClose();
break;
default:
break;
}
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow;
if (this.isSearchShow) {
this.searchxianshitit = "隐藏查询条件";
} else {
this.searchxianshitit = "显示查询条件";
}
},
//
init() {
this.getList();
},
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size;
var pageindex = index + 1 + pagestart;
return pageindex;
},
//
getList() {
this.listLoading = true;
req.listPage(this.listQuery).then((response) => {
this.listLoading = false;
if (response.success) {
this.list = response.data.records;
this.listQuery.total = response.data.total;
} else {
this.list = [];
this.listQuery.total = 0;
}
});
},
//
handleReset() {
this.listQuery.current = 1;
this.getList();
},
//
handleFilter() {
this.listQuery = {
current: 1,
size: 10,
total: 0,
params: {
name: "",
},
};
this.getList();
},
//
toAdd() {
this.viewState = 2;
},
purchase(row) {
this.editDialog = true;
this.form = Object.assign({}, row);
this.form.sid = row.sid;
},
save() {
req
.update(this.form)
.then((resp) => {
if (resp.success) {
this.$message({
showClose: true,
type: "success",
message: resp.msg,
});
this.editDialog = false;
this.getList();
} else {
// resp.code
}
})
.catch(() => {});
this.reset();
},
reset() {
this.form = {};
},
resetState() {
this.viewState = 1;
},
doClose() {
this.$store.dispatch("tagsView/delView", this.$route);
this.$router.go(-1);
},
},
};
</script>
<style scoped>
</style>

8
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/commodityBrand/index.vue

@ -7,7 +7,7 @@
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="80px" class="tab-header">
<el-form-item label="类型名称">
<el-form-item label="品牌名称">
<el-input v-model="listQuery.params.name" maxlength="20" placeholder="请输入类型名称" class="addinputw"
clearable />
</el-form-item>
@ -38,8 +38,10 @@
</el-button>
</template>
</el-table-column>
<el-table-column label="类型名称" prop="name" align="center" />
<el-table-column label="类型编号" prop="number" align="center" />
<el-table-column label="品牌名称" prop="name" align="center" />
<el-table-column label="品牌编号" prop="number" align="center" />
<el-table-column label="品牌初始库存" prop="inventoryQuantity" align="center" />
<el-table-column label="品牌现有库存" prop="amount" align="center" />
</el-table>
</div>
<div class="pages">

397
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/commodityFily/commodity.vue

@ -1,200 +1,257 @@
<template>
<div>
<div class="tab-header webtop">
<!-- 标题 -->
<div>商品品牌</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div>
<div class="listconadd">
<div class="tab-header webtop">
<!-- 标题 -->
<div>添加商品类别</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<el-card class="box-card">
<div class="item">
<span class="item_text">品牌名称</span>
<el-select v-model="form.name" placeholder="请选择品牌名称" class="item_input" @change="getType">
<el-option v-for="(item,i) in crudeList" :key="i" :label="item.name" :value="item.number" />
</el-select>
</div>
<div class="item">
<span class="item_text">品牌编号</span>
<el-input v-model="form.number" placeholder="" :readonly="true" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">产品名称</span>
<el-select v-model="form.prodSid" placeholder="请选择产品名称" class="item_input" >
<el-option v-for="(item,i) in sidlist" :key="i" :label="item.name" :value="item.prodSid" />
</el-select>
</div>
<div class="item">
<span class="item_text">类别名称</span>
<el-input v-model="form.typeList.name" placeholder="" class="item_input" clearable />
</div>
</el-card>
<div class="listconadd">
<el-card class="box-card" >
<div class="item">
<span class="item_text">类别名称</span>
<el-input v-model="form.name" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">类别名称编号</span>
<el-input v-model="form.number" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">品牌名称</span>
<el-select v-model="form.prodSid" placeholder="" class="item_input" >
<el-option v-for="(item,i) in sidlist" :key="i" :label="item.name" :value="item.sid" />
</el-select>
</div>
<div class="item" >
<span style="font-size: 18px;margin-left: 90px;padding-right: 10px;">添加类别</span>
<el-button @click="caozuo" type="primary">操作</el-button>
</div>
</el-card>
</div>
</template>
<script>
import req from '@/api/baseInfo/commodityBrand/index.js'
export default {
data() {
return {
submitdisabled: false,
crudeList: [],
crudeLists: [],
flowmeterLists: [],
flowmeterList: [],
sidlist: [],
form: {
<el-dialog title="添加商品类别" :visible.sync="entry" width="60%">
<el-form ref="form" :inline="true" :model="form" label-width="80px">
<div v-for="(item, index) in form.typeList" :key="index">
<el-form-item
label="类别名称"
:prop="'typeList.' + index + '.name'"
for="inputID"
>
<el-input id="inputID" v-model="item.name"></el-input>
</el-form-item>
<el-form-item
label="类别编码"
:prop="'typeList.' + index + '.number'"
for="inputIDs"
>
<el-input id="inputIDs" v-model="item.number"></el-input>
</el-form-item>
<el-form-item>
<el-button v-if="index+1 == form.typeList.length" @click="addItem(item,index)" size="small" type="primary">增加</el-button>
<el-button v-if="index !== 0" @click="deleteItem(item, index)" size="small" type="danger">删除</el-button>
</el-form-item>
</div>
<div style="margin-top: 20px;margin-left: 40px; ">
<el-button type="primary" @click="trues()">确定</el-button>
</div>
</el-form>
</el-dialog>
</div>
</template>
<script>
import req from '@/api/baseInfo/commodityBrand/index.js'
export default {
data() {
return {
submitdisabled: false,
entry: false,
sidlist: [],
form: {
name: "",
number: "",
prodSid:'',
typeList:[{
name: "",
number: "",
prodSid:'',
typeList:[
{
name:'',
number:''
}
]
},
listQuery: {
current: 1,
size: 100,
params: {
name:''
},
number: ""
}]
},
arry: {
name:'',
number:''
},
listQuery: {
current: 1,
size: 100,
params: {
name:''
},
}
},
created() {
this.getlist()
this.getSid()
},
methods: {
saveOrUpdate() {
// req.save(this.formobj)
// .then(resp => {
// if (resp.success) {
// this.$message({
// showClose: true,
// type: 'success',
// message: resp.msg
// })
// this.handleReturn("true")
// } else {
// // resp.code
// }
// })
// .catch(() => {})
console.log(this.form)
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.form = {
}
},
created() {
this.getlist()
},
methods: {
saveOrUpdate() {
let arrlist=this.form.typeList
let lastlist=arrlist.slice(-1)
if(this.form.name && this.form.number && this.form.prodSid){
if(lastlist[0].name && lastlist[0].number){
req.saveList(this.form)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
this.form= {
name: "",
number: "",
}
this.$emit('doback')
},
getlist(){
req.selectList().then((res)=>{
if (res.success) {
this.crudeLists = res.data
for (var i = 0; i < this.crudeLists.length; i++) {
let item = {
name: this.crudeLists[i].name,
number: this.crudeLists[i].number,
}
this.crudeList.push(item)
prodSid:'',
typeList:[{
name: "",
number: ""
}]
}
}else{
this.$alert('检测到您未输入类别内容,请输入或删除', '提示信息', {
confirmButtonText: '确定',
callback: action => {
this.entry=true
}
})
},
getType(value) {
const choose = this.crudeLists.filter((item) => item.number === value)
this.form.name = choose[0].name
this.form.number = value
console.log(this.form);
},
getSid(){
req.listPages(this.listQuery).then((res)=>{
this.sidlist = res.data.records
})
});
}
}else{
this.$message({
message: '请检查内容是否填写',
type: 'warning'
});
}
}
}
</script>
<style lang="scss">
.box-card {
margin-left: 60px;
margin-right: 60px;
min-width: 70%;
margin-top: 20px;
.item {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 15px;
height: 40px;
line-height: 40px;
.item_text {
flex: 0.8;
font-size: 18px;
text-align: right;
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.$emit('doback')
},
getlist(){
req.selectList().then((res)=>{
if (res.success) {
this.sidlist = res.data
}
.item_input {
flex: 4;
font-size: 16px;
margin-left: 10px;
margin-right: 80px;
})
},
addItem(item) {
if(item.name && item.number){
this.form.typeList.push({
name: "",
number: ""
});
}else{
this.$message({
message: '请输入内容后在添加',
type: 'warning'
});
}
.item_left_input {
width: 20%;
},
sure(form) {
console.log(this.form.typeList.length, "length");
this.$refs[form].validate(valid => {
if (valid) {
alert("submit!");
} else {
console.log("error submit!!");
return false;
}
});
},
deleteItem(item, index) {
this.form.typeList.splice(index, 1);
console.log(this.form.typeList, "删除");
},
caozuo(){
this.entry=true
},
trues(){
this.entry=false
console.log(this.form);
}
}
}
</script>
<style lang="scss">
.box-card {
margin-left: 60px;
margin-right: 60px;
min-width: 70%;
margin-top: 20px;
.item_left_text {
height: 30px;
margin-left: 20px;
line-height: 30px;
color: #018AD2;
padding: 0px 15px;
border: 1.5px solid #018AD2;
border-radius: 5px;
.item {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 15px;
height: 40px;
line-height: 40px;
.item_text {
flex: 0.8;
font-size: 18px;
text-align: right;
}
}
.item_input {
flex: 4;
font-size: 16px;
margin-left: 10px;
margin-right: 80px;
}
.item_right {
flex: 1;
justify-items: center;
.item_left_input {
width: 20%;
}
.item_right_list_text {
font-size: 16px;
}
.item_left_text {
height: 30px;
margin-left: 20px;
line-height: 30px;
color: #018AD2;
padding: 0px 15px;
border: 1.5px solid #018AD2;
border-radius: 5px;
.item_right_list_delect {
color: #5E94FF;
margin-left: 20px;
font-size: 16px;
text-decoration: underline;
}
}
.item_right {
flex: 1;
justify-items: center;
.item_right_list_text {
font-size: 16px;
}
.item_right_list_delect {
color: #5E94FF;
margin-left: 20px;
font-size: 16px;
text-decoration: underline;
}
}
}
</style>
}
</style>

243
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/commodityFily/index.vue

@ -36,12 +36,30 @@
>
查看
</el-button>
<el-button
type="primary"
size="mini"
@click="addshop(scope.row)"
>
添加
</el-button>
</template>
</el-table-column>
<el-table-column label="商品品牌" prop="informationName" align="center" />
<el-table-column label="品牌名称" prop="informationName" align="center" />
<el-table-column label="品牌编码" prop="informationNumber" align="center" />
<el-table-column label="商品名称" prop="name" align="center" />
<el-table-column label="名称编号" prop="number" align="center" />
<el-table-column label="类别名称" prop="name" align="center" />
<el-table-column label="类别名称编号" prop="number" align="center" />
<el-table-column label="操作" align="center" width="150px">
<template slot-scope="scope">
<el-button
type="primary"
size="mini"
@click="modifyThe(scope.row)"
>
修改
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="pages">
@ -53,22 +71,127 @@
</div>
<oilTankAdd v-show="viewState ==2 || viewState ==3" ref="divAdd" @doback="resetState" @reloadlist="getList" />
<!-- <oilTypeInfo v-show="viewState ==4" ref="divInfo" @doback="resetState" @reloadlist="getList" /> -->
<el-dialog title="查看商品类别" :visible.sync="editDialog" width="40%">
<el-table ref="datalist" :data="datalist" border style="width: 100%">
<el-table-column
property="name"
label="商品类别"
align="center"
></el-table-column>
<el-dialog title="查看商品类别" :visible.sync="editDialog" width="40%">
<el-table ref="datalist" :data="datalist" border style="width: 100%">
<el-table-column
property="name"
label="商品类别"
align="center"
></el-table-column>
<el-table-column
property="number"
label="类别编码"
align="center"
></el-table-column>
<el-table-column label="操作" align="center" width="100px">
<template slot-scope="scope">
<el-button
type="primary"
size="mini"
@click="category(scope.row)"
>
修改
</el-button>
</template>
</el-table-column>
</el-table>
</el-dialog>
<el-dialog title="添加商品类别" :visible.sync="entry" width="40%">
<table class="e-table" cellspacing="0">
<tr>
<td>品牌名称</td>
<td>
<el-input
v-model="shopName"
style="width: 300px"
readonly
></el-input>
</td>
</tr>
<tr>
<td>商品名称</td>
<td>
<el-input
v-model="shopsName"
style="width: 300px"
readonly
></el-input>
</td>
</tr>
<tr>
<td>类别名称</td>
<td>
<el-input v-model="arry.name" style="width: 300px" placeholder="" />
</td>
</tr>
<tr>
<td>类别编码</td>
<td>
<el-input v-model="arry.number" style="width: 300px" placeholder="" />
</td>
</tr>
</table>
<div style="margin-top: 20px;margin-left: 400px; ">
<el-button type="primary" @click="addShop()">保存</el-button>
</div>
</el-dialog>
<el-dialog title="修改商品" :visible.sync="modify" width="40%">
<table class="e-table" cellspacing="0">
<tr>
<td>品牌名称</td>
<td>
<el-input v-model="shopName" style="width: 300px" readonly placeholder="" />
</td>
</tr>
<tr>
<td>品牌编码</td>
<td>
<el-input v-model="shopNum" style="width: 300px" readonly placeholder="" />
</td>
</tr>
<tr>
<td>商品名称</td>
<td>
<el-input
v-model="modifythe.name"
style="width: 300px"
></el-input>
</td>
</tr>
<tr>
<td>名称编号</td>
<td>
<el-input
v-model="modifythe.number"
style="width: 300px"
></el-input>
</td>
</tr>
</table>
<div style="margin-top: 20px;margin-left: 400px; ">
<el-button type="primary" @click="modifyList()">修改</el-button>
</div>
</el-dialog>
<el-dialog title="修改类别" :visible.sync="categorys" width="40%">
<table class="e-table" cellspacing="0">
<tr>
<td>类别名称</td>
<td>
<el-input v-model="modifyArray.name" style="width: 300px" placeholder="" />
</td>
</tr>
<tr>
<td>类别编码</td>
<td>
<el-input v-model="modifyArray.number" style="width: 300px" placeholder="" />
</td>
</tr>
</table>
<div style="margin-top: 20px;margin-left: 400px; ">
<el-button type="primary" @click="modifyCategory()">修改</el-button>
</div>
</el-dialog>
</div>
</template>
@ -94,6 +217,9 @@
listLoading: false,
btndisabled: false,
editDialog: false,
categorys: false,
entry: false,
modify: false,
form: {
name:'',
number:'',
@ -127,7 +253,28 @@
total: 0
},
viewState: 1,
datalist:[]
datalist:[],
forms: {
prodSid:'',
typeList:[]
},
shopName:'',
shopsName:'',
shopNum:'',
arry: {
name:'',
number:''
},
modifythe:{
sid:'',
name:'',
number:''
},
modifyArray:{
sid:'',
name:'',
number:''
}
}
},
mounted() {
@ -212,6 +359,78 @@
this.datalist=res.data
})
},
addshop(row) {
this.entry = true;
this.shopName=row.informationName
this.shopsName=row.name
this.forms.sid=row.sid
},
modifyThe(row) {
this.modify = true;
this.modifythe.sid=row.sid
this.shopName=row.informationName
this.shopNum=row.informationNumber
this.modifythe.name=row.name
this.modifythe.number=row.number
},
category(row) {
this.categorys = true;
this.editDialog = false;
this.modifyArray.sid=row.sid
this.modifyArray = Object.assign({}, row);
},
modifyCategory(){
req.updateShop(this.modifyArray).then((res)=>{
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: res.msg
})
this.categorys = false;
this.getList()
} else {
// resp.code
}
})
.catch(() => {})
},
modifyList(){
req.updateShop(this.modifythe).then((res)=>{
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: res.msg
})
this.modify = false;
this.getList()
} else {
// resp.code
}
})
.catch(() => {})
},
addShop(){
this.forms.typeList.push(this.arry)
req.saveList(this.forms)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.entry = false;
} else {
// resp.code
}
})
.catch(() => {})
this.arry={name:'',number:''}
},
save() {
req.update(this.form)
.then(resp => {

4
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/oilTankInfo/index.vue

@ -1,10 +1,10 @@
<template>
<div class="app-container">
<div v-show="viewState ==1">
<button-bar view-title="油罐信息" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<button-bar view-title="油罐库存信息信息" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<div class="main-content">
<div class="listtop">
<div class="tit">油罐列表</div>
<div class="tit">油罐库存列表</div>
</div>
<div >
<el-table ref="looktable" v-loading="listLoading" height="585" :data="list" border :summary-method="getSummaries" show-summary style="width: 100%;" >

389
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/packagInBoundList/index.vue

@ -0,0 +1,389 @@
<template>
<div class="app-container">
<div v-show="viewState ==1">
<button-bar ref="btnbar" view-title="包装物入库记录" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">
{{ searchxianshitit }}
</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="queryParams" :model="jmdListQuery" :inline="true" class="tab-header">
<el-form-item label="合同编号">
<el-input v-model="jmdListQuery.contractNumber" maxlength="20" placeholder="请输入合同编号" class="addinputw"
clearable />
</el-form-item>
<el-form-item label="入库日期">
<el-date-picker v-model="jmdListQuery.date" type="date" :picker-options="pickerOptions" clearable value-format="yyyy-MM-dd"
placeholder="选择日期" />
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</div>
</div>
</div>
<div>
<el-table v-loading="tableLoading1" :data="logList" border style="width: 100%">
<el-table-column fixed width="100" type="index" label="序号" :index="indexMethod" align="center" />
<el-table-column prop="contractNumber" label="合同编号" align="center" />
<el-table-column prop="supplierName" label="供货商" width="150" align="center" />
<el-table-column prop="contractSigningDate" label="合同日期" width="150" align="center" />
<el-table-column prop="licensePlateNumber" label="发货车牌号" width="150" align="center" />
<el-table-column prop="warehousingDate" label="入库日期" width="150" align="center" />
<el-table-column prop="typeName" label="包装物类型" width="150" align="center" />
<el-table-column prop="name" label="包装物名称" width="150" align="center" />
<el-table-column prop="weight" label="收料净重" width="150" align="center" />
<el-table-column prop="value" label="收料价值" width="150" align="center" />
<el-table-column prop="inventory" label="收料后库存" width="150" align="center" />
<el-table-column fixed="right" label="操作" width="100" align="center">
<template slot-scope="scope">
<el-button
type="primary"
size="mini"
@click="purchase(scope.row)"
>
查看详情
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="logListTotal > 0" :total="logListTotal" :page.sync="logListQuery.current"
:limit.sync="logListQuery.size" class="pagination" @pagination="loadLogList" />
</div>
</div>
<el-dialog
:title="dialogTitle + '详细信息'"
:visible.sync="editDialog"
width="60%"
>
<el-form ref="dataForm" :model="form" label-position="top" label-width="190px" class="formadd">
<div class="title" style="display: flex;align-items: center;justify-content: space-between;height:40px">
<div>原油信息</div>
</div>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">销售合同编号</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{form.contractNumber}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">签订时间</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{form.contractSigningDate}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">净重</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{form.weight}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">价值</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{form.value}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">发货车牌号</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{form.licensePlateNumber}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">入库日期</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{form.warehousingDate}}</span>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="描述:" >
<el-popover placement="left" trigger="hover">
<img :src="form.url" style="width: 600px;height: 600px">
<img slot="reference" :src="form.url" style="width: 200px;height: 200px">
</el-popover>
</el-form-item>
</el-form>
</el-dialog>
</div>
</div>
</template>
<script>
import req from '@/api/packagInAndOutBound/packagInAndOutBound'
import Pagination from '@/components/pagination'
import {
parseTime
} from '@/utils/index'
import ButtonBar from '@/components/ButtonBar'
export default {
components: {
ButtonBar,
Pagination,
},
data() {
return {
viewState: 1,
tabActiveName: 'uplog',
index: "0",
isSearchShow: false,
searchxianshitit: '显示查询条件',
btndisabled: false,
tableLoading1: false,
tableLoading2: false,
dialogTitle:'',
editDialog:false,
form:{},
btnList: [ //
// {
// type: 'success',
// size: 'small',
// icon: 'export',
// btnKey: 'build',
// btnLabel: ''
// },
// {
// type: 'primary',
// size: 'small',
// icon: 'plus',
// btnKey: 'toAdd1',
// btnLabel: ''
// },
// {
// type: 'primary',
// size: 'small',
// icon: 'plus',
// btnKey: 'toAdd2',
// btnLabel: ''
// },
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
logList: [],
logListQuery: {
current: 1,
size: 10
},
logListTotal: 1,
jmdListQuery: {
contractNumber: "",
date: ""
},
pickerOptions:{
disabledDate(time){
return time.getTime()> Date.now();// -8.64e7
}
}
}
},
mounted() {
//
this.$refs['btnbar'].setButtonList(this.btnList)
},
created() {
//
this.init()
},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
dosearch() {
this.loadLogList()
},
resetQuery() {
this.jmdListQuery = {
contractNumber: "",
date: ""
}
},
//
btnHandle(btnKey) {
switch (btnKey) {
case 'toAdd1': //
this.doAdd1()
break
case 'toAdd2': //
this.doAdd2()
break
case 'build': //
this.doBuild()
break
case 'doClose': //
this.doClose()
break
default:
break
}
},
init() {
this.loadLogList()
},
purchase(row){
this.dialogTitle = "数据";
this.editDialog = true;
req.selectStorageBySid(row.sid).then((res)=>{
this.form=res.data
})
},
handleOrder(tab, event) {
console.log("tab", tab)
// this.listQuery.status = tab.name;
// this.getList();
// this.orderDatas(tab.name);
this.index = tab.index
switch (tab.index) {
//
case "0":
if (this.logList.length == 0)
this.loadLogList()
break;
//
case "1":
if (this.in112List.length == 0)
this.loadIn112List()
break;
default:
break;
}
},
loadLogList() {
req.logPagerList({
current: this.logListQuery.current,
size: this.logListQuery.size,
params: this.jmdListQuery
}).then(response => {
if (response.code === '200' && response.data && response.data.total > 0) {
this.logList = response.data.records
this.logListTotal = response.data.total
this.logListQuery.current = response.data.current
this.logListQuery.size = response.data.size
} else {
this.logList = []
this.logListTotal = 0
}
})
},
//
indexMethod(index) {
var pagestart = (this.logListQuery.current - 1) * this.logListQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
doAdd1() {
this.viewState = 2
},
doAdd2() {
this.viewState = 3
},
//
doBuild() {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
exportExcel(this.jmdListQuery).then((resp) => {
loading.close()
const blob = new Blob([resp], {
type: 'application/vnd.ms-excel;charset=UTF-8'
})
const fileName = '库存明细列表' + '.xls'
const elink = document.createElement('a')
elink.download = fileName
elink.style.display = 'nonde'
elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
elink.click()
URL.revokeObjectURL(elink.href)
document.body.removeChild(elink)
}).catch(() => {
loading.close()
})
},
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
.wenjiantit {
font-size: 16px;
font-weight: bold;
margin: 25px 0 10px 0;
}
.forminfo {
margin: 0;
padding: 0;
}
.listcon {
height: calc(100vh - 250px);
overflow-y: auto;
overflow-x: hidden;
}
</style>

384
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/packagInventoryList/index.vue

@ -0,0 +1,384 @@
<template>
<div class="app-container">
<div v-show="viewState ==1">
<button-bar ref="btnbar" view-title="包装物入库记录" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">
{{ searchxianshitit }}
</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="queryParams" :model="jmdListQuery" :inline="true" class="tab-header">
<el-form-item label="包装物名称">
<el-input v-model="jmdListQuery.contractNumber" maxlength="20" placeholder="请输入包装物名称" class="addinputw"
clearable />
</el-form-item>
<el-form-item label="盘库日期">
<el-date-picker v-model="jmdListQuery.date" type="date" :picker-options="pickerOptions" clearable value-format="yyyy-MM-dd"
placeholder="选择日期" />
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</div>
</div>
</div>
<div>
<el-table v-loading="tableLoading1" :data="logList" border style="width: 100%">
<el-table-column fixed width="100" type="index" label="序号" :index="indexMethod" align="center" />
<el-table-column prop="inventoryDate" label="盘库日期" align="center" />
<el-table-column prop="typeName" label="包装物类型" align="center" />
<el-table-column prop="name" label="包装物名称" align="center" />
<el-table-column prop="inventory" label="库存" align="center" />
<el-table-column prop="value" label="价值" align="center" />
<!-- <el-table-column fixed="right" label="操作" width="100" align="center">
<template slot-scope="scope">
<el-button
type="primary"
size="mini"
@click="purchase(scope.row)"
>
查看详情
</el-button>
</template>
</el-table-column> -->
</el-table>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="logListTotal > 0" :total="logListTotal" :page.sync="logListQuery.current"
:limit.sync="logListQuery.size" class="pagination" @pagination="loadLogList" />
</div>
</div>
<el-dialog
:title="dialogTitle + '详细信息'"
:visible.sync="editDialog"
width="60%"
>
<el-form ref="dataForm" :model="form" label-position="top" label-width="190px" class="formadd">
<div class="title" style="display: flex;align-items: center;justify-content: space-between;height:40px">
<div>原油信息</div>
</div>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">销售合同编号</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{form.contractNumber}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">签订时间</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{form.contractSigningDate}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">净重</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{form.weight}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">价值</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{form.value}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">发货车牌号</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{form.licensePlateNumber}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">入库日期</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{form.warehousingDate}}</span>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="描述:" >
<el-popover placement="left" trigger="hover">
<img :src="form.url" style="width: 600px;height: 600px">
<img slot="reference" :src="form.url" style="width: 200px;height: 200px">
</el-popover>
</el-form-item>
</el-form>
</el-dialog>
</div>
</div>
</template>
<script>
import req from '@/api/packagInAndOutBound/packagInAndOutBound'
import Pagination from '@/components/pagination'
import {
parseTime
} from '@/utils/index'
import ButtonBar from '@/components/ButtonBar'
export default {
components: {
ButtonBar,
Pagination,
},
data() {
return {
viewState: 1,
tabActiveName: 'uplog',
index: "0",
isSearchShow: false,
searchxianshitit: '显示查询条件',
btndisabled: false,
tableLoading1: false,
tableLoading2: false,
dialogTitle:'',
editDialog:false,
form:{},
btnList: [ //
// {
// type: 'success',
// size: 'small',
// icon: 'export',
// btnKey: 'build',
// btnLabel: ''
// },
// {
// type: 'primary',
// size: 'small',
// icon: 'plus',
// btnKey: 'toAdd1',
// btnLabel: ''
// },
// {
// type: 'primary',
// size: 'small',
// icon: 'plus',
// btnKey: 'toAdd2',
// btnLabel: ''
// },
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
logList: [],
logListQuery: {
current: 1,
size: 10
},
logListTotal: 1,
jmdListQuery: {
contractNumber: "",
date: ""
},
pickerOptions:{
disabledDate(time){
return time.getTime()> Date.now();// -8.64e7
}
}
}
},
mounted() {
//
this.$refs['btnbar'].setButtonList(this.btnList)
},
created() {
//
this.init()
},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
dosearch() {
this.loadLogList()
},
resetQuery() {
this.jmdListQuery = {
contractNumber: "",
date: ""
}
},
//
btnHandle(btnKey) {
switch (btnKey) {
case 'toAdd1': //
this.doAdd1()
break
case 'toAdd2': //
this.doAdd2()
break
case 'build': //
this.doBuild()
break
case 'doClose': //
this.doClose()
break
default:
break
}
},
init() {
this.loadLogList()
},
purchase(row){
this.dialogTitle = "数据";
this.editDialog = true;
req.selectStorageBySid(row.sid).then((res)=>{
this.form=res.data
})
},
handleOrder(tab, event) {
console.log("tab", tab)
// this.listQuery.status = tab.name;
// this.getList();
// this.orderDatas(tab.name);
this.index = tab.index
switch (tab.index) {
//
case "0":
if (this.logList.length == 0)
this.loadLogList()
break;
//
case "1":
if (this.in112List.length == 0)
this.loadIn112List()
break;
default:
break;
}
},
loadLogList() {
req.inventoryPagerList({
current: this.logListQuery.current,
size: this.logListQuery.size,
params: this.jmdListQuery
}).then(response => {
if (response.code === '200' && response.data && response.data.total > 0) {
this.logList = response.data.records
this.logListTotal = response.data.total
this.logListQuery.current = response.data.current
this.logListQuery.size = response.data.size
} else {
this.logList = []
this.logListTotal = 0
}
})
},
//
indexMethod(index) {
var pagestart = (this.logListQuery.current - 1) * this.logListQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
doAdd1() {
this.viewState = 2
},
doAdd2() {
this.viewState = 3
},
//
doBuild() {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
exportExcel(this.jmdListQuery).then((resp) => {
loading.close()
const blob = new Blob([resp], {
type: 'application/vnd.ms-excel;charset=UTF-8'
})
const fileName = '库存明细列表' + '.xls'
const elink = document.createElement('a')
elink.download = fileName
elink.style.display = 'nonde'
elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
elink.click()
URL.revokeObjectURL(elink.href)
document.body.removeChild(elink)
}).catch(() => {
loading.close()
})
},
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
.wenjiantit {
font-size: 16px;
font-weight: bold;
margin: 25px 0 10px 0;
}
.forminfo {
margin: 0;
padding: 0;
}
.listcon {
height: calc(100vh - 250px);
overflow-y: auto;
overflow-x: hidden;
}
</style>

382
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/packagOutBoundList/index.vue

@ -0,0 +1,382 @@
<template>
<div class="app-container">
<div v-show="viewState ==1">
<button-bar ref="btnbar" view-title="包装物出库记录" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">
{{ searchxianshitit }}
</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="queryParams" :model="jmdListQuery" :inline="true" class="tab-header">
<el-form-item label="合同编号">
<el-input v-model="jmdListQuery.contractNumber" maxlength="20" placeholder="请输入合同编号" class="addinputw"
clearable />
</el-form-item>
<el-form-item label="出库日期">
<el-date-picker v-model="jmdListQuery.date" type="date" :picker-options="pickerOptions" clearable value-format="yyyy-MM-dd"
placeholder="选择日期" />
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</div>
</div>
</div>
<div>
<el-table v-loading="tableLoading2" :data="in112List" border style="width: 100%">
<el-table-column fixed width="100" type="index" label="序号" :index="indexMethod2" align="center" />
<el-table-column prop="salesContractNumber" label="合同编号" align="center" />
<el-table-column prop="contractSigningDate" label="合同日期" width="150" align="center" />
<el-table-column prop="deliveryDate" label="出库日期" width="150" align="center" />
<el-table-column prop="typeName" label="包装物类型" width="150" align="center" />
<el-table-column prop="name" label="包装物名称" width="150" align="center" />
<el-table-column prop="weight" label="净重" width="150" align="center" />
<el-table-column prop="value" label="价值" width="150" align="center" />
<el-table-column prop="inventory" label="库存剩余净重" width="150" align="center" />
<el-table-column fixed="right" label="操作" width="100" align="center">
<template slot-scope="scope">
<el-button
type="primary"
size="mini"
@click="purchase(scope.row)"
>
查看详情
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="in112ListTotal > 0" :total="in112ListTotal" :page.sync="in112ListQuery.current"
:limit.sync="in112ListQuery.size" class="pagination" @pagination="loadIn112List" />
</div>
</div>
</div>
<el-dialog
:title="dialogTitle + '详细信息'"
:visible.sync="editDialog"
width="60%"
>
<el-form ref="dataForm" :model="form" label-position="top" label-width="190px" class="formadd">
<div class="title" style="display: flex;align-items: center;justify-content: space-between;height:40px">
<div>原油信息</div>
</div>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">销售合同编号</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{form.salesContractNumber}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">签订时间</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{form.contractSigningDate}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">净重</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{form.weight}}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">价值</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{form.value}}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item class="trightb_item">
<span slot="label">出库日期</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="trightb_item">
<span>{{form.deliveryDate}}</span>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="描述:">
<el-popover placement="left" trigger="hover">
<img :src="form.url" style="width: 500px;height: 500px">
<img slot="reference" :src="form.url" style="width: 150px;height: 150px">
</el-popover>
</el-form-item>
</el-form>
</el-dialog>
</div>
</template>
<script>
import req from '@/api/packagInAndOutBound/packagInAndOutBound'
import Pagination from '@/components/pagination'
import {
parseTime
} from '@/utils/index'
import ButtonBar from '@/components/ButtonBar'
export default {
components: {
ButtonBar,
Pagination,
},
data() {
return {
viewState: 1,
tabActiveName: 'uplog',
index: "0",
isSearchShow: false,
searchxianshitit: '显示查询条件',
btndisabled: false,
tableLoading1: false,
tableLoading2: false,
dialogTitle:'',
editDialog:false,
form:{},
btnList: [ //
// {
// type: 'success',
// size: 'small',
// icon: 'export',
// btnKey: 'build',
// btnLabel: ''
// },
// {
// type: 'primary',
// size: 'small',
// icon: 'plus',
// btnKey: 'toAdd1',
// btnLabel: ''
// },
// {
// type: 'primary',
// size: 'small',
// icon: 'plus',
// btnKey: 'toAdd2',
// btnLabel: ''
// },
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
logList: [],
logListQuery: {
current: 1,
size: 10
},
logListTotal: 1,
in112List: [],
in112ListQuery: {
current: 1,
size: 10
},
in112ListTotal: 1,
jmdListQuery: {
contractNumber: "",
date: ""
},
pickerOptions:{
disabledDate(time){
return time.getTime()> Date.now();// -8.64e7
}
}
}
},
mounted() {
//
this.$refs['btnbar'].setButtonList(this.btnList)
},
created() {
//
this.init()
},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
dosearch() {
this.loadIn112List()
},
purchase(row){
this.dialogTitle = "数据";
this.editDialog = true;
req.getCrudeBySid(row.sid).then((res)=>{
this.form=res.data
})
},
resetQuery() {
this.jmdListQuery = {
contractNumber: "",
date: ""
}
},
//
btnHandle(btnKey) {
switch (btnKey) {
case 'toAdd1': //
this.doAdd1()
break
case 'toAdd2': //
this.doAdd2()
break
case 'build': //
this.doBuild()
break
case 'doClose': //
this.doClose()
break
default:
break
}
},
init() {
this.loadIn112List()
},
handleOrder(tab, event) {
console.log("tab", tab)
// this.listQuery.status = tab.name;
// this.getList();
// this.orderDatas(tab.name);
this.index = tab.index
switch (tab.index) {
//
case "0":
if (this.logList.length == 0)
this.loadLogList()
break;
//
case "1":
if (this.in112List.length == 0)
this.loadIn112List()
break;
default:
break;
}
},
loadIn112List() {
req.in112PagerList({
current: this.in112ListQuery.current,
size: this.in112ListQuery.size,
params: this.jmdListQuery
}).then(response => {
if (response.code === '200' && response.data && response.data.total > 0) {
this.in112List = response.data.records
this.in112ListTotal = response.data.total
this.in112ListQuery.current = response.data.current
this.in112ListQuery.size = response.data.size
} else {
this.in112List = []
this.in112ListTotal = 0
}
})
},
//
indexMethod2(index) {
var pagestart = (this.in112ListQuery.current - 1) * this.in112ListQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
doAdd1() {
this.viewState = 2
},
doAdd2() {
this.viewState = 3
},
//
doBuild() {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
exportExcel(this.jmdListQuery).then((resp) => {
loading.close()
const blob = new Blob([resp], {
type: 'application/vnd.ms-excel;charset=UTF-8'
})
const fileName = '库存明细列表' + '.xls'
const elink = document.createElement('a')
elink.download = fileName
elink.style.display = 'nonde'
elink.href = URL.createObjectURL(blob)
document.body.appendChild(elink)
elink.click()
URL.revokeObjectURL(elink.href)
document.body.removeChild(elink)
}).catch(() => {
loading.close()
})
},
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
.wenjiantit {
font-size: 16px;
font-weight: bold;
margin: 25px 0 10px 0;
}
.forminfo {
margin: 0;
padding: 0;
}
.listcon {
height: calc(100vh - 250px);
overflow-y: auto;
overflow-x: hidden;
}
</style>

4
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/supervise/oilTypeInBound/index.vue

@ -3,7 +3,7 @@
<div class="tab-header webtop">
<!-- 标题 -->
<div>入库记录登记</div>
<div>原油入库登记</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button>
@ -172,6 +172,8 @@
console.log(">>>>>>>>>111111111111wwwwwwwwww", res.data)
this.tankLists = res.data
this.tankList = []
this.formobj.tankName =""
this.formobj.tankSid =""
for (var i = 0; i < this.tankLists.length; i++) {
let item = {

4
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/supervise/oilTypeOutBound/index.vue

@ -3,7 +3,7 @@
<div class="tab-header webtop">
<!-- 标题 -->
<div>出库记录登记</div>
<div>原油出库登记</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button>
@ -145,6 +145,8 @@
console.log(">>>>>>>>>111111111111wwwwwwwwww", res.data)
this.tankLists = res.data
this.tankList =[]
this.formobj.tankName =""
this.formobj.tankSid =""
for (var i = 0; i < this.tankLists.length; i++) {
let item = {

322
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/supervise/packagInBound/index.vue

@ -0,0 +1,322 @@
<template>
<div>
<div class="tab-header webtop">
<!-- 标题 -->
<div>包装物入库登记</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
<!-- end 添加修改按钮 -->
<!-- end 详情按钮 -->
</div>
<div class="listconadd">
<el-card class="box-card">
<div class="item">
<span class="item_text">合同编号</span>
<el-input v-model="formobj.contractNumber" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">供货商名称</span>
<el-select v-model="formobj.supplierName" filterable placeholder="请选择供货商名称" class="item_input"
@change="getSupplier">
<el-option v-for="item in supplierList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select>
</div>
<div class="item">
<span class="item_text">合同日期</span>
<el-date-picker v-model="formobj.contractSigningDate" type="date" format="yyyy-MM-dd" class="item_input"
value-format="yyyy-MM-dd" placeholder="请选择" />
</div>
<div class="item">
<span class="item_text">发货车牌号</span>
<el-input v-model="formobj.licensePlateNumber" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">入库日期</span>
<el-date-picker v-model="formobj.warehousingDate" type="date" format="yyyy-MM-dd" class="item_input"
value-format="yyyy-MM-dd" placeholder="请选择" />
</div>
<div class="item">
<span class="item_text">包装物类型</span>
<el-select v-model="formobj.typeName" filterable placeholder="请选择包装物名称" class="item_input" @change="getType">
<el-option v-for="item in typeList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select>
<!-- <el-input v-model="formobj.number" placeholder="" class="item_input" clearable /> -->
</div>
<div class="item">
<span class="item_text">包装物名称</span>
<el-select v-model="formobj.packagName" filterable placeholder="请选择包装物名称" class="item_input"
@change="getPackag">
<el-option v-for="item in packagList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select>
<!-- <el-input v-model="formobj.number" placeholder="" class="item_input" clearable /> -->
</div>
<div class="item">
<span class="item_text">收料净重</span>
<el-input v-model="formobj.weight" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">收料价值</span>
<el-input v-model="formobj.value" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">备注</span>
<el-input v-model="formobj.remarks" placeholder="" class="item_input" clearable />
</div>
<!-- <div class="item" style="margin-top: 70px;">
<span class="item_text">登记材料</span>
<upload class="item_input" ref="uploadImg" v-model="imgList" @change="backData" bucket="map"
:upload-data="{ type: '0001' }"></upload>
</div> -->
</el-card>
</div>
</div>
</template>
<script>
import req from '@/api/packagInAndOutBound/packagInAndOutBound'
import req3 from '@/api/supplier/supplier'
import upload from '@/components/uploadFile/upload_yanchejianchaTuBiao'
export default {
components: {
upload
},
data() {
return {
submitdisabled: false,
supplierLists: [],
supplierList: [],
typeLists: [],
typeList: [],
packagLists: [],
packagList: [],
imgList: [],
formobj: {
sid: "",
contractNumber: "",
contractSigningDate: "",
warehousingDate: "",
typeSid: "",
typeName: "",
packagName: "",
weight: "",
value: "",
supplierSid: "",
supplierName: "",
licensePlateNumber: "",
remarks: "",
crudeOilStorageFile: [],
}
}
},
created() {
this.supplierInfoList()
this.getTypeList()
},
methods: {
supplierInfoList() {
req3.supplierList().then((res) => {
if (res.success) {
console.log(">>>>>>>>>2222222", res.data)
this.supplierLists = res.data
for (var i = 0; i < this.supplierLists.length; i++) {
let item = {
name: this.supplierLists[i].supplierName,
sid: this.supplierLists[i].sid,
}
this.supplierList.push(item)
}
}
})
},
getTypeList() {
req.typeList().then((res) => {
if (res.success) {
console.log(">>>>>>>>>2222222", res.data)
this.typeLists = res.data
for (var i = 0; i < this.typeLists.length; i++) {
let item = {
name: this.typeLists[i].name,
sid: this.typeLists[i].sid,
}
this.typeList.push(item)
}
}
})
},
getPackagList(sid) {
req.PackagList(sid).then((res) => {
if (res.success) {
console.log(">>>>>>>>>2222222", res.data)
this.packagLists = res.data
this.packagList = []
this.formobj.packagName = ""
this.formobj.inventorySid = ""
for (var i = 0; i < this.packagLists.length; i++) {
let item = {
name: this.packagLists[i].name,
sid: this.packagLists[i].sid,
}
this.packagList.push(item)
}
}
})
},
saveOrUpdate() {
req.intAddInfo(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.formobj = {
sid: "",
contractNumber: "",
contractSigningDate: "",
warehousingDate: "",
typeSid: "",
typeName: "",
packagName: "",
weight: "",
value: "",
supplierSid: "",
supplierName: "",
licensePlateNumber: "",
remarks: "",
crudeOilStorageFile: [],
}
this.imgList = []
} else {
// resp.code
}
})
.catch(() => {})
},
handleReturn() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
},
getSupplier(value) {
console.log(">>>>>>>>>getType", value)
const choose = this.supplierLists.filter((item) => item.sid === value)
console.log(">>>>>>>>>getType", choose[0])
this.formobj.supplierName = choose[0].supplierName
this.formobj.supplierSid = value
},
getType(value) {
console.log(">>>>>>>>>getType", value)
const choose = this.typeLists.filter((item) => item.sid === value)
console.log(">>>>>>>>>getType", choose[0])
this.formobj.typeName = choose[0].name
this.formobj.typeSid = value
this.getPackagList(value)
},
getPackag(value) {
console.log(">>>>>>>>>getPackag", value)
const choose = this.packagLists.filter((item) => item.sid === value)
console.log(">>>>>>>>>getPackag", choose[0])
this.formobj.packagName = choose[0].name
this.formobj.inventorySid = value
},
backData(value) {
console.log("backData>>>>>", value)
const aa = []
if (value.length > 0 && value != null && value != undefined) {
for (var i = 0; i < value.length; i++) {
aa.push(value[i].url)
}
}
this.formobj.crudeOilStorageFile = aa
},
}
}
</script>
<style lang="scss">
.box-card {
margin-left: 60px;
margin-right: 60px;
min-width: 70%;
margin-top: 20px;
padding-bottom: 50px;
.item {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 15px;
height: 40px;
line-height: 40px;
.item_text {
flex: 0.8;
font-size: 18px;
text-align: right;
}
.item_input {
flex: 4;
font-size: 16px;
margin-left: 10px;
margin-right: 80px;
}
.item_left_input {
width: 20%;
}
.item_left_text {
height: 30px;
margin-left: 20px;
line-height: 30px;
color: #018AD2;
padding: 0px 15px;
border: 1.5px solid #018AD2;
border-radius: 5px;
}
.item_right {
flex: 1;
justify-items: center;
.item_right_list_text {
font-size: 16px;
}
.item_right_list_delect {
color: #5E94FF;
margin-left: 20px;
font-size: 16px;
text-decoration: underline;
}
}
}
}
</style>

282
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/supervise/packagInventory/index.vue

@ -0,0 +1,282 @@
<template>
<div>
<div class="tab-header webtop">
<!-- 标题 -->
<div>包装物盘库登记</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
<!-- end 添加修改按钮 -->
<!-- end 详情按钮 -->
</div>
<div class="listconadd">
<el-card class="box-card">
<div class="item">
<span class="item_text">包装物类型</span>
<el-select v-model="formobj.typeName" filterable placeholder="请选择包装物名称" class="item_input" @change="getType">
<el-option v-for="item in typeList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select>
<!-- <el-input v-model="formobj.number" placeholder="" class="item_input" clearable /> -->
</div>
<div class="item">
<span class="item_text">包装物名称</span>
<el-select v-model="formobj.packagName" filterable placeholder="请选择包装物名称" class="item_input"
@change="getPackag">
<el-option v-for="item in packagList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select>
<!-- <el-input v-model="formobj.number" placeholder="" class="item_input" clearable /> -->
</div>
<div class="item">
<span class="item_text">库存</span>
<el-input v-model="formobj.inventory" placeholder="" @input="limitInput1($event,'slPrice')" class="item_input"
clearable />
</div>
<div class="item">
<span class="item_text">价值</span>
<el-input v-model="formobj.value" placeholder="" @input="limitInput2($event,'slPrice')" class="item_input"
clearable />
</div>
<!-- <div class="item" style="margin-top: 70px;">
<span class="item_text">登记材料</span>
<upload class="item_input" ref="uploadImg" v-model="imgList" :limit="3" @change="backData"
bucket="map" :upload-data="{ type: '0001' }"></upload>
</div> -->
</el-card>
</div>
</div>
</template>
<script>
import req from '@/api/packagInAndOutBound/packagInAndOutBound'
import upload from '@/components/uploadFile/upload_yanchejianchaTuBiao'
export default {
components: {
upload
},
data() {
return {
submitdisabled: false,
typeLists: [],
typeList: [],
packagLists: [],
packagList: [],
imgList: [],
formobj: {
typeName: "",
inventorySid: "",
packagName: "",
value: "",
inventory: "",
}
}
},
created() {
this.getTypeList()
},
methods: {
/**
* 1必须为数字
* 2只能有一个小数点
* 3小数点后保留两位小数
* 4当第一位输入小数点的时候自动补全补为 0.
* 5除非是小数否则数字不能以0开头
* @param {string} values - 输入的值
* @param {string} name - 匹配的对象属性 [mkPrice | slPrice]
*/
limitInput1(values, name) {
this.formobj.inventory =
("" + values) //
.replace(/[^\d^\.]+/g, "") //
.replace(/^0+(\d)/, "$1") // 00
.replace(/^\./, "0.") // 0.
.match(/^\d*(\.?\d{0,2})/g)[0] || ""; // 02
},
/**
* 1必须为数字
* 2只能有一个小数点
* 3小数点后保留两位小数
* 4当第一位输入小数点的时候自动补全补为 0.
* 5除非是小数否则数字不能以0开头
* @param {string} values - 输入的值
* @param {string} name - 匹配的对象属性 [mkPrice | slPrice]
*/
limitInput2(values, name) {
this.formobj.value =
("" + values) //
.replace(/[^\d^\.]+/g, "") //
.replace(/^0+(\d)/, "$1") // 00
.replace(/^\./, "0.") // 0.
.match(/^\d*(\.?\d{0,2})/g)[0] || ""; // 02
},
getTypeList() {
req.typeList().then((res) => {
if (res.success) {
console.log(">>>>>>>>>2222222", res.data)
this.typeLists = res.data
for (var i = 0; i < this.typeLists.length; i++) {
let item = {
name: this.typeLists[i].name,
sid: this.typeLists[i].sid,
}
this.typeList.push(item)
}
}
})
},
getPackagList(sid) {
req.PackagList(sid).then((res) => {
if (res.success) {
console.log(">>>>>>>>>2222222", res.data)
this.packagLists = res.data
this.packagList = []
this.formobj.packagName = ""
this.formobj.inventorySid = ""
for (var i = 0; i < this.packagLists.length; i++) {
let item = {
name: this.packagLists[i].name,
sid: this.packagLists[i].sid,
}
this.packagList.push(item)
}
}
})
},
saveOrUpdate() {
console.log(">>>>>>>>>111111111111wwwwwwwwww", this.formobj)
req.inventoryAddInfo(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.formobj = {
typeName: "",
inventorySid: "",
packagName: "",
value: "",
inventory: "",
}
this.imgList = []
} else {
// resp.code
}
})
.catch(() => {})
},
handleReturn() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
},
getType(value) {
console.log(">>>>>>>>>getType", value)
const choose = this.typeLists.filter((item) => item.sid === value)
console.log(">>>>>>>>>getType", choose[0])
this.formobj.typeName = choose[0].name
this.formobj.typeSid = value
this.getPackagList(value)
},
getPackag(value) {
console.log(">>>>>>>>>getPackag", value)
const choose = this.packagLists.filter((item) => item.sid === value)
console.log(">>>>>>>>>getPackag", choose[0])
this.formobj.packagName = choose[0].name
this.formobj.inventorySid = value
},
backData(value) {
console.log("backData>>>>>", value)
const aa = []
if (value.length > 0 && value != null && value != undefined) {
for (var i = 0; i < value.length; i++) {
aa.push(value[i].url)
}
}
this.formobj.crudeOilRecordFile = aa
},
}
}
</script>
<style lang="scss">
.box-card {
margin-left: 60px;
margin-right: 60px;
min-width: 70%;
margin-top: 20px;
padding-bottom: 50px;
.item {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 15px;
height: 40px;
line-height: 40px;
.item_text {
flex: 0.8;
font-size: 18px;
text-align: right;
}
.item_input {
flex: 4;
font-size: 16px;
margin-left: 10px;
margin-right: 80px;
}
.item_left_input {
width: 20%;
}
.item_left_text {
height: 30px;
margin-left: 20px;
line-height: 30px;
color: #018AD2;
padding: 0px 15px;
border: 1.5px solid #018AD2;
border-radius: 5px;
}
.item_right {
flex: 1;
justify-items: center;
.item_right_list_text {
font-size: 16px;
}
.item_right_list_delect {
color: #5E94FF;
margin-left: 20px;
font-size: 16px;
text-decoration: underline;
}
}
}
}
</style>

275
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/supervise/packagOutBound/index.vue

@ -0,0 +1,275 @@
<template>
<div>
<div class="tab-header webtop">
<!-- 标题 -->
<div>包装物出库登记</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
<!-- end 添加修改按钮 -->
<!-- end 详情按钮 -->
</div>
<div class="listconadd">
<el-card class="box-card">
<div class="item">
<span class="item_text">合同编号</span>
<el-input v-model="formobj.salesContractNumber" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">合同日期</span>
<el-date-picker v-model="formobj.contractSigningDate" type="date" format="yyyy-MM-dd" class="item_input"
value-format="yyyy-MM-dd" placeholder="请选择" />
</div>
<div class="item">
<span class="item_text">出库日期</span>
<el-date-picker v-model="formobj.deliveryDate" type="date" format="yyyy-MM-dd" class="item_input"
value-format="yyyy-MM-dd" placeholder="请选择" />
</div>
<div class="item">
<span class="item_text">包装物类型</span>
<el-select v-model="formobj.typeName" filterable placeholder="请选择包装物名称" class="item_input" @change="getType">
<el-option v-for="item in typeList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select>
<!-- <el-input v-model="formobj.number" placeholder="" class="item_input" clearable /> -->
</div>
<div class="item">
<span class="item_text">包装物名称</span>
<el-select v-model="formobj.packagName" filterable placeholder="请选择包装物名称" class="item_input"
@change="getPackag">
<el-option v-for="item in packagList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select>
<!-- <el-input v-model="formobj.number" placeholder="" class="item_input" clearable /> -->
</div>
<div class="item">
<span class="item_text">净重</span>
<el-input v-model="formobj.weight" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">价值</span>
<el-input v-model="formobj.value" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">备注</span>
<el-input v-model="formobj.remarks" placeholder="" class="item_input" clearable />
</div>
<!-- <div class="item" style="margin-top: 70px;">
<span class="item_text">登记材料</span>
<upload class="item_input" ref="uploadImg" v-model="imgList" @change="backData" bucket="map"
:upload-data="{ type: '0001' }"></upload>
</div> -->
</el-card>
</div>
</div>
</template>
<script>
import req from '@/api/packagInAndOutBound/packagInAndOutBound'
import upload from '@/components/uploadFile/upload_yanchejianchaTuBiao'
export default {
components: {
upload
},
data() {
return {
submitdisabled: false,
typeLists: [],
typeList: [],
packagLists: [],
packagList: [],
imgList: [],
formobj: {
sid: "",
salesContractNumber: "",
contractSigningDate: "",
deliveryDate: "",
typeSid: "",
typeName: "",
packagName: "",
weight: "",
value: "",
remarks: "",
crudeOilOutboundFiles: [],
}
}
},
created() {
this.getTypeList()
},
methods: {
getTypeList() {
req.typeList().then((res) => {
if (res.success) {
console.log(">>>>>>>>>2222222", res.data)
this.typeLists = res.data
for (var i = 0; i < this.typeLists.length; i++) {
let item = {
name: this.typeLists[i].name,
sid: this.typeLists[i].sid,
}
this.typeList.push(item)
}
}
})
},
getPackagList(sid) {
req.PackagList(sid).then((res) => {
if (res.success) {
console.log(">>>>>>>>>2222222", res.data)
this.packagLists = res.data
this.packagList = []
this.formobj.packagName = ""
this.formobj.inventorySid = ""
for (var i = 0; i < this.packagLists.length; i++) {
let item = {
name: this.packagLists[i].name,
sid: this.packagLists[i].sid,
}
this.packagList.push(item)
}
}
})
},
saveOrUpdate() {
console.log(">>>>>>>>>saveOrUpdate",this.formobj)
req.outAddInfo(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.formobj = {
sid: "",
salesContractNumber: "",
contractSigningDate: "",
deliveryDate: "",
typeSid: "",
typeName: "",
packagName: "",
weight: "",
value: "",
remarks: "",
crudeOilOutboundFiles: [],
}
this.imgList = []
} else {
// resp.code
}
})
.catch(() => {})
},
handleReturn() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
},
getType(value) {
console.log(">>>>>>>>>getType", value)
const choose = this.typeLists.filter((item) => item.sid === value)
console.log(">>>>>>>>>getType", choose[0])
this.formobj.typeName = choose[0].name
this.formobj.typeSid = value
this.getPackagList(value)
},
getPackag(value) {
console.log(">>>>>>>>>getPackag", value)
const choose = this.packagLists.filter((item) => item.sid === value)
console.log(">>>>>>>>>getPackag", choose[0])
this.formobj.packagName = choose[0].name
this.formobj.inventorySid = value
},
backData(value) {
console.log("backData>>>>>", value)
const aa = []
if (value.length > 0 && value != null && value != undefined) {
for (var i = 0; i < value.length; i++) {
aa.push(value[i].url)
}
}
this.formobj.crudeOilOutboundFiles = aa
},
}
}
</script>
<style lang="scss">
.box-card {
margin-left: 60px;
margin-right: 60px;
min-width: 70%;
margin-top: 20px;
padding-bottom: 50px;
.item {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 15px;
height: 40px;
line-height: 40px;
.item_text {
flex: 0.8;
font-size: 18px;
text-align: right;
}
.item_input {
flex: 4;
font-size: 16px;
margin-left: 10px;
margin-right: 80px;
}
.item_left_input {
width: 20%;
}
.item_left_text {
height: 30px;
margin-left: 20px;
line-height: 30px;
color: #018AD2;
padding: 0px 15px;
border: 1.5px solid #018AD2;
border-radius: 5px;
}
.item_right {
flex: 1;
justify-items: center;
.item_right_list_text {
font-size: 16px;
}
.item_right_list_delect {
color: #5E94FF;
margin-left: 20px;
font-size: 16px;
text-decoration: underline;
}
}
}
}
</style>

18
yxt_supervise/supervise-customer/supervise-customer-api/src/main/java/com/yxt/supervise/customer/api/gdinventoryok/GdInventoryOk.java

@ -15,12 +15,22 @@ import lombok.Data;
@ApiModel(value = "国大库存数据", description = "国大库存数据")
@TableName("gd_inventory_ok")
public class GdInventoryOk extends EntityWithId {
// 企业组织机构代码证 仓库编号 仓库名称 类别编号 类别名称 一级类别名称 二级类别名称 商品编码 商品条码 商品名称 仓库类型 商品数量 商品货值 供应商 数据日期
@ApiModelProperty("企业组织机构代码证")
private String orgCode;//企业组织机构代码证
@ApiModelProperty("仓库/门店编号")
private String warehouseCode;//仓库/门店编号
@ApiModelProperty("仓库/门店名称")
private String warehouseName;//仓库/门店名称
@ApiModelProperty("类别编号")
private String typeCode;//类别编号
@ApiModelProperty("类别名称")
private String typeName;//类别名称
@ApiModelProperty("一级类别名称")
private String typeOne;//一级类别名称
@ApiModelProperty("二级类别名称")
private String typeTwo;//二级类别名称
@ApiModelProperty("商品编码")
private String prodCode;//商品编码
@ApiModelProperty("商品条码")
@ -37,13 +47,5 @@ public class GdInventoryOk extends EntityWithId {
private String suppliderName;//供应商
@ApiModelProperty("数据日期")
private String dataDate;//数据日期
@ApiModelProperty("类别编号")
private String typeCode;//类别编号
@ApiModelProperty("类别名称")
private String typeName;//类别名称
@ApiModelProperty("一级类别名称")
private String typeOne;//一级类别名称
@ApiModelProperty("二级类别名称")
private String typeTwo;//二级类别名称
}

21
yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventorylog/GdInventoryLogRest.java

@ -1,10 +1,16 @@
package com.yxt.supervise.customer.biz.gdinventorylog;
import com.alibaba.excel.EasyExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import com.yxt.supervise.customer.api.gdinstoragegd.*;
import com.yxt.supervise.customer.api.gdinventorylog.GdInventoryLogQuery;
import com.yxt.supervise.customer.api.gdinventoryok.GdInventoryLog;
import com.yxt.supervise.customer.api.gdsales.GdSales;
import com.yxt.supervise.customer.api.gdsales.GdSalesQuery;
import com.yxt.supervise.customer.api.gdsales.GdSalesVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
@ -22,8 +28,19 @@ import java.util.List;
* @author wangpengfei
* @date 2023/3/29 14:00
*/
@Api(tags = "导入记录")
@Api(tags = "库存信息导入日志的记录")
@RestController
@RequestMapping("v1/gdinventorylog")
public class GdInventoryLogRest {
public class GdInventoryLogRest {
@Autowired
private GdInventoryLogService gdInventoryLogService;
@ApiOperation("根据条件分页查询数据的列表")
@PostMapping("/listPage")
public ResultBean<IPage<GdInventoryLog>> listPage(@RequestBody PagerQuery<GdInventoryLogQuery> pq) {
ResultBean rb = ResultBean.fireFail();
IPage<GdInventoryLog> pv = gdInventoryLogService.listPage(pq);
return rb.success().setData(pv);
}
}

24
yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventorylog/GdInventoryLogService.java

@ -1,7 +1,13 @@
package com.yxt.supervise.customer.biz.gdinventorylog;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.supervise.customer.api.gdinstoragelog.GdInstorageLog;
import com.yxt.supervise.customer.api.gdinventorylog.GdInventoryLogQuery;
import com.yxt.supervise.customer.api.gdinventoryok.GdInventoryLog;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
@ -12,12 +18,26 @@ import org.springframework.stereotype.Service;
*/
@Slf4j
@Service
public class GdInventoryLogService extends ServiceImpl<GdInventoryLogMapper, GdInventoryLog> {
public GdInstorageLog getLogByOrderDate(String orderDate) {
//GdRukuQuery query = pq.getParams();
return baseMapper.getLogByOrderDate(orderDate);
}
public IPage<GdInventoryLog> listPage(PagerQuery<GdInventoryLogQuery> pq) {
GdInventoryLogQuery params = pq.getParams();
QueryWrapper<GdInventoryLog> qw = new QueryWrapper<>();
if (StrUtil.isNotBlank(params.getDataDateStart())) {
qw.ge("orderDate", params.getDataDateStart());
}
if (StrUtil.isNotBlank(params.getDataDateEnd())) {
qw.le("orderDate", params.getDataDateEnd());
}
qw.orderByDesc("orderDate","createTime");
return baseMapper.getLogByOrderDate(orderDate);
IPage<GdInventoryLog> iPage = PagerUtil.queryToPage(pq);
IPage<GdInventoryLog> page = baseMapper.selectPage(iPage, qw);
return page;
}
}

86
yxt_supervise/supervise-customer/supervise-customer-biz/src/main/java/com/yxt/supervise/customer/biz/gdinventoryok/GdInventoryOkService.java

@ -1,6 +1,7 @@
package com.yxt.supervise.customer.biz.gdinventoryok;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.StrUtil;
@ -8,6 +9,11 @@ import cn.hutool.json.JSONUtil;
import cn.hutool.poi.excel.ExcelUtil;
import cn.hutool.poi.excel.ExcelWriter;
import cn.hutool.poi.excel.sax.handler.RowHandler;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.builder.ExcelReaderBuilder;
import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.common.base.config.component.FileUploadComponent;
@ -24,12 +30,15 @@ import com.yxt.supervise.customer.api.gdsales.GdSales;
import com.yxt.supervise.customer.api.gdsales.GdSalesExcelVo;
import com.yxt.supervise.customer.api.gdsales.GdSalesQuery;
import com.yxt.supervise.customer.api.gdsales.GdSalesVo;
import com.yxt.supervise.customer.api.purchaserequisition.PurchaseRequisition;
import com.yxt.supervise.customer.api.purchaserequisitionpro.PurchaseRequisitionPro;
import com.yxt.supervise.customer.biz.gdinventorylog.GdInventoryLogService;
import com.yxt.supervise.customer.biz.gdinventorylogerr.GdInventoryLogErrService;
import com.yxt.supervise.customer.biz.gdinventoryyc.GdInventoryYcService;
import com.yxt.supervise.customer.biz.gdrescategoryprod.GdRescategoryProdService;
import com.yxt.supervise.customer.biz.storeindex.StoreIndexService;
import com.yxt.supervise.customer.biz.storeinfo.StoreInfoService;
import com.yxt.supervise.customer.tools.StrTool;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.CellStyle;
import org.springframework.beans.factory.annotation.Autowired;
@ -38,6 +47,7 @@ import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import java.io.File;
import java.math.BigDecimal;
import java.util.*;
/**
@ -59,8 +69,6 @@ public class GdInventoryOkService extends MybatisBaseService<GdInventoryOkMapper
@Autowired
private GdInventoryYcService gdInventoryYcService;
@Autowired
private GdInventoryOkService gdInventoryOkService;
@Autowired
private GdRescategoryProdService gdRescategoryProdService;
@Autowired
private StoreIndexService storeIndexService;
@ -68,13 +76,15 @@ public class GdInventoryOkService extends MybatisBaseService<GdInventoryOkMapper
private StoreInfoService storeInfoService;
@Autowired
private GdInventoryLogErrService gdInventoryLogErrService;
public void clearData() {
baseMapper.clearData();
}
public PagerVo<GdInventoryOkVo> listPageVo(PagerQuery<GdInventoryOkQuery> pq) {
GdInventoryOkQuery query = pq.getParams();
QueryWrapper<GdInventoryOk> qw = new QueryWrapper<>();
if(query!=null) {
if (query != null) {
if (StringUtils.isNotBlank(query.getWarehouseCode())) {
qw.eq("warehouseCode", query.getWarehouseCode());
}
@ -104,10 +114,11 @@ public class GdInventoryOkService extends MybatisBaseService<GdInventoryOkMapper
PagerVo<GdInventoryOkVo> p = PagerUtil.pageToVo(pagging, null);
return p;
}
public List<GdInventoryOkExcelVo> exportExcel(PagerQuery<GdInventoryOkQuery> pq) {
GdInventoryOkQuery query = pq.getParams();
QueryWrapper<GdInventoryOk> qw = new QueryWrapper<>();
if(query!=null) {
if (query != null) {
if (StringUtils.isNotBlank(query.getWarehouseCode())) {
qw.eq("warehouseCode", query.getWarehouseCode());
}
@ -135,6 +146,7 @@ public class GdInventoryOkService extends MybatisBaseService<GdInventoryOkMapper
List<GdInventoryOkExcelVo> pagging = baseMapper.exportExcel(qw);
return pagging;
}
public GdInventoryLog uploadAndResetData(MultipartFile file) {
ResultBean rb = ResultBean.fireFail();
@ -144,18 +156,74 @@ public class GdInventoryOkService extends MybatisBaseService<GdInventoryOkMapper
long millis = System.currentTimeMillis();
baseMapper.clearData();
gdInventoryYcService.clearData();
// gdInventoryYcService.clearData();
GdInventoryLog gdlog = new GdInventoryLog(fp);
ExcelUtil.read07BySax(fp, -1, createRowHandler(gdlog));
ExcelReaderBuilder read = EasyExcel.read(fp, GdInventoryOk.class, createReadListener(gdlog));
read.sheet().doRead();
// System.out.println("用时:" + (System.currentTimeMillis() - millis));
gdlog.setDurations(System.currentTimeMillis() - millis);
gdInventoryLogService.save(gdlog);
return gdlog;
}
private ReadListener<GdInventoryOk> createReadListener(GdInventoryLog gdlog) {
return new ReadListener<GdInventoryOk>() {
private int x = 0, y = 0, z = 0;
private String odate = null;
private static final int BATCH_COUNT = 900;
private List<GdInventoryOk> toInsertList = new ArrayList<>();
private boolean checkYcProd(String typeCode) {
if (StrUtil.isBlank(typeCode))
return false;
if (typeCode.length() < 4)
return false;
String subCode = typeCode.substring(0, 4);
return "0811".equals(subCode) || "0813".equals(subCode) || "0815".equals(subCode);
}
@Override
public void invoke(GdInventoryOk obj, AnalysisContext analysisContext) {
if (StringUtils.isNotBlank(obj.getWarehouseCode())) {
x++;
if (StrUtil.isBlank(odate)) {
odate = obj.getDataDate();
gdlog.setOrderDate(odate);
}
if(checkYcProd(obj.getTypeCode())){
y++;
}else{
z++;
}
toInsertList.add(obj);
// 达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM
if (toInsertList.size() >= BATCH_COUNT) {
GdInventoryOkService.this.saveBatch(toInsertList);
// 存储完成清理 list
toInsertList.clear();;
}
}
}
@Override
public void doAfterAllAnalysed(AnalysisContext analysisContext) {
if (toInsertList != null && !toInsertList.isEmpty()) {
GdInventoryOkService.this.saveBatch(toInsertList);
}
gdlog.setAllNum(x);
gdlog.setValidNum(z);
gdlog.setErrRowNum(y);
}
};
}
private RowHandler createRowHandler(GdInventoryLog gdlog) {
return new RowHandler() {
private static final int BATCH_COUNT = 900;
private List<GdInventoryOk> toInsertList = new ArrayList<>();
private List<GdInventoryYc> toInsertListYc = new ArrayList<>();
private List<GdInventoryLogErr> errList = new ArrayList<>();
@ -240,7 +308,7 @@ public class GdInventoryOkService extends MybatisBaseService<GdInventoryOkMapper
}
if (990 == num) {
gdInventoryOkService.saveBatch(toInsertList);
GdInventoryOkService.this.saveBatch(toInsertList);
num = 0;
toInsertList.clear();
} else {
@ -283,7 +351,7 @@ public class GdInventoryOkService extends MybatisBaseService<GdInventoryOkMapper
@Override
public void doAfterAllAnalysed() {
if (toInsertList != null && !toInsertList.isEmpty()) {
gdInventoryOkService.saveBatch(toInsertList);
GdInventoryOkService.this.saveBatch(toInsertList);
}
if (toInsertListYc != null && !toInsertListYc.isEmpty()) {
gdInventoryYcService.saveBatch(toInsertListYc);

2
yxt_supervise/supervise-customer/supervise-customer-biz/src/main/resources/logback-spring.xml

@ -42,7 +42,7 @@
</encoder>
</appender>
<root level="INFO">
<root level="debug">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILEOUT" />
</root>

Loading…
Cancel
Save