Sfoglia il codice sorgente

集团SKU增加设计图图片上传

lxf 2 anni fa
parent
commit
3887d8097c
1 ha cambiato i file con 41 aggiunte e 0 eliminazioni
  1. 41 0
      src/components/MakeProduct/groupSKU/ProductMaterial.vue

+ 41 - 0
src/components/MakeProduct/groupSKU/ProductMaterial.vue

@@ -155,6 +155,47 @@
               </el-upload>
             </template>
           </el-table-column>
+          <el-table-column label="设计图" align="center" width="70">
+            <template slot-scope="scope">
+              <el-upload
+                class="avatar-uploader"
+                :action="action"
+                :headers="{ 'Blade-Auth': token }"
+                :show-file-list="false"
+                :before-upload="beforeAvatarUpload"
+                :on-success="
+                  (response, file, fileList) => {
+                    return uploadSuccess1(response, file, fileList, scope.$index)
+                  }
+                "
+                :on-error="
+                  (err, file, fileList) => {
+                    return uploadError1(err, file, fileList, scope.$index)
+                  }
+                "
+                :on-progress="
+                  (event, file, fileList) => {
+                    return uploadProgress1(event, file, fileList, scope.$index)
+                  }
+                "
+                :disabled="scope.row.loading1"
+                accept=".jpg, .png, .jpeg"
+              >
+                <div v-loading="scope.row.loading1">
+                  <div v-if="scope.row.designSketch">
+                    <img
+                      v-if="!scope.row.designSketch.includes('https')"
+                      :src="pathPrefix + scope.row.designSketch"
+                      class="productImg"
+                      style="width: 50px; height: 50px"
+                    />
+                    <img v-else class="productImg" style="width: 50px; height: 50px" :src="scope.row.designSketch" />
+                  </div>
+                  <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+                </div>
+              </el-upload>
+            </template>
+          </el-table-column>
           <el-table-column label="品号" align="left" width="170">
             <template slot-scope="scope">
               <el-form-item :prop="'colors.' + scope.$index + '.specCode'" :rules="formRules.specCode" label-width="0px">