Browse Source

2023-5-26

master
guoxing 2 years ago
parent
commit
ba5f0de6c9
  1. 6
      yxt-supervise-cyf/yxt-supervise-cyf-ui/.env.development
  2. 94
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/packagInAndOutBound/packagInAndOutBound.js
  3. 910
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/layout/components/Sidebar/index.vue
  4. 68
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/router/index.js
  5. 4
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/oilTankInfo/index.vue
  6. 389
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/packagInBoundList/index.vue
  7. 384
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/packagInventoryList/index.vue
  8. 382
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/packagOutBoundList/index.vue
  9. 4
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/supervise/oilTypeInBound/index.vue
  10. 4
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/supervise/oilTypeOutBound/index.vue
  11. 322
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/supervise/packagInBound/index.vue
  12. 282
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/supervise/packagInventory/index.vue
  13. 275
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/supervise/packagOutBound/index.vue

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

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

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

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

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

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

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

@ -68,7 +68,7 @@ export const constantRoutes = [{
meta: {
title: '原料信息'
}
},{
}, {
path: '/baseInfo/packagType',
component: () =>
import('@/views/baseInfo/packagType/index.vue'),
@ -175,6 +175,33 @@ export const constantRoutes = [{
title: '原油出库登记'
}
},
{
path: '/supervise/packagInBound',
component: () =>
import('@/views/supervise/packagInBound/index.vue'),
name: 'index',
meta: {
title: '包装物入库登记'
}
},
{
path: '/supervise/packagOutBound',
component: () =>
import('@/views/supervise/packagOutBound/index.vue'),
name: 'index',
meta: {
title: '包装物出库登记'
}
},
{
path: '/supervise/packagInventory',
component: () =>
import('@/views/supervise/packagInventory/index.vue'),
name: 'index',
meta: {
title: '包装物盘库登记'
}
},
{
path: '/supervise/EnterRegister',
component: () =>
@ -203,14 +230,22 @@ export const constantRoutes = [{
},
children: [
{
path: '/inventory/oilTankInfo',
component: () =>
import('@/views/inventory/oilTankInfo/index.vue'),
name: 'index',
meta: {
title: '油罐库存信息'
}
},{
path: '/inventory/oilTankList',
component: () =>
import('@/views/inventory/oilTankList/index.vue'),
name: 'index',
meta: {
title: '油罐库存记录'
title: '油罐登记库存记录'
}
},{
}, {
path: '/inventory/oilTypeInBoundList',
component: () =>
import('@/views/inventory/oilTypeInBoundList/index.vue'),
@ -228,13 +263,32 @@ export const constantRoutes = [{
title: '原油出库记录'
}
},
{
path: '/inventory/oilTankInfo',
path: '/supervise/packagInBound',
component: () =>
import('@/views/inventory/oilTankInfo/index.vue'),
import('@/views/supervise/packagInBound/index.vue'),
name: 'index',
meta: {
title: '包装物入库登记'
}
},
{
path: '/supervise/packagOutBound',
component: () =>
import('@/views/supervise/packagOutBound/index.vue'),
name: 'index',
meta: {
title: '包装物出库登记'
}
},
{
path: '/supervise/packagInventory',
component: () =>
import('@/views/supervise/packagInventory/index.vue'),
name: 'index',
meta: {
title: '库存信息'
title: '包装物盘库登记'
}
},
{
@ -387,4 +441,4 @@ export function resetRouter() {
router.matcher = newRouter.matcher // reset router
}
export default router
export default router

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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