| | |
| | | <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="'新建'" |
| | |
| | | <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="addName" |
| | | :display-edit="displayEdit" |
| | |
| | | formLabel: "", |
| | | toLabel: "", |
| | | addName: "", |
| | | searchTaskMap: [] |
| | | searchTaskMap: [], |
| | | numberLabel: "单号" |
| | | } |
| | | }, |
| | | created() { |
| | | console.log(this.workType) |
| | | this.setFormToLabel() |
| | | this.setTable() |
| | | var paramsData = sessionStorage.getItem("paramsData") |
| | |
| | | if (this.workType === 1) { |
| | | this.formLabel = "供应商位置" |
| | | this.toLabel = "仓库位置" |
| | | this.numberLabel = "入库单号" |
| | | } else if (this.workType === 2) { |
| | | this.formLabel = "仓库位置" |
| | | this.toLabel = "客户位置" |
| | | this.numberLabel = "出库单号" |
| | | } else { |
| | | this.formLabel = "调出位置" |
| | | this.toLabel = "调入位置" |
| | | this.numberLabel = "调拨单号" |
| | | } |
| | | }, |
| | | setTable() { |
| | |
| | | setTableColumn(showcol) { |
| | | let tableColumn = [ |
| | | { |
| | | label: "单号", |
| | | label: this.numberLabel, |
| | | prop: "number", |
| | | isShowColumn: true, |
| | | default: true |
| | |
| | | async getData() { |
| | | await getOperation({ |
| | | number: this.keyword, |
| | | operationTypeId: this.params.id, |
| | | operationTypeId: this.$route.params.id ? this.$route.params.id : this.params.id, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize, |
| | | status: this.params.status |
| | |
| | | const list = res.data.map((item) => { |
| | | return { |
| | | ...item, |
| | | from: item.fromLocation.name, |
| | | to: item.toLocation.name |
| | | from: item.location.jointName, |
| | | to: item.location.jointName |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | |
| | | }, |
| | | // 查看 编辑 |
| | | tableRowClick(row, val) { |
| | | console.log(row) |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = val |
| | | this.editConfig.operationTypeId = this.params.id |
| | | this.editConfig.code = this.params.code |
| | | row.details.map((item)=>{ |
| | | item.fromLocationId=item.fromLocation.jointName |
| | | item.toLocationId=item.toLocation.jointName |
| | | }) |
| | | row.location={ |
| | | value:row.location.id||row.location.value, |
| | | label:row.location.jointName||row.location.label |
| | | } |
| | | row.toLocation={ |
| | | value:row.toLocation.id||row.toLocation.value, |
| | | label:row.toLocation.jointName||row.toLocation.label |
| | | } |
| | | row.locationID=row.location.jointName |
| | | row.locationId=row.location.value |
| | | |
| | | // row.tolocationId=row.tolocation.value |
| | | this.editConfig.infomation = { ...row } |
| | | }, |
| | | // 新建 |
| | | addBtnClick() { |
| | | this.editConfig.title = "新建" |
| | | this.addName = this.params.name |
| | | console.log(this.params, "ss刷新") |
| | | this.editConfig.operationTypeId = this.params.id |
| | | this.editConfig.code = this.params.code |
| | | this.editConfig.infomation = {} |
| | | this.editConfig.infomation = { |
| | | // location:{jointName:""} |
| | | } |
| | | this.editConfig.visible = true |
| | | }, |
| | | // 状态 |
| | | getStatus(val) { |
| | | return val === 1 ? "草稿" : val === 3 ? "就绪" : val === 4 ? "完成" : "" |
| | | return val === 1 ? "草稿" : val === 3 ? "就绪" : val === 4 ? "完成" : val === 5 ? "取消" : "" |
| | | }, |
| | | // 删除搜索状态 |
| | | delSelectClick() { |