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.5 KiB
2 lines
8.5 KiB
|
3 years ago
|
import{_ as N,r as i,y as A,J as E,o as r,c as f,w as l,S as P,j as U,d as s,f as x,h as D,F as O,i as u,z as p,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=[{title:"ID",key:"FID",width:"160px",align:"center",hide:!1},{title:"\u7269\u6599\u53F7",key:"FMdmCode",width:"300px",align:"center",hide:!1},{title:"\u7269\u6599\u63CF\u8FF0",key:"FSaleCode",width:"160px",align:"center",hide:!1},{title:"\u8BD5\u9A8C\u53F7",key:"FTestCode",width:"160px",align:"center",hide:!1},{title:"\u4EA7\u54C1\u5206\u7C7B",key:"FDesc",width:"400px",align:"center"},{title:"\u53D1\u8D77\u65F6\u95F4",key:"FAddDate",width:"180px",align:"center"},{title:"\u53D1\u8D77\u4EBA",key:"FUserName",width:"178px",align:"center"},{title:"\u7C7B\u578B",key:"IsEdit",width:"98px",align:"center",customSlot:""},{title:"\u72B6\u6001",key:"FStateName",width:"160px",align:"center"},{title:"\u64CD\u4F5C",key:"operator",width:"130px",fixed:"right",customSlot:"operator",align:"center"}];const a=i(["1"]),n=i(!1),e=i(!0),y=i({total:0,limit:10,current:1}),d=i([]),h=i([]),m=i({}),F=i({}),_=i({}),k=i([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]),g=i(["70%","70%","70%","86%","70%","70%","70%","70%","700px","70%","70%","70%","70%"]),c=i({}),T=i(1),C=i([{id:1,name:"\u8FDB\u884C\u4E2D"},{id:2,name:"\u5DF2\u5B8C\u6210"}]),I=i(!1),j=i([]);return{selectedKeys:a,checkbox:n,defaultToolbar:e,dataColumn:t,dataList:d,pageInfo:y,searchObj:m,postData:F,typeList:h,showEditBox:k,modelArea:g,objInfoObj:c,editType:T,stateList:C,hasLoaded:I,MaterialModel:_,dataItem:j}},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 y=this.typeList.find(h=>h.FValue===e.FType);e.FTypeName=y==null?"":y.FName;let d=this.stateList.find(h=>h.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
|