<template>
  <view class="page-product-receipt">
    <view class="header" :style="{ backgroundColor: `rgba(250, 53, 52, ${scrollTop / 100})` }">
      <view class="left">
        <u-icon class="icon" name="arrow-left" @click="uni.navigateBack({})" />
      </view>
      <view class="title">历史记录</view>
      <view class="right"></view>
    </view>
    <u-form class="form" ref="form" label-width="180rpx">
      <!-- 订单 -->
      <!-- <u-form-item label="检验节点"> -->
      <jPicker sureColor="#ff0000" :moren="moren" @bindpicker="selectProductlocCode" showKey="label" valKey="value" :val="selectList.value" :options="model.selectList" />
      <!-- <u-input @blur="onblur()" @focus="onfocus" @click="onclick" :border="true" v-model="selectvalue" placeholder="请选择检验节点" style="overflow: hidden" /> -->
      <!-- </u-form-item> -->
    </u-form>
    <u-form class="form" ref="form" label-width="180rpx" style="margin-top: 10px" v-show="selectList.value != 'checkTypeLL'">
      <!-- 订单 -->
      <u-form-item>
        <jPicker sureColor="#ff0000" :moren="moren4" @bindpicker="selectProductlocCode3" showKey="label" valKey="value" :val="selectList1.value" :options="model.selectList1" />
        <!-- <u-input @blur="onblur()" @focus="onfocus" @click="onclick" :border="true" v-model="selectvalue" placeholder="请选择检验节点" style="overflow: hidden" /> -->
      </u-form-item>
      <u-form-item label="日期">
        <u-input @click="onfocuscalender" placeholder="请选择日期" v-model="checkTime" :clearable="false" />
        <u-icon name="close-circle-fill" @click="clear" color="rgb(96, 98, 102)" size="28"></u-icon>
      </u-form-item>
    </u-form>
    <view class="scroll">
      <view v-for="item in list" :key="item.id">
        <u-form style="margin-top: 10rpx" class="form2">
          <view class="list">
            <view class="righttitle">
              <view class="boder-icon-top zhuangtai" data-state="0">{{ item.checkStatus == 0 ? '待检验' : '检验完成' }}</view>
            </view>
            <view class="row-list">
              <view class="list-item"> 来料批次号: </view>
              <view> {{ item.incomeBatchNo }} </view>
            </view>
            <view class="row-list">
              <view class="list-item"> 任务号: </view>
              <view> {{ item.checkNo }} </view>
            </view>
            <view class="row-list">
              <view class="list-item"> 订单号: </view>
              <view> {{ item.workorderCodeSap }} </view>
            </view>
            <view class="row-list">
              <view class="list-item"> 物料号: </view>
              <view> {{ item.materialCode }} </view>
            </view>
            <view class="row-list">
              <view class="list-item" style="white-space: nowrap"> 物料名称: </view>
              <view> {{ item.materialName }} </view>
            </view>
            <view class="row-list">
              <view class="list-item"> 创建时间: </view>
              <view> {{ item.createTime }} </view>
            </view>
            <view class="row-list">
              <view class="row-list-item">
                <view class="list-item"> 收货数量: </view>
                <view> {{ item.quality }} </view>
              </view>
            </view>
            <view class="row-list">
              <view class="row-list-item">
                <view class="list-item"> 检验位置: </view>
                <view> {{ item.checkLocName }} </view>
              </view>
            </view>
            <view a:if="true" class="righttitle">
              <view @click.stop="onPass(item)" class="boder-icon-rigth"> 查看 </view>
            </view>
          </view>
        </u-form>
      </view>
    </view>
    <view>
      <u-popup v-model="show" mode="center" width="98%" :closeable="true">
        <view class="selectlist">
          <view class="item" v-for="(item, index) in detaillistceshi" :key="index">
            <div class="item1">项目名称: {{ item.ruleName }}</div>
            <div class="item1">检查标准: {{ item.checkStandard }}</div>
            <div class="item1 item2 item3" v-if="item.propertyCode == '0'">
              <div>检查结果:</div>
              <div class="select">
                <u-radio-group v-model="item.status" @change="radioGroupChange(item, item.status, index)">
                  <u-radio @change="radioChange" :disabled="item.status == n.type ? false : true" v-for="(n, indexn) in listselect" :key="indexn" :name="n.type">
                    {{ n.name }}
                  </u-radio>
                </u-radio-group>
              </div>
            </div>
            <div class="item1 item2" v-if="item.propertyCode == '1'">
              <div class="input-box" id="input-box1">
                实际值:
                <input class="input" :disabled="item.actualValue == null ? true : true" v-model="item.actualValue" @focus="focus(item, item.actualValue, index)" @change="changeinput(item)" @input="input(item)" type="text" name="" id="" />
                单位:mm
              </div>
            </div>
            <div class="item1 item2 item3" v-if="item.propertyCode == '1'">
              <div>检查结果:</div>
              <div class="select">
                <u-radio-group v-model="item.status" @change="radioGroupChange(item, item.status, index)">
                  <u-radio @change="radioChange" :disabled="item.status == n.type ? false : true" v-for="(n, indexn) in listselect" :key="indexn" :name="n.type">
                    {{ n.name }}
                  </u-radio>
                </u-radio-group>
              </div>
            </div>
            <div class="upload-name">
              <!-- <u-upload :before-upload="beforeUpload" ref="uUpload" :fileList="fileList" @on-error='errorUpload($event)' :action="action" @on-remove="removePic($event, item)" @on-success="successUpload($event)" :deletable="true"></u-upload> -->
              <scroll-view class="scroll-view_H" scroll-x="true" :scroll-left="scrollLeft(item.fileList)">
                <view class="photoList">
                  <view class="itemBox photoBox" v-for="(img, index) in item.fileList" :key="index">
                    <!-- <view class="closeBtn" @click="deleteImg(index)">
                <image class="img" src="../../../static/images/iconCloseGray.svg" mode="scaleToFill"></image>
              </view> -->
                    <image class="img" :src="img" mode="aspectFit" @click="showScreenImg(index, item.fileList)"></image>
                  </view>
                  <view class="itemBox chooseBtn">
                    <!-- <view class="inner">
                <image class="img" src="../../../static/images/upload-pic-icon.svg" mode="scaleToFill"></image>
                <text class="desc">添加照片</text>
              </view> -->
                  </view>
                </view>
              </scroll-view>
            </div>
            <div class="item1">不良分类:</div>
            <u-input style="background: #fafafa; border: 1px dashed #e2e2e2; padding: 5px 5px" :disabled="item.defectSubclass == null ? true : true" v-model="item.defectNames" placeholder="" />
            <!-- <div class="item1">不合格数量:</div>
            <u-input style="background: #fafafa; border: 1px dashed #e2e2e2; padding: 5px 5px" :disabled="item.defectQuality == null ? true : true" v-model="item.defectQualitys" placeholder="" /> -->
            <div class="item1">不合格描述:</div>
            <u-input style="background: #fafafa; border: 1px dashed #e2e2e2; padding: 10px 5px" :disabled="item.remark == null ? true : true" v-model="item.remark" placeholder="" type="textarea" />
          </view>
        </view>
        <u-form class="Belowsform3" ref="form" label-width="230rpx" label-position="left">
          <u-form-item label="抽样数量:">
            <u-input v-model="clickitem.sampleQuality" :disabled="clickitem.sampleQuality == null ? true : true" placeholder="" type="number" />
          </u-form-item>
          <u-form-item :label="item.defectSubclass" v-for="(item, index) in detaillistdefects" :key="index">
            <u-input v-model="item.noOkQuality" :disabled="item.noOkQuality == null ? true : true" placeholder="" type="number" />
          </u-form-item>
          <div class="" v-show="selectList.value == 'checkTypeLL'">
            <u-form-item label="最终判定:">
              <!-- <u-input v-model="formdata.checkResult" placeholder="" type="text" /> -->
              <u-radio-group v-model="clickitem.checkResult">
                <u-radio v-for="(n, indexn) in listselectdetermine" :disabled="clickitem.checkResult == n.type ? false : true" :key="indexn" :name="n.type">
                  {{ n.name }}
                </u-radio>
              </u-radio-group>
            </u-form-item>
            <u-form-item label="不合格描述:">
              <u-input :disabled="model.CheckTaskList.remark == null ? true : true" style="background: #fafafa; border: 1px dashed #e2e2e2; padding: 10px 5px" v-model="model.CheckTaskList.remark" placeholder="" type="textarea" />
            </u-form-item>
            <u-form-item label="是否发起oa:">
              <u-radio-group v-model="formdata.startOA">
                <u-radio v-for="(n, indexn) in listselectoa" :key="indexn" :name="n.type" :disabled="n.disabled">
                  {{ n.name }}
                </u-radio>
              </u-radio-group>
            </u-form-item>
            <u-form-item label="来料类别:">
              <jPicker sureColor="#ff0000" :moren="moren5" @bindpicker="selectProductlocCode4" showKey="label" valKey="value" :val="selectmaterialType.value" :options="model.locList2" />
            </u-form-item>
            <u-form-item label="物料来源:">
              <jPicker sureColor="#ff0000" :moren="moren6" @bindpicker="selectProductlocCode5" showKey="label" valKey="value" :val="selectmaterialFromList.value" :options="model.locList3" />
            </u-form-item>
          </div>
          <!-- <u-form-item v-if="isshow1" label="不合格数量:">
            <u-input v-model="clickitem.noOkQuality" :disabled="clickitem.noOkQuality == null ? true : true" placeholder="" type="number" />
          </u-form-item>
          <u-form-item v-if="isshow3" label="A类不良:">
            <u-input v-model="clickitem.aNoOkquality" :disabled="clickitem.aNoOkquality == null ? true : true" placeholder="" type="number" />
          </u-form-item>
          <u-form-item v-if="isshow3" label="B类不良:">
            <u-input v-model="clickitem.bNoOkquality" :disabled="clickitem.bNoOkquality == null ? true : true" placeholder="" type="number" />
          </u-form-item>
          <u-form-item v-if="isshow3" label="C类不良:">
            <u-input v-model="clickitem.cNoOkquality" :disabled="clickitem.cNoOkquality == null ? true : true" placeholder="" type="number" />
          </u-form-item> -->
        </u-form>
        <div style="text-align: center">
          <u-button style="width: 100%; height: 35px; margin: auto" @click="onOk" size="mini" type="primary">确认</u-button>
        </div>
      </u-popup>
      <view v-if="show" class="mask"></view>
    </view>
    <u-select v-model="showselect" mode="mutil-column-auto" :list="selectlist" @confirm="confirmselect"></u-select>
    <u-modal v-model="isshow" class="modal" :show-cancel-button="true" :show-title="false" @cancel="cancel" @confirm="confirm">
      <div class="tagsbox">
        <u-tag v-for="(item, index) in tagslist" class="tags" :key="index" :text="item" type="info" closeable @close="tagClick(index)" />
      </div>
      <div class="upload-name">
        <div>
          <u-input :border="true" v-model="tagsvalue" :disabled="true" :focus="isfocus" style="overflow: hidden" />
        </div>
        <div>
          <u-button style="width: 100px; height: 35px; margin-left: 5px" :disabled="true" @click="ontagsadd" size="mini" type="primary">确认</u-button>
        </div>
      </div>
    </u-modal>
    <u-toast ref="uToast" />
    <u-calendar v-model="iscalendar" :mode="mode" @change="changetime"></u-calendar>
  </view>
</template>
<script lang="ts">
import { Component } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import jPicker from '@/components/J-Picker/jPicker.vue';
import model from './model';
import moment from 'moment';
//import { any } from 'lodash/fp';
import { session } from '@/store/modules/session';
@Component({
  components: {
    jPicker,
  },
})
export default class PurchaseWHSRM extends BasePage {
  model = model;
  moren = '请选择检验节点';
  moren3 = '请选择不良分类';
  moren4 = '请选择检验位置';
  moren5 = '请选择来料类别';
  moren6 = '请选择物料来源';
  checkTime: any = moment().format('YYYY-MM-DD');
  iscalendar = false;
  mode = 'date';
  selectList1: any = {};
  list: any = [];
  show = false;
  showselect = false;
  isshow = false;
  form3: any = {
    barCodewl: '',
  };
  listselect: any = [
    {
      type: 'Y',
      name: '合格',
      radiovalue: null,
    },
    {
      type: 'N',
      name: '不合格',
      radiovalue: null,
    },
  ];
  selectList: any = {};
  // remove: any = {};
  // async onReady() {
  //   await this.model.queryLocation();
  //   this.remove = this.model.WlList[0];
  // }
  // selectItem(e: any) {
  //   this.remove = e.pickerName;
  // }
  orderNo: any = '';
  selectlist: any = [
    {
      value: 1,
      label: '中国',
      children: [
        {
          value: 2,
          label: '广东',
          children: [
            {
              value: 3,
              label: '深圳',
            },
            {
              value: 4,
              label: '广州',
            },
          ],
        },
        {
          value: 5,
          label: '广西',
          children: [
            {
              value: 6,
              label: '南宁',
            },
            {
              value: 7,
              label: '桂林',
            },
          ],
        },
      ],
    },
    {
      value: 8,
      label: '美国',
      children: [
        {
          value: 9,
          label: '纽约',
          children: [
            {
              value: 10,
              label: '皇后街区',
            },
          ],
        },
      ],
    },
  ];
  detailList: any = [];
  equipmentindex: any = [];
  tagsvalue: any = '';
  tagslist: any = [];
  detailsinfo: any = [];
  nodelist: any = '';
  nodelist1: any = '';
  detaillistceshi: any = [];
  detaillistdefects: any = [];
  clickitem: any = '';
  formdata: any = {
    sampleQuality: null,
    noOkQuality: null,
    aNoOkquality: null,
    bNoOkquality: null,
    cNoOkquality: null,
  };
  defectCodeList: any = {};
  isvalue = false;
  isfocus = false;
  isshow1 = false;
  isshow2 = false;
  isshow3 = false;
  listselectoa: any = [
    {
      type: 1,
      name: '是',
      radiovalue: null,
    },
    {
      type: 0,
      name: '否',
      radiovalue: null,
    },
  ];
  listselectdetermine: any = [
    {
      type: 'Y',
      name: '合格',
      radiovalue: null,
    },
    {
      type: 'N',
      name: '不合格',
      radiovalue: null,
    },
  ];
  // 来料类别
  getmaterialType: any = [];
  selectmaterialType: any = {};
  // 物料来源
  getmaterialFromList: any = [];
  selectmaterialFromList: any = {};
  //收货按钮
  tagClick(index) {
    this.tagslist.splice(index, 1);
  }
  clear() {
    this.checkTime = null;
  }
  onfocuscalender() {
    this.iscalendar = true;
  }
  async changetime(e) {
    console.log(e);
    this.checkTime = e.result;
    let query = {
      factoryCode: session.PoolName,
      checkManCode: session.userName,
      checkStatus: '1,2',
      checkType: this.selectList.value,
      checkLoc: this.selectList1.value,
      checkTimeStart: this.checkTime,
    };
    this.getDefectListPDA();
    await this.model.getCheckTaskListall(query);
    this.list = this.model.CheckTaskListall;
    // this.tagslist = JSON.parse(JSON.stringify(item.babtype));
    // this.tagslistcopy = JSON.parse(JSON.stringify(item.babtype));
  }
  ontagsadd() {
    if (this.tagsvalue == '' || this.tagsvalue == undefined) {
      // this.customToast('请扫码设备编码');
      (this.$refs.uToast as any).show({
        title: '请输入内容',
        type: 'default',
      });
      return;
    }
    this.tagslist.push(this.tagsvalue);
    // this.isfocus = false;
    // this.$nextTick(() => {
    //   this.isfocus = true;
    // });
  }
  async onLoad(options) {
    this.getselectlist();
    if (options.listitem) {
      let str = decodeURIComponent(options.listitem);
      if (str) {
        this.detailsinfo = JSON.parse(str);
        this.selectList.value = this.detailsinfo.checkType;
        console.log(this.detailsinfo);
        let query = {
          factoryCode: session.PoolName,
          checkManCode: session.userName,
          checkStatus: '1,2',
          checkType: this.detailsinfo.checkType,
          checkTimeStart: this.checkTime,
        };
        await this.model.getCheckTaskListall(query);
        this.list = this.model.CheckTaskListall;
      }
    }
  }
  async getselectlist() {
    await this.model.getCheckType();
    await this.model.getcheckLocList();
    this.nodelist = this.model.orderNoItemList;
    this.nodelist1 = this.model.orderNoItemList1;
  }
  async selectProductlocCode4(e: any) {
    this.selectmaterialType = e.pickerName;
    this.formdata.materialType = this.selectmaterialType.value;
  }
  async selectProductlocCode5(e: any) {
    this.selectmaterialFromList = e.pickerName;
    this.formdata.materialFrom = this.selectmaterialFromList.value;
  }
  async getmaterialTypePDA() {
    await this.model.getmaterialTypePDA();
    this.getmaterialType = this.model.locList2;
  }
  async getmaterialFromListPDA() {
    await this.model.getmaterialFromListPDA();
    this.getmaterialFromList = this.model.locList3;
  }
  async onPass(item) {
    console.log('1234567', item);
    this.clickitem = item;
    let labelname = null;
    this.getmaterialFromListPDA();
    this.getmaterialTypePDA();
    this.selectmaterialType.value = this.clickitem.materialType;
    this.selectmaterialFromList.value = this.clickitem.materialFrom;
    console.log(this.clickitem.remark, '222222');
    this.nodelist.forEach((item) => {
      if (item.orderCode == this.selectList.value) {
        labelname = item.checkName;
      }
    });
    if (labelname == '来料检验') {
      this.isshow1 = true;
    } else if (labelname == '成品入库检验') {
      this.isshow1 = true;
    } else if (labelname == '过程检验') {
      this.isshow3 = true;
    }
    let belongTo = item.recordId;
    let query = {
      factoryCode: session.PoolName,
      belongTo: belongTo,
      checkType: this.selectList.value,
    };
    console.log(query, this.detailsinfo);
    await this.model.getCheckTaskList(query);
    this.detaillistceshi = this.model.CheckTaskList.qcCheckTaskDetails;

    this.detaillistceshi.forEach((item) => {
      item.fileList = [];
      if (item.files == null) {
        item.files = [];
      } else {
        item.files.forEach((n) => {
          item.fileList.push(n.fileAddress);
        });
      }
      if (item.defectCode != null) {
        let isdefectCode = item.defectCode;
        const matchedItem = model.locList1.find((item) => item.value === isdefectCode);
        if (matchedItem) {
          item.defectSubclass = matchedItem.label;
        }
      } else {
        item.defectSubclass = null;
      }
    });
    this.detaillistdefects = this.model.CheckTaskList.defects;
    this.show = true;
  }
  radioGroupChange(item, value, index) {
    console.log(item, value, index);
  }
  radioChange(e) {
    console.log(e, '11111');
  }
  async selectProductlocCode(e: any) {
    this.selectList = e.pickerName;
    let query = {
      factoryCode: session.PoolName,
      checkManCode: session.userName,
      checkStatus: '1,2',
      checkType: this.selectList.value,
      checkLoc: this.selectList1.value,
      checkTimeStart: this.checkTime,
    };
    this.getDefectListPDA();
    await this.model.getCheckTaskListall(query);
    this.list = this.model.CheckTaskListall;
    // let params = {
    //   productionState: this.productCodelocList.value.toString(),
    // };
    // await this.model.getpalletLocation(params); //参数：成型区2，烘房3
  }

  async selectProductlocCode3(e: any) {
    this.selectList1 = e.pickerName;
    let query = {
      factoryCode: session.PoolName,
      checkManCode: session.userName,
      checkStatus: '1,2',
      checkType: this.selectList.value,
      checkLoc: this.selectList1.value,
      checkTimeStart: this.checkTime,
    };
    this.getDefectListPDA();
    await this.model.getCheckTaskListall(query);
    this.list = this.model.CheckTaskListall;
  }
  async selectProductlocCode2(index, e: any) {
    console.log(index, e);
    this.defectCodeList = e.pickerName;
    this.detaillistceshi[index].defectCode = this.defectCodeList.value;
  }
  ///获取不良分类
  async getDefectListPDA() {
    let query1 = {
      factoryCode: session.PoolName,
      checkType: this.selectList.value,
    };
    await this.model.getDefectListPDA(query1);
    // this.nodelist = this.model.orderNoItemList;
  }
  focus(item, value, index) {
    console.log(item, value, index);
    this.tagslist = [];
    this.equipmentindex = [];
    this.tagsvalue = null;
    this.equipmentindex.push(index);
    this.isshow = true;
  }
  checkimg(item, value, index) {
    console.log(item, value, index);
    this.equipmentindex = [];
    this.equipmentindex.push(index);
    if (this.detaillistceshi[index].actualValue) {
      this.tagslist = JSON.parse(this.detaillistceshi[index].actualValue);
    } else {
      this.tagslist = [];
    }
    this.isshow = true;
  }
  changeinput(e) {
    console.log(e);
  }
  input(e) {
    console.log(e);
  }
  nopoup() {
    this.show = false;
    this.form3.barCodewl = '';
  }
  onblur() {
    console.log('333');
    this.showselect = true;
  }
  onfocus() {
    console.log('222');
    this.showselect = false;
  }
  onclick() {
    console.log('111');
    this.showselect = true;
  }
  async getlist() {
    let query = {
      factoryCode: session.PoolName,
      checkManCode: session.userName,
      checkStatus: '1,2',
      checkType: this.selectList.value,
      checkLoc: this.selectList1.value,
    };
    await this.model.getCheckTaskListall(query);
  }
  //点击收货按钮，录入批次（或系统自动生成）、数量、托盘码进行收货。
  async onOk() {
    this.show = false;
    //await this.model.OnSubmit(this.form3.barCodewl);
  }
  confirmselect(e) {
    console.log(e);
    console.log(this.equipmentindex, this.tagslist);
  }
  confirm() {
    console.log(this.equipmentindex, this.tagslist);
    console.log(this.detaillistceshi[this.equipmentindex[0]].actualValue);
    this.detaillistceshi[this.equipmentindex[0]].actualValue = JSON.stringify(this.tagslist);
    console.log(this.detaillistceshi[this.equipmentindex[0]].actualValue);
    this.tagsvalue = null;
  }
  cancel() {
    this.isshow = false;
    this.tagsvalue = null;
  }
  scrollLeft(files) {
    return 222 * (files.length + 1);
  }
  showScreenImg(i, files) {
    let list = files;
    uni.previewImage({
      current: i,
      urls: list,
      // loop: true
    });
  }
  chooseImg(index, files) {
    uni.chooseImage({
      count: 9, //默认9
      // sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图，默认二者都有
      sourceType: ['album', 'camera'],
      success: (res) => {
        // uni.showLoading();
        //console.log('/////',res);
        let tempFilePaths: any = res.tempFilePaths;
        console.log(res.tempFilePaths);

        //      (this.$refs.uToast as any).show({
        //     title: '成功',
        //     type: 'success',
        //   });
        //   uni.navigateBack({});
        // } else {
        //   (this.$refs.uToast as any).show({
        //     title: '失败',
        //     type: 'error',
        //   });

        tempFilePaths.map((item) => {
          uni.uploadFile({
            // url: 'http://192.168.202.20:9000/prod-api/file/upload',
            url: 'http://192.168.202.34:30000/prod-api/file/upload',
            fileType: 'image',
            filePath: item,
            header: {
              Authorization: 'Bearer ' + session.user?.access_token,
              // 'cosmo-env-sitecode': this.$store.state.siteCode
            },
            name: 'file',
            // formData: {
            // 	materialCode: this.materialObj.materialCode,
            // },
            success: (res) => {
              uni.hideLoading();
              if (!res.data) {
                // this.$refs.toastRef.show({
                // 	type:"error",
                // 	text:res.msg
                // })
                return;
              }
              let data = JSON.parse(res.data);
              files = [...files, data.data.url];
              this.detaillistceshi[index].files = files;
              this.detaillistceshi[index].fileListStr = files.join(',');
              //this.filesName = [...this.filesName,data.fileName];
              //this.picUrls = this.files.join(",");
              //this.picNames = this.filesName.join(",");
              console.log(files, this.detaillistceshi[index]);
              uni.hideLoading();
            },
            fail: (err) => {
              console.log(err);
              // this.$refs.toastRef.show({
              // 	type:"error",
              // 	text:"上传失败！"
              // })
              uni.hideLoading();
            },
          });
        });
      },
    });
  }
  deleteImg(index) {
    this.detaillistceshi[index].files.splice(index, 1);
    this.detaillistceshi[index].fileListStr = this.detaillistceshi[index].files.join(',');
  }
  //查询货单关联采购单信息
}
</script>
<style lang="scss" scoped>
.page-product-receipt {
  background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #f8262c 51%, #d9001b 100%) no-repeat;
  background-size: 100% 600rpx;
  padding: 118rpx 30rpx 162rpx;
  min-height: 100%;

  .header {
    position: fixed;
    top: 0rpx;
    left: 0;
    right: 0;
    z-index: 99;
    display: flex;
    height: 120rpx;
    line-height: 88rpx;
    color: #fff;
    font-size: 34rpx;
    font-weight: 500;
    text-align: center;
    padding: 45rpx 0rpx 0rpx;

    .title {
      flex: 3;
    }

    .left,
    .right {
      flex: 1;
    }

    .icon {
      display: flex;
      justify-content: center;
      align-items: center;
      width: 88rpx;
      height: 88rpx;
    }
  }

  .form {
    background-color: #fff;
    padding: 40rpx;
    border-radius: 10rpx;
    box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);

    .u-form-item {
      padding: 30rpx 0;
      line-height: 35rpx;

      .Transfer {
        width: 280rpx;
        height: 64rpx;
        background: rgb(242, 242, 242);
        border-radius: 110rpx;
      }
    }

    .single {
      width: 100%;
      height: 100rpx;
      display: flex;

      .single-left {
        width: 80%;
        height: 100%;
        display: flex;

        view {
          width: 142rpx;
          height: 100%;
          line-height: 100rpx;
        }
      }

      .single-right {
        button {
          margin-top: 15rpx;
          width: 140rpx;
          height: 70rpx;
          background-color: #fa3534;
        }
      }
    }

    .row {
      display: flex;
      flex-direction: row;
      justify-content: space-around;
      flex: 1;
    }
  }

  .scroll {
    // margin-top: 120rpx;
    // padding-left: 30rpx;
    // padding-right: 16rpx;
    // margin-bottom: 20rpx;
    // overflow: scroll;
    // padding-top: 20rpx;
    .form2 {
      background-color: #fff;
      padding: 0rpx 25rpx 25rpx;
      border-radius: 10rpx;
      box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
      color: #8d8989;

      .row-list {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        .row-list-item {
          display: flex;
          flex-direction: row;
          justify-content: space-between;
          width: 40%;
        }
        .list-item {
          display: flex;
          flex-direction: row;
          flex: 1;
        }
      }

      .righttitle {
        display: flex;
        justify-content: flex-end;

        .boder-icon-rigth {
          border: 1rpx solid #fa3534;
          width: 130rpx;
          text-align: center;
          background: #fa3534;
          color: #ffffff;
          margin-top: 10px;
        }

        .zhuangtai {
          background: #a7a0a04a;
          width: 224rpx;
          margin-right: -27rpx;
          border: 2rpx solid #a7a0a04a;
          border-radius: 12rpx;
          text-align: center;
          margin-bottom: 10rpx;
        }

        .zhuangtai[data-state='1'] {
          color: green;
        }

        .zhuangtai[data-state='0'] {
          color: blue;
        }
      }
    }
  }

  .bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99;
    background: #ffffff;
    box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
    padding: 20rpx;
  }

  .button-bar {
  }

  .photoList {
    display: flex;
    padding-top: 12rpx;

    .chooseBtn {
      width: 202rpx;
      height: 202rpx;
      background: #fafafa;
      border-radius: 12rpx;
      border: 2rpx dashed #e2e2e2;
      display: flex;
      justify-content: center;
      align-items: center;

      .inner {
        text-align: center;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
      }

      .desc {
        font-size: 28rpx;
        font-weight: 400;
        color: #24252a;
        line-height: 40rpx;
      }

      .img {
        width: 50rpx;
        height: 50rpx;
        margin-bottom: 6rpx;
      }
    }

    .photoBox {
      width: 202rpx;
      height: 202rpx;
      background: #fafafa;
      border-radius: 12rpx;
      position: relative;

      .closeBtn {
        position: absolute;
        top: -12rpx;
        right: -12rpx;
        z-index: 2;
        width: 36rpx;
        height: 36rpx;

        .img {
          width: 36rpx;
          height: 36rpx;
        }
      }

      .img {
        width: 202rpx;
        height: 202rpx;
        border-radius: 12rpx;
      }
    }

    .itemBox {
      flex: 0 0 202rpx;
      margin-right: 20rpx;

      &:last-child {
        margin-right: 0;
      }
    }

    // /deep/ .remarksBox textarea {
    //   font-size: 24rpx;
    // }
  }
  .form3 {
    padding: 20rpx;
    //border-radius: 10rpx;
    //box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
    .poupitem {
      display: flex;
      flex-direction: row;
      justify-content: space-around;
      margin: 20rpx;
      .pouptitle {
        width: 25%;
      }
      .poupcontent {
        border: 1px solid rgba(128, 128, 128, 0.2);
      }
    }
  }
  .poupbutton {
    display: flex;
    justify-content: space-around;
  }
  .mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* 半透明的黑色背景 */
    z-index: 9999; /* 确保遮罩层在最上层 */
  }
  .selectlist {
    margin-top: 15px;
    border-radius: 5px;
    // border: rgba(121, 121, 121, 1) solid 1px;
    // background-color: #ffffff;
    padding: 7px 8px 7px 12px;
    box-sizing: border-box;
    .item-name {
      .quest {
        // width: 367px;
        // border-radius: 5px;
        // border: rgba(121, 121, 121, 1) solid 1px;
        // background-color: #ffffff;
        padding: 7px 8px 7px 12px;
        box-sizing: border-box;
        text-align: center;
        font-size: 18px;
      }
      .details {
        display: flex;
        font-size: 15px;
        // justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
      }
    }
    .single-left {
      display: flex;
      // align-items: center;
      // justify-content: space-around;
      text-align: center;
      margin-top: 12px;
      margin-bottom: 20px;
      border: 1px solid #eee;
    }
    .item {
      margin-top: 15px;
      width: 344px;
      border-radius: 5px;
      border: rgba(121, 121, 121, 1) solid 1px;
      // background-color: #ffffff;
      padding: 7px 8px 7px 8px;
      box-sizing: border-box;
      .item1 {
        margin-bottom: 3px;
        white-space: 1px;
        font-size: 15px;
        font-weight: 600;
      }
      .item2 {
        // display: flex;
        // align-content: center;
        // justify-content: space-between;
        .select {
          font-size: 15px;
          font-weight: 400;
          display: flex;
          // margin-left: 19px;
        }
        .input-box {
          font-size: 13px;
          font-weight: 400;
          display: flex;
          align-content: center;
          margin-top: 2px;
          .input {
            font-size: 12px;
            padding: 1px 8px;
            height: 20px;
            box-sizing: border-box;
            border: 1px solid #b6b6b6;
            margin-left: 6px;
            display: inline-block;
            margin-right: 6px;
            border-radius: 4px;
            position: relative;
          }
        }
      }
      .item3 {
        display: flex;
        align-content: center;
        justify-content: space-between;
      }
    }
  }
  .modal {
    .upload-name {
      padding: 10px 20px;
      display: flex;
      justify-content: space-between;
      .name {
        font-size: 17px;
        font-weight: 600;
      }
    }
    .tagsbox {
      padding: 10px 20px;
      .tags {
        margin-right: 5px;
      }
    }
  }
  .Belowsform3 {
    background-color: #fff;
    padding: 7px 8px 7px 12px;
    .u-form-item {
      line-height: 35rpx;
      font-size: 16px;
    }
    .photoList {
      display: flex;
      padding-top: 12rpx;

      .chooseBtn {
        width: 202rpx;
        height: 202rpx;
        background: #fafafa;
        border-radius: 12rpx;
        border: 2rpx dashed #e2e2e2;
        display: flex;
        justify-content: center;
        align-items: center;

        .inner {
          text-align: center;
          display: flex;
          flex-direction: column;
          justify-content: center;
          align-items: center;
        }

        .desc {
          font-size: 28rpx;
          font-weight: 400;
          color: #24252a;
          line-height: 40rpx;
        }

        .img {
          width: 50rpx;
          height: 50rpx;
          margin-bottom: 6rpx;
        }
      }

      .photoBox {
        width: 202rpx;
        height: 202rpx;
        background: #fafafa;
        border-radius: 12rpx;
        position: relative;

        .closeBtn {
          position: absolute;
          top: -12rpx;
          right: -12rpx;
          z-index: 2;
          width: 36rpx;
          height: 36rpx;

          .img {
            width: 36rpx;
            height: 36rpx;
          }
        }

        .img {
          width: 202rpx;
          height: 202rpx;
          border-radius: 12rpx;
        }
      }

      .itemBox {
        flex: 0 0 202rpx;
        margin-right: 20rpx;

        &:last-child {
          margin-right: 0;
        }
      }
    }
  }
  ::v-deep .input1 .u-input__input {
    //background: rgb(233 231 231 / 38%);
    background-color: #f0f0f0;
  }
  ::v-deep .uni-input-placeholder {
    font-weight: 500;
    left: 10px;
  }
  ::v-deep .uni-textarea-placeholder {
    font-weight: 500;
  }
  ::v-deep .Belowsform3 .uni-input-input {
    width: 97%;
    border: 1px solid #dcdfe6;
  }
}
</style>
