"use strict";require("../../common/libraries/request.js");const e=require("../../common/store/useWeAppAuthStore.js");require("../../common/store/useWorkStore.js");const o=require("./model.js"),r=require("../../gen/Apis.js"),s=require("../../common/libraries/apiLoading.js"),t=require("../../common/libraries/naviHelper.js");e.useWeAppAuthStore();const i={init(e){o.useModel.HouseWorkOrdersAcceptResultEnum.value={Processing2:{text:"是",value:"1"},Processing1:{text:"否",value:"0"}},o.useModel.formData.value={...e}},handleSubmit(){var e,i;let l=null==(i=null==(e=o.useModel)?void 0:e.formData)?void 0:i.value;return(null==l?void 0:l.is_completed)?"0"!==(null==l?void 0:l.is_completed)||(null==l?void 0:l.accept_remark)?void s.getApiLoading(r.Apis.WorkOrder.HouseWorkOrders.Accept,{...l,is_completed:"1"===(null==l?void 0:l.is_completed)}).then((e=>{t.showToastBack("提交成功！",1,!0),console.log(e)})):t.showToast("请先输入原因！"):t.showToast("请选择是否已经完工！")}};exports.method=i;
