库存预览跳转带出单据的状态及仓库位置列表默认展示内部位置
| | |
| | | <template v-if="selectArr?.length > 0" slot="prepend"> |
| | | <div style="display: flex"> |
| | | <div v-for="(val, i) in selectArr" :key="i" class="pre-views"> |
| | | <span style="margin-left: 5px">{{ val.title }}</span> |
| | | <span style="margin-left: 5px">{{ val?.title ?? val }}</span> |
| | | <i @click="delSelectClick(val)" class="el-icon-close" style="margint: 0 5px"></i> |
| | | </div> |
| | | </div> |
| | |
| | | trigger="click" |
| | | :hide-on-click="false" |
| | | placement="bottom" |
| | | @command="switchStatusKeywords($event, selList)" |
| | | @command="switchKeywords($event, selList)" |
| | | > |
| | | <div class="common yes-cursor"> |
| | | <img src="@/assets/img/shaixuan.png" style="width: 10px" /> |
| | |
| | | <el-dropdown-item |
| | | v-for="(item, key) in screenArray" |
| | | :key="key" |
| | | :command="{ command: item.title, ...item }" |
| | | :command="item.title" |
| | | :class="{ selected: status == item.title }" |
| | | > |
| | | <div class="dropdown-view"> |
| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.searchTaskMap.forEach((ele) => { |
| | | this.selList.push(ele.title) |
| | | }) |
| | | this.selectArr = this.searchTaskMap |
| | | }, |
| | | methods: { |
| | |
| | | inspectionConfigClick() { |
| | | this.$emit("inspectionConfigClick") |
| | | }, |
| | | switchStatusKeywords(command, item) { |
| | | console.log("index", command) |
| | | switchKeywords(command, item) { |
| | | console.log("index", command, item) |
| | | this.status = command |
| | | const oldValue = item |
| | | console.log(oldValue) |
| | |
| | | } else { |
| | | oldValue.push(command) |
| | | } |
| | | this.$emit("switchKeywords", item) |
| | | }, |
| | | // 删除筛选内容 |
| | | delSelectClick(item) { |
| | |
| | | } |
| | | } |
| | | .selected { |
| | | color: #409eff; |
| | | color: #606266; |
| | | } |
| | | .dropdown-view { |
| | | position: relative; |
| | |
| | | :placeholder="'请输入位置/产品'" |
| | | :amount-view="false" |
| | | :search-task-map="searchTaskMap" |
| | | :show-sreen="false" |
| | | :screen-array="screenArray" |
| | | @addCommonClick="addProductClick" |
| | | @searchClick="getList" |
| | | @discardBtnClick="discardBtnClick" |
| | | @delSelectClick="delSelectClick" |
| | | @switchKeywords="switchKeywords" |
| | | /> |
| | | </div> |
| | | <div class="content_wrap"> |
| | |
| | | data() { |
| | | return { |
| | | datas: [], |
| | | // datas: [{ |
| | | // label: '一级 1', |
| | | // children: [{ |
| | | // label: '二级 1-1', |
| | | // children: [{ |
| | | // label: '三级 1-1-1' |
| | | // }] |
| | | // }] |
| | | // }, { |
| | | // label: '一级 2', |
| | | // children: [{ |
| | | // label: '二级 2-1', |
| | | // children: [{ |
| | | // label: '三级 2-1-1' |
| | | // }] |
| | | // }, { |
| | | // label: '二级 2-2', |
| | | // children: [{ |
| | | // label: '三级 2-2-1' |
| | | // }] |
| | | // }] |
| | | // }, { |
| | | // label: '一级 3', |
| | | // children: [{ |
| | | // label: '二级 3-1', |
| | | // children: [{ |
| | | // label: '三级 3-1-1' |
| | | // }] |
| | | // }, { |
| | | // label: '二级 3-2', |
| | | // children: [{ |
| | | // label: '三级 3-2-1' |
| | | // }] |
| | | // }] |
| | | // }], |
| | | defaultProps: { |
| | | children: "children", |
| | | label: "jointName" |
| | |
| | | unit: "", |
| | | reorderId: 0, |
| | | searchTaskMap: [], |
| | | type: "bh" |
| | | type: "bh", |
| | | screenArray: [{ id: "0", type: "bh", title: "重新订购" }] |
| | | } |
| | | }, |
| | | created() { |
| | | this.setTable() |
| | | this.searchTaskMap = [{ type: this.type, title: "重新订购" }] |
| | | this.searchTaskMap = [{ id: "0", type: this.type, title: "重新订购" }] |
| | | this.getData() |
| | | this.getLocationList() |
| | | }, |
| | |
| | | delSelectClick() { |
| | | this.type = "" |
| | | this.getData() |
| | | }, |
| | | switchKeywords(item) { |
| | | console.log(item, "switchKeywords") |
| | | this.type = item?.length > 0 ? "bh" : "" |
| | | this.getData() |
| | | } |
| | | } |
| | | } |
| | |
| | | :add-title="'新建'" |
| | | :placeholder="'请输入单号/来源单据'" |
| | | :amount-view="false" |
| | | :search-task-map="searchTaskMap" |
| | | @addCommonClick="addBtnClick" |
| | | @searchClick="getList" |
| | | @delSelectClick="delSelectClick" |
| | | /> |
| | | </div> |
| | | <div class="list-view"> |
| | |
| | | displayEdit: false, |
| | | formLabel: "", |
| | | toLabel: "", |
| | | addName: "" |
| | | addName: "", |
| | | searchTaskMap: [] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | 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) |
| | | }, |
| | |
| | | }, |
| | | // 状态 |
| | | getStatus(val) { |
| | | return val === 1 ? "草稿" : val === 3 ? "就绪" : "完成" |
| | | return val === 1 ? "草稿" : val === 3 ? "就绪" : val === 4 ? "完成" : "" |
| | | }, |
| | | // 删除搜索状态 |
| | | delSelectClick() { |
| | | this.params.status = 0 |
| | | this.getData() |
| | | } |
| | | } |
| | | } |
| | |
| | | :add-title="'新建'" |
| | | :placeholder="'请输入单号'" |
| | | :amount-view="false" |
| | | :search-task-map="searchTaskMap" |
| | | @addCommonClick="addBtnClick" |
| | | @searchClick="getList" |
| | | @delSelectClick="delSelectClick" |
| | | /> |
| | | </div> |
| | | <div class="list-view"> |
| | | <div class="table"> |
| | | <TableCommonView |
| | | ref="tableListRef" |
| | | :table-list="tableList" |
| | | :show-checkcol="false" |
| | | > |
| | | <template slot="tableButton"> |
| | | <TableCommonView ref="tableListRef" :table-list="tableList" :show-checkcol="false"> |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="120" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | @click="tableRowClick(scope.row,'edit')" |
| | | type="text" |
| | | size="small" |
| | | >编辑</el-button |
| | | > |
| | | <el-button |
| | | type="text" |
| | | size="small" |
| | | @click="tableRowClick(scope.row,'look')" |
| | | >查看</el-button |
| | | > |
| | | <el-button @click="tableRowClick(scope.row, 'edit')" type="text" size="small">编辑</el-button> |
| | | <el-button type="text" size="small" @click="tableRowClick(scope.row, 'look')">查看</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | | </TableCommonView> |
| | | </TableCommonView> |
| | | </div> |
| | | <div class="btn-pager"> |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | |
| | | title: "新建", |
| | | infomation: {} |
| | | }, |
| | | positionTypeList: getDataByType("positionType") |
| | | positionTypeList: getDataByType("positionType"), |
| | | searchTaskMap: [], |
| | | type: 3 |
| | | } |
| | | }, |
| | | created() { |
| | | this.setTable() |
| | | this.searchTaskMap = [{ id: "3", title: "内部位置" }] |
| | | this.getData() |
| | | }, |
| | | methods: { |
| | |
| | | // 请求数据 |
| | | async getData() { |
| | | await getLocationList({ |
| | | type: this.type, |
| | | keyword: this.keyword, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | |
| | | this.getData() |
| | | }, |
| | | // 行点击 |
| | | tableRowClick(row,val) { |
| | | this.editConfig.title = val=='look'?'查看':"编辑" |
| | | tableRowClick(row, val) { |
| | | this.editConfig.title = val == "look" ? "查看" : "编辑" |
| | | this.editConfig.infomation = { ...row } |
| | | this.editConfig.infomation.parentId = this.editConfig.infomation.parentId?Number(this.editConfig.infomation.parentId):null |
| | | this.editConfig.infomation.parentId = this.editConfig.infomation.parentId |
| | | ? Number(this.editConfig.infomation.parentId) |
| | | : null |
| | | this.editConfig.visible = true |
| | | }, |
| | | // 新建 |
| | |
| | | } |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = "新建" |
| | | }, |
| | | // 删除位置 |
| | | delSelectClick() { |
| | | this.type = 0 |
| | | this.getData() |
| | | } |
| | | } |
| | | } |