forked from integrated_whb/integrated_whb_vue
				
			BUG 优化
							parent
							
								
									9eab7f33e8
								
							
						
					
					
						commit
						57487151d6
					
				|  | @ -11,3 +11,9 @@ export const deleteSafetyCustomerView = (params) => | ||||||
| 
 | 
 | ||||||
| export const getTrafficCustomerSelectList = (params) => | export const getTrafficCustomerSelectList = (params) => | ||||||
|   post("/securitycustomer/getTrafficCustomerSelectList", params); // 客户管理列表(list)
 |   post("/securitycustomer/getTrafficCustomerSelectList", params); // 客户管理列表(list)
 | ||||||
|  | 
 | ||||||
|  | export const getTrafficCustomerSelectView = (params) => | ||||||
|  |   post("/securitycustomer/getTrafficCustomerSelectView", params); // 获取客户管理的数据回显
 | ||||||
|  | 
 | ||||||
|  | export const editSafetyCustomerInfo = (params) => | ||||||
|  |   upload("/securitycustomer/edit", params); // 添加
 | ||||||
|  |  | ||||||
|  | @ -11,3 +11,9 @@ export const deleteSafetyLocationView = (params) => | ||||||
| 
 | 
 | ||||||
| export const getTrafficLocationSelectList = (params) => | export const getTrafficLocationSelectList = (params) => | ||||||
|   post("/securitylocation/getTrafficLocationSelectList", params); // 地点管理列表
 |   post("/securitylocation/getTrafficLocationSelectList", params); // 地点管理列表
 | ||||||
|  | 
 | ||||||
|  | export const getSecurityLocationView = (params) => | ||||||
|  |   post("/securitylocation/goEdit", params); // 根据Id获取地点管理信息
 | ||||||
|  | 
 | ||||||
|  | export const editSafetyLocationInfo = (params) => | ||||||
|  |   post("/securitylocation/edit", params); // 添加地段管理
 | ||||||
|  |  | ||||||
|  | @ -0,0 +1,206 @@ | ||||||
|  | <template> | ||||||
|  |   <layout-card> | ||||||
|  |     <el-form | ||||||
|  |       ref="formRef" | ||||||
|  |       :model="data.form" | ||||||
|  |       :rules="rules" | ||||||
|  |       label-width="175px" | ||||||
|  |     > | ||||||
|  |       <!-- 承运信息 --> | ||||||
|  |       <el-divider content-position="left">修改</el-divider> | ||||||
|  | 
 | ||||||
|  |       <el-row :gutter="20"> | ||||||
|  |         <el-col :span="8"> | ||||||
|  |           <el-form-item label="客户类型" prop="CUSTOMERTYPE"> | ||||||
|  |             <el-select | ||||||
|  |               v-model="data.form.CUSTOMERTYPE" | ||||||
|  |               placeholder="请选择客户类型" | ||||||
|  |               clearable | ||||||
|  |             > | ||||||
|  |               <el-option | ||||||
|  |                 v-for="item in CUSTOMERTYPEMENU" | ||||||
|  |                 :key="item.id" | ||||||
|  |                 :label="item.id" | ||||||
|  |                 :value="item.name" | ||||||
|  |               /> | ||||||
|  |             </el-select> | ||||||
|  |           </el-form-item> | ||||||
|  |         </el-col> | ||||||
|  |         <el-col :span="8"> | ||||||
|  |           <el-form-item label="客户名称" prop="CUSTOMERNAME"> | ||||||
|  |             <el-input | ||||||
|  |               v-model="data.form.CUSTOMERNAME" | ||||||
|  |               placeholder="请输入客户名称" | ||||||
|  |               clearable | ||||||
|  |             /> | ||||||
|  |           </el-form-item> | ||||||
|  |         </el-col> | ||||||
|  |       </el-row> | ||||||
|  | 
 | ||||||
|  |       <el-row :gutter="20"> | ||||||
|  |         <el-col :span="23"> | ||||||
|  |           <el-form-item class="end"> | ||||||
|  |             <el-button type="primary" @click="addContact">添加</el-button> | ||||||
|  |           </el-form-item> | ||||||
|  |         </el-col> | ||||||
|  |       </el-row> | ||||||
|  | 
 | ||||||
|  |       <div v-for="(contact, index) in data.form.contacts" :key="index"> | ||||||
|  |         <el-row :gutter="24"> | ||||||
|  |           <el-col :span="7"> | ||||||
|  |             <el-form-item | ||||||
|  |               :label="'联系人' + (index + 1)" | ||||||
|  |               :prop="`contacts.${index}.CONTACT`" | ||||||
|  |             > | ||||||
|  |               <el-input | ||||||
|  |                 v-model="contact.CONTACT" | ||||||
|  |                 placeholder="请输入联系人" | ||||||
|  |                 clearable | ||||||
|  |               /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="7"> | ||||||
|  |             <el-form-item | ||||||
|  |               :label="'联系电话' + (index + 1)" | ||||||
|  |               :prop="`contacts.${index}.CONTACTPHONE`" | ||||||
|  |             > | ||||||
|  |               <el-input | ||||||
|  |                 v-model="contact.CONTACTPHONE" | ||||||
|  |                 placeholder="请输入联系电话" | ||||||
|  |                 clearable | ||||||
|  |               /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="7"> | ||||||
|  |             <el-form-item | ||||||
|  |               :label="'客户地址' + (index + 1)" | ||||||
|  |               :prop="`contacts.${index}.CUSTOMERADDRESS`" | ||||||
|  |             > | ||||||
|  |               <el-input | ||||||
|  |                 v-model="contact.CUSTOMERADDRESS" | ||||||
|  |                 placeholder="请输入客户地址" | ||||||
|  |                 clearable | ||||||
|  |               /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="2"> | ||||||
|  |             <el-button | ||||||
|  |               v-if="index !== 0" | ||||||
|  |               type="danger" | ||||||
|  |               @click="removeContact(index)" | ||||||
|  |             > | ||||||
|  |               删除 | ||||||
|  |               <!-- 添加的删除文字 --> | ||||||
|  |             </el-button> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |       </div> | ||||||
|  |     </el-form> | ||||||
|  |     <div class="tc mt-10"> | ||||||
|  |       <el-button type="primary" @click="fnSubmit">确定</el-button> | ||||||
|  |     </div> | ||||||
|  |   </layout-card> | ||||||
|  | </template> | ||||||
|  | 
 | ||||||
|  | <script setup> | ||||||
|  | import { CUSTOMERTYPEMENU } from "@/assets/js/constant"; | ||||||
|  | import { reactive, ref } from "vue"; | ||||||
|  | import useFormValidate from "@/assets/js/useFormValidate.js"; | ||||||
|  | import { ElMessage } from "element-plus"; | ||||||
|  | import { getTrafficCustomerSelectView, editSafetyCustomerInfo } from "@/request/customer_management.js"; | ||||||
|  | import { useRoute, useRouter } from "vue-router"; | ||||||
|  | const route = useRoute(); | ||||||
|  | const CUSTOMERMANAGEMENT_ID = route.query.CUSTOMERMANAGEMENT_ID; | ||||||
|  | const formRef = ref(null); | ||||||
|  | const rules = { | ||||||
|  |   TRANSPORTATIONCOMPANY: [ | ||||||
|  |     { required: true, message: "请输入运输企业名称", trigger: "blur" }, | ||||||
|  |   ], | ||||||
|  |   CUSTOMERTYPE: [ | ||||||
|  |     { required: true, message: "请输入客户类型", trigger: "blur" }, | ||||||
|  |   ], | ||||||
|  |   CUSTOMERNAME: [ | ||||||
|  |     { required: true, message: "请选择客户名称", trigger: "change" }, | ||||||
|  |   ], | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | const data = reactive({ | ||||||
|  |   form: { | ||||||
|  |     TRANSPORTATIONCOMPANY: "", | ||||||
|  |     CUSTOMERTYPE: "", | ||||||
|  |     CUSTOMERNAME: "", | ||||||
|  |     contacts: [ | ||||||
|  |       { | ||||||
|  |         CONTACT: "", | ||||||
|  |         CONTACTPHONE: "", | ||||||
|  |         CUSTOMERADDRESS: "", | ||||||
|  |       }, | ||||||
|  |     ], | ||||||
|  |   }, | ||||||
|  | }); | ||||||
|  | const router = useRouter(); | ||||||
|  | 
 | ||||||
|  | const fnGetData = async () => { | ||||||
|  |   if (!CUSTOMERMANAGEMENT_ID) return; | ||||||
|  |   const resData = await getTrafficCustomerSelectView({ CUSTOMERMANAGEMENT_ID }); | ||||||
|  |   data.form = resData.pd | ||||||
|  |   data.form.contacts = resData.pd.customercontactList | ||||||
|  | }; | ||||||
|  | fnGetData(); | ||||||
|  | 
 | ||||||
|  | const addContact = () => { | ||||||
|  |   data.form.contacts.push({ | ||||||
|  |     CONTACT: "", | ||||||
|  |     CONTACTPHONE: "", | ||||||
|  |     CUSTOMERADDRESS: "", | ||||||
|  |   }); | ||||||
|  | }; | ||||||
|  | // 删除指定索引的联系人信息 | ||||||
|  | const removeContact = (index) => { | ||||||
|  |   if (index > 0) { | ||||||
|  |     // 防止删除初始化的那一组数据 | ||||||
|  |     data.form.contacts.splice(index, 1); | ||||||
|  |   } | ||||||
|  | }; | ||||||
|  | const fnSubmit = async () => { | ||||||
|  |   await useFormValidate(formRef); | ||||||
|  | 
 | ||||||
|  |   const formData = new FormData(); | ||||||
|  | 
 | ||||||
|  |   formData.append("TRANSPORTATIONCOMPANY", data.form.TRANSPORTATIONCOMPANY); | ||||||
|  |   formData.append("CUSTOMERTYPE", data.form.CUSTOMERTYPE); | ||||||
|  |   formData.append("CUSTOMERNAME", data.form.CUSTOMERNAME); | ||||||
|  | 
 | ||||||
|  |   // 将contacts数组转换为JSON字符串 | ||||||
|  |   const contactsJson = JSON.stringify(data.form.contacts); | ||||||
|  |   // 使用JSON字符串作为contacts的值 | ||||||
|  |   formData.append("contacts", contactsJson); | ||||||
|  |   formData.append("CUSTOMERMANAGEMENT_ID",CUSTOMERMANAGEMENT_ID); | ||||||
|  | 
 | ||||||
|  |   await editSafetyCustomerInfo(formData); | ||||||
|  |   ElMessage.success("修改成功"); | ||||||
|  |   router.back(); | ||||||
|  |   // 重置表单 | ||||||
|  |   data.form.TRANSPORTATIONCOMPANY = ""; | ||||||
|  |   data.form.CUSTOMERTYPE = ""; | ||||||
|  |   data.form.CUSTOMERNAME = ""; | ||||||
|  |   data.form.contacts = [ | ||||||
|  |     { | ||||||
|  |       CONTACT: "", | ||||||
|  |       CONTACTPHONE: "", | ||||||
|  |       CUSTOMERADDRESS: "", | ||||||
|  |     }, | ||||||
|  |   ]; | ||||||
|  | }; | ||||||
|  | </script> | ||||||
|  | 
 | ||||||
|  | <style scoped lang="scss"> | ||||||
|  | .flexBox { | ||||||
|  |   display: flex; | ||||||
|  |   align-items: flex-end; | ||||||
|  | 
 | ||||||
|  |   .addBtn { | ||||||
|  |     margin-left: 12px; | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | </style> | ||||||
|  | @ -58,6 +58,19 @@ | ||||||
|         <el-table-column prop="CREATETIME" label="创建时间" width="200" /> |         <el-table-column prop="CREATETIME" label="创建时间" width="200" /> | ||||||
|         <el-table-column label="操作" width="130"> |         <el-table-column label="操作" width="130"> | ||||||
|           <template #default="{ row }"> |           <template #default="{ row }"> | ||||||
|  |             <el-button | ||||||
|  |               type="primary" | ||||||
|  |               text | ||||||
|  |               link | ||||||
|  |               @click=" | ||||||
|  |                 router.push({ | ||||||
|  |                   path: '/electronic_waybill_management/customer_management/edit', | ||||||
|  |                   query: { CUSTOMERMANAGEMENT_ID: row.CUSTOMERMANAGEMENT_ID }, | ||||||
|  |                 }) | ||||||
|  |               " | ||||||
|  |             > | ||||||
|  |               修改 | ||||||
|  |             </el-button> | ||||||
|             <el-button |             <el-button | ||||||
|               text |               text | ||||||
|               link |               link | ||||||
|  |  | ||||||
|  | @ -34,10 +34,10 @@ | ||||||
|           </el-form-item> |           </el-form-item> | ||||||
|         </el-col> |         </el-col> | ||||||
|         <el-col :span="8"> |         <el-col :span="8"> | ||||||
|           <el-form-item label="行政区域" prop="ADMINISTRATIVEREGIONS"> |           <el-form-item label="行政区域" prop="ADMINISTRATIVEREGIONS_ID"> | ||||||
|             <layout-territory |             <layout-territory | ||||||
|               ref="territoryCascaderRef" |               ref="territoryCascaderRef" | ||||||
|               v-model="data.form.ADMINISTRATIVEREGIONS" |               v-model="data.form.ADMINISTRATIVEREGIONS_ID" | ||||||
|               :level="2" |               :level="2" | ||||||
|               clearable |               clearable | ||||||
|             /> |             /> | ||||||
|  | @ -129,6 +129,7 @@ const data = reactive({ | ||||||
|     LONGITUDE: "", |     LONGITUDE: "", | ||||||
|     LATITUDE: "", |     LATITUDE: "", | ||||||
|     territoryCascaderRef: "", |     territoryCascaderRef: "", | ||||||
|  |     ADMINISTRATIVEREGIONS_ID: [], | ||||||
|   }, |   }, | ||||||
| }); | }); | ||||||
| const territoryCascaderRef = ref(null); | const territoryCascaderRef = ref(null); | ||||||
|  | @ -138,9 +139,10 @@ const fnSubmit = async () => { | ||||||
|   await useFormValidate(formRef); |   await useFormValidate(formRef); | ||||||
|   data.form.ADMINISTRATIVEREGIONS = |   data.form.ADMINISTRATIVEREGIONS = | ||||||
|     territoryCascaderRef.value.getCheckedNodes(); |     territoryCascaderRef.value.getCheckedNodes(); | ||||||
|  |   data.form.ADMINISTRATIVEREGIONS_ID = JSON.stringify(data.form.ADMINISTRATIVEREGIONS_ID); | ||||||
|   await addSafetyLocationView(data.form); |   await addSafetyLocationView(data.form); | ||||||
|   ElMessage.success("添加成功"); |   ElMessage.success("添加成功"); | ||||||
|   router.push("/electronic_waybill_management/location_managemen"); |   router.back(); | ||||||
|   Object.keys(data.form).forEach((key) => { |   Object.keys(data.form).forEach((key) => { | ||||||
|     if (Array.isArray(data.form[key])) { |     if (Array.isArray(data.form[key])) { | ||||||
|       data.form[key] = []; |       data.form[key] = []; | ||||||
|  | @ -148,7 +150,7 @@ const fnSubmit = async () => { | ||||||
|       data.form[key] = ""; |       data.form[key] = ""; | ||||||
|     } |     } | ||||||
|   }); |   }); | ||||||
| }; | } | ||||||
| </script> | </script> | ||||||
| 
 | 
 | ||||||
| <style scoped lang="scss"> | <style scoped lang="scss"> | ||||||
|  |  | ||||||
|  | @ -0,0 +1,184 @@ | ||||||
|  | <template> | ||||||
|  |   <layout-card> | ||||||
|  |     <el-form | ||||||
|  |       ref="formRef" | ||||||
|  |       :model="data.form" | ||||||
|  |       :rules="rules" | ||||||
|  |       label-width="175px" | ||||||
|  |     > | ||||||
|  |       <el-divider content-position="left">添加</el-divider> | ||||||
|  |       <el-row :gutter="20"> | ||||||
|  |         <el-col :span="8"> | ||||||
|  |           <el-form-item label="地点类型" prop="LOCATIONTYPE"> | ||||||
|  |             <el-select | ||||||
|  |               v-model="data.form.LOCATIONTYPE" | ||||||
|  |               placeholder="请选择地点类型" | ||||||
|  |               clearable | ||||||
|  |             > | ||||||
|  |               <el-option | ||||||
|  |                 v-for="item in LOCATIONTYPEMENU" | ||||||
|  |                 :key="item.id" | ||||||
|  |                 :label="item.id" | ||||||
|  |                 :value="item.name" | ||||||
|  |               /> | ||||||
|  |             </el-select> | ||||||
|  |           </el-form-item> | ||||||
|  |         </el-col> | ||||||
|  |         <el-col :span="8"> | ||||||
|  |           <el-form-item label="地点名称" prop="LOCATIONNAME"> | ||||||
|  |             <el-input | ||||||
|  |               v-model="data.form.LOCATIONNAME" | ||||||
|  |               placeholder="请输入地点名称" | ||||||
|  |               clearable | ||||||
|  |             /> | ||||||
|  |           </el-form-item> | ||||||
|  |         </el-col> | ||||||
|  |         <el-col :span="8"> | ||||||
|  |           <el-form-item label="行政区域" prop="ADMINISTRATIVEREGIONS_ARR"> | ||||||
|  |             <layout-territory | ||||||
|  |               ref="territoryCascaderRef" | ||||||
|  |               v-model="data.form.ADMINISTRATIVEREGIONS_ARR" | ||||||
|  |               :level="2" | ||||||
|  |               clearable | ||||||
|  |             /> | ||||||
|  |           </el-form-item> | ||||||
|  |         </el-col> | ||||||
|  |         <el-col :span="8"> | ||||||
|  |           <el-form-item label="地址详情" prop="ADDRESSDETAILS"> | ||||||
|  |             <el-input | ||||||
|  |               v-model="data.form.ADDRESSDETAILS" | ||||||
|  |               placeholder="请输入地址详情" | ||||||
|  |               clearable | ||||||
|  |             /> | ||||||
|  |           </el-form-item> | ||||||
|  |         </el-col> | ||||||
|  |         <el-col :span="12"> | ||||||
|  |           <el-form-item label="经度/纬度" prop="LONGITUDE"> | ||||||
|  |             <div style="flex: 1; display: flex"> | ||||||
|  |               <el-input | ||||||
|  |                 :model-value=" | ||||||
|  |                   (data.form.LONGITUDE ?? '') + '-' + (data.form.LATITUDE ?? '') | ||||||
|  |                 " | ||||||
|  |                 disabled | ||||||
|  |                 style="flex: 1" | ||||||
|  |               /> | ||||||
|  | 
 | ||||||
|  |               <el-button | ||||||
|  |                 type="primary" | ||||||
|  |                 class="ml-10" | ||||||
|  |                 @click="data.mapDialogVisible = true" | ||||||
|  |               > | ||||||
|  |                 地图定位 | ||||||
|  |               </el-button> | ||||||
|  |             </div> | ||||||
|  |           </el-form-item> | ||||||
|  |         </el-col> | ||||||
|  |       </el-row> | ||||||
|  |     </el-form> | ||||||
|  |     <div class="tc mt-10"> | ||||||
|  |       <el-button type="primary" @click="fnSubmit">确定</el-button> | ||||||
|  |     </div> | ||||||
|  |   </layout-card> | ||||||
|  | 
 | ||||||
|  |   <map-dialog | ||||||
|  |     v-model:visible="data.mapDialogVisible" | ||||||
|  |     v-model:latitude="data.form.LATITUDE" | ||||||
|  |     v-model:longitude="data.form.LONGITUDE" | ||||||
|  |   /> | ||||||
|  | </template> | ||||||
|  | 
 | ||||||
|  | <script setup> | ||||||
|  | import { LOCATIONTYPEMENU } from "@/assets/js/constant"; | ||||||
|  | import LayoutTerritory from "@/components/territory/index.vue"; | ||||||
|  | import { reactive, ref } from "vue"; | ||||||
|  | import useFormValidate from "@/assets/js/useFormValidate.js"; | ||||||
|  | import { ElMessage } from "element-plus"; | ||||||
|  | import { | ||||||
|  |   getSecurityLocationView, | ||||||
|  |   editSafetyLocationInfo, | ||||||
|  | } from "@/request/location_management.js"; | ||||||
|  | import MapDialog from "@/views/enterprise_management/information/components/map.vue"; | ||||||
|  | import { useRoute, useRouter } from "vue-router"; | ||||||
|  | 
 | ||||||
|  | const formRef = ref(null); | ||||||
|  | const route = useRoute(); | ||||||
|  | const LOCATIONMANAGEMENT_ID = route.query.LOCATIONMANAGEMENT_ID; | ||||||
|  | 
 | ||||||
|  | const rules = { | ||||||
|  |   CORPINFO_ID: [ | ||||||
|  |     { required: true, message: "请输入运输企业名称", trigger: "blur" }, | ||||||
|  |   ], | ||||||
|  |   LOCATIONTYPE: [ | ||||||
|  |     { required: true, message: "请输入地点类型", trigger: "blur" }, | ||||||
|  |   ], | ||||||
|  |   LOCATIONNAME: [ | ||||||
|  |     { required: true, message: "请选择地点名称", trigger: "change" }, | ||||||
|  |   ], | ||||||
|  |   ADMINISTRATIVEREGIONS_ARR: [ | ||||||
|  |     { required: true, message: "请选择行政区域", trigger: "change" }, | ||||||
|  |   ], | ||||||
|  |   ADDRESSDETAILS: [ | ||||||
|  |     { required: true, message: "请输入行政区域", trigger: "change" }, | ||||||
|  |   ], | ||||||
|  |   LONGITUDE: [{ required: true, message: "请选择经度", trigger: "change" }], | ||||||
|  |   LATITUDE: [{ required: true, message: "请选择维度", trigger: "change" }], | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | const fnGetData = async () => { | ||||||
|  |   if (!LOCATIONMANAGEMENT_ID) return; | ||||||
|  |   const resData = await getSecurityLocationView({ LOCATIONMANAGEMENT_ID }); | ||||||
|  |   data.form = resData.pd; | ||||||
|  |   data.form.ADMINISTRATIVEREGIONS_ARR = | ||||||
|  |     data.form.ADMINISTRATIVEREGIONS_ID.split(","); | ||||||
|  |   console.log(data.form); | ||||||
|  | }; | ||||||
|  | fnGetData(); | ||||||
|  | 
 | ||||||
|  | const data = reactive({ | ||||||
|  |   mapDialogVisible: false, | ||||||
|  |   form: { | ||||||
|  |     CORPINFO_ID: "", | ||||||
|  |     LOCATIONTYPE: "", | ||||||
|  |     LOCATIONNAME: "", | ||||||
|  |     ADDRESSDETAILS: "", | ||||||
|  |     LONGITUDE: "", | ||||||
|  |     LATITUDE: "", | ||||||
|  |     territoryCascaderRef: "", | ||||||
|  |     ADMINISTRATIVEREGIONS_ARR: [], | ||||||
|  |     ADMINISTRATIVEREGIONS_ID: "", | ||||||
|  |     ADMINISTRATIVEREGIONS: "", | ||||||
|  |   }, | ||||||
|  | }); | ||||||
|  | const territoryCascaderRef = ref(null); | ||||||
|  | const router = useRouter(); | ||||||
|  | 
 | ||||||
|  | const fnSubmit = async () => { | ||||||
|  |   await useFormValidate(formRef); | ||||||
|  |   console.log(data.form.ADMINISTRATIVEREGIONS_ARR); | ||||||
|  |   data.form.ADMINISTRATIVEREGIONS_ID = | ||||||
|  |     data.form.ADMINISTRATIVEREGIONS_ARR.join(","); | ||||||
|  |   data.form.ADMINISTRATIVEREGIONS = | ||||||
|  |     territoryCascaderRef.value.getCheckedNodes(); | ||||||
|  |   await editSafetyLocationInfo(data.form); | ||||||
|  |   ElMessage.success("修改成功"); | ||||||
|  |   router.back(); | ||||||
|  |   Object.keys(data.form).forEach((key) => { | ||||||
|  |     if (Array.isArray(data.form[key])) { | ||||||
|  |       data.form[key] = []; | ||||||
|  |     } else { | ||||||
|  |       data.form[key] = ""; | ||||||
|  |     } | ||||||
|  |   }); | ||||||
|  | }; | ||||||
|  | </script> | ||||||
|  | 
 | ||||||
|  | <style scoped lang="scss"> | ||||||
|  | .flexBox { | ||||||
|  |   display: flex; | ||||||
|  |   align-items: flex-end; | ||||||
|  | 
 | ||||||
|  |   .addBtn { | ||||||
|  |     margin-left: 12px; | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | </style> | ||||||
|  | @ -56,6 +56,19 @@ | ||||||
|         <el-table-column prop="CREATETIME" label="创建时间" width="250" /> |         <el-table-column prop="CREATETIME" label="创建时间" width="250" /> | ||||||
|         <el-table-column label="操作" width="150"> |         <el-table-column label="操作" width="150"> | ||||||
|           <template #default="{ row }"> |           <template #default="{ row }"> | ||||||
|  |             <el-button | ||||||
|  |               type="primary" | ||||||
|  |               text | ||||||
|  |               link | ||||||
|  |               @click=" | ||||||
|  |                 router.push({ | ||||||
|  |                   path: '/electronic_waybill_management/location_managemen/edit', | ||||||
|  |                   query: { LOCATIONMANAGEMENT_ID: row.LOCATIONMANAGEMENT_ID }, | ||||||
|  |                 }) | ||||||
|  |               " | ||||||
|  |             > | ||||||
|  |               修改 | ||||||
|  |             </el-button> | ||||||
|             <el-button |             <el-button | ||||||
|               text |               text | ||||||
|               link |               link | ||||||
|  |  | ||||||
|  | @ -416,8 +416,6 @@ const fnGetData = async () => { | ||||||
|   const resData = await getSafetyWaybillreInfo({ WAYBILLREGISTRATION_ID }); |   const resData = await getSafetyWaybillreInfo({ WAYBILLREGISTRATION_ID }); | ||||||
|   data.form = resData.pd; |   data.form = resData.pd; | ||||||
|   data.form.DISPATCHER = data.form.DISPATCHER.split(","); |   data.form.DISPATCHER = data.form.DISPATCHER.split(","); | ||||||
|   data.form.CLIENTCONTACTPERSON = data.form.ENTRUST_PERSON; // 委托确认方 |  | ||||||
|   data.form.CONFIRMINGPERSON = data.form.CONFIRM_PERSON; // 确认方地址 |  | ||||||
|   data.form.SHIPPINGADDRESS = data.form.SHIPPING_ADDR; // 起运地址 |   data.form.SHIPPINGADDRESS = data.form.SHIPPING_ADDR; // 起运地址 | ||||||
|   data.form.DESTINATIONADDRESS = data.form.DESTINATION_ADDR; // 目的地址 |   data.form.DESTINATIONADDRESS = data.form.DESTINATION_ADDR; // 目的地址 | ||||||
|   data.userList = data.form.names; // 获取部门下的或有人员 |   data.userList = data.form.names; // 获取部门下的或有人员 | ||||||
|  | @ -664,13 +662,6 @@ const fnSubmit = async () => { | ||||||
|   await editSafetyWaybillreInfo(formData); |   await editSafetyWaybillreInfo(formData); | ||||||
|   ElMessage.success("修改成功"); |   ElMessage.success("修改成功"); | ||||||
|   await router.push("/electronic_waybill_management/waybill_registration"); |   await router.push("/electronic_waybill_management/waybill_registration"); | ||||||
|   Object.keys(data.form).forEach((key) => { |  | ||||||
|     if (Array.isArray(data.form[key])) { |  | ||||||
|       data.form[key] = []; |  | ||||||
|     } else { |  | ||||||
|       data.form[key] = ""; |  | ||||||
|     } |  | ||||||
|   }); |  | ||||||
| }; | }; | ||||||
| </script> | </script> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -614,6 +614,7 @@ const data = reactive({ | ||||||
| const fnGetData = async () => { | const fnGetData = async () => { | ||||||
|   const resData = await getEnterpriseInfo(); |   const resData = await getEnterpriseInfo(); | ||||||
|   data.form = resData.pd; |   data.form = resData.pd; | ||||||
|  |   console.log(data.form); | ||||||
|   data.form.bus_images = addingPrefixToFile(resData.busImgs); |   data.form.bus_images = addingPrefixToFile(resData.busImgs); | ||||||
|   data.form.official_seal_file = [ |   data.form.official_seal_file = [ | ||||||
|     { |     { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue