This commit is contained in:
zmj 2024-05-21 18:50:45 +08:00
parent afca312830
commit 6b8f86f21c
2 changed files with 16 additions and 10 deletions

View File

@ -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'

View File

@ -127,13 +127,13 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="供应商电话" prop="service_phone">
<el-input v-model="formData.service_phone" clearable placeholder="请输入供应商电话" :readonly="false" />
<el-form-item label="供应商电话" prop="phone">
<el-input v-model="formData.phone" clearable placeholder="请输入供应商电话" :readonly="false" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="供应商余额" prop="mer_money">
<el-input v-model="formData.mer_money" clearable placeholder="请输入供应商余额" :readonly="false" />
<el-form-item label="供应商余额">
<el-input v-model="formData.mer_money" clearable placeholder="请输入供应商余额" readonly />
</el-form-item>
</el-col>
<el-col :span="8">
@ -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<any>({
message: '请选择供应商是否禁用0锁定,1正常',
trigger: ['blur']
}],
service_phone: [{
phone: [{
required: true,
message: '请输入供应商电话',
trigger: ['blur']
@ -318,6 +319,10 @@ const setFormData = async (data: Record<any, any>) => {
formData[key] = data[key]
}
}
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)
@ -340,6 +345,7 @@ const getDetail = async (row: Record<string, any>) => {
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(',')