yangfeng
2023-09-22 fbdb1d15b6cf692d27598806eee6be6f16e1f36d
产品出入库明细接口联调、调拨列表接口联调、出入库搜索功能增加
9个文件已修改
341 ■■■■■ 已修改文件
src/api/overview/overview.js 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/product/product.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/operate/allot/index.vue 178 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/overview/AddOverviewDialog.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/overview/OverviewListView.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productManage/product/AddProductDialog.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productManage/product/index.vue 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/reportForm/inboundOutboundDetail/index.vue 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/overview/overview.js
@@ -33,9 +33,11 @@
}
// 查询入库/出库列表
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
  })
}
// 添加入库/出库
@@ -79,3 +81,12 @@
    data
  })
}
// 获取全部调拨列表
export function getAllList(data) {
  return request({
    url: "/api-wms/v1/operation/listAll",
    method: "post",
    data
  })
}
src/api/product/product.js
@@ -39,3 +39,11 @@
    params: data
  })
}
// 产品历史出入库信息
export function getProductOperatonList(data) {
  return request({
    url: "/api-wms/v1/product/listOperaton",
    method: "post",
    data
  })
}
src/router/index.js
@@ -97,12 +97,7 @@
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
src/views/operate/allot/index.vue
@@ -3,7 +3,7 @@
    <div class="top">
      <SearchCommonView
        :add-title="'新建'"
        :placeholder="'请输入单号'"
        :placeholder="'请输入单号/来源单据'"
        :amount-view="false"
        @addCommonClick="addBtnClick"
        @searchClick="getList"
@@ -29,7 +29,7 @@
<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"
@@ -53,7 +53,8 @@
        visible: false,
        title: "新建",
        infomation: {}
      }
      },
      keyword: ""
    }
  },
  created() {
@@ -82,121 +83,123 @@
      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
@@ -206,29 +209,32 @@
      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) {
@@ -241,6 +247,10 @@
    addBtnClick() {
      this.editConfig.visible = true
      this.editConfig.title = "新建"
    },
    // 状态
    getStatus(val) {
      return val === 1 ? "草稿" : val === 3 ? "就绪" : "完成"
    }
  }
}
src/views/overview/AddOverviewDialog.vue
@@ -8,7 +8,7 @@
    >
      <!-- 头 -->
      <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>
@@ -321,7 +321,7 @@
      detailId: 0,
      isNoDetail: false, // 添加详情明细行时是否未选择
      tableColumn: [],
      receiptType: this.addName, // 入库类型
      receiptType: "", // 入库类型
      companyObj: {},
      contacterObj: {},
      isValidateClick: false // 验证是否显示
@@ -333,6 +333,7 @@
    this.setDetailTableForm()
    this.getCompanyList()
    this.getLocationList()
    this.receiptType = this.editConfig.title === "查看" ? this.editConfig.infomation.operationTypeName : this.addName
  },
  methods: {
    // 获取公司列表
@@ -443,9 +444,9 @@
      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
@@ -668,7 +669,7 @@
::v-deep {
  .el-dialog__headerbtn {
    position: absolute;
    top: 18px;
    top: 15px;
  }
  .el-button {
    &:hover {
src/views/overview/OverviewListView.vue
@@ -3,7 +3,7 @@
    <div class="top">
      <SearchCommonView
        :add-title="'新建'"
        :placeholder="'请输入单号'"
        :placeholder="'请输入单号/来源单据'"
        :amount-view="false"
        @addCommonClick="addBtnClick"
        @searchClick="getList"
@@ -59,7 +59,8 @@
        title: "新建",
        infomation: {}
      },
      workType: this.$route.params.workType
      workType: this.$route.params.workType,
      keyword: ""
    }
  },
  created() {
@@ -180,13 +181,15 @@
    // 请求数据
    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,
@@ -194,13 +197,14 @@
            }
          })
          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()
    },
src/views/productManage/product/AddProductDialog.vue
@@ -538,7 +538,7 @@
      showButton: true,
      activeName: "first",
      productTableList: {},
      tableData: [{ name: "ssss" }],
      tableData: [],
      isNoProduct: false, // 添加明细行时是否有产品未选择
      showEdit: false, // 是否显示编辑按钮
      isDelClick: false, // 删除按钮是否可点击
@@ -748,7 +748,11 @@
    // 进出点击
    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 }
        })
      }
    },
    // 可销售/可采购
src/views/productManage/product/index.vue
@@ -31,7 +31,12 @@
      <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">
@@ -100,7 +105,8 @@
      },
      isIconIndex: "1", // 1 图标 2 列表
      url: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
      pageSizes: [15, 30]
      pageSizes: [15, 30],
      keyWord: ""
    }
  },
  created() {
@@ -212,9 +218,9 @@
      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) => {
@@ -232,8 +238,9 @@
    // 搜索
    searchClick(val) {
      console.log(val)
      this.keyWord = val
      this.pagerOptions.currPage = 1
      this.getData(val)
      this.getData()
    },
    // 新建
    addBtnClick() {
@@ -318,6 +325,14 @@
    .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;
src/views/reportForm/inboundOutboundDetail/index.vue
@@ -21,18 +21,20 @@
        <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() {
@@ -49,7 +51,9 @@
        visible: false,
        title: "新建",
        infomation: {}
      }
      },
      productId: this.$route.params.id,
      productName: this.$route.params.name
    }
  },
  created() {
@@ -78,43 +82,44 @@
      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
        },
@@ -124,11 +129,13 @@
          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
        }
@@ -140,23 +147,23 @@
      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
        }
      })
    },
@@ -168,13 +175,17 @@
    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 ? "就绪" : "完成"
    }
  }
}