zs 1 سال پیش
والد
کامیت
faa441641b

+ 21 - 5
src/components/salesParts/detail.vue

@@ -42,8 +42,10 @@
           <el-col v-if="info.type == '4' || info.type == '5'">
             <el-col :span="24" v-for="(item, index) in list" :key="index">
               <el-col :span="24" class="goods bode" v-if="!item.is_set">
-                <el-col :span="6" v-if="item.goods.file"><el-image class="image" :src="item.goods.file[0].url"></el-image></el-col>
-                <el-col :span="6" v-else-if="item.url"><el-image class="image" :src="item.url"></el-image></el-col>
+                <el-col :span="6" v-if="item.goods && item.goods.file">
+                  <el-image class="image" :src="getCheckOne(item, 'goods.file[0].url')"></el-image>
+                </el-col>
+                <el-col :span="6" v-else-if="item.url"><el-image class="image" :src="getCheckOne(item, 'url')"></el-image></el-col>
                 <el-col :span="18">
                   <el-col :span="12">
                     <el-col>
@@ -63,8 +65,10 @@
               <el-col :span="24" class="goods bode" v-if="item.is_set == '0'">
                 <el-col :span="24">{{ item.name || '套装名称' }}</el-col>
                 <el-col :span="24" v-for="(i, index) in item.goods" :key="index">
-                  <el-col :span="6" class="image" v-if="i.goods.file && i.goods.file.length != 0"><el-image :src="i.goods.file[0].url"></el-image></el-col>
-                  <el-col :span="6" class="image" v-else-if="i.url"><el-image :src="i.url"></el-image></el-col>
+                  <el-col :span="6" class="image" v-if="i.goods.file && i.goods.file.length != 0">
+                    <el-image :src="getCheckOne(i, 'goods.file[0].url')"></el-image>
+                  </el-col>
+                  <el-col :span="6" class="image" v-else-if="i.url"><el-image :src="getCheckOne(i, 'url')"></el-image></el-col>
                   <el-col :span="18">
                     <el-col :span="12">
                       <el-col :span="24"> {{ i.goods_name }} </el-col>
@@ -428,6 +432,9 @@ export default {
     toBack() {
       this.$emit('toBack');
     },
+    getCheckOne(item, model) {
+      return _.get(item, model);
+    },
   },
 
   computed: {
@@ -440,7 +447,7 @@ export default {
     test: {
       deep: true,
       immediate: true,
-      handler(val) {},
+      handler(val) { },
     },
   },
 };
@@ -452,35 +459,44 @@ export default {
     font-size: 16px;
     margin: 10px 4% 0 8%;
     padding: 5px;
+
     .add {
       border-bottom: 2px dashed #ccc;
       margin: 0 0 5px 0;
       padding: 5px 0;
     }
+
     .shop {
       padding: 4px 0;
       font-size: 22px;
       border-bottom: 1px solid #ccc;
     }
+
     .goods {
       padding: 10px 0;
+
       .image {
         padding: 0 10px 0 0;
       }
+
       .money {
         text-align: right;
       }
     }
+
     .other {
       text-align: right;
+
       p {
         color: red;
       }
     }
+
     .el-col {
       margin: 4px 0;
     }
   }
+
   .two {
     margin: 0 0 0 20px;
   }

+ 1 - 0
src/views/platSettings/banner/detail.vue

@@ -63,6 +63,7 @@ export default {
           label: '图片',
           model: 'url',
           type: 'upload',
+          limit: 1,
           url: '/files/point/shopOne/banner/upload',
         },
         { label: '内容', model: 'content', custom: true },

+ 12 - 10
src/views/platfinance/bill/index.vue

@@ -1,12 +1,16 @@
 <template>
   <div id="card-1">
     <el-row>
-      <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loadings"
-        element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading">
+      <el-col
+        :span="24"
+        class="main animate__animated animate__backInRight"
+        v-loading="loadings"
+        element-loading-text="拼命加载中"
+        element-loading-spinner="el-icon-loading"
+      >
         <el-col :span="24" class="one"> <span>账单管理</span> </el-col>
         <el-col :span="24" class="one">
-          <search-1 :form="searchForm" @onSubmit="search" @querySearch="querySearch" @toReset="toClose"
-            :shopList="shopList"></search-1>
+          <search-1 :form="searchForm" @onSubmit="search" @querySearch="querySearch" @toReset="toClose" :shopList="shopList"></search-1>
         </el-col>
         <el-col :span="24" v-if="afterSaleList.length != '0' || orderList.length != '0'">
           <el-button type="primary" @click="toFile()">对账</el-button>
@@ -17,12 +21,10 @@
         <el-col :span="24">
           <el-tabs type="border-card">
             <el-tab-pane label="订单">
-              <data-table :fields="orderfields" @query="search" rowKey="rowKey" :data="orderList" :usePage="false">
-              </data-table>
+              <data-table :fields="orderfields" @query="search" rowKey="rowKey" :data="orderList" :usePage="false"> </data-table>
             </el-tab-pane>
             <el-tab-pane label="售后单">
-              <data-table :fields="afterSalefields" @query="search" rowKey="rowKey" :data="afterSaleList"
-                :usePage="false"> </data-table>
+              <data-table :fields="afterSalefields" @query="search" rowKey="rowKey" :data="afterSaleList" :usePage="false"> </data-table>
             </el-tab-pane>
           </el-tabs>
         </el-col>
@@ -165,7 +167,7 @@ export default {
       });
     },
     // 查询其他信息
-    async searchOther() { },
+    async searchOther() {},
   },
   computed: {
     ...mapState(['user']),
@@ -177,7 +179,7 @@ export default {
     test: {
       deep: true,
       immediate: true,
-      handler(val) { },
+      handler(val) {},
     },
   },
 };

+ 3 - 1
src/views/selfShop/goods/index.vue

@@ -168,7 +168,9 @@ export default {
         { label: '商品图片', model: 'file', type: 'upload', url: '/files/point/goods/upload' },
         { label: '商品介绍', model: 'brief', custom: true },
       ],
-      rules: {},
+      rules: {
+        file: [{ required: true, message: '请选择商品图片', trigger: 'change' }],
+      },
       form: {},
       // 返现设置
       cb_config: {},