产品出入库明细接口联调、调拨列表接口联调、出入库搜索功能增加
| | |
| | | } |
| | | |
| | | // 查询入库/出库列表 |
| | | export const getOperation = async (data) => { |
| | | return await axios.get(`/api-wms/v1/operation/operation`, { |
| | | params: data |
| | | export function getOperation(data) { |
| | | return request({ |
| | | url: "/api-wms/v1/operation/list", |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
| | | // 添加入库/出库 |
| | |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // 获取全部调拨列表 |
| | | export function getAllList(data) { |
| | | return request({ |
| | | url: "/api-wms/v1/operation/listAll", |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
| | |
| | | params: data |
| | | }) |
| | | } |
| | | // 产品历史出入库信息 |
| | | export function getProductOperatonList(data) { |
| | | return request({ |
| | | url: "/api-wms/v1/product/listOperaton", |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
| | |
| | | const router = createRouter() |
| | | |
| | | router.afterEach((to, from, next) => { |
| | | if ( |
| | | (to.path === "/overview/overviewList" || |
| | | to.path === "/reportForm/inOutboundDetail" || |
| | | to.path === "/productManage/productList") && |
| | | to.params.name |
| | | ) { |
| | | if ((to.path === "/overview/overviewList" || to.path === "/productManage/productList") && to.params.name) { |
| | | console.log(from, next) |
| | | to.meta.title = to.params.name |
| | | document.title = to.meta.title |
| | |
| | | <div class="top"> |
| | | <SearchCommonView |
| | | :add-title="'新建'" |
| | | :placeholder="'请输入单号'" |
| | | :placeholder="'请输入单号/来源单据'" |
| | | :amount-view="false" |
| | | @addCommonClick="addBtnClick" |
| | | @searchClick="getList" |
| | |
| | | |
| | | <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" |
| | | |
| | |
| | | visible: false, |
| | | title: "新建", |
| | | infomation: {} |
| | | } |
| | | }, |
| | | keyword: "" |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | let tableColumn = [ |
| | | { |
| | | label: "单号", |
| | | prop: "id", |
| | | prop: "number", |
| | | isShowColumn: true, |
| | | default: true |
| | | }, |
| | | { |
| | | label: "从", |
| | | prop: "deviceName", |
| | | prop: "from", |
| | | isShowColumn: showcol.includes("从"), |
| | | default: false |
| | | }, |
| | | { |
| | | label: "至", |
| | | prop: "id", |
| | | 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 |
| | | pageSize: this.pagerOptions.pageSize, |
| | | sourceNumber: this.keyword |
| | | }).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.fromLocation.name, |
| | | 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) { |
| | |
| | | addBtnClick() { |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = "新建" |
| | | }, |
| | | // 状态 |
| | | getStatus(val) { |
| | | return val === 1 ? "草稿" : val === 3 ? "就绪" : "完成" |
| | | } |
| | | } |
| | | } |
| | |
| | | > |
| | | <!-- 头 --> |
| | | <div slot="title" class="dialog-header"> |
| | | <span>{{ editCommonConfig.title + addName }}</span> |
| | | <span>{{ editCommonConfig.title === "查看" ? editCommonConfig.title : editCommonConfig.title + addName }}</span> |
| | | <div class="header_btns"> |
| | | <span class="btn"> |
| | | <i class="el-icon-printer"></i> |
| | |
| | | detailId: 0, |
| | | isNoDetail: false, // 添加详情明细行时是否未选择 |
| | | tableColumn: [], |
| | | receiptType: this.addName, // 入库类型 |
| | | receiptType: "", // 入库类型 |
| | | companyObj: {}, |
| | | contacterObj: {}, |
| | | isValidateClick: false // 验证是否显示 |
| | |
| | | this.setDetailTableForm() |
| | | this.getCompanyList() |
| | | this.getLocationList() |
| | | this.receiptType = this.editConfig.title === "查看" ? this.editConfig.infomation.operationTypeName : this.addName |
| | | }, |
| | | methods: { |
| | | // 获取公司列表 |
| | |
| | | let contacterName = "" |
| | | if (this.editConfig.title === "新建") { |
| | | companyID = Object.keys(this.companyObj).length === 0 ? 0 : this.companyObj.value |
| | | companyName = Object.keys(this.companyObj).length === 0 ? 0 : this.companyObj.label |
| | | companyName = Object.keys(this.companyObj).length === 0 ? "" : this.companyObj.label |
| | | contacterID = Object.keys(this.contacterObj).length === 0 ? 0 : this.contacterObj.value |
| | | contacterName = Object.keys(this.contacterObj).length === 0 ? 0 : this.contacterObj.label |
| | | contacterName = Object.keys(this.contacterObj).length === 0 ? "" : this.contacterObj.label |
| | | } else { |
| | | companyID = Object.keys(this.companyObj).length === 0 ? data.companyID : this.companyObj.value |
| | | companyName = Object.keys(this.companyObj).length === 0 ? data.companyName : this.companyObj.label |
| | |
| | | ::v-deep { |
| | | .el-dialog__headerbtn { |
| | | position: absolute; |
| | | top: 18px; |
| | | top: 15px; |
| | | } |
| | | .el-button { |
| | | &:hover { |
| | |
| | | <div class="top"> |
| | | <SearchCommonView |
| | | :add-title="'新建'" |
| | | :placeholder="'请输入单号'" |
| | | :placeholder="'请输入单号/来源单据'" |
| | | :amount-view="false" |
| | | @addCommonClick="addBtnClick" |
| | | @searchClick="getList" |
| | |
| | | title: "新建", |
| | | infomation: {} |
| | | }, |
| | | workType: this.$route.params.workType |
| | | workType: this.$route.params.workType, |
| | | keyword: "" |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | // 请求数据 |
| | | async getData() { |
| | | await getOperation({ |
| | | number: this.keyword, |
| | | operationTypeId: this.$route.params.id, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | pageSize: this.pagerOptions.pageSize, |
| | | sourceNumber: this.keyword |
| | | }).then((res) => { |
| | | console.log(res.data.data) |
| | | if (res.data.code === 200) { |
| | | const list = res.data.data.map((item) => { |
| | | console.log(res.data) |
| | | if (res.code === 200) { |
| | | const list = res.data.map((item) => { |
| | | return { |
| | | ...item, |
| | | from: item.fromLocation.name, |
| | |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | | this.pagerOptions.totalCount = res.data.total |
| | | this.pagerOptions.totalCount = res.total |
| | | } |
| | | }) |
| | | }, |
| | | // 搜索 |
| | | getList(val) { |
| | | console.log(val) |
| | | this.keyword = val |
| | | this.pagerOptions.currPage = 1 |
| | | this.getData() |
| | | }, |
| | |
| | | showButton: true, |
| | | activeName: "first", |
| | | productTableList: {}, |
| | | tableData: [{ name: "ssss" }], |
| | | tableData: [], |
| | | isNoProduct: false, // 添加明细行时是否有产品未选择 |
| | | showEdit: false, // 是否显示编辑按钮 |
| | | isDelClick: false, // 删除按钮是否可点击 |
| | |
| | | // 进出点击 |
| | | inOutBoundClick() { |
| | | if (this.editConfig.title !== "新建") { |
| | | this.$router.push({ path: "/reportForm/inOutboundDetail", query: { name: "产品名称/出入库明细" } }) |
| | | console.log(this.editConfig.infomation) |
| | | this.$router.push({ |
| | | name: "inOutboundDetail", |
| | | params: { name: this.editConfig.infomation.name, id: this.editConfig.infomation.id } |
| | | }) |
| | | } |
| | | }, |
| | | // 可销售/可采购 |
| | |
| | | <div v-if="isIconIndex === '1'" class="product-view"> |
| | | <div class="product-box" v-for="item in tableList.tableInfomation" :key="item.id" @click="tableRowClick(item)"> |
| | | <div class="left"> |
| | | <el-image style="width: 60px; height: 80px" :src="url"></el-image> |
| | | <!-- <el-image style="width: 60px; height: 80px" :src="url"></el-image> --> |
| | | <el-image class="img-view"> |
| | | <div slot="error" class="image-slot"> |
| | | <i class="el-icon-picture-outline"></i> |
| | | </div> |
| | | </el-image> |
| | | </div> |
| | | <div class="right"> |
| | | <div class="label"> |
| | |
| | | }, |
| | | isIconIndex: "1", // 1 图标 2 列表 |
| | | url: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg", |
| | | pageSizes: [15, 30] |
| | | pageSizes: [15, 30], |
| | | keyWord: "" |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.tableList.tableColumn = this.setTableColumn(val) |
| | | }, |
| | | // 请求数据 |
| | | async getData(val) { |
| | | async getData() { |
| | | await getProductList({ |
| | | keyWord: val, |
| | | keyWord: this.keyWord, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }).then((res) => { |
| | |
| | | // 搜索 |
| | | searchClick(val) { |
| | | console.log(val) |
| | | this.keyWord = val |
| | | this.pagerOptions.currPage = 1 |
| | | this.getData(val) |
| | | this.getData() |
| | | }, |
| | | // 新建 |
| | | addBtnClick() { |
| | |
| | | .left { |
| | | width: 60px; |
| | | text-align: center; |
| | | .img-view { |
| | | width: 60px; |
| | | height: 80px; |
| | | line-height: 80px; |
| | | border: 1px solid #dee2e6; |
| | | font-size: 22px; |
| | | color: #b8babb; |
| | | } |
| | | } |
| | | .right { |
| | | flex: 1; |
| | |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | | </div> |
| | | </div> |
| | | <!-- 编辑 --> |
| | | <AddOverviewDialog v-if="editConfig.visible" :edit-common-config="editConfig" :add-name="this.$route.params.name" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | import { getProductList } from "@/api/product/product" |
| | | // import DetailProduct from "@/views/productManage/product/DetailProduct" |
| | | import { getProductOperatonList } from "@/api/product/product" |
| | | import AddOverviewDialog from "@/views/overview/AddOverviewDialog" |
| | | |
| | | export default { |
| | | name: "InboundOutboundDetail", |
| | | props: {}, |
| | | components: {}, |
| | | components: { AddOverviewDialog }, |
| | | mixins: [pageMixin], |
| | | computed: {}, |
| | | data() { |
| | |
| | | visible: false, |
| | | title: "新建", |
| | | infomation: {} |
| | | } |
| | | }, |
| | | productId: this.$route.params.id, |
| | | productName: this.$route.params.name |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | let tableColumn = [ |
| | | { |
| | | label: "日期", |
| | | prop: "id", |
| | | prop: "operationDate", |
| | | isShowColumn: true, |
| | | default: true |
| | | default: true, |
| | | date: true |
| | | }, |
| | | { |
| | | label: "参考", |
| | | prop: "id", |
| | | label: "单号", |
| | | prop: "number", |
| | | isShowColumn: true, |
| | | default: true |
| | | }, |
| | | { |
| | | label: "产品", |
| | | prop: "id", |
| | | prop: "productName", |
| | | isShowColumn: true, |
| | | default: true |
| | | }, |
| | | { |
| | | label: "从", |
| | | prop: "deviceName", |
| | | prop: "from", |
| | | isShowColumn: true, |
| | | default: true |
| | | }, |
| | | { |
| | | label: "至", |
| | | prop: "id", |
| | | prop: "to", |
| | | isShowColumn: true, |
| | | default: true |
| | | }, |
| | | { |
| | | label: "公司", |
| | | prop: "shopName", |
| | | isShowColumn: showcol.includes("公司"), |
| | | default: false |
| | | label: "数量", |
| | | prop: "amount", |
| | | isShowColumn: true, |
| | | default: true |
| | | }, |
| | | { |
| | | label: "数量", |
| | | prop: "deviceId", |
| | | label: "单位", |
| | | prop: "unit", |
| | | isShowColumn: true, |
| | | default: true |
| | | }, |
| | |
| | | width: 120, |
| | | isShowColumn: showcol.includes("状态"), |
| | | default: false, |
| | | status: true |
| | | status: true, |
| | | isCallMethod: true, |
| | | getCallMethod: this.getStatus |
| | | }, |
| | | { |
| | | label: "完成者", |
| | | prop: "preTime", |
| | | prop: "admin", |
| | | isShowColumn: showcol.includes("完成者"), |
| | | default: false |
| | | } |
| | |
| | | this.tableList.tableColumn = this.setTableColumn(val) |
| | | }, |
| | | // 请求数据 |
| | | async getData(val, content) { |
| | | await getProductList({ |
| | | [val]: content, |
| | | async getData() { |
| | | await getProductOperatonList({ |
| | | productId: this.productId, |
| | | 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.fromLocation.name, |
| | | to: item.toLocation.name, |
| | | productName: this.productName |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | | this.pagerOptions.totalCount = res.data.data.total |
| | | this.pagerOptions.totalCount = res.total |
| | | } |
| | | }) |
| | | }, |
| | |
| | | tableRowClick(row) { |
| | | console.log(row) |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = "编辑" |
| | | this.editConfig.title = "查看" |
| | | this.editConfig.infomation = { ...row } |
| | | }, |
| | | // 新建 |
| | | addBtnClick() { |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = "新建" |
| | | }, |
| | | // 状态 |
| | | getStatus(val) { |
| | | return val === 1 ? "草稿" : val === 3 ? "就绪" : "完成" |
| | | } |
| | | } |
| | | } |