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
104 KiB

3 years ago
import{_ as _export_sfc,r as ref,x as watch,y as layer,o as openBlock,f as createElementBlock,d as createVNode,w as withCtx,c as createBlock,F as Fragment,h as renderList,i as createCommentVNode,t as toDisplayString,z as createTextVNode,A as pushScopeId,B as popScopeId,e as createBaseVNode,C as component,D as component$1,E as component$2,G as component$3,H as component$4,q as component$5,I as component$6,J as resolveComponent,j as component$7,K as component$8,L as component$9,l as component$a,m as component$b,M as getBasicRoleList,N as createSlots,n as normalizeClass,O as withDirectives,P as vShow,Q as _sfc_main$i,R as component$c,S as normalizeStyle,T as component$d,v as http,U as component$e}from"./index.58a4812e.js";/* empty css *//* empty css */import{d as downloadBOM,g as getTeamworkView,a as getListByTeamId,u as updateBatchById2,E as EditTypeList,G as GetMaterialInfoListByTeamId}from"./view.a8aea462.js";/* empty css */import{a as getDataModel,b as getDataCode,c as getBasicList,g as getPageList,u as updateDataInfo,i as insertDataInfo,d as commonSave}from"./common.a907f978.js";import{g as getFactoryList}from"./factory.56670aad.js";import{g as getInfoData}from"./materialType.20973eba.js";import{d as dockMDMCode,g as getPackageInfo,u as updatePackageData,a as getPackageChildList,n as noSupplyPackageChild}from"./package.a040d70a.js";/* empty css */var AddTerm_vue_vue_type_style_index_0_scoped_true_lang="";const _sfc_main$h={setup(){const a=ref({FMaterialType:"ZMAT",FWeightUnit:"KG"}),t=ref([]),o=ref([[],[]]),e=ref([]);let i=[{type:"radio"},{title:"\u540D\u79F0",key:"FName"},{title:"\u8BD5\u9A8C\u53F7",key:"FTestCode"},{title:"\u914D\u65B9\u79CD\u7C7B",key:"FTypeName",width:"110px"},{title:"\u7248\u672C\u53F7",key:"FVersionCode"}];i.forEach(c=>{c.align="center"});const l=ref({total:0,limit:5,current:1}),n=ref([]),d=ref("");watch(d,function(){const c=n.value.find(u=>u.FID==d.value)||null;c!=null&&(a.value.FFormulaName=c.FName+"+"+c.FTestCode+"+"+c.FVersionCode,a.value.FFormulaID=c.FID,a.value.FVersionCode=c.FVersionCode,a.value.FFormulaTestCode=c.FTestCode)});const s=ref(!1),r=ref(!0),f=ref([]),y=ref([]),h=ref(null);return{dataInfo:a,formulaList:t,seletList:o,typeList:e,dataColumn:i,dataList:n,pageInfo:l,selectedKey:d,showEditBox:s,showButton:r,saleList:f,factoryLists:y,factoryValue:h}},props:{dataInfoObj:{type:Object,default:()=>{}}},mounted(){this.dataInfoObj&&this.dataInfoObj.FTeamID&&(this._getTeamData(this.dataInfoObj.FTeamID),this.showButton=this.dataInfoObj.FCanEdit!=2),this._getSelectList(),this._getFactoryList()},methods:{cancelClick(a){this.$emit("cancelClick",a||!1)},async _getFactoryList(){this.factoryLists=await getFactoryList()||[]},async _getTeamData(a){let t=await getDataModel({FID:a,FKey:"FID,FTestCode,FWeightUnit,FSaleCode,FMaterialType,FMaterialGroup,FFormulaTestCode,FFormulaName,FFormulaID,FPackCode,FCreateFactoryID"},"Teamwork");this.dataInfo=t||this.dataInfo},async _getSelectList(){let a=await getDataCode({FType:"1,2"});this.seletList[0]=a.FType1||[],this.seletList[1]=a.FType2||[],this.typeList=await getBasicList(37)||[],this._getPageList()},async _inputSaleCode(a){let t={FPageIndex:1,FPageSize:10,FName:a||""};if(this.saleList=[],t.FName!=""){let o=await getPageList(t,"Material");this.saleList=o.Data.List||[]}},_searchPageList(a){this._getPageList(!0)},changePage(a){this.pageInfo.current=a.current,this.pageInfo.limit=a.limit,this._getPageList()},async _getPageList(a){a&&(this.pageInfo.current=1,this.pageInfo.total=0);let t={FPageIndex:this.pageInfo.current,FPageSize:this.pageInfo.limit},o=this.dataInfo.FSearchName;o&&o!=""&&(t.Or_FPlmCode=t.Or_FTestCode=t.Or_FName=t.Or_FVersionCode=o);let e=await getPageList(t,"Formula");e.Data.List=e.Data.List||[],e.Data.List.forEach(i=>{let l=this.typeList.find(n=>n.FValue==i.FType);i.FTypeName=l==null?i.FType:l.FName,this.dataInfo.FFormulaID==i.FID&&(this.selectedKey=i.FID)}),this.pageInfo.total=e.Data.Total||0,this.dataList=e.Data.List},async submitClick(a){let t=this.dataInfo;t.FSaleCode=(t.FSaleCode||"").tri