<template>
	<div class="diaClass">
    <el-card>
      <el-form ref="formRef2" :model="insertForm" label-width="110" label-position="right"
               :inline="true">
        <el-row>
          <el-col :span="12">
            <el-form-item label="合作方名称" prop="tradePartnerName">
              <el-input v-model="insertForm.tradePartnerName" readonly>

              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="合作方名编码" prop="tradePartnerCode">
              <el-input v-model="insertForm.tradePartnerCode" clearable disabled></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="合作方简称" prop="shortname">
              <el-input v-model="insertForm.shortname" readonly></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="国别">
              <el-select v-model="insertForm.contry" disabled>
                <el-option
                    v-for="item in dictList.COUNTRY_CODE"
                    :key="item.dicCode"
                    :label="item.dicName"
                    :value="item.dicCode"
                />
              </el-select>

            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="省份">
              <el-select v-model="insertForm.provice" disabled placeholder="无">
                <el-option
                    v-for="item in dictList.PROVINCE_CODE"
                    :key="item.dicCode"
                    :label="item.dicName"
                    :value="item.dicCode"
                />
              </el-select>

            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="地址" prop="addr">
              <el-input v-model="insertForm.addr" readonly>
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="邮编" prop="postcode">
              <el-input v-model="insertForm.postcode" readonly>

              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="联系人" prop="contact">
              <el-input v-model="insertForm.contact" readonly>

              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="电话" prop="telephone">
              <el-input v-model="insertForm.telephone" readonly>

              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="手机" prop="mobil">
              <el-input v-model="insertForm.mobil" readonly>

              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="传真" prop="fax">
              <el-input v-model="insertForm.fax" readonly>

              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="电子邮件" prop="email">
              <el-input v-model="insertForm.email" readonly>

              </el-input>
            </el-form-item>
          </el-col>
          <!--            <el-col :span="12">-->
          <!--              <el-form-item label="开户银行" prop="bank">-->
          <!--                <el-input v-model="insertForm.bank" readonly>-->

          <!--                </el-input>-->
          <!--              </el-form-item>-->
          <!--            </el-col>-->
          <!--            <el-col :span="12">-->
          <!--              <el-form-item label="银行账号" prop="baccount">-->
          <!--                <el-input v-model="insertForm.baccount" readonly>-->

          <!--                </el-input>-->
          <!--              </el-form-item>-->
          <!--            </el-col>-->
          <el-col :span="12">
            <el-form-item label="企业代码" prop="artno">
              <el-input v-model="insertForm.artno" readonly>

              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="法定代表人" prop="artperson">
              <el-input v-model="insertForm.artperson" readonly>

              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="税务登记号" prop="taxno">
              <el-input v-model="insertForm.taxno" readonly>

              </el-input>
            </el-form-item>
          </el-col>


          <el-col :span="12">
            <el-form-item label="客商类别" prop="tpTypeListStrDic">
              <el-input v-model="insertForm.tpTypeListStrDic" readonly>

              </el-input>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="客商性质" prop="tpStyle">
              <el-select v-model="insertForm.tpStyle" disabled>
                <el-option
                    v-for="item in dictList.TP_STYLE"
                    :key="item.dicCode"
                    :label="item.dicName"
                    :value="item.dicCode"
                />
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="收发货地点" prop="sfhAddr">
              <el-input v-model="insertForm.sfhAddr" readonly>

              </el-input>
            </el-form-item>
          </el-col>
          <!--          <el-col :span="12">-->
          <!--            <el-form-item label="公司ID" prop="orgId">-->
          <!--              <el-input v-model="insertForm.orgId">-->

          <!--              </el-input>-->
          <!--            </el-form-item>-->
          <!--          </el-col>-->
          <!--          <el-col :span="12">-->
          <!--            <el-form-item label="公司" prop="orgName">-->
          <!--              <el-input v-model="insertForm.orgName">-->

          <!--              </el-input>-->
          <!--            </el-form-item>-->
          <!--          </el-col>-->
          <el-col :span="24">
            <el-form-item label="备注" prop="remark">
              <el-input readonly
                        v-model="insertForm.remark"
                        :autosize="{ minRows: 2, maxRows: 4 }"
                        type="textarea"
                        placeholder=""
              />
            </el-form-item>
          </el-col>

        </el-row>
      </el-form>

    </el-card>
	</div>
</template>

<script setup>
	import {
		ref,
		reactive,
		onMounted,
		getCurrentInstance,
		nextTick
	} from 'vue'
	const {
		proxy
	} = getCurrentInstance()
	import style from '@/tools/style'
	const cardBodyStyle = ref(style.card)
	/**
	 * 新增表单form
	 */
	const insertForm = ref({
		id: '',

	})
  const tableDataMx = ref([])

	import {
		useWorkflowStore
	} from "@/stores/workflow"
	const workflow = useWorkflowStore()
  const dictList = ref({})
  const dictData = () => {
    var url = 'framework/Common/querySelectorList'
    var param = {
      type: JSON.stringify(['START_STATUS', 'TP_TYPE', 'TP_STYLE', 'COUNTRY_CODE', 'PROVINCE_CODE'])
    }
    proxy.$axios.get(url, param).then(response => {
      if (response.data.code == '0') {
        dictList.value = response.data.data
      } else {
        ElMessage.error('操作失败！' + response.data.msg)
      }
    })

  }
  const currentPage = ref(1)
  const pageSize = ref(10)
  const getFrom = () =>{
    var url = 'bas/Partner/queryByWorkId'
    var param = {
      id: workflow.workId
    }
    proxy.$axios.get(url, param).then(response => {
      if (response.data.code == '0') {
        insertForm.value = response.data.data

      } else {
        ElMessage.error('操作失败！' + response.data.msg)
      }
    })
  }

	//
	onMounted(() => {
    dictData()
    getFrom()


	})
</script>

<style scoped>
::v-deep .el-form-item {
  width: 100%
}

::v-deep .el-dialog__body {
  background-color: #F2F6FC;
}

.el-date-editor--date {
  width: 100%;
}

::v-deep .diaClass .el-form-item__label {
  width: 140px !important;
}

</style>
