From 8d04706059fecaa6afb485830af291269919c58d Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期五, 22 九月 2023 11:16:22 +0800
Subject: [PATCH] 新建/编辑产品弹窗新增字段接口联调

---
 /dev/null                                            |  216 ------------------------------------
 src/views/productManage/product/AddProductDialog.vue |  107 +++++++----------
 2 files changed, 42 insertions(+), 281 deletions(-)

diff --git a/src/views/other/product/index.vue b/src/views/other/product/index.vue
deleted file mode 100644
index 9b43bd8..0000000
--- a/src/views/other/product/index.vue
+++ /dev/null
@@ -1,216 +0,0 @@
-<template>
-  <div class="product">
-    <div v-if="isDetail" class="detail-top">
-      <DetailListCommonBtn :query-class-options="queryClassOptions" />
-      <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
-    </div>
-    <div v-else class="top">
-      <SearchCommonView
-        ref="searchCommonView"
-        :query-class-options="queryClassOptions"
-        :search-options="searchOptions"
-        :search-sel="searchSel"
-        @searchClick="searchClick"
-        @resetClick="resetClick"
-      />
-      <div class="btn-pager">
-        <PublicFunctionBtnView :statistics="true" :operates-list="operatesList" @batchDelete="delClick" />
-        <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
-      </div>
-    </div>
-    <TableCommonView
-      ref="tableListRef"
-      v-loading="loading"
-      :table-list="tableList"
-      :select-box="!isDetail"
-      @getSelectArray="getSelectArray"
-    >
-      <!-- <template slot="tableButton">
-        <el-table-column label="鎿嶄綔" width="60" fixed="right">
-          <template slot-scope="scope">
-            <el-button @click="handleClick(scope.row)" type="text" size="small">缂栬緫</el-button>
-          </template>
-        </el-table-column>
-      </template> -->
-    </TableCommonView>
-  </div>
-</template>
-
-<script>
-import { getProductList } from "@/api/common/other"
-import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
-
-export default {
-  name: "ProductView",
-  props: {
-    isDetail: {
-      type: Boolean,
-      default: false
-    },
-    addConfig: {
-      type: Object,
-      default: () => {
-        return {}
-      }
-    }
-  },
-  mixins: [pageMixin],
-  components: {},
-  computed: {},
-  data() {
-    return {
-      tableList: {},
-      loading: false,
-      activeName: "second",
-      queryClassValue: "1",
-      queryClassOptions: [
-        { value: "1", label: "鍏ㄩ儴" },
-        { value: "2", label: "浠婃棩鑱旂郴" },
-        { value: "3", label: "鏈懆鑱旂郴" },
-        { value: "4", label: "鏈湀鑱旂郴" }
-      ],
-      searchOptions: [],
-      operatesList: [
-        { id: "1", name: "鍏变韩" },
-        { id: "2", name: "鎵归噺缂栬緫" },
-        { id: "3", name: "瀵煎嚭" },
-        { id: "4", name: "涓嬭浇鍏ㄩ儴闄勪欢" },
-        { id: "5", name: "鏇存敼鍒涘缓浜�" },
-        { id: "6", name: "鏍戠粨鏋勮缃�" },
-        { id: "7", name: "瀹℃壒璁剧疆" },
-        { id: "8", name: "鍥炶棰勮鍒楀" }
-      ],
-      editConfig: {
-        visible: false,
-        title: "鏂板缓",
-        infomation: {}
-      },
-      saleChanceName: "",
-      contactsDeail: {
-        visible: false,
-        infomation: {}
-      },
-      clientDeail: {
-        visible: false,
-        infomation: {}
-      },
-      selValueList: [],
-      searchSel: {
-        value: "topic",
-        label: ""
-      },
-      search_map: {}
-    }
-  },
-  created() {
-    this.setTable()
-    if (!this.isDetail) {
-      this.search_map = {}
-    } else {
-      this.search_map = {
-        [this.addConfig.id_name]: this.addConfig.client_name
-      }
-    }
-    this.getData(this.search_map)
-  },
-  methods: {
-    setTable() {
-      this.tableList = {
-        tableInfomation: [],
-        tableColumn: [
-          { label: "浜у搧鍚嶇О", prop: "topic" },
-          { label: "浜у搧缂栧彿", prop: "client_name" },
-          { label: "浜у搧绫诲埆", prop: "contact_name" },
-          { label: "瑙勬牸鍨嬪彿", prop: "client_status" },
-          { label: "璁¢噺鍗曚綅", prop: "contact_information_name" },
-          { label: "浜у搧鎶ヤ环", prop: "follow_time" },
-          { label: "鍙傝�冩垚鏈环", prop: "next_follow_time" },
-          { label: "鎬诲簱瀛樻暟閲�", prop: "member_name" },
-          { label: "璐熻矗浜�", prop: "record" }
-        ]
-      }
-      this.searchOptions = []
-      for (let i = 0; i < this.tableList.tableColumn.length; i++) {
-        const label = this.tableList.tableColumn[i].label
-        const value = this.tableList.tableColumn[i].prop
-        this.searchOptions.push({ value: value, label: label })
-      }
-    },
-    // 璇锋眰鏁版嵁
-    async getData() {
-      this.loading = true
-      await getProductList({
-        productName: "",
-        productNumber: "",
-        page: this.pagerOptions.currPage,
-        pageSize: this.pagerOptions.pageSize
-      })
-        .then((res) => {
-          console.log(res)
-          if (res.code === 200) {
-            if (res.data.list && res.data.list.length > 0) {
-              const list = res.data.list.map((item) => {
-                return {
-                  ...item
-                }
-              })
-              this.tableList.tableInfomation = list || []
-              this.pagerOptions.totalCount = res.data.count
-            } else {
-              this.tableList.tableInfomation = []
-            }
-          } else {
-            this.tableList.tableInfomation = []
-          }
-          this.loading = false
-        })
-        .catch((err) => {
-          console.log(err)
-          this.tableList.tableInfomation = []
-          this.loading = false
-        })
-    },
-    // 鎼滅储
-    searchClick(val, content) {
-      console.log(val, content)
-      this.search_map = {
-        [val.value]: content
-      }
-      this.getData()
-    },
-    resetClick() {
-      this.search_map = {}
-      this.getData()
-    },
-    getSelectArray(val) {
-      console.log(val)
-      this.selValueList = []
-      const list = val.map((item) => {
-        return item.id
-      })
-      this.selValueList = list
-    }
-  }
-}
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style lang="scss" scoped>
-.product {
-  .top {
-    margin-bottom: 20px;
-    .btn-pager {
-      display: flex;
-      .page {
-        margin-left: auto;
-      }
-    }
-  }
-  .detail-top {
-    display: flex;
-    .page {
-      margin-left: auto;
-    }
-  }
-}
-</style>
diff --git a/src/views/productManage/product/AddProductDialog.vue b/src/views/productManage/product/AddProductDialog.vue
index 3900892..56214dd 100644
--- a/src/views/productManage/product/AddProductDialog.vue
+++ b/src/views/productManage/product/AddProductDialog.vue
@@ -36,7 +36,6 @@
           <el-button plain size="mini" disabled>鏇存柊鏁伴噺</el-button>
           <el-button plain size="mini" disabled>鎵ц琛ヨ揣</el-button>
         </div>
-
         <div class="basic-info">
           <FormBtnsView
             :add-product="addProduct"
@@ -130,7 +129,6 @@
                       :disabled="!showFooter"
                     ></el-input>
                   </el-form-item>
-
                   <el-form-item label="浜у搧鏍囩" prop="productTagName" style="margin-left: 20px">
                     <el-input
                       v-model="editConfig.infomation.productTagName"
@@ -245,7 +243,6 @@
                     </el-checkbox-group>
                   </el-form-item>
                 </div> -->
-
                 <div class="left">
                   <el-form-item label="璐熻矗浜�" prop="principal" style="margin-left: 20px" label-width="80px">
                     <el-select
@@ -287,6 +284,40 @@
                 <div class="right">
                   <el-form-item
                     label="鍒堕�犲墠缃椂闂�"
+                    prop="makeAdvanceTime"
+                    style="margin-left: 20px"
+                    label-width="130px"
+                  >
+                    <el-input-number
+                      v-model="editConfig.infomation.makeAdvanceTime"
+                      placeholder="璇疯緭鍏�"
+                      :min="0"
+                      :precision="0"
+                      :controls="false"
+                      style="width: 85%"
+                      :disabled="!showFooter"
+                    ></el-input-number>
+                    <span> 澶╂暟</span>
+                  </el-form-item>
+                  <el-form-item
+                    label="鐢熶骇璁㈠崟鍑嗗澶╂暟"
+                    prop="orderAdvanceTime"
+                    style="margin-left: 20px"
+                    label-width="130px"
+                  >
+                    <el-input-number
+                      v-model="editConfig.infomation.orderAdvanceTime"
+                      placeholder="璇疯緭鍏�"
+                      :min="0"
+                      :precision="0"
+                      :controls="false"
+                      style="width: 85%"
+                      :disabled="!showFooter"
+                    ></el-input-number>
+                    <span> 澶╂暟</span>
+                  </el-form-item>
+                  <el-form-item
+                    label="瀹㈡埛鍓嶇疆鏃堕棿"
                     prop="deliveryAdvanceTime"
                     style="margin-left: 20px"
                     label-width="130px"
@@ -300,37 +331,7 @@
                       style="width: 85%"
                       :disabled="!showFooter"
                     ></el-input-number>
-                    <span> 澶╂暟</span>
-                  </el-form-item>
-                  <el-form-item
-                    label="鐢熶骇璁㈠崟鍑嗗澶╂暟"
-                    prop="customerTaxes"
-                    style="margin-left: 20px"
-                    label-width="130px"
-                  >
-                    <el-input-number
-                      v-model="editConfig.infomation.customerTaxes"
-                      placeholder="璇疯緭鍏�"
-                      :min="0"
-                      :precision="0"
-                      :controls="false"
-                      style="width: 85%"
-                      :disabled="!showFooter"
-                    ></el-input-number>
-                    <span> 澶╂暟</span>
-                  </el-form-item>
-                  <el-form-item label="瀹㈡埛鍓嶇疆鏃堕棿" prop="aaa" style="margin-left: 20px" label-width="130px">
-                    <el-select
-                      v-model="editConfig.infomation.aaa"
-                      multiple
-                      placeholder="璇烽�夋嫨"
-                      size="mini"
-                      style="width: 85%"
-                      :disabled="!showFooter"
-                    >
-                      <el-option v-for="item in aaaOptions" :key="item.id" :label="item.username" :value="item.id">
-                      </el-option>
-                    </el-select>
+                    <span> 澶�</span>
                   </el-form-item>
                 </div>
               </div>
@@ -483,7 +484,6 @@
       </el-form>
       <!-- 灏� -->
       <div v-if="showFooter" slot="footer" class="dialog-footer">
-        <!-- <el-button type="primary" size="small" @click="editConfig.visible = false">淇濆苟鎻愪氦瀹℃壒</el-button> -->
         <el-button type="primary" size="small" @click="saveClick('form')">淇濆瓨</el-button>
         <el-button size="small" @click="editConfig.visible = false">鍙栨秷</el-button>
       </div>
@@ -523,12 +523,7 @@
         salePrice: [{ required: true, message: "璇疯緭鍏ラ攢鍞环鏍�", trigger: "blur" }],
         unit: [{ required: true, message: "璇疯緭鍏ュ崟浣�", trigger: "blur" }]
       },
-      memberOptions: [
-        {
-          name: "admin",
-          id: 1
-        }
-      ],
+      memberOptions: [{ name: "绠$悊鍛�", id: 1 }],
       productCategoryOptions: [], // 浜у搧绫诲埆
       productTypeOptions: [
         { name: "鑳芥秷鑰�", id: 1 },
@@ -557,30 +552,12 @@
       showProcure: true,
       showSale: true,
       materialTypeList: [
-        {
-          name: "鍘熸潗鏂�",
-          id: "鍘熸潗鏂�"
-        },
-        {
-          name: "鍗婃垚鍝�",
-          id: "鍗婃垚鍝�"
-        },
-        {
-          name: "鎴愬搧",
-          id: "鎴愬搧"
-        },
-        {
-          name: "杈呮枡",
-          id: "杈呮枡"
-        },
-        {
-          name: "鑰楁潗",
-          id: "鑰楁潗"
-        },
-        {
-          name: "鍏朵粬",
-          id: "鍏朵粬"
-        }
+        { name: "鍘熸潗鏂�", id: "鍘熸潗鏂�" },
+        { name: "鍗婃垚鍝�", id: "鍗婃垚鍝�" },
+        { name: "鎴愬搧", id: "鎴愬搧" },
+        { name: "杈呮枡", id: "杈呮枡" },
+        { name: "鑰楁潗", id: "鑰楁潗" },
+        { name: "鍏朵粬", id: "鍏朵粬" }
       ]
     }
   },

--
Gitblit v1.8.0