From b823a11d74b6623fadcfab27150cdbb0ad9766f5 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期五, 15 九月 2023 17:50:07 +0800
Subject: [PATCH] 调拨列表页面、报废列表、新建页面开发

---
 src/views/operate/allot/index.vue                     |  250 +++++++++++++
 src/views/operate/scrap/AddScrapDialog.vue            |  265 +++++++++++++
 src/views/overview/AddOverviewDialog.vue              |  275 +++++++++++--
 src/views/overview/OverviewListView.vue               |   10 
 src/views/productManage/product/index.vue             |    6 
 src/views/operate/scrap/index.vue                     |  177 +++++++++
 src/views/overview/index.vue                          |   29 
 src/router/operate/index.js                           |   19 
 src/components/layout/components/appsidebar/index.vue |    4 
 src/components/makepager/FormBtnsView.vue             |   29 +
 src/views/productManage/product/AddProductDialog.vue  |   22 
 11 files changed, 994 insertions(+), 92 deletions(-)

diff --git a/src/components/layout/components/appsidebar/index.vue b/src/components/layout/components/appsidebar/index.vue
index f662cb6..7c6cca3 100644
--- a/src/components/layout/components/appsidebar/index.vue
+++ b/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">
diff --git a/src/components/makepager/FormBtnsView.vue b/src/components/makepager/FormBtnsView.vue
index 982a477..c312e36 100644
--- a/src/components/makepager/FormBtnsView.vue
+++ b/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;
   }
 }
diff --git a/src/router/operate/index.js b/src/router/operate/index.js
index b328478..855d0d0 100644
--- a/src/router/operate/index.js
+++ b/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: "鎶ュ簾鍗�"
     }
   }
 ]
diff --git a/src/views/operate/allot/index.vue b/src/views/operate/allot/index.vue
new file mode 100644
index 0000000..042e54b
--- /dev/null
+++ b/src/views/operate/allot/index.vue
@@ -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>
diff --git a/src/views/operate/scrap/AddScrapDialog.vue b/src/views/operate/scrap/AddScrapDialog.vue
new file mode 100644
index 0000000..ceff99b
--- /dev/null
+++ b/src/views/operate/scrap/AddScrapDialog.vue
@@ -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: "璇烽�夋嫨閿�鍞礋璐d汉", 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>
diff --git a/src/views/operate/scrap/index.vue b/src/views/operate/scrap/index.vue
new file mode 100644
index 0000000..87c6af0
--- /dev/null
+++ b/src/views/operate/scrap/index.vue
@@ -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>
diff --git a/src/views/overview/AddOverviewDialog.vue b/src/views/overview/AddOverviewDialog.vue
index 7a35712..abf3d6d 100644
--- a/src/views/overview/AddOverviewDialog.vue
+++ b/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 {
diff --git a/src/views/overview/OverviewListView.vue b/src/views/overview/OverviewListView.vue
index b8044ad..1f628c3 100644
--- a/src/views/overview/OverviewListView.vue
+++ b/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() {
diff --git a/src/views/overview/index.vue b/src/views/overview/index.vue
index 536bea9..c535477 100644
--- a/src/views/overview/index.vue
+++ b/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() {}
   }
diff --git a/src/views/productManage/product/AddProductDialog.vue b/src/views/productManage/product/AddProductDialog.vue
index b71c4a6..32cffde 100644
--- a/src/views/productManage/product/AddProductDialog.vue
+++ b/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
+      }
     }
   }
 }
diff --git a/src/views/productManage/product/index.vue b/src/views/productManage/product/index.vue
index 85e9876..08c4dcc 100644
--- a/src/views/productManage/product/index.vue
+++ b/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("閿�鍞环鏍�"),

--
Gitblit v1.8.0