Browse Source

5.24

master
fengdong777 2 years ago
parent
commit
3069de6529
  1. 4
      yxt-supervise-cyf/yxt-supervise-cyf-ui/.env.development
  2. 41
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/api/baseInfo/commodityBrand/index.js
  3. 10
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/layout/components/Sidebar/index.vue
  4. 9
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/router/index.js
  5. 143
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/commodityBrand/commodity.vue
  6. 248
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/commodityBrand/index.vue
  7. 12
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/oilTankList/index.vue
  8. 12
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/oilTypeInBoundList/index.vue
  9. 10
      yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/oilTypeOutBoundList/index.vue

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

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

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

@ -0,0 +1,41 @@
import request from '@/utils/request'
let tokens = window.sessionStorage.getItem('tokenValue')
export default {
// 新增商品品牌
save: function(params) {
return request({
url: '/cyf/productInfo/save',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json',
'token': tokens
}
})
},
// 查询列表
listPage: function(params) {
return request({
url: '/cyf/productInfo/listPage',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json',
'token': tokens
}
})
},
// 修改
update: function(params) {
return request({
url: '/cyf/productInfo/update',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json',
'token': tokens
}
})
},
}

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

@ -277,6 +277,16 @@ export default {
name: "/baseInfo/supplier", name: "/baseInfo/supplier",
path: "/baseInfo/supplier", path: "/baseInfo/supplier",
}, },
{
alwaysShow: true,
component: "index",
meta: {
icon: "el-icon-help",
title: "商品品牌",
},
name: "/baseInfo/commodityBrand",
path: "/baseInfo/commodityBrand",
},
], ],
}, },
// { // {

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

@ -122,6 +122,15 @@ export const constantRoutes = [{
title: '供应商信息' title: '供应商信息'
} }
}, },
{
path: '/baseInfo/commodityBrand',
component: () =>
import('@/views/baseInfo/commodityBrand/index.vue'),
name: 'index',
meta: {
title: '商品品牌'
}
},
] ]
}, { }, {
path: '/supervise', path: '/supervise',

143
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/baseInfo/commodityBrand/commodity.vue

@ -0,0 +1,143 @@
<template>
<div>
<div class="tab-header webtop">
<!-- 标题 -->
<div>商品品牌</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="listconadd">
<el-card class="box-card">
<div class="item">
<span class="item_text">类型名称:</span>
<el-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>
</el-card>
</div>
</div>
</template>
<script>
import req from '@/api/baseInfo/commodityBrand/index.js'
export default {
data() {
return {
submitdisabled: false,
crudeLists: [],
crudeList: [],
flowmeterLists: [],
flowmeterList: [],
formobj: {
name: "",
number: "",
}
}
},
created() {
},
methods: {
saveOrUpdate() {
req.save(this.formobj)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn("true")
} else {
// resp.code
}
})
.catch(() => {})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
name: "",
number: "",
}
this.$emit('doback')
},
}
}
</script>
<style lang="scss">
.box-card {
margin-left: 60px;
margin-right: 60px;
min-width: 70%;
margin-top: 20px;
.item {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 15px;
height: 40px;
line-height: 40px;
.item_text {
flex: 0.8;
font-size: 18px;
text-align: right;
}
.item_input {
flex: 4;
font-size: 16px;
margin-left: 10px;
margin-right: 80px;
}
.item_left_input {
width: 20%;
}
.item_left_text {
height: 30px;
margin-left: 20px;
line-height: 30px;
color: #018AD2;
padding: 0px 15px;
border: 1.5px solid #018AD2;
border-radius: 5px;
}
.item_right {
flex: 1;
justify-items: center;
.item_right_list_text {
font-size: 16px;
}
.item_right_list_delect {
color: #5E94FF;
margin-left: 20px;
font-size: 16px;
text-decoration: underline;
}
}
}
}
</style>

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

@ -0,0 +1,248 @@
<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="操作" align="center" width="150px">
<template slot-scope="scope">
<el-button
type="primary"
size="mini"
@click="purchase(scope.row)"
>
编辑
</el-button>
</template>
</el-table-column>
<el-table-column label="类型名称" prop="name" align="center" />
<el-table-column label="类型编号" prop="number" align="center" />
</el-table>
</div>
<div class="pages">
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
</div>
</div>
</div>
<oilTankAdd v-show="viewState ==2 || viewState ==3" ref="divAdd" @doback="resetState" @reloadlist="getList" />
<!-- <oilTypeInfo v-show="viewState ==4" ref="divInfo" @doback="resetState" @reloadlist="getList" /> -->
<el-dialog title="修改产品类型" :visible.sync="editDialog" width="40%">
<table class="e-table" cellspacing="0">
<tr>
<td>类型名称</td>
<td>
<el-input v-model="form.name" style="width: 300px"></el-input>
</td>
</tr>
<tr>
<td>类型编号</td>
<td>
<el-input v-model="form.number" style="width: 300px"></el-input>
</td>
</tr>
</table>
<div style="margin-top: 20px; text-align: center">
<el-button type="primary" @click="save()">保存</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import req from '@/api/baseInfo/commodityBrand/index.js'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import oilTankAdd from './commodity.vue'
// import oilTypeInfo from './oilTypeInfo.vue'
export default {
name: 'CustomerManagement',
components: {
Pagination,
pageye,
ButtonBar,
oilTankAdd,
// oilTypeInfo,
},
data() {
return {
listLoading: false,
btndisabled: false,
editDialog: false,
form: {
name:'',
number:'',
sid:''
},
btnList: [{
type: 'primary',
size: 'small',
icon: 'plus',
btnKey: 'toAdd',
btnLabel: '新增'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
list: [],
listQuery: {
current: 1,
size: 10,
params: {
name:''
},
total: 0
},
viewState: 1
}
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
created() {
this.init()
//
},
methods: {
btnHandle(btnKey) {
switch (btnKey) {
case 'toAdd':
this.toAdd()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
//
init() {
this.getList()
},
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
this.listLoading = true
req.listPage(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = []
this.listQuery.total = 0
}
})
},
//
handleReset() {
this.listQuery.current = 1
this.getList()
},
//
handleFilter() {
this.listQuery = {
current: 1,
size: 10,
total: 0,
params: {
name:''
}
}
this.getList()
},
//
toAdd() {
this.viewState = 2
},
purchase(row) {
this.editDialog = true;
this.form = Object.assign({}, row);
this.form.sid = row.sid
},
save() {
req.update(this.form)
.then(resp => {
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.editDialog = false;
this.getList()
} else {
// resp.code
}
})
.catch(() => {})
this.reset();
},
reset() {
this.form = {};
},
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
</style>

12
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/oilTankList/index.vue

@ -128,12 +128,12 @@
<el-form-item label="库存高度:"> <el-form-item label="库存高度:">
<span>{{ form.height }}</span> <span>{{ form.height }}</span>
</el-form-item> </el-form-item>
<el-form-item label="描述:" prop="url"> <el-form-item label="描述:" prop="url" >
<el-popover placement="left" trigger="hover"> <el-popover placement="left" trigger="hover" :key="i" v-for="(item,i) in SrcList" style="margin-left: 20px;">
<img :src="form.url" style="width: 500px; height: 500px" /> <img :src="item.url" style="width: 500px; height: 500px" />
<img <img
slot="reference" slot="reference"
:src="form.url" :src="item.url"
style="width: 150px; height: 150px" style="width: 150px; height: 150px"
/> />
</el-popover> </el-popover>
@ -198,6 +198,7 @@ export default {
], ],
logList: [], logList: [],
form: {}, form: {},
SrcList:{},
logListQuery: { logListQuery: {
current: 1, current: 1,
size: 10, size: 10,
@ -304,7 +305,8 @@ export default {
this.dialogTitle = "数据"; this.dialogTitle = "数据";
this.editDialog = true; this.editDialog = true;
req.selectRecordBySid(row.sid).then((res) => { req.selectRecordBySid(row.sid).then((res) => {
this.form = res.data; this.form=res.data[0]
this.SrcList=res.data
}); });
}, },
resetState() { resetState() {

12
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/oilTypeInBoundList/index.vue

@ -133,10 +133,10 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-form-item label="描述:" > <el-form-item label="描述:" >
<el-popover placement="left" trigger="hover"> <el-popover placement="left" trigger="hover" :key="i" v-for="(item,i) in SrcList" style="margin-left: 20px;">
<img :src="form.url" style="width: 600px;height: 600px"> <img :src="item.url" style="width: 600px;height: 600px">
<img slot="reference" :src="form.url" style="width: 200px;height: 200px"> <img slot="reference" :src="item.url" style="width: 200px;height: 200px">
</el-popover> </el-popover>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -171,6 +171,7 @@
dialogTitle:'', dialogTitle:'',
editDialog:false, editDialog:false,
form:{}, form:{},
SrcList:{},
btnList: [ // btnList: [ //
// { // {
// type: 'success', // type: 'success',
@ -285,7 +286,8 @@
this.dialogTitle = "数据"; this.dialogTitle = "数据";
this.editDialog = true; this.editDialog = true;
req.selectStorageBySid(row.sid).then((res)=>{ req.selectStorageBySid(row.sid).then((res)=>{
this.form=res.data this.form=res.data[0]
this.SrcList=res.data
}) })
}, },
handleOrder(tab, event) { handleOrder(tab, event) {

10
yxt-supervise-cyf/yxt-supervise-cyf-ui/src/views/inventory/oilTypeOutBoundList/index.vue

@ -124,9 +124,9 @@
</el-col> </el-col>
</el-row> </el-row>
<el-form-item label="描述:"> <el-form-item label="描述:">
<el-popover placement="left" trigger="hover"> <el-popover placement="left" trigger="hover" :key="i" v-for="(item,i) in SrcList" style="margin-left: 20px;">
<img :src="form.url" style="width: 500px;height: 500px"> <img :src="item.url" style="width: 500px;height: 500px">
<img slot="reference" :src="form.url" style="width: 150px;height: 150px"> <img slot="reference" :src="item.url" style="width: 150px;height: 150px">
</el-popover> </el-popover>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -159,6 +159,7 @@
dialogTitle:'', dialogTitle:'',
editDialog:false, editDialog:false,
form:{}, form:{},
SrcList:{},
btnList: [ // btnList: [ //
// { // {
// type: 'success', // type: 'success',
@ -244,7 +245,8 @@
this.dialogTitle = "数据"; this.dialogTitle = "数据";
this.editDialog = true; this.editDialog = true;
req.getCrudeBySid(row.sid).then((res)=>{ req.getCrudeBySid(row.sid).then((res)=>{
this.form=res.data this.form=res.data[0]
this.SrcList=res.data
}) })
}, },
resetQuery() { resetQuery() {

Loading…
Cancel
Save