diff --git a/src/views/invoicing/configSuppliersApply/components/NuConfigSuppliersApplyForm.vue b/src/views/invoicing/configSuppliersApply/components/NuConfigSuppliersApplyForm.vue index 403495d..c64ad74 100644 --- a/src/views/invoicing/configSuppliersApply/components/NuConfigSuppliersApplyForm.vue +++ b/src/views/invoicing/configSuppliersApply/components/NuConfigSuppliersApplyForm.vue @@ -122,6 +122,7 @@ const formData = reactive>({ suppliersNature_dictText: '', applyId: '', suppliersId: '', + sourceType: '', }); const { createMessage } = useMessage(); const labelCol = ref({ xs: { span: 24 }, sm: { span: 6 } }); diff --git a/src/views/invoicing/configSuppliersInfo/ConfigSuppliersInfo.data.ts b/src/views/invoicing/configSuppliersInfo/ConfigSuppliersInfo.data.ts index ef09a21..a883470 100644 --- a/src/views/invoicing/configSuppliersInfo/ConfigSuppliersInfo.data.ts +++ b/src/views/invoicing/configSuppliersInfo/ConfigSuppliersInfo.data.ts @@ -46,6 +46,19 @@ export const columns: BasicColumn[] = [ dataIndex: 'izEnabled_dictText', width:'100px' }, + { + title: '来源', + align: "center", + dataIndex: 'sourceType', + width:'100px', + customRender: ({ text, record }) => { + if (text == '1') { + return '平台新增'; + }else{ + return '小程序注册'; + } + }, + }, // { // title: '开户行账号', // align:"center", @@ -192,10 +205,10 @@ export const formSchema: FormSchema[] = [ { label: '资质照片', field: 'imgPath', - component: 'JImageUpload', - componentProps:{ - fileMax: 1 - }, + component: 'JImageUpload', + componentProps:{ + fileMax: 1 + }, }, // TODO 主键隐藏字段,目前写死为ID { diff --git a/src/views/invoicing/configSuppliersInfo/ConfigSuppliersInfoList.vue b/src/views/invoicing/configSuppliersInfo/ConfigSuppliersInfoList.vue index 25352d2..9ce957e 100644 --- a/src/views/invoicing/configSuppliersInfo/ConfigSuppliersInfoList.vue +++ b/src/views/invoicing/configSuppliersInfo/ConfigSuppliersInfoList.vue @@ -6,123 +6,111 @@ - - + + - + + + 查询 重置 + + {{ toggleSearchStatus ? '收起' : '展开' }} + + -
- {{registerTable.tableData}} -
- - + + - + - - + \ No newline at end of file + diff --git a/src/views/invoicing/configSuppliersInfo/components/ConfigSuppliersInfoForm.vue b/src/views/invoicing/configSuppliersInfo/components/ConfigSuppliersInfoForm.vue index 8a4832b..922931f 100644 --- a/src/views/invoicing/configSuppliersInfo/components/ConfigSuppliersInfoForm.vue +++ b/src/views/invoicing/configSuppliersInfo/components/ConfigSuppliersInfoForm.vue @@ -1,70 +1,202 @@ - \ No newline at end of file + } + + /** + * 提交数据 + */ + async function submitForm() { + try { + // 触发表单验证 + await validate(); + } catch ({ errorFields }) { + if (errorFields) { + const firstField = errorFields[0]; + if (firstField) { + formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' }); + } + } + return Promise.reject(errorFields); + } + confirmLoading.value = true; + const isUpdate = ref(false); + //时间格式化 + let model = formData; + if (model.id) { + isUpdate.value = true; + } + //循环数据 + for (let data in model) { + //如果该数据是数组并且是字符串类型 + if (model[data] instanceof Array) { + let valueType = getValueType(formRef.value.getProps, data); + //如果是字符串类型的需要变成以逗号分割的字符串 + if (valueType === 'string') { + model[data] = model[data].join(','); + } + } + } + await saveOrUpdate(model, isUpdate.value) + .then((res) => { + console.log("🚀 ~ submitForm ~ res:", res) + emit('ok'); + }) + .finally(() => { + confirmLoading.value = false; + }); + } + + + defineExpose({ + add, + edit, + submitForm, + }); + + + diff --git a/src/views/invoicing/configSuppliersInfo/components/ConfigSuppliersInfoModal.vue b/src/views/invoicing/configSuppliersInfo/components/ConfigSuppliersInfoModal.vue index 3df08bc..1897190 100644 --- a/src/views/invoicing/configSuppliersInfo/components/ConfigSuppliersInfoModal.vue +++ b/src/views/invoicing/configSuppliersInfo/components/ConfigSuppliersInfoModal.vue @@ -1,109 +1,84 @@ + - +