<div>
  <gsb-card3 :title="title" ref="card">
          <!-- <div  slot="extra"><el-button type="default"  @click="gotmlist"><i class="tool-order" style="margin-right:3px;color:orange"/>进度列表</el-button></div> -->
          <div>
            <gsb-grid2 ref="grid"
              :bizCode="bizCode"
              spaceHeight="300"
              modelName="order"
              listMethod="findAndCountAll"
              deleteMethod="delete"
              initMethod="initNewInstance"
              isDataAuto="true"
              @toolbarclick="toolbarclick"
              @onDlgFormClick="onDlgFormClick"
              @rowclick="rowClick"
              :headStyle="headStyle"
              focuskey="neworder"
              :colFormatter="onColFormater">
              <div slot="other" slot-scope="scope">
                <el-row>
                  <el-col :span="5">
                    <div>创建时间:{{new Date(scope.row.created_at).toLocaleString()}}</div>
                    <div>订单号:{{scope.row.orderNum}}</div>
                    <div>订单来源:{{scope.row.orderSourceTypeName}}</div>
                    <div>申请人:{{scope.row.applyName}}</div>
                    <div>客户名称:{{scope.row.customerContact}}</div>
                    <div>客户电话:{{scope.row.customerMobile}}</div>
                  </el-col>
                  <el-col :span="5">
                    <div>产品名称:{{scope.row.itemName}}</div>
                    <div>产品数量:{{scope.row.itemOrderNum}}</div>
                  </el-col>
                  <el-col :span="5">
                    <div>官费:{{scope.row.totalPublicExpense}}</div>
                    <div>服务费:{{scope.row.totalServiceCharge}}</div>
                    <div>税费:{{scope.row.totalInvoiceTaxes}}</div>
                    <div>平台使用费:{{scope.row.totalPlatformCost}}</div>
                    <div>总额:{{scope.row.totalSum}}</div>
                  </el-col>
                  <el-col :span="5">

                    <div v-if="scope.row.orderSourceType==1">我的利润:{{scope.row.userProfit}}</div>
                    <div v-else>我的利润:{{scope.row.shopkeeperProfit}}</div>
                    <div>平台利润:{{scope.row.platformProfit}}</div>
                  </el-col>
                  <el-col :span="4">
                    <div>拍照或截图发给客户付款二维码</div>
                    <div><img style="width:100px" :src="getqr(scope.row.orderNum)"/></div>
                  </el-col>
                </el-row>
              </div>
              <div slot="top" style="text-align:left" >
                <div>
                  <gsb-step :psteps="steps" :step="step">
                 </gsb-step></br>
                </div>
                <div>
                  <div  style="text-align:left">
                    <br/>
                    <el-alert
                      title="商标注册申请递交后，在审查阶段存在被商标审查机构驳回的可能，且驳回后不予退费，请知悉。"
                      type="warning"
                      close-text="我了解了">
                    </el-alert>
                  </div>
                  <div v-if="step==1">
                    <el-form ref="applier"  :rules="applierRules" :model="form.applier" class="demo-ruleForm" label-width="80px">
                    <div>
                      <h4>申请人信息</h4>
                      <div style="clear:both;"></div>
                      <div>
                            <el-form-item label-width="140px" label="申请人类型" style="width:450px;float:left;padding-right:50px;" prop="type" >
                              <gsb-select v-model="form.applier.type" dicKey="tm_apply_type" labelField="label" valueField="value"></gsb-select>
                            </el-form-item>
                            <el-form-item label-width="140px" label="公司/申请人名称" style="width:450px;float:left;padding-right:50px;" prop="applyName" >
                              <gsb-select @change="applierChange" size="medium" v-model="form.applier.applyName" refMethod="getCompanyInfoByLikeName" autoComplete="true" isFilter="true"  refModel="calculateprice"  labelField="entName" valueField="entName" style="position:relative;width:100%;" placeHolder="申请人" ></gsb-select>
                            </el-form-item>
                            <el-form-item v-if="form.applier.type!=\'person\'" label-width="140px" label="信用代码" style="width:450px;float:left;padding-right:50px;" prop="creditCode">
                              <el-input v-model="form.applier.creditCode"></el-input>
                            </el-form-item>
                            <el-form-item v-if="form.applier.type==\'person\'" label-width="140px" label="身份证号码" style="width:450px;float:left;padding-right:50px;" prop="identityCard">
                              <el-input  v-model="form.applier.identityCard" > </el-input>
                            </el-form-item>
                            <div style="clear:both;"></div>
                            <el-form-item label-width="140px" label="地址" style="width:950px;float:left;padding-right:50px;" prop="applyAddr">
                              <el-input v-model="form.applier.applyAddr"></el-input>
                            </el-form-item>
                            <div style="clear:both;"></div>

                      </div>
                    </div>
                    </el-form>
                    <el-form ref="customer"  :rules="customerRules" :model="form.customer" class="demo-ruleForm" label-width="80px">
                    <div>
                      <h4>商标进度接收人</h4>
                      <div style="clear:both;"></div>
                      <div>

                          <el-form-item label-width="140px" label="姓名" style="width:450px;float:left;padding-right:50px;" prop="customerContact">
                              <el-input v-model="form.customer.customerContact"></el-input>
                          </el-form-item>
                          <el-form-item label-width="140px" label="电话" style="width:450px;float:left;padding-right:50px;" prop="mobile" >
                            <el-input v-model="form.customer.mobile"></el-input>
                          </el-form-item>
                          <el-form-item label-width="140px" label="邮箱" style="width:450px;float:left;padding-right:50px;" >
                            <el-input v-model="form.customer.email"></el-input>
                          </el-form-item>
                          <div style="clear:both;"></div>
                          <el-form-item label-width="140px" label="邮政编码" style="width:450px;float:left;padding-right:50px;" prop="zipCode">
                              <el-input v-model="form.customer.zipCode"></el-input>
                          </el-form-item>
                          <el-form-item label-width="140px" label="传真" style="width:450px;float:left;padding-right:50px;" >
                            <el-input v-model="form.customer.fax"></el-input>
                          </el-form-item>
                          <div style="clear:both;"></div>
                      </div>
                    </div>
                    </el-form>
                    <el-form ref="order"  :model="form.order" label-width="80px">
                    <div>
                      <h4>订单信息</h4>
                      <div style="clear:both;"></div>

                        <div v-if="form.order.fromCalc">
                            <el-form-item label-width="140px" label="订单号" style="width:450px;float:left;padding-right:50px;" >
                              <el-input v-model="form.order.orderNum" :disabled="true" ></el-input>
                            </el-form-item>
                            <el-form-item label-width="140px" label="订单金额" style="width:450px;float:left;padding-right:50px;" >
                              <el-input v-model="form.order.totalSum" :disabled="true"></el-input>
                            </el-form-item>
                            <el-form-item label-width="140px" label="商标产品" style="width:450px;float:left;padding-right:50px;" >
                              <el-input v-model="form.order.itemName" :disabled="true"></el-input>
                            </el-form-item>
                            <el-form-item label-width="140px" label="订单状态" style="width:450px;float:left;padding-right:50px;" >
                                <el-input v-model="form.order.orderStatusName" :disabled="true"></el-input>

                            </el-form-item>

                            <div style="clear:both;"></div>
                        </div>
                        <div v-else>
                            <el-form-item label-width="120px" label="订单号" style="width:450px;float:left;padding-right:50px;" >
                              <el-input v-model="form.order.order_num" :disabled="true" ></el-input>
                            </el-form-item>
                            <el-form-item label-width="120px" label="订单金额" style="width:450px;float:left;padding-right:50px;" >
                              <el-input v-model="form.order.total_sum" :disabled="true"></el-input>
                            </el-form-item>
                            <el-form-item label-width="120px" label="商标产品" style="width:450px;float:left;padding-right:50px;" >
                              <el-input v-model="form.order.product_id" :disabled="true"></el-input>
                            </el-form-item>
                            <el-form-item label-width="120px" label="订单状态" style="width:450px;float:left;padding-right:50px;" >
                              <gsb-select v-model="form.order.orderStatus" dicKey="order_status"  labelField="label" valueField="value"></gsb-select>

                            </el-form-item>

                            <div style="clear:both;"></div>
                        </div>

                    </div>
                    </el-form>
                  </div>
                  <div v-if="step==2">
                    <div>
                      <h4>商标信息</h4>
                      <div>
                        <el-collapse v-model="activeNames">
                          <el-collapse-item v-for="(tm,i) in form.tminfo" :name="i">
                            <div slot="title">
                              <div style="float:left;width:20%"><span style="padding-right:120px;">商标名称：{{tm.tmName}}</span></div>
                              <div style="float:left;width:20%"><span >商标类型：{{tm.tmFormTypeName}}</span></div>
                            </div>
                            <div>
                              <div style="width:8%;float:left">
                                <img name="img" style="border:2px dashed #e9e9e9" :src="tm.picUrl" height="80" width="80"/>
                                <div>商标图样_黑白</div>
                              </div>
                              <div v-if="tm.tmFormType==7 || tm.tmFormType==6" style="width:8%;float:left">
                                <img name="img" style="border:2px dashed #e9e9e9" :src="tm.colorizedPicUrl" height="80" width="80"/>
                                <div>商标图样_彩色</div>
                              </div>
                              <div style="clear:both"></div>
                              <div >
                                <div v-for="(nclone,index) in tm.nclSmallCodes2.ncl" style="text-align: left;padding-left:5px;padding-bottom:5px;">
                                  <span style="font-size:16px"><b>{{nclone.code}} {{nclone.name}}</b></span>
                                  <span style="font-size:16px;float:right"><b>已选择{{nclone.nclThree.length}}项</b>
                                  </span>
                                  <br/>
                                  <span v-for="(nclThree,index2) in nclone.nclThree">
                                    <span>{{nclThree.code}} {{nclThree.name}}&nbsp;&nbsp;&nbsp;</span>
                                  &nbsp;
                                </span>

                                </div>
                              </div>
                            </div>
                          </el-collapse-item>
                        </el-collapse>
                      </div>
                    </div>

                  </div>
                  <div v-if="step==3">
                    <div>

                    <el-form ref="stuff" :rules="applierRules" class="demo-ruleForm"  :model="form.applier" label-width="0">
                      <h4>资料上传<font style="color:#e6a23c;font-size: 10px;">(请竖拍证件照上传)</font></h4>
                      <div>
                        <el-form-item style="float:left;width:18%;text-align:center" label="" prop="businessLicensePic">
                          <img width="120px" height="120px" style="border:2px dashed #e9e9e9" @click="window.open(form.applier.businessLicensePic)"  v-if="form.applier.businessLicensePic" src="http://gsb-zc.oss-cn-beijing.aliyuncs.com/PDF20180904.jpg"/>
                          <img width="120px" height="120px" style="border:2px dashed #e9e9e9" v-else src="http://gsb-zc.oss-cn-beijing.aliyuncs.com/empty2018082212365411225525855.jpg"/>
                          <h4>
                          <gsb-upload flag="yyzz" ref="yyzz" :d="d" @setKey="setKey" :action="action" filetype="image/jpeg" :ifshowlist="false" @uploadsuccess="uploadsuccess" @error="error">
                            <el-button type="primary" >营业执照上传</el-button>
                          </gsb-upload>
                        </el-form-item>
                        <el-form-item style="float:left;width:18%;text-align:center" v-if="form.applier.type==\'person\'" label="" prop="identityCardPic">
                          <img width="120px" height="120px" style="border:2px dashed #e9e9e9" @click="window.open(form.applier.identityCardPic)" v-if="form.applier.identityCardPic" src="http://gsb-zc.oss-cn-beijing.aliyuncs.com/PDF20180904.jpg"/>
                          <img width="120px" height="120px" style="border:2px dashed #e9e9e9" v-else src="http://gsb-zc.oss-cn-beijing.aliyuncs.com/empty2018082212365411225525855.jpg"/>
                          <br/>
                          <gsb-upload flag="sfz" ref="sfz" :d="d" @setKey="setKey" :action="action" filetype="image/jpeg" :ifshowlist="false" @uploadsuccess="uploadsuccess" @error="error">
                            <el-button type="primary" >身份证明上传</el-button>
                          </gsb-upload>
                        </el-form-item>

                        <div style="clear:both;"></div>
                      </div>
                      </el-form>
                      <h4>盖章委托书上传<font style="color:#e6a23c;font-size: 10px;">(请竖拍证件照上传)</font></h4>
                      <div>
                        <div v-for="tm2 in form.tminfo" style="float:left;width:18%;text-align:center">
                          <gsb-upload2 :d="d" @setKey="setKey2" :ref="tm2.id" :flag="tm2.id" :action="action" filetype="image/jpeg" @error="error" :ifshowlist="false" @uploadsuccess="uploadsuccess2" v-model="tm2.sealAuthorizeStuff"></gsb-upload2 >
                          <div v-if="tm2.tmExplain"><h5><font style="color:red">*</font>{{tm2.tmName}}_{{tm2.tmFormTypeName}}_{{tm2.tmExplain}}_委托书上传</h5></div>
                          <div v-else><h5><font style="color:red">*</font>{{tm2.tmName}}_{{tm2.tmFormTypeName}}_委托书上传</h5></div>
                        </div>

                        <div style="clear:both;"></div>
                      </div>

                    </div>
                  </div>

                </div>
                <div style="margin-top: 12px;text-align:center">
                  <el-button style="margin-top: 12px;text-align:center" v-if="step>1" @click="tobefore">上一步</el-button>
                  <el-button style="margin-top: 12px;text-align:center" v-if="step<3" @click="tonext">下一步</el-button>
                  <el-button style="margin-top: 12px;text-align:center" v-if="step==3 && form.order.orderStatus==4" @click="orderSubmit">确定</el-button>

                </div>


              </div>
            </gsb-grid2>
          </div>
          <div>
            <el-dialog title="商标档案" :visible.sync="dialogTableVisible">
              <gsb-dlgreference  :colFormatter="onColFormater" @toolbarclick="calctoolbarclick" bizCode="calculatepricereference" modelName="calculateprice">
              </gsb-dlgreference>
            </el-dialog>
          </div>
          <div>
            <el-dialog title="线下订单付款审核" :visible.sync="approvalDialogFormVisible" width="40%" center>
             <el-form>
               <el-form-item label="是否通过：">
                 <el-switch v-model="approval_status"></el-switch>
               </el-form-item>
               <el-form-item label="审核意见：">
                 <el-input v-model="approval_notes" placeholder="请输入审核意见" style="width:255px;"></el-input>
               </el-form-item>
             </el-form>
             <div slot="footer" class="dialog-footer">
               <el-button @click="approvalDialogFormVisible = false">取 消</el-button>
               <el-button type="primary" @click="approvalSubmit">确 定</el-button>
             </div>
           </el-dialog>
          </div>
          <div>
            <el-dialog title="修改订单状态" :visible.sync="putOrderStatusDialogFormVisible" width="40%" center>
              <el-alert title="提示：状态修改为【已提报】会对用户的利润进行分配，请确认后进行操作" type="error" description="" ref="infoMsg"></el-alert>
              <el-form>
                <el-form-item label="订单状态：" label-width="90px" style="width:410px;margin-top:20px;">
                  <gsb-select v-model="putstatus" dicKey="order_status" labelField="label" valueField="value" style="width:200px;"></gsb-select>
                </el-form-item>
              </el-form>
              <div slot="footer" class="dialog-footer">
                <el-button @click="putOrderStatusDialogFormVisible = false">取 消</el-button>
                <el-button type="primary" @click="changeStatus(selectIds,putstatus)">确 定</el-button>
              </div>
            </el-dialog>
         </div>
  </gsb-card3>
</div>
