|
|
@@ -101,6 +101,13 @@
|
|
|
<template #maspStatus="scope">
|
|
|
<Dict v-model="scope.formData[scope.prop]" code="masp_status" v-bind="scope.attrs" />
|
|
|
</template>
|
|
|
+ <template #remark="scope">
|
|
|
+ <el-input
|
|
|
+ v-model="scope.formData[scope.prop]"
|
|
|
+ type="textarea"
|
|
|
+ v-bind="scope.attrs"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
</page-modal>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -424,14 +431,48 @@ const editModalConfig: IModalConfig<ChargeOrderInfoForm> = reactive({
|
|
|
formAction(data: any) {
|
|
|
return ChargeOrderInfoAPI.update(data.id as string, data);
|
|
|
},
|
|
|
- formItems: addModalConfig.formItems, // 复用新增的表单项
|
|
|
+ formItems: [
|
|
|
+ {
|
|
|
+ type: "custom",
|
|
|
+ label: "充电订单号",
|
|
|
+ prop: "chargeOrderNo",
|
|
|
+ slotName: "chargeOrderNo",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "custom",
|
|
|
+ label: "状态",
|
|
|
+ prop: "status",
|
|
|
+ slotName: "status",
|
|
|
+ attrs: {
|
|
|
+ placeholder: "状态",
|
|
|
+ style: { width: "100%" },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "custom",
|
|
|
+ label: "备注",
|
|
|
+ prop: "remark",
|
|
|
+ slotName: "remark",
|
|
|
+ attrs: {
|
|
|
+ placeholder: "请输入备注",
|
|
|
+ rows: 4,
|
|
|
+ clearable: true,
|
|
|
+ style: { width: "100%" },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
});
|
|
|
|
|
|
// 处理操作按钮点击
|
|
|
const handleOperateClick = (data: IObject) => {
|
|
|
if (data.name === "edit") {
|
|
|
handleEditClick(data.row, async () => {
|
|
|
- return await ChargeOrderInfoAPI.getFormData(data.row.id);
|
|
|
+ const formData = await ChargeOrderInfoAPI.getFormData(data.row.id);
|
|
|
+ // 如果备注字段为空,自动设置默认值为"手动结束"
|
|
|
+ if (formData && !formData.remark) {
|
|
|
+ formData.remark = "手动结束";
|
|
|
+ }
|
|
|
+ return formData;
|
|
|
});
|
|
|
}
|
|
|
};
|