|
@@ -1,77 +1,35 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<basic-container v-show="show" class="page-crad">
|
|
|
- <avue-crud
|
|
|
- ref="crud"
|
|
|
- :option="option"
|
|
|
- :data="dataList"
|
|
|
- v-model="form"
|
|
|
- :page.sync="page"
|
|
|
- :search.sync="search"
|
|
|
- :table-loading="loading"
|
|
|
- :cell-style="cellStyle"
|
|
|
- @selection-change="selectionChange"
|
|
|
- @search-change="searchChange"
|
|
|
- @current-change="currentChange"
|
|
|
- @size-change="sizeChange"
|
|
|
- @refresh-change="refreshChange"
|
|
|
- @on-load="onLoad"
|
|
|
- @search-criteria-switch="searchCriteriaSwitch"
|
|
|
- @saveColumn="saveColumn"
|
|
|
- @resetColumn="resetColumn"
|
|
|
- >
|
|
|
+ <avue-crud ref="crud" :option="option" :data="dataList" v-model="form" :page.sync="page" :search.sync="search"
|
|
|
+ :table-loading="loading" :cell-style="cellStyle" @selection-change="selectionChange"
|
|
|
+ @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
|
|
|
+ @refresh-change="refreshChange" @on-load="onLoad" @search-criteria-switch="searchCriteriaSwitch"
|
|
|
+ @saveColumn="saveColumn" @resetColumn="resetColumn">
|
|
|
<template slot="menuLeft">
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- icon="el-icon-plus"
|
|
|
- size="small"
|
|
|
- @click.stop="newAdd()"
|
|
|
- >创建单据</el-button>
|
|
|
- <el-button
|
|
|
- type="success"
|
|
|
- size="small"
|
|
|
- icon="el-icon-plus"
|
|
|
- @click.stop="copyDoc()"
|
|
|
- :disabled="selection.length != 1"
|
|
|
- v-if="false"
|
|
|
- >复制单据</el-button>
|
|
|
+ <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="newAdd()">创建单据</el-button>
|
|
|
+ <el-button type="success" size="small" icon="el-icon-plus" @click.stop="copyDoc()"
|
|
|
+ :disabled="selection.length != 1" v-if="false">复制单据</el-button>
|
|
|
</template>
|
|
|
<template slot-scope="scope" slot="menu">
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- icon="el-icon-delete"
|
|
|
- size="small"
|
|
|
- @click.stop="rowDel(scope.row, scope.index)"
|
|
|
- :disabled="scope.row.status == 3"
|
|
|
- >删除
|
|
|
+ <el-button type="text" icon="el-icon-delete" size="small" @click.stop="rowDel(scope.row, scope.index)"
|
|
|
+ :disabled="scope.row.status != 0">删除
|
|
|
</el-button>
|
|
|
</template>
|
|
|
<template slot="applyUserNameSearch">
|
|
|
- <el-select
|
|
|
- v-model="search.applyUser"
|
|
|
- filterable
|
|
|
- clearable
|
|
|
- size="small"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="(item,index) in userList"
|
|
|
- :key="index"
|
|
|
- :label="item.realName"
|
|
|
- :value="item.id"
|
|
|
- ></el-option>
|
|
|
+ <el-select v-model="search.applyUser" filterable clearable size="small">
|
|
|
+ <el-option v-for="(item, index) in userList" :key="index" :label="item.realName" :value="item.id">
|
|
|
+ </el-option>
|
|
|
</el-select>
|
|
|
</template>
|
|
|
<template slot="applyUserName" slot-scope="scope">
|
|
|
- <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.applyUserName }}</span>
|
|
|
+ <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row, scope.index)">{{
|
|
|
+ scope.row.applyUserName
|
|
|
+ }}</span>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
|
- <detail-page
|
|
|
- @goBack="goBack"
|
|
|
- @copyOrder="copyOrder"
|
|
|
- :detailData="detailData"
|
|
|
- v-if="!show"
|
|
|
- />
|
|
|
+ <detail-page @goBack="goBack" @copyOrder="copyOrder" :detailData="detailData" v-if="!show" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -79,7 +37,7 @@
|
|
|
import option from "./config/mainList.json";
|
|
|
import detailPage from "./detail";
|
|
|
import { gainUser } from "@/api/basicData/customerInquiry";
|
|
|
-import {getList, deleteList} from "@/api/officeSupplies/purchaseApply";
|
|
|
+import { getList, deleteList } from "@/api/officeSupplies/purchaseApply";
|
|
|
|
|
|
export default {
|
|
|
name: "index",
|
|
@@ -114,7 +72,7 @@ export default {
|
|
|
this.option.column.forEach(item => {
|
|
|
if (item.search) i++
|
|
|
})
|
|
|
- if (i % 3 !== 0){
|
|
|
+ if (i % 3 !== 0) {
|
|
|
const num = 3 - Number(i % 3)
|
|
|
this.option.searchMenuSpan = num * 8;
|
|
|
this.option.searchMenuPosition = "right";
|
|
@@ -154,10 +112,10 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
searchCriteriaSwitch(type) {
|
|
|
- if (type){
|
|
|
- this.option.height = this.option.height - 90
|
|
|
- }else {
|
|
|
- this.option.height = this.option.height + 90
|
|
|
+ if (type) {
|
|
|
+ this.option.height = this.option.height - 90
|
|
|
+ } else {
|
|
|
+ this.option.height = this.option.height + 90
|
|
|
}
|
|
|
this.$refs.crud.getTableHeight()
|
|
|
},
|
|
@@ -238,7 +196,7 @@ export default {
|
|
|
cellStyle() {
|
|
|
return "padding:0;height:40px;";
|
|
|
},
|
|
|
- copyDoc() {},
|
|
|
+ copyDoc() { },
|
|
|
selectionChange(list) {
|
|
|
this.selection = list;
|
|
|
},
|
|
@@ -296,5 +254,4 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
-
|
|
|
</style>
|