Parcourir la source

商品详情数据分离

wenjie il y a 7 mois
Parent
commit
7edf370408
1 fichiers modifiés avec 27 ajouts et 4 suppressions
  1. 27 4
      src/views/operationManage/goodsManage/goodsDetail.vue

+ 27 - 4
src/views/operationManage/goodsManage/goodsDetail.vue

@@ -2,7 +2,7 @@
  * @Author: wj 1454560336@qq.com
  * @Date: 2023-11-24 14:39:54
  * @LastEditors: wenjie 1454560336@qq.com
- * @LastEditTime: 2024-11-07 15:34:58
+ * @LastEditTime: 2024-11-08 11:53:02
  * @FilePath: \admin-manage\src\views\operationManage\goodsManage\goodsDetail.vue
  * @Description: 
  * 
@@ -69,7 +69,7 @@
             </el-input>
           </el-form-item>
 
-        <template v-if="setQuery.prePlatformType">
+        <template v-if="setQuery.prePlatformType && mode=='audit'">
           <el-form-item label="商品操作平台商品信息:">
             <div class="platformType">{{filterMasterName(setQuery.prePlatformType)}}</div>
           </el-form-item>
@@ -85,6 +85,19 @@
         </template>
 
 
+        <el-form-item v-if="mode=='detail'" label="商品上架平台商品信息:">
+          <el-checkbox-group v-model="setQuery.platformType" prop="platformType">
+            <div class="flex" v-for="(item,index) in setQuery.prices" :key="index" ><el-checkbox :label="item.platformType">{{filterMasterName(item.platformType) }}</el-checkbox> 
+            <el-form-item  >
+              <el-input type="number" v-model="setQuery.prices[index].price" class="item-width-300 ml10">
+                <template slot="append">元</template>
+              </el-input>
+            </el-form-item>
+            </div>
+          </el-checkbox-group>
+        </el-form-item>
+
+
           <el-form-item label="售价:" v-else prop="realPrice">
             <el-input
               type="number"
@@ -820,11 +833,16 @@ export default Vue.extend({
         this.loading = false;
         if (res.state == "Success") {
           this.setQuery = res.content;
-          if(JSON.parse(this.setQuery.prices)){
-            JSON.parse(this.setQuery.prices).map(item=>{
+          this.setQuery.prices = JSON.parse(this.setQuery.prices)
+          if(this.setQuery.prices){
+            this.setQuery.platformType = []
+            this.setQuery.prices.map(item=>{
               if(item.platformType == this.setQuery.prePlatformType){
                 this.setQuery.platformPrice = item.price
               }
+              if(item.status == 2){
+                this.setQuery.platformType.push(Number(item.platformType) )
+              }
             })
           }
           this.labelId = Number(res.content.goodsLabelId) || this.labelList[0].id
@@ -888,6 +906,11 @@ export default Vue.extend({
     font-size: 14px;
     color: #606266;
   }
+  .flex{
+    display: flex;
+    align-items: center;
+    margin-bottom: 10px;
+  }
   .item {
     display: flex;
     align-items: center;