diff --git a/api/common.js b/api/common.js
index 7ff1cf1..2eaa6f4 100644
--- a/api/common.js
+++ b/api/common.js
@@ -57,7 +57,7 @@ export const getByType = (params) => {
};
/**
- * 拉取枚举选项 用于 `fieldType=3`(枚举)且 `options` 为空(即非静态来源)时获取可选项。
+ * 拉取选项 用于 fieldType 3(枚举)/6(多选)/9(关联记录) 且 field.options 为空(即非静态来源)时获取可选项。
* @param {Object} params {}
* @returns {Promise}
*/
@@ -66,7 +66,8 @@ export const getOptionsByCode = (params) => {
};
/**
- * 拉取拉取物料列表 用于`fieldType=6`(物料)字段,列出可领物料及库存。
+ * 拉取物料列表 用于 optionSource=3 的字段(物料不是字段类型,是「fieldType=3 + optionSource=3」的配置组合),
+ * 比 options 多返回单位与库存余量。
* @param {Object} params {}
* @returns {Promise}
*/
@@ -74,6 +75,17 @@ export const getMaterialsByCode = (params) => {
return get('/app-api/app/garden/work-field-config/materials', params);
};
+/**
+ * 提交耗材作业记录(动态字段落库)。
+ * 注意与 maintain-plan-commit/create 是两条链路:后者提交养护计划本身(图片/描述),
+ * 本接口提交动态字段值,bizId 用后者返回的 commit.id。
+ * @param {Object} params {businessType, bizType, bizId, workTypeId, clientSeq, remark, fields}
+ * @returns {Promise} recordId
+ */
+export const workRecordSubmit = (data) => {
+ return post('/app-api/app/garden/work-record/submit', data);
+};
+
diff --git a/pages-sub/daily/maintain-manage/add-record.vue b/pages-sub/daily/maintain-manage/add-record.vue
index f28f38e..aa11786 100644
--- a/pages-sub/daily/maintain-manage/add-record.vue
+++ b/pages-sub/daily/maintain-manage/add-record.vue
@@ -5,7 +5,7 @@
+ @click="openPickerIfNeeded(item)">
-
+
-
-
+
+
@@ -40,13 +40,60 @@
-
-
+
+
+
+
+
+
+ {{ multiHint(item) }}
+
+
+
+ {{ opt.label }}
+
+
+
+
+
+ uploadFieldFiles(item, event)" @delete="(event) => deleteFieldFile(item, event)"
+ multiple :max-count="pickCountOf(item, 5)" upload-text="选择图片" del-color="#ff4d4f"
+ class="upload-wrap">
+
+
+
+ {{ file.name || fileNameOf(file.url) }}
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 领用数量
+
+
@@ -79,7 +126,7 @@