|
@@ -1,22 +1,116 @@
|
|
<template>
|
|
<template>
|
|
<div id="index">
|
|
<div id="index">
|
|
<el-row>
|
|
<el-row>
|
|
- <el-col :span="24" class="main animate__animated animate__backInRight"> test </el-col>
|
|
|
|
|
|
+ <el-col :span="24" class="main animate__animated animate__backInRight">
|
|
|
|
+ <el-col :span="24" class="one">
|
|
|
|
+ <data-table @query="search" :fields="fields" :opera="opera" :data="list" :total="total" @view="toView" @export="toExport">
|
|
|
|
+ <template #selfbtn>
|
|
|
|
+ <el-button type="primary" size="mini" @click="toAdd()">添加采购申请</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </data-table>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-col>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
+ <e-dialog :dialog="dialog" @toClose="toClose">
|
|
|
|
+ <template slot="info">
|
|
|
|
+ <file-1 :form="form" v-if="dialog.type == '1'" @toSave="toSave" :statusList="statusList"></file-1>
|
|
|
|
+ <info-1 :form="form" v-else-if="dialog.type == '2'"></info-1>
|
|
|
|
+ <form-1 :form="form" v-else-if="dialog.type == '3'"></form-1>
|
|
|
|
+ </template>
|
|
|
|
+ </e-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
|
+const moment = require('moment');
|
|
export default {
|
|
export default {
|
|
name: 'index',
|
|
name: 'index',
|
|
props: {},
|
|
props: {},
|
|
- components: {},
|
|
|
|
|
|
+ components: {
|
|
|
|
+ file1: () => import('./parts/file-1.vue'),
|
|
|
|
+ info1: () => import('./parts/info-1.vue'),
|
|
|
|
+ form1: () => import('./parts/form-1.vue'),
|
|
|
|
+ },
|
|
data: function () {
|
|
data: function () {
|
|
- return {};
|
|
|
|
|
|
+ return {
|
|
|
|
+ // 数据项
|
|
|
|
+ fields: [
|
|
|
|
+ { label: '订单编号', prop: 'order_num', filter: true },
|
|
|
|
+ { label: '收货人', prop: 'receive_user_name', filter: true },
|
|
|
|
+ { label: '供货单位', prop: 'mech_name', filter: true },
|
|
|
|
+ { label: '货物状态', prop: 'status_name', filter: true },
|
|
|
|
+ ],
|
|
|
|
+ //操作项
|
|
|
|
+ opera: [
|
|
|
|
+ { label: '详细信息', method: 'view' },
|
|
|
|
+ { label: '导出数据', method: 'export', type: 'success' },
|
|
|
|
+ ],
|
|
|
|
+ //表格数据
|
|
|
|
+ list: [
|
|
|
|
+ {
|
|
|
|
+ order_num: 'Hgj4757945hdFueu',
|
|
|
|
+ receive_user_name: '胡图图',
|
|
|
|
+ mech_name: '翻斗幼儿园-小豆班',
|
|
|
|
+ status_name: '待供货单位确认',
|
|
|
|
+ status: '1',
|
|
|
|
+ user_name: '采购人员',
|
|
|
|
+ user_phone: '12345678901',
|
|
|
|
+ money: '3344',
|
|
|
|
+ receive_user_phone: '98765432109',
|
|
|
|
+ receive_address: '翻斗大街翻斗花园2号楼1001室',
|
|
|
|
+ order: [
|
|
|
|
+ { name: '小洋人', num: '123', money: '3000' },
|
|
|
|
+ { name: '娃哈哈', num: '123', money: '344' },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ // 列表数据总数
|
|
|
|
+ total: 0,
|
|
|
|
+ //弹框
|
|
|
|
+ dialog: { title: '详细信息', show: false, type: '1' },
|
|
|
|
+ form: { order: [] },
|
|
|
|
+ // 状态
|
|
|
|
+ statusList: [
|
|
|
|
+ { value: '0', label: '待审中' },
|
|
|
|
+ { value: '1', label: '通过' },
|
|
|
|
+ { value: '-1', label: '拒绝' },
|
|
|
|
+ { value: '2', label: '有货,可领取' },
|
|
|
|
+ { value: '3', label: '无货,需采买' },
|
|
|
|
+ { value: '4', label: '领取确认完成' },
|
|
|
|
+ ],
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ async created() {
|
|
|
|
+ await this.search();
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ //查询数据
|
|
|
|
+ async search() {},
|
|
|
|
+ //详细信息
|
|
|
|
+ async toView({ data }) {
|
|
|
|
+ this.$set(this, `form`, data);
|
|
|
|
+ this.dialog = { title: '详细信息', show: true, type: '2', widths: '40%' };
|
|
|
|
+ },
|
|
|
|
+ //导出数据
|
|
|
|
+ async toExport({ data }) {
|
|
|
|
+ this.dialog = { title: '导出条件', show: true, type: '1', widths: '40%' };
|
|
|
|
+ },
|
|
|
|
+ // 提交保存,创建/修改
|
|
|
|
+ async toSave({ data }) {
|
|
|
|
+ console.log(data);
|
|
|
|
+ },
|
|
|
|
+ // 添加
|
|
|
|
+ toAdd() {
|
|
|
|
+ this.dialog = { title: '添加信息', show: true, type: '3', widths: '40%' };
|
|
|
|
+ },
|
|
|
|
+ //关闭
|
|
|
|
+ toClose() {
|
|
|
|
+ this.form = { order: [] };
|
|
|
|
+ this.dialog = { title: '详细信息', show: false, type: '1' };
|
|
|
|
+ this.search();
|
|
|
|
+ },
|
|
},
|
|
},
|
|
- created() {},
|
|
|
|
- methods: {},
|
|
|
|
computed: {
|
|
computed: {
|
|
...mapState(['user']),
|
|
...mapState(['user']),
|
|
},
|
|
},
|
|
@@ -33,4 +127,8 @@ export default {
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
-<style lang="less" scoped></style>
|
|
|
|
|
|
+<style lang="less" scoped>
|
|
|
|
+/deep/.el-dialog__body {
|
|
|
|
+ min-height: 400px;
|
|
|
|
+}
|
|
|
|
+</style>
|