| | |
| | | :page="page" |
| | | /> |
| | | </el-dialog> |
| | | <AddContracts ref="addContractsRef" /> |
| | | <AddContracts ref="addContractsRef" :operationType="operationType" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import AddContracts from "./AddContracts.vue"; |
| | | import { getInsOrderOnInspection } from "@/api/cnas/process/demand/demand.js" |
| | | |
| | | export default { |
| | | name: 'EditDemand', |
| | | components: { |
| | |
| | | return { |
| | | visible: false, |
| | | search: {}, |
| | | operationType: '', |
| | | column: [ |
| | | { label: '序号', minWidth: '100px' }, |
| | | { label: '委托编号', minWidth: '100px' }, |
| | |
| | | name: "新增委托单", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.$refs.addContractsRef.open() |
| | | this.operationType = 'add' |
| | | this.$refs.addContractsRef.open(row) |
| | | } |
| | | } |
| | | ], |
| | |
| | | }, |
| | | } |
| | | }, |
| | | // 打开弹窗 |
| | | methods: { |
| | | open() { |
| | | open(type) { |
| | | this.visible = true |
| | | this.operationType = type |
| | | this.getTableData() |
| | | }, |
| | | openAddContracts(row) { |
| | | this.operationType = 'edit' |
| | | this.$refs.addContractsRef.open(row) |
| | | }, |
| | | async getTableData() { |
| | | // 查询当前弹窗表数据 |
| | | const { code, data } = await getInsOrderOnInspection({ |
| | | ...this.search, ...this.page |
| | | }) |
| | | if (code === 200) { |
| | | this.tableData = data |
| | | } |
| | | } |
| | | } |
| | | } |