xialei 1 рік тому
батько
коміт
f8d8f673ff
2 змінених файлів з 34 додано та 0 видалено
  1. 6 0
      src/api/product.js
  2. 28 0
      src/views/product/dxzwyhList/index.vue

+ 6 - 0
src/api/product.js

@@ -19,6 +19,12 @@ import request from './request'
19 19
   return request.post('store/product/edit_price/'+id,data)
20 20
 }
21 21
 /**
22
+ * @description 供应链商品 -- 删除
23
+ */
24
+export function Posteditdelete(id) {
25
+  return request.post('store/product/delete_xp/'+id)
26
+}
27
+/**
22 28
  * @description 供应链商品 -- 上下架
23 29
  */
24 30
  export function postchangeshow(data) {

+ 28 - 0
src/views/product/dxzwyhList/index.vue

@@ -149,6 +149,16 @@
149 149
 
150 150
             <el-button
151 151
               type="text"
152
+              size="small"
153
+              class="mr10"
154
+            >
155
+              <div @click="deleteXp(scope.row.product_id)">
156
+                删除
157
+              </div>
158
+            </el-button>
159
+
160
+            <el-button
161
+              type="text"
152 162
               @click=""
153 163
               size="small"
154 164
               class="mr10"
@@ -245,6 +255,7 @@
245 255
 import {
246 256
   postchangeshow,
247 257
   Posteditprice,
258
+  Posteditdelete,
248 259
   statusApi,
249 260
   Getproductgdx,
250 261
   getgonglstfilter,
@@ -356,6 +367,23 @@ export default {
356 367
 
357 368
 
358 369
     },
370
+    deleteXp(en) {
371
+        const _this = this
372
+        Posteditdelete(en).then(
373
+          (res) => {
374
+            if (res.status == 200) {
375
+              this.getList();
376
+              this.getLstFilterApi();
377
+              this.$message.success(res.message);
378
+            } else {
379
+              this.$message.error(res.message);
380
+            }
381
+          },
382
+          (fail) => {
383
+             this.$message.error(fail.message);
384
+          }
385
+        );
386
+    },
359 387
     // toggleSelection(rows) {
360 388
     //   if (rows) {
361 389
     //     rows.forEach((row) => {