You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
8.1 KiB

3 years ago
import{_ as N,r as i,y as A,J as D,o as r,c,w as l,S as P,j as U,d as s,f as x,h as O,F as E,i as y,z as u,N as v,t as B,C as z,G as K,D as R,E as H,U as q,m as G,H as J,I as Q,q as W,R as X,l as Y,Q as Z}from"./index.58a4812e.js";/* empty css *//* empty css */import"./view.a8aea462.js";/* empty css */import{c as $,g as ee}from"./common.a907f978.js";import{A as te,E as ae,a as oe}from"./EditView.3db60ed6.js";/* empty css */import"./factory.56670aad.js";import"./materialType.20973eba.js";const le={components:{AddMateria:te,EditMateria:ae,EditView:oe},setup(){let t=[{type:"checkbox"},{title:"ID",key:"FID",width:"160px",align:"center",hide:!1},{title:"\u6A21\u5757",key:"FMdmCode",width:"300px",align:"center",hide:!1},{title:"\u529F\u80FD",key:"FSaleCode",width:"160px",align:"center",hide:!1},{title:"\u64CD\u4F5C\u63CF\u8FF0",key:"FDesc",width:"160px",align:"center",hide:!1},{title:"\u64CD\u4F5C\u65F6\u95F4",key:"FAddDate",width:"180px",align:"center"},{title:"\u64CD\u4F5C\u7C7B\u578B",key:"FTestCode",width:"400px",align:"center"},{title:"\u64CD\u4F5C\u4EBA",key:"FUserName",width:"178px",align:"center"}];const a=i(["1"]),n=i(!1),e=i(!0),p=i({total:0,limit:10,current:1}),d=i([]),f=i([]),h=i({}),F=i({}),_=i({}),k=i([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]),b=i(["70%","70%","70%","86%","70%","70%","70%","70%","700px","70%","70%","70%","70%"]),m=i({}),T=i(1),j=i([{id:1,name:"\u8FDB\u884C\u4E2D"},{id:2,name:"\u5DF2\u5B8C\u6210"}]),C=i(!1),I=i([]);return{selectedKeys:a,checkbox:n,defaultToolbar:e,dataColumn:t,dataList:d,pageInfo:p,searchObj:h,postData:F,typeList:f,showEditBox:k,modelArea:b,objInfoObj:m,editType:T,stateList:j,hasLoaded:C,MaterialModel:_,dataItem:I}},props:{dataInfoObj:{type:Object,default:()=>{}},pageTypeObj:{type:Number,default:()=>1}},mounted(){this.dataInfoObj&&(this.dataColumn.pop(),this.dataColumn[0].hide=!0,this.dataColumn[1].hide=!0,this.dataColumn[2].hide=!0,this.dataColumn[7].hide=!1),this._getTypeList(),this._getPageList(!0)},methods:{changePage(t){this.pageInfo.current=t.current,this.pageInfo.limit=t.limit,this._getPageList()},cancelClick(t,a){if(t&&this._getPageList(!0),a)return!1;for(let n=0;n<this.showEditBox.length;n++)this.showEditBox[n]=!1},async _getTypeList(){this.typeList=await $(33)||[]},async _getPageList(t,a){this.pageInfo.total=0,t&&(this.pageInfo.current=1,this.pageInfo.total=0),this.dataInfoObj&&this.dataInfoObj.FID&&(this.postData.FTeamID=this.dataInfoObj.FID,this.postData.FIsUser=!1),this.pageTypeObj&&this.pageTypeObj==2&&(this.postData.FState=99),this.postData.FPageIndex=this.pageInfo.current,this.postData.FPageSize=this.pageInfo.limit;let n=await ee(this.postData,"Task");n.Data.List=n.Data.List||[],n.Data.List.forEach(e=>{let p=this.typeList.find(f=>f.FValue===e.FType);e.FTypeName=p==null?"":p.FName;let d=this.stateList.find(f=>f.id===e.FState);e.FStateName=d==null?"":d.name,e.FAddDate=e.FAddDate==null?"":this.dateFormat(e.FAddDate),e.FEditDate=e.FEditDate==null?"":this.dateFormat(e.FEditDate),e.FFinishDate=e.FFinishDate==null?"":this.dateFormat(e.FFinishDate),e.IsEdit=Math.floor(Math.random()*10)==0?"\u7F16\u8F91":"\u65B0\u589E"}),this.pageInfo.total=n.Data.Total||0;debugger;this.dataList=n.Data.List,this.hasLoaded=!0},dateFormat(t){return t.replace("T"," ").split(".")[0]},getData(t){this.MaterialModel=t;for(let a=0;a<this.showEditBox.length;a++)this.showEditBox[a]=!1;this.showEditBox[11]=!0,this.editType=1},showEditMaterial(t){this.showEditBox[t]=!0},_clickSetInfo(t,a){for(let n=0;n<this.showEditBox.length;n++)this.showEditBox[n]=!1;if(t.FType==1)t.FBoxType=1;else if(t.FType==2)t.FBoxType=2;else if(t.FType==9||t.FType==10)t.FBoxType=4;else if(t.FType>=3&&t.FType<=7||t.FType==11)t.FBoxType=3;else if(t.FType==8)t.FBoxType=5;else if(t.FType==12)t.FBoxType=6;else if(t.FType==13)t.FBoxType=7;else if(t.FType==14)t.FBoxType=8;else if(t.FType==15)t.FBoxType=9;else if(t.FType==16)this.dataItem=t,t.FBoxType=10;else return A.msg("\u672A\u77E5\u4E8B\u9879\u7C7B\u578B");this.objInfoObj=t,this.editType=a,this.showEditBox[t.FBoxType]=!0},_clickS