diff --git a/src/api/system/source.ts b/src/api/system/source.ts index e0fabe7..3d54784 100644 --- a/src/api/system/source.ts +++ b/src/api/system/source.ts @@ -7,7 +7,7 @@ // 列表查询 export function getSoucreList(data: object) { return request({ - url: `${prefix}/supplier/list`, + url: `${prefix}/supplier/listPage`, method: 'post', data, }) @@ -21,3 +21,29 @@ data, }) } + +// 查看详情 +export function getSoucreListDetail(data: object) { + return request({ + url: `${prefix}/supplier/detail`, + method: 'post', + data, + }) +} + +// 省级联动 +export function getSoucreListlevelType(pid: string) { + return request({ + url: `/ext/area/list?pid=${pid}`, + method: 'get', + }) +} + +// 查看详情 +export function getSoucreListAdd(data: object) { + return request({ + url: `${prefix}/supplier/add`, + method: 'post', + data, + }) +} diff --git a/src/api/system/source.ts b/src/api/system/source.ts index e0fabe7..3d54784 100644 --- a/src/api/system/source.ts +++ b/src/api/system/source.ts @@ -7,7 +7,7 @@ // 列表查询 export function getSoucreList(data: object) { return request({ - url: `${prefix}/supplier/list`, + url: `${prefix}/supplier/listPage`, method: 'post', data, }) @@ -21,3 +21,29 @@ data, }) } + +// 查看详情 +export function getSoucreListDetail(data: object) { + return request({ + url: `${prefix}/supplier/detail`, + method: 'post', + data, + }) +} + +// 省级联动 +export function getSoucreListlevelType(pid: string) { + return request({ + url: `/ext/area/list?pid=${pid}`, + method: 'get', + }) +} + +// 查看详情 +export function getSoucreListAdd(data: object) { + return request({ + url: `${prefix}/supplier/add`, + method: 'post', + data, + }) +} diff --git a/src/views/measure/source/list.vue b/src/views/measure/source/list.vue index cad751e..f23e6aa 100644 --- a/src/views/measure/source/list.vue +++ b/src/views/measure/source/list.vue @@ -73,28 +73,35 @@ listQuery.value.offset = 1 } getSoucreList(listQuery.value).then((response) => { - list.value = response.data + list.value = response.data.rows total.value = parseInt(response.data.total) listLoading.value = false }) } fetchData(true) +// 详情id +const infoId = ref('0') +// 点击按钮 +const buttonType = ref('') // 多选发生改变时 -const handleSelectionChange = (e: any) => { } +const handleSelectionChange = (e: any) => { + console.log(e) +} // 点击编辑/详情 -const handleEdit = (index: string, row: object) => { +const handleEdit = (index: string, row: object, value: string) => { + buttonType.value = value + infoId.value = row.id show.value = false } // 点击删除 const handleDelete = (index: string, row: object) => { - // getSoucreListDelete(row.target.id).then((res) => { - - // }) + getSoucreListDelete({ id: row.id }).then((res) => { + }) } // 分页 -const handleSizeChange = (val: string) => { } +const handleSizeChange = (val: string) => {} // 分页 -const handleCurrentChange = (val: string) => { } +const handleCurrentChange = (val: string) => {} // 点击搜索 const searchList = () => { fetchData(true) @@ -109,63 +116,130 @@ limit: 20, } } +// 关闭编辑 +const close = () => { + show.value = true +} +// 点击右上角一排按钮 +const handelClick = (type: string) => { + if (type === '新建') { + buttonType.value = '' + show.value = false + } +} diff --git a/src/api/system/source.ts b/src/api/system/source.ts index e0fabe7..3d54784 100644 --- a/src/api/system/source.ts +++ b/src/api/system/source.ts @@ -7,7 +7,7 @@ // 列表查询 export function getSoucreList(data: object) { return request({ - url: `${prefix}/supplier/list`, + url: `${prefix}/supplier/listPage`, method: 'post', data, }) @@ -21,3 +21,29 @@ data, }) } + +// 查看详情 +export function getSoucreListDetail(data: object) { + return request({ + url: `${prefix}/supplier/detail`, + method: 'post', + data, + }) +} + +// 省级联动 +export function getSoucreListlevelType(pid: string) { + return request({ + url: `/ext/area/list?pid=${pid}`, + method: 'get', + }) +} + +// 查看详情 +export function getSoucreListAdd(data: object) { + return request({ + url: `${prefix}/supplier/add`, + method: 'post', + data, + }) +} diff --git a/src/views/measure/source/list.vue b/src/views/measure/source/list.vue index cad751e..f23e6aa 100644 --- a/src/views/measure/source/list.vue +++ b/src/views/measure/source/list.vue @@ -73,28 +73,35 @@ listQuery.value.offset = 1 } getSoucreList(listQuery.value).then((response) => { - list.value = response.data + list.value = response.data.rows total.value = parseInt(response.data.total) listLoading.value = false }) } fetchData(true) +// 详情id +const infoId = ref('0') +// 点击按钮 +const buttonType = ref('') // 多选发生改变时 -const handleSelectionChange = (e: any) => { } +const handleSelectionChange = (e: any) => { + console.log(e) +} // 点击编辑/详情 -const handleEdit = (index: string, row: object) => { +const handleEdit = (index: string, row: object, value: string) => { + buttonType.value = value + infoId.value = row.id show.value = false } // 点击删除 const handleDelete = (index: string, row: object) => { - // getSoucreListDelete(row.target.id).then((res) => { - - // }) + getSoucreListDelete({ id: row.id }).then((res) => { + }) } // 分页 -const handleSizeChange = (val: string) => { } +const handleSizeChange = (val: string) => {} // 分页 -const handleCurrentChange = (val: string) => { } +const handleCurrentChange = (val: string) => {} // 点击搜索 const searchList = () => { fetchData(true) @@ -109,63 +116,130 @@ limit: 20, } } +// 关闭编辑 +const close = () => { + show.value = true +} +// 点击右上角一排按钮 +const handelClick = (type: string) => { + if (type === '新建') { + buttonType.value = '' + show.value = false + } +} diff --git a/src/views/measure/source/listAdd.vue b/src/views/measure/source/listAdd.vue index 609ba57..bf2a4ad 100644 --- a/src/views/measure/source/listAdd.vue +++ b/src/views/measure/source/listAdd.vue @@ -1,14 +1,164 @@ diff --git a/src/api/system/source.ts b/src/api/system/source.ts index e0fabe7..3d54784 100644 --- a/src/api/system/source.ts +++ b/src/api/system/source.ts @@ -7,7 +7,7 @@ // 列表查询 export function getSoucreList(data: object) { return request({ - url: `${prefix}/supplier/list`, + url: `${prefix}/supplier/listPage`, method: 'post', data, }) @@ -21,3 +21,29 @@ data, }) } + +// 查看详情 +export function getSoucreListDetail(data: object) { + return request({ + url: `${prefix}/supplier/detail`, + method: 'post', + data, + }) +} + +// 省级联动 +export function getSoucreListlevelType(pid: string) { + return request({ + url: `/ext/area/list?pid=${pid}`, + method: 'get', + }) +} + +// 查看详情 +export function getSoucreListAdd(data: object) { + return request({ + url: `${prefix}/supplier/add`, + method: 'post', + data, + }) +} diff --git a/src/views/measure/source/list.vue b/src/views/measure/source/list.vue index cad751e..f23e6aa 100644 --- a/src/views/measure/source/list.vue +++ b/src/views/measure/source/list.vue @@ -73,28 +73,35 @@ listQuery.value.offset = 1 } getSoucreList(listQuery.value).then((response) => { - list.value = response.data + list.value = response.data.rows total.value = parseInt(response.data.total) listLoading.value = false }) } fetchData(true) +// 详情id +const infoId = ref('0') +// 点击按钮 +const buttonType = ref('') // 多选发生改变时 -const handleSelectionChange = (e: any) => { } +const handleSelectionChange = (e: any) => { + console.log(e) +} // 点击编辑/详情 -const handleEdit = (index: string, row: object) => { +const handleEdit = (index: string, row: object, value: string) => { + buttonType.value = value + infoId.value = row.id show.value = false } // 点击删除 const handleDelete = (index: string, row: object) => { - // getSoucreListDelete(row.target.id).then((res) => { - - // }) + getSoucreListDelete({ id: row.id }).then((res) => { + }) } // 分页 -const handleSizeChange = (val: string) => { } +const handleSizeChange = (val: string) => {} // 分页 -const handleCurrentChange = (val: string) => { } +const handleCurrentChange = (val: string) => {} // 点击搜索 const searchList = () => { fetchData(true) @@ -109,63 +116,130 @@ limit: 20, } } +// 关闭编辑 +const close = () => { + show.value = true +} +// 点击右上角一排按钮 +const handelClick = (type: string) => { + if (type === '新建') { + buttonType.value = '' + show.value = false + } +} diff --git a/src/views/measure/source/listAdd.vue b/src/views/measure/source/listAdd.vue index 609ba57..bf2a4ad 100644 --- a/src/views/measure/source/listAdd.vue +++ b/src/views/measure/source/listAdd.vue @@ -1,14 +1,164 @@ diff --git a/src/views/measure/source/list_interface.ts b/src/views/measure/source/list_interface.ts index cebfa79..9144ddc 100644 --- a/src/views/measure/source/list_interface.ts +++ b/src/views/measure/source/list_interface.ts @@ -11,5 +11,39 @@ businessContent: string supplierName: string supplierNo: string + bankAccount: string + bankAccountNumber: string + bankName: string + briefName: string + businessScope: string + companyAddress: string + companyArea: string + companyCity: string + companyCountry: string + companyProvince: string + createTime: string + director: string + id: string + fax: string + invoiceAddress: string + invoiceArea: string + invoiceCity: string + invoiceCountry: string + invoiceProvince: string + mailbox: string + minioFileName: string + mobile: string + phone: string + postalCode: string + remark: string + taxNumber: string + website: string + traceSupplierPersonList: [{ + personNo: string + name: string + department: string + job: string + phone: string + }] }