/**
 * 模板名称:商品管理
 * 作者:zhangyy
 * 时间:2023-09-22
 */

<template>
  <div class="itemList">
     <!-- 按商品号搜索 -->
     <Row :gutter="5">
      <Col span="4">
        <Select v-model="searchFilter.shopId" filterable remote :remote-method="remoteMethod" :loading="mohuloading" placeholder="请输入供应商名称" @on-change="searchItem" clearable>
          <Option v-for="(option, index) in shopList" :value="option.id" :key="index">{{option.name}}</Option>
        </Select>
      </Col>
      <Col span="4">
        <Input placeholder="请输入商品名称" v-model="searchFilter.itemName"/>
      </Col>
      <Col span="4">
        <Select v-model="searchFilter.typeCode" placeholder="请选择市场" clearable>
          <Option v-for="item in typeCodeList" :label="item.label" :value="item.id" :key="item.id">{{item.label}}</Option>
        </Select>
      </Col>
      <Col span="4">
        <Select v-model="searchFilter.classifyOne" placeholder="请选择商品分类" clearable>
          <Option v-for="item in filterProList" :label="item.label" :value="item.id" :key="item.value">{{item.label}}</Option>
        </Select>
      </Col>
      <Col span="7">
        <Button type="primary" icon="ios-search" @click="searchItem" style="margin-right:5px">商品搜索</Button>
        <Button type="primary" @click="branchOff" style="margin-right:5px">批量下架</Button>
        <Button type="primary" @click="branchBargain">加入砍价</Button>
      </Col>
    </Row>
    <br/>
    <!-- 数据展示 -->
    <el-table class="el-table"  :data="itemList"  v-loading="dataloading" ref="onSaleItemTableList" :row-key="getRowKeys" @expand-change="expandChange" @select-all="selectAllF" @select="selectF">
      <el-table-column type="expand">
        <template #default="props">
          <!--集采商品销售属性-->
          <div v-if="showThisMarket(props.row.itemSkus,'1')">
            <span style="color: red;">集采商品销售属性</span>
            <el-table :ref="'onSaleItemTableListJs' + props.row.id"  @select-all="selectAllJs" @select="selectJs" :data="filters(props.row.itemSkus,'1')" border>
              <el-table-column type="selection" width="55"></el-table-column>
              <el-table-column label="商品类型" width="140">
                <template #default="scope">
                    {{scope.row.isStandard && scope.row.isStandard == 2?'议价型商品':'标准型商品'}}
                </template>
              </el-table-column>
              <el-table-column label="销售区域" width="140">
                  <template #default="scope">
                      {{scope.row.regionName}}
                  </template>
              </el-table-column>
              <el-table-column label="商品代码" width="140">
                  <template #default="scope">
                      {{scope.row.skuClassifyName ||'无'}}
                  </template>
                </el-table-column>
              <el-table-column label="规格" width="180">
                <template #default="scope">
                    <div v-if="scope.row.version">{{scope.row.version}}</div>
                    <div v-else>
                      <div v-for="prop in scope.row.itemSkuProps" :key="prop.id">{{prop.propName}}:{{prop.propValue}}</div>
                    </div>
                </template>
              </el-table-column>
              <el-table-column label="市场指导价(元)" width="110">
                <template #default="scope">
                  <span v-if="scope.row.isStandard && scope.row.isStandard == 2">{{scope.row.marketPriceMin ||''}} ~ {{scope.row.marketPriceMax ||''}}</span>
                  <span v-else>{{scope.row.price ||''}}</span>
                </template>
              </el-table-column>
              <el-table-column label="集采市场交易价(元)" width="130">
                <template #default="scope">
                  <span v-if="scope.row.isStandard && scope.row.isStandard == 2">无</span>
                  <span v-else>
                    <span v-if="scope.row.itemPrices.length > 0" >
                      <span v-for="priceList in scope.row.itemPrices" :key="priceList.id">
                        <span v-if="priceList && priceList.typeCode == 1">{{priceList.price}}</span>
                      </span>
                    </span>
                  </span>
                </template>
              </el-table-column>
              <el-table-column label="爱养牛合同价(元)" width="120">
                <template #default="scope">
                  {{scope.row.settlementPrice || '无'}}
                </template>
              </el-table-column>
                <el-table-column label="库存">
                  <template #default="scope">
                        {{scope.row.itemStock || '0'}}
                    </template>
                </el-table-column>
                <el-table-column label="起订量">
                  <template #default="scope">
                      {{ scope.row.minQuantity }}
                  </template>
                </el-table-column>
              <el-table-column label="线下支付" width="100" align="center">
                <template #default="scope">
                  <Tag v-if="scope.row.offlinePay == 0" color="red">不支持</Tag>
                  <Tag v-if="scope.row.offlinePay == 1" color="green">支&nbsp;持</Tag>
                </template>
              </el-table-column>
              <el-table-column label="代扣支付" width="100" align="center">
                <template #default="scope">
                  <Tag v-if="scope.row.mengniuPay == 0" color="red">不支持</Tag>
                      <Poptip transfer trigger="hover" placement="top" width="600" v-if="scope.row.mengniuPay==1">
                        <Button size="small">查看代扣</Button>
                        <template #content>
                          <div>
                            <p style="line-height:20px;font-size:14px">是否开启代扣：<span style="color:red">{{scope.row.mengniuPay == 1?'开启':'关闭'}}</span></p>
                            <p style="line-height:20px;font-size:14px">代扣销售价：<span style="color:red">{{scope.row.itemPrices[0].mnpPrice || 0}}</span></p>
                            <p style="line-height:20px;font-size:14px" v-show="scope.row.feePayer != null">手续费承担方：<span style="color:red">{{scope.row.feePayer == 0?'供应商':'牧场'}}</span></p>
                            <p style="line-height:20px;font-size:14px" v-show="scope.row.feePayer == null">手续费承担方：<span style="color:red">未设置</span></p>
                            <p style="line-height:20px;font-size:14px" v-if="scope.row.itemSkuMnpInstal">首付比例：<span style="color:red">{{scope.row.itemSkuMnpInstal.downPaymentRatio}} %</span></p>
                              <p style="line-height:20px;font-size:14px" v-if="scope.row.itemSkuMnpInstal">首付付款方式：<span style="color:red">{{scope.row.itemSkuMnpInstal.instalMengniuPay==1?'奶款结算':''}} {{scope.row.itemSkuMnpInstal.instalFullPay==1?'线上全额支付':''}} {{scope.row.itemSkuMnpInstal.instalOfflinePay==1?'线下支付':''}}</span>
                              </p>
                              <el-table v-if="scope.row.itemSkuMnpInstal" :data="scope.row.itemSkuMnpInstal.itemSkuMnpInstalDetailList" style="width: 100%" size="mini" border>
                                  <el-table-column label="期数">
                                      <template #default="scope">{{scope.row.periods}}</template>
                                  </el-table-column>
                                  <el-table-column prop="name" label="分期类型">
                                      <template #default="scope">{{instalType(scope.row.instalType)}}</template>
                                  </el-table-column>
                                  <el-table-column prop="name" label="利率（年）" width="100">
                                      <template #default="scope">{{scope.row.annualInterestRate}}</template>
                                  </el-table-column>
                                  <el-table-column prop="name" label="还款类型">
                                      <template #default="scope">{{InstallmentType(scope.row.repayType)}}</template>
                                  </el-table-column>
                              </el-table>
                          </div>
                        </template>
                    </Poptip> 
                </template>
              </el-table-column>
              <el-table-column label="奶款担保" width="100" align="center">
                <template #default="scope">
                  <div v-if="scope.row.accountPeriod == 0">不支持</div>
                  <Poptip transfer trigger="hover" placement="top" width="240" v-else>
                    <Button size="small">查看奶款担保</Button> 
                    <template #content>
                      <div style="white-space: normal;">
                          <p style="line-height:20px;font-size:14px">奶款担保类型：<span style="color:red">{{accountPeriod(scope.row.accountPeriod)}}</span></p>
                          <br />
                        <el-table v-if="scope.row.accountPeriod !== 0" :data="scope.row.itemSkuAccountPeriods" style="width: 100%" size="mini" border>
                            <el-table-column label="奶款担保天数" align="center">
                              <template #default="scope">{{scope.row.accountPeriodDays}}</template>
                            </el-table-column>
                            <el-table-column prop="name" label="奶款担保年利率（%）" width="120">
                              <template #default="scope">{{scope.row.interestRate}}</template>
                            </el-table-column>
                          </el-table> 
                          <span v-else>无奶款担保</span>   
                      </div>
                    </template>
                  </Poptip>  
                </template>
              </el-table-column>
              <el-table-column label="融资支付" width="100">
                <template #default="scope">
                  <div v-if="scope.row.fincpay == 0 && scope.row.niuxinPay == 0 && scope.row.silagePay == 0">不支持</div>
                  <Tooltip placement="top" transfer :max-width="450" theme="light" v-else>
                    <Button size="small">查看融资</Button>
                    <template #content>
                      <div slot="content">
                        <p style="line-height:20px;font-size:14px">是否支持牛奶花融资：<span style="color:red">{{scope.row.fincpay == 1?'支持':'不支持'}}</span></p>
                        <div style="line-height:20px;font-size:14px" v-if="scope.row.fincpayDays && scope.row.fincpayDays.length">
                          <span>牛奶花融资期限天数：</span> 
                          <span v-for="(item,iindex) in scope.row.fincpayDays" :key="iindex">{{item}}<span v-if="iindex != scope.row.fincpayDays.length-1 ">、</span></span> 
                        </div>
                        <div style="margin:1em 0; border-bottom:1px solid #eee;"></div>
                        <p style="line-height:20px;font-size:14px">是否支持牛信融资：<span style="color:red">{{scope.row.niuxinPay == 1?'支持':'不支持'}}</span></p>
                        <div style="line-height:20px;font-size:14px" v-if="scope.row.niuxinPayDays && scope.row.niuxinPayDays.length">
                          <span>牛信融资期限天数：</span> 
                          <span v-for="(item,iindex) in scope.row.niuxinPayDays" :key="iindex">{{item}}<span v-if="iindex != scope.row.niuxinPayDays.length-1">、</span></span> 
                        </div>
                        <div style="margin:1em 0; border-bottom:1px solid #eee;"></div>
                        <p style="line-height:20px;font-size:14px">是否支持青贮贷支付：<span style="color:red">{{scope.row.silagePay == 1?'支持':'不支持'}}</span></p>
                      </div>
                    </template>
                  </Tooltip>
                </template>
              </el-table-column>
              <el-table-column label="是否配送" width="100" align="center">
                <template #default="scope">
                  <Tag v-if="scope.row.isDeliver == 0" color="red">不支持</Tag>
                  <Tag v-if="scope.row.isDeliver == 1" color="green">支&nbsp;持</Tag>
                </template>
              </el-table-column>
              <el-table-column label="是否自提" width="100" align="center">
                <template #default="scope">
                  <Tag v-if="scope.row.isPickUp == 0" color="red">不支持</Tag>
                  <Tag v-if="scope.row.isPickUp == 1" color="green">支&nbsp;持</Tag>
                </template>
              </el-table-column>
              <el-table-column label="销售地区" width="100" align="center">
                <template #default="scope">
                    <Poptip transfer trigger="hover" placement="top">
                        <Button size="small">查看区域</Button> 
                        <template #content>
                          <div style="white-space: normal; ">
                            <span v-for="(list,index) in scope.row.itemSellAreas" :key="index">
                              <Tag v-if="list.isNational == 0" color="blue">全国</Tag>
                              <Tag v-if="list.isNational == 1" color="blue">{{list.province || ''}}{{list.city || ''}}{{list.area || ''}}</Tag>
                            </span>
                          </div>
                        </template>
                    </Poptip>
                </template>
              </el-table-column>
              <el-table-column label="价格有效期" width="100" align="center">
                <template #default="scope">
                {{scope.row.saleEndTime || '无'}}
                </template>
              </el-table-column>
              <el-table-column label="备注" width="100" align="center">
                <template #default="scope">
                  <Tooltip width="200" transfer :content="scope.row.remark?scope.row.remark:'无'" placement="top">
                    <Button size="small">查看备注</Button> 
                  </Tooltip>
                </template>
              </el-table-column>
              <el-table-column label="状态" align="center">
                <template #default="scope">
                  {{itemStatus(scope.row.skuStatus)}}
                </template>
              </el-table-column>
              <el-table-column label="更新时间" width="150" align="center">
                <template #default="scope">
                  <span v-if="scope.row.updateTime">{{formatData(scope.row.updateTime)}}</span>
                  <span v-else>-</span>
                </template>
              </el-table-column>
              <el-table-column label="创建时间" width="150" align="center">
                <template #default="scope">
                  {{ formatData(scope.row.addTime) }}
                </template>
              </el-table-column>
              <!-- 根据skuStatus判断按钮 新增sku放在spu列中-->
              <el-table-column label="操作" width="210" v-if="pageName!=4">
                <template #default="scope">
                  <span>
                    <Button type="error" size="small" @click="offItem(scope.row.id)">下&nbsp;架</Button>&nbsp;
                    <Button plain size="small" @click="checkSpecialPrice(scope.row)">查看特殊价格</Button>
                  </span> 
                </template>
              </el-table-column>
            </el-table>
          </div>

          <!--统采商品销售属性-->
          <div v-if="showThisMarket(props.row.itemSkus,'2')">
            <span style="color: red;">统采商品销售属性</span>
            <el-table :ref="'onSaleItemTableListTs' + props.row.id" @select-all="selectAllJs" @select="selectJs" :data="filters(props.row.itemSkus,'2')" border>
              <el-table-column type="selection" width="55"></el-table-column>
              <el-table-column label="商品类型" width="140">
                <template #default="scope">
                    {{scope.row.isStandard && scope.row.isStandard == 2?'议价型商品':'标准型商品'}}
                </template>
              </el-table-column>
              <el-table-column label="销售区域" width="140">
                <template #default="scope">
                  {{scope.row.regionName}}
                </template>
              </el-table-column>
              <el-table-column label="商品代码" width="140">
                <template #default="scope">
                  {{scope.row.skuClassifyName ||'无'}}
                </template>
              </el-table-column>
              <el-table-column label="规格" width="180">
                <template #default="scope">
                  <div v-if="scope.row.version">{{scope.row.version}}</div>
                  <div v-else>
                    <div v-for="prop in scope.row.itemSkuProps" :key="prop.id">{{prop.propName}}:{{prop.propValue}}</div>
                  </div>
                </template>
              </el-table-column>
              <el-table-column label="市场指导价(元)" width="110">
                <template #default="scope">
                  <span v-if="scope.row.isStandard && scope.row.isStandard == 2">{{scope.row.marketPriceMin ||''}} ~ {{scope.row.marketPriceMax ||''}}</span>
                  <span v-else>{{scope.row.price ||''}}</span>
                </template>
              </el-table-column>
              <el-table-column label="统采市场交易价(元)" width="130">
                <template #default="scope">
                  <span v-if="scope.row.itemPrices.length > 0">
                    <span v-for="priceList in scope.row.itemPrices" :key="priceList.id">
                      <span v-if="priceList && priceList.typeCode == 2">{{priceList.price}}</span>
                    </span>
                  </span>
                  <span v-if="scope.row.isStandard && scope.row.isStandard == 2">无</span>
                </template>
              </el-table-column>
              <el-table-column label="爱养牛合同价(元)" width="120">
                <template #default="scope">
                  {{scope.row.settlementPrice || '无'}}
                </template>
              </el-table-column>
              <el-table-column label="库存">
                <template #default="scope">
                  {{scope.row.itemStock || '0'}}
                </template>
              </el-table-column>
              <el-table-column label="起订量">
                <template #default="scope">
                  {{ scope.row.minQuantity }}
                </template>
              </el-table-column>
              <el-table-column label="线下支付" width="100" align="center">
                <template #default="scope">
                  <Tag v-if="scope.row.offlinePay == 0" color="red">不支持</Tag>
                  <Tag v-if="scope.row.offlinePay == 1" color="green">支&nbsp;持</Tag>
                </template>
              </el-table-column>
              <el-table-column label="代扣支付" width="100" align="center">
                <template #default="scope">
                <Tag v-if="scope.row.mengniuPay == 0" color="red">不支持</Tag>
                  <Poptip transfer trigger="hover" placement="top" width="600" v-if="scope.row.mengniuPay==1">
                    <Button size="small">查看代扣</Button>
                    <template #content>
                      <div>
                        <p style="line-height:20px;font-size:14px">是否开启代扣：<span style="color:red">{{scope.row.mengniuPay == 1?'开启':'关闭'}}</span></p>
                        <p style="line-height:20px;font-size:14px">代扣销售价：<span style="color:red">{{scope.row.itemPrices[0].mnpPrice || 0}}</span></p>
                        <p style="line-height:20px;font-size:14px" v-show="scope.row.feePayer != null">手续费承担方：<span style="color:red">{{scope.row.feePayer == 0?'供应商':'牧场'}}</span></p>
                        <p style="line-height:20px;font-size:14px" v-show="scope.row.feePayer == null">手续费承担方：<span style="color:red">未设置</span></p>
                        <p style="line-height:20px;font-size:14px" v-if="scope.row.itemSkuMnpInstal">首付比例：<span style="color:red">{{scope.row.itemSkuMnpInstal.downPaymentRatio}} %</span></p>
                        <p style="line-height:20px;font-size:14px" v-if="scope.row.itemSkuMnpInstal">首付付款方式：<span style="color:red">{{scope.row.itemSkuMnpInstal.instalMengniuPay==1?'奶款结算':''}} {{scope.row.itemSkuMnpInstal.instalFullPay==1?'线上全额支付':''}} {{scope.row.itemSkuMnpInstal.instalOfflinePay==1?'线下支付':''}}</span>
                        </p>
                        <el-table v-if="scope.row.itemSkuMnpInstal" :data="scope.row.itemSkuMnpInstal.itemSkuMnpInstalDetailList" style="width: 100%" size="mini" border>
                          <el-table-column label="期数">
                              <template #default="scope">{{scope.row.periods}}</template>
                          </el-table-column>
                          <el-table-column prop="name" label="分期类型">
                              <template #default="scope">{{instalType(scope.row.instalType)}}</template>
                          </el-table-column>
                          <el-table-column prop="name" label="利率（年）" width="100">
                              <template #default="scope">{{scope.row.annualInterestRate}}</template>
                          </el-table-column>
                          <el-table-column prop="name" label="还款类型">
                              <template #default="scope">{{InstallmentType(scope.row.repayType) }}</template>
                          </el-table-column>
                        </el-table>
                      </div>
                    </template>
                  </Poptip> 
                </template>
              </el-table-column>
              <el-table-column label="奶款担保" width="100" align="center">
                <template #default="scope">
                  <div v-if="scope.row.accountPeriod == 0">不支持</div>
                  <Poptip transfer trigger="hover" placement="top" width="240" v-else>
                    <Button size="small">查看奶款担保</Button> 
                    <template #content>
                      <div style="white-space: normal;">
                        <p style="line-height:20px;font-size:14px">奶款担保类型：<span style="color:red">{{accountPeriod(scope.row.accountPeriod)}}</span></p>
                        <el-table v-if="scope.row.accountPeriod !== 0" :data="scope.row.itemSkuAccountPeriods" style="width: 100%" size="mini" border>
                          <el-table-column label="奶款担保天数" align="center">
                            <template #default="scope">{{scope.row.accountPeriodDays}}</template>
                          </el-table-column>
                          <el-table-column prop="name" label="奶款担保年利率（%）" width="120">
                            <template #default="scope">{{scope.row.interestRate}}</template>
                          </el-table-column>
                        </el-table> 
                        <span v-else>无奶款担保</span>       
                      </div>
                    </template>
                  </Poptip>  
                </template>
              </el-table-column>
              <el-table-column label="融资支付" width="100">
                <template #default="scope">
                  <div v-if="scope.row.fincpay == 0 && scope.row.niuxinPay == 0 && scope.row.silagePay == 0">不支持</div>
                  <Tooltip placement="top" transfer :max-width="450" theme="light" v-else>
                    <Button size="small">查看融资</Button>
                    <template #content>
                      <div slot="content">
                        <p style="line-height:20px;font-size:14px">是否支持牛奶花融资：<span style="color:red">{{scope.row.fincpay == 1?'支持':'不支持'}}</span></p>
                        <div style="line-height:20px;font-size:14px" v-if="scope.row.fincpayDays && scope.row.fincpayDays.length">
                          <span>牛奶花融资期限天数：</span> 
                          <span v-for="(item,iindex) in scope.row.fincpayDays" :key="iindex">{{item}}<span v-if="iindex != scope.row.fincpayDays.length-1 ">、</span></span> 
                        </div>
                        <div style="margin:1em 0; border-bottom:1px solid #eee;"></div>
                        <p style="line-height:20px;font-size:14px">是否支持牛信融资：<span style="color:red">{{scope.row.niuxinPay == 1?'支持':'不支持'}}</span></p>
                        <div style="line-height:20px;font-size:14px" v-if="scope.row.niuxinPayDays && scope.row.niuxinPayDays.length">
                          <span>牛信融资期限天数：</span> 
                          <span v-for="(item,iindex) in scope.row.niuxinPayDays" :key="iindex">{{item}}<span v-if="iindex != scope.row.niuxinPayDays.length-1">、</span></span> 
                        </div>
                        <div style="margin:1em 0; border-bottom:1px solid #eee;"></div>
                        <p style="line-height:20px;font-size:14px">是否支持青贮贷支付：<span style="color:red">{{scope.row.silagePay == 1?'支持':'不支持'}}</span></p>
                      </div>
                    </template>
                  </Tooltip>
                </template>
              </el-table-column>
              <el-table-column label="是否配送" width="100" align="center">
                <template #default="scope">
                  <Tag v-if="scope.row.isDeliver == 0" color="red">不支持</Tag>
                  <Tag v-if="scope.row.isDeliver == 1" color="green">支&nbsp;持</Tag>
                </template>
              </el-table-column>
              <el-table-column label="是否自提" width="100" align="center">
                <template #default="scope">
                  <Tag v-if="scope.row.isPickUp == 0" color="red">不支持</Tag>
                  <Tag v-if="scope.row.isPickUp == 1" color="green">支&nbsp;持</Tag>
                </template>
              </el-table-column>
              <el-table-column label="销售地区" width="100" align="center">
                <template #default="scope">
                  <Poptip transfer trigger="hover" placement="top">
                    <Button size="small">查看区域</Button> 
                    <template #content>
                      <div slot="content" style="white-space: normal; ">
                        <span v-for="(list,index) in scope.row.itemSellAreas" :key="index">
                          <Tag v-if="list.isNational == 0" color="blue">全国</Tag>
                          <Tag v-if="list.isNational == 1" color="blue">{{list.province || ''}}{{list.city || ''}}{{list.area || ''}}</Tag>
                        </span>
                      </div>
                    </template>
                  </Poptip>
                </template>
              </el-table-column>
              <el-table-column label="价格有效期" width="100" align="center">
                <template #default="scope">
                {{scope.row.saleEndTime || '无'}}
                </template>
              </el-table-column>
              <el-table-column label="备注" width="100" align="center">
                <template #default="scope">
                  <Tooltip width="200" transfer :content="scope.row.remark?scope.row.remark:'无'" placement="top">
                    <Button size="small">查看备注</Button> 
                  </Tooltip>
                </template>
              </el-table-column>
              <el-table-column label="状态" align="center">
                <template #default="scope">
                    {{itemStatus(scope.row.skuStatus)}}
                </template>
              </el-table-column>
              <el-table-column label="更新时间" width="150" align="center">
                <template #default="scope">
                    <span v-if="scope.row.updateTime">{{formatData(scope.row.updateTime)}}</span>
                  <span v-else>-</span>
                </template>
              </el-table-column>
              <el-table-column label="创建时间" width="150" align="center">
                <template #default="scope">
                  {{formatData(scope.row.addTime)}}
                </template>
              </el-table-column>
              <!-- 根据skuStatus判断按钮 新增sku放在spu列中-->
              <el-table-column label="操作" width="210" v-if="pageName!=4">
                <template #default="scope">
                  <span>
                    <Button type="error" size="small" @click="offItem(scope.row.id)">下&nbsp;架</Button>&nbsp;
                    <Button plain size="small" @click="checkSpecialPrice(scope.row)">查看特殊价格</Button>
                  </span> 
                </template>
              </el-table-column>
            </el-table>
          </div>

          <!--代采市场商品销售属性-->
          <div v-if="showThisMarket(props.row.itemSkus,'7')">
            <span style="color: red;">代采商品销售属性</span>
            <el-table :ref="'onSaleItemTableListDs' + props.row.id" @select-all="selectAllJs" @select="selectJs" :data="filters(props.row.itemSkus,'7')" border>
              <el-table-column type="selection" width="55"></el-table-column>
              <el-table-column label="商品类型" width="140">
                <template #default="scope">
                    {{scope.row.isStandard && scope.row.isStandard == 2?'议价型商品':'标准型商品'}}
                </template>
              </el-table-column>
              <el-table-column label="销售区域" width="140">
                <template #default="scope">
                    {{scope.row.regionName ||'无'}}
                </template>
              </el-table-column>
              <el-table-column label="商品代码" width="140">
                  <template #default="scope">
                      {{scope.row.skuClassifyName ||'无'}}
                  </template>
              </el-table-column>
              <el-table-column label="规格" width="180">
                  <template #default="scope">
                      <div v-if="scope.row.version">{{scope.row.version}}</div>
                      <div v-else>
                          <div v-for="prop in scope.row.itemSkuProps" :key="prop.id">{{prop.propName}}:{{prop.propValue}}</div>
                      </div>
                  </template>
              </el-table-column>
              <el-table-column label="市场指导价(元)" width="110">
                <template #default="scope">
                  <span v-if="scope.row.isStandard && scope.row.isStandard == 2">{{scope.row.marketPriceMin ||''}} ~ {{scope.row.marketPriceMax ||''}}</span>
                  <span v-else>{{scope.row.price ||''}}</span>
                </template>
              </el-table-column>
              <el-table-column label="代采市场交易价(元)" width="130">
                  <template #default="scope">
                    <span v-if="scope.row.itemPrices.length > 0">
                      <span v-for="priceList in scope.row.itemPrices" :key="priceList.id">
                        <span v-if="priceList && priceList.typeCode == 7">{{priceList.price}}</span>
                      </span>
                    </span>
                    <span v-if="scope.row.isStandard && scope.row.isStandard == 2">无</span>
                  </template>
              </el-table-column>
              <el-table-column label="爱养牛合同价(元)" width="120">
                  <template #default="scope">
                      {{scope.row.settlementPrice ||'0'}}
                  </template>
              </el-table-column>
              <el-table-column label="库存">
                  <template #default="scope">
                      {{scope.row.itemStock || '0'}}
                  </template>
              </el-table-column>
              <el-table-column label="起订量">
                  <template #default="scope">
                      {{ scope.row.minQuantity }}
                  </template>
              </el-table-column>
              <el-table-column label="线下支付" width="100" align="center">
                  <template #default="scope">
                      <Tag v-if="scope.row.offlinePay == 0" color="red">不支持</Tag>
                      <Tag v-if="scope.row.offlinePay == 1" color="green">支&nbsp;持</Tag>
                  </template>
              </el-table-column>
              <el-table-column label="代扣支付" width="100" align="center">
                  <template #default="scope">
                      <Tag v-if="scope.row.mengniuPay == 0" color="red">不支持</Tag>
                      <Poptip transfer trigger="hover" placement="top" width="600" v-if="scope.row.mengniuPay==1">
                          <Button size="small">查看代扣</Button>
                          <template #content>
                            <div slot="content">
                              <p style="line-height:20px;font-size:14px">是否开启代扣：<span style="color:red">{{scope.row.mengniuPay == 1?'开启':'关闭'}}</span></p>
                              <p style="line-height:20px;font-size:14px">代扣销售价：<span style="color:red">{{scope.row.itemPrices[0].mnpPrice || 0}}</span></p>
                              <p style="line-height:20px;font-size:14px" v-show="scope.row.feePayer != null">手续费承担方：<span style="color:red">{{scope.row.feePayer == 0?'供应商':'牧场'}}</span></p>
                              <p style="line-height:20px;font-size:14px" v-show="scope.row.feePayer == null">手续费承担方：<span style="color:red">未设置</span></p>
                              <p style="line-height:20px;font-size:14px" v-if="scope.row.itemSkuMnpInstal">首付比例：<span style="color:red">{{scope.row.itemSkuMnpInstal.downPaymentRatio}} %</span></p>
                              <p style="line-height:20px;font-size:14px" v-if="scope.row.itemSkuMnpInstal">首付付款方式：<span style="color:red">{{scope.row.itemSkuMnpInstal.instalMengniuPay==1?'奶款代扣':''}} {{scope.row.itemSkuMnpInstal.instalFullPay==1?'线上全额支付':''}} {{scope.row.itemSkuMnpInstal.instalOfflinePay==1?'线下支付':''}}</span>
                              </p>
                              <el-table v-if="scope.row.itemSkuMnpInstal" :data="scope.row.itemSkuMnpInstal.itemSkuMnpInstalDetailList" style="width: 100%" size="mini" border>
                                  <el-table-column label="期数">
                                      <template #default="scope">{{scope.row.periods}}</template>
                                  </el-table-column>
                                  <el-table-column prop="name" label="分期类型">
                                      <template #default="scope">{{instalType(scope.row.instalType) }}</template>
                                  </el-table-column>
                                  <el-table-column prop="name" label="利率（年）" width="100">
                                      <template #default="scope">{{scope.row.annualInterestRate}}</template>
                                  </el-table-column>
                                  <el-table-column prop="name" label="还款类型">
                                      <template #default="scope">{{InstallmentType(scope.row.repayType)}}</template>
                                  </el-table-column>
                              </el-table>
                            </div>
                          </template>
                      </Poptip>
                  </template>
              </el-table-column>
              <el-table-column label="奶款担保" width="120" align="center">
                <template #default="scope">
                  <div v-if="scope.row.accountPeriod == 0">不支持</div>
                  <Poptip transfer trigger="hover" placement="top" width="240" v-else>
                    <Button size="small">查看奶款担保</Button> 
                    <template #content>
                      <div style="white-space: normal;">
                        <p style="line-height:20px;font-size:14px">奶款担保类型：<span style="color:red">{{accountPeriod(scope.row.accountPeriod)}}</span></p>
                        <el-table v-if="scope.row.accountPeriod !== 0" :data="scope.row.itemSkuAccountPeriods" style="width: 100%" size="mini" border>
                          <el-table-column label="奶款担保天数" align="center">
                              <template #default="scope">{{scope.row.accountPeriodDays}}</template>
                          </el-table-column>
                          <el-table-column prop="name" label="奶款担保利率（%）" width="120">
                              <template #default="scope">{{scope.row.interestRate}}</template>
                          </el-table-column>
                        </el-table> 
                        <span v-else>无奶款担保</span>       
                      </div>
                    </template>
                  </Poptip>  
                </template>
              </el-table-column>
              <el-table-column label="融资支付" width="100">
                <template #default="scope">
                  <div v-if="scope.row.fincpay == 0 && scope.row.niuxinPay == 0 && scope.row.silagePay == 0">不支持</div>
                  <Tooltip placement="top" transfer :max-width="450" theme="light" v-else>
                    <Button size="small">查看融资</Button>
                    <template #content>
                      <div>
                        <p style="line-height:20px;font-size:14px">是否支持牛奶花融资：<span style="color:red">{{scope.row.fincpay == 1?'支持':'不支持'}}</span></p>
                        <div style="line-height:20px;font-size:14px" v-if="scope.row.fincpayDays && scope.row.fincpayDays.length">
                          <span>牛奶花融资期限天数：</span> 
                          <span v-for="(item,iindex) in scope.row.fincpayDays" :key="iindex">{{item}}<span v-if="iindex != scope.row.fincpayDays.length-1 ">、</span></span> 
                        </div>
                        <div style="margin:1em 0; border-bottom:1px solid #eee;"></div>

                        <p style="line-height:20px;font-size:14px">是否支持牛信融资：<span style="color:red">{{scope.row.niuxinPay == 1?'支持':'不支持'}}</span></p>
                        <div style="line-height:20px;font-size:14px" v-if="scope.row.niuxinPayDays && scope.row.niuxinPayDays.length">
                          <span>牛信融资期限天数：</span> 
                          <span v-for="(item,iindex) in scope.row.niuxinPayDays" :key="iindex">{{item}}<span v-if="iindex != scope.row.niuxinPayDays.length-1">、</span></span> 
                        </div>
                        <div style="margin:1em 0; border-bottom:1px solid #eee;"></div>
                        <p style="line-height:20px;font-size:14px">是否支持青贮贷支付：<span style="color:red">{{scope.row.silagePay == 1?'支持':'不支持'}}</span></p>
                      </div>
                    </template>
                  </Tooltip>
                </template>
              </el-table-column>
              <el-table-column label="是否配送" width="100" align="center">
                  <template #default="scope">
                      <Tag v-if="scope.row.isDeliver == 0" color="red">不支持</Tag>
                      <Tag v-if="scope.row.isDeliver == 1" color="green">支&nbsp;持</Tag>
                  </template>
              </el-table-column>
              <el-table-column label="是否自提" width="100" align="center">
                  <template #default="scope">
                      <Tag v-if="scope.row.isPickUp == 0" color="red">不支持</Tag>
                      <Tag v-if="scope.row.isPickUp == 1" color="green">支&nbsp;持</Tag>
                  </template>
              </el-table-column>
              <el-table-column label="销售地区" width="100" align="center">
                  <template #default="scope">
                      <Poptip transfer trigger="hover" placement="top">
                          <Button size="small">查看区域</Button>
                          <div slot="content" style="white-space: normal;">
                            <span v-for="(list,index) in scope.row.itemSellAreas" :key="index">
                              <Tag v-if="list.isNational == 0" color="blue">全国</Tag>
                              <Tag v-if="list.isNational == 1" color="blue">{{list.province || ''}}{{list.city || ''}}{{list.area || ''}}</Tag>
                            </span>
                          </div>
                      </Poptip>
                  </template>
              </el-table-column>
              <el-table-column label="价格有效期" width="100" align="center">
                <template #default="scope">
                  {{scope.row.saleEndTime || '无'}}
                </template>
              </el-table-column>
              <el-table-column label="备注" width="100" align="center">
                  <template #default="scope">
                      <Tooltip width="200" transfer :content="scope.row.remark?scope.row.remark:'无'" placement="top">
                          <Button size="small">查看备注</Button>
                      </Tooltip>
                  </template>
              </el-table-column>
              <el-table-column label="状态" align="center">
                  <template #default="scope">
                      {{itemStatus(scope.row.skuStatus)}}
                  </template>
              </el-table-column>
              <el-table-column label="更新时间" width="150">
                  <template #default="scope">
                      <span v-if="scope.row.updateTime">{{formatData(scope.row.updateTime) }}</span>
                      <span v-else>-</span>
                  </template>
              </el-table-column>
              <el-table-column label="创建时间" width="150">
                  <template #default="scope">
                      {{formatData(scope.row.addTime) }}
                  </template>
              </el-table-column>
              <!-- 根据skuStatus判断按钮 新增sku放在spu列中-->
              <el-table-column label="操作" width="300" v-if="pageName!=4">
                  <template #default="scope">
                    <span>
                      <Button type="error" size="small" @click="offItem(scope.row.id)">下&nbsp;架</Button>&nbsp;
                      <Button plain size="small" @click="checkSpecialPrice(scope.row)">查看特殊价格</Button>
                    </span> 
                  </template>
              </el-table-column>
            </el-table>
          </div>

          <!-- 营销中心 -->
          <div v-if="showThisMarket(props.row.itemSkus,'3')">
            <span style="color: red;">营销中心商品销售属性</span>
            <el-table :ref="'onSaleItemTableListYx' + props.row.id" @select-all="selectAllJs" @select="selectJs" :data="filters(props.row.itemSkus,'3')" border>
              <el-table-column type="selection" width="55"></el-table-column>
              <el-table-column label="规格" width="200">
                  <template #default="scope">
                    <div v-if="scope.row.version">{{scope.row.version}}</div>
                    <div v-else>
                        <div v-for="(prop,i) in scope.row.itemSkuProps" :key="i">{{prop.propName}}:{{prop.propValue}}</div>
                    </div>
                  </template>
              </el-table-column>
              <el-table-column label="市场指导价(元)" width="140">
                  <template #default="scope">
                      {{scope.row.price ||''}}
                  </template>
              </el-table-column>
              <el-table-column  :label="props.row.itemSkus[0].itemPrices[0].priceName || '爆品价'" width="150">
                  <template #default="scope">
                      <span v-for="(item,index) in scope.row.itemPrices" :key='index'>{{item.price}}</span>
                  </template>
              </el-table-column>
              <el-table-column label="爱养牛合同价(元)" width="140">
                  <template #default="scope">
                      {{scope.row.settlementPrice ||''}}
                  </template>
              </el-table-column>
              <el-table-column label="单位" width="80">
                  <template #default="scope">
                      {{scope.row.unit || '无'}}
                  </template>
              </el-table-column>
              <el-table-column label="库存" width="100">
                  <template #default="scope">
                      {{scope.row.itemStock || '0'}}
                  </template>
              </el-table-column>
              <el-table-column label="起订量" width="110" >
                  <template #default="scope">
                      {{ scope.row.minQuantity }}
                  </template>
              </el-table-column>
              <el-table-column label="线下支付" width="100" align="center">
                  <template #default="scope">
                      {{scope.row.offlinePay==1?'支持':'不支持'}}
                  </template>
              </el-table-column>
              <el-table-column label="代扣支付" width="100" align="center">
                <template #default="scope">
                  <div v-if="scope.row.mengniuPay==0">不支持</div>
                  <Poptip transfer trigger="hover" placement="top" width="200" v-if="scope.row.mengniuPay==1">
                    <Button size="small">查看代扣</Button> 
                    <template #content>      
                      <div slot="content">
                        <p style="line-height:20px;font-size:14px">是否开启代扣：<span style="color:red">{{scope.row.mengniuPay == 1?'开启':'关闭'}}</span></p>
                        <p style="line-height:20px;font-size:14px">代扣销售价：<span style="color:red">{{scope.row.itemPrices[0].mnpPrice || 0}}</span></p>
                        <p style="line-height:20px;font-size:14px" v-show="scope.row.feePayer != null">手续费承担方：<span style="color:red">{{scope.row.feePayer == 0?'供应商':'牧场'}}</span></p>
                        <p style="line-height:20px;font-size:14px" v-show="scope.row.feePayer == null">手续费承担方：<span style="color:red">牧场</span></p>  
                      </div>
                    </template>  
                  </Poptip>
                </template>
              </el-table-column>
              <el-table-column label="奶款担保" width="120" align="center">
                <template #default="scope">
                  <div v-if="scope.row.accountPeriod == 0">不支持</div>
                    <Poptip transfer trigger="hover" placement="top" width="240" v-else>
                      <Button size="small">查看奶款担保</Button>
                      <template #content>
                        <div>
                          <el-table v-if="scope.row.itemSkuAccountPeriods.length" :data="scope.row.itemSkuAccountPeriods" style="width: 100%" size="mini" border>
                            <el-table-column label="奶款担保天数" align="center">
                                <template #default="scope">{{scope.row.accountPeriodDays}}</template>
                            </el-table-column>
                            <el-table-column prop="name" label="奶款担保年利率（%）" width="120">
                                <template #default="scope">{{scope.row.interestRate}}</template>
                            </el-table-column>
                          </el-table>
                          <span v-else>无奶款担保</span> 
                        </div>
                      </template>
                    </Poptip> 
                </template>
              </el-table-column>
              <el-table-column label="融资支付" width="100">
                <template #default="scope">
                  <div v-if="scope.row.fincpay == 0 && scope.row.niuxinPay == 0 && scope.row.silagePay == 0">不支持</div>
                  <Tooltip placement="top" transfer :max-width="450" theme="light" v-else>
                    <Button size="small">查看融资</Button>
                    <template #content>
                      <div slot="content">
                        <p style="line-height:20px;font-size:14px">是否支持牛奶花融资：<span style="color:red">{{scope.row.fincpay == 1?'支持':'不支持'}}</span></p>
                          <div style="line-height:20px;font-size:14px" v-if="scope.row.fincpayDays && scope.row.fincpayDays.length">
                            <span>牛奶花融资期限天数：</span> 
                            <span v-for="(item,iindex) in scope.row.fincpayDays" :key="iindex">{{item}}<span v-if="iindex != scope.row.fincpayDays.length-1 ">、</span></span> 
                          </div>
                          <div style="margin:1em 0; border-bottom:1px solid #eee;"></div>

                          <p style="line-height:20px;font-size:14px">是否支持牛信融资：<span style="color:red">{{scope.row.niuxinPay == 1?'支持':'不支持'}}</span></p>
                          <div style="line-height:20px;font-size:14px" v-if="scope.row.niuxinPayDays && scope.row.niuxinPayDays.length">
                            <span>牛信融资期限天数：</span> 
                            <span v-for="(item,iindex) in scope.row.niuxinPayDays" :key="iindex">{{item}}<span v-if="iindex != scope.row.niuxinPayDays.length-1">、</span></span> 
                          </div>
                          <div style="margin:1em 0; border-bottom:1px solid #eee;"></div>
                          <p style="line-height:20px;font-size:14px">是否支持青贮贷支付：<span style="color:red">{{scope.row.silagePay == 1?'支持':'不支持'}}</span></p>
                      </div>
                    </template>
                  </Tooltip>
                </template>
              </el-table-column>
              <el-table-column label="可否配送" width="100" align="center">
                  <template #default="scope">
                      {{scope.row.isDeliver==1?'支持':'不支持'}}
                  </template>
              </el-table-column>
              <el-table-column label="可否自提" width="100" align="center">
                  <template #default="scope">
                      {{scope.row.isPickUp==1?'支持':'不支持'}}
                  </template>
              </el-table-column>
              <el-table-column label="销售地区" width="100" align="center">
                <template #default="scope">
                  <Poptip transfer trigger="hover" placement="top">
                    <Button size="small">查看区域</Button> 
                    <template #content>
                      <div style="white-space: normal; ">
                        <span v-for="(list,index) in scope.row.itemSellAreas" :key="index">
                          <Tag v-if="list.isNational == 0" color="blue">全国</Tag>
                          <Tag v-if="list.isNational == 1" color="blue">{{list.province || ''}}{{list.city || ''}}{{list.area || ''}}</Tag>
                        </span>
                      </div>
                    </template>
                  </Poptip>
                </template>
              </el-table-column>
              <el-table-column label="价格有效期" width="100" align="center">
                <template #default="scope">
                  {{scope.row.saleEndTime || '无'}}
                </template>
              </el-table-column>
              <el-table-column label="备注" width="100" align="center">
                  <template #default="scope">
                      <Tooltip :max-width="200" transfer :content="scope.row.remark?scope.row.remark:'无'" placement="top">
                          <Button size="small">查看备注</Button>
                      </Tooltip>
                  </template>
              </el-table-column>
              <el-table-column label="状态" align="center">
                  <template #default="scope">
                      {{itemStatus(scope.row.skuStatus) }}
                  </template>
              </el-table-column>
              <el-table-column label="更新时间" width="150" align="center">
                  <template #default="scope">
                      <span v-if="scope.row.updateTime">{{formatData(scope.row.updateTime) }}</span>
                      <span v-else>-</span>
                  </template>
              </el-table-column>
              <el-table-column label="创建时间" width="150" align="center">
                <template #default="scope">
                  {{formatData(scope.row.addTime) }}
                </template>
              </el-table-column>
              <el-table-column label="拒绝时间" width="170" v-if="$route.path === '/refusedItem'">
                <template #default="scope">
                  {{formatData(scope.row.itemAuditRefuseLog[0].addTime)}}
                </template>
              </el-table-column>
              <!-- 根据skuStatus判断按钮 新增sku放在spu列中-->
              <el-table-column label="操作" width="300" v-if="pageName!=4">
                <template #default="scope">
                  <span>
                    <Button type="error" size="small" @click="offItem(scope.row.id)">下&nbsp;架</Button>
                  </span>    
                </template>
              </el-table-column>
            </el-table>
          </div>

          <!-- 积分商城 -->
          <div v-if="showThisMarket(props.row.itemSkus,'5')">
            <span style="color: red;">积分商城商品销售属性</span>
            <el-table :ref="'onSaleItemTableListJf' + props.row.id" @select-all="selectAllJs" @select="selectJs" :data="filters(props.row.itemSkus,'5')" border>
              <el-table-column type="selection" width="55"></el-table-column>
              <el-table-column label="规格" width="200">
                <template #default="scope">
                  <div v-if="scope.row.version">{{scope.row.version}}</div>
                  <div v-else>
                      <div v-for="(prop,i) in scope.row.itemSkuProps" :key="i">{{prop.propName}}:{{prop.propValue}}</div>
                  </div>
                </template>
              </el-table-column>
              <el-table-column label="市场指导价(元)" width="140">
                <template #default="scope">
                    {{scope.row.price ||''}}
                </template>
              </el-table-column>
              <el-table-column label="单位" width="80">
                <template #default="scope">
                    {{scope.row.unit || '无'}}
                </template>
              </el-table-column>
              <el-table-column label="商品价格+积分数量" width="200">
                <template #default="scope">
                    {{scope.row.newPrice+'元' ||''}}&emsp;&emsp;
                    {{scope.row.score ||''}}
                </template>
              </el-table-column>
              <el-table-column label="库存" width="100">
                  <template #default="scope">
                      {{scope.row.itemStock || '0'}}
                  </template>
              </el-table-column>
              <el-table-column label="起订量" width="110" >
                  <template #default="scope">
                      {{ scope.row.minQuantity }}
                  </template>
              </el-table-column>
              <el-table-column label="代扣支付" width="100" align="center">
                  <template #default="scope">
                      {{scope.row.mengniuPay==1?'支持':'不支持'}}
                  </template>
              </el-table-column>
              <el-table-column label="销售地区" width="100" align="center">
                  <template #default="scope">
                      <Poptip transfer trigger="hover" placement="top">
                        <Button size="small">查看区域</Button> 
                        <template #content>
                          <div slot="content" style="white-space: normal; ">
                            <span v-for="(list,index) in scope.row.itemSellAreas" :key="index">
                              <Tag v-if="list.isNational == 0" color="blue">全国</Tag>
                              <Tag v-if="list.isNational == 1" color="blue">{{list.province || ''}}{{list.city || ''}}{{list.area || ''}}</Tag>
                            </span>
                          </div>
                        </template>
                    </Poptip>
                  </template>
              </el-table-column>
              <el-table-column label="备注" width="100" align="center">
                  <template #default="scope">
                      <Tooltip :max-width="200" transfer :content="scope.row.remark?scope.row.remark:'无'" placement="top">
                          <Button size="small">查看备注</Button>
                      </Tooltip>
                  </template>
              </el-table-column>
              <el-table-column label="状态" align="center">
                  <template #default="scope">
                      {{itemStatus(scope.row.skuStatus)}}
                  </template>
              </el-table-column>
              <el-table-column label="更新时间" width="150" align="center">
                  <template #default="scope">
                      <span v-if="scope.row.updateTime">{{formatData(scope.row.updateTime) }}</span>
                      <span v-else>-</span>
                  </template>
              </el-table-column>
              <el-table-column label="创建时间" width="150" align="center">
                  <template #default="scope">
                      {{formatData(scope.row.addTime)}}
                  </template>
              </el-table-column>
              <el-table-column label="拒绝时间" width="170" v-if="$route.path === '/refusedItem'">
                  <template #default="scope">
                      {{formatData(scope.row.itemAuditRefuseLog[0].addTime) }}
                  </template>
              </el-table-column>
              <!-- 根据skuStatus判断按钮 新增sku放在spu列中-->
              <el-table-column label="操作" width="300" v-if="pageName!=4">
                  <template #default="scope">
                    <span>
                      <Button type="error" size="small" @click="offItem(scope.row.id)">下&nbsp;架</Button>
                    </span>     
                  </template>
                </el-table-column>
            </el-table>
          </div>
          <!--牛客市场 -->
          <div v-if="showThisMarket(props.row.itemSkus,'8')">
            <span style="color: red;">牛客市场商品销售属性</span>
            <el-table :ref="'onSaleItemTableListNk' + props.row.id" @select-all="selectAllJs" @select="selectJs" :data="filters(props.row.itemSkus,'8')" border>
              <el-table-column type="selection" width="55"></el-table-column>
              <el-table-column label="销售区域" width="110">
                <template #default="scope">
                    {{scope.row.regionName ||'无'}}
                </template>
              </el-table-column>
              <el-table-column label="商品代码" width="140">
                  <template #default="scope">
                      {{scope.row.skuClassifyName ||'无'}}
                  </template>
              </el-table-column>
                <el-table-column label="规格" width="150">
                    <template #default="scope">
                      <div v-if="scope.row.version">{{scope.row.version}}</div>
                      <div v-else>
                        <div v-for="prop in scope.row.itemSkuProps" :key="prop.id">{{prop.propName}}:{{prop.propValue}}</div>
                      </div>
                    </template>
                </el-table-column>
                <el-table-column label="市场指导价(元)" width="110">
                    <template #default="scope">
                        {{scope.row.price ||'0'}}
                    </template>
                </el-table-column>
                <el-table-column label="牛客市场交易价(元)" width="130">
                  <template #default="scope">
                    <span v-if="scope.row.itemPrices.length > 0">
                      <span v-for="priceList in scope.row.itemPrices" :key="priceList.id">
                        <span v-if="priceList && priceList.typeCode == 8">{{priceList.price}}</span>
                      </span>
                    </span>
                    <span v-else>{{'无'}}</span>
                  </template>
                </el-table-column>
                <el-table-column label="爱养牛合同价(元)" width="120">
                    <template #default="scope">
                        {{scope.row.settlementPrice ||'0'}}
                    </template>
                </el-table-column>
                <el-table-column label="库存">
                    <template #default="scope">
                        {{scope.row.itemStock || '0'}}
                    </template>
                </el-table-column>
                <el-table-column label="起订量">
                    <template #default="scope">
                        {{ scope.row.minQuantity }}
                    </template>
                </el-table-column>
                <el-table-column label="线下支付" width="100" align="center">
                    <template #default="scope">
                        <Tag v-if="scope.row.offlinePay == 0" color="red">不支持</Tag>
                        <Tag v-if="scope.row.offlinePay == 1" color="green">支&nbsp;持</Tag>
                    </template>
                </el-table-column>
                <el-table-column label="代扣支付" width="100" align="center">
                    <template #default="scope">
                        <Tag v-if="scope.row.mengniuPay == 0" color="red">不支持</Tag>
                        <Poptip transfer trigger="hover" placement="top" width="600" v-if="scope.row.mengniuPay==1">
                            <Button size="small">查看代扣</Button>
                            <template #content>
                              <div>
                                  <p style="line-height:20px;font-size:14px">是否开启代扣：<span style="color:red">{{scope.row.mengniuPay == 1?'开启':'关闭'}}</span></p>
                                  <p style="line-height:20px;font-size:14px">代扣销售价：<span style="color:red">{{scope.row.itemPrices[0].mnpPrice || 0}}</span></p>
                                  <!-- <p style="line-height:20px;font-size:14px">账期天数：<span style="color:red">{{scope.row.mnpAccountPeriodDays}}天</span></p>
                                  <p style="line-height:20px;font-size:14px">账期年利率：<span style="color:red">{{scope.row.mnpInterestRate}} %</span></p>
                                  <p style="line-height:20px;font-size:14px">延期年利率：<span style="color:red">{{scope.row.mnpDelayInterestRate}} %</span></p> -->
                                  <p style="line-height:20px;font-size:14px" v-show="scope.row.feePayer != null">手续费承担方：<span style="color:red">{{scope.row.feePayer == 0?'供应商':'牧场'}}</span></p>
                                  <p style="line-height:20px;font-size:14px" v-show="scope.row.feePayer == null">手续费承担方：<span style="color:red">未设置</span></p>
                                  <p style="line-height:20px;font-size:14px" v-if="scope.row.itemSkuMnpInstal">首付比例：<span style="color:red">{{scope.row.itemSkuMnpInstal.downPaymentRatio}} %</span></p>
                                  <p style="line-height:20px;font-size:14px" v-if="scope.row.itemSkuMnpInstal">首付付款方式：<span style="color:red">{{scope.row.itemSkuMnpInstal.instalMengniuPay==1?'奶款结算':''}} {{scope.row.itemSkuMnpInstal.instalFullPay==1?'线上全额支付':''}} {{scope.row.itemSkuMnpInstal.instalOfflinePay==1?'线下支付':''}}</span>
                                  </p>
                                  <el-table v-if="scope.row.itemSkuMnpInstal" :data="scope.row.itemSkuMnpInstal.itemSkuMnpInstalDetailList" style="width: 100%" size="mini" border>
                                      <el-table-column label="期数">
                                          <template #default="scope">{{scope.row.periods}}</template>
                                      </el-table-column>
                                      <el-table-column prop="name" label="分期类型">
                                          <template #default="scope">{{instalType(scope.row.instalType ) }}</template>
                                      </el-table-column>
                                      <el-table-column prop="name" label="利率（年）" width="100">
                                          <template #default="scope">{{scope.row.annualInterestRate}}</template>
                                      </el-table-column>
                                      <el-table-column prop="name" label="还款类型">
                                          <template #default="scope">{{InstallmentType(scope.row.repayType ) }}</template>
                                      </el-table-column>
                                  </el-table>
                              </div>
                            </template>
                        </Poptip>
                    </template>
                </el-table-column>
                <el-table-column label="奶款担保" width="120" align="center">
                    <template #default="scope">
                      <div v-if="scope.row.accountPeriod == 0">不支持</div>
                      <Poptip transfer trigger="hover" placement="top" width="240" v-else>
                        <Button size="small">查看奶款担保</Button>
                        <template #content>
                          <div style="white-space: normal;">
                              <p style="line-height:20px;font-size:14px">奶款担保类型：<span style="color:red">{{accountPeriod(scope.row.accountPeriod)}}</span></p>
                              <el-table v-if="scope.row.accountPeriod !== 0" :data="scope.row.itemSkuAccountPeriods" style="width: 100%" size="mini" border>
                                  <el-table-column label="奶款担保天数" align="center">
                                      <template #default="scope">{{scope.row.accountPeriodDays}}</template>
                                  </el-table-column>
                                  <el-table-column prop="name" label="奶款担保年利率（%）" width="120">
                                      <template #default="scope">{{scope.row.interestRate}}</template>
                                  </el-table-column>
                              </el-table>
                              <span v-else>无奶款担保</span>
                          </div>
                        </template>
                      </Poptip>
                    </template>
                </el-table-column>
                <el-table-column label="融资支付" width="100">
                  <template #default="scope">
                    <div v-if="scope.row.fincpay == 0 && scope.row.niuxinPay == 0 && scope.row.silagePay == 0">不支持</div>
                    <Tooltip placement="top" transfer :max-width="450" theme="light" v-else>
                      <Button size="small">查看融资</Button>
                        <template #content>
                          <div >
                            <p style="line-height:20px;font-size:14px">是否支持牛奶花融资：<span style="color:red">{{scope.row.fincpay == 1?'支持':'不支持'}}</span></p>
                            <div style="line-height:20px;font-size:14px" v-if="scope.row.fincpayDays && scope.row.fincpayDays.length">
                              <span>牛奶花融资期限天数：</span> 
                              <span v-for="(item,iindex) in scope.row.fincpayDays" :key="iindex">{{item}}<span v-if="iindex != scope.row.fincpayDays.length-1 ">、</span></span> 
                            </div>
                            <div style="margin:1em 0; border-bottom:1px solid #eee;"></div>
                            <p style="line-height:20px;font-size:14px">是否支持牛信融资：<span style="color:red">{{scope.row.niuxinPay == 1?'支持':'不支持'}}</span></p>
                            <div style="line-height:20px;font-size:14px" v-if="scope.row.niuxinPayDays && scope.row.niuxinPayDays.length">
                              <span>牛信融资期限天数：</span> 
                              <span v-for="(item,iindex) in scope.row.niuxinPayDays" :key="iindex">{{item}}<span v-if="iindex != scope.row.niuxinPayDays.length-1">、</span></span> 
                            </div>
                            <div style="margin:1em 0; border-bottom:1px solid #eee;"></div>
                            <p style="line-height:20px;font-size:14px">是否支持青贮贷支付：<span style="color:red">{{scope.row.silagePay == 1?'支持':'不支持'}}</span></p>
                          </div>
                        </template>
                    </Tooltip>
                  </template>
                </el-table-column>
                <el-table-column label="是否配送" width="100" align="center">
                    <template #default="scope">
                        <Tag v-if="scope.row.isDeliver == 0" color="red">不支持</Tag>
                        <Tag v-if="scope.row.isDeliver == 1" color="green">支&nbsp;持</Tag>
                    </template>
                </el-table-column>
                <el-table-column label="是否自提" width="100" align="center">
                    <template #default="scope">
                        <Tag v-if="scope.row.isPickUp == 0" color="red">不支持</Tag>
                        <Tag v-if="scope.row.isPickUp == 1" color="green">支&nbsp;持</Tag>
                    </template>
                </el-table-column>
                <el-table-column label="销售地区" width="100" align="center">
                  <template #default="scope">
                    <Poptip transfer trigger="hover" placement="top">
                      <Button size="small">查看区域</Button>
                      <template #content>
                        <div style="white-space: normal;">
                          <span v-for="(list,index) in scope.row.itemSellAreas" :key="index">
                            <Tag v-if="list.isNational == 0" color="blue">全国</Tag>
                            <Tag v-if="list.isNational == 1" color="blue">{{list.province || ''}}{{list.city || ''}}{{list.area || ''}}</Tag>
                          </span>
                        </div>
                      </template>
                    </Poptip>
                  </template>
                </el-table-column>
                <el-table-column label="价格有效期" width="100" align="center">
                  <template #default="scope">
                    {{scope.row.saleEndTime || '无'}}
                  </template>
                </el-table-column>
                <el-table-column label="备注" width="100" align="center">
                  <template #default="scope">
                    <Tooltip width="200" transfer :content="scope.row.remark?scope.row.remark:'无'" placement="top">
                      <Button size="small">查看备注</Button>
                    </Tooltip>
                  </template>
                </el-table-column>
                <el-table-column label="状态" align="center">
                  <template #default="scope">
                    {{itemStatus(scope.row.skuStatus )}}
                  </template>
                </el-table-column>
                <el-table-column label="更新时间" width="150">
                  <template #default="scope">
                    <span v-if="scope.row.updateTime">{{formatData(scope.row.updateTime)}}</span>
                    <span v-else>-</span>
                  </template>
                </el-table-column>
                <el-table-column label="创建时间" width="150">
                  <template #default="scope">
                      {{formatData(scope.row.addTime)}}
                  </template>
                </el-table-column>
                <!-- 根据skuStatus判断按钮 新增sku放在spu列中-->
                <el-table-column label="操作" width="250" v-if="pageName!=4">
                  <template #default="scope">
                    <span>
                      <Button type="error" size="small" @click="offItem(scope.row.id)">下&nbsp;架</Button>&nbsp;
                      <Button plain size="small" @click="checkSpecialPrice(scope.row)">查看特殊价格</Button>&nbsp;
                      <Button type="warning" size="small"  @click="lookPromote(scope.row.id)">查看佣金</Button>
                    </span> 
                  </template>
                </el-table-column>
            </el-table>
          </div>
        </template>
      </el-table-column>
      <el-table-column type="selection" width="55"></el-table-column>
      <el-table-column label="商品名称">
        <template #default="scope">
          <a @click="viewItem(scope.row.itemSkus[0].id)">{{scope.row.name || '无名称'}}</a>
        </template>
      </el-table-column>
      <el-table-column label="分类">
        <template #default="scope">
           {{scope.row.classify && scope.row.classify.oneName}}/{{scope.row.classify && scope.row.classify.twoName}}/{{scope.row.classify && scope.row.classify.threeName}}
        </template>
      </el-table-column>
      <el-table-column label="店铺名称">
        <template #default="scope">
          <span>{{scope.row.shopName}}</span>
        </template>
      </el-table-column>
      <el-table-column label="更新时间">
        <template #default="scope">
          <span v-if="scope.row.updateTime">{{formatData(scope.row.updateTime )}}</span>
          <span v-else>-</span>
        </template>
      </el-table-column>
      <el-table-column label="创建时间">
        <template #default="scope">
          {{formatData(scope.row.addTime)}}
        </template>
      </el-table-column>
      <el-table-column label="操作" width="210" v-if="pageName!=4">
        <template #default="scope">
          <span>
            <Button type="primary" size="small" @click="checkTransportFright(scope.row.freightTemplate)">查看运费</Button>
          </span> 
        </template>
      </el-table-column>
    </el-table>
    <!-- 分页 -->
    <div style="margin: 10px;overflow: hidden">
      <div style="float: right;">
          <Page show-elevator :total="parseInt(totalNum)" :page-size="searchFilter.limit" :current.sync="current" @on-change="changePage"></Page>
      </div>
    </div>

    <!-- 单商品下架填写原因 -->
    <Modal v-model="refuseModel" title="填写拒绝原因" ok-text="提交" @on-ok="refuseApply()">
      <Form ref="refuseItemRef" :model="refuseItemForm" :label-width="80" >
        <FormItem label="拒绝原因:" prop="reason">
          <Input v-model="refuseItemForm.reason" placeholder="填写拒绝原因"></Input>
        </FormItem>
      </Form>
    </Modal>

    <!-- 填写原因 -->
    <Modal v-model="offModel" title="填写违规原因" ok-text="提交" @on-ok="offApply()">
      <Form ref="offItemRef" :model="offItemForm" :label-width="80" >
        <FormItem label="违规原因:" prop="reason">
          <Input v-model="offItemForm.reason" placeholder="填写违规原因"></Input>
        </FormItem>
      </Form>
    </Modal>

    <!-- 设置爱养牛合同价 -->
    <Modal v-model="setAYNpriceModel" title="设置爱养牛合同价" width="27%" >
      <Form ref="AYNSumPriceRef" :model="AYNSumPrice" :rules="ruleAYNSumPrice" :label-width="90">
        <FormItem label="爱养牛合同价" prop="price">
          <Input placeholder="请输入爱养牛合同价" v-model="AYNSumPrice.price"></Input>
        </FormItem>
      </Form>
      <template #footer>
        <div style="text-align: center;">
          <Button type="primary" @click="setAYNpriceModel = false">取消设置</Button>
          <Button type="success" @click="confirmSet">确定设置</Button>
        </div>
      </template>
    </Modal>
    
    <!-- 查看运费 -->
    <Modal v-model="transFrightModel" title="查看运费模板" @on-cancel="transFrightModel = false" width="60%;">
      <!-- one model -->
      <div class="content" v-if="transModelData.id">
        <!-- head -->
        <div class="head-style">
          <Row>
              <Col span="24" style="padding-left:0.2em;"><h3>{{transModelData.modelName}}</h3></Col>
          </Row>
        </div>
        <!-- detail -->
        <div style="width:100%;">
          <table class="tab-style" cellSpacing ="0">
            <tr v-if="transModelData.isMail == 1">
              <td style="width: 19%;">运送方式</td>
              <td style="width: 28%;">目的地</td>
              <td style="width: 13%;">首{{transModelData.valuationName}}</td>
              <td style="width: 13%;">运费（元）</td>
              <td style="width: 13%;">续每（{{transModelData.valuationName}}）</td>
              <td style="width: 13%;">运费（元）</td>
            </tr>
            <tr v-if="transModelData.isMail == 2">
              <td style="width: 19%;">运送方式</td>
              <td style="width: 28%;">目的地</td>
              <td style="width: 28%;">商品单位</td>
              <td style="width: 28%;">运费</td>
            </tr>
            <!-- data -->
            <tr v-show="transModelData.isMail == 1" v-for="list in transModelData.freightTemplateAreafreightList" :key="list.id">
                <td>{{transModelData.deliveryWay || '快递'}}</td>
                <td><span v-for="(addlist,addlistIndex) in list.shippingAddress" :key="addlistIndex">{{addlist}}<span v-if="addlistIndex !== list.shippingAddress.length-1">、</span></span></td>
                <td>{{toPercent(list.firstCount)}}</td>
                <td>{{toPercent(list.firstCharge)}}</td>
                <td>{{toPercent(list.continuedNumber)}}</td>
                <td>{{toPercent(list.continuedPrice)}}</td>
            </tr>
            <!-- data -->
            <tr v-if="transModelData.isMail == 2">
                <td>{{transModelData.deliveryWay || '快递'}}</td>
                <td>至全国地区</td>
                <td>单位：{{transModelData.valuationName}}</td>
                <!-- <td>--</td>
                <td>--</td> -->
                <td>卖家承担运费</td>
            </tr>
          </table>
          <br />
          <div class="head-style" v-if="transModelData.freightTemplateConditionalmailList.length > 0">
            <Row>
              <Col span="24" style="padding-left:0.2em;"><h3>指定地区包邮条件</h3></Col>
            </Row>
          </div>
          <table class="tab-style" cellSpacing ="0">
            <tr>
              <td style="width: 19%;">运送方式</td>
              <td style="width: 28%;">指定地区</td>
              <td style="width: 28%;">包邮条件</td>
            </tr>
            <!-- data -->
            <tr v-for="list in transModelData.freightTemplateConditionalmailList" :key="list.id" v-show="list.number !='' || list.price !=''">
              <td>{{transModelData.deliveryWay || '快递'}}</td>
              <td><span v-for="(addlist,addlistIndex) in list.address" :key="addlistIndex">{{addlist}}<span v-if="addlistIndex !== list.address.length-1">、</span></span></td>
              <td>
                <span v-if="list.postalConditions == 0">满 {{list.number}} {{transModelData.valuationName}}包邮</span>
                <span v-if="list.postalConditions == 1">满 {{list.price}} 元包邮</span>
                <span v-if="list.postalConditions == 2">满 {{list.number}} {{transModelData.valuationName}}，{{list.price}} 元以上包邮</span>
              </td>
            </tr>
          </table>
        </div>
      </div>
    </Modal>

    <!-- 查看特殊价格弹框 -->
    <Modal v-model="specialModal" title="查看特殊价格" :styles="{width:'70%'}">
      <el-table :data="tableData" style="width: 100%">
        <el-table-column type="index" width="50">
        </el-table-column>
        <el-table-column prop="settlementPrice" label="爱养牛合同价（元）" width="180">
        </el-table-column>
        <el-table-column prop="price" label="特殊价格（元）" width="180">
        </el-table-column>
        <el-table-column prop="itemStock" label="库存量">
        </el-table-column>
        <el-table-column prop="minQuantity" label="起订量">
        </el-table-column>
        <el-table-column label="线下支付">
          <template #default="scope">
            <el-tag :type="scope.row.offlinePay?'success':'danger'">{{scope.row.offlinePay?'已支持':'不支持'}}</el-tag>
          </template>
        </el-table-column>
        <el-table-column label="代扣支付">
          <template #default="scope">
            <Tag v-if="scope.row.mengniuPay == false" color="red">不支持</Tag>
            <Poptip transfer trigger="hover" placement="top" width="600" v-if="scope.row.mengniuPay==true">
              <Button size="small">查看代扣</Button>
              <template #content>
                <div>
                  <p style="line-height:20px;font-size:14px">是否开启代扣：<span style="color:red">{{scope.row.mengniuPay == 1?'开启':'关闭'}}</span></p>
                  <p style="line-height:20px;font-size:14px">代扣销售价：<span style="color:red">{{scope.row.mnpPrice || 0}}</span></p>
                  <p style="line-height:20px;font-size:14px" v-show="scope.row.feePayer != null">手续费承担方：<span style="color:red">{{scope.row.feePayer == 0?'供应商':'牧场'}}</span></p>
                  <p style="line-height:20px;font-size:14px" v-show="scope.row.feePayer == null">手续费承担方：<span style="color:red">未设置</span></p>
                  <p style="line-height:20px;font-size:14px" v-if="scope.row.itemSkuMnpInstal">首付比例：<span style="color:red">{{scope.row.itemSpecialMnpInstal.downPaymentRatio}} %</span></p>
                  <p style="line-height:20px;font-size:14px" v-if="scope.row.itemSkuMnpInstal">首付付款方式：<span style="color:red">{{scope.row.itemSpecialMnpInstal.instalMengniuPay==1?'奶款结算':''}} {{scope.row.itemSpecialMnpInstal.instalFullPay==1?'线上全额支付':''}} {{scope.row.itemSpecialMnpInstal.instalOfflinePay==1?'线下支付':''}}</span>
                  </p>
                  <el-table v-if="scope.row.itemSkuMnpInstal && scope.row.itemSpecialMnpInstal.itemSpecialMnpInstalDetailList.length>0" :data="scope.row.itemSpecialMnpInstal.itemSpecialMnpInstalDetailList" style="width: 100%" size="mini" border>
                    <el-table-column label="期数">
                        <template #default="scope">{{scope.row.periods}}</template>
                    </el-table-column>
                    <el-table-column prop="name" label="分期类型">
                        <template #default="scope">{{instalType(scope.row.instalType)}}</template>
                    </el-table-column>
                    <el-table-column prop="name" label="利率（年）" width="100">
                        <template #default="scope">{{scope.row.annualInterestRate}}</template>
                    </el-table-column>
                    <el-table-column prop="name" label="还款类型">
                        <template #default="scope">{{InstallmentType(scope.row.repayType)}}</template>
                    </el-table-column>
                  </el-table>
                </div>
              </template>
            </Poptip>
          </template>
        </el-table-column>
        <el-table-column label="奶款担保" width="120">
          <template #default="scope">
            <div v-if="scope.row.accountPeriod == 0">不支持</div>
            <Tooltip placement="top" transfer :max-width="300" theme="light" v-else>
              <Button size="small">查看奶款担保</Button>   
              <template #content>    
                <div>
                  <p style="line-height:20px;font-size:14px">奶款担保类型：<span style="color:red">{{accountPeriod(scope.row.accountPeriod)}}</span></p>
                  <el-table v-if="scope.row.rateList.length" :data="scope.row.rateList" style="width: 100%" size="mini" border>
                    <el-table-column label="奶款担保天数" align="center">
                        <template #default="scope">{{scope.row.accountPeriodDays}}</template>
                    </el-table-column>
                    <el-table-column prop="name" label="奶款担保年利率（%）" width="120">
                        <template #default="scope">{{scope.row.interestRate}}</template>
                    </el-table-column>
                  </el-table>    
                </div>
              </template>   
            </Tooltip>    
          </template>
        </el-table-column>
        <el-table-column label="融资支付" width="100">
          <template #default="scope">
            <div v-if="scope.row.fincpay == 0 && scope.row.niuxinPay == 0 && scope.row.silagePay == 0">不支持</div>
            <Tooltip placement="top" transfer :max-width="450" theme="light" v-else>
              <Button size="small">查看融资</Button>
              <template #content>
                <div>
                  <p style="line-height:20px;font-size:14px">是否支持牛奶花融资：<span style="color:red">{{scope.row.fincpay == 1?'支持':'不支持'}}</span></p>
                  <div style="line-height:20px;font-size:14px" v-if="scope.row.fincpayDays && scope.row.fincpayDays.length">
                    <span>牛奶花融资期限天数：</span> 
                    <span v-for="(item,iindex) in scope.row.fincpayDays" :key="iindex">{{item}}<span v-if="iindex != scope.row.fincpayDays.length-1 ">、</span></span> 
                  </div>
                  <div style="margin:1em 0; border-bottom:1px solid #eee;"></div>
                  <p style="line-height:20px;font-size:14px">是否支持牛信融资：<span style="color:red">{{scope.row.niuxinPay == 1?'支持':'不支持'}}</span></p>
                  <div style="line-height:20px;font-size:14px" v-if="scope.row.niuxinPayDays && scope.row.niuxinPayDays.length">
                    <span>牛信融资期限天数：</span> 
                    <span v-for="(item,iindex) in scope.row.niuxinPayDays" :key="iindex">{{item}}<span v-if="iindex != scope.row.niuxinPayDays.length-1">、</span></span> 
                  </div>
                  <div style="margin:1em 0; border-bottom:1px solid #eee;"></div>
                  <p style="line-height:20px;font-size:14px">是否支持青贮贷支付：<span style="color:red">{{scope.row.silagePay == 1?'支持':'不支持'}}</span></p>
                </div>
              </template>
            </Tooltip>
          </template>
        </el-table-column>
        <el-table-column label="可否配送">
          <template #default="scope">
            <el-tag :type="scope.row.isDeliver?'success':'danger'">{{scope.row.isDeliver?'已支持':'不支持'}}</el-tag>
          </template>
        </el-table-column>
        <el-table-column label="可否自提">
          <template #default="scope">
            <el-tag :type="scope.row.isPickUp?'success':'danger'">{{scope.row.isPickUp?'已支持':'不支持'}}</el-tag>
          </template>
        </el-table-column>
        <el-table-column label="牧场名称" width="100">
          <template #default="scope">
          <Tooltip placement="top" transfer :max-width="500" theme="light">
            <Button size="small">查看牧场</Button>    
            <template #content>    
              <div>
                <el-table v-if="scope.row.farmhouseInfo.length>0" :data="scope.row.farmhouseInfo" style="width: 350px;max-height:300px;overflow:auto" size="mini" border>
                  <el-table-column label="奶源部">
                      <template #default="scope">{{scope.row.departName}}</template>
                  </el-table-column>
                  <el-table-column label="牧场名称">
                      <template #default="scope">{{scope.row.orgName}}</template>
                  </el-table-column>
                </el-table>    
              </div>
            </template>  
          </Tooltip>    
        </template>
        </el-table-column>
        <el-table-column prop="remarks" label="备注">
        </el-table-column>
      </el-table>
    </Modal>

    <!-- 查看，修改佣金 -->
    <Modal width="30%" v-model="promotModel" title="查看佣金">
      <Form ref="promot" :label-width="120" :model="promotForm">
        <FormItem label="佣金(每单位)">
          <Input v-model="promotForm.promoteValue" :disabled='true' style="width:90%;"></Input><span>元</span>
        </FormItem>
      </Form>
      <template #footer>
        <Button size="large" @click="promotModel=false">关闭</Button>
      </template>
    </Modal>

    <!-- 批量下架填写原因 -->
    <Modal v-model="refuseModelOne" title="填写拒绝原因" ok-text="提交" @on-ok="refuseBranchApply()">
      <Form ref="refuseItemRef" :model="refuseForm" :label-width="80" >
        <FormItem label="拒绝原因:" prop="reason">
          <Input v-model="refuseForm.reason" placeholder="填写拒绝原因"></Input>
        </FormItem>
      </Form>
    </Modal>
  </div>
</template>

<script>
import { defineComponent, onMounted, ref ,computed,getCurrentInstance,nextTick, } from 'vue'
import {item,shop} from '@/request/api'
import { Message,Modal } from 'view-ui-plus'
import { ElLoading } from 'element-plus'
import { useRoute } from 'vue-router';
import moment from 'moment'
import { itemStatus,instalType,InstallmentType,toPercent} from '@/utils/system/filters'

export default defineComponent({
  components:{
    
  },
  setup() {
    const {proxy} = getCurrentInstance();

    const token = localStorage.aynUserToken
    const route = useRoute()

    let accountPeriod = computed(()=>{
      return function(row){
        if(row === 1 ){
          return '支持奶款担保'
        }else if(row === 2){
          return '账期逾期转代扣'
        }else{
          return '不支持奶款担保'
        }
      }
    })

    let showThisMarket = computed(()=>{
      return function(list,code){
        const arr = list.filter((item)=>{
          return item.typeCode == code
        })
        if(arr.length > 0){
          return true
        }else{
          return false
        }
      }
    })

    const validatePrice = (rule, value, callback) => {
      let priceReg = /^\d+(\.\d{0,2})?$/;
      if (!priceReg.test(value)) {
        callback(new Error('请输入整数或小数价格（小数最多俩位）'));
      } else {
        callback();
      }
    };
    let mohuloading = ref(false)//模糊搜索加载
    let loadingButton = ref(false)
    let pageName = ref('')
    let shopList = ref([]) //供应商列表
    let itemList = ref([])
    let totalNum = ref(0)                     //商品数据
    let dataloading = ref(false)   //是否在加载中
    let refuseModel = ref(false)
    let offModel = ref(false)
    let current =ref(1)     //当前页码
    let searchFilter =ref({
        status: '3',    
        shopId: '',      
        itemName:'',        
        offset: 0,
        limit:10,
        classifyOne:'',
        typeCode:''
    })
    let modalLoading = ref(true)
    let offItemForm =ref({
      reason: '',
      id:''
    })
    let refuseItemForm = ref({
      reason: '',
      id:''
    })
    let curRowData = ref({})  //当前行数据
    let setAYNpriceModel = ref(false) //爱养牛合同价
    let AYNSumPrice = ref({
      price:null, //爱养牛合同价
    }) 
    let AYNSumPriceRef = ref()
    let ruleAYNSumPrice = {
      price: [{validator: validatePrice}],
    }
    let transFrightModel = ref(false)//查看运费模态框
    let transModelData = ref({}) //运费模板数据
    let tableData = ref([])              //特殊价格数据
    let specialModal = ref(false)         //显示特殊价格的弹框
    let filterProList = ref([])
    let typeCodeList = [
      {label:'集采市场',id:1},
      {label:'统采市场',id:2},
      {label:'代采市场',id:7},
      {label:'牛客市场',id:8},
    ]
    let promotModel = ref(false)
    let promotForm = ref({promoteValue:''})
    let skuId = ref('')
    const getRowKeys=(row)=> {
      return row.id;
    }
    let skuIds = ref([])
    let refuseModelOne = ref(false)
    let refuseForm = ref({reason: '',})
    let refuseItemRef = ref()

    /*=====搜索商品功能=====*/
    function searchItem(){
      getData()
    }

    function viewItem(id){
      // $open('shop/index.html#/item','itemId='+scope.row.id)
      let env = process.env.NODE_ENV
      if (env === 'development') {
        window.open('http://test.aiyangniu.net/dist/views/shop/index.html#/item?itemId='+id)
      }
      if(env === 'testing'){
        window.open('http://test.aiyangniu.net/dist/views/shop/index.html#/item?itemId='+id)
      }
      if(env === 'production'){
        window.open('https://shop.aiyangniu.cn/dist/views/shop/index.html#/item?itemId='+id)
      }
    }

    // 模糊搜索供应商
    async function remoteMethod(query){
       if (query !== '') {
        mohuloading.value = true;
        await shop.GetShopList({name:query}).then((res)=>{
          if(res.code == 101){
            mohuloading.value = false;
            shopList.value = res.data
          }else{
            mohuloading.value = false;
            shopList.value = []
          }
        })
      } else {
        shopList.value = [];
      }
    }

    //获取商品数据
    async function getData(){
      itemList.value = []
      dataloading.value = true;
      // searchFilter.value.status = pageName.value//判断页面所需sku的状态
      await item.GetManagerItemList({
        ...searchFilter.value
      }).then(res =>{
        if (res.code==101) {
            itemList.value = res.data || []
            totalNum.value = res.total || 0
        }else{
        	Message.error(res.message)
        }
      })
      dataloading.value = false;
    }

    //更改页码
    function changePage (page) {
      let itemlist = itemList.value
      if(itemlist.limit){
        searchFilter.value.offset = (page -1) *  itemlist.limit  //更新偏移量
        current.value = page  //切换当前页码
        getData()       //获取商品数据
      }
      searchFilter.value.offset = (page - 1) * searchFilter.value.limit
      getData()
    }

    async function auditItem(id) {
      loadingButton.value=true
      let res = await item.AuditItem({ status:3, id: id })
      loadingButton.value=false
      if (res.code == 101) {
      	Message.success('通过成功')
      	for(let i=0;i<itemList.value.length;i++){                        
          for(let j=0;j<itemList.value[i].itemSkus.length;j++){
            if(id == itemList.value[i].itemSkus[j].id){
              itemList.value[i].itemSkus.splice(j,1)
              if(itemList.value[i].itemSkus.length === 0){
                  itemList.value.splice(i,1)
              }
            }
          }
        }
      } else {
        Message.error('通过失败')
      }
    }

    function refuseItem(id) {
      refuseItemForm.value.id = id
      refuseModel.value = true
    }

    async function refuseApply() {
      const loadingObj = ElLoading.service({
        lock: true,
        text: '提交中...',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.7)',
      });
      let res = await item.AuditItem({ reason: refuseItemForm.value.reason,status:5, id: refuseItemForm.value.id })
      if (res.code == 101) {
        loadingObj.close()
      	Message.success('拒绝成功')
      	for(let i=0;i<itemList.value.length;i++){                        
          for(let j=0;j<itemList.value[i].itemSkus.length;j++){
            if(refuseItemForm.value.id == itemList.value[i].itemSkus[j].id){
              itemList.value[i].itemSkus.splice(j,1)
              if(itemList.value[i].itemSkus.length === 0){
                  itemList.value.splice(i,1)
              }
            }
          }
        }
      	refuseModel.value=false
      } else {
        loadingObj.close()
        Message.error('拒绝失败')
      	refuseModel.value=false
      }
    }

    function offItem(id){
      offItemForm.value.reason = ''
    	offItemForm.value.id = id
    	offModel.value = true
    }

    async function offApply() {
      const loadingObj = ElLoading.service({
        lock: true,
        text: '提交中...',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.7)',
      });
      
      await item.OffItem({ reason: offItemForm.value.reason, id: offItemForm.value.id }).then(res => {
        if (res.code == '101') {
          loadingObj.close()
          Message.success(res.message || "下架成功")
          for(let i=0;i<itemList.value.length;i++){                        
            for(let j=0;j<itemList.value[i].itemSkus.length;j++){
              if(refuseItemForm.value.id == itemList.value[i].itemSkus[j].id){
                itemList.value[i].itemSkus.splice(j,1)
                if(itemList.value[i].itemSkus.length === 0){
                    itemList.value.splice(i,1)
                }
              }
            }
          }     
          offModel.value = false
          getData()
        } else {
          loadingObj.close()
          Message(res.message || "下架失败")
          offModel.value = false
        }
      })
    }

    // 这是爱养牛合同价
    function setAYNSumPrice(row,status){
      if(status === 1){
        console.log('设置')
        setAYNpriceModel.value = true
        curRowData.value = row
      }else if( status === 2){
        console.log("修改")
        AYNSumPrice.value.price = row.settlementPrice
        curRowData.value = row
        setAYNpriceModel.value = true
      }
    }

    // 确定设置爱养牛牛结算价格
    function confirmSet () {
      AYNSumPriceRef.value.validate(async (valid) => {
        if (valid) {
          await item.setAYNSumPrice({skuId:curRowData.value.id,settlementPrice:AYNSumPrice.value.price}).then(res=>{
            if(res.code == 101){
              Message.success(res.message || '价格设置成功')
              setAYNpriceModel.value = false
              getData() //获取商品数据
            }else{
              Message.error(res.message || '价格设置失败')
            }
          })
        } else {
          Message.error('请输入正确的价格');
        }
      })
    }

    // 删除爱养牛合同价格
    function delAYNSumPrice(row){
      Modal.confirm({
        title: '温馨提示',
        content: '<p>您确定删除当前设置价格吗？</p>',
        onOk:async () => {
          await item.setAYNSumPrice({skuId:row.id,settlementPrice:null}).then(res=>{
            if(res.code == 101){
              Message.success(res.message || '删除成功')
              setAYNpriceModel.value = false
              getData() //获取商品数据
            }else{
              Message.error(res.message || '删除失败')
            }
          })
        }
      });
    }

    // 查看运费操作
    function checkTransportFright(transData){
      transModelData.value = {}
      transData.freightTemplateAreafreightList.forEach(list=>{
        if(typeof(list.shippingAddress) == 'string'){
          list.shippingAddress=JSON.parse(list.shippingAddress)
        }
      })
      transData.freightTemplateConditionalmailList.forEach(list=>{
        if(typeof(list.address) == 'string'){
          list.address = JSON.parse(list.address)
        }
      })
      transModelData.value = transData
      transFrightModel.value = true
    }
    
    //查看特殊价格 按钮
    async function checkSpecialPrice(row){
      console.log('这条skuid是',row.id);
      let res= await item.getSpecialList({
        skuId:row.id
      })
      if(res.code === 101){
        console.log('特殊价格数据',res);
        tableData.value=res.data
        specialModal.value=true
      }else{
        Message.error(res.message)
      }
    }

    //查询商品一级分类
    async function GetOneClassifysList(){
      let res = await item.GetClassifysList({
        parentId:0
      })
      res.data.forEach((item)=>{
        filterProList.value.push({
          value:item.name,
          label:item.name,
          id:item.id
        })
      })
    }

    //查看佣金
    function lookPromote(skuId){
      titlePromot.value = '查看佣金'
      getPromote(skuId)
    }

    //获取佣金
    async function getPromote(skuId){
      await item.getPromoteValue({skuId:skuId}).then(res=>{
        if(res.code == 101){
          promotForm.value.promoteValue = res.data.promoteValue
          promotModel.value = true
        }else{
          Message.error(res.message)
        }
      })
    }

    // 行展开状态改变时
    function expandChange(row, expandedRows){
      if(expandedRows.indexOf(row) < 0){
        row.isOpen = false
      }else{
        row.isOpen = true
      }
      updateCheck()  // 更新复选框
    }

    //全选
    function selectAllF(selection){
      let selected = selection.length !== 0  // true全选中，false全取消
      skuIds.value = []
      selection.map(item => {
        let refNameJs = 'onSaleItemTableListJs' + item.id
        let refNameTs = 'onSaleItemTableListTs' + item.id
        let refNameDs = 'onSaleItemTableListDs' + item.id
        let refNameNk = 'onSaleItemTableListNk' + item.id
        let refNameYx = 'onSaleItemTableListYx' + item.id
        let refNameJf = 'onSaleItemTableListJf' + item.id
        item.itemSkus.map(sku => {
          selected ? skuIds.value.push(sku.id) : skuIds.value = []
          nextTick(() => { // 复选框控制
            if(sku.typeCode === '1' && proxy.$refs[refNameJs]){
              selected ? proxy.$refs[refNameJs].toggleRowSelection(sku) : proxy.$refs[refNameJs].toggleRowSelection(sku, false)
            }
            if(sku.typeCode === '2' && proxy.$refs[refNameTs]){
              selected ? proxy.$refs[refNameTs].toggleRowSelection(sku) : proxy.$refs[refNameTs].toggleRowSelection(sku, false)
            }
            if(sku.typeCode === '7' && proxy.$refs[refNameDs]){
              selected ? proxy.$refs[refNameDs].toggleRowSelection(sku) : proxy.$refs[refNameDs].toggleRowSelection(sku, false)
            }
            if(sku.typeCode === '8' && proxy.$refs[refNameNk]){
              selected ? proxy.$refs[refNameNk].toggleRowSelection(sku) : proxy.$refs[refNameNk].toggleRowSelection(sku, false)
            }
            if(sku.typeCode === '3' && proxy.$refs[refNameYx]){
              selected ? proxy.$refs[refNameYx].toggleRowSelection(sku) : proxy.$refs[refNameYx].toggleRowSelection(sku, false)
            }
            if(sku.typeCode === '5' && proxy.$refs[refNameJf]){
              selected ? proxy.$refs[refNameJf].toggleRowSelection(sku) : proxy.$refs[refNameJf].toggleRowSelection(sku, false)
            }
          })
        })
      })
      console.log(skuIds.value,'skuIds.value')
    }

    function selectF(selection, row){
      console.log(selection,row,'单选')
      let selected = selection.length && selection.indexOf(row) !== -1
      // 获取skuId
      if(selected){    // 当前行选中态
        for(let i = 0; i < row.itemSkus.length; i++){
          if(skuIds.value.indexOf(row.itemSkus[i].id) == -1){
            skuIds.value.push(row.itemSkus[i].id)
          }
        }
      }else{    // 当前行取消态
        for(let i = 0; i < row.itemSkus.length; i++){
          if(skuIds.value.indexOf(row.itemSkus[i].id) !== -1){
            skuIds.value.splice(skuIds.value.indexOf(row.itemSkus[i].id), 1)
          }
        }
      }
      updateCheck()  // 更新复选框
    }

    function updateCheck(){
      itemList.value.map((item, index) => {
        let refNameJs = 'onSaleItemTableListJs' + item.id
        let refNameTs = 'onSaleItemTableListTs' + item.id
        let refNameDs = 'onSaleItemTableListDs' + item.id
        let refNameNk = 'onSaleItemTableListNk' + item.id
        let refNameYx = 'onSaleItemTableListYx' + item.id
        let refNameJf = 'onSaleItemTableListJf' + item.id
        nextTick(() => { // 复选框控制
          if(proxy.$refs.onSaleItemTableList.store.states.selection.value.indexOf(item) > -1){  // 父级选中
            console.log('选中了')
            if(proxy.$refs[refNameJs]){
              proxy.$refs[refNameJs].clearSelection()
            }
            if(proxy.$refs[refNameTs]){
              proxy.$refs[refNameTs].clearSelection()
            }
            if(proxy.$refs[refNameDs]){
              proxy.$refs[refNameDs].clearSelection()
            }
            if(proxy.$refs[refNameNk]){
              proxy.$refs[refNameNk].clearSelection()
            }
            if(proxy.$refs[refNameYx]){
              proxy.$refs[refNameYx].clearSelection()
            }
            if(proxy.$refs[refNameJf]){
              proxy.$refs[refNameJf].clearSelection()
            }
            if(skuIds.value.length>0){
              item.itemSkus.map(sku => {
                if(skuIds.value.indexOf(sku.id) !== -1){
                  if(sku.typeCode === '1' && proxy.$refs[refNameJs]){
                    proxy.$refs[refNameJs].toggleRowSelection(sku)
                  }
                  if(sku.typeCode === '2' && proxy.$refs[refNameTs]){
                    proxy.$refs[refNameTs].toggleRowSelection(sku)
                  }
                  if(sku.typeCode === '7' && proxy.$refs[refNameDs]){
                    proxy.$refs[refNameDs].toggleRowSelection(sku)
                  }
                  if(sku.typeCode === '8' && proxy.$refs[refNameNk]){
                    proxy.$refs[refNameNk].toggleRowSelection(sku)
                  }
                  if(sku.typeCode === '3' && proxy.$refs[refNameYx]){
                    proxy.$refs[refNameYx].toggleRowSelection(sku)
                  }
                  if(sku.typeCode === '5' && proxy.$refs[refNameJf]){
                    proxy.$refs[refNameJf].toggleRowSelection(sku)
                  }
                }
              })
            }else{
              console.log('zheli')
              item.itemSkus.map(sku => {
                if(sku.typeCode === '1' && proxy.$refs[refNameJs]){
                  proxy.$refs[refNameJs].toggleRowSelection(sku)
                }
                if(sku.typeCode === '2' && proxy.$refs[refNameTs]){
                  proxy.$refs[refNameTs].toggleRowSelection(sku)
                }
                if(sku.typeCode === '7' && proxy.$refs[refNameDs]){
                  proxy.$refs[refNameDs].toggleRowSelection(sku)
                }
                if(sku.typeCode === '8' && proxy.$refs[refNameNk]){
                  proxy.$refs[refNameNk].toggleRowSelection(sku)
                }
                if(sku.typeCode === '3' && proxy.$refs[refNameYx]){
                  proxy.$refs[refNameYx].toggleRowSelection(sku)
                }
                if(sku.typeCode === '5' && proxy.$refs[refNameJf]){
                  proxy.$refs[refNameJf].toggleRowSelection(sku)
                }
              })
            }
          }else{
            if(proxy.$refs[refNameJs]){
              proxy.$refs[refNameJs].clearSelection()
            }
            if(proxy.$refs[refNameTs]){
              proxy.$refs[refNameTs].clearSelection()
            }
            if(proxy.$refs[refNameDs]){
              proxy.$refs[refNameDs].clearSelection()
            }
            if(proxy.$refs[refNameNk]){
              proxy.$refs[refNameNk].clearSelection()
            }
            if(proxy.$refs[refNameYx]){
              proxy.$refs[refNameYx].clearSelection()
            }
            if(proxy.$refs[refNameJf]){
              proxy.$refs[refNameJf].clearSelection()
            }
          }
        })
      })
    }

    function selectAllJs(selection){
      let selected = selection.length !== 0  // true全选中，false全取消
      console.log(selected,'selected',selection)
      if(selected){
        selection.map(sku => {
          let refNameJs = 'onSaleItemTableListJs' + sku.id
          let refNameTs = 'onSaleItemTableListTs' + sku.id
          let refNameDs = 'onSaleItemTableListDs' + sku.id
          let refNameNk = 'onSaleItemTableListNk' + sku.id
          let refNameYx = 'onSaleItemTableListYx' + sku.id
          let refNameJf = 'onSaleItemTableListJf' + sku.id
          selected ? skuIds.value.push(sku.id) : skuIds.value = []
          nextTick(() => { // 复选框控制
            if(sku.typeCode === '1' && proxy.$refs[refNameJs]){
              selected ? proxy.$refs[refNameJs].toggleRowSelection(sku) : proxy.$refs[refNameJs].toggleRowSelection(sku, false)
            }
            if(sku.typeCode === '2' && proxy.$refs[refNameTs]){
              selected ? proxy.$refs[refNameTs].toggleRowSelection(sku) : proxy.$refs[refNameTs].toggleRowSelection(sku, false)
            }
            if(sku.typeCode === '7' && proxy.$refs[refNameDs]){
              selected ? proxy.$refs[refNameDs].toggleRowSelection(sku) : proxy.$refs[refNameDs].toggleRowSelection(sku, false)
            }
            if(sku.typeCode === '8' && proxy.$refs[refNameNk]){
              selected ? proxy.$refs[refNameNk].toggleRowSelection(sku) : proxy.$refs[refNameNk].toggleRowSelection(sku, false)
            }
            if(sku.typeCode === '3' && proxy.$refs[refNameYx]){
              selected ? proxy.$refs[refNameYx].toggleRowSelection(sku) : proxy.$refs[refNameYx].toggleRowSelection(sku, false)
            }
            if(sku.typeCode === '5' && proxy.$refs[refNameJf]){
              selected ? proxy.$refs[refNameJf].toggleRowSelection(sku) : proxy.$refs[refNameJf].toggleRowSelection(sku, false)
            }
          })
        })
      }else{
        updateCheck()
      }
      console.log(selection,'selection')
    }

    function selectJs(selection, row){
      let selected = selection.length && selection.indexOf(row) !== -1
      console.log(selected,row)
      if(selected == false){
        skuIds.value.splice(skuIds.value.indexOf(row.id), 1)
        if(row.typeCode == '1'){
          let refNameJs = 'onSaleItemTableListJs' + row.spuId
          proxy.$refs[refNameJs].toggleRowSelection(row, false)
        }
        if(row.typeCode == '2'){
          let refNameTs = 'onSaleItemTableListTs' + row.spuId
          proxy.$refs[refNameTs].toggleRowSelection(row, false)
        }
        if(row.typeCode == '7'){
          let refNameDs = 'onSaleItemTableListDs' + row.spuId
          proxy.$refs[refNameDs].toggleRowSelection(row, false)
        }
        if(row.typeCode == '8'){
          let refNameNk = 'onSaleItemTableListNk' + row.spuId
          proxy.$refs[refNameNk].toggleRowSelection(row, false)
        }
        if(row.typeCode == '3'){
          let refNameYx = 'onSaleItemTableListYx' + row.spuId
          proxy.$refs[refNameYx].toggleRowSelection(row, false)
        }
        if(row.typeCode == '5'){
          let refNameJf = 'onSaleItemTableListJf' + row.spuId
          proxy.$refs[refNameJf].toggleRowSelection(row, false)
        }
      }else{
        if(skuIds.value.indexOf(row.id) == -1){ //数组里不包括这一项
          skuIds.value.push(row.id)
          if(row.typeCode == '1'){
            let refNameJs = 'onSaleItemTableListJs' + row.spuId
            proxy.$refs[refNameJs].toggleRowSelection(row, true)
          }
          if(row.typeCode == '2'){
            let refNameTs = 'onSaleItemTableListTs' + row.spuId
            proxy.$refs[refNameTs].toggleRowSelection(row, true)
          }
          if(row.typeCode == '7'){
            let refNameDs = 'onSaleItemTableListDs' + row.spuId
            proxy.$refs[refNameDs].toggleRowSelection(row, true)
          }
          if(row.typeCode == '8'){
            let refNameNk = 'onSaleItemTableListNk' + row.spuId
            proxy.$refs[refNameNk].toggleRowSelection(row, true)
          }
          if(row.typeCode == '3'){
            let refNameYx = 'onSaleItemTableListYx' + row.spuId
            proxy.$refs[refNameYx].toggleRowSelection(row, true)
          }
          if(row.typeCode == '5'){
            let refNameJf = 'onSaleItemTableListJf' + row.spuId
            proxy.$refs[refNameJf].toggleRowSelection(row, true)
          }
        }
      }
      console.log(skuIds.value,'更改后的值')
    }

    //批量下架
    function branchOff(){
      refuseForm.value.reason = ''
      refuseModelOne.value = true
    }

    async function refuseBranchApply(){
       await item.refuseBatch({
        skuIds:skuIds.value.join(','),
        reason:refuseForm.value.reason,
      }).then(res=>{
        if(res.code == 101){
          Message.success(res.message || '审核成功!');
          skuIds.value = []
          proxy.$refs.onSaleItemTableList.clearSelection()
          refuseModelOne.value = false
          getData()
        }else{
          Message.error( res.message || '审核失败！');
          skuIds.value = []
          proxy.$refs.onSaleItemTableList.clearSelection()
          refuseModelOne.value = false
        }
      })
    }

    //批量加入砍价
    async function branchBargain(){
      console.log(skuIds.value,'skuIds.value')
      Modal.confirm({ //打开拒绝询问弹出层
        title: '提示',
        content: '确认加入砍价吗？',
        onOk: async () => {
          let res = await item.toDisCount({skuIds:skuIds.value.join(',')})
          if(res.code===101){
            Message.success(res.message)
            getData() //获取商品数据
          }
        }
      })
    }

    function filters(item,val){
      const arr = item.filter((e)=>{
        if(e.typeCode == val){
          return e
        }
      })
      return arr
    }
    
    // 格式化日期
    function formatData(date) {
      return moment(date).format("YYYY-MM-DD hh:mm:ss");
    }

    
    onMounted(()=>{
      pageName.value = route.meta.nameEN
      console.log(route)
      getData() //获取商品数据
      GetOneClassifysList()
    })

    return {
      mohuloading,loadingButton,pageName,shopList,itemList,totalNum,dataloading,refuseModel,offModel,current,searchFilter,
      modalLoading,offItemForm,refuseItemForm,curRowData,setAYNpriceModel,AYNSumPrice,ruleAYNSumPrice,transFrightModel,transModelData,tableData,specialModal,filterProList,typeCodeList,promotModel,promotForm,skuId,getRowKeys,skuIds,skuIds,refuseModelOne,refuseForm,refuseItemRef,showThisMarket,accountPeriod,itemStatus,InstallmentType,instalType,
      viewItem,remoteMethod,getData,changePage,auditItem,refuseItem,refuseApply,offItem,offApply,setAYNSumPrice,toPercent,confirmSet,delAYNSumPrice,checkTransportFright,checkSpecialPrice,GetOneClassifysList,lookPromote,getPromote,expandChange,selectAllF,selectF,updateCheck,selectJs,branchOff,refuseBranchApply,branchBargain,formatData,filters,selectAllJs,searchItem
    }
  },
})
</script>

<style lang="scss" scoped>
.itemList{
  padding: 1em;
  background-color: #fff;
  .el-table{
    width: 100%;
    font-size: 12px;
  }
  .ivu-modal-mask{
    background-color: rgba(55, 55, 55, 0.1);
  }
  .track-rcol{
   border: 1px solid #eee;
 }
 .deliverNum{
    color: red;
    text-align: center;
    padding-top: 20px;
 }
  .track-list{
    margin: 20px;
   padding-left: 5px;
   position: relative;
 }
  .track-list li{
    position: relative;
   padding: 9px 0 0 25px;
   line-height: 18px;
   border-left: 1px solid #d9d9d9;
   color: #999;
 }
  .track-list li.first{
    color: red;
   padding-top: 0;
   border-left-color: #fff;
 }
  .track-list li .node-icon{
    position: absolute;
   left: -6px;
   top: 50%;
   width: 11px;
   height: 11px;
   background: url(../../../assets/images/order-icons.png)  -21px -72px no-repeat;
 }
  .track-list li.first .node-icon{
    background-position:0 -72px;
  }
  .track-list li .time{
    margin-right: 20px;
   position: relative;
   top: 4px;
   display: inline-block;
   vertical-align: middle;
 }
  .track-list li .txt{
    max-width: 600px;
   position: relative;
   top: 4px;
   display: inline-block;
   vertical-align: middle;
 }
  .track-list li.first .time{
    margin-right: 20px;
   }
  .track-list li.first .txt{
    max-width: 600px;
   }
  .content{
    margin-top: 3em;
    color: #000;
    .updatetime{
      font-size: 14px;
      color:#666;
    }
  }

}
</style>
<style lang="scss">
  .ivu-input{
    color: #000 !important;
  }
  .head-style{
      background-color: #e8f2ff;
      border: 1px solid #999;
      padding: 0.8em 0;
    }
  .tab-style{
    width: 100%;
    border-collapse: collapse;
  }
  .tab-style>tr>td{
    border: 1px solid #999;
    padding: 0.2em 0.2em;
    font-size: 13px;
  }
</style>