<template>
|
<div class="app-container stock-container">
|
<el-container>
|
<el-card class="box-card" style="width: 100%" shadow="never">
|
<!--搜索条件-->
|
<div class="filter-container">
|
<my-search ref="searchBar" :items="items" @search="fifterForm"></my-search>
|
</div>
|
<el-row style="margin-top: 15px">
|
<el-col>
|
<!--列表-->
|
<div class="table-tool-bar" style="margin-bottom: 15px">
|
<my-button name="新增" @click="handleAdd" site="tools" size="medium" />
|
</div>
|
<div :style="{ 'overflow-y': 'auto', height: `calc(100vh - 320px)` }" 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">
|
<div class="card-header">
|
<div class="card-header-left">
|
<span>分发单号:</span>
|
<span class="value">{{ item.businessFormCode }}</span>
|
</div>
|
<div class="card-header-right">
|
<el-button name="查看详情" site="form" type="primary" size="mini" @click="handleDetail(item)">查看详情</el-button>
|
</div>
|
</div>
|
<div class="one-hed">
|
<div class="box"><span class="span-two">部门:</span>{{ item.agencyId }}</div>
|
<div class="box"><span class="span-two">分发人:</span>{{ item.buyerName }}</div>
|
<div class="box">
|
<span class="span-two">分发时间:</span>{{ item.procureTime | formatTime }}
|
</div>
|
</div>
|
<div class="card-end">
|
<div v-for="(just, index) in item.fromProcureTemplateInfoList" :key="index" class="item">
|
<div class="name">{{ just.goodsTemplateName }}</div>
|
<div class="value-box">
|
<div class="value-box-item">
|
<span class="label">数量:</span>
|
<span class="value">{{ just.count }}</span>
|
<span class="unit">{{ just.unit }}</span>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</el-card>
|
</el-col>
|
</el-row>
|
<div class="no-data" v-else>暂无数据</div>
|
</div>
|
<el-pagination
|
:small="false"
|
:current-page="pageNum"
|
:page-sizes="[5, 10, 20, 50, 100, 200, 300, 400, 500]"
|
:page-size="pageSize"
|
layout="total, sizes, prev, pager, next, jumper"
|
:total="total"
|
@size-change="handleSizeChange"
|
@current-change="handleCurrentChange"
|
/>
|
</el-col>
|
</el-row>
|
</el-card>
|
</el-container>
|
<!--添加/编辑弹窗-->
|
<edit
|
v-if="editSetting.show"
|
:setting="editSetting"
|
ref="editRef"
|
@close="editSetting.show = false"
|
@search="refreshData"
|
></edit>
|
<detail
|
v-if="detailSetting.show"
|
:setting="detailSetting"
|
@close="detailSetting.show = false"
|
ref="detailRef"
|
></detail>
|
</div>
|
</template>
|
|
<script>
|
import { procureList, procureDel, procureIncome } from '@/api/stock/procure/purchaseOrder';
|
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 listPage from '../../../mixins/listPage';
|
|
export default {
|
name: 'index',
|
mixins: [listPage],
|
components: { MyButton, myImport, edit, detail },
|
data() {
|
return {
|
loading: false,
|
adddialog: false,
|
list: [],
|
// 搜索框
|
items: [
|
{
|
type: 'text',
|
dataIndex: 'businessFormCode',
|
label: '分发单号',
|
placeholder: '请输入',
|
defaultValue: '',
|
},
|
{
|
type: 'select',
|
dataIndex: 'goodsTemplateId',
|
label: '物品名称',
|
placeholder: '请输入',
|
defaultValue: '',
|
options: [],
|
optionsConfig: {
|
label: 'goodsName',
|
value: 'id',
|
url: SettingIplatform.apiBaseURL + '/pc/base/goods/template/query/goodsTemplate',
|
},
|
},
|
{
|
type: 'cascader',
|
dataIndex: 'agencyId',
|
label: '分发部门',
|
placeholder: '请选择',
|
optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null },
|
defaultValue: '',
|
options: [],
|
},
|
{
|
type: 'text',
|
dataIndex: 'createName',
|
label: '分发人',
|
placeholder: '请输入',
|
defaultValue: '',
|
},
|
{
|
type: 'date-picker',
|
dataIndex: 'incomeTimeStart',
|
label: '分发时间',
|
defaultValue: '',
|
},
|
{
|
type: 'date-picker',
|
dataIndex: 'incomeTimeEnd',
|
label: '至',
|
defaultValue: '',
|
},
|
],
|
// 树数据
|
treeDataList: []
|
};
|
},
|
created(){
|
this.fetchData()
|
},
|
methods: {
|
fetchData() {
|
this.loading = true;
|
procureList({
|
pageNum: this.pageNum,
|
pageSize: this.pageSize,
|
...this.filterFrom,
|
}).then((res) => {
|
this.list = res.datas;
|
this.total = res.totalRows;
|
this.loading = false;
|
console.log(this.list);
|
});
|
},
|
fifterForm(params) {
|
this.filterFrom = Object.assign(this.filterFrom, params);
|
if (this.filterFrom.incomeTimeStart) {
|
this.filterFrom.incomeTimeStart = this.filterFrom.incomeTimeStart.replace(/\-/g, '');
|
}
|
if (this.filterFrom.incomeTimeEnd) {
|
this.filterFrom.incomeTimeEnd = this.filterFrom.incomeTimeEnd.replace(/\-/g, '');
|
}
|
this.search(1);
|
},
|
},
|
};
|
</script>
|
|
<style scoped lang="scss">
|
//@import url(../../../../styles/index.scss);
|
</style>
|