import{b as r,D as o,U as a,A as i,c as n}from"./api.BJXIp3wZ.js";import{D as l}from"./index.BKEMpsLA.js";import"./vue.YrNK8sx4.js";const q=function({crudExpose:u,inventoryDialog:s}){return{crudOptions:{request:{pageRequest:async e=>await n(e),addRequest:async({form:e})=>await i(e),editRequest:async({form:e,row:t})=>(e.id=t.id,await a(e)),delRequest:async({row:e})=>await o(e.id)},form:{wrapper:{buttons:{ok:{text:"提交"}}}},actionbar:{buttons:{add:{show:!1},startTaking:{text:"开始盘点",click:async()=>{const e=await r({remark:"例行盘点"});(e==null?void 0:e.code)===2e3&&(s.value.setCheckNo(e.data.check_no),s.value.visible=!0)}}}},toolbar:{show:!0},rowHandle:{fixed:"right",width:220,buttons:{view:{show:!1},remove:{show:!1},edit:{show:!1}}},pagination:{show:!1},columns:{_index:{title:"序号",form:{show:!1},column:{type:"index",align:"center",width:"70px",columnSetDisabled:!0}},check_no:{title:"编号",search:{show:!1},treeNode:!0,type:"input",column:{minWidth:120},form:{show:!0,rules:[{required:!0,message:"名称必填项"}],component:{placeholder:"请输入"}},viewForm:{component:{placeholder:""},rules:[{required:!0,message:""}]}},start_time:{title:"维护日期",type:"datetime",column:{minWidth:120},form:{show:!1,component:{placeholder:"请填写维护日期"},rules:[{required:!0,message:"请填写维护日期"}]},viewForm:{component:{placeholder:""},rules:[{required:!0,message:""}]},valueResolve({form:e,value:t}){e.start_time=t?l(t).format("YYYY-MM-DD HH:mm:ss"):null}},checker_name:{title:"盘点人",type:"input",column:{minWidth:120},form:{show:!1,component:{placeholder:"请填写盘点人"},rules:[{required:!1,message:"请填写盘点人"}]},viewForm:{component:{placeholder:""},rules:[{required:!1,message:""}]}},status_display:{title:"状态",search:{show:!1},treeNode:!0,type:"input",column:{minWidth:120},form:{show:!1,rules:[{required:!0,message:"维护标题必填项"}],component:{placeholder:"请输入维护标题"}},viewForm:{component:{placeholder:""},rules:[{required:!0,message:""}]}}}}}};export{q as createCrudOptions};
