1
lzhe
2024-05-24 c9ce5e7f9a9ef52c66baf4f8a6e8d9e48b7cb251
src/views/console/basic-data/material-warehousing-data/material-infoComp1.vue
@@ -1,21 +1,21 @@
<!--
 * @Date: 2024-05-08 21:29:53
 * @LastEditors: Sneed
 * @LastEditTime: 2024-05-08 23:20:45
 * @LastEditTime: 2024-05-09 21:12:56
 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/console/basic-data/material-warehousing-data/material-infoComp1.vue
-->
<template>
    <el-containter>
        <el-header>
            <el-button @click="table_add" type="primary" icon="el-icon-plus"></el-button>
            <el-button type="primary">导入</el-button>
            <el-button type="primary">导出</el-button>
            <!-- <el-button type="primary">导入</el-button> -->
            <import-table style="margin:0 8px" :exportUrl="exportUrl" :uploadUrl="uploadUrl"></import-table>
            <el-button type="primary" @click="getExport">导出</el-button>
            <el-popconfirm width="220" cancel-button-text="停用" confirm-button-text="删除"
                title="删除数据会影响已关联的业务 ,若您想在已关联的业务中依然显示这些数据, 您可以选择 停用 操作。停用后此数据将不能再被新业务使用。"
                @confirm="table_del(selection, '0')" @cancel="table_del(selection, '1')">
                <template #reference>
                    <el-button :disabled="selection.length == 0" type="danger" plain icon="el-icon-delete"
                        @click="batchDel"></el-button>
                    <el-button :disabled="selection.length == 0" type="danger" plain icon="el-icon-delete"></el-button>
                </template>
            </el-popconfirm>
@@ -52,7 +52,7 @@
                <el-table-column prop="stuff" label="材质" />
                <el-table-column prop="property" label="物料属性">
                    <template #default="scope">
                        {{ this.options.property.find(v => v.value == scope.row.property).label }}
                        {{ this.options.property.find(v => v.value == scope.row.property)?.label }}
                    </template>
                </el-table-column>
                <el-table-column prop="isMustCheckName" label="是否必检">
@@ -162,10 +162,15 @@
</template>
<script>
import importTable from '@/layout/components/importTable.vue'
export default {
    components: {
        importTable,
    },
    data() {
        return {
            activeName: '1',
            uploadUrl: "/api/blade-cps/material/import-material",
            exportUrl: "/api/blade-cps/material/export-template",
            options: {
                status: [
                    {
@@ -248,8 +253,12 @@
                ...row
            }
        },
        batchDel() {
        getExport() {
            this.$HTTP.post(`/api/blade-cps/material/export-material`, { ...this.params }).then(res => {
                if (res.code == 200) {
                    window.open(res.data.link);
                }
            }).catch(() => { })
        },
        dataChange() {