戴艳蓉 3 years ago
parent
commit
dab07a069d

+ 6 - 1
src/components/show-good-data-modal/ShowDataTableColumns.js

@@ -267,7 +267,12 @@ export default [
     _slot_: "purchase",
     span: 24,
   },
-
+  {
+    prop: "ladderlist",
+    label: "销售起订量",
+    _slot_: "ladderlist",
+    span: 24,
+  },
 
 
 ]

+ 18 - 1
src/components/show-good-data-modal/main.vue

@@ -116,7 +116,7 @@
         </template>
         <template slot="purchase">
           <el-table
-            :data="sitem.ladderlist"
+            :data="sitem.nakelist"
             :size="'mini'"
             border
             stripe
@@ -128,6 +128,23 @@
             <el-table-column prop="delivery_fee" label="其中运费" />
           </el-table>
         </template>
+         <template slot="ladderlist">
+                  <el-table
+                    :data="ladderlist"
+                    :size="'mini'"
+                    border
+                    stripe
+                    style="width: 99%; margin: 10px 10px 10px 0"
+                  >
+                    <el-table-column prop="min_num" label="起订量(>=)" />
+                    <el-table-column prop="sale_price" label="售价" />
+                    <el-table-column prop="market_price" label="市场价" />
+                    <el-table-column prop="market_platform" label="对比平台" />
+                    <el-table-column prop="status" label="状态" >
+                       <template slot-scope="scope">{{scope.row.status==='1'?'启用':"禁用"}}</template>
+                    </el-table-column>
+                  </el-table>
+                </template>
       </show-data-table>
     </el-card>
   </el-dialog>

+ 5 - 10
src/components/show-voucher-model/main.vue

@@ -101,13 +101,7 @@
               alt=""
             />
           </div>
-          <a
-            v-else
-            :href="scope.row.proof_url"
-            target="_blank"
-            rel="noopener noreferrer"
-            >点击下载</a
-          >
+          <a v-else :href="scope.row.proof_url" download="凭证文件">点击下载</a>
         </template>
       </ex-table>
     </el-card>
@@ -156,7 +150,7 @@ export default {
         },
       ],
       parmValue: {
-        spuCode: "",
+        skuCode: "",
         page: 1, // 页码
         size: 15, // 每页显示条数
       },
@@ -197,7 +191,7 @@ export default {
     restSearch() {
       this.supplierCode = [];
       this.parmValue = {
-        spuCode: "",
+        skuCode: "",
         page: 1, // 页码
         size: 15, // 每页显示条数
       };
@@ -211,6 +205,7 @@ export default {
     },
     async searchList() {
       this.loading = true;
+          this.parmValue.skuCode=this.id
       const res = await asyncRequest.list(this.parmValue);
       if (res && res.code === 0 && res.data) {
         this.tableData = res.data.list;
@@ -234,7 +229,7 @@ export default {
         return;
       }
       this.showModelThis = false;
-      this.$emit("searchChange", JSON.parse(JSON.stringify(selection)));
+      this.$emit("searchChange", JSON.parse(JSON.stringify(selection[0])));
     },
   },
 };

+ 4 - 4
src/views/goodStore/goodsOnline/ShowDataTableColumns.js

@@ -262,16 +262,16 @@ export default [
   },
 
   {
-    prop: "purchase",
+    prop: "nakelist",
     label: "采购起订量",
-    _slot_: "purchase",
+    _slot_: "nakelist",
     span: 24,
   },
 
   {
-    prop: "nakelist",
+    prop: "ladderlist",
     label: "销售起订量",
-    _slot_: "nakelist",
+    _slot_: "ladderlist",
     span: 24,
   },
 

+ 30 - 3
src/views/goodStore/goodsOnline/components/fixed-price-form.vue

@@ -30,8 +30,9 @@
 
         <show-voucher-model
           :showModel="showVoucher"
-          :id="id"
+          :id="spuCode"
           @cancel="showVoucher = false"
+          @searchChange="resvoucher"
         />
       </el-col>
       <el-col :span="24">
@@ -210,7 +211,15 @@ import asyncRequest from "@/apis/service/goodStore/goodsOnline";
 import showVoucherModel from "@/components/show-voucher-model";
 export default {
   name: "exam-form",
-  props: ["size", "statusList", "disabled", "isMust", "labelWidth", "id"],
+  props: [
+    "size",
+    "statusList",
+    "disabled",
+    "isMust",
+    "labelWidth",
+    "id",
+    "spuCode",
+  ],
   components: {
     costFormAddEdit,
     showVoucherModel,
@@ -312,6 +321,7 @@ export default {
   },
   methods: {
     async initForm() {
+      console.log(this.spuCode);
       this.loading = true;
       this.rulesThis = this.rules;
       await this.resetForm();
@@ -397,7 +407,6 @@ export default {
           let res = await asyncRequest.ladderOne(model);
           this.loading = false;
           if (res && res.code === 0) {
-            const { spuCode } = res.data;
             this.$notify.success({
               title: "信息提交成功",
               message: "",
@@ -413,6 +422,24 @@ export default {
         }
       });
     },
+    resvoucher(e) {
+      const { proof_type, proof_url } = e;
+      this.ruleForm.proof_type = proof_type || "1";
+      switch (this.ruleForm.proof_type) {
+        case "1":
+          this.video_url = proof_url;
+          break;
+        case "2":
+          this.img_url = proof_url;
+          break;
+        case "3":
+          this.other_url = proof_url;
+          break;
+        default:
+          this.video_url = proof_url;
+      }
+      this.set_proof_url();
+    },
     //图片上传成功
     async UploadSuccessEventproof_url(data) {
       const { url } = data;

+ 17 - 17
src/views/goodStore/goodsOnline/detail.vue

@@ -117,31 +117,23 @@
                     "
                   />
                 </template>
-                <template slot="purchase">
+                <template slot="nakelist">
                   <el-table
-                    :data="ladderlist"
+                    :data="nakelist"
                     :size="'mini'"
                     border
                     stripe
                     style="width: 99%; margin: 10px 10px 10px 0"
                   >
                     <el-table-column prop="min_num" label="起订量(>=)" />
-                    <el-table-column prop="origin_price" label="成本合计"/>
-                    <el-table-column prop="cost_fee" label="工艺费">
-                      <template slot-scope="scope">
-                        {{ scope.row }}
-                      </template>
-                    </el-table-column>
-                    <el-table-column prop="delivery_fee" label="其中运费">
-                      <template slot-scope="scope">
-                        {{ scope.row.delivery_fee }}
-                      </template>
-                    </el-table-column>
+                    <el-table-column prop="nake_fee" label="成本合计" />
+                    <el-table-column prop="cost_fee" label="工艺费" />
+                    <el-table-column prop="delivery_fee" label="其中运费" />
                   </el-table>
                 </template>
-                <template slot="nakelist">
+                <template slot="ladderlist">
                   <el-table
-                    :data="nakelist"
+                    :data="ladderlist"
                     :size="'mini'"
                     border
                     stripe
@@ -151,7 +143,11 @@
                     <el-table-column prop="sale_price" label="售价" />
                     <el-table-column prop="market_price" label="市场价" />
                     <el-table-column prop="market_platform" label="对比平台" />
-                    <el-table-column prop="status" label="状态" />
+                    <el-table-column prop="status" label="状态">
+                      <template slot-scope="scope">{{
+                        scope.row.status === "1" ? "启用" : "禁用"
+                      }}</template>
+                    </el-table-column>
                   </el-table>
                 </template>
               </show-data-table>
@@ -174,6 +170,7 @@
               <fixed-price-form
                 :newTime="newTime"
                 :id="queryId"
+                :spuCode="spuCode"
                 v-if="newTime !== ''"
                 :disabled="false"
                 :isMust="false"
@@ -273,6 +270,7 @@ export default {
       options8: options8,
       ladderlist: [],
       nakelist: [],
+      spuCode: "",
       size: "small",
       activeTabs: "1",
       activeNames: ["0", "1", "2", "3", "4", "5", "6", "7"],
@@ -384,7 +382,9 @@ export default {
       this.loading = false;
       if (code === 0) {
         this.sitem = JSON.parse(JSON.stringify(data));
-        const { exam_status, cat_info, ladderlist, nakelist } = this.sitem;
+        const { exam_status, cat_info, ladderlist, nakelist, spuCode } =
+          this.sitem;
+        this.spuCode = spuCode;
         this.ladderlist = JSON.parse(JSON.stringify(ladderlist));
         this.nakelist = JSON.parse(JSON.stringify(nakelist));
         let cat = "";