<template>
  <div>
    <el-form :model="formData" size="small" :inline="true" label-width="80px">
      <el-row :gutter="20">
        <el-col :span="24">
          <el-form-item label="调出门店">
            <CorpChoose/>
          </el-form-item>
          <el-form-item label="调入门店">
            <CorpChoose/>
          </el-form-item>
          <el-form-item label="日期">
            <el-date-picker
              v-model="formData"
              type="date"
              placeholder="选择日期">
            </el-date-picker>
          </el-form-item>
          <el-form-item label="单据编号" prop="stNo">
            <el-input disabled v-model="formData.stNo" style="width: 20rem"/>
          </el-form-item>
          <el-form-item label="调拨人">
            <StaffChoose @selected="getStaff"/>
          </el-form-item>
          <el-form-item label="选择商品">
            <PartChoose/>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="24">
          <StTable/>
        </el-col>
      </el-row>
      <el-row :gutter="20" style="margin-top: 1rem">
        <el-col :span="24">
          <el-form-item label="应收金额">
            <el-input v-model="formData"/>
          </el-form-item>
          <el-form-item label="优惠金额">
            <el-input v-model="formData"/>
          </el-form-item>
          <el-form-item label="本次收款">
            <el-input v-model="formData"/>
          </el-form-item>
          <el-form-item label="本次欠款">
            <el-input v-model="formData"/>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="2">
        <el-col :span="12">
          <el-form-item label="备注">
            <el-input style="width: 45rem"/>
          </el-form-item>
        </el-col>
        <el-col :span="12" style="text-align: right">
          <el-button type="danger">结算</el-button>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>

<script>
import CorpChoose from "@/views/repair/Components/CorpChoose.vue";
import StaffChoose from "@/views/repair/Components/StaffChoose.vue";
import PartChoose from "@/views/repair/Components/PartChoose.vue";
import StTable from "@/views/repair/stockTransfer/Components/StTable.vue";
import {createUniqueCodeByHead} from "@/utils/createUniqueCode";

export default {
  name: "StInfo",
  components: {
    StTable,
    PartChoose,
    StaffChoose,
    CorpChoose
  },
  data() {
    return {
      formData: {
        stNo: null,
      },
    }
  },
  mounted() {
    this.formData.stNo = createUniqueCodeByHead("DB")
  },
  methods: {
    getStaff(data) {

    }
  }
}
</script>

<style scoped lang="scss">

</style>
