| | |
| | | <template> |
| | | <div class="silkStandardSetting-container"> |
| | | <div class="filter-card"> |
| | | <CommonSearch ref="searchRef" :show-add="false" :amount-view="false" placeholder="请输入关键词" @searchClick="onFilterSearch"> |
| | | <CommonSearch ref="searchRef" :show-add="false" :amount-view="false" placeholder="请输入关键词" |
| | | @searchClick="onFilterSearch"> |
| | | <template slot="leftButton"> |
| | | <el-button size="small" type="primary" @click="addBtnClick" >新增</el-button> |
| | | <el-button size="small" type="primary" @click="addBtnClick">新增</el-button> |
| | | <el-button size="small" type="primary" @click="refreshClick">刷新</el-button> |
| | | <el-button size="small" type="primary" @click="printClick">打印</el-button> |
| | | </template> |
| | |
| | | </div> |
| | | <div class="body-card"> |
| | | <div class="list-view"> |
| | | <TableCommonView |
| | | :table-list="tableList" |
| | | @selTableCol="selTableCol" |
| | | @handleShow="handleShow" |
| | | @tableRowClick="tableRowClick" |
| | | > |
| | | <TableCommonView :table-list="tableList" @selTableCol="selTableCol" @handleShow="handleShow" |
| | | @tableRowClick="tableRowClick"> |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="180"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click.stop="handleClick(scope.row, '查看')" type="text" size="small">查看</el-button> |
| | | <el-button @click.stop="handleClick(scope.row, '修改')" type="text" size="small">修改</el-button> |
| | | <el-button @click.stop="handleClick(scope.row, '删除')" type="text" size="small">删除</el-button> |
| | | |
| | | |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | | </div> |
| | | </div> |
| | | <AddWorkshop |
| | | ref="bomTypeDialog" |
| | | @handleConfirmSave="handleConfirmSave" |
| | | :workList="workList" |
| | | title="添加节点类型" |
| | | /> |
| | | <AddDataDictionaries |
| | | :editDiaConfig="editConfig" |
| | | /> |
| | | <AddWorkshop ref="bomTypeDialog" @handleConfirmSave="handleConfirmSave" :workList="workList" title="添加节点类型" /> |
| | | <AddDataDictionaries :editDiaConfig="editConfig" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import AddDataDictionaries from "@/views/systemSetting/workshopManage/components/addDialog.vue" |
| | | import { getWorkshopManageList,deleteWorkshopManage } from "@/api/systemSetting/workshopManage" |
| | | import { getWorkshopManageList, deleteWorkshopManage } from "@/api/systemSetting/workshopManage" |
| | | import TableCommonView from '@/components/makepager/TableCommonView.vue' |
| | | import AddWorkshop from '@/views/systemSetting/workshopManage/components/addWorkshop.vue' |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | export default { |
| | | name: "workshopManage", |
| | | props: {}, |
| | | components: { TableCommonView,AddWorkshop,AddDataDictionaries }, |
| | | components: { TableCommonView, AddWorkshop, AddDataDictionaries }, |
| | | mixins: [pageMixin], |
| | | computed: {}, |
| | | data() { |
| | |
| | | showCol: ["车间", "组别", "开始车号", "结束车号", "半车标志", "备注"], |
| | | tableColumn: [ |
| | | // { label: "车间", prop: "workshopNumber",iconRight:"el-icon-setting"}, |
| | | { label: "车间", prop: "workshopNumber",}, |
| | | { label: "车间", prop: "workshopName", }, |
| | | { label: "组别", prop: "groupNumber", }, |
| | | { label: "开始车号", prop: "startCarNumber" }, |
| | | { label: "结束车号", prop: "endCarNumber" }, |
| | | { label: "半车标志", prop: "carFlag",isCallMethod: true, getCallMethod: this.getStatusCarFlag }, |
| | | { label: "半车标志", prop: "carFlag", isCallMethod: true, getCallMethod: this.getStatusCarFlag }, |
| | | { label: "备注", prop: "notes", }, |
| | | ], |
| | | // 类型 |
| | |
| | | getDataParams: { |
| | | keyWord: '', |
| | | }, |
| | | editConfig:{ |
| | | visible:false, |
| | | infomitton:{ |
| | | TabsIndex:0, |
| | | workshopId:null, |
| | | editConfig: { |
| | | visible: false, |
| | | infomitton: { |
| | | TabsIndex: 0, |
| | | workshopId: null, |
| | | } |
| | | }, |
| | | } |
| | |
| | | this.tableList.tableColumn = this.setColumnVisible(val, this.tableColumn) |
| | | }, |
| | | // 表格行点击 |
| | | tableRowClick(row){ |
| | | console.log(row,"row") |
| | | tableRowClick(row) { |
| | | console.log(row, "row") |
| | | }, |
| | | // 搜索 |
| | | onFilterSearch(searchText) { |
| | | this.getDataParams.keyWord=searchText, |
| | | this.getData() |
| | | this.getDataParams.keyWord = searchText, |
| | | this.getData() |
| | | }, |
| | | // 新增 |
| | | addBtnClick() { |
| | | this.editConfig.infomitton={} |
| | | this.editConfig.dialogTitle="新增" |
| | | this.editConfig.visible=true |
| | | this.editConfig.infomitton = {} |
| | | this.editConfig.dialogTitle = "新增" |
| | | this.editConfig.visible = true |
| | | }, |
| | | // 保存 |
| | | saveBtnClick(){ |
| | | saveBtnClick() { |
| | | |
| | | }, |
| | | // 刷新 |
| | |
| | | this.getDataParams.keyWord = "" |
| | | this.pagerOptions.currPage = 1 |
| | | this.pagerOptions.pageSize = 15 |
| | | this.$refs.searchRef.searchInput="" |
| | | this.$refs.searchRef.searchInput = "" |
| | | this.getData() |
| | | }, |
| | | // 打印 |
| | | printClick() {}, |
| | | printClick() { }, |
| | | // 删除 |
| | | delBtnClick(){}, |
| | | delBtnClick() { }, |
| | | // 组别 |
| | | handleShow(){ |
| | | handleShow() { |
| | | this.$refs.bomTypeDialog.editDialogVisible = true; |
| | | }, |
| | | handleGetBomKindDictList() { |
| | |
| | | return "--"; |
| | | } |
| | | }, |
| | | handleClick(row,type){ |
| | | if(type==="查看"){ |
| | | this.editConfig.infomitton=row |
| | | this.editConfig.infomitton.workshopId=row.ID |
| | | this.editConfig.infomitton.workshopNumber=Number(this.editConfig.infomitton.workshopNumber) |
| | | this.editConfig.dialogTitle=type |
| | | this.editConfig.visible=true |
| | | }else if(type==="修改"){ |
| | | this.editConfig.infomitton=row |
| | | this.editConfig.infomitton.workshopId=row.ID |
| | | this.editConfig.dialogTitle=type |
| | | this.editConfig.visible=true |
| | | }else if(type==="删除"){ |
| | | this.$confirm(`确认删除${row.name}吗?`, '提示', { |
| | | handleClick(row, type) { |
| | | if (type !== "删除") { |
| | | this.editConfig.infomitton = { |
| | | ...row, |
| | | workshop:{ |
| | | ID:row.workshopNumber, |
| | | name:row.workshopName |
| | | } |
| | | } |
| | | this.editConfig.infomitton.workshopId = row.ID |
| | | this.editConfig.infomitton.workshopNumber = Number(this.editConfig.infomitton.workshopNumber) |
| | | this.editConfig.dialogTitle = type |
| | | this.editConfig.visible = true |
| | | } else if (type === "删除") { |
| | | this.$confirm(`确认删除吗?`, '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteWorkshopManage({id:row.ID}).then((res)=>{ |
| | | if(res&&res.code===200){ |
| | | deleteWorkshopManage({ id: row.ID }).then((res) => { |
| | | if (res && res.code === 200) { |
| | | this.getData() |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | }); |
| | | } |
| | | }) |
| | | }) |
| | | }).catch(() => { |
| | | console.log("取消删除") |
| | | }); |
| | | } |
| | | } |
| | | } |
| | |
| | | <style lang="scss" scoped> |
| | | .silkStandardSetting-container { |
| | | height: 100%; |
| | | |
| | | .filter-card { |
| | | margin: 20px 30px; |
| | | height: 80px; |
| | |
| | | border-radius: 4px; |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .body-card { |
| | | margin: 0 30px; |
| | | background-color: #fff; |
| | | padding: 10px 15px; |
| | | height: calc(100% - 180px); |
| | | border-radius: 4px; |
| | | |
| | | .edit-save { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 10px; |
| | | |
| | | .edit-save-icon { |
| | | font-size: 24px; |
| | | color: #5582f3; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .edit-sace-label { |
| | | margin-left: 10px; |
| | | font-size: 14px; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .list-view { |
| | | height: calc(100% - 60px); |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .btn-pager { |
| | | display: flex; |
| | | margin-top: 10px; |
| | | |
| | | .page { |
| | | margin-left: auto; |
| | | } |