
13 changed files with 598 additions and 51 deletions
@ -0,0 +1,49 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
let tokens = window.sessionStorage.getItem('tokenValue') |
|||
export default { |
|||
|
|||
// 查询分页列表
|
|||
listPage: function(params) { |
|||
return request({ |
|||
url: '/cyf/supplier/listPage', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json', |
|||
'token': tokens |
|||
} |
|||
}) |
|||
}, |
|||
// 增加成品库存
|
|||
save: function(params) { |
|||
return request({ |
|||
url: '/cyf/invenRecord/save', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json', |
|||
'token': tokens |
|||
} |
|||
}) |
|||
}, |
|||
// 查询产品
|
|||
selectList: function(data) { |
|||
return request({ |
|||
url: '/cyf/productInfo/selectList', |
|||
method: 'get', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json', |
|||
'token': tokens |
|||
} |
|||
}) |
|||
}, |
|||
addInfo: function(data) { |
|||
return request({ |
|||
url: '/cyf/supplier/save', |
|||
method: 'post', |
|||
data: data |
|||
}); |
|||
}, |
|||
} |
@ -1,51 +1,50 @@ |
|||
<template> |
|||
<div class="imgDemo"> |
|||
<!--<el-button type="primary" @click="getToken()">token</el-button> |
|||
<!--<el-button type="primary" @click="getToken()">token</el-button> |
|||
<div style="width: 200px;">{{token}}</div>--> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import {login1} from '@/api/system/user/login.js' |
|||
export default { |
|||
name: '', |
|||
data() { |
|||
return { |
|||
token1:'', |
|||
token2:'' |
|||
} |
|||
|
|||
}, |
|||
created() { |
|||
this.token1 = window.sessionStorage.getItem('tokenName'); |
|||
this.token2 = window.sessionStorage.getItem('tokenValue'); |
|||
console.log("tokenName2222", this.token1) |
|||
console.log("tokenValue222222", this.token2) |
|||
}, |
|||
methods:{ |
|||
// getToken(){ |
|||
// let params = { |
|||
// password: "329653", |
|||
// roleSid: "", |
|||
// token: "", |
|||
// userName: "15097329653", |
|||
// verifyCode: "" |
|||
// } |
|||
// login1(params).then(res => { |
|||
// this.token = res.data.token |
|||
// window.sessionStorage.setItem('token', res.data.token) |
|||
// }) |
|||
// } |
|||
} |
|||
} |
|||
import { login1 } from "@/api/system/user/login.js"; |
|||
export default { |
|||
name: "", |
|||
data() { |
|||
return { |
|||
token1: "", |
|||
token2: "", |
|||
}; |
|||
}, |
|||
created() { |
|||
this.token1 = window.sessionStorage.getItem("tokenName"); |
|||
this.token2 = window.sessionStorage.getItem("tokenValue"); |
|||
console.log("tokenName2222", this.token1); |
|||
console.log("tokenValue222222", this.token2); |
|||
}, |
|||
methods: { |
|||
// getToken(){ |
|||
// let params = { |
|||
// password: "329653", |
|||
// roleSid: "", |
|||
// token: "", |
|||
// userName: "15097329653", |
|||
// verifyCode: "" |
|||
// } |
|||
// login1(params).then(res => { |
|||
// this.token = res.data.token |
|||
// window.sessionStorage.setItem('token', res.data.token) |
|||
// }) |
|||
// } |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.imgDemo { |
|||
width: 100%; |
|||
height: 100%; |
|||
background: radial-gradient(#fff,#f5f7f4, #fff); |
|||
} |
|||
canvas { |
|||
} |
|||
.imgDemo { |
|||
width: 100%; |
|||
height: 100%; |
|||
background: radial-gradient(#fff, #f5f7f4, #fff); |
|||
} |
|||
canvas { |
|||
} |
|||
</style> |
|||
|
@ -0,0 +1,287 @@ |
|||
<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.recordDate" |
|||
: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="name" |
|||
label="品牌名称" |
|||
align="center" |
|||
/> |
|||
<el-table-column |
|||
prop="number" |
|||
label="品牌编码" |
|||
align="center" |
|||
/> |
|||
<el-table-column |
|||
prop="inventoryQuantity" |
|||
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> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from "@/api/baseInfo/becomeoil/index.js"; |
|||
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, |
|||
btnList: [ |
|||
{ |
|||
type: "info", |
|||
size: "small", |
|||
icon: "cross", |
|||
btnKey: "doClose", |
|||
btnLabel: "关闭", |
|||
}, |
|||
], |
|||
logList: [], |
|||
form: {}, |
|||
SrcList:{}, |
|||
logListQuery: { |
|||
current: 1, |
|||
size: 10, |
|||
}, |
|||
logListTotal: 1, |
|||
|
|||
jmdListQuery: { |
|||
recordDate: "", |
|||
number: "", |
|||
}, |
|||
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 = { |
|||
recordDate: "", |
|||
number: "", |
|||
}; |
|||
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.listPage({ |
|||
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; |
|||
}, |
|||
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> |
|||
|
@ -0,0 +1,162 @@ |
|||
<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.inventoryQuantity" placeholder="" class="item_input"/> |
|||
</div> |
|||
<div class="item"> |
|||
<span class="item_text">商品名称:</span> |
|||
<el-select v-model="formobj.prodSid" filterable placeholder="请选择商品名称" class="item_input"> |
|||
<el-option v-for="item in packagList" :key="item.sid" :label="item.name" :value="item.sid" /> |
|||
</el-select> |
|||
</div> |
|||
</el-card> |
|||
|
|||
</div> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/supervise/becomeOil/index.js' |
|||
import upload from '@/components/uploadFile/upload_yanchejianchaTuBiao' |
|||
export default { |
|||
components: { |
|||
upload |
|||
}, |
|||
data() { |
|||
return { |
|||
submitdisabled: false, |
|||
typeLists: [], |
|||
typeList: [], |
|||
packagList: [], |
|||
imgList: [], |
|||
formobj: { |
|||
inventoryQuantity: "", |
|||
prodSid: "" |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
this.last() |
|||
}, |
|||
methods: { |
|||
last(){ |
|||
req.selectList().then((response) => { |
|||
if (response.success) { |
|||
this.packagList = response.data |
|||
} else { |
|||
this.packagList = [] |
|||
} |
|||
}) |
|||
}, |
|||
saveOrUpdate() { |
|||
req.save(this.formobj) |
|||
.then(resp => { |
|||
if (resp.success) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: resp.msg |
|||
}) |
|||
this.formobj = { |
|||
inventoryQuantity: "", |
|||
prodSid: "" |
|||
|
|||
} |
|||
this.imgList = [] |
|||
} else { |
|||
// 根据resp.code进行异常情况处理 |
|||
} |
|||
}) |
|||
.catch(() => {}) |
|||
|
|||
}, |
|||
handleReturn() { |
|||
this.$store.dispatch('tagsView/delView', this.$route) |
|||
this.$router.go(-1) |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
<style lang="scss"> |
|||
.box-card { |
|||
margin-left: 60px; |
|||
margin-right: 60px; |
|||
min-width: 70%; |
|||
margin-top: 20px; |
|||
padding-bottom: 50px; |
|||
|
|||
.item { |
|||
display: flex; |
|||
flex-direction: row; |
|||
align-items: center; |
|||
margin-top: 15px; |
|||
height: 40px; |
|||
line-height: 40px; |
|||
|
|||
.item_text { |
|||
flex: 0.8; |
|||
font-size: 18px; |
|||
text-align: right; |
|||
} |
|||
|
|||
.item_input { |
|||
flex: 4; |
|||
font-size: 16px; |
|||
margin-left: 10px; |
|||
margin-right: 80px; |
|||
} |
|||
|
|||
.item_left_input { |
|||
width: 20%; |
|||
} |
|||
|
|||
.item_left_text { |
|||
height: 30px; |
|||
margin-left: 20px; |
|||
line-height: 30px; |
|||
color: #018AD2; |
|||
padding: 0px 15px; |
|||
border: 1.5px solid #018AD2; |
|||
border-radius: 5px; |
|||
|
|||
} |
|||
|
|||
.item_right { |
|||
flex: 1; |
|||
justify-items: center; |
|||
|
|||
.item_right_list_text { |
|||
font-size: 16px; |
|||
} |
|||
|
|||
.item_right_list_delect { |
|||
color: #5E94FF; |
|||
margin-left: 20px; |
|||
font-size: 16px; |
|||
text-decoration: underline; |
|||
} |
|||
} |
|||
|
|||
} |
|||
|
|||
} |
|||
</style> |
|||
|
Loading…
Reference in new issue