| | |
| | | <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" @searchClick="getList" /> |
| | | </div> |
| | | <div class="content"> |
| | | <div class="list-view"> |
| | |
| | | v-for="item in tableList" |
| | | :key="item.id" |
| | | :class="{ |
| | | overview_active: item.status === 'active', |
| | | overview_done: item.status === 'done', |
| | | overview_todo: item.status === 'todo' |
| | | overview_active: item.baseOperationType === 1, |
| | | overview_done: item.baseOperationType === 2, |
| | | overview_todo: item.baseOperationType === 3 |
| | | }" |
| | | @click="labelClick(item)" |
| | | > |
| | | <div class="top"> |
| | | <div class="label"> |
| | | <span style="cursor: pointer" @click="labelClick(item)">{{ item.name }}</span> |
| | | <span style="cursor: pointer">{{ item.name }}</span> |
| | | </div> |
| | | <div class="set">...</div> |
| | | <el-dropdown class="set" placement="bottom" trigger="click" @command="handleCommand"> |
| | | <div @click.stop="moreClick()">...</div> |
| | | <el-dropdown-menu slot="dropdown"> |
| | | <el-dropdown-item :command="{ command: 0, item }">全部</el-dropdown-item> |
| | | <el-dropdown-item :command="{ command: 3, item }">就绪</el-dropdown-item> |
| | | <el-dropdown-item :command="{ command: 4, item }">完成</el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | </div> |
| | | <div class="bottom"> |
| | | <div class="left"> |
| | | <div class="left_view"> |
| | | <span>2</span> |
| | | <span style="margin-left: 5px">待处理</span> |
| | | <div class="left_view" @click.stop="statusClick(item, 3)"> |
| | | <span>{{ item.readyCount }}</span> |
| | | <span style="margin-left: 5px">就绪</span> |
| | | </div> |
| | | </div> |
| | | <div class="right"> |
| | | <div class="right_status"> |
| | | <span style="cursor: pointer">2 正在等待</span> |
| | | <div class="right_status" @click.stop="statusClick(item, 4)"> |
| | | <span style="cursor: pointer">{{ item.finishCount + " 完成" }}</span> |
| | | </div> |
| | | <div class="right_status" style="margin-top: 5px"> |
| | | <!-- <div class="right_status" style="margin-top: 5px"> |
| | | <span style="cursor: pointer">4 延期</span> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="btn-pager"> |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | | <PagerView class="page" :page-sizes="pageSizes" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | <script> |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | import { getOperationType } from "@/api/overview/overview" |
| | | |
| | | export default { |
| | | name: "OverView", |
| | |
| | | computed: {}, |
| | | data() { |
| | | return { |
| | | tableList: [ |
| | | { |
| | | name: "采购入库", |
| | | status: "active", |
| | | workType: "收货" |
| | | }, |
| | | { |
| | | name: "内部调拨", |
| | | status: "done", |
| | | workType: "内部调拨" |
| | | }, |
| | | { |
| | | name: "订单发货出库", |
| | | status: "done", |
| | | workType: "发货" |
| | | }, |
| | | { |
| | | name: "2", |
| | | status: "active", |
| | | workType: "收货" |
| | | }, |
| | | { |
| | | name: "3", |
| | | status: "todo", |
| | | workType: "收货" |
| | | }, |
| | | { |
| | | name: "2", |
| | | status: "active", |
| | | workType: "收货" |
| | | }, |
| | | { |
| | | name: "3", |
| | | status: "todo", |
| | | workType: "收货" |
| | | } |
| | | ], |
| | | tableList: [], |
| | | editConfig: { |
| | | visible: false, |
| | | title: "新建", |
| | | infomation: {} |
| | | } |
| | | infomation: {}, |
| | | keyword: "" |
| | | }, |
| | | pageSizes: [30, 45] |
| | | } |
| | | }, |
| | | created() {}, |
| | | created() { |
| | | this.pagerOptions.pageSize = 30 |
| | | this.getData() |
| | | }, |
| | | methods: { |
| | | getList(val) { |
| | | console.log(val) |
| | | this.keyword = val |
| | | this.getData() |
| | | }, |
| | | labelClick(item) { |
| | | this.$router.push({ path: "/overview/overviewList", query: { name: item.name, workType: item.workType } }) |
| | | labelClick(item, status) { |
| | | console.log(item) |
| | | this.$router.push({ |
| | | name: "overviewList", |
| | | params: { name: item.name, workType: item.baseOperationType, id: item.id, status: status,code:item.warehouse.code } |
| | | }) |
| | | }, |
| | | getData() {} |
| | | async getData() { |
| | | await getOperationType({ |
| | | keyword: this.keyword, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }).then((res) => { |
| | | console.log(res.data) |
| | | if (res.code === 200) { |
| | | const list = res.data.map((item) => { |
| | | return { |
| | | ...item |
| | | } |
| | | }) |
| | | this.tableList = list || [] |
| | | this.pagerOptions.totalCount = res.total |
| | | } |
| | | }) |
| | | }, |
| | | handleCommand(val) { |
| | | console.log(val) |
| | | 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) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <!-- Add "scoped" attribute to limit CSS to this component only --> |
| | | <style lang="scss" scoped> |
| | | .content { |
| | | height: calc(100% - 150px); |
| | | height: calc(100% - 112px); |
| | | background: #fff; |
| | | border-radius: 12px; |
| | | .list-view { |
| | |
| | | box-shadow: inset 0 0 2px #dee2e6; |
| | | -moz-box-shadow: inset 0 0 2px #dee2e6; |
| | | -webkit-box-shadow: inset 0 0 2px #dee2e6; |
| | | cursor: pointer; |
| | | .top { |
| | | height: 35px; |
| | | line-height: 35px; |
| | |
| | | margin-left: auto; |
| | | margin-right: 20px; |
| | | font-size: 20px; |
| | | cursor: no-drop; |
| | | // cursor: no-drop; |
| | | color: #000; |
| | | transform: rotate(-90deg); |
| | | -moz-transform: rotate(-90deg); |
| | |
| | | .bottom { |
| | | display: flex; |
| | | font-size: 13px; |
| | | margin-top: 30px; |
| | | .left { |
| | | width: 50%; |
| | | // background: #1d80e2; |
| | |
| | | .right { |
| | | width: 50%; |
| | | .right_status { |
| | | margin-top: 5px; |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .btn-pager { |
| | | margin-top: 0; |
| | | } |
| | | </style> |