Ver Fonte

Merge remote-tracking branch 'origin/zzx' into zzx

zouzexu há 2 dias atrás
pai
commit
c2b80df997
1 ficheiros alterados com 43 adições e 2 exclusões
  1. 43 2
      src/views/orderManage/charge-order-info/index.vue

+ 43 - 2
src/views/orderManage/charge-order-info/index.vue

@@ -101,6 +101,13 @@
       <template #maspStatus="scope">
       <template #maspStatus="scope">
         <Dict v-model="scope.formData[scope.prop]" code="masp_status" v-bind="scope.attrs" />
         <Dict v-model="scope.formData[scope.prop]" code="masp_status" v-bind="scope.attrs" />
       </template>
       </template>
+      <template #remark="scope">
+        <el-input
+          v-model="scope.formData[scope.prop]"
+          type="textarea"
+          v-bind="scope.attrs"
+        />
+      </template>
     </page-modal>
     </page-modal>
   </div>
   </div>
 </template>
 </template>
@@ -438,14 +445,48 @@ const editModalConfig: IModalConfig<ChargeOrderInfoForm> = reactive({
   formAction(data: any) {
   formAction(data: any) {
     return ChargeOrderInfoAPI.update(data.id as string, data);
     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) => {
 const handleOperateClick = (data: IObject) => {
   if (data.name === "edit") {
   if (data.name === "edit") {
     handleEditClick(data.row, async () => {
     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;
     });
     });
   }
   }
   if (data.name === "fixes") {
   if (data.name === "fixes") {