<div id="app">
    <el-button type="primary" @click="refresh">刷新</el-button>
    <el-table
            :data="tableData"
            style="width: 100%">
        <el-table-column
                prop="cid"
                label="出库编号"
                width="100"
<pre><code>    &gt;
    &lt;/el-table-column&gt;
    &lt;el-table-column
            prop=&quot;staffname&quot;
            label=&quot;出库人&quot;
            width=&quot;130&quot;&gt;
    &lt;/el-table-column&gt;
    &lt;el-table-column
            prop=&quot;outtime&quot;
            label=&quot;出库时间&quot;
            width=&quot;180&quot;&gt;
    &lt;/el-table-column&gt;
    &lt;el-table-column
            prop=&quot;outmethod&quot;
            label=&quot;操作类型&quot;
            :formatter=&quot;ni&quot;
            width=&quot;110&quot;&gt;
    &lt;/el-table-column&gt;
    &lt;el-table-column
            prop=&quot;examstate&quot;
            label=&quot;审核状态&quot;
            :formatter=&quot;sh&quot;
            width=&quot;100&quot;
    &gt;
    &lt;/el-table-column&gt;
    &lt;el-table-column
            prop=&quot;branchname&quot;
            label=&quot;出库店铺&quot;
            width=&quot;150&quot;&gt;
    &lt;/el-table-column&gt;
    &lt;el-table-column
            label=&quot;查看详情&quot;
            width=&quot;150&quot;&gt;
        &lt;el-button
                size=&quot;mini&quot;
                @click=&quot;dialogTableVisible = true&quot;&gt;查看详情
        &lt;/el-button&gt;
    &lt;/el-table-column&gt;
    &lt;el-table-column
            label=&quot;操作&quot;&gt;
        &lt;template slot-scope=&quot;scopek&quot;&gt;
            &lt;el-button
                    size=&quot;mini&quot;
                    @click=&quot;handleEdit(scopek.row)&quot;
                    v-show=&quot;pd&quot;
                    :formatter=&quot;yc&quot;
            &gt;同意
            &lt;/el-button&gt;
            &lt;el-button
                    size=&quot;mini&quot;
                    @click=&quot;jujue(scopek.row)&quot;
                    v-show=&quot;pd&quot;
            &gt;拒绝
            &lt;/el-button&gt;

        &lt;/template&gt;
    &lt;/el-table-column&gt;
&lt;/el-table&gt;

&lt;div class=&quot;block&quot;&gt;
    &lt;el-pagination
            @size-change=&quot;handleSizeChange&quot;
            @current-change=&quot;handleCurrentChange&quot;
            :current-page.sync=&quot;pagenum&quot;
            :page-sizes=&quot;[5, 10, 15, 20]&quot;
            :page-size=&quot;5&quot;
            layout=&quot;total, sizes, prev, pager, next, jumper&quot;
            :total=&quot;k&quot;&gt;
    &lt;/el-pagination&gt;
&lt;/div&gt;
&lt;el-dialog title=&quot;收货地址&quot; :visible.sync=&quot;dialogTableVisible&quot;&gt;
    &lt;el-table :data=&quot;gridData&quot; style=&quot;width: 500px&quot;&gt;
        &lt;el-table-column property=&quot;date&quot; label=&quot;日期&quot; width=&quot;150&quot;&gt;&lt;/el-table-column&gt;
        &lt;el-table-column property=&quot;name&quot; label=&quot;姓名&quot; width=&quot;200&quot;&gt;&lt;/el-table-column&gt;
        &lt;el-table-column property=&quot;address&quot; label=&quot;地址&quot;&gt;&lt;/el-table-column&gt;
    &lt;/el-table&gt;
&lt;/el-dialog&gt;
</code></pre>
</div>
<script type="module">
    const instance = axios.create({
        baseURL: 'http://localhost:8080',
        timeout: 1000,
    })
    new Vue({
        el: '#app',
        dataType: 'json',
        data: {
            pd: false,
            pagenum: 1,
            gridData: [{
                date: '2016-05-02',
                name: '王小虎',
                address: '上海市普陀区金沙江路 1518 弄'
            }, {
                date: '2016-05-04',
                name: '王小虎',
                address: '上海市普陀区金沙江路 1518 弄'
            }, {
                date: '2016-05-01',
                name: '王小虎',
                address: '上海市普陀区金沙江路 1518 弄'
            }, {
                date: '2016-05-03',
                name: '王小虎',
                address: '上海市普陀区金沙江路 1518 弄'
            }],
            dialogTableVisible: false,
            dialogFormVisible: false,
            form: {
                name: '',
                region: '',
                date1: '',
                date2: '',
                delivery: false,
                type: [],
                resource: '',
                desc: ''
            },
            formLabelWidth: '120px',
            input: '',
            k: 0,
            tableData: [],
            dialogFormVisible: false,
            form: {
                branchname: ''
            },
            formLabelWidth: '120px'
        },
        methods: {
            yc(row){
<pre><code>        },
        handleEdit(row) {
            row.examstate = 2
            instance.put(`outfers?examstate=${2}&amp;cid=${row.cid}`).then(res =&gt; {
            })
        },
        jujue(row) {
            row.examstate = 3
            instance.put(`outfers/p?examstate=${3}&amp;cid=${row.cid}`).then(res =&gt; {
            })
        },
        sh(row) {
            switch (row.examstate) {
                case 1:
                    this.$nextTick(() =&gt; {
                        this.pd = true;
                    });
                    return '待审核';
                case 2:
                    this.pd = false;
                    return '通过';
                case 3:
                    this.pd = false;
                    return '驳回';
            }
        },
        ni(row) {
            return row.outmethod = row.outmethod != null ? '零售出库' : '不知道'
        },
        refresh() {
            this.handleCurrentChange(1)
        },
        onSubmit(row) {

            this.handleCurrentChange(1)

        },
        handleSizeChange(val) {
            instance.get(`/outfers?size=${val}`).then(res =&gt; {
                this.tableData = res.data.data.list;
                this.pagenum = res.data.data.pageNum
                this.k = res.data.data.total
            })
        },
        handleCurrentChange(val) {
            instance.get(`/outfers?index=${val}`).then(res =&gt; {
                this.tableData = res.data.data.list;
                this.pagenum = res.data.data.pageNum
                this.k = res.data.data.total
            })
        },
    },
    created() {
        var jl = this;
        instance.get(&quot;/outfers&quot;)
            .then(function (res) {

                jl.tableData = res.data.data.list;
                jl.k = res.data.data.total
            })
            .catch(function (res) {

            });
        instance.get(&quot;/goods/getname&quot;)
            .then(function (res) {

                jl.getname = res.data.data;

            })
    }
});
</code></pre>
</script>
出库管理系统 - 出库列表

原文地址: https://www.cveoy.top/t/topic/jsAm 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录