| | |
| | | <template> |
| | | <div class="rightContent"> |
| | | <div class="label-fixed-element"> |
| | | <!-- <div class="label-fixed-element"> |
| | | <span>{{ params.name }}</span> |
| | | </div> |
| | | </div> --> |
| | | <div class="top"> |
| | | <SearchCommonView |
| | | :add-title="'新建'" |
| | | :placeholder="'请输入单号/来源单据'" |
| | | :amount-view="false" |
| | | :search-task-map="searchTaskMap" |
| | | @addCommonClick="addBtnClick" |
| | | @searchClick="getList" |
| | | @delSelectClick="delSelectClick" |
| | | /> |
| | | </div> |
| | | <div class="list-view"> |
| | |
| | | <template slot-scope="scope"> |
| | | <el-button @click="tableRowClick(scope.row, '查看')" type="text" size="small">查看</el-button> |
| | | <el-button |
| | | v-if="scope.row.status !== 4" |
| | | v-if="scope.row.status !== 4&&scope.row.status !== 5" |
| | | @click="tableRowClick(scope.row, '编辑')" |
| | | type="text" |
| | | size="small" |
| | |
| | | <!-- 新建/编辑 --> |
| | | <AddOverviewDialog |
| | | v-if="editConfig.visible" |
| | | :work-type="workType" |
| | | :workType="workType" |
| | | :edit-common-config="editConfig" |
| | | :add-name="this.$route.params.name" |
| | | :add-name="addName" |
| | | :display-edit="displayEdit" |
| | | /> |
| | | </div> |
| | |
| | | searchOptions: [], |
| | | commonDetail: { |
| | | visible: false, |
| | | title: "新建", |
| | | title: "新建" |
| | | , |
| | | infomation: {} |
| | | }, |
| | | editConfig: { |
| | |
| | | params: {}, |
| | | displayEdit: false, |
| | | formLabel: "", |
| | | toLabel: "" |
| | | toLabel: "", |
| | | addName: "", |
| | | searchTaskMap: [] |
| | | } |
| | | }, |
| | | created() { |
| | | console.log(this.workType) |
| | | this.setFormToLabel() |
| | | this.setTable() |
| | | var paramsData = sessionStorage.getItem("paramsData") |
| | |
| | | sessionStorage.setItem("paramsData", JSON.stringify(params)) |
| | | } |
| | | this.params = params |
| | | this.searchTaskMap = |
| | | this.params.status > 0 ? [{ id: this.params.id, title: this.getStatus(this.params.status) }] : [] |
| | | this.getData() |
| | | // console.log(this.$route.params.workType) |
| | | }, |
| | |
| | | }, |
| | | // 查看 编辑 |
| | | tableRowClick(row, val) { |
| | | console.log(row) |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = val |
| | | this.editConfig.operationTypeId = this.$route.params.id |
| | | this.editConfig.operationTypeId = this.params.id |
| | | this.editConfig.infomation = { ...row } |
| | | }, |
| | | // 新建 |
| | | addBtnClick() { |
| | | this.editConfig.title = "新建" |
| | | this.editConfig.operationTypeId = this.$route.params.id |
| | | this.editConfig.code=this.$route.params.code |
| | | this.addName = this.params.name |
| | | this.editConfig.operationTypeId = this.params.id |
| | | this.editConfig.code = this.params.code |
| | | this.editConfig.infomation = {} |
| | | this.editConfig.visible = true |
| | | }, |
| | | // 状态 |
| | | getStatus(val) { |
| | | return val === 1 ? "草稿" : val === 3 ? "就绪" : "完成" |
| | | return val === 1 ? "草稿" : val === 3 ? "就绪" : val === 4 ? "完成" :val === 5 ? "取消" : "" |
| | | }, |
| | | // 删除搜索状态 |
| | | delSelectClick() { |
| | | this.params.status = 0 |
| | | this.getData() |
| | | } |
| | | } |
| | | } |