diff --git a/.env.base b/.env.base index a5f94e7..d470c46 100644 --- a/.env.base +++ b/.env.base @@ -4,12 +4,12 @@ VITE_NODE_ENV=development VITE_DEV=true # 请求路径 -# VITE_BASE_URL='http://118.31.23.45:48080' -VITE_BASE_URL='http://114.55.169.15:48080' +VITE_BASE_URL='http://118.31.23.45:48080' +# VITE_BASE_URL='http://114.55.169.15:48080' # 上传路径 -# VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload' -VITE_UPLOAD_URL='http://114.55.169.15:48080/admin-api/system/file/upload' +VITE_UPLOAD_URL='http://118.31.23.45:48080/admin-api/system/file/upload' +# VITE_UPLOAD_URL='http://114.55.169.15:48080/admin-api/system/file/upload' # 接口前缀 VITE_API_BASEPATH=/crm-api diff --git a/src/api/clue/afterSale.js b/src/api/clue/afterSale.js index 685289a..1321ec8 100644 --- a/src/api/clue/afterSale.js +++ b/src/api/clue/afterSale.js @@ -12,7 +12,11 @@ export const getAfterSalePage = async (params) => { // 新增 export const createAfterSale = async (data) => { - return await request.post({ url: '/admin-api/crm/sign-after-sale/create', data }) + return await request.post({ + url: '/admin-api/crm/sign-after-sale/create', + data, + isSubmitForm: true + }) } // 审核 diff --git a/src/api/clue/delivery.js b/src/api/clue/delivery.js index a7c1b51..ca8d19b 100644 --- a/src/api/clue/delivery.js +++ b/src/api/clue/delivery.js @@ -12,7 +12,7 @@ export const getDeliveryPage = async (params) => { // 新增 export const createDelivery = async (data) => { - return await request.post({ url: '/admin-api/crm/sign-send/create', data }) + return await request.post({ url: '/admin-api/crm/sign-send/create', data, isSubmitForm: true }) } // 查询详情 diff --git a/src/api/clue/followRecord.js b/src/api/clue/followRecord.js index 81fb223..6fa0c34 100644 --- a/src/api/clue/followRecord.js +++ b/src/api/clue/followRecord.js @@ -7,7 +7,11 @@ export const getFollowList = async (params) => { // 新增 export const createFollow = async (data) => { - return await request.post({ url: '/admin-api/crm/clue-follow-record/create', data: data }) + return await request.post({ + url: '/admin-api/crm/clue-follow-record/create', + data: data, + isSubmitForm: true + }) } // 删除 diff --git a/src/api/clue/index.js b/src/api/clue/index.js index 85e4464..774909e 100644 --- a/src/api/clue/index.js +++ b/src/api/clue/index.js @@ -17,7 +17,11 @@ export const getClue = async (id) => { // 新增 export const createClue = async (data) => { - return await request.post({ url: '/admin-api/crm/sch-clue/create', data: data }) + return await request.post({ + url: '/admin-api/crm/sch-clue/create', + data: data, + isSubmitForm: true + }) } // 修改 diff --git a/src/api/clue/payment.js b/src/api/clue/payment.js index 4a63fbf..f67ca24 100644 --- a/src/api/clue/payment.js +++ b/src/api/clue/payment.js @@ -12,7 +12,11 @@ export const getPaymentPage = async (params) => { // 新增 export const createPayment = async (data) => { - return await request.post({ url: '/admin-api/crm/sign-pay-record/create', data }) + return await request.post({ + url: '/admin-api/crm/sign-pay-record/create', + data, + isSubmitForm: true + }) } // 审核 diff --git a/src/api/clue/settle.js b/src/api/clue/settle.js new file mode 100644 index 0000000..d9e5609 --- /dev/null +++ b/src/api/clue/settle.js @@ -0,0 +1,26 @@ +import request from '@/config/axios' + +// 查询招生结算列表 +export const getSchoolSettlePage = async (params) => { + return await request.get({ url: '/admin-api/crm/sign-settlement/sch/page', params }) +} + +// 查询招生结算详情 +export const getSchoolSettleDetail = async (id) => { + return await request.get({ url: '/admin-api/crm/sign-settlement/sch/get?id=' + id }) +} + +// 查询进销存结算列表 +export const getMallSettlePage = async (params) => { + return await request.get({ url: '/admin-api/crm/sign-settlement/erp/page', params }) +} + +// 查询进销存结算详情 +export const getMallSettleDetail = async (id) => { + return await request.get({ url: '/admin-api/crm/sign-settlement/erp/get?id=' + id }) +} + +// 批量结算 +export const batchSaveSettle = async (data) => { + return await request.post({ url: '/admin-api/crm/sign-settlement/batch/save', data }) +} diff --git a/src/api/clue/sign.js b/src/api/clue/sign.js index e6f4d4e..2dc80f2 100644 --- a/src/api/clue/sign.js +++ b/src/api/clue/sign.js @@ -12,7 +12,7 @@ export const getSign = async (id) => { // 新增 export const createSign = async (data) => { - return await request.post({ url: '/admin-api/crm/sign/create', data: data }) + return await request.post({ url: '/admin-api/crm/sign/create', data: data, isSubmitForm: true }) } // 取消登记 diff --git a/src/api/clue/skill.js b/src/api/clue/skill.js index c970757..3ee5c68 100644 --- a/src/api/clue/skill.js +++ b/src/api/clue/skill.js @@ -7,7 +7,7 @@ export const getSkillPage = (params) => { // 创建 export const createSkill = (data) => { - return request.post({ url: '/admin-api/crm/skill/create', data }) + return request.post({ url: '/admin-api/crm/skill/create', data, isSubmitForm: true }) } // 更新 diff --git a/src/api/clue/source.js b/src/api/clue/source.js index b461add..afeb22a 100644 --- a/src/api/clue/source.js +++ b/src/api/clue/source.js @@ -17,7 +17,7 @@ export const getSource = async (id) => { // 新增 export const createSource = async (data) => { - return await request.post({ url: '/admin-api/crm/source/create', data: data }) + return await request.post({ url: '/admin-api/crm/source/create', data: data, isSubmitForm: true }) } // 修改 diff --git a/src/api/mall/product/brand.ts b/src/api/mall/product/brand.ts index 1173d98..9191677 100644 --- a/src/api/mall/product/brand.ts +++ b/src/api/mall/product/brand.ts @@ -32,7 +32,7 @@ export interface BrandVO { // 创建商品品牌 export const createBrand = (data: BrandVO) => { - return request.post({ url: '/admin-api/crm/erp-product-brand/create', data }) + return request.post({ url: '/admin-api/crm/erp-product-brand/create', data, isSubmitForm: true }) } // 更新商品品牌 diff --git a/src/api/mall/product/category.ts b/src/api/mall/product/category.ts index 9b40189..efc85f5 100644 --- a/src/api/mall/product/category.ts +++ b/src/api/mall/product/category.ts @@ -36,7 +36,11 @@ export interface CategoryVO { // 创建商品分类 export const createCategory = (data: CategoryVO) => { - return request.post({ url: '/admin-api/crm/erp-product-category/create', data }) + return request.post({ + url: '/admin-api/crm/erp-product-category/create', + data, + isSubmitForm: true + }) } // 更新商品分类 diff --git a/src/api/mall/product/index.js b/src/api/mall/product/index.js index 3d1d185..80c9a98 100644 --- a/src/api/mall/product/index.js +++ b/src/api/mall/product/index.js @@ -11,7 +11,11 @@ export const getProduct = async (id) => { // 新增 export const createProduct = async (data) => { - return await request.post({ url: '/admin-api/crm/erp-product/create', data: data }) + return await request.post({ + url: '/admin-api/crm/erp-product/create', + data: data, + isSubmitForm: true + }) } // 修改 diff --git a/src/api/mall/product/productField.js b/src/api/mall/product/productField.js index f8cfac8..f740e90 100644 --- a/src/api/mall/product/productField.js +++ b/src/api/mall/product/productField.js @@ -2,7 +2,11 @@ import request from '@/config/axios' // 创建 export const createField = (data) => { - return request.post({ url: '/admin-api/crm/param/create', data: { ...data, module: 3 } }) + return request.post({ + url: '/admin-api/crm/param/create', + data: { ...data, module: 3 }, + isSubmitForm: true + }) } // 更新 diff --git a/src/api/mall/product/property.ts b/src/api/mall/product/property.ts index b9fb9b7..b2c2ce5 100644 --- a/src/api/mall/product/property.ts +++ b/src/api/mall/product/property.ts @@ -42,7 +42,11 @@ export interface PropertyValueDetailVO { // 创建属性项 export const createProperty = (data: PropertyVO) => { - return request.post({ url: '/admin-api/crm/erp-product-property/create', data }) + return request.post({ + url: '/admin-api/crm/erp-product-property/create', + data, + isSubmitForm: true + }) } // 更新属性项 diff --git a/src/api/mall/purchase/index.js b/src/api/mall/purchase/index.js index 9908640..ea5e0a9 100644 --- a/src/api/mall/purchase/index.js +++ b/src/api/mall/purchase/index.js @@ -6,7 +6,11 @@ export const getPurchasePage = async (params) => { // 新增 export const createPurchase = async (data) => { - return await request.post({ url: '/admin-api/crm/erp-purchase/create', data: data }) + return await request.post({ + url: '/admin-api/crm/erp-purchase/create', + data: data, + isSubmitForm: true + }) } // 修改 diff --git a/src/api/mall/warehouse/index.js b/src/api/mall/warehouse/index.js index 6858d62..40a863a 100644 --- a/src/api/mall/warehouse/index.js +++ b/src/api/mall/warehouse/index.js @@ -6,7 +6,11 @@ export const getWarehousePage = async (params) => { // 新增 export const createWarehouse = async (data) => { - return await request.post({ url: '/admin-api/crm/erp-warehouse/create', data: data }) + return await request.post({ + url: '/admin-api/crm/erp-warehouse/create', + data: data, + isSubmitForm: true + }) } // 修改 diff --git a/src/api/school/class/index.js b/src/api/school/class/index.js index 6216090..0331cf0 100644 --- a/src/api/school/class/index.js +++ b/src/api/school/class/index.js @@ -5,6 +5,10 @@ export const getClassTypePage = async (params) => { return await request.get({ url: '/admin-api/crm/sch-class-type/page', params }) } +export const getClassTypeList = async (params) => { + return await request.get({ url: '/admin-api/crm/sch-class-type/list', params }) +} + // 查询详情 export const getClassType = async (id) => { return await request.get({ url: '/admin-api/crm/sch-class-type/get?id=' + id }) @@ -12,7 +16,11 @@ export const getClassType = async (id) => { // 新增 export const createClassType = async (data) => { - return await request.post({ url: '/admin-api/crm/sch-class-type/create', data: data }) + return await request.post({ + url: '/admin-api/crm/sch-class-type/create', + data: data, + isSubmitForm: true + }) } // 修改 @@ -22,7 +30,7 @@ export const updateClassType = async (params) => { // 删除 export const deleteClassType = async (id) => { - return await request.delete({ url: '/admin-api/crm/sch-class-type/delete?typeId=' + id }) + return await request.delete({ url: '/admin-api/crm/sch-class-type/delete?id=' + id }) } // 修改状态 diff --git a/src/api/school/place/index.js b/src/api/school/place/index.js index 0c743e7..b469cdc 100644 --- a/src/api/school/place/index.js +++ b/src/api/school/place/index.js @@ -17,7 +17,11 @@ export const getPlace = async (id) => { // 新增 export const createPlace = async (data) => { - return await request.post({ url: '/admin-api/crm/sch-place/create', data: data }) + return await request.post({ + url: '/admin-api/crm/sch-place/create', + data: data, + isSubmitForm: true + }) } // 修改 diff --git a/src/api/school/sch/index.js b/src/api/school/sch/index.js index 05e21b7..22f4b5d 100644 --- a/src/api/school/sch/index.js +++ b/src/api/school/sch/index.js @@ -11,7 +11,11 @@ export const getSchool = async (id) => { // 新增 export const createSchool = async (data) => { - return await request.post({ url: '/admin-api/crm/sch-school/create', data: data }) + return await request.post({ + url: '/admin-api/crm/sch-school/create', + data: data, + isSubmitForm: true + }) } // 修改 diff --git a/src/components/Form/src/Form.vue b/src/components/Form/src/Form.vue index d3a00bf..db784a1 100644 --- a/src/components/Form/src/Form.vue +++ b/src/components/Form/src/Form.vue @@ -78,7 +78,10 @@ export default defineComponent({ }) // 对表单赋值 - const setValues = (data: Recordable = {}) => { + const setValues = (data: Recordable = {}, isReset: Boolean = false) => { + if (isReset) { + formModel.value = initModel(unref(getProps).schema, unref(formModel)) + } formModel.value = Object.assign(unref(formModel), data) } diff --git a/src/config/axios/index.ts b/src/config/axios/index.ts index e6c6af8..f857d5a 100644 --- a/src/config/axios/index.ts +++ b/src/config/axios/index.ts @@ -5,10 +5,11 @@ import { config } from './config' const { default_headers } = config const request = (option: any) => { - const { url, method, params, data, headersType, responseType } = option + const { url, method, params, data, headersType, responseType, isSubmitForm } = option return service({ url: url, method, + isSubmitForm, params, data, responseType: responseType, diff --git a/src/config/axios/service.ts b/src/config/axios/service.ts index 8adfc2f..a65905b 100644 --- a/src/config/axios/service.ts +++ b/src/config/axios/service.ts @@ -21,6 +21,7 @@ import errorCode from './errorCode' import { resetRouter } from '@/router' import { useCache } from '@/hooks/web/useCache' +import cache from '@/plugins/cache' const { result_code, base_url, request_timeout } = config @@ -62,15 +63,11 @@ service.interceptors.request.use( } // 设置租户 const tenantId = getTenantId() - if (tenantId) { - ;(config as Recordable).headers['tenant-id'] = tenantId - } + if (tenantId) (config as Recordable).headers['tenant-id'] = tenantId // 设置实例 const appId = getAppId() - if (appId) { - ;(config as Recordable).headers['instance-id'] = appId - } + if (appId) (config as Recordable).headers['instance-id'] = appId const params = config.params || {} const data = config.data || false @@ -83,27 +80,39 @@ service.interceptors.request.use( } // get参数编码 if (config.method?.toUpperCase() === 'GET' && params) { - let url = config.url + '?' - for (const propName of Object.keys(params)) { - const value = params[propName] - if (value !== void 0 && value !== null && typeof value !== 'undefined') { - if (typeof value === 'object') { - for (const val of Object.keys(value)) { - const params = propName + '[' + val + ']' - const subPart = encodeURIComponent(params) + '=' - url += subPart + encodeURIComponent(value[val]) + '&' - } - } else { - url += `${propName}=${encodeURIComponent(value)}&` - } + config.params = {} + const paramsStr = qs.stringify(params, { allowDots: true }) + if (paramsStr) { + config.url = config.url + '?' + paramsStr + } + } + // 是否提交表单型的接口,如果是,不要频繁调接口 + if (config?.isSubmitForm) { + const requestObj = { + url: config.url, + data: typeof config.data === 'object' ? JSON.stringify(config.data) : config.data, + time: new Date().getTime() + } + const sessionObj = cache.session.get('sessionObj') + if (sessionObj === undefined || sessionObj === null || sessionObj === '') { + cache.session.set('sessionObj', requestObj) + } else { + const s_url = sessionObj.url // 请求地址 + const s_data = sessionObj.data // 请求数据 + const s_time = sessionObj.time // 请求时间 + const interval = 1000 // 间隔时间(ms),小于此时间视为重复提交 + if ( + s_data === requestObj.data && + requestObj.time - s_time < interval && + s_url === requestObj.url + ) { + const message = '数据正在处理,请勿重复提交' + console.warn(`[${s_url}]: ` + message) + return Promise.reject(new Error(message)) + } else { + cache.session.set('sessionObj', requestObj) } } - // 给 get 请求加上时间戳参数,避免从缓存中拿数据 - // const now = new Date().getTime() - // params = params.substring(0, url.length - 1) + `?_t=${now}` - url = url.slice(0, -1) - config.params = {} - config.url = url } return config }, diff --git a/src/layout/components/Setting/src/Setting.vue b/src/layout/components/Setting/src/Setting.vue index 3420e5a..908ed99 100644 --- a/src/layout/components/Setting/src/Setting.vue +++ b/src/layout/components/Setting/src/Setting.vue @@ -16,7 +16,9 @@ import { useWatermark } from '@/hooks/web/useWatermark' const { setWatermark } = useWatermark() -setWatermark('安徽莳松科技有限公司') +nextTick(() => { + setWatermark('安徽莳松科技有限公司') +}) const { t } = useI18n() const appStore = useAppStore() diff --git a/src/utils/index.ts b/src/utils/index.ts index 4877020..d1d5f79 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -213,7 +213,7 @@ export const fenToYuan = (amount: string | number): number => { export const removeNullField = (obj: Object) => { for (const key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { - if (obj[key] == '') { + if (obj[key] === '') { delete obj[key] } } diff --git a/src/views/Basic/Role/RoleDataPermissionForm.vue b/src/views/Basic/Role/RoleDataPermissionForm.vue index 9c04ed6..9d68235 100644 --- a/src/views/Basic/Role/RoleDataPermissionForm.vue +++ b/src/views/Basic/Role/RoleDataPermissionForm.vue @@ -107,7 +107,14 @@ const dataScopeOptions = [ ] async function getRoleInfo(id) { - formData.value = await RoleApi.getRole(id) + try { + formData.value = await RoleApi.getRole(id) + nextTick(() => { + treeRef.value.setCheckedKeys(formData.value.dataScopeDeptIds) + }) + } catch (error) { + console.log(error) + } } /** 提交表单 */ diff --git a/src/views/Clue/Order/Comp/AfterSales.vue b/src/views/Clue/Order/Comp/AfterSales.vue index 3e5736a..2fc3371 100644 --- a/src/views/Clue/Order/Comp/AfterSales.vue +++ b/src/views/Clue/Order/Comp/AfterSales.vue @@ -32,8 +32,8 @@ format="YYYY-MM-DD" value-format="YYYY-MM-DD" range-separator="-" - start-placeholder="登记日期" - end-placeholder="登记日期" + start-placeholder="成交日期" + end-placeholder="成交日期" /> @@ -79,9 +79,19 @@ - + - + @@ -205,6 +210,7 @@ import DialogExtraFee from './DialogExtraPay.vue' import DialogDelivery from './DialogDelivery.vue' import { removeNullField } from '@/utils' +import { formatDate } from '@/utils/formatTime' const userOptions = ref([]) onMounted(() => { diff --git a/src/views/Clue/Order/Comp/MallSettle.vue b/src/views/Clue/Order/Comp/MallSettle.vue new file mode 100644 index 0000000..3ec56c1 --- /dev/null +++ b/src/views/Clue/Order/Comp/MallSettle.vue @@ -0,0 +1,335 @@ + + + + + diff --git a/src/views/Clue/Order/Comp/OrderList.vue b/src/views/Clue/Order/Comp/OrderList.vue index f9c89c0..142985f 100644 --- a/src/views/Clue/Order/Comp/OrderList.vue +++ b/src/views/Clue/Order/Comp/OrderList.vue @@ -100,6 +100,9 @@
+ + {{ formatDate(row[item.field]) }} + {{ row[item.field] }}
@@ -173,7 +176,7 @@ import { getSimpleFieldList } from '@/api/clue/orderField' import * as SignApi from '@/api/clue/sign' import { getSimpleUserList as getUserOption } from '@/api/system/user' import { getPlaceList } from '@/api/school/place' -import { getClassTypePage } from '@/api/school/class' +import { getClassTypeList } from '@/api/school/class' import DialogOrder from './DialogOrder.vue' import DialogFeeback from './DialogFeeback.vue' @@ -181,6 +184,7 @@ import DialogAfterSale from './DialogAfterSale.vue' import DialogExtraFee from './DialogExtraPay.vue' import { removeNullField } from '@/utils' +import { formatDate } from '@/utils/formatTime' const userOptions = ref([]) onMounted(() => { @@ -325,8 +329,8 @@ function changePlace() { const classOptions = ref([]) async function getClassTypeOptions() { - const data = await getClassTypePage({ placeId: searchForm.value.signPlace }) - classOptions.value = data.list + const data = await getClassTypeList({ placeId: searchForm.value.signPlace, status: 0 }) + classOptions.value = data } function getOptions() { diff --git a/src/views/Clue/Order/Comp/Reback.vue b/src/views/Clue/Order/Comp/Reback.vue index 74c6903..5c7b605 100644 --- a/src/views/Clue/Order/Comp/Reback.vue +++ b/src/views/Clue/Order/Comp/Reback.vue @@ -32,8 +32,8 @@ format="YYYY-MM-DD" value-format="YYYY-MM-DD" range-separator="-" - start-placeholder="登记日期" - end-placeholder="登记日期" + start-placeholder="成交日期" + end-placeholder="成交日期" />
@@ -77,9 +77,19 @@ - + - + @@ -25,6 +28,8 @@ import MallOrderList from './Comp/MallOrderList.vue' import Reback from './Comp/Reback.vue' import AfterSales from './Comp/AfterSales.vue' import Delivery from './Comp/Delivery.vue' +import Settle from './Comp/Settle.vue' +import { checkPermi } from '@/utils/permission' const appStore = useAppStore() const tabName = ref('list') diff --git a/src/views/Clue/Order/order.data.js b/src/views/Clue/Order/order.data.js deleted file mode 100644 index c1dfd1d..0000000 --- a/src/views/Clue/Order/order.data.js +++ /dev/null @@ -1,98 +0,0 @@ -// import { CrudSchema } from '@/hooks/web/useCrudSchemas' -import { dateFormatter } from '@/utils/formatTime' -// import * as MailAccountApi from '@/api/system/mail/account' - -// const userList = await MailAccountApi.getSimpleMailAccountList() -const userList = [] - -const crudSchemas = reactive([ - { - label: '订单号', - field: 'orderNo', - isSearch: true, - isTable: true - }, - { - label: '线索名称', - field: 'name', - isSearch: true, - isTable: true - }, - { - label: '联系方式', - field: 'contact', - isSearch: true, - isTable: true - }, - { - label: '线索来源', - field: 'resource', - isSearch: true, - isTable: true, - search: { - component: 'Select', - api: () => userList, - componentProps: { - optionsAlias: { - labelField: 'name', - valueField: 'id' - } - } - } - }, - { - label: '跟进人员', - field: 'userId', - isSearch: true, - isTable: true, - search: { - component: 'Select', - api: () => userList, - componentProps: { - optionsAlias: { - labelField: 'name', - valueField: 'id' - } - } - } - }, - { - label: '成交时间', - field: 'createTime', - isSearch: true, - isTable: true, - table: { - fixed: 'left' - }, - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD' - }, - search: { - component: 'DatePicker', - componentProps: { - type: 'daterange', - format: 'YYYY-MM-DD', - valueFormat: 'YYYY-MM-DD', - startPlaceholder: '创建时间', - endPlaceholder: '创建时间' - } - } - }, - { - label: '是否全款', - field: 'isFull', - isSearch: true, - isTable: true, - search: { - component: 'Radio', - componentProps: { - options: [ - { label: '全款', value: 1 }, - { label: '非全款', value: 0 } - ] - } - } - } -]) -export const { allSchemas } = useCrudSchemas(crudSchemas) diff --git a/src/views/Clue/Pool/Comp/DialogClue.vue b/src/views/Clue/Pool/Comp/DialogClue.vue index 5e1c407..4e3f142 100644 --- a/src/views/Clue/Pool/Comp/DialogClue.vue +++ b/src/views/Clue/Pool/Comp/DialogClue.vue @@ -232,10 +232,15 @@ const open = async (type, id) => { try { const data = await ClueApi.getClue(id) info.value = { ...data, ...data.diyParams } + info.value.remark = info.value.remark || '' + defaultLatLng.value = { + lat: data.lat, + lng: data.lng + } nextTick(() => { followList.value = data.followUser address.value = data.address || '' - formRef.value.setValues(info.value) + formRef.value.setValues(info.value, false) }) } finally { formLoading.value = false @@ -255,7 +260,7 @@ const open = async (type, id) => { lng: 117.283042 } nextTick(() => { - formRef.value.setValues(info.value) + formRef.value.setValues(info.value, true) }) } } @@ -277,12 +282,14 @@ function changeTab() { defineExpose({ open }) // 提供 open 方法,用于打开弹窗 function resetForm() { - info.value.address = undefined - info.value.lat = undefined - info.value.lng = undefined - info.value.consultTime = formatDate(new Date()) - info.value.followUsers = [] - info.value.diyParams = {} + info.value = { + address: undefined, + lat: undefined, + lng: undefined, + consultTime: formatDate(new Date()), + followUsers: [], + diyParams: {} + } } const placeList = ref([]) diff --git a/src/views/Clue/Pool/Comp/DialogSuccess.vue b/src/views/Clue/Pool/Comp/DialogSuccess.vue index 2734060..60cbb21 100644 --- a/src/views/Clue/Pool/Comp/DialogSuccess.vue +++ b/src/views/Clue/Pool/Comp/DialogSuccess.vue @@ -10,31 +10,6 @@ /> - - - - - - - - - 全款 - 非全款 - - - - - - - - + + + + + + + + + 全款 + 非全款 + + + + + + + + + + + + + + + + { }) const showSchema = computed(() => { + let list = props.schema.map((it) => { + if (it.label.includes('日期')) { + it.dateFormat = 'YYYY-MM-DD' + } + return it + }) + if (list.length % 2 != 0) { + list.push({}) + } const arr = [ { field: 'requirement', @@ -344,7 +362,7 @@ const showSchema = computed(() => { span: 2 } ] - return [...props.schema, ...arr] + return [...list, ...arr] }) const extraPayOptions = getDictOptions('other_pay_type') @@ -368,6 +386,7 @@ function resetForm(id) { state: true, payAmount: 0, remark: undefined, + isCompanyReceipts: appStore.getAppInfo?.instanceType == 1, extraPay: [], signProducts: [] } @@ -438,8 +457,8 @@ const placeOptions = computed(() => { const classOptions = ref([]) async function getClassTypeOptions() { - const data = await getClassTypePage({ placeId: form.value.signPlace }) - classOptions.value = data.list + const data = await getClassTypeList({ placeId: form.value.signPlace, status: 0 }) + classOptions.value = data } function getOptions() { @@ -476,6 +495,11 @@ function changePlace() { getClassTypeOptions() } +function changeClass() { + form.value.payAmount = + classOptions.value.find((it) => it.typeId == form.value.signClass).guidingPrice || 0 +} + function handleRemove(type, index) { form.value[type].splice(index, 1) } diff --git a/src/views/Clue/Pool/Comp/DrawerClue.vue b/src/views/Clue/Pool/Comp/DrawerClue.vue index 3e153aa..620b5a6 100644 --- a/src/views/Clue/Pool/Comp/DrawerClue.vue +++ b/src/views/Clue/Pool/Comp/DrawerClue.vue @@ -180,6 +180,11 @@ const props = defineProps({ const showSchema = computed(() => { const arr1 = [...props.schema] + arr1.forEach((it) => { + if (it.label.includes('日期')) { + it.dateFormat = 'YYYY-MM-DD' + } + }) if (arr1.length % 2 != 0) { arr1.push({}) } diff --git a/src/views/Clue/Pool/index.vue b/src/views/Clue/Pool/index.vue index d3c75a8..1602cce 100644 --- a/src/views/Clue/Pool/index.vue +++ b/src/views/Clue/Pool/index.vue @@ -133,6 +133,7 @@ @@ -350,6 +351,7 @@ function handleGain(id) { } const userOptions = ref([]) + onMounted(() => { getUserOption().then((data) => { userOptions.value = data diff --git a/src/views/SchoolManagement/Class/Comp/DialogClass.vue b/src/views/SchoolManagement/Class/Comp/DialogClass.vue index 4cebace..e6659e9 100644 --- a/src/views/SchoolManagement/Class/Comp/DialogClass.vue +++ b/src/views/SchoolManagement/Class/Comp/DialogClass.vue @@ -60,14 +60,14 @@ 新增报价 - + - +