master
lion 1 year ago
parent 741bd55bed
commit afa74bd0ff

@ -482,17 +482,23 @@ export default {
? this.totalData || this.listData.length
: this.total
}
current={this.selectOpt.page}
size="small"
show-elevator={true}
show-sizer={this.showSizer}
class="xy-table__page"
on={{
['update:current']:(newval)=>{
console.log("val",newval)
this.selectOpt.page = newval
},
["on-page-size-change"]: (e) => {
if (this.action) {
this.selectOpt.page_size = e;
this.selectOpt.page = 1;
this.getTableData();
}
this.selectOpt.page = 1;
this.$emit("pageSizeChange", e);
},
["on-change"]: (e) => {
@ -1056,7 +1062,7 @@ export default {
</style>
<style scoped>
.el-table__fixed {
height: auto !important;
height: auto !important;
bottom: 5px;
position: absolute;
top: 0;

@ -39,6 +39,15 @@
<xy-table :list="list" v-loading="loading" :total="total" @selection-change="selectionChange"
@pageSizeChange="e => select.pageSize = e" @pageIndexChange="pageChange" :table-item="table" :auths='[]'>
<template v-slot:caigouhetong>
<el-table-column align="left" label="采购合同" width="240" header-align="center">
<template slot-scope="scope">
<template v-if="scope.row.stocks && scope.row.stocks.length>0">
<div v-for="item in scope.row.stocks">{{item.caigouhetong}}</div>
</template>
</template>
</el-table-column>
</template>
<template v-slot:btns>
<!-- <div></div> -->
<el-table-column v-if="isPandian==='pandian' && (isCkName=='仓库管理员'||roleName=='系统管理员')" fixed="right" align="center" label="操作" width="120" header-align="center">
@ -211,6 +220,11 @@
width: 120,
prop: 'rukupici'
},
{
label: "采购合同",
width: 240,
prop: 'caigouhetong'
},
{
label: "生产日期",
width: 120,

@ -8,12 +8,12 @@
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>仓库名称
</div>
<div class="xy-table-item-content">
<el-select v-model="form.cangkumingcheng" @change="changeCk" style="width: 300px;" placeholder="请选择仓库">
<el-select v-model="form.guanliancangku" @change="changeCk" style="width: 300px;" placeholder="请选择仓库">
<el-option
v-for="item in cangkuList"
:key="item.id"
:label="item.cangkumingcheng"
:value="item.cangkumingcheng">
:value="item.id">
</el-option>
</el-select>
</div>
@ -245,7 +245,7 @@
shifouzhanshi:''
},
rules: {
cangkumingcheng: [{
guanliancangku: [{
required: true,
message: '请选择仓库'
}]
@ -266,6 +266,7 @@
this.cangkuList.map(item=>{
if(e===item.cangkumingcheng){
this.form.guanliancangku = item.id
this.form.cangkumingcheng = item.cangkumingcheng
}
})
console.log(this.form.guanliancangku)
@ -277,7 +278,7 @@
table_name: this.tableName
})
this.form = {
guanliancangku:res?.guanliancangku,
guanliancangku:res.guanliancangku?parseInt(res.guanliancangku):'',
cangkumingcheng:res?.cangkumingcheng,
wuzidaima:res?.wuzidaima,
xianwuzimingcheng:res?.xianwuzimingcheng,

@ -12,12 +12,12 @@
</el-option>
</el-select> -->
<Select v-model="select.guanliancangku" style="width:200px;margin-right: 10px;" placeholder="所在仓库" clearable>
<Option v-for="item in cangkuList" :value="item.id" :key="item.value">{{ item.cangkumingchengquyu }}</Option>
<Option v-for="item in cangkuList" :value="item.id" :key="item.value">{{ item.cangkumingcheng }}</Option>
</Select>
<Select @on-change="clearArea" v-model="select.area" style="width: 200px;margin-right: 10px;" placeholder="所在区域" clearable>
<Option v-for="item in areaList" :key="item.id" :value="item.id">{{ item.value }}</Option>
</Select>
<Button type="primary" @click="getindex"></Button>
<Button type="primary" @click="getindex('page')"></Button>
<Button type="primary" style="margin-left: 10px;"
@click="$refs['addMater'].isShow = true,$refs['addMater'].type = 'add',$refs['addMater'].setCkList(cangkuList)">添加</Button>
<Button type="primary" style="margin-left: 10px;"
@ -118,15 +118,15 @@
{
label: "仓库名称",
width: 220,
prop: 'cangkumingcheng',
prop: 'flood_storages_details.cangkumingcheng',
align: 'left',
},
{
label: "所在区域",
width: 120,
prop: 'suozaiquyu',
align: 'center',
},
// {
// label: "",
// width: 120,
// prop: 'suozaiquyu',
// align: 'center',
// },
{
label: "物资代码",
width: 120,
@ -265,8 +265,11 @@
})
this.cangkuList = res.data
},
async getindex() {
this.loading = true
async getindex(page) {
this.loading = true
if(page=='page'){
this.select.pageIndex = 1
}
const res = await index({
page_size: this.select.pageSize,
page: this.select.pageIndex,
@ -274,15 +277,15 @@
filter: [{
"key": "xianwuzimingcheng",
"op": "like",
"value": this.select.keyword
"value": this.select.keyword?this.select.keyword:''
},{
"key": "guanliancangku",
"op": "eq",
"value": this.select.guanliancangku
"value": this.select.guanliancangku?this.select.guanliancangku:''
},{
key:'quyu_id',
op:'eq',
value:this.select.area
value:this.select.area?this.select.area:''
}],
})
this.list = res.data

Loading…
Cancel
Save