|  | @@ -31,6 +31,9 @@
 | 
	
		
			
				|  |  |                <el-button :size="size" :type="type" :disabled="row.upAndDownShelves"
 | 
	
		
			
				|  |  |                  @click="$refs.crud.rowDel(row, index)">删除
 | 
	
		
			
				|  |  |                </el-button>
 | 
	
		
			
				|  |  | +                <el-button :size="size" :type="type" :disabled="row.upAndDownShelves"
 | 
	
		
			
				|  |  | +                           @click="annexOpen(row, index)">商城图片
 | 
	
		
			
				|  |  | +                </el-button>
 | 
	
		
			
				|  |  |                <el-tooltip :content="`${row.upAndDownShelves == 0 ? '上架' : '下架'}`" placement="top">
 | 
	
		
			
				|  |  |                  <el-switch style="margin-left: 10px" v-model="row.upAndDownShelves" @change="check(row)" :active-value="1"
 | 
	
		
			
				|  |  |                    :inactive-value="0">
 | 
	
	
		
			
				|  | @@ -156,6 +159,21 @@
 | 
	
		
			
				|  |  |          温馨提示 第一次导入时请先下载模板
 | 
	
		
			
				|  |  |        </p>
 | 
	
		
			
				|  |  |      </el-dialog>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      <el-dialog
 | 
	
		
			
				|  |  | +          title="商城图片  (图片文件像素推荐700X700,有且只允许有一张主图,其余均为副图)"
 | 
	
		
			
				|  |  | +          :visible.sync="enclosure"
 | 
	
		
			
				|  |  | +          append-to-body
 | 
	
		
			
				|  |  | +          width="70%">
 | 
	
		
			
				|  |  | +          <c-upload :data="orderList" display basic deleteUrl="/api/blade-sales-part/productLaunchFiles/remove"
 | 
	
		
			
				|  |  | +                    :enumerationValue="160" />
 | 
	
		
			
				|  |  | +          <span slot="footer" class="dialog-footer">
 | 
	
		
			
				|  |  | +          <el-button @click="enclosure = false" size="small">取 消</el-button>
 | 
	
		
			
				|  |  | +          <el-button type="primary" @click="saveAnnex" size="small">保 存</el-button>
 | 
	
		
			
				|  |  | +        </span>
 | 
	
		
			
				|  |  | +      </el-dialog>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |    </div>
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -176,6 +194,11 @@ export default {
 | 
	
		
			
				|  |  |    name: "index",
 | 
	
		
			
				|  |  |    data() {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  | +        orderList:[],
 | 
	
		
			
				|  |  | +        enclosure:false,
 | 
	
		
			
				|  |  | +        dataId:0,
 | 
	
		
			
				|  |  | +        rowImg:[],
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |        data: [],
 | 
	
		
			
				|  |  |        sharedCompanyoptions: [],
 | 
	
		
			
				|  |  |        activeName: 'searchList',
 | 
	
	
		
			
				|  | @@ -269,7 +292,7 @@ export default {
 | 
	
		
			
				|  |  |          updateBtnText:'保存',
 | 
	
		
			
				|  |  |          searchMenuPosition: "right",
 | 
	
		
			
				|  |  |          align: "center",
 | 
	
		
			
				|  |  | -        menuWidth: 150,
 | 
	
		
			
				|  |  | +        menuWidth: 220,
 | 
	
		
			
				|  |  |          searchSpan: 8,
 | 
	
		
			
				|  |  |          searchIcon: true,
 | 
	
		
			
				|  |  |          searchIndex: 2,
 | 
	
	
		
			
				|  | @@ -457,6 +480,46 @@ export default {
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  | +      //打开附件
 | 
	
		
			
				|  |  | +      annexOpen(row, index) {
 | 
	
		
			
				|  |  | +          this.dataId = index
 | 
	
		
			
				|  |  | +          this.rowImg = row
 | 
	
		
			
				|  |  | +          this.orderList = row.filesList?row.filesList:[];
 | 
	
		
			
				|  |  | +          for (let order of this.orderList) {
 | 
	
		
			
				|  |  | +              order.paymentType = order.typeFiles
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +          this.enclosure = true
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      // 附件保存
 | 
	
		
			
				|  |  | +      saveAnnex() {
 | 
	
		
			
				|  |  | +          if (this.orderList.length > 0) {
 | 
	
		
			
				|  |  | +              // 循环把编辑状态变成保存状态
 | 
	
		
			
				|  |  | +              this.orderList.map((item)=>{
 | 
	
		
			
				|  |  | +                  if (item.$cellEdit == true) {
 | 
	
		
			
				|  |  | +                      item.$cellEdit = false
 | 
	
		
			
				|  |  | +                  } else {
 | 
	
		
			
				|  |  | +                      item.$cellEdit = true
 | 
	
		
			
				|  |  | +                  }
 | 
	
		
			
				|  |  | +              })
 | 
	
		
			
				|  |  | +              let flag = this.orderList.some(item => {
 | 
	
		
			
				|  |  | +                  return item.$version == '主图'
 | 
	
		
			
				|  |  | +              })
 | 
	
		
			
				|  |  | +              if (!flag) {
 | 
	
		
			
				|  |  | +                  this.$message.warning('请选择主图')
 | 
	
		
			
				|  |  | +                  return
 | 
	
		
			
				|  |  | +              }
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +          this.rowImg.filesList = this.orderList;
 | 
	
		
			
				|  |  | +          submit({
 | 
	
		
			
				|  |  | +              ...this.rowImg
 | 
	
		
			
				|  |  | +          }).then(res=>{
 | 
	
		
			
				|  |  | +              this.$message.success("添加成功")
 | 
	
		
			
				|  |  | +              // this.onLoad(this.page, this.search)
 | 
	
		
			
				|  |  | +          })
 | 
	
		
			
				|  |  | +          this.enclosure = false
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      derivation() {
 | 
	
		
			
				|  |  |        window.open(
 | 
	
		
			
				|  |  |          `/api/blade-sales-part/productLaunch/export-productLaunch?${this.website.tokenHeader
 |