diff --git a/.env.development b/.env.development index ae28029..1d2caa2 100644 --- a/.env.development +++ b/.env.development @@ -1,5 +1,5 @@ NODE_ENV = 'development' VITE_NOW_TYPE = 'dist' # Base API -VITE_APP_BASE_URL='http://192.168.1.13:8546' -# VITE_APP_BASE_URL='https://erp.lihaink.cn' +# VITE_APP_BASE_URL='http://192.168.1.13:8546' +VITE_APP_BASE_URL='https://erp.lihaink.cn' diff --git a/src/views/data/supplier/supplier/edit.vue b/src/views/data/supplier/supplier/edit.vue index 20ae55b..a77a708 100644 --- a/src/views/data/supplier/supplier/edit.vue +++ b/src/views/data/supplier/supplier/edit.vue @@ -127,13 +127,13 @@ - - + + - - + + @@ -236,12 +236,13 @@ const formData = reactive({ commission_switch: '', long: '', lat: '', - service_phone: '', + phone: '', mer_money: '', financial_bank: '', financial_wechat: '', financial_alipay: '', financial_type: '', + service_phone: "", sys_labels_arr: [] }) const dataJSON = ref({}) @@ -292,7 +293,7 @@ const formRules = reactive({ message: '请选择供应商是否禁用0锁定,1正常', trigger: ['blur'] }], - service_phone: [{ + phone: [{ required: true, message: '请输入供应商电话', trigger: ['blur'] @@ -318,8 +319,12 @@ const setFormData = async (data: Record) => { formData[key] = data[key] } } - dataJSON.value = JSON.parse(data.data_json||'{}'); - if(!formData.mer_address) formData.mer_address = dataJSON.value.company_address; + formData.phone = formData.service_phone || formData.phone + formData.financial_type = data.financial_type == 0 ? '' : data.financial_type + formData.sys_labels_text = data.sys_labels_text + dataJSON.value = JSON.parse(data.data_json || '{}') + dataJSON.value = JSON.parse(data.data_json || '{}'); + if (!formData.mer_address) formData.mer_address = dataJSON.value.company_address; await getAreaList(formData.city_id, true) await getTownList(formData.area_id, true) getVilllageList(formData.street_id) @@ -340,6 +345,7 @@ const getDetail = async (row: Record) => { const handleSubmit = async () => { await formRef.value?.validate() const data = { ...formData, } + data.phone = data.service_phone || data.phone data.sys_labels = data.sys_labels_arr.map(item => { return item.id }).join(',')