Commit b0547fec authored by 徐来柯's avatar 徐来柯

update

parent 62b1ec91
......@@ -297,12 +297,7 @@ export default {
$this.popShow = false
}
$this.deletetext = res.data.msg
var postData = {
argKeyWord: this.formData.argKeyWord,
argWhere: this.formData.argWhere,
Stime: $this.$refs.dateValue ? $this.$moment(this.dateValue[0]).format('YYYY-MM-DD HH:mm:ss') : '',
Etime: $this.$refs.dateValue ? $this.$moment(this.dateValue[1]).format('YYYY-MM-DD HH:mm:ss') : ''
}
var postData = $this.resetData()
$this.searchData(postData)
}).catch(function(err){
console.log('err',err)
......
This diff is collapsed.
<template>
<div class="box-container">
<div class="wrap">
<search-form :formList="[1]" />
<search-form :formList="[1]" :formData="formData" @searchData="searchData" />
<el-table
border
height="675"
......@@ -10,11 +10,11 @@
class="table-style"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column
>
<!-- <el-table-column
type="selection"
width="60">
</el-table-column>
</el-table-column> -->
<el-table-column
label="序号"
:show-overflow-tooltip="true"
......@@ -24,11 +24,11 @@
<el-table-column
label="线体编号"
:show-overflow-tooltip="true"
prop="SID"
prop="xtid"
>
</el-table-column>
<el-table-column
prop="ProductName"
prop="linname"
label="线体名称"
:show-overflow-tooltip="true"
>
......@@ -36,52 +36,36 @@
<el-table-column
label="产品编号"
:show-overflow-tooltip="true"
prop="ProductType"
prop="wlid"
>
</el-table-column>
<el-table-column
label="产品名称"
:show-overflow-tooltip="true"
prop="PlanType"
prop="wlname"
>
</el-table-column>
<el-table-column
label="产品描述"
:show-overflow-tooltip="true"
prop="PlanType"
prop="wlDesc"
>
</el-table-column>
<el-table-column
label="单位"
:show-overflow-tooltip="true"
prop="LineName"
prop="Company"
>
</el-table-column>
<el-table-column
label="库存数量"
:show-overflow-tooltip="true"
prop="UserName"
prop="MHNuber"
>
</el-table-column>
</el-table>
<!-- <div class="page_bottom" >
<div class="bottom_text">
<span>{{totalCount}}条记录 当前第{{pageIndex}}页 共{{totalPage}}页 每页{{pageSize}}条记录</span>
</div>
<div class="bottom_btns">
<div class="bottom_firest" @click="first">首页</div>
<div ref="last" :class="num <= 1 ? 'bottom_disabled' : 'bottom_next'" @click="last" >上一页</div>
<div ref="next" :class="num === totalPage || num <= 0 ? 'bottom_disabled' : 'bottom_next'" @click="next" >下一页</div>
<div class="bottom_end" @click="end" > 末页</div>
<span></span>
<input v-model="num" class="text" @input="handleBlur" type="text"/>
<span></span>
<div @click="jump" class="bottom_jump">跳转</div>
</div>
</div> -->
<Pagination @pageFun="pageFun" />
<Pagination ref="page" :totalCount="totalCount" :totalPage="totalPage" @pageFun="pageFun" />
</div>
<delete-pop ref="delete" :deletetext="deletetext" :type="typeV" v-if="deleteShow"></delete-pop>
......@@ -103,20 +87,68 @@ export default {
deletetext: '',
deleteShow: false,
typeV: '',
cloneData: [],
formData: {
argKeyWord: '',
argWhere: '',
},
// 分页数据
totalCount: 0,
// pageIndex: 1,
totalPage: 1
}
},
created() {
this.searchData()
},
methods: {
handleSelectionChange (val) {
this.checkList = val
searchData () {
var $this = this
var postData = this.resetData()
this.$axios({
method:"post",
url:`/api/PHouseshow/PHouseshow_Query?argKeyWord=${postData.argKeyWord}&argWhere=${postData.argWhere}`,
}).then((res)=>{
if(res.data.data.length != 0 ){
this.AllTableData = res.data.data.map(item => ({
...item,
UpdateTime: this.$moment(item.UpdateTime).format('YYYY-MM-DD HH:mm:ss')
}))
// 克隆一份tableData数据
this.cloneData= JSON.parse(JSON.stringify(this.AllTableData))
if(this.AllTableData.length > this.$refs.page.pageSize){
this.tableData = this.AllTableData.slice(0, this.$refs.page.pageSize)
}else{
this.tableData = this.AllTableData
}
this.totalCount = this.AllTableData.length
// this.pageIndex = 1
this.totalPage = Math.ceil(this.AllTableData.length / this.$refs.page.pageSize)
}else{
this.tableData = []
this.totalCount = 0
// this.pageIndex = 1
this.totalPage = 1
}
this.pageFun(1)
}).catch(function(err){
console.log('err',err)
})
},
resetData () {
return {
argKeyWord: this.formData.argKeyWord,
argWhere: this.formData.argWhere,
}
},
// 分页方法
pageFun(num){
if(num == 1){
this.tableData = this.AllTableData.slice(0,50)
this.tableData = this.cloneData.slice(0, this.$refs.page.pageSize)
}else{
this.tableData = this.AllTableData.slice((num-1)*this.pageSize + 1,this.pageSize*num)
this.tableData = this.cloneData.slice((num-1)*this.$refs.page.pageSize,this.$refs.page.pageSize*num)
}
}
},
}
}
</script>
\ No newline at end of file
This diff is collapsed.
......@@ -85,10 +85,6 @@ export default {
},
data () {
return {
// selectValue: '',
// inputValue: '',
// scanValue: '',
// dateValue: [moment().format('YYYY-MM-DD 00:00:00'), moment().format('YYYY-MM-DD 23:59:59')],
searchList: [
{
id: '不限',
......@@ -125,9 +121,6 @@ export default {
]
}
},
created () {
// this.queryProduct
},
methods: {
searchData () {
this.$emit('searchData')
......
......@@ -20,7 +20,7 @@
</el-select>
</div>
</div>
<div class="centen_row" style="margin-top:10px">
<div class="centen_row" v-if="titleType === 'mater'" style="margin-top:10px">
<span class="centen_row_text" >物料编号:</span>
<div class="centen_row_select">
<el-select v-model="MID" placeholder="请选择">
......@@ -33,6 +33,20 @@
</el-select>
</div>
</div>
<div class="centen_row" v-if="titleType === 'pro'" style="margin-top:10px">
<span class="centen_row_text" >产品编号:</span>
<div class="centen_row_select">
<el-select v-model="PID" placeholder="请选择">
<el-option
v-for="item in proList"
:key="item.Name"
:label="item.Name"
:value="item.ID">
</el-option>
</el-select>
</div>
</div>
<div class="centen_row" style="margin-top:10px">
<span class="centen_row_text" v-if="type === 'in'" >入库数量:</span>
......@@ -55,6 +69,10 @@
<script>
export default {
props: {
titleType: {
type: String,
default: 'mater' //mater 物料 pro 产品
},
titleText: {
type: String,
default: ''
......@@ -68,9 +86,11 @@ export default {
return {
MID: '',
LID: '',
PID: '',
quantity : '',
lineList: [],
materList: []
materList: [],
proList: []
}
},
directives: {
......@@ -99,6 +119,7 @@ export default {
created () {
this.getLines()
this.getMaters()
this.getPros()
},
methods:{
// guid() {
......@@ -121,10 +142,14 @@ export default {
}
},
conserve () {
var postData = {
var postData = this.titleType === 'mater' ? {
MID: this.MID,
LID: this.LID,
Quantity : this.quantity,
} : {
LID: this.LID,
PID: this.PID,
Quantity : this.quantity,
}
this.$emit('conserve', postData)
},
......@@ -143,7 +168,15 @@ export default {
}).then((res)=>{
this.materList = res.data.data
})
}
},
getPros () {
this.$axios({
method:"post",
url:`/api/ProductDelivery/ProductDelivery_Data`,
}).then((res)=>{
this.proList = res.data.data
})
},
}
}
</script>
......
<template>
<div class="box-container">
<div class="wrap">
<search-form :formList="[1]" />
<search-form :formList="[1]" :formData="formData" @searchData="searchData" />
<el-table
border
height="675"
......@@ -9,12 +9,11 @@
:data="tableData"
class="table-style"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column
style="width: 100%">
<!-- <el-table-column
type="selection"
width="60">
</el-table-column>
</el-table-column> -->
<el-table-column
label="序号"
:show-overflow-tooltip="true"
......@@ -24,11 +23,11 @@
<el-table-column
label="线体编号"
:show-overflow-tooltip="true"
prop="SID"
prop="xtid"
>
</el-table-column>
<el-table-column
prop="ProductName"
prop="linname"
label="线体名称"
:show-overflow-tooltip="true"
>
......@@ -36,52 +35,36 @@
<el-table-column
label="物料编号"
:show-overflow-tooltip="true"
prop="ProductType"
prop="wlid"
>
</el-table-column>
<el-table-column
label="物料名称"
:show-overflow-tooltip="true"
prop="PlanType"
prop="wlname"
>
</el-table-column>
<el-table-column
label="物料描述"
:show-overflow-tooltip="true"
prop="PlanType"
prop="wlDesc"
>
</el-table-column>
<el-table-column
label="单位"
:show-overflow-tooltip="true"
prop="LineName"
prop="Company"
>
</el-table-column>
<el-table-column
label="库存数量"
:show-overflow-tooltip="true"
prop="UserName"
prop="MHNuber"
>
</el-table-column>
</el-table>
<!-- <div class="page_bottom" >
<div class="bottom_text">
<span>{{totalCount}}条记录 当前第{{pageIndex}}页 共{{totalPage}}页 每页{{pageSize}}条记录</span>
</div>
<div class="bottom_btns">
<div class="bottom_firest" @click="first">首页</div>
<div ref="last" :class="num <= 1 ? 'bottom_disabled' : 'bottom_next'" @click="last" >上一页</div>
<div ref="next" :class="num === totalPage || num <= 0 ? 'bottom_disabled' : 'bottom_next'" @click="next" >下一页</div>
<div class="bottom_end" @click="end" > 末页</div>
<span></span>
<input v-model="num" class="text" @input="handleBlur" type="text"/>
<span></span>
<div @click="jump" class="bottom_jump">跳转</div>
</div>
</div> -->
<Pagination @pageFun="pageFun" />
<Pagination ref="page" :totalCount="totalCount" :totalPage="totalPage" @pageFun="pageFun" />
</div>
<delete-pop ref="delete" :deletetext="deletetext" :type="typeV" v-if="deleteShow"></delete-pop>
......@@ -98,23 +81,71 @@ export default {
data () {
return {
tableData: [],
cloneData: [],
AllTableData: [],
checkList: [],
deletetext: '',
deleteShow: false,
typeV: '',
formData: {
argKeyWord: '',
argWhere: '',
},
// 分页数据
totalCount: 0,
// pageIndex: 1,
totalPage: 1
}
},
created() {
this.searchData()
},
methods: {
handleSelectionChange (val) {
this.checkList = val
searchData () {
var $this = this
var postData = this.resetData()
this.$axios({
method:"post",
url:`/api/Materialinventory/Materialinventory_Query?argKeyWord=${postData.argKeyWord}&argWhere=${postData.argWhere}`,
}).then((res)=>{
if(res.data.data.length != 0 ){
this.AllTableData = res.data.data.map(item => ({
...item,
UpdateTime: this.$moment(item.UpdateTime).format('YYYY-MM-DD HH:mm:ss')
}))
// 克隆一份tableData数据
this.cloneData= JSON.parse(JSON.stringify(this.AllTableData))
if(this.AllTableData.length > this.$refs.page.pageSize){
this.tableData = this.AllTableData.slice(0, this.$refs.page.pageSize)
}else{
this.tableData = this.AllTableData
}
this.totalCount = this.AllTableData.length
// this.pageIndex = 1
this.totalPage = Math.ceil(this.AllTableData.length / this.$refs.page.pageSize)
}else{
this.tableData = []
this.totalCount = 0
// this.pageIndex = 1
this.totalPage = 1
}
this.pageFun(1)
}).catch(function(err){
console.log('err',err)
})
},
resetData () {
return {
argKeyWord: this.formData.argKeyWord,
argWhere: this.formData.argWhere
}
},
// 分页方法
pageFun(num){
if(num == 1){
this.tableData = this.AllTableData.slice(0,50)
this.tableData = this.cloneData.slice(0, this.$refs.page.pageSize)
}else{
this.tableData = this.AllTableData.slice((num-1)*this.pageSize + 1,this.pageSize*num)
this.tableData = this.cloneData.slice((num-1)*this.$refs.page.pageSize,this.$refs.page.pageSize*num)
}
},
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment