| | |
| | | <template> |
| | | <div class="rightContent"> |
| | | <div class="top"> |
| | | <SearchCommonView :show-add="false" :placeholder="'请输入业务类型'" :amount-view="false" @searchClick="getList" /> |
| | | <SearchCommonView :show-add="false" :placeholder="'请输入业务类型'" |
| | | :amount-view="false" :showSreen="false" :searchTaskMap="SelectClick" |
| | | :screenArray="screenArray" |
| | | @switchKeywords="switchKeywordsList" |
| | | @delSelectClick="delSelectClick" @searchClick="getList" /> |
| | | </div> |
| | | <div class="content"> |
| | | <div class="list-view"> |
| | |
| | | :class="{ |
| | | overview_active: item.baseOperationType === 1, |
| | | overview_done: item.baseOperationType === 2, |
| | | overview_todo: item.baseOperationType === 3 |
| | | overview_todo: item.baseOperationType === 3, |
| | | }" |
| | | @click="labelClick(item)" |
| | | > |
| | |
| | | </div> |
| | | <div class="right"> |
| | | <div class="right_status" @click.stop="statusClick(item, 4)"> |
| | | <span style="cursor: pointer">{{ item.finishCount + " 完成" }}</span> |
| | | <span style="cursor: pointer">{{ item.finishCount + ' 完成' }}</span> |
| | | </div> |
| | | <!-- <div class="right_status" style="margin-top: 5px"> |
| | | <span style="cursor: pointer">4 延期</span> |
| | |
| | | </div> |
| | | <div class="right"> |
| | | <div class="right_status" @click.stop="statusClick(item, 5)"> |
| | | <span style="cursor: pointer">{{ item.cancelCount + " 已取消" }}</span> |
| | | <span style="cursor: pointer">{{ item.cancelCount + ' 已取消' }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | import { getOperationType } from "@/api/overview/overview" |
| | | |
| | | import pageMixin from '@/components/makepager/pager/mixin/pageMixin' |
| | | import { getOperationType } from '@/api/overview/overview' |
| | | import { getWarehouseList } from '@/api/warehouseManage/warehouse.js' |
| | | import Cookies from 'js-cookie' |
| | | export default { |
| | | name: "OverView", |
| | | name: 'OverView', |
| | | mixins: [pageMixin], |
| | | props: {}, |
| | | components: {}, |
| | |
| | | tableList: [], |
| | | editConfig: { |
| | | visible: false, |
| | | title: "新建", |
| | | title: '新建', |
| | | infomation: {}, |
| | | keyword: "" |
| | | keyword: '', |
| | | }, |
| | | pageSizes: [30, 45] |
| | | screenArray: [], |
| | | SelectClick: [], |
| | | pageSizes: [30, 45], |
| | | } |
| | | }, |
| | | created() { |
| | | this.pagerOptions.pageSize = 30 |
| | | this.queryWareHouse() |
| | | const username = Cookies.get('username') |
| | | this.SelectClick = JSON.parse(localStorage.getItem(username) || '[]') |
| | | this.getData() |
| | | }, |
| | | methods: { |
| | |
| | | labelClick(item, status) { |
| | | console.log(item) |
| | | this.$router.push({ |
| | | name: "overviewList", |
| | | query: { name: item.name, workType: item.baseOperationType+'', id: item.id+'', status: status,code:item.warehouse.code } |
| | | name: 'overviewList', |
| | | query: { name: item.name, warehouseId:item.warehouseId,workType: item.baseOperationType + '', id: item.id + '', status: status, code: item.warehouse.code }, |
| | | }) |
| | | }, |
| | | async getData() { |
| | | //筛选id数组 |
| | | let $arr = []; |
| | | this.SelectClick.forEach((e) => { |
| | | $arr.push(e.id) |
| | | }); |
| | | await getOperationType({ |
| | | keyword: this.keyword, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | pageSize: this.pagerOptions.pageSize, |
| | | warehouseIds:$arr.join(',') |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | const list = res.data.map((item) => { |
| | | return { |
| | | ...item |
| | | ...item, |
| | | } |
| | | }) |
| | | this.tableList = list || [] |
| | |
| | | } |
| | | }) |
| | | }, |
| | | async queryWareHouse() { |
| | | const { code, data } = await getWarehouseList({ page: 0, pageSize: 0, keyword: '' }) |
| | | this.screenArray = [] |
| | | if (code === 200) { |
| | | data.forEach((e) => { |
| | | this.screenArray.push({ |
| | | id: e.id, |
| | | title: e.name, |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | handleCommand(val) { |
| | | console.log(val) |
| | | if (val.command === "全部") { |
| | | this.labelClick(val.item, "") |
| | | if (val.command === '全部') { |
| | | this.labelClick(val.item, '') |
| | | } else { |
| | | this.labelClick(val.item, val.command) |
| | | } |
| | |
| | | moreClick() {}, |
| | | // 状态 |
| | | statusClick(item, status) { |
| | | console.log(item) |
| | | this.labelClick(item, status) |
| | | }, |
| | | //筛选 |
| | | switchKeywordsList(item) { |
| | | this.SelectClick = item |
| | | const username = Cookies.get('username') |
| | | localStorage.setItem(username, JSON.stringify(item)) |
| | | this.getData() |
| | | }, |
| | | //删除筛选 |
| | | delSelectClick(item) { |
| | | this.SelectClick.forEach((e, i) => { |
| | | if (e.id == item.id) { |
| | | this.SelectClick.splice(i, 1) |
| | | } |
| | | }) |
| | | const username = Cookies.get('username') |
| | | if (this.SelectClick.length > 0) { |
| | | localStorage.setItem(username, JSON.stringify(this.SelectClick)) |
| | | } else { |
| | | localStorage.removeItem(username) |
| | | } |
| | | this.getData() |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |