yangfeng
2023-09-15 b823a11d74b6623fadcfab27150cdbb0ad9766f5
调拨列表页面、报废列表、新建页面开发
3个文件已添加
8个文件已修改
1086 ■■■■■ 已修改文件
src/components/layout/components/appsidebar/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/makepager/FormBtnsView.vue 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/operate/index.js 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/operate/allot/index.vue 250 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/operate/scrap/AddScrapDialog.vue 265 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/operate/scrap/index.vue 177 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/overview/AddOverviewDialog.vue 275 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/overview/OverviewListView.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/overview/index.vue 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productManage/product/AddProductDialog.vue 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productManage/product/index.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/layout/components/appsidebar/index.vue
@@ -38,8 +38,8 @@
          </template>
          <!-- <el-menu-item index="/productManage/product">补货</el-menu-item>
          <el-menu-item index="/productManage/product">库存调整</el-menu-item> -->
          <el-menu-item index="/productManage/product">调拨</el-menu-item>
          <el-menu-item index="/productManage/product">报废</el-menu-item>
          <el-menu-item index="/operate/allot">调拨</el-menu-item>
          <el-menu-item index="/operate/scrap">报废</el-menu-item>
        </el-submenu>
        <el-submenu index="4">
          <template slot="title">
src/components/makepager/FormBtnsView.vue
@@ -1,20 +1,20 @@
<template>
  <div class="content-number">
    <div v-if="!showProduct && !showWarehouse && !showPosition" class="sub-number">
    <!-- <div v-if="!showProduct && !showWarehouse && !showPosition" class="sub-number">
      <div class="left"><i class="el-icon-s-fold"></i></div>
      <div class="right">
        <div class="right-label">{{ 0 }}</div>
        <div class="right-label">额外的价格</div>
      </div>
    </div>
    <div v-if="!showProduct && !showWarehouse && !showPosition" class="sub-number">
    </div> -->
    <div v-if="!showProduct && !showWarehouse && !showPosition && !addProduct" class="sub-number left_border">
      <div class="left"><i class="el-icon-present"></i></div>
      <div class="right">
        <div class="right-label">{{ "0.00" + "件" }}</div>
        <div class="right-label">在手</div>
        <div class="right-label">在库</div>
      </div>
    </div>
    <div v-if="!showProduct && !showWarehouse && !showPosition" class="sub-number">
    <div v-if="!showProduct && !showWarehouse && !showPosition && !addProduct" class="sub-number">
      <div class="left"><i class="el-icon-present"></i></div>
      <div class="right">
        <div class="right-label">{{ "0.00" + "件" }}</div>
@@ -26,6 +26,7 @@
      class="sub-number"
      @click="inOutBoundClick"
      style="cursor: pointer"
      :class="{ left_border: addProduct }"
    >
      <div class="left icon-view"><i class="el-icon-sort"></i></div>
      <div class="right">
@@ -40,7 +41,7 @@
        <div class="right-label">重订货规则</div>
      </div>
    </div>
    <div v-if="showProduct" class="sub-number right-border" @click="productClick" style="cursor: pointer">
    <div v-if="showProduct" class="sub-number left_border" @click="productClick" style="cursor: pointer">
      <div class="left"><i class="el-icon-s-fold"></i></div>
      <div class="right">
        <div class="right-label">{{ 0 }}</div>
@@ -53,14 +54,14 @@
        <div class="right-one">上架规则</div>
      </div>
    </div>
    <div v-if="!showProduct && !showWarehouse && !showPosition" class="sub-number">
    <!-- <div v-if="!showProduct && !showWarehouse && !showPosition" class="sub-number">
      <div class="left"><i class="el-icon-s-data"></i></div>
      <div class="right">
        <div class="right-label">{{ "0.00" + "件" }}</div>
        <div class="right-label">已售</div>
      </div>
    </div>
    <div v-if="!showProduct && !showWarehouse && !showPosition" class="sub-number">
    </div> -->
    <div v-if="!showProduct && !showWarehouse && !showPosition && showProcure" class="sub-number">
      <div class="left"><i class="el-icon-bank-card"></i></div>
      <div class="right">
        <div class="right-label">{{ "0.00" + "件" }}</div>
@@ -96,6 +97,14 @@
    showPosition: {
      type: Boolean,
      default: false
    },
    addProduct: {
      type: Boolean,
      default: false
    },
    showProcure: {
      type: Boolean,
      default: true
    }
  },
  data() {
@@ -146,7 +155,7 @@
      }
    }
  }
  .right-border {
  .left_border {
    border-left: 1px solid #e9e9e9;
  }
}
src/router/operate/index.js
@@ -1,14 +1,23 @@
// const type from '@/router/deployCode'
const product = (resolve) => require(["@/views/productManage/product/index"], resolve) // 产品管理
const allot = (resolve) => require(["@/views/operate/allot/index"], resolve) // 调拨
const scrap = (resolve) => require(["@/views/operate/scrap/index"], resolve) // 报废
const appconfig = [
  {
    path: "/productManage/product",
    name: "product",
    component: product,
    path: "/operate/allot",
    name: "allot",
    component: allot,
    meta: {
      title: "产品管理"
      title: "调拨"
    }
  },
  {
    path: "/operate/scrap",
    name: "scrap",
    component: scrap,
    meta: {
      title: "报废单"
    }
  }
]
src/views/operate/allot/index.vue
New file
@@ -0,0 +1,250 @@
<template>
  <div class="rightContent">
    <div class="top">
      <SearchCommonView
        :add-title="'新建'"
        :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>
      </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" />
  </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 AddOverviewDialog from "@/views/overview/AddOverviewDialog"
export default {
  name: "AllotView",
  props: {},
  components: { AddOverviewDialog },
  mixins: [pageMixin],
  computed: {},
  data() {
    return {
      tableList: {},
      showcol: ["从", "至", "联系人", "日期", "来源单据", "公司", "状态"],
      searchOptions: [],
      commonDetail: {
        visible: false,
        title: "新建",
        infomation: {}
      },
      editConfig: {
        visible: false,
        title: "新建",
        infomation: {}
      }
    }
  },
  created() {
    this.setTable()
    this.getData()
  },
  methods: {
    setTable() {
      this.tableList = {
        tableInfomation: [],
        selectBox: true,
        showcol: this.showcol,
        allcol: [],
        tableColumn: this.setTableColumn(this.showcol)
      }
      let allcol = []
      for (let i = 0; i < this.tableList.tableColumn.length; i++) {
        if (!this.tableList.tableColumn[i].default) {
          const label = this.tableList.tableColumn[i].label
          allcol.push(label)
        }
      }
      this.tableList.allcol = allcol
    },
    setTableColumn(showcol) {
      let tableColumn = [
        {
          label: "单号",
          prop: "id",
          isShowColumn: true,
          default: true
        },
        {
          label: "从",
          prop: "deviceName",
          isShowColumn: showcol.includes("从"),
          default: false
        },
        {
          label: "至",
          prop: "id",
          isShowColumn: showcol.includes("至"),
          default: false
        },
        {
          label: "联系人",
          prop: "deviceId",
          isShowColumn: showcol.includes("联系人"),
          default: false
        },
        {
          label: "负责人",
          prop: "shopName",
          isShowColumn: showcol.includes("负责人"),
          default: false
        },
        {
          label: "日期",
          prop: "preTime",
          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: "faultLevel",
          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",
          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
        }
      ]
      return tableColumn
    },
    selTableCol(val) {
      this.showcol = val
      this.tableList.tableColumn = this.setTableColumn(val)
    },
    // 请求数据
    async getData(val, content) {
      await getProductList({
        [val]: content,
        page: this.pagerOptions.currPage,
        pageSize: this.pagerOptions.pageSize
      }).then((res) => {
        if (res.data.code === 200) {
          const list = res.data.data.list.map((item) => {
            return {
              ...item,
              supplierNumber: item.supplier.number,
              status: "就绪",
              preTime: "2023-09-04 11:20:00"
            }
          })
          this.tableList.tableInfomation = list || []
          this.pagerOptions.totalCount = res.data.data.total
        }
      })
    },
    // 搜索
    getList(val) {
      console.log(val)
    },
    // 行点击
    tableRowClick(row) {
      console.log(row)
      this.editConfig.visible = true
      this.editConfig.title = "编辑"
      this.editConfig.infomation = { ...row }
    },
    // 新建
    addBtnClick() {
      this.editConfig.visible = true
      this.editConfig.title = "新建"
    }
  }
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped></style>
src/views/operate/scrap/AddScrapDialog.vue
New file
@@ -0,0 +1,265 @@
<template>
  <div class="add-common">
    <el-dialog
      :title="editCommonConfig.title + '报废单'"
      :visible.sync="editConfig.visible"
      :width="dialogWidth"
      :before-close="handleClose"
    >
      <!-- 头 -->
      <div slot="title" class="dialog-header">
        <span>{{ editCommonConfig.title + "报废单" }}</span>
        <div class="header_btns">
          <span class="btn">
            <i class="el-icon-printer"></i>
            <span>打印</span>
          </span>
          <span class="btn" style="margin-left: 15px">
            <i class="el-icon-s-tools"></i>
            <span>动作</span>
          </span>
          <el-button v-if="showEdit" plain size="mini" style="margin-left: 15px" @click="editClick">编辑</el-button>
        </div>
      </div>
      <!-- 内容 -->
      <el-form
        ref="form"
        :model="editConfig.infomation"
        :rules="rules"
        label-position="right"
        label-width="120px"
        size="mini"
        style="height: 60vh; overflow-x: hidden"
      >
        <div>
          <!-- <div>aaa</div> -->
          <StatusCommonView :list="list" />
        </div>
        <div class="basic-info">
          <div class="basic-info-view">
            <el-row>
              <el-col :span="12">
                <el-form-item label="产品" prop="client_name">
                  <el-select
                    v-model="editConfig.infomation.memberId"
                    placeholder="请选择"
                    size="mini"
                    style="width: 90%"
                    :disabled="!showFooter"
                  >
                    <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="源位置" prop="client_name">
                  <el-select
                    v-model="editConfig.infomation.memberId"
                    placeholder="请选择"
                    size="mini"
                    style="width: 90%"
                    :disabled="!showFooter"
                  >
                    <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="数量" prop="client_name">
                  <el-input-number
                    v-model="editConfig.infomation.number"
                    placeholder=""
                    :min="0"
                    :precision="2"
                    :controls="false"
                    style="width: 90%"
                    :disabled="!showFooter"
                  ></el-input-number>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="报废位置" prop="client_name">
                  <el-select
                    v-model="editConfig.infomation.memberId"
                    placeholder="请选择"
                    size="mini"
                    style="width: 90%"
                    :disabled="!showFooter"
                  >
                    <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="来源单据" prop="memberId">
                  <el-input
                    v-model="editConfig.infomation.memberId"
                    placeholder="例如:PO0032"
                    style="width: 90%"
                    :disabled="!showFooter"
                  ></el-input>
                </el-form-item>
              </el-col>
            </el-row>
          </div>
        </div>
      </el-form>
      <!-- 尾 -->
      <div v-if="showFooter" slot="footer" class="dialog-footer">
        <el-button size="small" @click="editConfig.visible = false">取消</el-button>
        <el-button type="primary" size="small" @click="saveClick('form')">保存</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
export default {
  name: "AddScrapDialog",
  props: {
    editCommonConfig: {
      type: Object,
      default: () => {
        return {
          visible: false,
          title: "新建",
          infomation: {}
        }
      }
    }
  },
  components: {},
  computed: {},
  data() {
    return {
      dialogWidth: "50%",
      editConfig: this.editCommonConfig,
      rules: {
        client_name: [{ required: true, message: "请选择客户名称", trigger: "change" }],
        number: [{ required: true, message: "请输入退款单编号", trigger: "blur" }],
        refundDate: [{ required: true, message: "请选择退款日期", trigger: "change" }],
        memberId: [{ required: true, message: "请选择销售负责人", trigger: "change" }],
        sale_return_nunber: [{ required: true, message: "请选择销售退货单", trigger: "change" }]
      },
      memberOptions: [],
      paymentTypeListOptions: [],
      list: [
        { label: "草稿", status: "todo" },
        { label: "完成", status: "todo" }
      ],
      showEdit: false, // 是否显示编辑按钮
      showFooter: false, // 是否显示取消保存
      currentState: "todo" // 当前状态
    }
  },
  created() {
    this.setBottonView()
  },
  methods: {
    // 设置删除/打印/编辑是否显示
    setBottonView() {
      if (this.editConfig.title === "新建") {
        this.showEdit = false
        this.showFooter = true
      } else if (this.editConfig.infomation.status === "完成") {
        this.showEdit = false
        this.showFooter = false
      } else {
        this.showEdit = true
        this.showFooter = false
      }
      if (this.editConfig.title === "新建") {
        this.list[0].status = "active"
      } else {
        this.list.map((item) => {
          if (item.label === this.editConfig.infomation.status) {
            item.status = "active"
          } else {
            item.status = "todo"
          }
        })
      }
    },
    // 关闭
    handleClose() {
      this.editConfig.visible = false
    },
    // 编辑
    editClick() {
      this.showEdit = false
      this.showFooter = true
    },
    // 保存
    saveClick() {}
  }
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
.dialog-header {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #333;
  .header_btns {
    margin-left: auto;
    margin-right: 60px;
    .btn {
      cursor: no-drop;
    }
  }
}
.content-status {
  display: flex;
}
.basic-info {
  height: calc(100% - 80px);
  overflow: auto;
  margin: 20px;
  border: 1px solid #dcdfe6;
  box-shadow: inset 0 0 2px #dee2e6;
  -moz-box-shadow: inset 0 0 2px #dee2e6;
  -webkit-box-shadow: inset 0 0 2px #dee2e6;
  .basic-info-view {
    margin-top: 20px;
  }
}
.purchase-view {
  display: flex;
  .left {
    width: 50%;
  }
  .right {
    width: 50%;
  }
}
.second-label {
  margin-left: 20px;
  border-bottom: 1px solid #d9d9d9;
  margin-bottom: 10px;
}
::v-deep {
  .el-dialog__headerbtn {
    position: absolute;
    top: 18px;
  }
  .el-button {
    &:hover {
      border: 1px solid #dcdfe6;
      color: #333;
    }
  }
  .el-tabs--card > .el-tabs__header .el-tabs__nav {
    margin-left: 20px;
  }
  .el-tabs__item {
    height: 30px;
    line-height: 30px;
    font-size: 13px;
  }
}
</style>
src/views/operate/scrap/index.vue
New file
@@ -0,0 +1,177 @@
<template>
  <div class="rightContent">
    <div class="top">
      <SearchCommonView
        :add-title="'新建'"
        :placeholder="'请输入单号'"
        :amount-view="false"
        @addCommonClick="addBtnClick"
        @searchClick="getList"
      />
    </div>
    <div class="list-view">
      <div class="table">
        <TableCommonView
          ref="tableListRef"
          :table-list="tableList"
          :show-checkcol="false"
          @tableRowClick="tableRowClick"
        ></TableCommonView>
      </div>
      <div class="btn-pager">
        <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
      </div>
    </div>
    <!-- 新建/编辑 -->
    <AddScrapDialog v-if="editConfig.visible" :edit-common-config="editConfig" />
  </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 AddScrapDialog from "@/views/operate/scrap/AddScrapDialog"
export default {
  name: "ScrapView",
  props: {},
  components: { AddScrapDialog },
  mixins: [pageMixin],
  computed: {},
  data() {
    return {
      tableList: {},
      searchOptions: [],
      editConfig: {
        visible: false,
        title: "新建",
        infomation: {}
      }
    }
  },
  created() {
    this.setTable()
    this.getData()
  },
  methods: {
    setTable() {
      this.tableList = {
        tableInfomation: [],
        selectBox: true,
        showcol: this.showcol,
        allcol: [],
        tableColumn: this.setTableColumn(this.showcol)
      }
      let allcol = []
      for (let i = 0; i < this.tableList.tableColumn.length; i++) {
        if (!this.tableList.tableColumn[i].default) {
          const label = this.tableList.tableColumn[i].label
          allcol.push(label)
        }
      }
      this.tableList.allcol = allcol
    },
    setTableColumn(showcol) {
      console.log(showcol)
      let tableColumn = [
        {
          label: "单号",
          prop: "id",
          isShowColumn: true,
          default: true
        },
        {
          label: "日期",
          prop: "deviceName",
          isShowColumn: true,
          default: true
        },
        {
          label: "产品",
          prop: "id",
          isShowColumn: true,
          default: true
        },
        {
          label: "数量",
          prop: "deviceId",
          isShowColumn: true,
          default: false
        },
        {
          label: "计量单位",
          prop: "shopName",
          isShowColumn: true,
          default: false
        },
        {
          label: "源位置",
          prop: "preTime",
          isShowColumn: true,
          default: false
        },
        {
          label: "报废位置",
          prop: "status",
          isShowColumn: true,
          default: false
        },
        {
          label: "状态",
          prop: "status",
          width: 120,
          isShowColumn: true,
          default: true,
          status: true
        }
      ]
      return tableColumn
    },
    selTableCol(val) {
      this.showcol = val
      this.tableList.tableColumn = this.setTableColumn(val)
    },
    // 请求数据
    async getData(val, content) {
      await getProductList({
        [val]: content,
        page: this.pagerOptions.currPage,
        pageSize: this.pagerOptions.pageSize
      }).then((res) => {
        if (res.data.code === 200) {
          const list = res.data.data.list.map((item) => {
            return {
              ...item,
              supplierNumber: item.supplier.number,
              status: "草稿",
              preTime: "2023-09-04 11:20:00"
            }
          })
          this.tableList.tableInfomation = list || []
          this.pagerOptions.totalCount = res.data.data.total
        }
      })
    },
    // 搜索
    getList(val) {
      console.log(val)
    },
    // 行点击
    tableRowClick(row) {
      console.log(row)
      this.editConfig.visible = true
      this.editConfig.title = "编辑"
      this.editConfig.infomation = { ...row }
    },
    // 新建
    addBtnClick() {
      this.editConfig.visible = true
      this.editConfig.title = "新建"
    }
  }
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped></style>
src/views/overview/AddOverviewDialog.vue
@@ -8,7 +8,7 @@
    >
      <!-- 头 -->
      <div slot="title" class="dialog-header">
        <span>{{ editCommonConfig.title + "采购入库" }}</span>
        <span>{{ editCommonConfig.title + addName }}</span>
        <div class="header_btns">
          <span class="btn">
            <i class="el-icon-printer"></i>
@@ -39,7 +39,7 @@
          <div class="basic-info-view">
            <el-row>
              <el-col :span="12">
                <el-form-item label="接收" prop="client_name">
                <el-form-item v-if="workType === '收货'" label="客户" prop="client_name">
                  <el-select
                    v-model="editConfig.infomation.memberId"
                    placeholder="请选择"
@@ -53,7 +53,35 @@
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="安排的日期" prop="refundDate">
                <el-form-item v-if="workType === '内部调拨'" label="联系人" prop="client_name">
                  <el-select
                    v-model="editConfig.infomation.memberId"
                    placeholder="请选择"
                    size="mini"
                    style="width: 63%"
                    :disabled="!showFooter"
                  >
                    <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item v-if="workType === '发货'" label="送货地址" prop="client_name">
                  <el-select
                    v-model="editConfig.infomation.memberId"
                    placeholder="请选择"
                    size="mini"
                    style="width: 63%"
                    :disabled="!showFooter"
                  >
                    <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="日期" prop="refundDate">
                  <el-date-picker
                    v-model="editConfig.infomation.refundDate"
                    value-format="yyyy-MM-dd"
@@ -66,7 +94,7 @@
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="作业类型" prop="client_name">
                <el-form-item label="入库类型" prop="client_name">
                  <el-select
                    v-model="editConfig.infomation.memberId"
                    placeholder="请选择"
@@ -80,7 +108,7 @@
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="源单据" prop="memberId">
                <el-form-item label="来源单据" prop="memberId">
                  <el-input
                    v-model="editConfig.infomation.memberId"
                    placeholder="例如:PO0032"
@@ -90,7 +118,21 @@
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="目的位置" prop="client_name">
                <el-form-item v-if="workType !== '收货'" label="源位置" prop="client_name">
                  <el-select
                    v-model="editConfig.infomation.memberId"
                    placeholder="请选择"
                    size="mini"
                    style="width: 63%"
                    :disabled="!showFooter"
                  >
                    <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item v-if="workType !== '发货'" label="仓库位置" prop="client_name">
                  <el-select
                    v-model="editConfig.infomation.memberId"
                    placeholder="请选择"
@@ -107,22 +149,39 @@
          </div>
          <div class="bottom">
            <el-tabs v-model="activeName" type="card">
              <el-tab-pane v-if="workType !== '收货'" label="详情" name="detail"> </el-tab-pane>
              <el-tab-pane label="操作" name="first"> </el-tab-pane>
              <el-tab-pane label="其他信息" name="second">
                <el-col :span="12">
                  <el-form-item label="负责人" prop="client_name">
                    <el-select
                      v-model="editConfig.infomation.memberId"
                      placeholder="请选择"
                      size="mini"
                      style="width: 63%"
                      :disabled="!showFooter"
                    >
                      <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id">
                      </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <div class="purchase-view">
                  <div class="left">
                    <div class="second-label">其他信息</div>
                    <el-form-item v-if="workType !== '收货'" label="送货策略" prop="client_name">
                      <el-select
                        v-model="editConfig.infomation.memberId"
                        placeholder="请选择"
                        size="mini"
                        style="width: 63%"
                        :disabled="!showFooter"
                      >
                        <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id">
                        </el-option>
                      </el-select>
                    </el-form-item>
                    <el-form-item label="负责人" prop="client_name">
                      <el-select
                        v-model="editConfig.infomation.memberId"
                        placeholder="请选择"
                        size="mini"
                        style="width: 63%"
                        :disabled="!showFooter"
                      >
                        <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id">
                        </el-option>
                      </el-select>
                    </el-form-item>
                  </div>
                  <div class="right"></div>
                </div>
              </el-tab-pane>
              <el-tab-pane label="备注" name="third">
                <el-form-item label="备注" prop="desc">
@@ -137,17 +196,37 @@
                </el-form-item>
              </el-tab-pane>
            </el-tabs>
            <!-- 操作 -->
            <div v-if="activeName === 'first'">
              <CommonFormTableView
                :product-table-list="productTableList"
                :detail-enter="!showFooter"
                @inputContent="inputContent"
                @addProductClick="addProductClick"
                @addProductClick="addProductClick('操作')"
              >
                <template v-if="showFooter" slot="tableButton">
                  <el-table-column label="操作" width="60" fixed="right" align="center">
                    <template slot-scope="scope">
                      <div @click="handleDelClick(scope)">
                      <div @click="handleDelClick(scope, '操作')">
                        <i class="el-icon-delete"></i>
                      </div>
                    </template>
                  </el-table-column>
                </template>
              </CommonFormTableView>
            </div>
            <!-- 详情 -->
            <div v-if="activeName === 'detail'">
              <CommonFormTableView
                :product-table-list="detailTableList"
                :detail-enter="!showFooter"
                @inputContent="inputDetail"
                @addProductClick="addProductClick('详情')"
              >
                <template v-if="showFooter" slot="tableButton">
                  <el-table-column label="操作" width="60" fixed="right" align="center">
                    <template slot-scope="scope">
                      <div @click="handleDelClick(scope, '详情')">
                        <i class="el-icon-delete"></i>
                      </div>
                    </template>
@@ -182,6 +261,14 @@
          infomation: {}
        }
      }
    },
    workType: {
      type: String,
      default: "收货"
    },
    addName: {
      type: String,
      default: "调拨"
    }
  },
  components: { CommonFormTableView },
@@ -209,16 +296,24 @@
      activeName: "first",
      productTableList: {},
      tableData: [{ name: "ssss" }],
      productId: 0,
      isNoProduct: false, // 添加明细行时是否有产品未选择
      showEdit: false, // 是否显示编辑按钮
      isDelClick: false, // 删除按钮是否可点击
      showFooter: false, // 是否显示取消保存
      currentState: "todo" // 当前状态
      currentState: "todo", // 当前状态
      detailTableList: {},
      detailTableData: [{ name: "ssss" }],
      detailId: 0,
      isNoDetail: false, // 添加详情明细行时是否未选择
      tableColumn: []
    }
  },
  created() {
    this.setTableForm()
    this.setBottonView()
    this.setDetailTableForm()
    this.activeName = this.workType === "收货" ? "first" : "detail"
  },
  methods: {
    // 设置删除/打印/编辑是否显示
@@ -268,6 +363,7 @@
    saveClick() {},
    // 删除
    delClick() {},
    // 操作列表
    setTableForm() {
      this.productTableList = {
        tableData: this.tableData,
@@ -281,7 +377,7 @@
        ]
      }
    },
    // 产品列表输入
    // 操作输入
    inputContent(val, prop, row) {
      this.productId = row.productId
      this.tableData.map((item) => {
@@ -290,35 +386,99 @@
        }
      })
    },
    // 产品新增
    addProductClick() {
      console.log(this.tableData)
      for (let i = 0; i < this.tableData.length; i++) {
        if (this.tableData[i].name.length === 0) {
          this.isNoProduct = true
          break
        } else {
          this.isNoProduct = false
    // 新增
    addProductClick(value) {
      if (value === "操作") {
        console.log(this.tableData)
        for (let i = 0; i < this.tableData.length; i++) {
          if (this.tableData[i].name.length === 0) {
            this.isNoProduct = true
            break
          } else {
            this.isNoProduct = false
          }
        }
        if (!this.isNoProduct) {
          this.productId++
          this.tableData.push({
            productId: this.productId,
            id: 0,
            amount: 0,
            desc: "",
            name: "",
            number: "",
            price: 0,
            total: 0
          })
        }
      } else {
        console.log(this.detailTableData)
        for (let i = 0; i < this.detailTableData.length; i++) {
          if (this.detailTableData[i].name.length === 0) {
            this.isNoDetail = true
            break
          } else {
            this.isNoDetail = false
          }
        }
        if (!this.isNoDetail) {
          this.detailId++
          this.detailTableData.push({
            detailId: this.detailId,
            id: 0,
            amount: 0,
            desc: "",
            name: "",
            number: "",
            price: 0,
            total: 0
          })
        }
      }
      if (!this.isNoProduct) {
        this.productId++
        this.tableData.push({
          productId: this.productId,
          id: 0,
          amount: 0,
          desc: "",
          name: "",
          number: "",
          price: 0,
          total: 0
        })
    },
    // 删除
    handleDelClick(scope, value) {
      console.log(scope)
      if (value === "操作") {
        this.tableData.splice(scope.$index, 1)
      } else {
        this.detailTableData.splice(scope.$index, 1)
      }
    },
    // 产品删除
    handleDelClick(scope) {
      console.log(scope)
      this.tableData.splice(scope.$index, 1)
    // 详情列表
    setDetailTableForm() {
      this.setTableColumn()
      this.detailTableList = {
        tableData: this.detailTableData,
        tableColumn: this.tableColumn
      }
    },
    setTableColumn() {
      if (this.workType === "内部调拨") {
        this.tableColumn = [
          { label: "产品", prop: "name", productName: true, isRequird: true },
          { label: "从", prop: "number", select: true },
          { label: "至", prop: "amount", select: true },
          { label: "完成", prop: "total", inputFloat: true },
          { label: "计量单位", prop: "total", select: true }
        ]
      } else {
        this.tableColumn = [
          { label: "产品", prop: "name", productName: true, isRequird: true },
          { label: "从", prop: "number", select: true },
          { label: "完成", prop: "total", inputFloat: true },
          { label: "计量单位", prop: "total", select: true }
        ]
      }
    },
    // 详情输入
    inputDetail(val, prop, row) {
      this.detailId = row.detailId
      this.detailTableData.map((item) => {
        if (item.detailId === row.detailId) {
          item[prop] = val
        }
      })
    }
  }
}
@@ -353,9 +513,20 @@
  .basic-info-view {
    margin-top: 20px;
  }
  // .bottom {
  //   margin-left: 20px;
  // }
}
.purchase-view {
  display: flex;
  .left {
    width: 50%;
  }
  .right {
    width: 50%;
  }
}
.second-label {
  margin-left: 20px;
  border-bottom: 1px solid #d9d9d9;
  margin-bottom: 10px;
}
::v-deep {
  .el-dialog__headerbtn {
src/views/overview/OverviewListView.vue
@@ -23,7 +23,12 @@
      </div>
    </div>
    <!-- 新建/编辑 -->
    <AddOverviewDialog v-if="editConfig.visible" :edit-common-config="editConfig" />
    <AddOverviewDialog
      v-if="editConfig.visible"
      :work-type="workType"
      :edit-common-config="editConfig"
      :add-name="this.$route.query.name"
    />
  </div>
</template>
@@ -53,7 +58,8 @@
        visible: false,
        title: "新建",
        infomation: {}
      }
      },
      workType: this.$route.query.workType
    }
  },
  created() {
src/views/overview/index.vue
@@ -17,7 +17,7 @@
        >
          <div class="top">
            <div class="label">
              <span style="cursor: pointer" @click="labelClick(item.name)">{{ item.name }}</span>
              <span style="cursor: pointer" @click="labelClick(item)">{{ item.name }}</span>
            </div>
            <div class="set">...</div>
          </div>
@@ -60,31 +60,38 @@
      tableList: [
        {
          name: "采购入库",
          status: "active"
          status: "active",
          workType: "收货"
        },
        {
          name: "内部调拨",
          status: "done"
          status: "done",
          workType: "内部调拨"
        },
        {
          name: "3",
          status: "done"
          name: "订单发货出库",
          status: "done",
          workType: "发货"
        },
        {
          name: "2",
          status: "active"
          status: "active",
          workType: "收货"
        },
        {
          name: "3",
          status: "todo"
          status: "todo",
          workType: "收货"
        },
        {
          name: "2",
          status: "active"
          status: "active",
          workType: "收货"
        },
        {
          name: "3",
          status: "todo"
          status: "todo",
          workType: "收货"
        }
      ],
      editConfig: {
@@ -99,8 +106,8 @@
    getList(val) {
      console.log(val)
    },
    labelClick(name) {
      this.$router.push({ path: "/overview/overviewList", query: { name: name } })
    labelClick(item) {
      this.$router.push({ path: "/overview/overviewList", query: { name: item.name, workType: item.workType } })
    },
    getData() {}
  }
src/views/productManage/product/AddProductDialog.vue
@@ -38,7 +38,7 @@
        </div>
        <div class="basic-info">
          <FormBtnsView @inOutBoundClick="inOutBoundClick" />
          <FormBtnsView :add-product="addProduct" @inOutBoundClick="inOutBoundClick" :show-procure="showProcure" />
          <div class="basic-info-view">
            <el-row>
              <el-col :span="20">
@@ -59,8 +59,12 @@
              </el-col>
              <el-col :span="24">
                <div style="margin-left: 20px; margin-top: -30px">
                  <el-checkbox v-model="marketable" :disabled="!showFooter">可销售</el-checkbox>
                  <el-checkbox v-model="procurable" :disabled="!showFooter">可采购</el-checkbox>
                  <el-checkbox v-model="marketable" :disabled="!showFooter" @change="checkboxChange('销售', $event)"
                    >可销售</el-checkbox
                  >
                  <el-checkbox v-model="procurable" :disabled="!showFooter" @change="checkboxChange('采购', $event)"
                    >可采购</el-checkbox
                  >
                </div>
              </el-col>
            </el-row>
@@ -457,7 +461,9 @@
      marketable: true, // 可销售
      procurable: true, // 可采购
      checkedCities: ["上海", "北京"],
      cities: ["上海对对对对对对多多多多多多多北京对对对对对对", "北京对对对对对对多", "广州", "深圳"]
      cities: ["上海对对对对对对多多多多多多多北京对对对对对对", "北京对对对对对对多", "广州", "深圳"],
      addProduct: false,
      showProcure: true
    }
  },
  created() {
@@ -471,9 +477,11 @@
        this.showButton = false
        this.showEdit = false
        this.showFooter = true
        this.addProduct = true
      } else {
        this.showEdit = true
        this.showFooter = false
        this.addProduct = false
      }
    },
    // 关闭
@@ -596,6 +604,12 @@
    // 进出点击
    inOutBoundClick() {
      this.$router.push({ path: "/reportForm/inOutboundDetail", query: { name: "产品名称/出入库明细" } })
    },
    // 可销售/可采购
    checkboxChange(val, param) {
      if (val === "采购") {
        this.showProcure = param
      }
    }
  }
}
src/views/productManage/product/index.vue
@@ -156,12 +156,6 @@
          default: false
        },
        {
          label: "公司",
          prop: "shopName",
          isShowColumn: showcol.includes("公司"),
          default: false
        },
        {
          label: "销售价格",
          prop: "faultLevel",
          isShowColumn: showcol.includes("销售价格"),