
65 changed files with 22335 additions and 784 deletions
@ -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='库存汇总表-商品库存'; |
File diff suppressed because it is too large
@ -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中的接口 |
|||
|
After Width: | Height: | Size: 1.5 KiB |
@ -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'); |
@ -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; |
|||
} |
@ -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; |
|||
} |
@ -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; |
|||
} |
@ -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; |
|||
} |
@ -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; |
|||
} |
@ -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; |
|||
} |
@ -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; |
|||
} |
@ -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; |
|||
} |
@ -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); |
|||
} |
@ -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> |
@ -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); |
|||
} |
|||
} |
@ -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; |
|||
} |
|||
} |
@ -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); |
|||
} |
@ -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> |
@ -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); |
|||
} |
|||
} |
@ -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); |
|||
} |
|||
} |
@ -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' |
|||
}) |
|||
}, |
|||
} |
@ -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 |
|||
}); |
|||
}, |
|||
|
|||
|
|||
} |
@ -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> |
|||
|
@ -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> |
|||
|
@ -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> |
|||
|
@ -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> |
@ -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> |
@ -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> |
@ -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> |
@ -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") // 第三步:第一位0开头,0后面为数字,则过滤掉,取后面的数字 |
|||
.replace(/^\./, "0.") // 第四步:如果输入的第一位为小数点,则替换成 0. 实现自动补全 |
|||
.match(/^\d*(\.?\d{0,2})/g)[0] || ""; // 第五步:最终匹配得到结果 以数字开头,只有一个小数点,而且小数点后面只能有0到2位小数 |
|||
}, |
|||
/** |
|||
* 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") // 第三步:第一位0开头,0后面为数字,则过滤掉,取后面的数字 |
|||
.replace(/^\./, "0.") // 第四步:如果输入的第一位为小数点,则替换成 0. 实现自动补全 |
|||
.match(/^\d*(\.?\d{0,2})/g)[0] || ""; // 第五步:最终匹配得到结果 以数字开头,只有一个小数点,而且小数点后面只能有0到2位小数 |
|||
}, |
|||
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> |
@ -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> |
Loading…
Reference in new issue