| | |
| | | <!-- |
| | | * @Date: 2024-05-08 21:29:53 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-05-09 20:41:57 |
| | | * @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> |
| | | |
| | |
| | | <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="是否必检"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import importTable from '@/layout/components/importTable.vue' |
| | | export default { |
| | | components: { |
| | | importTable, |
| | | }, |
| | | data() { |
| | | return { |
| | | uploadUrl: "/api/blade-cps/material/import-material", |
| | | exportUrl: "/api/blade-cps/material/export-template", |
| | | options: { |
| | | status: [ |
| | | { |
| | |
| | | ...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() { |
| | | |