| | |
| | | <my-button name="新增" @click="handleAdd" site="tools" size="medium" /> |
| | | <my-button name="导入" @click="importSetting.dialogShow = true" site="tools" size="medium" /> |
| | | </div> |
| | | <div :style="{ 'overflow-y': 'auto', height: `${clientHeight - 320}px` }"> |
| | | <el-row class="card" :gutter="5" v-loading="loading"> |
| | | <div :style="{ 'overflow-y': 'auto', height: `${clientHeight - 320}px` }" v-loading="loading"> |
| | | <el-row v-if="list.length" class="card" :gutter="5"> |
| | | <el-col v-for="(item, index) in list" :key="index" class="cm-item"> |
| | | <el-card class="card-data"> |
| | | <div class="card-container"> |
| | |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="no-data" v-else>暂无数据</div> |
| | | </div> |
| | | <el-pagination |
| | | :small="false" |
| | |
| | | |
| | | <script> |
| | | import { procureList, procureDel, procureIncome } from '@/api/stock/procure/purchaseOrder'; |
| | | import { getTree } from '@/api/baseSetting/finsystenant'; |
| | | import MyButton from '@/components/myButton/myButton'; |
| | | import SettingIplatform from '@/utils/settingIplatform'; |
| | | import myImport from '@/views/components/myImport'; |
| | | import edit from './edit'; |
| | | import detail from './detail'; |
| | | import { getBaseUrl } from '@/utils/base'; |
| | | import * as DateFormatter from '@/utils/DateFormatter'; |
| | | import listPage from '../../../mixins/listPage' |
| | | |
| | | export default { |
| | | name: 'index', |
| | | mixins: [listPage], |
| | | components: { MyButton, myImport, edit, detail }, |
| | | data() { |
| | | return { |
| | |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'buyerName', |
| | | dataIndex: 'createName', |
| | | label: '创建人', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | |
| | | ], |
| | | // 树数据 |
| | | treeDataList: [], |
| | | // 搜索条件 |
| | | filterFrom: { |
| | | tenantId: null, |
| | | userName: null, |
| | | userPhone: null, |
| | | states: null, |
| | | }, |
| | | // 导入 |
| | | importSetting: { |
| | | dialogTitle: '导入', |
| | |
| | | }, |
| | | onSuccess: null, |
| | | }, |
| | | editSetting: { |
| | | title: '', |
| | | id: '', |
| | | orgId: '', |
| | | show: false, |
| | | }, |
| | | detailSetting: { |
| | | title: '详情', |
| | | id: '', |
| | | show: false, |
| | | }, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | total: 0, |
| | | }; |
| | | }, |
| | | computed: { |
| | | clientHeight() { |
| | | return document.documentElement.clientHeight; |
| | | }, |
| | | }, |
| | | filters: { |
| | | formatTime(time) { |
| | | if (!time) return; |
| | | return DateFormatter.LongToDateTime(time); |
| | | }, |
| | | }, |
| | | created() { |
| | | this.fetchData(); |
| | | }, |
| | | methods: { |
| | | fetchData() { |
| | |
| | | callBack(); |
| | | }; |
| | | }, |
| | | // 导出 |
| | | handleExport() {}, |
| | | // 新增 |
| | | handleAdd() { |
| | | this.editSetting.id = null; |
| | | this.editSetting.info = null; |
| | | this.editSetting.title = '新增'; |
| | | this.editSetting.show = true; |
| | | }, |
| | | // 编辑 |
| | | handleEdit(row) { |
| | | this.editSetting.id = row.id; |
| | | this.editSetting.info = null; |
| | | this.editSetting.title = '编辑'; |
| | | this.editSetting.show = true; |
| | | }, |
| | | // 详情 |
| | | handleDetail(row) { |
| | | this.detailSetting.id = row.id; |
| | | this.detailSetting.show = true; |
| | | }, |
| | | // 入库 |
| | | handleIncome(row) { |
| | | this.$confirm(`您确定 单号:${row.businessFormCode} 入库吗?`, '采购入库').then(() => { |
| | |
| | | .catch(() => {}); |
| | | }); |
| | | }, |
| | | // 分页 |
| | | handleSizeChange(pageSize) { |
| | | this.pageSize = pageSize; |
| | | this.pageNum = 1; |
| | | this.search(); |
| | | }, |
| | | handleCurrentChange(pageNum) { |
| | | this.pageNum = pageNum; |
| | | this.search(pageNum); |
| | | }, |
| | | // 查询table列表 |
| | | search(pageNum) { |
| | | if (pageNum) { |
| | | this.pageNum = pageNum; |
| | | } |
| | | this.fetchData(); |
| | | }, |
| | | refreshData() { |
| | | this.pageNum = 1; |
| | | this.pageSize = 10; |
| | | this.search(); |
| | | }, |
| | | fifterForm(params) { |
| | | this.filterFrom = Object.assign(this.filterFrom, params); |
| | | if (this.filterFrom.incomeTimeStart) { |
| | |
| | | if (this.filterFrom.incomeTimeEnd) { |
| | | this.filterFrom.incomeTimeEnd = this.filterFrom.incomeTimeEnd.replace(/\-/g, ''); |
| | | } |
| | | if (this.filterFrom.agencyId.length) { |
| | | if (this.filterFrom.agencyId && this.filterFrom.agencyId.length) { |
| | | this.filterFrom.agencyId = this.filterFrom.agencyId[this.filterFrom.agencyId.length - 1]; |
| | | } |
| | | this.search(); |
| | | this.search(1); |
| | | }, |
| | | }, |
| | | }; |