master
lion 1 year ago
parent 741bd55bed
commit afa74bd0ff

@ -482,17 +482,23 @@ export default {
? this.totalData || this.listData.length ? this.totalData || this.listData.length
: this.total : this.total
} }
current={this.selectOpt.page}
size="small" size="small"
show-elevator={true} show-elevator={true}
show-sizer={this.showSizer} show-sizer={this.showSizer}
class="xy-table__page" class="xy-table__page"
on={{ on={{
['update:current']:(newval)=>{
console.log("val",newval)
this.selectOpt.page = newval
},
["on-page-size-change"]: (e) => { ["on-page-size-change"]: (e) => {
if (this.action) { if (this.action) {
this.selectOpt.page_size = e; this.selectOpt.page_size = e;
this.selectOpt.page = 1; this.selectOpt.page = 1;
this.getTableData(); this.getTableData();
} }
this.selectOpt.page = 1;
this.$emit("pageSizeChange", e); this.$emit("pageSizeChange", e);
}, },
["on-change"]: (e) => { ["on-change"]: (e) => {

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

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

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

Loading…
Cancel
Save