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.3 KiB

3 years ago
import{_ as N,r as n,y as A,J as D,o as r,c,w as l,S as P,j as U,d as s,f as k,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=[{title:"\u7F16\u53F7",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:"\u6765\u6E90",key:"FDesc",width:"160px",align:"center"},{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:"\u8D1F\u8D23\u4EBA",key:"IsEdit",width:"98px",align:"center",customSlot:""},{title:"\u64CD\u4F5C",key:"operator",width:"130px",fixed:"right",customSlot:"operator",align:"center"}];const a=n(["1"]),i=n(!1),e=n(!0),p=n({total:0,limit:10,current:1}),d=n([]),f=n([]),h=n({}),F=n({}),_=n({}),x=n([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]),g=n(["70%","70%","70%","86%","70%","70%","70%","70%","700px","70%","70%","70%","70%"]),m=n({}),T=n(1),j=n([{id:1,name:"\u8FDB\u884C\u4E2D"},{id:2,name:"\u5DF2\u5B8C\u6210"}]),C=n(!1),w=n([]);return{selectedKeys:a,checkbox:i,defaultToolbar:e,dataColumn:t,dataList:d,pageInfo:p,searchObj:h,postData:F,typeList:f,showEditBox:x,modelArea:g,objInfoObj:m,editType:T,stateList:j,hasLoaded:C,MaterialModel:_,dataItem:w}},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 i=0;i<this.showEditBox.length;i++)this.showEditBox[i]=!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 i=await ee(this.postData,"Task");i.Data.List=i.Data.List||[],i.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)}),this.pageInfo.total=i.Data.Total||0;debugger;this.dataList=i.Data.List;debugger;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 i=0;i<this.showEditBox.length;i++)this.showEditBox[i]=!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.