- 格式为
{{ fileType.join('/') }} 的文件
+
+ 大小不超过 {{ fileSize }}MB,格式为 {{ fileType.join('/') }} 的文件
@@ -88,7 +85,7 @@ const emit = defineEmits(['update:modelValue'])
const props = defineProps({
modelValue: propTypes.oneOfType([String, Array]).isRequired,
fileType: propTypes.array.def(['doc', 'xls', 'ppt', 'txt', 'pdf']), // 文件类型, 例如['png', 'jpg', 'jpeg']
- fileSize: propTypes.number.def(5), // 大小限制(MB)
+ fileSize: propTypes.number.def(20), // 大小限制(MB)
limit: propTypes.number.def(5), // 数量限制
autoUpload: propTypes.bool.def(true), // 自动上传
drag: propTypes.bool.def(false), // 拖拽上传
diff --git a/src/components/product/index.vue b/src/components/product/index.vue
index e6af470b7..74979e8e2 100644
--- a/src/components/product/index.vue
+++ b/src/components/product/index.vue
@@ -99,7 +99,6 @@ const queryFormRef = ref() // 搜索的表单
const exportLoading = ref(false) // 导出的加载中
/** 打开弹窗 */
const open = async (data: []) => {
- console.log('%csrc/components/product/index.vue:102 data', 'color: #007acc;', data);
dialogVisible.value = true
multipleSelection.value = data
await getList()
@@ -154,7 +153,6 @@ const setSelections = async () => {
id: item.productId
}
})
- console.log('%csrc/components/product/index.vue:153 list.value', 'color: #007acc;', list.value);
if (selections && selections.length > 0) {
list.value.forEach((row: any) => {
diff --git a/src/views/crm/backlog/index.vue b/src/views/crm/backlog/index.vue
index 21e77f18a..b74b59832 100644
--- a/src/views/crm/backlog/index.vue
+++ b/src/views/crm/backlog/index.vue
@@ -1,8 +1,8 @@
-
-
+
+
-
+
diff --git a/src/views/crm/business/BusinessForm.vue b/src/views/crm/business/BusinessForm.vue
index 21cab3abb..d615fab3c 100644
--- a/src/views/crm/business/BusinessForm.vue
+++ b/src/views/crm/business/BusinessForm.vue
@@ -8,11 +8,7 @@
v-loading="formLoading"
>
-
+
@@ -33,12 +29,17 @@
-->
+
+
+
+
+
-
+
-
+
- 注:行政自主在线上预定,无审批流,无差标,无客服服务
+ {{remark}}
@@ -238,7 +239,7 @@
-
+
{{dict.label}}
@@ -317,6 +318,7 @@ const { proxy }: any = getCurrentInstance();
const { t } = useI18n();
const message = useMessage();
+const remark = ref('')
const checkList = ref([])
const productsTypeList = ref([])
const dialogVisible = ref(false);
@@ -360,6 +362,8 @@ const formRules = reactive({
techSupport: [{ required: true, message: '技术需求支持不能为空', trigger: 'change' }],
projectDifficultyId: [{ required: true, message: '项目难度不能为空', trigger: 'change' }],
platformId: [{ required: true, message: '平台不能为空', trigger: 'change' }],
+ maintenanceUserId: [{ required: true, message: '维护人不能为空', trigger: 'change' }],
+ requestorUserId: [{ required: true, message: '需求提交人不能为空', trigger: 'change' }],
});
const formRef = ref();
@@ -387,6 +391,7 @@ watch(
let totalOfflinePrice = 0;
for (const product of newProducts) {
+ console.log('%csrc/views/crm/business/BusinessForm.vue:381 22222', 'color: #007acc;', product,22222);
if (typeof product.onlinePrice) {
totalOnlinePrice += Number(product.onlinePrice);
}
@@ -425,7 +430,9 @@ const open = async (id?: number, customerId?: number) => {
data.products.map(v => {
newData.push(v.category)
})
- checkList.value = [...new Set(newData)]
+ checkList.value = newData.filter((value, index, self) => {
+ return self.indexOf(value) === index;
+ });
} finally {
formLoading.value = false;
}
@@ -439,7 +446,6 @@ const open = async (id?: number, customerId?: number) => {
};
const setList = (newProducts) => {
- checkList.value = []
formData.value.products = newProducts;
};
@@ -510,10 +516,19 @@ const changeCheck = (val) => {
productFormRef.value.getData(val)
}
+const changeDifficult = (val) => {
+ let arr = difficultOptions.value.filter(v => v.id === val)
+ let serviceDesc = (arr.length && arr[0]['dockingMode'])
+ if(serviceDesc) {
+ remark.value = '注:' + serviceDesc
+ } else {
+ remark.value = ''
+ }
+}
+
const route = useRoute();
onMounted(async () => {
-
- console.log('%csrc/views/crm/business/BusinessForm.vue:512 props', 'color: #007acc;', route.query);
+console.log('%csrc/views/crm/business/BusinessForm.vue:516 getIntDictOptions(DICT_TYPE.CRM_PRODUCT_CATEGORY)', 'color: #007acc;', getIntDictOptions(DICT_TYPE.CRM_PRODUCT_CATEGORY));
const customerId = route.query.customerId;
formData.value.customerId = Number(route.query.bizId) || ''
formData.value.clueDeveloper = Number(route.query.clueDeveloper) || ''
@@ -527,7 +542,6 @@ onMounted(async () => {
statusTypeList.value = await BusinessStatusApi.getBusinessStatusTypeSimpleList();
userOptions.value = await UserApi.getSimpleUserList();
let techData = await BusinessApi.getTechnicalList({pageNo: 1, pageSize: 1000});//平台
- console.log('%csrc/views/crm/business/BusinessForm.vue:468 diffData', 'color: #007acc;', techData);
techOptions.value = techData.list
let diffData = await BusinessApi.getDifficult({pageNo: 1, pageSize: 1000});//困难度
difficultOptions.value = diffData.list
diff --git a/src/views/crm/business/components/BusinessProductForm.vue b/src/views/crm/business/components/BusinessProductForm.vue
index 69db18253..f61d8b1ef 100644
--- a/src/views/crm/business/components/BusinessProductForm.vue
+++ b/src/views/crm/business/components/BusinessProductForm.vue
@@ -69,9 +69,9 @@
-
+
@@ -110,31 +110,32 @@ watch(
{ immediate: true }
);
-watch(
- () => props.productsTypeList,
- (val) => {
- listData.value = val || []; // 确保 formData 是一个数组
- },
- { immediate: true }
-);
+// watch(
+// () => props.productsTypeList,
+// (val) => {
+// listData.value = val || []; // 确保 formData 是一个数组
+// },
+// { immediate: true }
+// );
// 监听合同产品变化,计算合同产品总价
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
watch(
() => formData.value,
(val) => {
+ console.log('%csrc/views/crm/business/components/BusinessProductForm.vue:126 formData.value', 'color: #007acc;', formData.value);
if (!val || val.length === 0) {
return;
}
// 循环处理
val.forEach((item) => {
if (item.offlinePrice != null && item.onlinePrice != null) {
- item.totalPrice = Number(item.offlinePrice) + Number(item.onlinePrice);
+ item.totalPrice = (Number(item.offlinePrice) + Number(item.onlinePrice)).toFixed(2);
} else {
item.totalPrice = 0;
}
});
- // emit('success', formData.value)
+ emit('success', formData.value)
},
{ deep: true }
@@ -157,27 +158,29 @@ watch(
// };
// formData.value.push(newRow);
// };
-const getList = (val: []) => {
- for(let i = formData.value.length - 1; i >= 0; i--) {
- let obj = formData.value[i]
- if(!val.some(v => v.id === obj.productId)) formData.value.splice(i, 1)
- }
- val.forEach(item => {
- if(!formData.value.some(v => v.productId === item.id)) {
- formData.value.push({
- "productId": item.id,
- "category": item.category,
- "productName": item.name,
- "detailType": item.detailType,
- "productUnit": item.unit,
+const getList = async (val: []) => {
+ const data = await ProductApi.getProductPage({
+ pageNo: 1,
+ pageSize: 999,
+ status: 1,
+ })
+ let dataList = JSON.parse(JSON.stringify(data.list))
+ for(let i = dataList.length - 1; i >= 0; i--) {
+ let obj = dataList[i]
+ // if(!val.some(v => v.id === obj.productId)) formData.value.splice(i, 1)
+ // }
+ listData.value.push({
+ "productId": obj.id,
+ "category": obj.category,
+ "productName": obj.name,
+ "detailType": obj.detailType,
+ "productUnit": obj.unit,
"onlinePrice": '',
"offlinePrice": ''
})
- }
- })
- listData.value = JSON.parse(JSON.stringify(formData.value))
- console.log('%csrc/views/crm/business/components/BusinessProductForm.vue:170 listData', 'color: #007acc;', listData.value);
- emit('success', formData.value)
+ }
+ // listData.value = JSON.parse(JSON.stringify(data.list))
+ // emit('success', formData.value)
}
const productRef = ref() // 表单 Ref
@@ -213,7 +216,6 @@ const validate = () => {
};
const getData = (val) => {
-
let newArrList = []
for(let i = 0; i < val.length; i++) {
let item = val[i]
@@ -222,17 +224,13 @@ const getData = (val) => {
}
formData.value = newArrList
- console.log('%csrc/views/crm/business/components/BusinessProductForm.vue:215 listData.value', 'color: #007acc;',!val.length, listData.value);
-if(!val.length) {
- console.log('%csrc/views/crm/business/components/BusinessProductForm.vue:208 121212', 'color: #007acc;', 121212);
- return formData.value = JSON.parse(JSON.stringify(listData.value))
- }
- console.log('%csrc/views/crm/business/components/BusinessProductForm.vue:218 formData.value', 'color: #007acc;', formData.value);
};
defineExpose({ validate, getData });
// 初始化
onMounted(async () => {
+
+ getList()
productList.value = await ProductApi.getProductSimpleList();
});
diff --git a/src/views/crm/business/detail/BusinessDetailsHeader.vue b/src/views/crm/business/detail/BusinessDetailsHeader.vue
index 50d1efeaf..6ac590505 100644
--- a/src/views/crm/business/detail/BusinessDetailsHeader.vue
+++ b/src/views/crm/business/detail/BusinessDetailsHeader.vue
@@ -14,7 +14,7 @@
-