|
@@ -1,121 +1,75 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <Card
|
|
|
- style="width: 100%"
|
|
|
- :bordered="false"
|
|
|
- :dis-hover="true"
|
|
|
- v-show="!printShow && !addShow"
|
|
|
- >
|
|
|
+ <Card style="width:100%" :bordered="false" :dis-hover="true" v-show="!printShow && !addShow">
|
|
|
<p slot="title">申购计划列表</p>
|
|
|
<div slot="extra">
|
|
|
- <Button @click="addShow = true" v-if="buttonShow.add"
|
|
|
- >新增申购计划</Button
|
|
|
- >
|
|
|
+ <Button @click="addShow = true" v-if="buttonShow.add">新增申购计划</Button>
|
|
|
<Button @click="exportData" v-if="buttonShow.export">导出明细</Button>
|
|
|
<!-- <Button @click="printShow = true">打印---测试</Button> -->
|
|
|
</div>
|
|
|
<Row :gutter="10" style="margin-bottom: 10px">
|
|
|
<Col span="4">
|
|
|
- <Select
|
|
|
- clearable
|
|
|
- v-model="searchForm.ssqy"
|
|
|
- placeholder="所属区域"
|
|
|
- @on-change="ssqyChange"
|
|
|
- >
|
|
|
+ <Select clearable v-model="searchForm.ssqy" placeholder="所属区域" @on-change="ssqyChange">
|
|
|
<Option
|
|
|
v-for="item in ssqyList"
|
|
|
:value="item.areaId"
|
|
|
:key="item.areaId"
|
|
|
- >{{ item.areaName }}</Option
|
|
|
- >
|
|
|
+ >{{ item.areaName }}</Option>
|
|
|
</Select>
|
|
|
</Col>
|
|
|
<Col span="4">
|
|
|
- <Select
|
|
|
- clearable
|
|
|
- v-model="searchForm.glxm"
|
|
|
- placeholder="关联项目"
|
|
|
- @on-change="glxmChange"
|
|
|
- >
|
|
|
+ <Select clearable v-model="searchForm.glxm" placeholder="关联项目" @on-change="glxmChange">
|
|
|
<Option
|
|
|
v-for="item in glxmList"
|
|
|
:value="item.projectId"
|
|
|
:key="item.projectId"
|
|
|
- >{{ item.projectName }}</Option
|
|
|
- >
|
|
|
+ >{{ item.projectName }}</Option>
|
|
|
</Select>
|
|
|
</Col>
|
|
|
<Col span="4">
|
|
|
<Select clearable v-model="searchForm.jhlx" placeholder="计划类型">
|
|
|
- <Option
|
|
|
- v-for="item in jhlxList"
|
|
|
- :value="item.value"
|
|
|
- :key="item.value"
|
|
|
- >{{ item.label }}</Option
|
|
|
- >
|
|
|
+ <Option v-for="item in jhlxList" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
|
|
</Select>
|
|
|
</Col>
|
|
|
<Col span="4">
|
|
|
<DatePicker
|
|
|
format="yyyy年MM月"
|
|
|
:value="searchForm.jhyf"
|
|
|
- @on-change="searchForm.jhyf = $event"
|
|
|
+ @on-change="searchForm.jhyf=$event"
|
|
|
type="month"
|
|
|
placeholder="计划月份"
|
|
|
></DatePicker>
|
|
|
</Col>
|
|
|
<Col span="4">
|
|
|
<DatePicker
|
|
|
- v-model="searchForm.zdrq"
|
|
|
+ :value="searchForm.zdrq"
|
|
|
+ @on-change="searchForm.zdrq=$event"
|
|
|
format="yyyy/MM/dd HH:mm"
|
|
|
type="datetimerange"
|
|
|
placeholder="制单日期"
|
|
|
></DatePicker>
|
|
|
</Col>
|
|
|
- <!-- @on-change="searchForm.zdrq=$event" -->
|
|
|
<Col span="4">
|
|
|
- <Select
|
|
|
- clearable
|
|
|
- filterable
|
|
|
- v-model="searchForm.fgcgy"
|
|
|
- placeholder="分管采购员"
|
|
|
- >
|
|
|
+ <Select clearable filterable v-model="searchForm.fgcgy" placeholder="分管采购员">
|
|
|
<Option
|
|
|
v-for="item in fgcgyList"
|
|
|
:value="item.userId"
|
|
|
:key="item.userId"
|
|
|
- >{{ item.userName }}</Option
|
|
|
- >
|
|
|
+ >{{ item.userName }}</Option>
|
|
|
</Select>
|
|
|
</Col>
|
|
|
</Row>
|
|
|
<Row :gutter="10" style="margin-bottom: 10px">
|
|
|
<Col span="4">
|
|
|
<Select clearable v-model="searchForm.spzt" placeholder="审批状态">
|
|
|
- <Option
|
|
|
- v-for="item in spztList"
|
|
|
- :value="item.value"
|
|
|
- :key="item.value"
|
|
|
- >{{ item.label }}</Option
|
|
|
- >
|
|
|
+ <Option v-for="item in spztList" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
|
|
</Select>
|
|
|
</Col>
|
|
|
<Col span="4">
|
|
|
- <Input
|
|
|
- v-model="searchForm.title"
|
|
|
- placeholder="申请人/物料名称/计划单据号/标题"
|
|
|
- />
|
|
|
+ <Input v-model="searchForm.title" placeholder="申请人/物料名称/计划单据号/标题" />
|
|
|
</Col>
|
|
|
<Col span="4">
|
|
|
- <Button
|
|
|
- type="primary"
|
|
|
- style="width: 80px"
|
|
|
- @click="
|
|
|
- pageNum = 1;
|
|
|
- getTableData();
|
|
|
- "
|
|
|
- >查询</Button
|
|
|
- >
|
|
|
+ <Button type="primary" style="width: 80px" @click="pageNum = 1; getTableData()">查询</Button>
|
|
|
</Col>
|
|
|
</Row>
|
|
|
<!-- <Row style="margin-bottom: 10px; text-align: right">
|
|
@@ -159,89 +113,46 @@
|
|
|
</template>
|
|
|
<template slot-scope="{ row, index }" slot="action">
|
|
|
<div>
|
|
|
- <a
|
|
|
- href="javascript:;"
|
|
|
- v-if="buttonShow.check"
|
|
|
- @click="checkRow(row)"
|
|
|
- >查看</a
|
|
|
- >
|
|
|
+ <a href="javascript:;" v-if="buttonShow.check" @click="checkRow(row)">查看</a>
|
|
|
<a
|
|
|
href="javascript:;"
|
|
|
v-if="buttonShow.edit && row.creator == userId"
|
|
|
@click="editRow(row)"
|
|
|
- >{{ "编辑" }}</a
|
|
|
- >
|
|
|
+ >{{'编辑'}}</a>
|
|
|
<!-- <a href="javascript:;">复制</a> -->
|
|
|
<a
|
|
|
href="javascript:;"
|
|
|
- v-if="
|
|
|
- buttonShow.delete &&
|
|
|
- row.applyStatus == '0' &&
|
|
|
- row.creator == userId
|
|
|
- "
|
|
|
+ v-if="buttonShow.delete && row.applyStatus == '0' && row.creator == userId"
|
|
|
@click="deleteRow(row)"
|
|
|
- >删除</a
|
|
|
- >
|
|
|
+ >删除</a>
|
|
|
<a
|
|
|
href="javascript:;"
|
|
|
- v-if="
|
|
|
- buttonShow.copy &&
|
|
|
- (row.applyStatus == '2' || row.applyStatus == '3')
|
|
|
- "
|
|
|
+ v-if="buttonShow.copy && (row.applyStatus == '2' || row.applyStatus == '3')"
|
|
|
@click="copyRow(row)"
|
|
|
- >复制</a
|
|
|
- >
|
|
|
+ >复制</a>
|
|
|
<a
|
|
|
href="javascript:;"
|
|
|
- v-if="
|
|
|
- buttonShow.print && row.applyStatus != '3' && row.status != '5'
|
|
|
- "
|
|
|
+ v-if="buttonShow.print && row.applyStatus != '3' && row.status != '5'"
|
|
|
@click="printRow(row)"
|
|
|
- >打印</a
|
|
|
- >
|
|
|
+ >打印</a>
|
|
|
<a
|
|
|
href="javascript:;"
|
|
|
- v-if="
|
|
|
- buttonShow.submit &&
|
|
|
- row.applyStatus == '0' &&
|
|
|
- row.creator == userId
|
|
|
- "
|
|
|
+ v-if="buttonShow.submit && row.applyStatus == '0' && row.creator == userId"
|
|
|
@click="submitRow(row)"
|
|
|
- >提交</a
|
|
|
- >
|
|
|
+ >提交</a>
|
|
|
</div>
|
|
|
</template>
|
|
|
</Table>
|
|
|
- <Page
|
|
|
- align="right"
|
|
|
- :current="pageNum"
|
|
|
- :total="pageTotal"
|
|
|
- @on-change="pageChange"
|
|
|
- show-total
|
|
|
- />
|
|
|
+ <Page align="right" :current="pageNum" :total="pageTotal" @on-change="pageChange" show-total />
|
|
|
</Card>
|
|
|
<planAdd
|
|
|
ref="add"
|
|
|
- @return="
|
|
|
- () => {
|
|
|
- addShow = false;
|
|
|
- getTableData();
|
|
|
- }
|
|
|
- "
|
|
|
+ @return="() => {addShow = false; getTableData()}"
|
|
|
:ssqyList="ssqyList"
|
|
|
:cgyList="fgcgyList"
|
|
|
v-show="addShow"
|
|
|
/>
|
|
|
- <planPrint
|
|
|
- ref="print"
|
|
|
- @return="
|
|
|
- () => {
|
|
|
- printShow = false;
|
|
|
- getTableData();
|
|
|
- }
|
|
|
- "
|
|
|
- v-show="printShow"
|
|
|
- />
|
|
|
+ <planPrint ref="print" @return="() => {printShow = false ; getTableData()}" v-show="printShow" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -437,7 +348,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- this.searchForm.title = localStorage.user_name;
|
|
|
+ this.searchForm.title = localStorage.user_name
|
|
|
this.getTableData();
|
|
|
getAreaList(localStorage.user_id).then((res) => {
|
|
|
this.ssqyList = res.items;
|
|
@@ -455,7 +366,7 @@ export default {
|
|
|
getUserAuth() {
|
|
|
//获取用户在当前页面的权限
|
|
|
var self = this;
|
|
|
- console.log(this.$route);
|
|
|
+ console.log(this.$route)
|
|
|
let menuId = this.$route.query.menuId
|
|
|
? this.$route.query.menuId
|
|
|
: sessionStorage.getItem("refresh_child_id");
|
|
@@ -735,6 +646,9 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+/deep/ .ivu-btn>span {
|
|
|
+ vertical-align: top;
|
|
|
+}
|
|
|
ivu-card-head-inner,
|
|
|
.ivu-card-head p {
|
|
|
display: inline-block;
|