| | |
| | | <div class="top"> |
| | | <SearchCommonView |
| | | :add-title="'新建'" |
| | | :placeholder="'请输入单号'" |
| | | :placeholder="'请输入单号/来源单据'" |
| | | :amount-view="false" |
| | | @addCommonClick="addBtnClick" |
| | | @searchClick="getList" |
| | |
| | | </div> |
| | | <div class="list-view"> |
| | | <div class="table"> |
| | | <TableCommonView |
| | | ref="tableListRef" |
| | | :table-list="tableList" |
| | | @selTableCol="selTableCol" |
| | | @tableRowClick="tableRowClick" |
| | | ></TableCommonView> |
| | | <TableCommonView ref="tableListRef" :table-list="tableList" @selTableCol="selTableCol"> |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click="tableRowClick(scope.row, '查看')" type="text" size="small">查看</el-button> |
| | | <el-button |
| | | v-if="scope.row.status !== 4" |
| | | @click="tableRowClick(scope.row, '编辑')" |
| | | type="text" |
| | | size="small" |
| | | >编辑</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | | </TableCommonView> |
| | | </div> |
| | | <div class="btn-pager"> |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | | </div> |
| | | </div> |
| | | <!-- 新建/编辑 --> |
| | | <AddOverviewDialog v-if="editConfig.visible" :work-type="'内部调拨'" :edit-common-config="editConfig" /> |
| | | <AddOverviewDialog |
| | | v-if="editConfig.visible" |
| | | :show-operation-type="true" |
| | | :work-type="3" |
| | | :edit-common-config="editConfig" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | import { getProductList } from "@/api/product/product" |
| | | import { getAllList } from "@/api/overview/overview" |
| | | // import DetailProduct from "@/views/productManage/product/DetailProduct" |
| | | import AddOverviewDialog from "@/views/overview/AddOverviewDialog" |
| | | |
| | |
| | | data() { |
| | | return { |
| | | tableList: {}, |
| | | showcol: ["从", "至", "联系人", "日期", "来源单据", "公司", "状态"], |
| | | showcol: ["调出位置", "调入位置", "联系人", "日期", "来源单据", "公司", "状态"], |
| | | searchOptions: [], |
| | | commonDetail: { |
| | | visible: false, |
| | | title: "新建", |
| | | infomation: {} |
| | | }, |
| | | editConfig: { |
| | | visible: false, |
| | | title: "新建", |
| | | infomation: {} |
| | | } |
| | | }, |
| | | keyword: "" |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | setTable() { |
| | | this.tableList = { |
| | | tableInfomation: [], |
| | | selectBox: true, |
| | | selectBox: false, |
| | | selectIndex: true, |
| | | showcol: this.showcol, |
| | | allcol: [], |
| | | tableColumn: this.setTableColumn(this.showcol) |
| | |
| | | let tableColumn = [ |
| | | { |
| | | label: "单号", |
| | | prop: "id", |
| | | prop: "number", |
| | | isShowColumn: true, |
| | | default: true |
| | | }, |
| | | { |
| | | label: "从", |
| | | prop: "deviceName", |
| | | isShowColumn: showcol.includes("从"), |
| | | label: "调出位置", |
| | | prop: "from", |
| | | isShowColumn: showcol.includes("调出位置"), |
| | | default: false |
| | | }, |
| | | { |
| | | label: "至", |
| | | prop: "id", |
| | | isShowColumn: showcol.includes("至"), |
| | | label: "调入位置", |
| | | prop: "to", |
| | | isShowColumn: showcol.includes("调入位置"), |
| | | default: false |
| | | }, |
| | | { |
| | | label: "联系人", |
| | | prop: "deviceId", |
| | | prop: "companyName", |
| | | isShowColumn: showcol.includes("联系人"), |
| | | default: false |
| | | }, |
| | | { |
| | | label: "负责人", |
| | | prop: "shopName", |
| | | prop: "contacterName", |
| | | isShowColumn: showcol.includes("负责人"), |
| | | default: false |
| | | }, |
| | | { |
| | | label: "日期", |
| | | prop: "preTime", |
| | | prop: "operationDate", |
| | | isShowColumn: showcol.includes("日期"), |
| | | default: false, |
| | | date: true |
| | | }, |
| | | { |
| | | label: "产品可用性", |
| | | prop: "status", |
| | | isShowColumn: showcol.includes("产品可用性"), |
| | | width: 100, |
| | | default: false |
| | | }, |
| | | { |
| | | label: "截止日期", |
| | | prop: "faultTime", |
| | | isShowColumn: showcol.includes("截止日期"), |
| | | default: false |
| | | }, |
| | | { |
| | | label: "实际日期", |
| | | prop: "shopName", |
| | | isShowColumn: showcol.includes("实际日期"), |
| | | default: false |
| | | }, |
| | | // { |
| | | // label: "产品可用性", |
| | | // prop: "status", |
| | | // isShowColumn: showcol.includes("产品可用性"), |
| | | // width: 100, |
| | | // default: false |
| | | // }, |
| | | // { |
| | | // label: "截止日期", |
| | | // prop: "faultTime", |
| | | // isShowColumn: showcol.includes("截止日期"), |
| | | // default: false |
| | | // }, |
| | | // { |
| | | // label: "实际日期", |
| | | // prop: "shopName", |
| | | // isShowColumn: showcol.includes("实际日期"), |
| | | // default: false |
| | | // }, |
| | | { |
| | | label: "来源单据", |
| | | prop: "faultLevel", |
| | | prop: "sourceNumber", |
| | | isShowColumn: showcol.includes("来源单据"), |
| | | default: false |
| | | }, |
| | | // { |
| | | // label: "欠单", |
| | | // prop: "status", |
| | | // isShowColumn: showcol.includes("欠单"), |
| | | // default: false |
| | | // }, |
| | | // { |
| | | // label: "追踪参考", |
| | | // prop: "status", |
| | | // isShowColumn: showcol.includes("追踪参考"), |
| | | // default: false |
| | | // }, |
| | | // { |
| | | // label: "承运商", |
| | | // prop: "status", |
| | | // isShowColumn: showcol.includes("承运商"), |
| | | // default: false |
| | | // }, |
| | | // { |
| | | // label: "目的地", |
| | | // prop: "status", |
| | | // isShowColumn: showcol.includes("目的地"), |
| | | // default: false |
| | | // }, |
| | | // { |
| | | // label: "重量", |
| | | // prop: "status", |
| | | // isShowColumn: showcol.includes("重量"), |
| | | // default: false |
| | | // }, |
| | | // { |
| | | // label: "物流重量", |
| | | // prop: "status", |
| | | // isShowColumn: showcol.includes("物流重量"), |
| | | // default: false |
| | | // }, |
| | | { |
| | | label: "欠单", |
| | | prop: "status", |
| | | isShowColumn: showcol.includes("欠单"), |
| | | default: false |
| | | }, |
| | | { |
| | | label: "追踪参考", |
| | | prop: "status", |
| | | isShowColumn: showcol.includes("追踪参考"), |
| | | default: false |
| | | }, |
| | | { |
| | | label: "承运商", |
| | | prop: "status", |
| | | isShowColumn: showcol.includes("承运商"), |
| | | default: false |
| | | }, |
| | | { |
| | | label: "目的地", |
| | | prop: "status", |
| | | isShowColumn: showcol.includes("目的地"), |
| | | default: false |
| | | }, |
| | | { |
| | | label: "重量", |
| | | prop: "status", |
| | | isShowColumn: showcol.includes("重量"), |
| | | default: false |
| | | }, |
| | | { |
| | | label: "物流重量", |
| | | prop: "status", |
| | | isShowColumn: showcol.includes("物流重量"), |
| | | default: false |
| | | }, |
| | | { |
| | | label: "操作类型", |
| | | prop: "faultTime", |
| | | label: "入库类型", |
| | | prop: "operationTypeName", |
| | | isShowColumn: showcol.includes("操作类型"), |
| | | default: false |
| | | }, |
| | | { |
| | | label: "公司", |
| | | prop: "faultTime", |
| | | isShowColumn: showcol.includes("公司"), |
| | | default: false |
| | | }, |
| | | // { |
| | | // label: "公司", |
| | | // prop: "faultTime", |
| | | // isShowColumn: showcol.includes("公司"), |
| | | // default: false |
| | | // }, |
| | | { |
| | | label: "状态", |
| | | prop: "status", |
| | | width: 120, |
| | | isShowColumn: showcol.includes("状态"), |
| | | default: false, |
| | | status: true |
| | | status: true, |
| | | isCallMethod: true, |
| | | getCallMethod: this.getStatus |
| | | } |
| | | ] |
| | | return tableColumn |
| | |
| | | this.tableList.tableColumn = this.setTableColumn(val) |
| | | }, |
| | | // 请求数据 |
| | | async getData(val, content) { |
| | | await getProductList({ |
| | | [val]: content, |
| | | async getData() { |
| | | await getAllList({ |
| | | number: this.keyword, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }).then((res) => { |
| | | if (res.data.code === 200) { |
| | | const list = res.data.data.list.map((item) => { |
| | | if (res.code === 200) { |
| | | const list = res.data.map((item) => { |
| | | return { |
| | | ...item, |
| | | supplierNumber: item.supplier.number, |
| | | status: "就绪", |
| | | preTime: "2023-09-04 11:20:00" |
| | | from: item.location.jointName, |
| | | to: item.toLocation.name |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | | this.pagerOptions.totalCount = res.data.data.total |
| | | this.pagerOptions.totalCount = res.total |
| | | } |
| | | }) |
| | | }, |
| | | // 搜索 |
| | | getList(val) { |
| | | console.log(val) |
| | | this.keyword = val |
| | | this.pagerOptions.currPage = 1 |
| | | this.getData() |
| | | }, |
| | | // 行点击 |
| | | tableRowClick(row) { |
| | | console.log(row) |
| | | // 查看 编辑 |
| | | tableRowClick(row, val) { |
| | | console.log(row,"查看") |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = "编辑" |
| | | this.editConfig.title = val |
| | | 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 |
| | | this.editConfig.infomation = { ...row } |
| | | }, |
| | | // 新建 |
| | | addBtnClick() { |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = "新建" |
| | | }, |
| | | // 状态 |
| | | getStatus(val) { |
| | | return val === 1 ? "草稿" : val === 3 ? "就绪" :val===4? "完成": "取消" |
| | | } |
| | | } |
| | | } |