Browse Source

2023-05-08

master
guoxing 2 years ago
parent
commit
27149f1bec
  1. 0
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilTypeInAndOutBound/oilTypeInAndOutBound.js
  2. 92
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialInAndOutBound/rawMaterialInAndOutBound.js
  3. 67
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialInfo/rawMaterialInfo.js
  4. 46
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialType/rawMaterialType.js
  5. 36
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/layout/components/Sidebar/index.vue
  6. 53
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/router/index.js
  7. 2
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/flowInstrument/flowInstrumentAdd.vue
  8. 4
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/flowInstrument/index.vue
  9. 2
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/oilTank/index.vue
  10. 2
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/oilType/index.vue
  11. 23
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/oilTypeInAndOutBound/inBoundAdd.vue
  12. 32
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/oilTypeInAndOutBound/index.vue
  13. 4
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/oilTypeInAndOutBound/outBoundAdd.vue
  14. 229
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/rawMaterialInAndOutBound/inBoundAdd.vue
  15. 348
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/rawMaterialInAndOutBound/index.vue
  16. 219
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/rawMaterialInAndOutBound/outBoundAdd.vue
  17. 262
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/rawMaterialInfo/index.vue
  18. 190
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/rawMaterialInfo/rawMaterialInfoAdd.vue
  19. 225
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/rawMaterialType/index.vue
  20. 254
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/rawMaterialType/oilTypeInfo.vue
  21. 179
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/rawMaterialType/rawMaterialTypeAdd.vue

0
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/inAndOutBound/inAndOutBound.js → yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/oilTypeInAndOutBound/oilTypeInAndOutBound.js

92
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialInAndOutBound/rawMaterialInAndOutBound.js

@ -0,0 +1,92 @@
import request from '@/utils/request'
export default {
// 获取原料
inventoryList: function(params) {
return request({
url: '/cyf/rawinventory/inventoryList',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 入库
logPagerList: function(params) {
return request({
url: '/cyf/rawstorage/listPage',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
intAddInfo: function(data) {
return request({
url: '/cyf/rawstorage/save',
method: 'post',
data: data
});
},
// 出库
// 查询分页列表
in112PagerList: function(params) {
return request({
url: '/cyf/rawoutbound/listPage',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
outAddInfo: function(data) {
return request({
url: '/cyf/rawoutbound/save',
method: 'post',
data: data
});
},
crudeinfoList: function(params) {
return request({
url: '/cyf/crudeinfo/list',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
fetchBySid: function(sid) {
return request({
url: '/cyf/crudeinfo/getCrudeBySid/' + sid
})
},
updateData: function(data) {
return request({
url: '/cyf/crudeinfo/update',
method: 'post',
data: data
});
},
delBySids: function(sid) {
return request({
url: '/cyf/crudeinfo/delete/' + sid,
method: 'delete'
})
},
}

67
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialInfo/rawMaterialInfo.js

@ -0,0 +1,67 @@
import request from '@/utils/request'
export default {
// 查询分页列表
listPage: function(params) {
return request({
url: '/cyf/rawinventory/listPage',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
addInfo: function(data) {
return request({
url: '/cyf/rawinventory/save',
method: 'post',
data: data
});
},
rawMaterialType: function(params) {
return request({
url: '/cyf/rawtype/typeList',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
fetchBySid: function(sid) {
return request({
url: '/cyf/crudeinfo/getCrudeBySid/' + sid
})
},
updateData: function(data) {
return request({
url: '/cyf/crudeinfo/update',
method: 'post',
data: data
});
},
delBySids: function(sid) {
return request({
url: '/cyf/crudeinfo/delete/' + sid,
method: 'delete'
})
},
// 保存每次读取库存
saveInfo: function(data) {
return request({
url: '/cyf/crudeinventory/save',
method: 'post',
data: data
});
},
}

46
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/rawMaterialType/rawMaterialType.js

@ -0,0 +1,46 @@
import request from '@/utils/request'
export default {
// 查询分页列表
listPage: function(params) {
return request({
url: '/cyf/rawtype/listPage',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
addInfo: function(data) {
return request({
url: '/cyf/rawtype/save',
method: 'post',
data: data
});
},
fetchBySid: function(sid) {
return request({
url: '/cyf/rawtype/getTypeBySid/' + sid
})
},
updateData: function(data) {
return request({
url: '/cyf/rawtype/update',
method: 'post',
data: data
});
},
delBySids: function(sid) {
return request({
url: '/cyf/rawtype/delete/' + sid,
method: 'delete'
})
},
}

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

@ -40,6 +40,24 @@
userSid: '',
},
routes: [{
alwaysShow: true,
component: 'index',
meta: {
icon: "el-icon-menu",
title: "原料类型"
},
name: "/rawMaterialType/index",
path: "/rawMaterialType/index"
},{
alwaysShow: true,
component: 'index',
meta: {
icon: "el-icon-menu",
title: "原料信息"
},
name: "/rawMaterialInfo/index",
path: "/rawMaterialInfo/index"
},{
alwaysShow: true,
component: 'index',
meta: {
@ -54,7 +72,7 @@
component: 'index',
meta: {
icon: "el-icon-menu",
title: "油罐类型"
title: "油罐信息"
},
name: "/oilTank/index",
path: "/oilTank/index"
@ -74,10 +92,20 @@
component: 'index',
meta: {
icon: "el-icon-menu",
title: "出入库记录"
title: "原油出入库记录"
},
name: "/oilTypeInAndOutBound/index",
path: "/oilTypeInAndOutBound/index"
},
{
alwaysShow: true,
component: 'index',
meta: {
icon: "el-icon-menu",
title: "原料出入库记录"
},
name: "/inAndOutBound/index",
path: "/inAndOutBound/index"
name: "/rawMaterialInAndOutBound/index",
path: "/rawMaterialInAndOutBound/index"
},
// {
// alwaysShow: true,

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

@ -45,7 +45,33 @@ export const constantRoutes = [
affix: 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,
@ -68,7 +94,7 @@ export const constantRoutes = [
component: () => import('@/views/oilTank/index.vue'),
name: 'index',
meta: {
title: '油罐类型',
title: '油罐信息',
noCache: true
}
}]
@ -86,15 +112,28 @@ export const constantRoutes = [
}
}]
},{
path: 'inAndOutBound',
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: '/inAndOutBound',
redirect: '/rawMaterialInAndOutBound',
children: [{
path: '/inAndOutBound/index',
component: () => import('@/views/inAndOutBound/index.vue'),
path: '/rawMaterialInAndOutBound/index',
component: () => import('@/views/rawMaterialInAndOutBound/index.vue'),
name: 'index',
meta: {
title: '出入库记录',
title: '原料出入库记录',
noCache: true
}
}]

2
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/flowInstrument/flowInstrumentAdd.vue

@ -43,7 +43,7 @@
<script>
import req from '@/api/flowInstrument/flowInstrument'
import req2 from '@/api/inAndOutBound/inAndOutBound'
import req2 from '@/api/oilTypeInAndOutBound/oilTypeInAndOutBound'
export default {
data() {
return {

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

@ -35,10 +35,10 @@
</template>
</el-table-column>
<el-table-column label="流量仪器名称" prop="name" align="center" />
<el-table-column label="流量仪器编" prop="number" align="center" />
<el-table-column label="流量仪器编" prop="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-column label="原油编" prop="crudeNumber" align="center" />
</el-table>
</div>
<div class="pages">

2
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/oilTank/index.vue

@ -1,7 +1,7 @@
<template>
<div class="app-container">
<div v-show="viewState ==1">
<button-bar view-title="油罐类型" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<button-bar view-title="油罐信息" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>

2
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/oilType/index.vue

@ -35,7 +35,7 @@
</template>
</el-table-column>
<el-table-column label="原油名称" prop="name" align="center" />
<el-table-column label="原油编" prop="number" align="center" />
<el-table-column label="原油编" prop="number" align="center" />
<el-table-column label="原油Code" prop="code" align="center" />
</el-table>
</div>

23
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inAndOutBound/inBoundAdd.vue → yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/oilTypeInAndOutBound/inBoundAdd.vue

@ -20,11 +20,19 @@
<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"
@ -43,21 +51,14 @@
<!-- <span class="item_input">{{formobj.crudeNumber}}</span> -->
</div>
<div class="item">
<span class="item_text">净重</span>
<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>
<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.supplierSid" placeholder="" class="item_input" clearable />
</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-input v-model="formobj.remarks" placeholder="" class="item_input" clearable />
@ -70,7 +71,7 @@
</template>
<script>
import req from '@/api/inAndOutBound/inAndOutBound'
import req from '@/api/oilTypeInAndOutBound/oilTypeInAndOutBound'
export default {
data() {
return {

32
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inAndOutBound/index.vue → yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/oilTypeInAndOutBound/index.vue

@ -10,8 +10,8 @@
<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-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"
@ -32,15 +32,15 @@
<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="inventory" 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="supplierSid" label="供货商" width="150" align="center" />
<el-table-column prop="licensePlateNumber" 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">
@ -59,9 +59,9 @@
<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="inventory" 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="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">
@ -82,7 +82,7 @@
</template>
<script>
import req from '@/api/inAndOutBound/inAndOutBound'
import req from '@/api/oilTypeInAndOutBound/oilTypeInAndOutBound'
import Pagination from '@/components/pagination'
import {
parseTime
@ -177,9 +177,9 @@
dosearch() {
// if (this.index == "0") {
this.loadLogList()
this.loadLogList()
// } else if (this.index == "1") {
this.loadIn112List()
this.loadIn112List()
// }
},
@ -283,10 +283,10 @@
return pageindex
},
doAdd1() {
this.viewState = 2
this.viewState = 2
},
doAdd2() {
this.viewState = 3
this.viewState = 3
},

4
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inAndOutBound/outBoundAdd.vue → yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/oilTypeInAndOutBound/outBoundAdd.vue

@ -53,7 +53,7 @@
<el-input v-model="formobj.weight" placeholder="" class="item_input" clearable />
</div>
<div class="item">
<span class="item_text">价值</span>
<span class="item_text">原油价值</span>
<el-input v-model="formobj.value" placeholder="" class="item_input" clearable />
</div>
<div class="item">
@ -68,7 +68,7 @@
</template>
<script>
import req from '@/api/inAndOutBound/inAndOutBound'
import req from '@/api/oilTypeInAndOutBound/oilTypeInAndOutBound'
import req2 from '@/api/flowInstrument/flowInstrument'
export default {
data() {

229
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/rawMaterialInAndOutBound/inBoundAdd.vue

@ -0,0 +1,229 @@
<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
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/rawMaterialInAndOutBound/index.vue

@ -0,0 +1,348 @@
<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
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/rawMaterialInAndOutBound/outBoundAdd.vue

@ -0,0 +1,219 @@
<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
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/rawMaterialInfo/index.vue

@ -0,0 +1,262 @@
<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
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/rawMaterialInfo/rawMaterialInfoAdd.vue

@ -0,0 +1,190 @@
<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
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/rawMaterialType/index.vue

@ -0,0 +1,225 @@
<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
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/rawMaterialType/oilTypeInfo.vue

@ -0,0 +1,254 @@
<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
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/rawMaterialType/rawMaterialTypeAdd.vue

@ -0,0 +1,179 @@
<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>
Loading…
Cancel
Save