@@ -129,9 +129,6 @@
:value="dict.value">
-
-
-
-
@@ -154,7 +151,7 @@
-
+
@@ -344,8 +341,8 @@ const loading = ref(true);
const showSearch = ref(true);
const ids = ref>([]);
const total = ref(0);
-// 单据类型切换变量 - 默认出库单
-const type = ref('chuku');
+// 单据类型切换变量 - 默认入库单
+const type = ref('ruku');
/** 切换单据类型 */
const changeType = (newType: string) => {
@@ -430,6 +427,7 @@ const initFormData: ChurukudanForm = {
updateTime: undefined,
auditStatus: undefined,
chanpinName: undefined,
+ chanpinId: undefined,
}
const data = reactive>({
form: { ...initFormData },
@@ -444,13 +442,17 @@ const data = reactive>({
endDate: undefined,
auditStatus: undefined,
chanpinName: undefined,
- danjvType: '1', // 默认显示出库单
+ chanpinId: undefined,
+ danjvType: '2', // 默认显示入库单
params: {
}
},
rules: {
- shebeiType: [
- { required: true, message: "设备类型不能为空", trigger: "change" }
+ // shebeiType: [
+ // { required: true, message: "设备类型不能为空", trigger: "change" }
+ // ],
+ chanpinName: [
+ { required: true, message: "产品名称不能为空", trigger: "change" }
],
jingshourenId: [
{ required: true, message: "经手人id不能为空", trigger: "blur" }
@@ -464,18 +466,28 @@ const data = reactive>({
danjvType: [
{ required: true, message: "单据状态不能为空", trigger: "change" }
],
+ // 手机号码格式校验
+ contactNumber: [
+ { pattern: /^1[3-9]\d{9}$/, message: "请输入正确的手机号码格式", trigger: "blur" }
+ ]
}
});
const { queryParams, form, rules } = toRefs(data);
// 查询产品名称列表
const chanpinList = ref([]);
+const chanpinSelect = ref([]);
// 查询产品名称列表
const getChanpinList = async () => {
try {
const res = await getChanpinLists({ projectId: userStore.selectedProject.id });
- chanpinList.value = res.rows || [];
- console.log('chanpinList.value', chanpinList.value);
+ chanpinList.value = res.data || [];
+ chanpinSelect.value = chanpinList.value.map(item => ({
+ label:item.caigouPlanName +'-'+item.chanpinName,
+ value: item.id
+ }));
+ console.log('chanpinSelect.value', chanpinSelect.value);
+
} catch (error) {
console.error('获取产品名称列表失败:', error);
proxy?.$modal.msgError("获取产品名称列表失败,请稍后重试");
@@ -568,6 +580,7 @@ const submitForm = () => {
if (valid) {
buttonLoading.value = true;
try {
+ form.value.chanpinId = form.value.chanpinName
if (form.value.id) {
await updateChurukudan(form.value);
proxy?.$modal.msgSuccess("修改成功");
diff --git a/src/views/materialManagement/procurementPlan.vue b/src/views/materialManagement/procurementPlan.vue
index a30cb85..97984d0 100644
--- a/src/views/materialManagement/procurementPlan.vue
+++ b/src/views/materialManagement/procurementPlan.vue
@@ -193,12 +193,9 @@
-
-
-
-
-
+
+
@@ -289,7 +286,7 @@
附件上传
-
+
-
@@ -411,6 +408,8 @@ import { CaigouPlanVO, CaigouPlanQuery, CaigouPlanForm } from '@/api/wuziguanli/
import { useRouter } from 'vue-router';
const router = useRouter();
+import FileUpload from '@/components/FileUpload/index.vue';
+
// 导入用户store
import { useUserStore } from '@/store/modules/user';
@@ -421,6 +420,8 @@ const caigouPlanList = ref