wzg пре 1 година
родитељ
комит
873895eb63

+ 4 - 0
src/views/cargoOwnerManage/cargoOwnerCompanyDetail.vue

@@ -17,6 +17,8 @@
       <div class="show-input">{{ contactName }}</div>
       <div class="show-input">{{ contactName }}</div>
       <div class="normal-label">联系人手机号</div>
       <div class="normal-label">联系人手机号</div>
       <div class="show-input">{{ contactPhone }}</div>
       <div class="show-input">{{ contactPhone }}</div>
+      <div class="normal-label">联系人邮箱</div>
+      <div class="show-input">{{ contactEmail }}</div>
     </div>
     </div>
     <div class="df aic mt20">
     <div class="df aic mt20">
       <div class="normal-label">过期时间</div>
       <div class="normal-label">过期时间</div>
@@ -316,6 +318,7 @@ const route = useRoute();
 let cargoOwnerName = ref();
 let cargoOwnerName = ref();
 let contactName = ref();
 let contactName = ref();
 let contactPhone = ref();
 let contactPhone = ref();
+let contactEmail = ref();
 async function getCargoOwnerCompanyDetail() {
 async function getCargoOwnerCompanyDetail() {
   let res = await api.getCargoOwnerCompanyDetail({
   let res = await api.getCargoOwnerCompanyDetail({
     cargoOwnerId: route.query.id,
     cargoOwnerId: route.query.id,
@@ -324,6 +327,7 @@ async function getCargoOwnerCompanyDetail() {
     cargoOwnerName.value = res.data.result.cargoOwnerName;
     cargoOwnerName.value = res.data.result.cargoOwnerName;
     contactName.value = res.data.result.contactName;
     contactName.value = res.data.result.contactName;
     contactPhone.value = res.data.result.contactPhone;
     contactPhone.value = res.data.result.contactPhone;
+    contactEmail.value = res.data.result.contactEmail;
     expiredTime.value = res.data.result.expiredTime;
     expiredTime.value = res.data.result.expiredTime;
   } else {
   } else {
     console.log(res);
     console.log(res);

+ 40 - 6
src/views/cargoOwnerManage/cargoOwnerCompanyList.vue

@@ -9,11 +9,17 @@
           clearable
           clearable
           style="width: 330px"
           style="width: 330px"
         ></el-input>
         ></el-input>
-        <div class="seach-btn" @click="getCargoOwnerCompanyList(1)">查询</div>
+        <el-button
+          class="ml20"
+          type="primary"
+          @click="getCargoOwnerCompanyList(1)"
+        >
+          查询
+        </el-button>
       </div>
       </div>
-      <div class="cargo-owner-add" @click="dialogFormVisible = true">
+      <el-button type="primary" @click="dialogFormVisible = true">
         添加货主公司
         添加货主公司
-      </div>
+      </el-button>
       <el-dialog title="添加货主公司" v-model="dialogFormVisible">
       <el-dialog title="添加货主公司" v-model="dialogFormVisible">
         <template v-slot:default>
         <template v-slot:default>
           <el-form
           <el-form
@@ -41,6 +47,12 @@
                 v-model="ruleForm.contactPhone"
                 v-model="ruleForm.contactPhone"
               ></el-input>
               ></el-input>
             </el-form-item>
             </el-form-item>
+            <el-form-item prop="contactEmail" label="联系人邮箱">
+              <el-input
+                style="width: 280px"
+                v-model="ruleForm.contactEmail"
+              ></el-input>
+            </el-form-item>
             <el-form-item prop="expiredTime" label="过期时间">
             <el-form-item prop="expiredTime" label="过期时间">
               <el-date-picker
               <el-date-picker
                 v-model="ruleForm.expiredTime"
                 v-model="ruleForm.expiredTime"
@@ -89,6 +101,12 @@
           min-width="160"
           min-width="160"
           align="center"
           align="center"
         ></el-table-column>
         ></el-table-column>
+        <el-table-column
+          prop="contactEmail"
+          label="联系人邮箱"
+          min-width="160"
+          align="center"
+        ></el-table-column>
         <el-table-column
         <el-table-column
           prop="createTime"
           prop="createTime"
           label="入驻时间"
           label="入驻时间"
@@ -143,6 +161,8 @@ const ruleForm = ref({
   companyName: "",
   companyName: "",
   contactName: "",
   contactName: "",
   contactPhone: "",
   contactPhone: "",
+
+  contactEmail: "",
 });
 });
 const rules = ref({
 const rules = ref({
   companyName: [
   companyName: [
@@ -153,6 +173,9 @@ const rules = ref({
     { required: false, message: "请填写手机号", trigger: "blur" },
     { required: false, message: "请填写手机号", trigger: "blur" },
     { min: 11, max: 11, message: "请正确填写手机号", trigger: "blur" },
     { min: 11, max: 11, message: "请正确填写手机号", trigger: "blur" },
   ],
   ],
+  contactEmail: [
+    { required: true, message: "请填写联系人邮箱", trigger: "blur" },
+  ],
   expiredTime: [
   expiredTime: [
     { required: false, message: "请填写过期时间", trigger: "blur" },
     { required: false, message: "请填写过期时间", trigger: "blur" },
   ],
   ],
@@ -180,15 +203,26 @@ function resetForm() {
 async function addCargoOwnerCompany() {
 async function addCargoOwnerCompany() {
   form.value.validate(async (valid) => {
   form.value.validate(async (valid) => {
     if (valid) {
     if (valid) {
-      let { companyName, contactName, contactPhone, expiredTime } =
-        ruleForm.value;
+      let {
+        companyName,
+        contactName,
+        contactPhone,
+        contactEmail,
+        expiredTime,
+      } = ruleForm.value;
+      const loading = ElLoading.service({
+        lock: true,
+        text: "正在提交...",
+        background: "rgba(0, 0, 0, 0.7)",
+      });
       let res = await api.addCargoOwnerCompany({
       let res = await api.addCargoOwnerCompany({
         companyName,
         companyName,
         contactName,
         contactName,
         contactPhone,
         contactPhone,
+        contactEmail,
         expiredTime,
         expiredTime,
       });
       });
-      console.log(res);
+      loading.close();
       if (res.data.status == 0) {
       if (res.data.status == 0) {
         ElNotification.success({
         ElNotification.success({
           title: "添加成功",
           title: "添加成功",