<!--
 * @Descripttion: (物流公司/tb_logistics_company 详情弹窗)
 * @version: (1.0)
 * @Author: (lwh)
 * @Date: (2023-06-18)
 * @LastEditors: (lwh)
 * @LastEditTime: (2023-06-18)
-->
 <template>
  <el-dialog v-model="props.modelValue" title="物流公司信息详情" width="700px" @closed="closeDialog" @open="openDialog">
    <el-form ref="formRef" :model="formData" :disabled="true">

      <el-row :gutter="20">
	  

    
        <el-col :lg="24">
          <el-form-item :label-width="labelWidth" label="物流公司名称">
            <el-input v-model="formData.logisticsCompanyName" />
          </el-form-item>
        </el-col>
        <el-col :lg="24">
          <el-form-item :label-width="labelWidth" label="物流公司编码">
            <el-input v-model="formData.logisticsCompanyCode" />
            <div style="color:#8c8c8c;font-size: 11px;">用于快递100API查询物流信息，请参照 <el-link style="font-size: 11px;" type="primary"
                @click="goTokuaidi100()">物流公司编码表</el-link> </div>
          </el-form-item>
        </el-col>
        <el-col :lg="12">
          <el-form-item :label-width="labelWidth" label="排序">
            <el-input-number v-model.number="formData.logisticsCompanySort" controls-position="right" :min="0" />
          </el-form-item>
        </el-col>





      </el-row>
    </el-form>
  </el-dialog>
</template>

<script setup>
import { ElMessage } from 'element-plus'
import { reactive, ref, watch } from "vue";


// 打开弹窗时回调
const openDialog = async () => {

}

const formData = ref({
  ...props.data,
});
watch(props, async (v) => {
  formData.value = v.data;
});

// -业务参数

// -业务方法
const goTokuaidi100 = () => {
  window.open("https://api.kuaidi100.com/manager/v2/express-company")
}


// 基础参数
const formRef = ref();
const labelWidth = 100;
const { proxy } = getCurrentInstance()
const props = defineProps({
  modelValue: Boolean,
  data: Object,
  done: Function,
});
const emits = defineEmits(["update:modelValue"]);


// -基础方法
const closeDialog = () => {
  emits("update:modelValue", false);
};

</script>
