Zory vor 2 Tagen
Ursprung
Commit
765020be33

+ 7 - 0
src/api/model/merGoods.js

@@ -58,4 +58,11 @@ export default {
             return await http.post(this.url, params);
         },
     },
+    del: {
+        url: `${config.API_URL}/merchant/goods/del`,
+        name: "-",
+        post: async function (params) {
+            return await http.post(this.url, params);
+        },
+    },
 }

+ 0 - 3
src/components/imFloat/order.vue

@@ -127,9 +127,6 @@
 
                 </div>
             </el-main>
-            <el-footer v-if="orderData && orderData.status == 1">
-                <el-button size="large"  :loading="isDoneing" type="primary" @click="doneOrder()">手动核销订单</el-button>
-            </el-footer>
         </el-container>
     </el-drawer>
 </template>

+ 1 - 1
src/components/scUpload/file.vue

@@ -174,7 +174,7 @@
 					if(response.code == config.successCode){
 						param.onSuccess(res)
 					}else{
-						param.onError(response.msg || "未知错误")
+						param.onError(res.msg || "未知错误")
 					}
 				}).catch(err => {
 					param.onError(err)

+ 1 - 1
src/components/scUpload/index.vue

@@ -241,7 +241,7 @@
 					if(response.code == config.successCode){
 						param.onSuccess(res)
 					}else{
-						param.onError(response.msg || "未知错误")
+						param.onError(res.msg || "未知错误")
 					}
 				}).catch(err => {
 					param.onError(err)

+ 1 - 1
src/components/scUpload/multiple.vue

@@ -221,7 +221,7 @@
 					if(response.code == config.successCode){
 						param.onSuccess(res)
 					}else{
-						param.onError(response.msg || "未知错误")
+						param.onError(res.msg || "未知错误")
 					}
 				}).catch(err => {
 					param.onError(err)

+ 1 - 1
src/views/manage/goods/index/components/search.vue

@@ -27,7 +27,7 @@
                                 <el-option value="1" label="审核中"></el-option>
                                 <el-option value="2" label="售卖中"></el-option>
                                 <el-option value="3" label="已下架"></el-option>
-                                <el-option value="4" label="已删除"></el-option>
+                                <el-option value="4" label="审核驳回"></el-option>
                                 <template #prefix>状态</template>
                             </el-select>
                         </el-col>

+ 8 - 8
src/views/merchant/goods/add.vue

@@ -116,13 +116,13 @@
                                         </div>
                                     </div>
                                 </fieldset>
-                                <el-form-item label="多规格" prop="mult_sku">
+                                <!-- <el-form-item label="多规格" prop="mult_sku">
                                     <el-radio-group v-model="formData.mult_sku">
                                         <el-radio border :label="1">关闭</el-radio>
                                         <el-radio border :label="2">开启</el-radio>
                                     </el-radio-group>
                                     <div class="el-form-item-msg"></div>
-                                </el-form-item>
+                                </el-form-item> -->
                                 <fieldset v-if="formData.mult_sku == 2">
                                     <legend><el-tag>规格明细</el-tag></legend>
                                     <el-button type="primary" @click="addSkuSpecs" v-if="skuSpecs.length<5">新增规格</el-button>
@@ -371,7 +371,7 @@
                                 </el-form-item> -->
                             </el-card>
                             <el-card shadow="never" header="消费规则">
-                                <el-form-item label="使用规则">
+                                <!-- <el-form-item label="使用规则">
                                     <div class="el-form-item-msg">
                                         <el-button @click="addRule">添加规则</el-button>
                                     </div>
@@ -386,7 +386,7 @@
                                             </div>
                                         </div>
                                     </div>
-                                </el-form-item>
+                                </el-form-item> -->
                                 <el-form-item label="限购规则" prop="limit_rule_type">
                                     <el-radio-group v-model="formData.limit_rule_type">
                                         <el-radio :label="1">不限制购买</el-radio>
@@ -782,11 +782,11 @@ export default {
             var { formData, $message } = this;
             var validate = await this.$refs.dialogForm.validate().catch(()=>{});
             if(!validate){ return false }
-            if (this.notificationData.length == 0) {
-                return this.$message.error("使用规则至少需要一组以上");
-            }
+            // if (this.notificationData.length == 0) {
+            //     return this.$message.error("使用规则至少需要一组以上");
+            // }
             formData.specs = this.specs;
-            formData.notification = this.notificationData;
+            // formData.notification = this.notificationData;
             formData.skuSpecs = this.skuSpecs;
             if (formData.sold_start_times) {
                 var sold_start_time = formData.sold_start_times;

+ 12 - 12
src/views/merchant/goods/edit.vue

@@ -119,13 +119,13 @@
                                         </div>
                                     </div>
                                 </fieldset>
-                                <el-form-item label="多规格" prop="mult_sku">
+                                <!-- <el-form-item label="多规格" prop="mult_sku">
                                     <el-radio-group v-model="formData.mult_sku">
                                         <el-radio border :label="1">关闭</el-radio>
                                         <el-radio border :label="2">开启</el-radio>
                                     </el-radio-group>
                                     <div class="el-form-item-msg"></div>
-                                </el-form-item>
+                                </el-form-item> -->
                                 <fieldset v-if="formData.mult_sku == 2">
                                     <legend><el-tag>规格明细</el-tag></legend>
                                     <el-button type="primary" @click="addSkuSpecs" v-if="skuSpecs.length<5">新增规格</el-button>
@@ -367,7 +367,7 @@
                                 </el-form-item>
                             </el-card>
                             <el-card shadow="never" header="消费规则">
-                                <el-form-item label="使用规则">
+                                <!-- <el-form-item label="使用规则">
                                     <div class="el-form-item-msg">
                                         <el-button @click="addRule">添加规则</el-button>
                                     </div>
@@ -382,7 +382,7 @@
                                             </div>
                                         </div>
                                     </div>
-                                </el-form-item>
+                                </el-form-item> -->
                                 <el-form-item label="限购规则" prop="limit_rule_type">
                                     <el-radio-group v-model="formData.limit_rule_type">
                                         <el-radio :label="1">不限制购买</el-radio>
@@ -677,23 +677,23 @@ export default {
         },
         async getDetail(id,product_id){
             var resp = await this.$API.merGoods.detail.get({"id":id,"product_id":product_id});
-            this.showNext = true;
             if (resp.code == 0) {
                 this.$message.error(resp.msg);
                 setTimeout(function(){
                     this.$router.go(-1)
                 },1500)
             }
-            console.log("data",resp.data)
             this.formData = resp.data;
             this.specs = resp.data.specs;
             this.skuSpecs = resp.data.skuSpecs;
             this.notificationData = resp.data.notification
             
+            this.channelLoad = true;
             var typeData = this.$TOOL.findNodeById(this.categoryData,parseInt(this.formData.category_id));
             if (!typeData) return this.$message.error("获取商品类型失败")
-            this.typeData = typeData.types;
+            this.channelLoad = false;
             this.showNext = true;
+            this.typeData = typeData.types;
         },
         skuResp(data){
             this.skuSpecs[data.index] = data.data;
@@ -796,10 +796,10 @@ export default {
             var { formData, $message } = this;
             var validate = await this.$refs.dialogForm.validate().catch(()=>{});
             if(!validate){ return false }
-            if (this.notificationData.length == 0) {
-                return this.$message.error("使用规则至少需要一组以上");
-            }
-            formData.notification = this.notificationData;
+            // if (this.notificationData.length == 0) {
+            //     return this.$message.error("使用规则至少需要一组以上");
+            // }
+            // formData.notification = this.notificationData;
             formData.specs = this.specs;
             formData.skuSpecs = this.skuSpecs;
             if (formData.sold_start_times) {
@@ -828,7 +828,7 @@ export default {
 
 <style scoped>
 .main-body{display: flex;height: 100%;gap: 20px;}
-.main-body .reason{height: calc(100% - 75px);}
+.main-body.reason{height: calc(100% - 85px);}
 .main-body .body-left{background-color: #fff;flex: 1 1 0%;}
 .body-left-title{height: 60px;line-height: 40px;padding: 10px;font-size: 16px;color: #000;font-weight: bold;border-bottom: 1px solid #f8f8f8;}
 .main-body .body-form{height: calc(100% - 80px);overflow: auto;padding: 10px;}

+ 2 - 2
src/views/merchant/goods/index/components/search.vue

@@ -13,11 +13,11 @@
                             </el-input>
                         </el-col>
                         <el-col :xs="12" :sm="12" :md="12" :lg="6" :xl="4">
-                            <el-select v-model="searchKey.status" clearable placeholder="请选择状态" @change="searchForm" :style="{width: '100%'}" class="diy-select">
+                            <el-select v-model="searchKey.exstatus" clearable placeholder="请选择状态" @change="searchForm" :style="{width: '100%'}" class="diy-select">
                                 <el-option value="1" label="审核中"></el-option>
                                 <el-option value="2" label="售卖中"></el-option>
                                 <el-option value="3" label="已下架"></el-option>
-                                <el-option value="4" label="已删除"></el-option>
+                                <el-option value="4" label="审核驳回"></el-option>
                                 <template #prefix>状态</template>
                             </el-select>
                         </el-col>

+ 2 - 2
src/views/merchant/goods/index/components/table.vue

@@ -116,10 +116,10 @@ export default {
             this.$router.push({path:"/merchant/goods/edit",query:{"product_id":data.product_id,"id":data.id,"spm":(new Date()).getTime()}})
         },
         table_del(data){
-            this.$confirm(`删除店铺后,所有有关该店铺的门店、订单等信息都将删除,不可恢复,确定要执行删除吗`, '提示', {
+            this.$confirm(`删除商品后,如有对应订单也将一并会删除,数据删除后无法恢复,确定要执行吗?`, '提示', {
                 type: 'warning'
             }).then(async ()=>{
-                var resp = await this.$API.shop.del.post({"id":data.id});
+                var resp = await this.$API.merGoods.del.post({"id":data.id});
                 if (resp.code == 0) {
                     return this.$message.error(resp.msg);
                 }