Browse Source

Merge branch 'sit'

xiaodai2022 2 years ago
parent
commit
185c1e45ac

File diff suppressed because it is too large
+ 10 - 0
dist/static/js/0.js


File diff suppressed because it is too large
+ 10 - 0
dist/static/js/app.js


File diff suppressed because it is too large
+ 124 - 0
dist/static/js/chunk-libs.js


+ 175 - 5
src/views/sellOut/project/components/backGoodShow.vue

@@ -72,6 +72,169 @@
       </div>
       <div class="project-backGoodShow-backGood-table">
         <template v-if="item.tableData">
+          <el-table
+            v-loading="item.loading"
+            ref="multipleTable"
+            :data="item.tableData"
+            style="width: 100%; margin-bottom: 10px"
+            row-key="id"
+            border
+            stripe
+            :size="'mini'"
+            @selection-change="handleSelectionChange($event)"
+          >
+            <el-table-column
+              prop="pgNo"
+              label="商品要求编码"
+              min-width="156px"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              prop="sale_price"
+              label="销售单价"
+              min-width="110px"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              prop="num"
+              label="购买数量"
+              min-width="90px"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              prop="good_img"
+              label="商品图片"
+              min-width="242px"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                <div v-if="scope.row.good_img && scope.row.good_img.length > 0">
+                  <img
+                    v-for="(si, sii) in scope.row.good_img"
+                    :key="si + sii"
+                    :src="si"
+                    class="hover fl"
+                    style="
+                      display: inline-block;
+                      width: 20px;
+                      height: 20px;
+                      margin: 0 2px 0 0;
+                    "
+                    alt=""
+                    v-viewer
+                  />
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="good_name"
+              label="商品名称"
+              min-width="200px"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                <span>{{ scope.row.good_name }}</span>
+                <span
+                  v-for="(si, sii) in scope.row.specinfo"
+                  :key="si.id + sii"
+                >
+                  {{ sii === 0 ? "_" : "-" }}{{ si.spec_name }}[{{
+                    si.spec_value_name
+                  }}]
+                </span>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="class_cat"
+              label="商品分类"
+              min-width="110px"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              prop="source"
+              label="商品来源"
+              min-width="90px"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                <el-tag
+                  :size="'mini'"
+                  :type="scope.row.data_source === '1' ? 'success' : ''"
+                  >{{
+                    scope.row.data_source === "1" ? "平台商品" : "采反商品"
+                  }}</el-tag
+                >
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="expire_day"
+              label="信息有效期"
+              min-width="85px"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              prop="work_day"
+              label="制作工期"
+              min-width="70px"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              prop="delivery_day"
+              label="物流时间"
+              min-width="70px"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              prop="creater"
+              label="负责人"
+              min-width="60px"
+              show-overflow-tooltip
+            />
+            <el-table-column label="操作" width="80px" show-overflow-tooltip fixed="right">
+              <template slot-scope="scope">
+                <el-tooltip
+                  v-if="powers.some((item) => item == '007')"
+                  effect="dark"
+                  content="详情"
+                  placement="top"
+                >
+                  <i
+                    class="el-icon-view tb-icon"
+                    @click="show_view(scope.row)"
+                  ></i>
+                </el-tooltip>
+                <el-tooltip
+                  effect="dark"
+                  content="删除"
+                  placement="top"
+                  v-if="
+                    scope.row.data_source === '1' && status === '2'
+                  "
+                >
+                  <i
+                    class="el-icon-delete tb-icon"
+                    @click="deleteId(scope.row.id, index)"
+                  ></i>
+                </el-tooltip> </template
+            ></el-table-column>
+          </el-table>
+          <div
+            v-if="item.tableData"
+            class="Pagination"
+            style="text-align: right"
+          >
+            <el-pagination
+              :current-page="item.pageInfo.curr"
+              :page-size="item.pageInfo.size"
+              :size="'mini'"
+              layout="total,  prev, pager, next, jumper"
+              :total="item.pageInfo.total"
+              @size-change="handleSizeChange($event, index)"
+              @current-change="handlePageChange($event, index)"
+            />
+          </div>
+        </template>
+        <!-- <template v-if="item.tableData">
           <ex-table
             v-loading="item.loading"
             :table="table"
@@ -150,7 +313,7 @@
               </el-tooltip>
             </template>
           </ex-table>
-        </template>
+        </template> -->
       </div>
     </div>
     <search-good-online-table-modal
@@ -262,29 +425,30 @@ export default {
     },
     async resetFormData(index) {
       this.allList[index].pageInfo = {
-        size: 15,
+        size: 10,
         curr: 1,
         total: 0,
       };
       this.allList[index].loading = true;
       this.allList[index].tableData = [];
       await this.searchList(index);
+    
     },
     //初始化整个组件
     async initListData() {
-      console.log(this.sitem);
       this.allList = [];
       const { projectNo, ladder, status } = this.sitem;
       this.status = status;
+        console.log(this.status);
       this.projectNo = projectNo;
       if (ladder && ladder.length > 0) {
         ladder.forEach((e) => {
           let item = JSON.parse(JSON.stringify(e));
-          console.log(item);
+          // console.log(item);
           let model = {
             ladder: [item],
             pageInfo: {
-              size: 15,
+              size: 10,
               curr: 1,
               total: 0,
             },
@@ -355,6 +519,12 @@ export default {
                 y.spec_value_name
               }]`;
             });
+          }
+           if (v.good_img) {
+            v.good_img =
+              Object.prototype.toString.call(v.good_img) === "[object Array]"
+                ? v.good_img
+                : (v.good_img || "").split(",");
           }
           return v;
         });

+ 19 - 15
src/views/sellOut/project/components/buyGoodModal.vue

@@ -65,27 +65,31 @@
             row-key="key"
           >
             <el-table-column
-              prop="good_name"
-              label="图片"
-              width="50"
+              prop="good_img"
+              label="商品图片"
+              min-width="242px"
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                <div
-                  v-if="scope.row.good_img"
-                  style="width: 20px; height: 20px"
-                  class="hover"
-                  v-viewer
-                >
+                <div v-if="scope.row.good_img && scope.row.good_img.length > 0">
                   <img
-                    :src="scope.row.good_img"
-                    style="display: inline-block; width: 100%; height: 100%"
+                    v-for="(si, sii) in scope.row.good_img"
+                    :key="si + sii"
+                    :src="si"
+                    class="hover fl"
+                    style="
+                      display: inline-block;
+                      width: 20px;
+                      height: 20px;
+                      margin: 0 2px 0 0;
+                    "
                     alt=""
+                    v-viewer
                   />
                 </div>
               </template>
             </el-table-column>
-            <el-table-column prop="good_name" label="商品名称" min-width="120">
+            <el-table-column prop="good_name" label="商品名称" show-overflow-tooltip min-width="120">
               <template slot-scope="scope">
                 <span>{{ scope.row.good_name }}</span>
                 <span
@@ -199,7 +203,7 @@
                     <el-input
                       v-model="scope.row.contactor"
                       :disabled="!scope.row.edit"
-                       maxlength="20"
+                      maxlength="20"
                     />
                   </el-form-item>
                   <span v-if="!scope.row.edit">{{ scope.row.contactor }}</span>
@@ -223,7 +227,7 @@
                     <el-input
                       v-model="scope.row.mobile"
                       :disabled="!scope.row.edit"
-                       maxlength="11"
+                      maxlength="11"
                     />
                   </el-form-item>
                   <span v-if="!scope.row.edit">{{ scope.row.mobile }}</span>
@@ -273,7 +277,7 @@
                     <el-input
                       v-model="scope.row.addr"
                       :disabled="!scope.row.edit"
-                       maxlength="100"
+                      maxlength="100"
                     />
                   </el-form-item>
                   <span v-if="!scope.row.edit">{{ scope.row.addr }}</span>

+ 93 - 30
src/views/sellOut/project/components/setPlan.vue

@@ -11,9 +11,19 @@
             stripe
             style="width: 100%"
           >
-            <el-table-column label="要求编码" prop="pgNo" width="155px"  show-overflow-tooltip/>
+            <el-table-column
+              label="要求编码"
+              prop="pgNo"
+              width="155px"
+              show-overflow-tooltip
+            />
 
-            <el-table-column prop="good_type" label="商品类型" width="80px"  show-overflow-tooltip>
+            <el-table-column
+              prop="good_type"
+              label="商品类型"
+              width="80px"
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
                 <el-tag
                   :size="'mini'"
@@ -27,10 +37,29 @@
                 ></el-tag
               ></template>
             </el-table-column>
-            <el-table-column prop="budget_price" label="预算单价" width="110"  show-overflow-tooltip />
-            <el-table-column prop="num" label="购买数量" width="110" show-overflow-tooltip />
-            <el-table-column prop="cat_name" label="商品分类"  show-overflow-tooltip />
-            <el-table-column prop="good_img" label="图片" width="50"  show-overflow-tooltip>
+            <el-table-column
+              prop="budget_price"
+              label="预算单价"
+              width="110"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              prop="num"
+              label="购买数量"
+              width="110"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              prop="cat_name"
+              label="商品分类"
+              show-overflow-tooltip
+            />
+            <el-table-column
+              prop="good_img"
+              label="图片"
+              width="50"
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
                 <div
                   v-if="scope.row.good_img"
@@ -45,8 +74,12 @@
                   />
                 </div>
               </template>
-            </el-table-column >
-            <el-table-column prop="good_name" label="商品名称"   show-overflow-tooltip/>
+            </el-table-column>
+            <el-table-column
+              prop="good_name"
+              label="商品名称"
+              show-overflow-tooltip
+            />
           </el-table>
         </template>
       </div>
@@ -87,26 +120,35 @@
           />
           <el-table-column
             prop="good_img"
-            label="图片"
-            width="50"
+            label="商品图片"
+            min-width="168px"
             show-overflow-tooltip
           >
             <template slot-scope="scope">
-              <div
-                v-if="scope.row.good_img"
-                style="width: 20px; height: 20px"
-                class="hover"
-                v-viewer
-              >
+              <div v-if="scope.row.good_img && scope.row.good_img.length > 0">
                 <img
-                  :src="scope.row.good_img"
-                  style="display: inline-block; width: 100%; height: 100%"
+                  v-for="(si, sii) in scope.row.good_img"
+                  :key="si + sii"
+                  :src="si"
+                  class="hover fl"
+                  style="
+                    display: inline-block;
+                    width: 20px;
+                    height: 20px;
+                    margin: 0 2px 0 0;
+                  "
                   alt=""
+                  v-viewer
                 />
               </div>
             </template>
           </el-table-column>
-          <el-table-column prop="good_name" label="商品名称" min-width="120"  show-overflow-tooltip>
+          <el-table-column
+            prop="good_name"
+            label="商品名称"
+            min-width="120"
+            show-overflow-tooltip
+          >
             <template slot-scope="scope">
               <span>{{ scope.row.good_name }}</span>
               <span v-for="(si, sii) in scope.row.specinfo" :key="si.id + sii">
@@ -116,7 +158,12 @@
               </span>
             </template>
           </el-table-column>
-          <el-table-column prop="data_source" label="商品来源" width="85"  show-overflow-tooltip>
+          <el-table-column
+            prop="data_source"
+            label="商品来源"
+            width="85"
+            show-overflow-tooltip
+          >
             <template slot-scope="scope">
               <el-tag
                 :size="'mini'"
@@ -325,21 +372,25 @@
           </el-table-column>
           <el-table-column
             prop="good_img"
-            label="图片"
-            width="50"
+            label="商品图片"
+            min-width="242px"
             show-overflow-tooltip
           >
             <template slot-scope="scope">
-              <div
-                v-if="scope.row.good_img"
-                style="width: 20px; height: 20px"
-                class="hover"
-                v-viewer
-              >
+              <div v-if="scope.row.good_img && scope.row.good_img.length > 0">
                 <img
-                  :src="scope.row.good_img"
-                  style="display: inline-block; width: 100%; height: 100%"
+                  v-for="(si, sii) in scope.row.good_img"
+                  :key="si + sii"
+                  :src="si"
+                  class="hover fl"
+                  style="
+                    display: inline-block;
+                    width: 20px;
+                    height: 20px;
+                    margin: 0 2px 0 0;
+                  "
                   alt=""
+                  v-viewer
                 />
               </div>
             </template>
@@ -589,6 +640,12 @@ export default {
               v.class_cat += i === 0 ? x.name : "_" + x.name;
             });
           }
+          if (v.good_img) {
+            v.good_img =
+              Object.prototype.toString.call(v.good_img) === "[object Array]"
+                ? v.good_img
+                : (v.good_img || "").split(",");
+          }
           return v;
         });
         this.pageInfo.total = Number(count);
@@ -714,6 +771,12 @@ export default {
             v.class_cat += i === 0 ? x.name : "_" + x.name;
           });
         }
+        if (v.good_img) {
+            v.good_img =
+              Object.prototype.toString.call(v.good_img) === "[object Array]"
+                ? v.good_img
+                : (v.good_img || "").split(",");
+          }
         return v;
       });
 

Some files were not shown because too many files changed in this diff