fengdong777 2 years ago
parent
commit
d914019a99
  1. 4
      src/layout/components/Navbar.vue
  2. 93
      src/layout/components/Sidebar/index.vue
  3. 230
      src/router/index.js
  4. 68
      src/router/modules/codemenu.js
  5. 153
      src/views/MaterialBrand/index.vue
  6. 219
      src/views/baseInfo/flowInstrument/flowInstrumentAdd.vue
  7. 227
      src/views/baseInfo/flowInstrument/index.vue
  8. 262
      src/views/baseInfo/materialInfo/index.vue
  9. 190
      src/views/baseInfo/materialInfo/materialInfoAdd.vue
  10. 225
      src/views/baseInfo/materialType/index.vue
  11. 194
      src/views/baseInfo/materialType/materialTypeAdd.vue
  12. 254
      src/views/baseInfo/materialType/oilTypeInfo.vue
  13. 263
      src/views/baseInfo/oilTank/index.vue
  14. 258
      src/views/baseInfo/oilTank/oilTankAdd.vue
  15. 226
      src/views/baseInfo/oilType/index.vue
  16. 203
      src/views/baseInfo/oilType/oilTypeAdd.vue
  17. 254
      src/views/baseInfo/oilType/oilTypeInfo.vue
  18. 254
      src/views/baseInfo/supplier/index.vue
  19. 188
      src/views/baseInfo/supplier/supplierInfoAdd.vue
  20. 436
      src/views/customermanagement/customermanagement.vue
  21. 660
      src/views/customermanagement/customermanagementAdd.vue
  22. 309
      src/views/customermanagement/customermanagementInfo.vue
  23. 346
      src/views/enterprise/enterpriseAdd.vue
  24. 210
      src/views/enterprise/enterpriseInfo.vue
  25. 243
      src/views/enterprise/index.vue
  26. 219
      src/views/flowInstrument/flowInstrumentAdd.vue
  27. 227
      src/views/flowInstrument/index.vue
  28. 172
      src/views/industry/industryAdd.vue
  29. 238
      src/views/industry/industryInfo.vue
  30. 167
      src/views/inventory/oilTankInfo/index.vue
  31. 339
      src/views/inventory/oilTankList/index.vue
  32. 425
      src/views/inventory/oilTypeInBoundList/index.vue
  33. 413
      src/views/inventory/oilTypeOutBoundList/index.vue
  34. 4
      src/views/login/login.vue
  35. 154
      src/views/materialManagement/index.vue
  36. 270
      src/views/oilTank/index.vue
  37. 199
      src/views/oilTank/oilTankAdd.vue
  38. 225
      src/views/oilType/index.vue
  39. 179
      src/views/oilType/oilTypeAdd.vue
  40. 254
      src/views/oilType/oilTypeInfo.vue
  41. 228
      src/views/oilTypeInAndOutBound/inBoundAdd.vue
  42. 349
      src/views/oilTypeInAndOutBound/index.vue
  43. 227
      src/views/oilTypeInAndOutBound/outBoundAdd.vue
  44. 173
      src/views/projectType/projectTypeAdd.vue
  45. 225
      src/views/projectType/projectTypeInfo.vue
  46. 229
      src/views/rawMaterialInAndOutBound/inBoundAdd.vue
  47. 348
      src/views/rawMaterialInAndOutBound/index.vue
  48. 219
      src/views/rawMaterialInAndOutBound/outBoundAdd.vue
  49. 262
      src/views/rawMaterialInfo/index.vue
  50. 190
      src/views/rawMaterialInfo/rawMaterialInfoAdd.vue
  51. 225
      src/views/rawMaterialType/index.vue
  52. 254
      src/views/rawMaterialType/oilTypeInfo.vue
  53. 179
      src/views/rawMaterialType/rawMaterialTypeAdd.vue
  54. 152
      src/views/storeManagement/index.vue
  55. 246
      src/views/storehouse/index.vue
  56. 334
      src/views/storehouse/storehouseAdd.vue
  57. 198
      src/views/storehouse/storehouseInfo.vue
  58. 152
      src/views/supplierManagement/index.vue

4
src/layout/components/Navbar.vue

@ -1,7 +1,7 @@
<template>
<div>
<div class="navbar">
<p class="breadcrumb-container"><img src="@/assets/loginImg/logo.png" style="width: 45px;height: 45px;margin-right: 10px;"/>汇融云仓贷后监管平台</p>
<p class="breadcrumb-container"><img src="@/assets/loginImg/logo.png" style="width: 45px;height: 45px;margin-right: 10px;"/>山海光伏监管平台</p>
<!-- <h3 class="breadcrumb-container">汇融银行供应链贷后监管平台</h3> -->
<div class="right-menu">
<!-- <p>{{Orgname}} {{departmentName}} 欢迎, {{name}}</p>-->
@ -11,7 +11,7 @@
<span class="backToHome" @click="logout"><i class="el-icon-back"></i>返回首页</span>
</div>
</div>
<el-footer class="footer" height="40px">Copyright © {{ year }} 汇融云仓贷后监管平台 All Rights Reserved</el-footer>
<el-footer class="footer" height="40px">Copyright © {{ year }} 山海光伏监管平台 All Rights Reserved</el-footer>
</div>
</template>

93
src/layout/components/Sidebar/index.vue

@ -75,59 +75,46 @@ export default {
}
],
},
// {
// alwaysShow: true,
// component: "inventory",
// meta: {
// icon: "el-icon-menu",
// title: "",
// },
// name: "",
// path: "/inventory",
// children: [
// {
// alwaysShow: true,
// component: "index",
// meta: {
// icon: "el-icon-help",
// title: "",
// },
// name: "/inventory/oilTankList",
// path: "/inventory/oilTankList",
// },
// {
// alwaysShow: true,
// component: "index",
// meta: {
// icon: "el-icon-help",
// title: "",
// },
// name: "/inventory/oilTypeInBoundList",
// path: "/inventory/oilTypeInBoundList",
// },
// {
// alwaysShow: true,
// component: "index",
// meta: {
// icon: "el-icon-help",
// title: "",
// },
// name: "/inventory/oilTypeOutBoundList",
// path: "/inventory/oilTypeOutBoundList",
// },
// {
// alwaysShow: true,
// component: "index",
// meta: {
// icon: "el-icon-help",
// title: "",
// },
// name: "/inventory/oilTankInfo",
// path: "/inventory/oilTankInfo",
// },
// ],
// },
{
alwaysShow: true,
component: "MaterialBrand",
meta: {
icon: "el-icon-menu",
title: "物料品牌",
},
name: "/MaterialBrand/index",
path: "/MaterialBrand/index"
},
{
alwaysShow: true,
component: "materialManagement",
meta: {
icon: "el-icon-menu",
title: "物料管理",
},
name: "/materialManagement/index",
path: "/materialManagement/index"
},
{
alwaysShow: true,
component: "storeManagement",
meta: {
icon: "el-icon-menu",
title: "仓库管理",
},
name: "/storeManagement/index",
path: "/storeManagement/index"
},
{
alwaysShow: true,
component: "supplierManagement",
meta: {
icon: "el-icon-menu",
title: "供应商管理",
},
name: "/supplierManagement/index",
path: "/supplierManagement/index"
},
],
};
},

230
src/router/index.js

@ -44,68 +44,6 @@ export const constantRoutes = [{
affix: true
}
}]
}, {
path: '/baseInfo',
component: Layout,
redirect: null,
meta: {
title: '基础信息'
},
children: [{
path: '/baseInfo/materialType',
component: () =>
import('@/views/baseInfo/materialType/index.vue'),
name: 'index',
meta: {
title: '物料类型'
}
},
{
path: '/baseInfo/materialInfo',
component: () =>
import('@/views/baseInfo/materialInfo/index.vue'),
name: 'index',
meta: {
title: '物料信息'
}
},
{
path: '/baseInfo/oilType',
component: () =>
import('@/views/baseInfo/oilType/index.vue'),
name: 'index',
meta: {
title: '原油类型'
}
},
{
path: '/baseInfo/oilTank',
component: () =>
import('@/views/baseInfo/oilTank/index.vue'),
name: 'index',
meta: {
title: '油罐信息'
}
},
{
path: '/baseInfo/flowInstrument',
component: () =>
import('@/views/baseInfo/flowInstrument/index.vue'),
name: 'index',
meta: {
title: '流量仪器'
}
},
{
path: '/baseInfo/supplier',
component: () =>
import('@/views/baseInfo/supplier/index.vue'),
name: 'index',
meta: {
title: '供应商信息'
}
},
]
}, {
path: '/supervise',
component: Layout,
@ -133,144 +71,58 @@ export const constantRoutes = [{
},
]
}, {
path: '/inventory',
path: '/MaterialBrand',
component: Layout,
redirect: null,
meta: {
title: '库存管理'
},
children: [
{
path: '/inventory/oilTankList',
component: () =>
import('@/views/inventory/oilTankList/index.vue'),
name: 'index',
redirect: '/MaterialBrand/index',
children: [{
path: '/MaterialBrand/index',
component: () => import('@/views/MaterialBrand/index.vue'),
name: 'MaterialBrand',
meta: {
title: '油罐库存记录'
title: '物料品牌',
noCache: true
}
}]
},{
path: '/inventory/oilTypeInBoundList',
component: () =>
import('@/views/inventory/oilTypeInBoundList/index.vue'),
name: 'index',
path: '/materialManagement',
component: Layout,
redirect: '/materialManagement/index',
children: [{
path: '/materialManagement/index',
component: () => import('@/views/materialManagement/index'),
name: 'materialManagement',
meta: {
title: '原油入库记录'
title: '物料管理',
noCache: true
}
},
{
path: '/inventory/oilTypeOutBoundList',
component: () =>
import('@/views/inventory/oilTypeOutBoundList/index.vue'),
name: 'index',
}]
},{
path: '/storeManagement',
component: Layout,
redirect: '/storeManagement/index',
children: [{
path: '/storeManagement/index',
component: () => import('@/views/storeManagement/index.vue'),
name: 'storeManagement',
meta: {
title: '原油出库记录'
title: '仓库管理',
noCache: true
}
},
{
path: '/inventory/oilTankInfo',
component: () =>
import('@/views/inventory/oilTankInfo/index.vue'),
name: 'index',
}]
},{
path: '/supplierManagement',
component: Layout,
redirect: '/supplierManagement/index',
children: [{
path: '/supplierManagement/index',
component: () => import('@/views/supplierManagement/index.vue'),
name: 'supplierManagement',
meta: {
title: '库存信息'
title: '供应商管理',
noCache: true
}
}]
},
]
},
// {
// path: 'rawMaterialType',
// component: Layout,
// redirect: '/rawMaterialType',
// children: [{
// path: '/rawMaterialType/index',
// component: () => import('@/views/rawMaterialType/index.vue'),
// name: 'index',
// meta: {
// title: '原料类型',
// noCache: true
// }
// }]
// }, {
// path: 'rawMaterialInfo',
// component: Layout,
// redirect: '/rawMaterialInfo',
// children: [{
// path: '/rawMaterialInfo/index',
// component: () => import('@/views/rawMaterialInfo/index.vue'),
// name: 'index',
// meta: {
// title: '原料信息',
// noCache: true
// }
// }]
// },
// {
// path: 'oilType',
// component: Layout,
// redirect: '/oilType',
// children: [{
// path: '/oilType/index',
// component: () => import('@/views/oilType/index.vue'),
// name: 'index',
// meta: {
// title: '原油类型',
// noCache: true
// }
// }]
// }, {
// path: 'oilTank',
// component: Layout,
// redirect: '/oilTank',
// children: [{
// path: '/oilTank/index',
// component: () => import('@/views/oilTank/index.vue'),
// name: 'index',
// meta: {
// title: '油罐信息',
// noCache: true
// }
// }]
// }, {
// path: 'flowInstrument',
// component: Layout,
// redirect: '/flowInstrument',
// children: [{
// path: '/flowInstrument/index',
// component: () => import('@/views/flowInstrument/index.vue'),
// name: 'index',
// meta: {
// title: '流程仪器',
// noCache: true
// }
// }]
// }, {
// path: 'oilTypeInAndOutBound',
// component: Layout,
// redirect: '/oilTypeInAndOutBound',
// children: [{
// path: '/oilTypeInAndOutBound/index',
// component: () => import('@/views/oilTypeInAndOutBound/index.vue'),
// name: 'index',
// meta: {
// title: '原油出入库记录',
// noCache: true
// }
// }]
// }, {
// path: 'rawMaterialInAndOutBound',
// component: Layout,
// redirect: '/rawMaterialInAndOutBound',
// children: [{
// path: '/rawMaterialInAndOutBound/index',
// component: () => import('@/views/rawMaterialInAndOutBound/index.vue'),
// name: 'index',
// meta: {
// title: '原料出入库记录',
// noCache: true
// }
// }]
// },
...codemenu,
{
path: '/404',

68
src/router/modules/codemenu.js

@ -1,70 +1,4 @@
import Layout from '@/layout'
const codemenu = [{
path: '/kehu',
component: Layout,
redirect: '/customermanagement',
children: [{
path: '/customermanagement',
component: () => import('@/views/customermanagement/customermanagement.vue'),
name: 'CustomerManagement',
meta: {
title: '客户管理',
noCache: true
}
}]
},
{
path: 'oilType',
component: Layout,
redirect: '/oilType',
children: [{
path: '/oilType/index',
component: () => import('@/views/oilType/index.vue'),
name: 'index',
meta: {
title: '原油类型',
noCache: true
}
}]
},{
path: '/enterprise',
component: Layout,
redirect: '/index',
children: [{
path: '/enterprise/index',
component: () => import('@/views/enterprise/index.vue'),
name: 'index',
meta: {
title: '企业管理',
noCache: true
}
}]
},{
path: 'industry',
component: Layout,
redirect: '/industry',
children: [{
path: '/industry/industryInfo',
component: () => import('@/views/industry/industryInfo.vue'),
name: 'industryInfo',
meta: {
title: '项目行业',
noCache: true
}
}]
},{
path: 'projectType',
component: Layout,
redirect: '/projectType',
children: [{
path: '/projectType/projectTypeInfo',
component: () => import('@/views/projectType/projectTypeInfo.vue'),
name: 'projectTypeInfo',
meta: {
title: '项目类型',
noCache: true
}
}]
}]
const codemenu = []
export default codemenu

153
src/views/MaterialBrand/index.vue

@ -0,0 +1,153 @@
<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" 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>
</div>
</div>
</template>
<script>
import req from '@/api/oilTypeInAndOutBound/oilTypeInAndOutBound'
import Pagination from '@/components/pagination'
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,
btnList: [
{
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: ""
}
}
},
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 'doClose': //
this.doClose()
break
default:
break
}
},
init() {
this.loadLogList()
},
loadLogList() {
// req.logPagerList({
// }).then(res => {
// })
},
//
indexMethod(index) {
var pagestart = (this.logListQuery.current - 1) * this.logListQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
indexMethod2(index) {
var pagestart = (this.in112ListQuery.current - 1) * this.in112ListQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
</style>

219
src/views/baseInfo/flowInstrument/flowInstrumentAdd.vue

@ -1,219 +0,0 @@
<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.name" 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">流量仪器Code</span>
<el-input v-model="formobj.code" placeholder="" class="item_input" clearable />
</div>
<!-- <div class="item">
<span class="item_text">油罐编号</span>
<el-select v-model="formobj.tankNumber" filterable placeholder="请选择油罐编号" class="item_input" @change="getTank">
<el-option v-for="item in tankList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select>
</div> -->
</el-card>
</div>
</div>
</template>
<script>
import req from '@/api/flowInstrument/flowInstrument'
import req2 from '@/api/oilTypeInAndOutBound/oilTypeInAndOutBound'
export default {
data() {
return {
submitdisabled: false,
tankLists: [],
tankList: [],
formobj: {
sid: "",
name: "",
number: "",
code: "",
tankNumber: "",
tankSid:"",
}
}
},
created() {
this.getTankList()
},
methods: {
getTankList() {
req2.tankList().then((res) => {
if (res.success) {
console.log(">>>>>>>>>111111111111wwwwwwwwww", res.data)
this.tankLists = res.data
for (var i = 0; i < this.tankLists.length; i++) {
let item = {
name: this.tankLists[i].number,
sid: this.tankLists[i].sid,
}
this.tankList.push(item)
}
}
})
},
getTank(value) {
console.log(">>>>>>>>>getType", value)
const choose = this.tankLists.filter((item) => item.sid === value)
console.log(">>>>>>>>>getType", choose[0])
this.formobj.tankSid = choose[0].sid
},
saveOrUpdate() {
if(this.formobj.sid){
req.updateData(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
}else{
req.addInfo(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
}
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
sid: "",
name: "",
number: "",
code: "",
tankNumber:"",
tankSid:"",
}
this.$emit('doback')
},
showAdd() {
},
showEdit(row) {
console.log("sid>>>>>>>>>",row.sid)
req.fetchBySid(row.sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
}
})
.catch(e => {
this.formobj = row
})
}
}
}
</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>

227
src/views/baseInfo/flowInstrument/index.vue

@ -1,227 +0,0 @@
<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>
<!-- 翻页分页 -->
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> -->
</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="操作" wid align="center" width="180">
<template slot-scope="scope">
<!-- <el-button type="primary" size="mini" @click="toDetail(scope.row)">查看</el-button> -->
<el-button type="primary" size="mini" @click="toEdit(scope.row)">编辑</el-button>
<el-button type="primary" size="mini" @click="doDel(scope.row)">删除</el-button>
</template>
</el-table-column>
<el-table-column label="流量仪器名称" prop="name" align="center" />
<el-table-column label="流量仪器编码" prop="number" align="center" />
<el-table-column label="流量仪器Code" prop="code" align="center" />
<!-- <el-table-column label="油罐编号" prop="tankNumber" align="center" />
<el-table-column label="原油编码" prop="crudeNumber" 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>
<flowInstrumentAdd v-show="viewState ==2 || viewState ==3" ref="divAdd" @doback="resetState" @reloadlist="getList" />
<!-- <oilTypeInfo v-show="viewState ==4" ref="divInfo" @doback="resetState" @reloadlist="getList" /> -->
</div>
</template>
<script>
import req from '@/api/flowInstrument/flowInstrument'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import flowInstrumentAdd from './flowInstrumentAdd.vue'
// import oilTypeInfo from './oilTypeInfo.vue'
export default {
name: 'CustomerManagement',
components: {
Pagination,
pageye,
ButtonBar,
flowInstrumentAdd,
// oilTypeInfo,
},
data() {
return {
listLoading: false,
btndisabled: false,
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: {
entryName: '',
},
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: {
entryName: ""
}
}
this.getList()
},
//
toAdd() {
this.viewState = 2
},
//
toEdit(row) {
this.viewState = 3
this.$refs['divAdd'].showEdit(row)
},
// ID
doDel(row) {
const tip = '请确认是否删除所选记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
req.delBySids(row.sid).then((response) => {
if (response.success) {
this.$message({
showClose: true,
type: 'success',
message: '删除成功'
})
this.getList()
} else {
this.$message({
showClose: true,
type: 'error',
message: '删除失败'
})
}
})
})
},
// toDetail(row) {
// this.viewState = 4
// this.$refs['divInfo'].showAdd(row.sid)
// },
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
</style>

262
src/views/baseInfo/materialInfo/index.vue

@ -1,262 +0,0 @@
<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>
<!-- 翻页分页 -->
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> -->
</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="原料名称" prop="name" align="center" />
<el-table-column label="原料编码" prop="number" align="center" />
<el-table-column label="原料类型" prop="typeName" align="center" />
<el-table-column label="原料初始库存" prop="initialInventory" align="center" />
<el-table-column label="原料现有库存" prop="inventory" 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>
<materialInfoAdd 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>
<!-- <span>{{form.planContent}}</span> -->
<el-input v-model="form.existingInventory" 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/rawMaterialInfo/rawMaterialInfo.js'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import materialInfoAdd from './materialInfoAdd.vue'
// import oilTypeInfo from './oilTypeInfo.vue'
export default {
name: 'CustomerManagement',
components: {
Pagination,
pageye,
ButtonBar,
materialInfoAdd,
// oilTypeInfo,
},
data() {
return {
listLoading: false,
btndisabled: false,
editDialog: false,
form: {},
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: {
entryName: ""
}
}
this.getList()
},
//
toAdd() {
this.viewState = 2
},
//
toEdit(row) {
this.viewState = 3
this.$refs['divAdd'].showEdit(row)
},
// ID
doDel(row) {
const tip = '请确认是否删除所选记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
req.delBySids(row.sid).then((response) => {
if (response.success) {
this.$message({
showClose: true,
type: 'success',
message: '删除成功'
})
this.getList()
} else {
this.$message({
showClose: true,
type: 'error',
message: '删除失败'
})
}
})
})
},
toDetail(row) {
this.editDialog = true;
this.form.tankSid = row.sid
},
save() {
console.log("form", this.form)
req.saveInfo(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>

190
src/views/baseInfo/materialInfo/materialInfoAdd.vue

@ -1,190 +0,0 @@
<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.name" 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-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-input v-model="formobj.initialInventory" placeholder="" class="item_input" clearable />
</div>
</el-card>
</div>
</div>
</template>
<script>
import req from '@/api/rawMaterialInfo/rawMaterialInfo'
export default {
data() {
return {
submitdisabled: false,
typeLists: [],
typeList: [],
formobj: {
sid: "",
name: "",
number: "",
inventory: "",
initialInventory: "",
typeSid: "",
typeName: "",
}
}
},
created() {
this.rawMaterialType()
},
methods: {
rawMaterialType() {
req.rawMaterialType().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)
}
}
})
},
saveOrUpdate() {
req.addInfo(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
sid: "",
name: "",
number: "",
inventory: "",
initialInventory: "",
typeSid: "",
typeName: "",
}
this.$emit('doback')
},
getType(value) {
console.log(">>>>>>>>>getType", value)
const choose = this.typeLists.filter((item) => item.sid === value)
console.log(">>>>>>>>>getType", choose[0])
this.formobj.typeSid = choose[0].sid
this.formobj.typeName = choose[0].name
},
}
}
</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>

225
src/views/baseInfo/materialType/index.vue

@ -1,225 +0,0 @@
<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>
<!-- 翻页分页 -->
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> -->
</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="操作" wid align="center" width="180">
<template slot-scope="scope">
<!-- <el-button type="primary" size="mini" @click="toDetail(scope.row)">查看</el-button> -->
<el-button type="primary" size="mini" @click="toEdit(scope.row)">编辑</el-button>
<el-button type="primary" size="mini" @click="doDel(scope.row)">删除</el-button>
</template>
</el-table-column>
<el-table-column label="物料类型" prop="name" align="center" />
<el-table-column label="物料编码" prop="number" align="center" />
<el-table-column label="物料Code" prop="code" 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>
<materialTypeAdd v-show="viewState ==2 || viewState ==3" ref="divAdd" @doback="resetState" @reloadlist="getList" />
<!-- <oilTypeInfo v-show="viewState ==4" ref="divInfo" @doback="resetState" @reloadlist="getList" /> -->
</div>
</template>
<script>
import req from '@/api/rawMaterialType/rawMaterialType'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import materialTypeAdd from './materialTypeAdd.vue'
// import oilTypeInfo from './oilTypeInfo.vue'
export default {
name: 'CustomerManagement',
components: {
Pagination,
pageye,
ButtonBar,
materialTypeAdd,
// oilTypeInfo,
},
data() {
return {
listLoading: false,
btndisabled: false,
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: {
entryName: '',
},
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: {
entryName: ""
}
}
this.getList()
},
//
toAdd() {
this.viewState = 2
},
//
toEdit(row) {
this.viewState = 3
this.$refs['divAdd'].showEdit(row)
},
// ID
doDel(row) {
const tip = '请确认是否删除所选记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
req.delBySids(row.sid).then((response) => {
if (response.success) {
this.$message({
showClose: true,
type: 'success',
message: '删除成功'
})
this.getList()
} else {
this.$message({
showClose: true,
type: 'error',
message: '删除失败'
})
}
})
})
},
// toDetail(row) {
// this.viewState = 4
// this.$refs['divInfo'].showAdd(row.sid)
// },
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
</style>

194
src/views/baseInfo/materialType/materialTypeAdd.vue

@ -1,194 +0,0 @@
<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>
<div class="item_input">
<el-radio v-model="radio" label="1">原料</el-radio>
<el-radio v-model="radio" label="2">包装物</el-radio>
</div>
</div>
<div class="item">
<span class="item_text">物料类型</span>
<el-input v-model="formobj.name" 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">物料Code</span>
<el-input v-model="formobj.code" placeholder="" class="item_input" clearable />
</div>
</el-card>
</div>
</div>
</template>
<script>
import req from '@/api/rawMaterialType/rawMaterialType'
export default {
data() {
return {
submitdisabled: false,
radio:"1",
formobj: {
sid: "",
type:"",
name: "",
number: "",
code: ""
}
}
},
methods: {
saveOrUpdate() {
console.log("radio》》》》》》》",this.radio)
this.formobj.type = this.radio
if(this.formobj.sid){
req.updateData(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
}else{
req.addInfo(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
}
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
sid: "",
name: "",
number: "",
code: ""
}
this.$emit('doback')
},
showAdd() {
},
showEdit(row) {
console.log("sid>>>>>>>>>",row.sid)
req.fetchBySid(row.sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
}
})
.catch(e => {
this.formobj = row
})
}
}
}
</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>

254
src/views/baseInfo/materialType/oilTypeInfo.vue

@ -1,254 +0,0 @@
<template>
<div class="app-container">
<div>
<div class="tab-header webtop">
<div>查看项目信息</div>
<div>
<el-button type="info" size="small" icon="el-icon-close" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="listconadd" style="padding-bottom: 50px;">
<el-form ref="dataForm" :model="temp" label-position="top" label-width="190px" class="formadd">
<div class="titwu">项目信息表</div>
<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>{{temp.entryName}}</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>{{temp.industryName}}</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>{{temp.typeName}}</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>{{temp.creditLimit}}</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>{{temp.bankName}}</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>{{temp.bmanagerName}}</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>{{temp.engaDate}}</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>{{temp.signingDate}}</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>{{temp.enterpriseName}}</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>{{temp.econtacts}}</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="20">
<el-form-item class="trightb_item">
<span>{{temp.remarks}}</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>{{temp.regulatoryLeader}}</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>{{temp.generalManager}}</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>{{temp.endDate}}</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>{{temp.fillInDate}}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/oilType/oilType'
export default {
name: 'CustomerManagementInfo',
data() {
return {
temp: {} //
}
},
methods: {
showAdd(sid) {
req.fetchBySid(sid)
.then(resp => {
if (resp.success) {
this.temp = resp.data
}
})
.catch(e => {
this.$emit('doback')
})
},
//
handleReturn() {
this.$emit('doback')
}
}
}
</script>
<style scoped>
.trightb {
display: flex;
align-items: center;
text-align: ;
justify-content: center;
}
.trightb_item {
padding-top: 5px;
}
.span {
margin-left: 50px;
font-size: 15px;
font-weight: 400;
}
/deep/ .el-collapse-item__header {
height: 40px;
padding: 10px;
font-weight: bold;
font-size: 20px;
text-align: left;
color: #ffffff;
background-color: #0294d7;
}
/deep/ .el-collapse-item__content {
padding-bottom: 0;
}
</style>

263
src/views/baseInfo/oilTank/index.vue

@ -1,263 +0,0 @@
<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.number" 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>
<!-- 翻页分页 -->
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> -->
</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="油罐编号" prop="number" align="center" />
<el-table-column label="原油名称" prop="crudeName" align="center" />
<el-table-column label="原油编号" prop="crudeNumber" align="center" />
<el-table-column label="油罐容量" prop="capacity" align="center" />
<el-table-column label="油罐库存" prop="inventory" align="center" />
<el-table-column label="油罐现有库存" prop="existingInventory" 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>
<!-- <span>{{form.planContent}}</span> -->
<el-input v-model="form.existingInventory" 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/oilTank/oilTank'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import oilTankAdd from './oilTankAdd.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: {},
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: {
entryName: '',
},
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: {
entryName: ""
}
}
this.getList()
},
//
toAdd() {
this.viewState = 2
},
//
toEdit(row) {
this.viewState = 3
this.$refs['divAdd'].showEdit(row)
},
// ID
doDel(row) {
const tip = '请确认是否删除所选记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
req.delBySids(row.sid).then((response) => {
if (response.success) {
this.$message({
showClose: true,
type: 'success',
message: '删除成功'
})
this.getList()
} else {
this.$message({
showClose: true,
type: 'error',
message: '删除失败'
})
}
})
})
},
toDetail(row) {
this.editDialog = true;
this.form.tankSid = row.sid
},
save() {
console.log("form", this.form)
req.saveInfo(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>

258
src/views/baseInfo/oilTank/oilTankAdd.vue

@ -1,258 +0,0 @@
<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.number" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">原油名称</span>
<el-select v-model="formobj.crudeName" filterable placeholder="请选择原油名称" class="item_input" @change="getType">
<el-option v-for="item in crudeList" :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.crudeNumber" placeholder="" :readonly="true" class="item_input" clearable />
<!-- <span class="item_input">{{formobj.crudeNumber}}</span> -->
</div>
<div class="item">
<span class="item_text">流量仪器</span>
<el-select v-model="formobj.flowmeterName" filterable placeholder="请选择流量仪器" class="item_input"
@change="getFlowmeter">
<el-option v-for="item in flowmeterList" :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.capacity" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">油罐库存</span>
<el-input v-model="formobj.initialInventory" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">油罐底面积</span>
<el-input v-model="formobj.bottomArea" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">原油密度</span>
<el-input v-model="formobj.density" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">油罐高度</span>
<el-input v-model="formobj.height" placeholder="" class="item_input" clearable />
</div>
</el-card>
</div>
</div>
</template>
<script>
import req from '@/api/oilTank/oilTank'
import req2 from '@/api/flowInstrument/flowInstrument'
export default {
data() {
return {
submitdisabled: false,
crudeLists: [],
crudeList: [],
flowmeterLists: [],
flowmeterList: [],
formobj: {
sid: "",
number: "",
crudeSid: "",
crudeName: "",
crudeNumber: "",
flowmeterSid: "",
flowmeterName: "",
capacity: "",
tankPipeline: "",
initialInventory: "",
bottomArea: "",
density: "",
height: "",
}
}
},
created() {
this.crudeinfoList()
this.getFlowmeterList()
},
methods: {
crudeinfoList() {
req.crudeinfoList().then((res) => {
if (res.success) {
console.log(">>>>>>>>>2222222", res.data)
this.crudeLists = res.data
for (var i = 0; i < this.crudeLists.length; i++) {
let item = {
name: this.crudeLists[i].name,
sid: this.crudeLists[i].sid,
}
this.crudeList.push(item)
}
}
})
},
getFlowmeterList() {
console.log(">>>>>>>>>111111111111wwwwwwwwww")
req2.flowmeterList().then((res) => {
if (res.success) {
console.log(">>>>>>>>>111111111111wwwwwwwwww", res.data)
this.flowmeterLists = res.data
for (var i = 0; i < this.flowmeterLists.length; i++) {
let item = {
name: this.flowmeterLists[i].number,
sid: this.flowmeterLists[i].sid,
}
this.flowmeterList.push(item)
}
}
})
},
saveOrUpdate() {
req.addInfo(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
sid: "",
number: "",
crudeSid: "",
crudeName: "",
crudeNumber: "",
flowmeterSid: "",
flowmeterName: "",
capacity: "",
tankPipeline: "",
initialInventory: "",
bottomArea: "",
density: "",
height: "",
}
this.$emit('doback')
},
getType(value) {
console.log(">>>>>>>>>getType", value)
const choose = this.crudeLists.filter((item) => item.sid === value)
console.log(">>>>>>>>>getType", choose[0])
// this.formobj.crudeSid = choose[0].sid
this.formobj.crudeNumber = choose[0].number
this.formobj.crudeSid = value
},
getFlowmeter(value) {
console.log(">>>>>>>>>getType", value)
const choose = this.flowmeterLists.filter((item) => item.sid === value)
console.log(">>>>>>>>>getType", choose[0])
this.formobj.flowmeterSid = choose[0].sid
this.formobj.flowmeterName = choose[0].number
},
}
}
</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>

226
src/views/baseInfo/oilType/index.vue

@ -1,226 +0,0 @@
<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>
<!-- 翻页分页 -->
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> -->
</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="操作" wid align="center" width="180">
<template slot-scope="scope">
<!-- <el-button type="primary" size="mini" @click="toDetail(scope.row)">查看</el-button> -->
<el-button type="primary" size="mini" @click="toEdit(scope.row)">编辑</el-button>
<el-button type="primary" size="mini" @click="doDel(scope.row)">删除</el-button>
</template>
</el-table-column>
<el-table-column label="原油名称" prop="name" align="center" />
<el-table-column label="原油编码" prop="number" align="center" />
<el-table-column label="原油Code" prop="code" align="center" />
<el-table-column label="原油单价" prop="price" 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>
<oilTypeAdd v-show="viewState ==2 || viewState ==3" ref="divAdd" @doback="resetState" @reloadlist="getList" />
<!-- <oilTypeInfo v-show="viewState ==4" ref="divInfo" @doback="resetState" @reloadlist="getList" /> -->
</div>
</template>
<script>
import req from '@/api/oilType/oilType'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import oilTypeAdd from './oilTypeAdd.vue'
// import oilTypeInfo from './oilTypeInfo.vue'
export default {
name: 'CustomerManagement',
components: {
Pagination,
pageye,
ButtonBar,
oilTypeAdd,
// oilTypeInfo,
},
data() {
return {
listLoading: false,
btndisabled: false,
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: {
entryName: '',
},
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: {
entryName: ""
}
}
this.getList()
},
//
toAdd() {
this.viewState = 2
},
//
toEdit(row) {
this.viewState = 3
this.$refs['divAdd'].showEdit(row)
},
// ID
doDel(row) {
const tip = '请确认是否删除所选记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
req.delBySids(row.sid).then((response) => {
if (response.success) {
this.$message({
showClose: true,
type: 'success',
message: '删除成功'
})
this.getList()
} else {
this.$message({
showClose: true,
type: 'error',
message: '删除失败'
})
}
})
})
},
// toDetail(row) {
// this.viewState = 4
// this.$refs['divInfo'].showAdd(row.sid)
// },
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
</style>

203
src/views/baseInfo/oilType/oilTypeAdd.vue

@ -1,203 +0,0 @@
<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.name" 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">原油Code</span>
<el-input v-model="formobj.code" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">原油单价</span>
<el-input v-model="formobj.price" @input="limitInput($event,'slPrice')" placeholder="" class="item_input"
clearable />
</div>
</el-card>
</div>
</div>
</template>
<script>
import req from '@/api/oilType/oilType'
export default {
data() {
return {
submitdisabled: false,
formobj: {
sid: "",
name: "",
number: "",
code: "",
price: "",
}
}
},
methods: {
/**
* 1必须为数字
* 2只能有一个小数点
* 3小数点后保留两位小数
* 4当第一位输入小数点的时候自动补全补为 0.
* 5除非是小数否则数字不能以0开头
* @param {string} value - 输入的值
* @param {string} name - 匹配的对象属性 [mkPrice | slPrice]
*/
limitInput(value, name) {
this.formobj.price =
("" + value) //
.replace(/[^\d^\.]+/g, "") //
.replace(/^0+(\d)/, "$1") // 00
.replace(/^\./, "0.") // 0.
.match(/^\d*(\.?\d{0,2})/g)[0] || ""; // 02
},
saveOrUpdate() {
if (this.formobj.sid) {
req.updateData(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
} else {
req.addInfo(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
}
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
sid: "",
name: "",
number: "",
code: "",
price: "",
}
this.$emit('doback')
},
showAdd() {
},
showEdit(row) {
console.log("sid>>>>>>>>>", row.sid)
req.fetchBySid(row.sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
}
})
.catch(e => {
this.formobj = row
})
}
}
}
</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>

254
src/views/baseInfo/oilType/oilTypeInfo.vue

@ -1,254 +0,0 @@
<template>
<div class="app-container">
<div>
<div class="tab-header webtop">
<div>查看项目信息</div>
<div>
<el-button type="info" size="small" icon="el-icon-close" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="listconadd" style="padding-bottom: 50px;">
<el-form ref="dataForm" :model="temp" label-position="top" label-width="190px" class="formadd">
<div class="titwu">项目信息表</div>
<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>{{temp.entryName}}</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>{{temp.industryName}}</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>{{temp.typeName}}</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>{{temp.creditLimit}}</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>{{temp.bankName}}</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>{{temp.bmanagerName}}</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>{{temp.engaDate}}</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>{{temp.signingDate}}</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>{{temp.enterpriseName}}</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>{{temp.econtacts}}</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="20">
<el-form-item class="trightb_item">
<span>{{temp.remarks}}</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>{{temp.regulatoryLeader}}</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>{{temp.generalManager}}</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>{{temp.endDate}}</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>{{temp.fillInDate}}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/oilType/oilType'
export default {
name: 'CustomerManagementInfo',
data() {
return {
temp: {} //
}
},
methods: {
showAdd(sid) {
req.fetchBySid(sid)
.then(resp => {
if (resp.success) {
this.temp = resp.data
}
})
.catch(e => {
this.$emit('doback')
})
},
//
handleReturn() {
this.$emit('doback')
}
}
}
</script>
<style scoped>
.trightb {
display: flex;
align-items: center;
text-align: ;
justify-content: center;
}
.trightb_item {
padding-top: 5px;
}
.span {
margin-left: 50px;
font-size: 15px;
font-weight: 400;
}
/deep/ .el-collapse-item__header {
height: 40px;
padding: 10px;
font-weight: bold;
font-size: 20px;
text-align: left;
color: #ffffff;
background-color: #0294d7;
}
/deep/ .el-collapse-item__content {
padding-bottom: 0;
}
</style>

254
src/views/baseInfo/supplier/index.vue

@ -1,254 +0,0 @@
<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="100px" class="tab-header">
<el-form-item label="供应商名称">
<el-input v-model="listQuery.params.supplierName" 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>
<!-- 翻页分页 -->
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> -->
</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="操作" wid align="center" width="180">
<template slot-scope="scope">
<!-- <el-button type="primary" size="mini" @click="toDetail(scope.row)">查看</el-button> -->
<el-button type="primary" size="mini" @click="toEdit(scope.row)">编辑</el-button>
<el-button type="primary" size="mini" @click="doDel(scope.row)">删除</el-button>
</template>
</el-table-column>
<el-table-column label="供应商名称" prop="supplierName" align="center" />
<el-table-column label="供应商编码" prop="supplierNumber" align="center" />
<el-table-column label="供应商Code" prop="supplierCode" align="center" />
<el-table-column label="联系人" prop="contacts" align="center" />
<el-table-column label="联系电话" prop="telephone" 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>
<supplierInfoAdd v-show="viewState ==2 || viewState ==3" ref="divAdd" @doback="resetState" @reloadlist="getList" />
</div>
</template>
<script>
import req from '@/api/supplier/supplier.js'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import supplierInfoAdd from './supplierInfoAdd.vue'
// import oilTypeInfo from './oilTypeInfo.vue'
export default {
name: 'CustomerManagement',
components: {
Pagination,
pageye,
ButtonBar,
supplierInfoAdd,
// oilTypeInfo,
},
data() {
return {
listLoading: false,
btndisabled: false,
editDialog: false,
form: {},
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: {
supplierName: '',
},
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: {
entryName: ""
}
}
this.getList()
},
//
toAdd() {
this.viewState = 2
},
//
toEdit(row) {
this.viewState = 3
this.$refs['divAdd'].showEdit(row)
},
// ID
doDel(row) {
const tip = '请确认是否删除所选记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
req.delBySids(row.sid).then((response) => {
if (response.success) {
this.$message({
showClose: true,
type: 'success',
message: '删除成功'
})
this.getList()
} else {
this.$message({
showClose: true,
type: 'error',
message: '删除失败'
})
}
})
})
},
toDetail(row) {
this.editDialog = true;
this.form.tankSid = row.sid
},
save() {
console.log("form", this.form)
req.saveInfo(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>

188
src/views/baseInfo/supplier/supplierInfoAdd.vue

@ -1,188 +0,0 @@
<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.supplierName" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">供应商编码</span>
<el-input v-model="formobj.supplierNumber" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">供应商Code</span>
<el-input v-model="formobj.supplierCode" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">联系人</span>
<el-input v-model="formobj.contacts" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">联系电话</span>
<el-input v-model="formobj.telephone" placeholder="" maxlength="11" class="item_input" clearable />
</div>
</el-card>
</div>
</div>
</template>
<script>
import req from '@/api/supplier/supplier'
export default {
data() {
return {
submitdisabled: false,
formobj: {
sid: "",
supplierName: "",
supplierNumber: "",
supplierCode: "",
contacts: "",
telephone: "",
}
}
},
methods: {
saveOrUpdate() {
if(this.formobj.sid){
req.updateData(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
}else{
req.addInfo(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
}
},
showEdit(row) {
console.log("sid>>>>>>>>>",row.sid)
req.fetchBySid(row.sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
}
})
.catch(e => {
this.formobj = row
})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
sid: "",
supplierName: "",
supplierNumber: "",
supplierCode: "",
contacts: "",
telephone: "",
}
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>

436
src/views/customermanagement/customermanagement.vue

@ -1,436 +0,0 @@
<template>
<div class="app-container">
<div v-show="viewState ==1">
<button-bar view-title="客户管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<!--登记类型弹窗-->
<el-dialog
title="客户登记-类型"
:visible.sync="dialogVisible"
width="28%"
top="13%">
<el-form :model="customerTypeList">
<el-form-item label="联络方式" :label-width="formLabelWidth" class="diaForm">
<el-select v-model="customerTypeList.visitWay" placeholder="请选择联络方式" @change="getVisitWay">
<el-option v-for="(item) in visitWay_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="客户类型" :label-width="formLabelWidth" class="diaForm">
<el-radio-group v-model="customerTypeList.customerType">
<el-radio v-for="item in merType" :key="item.dictKey" :label="item.dictValue" @change="customerTypeChange">{{ item.dictValue }}
</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button class="el-button-sure" type="primary" @click="handleOpen()">确定</el-button>
<el-button @click="dialogVisible = false">关闭</el-button>
</span>
</el-dialog>
<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-item label="客户类型">
<el-select v-model="listQuery.params.customerTypeKey" class="addinputw" placeholder="请选择">
<el-option v-for="(item, index) in merType" :key="index.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="联系电话">
<el-input v-model="listQuery.params.mobile" maxlength="20" placeholder="请输入联系电话" class="addinputw" clearable/>
</el-form-item>
<el-form-item label="客户级别">
<el-select v-model="listQuery.params.levelKey" class="addinputw" placeholder="请选择客户级别">
<el-option v-for="(item, index) in induslevel" :key="index.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="提醒日期">
<el-date-picker value-format="yyyy-MM-dd" v-model="listQuery.params.remindStartDay" clearable style="width: 160px;" type="date" placeholder="开始日期"/>
<div class="line"></div>
<el-date-picker value-format="yyyy-MM-dd" v-model="listQuery.params.remindEndDay" clearable style="width: 160px;" type="date" placeholder="结束日期"/>
</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>
<!-- 翻页分页 -->
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
<div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border fit highlight-current-row style="width: 100%;" @selection-change="handleSelectionChange">
<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">
<template slot-scope="scope">
<span>{{ scope.row.customerNo }}</span>
</template>
</el-table-column>
<el-table-column prop="jc" label="客户名称" align="center">
<template slot-scope="scope">
<span class="bluezi" @click="handleCheck(scope.row)">{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column label="客户类型" align="center">
<template slot-scope="scope">
<span>{{ scope.row.customerType }}</span>
</template>
</el-table-column>
<el-table-column label="联系电话" align="center">
<template slot-scope="scope">
<span>{{ scope.row.mobile }}</span>
</template>
</el-table-column>
<el-table-column label="微信号" align="center">
<template slot-scope="scope">
<span>{{ scope.row.weixin }}</span>
</template>
</el-table-column>
<el-table-column label="客户级别" align="center">
<template slot-scope="scope">
<span>{{ scope.row.level }}</span>
</template>
</el-table-column>
<el-table-column label="提醒日期" align="center">
<template slot-scope="scope">
<span>{{ scope.row.remind_day }}</span>
</template>
</el-table-column>
</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>
<customermanagementAdd v-show="viewState ==2 || viewState ==3" ref="divAdd" @handleReturn="resetState" @reloadlist="getList"/>
<customermanagementInfo v-show="viewState ==4" ref="divInfo" @handleReturn="resetState"/>
</div>
</template>
<script>
import { deleteBySids, pagerList } from '@/api/customermanagement/customermanagement'
import { typeValues } from '@/api/Common/dictcommons'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import customermanagementAdd from './customermanagementAdd.vue'
import customermanagementInfo from './customermanagementInfo.vue'
export default {
name: 'CustomerManagement',
components: {
Pagination,
pageye,
ButtonBar,
customermanagementAdd,
customermanagementInfo
},
data() {
return {
btndisabled: false,
btnList: [
{
type: 'primary',
size: 'small',
icon: 'plus',
btnKey: 'toAdd',
btnLabel: '新增'
},
{
type: 'primary',
size: 'small',
icon: 'edit',
btnKey: 'toEdit',
btnLabel: '编辑'
},
{
type: 'danger',
size: 'small',
icon: 'del',
btnKey: 'doDel',
btnLabel: '删除'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
dialogVisible: false, //
formLabelWidth: '110px',
customerTypeList: {
visitWay: '', //
visitWayKey: '',
customerType: '', //
customerTypeKey: '', //
psid: ''
},
visitWay_list: [],
merType: [],
induslevel: [],
isSearchShow: false,
searchxianshitit: '显示查询条件',
// -----------
tableKey: 0,
list: [],
sids: [],
FormLoading: false,
listLoading: false,
listQuery: {
current: 1,
size: 10,
params: {
customerTypeKey: '',
levelKey: '',
mobile: '',
name: '',
remindStartDay: '',
remindEndtDay: '',
staffSid: window.sessionStorage.getItem('staffSid')
},
total: 0
},
viewState: 1
}
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
created() {
//
this.init()
//
},
methods: {
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'toAdd':
this.toAdd()
break
case 'toEdit':
this.toEdit()
break
case 'doDel':
this.doDel()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
//
init() {
this.getList()
this.getShuJUZiDian()
},
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
this.listLoading = true
pagerList(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: {
customerTypeKey: '',
levelKey: '',
mobile: '',
name: '',
remindStartDay: '',
remindEndtDay: '',
staffSid: window.sessionStorage.getItem('staffSid')
}
}
this.getList()
},
//
toAdd() {
this.dialogVisible = true
},
handleOpen() {
if (this.customerTypeList.visitWay !== '' && this.customerTypeList.customerType !== '') {
this.dialogVisible = false
const customerTypeList = this.customerTypeList
this.viewState = 2
this.$refs['divAdd'].openCreate(customerTypeList)
this.customerTypeList = {
visitWay: '',
visitWayKey: '',
customerType: '',
customerTypeKey: '',
psid: ''
}
} else {
this.$message({
message: '请填写联络方式和客户类型',
type: 'warning'
})
}
},
//
handleSelectionChange(row) {
const aa = []
row.forEach((element) => {
aa.push(element.sid)
})
this.sids = aa
console.log('勾选记录', this.sids)
},
//
toEdit() {
if (this.sids.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行编辑操作' })
return
} else if (this.sids.length > 1) {
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行编辑操作' })
return
} else {
this.viewState = 3
this.$refs['divAdd'].openUpdate(this.sids[0])
}
},
//
handleCheck(row) {
this.viewState = 4
this.$refs['divInfo'].openInfo(row.sid)
},
// ID
doDel() {
if (this.sids.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' })
return
}
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteBySids(this.sids).then((response) => {
if (response.success) {
this.$message({ showClose: true, type: 'success', message: '删除成功' })
this.getList()
} else {
this.$message({ showClose: true, type: 'error', message: '删除失败' })
}
})
})
},
resetState() {
this.viewState = 1
},
// -------------------------------------------------------------
//
getShuJUZiDian() {
typeValues({ type: 'customerType' }).then((res) => {
if (res.success) {
this.merType = res.data
}
})
typeValues({ type: 'customerLevel' }).then((res) => {
if (res.success) {
this.induslevel = res.data
}
})
typeValues({ type: 'visitWay' }).then((res) => {
if (res.success) {
this.visitWay_list = res.data
}
})
},
//
customerTypeChange(val) {
const choosetItem = this.merType.filter((item) => item.dictValue === val)
this.customerTypeList.customerTypeKey = choosetItem[0].dictKey
this.customerTypeList.psid = choosetItem[0].sid
},
//
getVisitWay(value) {
let bb = null
this.visitWay_list.forEach((e) => {
if (e.dictKey === value) {
bb = {
type: 'visitWay',
name: e.dictValue,
vaule: e.dictKey,
sid: e.sid
}
}
})
this.customerTypeList.visitWay = bb.name
this.customerTypeList.visitWayKey = bb.vaule
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
.diaForm {
margin-bottom: 8px;
}
/* >>>操作符影响子组件 */
.diaForm >>> .el-form-item__label {
margin-right: 16px;
}
/deep/ .el-dialog__footer {
text-align: center;
}
.el-button-sure {
margin-right: 10%;
}
.line {
display: inline-block;
margin: 0px 15px;
}
</style>

660
src/views/customermanagement/customermanagementAdd.vue

@ -1,660 +0,0 @@
<template>
<div class="app-container">
<div>
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="primary" size="small" icon="" @click="handleJUBuCun()">保存</el-button>
<el-button type="info" size="small" icon="el-icon-close" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="listconadd">
<div class="titwu">客户信息</div>
<el-form ref="dataForm" :model="temp" label-position="top" label-width="190px" class="formadd " :rules="rules">
<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>
<span slot="label">客户名称</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="name">
<el-input v-model="temp.name" placeholder="请输入客户名称" style="width:50%" class="addinputw" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">客户类型</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="weChatID">
<span>{{ temp.customerType }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">联系电话</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="mobile">
<el-input v-model="temp.mobile" maxlength="20" placeholder="请输入联系电话" style="width:50%" class="addinputw" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">微信号</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="weixin">
<el-input v-model="temp.weixin" maxlength="20" placeholder="请输入微信号" style="width:50%" class="addinputw" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="temp.customerType==='个人'">
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">公司名称</span>
</el-form-item>
</el-col>
<el-col :span="20">
<el-form-item prop="company">
<el-input v-model="temp.companyName" maxlength="20" placeholder="请输入公司名称" style="width:81%" class="addinputw" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">客户地址</span>
</el-form-item>
</el-col>
<el-col :span="20">
<el-form-item>
<el-select v-model="temp.province" filterable placeholder="请选择省" class="addinputw" style="width:160px" @change="getShen">
<el-option v-for="item in inputProvinceList" :key="item.sid" :label="item.name" :value="item.sid"/>
</el-select>
<el-select v-model="temp.city" filterable placeholder="请选择市" class="addinputw" style="width:160px" @change="getShi">
<el-option v-for="item in inputCityList" :key="item.sid" :label="item.name" :value="item.sid"/>
</el-select>
<el-select v-model="temp.county" filterable placeholder="请选择县" class="addinputw" style="width:160px" @change="getQu">
<el-option v-for="item in inputCountyList" :key="item.sid" :label="item.name" :value="item.sid"/>
</el-select>
<el-input v-model="temp.address" style="width:46%" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">客户级别</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="level">
<el-select v-model="temp.level" class="addinputw" placeholder="请选择客户级别" style="width:50%" @change="getJiBie">
<el-option v-for="item in induslevel" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item v-show="isOnRemind == '是'">
<span slot="label">是否开启提醒</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item v-show="isOnRemind == '是'">
<el-radio :disabled="editState" v-model="temp.isOnRemind" label="是"></el-radio>
<el-radio :disabled="editState" v-model="temp.isOnRemind" label="否"></el-radio>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="temp.isOnRemind=='是' && isOnRemind == '是'">
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">提醒日期</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-date-picker v-model="temp.remind_day" type="date" style="width:50%" value-format="yyyy-MM-dd" placeholder="选择日期" :picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">提醒备注</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="temp.remind_remark" maxlength="20" style="width:50%" placeholder="请输入提醒备注" class="addinputw" clearable/>
</el-form-item>
</el-col>
</el-row>
<!--更多信息-->
<el-collapse v-model="activeNames">
<el-collapse-item title="更多信息" name="2">
<el-row v-show="temp.customerType==='个人'">
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">客户生日</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-date-picker v-model="temp.birthday" style="width:50%" type="date" format="yyyy-MM-dd" class="addinputw" value-format="yyyy-MM-dd" placeholder="请选择"/>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">性别</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-radio v-model="temp.sex" label="男"></el-radio>
<el-radio v-model="temp.sex" label="女"></el-radio>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">证件类型</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="temp.certificateType" style="width:50%" maxlength="20" :readonly="true" class="addinputw" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">证件号码</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="idnumber">
<el-input v-model="temp.idnumber" style="width:50%" maxlength="18" placeholder="请输入证件号码" class="addinputw" clearable @keyup.native="UpNumber"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">证件有效期</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-date-picker v-model="temp.endDate" style="width:50%" type="date" format="yyyy-MM-dd" class="addinputw" value-format="yyyy-MM-dd" placeholder="请选择"/>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">电子邮箱</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="e_mail">
<el-input v-model="temp.e_mail" maxlength="20" style="width:50%" placeholder="请输入电子邮箱" class="addinputw" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">紧急联系人</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="temp.emergencyContact" maxlength="20" style="width:50%" placeholder="请输入紧急联系人" class="addinputw" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">紧急联系电话</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="emergencyMobile">
<el-input v-model="temp.emergencyMobile" maxlength="20" style="width:50%" placeholder="请输入紧急联系电话" class="addinputw" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">客户来源</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-select v-model="temp.source" class="addinputw" style="width:50%" placeholder="请选择客户来源" @change="getKeHuLaiYUan">
<el-option v-for="item in sourceLisst" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">客户分类</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-select v-model="temp.customerClass" style="width:50%" class="addinputw" placeholder="请选择客户分类" @change="getFenLei">
<el-option v-for="item in merClass" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">备注</span>
</el-form-item>
</el-col>
<el-col :span="20">
<el-form-item>
<el-input v-model="temp.remarks" style="width:81%" maxlength="20" placeholder="请输入备注" class="addinputw" clearable/>
</el-form-item>
</el-col>
</el-row>
</el-collapse-item>
</el-collapse>
</el-form>
</div>
</div>
<!-- 弹框提示 -->
<el-dialog :visible.sync="dialogFormVisible" width="300px" :close-on-click-modal="false">
<div class="result-cont">
是否更新用户
</div>
<div slot="footer" v-loading="FormLoading" class="dialog-footer">
<el-button @click="dialogFormVisibl()"></el-button>
<el-button type="primary" @click="dialogStatus()"></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getPcCustomerInfoBySid, savePcCustomerInfo, updatePcCustomerInfo } from '@/api/customermanagement/customermanagement'
import { getCity, getCounty, getProvince } from '@/api/portal/areaPicker' //
import { typeValues } from '@/api/Common/dictcommons'
export default {
name: 'CustomerManagementAdd',
data() {
var checkSubmit = (rule, value, callback) => {
const Submit =
/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/
if (value) {
if (!Submit.test(value)) {
callback(new Error('请输入手机号'))
}
callback()
}
callback()
}
var validatePass2 = (rule, value, callback) => {
const WeiXin = /^[a-zA-Z][a-zA-Z\d_-]{5,19}$/
const phone = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/
if (value) {
//
if (!WeiXin.test(value) && !phone.test(value)) {
callback(new Error('请输入正确的微信号码'))
}
callback()
} else {
callback()
}
}
var validateE_mail = (rules, value, callback) => {
const mail =
/^[a-zA-Z0-9_-]+@([a-zA-Z0-9]+\.)+(com|cn|net|org)$/
if (value) {
if (!mail.test(value)) {
callback(new Error('请输入正确的电子邮箱'))
}
callback()
}
callback()
}
return {
viewTitle: '',
//
pickerOptions: {
disabledDate(time) {
let oneDay = 60 * 60 * 24 * 1000;
return time.getTime() < Date.now() - oneDay
}
},
editState: false,
isOnRemind: '是',
inputProvinceList: [],
inputCityList: [],
inputCountyList: [],
list: [],
activeNames: ['1'],
// ---------
merClass: [],
customerSource: 'customerSource',
sourceLisst: [],
customerLevel: 'customerLevel',
induslevel: [],
customerType: 'customerType',
merType: [],
sex_list: [],
stateId: 0,
FormLoading: false,
temp: {
crmBusinessDto: {},
customerType: '', //
visitWay: '', //
visitWayKey: '',
userSid: '',
orgSid: ''
},
dialogFormVisible: false,
rules: {
name: [{ required: true, message: '请填写客户名称', trigger: 'blur' }],
address: [{ required: true, message: '请填写客户地址', trigger: 'blur' }],
mobile: [{ required: true, validator: checkSubmit, trigger: 'blur' }],
weixin: [{ required: true, validator: validatePass2, trigger: 'blur' }],
e_mail: [{ required: true, validator: validateE_mail, trigger: 'blur' }],
emergencyMobile: [{ required: true, validator: checkSubmit, trigger: 'blur' }]
}
}
},
created() {
//
},
methods: {
UpNumber(e) {
e.target.value = e.target.value.replace(/[^\d]/g, '') // ."-"
e.target.value = e.target.value.replace(/^00/, '0') // 0
if (e.target.value.indexOf('.') < 0 && e.target.value !== '' && e.target.value !== '-') {
// 0102
console.log(e.target.value)
e.target.value = parseFloat(e.target.value)
}
},
//
init() {
this.getShuJUZiDian()
this.huoquSheng() //
},
//
openUpdate(sid) {
this.viewTitle = '【编辑】客户信息'
this.isOnRemind = '否'
this.editState = true
this.stateId = sid
if (this.stateId !== '0') {
getPcCustomerInfoBySid(this.stateId).then((response) => {
if (response.success) {
this.temp = response.data
this.temp.userSid = window.sessionStorage.getItem('userSid')
if (this.temp.customerType !== '') {
if (this.temp.customerType === '个人') {
this.temp.certificateType = '身份证'
this.temp.certificateTypeKey = '01'
} else {
this.temp.certificateType = '营业执照'
this.temp.certificateTypeKey = '02'
}
}
}
})
}
this.init()
},
//
openCreate(customerTypeList) {
this.resetTemp()
this.viewTitle = '【新增】客户信息'
this.temp.userSid = window.sessionStorage.getItem('userSid')
this.temp.staffSid = window.sessionStorage.getItem('staffSid')
this.temp.customerType = customerTypeList.customerType
this.temp.customerTypeKey = customerTypeList.customerTypeKey
this.temp.visitWay = customerTypeList.visitWay
this.temp.visitWayKey = customerTypeList.visitWayKey
this.$refs['dataForm'].clearValidate()
this.stateId = '0'
if (this.temp.customerType !== '') {
if (this.temp.customerType === '个人') {
this.temp.certificateType = '身份证'
this.temp.certificateTypeKey = '01'
} else {
this.temp.certificateType = '营业执照'
this.temp.certificateTypeKey = '02'
}
typeValues({ psid: customerTypeList.psid, type: 'customerClass' }).then((res) => {
if (res.success) {
this.merClass = res.data
}
})
}
this.init()
},
//
getShuJUZiDian() {
typeValues({ type: this.customerSource }).then((res) => {
if (res.success) {
this.sourceLisst = res.data
}
})
typeValues({ type: this.customerLevel }).then((res) => {
if (res.success) {
this.induslevel = res.data
}
})
typeValues({ type: 'sex' }).then((res) => {
if (res.success) {
this.sex_list = res.data
}
})
},
// --------------------------------------------------
huoquSheng() {
getProvince().then((res) => {
if (res.success) {
this.inputProvinceList = res.data
}
})
},
getShen(value) {
let bb = ''
this.inputProvinceList.forEach((e) => {
if (e.sid === value) {
bb = {
name: e.name,
districtCode: e.districtCode,
sid: e.sid
}
}
})
// codeprovince
this.temp.province = bb.name
this.huoquShi(bb.sid)
},
huoquShi(sid1) {
var sid = {
sid: sid1
}
getCity(sid).then((res) => {
if (res.success) {
this.inputCityList = res.data
}
})
},
getShi(value) {
let bb = ''
this.inputCityList.forEach((e) => {
if (e.sid === value) {
bb = {
name: e.name,
districtCode: e.districtCode,
sid: e.sid
}
}
})
this.temp.city = bb.name
this.huoquXian(bb.sid)
},
huoquXian(sid1) {
var sid = {
sid: sid1
}
getCounty(sid).then((res) => {
if (res.success) {
this.inputCountyList = res.data
}
})
},
getQu(value) {
let bb = ''
this.inputCountyList.forEach((e) => {
if (e.sid === value) {
bb = {
name: e.name,
districtCode: e.districtCode,
sid: e.sid
}
}
})
this.temp.county = bb.name
},
// ------------------------------------------------------
//
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.isOnRemind = '是'
this.editState = false
this.activeNames = ['1']
this.$emit('handleReturn')
},
//
resetTemp() {
this.temp = {}
},
//
handleJUBuCun() {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.FormLoading = true
if (this.temp.sex !== '') {
this.sex_list.forEach((e) => {
if (e.dictValue === this.temp.sex) {
this.temp.sexKey = e.dictKey
}
})
}
if (this.temp.isOnRemind !== '' && this.temp.isOnRemind === '是') {
this.temp.isOnRemindkey = 1
} else {
this.temp.isOnRemindkey = 0
}
if (!this.temp.birthday) {
this.temp.birthday = ''
}
if (this.temp.customerType === '企业' && this.temp.name.length < 5) {
this.$message({ showClose: true, type: 'error', message: '因客户类型为企业,客户名称的长度应不少于5个汉字' })
return
}
if (this.stateId === '0') {
savePcCustomerInfo(this.temp).then((response) => {
this.FormLoading = false
if (response.success) {
this.$message({ showClose: true, type: 'success', message: '保存成功' })
this.activeNames = ['1']
this.handleReturn('true')
} else if (response.code === '511' || response.code === '513') {
this.FormLoading = false
this.dialogFormVisible = true
this.stateId = response.data
} else {
alert(200)
}
}).catch(function(reson, data) {
})
} else {
updatePcCustomerInfo(this.temp).then((response) => {
this.FormLoading = false
if (response.success) {
this.$message({ showClose: true, type: 'success', message: '保存成功' })
this.activeNames = ['1']
this.handleReturn('true')
} else {
this.$message({ showClose: true, type: 'error', message: '保存失败' })
}
})
}
}
})
},
dialogStatus() {
this.dialogFormVisible = false
this.openUpdate(this.stateId)
},
dialogFormVisibl() {
this.$notify({
title: '提示',
message: '用户名手机号重复',
type: 'error',
duration: 2000,
})
this.dialogFormVisible = false
return
},
//
getFenLei(value) {
const choose = this.merClass.filter((item) => item.dictKey === value)
this.temp.customerClass = choose[0].dictValue
this.temp.customerClassKey = choose[0].dictKey
},
//
getKeHuLaiYUan(value) {
const choose = this.sourceLisst.filter((item) => item.dictKey === value)
this.temp.source = choose[0].dictValue
this.temp.sourceKey = choose[0].dictKey
},
//
getJiBie(value) {
const choose = this.induslevel.filter((item) => item.dictKey === value)
this.temp.level = choose[0].dictValue
this.temp.levelKey = choose[0].dictKey
}
}
}
</script>
<style scoped>
.trightb {
text-align: right;
}
/deep/ .el-collapse-item__header {
height: 40px;
padding: 10px;
font-weight: bold;
font-size: 20px;
text-align: left;
color: #ffffff;
background-color: #0294d7;
}
/deep/ .el-collapse-item__content {
padding-bottom: 0;
}
</style>

309
src/views/customermanagement/customermanagementInfo.vue

@ -1,309 +0,0 @@
<template>
<div class="app-container">
<div>
<div class="tab-header webtop">
<div>查看客户信息</div>
<div>
<el-button type="info" size="small" icon="el-icon-close" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="listconadd">
<el-form ref="dataForm" :model="temp" label-position="top" label-width="190px" class="formadd">
<div class="titwu">客户信息</div>
<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>
<span slot="label">客户名称</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="temp.name" :readonly="true" class="addinputw" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">客户类型</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="temp.customerType" :readonly="true" class="addinputw" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">联系电话</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="temp.mobile" :readonly="true" class="addinputw" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">微信号</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="temp.weixin" :readonly="true" class="addinputw" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="temp.customerType === '个人'">
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">公司名称</span>
</el-form-item>
</el-col>
<el-col :span="20">
<el-form-item>
<el-input v-model="temp.companyName" :readonly="true" class="addinputw" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">客户地址</span>
</el-form-item>
</el-col>
<el-col :span="20">
<el-form-item>
<!-- <el-input v-model="temp.address" :readonly="true" class="addinputw" clearable/>-->
<span>{{ temp.province }} {{ temp.city }} {{ temp.county }} {{ temp.address }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">客户级别</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="temp.level" :readonly="true" class="addinputw" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">是否开启提醒</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="temp.isOnRemind" :readonly="true" class="addinputw" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="temp.isOnRemind=='是'">
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">提醒日期</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="temp.remind_day" :readonly="true" class="addinputw" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">提醒备注 </span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="temp.remind_remark" :readonly="true" class="addinputw" clearable/>
</el-form-item>
</el-col>
</el-row>
<!--更多信息-->
<el-collapse v-model="activeNames">
<el-collapse-item title="更多信息" name="2">
<el-form ref="datufrom" :model="temp" label-position="top" label-width="190px" class="formadd02">
<el-row v-show="temp.customerType === '个人'">
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">客户生日</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="temp.birthday" :readonly="true" class="addinputw" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">性别</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="temp.sex" :readonly="true" class="addinputw" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">证件类型</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="temp.certificateType" :readonly="true" class="addinputw" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">证件号码</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="temp.idnumber" :readonly="true" class="addinputw" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">证件有效期</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="temp.endDate" :readonly="true" class="addinputw" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">电子邮箱</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="temp.e_mail" :readonly="true" class="addinputw" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">紧急联系人</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="temp.emergencyContact" :readonly="true" class="addinputw" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">紧急联系电话</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="temp.emergencyMobile" :readonly="true" class="addinputw" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">客户来源</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="temp.source" :readonly="true" class="addinputw" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">客户分类</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="temp.customerClass" :readonly="true" class="addinputw" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="trightb">
<el-form-item>
<span slot="label">备注</span>
</el-form-item>
</el-col>
<el-col :span="20">
<el-form-item>
<el-input v-model="temp.remarks" :readonly="true" class="addinputw" clearable/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-collapse-item>
</el-collapse>
</el-form>
</div>
</div>
</div>
</template>
<script>
import { getPcCustomerInfoBySid } from '@/api/customermanagement/customermanagement'
export default {
name: 'CustomerManagementInfo',
data() {
return {
activeNames: ['1'],
temp: {} //
}
},
methods: {
//
openInfo(sid) {
getPcCustomerInfoBySid(sid).then((response) => {
if (response.code === '200') {
this.$refs['dataForm'].clearValidate()
this.temp = response.data
}
})
},
//
handleReturn() {
this.$emit('handleReturn')
}
}
}
</script>
<style scoped>
.trightb {
text-align: right;
}
/deep/ .el-collapse-item__header {
height:40px;
padding: 10px;
font-weight: bold;
font-size: 20px;
text-align: left;
color: #ffffff;
background-color: #0294d7;
}
/deep/ .el-collapse-item__content{
padding-bottom: 0;
}
</style>

346
src/views/enterprise/enterpriseAdd.vue

@ -1,346 +0,0 @@
<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>
<el-card class="box-card">
<div class="item">
<span class="item_text">企业名称</span>
<el-input v-model="formobj.enterpriseName" placeholder="" class="item_input" style="width: 520px;"
clearable />
</div>
<div class="item">
<span class="item_text">企业简称</span>
<el-input v-model="formobj.enterpriseAbbreviation" placeholder="" class="item_input" style="width: 520px;"
clearable />
</div>
<div class="item">
<span class="item_text">营业执照</span>
<el-input v-model="formobj.businessLicenseNumber" placeholder="" class="item_input" style="width: 520px;"
clearable />
</div>
<div class="item">
<span class="item_text">企业法人</span>
<el-input v-model="formobj.juridicalPerson" placeholder="" class="item_input" style="width: 520px;"
clearable />
</div>
<div class="item">
<span class="item_text">联系人员</span>
<el-input v-model="formobj.contacts" placeholder="" class="item_input" style="width: 520px;" clearable />
</div>
<div class="item">
<span class="item_text">联系电话</span>
<el-input v-model="formobj.telephone" placeholder="" maxlength="11" class="item_input" style="width: 520px;"
clearable />
</div>
<div class="item">
<span class="item_text">银行账户</span>
<el-input v-model="formobj.bankAccount" placeholder="" class="item_input" style="width: 520px;" clearable />
</div>
<div class="item">
<span class="item_text">银行卡号</span>
<el-input v-model="formobj.accountNumber" placeholder="" class="item_input" style="width: 520px;" clearable />
</div>
<div class="item">
<span class="item_text">开户行名称</span>
<el-input v-model="formobj.openingBankName" placeholder="" class="item_input"
style="width: 520px;" clearable />
</div>
<div class="item">
<span class="item_text">--</span>
<div class="item_input">
<el-select v-model="formobj.province" filterable placeholder="请选择省" class="addinputw" style="width:160px"
@change="getShen">
<el-option v-for="item in inputProvinceList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select>
<el-select v-model="formobj.city" filterable placeholder="请选择市" class="addinputw"
style="width:160px;margin-left: 20px;margin-right: 20px;" @change="getShi">
<el-option v-for="item in inputCityList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select>
<el-select v-model="formobj.county" filterable placeholder="请选择县" class="addinputw" style="width:160px"
@change="getXian">
<el-option v-for="item in inputCountyList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select>
</div>
</div>
<div class="item">
<span class="item_text">企业地址</span>
<el-input v-model="formobj.address" placeholder="" class="item_input" style="width: 520px;" clearable />
</div>
</el-card>
</div>
</div>
</template>
<script>
import req from '@/api/enterprise/enterprise'
import {
getCity,
getCounty,
getProvince
} from '@/api/portal/areaPicker' //
export default {
data() {
return {
submitdisabled: false,
formobj: {
sid: "",
enterpriseName: "",
enterpriseAbbreviation: "",
accountNumber: "",
bankAccount: "",
openingBankName: "",
juridicalPerson: "",
businessLicenseNumber: "",
province: '',
city: "",
county: "",
address: "",
contacts: "",
telephone: ""
},
inputProvinceList: [],
inputCityList: [],
inputCountyList: [],
}
},
created() {
this.huoquSheng()
},
methods: {
saveOrUpdate() {
console.log(">>>>>>>>>222222", this.formobj)
if (this.formobj.sid) {
req.updateData(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
} else {
req.addInfo(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
}
},
handleReturn(isreload) {
console.log(">>>>>>>>>")
if (isreload === 'true') this.$emit('reloadlist')
if (this.formobj.psid) {
this.$emit('close', this.formobj.psid)
} else {
this.$emit('doback')
}
this.formobj = {
sid: "",
enterpriseName: "",
enterpriseAbbreviation: "",
accountNumber: "",
bankAccount: "",
openingBankName: "",
juridicalPerson: "",
businessLicenseNumber: "",
province: '',
city: "",
county: "",
address: "",
contacts: "",
telephone: ""
}
},
showAdd(sid) {
this.formobj.psid = sid
},
showEdit(row) {
req.fetchBySid(row.sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
}
})
.catch(e => {
this.formobj = row
})
},
// --------------------------------------------------
huoquSheng() {
getProvince().then((res) => {
if (res.success) {
this.inputProvinceList = res.data
}
})
},
getShen(value) {
let bb = ''
this.inputProvinceList.forEach((e) => {
if (e.sid === value) {
bb = {
name: e.name,
districtCode: e.districtCode,
sid: e.sid
}
}
})
// codeprovince
this.formobj.province = bb.name
this.formobj.city = ""
this.formobj.county = ""
this.huoquShi(bb.sid)
},
huoquShi(sid1) {
var sid = {
sid: sid1
}
getCity(sid).then((res) => {
if (res.success) {
this.inputCityList = res.data
}
})
},
getShi(value) {
let bb = ''
this.inputCityList.forEach((e) => {
if (e.sid === value) {
bb = {
name: e.name,
districtCode: e.districtCode,
sid: e.sid
}
}
})
this.formobj.city = bb.name
this.formobj.county = ""
this.huoquXian(bb.sid)
},
huoquXian(sid1) {
var sid = {
sid: sid1
}
getCounty(sid).then((res) => {
if (res.success) {
this.inputCountyList = res.data
}
})
},
getXian(value) {
let bb = ''
this.inputCountyList.forEach((e) => {
if (e.sid === value) {
bb = {
name: e.name,
districtCode: e.districtCode,
sid: e.sid
}
}
})
this.formobj.county = bb.name
},
}
}
</script>
<style lang="scss">
.box-card {
margin-left: 60px;
margin-right: 60px;
margin-top: 20px;
.item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
margin-top: 15px;
height: 40px;
line-height: 40px;
.item_text {
font-size: 18px;
text-align: right;
}
.item_input {
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>

210
src/views/enterprise/enterpriseInfo.vue

@ -1,210 +0,0 @@
<template>
<div class="app-container">
<div>
<div class="tab-header webtop">
<div>查看企业信息</div>
<div>
<el-button type="info" size="small" icon="el-icon-close" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="listconadd">
<el-form ref="dataForm" :model="temp" label-position="top" label-width="190px" class="formadd">
<div class="titwu">企业信息</div>
<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>{{temp.enterpriseName}}</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>{{temp.enterpriseAbbreviation}}</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>{{temp.juridicalPerson}}</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>{{temp.businessLicenseNumber}}</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>{{temp.contacts}}</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>{{temp.telephone}}</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>{{temp.bankAccount}}</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>{{temp.accountNumber}}</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="20">
<el-form-item class="trightb_item">
<span>{{temp.openingBankName}}</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>{{temp.province}} - {{temp.city}} - {{temp.county}}</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>{{temp.address}}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/enterprise/enterprise'
export default {
name: 'CustomerManagementInfo',
data() {
return {
temp: {} //
}
},
methods: {
showAdd(sid) {
req.fetchBySid(sid)
.then(resp => {
if (resp.success) {
this.temp = resp.data
}
})
.catch(e => {
this.$emit('doback')
})
},
//
handleReturn() {
this.$emit('doback')
}
}
}
</script>
<style scoped>
.trightb {
display: flex;
align-items: center;
text-align: ;
justify-content: center;
}
.trightb_item {
padding-top: 5px;
}
.span {
margin-left: 50px;
font-size: 15px;
font-weight: 400;
}
/deep/ .el-collapse-item__header {
height: 40px;
padding: 10px;
font-weight: bold;
font-size: 20px;
text-align: left;
color: #ffffff;
background-color: #0294d7;
}
/deep/ .el-collapse-item__content {
padding-bottom: 0;
}
</style>

243
src/views/enterprise/index.vue

@ -1,243 +0,0 @@
<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.enterpriseName" 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>
<!-- 翻页分页 -->
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> -->
</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="操作" wid align="center" width="220">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="toDetail(scope.row)">查看</el-button>
<el-button type="primary" size="mini" @click="toEdit(scope.row)">编辑</el-button>
<el-button type="primary" size="mini" @click="doDel(scope.row)">删除</el-button>
</template>
</el-table-column>
<el-table-column label="企业名称" prop="enterpriseName" align="center" />
<el-table-column label="企业简称" prop="enterpriseAbbreviation" width="180" align="center" />
<el-table-column label="省 - 市 - 县" width="200" align="center">
<template slot-scope="scope">
<span>{{ scope.row.province }}</span>
<span>-{{ scope.row.city }}-</span>
<span>{{ scope.row.county }}</span>
</template>
</el-table-column>
<el-table-column label="地址" prop="address" align="center" />
<el-table-column label="联系人" prop="contacts" width="120" align="center" />
<el-table-column label="联系电话" prop="telephone" width="180" 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>
<enterpriseAdd v-show="viewState ==2 || viewState ==3" ref="divAdd" @doback="resetState" @close="close($event)" @reloadlist="getList" />
<enterpriseInfo v-show="viewState ==4" ref="divInfo" @doback="resetState" @dojump="jump($event)" @reloadlist="getList"/>
</div>
</template>
<script>
import req from '@/api/enterprise/enterprise'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import enterpriseAdd from './enterpriseAdd.vue'
import enterpriseInfo from './enterpriseInfo.vue'
export default {
name: 'CustomerManagement',
components: {
Pagination,
pageye,
ButtonBar,
enterpriseAdd,
enterpriseInfo,
},
data() {
return {
listLoading: false,
btndisabled: false,
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: {
bankName: '',
},
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: {
bankName: ""
}
}
this.getList()
},
//
toAdd() {
this.viewState = 2
},
//
toEdit(row) {
this.viewState = 3
this.$refs['divAdd'].showEdit(row)
},
// ID
doDel(row) {
const tip = '请确认是否删除所选记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
req.delBySids(row.sid).then((response) => {
if (response.success) {
this.$message({
showClose: true,
type: 'success',
message: '删除成功'
})
this.getList()
} else {
this.$message({
showClose: true,
type: 'error',
message: '删除失败'
})
}
})
})
},
toDetail(row) {
this.viewState = 4
this.$refs['divInfo'].showAdd(row.sid)
},
resetState() {
this.viewState = 1
},
jump(sid) {
console.log("jump",sid)
this.viewState = 2
this.$refs['divAdd'].showAdd(sid)
},
close(sid){
this.viewState = 4
this.$refs['divInfo'].showAdd(sid)
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
</style>

219
src/views/flowInstrument/flowInstrumentAdd.vue

@ -1,219 +0,0 @@
<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>
<el-card class="box-card">
<div class="item">
<span class="item_text">流量仪器名称</span>
<el-input v-model="formobj.name" 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">流量仪器Code</span>
<el-input v-model="formobj.code" placeholder="" class="item_input" clearable />
</div>
<!-- <div class="item">
<span class="item_text">油罐编号</span>
<el-select v-model="formobj.tankNumber" filterable placeholder="请选择油罐编号" class="item_input" @change="getTank">
<el-option v-for="item in tankList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select>
</div> -->
</el-card>
</div>
</div>
</template>
<script>
import req from '@/api/flowInstrument/flowInstrument'
import req2 from '@/api/oilTypeInAndOutBound/oilTypeInAndOutBound'
export default {
data() {
return {
submitdisabled: false,
tankLists: [],
tankList: [],
formobj: {
sid: "",
name: "",
number: "",
code: "",
tankNumber: "",
tankSid:"",
}
}
},
created() {
this.getTankList()
},
methods: {
getTankList() {
req2.tankList().then((res) => {
if (res.success) {
console.log(">>>>>>>>>111111111111wwwwwwwwww", res.data)
this.tankLists = res.data
for (var i = 0; i < this.tankLists.length; i++) {
let item = {
name: this.tankLists[i].number,
sid: this.tankLists[i].sid,
}
this.tankList.push(item)
}
}
})
},
getTank(value) {
console.log(">>>>>>>>>getType", value)
const choose = this.tankLists.filter((item) => item.sid === value)
console.log(">>>>>>>>>getType", choose[0])
this.formobj.tankSid = choose[0].sid
},
saveOrUpdate() {
if(this.formobj.sid){
req.updateData(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
}else{
req.addInfo(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
}
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
sid: "",
name: "",
number: "",
code: "",
tankNumber:"",
tankSid:"",
}
this.$emit('doback')
},
showAdd() {
},
showEdit(row) {
console.log("sid>>>>>>>>>",row.sid)
req.fetchBySid(row.sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
}
})
.catch(e => {
this.formobj = row
})
}
}
}
</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>

227
src/views/flowInstrument/index.vue

@ -1,227 +0,0 @@
<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>
<!-- 翻页分页 -->
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> -->
</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="操作" wid align="center" width="180">
<template slot-scope="scope">
<!-- <el-button type="primary" size="mini" @click="toDetail(scope.row)">查看</el-button> -->
<el-button type="primary" size="mini" @click="toEdit(scope.row)">编辑</el-button>
<el-button type="primary" size="mini" @click="doDel(scope.row)">删除</el-button>
</template>
</el-table-column>
<el-table-column label="流量仪器名称" prop="name" align="center" />
<el-table-column label="流量仪器编码" prop="number" align="center" />
<el-table-column label="流量仪器Code" prop="code" align="center" />
<!-- <el-table-column label="油罐编号" prop="tankNumber" align="center" /> -->
<!-- <el-table-column label="原油编码" prop="crudeNumber" 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>
<flowInstrumentAdd v-show="viewState ==2 || viewState ==3" ref="divAdd" @doback="resetState" @reloadlist="getList" />
<!-- <oilTypeInfo v-show="viewState ==4" ref="divInfo" @doback="resetState" @reloadlist="getList" /> -->
</div>
</template>
<script>
import req from '@/api/flowInstrument/flowInstrument'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import flowInstrumentAdd from './flowInstrumentAdd.vue'
// import oilTypeInfo from './oilTypeInfo.vue'
export default {
name: 'CustomerManagement',
components: {
Pagination,
pageye,
ButtonBar,
flowInstrumentAdd,
// oilTypeInfo,
},
data() {
return {
listLoading: false,
btndisabled: false,
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: {
entryName: '',
},
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: {
entryName: ""
}
}
this.getList()
},
//
toAdd() {
this.viewState = 2
},
//
toEdit(row) {
this.viewState = 3
this.$refs['divAdd'].showEdit(row)
},
// ID
doDel(row) {
const tip = '请确认是否删除所选记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
req.delBySids(row.sid).then((response) => {
if (response.success) {
this.$message({
showClose: true,
type: 'success',
message: '删除成功'
})
this.getList()
} else {
this.$message({
showClose: true,
type: 'error',
message: '删除失败'
})
}
})
})
},
// toDetail(row) {
// this.viewState = 4
// this.$refs['divInfo'].showAdd(row.sid)
// },
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
</style>

172
src/views/industry/industryAdd.vue

@ -1,172 +0,0 @@
<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>
<el-card class="box-card">
<div class="item">
<span class="item_text">项目行业名称</span>
<el-input v-model="formobj.industryName" 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>
</el-card>
</div>
</div>
</template>
<script>
import req from '@/api/dataDict/datadict'
export default {
data() {
return {
submitdisabled: false,
formobj: {
sid: '',
industryName: '',
remarks: ''
}
}
},
methods: {
saveOrUpdate() {
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
if (this.formobj.sid) {
req.updateindustry(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn('true')
} else {
// resp.code
}
})
.catch(() => {})
} else {
req.saveindustry(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn('true')
} else {
// resp.code
}
})
.catch(() => {})
}
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
sid: '',
industryName: '',
remarks: ''
}
this.$emit('doback')
},
showAdd() {
},
showEdit(row) {
req.industryFetchBySid(row.sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
}
})
.catch(e => {
this.formobj = row
})
}
}
}
</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>

238
src/views/industry/industryInfo.vue

@ -1,238 +0,0 @@
<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 :inline="true" class="tab-header">
<el-form-item label="项目行业名称">
<el-input v-model="queryParams.params.industryName" placeholder="" clearable />
</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>
<!-- Start 项目列表头部 -->
<div class="listtop">
<div class="tit">项目行业列表</div>
</div>
<!-- End 项目列表头部 -->
<!-- Start 项目列表 -->
<div class="">
<el-table
v-loading="tableLoading"
:data="dataList"
border
style="width: 100%"
@selection-change="handleSelectionChange"
>
<!-- <el-table-column fixed width="50" type="selection" align="center" /> -->
<el-table-column fixed width="80" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column label="操作" align="center" width="180">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">编辑</el-button>
<el-button type="primary" size="mini" @click="toRelevancyInfo(scope.row)">删除</el-button>
</template>
</el-table-column>
<el-table-column prop="industryName" label="项目行业名称" align="center" />
<el-table-column prop="remarks" label="项目行业说明" align="center" />
</el-table>
</div>
<!-- End 项目列表 -->
<div class="pages">
<div class="tit" />
<!-- 翻页 -->
<pagination
v-show="dataList.length > 0"
:total="queryParams.total"
:page.sync="queryParams.current"
:limit.sync="queryParams.size"
class="pagination"
@pagination="loadList"
/>
</div>
</div>
</div>
<!-- End 查询和其列表部分 -->
<!-- 新增修改部分组件 -->
<divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" />
</div>
</template>
<script>
import req from '@/api/dataDict/datadict'
import ButtonBar from '@/components/ButtonBar'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import divAdd from './industryAdd'
export default {
name: 'SupplierBankInfoIndex',
components: {
ButtonBar,
Pagination,
pageye,
divAdd
},
data() {
return {
btndisabled: false,
viewState: 1, // 1 2 3 4
isSearchShow: false,
searchxianshitit: '显示查询条件',
tableLoading: false,
dataList: [],
btnList: [{
type: 'primary',
size: 'small',
icon: 'plus',
btnKey: 'toAdd',
btnLabel: '新增'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
queryParams: {
current: 1,
size: 10,
total: 0,
params: {
industryName: ''
}
},
sids: []
}
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
created() {
this.loadList()
},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
switch (btnKey) {
case 'toAdd':
this.toAdd()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
loadList() {
this.tableLoading = true
req.industryListPage(this.queryParams).then((resp) => {
this.tableLoading = false
if (resp.success) {
const data = resp.data
this.queryParams.total = data.total
this.dataList = data.records
} else {
// resp.code
this.dataList = []
this.queryParams.total = 0
}
}).catch(() => {
this.tableLoading = false
})
},
handleSelectionChange(row) {
const aa = []
row.forEach((element) => {
aa.push(element.sid)
})
this.sids = aa
},
//
indexMethod(index) {
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
var pageindex = index + 1 + pagestart
return pageindex
},
dosearch() {
this.queryParams.current = 1
this.loadList()
},
resetQuery() {
this.queryParams = {
current: 1,
size: 10,
total: 0,
params: {
code: '',
name: ''
}
}
this.loadList()
},
toAdd() {
this.viewState = 2
this.$refs['divadd'].showAdd()
},
toRelevancy(row) {
this.viewState = 3
this.$refs['divadd'].showEdit(row)
},
toRelevancyInfo(row) {
const tip = '请确认是否删除所选记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.industryDelBySids(row.sid).then((resp) => {
loading.close()
if (resp.success) {
this.$message({
type: 'success',
message: resp.msg,
showClose: true
})
this.loadList()
} else {
// resp.code
}
}).catch(e => {
loading.close()
})
}).catch(() => {})
},
resetState() {
this.viewState = 1
}
}
}
</script>
<style scoped>
</style>

167
src/views/inventory/oilTankInfo/index.vue

@ -1,167 +0,0 @@
<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="listtop">
<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%;" >
<!-- <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="油罐编号" prop="number" align="center" />
<el-table-column label="原油名称" prop="crudeName" align="center" />
<el-table-column label="原油编号" prop="crudeNumber" align="center" />
<el-table-column label="油罐容量" prop="capacity" align="center" />
<el-table-column label="油罐库存(吨)" prop="inventory" align="center" />
<el-table-column label="油罐现有库存(吨)" prop="existingInventory" align="center" />
<el-table-column label="油罐总价值(元)" prop="totalValue" align="center" />
</el-table>
</div>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/oilTank/oilTank'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
// import oilTypeInfo from './oilTypeInfo.vue'
export default {
name: 'CustomerManagement',
components: {
pageye,
ButtonBar
},
data() {
return {
listLoading: false,
btndisabled: false,
editDialog: false,
form: {},
btnList: [{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
list: [],
listQuery: {
current: 1,
size: 50,
params: {
entryName: '',
},
total: 0
},
viewState: 1
}
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
created() {
this.init()
//
},
methods: {
btnHandle(btnKey) {
switch (btnKey) {
case 'doClose':
this.doClose()
break
default:
break
}
},
//
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.selectTankInformation().then((response) => {
this.listLoading = false
if (response.success) {
this.list = response.data
this.$nextTick(() => {this.$refs.looktable.doLayout()}) //
} else {
this.list = []
}
})
},
//
toAdd() {
this.viewState = 2
},
reset() {
this.form = {};
},
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
},
//
accAdd(arg1, arg2) {
var r1, r2, m;
try {
r1 = arg1.toString().split(".")[1].length;
} catch(e) {
r1 = 0;
}
try {
r2 = arg2.toString().split(".")[1].length;
}catch(e){
r2 = 0;
}
//JS
m = Math.pow(10, Math.max(r1, r2));
//
return parseFloat((arg1 * m + arg2 * m) / m).toFixed(2);
},
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
}
const values = data.map(item => Number(item[column.property]));
if (column.property === 'inventory' || column.property === 'existingInventory' || column.property === 'totalValue') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return this.accAdd(prev,curr);
} else {
return prev;
}
}, 0);
sums[index];
}
});
return sums
}
}
}
</script>
<style scoped>
</style>

339
src/views/inventory/oilTankList/index.vue

@ -1,339 +0,0 @@
<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.number"
maxlength="20"
placeholder="请输入油罐编号"
class="addinputw"
clearable
/>
</el-form-item>
<el-form-item label="日期">
<el-date-picker
v-model="jmdListQuery.date"
:picker-options="pickerOptions"
type="date"
clearable
value-format="yyyy-MM-dd"
placeholder="选择日期"
/>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center">
<el-button
type="primary"
size="small"
icon="el-icon-search"
@click="dosearch"
>查询</el-button
>
<el-button
type="primary"
size="small"
icon="el-icon-refresh"
@click="resetQuery"
>重置</el-button
>
</div>
</div>
</div>
<div>
<el-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="tankNumber"
label="油罐编号"
align="center"
/>
<el-table-column
prop="existingInventory"
label="油罐登记库存"
align="center"
/>
<el-table-column
prop="recordDate"
label="登记日期"
align="center"
/>
<el-table-column label="操作" width="150px" 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>
</div>
<el-dialog
:title="dialogTitle + '详细信息'"
:visible.sync="editDialog"
width="37%"
>
<el-form ref="form" :model="form" label-width="80px">
<el-form-item label="油罐编号:">
<span>{{ form.number }}</span>
</el-form-item>
<el-form-item label="登记日期:">
<span>{{ form.recordDate }}</span>
</el-form-item>
<el-form-item label="库存高度:">
<span>{{ form.height }}</span>
</el-form-item>
<el-form-item label="描述:" prop="url">
<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/oilTank/oilTank";
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,
dialogTitle: "",
editDialog: false,
searchxianshitit: "显示查询条件",
btndisabled: false,
tableLoading1: false,
tableLoading2: false,
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: [],
form: {},
logListQuery: {
current: 1,
size: 10,
},
logListTotal: 1,
jmdListQuery: {
number: "",
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: "",
};
this.loadLogList();
},
//
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();
},
loadLogList() {
req
.crudeinventoryList({
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;
},
purchase(row) {
this.dialogTitle = "数据";
this.editDialog = true;
req.selectRecordBySid(row.sid).then((res) => {
this.form = res.data;
});
},
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;
}
span {
margin-left: 20px;
}
.forminfo {
margin: 0;
padding: 0;
}
.listcon {
height: calc(100vh - 250px);
overflow-y: auto;
overflow-x: hidden;
}
</style>

425
src/views/inventory/oilTypeInBoundList/index.vue

@ -1,425 +0,0 @@
<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="crudeName" label="原油名称" width="150" align="center" />
<el-table-column prop="crudeNumber" label="原油编码" width="150" align="center" />
<el-table-column prop="tankNumber" 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/oilTypeInAndOutBound/oilTypeInAndOutBound'
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() {
// if (this.index == "0") {
this.loadLogList()
// } else if (this.index == "1") {
this.loadIn112List()
// }
},
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()
this.loadIn112List()
},
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
},
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>

413
src/views/inventory/oilTypeOutBoundList/index.vue

@ -1,413 +0,0 @@
<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="flowmeterNumber" label="流量仪器" width="150" align="center" />
<el-table-column prop="tankNumber" label="油罐编号" width="150" align="center" />
<el-table-column prop="crudeName" 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/oilTypeInAndOutBound/oilTypeInAndOutBound'
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() {
// if (this.index == "0") {
this.loadLogList()
// } else if (this.index == "1") {
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.loadLogList()
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;
}
},
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
},
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
src/views/login/login.vue

@ -2,8 +2,8 @@
<div class="login">
<div class="logoTitle" style="margin-left: 50px;margin-top: 50px;">
<img src="../../assets/loginImg/cyf_logo.jpg"
style="width: 50px;height: 50px; margin-right: 10px;" /><span>醇油坊</span>
<p class="title" style="margin-top: 5px;">醇油坊进销存管理平台</p>
style="width: 50px;height: 50px; margin-right: 10px;" /><span>光伏</span>
<p class="title" style="margin-top: 5px;">山海光伏管理平台</p>
</div>
<div class="main">
<div class="content">

154
src/views/materialManagement/index.vue

@ -0,0 +1,154 @@
<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" 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>
</div>
<!-- <inBoundAdd v-show="viewState ==2" ref="inBoundAdd" @doback="resetState" @reloadlist="init" />
<outBoundAdd v-show="viewState ==3" ref="ouBoundAdd" @doback="resetState" @reloadlist="init" /> -->
</div>
</template>
<script>
import req from '@/api/oilTypeInAndOutBound/oilTypeInAndOutBound'
import Pagination from '@/components/pagination'
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,
btnList: [
{
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: ""
}
}
},
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 'doClose': //
this.doClose()
break
default:
break
}
},
init() {
this.loadLogList()
},
loadLogList() {
// req.logPagerList({
// }).then(res => {
// })
},
//
indexMethod(index) {
var pagestart = (this.logListQuery.current - 1) * this.logListQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
indexMethod2(index) {
var pagestart = (this.in112ListQuery.current - 1) * this.in112ListQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
</style>

270
src/views/oilTank/index.vue

@ -1,270 +0,0 @@
<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.number" 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>
<!-- 翻页分页 -->
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> -->
</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="操作" wid align="center" width="100">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="toDetail(scope.row)">记录</el-button>
<!-- <el-button type="primary" size="mini" @click="toEdit(scope.row)">编辑</el-button> -->
<!-- <el-button type="primary" size="mini" @click="doDel(scope.row)">删除</el-button> -->
</template>
</el-table-column>
<el-table-column label="油罐编号" prop="number" align="center" />
<el-table-column label="原油名称" prop="crudeName" align="center" />
<el-table-column label="原油编号" prop="crudeNumber" align="center" />
<el-table-column label="油罐容量" prop="capacity" align="center" />
<el-table-column label="油罐库存" prop="inventory" align="center" />
<el-table-column label="油罐现有库存" prop="existingInventory" 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>
<!-- <span>{{form.planContent}}</span> -->
<el-input v-model="form.existingInventory" 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/oilTank/oilTank'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import oilTankAdd from './oilTankAdd.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: {},
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: {
entryName: '',
},
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: {
entryName: ""
}
}
this.getList()
},
//
toAdd() {
this.viewState = 2
},
//
toEdit(row) {
this.viewState = 3
this.$refs['divAdd'].showEdit(row)
},
// ID
doDel(row) {
const tip = '请确认是否删除所选记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
req.delBySids(row.sid).then((response) => {
if (response.success) {
this.$message({
showClose: true,
type: 'success',
message: '删除成功'
})
this.getList()
} else {
this.$message({
showClose: true,
type: 'error',
message: '删除失败'
})
}
})
})
},
toDetail(row) {
this.editDialog = true;
this.form.tankSid = row.sid
},
save() {
console.log("form", this.form)
req.saveInfo(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>

199
src/views/oilTank/oilTankAdd.vue

@ -1,199 +0,0 @@
<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>
<el-card class="box-card">
<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-select v-model="formobj.crudeName" filterable placeholder="请选择原油类型" class="item_input"
@change="getType">
<el-option v-for="item in crudeList" :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.crudeNumber" placeholder="" :readonly="true" class="item_input" clearable />
<!-- <span class="item_input">{{formobj.crudeNumber}}</span> -->
</div>
<div class="item">
<span class="item_text">油罐容量</span>
<el-input v-model="formobj.capacity" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">油罐库存</span>
<el-input v-model="formobj.initialInventory" placeholder="" class="item_input" clearable />
</div>
</el-card>
</div>
</div>
</template>
<script>
import req from '@/api/oilTank/oilTank'
export default {
data() {
return {
submitdisabled: false,
crudeLists:[],
crudeList:[],
formobj: {
sid: "",
number: "",
crudeSid: "",
crudeName: "",
crudeNumber: "",
capacity: "",
tankPipeline: "",
initialInventory: "",
}
}
},
created() {
this.crudeinfoList()
},
methods: {
crudeinfoList() {
req.crudeinfoList().then((res) => {
if (res.success) {
console.log(">>>>>>>>>2222222", res.data)
this.crudeLists = res.data
for (var i = 0; i <this.crudeLists.length; i++) {
let item = {
name: this.crudeLists[i].name,
sid: this.crudeLists[i].sid,
}
this.crudeList.push(item)
}
}
})
},
saveOrUpdate() {
req.addInfo(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
sid: "",
number: "",
crudeSid:"",
crudeName: "",
crudeNumber: "",
capacity: "",
tankPipeline: "",
initialInventory: "",
}
this.$emit('doback')
},
getType(value) {
console.log(">>>>>>>>>getType", value)
const choose = this.crudeLists.filter((item) => item.sid === value)
console.log(">>>>>>>>>getType", choose[0])
// this.formobj.crudeSid = choose[0].sid
this.formobj.crudeNumber = choose[0].number
this.formobj.crudeSid = value
},
}
}
</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>

225
src/views/oilType/index.vue

@ -1,225 +0,0 @@
<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>
<!-- 翻页分页 -->
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> -->
</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="操作" wid align="center" width="180">
<template slot-scope="scope">
<!-- <el-button type="primary" size="mini" @click="toDetail(scope.row)">查看</el-button> -->
<el-button type="primary" size="mini" @click="toEdit(scope.row)">编辑</el-button>
<el-button type="primary" size="mini" @click="doDel(scope.row)">删除</el-button>
</template>
</el-table-column>
<el-table-column label="原油名称" prop="name" align="center" />
<el-table-column label="原油编码" prop="number" align="center" />
<el-table-column label="原油Code" prop="code" 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>
<oilTypeAdd v-show="viewState ==2 || viewState ==3" ref="divAdd" @doback="resetState" @reloadlist="getList" />
<!-- <oilTypeInfo v-show="viewState ==4" ref="divInfo" @doback="resetState" @reloadlist="getList" /> -->
</div>
</template>
<script>
import req from '@/api/oilType/oilType'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import oilTypeAdd from './oilTypeAdd.vue'
// import oilTypeInfo from './oilTypeInfo.vue'
export default {
name: 'CustomerManagement',
components: {
Pagination,
pageye,
ButtonBar,
oilTypeAdd,
// oilTypeInfo,
},
data() {
return {
listLoading: false,
btndisabled: false,
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: {
entryName: '',
},
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: {
entryName: ""
}
}
this.getList()
},
//
toAdd() {
this.viewState = 2
},
//
toEdit(row) {
this.viewState = 3
this.$refs['divAdd'].showEdit(row)
},
// ID
doDel(row) {
const tip = '请确认是否删除所选记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
req.delBySids(row.sid).then((response) => {
if (response.success) {
this.$message({
showClose: true,
type: 'success',
message: '删除成功'
})
this.getList()
} else {
this.$message({
showClose: true,
type: 'error',
message: '删除失败'
})
}
})
})
},
// toDetail(row) {
// this.viewState = 4
// this.$refs['divInfo'].showAdd(row.sid)
// },
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
</style>

179
src/views/oilType/oilTypeAdd.vue

@ -1,179 +0,0 @@
<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>
<el-card class="box-card">
<div class="item">
<span class="item_text">原油名称</span>
<el-input v-model="formobj.name" 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">原油Code</span>
<el-input v-model="formobj.code" placeholder="" class="item_input" clearable />
</div>
</el-card>
</div>
</div>
</template>
<script>
import req from '@/api/oilType/oilType'
export default {
data() {
return {
submitdisabled: false,
formobj: {
sid: "",
name: "",
number: "",
code: ""
}
}
},
methods: {
saveOrUpdate() {
if(this.formobj.sid){
req.updateData(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
}else{
req.addInfo(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
}
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
sid: "",
name: "",
number: "",
code: ""
}
this.$emit('doback')
},
showAdd() {
},
showEdit(row) {
console.log("sid>>>>>>>>>",row.sid)
req.fetchBySid(row.sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
}
})
.catch(e => {
this.formobj = row
})
}
}
}
</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>

254
src/views/oilType/oilTypeInfo.vue

@ -1,254 +0,0 @@
<template>
<div class="app-container">
<div>
<div class="tab-header webtop">
<div>查看项目信息</div>
<div>
<el-button type="info" size="small" icon="el-icon-close" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="listconadd" style="padding-bottom: 50px;">
<el-form ref="dataForm" :model="temp" label-position="top" label-width="190px" class="formadd">
<div class="titwu">项目信息表</div>
<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>{{temp.entryName}}</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>{{temp.industryName}}</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>{{temp.typeName}}</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>{{temp.creditLimit}}</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>{{temp.bankName}}</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>{{temp.bmanagerName}}</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>{{temp.engaDate}}</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>{{temp.signingDate}}</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>{{temp.enterpriseName}}</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>{{temp.econtacts}}</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="20">
<el-form-item class="trightb_item">
<span>{{temp.remarks}}</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>{{temp.regulatoryLeader}}</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>{{temp.generalManager}}</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>{{temp.endDate}}</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>{{temp.fillInDate}}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/oilType/oilType'
export default {
name: 'CustomerManagementInfo',
data() {
return {
temp: {} //
}
},
methods: {
showAdd(sid) {
req.fetchBySid(sid)
.then(resp => {
if (resp.success) {
this.temp = resp.data
}
})
.catch(e => {
this.$emit('doback')
})
},
//
handleReturn() {
this.$emit('doback')
}
}
}
</script>
<style scoped>
.trightb {
display: flex;
align-items: center;
text-align: ;
justify-content: center;
}
.trightb_item {
padding-top: 5px;
}
.span {
margin-left: 50px;
font-size: 15px;
font-weight: 400;
}
/deep/ .el-collapse-item__header {
height: 40px;
padding: 10px;
font-weight: bold;
font-size: 20px;
text-align: left;
color: #ffffff;
background-color: #0294d7;
}
/deep/ .el-collapse-item__content {
padding-bottom: 0;
}
</style>

228
src/views/oilTypeInAndOutBound/inBoundAdd.vue

@ -1,228 +0,0 @@
<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>
<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-input v-model="formobj.supplierSid" 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-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.tankName" filterable placeholder="请选择油罐编号" class="item_input" @change="getTank">
<el-option v-for="item in tankList" :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.oilType" placeholder="" :readonly="true" class="item_input" clearable />
<!-- <span class="item_input">{{formobj.crudeNumber}}</span> -->
</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>
</el-card>
</div>
</div>
</template>
<script>
import req from '@/api/oilTypeInAndOutBound/oilTypeInAndOutBound'
export default {
data() {
return {
submitdisabled: false,
tankLists: [],
tankList: [],
formobj: {
sid: "",
contractNumber: "",
contractSigningDate: "",
warehousingDate: "",
tankName: "",
tankSid: "",
oilType: "",
weight: "",
value: "",
supplierSid: "",
licensePlateNumber: "",
remarks: "",
}
}
},
created() {
this.getTankList()
},
methods: {
getTankList() {
req.tankList().then((res) => {
if (res.success) {
console.log(">>>>>>>>>111111111111wwwwwwwwww", res.data)
this.tankLists = res.data
for (var i = 0; i < this.tankLists.length; i++) {
let item = {
name: this.tankLists[i].number,
sid: this.tankLists[i].sid,
}
this.tankList.push(item)
}
}
})
},
saveOrUpdate() {
req.intAddInfo(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
sid: "",
contractNumber: "",
contractSigningDate: "",
warehousingDate: "",
tankName: "",
tankSid: "",
oilType: "",
weight: "",
value: "",
supplierSid: "",
licensePlateNumber: "",
remarks: "",
}
this.$emit('doback')
},
getTank(value) {
console.log(">>>>>>>>>getType", value)
const choose = this.tankLists.filter((item) => item.sid === value)
console.log(">>>>>>>>>getType", choose[0])
this.formobj.tankSid = choose[0].sid
this.formobj.oilType = choose[0].crudeName
},
}
}
</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>

349
src/views/oilTypeInAndOutBound/index.vue

@ -1,349 +0,0 @@
<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" 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>
<el-row>
<el-col>
<el-tabs v-model="tabActiveName" @tab-click="handleOrder">
<el-tab-pane label="入库记录表" name="uplog">
<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="supplierSid" 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="tankNumber" label="油罐编号" width="150" align="center" />
<el-table-column prop="crudeName" 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>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="logListTotal > 0" :total="logListTotal" :page.sync="logListQuery.current"
:limit.sync="logListQuery.size" class="pagination" @pagination="loadLogList" />
</div>
</el-tab-pane>
<el-tab-pane label="出库记录表" name="k112">
<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="flowmeterNumber" label="流量仪器" width="150" align="center" />
<el-table-column prop="tankNumber" label="油罐编号" width="150" align="center" />
<el-table-column prop="crudeName" 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>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="in112ListTotal > 0" :total="in112ListTotal" :page.sync="in112ListQuery.current"
:limit.sync="in112ListQuery.size" class="pagination" @pagination="loadIn112List" />
</div>
</el-tab-pane>
</el-tabs>
</el-col>
</el-row>
</div>
</div>
<inBoundAdd v-show="viewState ==2" ref="inBoundAdd" @doback="resetState" @reloadlist="init" />
<outBoundAdd v-show="viewState ==3" ref="ouBoundAdd" @doback="resetState" @reloadlist="init" />
</div>
</template>
<script>
import req from '@/api/oilTypeInAndOutBound/oilTypeInAndOutBound'
import Pagination from '@/components/pagination'
import {
parseTime
} from '@/utils/index'
import ButtonBar from '@/components/ButtonBar'
import inBoundAdd from './inBoundAdd.vue'
import outBoundAdd from './outBoundAdd.vue'
export default {
components: {
ButtonBar,
Pagination,
inBoundAdd,
outBoundAdd
},
data() {
return {
viewState: 1,
tabActiveName: 'uplog',
index: "0",
isSearchShow: false,
searchxianshitit: '显示查询条件',
btndisabled: false,
tableLoading1: false,
tableLoading2: false,
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: ""
}
}
},
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() {
// if (this.index == "0") {
this.loadLogList()
// } else if (this.index == "1") {
this.loadIn112List()
// }
},
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()
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;
}
},
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
},
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>

227
src/views/oilTypeInAndOutBound/outBoundAdd.vue

@ -1,227 +0,0 @@
<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>
<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.flowmeterName" filterable placeholder="请选择流量仪器" class="item_input"
@change="getFlowmeter">
<el-option v-for="item in flowmeterList" :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.tankName" placeholder="" :readonly="true" class="item_input" clearable />
<!-- <span class="item_input">{{formobj.crudeNumber}}</span> -->
</div>
<div class="item">
<span class="item_text">原油编号</span>
<el-input v-model="formobj.oilType" placeholder="" :readonly="true" class="item_input" clearable />
<!-- <span class="item_input">{{formobj.crudeNumber}}</span> -->
</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>
</el-card>
</div>
</div>
</template>
<script>
import req from '@/api/oilTypeInAndOutBound/oilTypeInAndOutBound'
import req2 from '@/api/flowInstrument/flowInstrument'
export default {
data() {
return {
submitdisabled: false,
flowmeterLists: [],
flowmeterList: [],
formobj: {
sid: "",
salesContractNumber: "",
contractSigningDate: "",
deliveryDate: "",
flowmeterSid: "",
flowmeterName: "",
tankName: "",
oilType: "",
weight: "",
value: "",
remarks: "",
}
}
},
created() {
console.log(">>>>>>>>>created")
this.getFlowmeterList()
},
methods: {
getFlowmeterList() {
console.log(">>>>>>>>>111111111111wwwwwwwwww")
req2.flowmeterList().then((res) => {
if (res.success) {
console.log(">>>>>>>>>111111111111wwwwwwwwww", res.data)
this.flowmeterLists = res.data
for (var i = 0; i < this.flowmeterLists.length; i++) {
let item = {
name: this.flowmeterLists[i].number,
sid: this.flowmeterLists[i].sid,
}
this.flowmeterList.push(item)
}
}
})
},
saveOrUpdate() {
req.outAddInfo(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
sid: "",
salesContractNumber: "",
contractSigningDate: "",
deliveryDate: "",
flowmeterSid: "",
flowmeterName: "",
tankName: "",
oilType: "",
weight: "",
value: "",
remarks: "",
}
this.$emit('doback')
},
getFlowmeter(value) {
console.log(">>>>>>>>>getType", value)
const choose = this.flowmeterLists.filter((item) => item.sid === value)
console.log(">>>>>>>>>getType", choose[0])
this.formobj.flowmeterSid = choose[0].sid
this.formobj.tankName = choose[0].tankNumber
this.formobj.oilType = choose[0].crudeNumber
},
}
}
</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>

173
src/views/projectType/projectTypeAdd.vue

@ -1,173 +0,0 @@
<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>
<el-card class="box-card">
<div class="item">
<span class="item_text">项目类型名称</span>
<el-input v-model="formobj.typeName" 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>
</el-card>
</div>
</div>
</template>
<script>
import req from '@/api/dataDict/datadict'
export default {
data() {
return {
submitdisabled: false,
formobj: {
sid: '',
typeName: '',
remarks: ''
}
}
},
methods: {
saveOrUpdate() {
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
if (this.formobj.sid) {
req.updateClass(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn('true')
} else {
// resp.code
}
})
.catch(() => {})
} else {
req.saveClass(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn('true')
} else {
// resp.code
}
})
.catch(() => {})
}
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
sid: '',
typeName: '',
remarks: ''
}
this.$emit('doback')
},
showAdd() {
},
showEdit(row) {
req.classFetchBySid(row.sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
}
})
.catch(e => {
this.formobj = row
})
}
}
}
</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>

225
src/views/projectType/projectTypeInfo.vue

@ -1,225 +0,0 @@
<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 :inline="true" class="tab-header">
<el-form-item label="项目类型名称">
<el-input v-model="queryParams.params.typeName" placeholder="" clearable />
</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>
<!-- Start 项目列表头部 -->
<div class="listtop">
<div class="tit">项目类型列表</div>
</div>
<!-- End 项目列表头部 -->
<!-- Start 项目列表 -->
<div class="">
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column fixed width="80" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column label="操作" align="center" width="180">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">编辑</el-button>
<el-button type="primary" size="mini" @click="toRelevancyInfo(scope.row)">删除</el-button>
</template>
</el-table-column>
<el-table-column prop="typeName" label="项目类型名称" align="center" />
<el-table-column prop="remarks" label="项目类型说明" align="center" />
</el-table>
</div>
<!-- End 项目列表 -->
<div class="pages">
<div class="tit" />
<!-- 翻页 -->
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current"
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
</div>
</div>
</div>
<!-- End 查询和其列表部分 -->
<!-- 新增修改部分组件 -->
<divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" />
</div>
</template>
<script>
import req from '@/api/dataDict/datadict'
import ButtonBar from '@/components/ButtonBar'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import divAdd from './projectTypeAdd'
export default {
name: 'SupplierBankInfoIndex',
components: {
ButtonBar,
Pagination,
pageye,
divAdd
},
data() {
return {
btndisabled: false,
viewState: 1, // 1 2 3 4
isSearchShow: false,
searchxianshitit: '显示查询条件',
tableLoading: false,
dataList: [],
btnList: [{
type: 'primary',
size: 'small',
icon: 'plus',
btnKey: 'toAdd',
btnLabel: '新增'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
queryParams: {
current: 1,
size: 10,
total: 0,
params: {
typeName: '',
}
},
sids: []
}
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
created() {
this.loadList()
},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
switch (btnKey) {
case 'toAdd':
this.toAdd()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
loadList() {
this.tableLoading = true
req.classListPage(this.queryParams).then((resp) => {
this.tableLoading = false
if (resp.success) {
const data = resp.data
this.queryParams.total = data.total
this.dataList = data.records
} else {
// resp.code
this.dataList = []
this.queryParams.total = 0
}
}).catch(() => {
this.tableLoading = false
})
},
handleSelectionChange(row) {
const aa = []
row.forEach((element) => {
aa.push(element.sid)
})
this.sids = aa
},
//
indexMethod(index) {
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
var pageindex = index + 1 + pagestart
return pageindex
},
dosearch() {
this.queryParams.current = 1
this.loadList()
},
resetQuery() {
this.queryParams = {
current: 1,
size: 10,
total: 0,
params: {
typeName: '',
}
}
this.loadList()
},
toAdd() {
this.viewState = 2
this.$refs['divadd'].showAdd()
},
toRelevancy(row) {
this.viewState = 3
this.$refs['divadd'].showEdit(row)
},
toRelevancyInfo(row) {
const tip = '请确认是否删除所选记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.classDelBySids(row.sid).then((resp) => {
loading.close()
if (resp.success) {
this.$message({
type: 'success',
message: resp.msg,
showClose: true
})
this.loadList()
} else {
// resp.code
}
}).catch(e => {
loading.close()
})
}).catch(() => {})
},
resetState() {
this.viewState = 1
}
}
}
</script>
<style scoped>
</style>

229
src/views/rawMaterialInAndOutBound/inBoundAdd.vue

@ -1,229 +0,0 @@
<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>
<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-input v-model="formobj.supplierSid" 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-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.inventoryName" filterable placeholder="请选择原料名称" class="item_input" @change="getInventoryName">
<el-option v-for="item in inventoryList" :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.typeName" placeholder="" :readonly="true" class="item_input" clearable />
<!-- <span class="item_input">{{formobj.crudeNumber}}</span> -->
</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>
</el-card>
</div>
</div>
</template>
<script>
import req from '@/api/rawMaterialInAndOutBound/rawMaterialInAndOutBound'
export default {
data() {
return {
submitdisabled: false,
inventoryLists: [],
inventoryList: [],
formobj: {
sid: "",
contractNumber: "",
contractSigningDate: "",
warehousingDate: "",
inventoryName: "",
inventorySid: "",
typeName: "",
weight: "",
value: "",
supplierSid: "",
licensePlateNumber: "",
remarks: "",
}
}
},
created() {
this.getInventoryList()
},
methods: {
getInventoryList() {
req.inventoryList().then((res) => {
if (res.success) {
console.log(">>>>>>>>>111111111111wwwwwwwwww", res.data)
this.inventoryLists = res.data
for (var i = 0; i < this.inventoryLists.length; i++) {
let item = {
name: this.inventoryLists[i].number,
sid: this.inventoryLists[i].sid,
}
this.inventoryList.push(item)
}
}
})
},
saveOrUpdate() {
req.intAddInfo(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
sid: "",
contractNumber: "",
contractSigningDate: "",
warehousingDate: "",
inventoryName: "",
inventorySid: "",
typeName: "",
weight: "",
value: "",
supplierSid: "",
licensePlateNumber: "",
remarks: "",
}
this.$emit('doback')
},
getInventoryName(value) {
console.log(">>>>>>>>>getType", value)
const choose = this.inventoryLists.filter((item) => item.sid === value)
console.log(">>>>>>>>>getType", choose[0])
this.formobj.inventorySid = choose[0].sid
this.formobj.typeName = choose[0].typeName
},
}
}
</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>

348
src/views/rawMaterialInAndOutBound/index.vue

@ -1,348 +0,0 @@
<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" 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>
<el-row>
<el-col>
<el-tabs v-model="tabActiveName" @tab-click="handleOrder">
<el-tab-pane label="入库记录表" name="uplog">
<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="supplierSid" 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="name" label="原料名称" width="150" align="center" />
<el-table-column prop="typeName" 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>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="logListTotal > 0" :total="logListTotal" :page.sync="logListQuery.current"
:limit.sync="logListQuery.size" class="pagination" @pagination="loadLogList" />
</div>
</el-tab-pane>
<el-tab-pane label="出库记录表" name="k112">
<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="name" label="原料名称" width="150" align="center" />
<el-table-column prop="typeName" 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>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="in112ListTotal > 0" :total="in112ListTotal" :page.sync="in112ListQuery.current"
:limit.sync="in112ListQuery.size" class="pagination" @pagination="loadIn112List" />
</div>
</el-tab-pane>
</el-tabs>
</el-col>
</el-row>
</div>
</div>
<inBoundAdd v-show="viewState ==2" ref="inBoundAdd" @doback="resetState" @reloadlist="init" />
<outBoundAdd v-show="viewState ==3" ref="ouBoundAdd" @doback="resetState" @reloadlist="init" />
</div>
</template>
<script>
import req from '@/api/rawMaterialInAndOutBound/rawMaterialInAndOutBound'
import Pagination from '@/components/pagination'
import {
parseTime
} from '@/utils/index'
import ButtonBar from '@/components/ButtonBar'
import inBoundAdd from './inBoundAdd.vue'
import outBoundAdd from './outBoundAdd.vue'
export default {
components: {
ButtonBar,
Pagination,
inBoundAdd,
outBoundAdd
},
data() {
return {
viewState: 1,
tabActiveName: 'uplog',
index: "0",
isSearchShow: false,
searchxianshitit: '显示查询条件',
btndisabled: false,
tableLoading1: false,
tableLoading2: false,
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: ""
}
}
},
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() {
// if (this.index == "0") {
this.loadLogList()
// } else if (this.index == "1") {
this.loadIn112List()
// }
},
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()
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;
}
},
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
},
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>

219
src/views/rawMaterialInAndOutBound/outBoundAdd.vue

@ -1,219 +0,0 @@
<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>
<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.inventoryName" filterable placeholder="请选择原料名称" class="item_input"
@change="getInventoryName">
<el-option v-for="item in inventoryList" :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.typeName" placeholder="" :readonly="true" class="item_input" clearable />
<!-- <span class="item_input">{{formobj.crudeNumber}}</span> -->
</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>
</el-card>
</div>
</div>
</template>
<script>
import req from '@/api/rawMaterialInAndOutBound/rawMaterialInAndOutBound'
export default {
data() {
return {
submitdisabled: false,
inventoryLists: [],
inventoryList: [],
formobj: {
sid: "",
salesContractNumber: "",
contractSigningDate: "",
deliveryDate: "",
inventorySid: "",
inventoryName: "",
typeName: "",
weight: "",
value: "",
remarks: "",
}
}
},
created() {
console.log(">>>>>>>>>created")
this.getInventoryList()
},
methods: {
getInventoryList() {
console.log(">>>>>>>>>111111111111wwwwwwwwww")
req.inventoryList().then((res) => {
if (res.success) {
console.log(">>>>>>>>>111111111111wwwwwwwwww", res.data)
this.inventoryLists = res.data
for (var i = 0; i < this.inventoryLists.length; i++) {
let item = {
name: this.inventoryLists[i].name,
sid: this.inventoryLists[i].sid,
}
this.inventoryList.push(item)
}
}
})
},
saveOrUpdate() {
req.outAddInfo(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
sid: "",
salesContractNumber: "",
contractSigningDate: "",
deliveryDate: "",
inventorySid: "",
inventoryName: "",
typeName: "",
weight: "",
value: "",
remarks: "",
}
this.$emit('doback')
},
getInventoryName(value) {
console.log(">>>>>>>>>getType", value)
const choose = this.inventoryLists.filter((item) => item.sid === value)
console.log(">>>>>>>>>getType", choose[0])
this.formobj.inventorySid = choose[0].sid
this.formobj.typeName = choose[0].typeName
// this.formobj.oilType = choose[0].crudeNumber
},
}
}
</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>

262
src/views/rawMaterialInfo/index.vue

@ -1,262 +0,0 @@
<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>
<!-- 翻页分页 -->
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> -->
</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="原料名称" prop="name" align="center" />
<el-table-column label="原料编码" prop="number" align="center" />
<el-table-column label="原料类型" prop="typeName" align="center" />
<el-table-column label="原料初始库存" prop="initialInventory" align="center" />
<el-table-column label="原料现有库存" prop="inventory" 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>
<rawMaterialInfoAdd 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>
<!-- <span>{{form.planContent}}</span> -->
<el-input v-model="form.existingInventory" 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/rawMaterialInfo/rawMaterialInfo.js'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import rawMaterialInfoAdd from './rawMaterialInfoAdd.vue'
// import oilTypeInfo from './oilTypeInfo.vue'
export default {
name: 'CustomerManagement',
components: {
Pagination,
pageye,
ButtonBar,
rawMaterialInfoAdd,
// oilTypeInfo,
},
data() {
return {
listLoading: false,
btndisabled: false,
editDialog: false,
form: {},
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: {
entryName: ""
}
}
this.getList()
},
//
toAdd() {
this.viewState = 2
},
//
toEdit(row) {
this.viewState = 3
this.$refs['divAdd'].showEdit(row)
},
// ID
doDel(row) {
const tip = '请确认是否删除所选记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
req.delBySids(row.sid).then((response) => {
if (response.success) {
this.$message({
showClose: true,
type: 'success',
message: '删除成功'
})
this.getList()
} else {
this.$message({
showClose: true,
type: 'error',
message: '删除失败'
})
}
})
})
},
toDetail(row) {
this.editDialog = true;
this.form.tankSid = row.sid
},
save() {
console.log("form", this.form)
req.saveInfo(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>

190
src/views/rawMaterialInfo/rawMaterialInfoAdd.vue

@ -1,190 +0,0 @@
<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>
<el-card class="box-card">
<div class="item">
<span class="item_text">原料名称</span>
<el-input v-model="formobj.name" 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-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-input v-model="formobj.initialInventory" placeholder="" class="item_input" clearable />
</div>
</el-card>
</div>
</div>
</template>
<script>
import req from '@/api/rawMaterialInfo/rawMaterialInfo'
export default {
data() {
return {
submitdisabled: false,
typeLists: [],
typeList: [],
formobj: {
sid: "",
name: "",
number: "",
inventory: "",
initialInventory: "",
typeSid: "",
typeName: "",
}
}
},
created() {
this.rawMaterialType()
},
methods: {
rawMaterialType() {
req.rawMaterialType().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)
}
}
})
},
saveOrUpdate() {
req.addInfo(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
sid: "",
name: "",
number: "",
inventory: "",
initialInventory: "",
typeSid: "",
typeName: "",
}
this.$emit('doback')
},
getType(value) {
console.log(">>>>>>>>>getType", value)
const choose = this.typeLists.filter((item) => item.sid === value)
console.log(">>>>>>>>>getType", choose[0])
this.formobj.typeSid = choose[0].sid
this.formobj.typeName = choose[0].name
},
}
}
</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>

225
src/views/rawMaterialType/index.vue

@ -1,225 +0,0 @@
<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>
<!-- 翻页分页 -->
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> -->
</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="操作" wid align="center" width="180">
<template slot-scope="scope">
<!-- <el-button type="primary" size="mini" @click="toDetail(scope.row)">查看</el-button> -->
<el-button type="primary" size="mini" @click="toEdit(scope.row)">编辑</el-button>
<el-button type="primary" size="mini" @click="doDel(scope.row)">删除</el-button>
</template>
</el-table-column>
<el-table-column label="原料类型" prop="name" align="center" />
<el-table-column label="原料编码" prop="number" align="center" />
<el-table-column label="原料Code" prop="code" 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>
<rawMaterialTypeAdd v-show="viewState ==2 || viewState ==3" ref="divAdd" @doback="resetState" @reloadlist="getList" />
<!-- <oilTypeInfo v-show="viewState ==4" ref="divInfo" @doback="resetState" @reloadlist="getList" /> -->
</div>
</template>
<script>
import req from '@/api/rawMaterialType/rawMaterialType'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import rawMaterialTypeAdd from './rawMaterialTypeAdd.vue'
// import oilTypeInfo from './oilTypeInfo.vue'
export default {
name: 'CustomerManagement',
components: {
Pagination,
pageye,
ButtonBar,
rawMaterialTypeAdd,
// oilTypeInfo,
},
data() {
return {
listLoading: false,
btndisabled: false,
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: {
entryName: '',
},
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: {
entryName: ""
}
}
this.getList()
},
//
toAdd() {
this.viewState = 2
},
//
toEdit(row) {
this.viewState = 3
this.$refs['divAdd'].showEdit(row)
},
// ID
doDel(row) {
const tip = '请确认是否删除所选记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
req.delBySids(row.sid).then((response) => {
if (response.success) {
this.$message({
showClose: true,
type: 'success',
message: '删除成功'
})
this.getList()
} else {
this.$message({
showClose: true,
type: 'error',
message: '删除失败'
})
}
})
})
},
// toDetail(row) {
// this.viewState = 4
// this.$refs['divInfo'].showAdd(row.sid)
// },
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
</style>

254
src/views/rawMaterialType/oilTypeInfo.vue

@ -1,254 +0,0 @@
<template>
<div class="app-container">
<div>
<div class="tab-header webtop">
<div>查看项目信息</div>
<div>
<el-button type="info" size="small" icon="el-icon-close" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="listconadd" style="padding-bottom: 50px;">
<el-form ref="dataForm" :model="temp" label-position="top" label-width="190px" class="formadd">
<div class="titwu">项目信息表</div>
<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>{{temp.entryName}}</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>{{temp.industryName}}</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>{{temp.typeName}}</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>{{temp.creditLimit}}</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>{{temp.bankName}}</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>{{temp.bmanagerName}}</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>{{temp.engaDate}}</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>{{temp.signingDate}}</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>{{temp.enterpriseName}}</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>{{temp.econtacts}}</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="20">
<el-form-item class="trightb_item">
<span>{{temp.remarks}}</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>{{temp.regulatoryLeader}}</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>{{temp.generalManager}}</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>{{temp.endDate}}</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>{{temp.fillInDate}}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/oilType/oilType'
export default {
name: 'CustomerManagementInfo',
data() {
return {
temp: {} //
}
},
methods: {
showAdd(sid) {
req.fetchBySid(sid)
.then(resp => {
if (resp.success) {
this.temp = resp.data
}
})
.catch(e => {
this.$emit('doback')
})
},
//
handleReturn() {
this.$emit('doback')
}
}
}
</script>
<style scoped>
.trightb {
display: flex;
align-items: center;
text-align: ;
justify-content: center;
}
.trightb_item {
padding-top: 5px;
}
.span {
margin-left: 50px;
font-size: 15px;
font-weight: 400;
}
/deep/ .el-collapse-item__header {
height: 40px;
padding: 10px;
font-weight: bold;
font-size: 20px;
text-align: left;
color: #ffffff;
background-color: #0294d7;
}
/deep/ .el-collapse-item__content {
padding-bottom: 0;
}
</style>

179
src/views/rawMaterialType/rawMaterialTypeAdd.vue

@ -1,179 +0,0 @@
<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>
<el-card class="box-card">
<div class="item">
<span class="item_text">原料类型</span>
<el-input v-model="formobj.name" 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">原料Code</span>
<el-input v-model="formobj.code" placeholder="" class="item_input" clearable />
</div>
</el-card>
</div>
</div>
</template>
<script>
import req from '@/api/rawMaterialType/rawMaterialType'
export default {
data() {
return {
submitdisabled: false,
formobj: {
sid: "",
name: "",
number: "",
code: ""
}
}
},
methods: {
saveOrUpdate() {
if(this.formobj.sid){
req.updateData(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
}else{
req.addInfo(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
}
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
sid: "",
name: "",
number: "",
code: ""
}
this.$emit('doback')
},
showAdd() {
},
showEdit(row) {
console.log("sid>>>>>>>>>",row.sid)
req.fetchBySid(row.sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
}
})
.catch(e => {
this.formobj = row
})
}
}
}
</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>

152
src/views/storeManagement/index.vue

@ -0,0 +1,152 @@
<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" 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>
</div>
</div>
</template>
<script>
import req from '@/api/oilTypeInAndOutBound/oilTypeInAndOutBound'
import Pagination from '@/components/pagination'
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,
btnList: [
{
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: ""
}
}
},
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 'doClose': //
this.doClose()
break
default:
break
}
},
init() {
this.loadLogList()
},
loadLogList() {
// req.logPagerList({
// }).then(res => {
// })
},
//
indexMethod(index) {
var pagestart = (this.logListQuery.current - 1) * this.logListQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
indexMethod2(index) {
var pagestart = (this.in112ListQuery.current - 1) * this.in112ListQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
</style>

246
src/views/storehouse/index.vue

@ -1,246 +0,0 @@
<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.bankName" 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>
<!-- 翻页分页 -->
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> -->
</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="操作" wid align="center" width="220">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="toDetail(scope.row)">查看</el-button>
<el-button type="primary" size="mini" @click="toEdit(scope.row)">编辑</el-button>
<el-button type="primary" size="mini" @click="doDel(scope.row)">删除</el-button>
</template>
</el-table-column>
<el-table-column label="库房地址" prop="address" align="center" />
<el-table-column label="省 - 市 - 县" width="200" align="center">
<template slot-scope="scope">
<span>{{ scope.row.province }}</span>
<span>-{{ scope.row.city }}-</span>
<span>{{ scope.row.county }}</span>
</template>
</el-table-column>
<el-table-column label="面积" prop="squareMeasure" width="100" align="center" />
<el-table-column label="层高" prop="floorHeight" width="80" align="center" />
<el-table-column label="价格" prop="price" width="100" align="center" />
<el-table-column label="性质" prop="properties" width="180" align="center" />
<el-table-column label="房源" prop="housingResources" width="80" align="center" />
<el-table-column label="联系人" prop="contacts" width="100" align="center" />
<el-table-column label="联系电话" prop="telephone" width="150" 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>
<storehouseAdd v-show="viewState ==2 || viewState ==3" ref="divAdd" @doback="resetState" @close="close($event)" @reloadlist="getList" />
<storehouseInfo v-show="viewState ==4" ref="divInfo" @doback="resetState" @dojump="jump($event)" @reloadlist="getList"/>
</div>
</template>
<script>
import req from '@/api/storehouse/storehouse'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import storehouseAdd from './storehouseAdd.vue'
import storehouseInfo from './storehouseInfo.vue'
export default {
name: 'CustomerManagement',
components: {
Pagination,
pageye,
ButtonBar,
storehouseAdd,
storehouseInfo,
},
data() {
return {
listLoading: false,
btndisabled: false,
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: {
bankName: '',
},
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: {
bankName: ""
}
}
this.getList()
},
//
toAdd() {
this.viewState = 2
},
//
toEdit(row) {
this.viewState = 3
this.$refs['divAdd'].showEdit(row)
},
// ID
doDel(row) {
const tip = '请确认是否删除所选记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
req.delBySids(row.sid).then((response) => {
if (response.success) {
this.$message({
showClose: true,
type: 'success',
message: '删除成功'
})
this.getList()
} else {
this.$message({
showClose: true,
type: 'error',
message: '删除失败'
})
}
})
})
},
toDetail(row) {
this.viewState = 4
this.$refs['divInfo'].showAdd(row.sid)
},
resetState() {
this.viewState = 1
},
jump(sid) {
console.log("jump",sid)
this.viewState = 2
this.$refs['divAdd'].showAdd(sid)
},
close(sid){
this.viewState = 4
this.$refs['divInfo'].showAdd(sid)
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
</style>

334
src/views/storehouse/storehouseAdd.vue

@ -1,334 +0,0 @@
<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>
<el-card class="box-card">
<div class="item">
<span class="item_text">库房位置</span>
<el-input v-model="formobj.address" placeholder="" class="item_input" style="width: 520px;" clearable />
</div>
<div class="item">
<span class="item_text">--</span>
<div class="item_input">
<el-select v-model="formobj.province" filterable placeholder="请选择省" class="addinputw" style="width:160px"
@change="getShen">
<el-option v-for="item in inputProvinceList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select>
<el-select v-model="formobj.city" filterable placeholder="请选择市" class="addinputw"
style="width:160px;margin-left: 20px;margin-right: 20px;" @change="getShi">
<el-option v-for="item in inputCityList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select>
<el-select v-model="formobj.county" filterable placeholder="请选择县" class="addinputw" style="width:160px"
@change="getXian">
<el-option v-for="item in inputCountyList" :key="item.sid" :label="item.name" :value="item.sid" />
</el-select>
</div>
</div>
<div class="item">
<span class="item_text">库房面积</span>
<el-input v-model="formobj.squareMeasure" placeholder="" class="item_input" style="width: 520px;" clearable />
</div>
<div class="item">
<span class="item_text">库房层高</span>
<el-input v-model="formobj.floorHeight" placeholder="" class="item_input" style="width: 520px;" clearable />
</div>
<div class="item">
<span class="item_text">库房价格</span>
<el-input v-model="formobj.price" placeholder="" class="item_input" style="width: 520px;" clearable />
</div>
<div class="item">
<span class="item_text">库房性质</span>
<el-input v-model="formobj.properties" placeholder="" class="item_input" style="width: 520px;" clearable />
</div>
<div class="item">
<span class="item_text">房源</span>
<el-input v-model="formobj.housingResources" placeholder="" class="item_input"
style="width: 520px;" clearable />
</div>
<div class="item">
<span class="item_text">联系人</span>
<el-input v-model="formobj.contacts" placeholder="" class="item_input" style="width: 520px;" clearable />
</div>
<div class="item">
<span class="item_text">联系电话</span>
<el-input v-model="formobj.telephone" placeholder="" maxlength="11" class="item_input" style="width: 520px;" clearable />
</div>
<div class="item">
<span class="item_text">备注</span>
<el-input v-model="formobj.remarks" placeholder="" class="item_input" style="width: 520px;" clearable />
</div>
</el-card>
</div>
</div>
</template>
<script>
import req from '@/api/storehouse/storehouse'
import {
getCity,
getCounty,
getProvince
} from '@/api/portal/areaPicker' //
export default {
data() {
return {
submitdisabled: false,
formobj: {
sid: "",
address: "",
squareMeasure: "",
floorHeight: "",
properties: "",
price: "",
housingResources: "",
province: '',
city: "",
county: "",
contacts: "",
telephone: "",
remarks: ""
},
inputProvinceList: [],
inputCityList: [],
inputCountyList: [],
}
},
created() {
this.huoquSheng()
},
methods: {
saveOrUpdate() {
console.log(">>>>>>>>>222222", this.formobj)
if (this.formobj.sid) {
req.updateData(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
} else {
req.addInfo(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
}
},
handleReturn(isreload) {
console.log(">>>>>>>>>")
if (isreload === 'true') this.$emit('reloadlist')
if (this.formobj.psid) {
this.$emit('close', this.formobj.psid)
} else {
this.$emit('doback')
}
this.formobj = {
sid: "",
address: "",
squareMeasure: "",
floorHeight: "",
properties: "",
price: "",
housingResources: "",
province: '',
city: "",
county: "",
contacts: "",
telephone: "",
remarks: ""
}
},
showAdd(sid) {
this.formobj.psid = sid
},
showEdit(row) {
req.fetchBySid(row.sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
}
})
.catch(e => {
this.formobj = row
})
},
// --------------------------------------------------
huoquSheng() {
getProvince().then((res) => {
if (res.success) {
this.inputProvinceList = res.data
}
})
},
getShen(value) {
let bb = ''
this.inputProvinceList.forEach((e) => {
if (e.sid === value) {
bb = {
name: e.name,
districtCode: e.districtCode,
sid: e.sid
}
}
})
// codeprovince
this.formobj.province = bb.name
this.formobj.city = ""
this.formobj.county = ""
this.huoquShi(bb.sid)
},
huoquShi(sid1) {
var sid = {
sid: sid1
}
getCity(sid).then((res) => {
if (res.success) {
this.inputCityList = res.data
}
})
},
getShi(value) {
let bb = ''
this.inputCityList.forEach((e) => {
if (e.sid === value) {
bb = {
name: e.name,
districtCode: e.districtCode,
sid: e.sid
}
}
})
this.formobj.city = bb.name
this.formobj.county = ""
this.huoquXian(bb.sid)
},
huoquXian(sid1) {
var sid = {
sid: sid1
}
getCounty(sid).then((res) => {
if (res.success) {
this.inputCountyList = res.data
}
})
},
getXian(value) {
let bb = ''
this.inputCountyList.forEach((e) => {
if (e.sid === value) {
bb = {
name: e.name,
districtCode: e.districtCode,
sid: e.sid
}
}
})
this.formobj.county = bb.name
},
}
}
</script>
<style lang="scss">
.box-card {
margin-left: 60px;
margin-right: 60px;
margin-top: 20px;
.item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
margin-top: 15px;
height: 40px;
line-height: 40px;
.item_text {
font-size: 18px;
text-align: right;
}
.item_input {
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>

198
src/views/storehouse/storehouseInfo.vue

@ -1,198 +0,0 @@
<template>
<div class="app-container">
<div>
<div class="tab-header webtop">
<div>查看库房信息</div>
<div>
<el-button type="info" size="small" icon="el-icon-close" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="listconadd">
<el-form ref="dataForm" :model="temp" label-position="top" label-width="190px" class="formadd">
<div class="titwu">库房信息</div>
<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>{{temp.address}}</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>{{temp.province}} - {{temp.city}} - {{temp.county}}</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>{{temp.squareMeasure}}</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>{{temp.floorHeight}}</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>{{temp.price}}</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>{{temp.properties}}</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>{{temp.housingResources}}</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>{{temp.remarks}}</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>{{temp.contacts}}</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>{{temp.telephone}}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/storehouse/storehouse'
export default {
name: 'CustomerManagementInfo',
data() {
return {
temp: {} //
}
},
methods: {
showAdd(sid) {
req.fetchBySid(sid)
.then(resp => {
if (resp.success) {
this.temp = resp.data
}
})
.catch(e => {
this.$emit('doback')
})
},
//
handleReturn() {
this.$emit('doback')
}
}
}
</script>
<style scoped>
.trightb {
display: flex;
align-items: center;
text-align: ;
justify-content: center;
}
.trightb_item {
padding-top: 5px;
}
.span {
margin-left: 50px;
font-size: 15px;
font-weight: 400;
}
/deep/ .el-collapse-item__header {
height: 40px;
padding: 10px;
font-weight: bold;
font-size: 20px;
text-align: left;
color: #ffffff;
background-color: #0294d7;
}
/deep/ .el-collapse-item__content {
padding-bottom: 0;
}
</style>

152
src/views/supplierManagement/index.vue

@ -0,0 +1,152 @@
<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" 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>
</div>
</div>
</template>
<script>
import req from '@/api/oilTypeInAndOutBound/oilTypeInAndOutBound'
import Pagination from '@/components/pagination'
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,
btnList: [
{
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: ""
}
}
},
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 'doClose': //
this.doClose()
break
default:
break
}
},
init() {
this.loadLogList()
},
loadLogList() {
// req.logPagerList({
// }).then(res => {
// })
},
//
indexMethod(index) {
var pagestart = (this.logListQuery.current - 1) * this.logListQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
indexMethod2(index) {
var pagestart = (this.in112ListQuery.current - 1) * this.in112ListQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
</style>
Loading…
Cancel
Save