zuozhengqing
2023-10-19 87f9b1b02fd972668d504260c624f25f102cbf72
Merge branch 'dev' of http://192.168.5.5:10010/r/web/WMS into zzq
7个文件已修改
181 ■■■■ 已修改文件
src/views/operate/inventoryAdjustment/index.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/overview/OverviewListView.vue 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/overview/index.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productManage/product/AddProductDialog.vue 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productManage/product/index.vue 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productManage/productCategory/AddProductCategoryDialog.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productManage/productCategory/index.vue 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/operate/inventoryAdjustment/index.vue
@@ -88,7 +88,7 @@
      differenceAmount: 0,
      amount: 0,
      operationId: 0,
      adjustAmount:0,
      adjustAmount: 0
    }
  },
  created() {
@@ -122,7 +122,7 @@
        if (res.code === 200) {
          console.log(res)
          const list = res.data.map((item) => {
            item.adjustAmount=0
            item.adjustAmount = 0
            return {
              ...item,
              isSet: false,
@@ -140,9 +140,9 @@
    // 操作输入
    inputContent(val, prop, row) {
      console.log(val, prop, row)
      console.log(val-row.amount,"结果")
      this.adjustAmount=val-row.amount
      this.tableList.tableData[row.index].adjustAmount=this.adjustAmount
      console.log(val - row.amount, "结果")
      this.adjustAmount = val - row.amount
      this.tableList.tableData[row.index].adjustAmount = this.adjustAmount
      // this.differenceAmount = val
    },
    // 新增
@@ -180,7 +180,7 @@
        let requestUrl = this.currentRowId === 0 ? addInventoryAdjustment : updateInventoryAdjustment
        requestUrl({
          // amount: this.amount,
          adjustAmount:this.adjustAmount,
          adjustAmount: this.adjustAmount,
          // differenceAmount: this.differenceAmount,
          locationId: this.locationId,
          operationId: this.operationId,
@@ -204,7 +204,7 @@
    // 是否选择产品
    isSel() {
      for (let i = 0; i < this.tableData.length; i++) {
        if (this.tableData[i].productName.length === 0) {
        if (this.tableData && this.tableData[i].productName.length === 0) {
          this.isNoProduct = false
          break
        } else {
@@ -268,7 +268,7 @@
    },
    // 行点击
    tableRowClick(row, rowIndex) {
      this.rowIndex=rowIndex
      this.rowIndex = rowIndex
      this.isSel()
      if (!this.isNoProduct && this.currentRowId === 0) {
        this.$message.error("请完成当前新建或取消新建")
src/views/overview/OverviewListView.vue
@@ -1,5 +1,8 @@
<template>
  <div class="rightContent">
    <div class="label-fixed-element">
      <span>{{ params.name }}</span>
    </div>
    <div class="top">
      <SearchCommonView
        :add-title="'新建'"
@@ -58,7 +61,7 @@
  data() {
    return {
      tableList: {},
      showcol: ["从", "至", "联系人", "日期", "来源单据", "状态"],
      showcol: ["仓库位置", "调出位置", "调入位置", "联系人", "日期", "来源单据", "状态"],
      searchOptions: [],
      commonDetail: {
        visible: false,
@@ -73,10 +76,14 @@
      workType: this.$route.params.workType,
      keyword: "",
      params: {},
      displayEdit: false
      displayEdit: false,
      formLabel: "",
      toLabel: ""
    }
  },
  created() {
    console.log(this.workType)
    this.setFormToLabel()
    this.setTable()
    var paramsData = sessionStorage.getItem("paramsData")
    let params = {}
@@ -95,6 +102,18 @@
    sessionStorage.removeItem("paramsData")
  },
  methods: {
    setFormToLabel() {
      if (this.workType === 1) {
        this.formLabel = "供应商位置"
        this.toLabel = "仓库位置"
      } else if (this.workType === 2) {
        this.formLabel = "仓库位置"
        this.toLabel = "客户位置"
      } else {
        this.formLabel = "调出位置"
        this.toLabel = "调入位置"
      }
    },
    setTable() {
      this.tableList = {
        tableInfomation: [],
@@ -122,15 +141,15 @@
          default: true
        },
        {
          label: "从",
          label: this.formLabel,
          prop: "from",
          isShowColumn: showcol.includes("从"),
          isShowColumn: showcol.includes(this.formLabel),
          default: false
        },
        {
          label: "至",
          label: this.toLabel,
          prop: "to",
          isShowColumn: showcol.includes("至"),
          isShowColumn: showcol.includes(this.toLabel),
          default: false
        },
        {
@@ -258,4 +277,18 @@
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped></style>
<style lang="scss" scoped>
.label-fixed-element {
  background: #e6ecf2;
  position: fixed;
  font-size: 14px;
  width: calc(100% - 530px);
  height: 45px;
  line-height: 45px;
  font-size: 18px;
  font-weight: 700;
  color: #171718;
  margin-top: -60px;
  margin-left: -5px;
}
</style>
src/views/overview/index.vue
@@ -41,7 +41,7 @@
        </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>
@@ -65,10 +65,12 @@
        title: "新建",
        infomation: {},
        keyword: ""
      }
      },
      pageSizes: [30, 45]
    }
  },
  created() {
    this.pagerOptions.pageSize = 30
    this.getData()
  },
  methods: {
src/views/productManage/product/AddProductDialog.vue
@@ -1,14 +1,14 @@
<template>
  <div class="add-common">
    <el-dialog
      :title="editCommonConfig.title + '产品'"
      :title="modalTitle + '产品'"
      :visible.sync="editConfig.visible"
      :width="dialogWidth"
      :before-close="handleClose"
    >
      <!-- 头 -->
      <div slot="title" class="dialog-header">
        <span>{{ editCommonConfig.title + "产品" }}</span>
        <span>{{ modalTitle + "产品" }}</span>
        <div class="header_btns">
          <span class="btn">
            <i class="el-icon-printer"></i>
@@ -165,7 +165,7 @@
                      :disabled="!showFooter"
                    >
                      <el-option
                        v-for="item in productCategoryOptions"
                        v-for="item in productCategoryListWithDefault"
                        :key="item.id"
                        :label="item.name"
                        :value="item.id"
@@ -474,13 +474,27 @@
        return {
          visible: false,
          title: "新建",
          infomation: {}
          infomation: {},
          autoEdit:false
        }
      }
    }
  },
  components: {},
  computed: {},
  computed: {
    productCategoryListWithDefault(){
      return [{id:0,name:'请选择'},...(this.productCategoryOptions ?? [])]
    },
    modalTitle(){
      if (this.editConfig.title === '编辑' && this.editConfig.autoEdit){
        return '编辑'
      }else if (this.editConfig.title === '编辑') {
        return !this.showEdit ? '编辑' : '查看'
      }else {
        return '新建'
      }
    }
  },
  data() {
    return {
      dialogWidth: "50%",
@@ -494,6 +508,7 @@
      memberOptions: [{ name: "管理员", id: 1 }],
      productCategoryOptions: [], // 产品类别
      productTypeOptions: [
        { name: "请选择", id: 0 },
        { name: "能消耗", id: 1 },
        { name: "服务", id: 2 },
        { name: "可库存产品", id: 3 }
@@ -538,6 +553,9 @@
    this.setTableForm()
    this.setBottonView()
    this.statisticsMap.inLibrary = this.editConfig?.infomation?.amount ?? 0
    if (this.editConfig.autoEdit){
      this.editClick()
    }
  },
  methods: {
    // 获取产品类别
src/views/productManage/product/index.vue
@@ -29,7 +29,7 @@
      </div>
      <!-- 图表形式 -->
      <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="product-box" v-for="item in tableList.tableInfomation" :key="item.id" @click="showDetail(item)">
          <div class="left">
            <!-- <el-image style="width: 60px; height: 80px" :src="url"></el-image> -->
            <div class="img-view">
@@ -58,12 +58,20 @@
          ref="tableListRef"
          :table-list="tableList"
          @selTableCol="selTableCol"
          @tableRowClick="tableRowClick"
        >
          <template slot="tableButton">
            <el-table-column label="操作" width="90" align="center">
              <template slot-scope="scope">
                <span @click.stop="showDetail(scope.row)" class="cursor_pointer" style="margin-right: 10px">
                  <span style="color: #2a78fb">查看</span>
                </span>
                <span @click.stop="editRow(scope.row)" class="cursor_pointer">
                  <span style="color: #2a78fb">编辑</span>
                </span>
              </template>
            </el-table-column>
          </template>
        </TableCommonView>
        <!-- <div class="btn-pager">
          <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
        </div> -->
      </div>
      <div class="btn-pager">
        <PagerView class="page" :pager-options="pagerOptions" :page-size="pageSizes" v-on="pagerEvents" />
@@ -99,7 +107,8 @@
      editConfig: {
        visible: false,
        title: "新建",
        infomation: {}
        infomation: {},
        autoEdit: false
      },
      isIconIndex: "2", // 1 图标 2 列表
      url: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
@@ -254,13 +263,21 @@
      this.editConfig.title = "新建"
      this.editConfig.infomation = {}
    },
    // 行点击
    tableRowClick(row) {
    // 详情
    showDetail(row) {
      console.log(row)
      this.editConfig.visible = true
      this.editConfig.autoEdit = false
      this.editConfig.title = "编辑"
      this.editConfig.infomation = { ...row }
    },
    // 编辑
    editRow(row){
      this.editConfig.autoEdit = true
      this.editConfig.title = "编辑"
      this.editConfig.infomation = { ...row }
      this.editConfig.visible = true
    },
    // 切换列表展现形式
    selIconSwitchClick(value) {
      this.pagerOptions.currPage = 1
src/views/productManage/productCategory/AddProductCategoryDialog.vue
@@ -1,14 +1,14 @@
<template>
  <div class="add-common">
    <el-dialog
      :title="editCommonConfig.title + '产品类别'"
      :title="modalTitle + '产品类别'"
      :visible.sync="editConfig.visible"
      :width="dialogWidth"
      :before-close="handleClose"
    >
      <!-- 头 -->
      <div slot="title" class="dialog-header">
        <span>{{ editCommonConfig.title + "产品类别" }}</span>
        <span>{{ modalTitle + "产品类别" }}</span>
        <div class="header_btns">
          <!-- <span class="btn">
            <i class="el-icon-printer"></i>
@@ -183,7 +183,8 @@
        return {
          visible: false,
          title: "新建",
          infomation: { type: [] }
          infomation: { type: [] },
          autoEdit: false,
        }
      }
    },
@@ -197,8 +198,16 @@
  components: {},
  computed: {
    productCategoryListWithDefault(){
      console.log(this.productCategoryList)
      return [{id:0,name:'请选择'},...(this.productCategoryList?? [])]
    },
    modalTitle(){
      if (this.editConfig.title === '编辑' && this.editConfig.autoEdit){
        return '编辑'
      }else if (this.editConfig.title === '编辑') {
        return !this.showEdit ? '编辑' : '查看'
      }else {
        return '新建'
      }
    }
  },
  data() {
@@ -227,6 +236,9 @@
  created() {
    this.setBottonView()
    this.getProductCount()
    if (this.editConfig.autoEdit){
      this.editClick()
    }
  },
  methods: {
    // 获取产品数量
src/views/productManage/productCategory/index.vue
@@ -15,8 +15,20 @@
          ref="tableListRef"
          :table-list="tableList"
          :show-checkcol="false"
          @tableRowClick="tableRowClick"
        ></TableCommonView>
        >
          <template slot="tableButton">
            <el-table-column label="操作" width="90" align="center">
              <template slot-scope="scope">
                <span @click.stop="showDetail(scope.row)" class="cursor_pointer" style="margin-right: 10px">
                  <span style="color: #2a78fb">查看</span>
                </span>
                <span @click.stop="editRow(scope.row)" class="cursor_pointer">
                  <span style="color: #2a78fb">编辑</span>
                </span>
              </template>
            </el-table-column>
          </template>
        </TableCommonView>
      </div>
      <div class="btn-pager">
        <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
@@ -45,7 +57,8 @@
      editConfig: {
        visible: false,
        title: "新建",
        infomation: {}
        infomation: {},
        autoEdit: false
      }
    }
  },
@@ -93,8 +106,16 @@
      this.pagerOptions.currPage=1
      this.getData()
    },
    // 行点击
    tableRowClick(row) {
    // 查看
    showDetail(row) {
      this.editConfig.autoEdit = false
      this.editConfig.title = "编辑"
      this.editConfig.infomation = { ...row }
      this.editConfig.visible = true
    },
    // 编辑
    editRow(row){
      this.editConfig.autoEdit = true
      this.editConfig.title = "编辑"
      this.editConfig.infomation = { ...row }
      this.editConfig.visible = true