From 4284a5d34ec38a080e61e37453fb6539599ef8b0 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 18 Sep 2020 17:55:56 +0800 Subject: [PATCH] certunit --- client/src/api/certunit.js | 40 ++++++++++++++ client/src/api/unit.js | 40 -------------- client/src/views/certapp/certappcreate.vue | 3 +- client/src/views/certapp/certappform.vue | 6 +-- client/src/views/certapp/certapphandle.vue | 16 +++--- .../certapp/{productunit.vue => certunit.vue} | 29 ++++------- server/apps/certificate/__init__.py | 0 server/apps/certificate/admin.py | 3 ++ server/apps/certificate/apps.py | 5 ++ .../apps/certificate/migrations/__init__.py | 0 server/apps/certificate/models.py | 18 +++++++ server/apps/certificate/tests.py | 3 ++ server/apps/certificate/views.py | 3 ++ server/apps/crm/migrations/0012_product.py | 38 ++++++++++++++ .../crm/migrations/0013_auto_20200918_1557.py | 52 +++++++++++++++++++ .../crm/migrations/0014_auto_20200918_1557.py | 51 ++++++++++++++++++ server/apps/crm/models.py | 14 +++-- server/apps/crm/serializers.py | 10 +++- server/apps/crm/urls.py | 5 +- server/apps/crm/views.py | 27 +++++++++- .../migrations/0035_auto_20200918_1433.py | 41 +++++++++++++++ .../migrations/0036_auto_20200918_1453.py | 40 ++++++++++++++ .../migrations/0037_auto_20200918_1557.py | 40 ++++++++++++++ server/apps/project/models.py | 24 ++++----- server/apps/project/serializers.py | 6 +-- server/apps/project/urls.py | 3 -- server/apps/project/views.py | 13 ----- 27 files changed, 413 insertions(+), 117 deletions(-) create mode 100644 client/src/api/certunit.js delete mode 100644 client/src/api/unit.js rename client/src/views/certapp/{productunit.vue => certunit.vue} (92%) create mode 100644 server/apps/certificate/__init__.py create mode 100644 server/apps/certificate/admin.py create mode 100644 server/apps/certificate/apps.py create mode 100644 server/apps/certificate/migrations/__init__.py create mode 100644 server/apps/certificate/models.py create mode 100644 server/apps/certificate/tests.py create mode 100644 server/apps/certificate/views.py create mode 100644 server/apps/crm/migrations/0012_product.py create mode 100644 server/apps/crm/migrations/0013_auto_20200918_1557.py create mode 100644 server/apps/crm/migrations/0014_auto_20200918_1557.py create mode 100644 server/apps/project/migrations/0035_auto_20200918_1433.py create mode 100644 server/apps/project/migrations/0036_auto_20200918_1453.py create mode 100644 server/apps/project/migrations/0037_auto_20200918_1557.py diff --git a/client/src/api/certunit.js b/client/src/api/certunit.js new file mode 100644 index 0000000..78096d7 --- /dev/null +++ b/client/src/api/certunit.js @@ -0,0 +1,40 @@ +import request from '@/utils/request' + +export function getCertunitList(query) { + return request({ + url: '/crm/certunit/', + method: 'get', + params: query + }) +} + +export function createCertunit(data) { + return request({ + url: '/crm/certunit/', + method: 'post', + data + }) +} + +export function deleteCertunit(id) { + return request({ + url: `/crm/certunit/${id}/`, + method: 'delete' + }) +} + + +export function updateCertunit(id, data) { + return request({ + url: `/crm/certunit/${id}/`, + method: 'put', + data + }) +} + +export function getCertunit(id) { + return request({ + url: `/crm/certunit/${id}/`, + method: 'get', + }) +} diff --git a/client/src/api/unit.js b/client/src/api/unit.js deleted file mode 100644 index 6d09c5b..0000000 --- a/client/src/api/unit.js +++ /dev/null @@ -1,40 +0,0 @@ -import request from '@/utils/request' - -export function getUnitList(query) { - return request({ - url: '/project/unit/', - method: 'get', - params: query - }) -} - -export function createUnit(data) { - return request({ - url: '/project/unit/', - method: 'post', - data - }) -} - -export function deleteUnit(id) { - return request({ - url: `/project/unit/${id}/`, - method: 'delete' - }) -} - - -export function updateUnit(id, data) { - return request({ - url: `/project/unit/${id}/`, - method: 'put', - data - }) -} - -export function getUnit(id) { - return request({ - url: `/project/unit/${id}/`, - method: 'get', - }) -} diff --git a/client/src/views/certapp/certappcreate.vue b/client/src/views/certapp/certappcreate.vue index f250f0b..7418d48 100644 --- a/client/src/views/certapp/certappcreate.vue +++ b/client/src/views/certapp/certappcreate.vue @@ -10,12 +10,11 @@