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

update

parent 62b1ec91
...@@ -297,12 +297,7 @@ export default { ...@@ -297,12 +297,7 @@ export default {
$this.popShow = false $this.popShow = false
} }
$this.deletetext = res.data.msg $this.deletetext = res.data.msg
var postData = { var postData = $this.resetData()
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') : ''
}
$this.searchData(postData) $this.searchData(postData)
}).catch(function(err){ }).catch(function(err){
console.log('err',err) console.log('err',err)
......
This diff is collapsed.
<template> <template>
<div class="box-container"> <div class="box-container">
<div class="wrap"> <div class="wrap">
<search-form :formList="[1]" /> <search-form :formList="[1]" :formData="formData" @searchData="searchData" />
<el-table <el-table
border border
height="675" height="675"
...@@ -10,11 +10,11 @@ ...@@ -10,11 +10,11 @@
class="table-style" class="table-style"
tooltip-effect="dark" tooltip-effect="dark"
style="width: 100%" style="width: 100%"
@selection-change="handleSelectionChange"> >
<el-table-column <!-- <el-table-column
type="selection" type="selection"
width="60"> width="60">
</el-table-column> </el-table-column> -->
<el-table-column <el-table-column
label="序号" label="序号"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
...@@ -24,11 +24,11 @@ ...@@ -24,11 +24,11 @@
<el-table-column <el-table-column
label="线体编号" label="线体编号"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
prop="SID" prop="xtid"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="ProductName" prop="linname"
label="线体名称" label="线体名称"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
> >
...@@ -36,52 +36,36 @@ ...@@ -36,52 +36,36 @@
<el-table-column <el-table-column
label="产品编号" label="产品编号"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
prop="ProductType" prop="wlid"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="产品名称" label="产品名称"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
prop="PlanType" prop="wlname"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="产品描述" label="产品描述"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
prop="PlanType" prop="wlDesc"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="单位" label="单位"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
prop="LineName" prop="Company"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="库存数量" label="库存数量"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
prop="UserName" prop="MHNuber"
> >
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- <div class="page_bottom" > <Pagination ref="page" :totalCount="totalCount" :totalPage="totalPage" @pageFun="pageFun" />
<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" />
</div> </div>
<delete-pop ref="delete" :deletetext="deletetext" :type="typeV" v-if="deleteShow"></delete-pop> <delete-pop ref="delete" :deletetext="deletetext" :type="typeV" v-if="deleteShow"></delete-pop>
...@@ -103,20 +87,68 @@ export default { ...@@ -103,20 +87,68 @@ export default {
deletetext: '', deletetext: '',
deleteShow: false, deleteShow: false,
typeV: '', typeV: '',
cloneData: [],
formData: {
argKeyWord: '',
argWhere: '',
},
// 分页数据
totalCount: 0,
// pageIndex: 1,
totalPage: 1
} }
}, },
created() {
this.searchData()
},
methods: { methods: {
handleSelectionChange (val) { searchData () {
this.checkList = val 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){ pageFun(num){
if(num == 1){ if(num == 1){
this.tableData = this.AllTableData.slice(0,50) this.tableData = this.cloneData.slice(0, this.$refs.page.pageSize)
}else{ }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> </script>
\ No newline at end of file
This diff is collapsed.
...@@ -85,10 +85,6 @@ export default { ...@@ -85,10 +85,6 @@ export default {
}, },
data () { data () {
return { return {
// selectValue: '',
// inputValue: '',
// scanValue: '',
// dateValue: [moment().format('YYYY-MM-DD 00:00:00'), moment().format('YYYY-MM-DD 23:59:59')],
searchList: [ searchList: [
{ {
id: '不限', id: '不限',
...@@ -125,9 +121,6 @@ export default { ...@@ -125,9 +121,6 @@ export default {
] ]
} }
}, },
created () {
// this.queryProduct
},
methods: { methods: {
searchData () { searchData () {
this.$emit('searchData') this.$emit('searchData')
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</el-select> </el-select>
</div> </div>
</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> <span class="centen_row_text" >物料编号:</span>
<div class="centen_row_select"> <div class="centen_row_select">
<el-select v-model="MID" placeholder="请选择"> <el-select v-model="MID" placeholder="请选择">
...@@ -33,6 +33,20 @@ ...@@ -33,6 +33,20 @@
</el-select> </el-select>
</div> </div>
</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"> <div class="centen_row" style="margin-top:10px">
<span class="centen_row_text" v-if="type === 'in'" >入库数量:</span> <span class="centen_row_text" v-if="type === 'in'" >入库数量:</span>
...@@ -55,6 +69,10 @@ ...@@ -55,6 +69,10 @@
<script> <script>
export default { export default {
props: { props: {
titleType: {
type: String,
default: 'mater' //mater 物料 pro 产品
},
titleText: { titleText: {
type: String, type: String,
default: '' default: ''
...@@ -68,9 +86,11 @@ export default { ...@@ -68,9 +86,11 @@ export default {
return { return {
MID: '', MID: '',
LID: '', LID: '',
PID: '',
quantity : '', quantity : '',
lineList: [], lineList: [],
materList: [] materList: [],
proList: []
} }
}, },
directives: { directives: {
...@@ -99,6 +119,7 @@ export default { ...@@ -99,6 +119,7 @@ export default {
created () { created () {
this.getLines() this.getLines()
this.getMaters() this.getMaters()
this.getPros()
}, },
methods:{ methods:{
// guid() { // guid() {
...@@ -121,10 +142,14 @@ export default { ...@@ -121,10 +142,14 @@ export default {
} }
}, },
conserve () { conserve () {
var postData = { var postData = this.titleType === 'mater' ? {
MID: this.MID, MID: this.MID,
LID: this.LID, LID: this.LID,
Quantity : this.quantity, Quantity : this.quantity,
} : {
LID: this.LID,
PID: this.PID,
Quantity : this.quantity,
} }
this.$emit('conserve', postData) this.$emit('conserve', postData)
}, },
...@@ -143,7 +168,15 @@ export default { ...@@ -143,7 +168,15 @@ export default {
}).then((res)=>{ }).then((res)=>{
this.materList = res.data.data this.materList = res.data.data
}) })
} },
getPros () {
this.$axios({
method:"post",
url:`/api/ProductDelivery/ProductDelivery_Data`,
}).then((res)=>{
this.proList = res.data.data
})
},
} }
} }
</script> </script>
......
<template> <template>
<div class="box-container"> <div class="box-container">
<div class="wrap"> <div class="wrap">
<search-form :formList="[1]" /> <search-form :formList="[1]" :formData="formData" @searchData="searchData" />
<el-table <el-table
border border
height="675" height="675"
...@@ -9,12 +9,11 @@ ...@@ -9,12 +9,11 @@
:data="tableData" :data="tableData"
class="table-style" class="table-style"
tooltip-effect="dark" tooltip-effect="dark"
style="width: 100%" style="width: 100%">
@selection-change="handleSelectionChange"> <!-- <el-table-column
<el-table-column
type="selection" type="selection"
width="60"> width="60">
</el-table-column> </el-table-column> -->
<el-table-column <el-table-column
label="序号" label="序号"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
...@@ -24,11 +23,11 @@ ...@@ -24,11 +23,11 @@
<el-table-column <el-table-column
label="线体编号" label="线体编号"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
prop="SID" prop="xtid"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="ProductName" prop="linname"
label="线体名称" label="线体名称"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
> >
...@@ -36,52 +35,36 @@ ...@@ -36,52 +35,36 @@
<el-table-column <el-table-column
label="物料编号" label="物料编号"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
prop="ProductType" prop="wlid"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="物料名称" label="物料名称"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
prop="PlanType" prop="wlname"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="物料描述" label="物料描述"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
prop="PlanType" prop="wlDesc"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="单位" label="单位"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
prop="LineName" prop="Company"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="库存数量" label="库存数量"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
prop="UserName" prop="MHNuber"
> >
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- <div class="page_bottom" > <Pagination ref="page" :totalCount="totalCount" :totalPage="totalPage" @pageFun="pageFun" />
<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" />
</div> </div>
<delete-pop ref="delete" :deletetext="deletetext" :type="typeV" v-if="deleteShow"></delete-pop> <delete-pop ref="delete" :deletetext="deletetext" :type="typeV" v-if="deleteShow"></delete-pop>
...@@ -98,23 +81,71 @@ export default { ...@@ -98,23 +81,71 @@ export default {
data () { data () {
return { return {
tableData: [], tableData: [],
cloneData: [],
AllTableData: [], AllTableData: [],
checkList: [], checkList: [],
deletetext: '', deletetext: '',
deleteShow: false, deleteShow: false,
typeV: '', typeV: '',
formData: {
argKeyWord: '',
argWhere: '',
},
// 分页数据
totalCount: 0,
// pageIndex: 1,
totalPage: 1
} }
}, },
created() {
this.searchData()
},
methods: { methods: {
handleSelectionChange (val) { searchData () {
this.checkList = val 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){ pageFun(num){
if(num == 1){ if(num == 1){
this.tableData = this.AllTableData.slice(0,50) this.tableData = this.cloneData.slice(0, this.$refs.page.pageSize)
}else{ }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