123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197 |
- <template>
- <div class="app-container">
- <div v-if="isShow">
- <!-- 筛选条件 -->
- <div>
- <el-form
- ref="screenForm"
- :model="screenForm"
- label-width="70px"
- size="small"
- label-position="left"
- >
- <el-row :gutter="20">
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="关键字" prop="keyword">
- <el-input
- placeholder="请输入关键字"
- v-model="screenForm.keyword"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="18" class="tr">
- <el-form-item label="">
- <el-button size="small" @click="resetScreenForm"
- >清空</el-button
- >
- <el-button size="small" type="primary" @click="submitScreenForm"
- >搜索</el-button
- >
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </div>
- <div class="mymain-container">
- <div class="table">
- <el-table
- v-loading="listLoading"
- :data="dataList"
- element-loading-text="Loading"
- border
- fit
- highlight-current-row
- stripe
- >
- <el-table-column
- type="selection"
- align="center"
- min-width="100"
- ></el-table-column>
- <el-table-column
- align="center"
- label="使用组织"
- prop="useOrgId"
- min-width="100"
- ></el-table-column>
- <el-table-column
- align="center"
- label="编码"
- prop="number"
- min-width="100"
- label-class-name="bianma"
- class-name="fontstyle"
- ></el-table-column>
- <el-table-column
- align="center"
- label="名称"
- prop="name"
- min-width="100"
- ></el-table-column>
- <el-table-column
- align="center"
- label="规格型号"
- prop="specification"
- min-width="100"
- ></el-table-column>
- <el-table-column
- align="center"
- label="数据状态"
- prop="forbidStatus"
- min-width="100"
- >
- <template slot-scope="scope">
- <el-tag type="success" v-if="scope.row.forbidStatus=='A'">正常</el-tag>
- <el-tag type="danger" v-else>禁用</el-tag>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- label="是否维护商城资料"
- prop="maintainData"
- min-width="100"
- ></el-table-column>
- <el-table-column
- align="center"
- label="是否维护内外机档案"
- prop="maintainFiles"
- min-width="100"
- ></el-table-column>
- <el-table-column
- align="center"
- label="基本单位"
- prop="baseCompany"
- min-width="100"
- ></el-table-column>
- <el-table-column
- align="center"
- label="已使用"
- prop="used"
- min-width="100"
- ></el-table-column>
- <el-table-column
- align="center"
- label="操作"
- prop="caozuo"
- min-width="160"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <el-button type="text" class="textColor" @click="hanleDetail(scope.row.id)"
- >详情</el-button
- >
- <el-button type="text" class="textColor">删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <!-- 分页 -->
- <div class="fr">
- <el-pagination
- :current-page="currentPage"
- :page-sizes="[10, 20, 30, 50]"
- :page-size="10"
- layout="total, sizes, prev, pager, next, jumper"
- :total="listTotal"
- >
- </el-pagination>
- </div>
- </div>
- </div>
- <MaterialListDetail v-else :detail='detail'/>
- </div>
- </template>
- <script>
- import Mixin from "@/mixin/index";
- import { getMaterialList,getMaterialDetail } from "@/api/basic_data/material";
- import MaterialListDetail from "./components/material_list-detail.vue";
- export default {
- mixins: [Mixin],
- data() {
- return {
- isShow: true,
- screenForm: {
- // 筛选表单数据
- keyword: "", // 名称
- },
- };
- },
- components: { MaterialListDetail },
- methods: {
- hanleDetail(id) {
- getMaterialDetail({id}).then((res)=>{
- console.log(res);
- this.detail = res.data
- this.isShow = false;
- })
- },
- getList() {
- this.listLoading = true;
- let params = {
- pageNum: this.currentPage,
- pageSize: this.pageSize,
- keyword: this.screenForm.keyword,
- };
- getMaterialList(params).then((res) => {
- this.dataList = res.data.records;
- this.listTotal = res.data.total;
- this.listLoading = false;
- });
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- // ::v-deep .fontstyle {
- // color: #0909ff;
- // }
- // ::v-deep .bianma {
- // color: #409eff;
- // }
- </style>
|