parent
							
								
									f752414cf5
								
							
						
					
					
						commit
						0359982c54
					
				
											
												
													File diff suppressed because one or more lines are too long
												
											
										
									
								| @ -0,0 +1 @@ | ||||
| .dataInfo[data-v-a4d8cdf6]{max-width:90%;height:600px;margin:30px auto;padding-right:30px;overflow-y:auto}.search-btn2[data-v-a4d8cdf6]{position:absolute;right:0;top:0}.note2[data-v-a4d8cdf6]{display:inline-block;margin-left:16px}.note3[data-v-a4d8cdf6]{display:inline-flex;line-height:38px;margin-left:12px}.note2[data-v-a4d8cdf6],.note[data-v-a4d8cdf6]{color:#999;font-size:12px}.note[data-v-a4d8cdf6]{margin-top:4px;position:absolute}.note .layui-form-radio[data-v-a4d8cdf6],.note .layui-form-radio i[data-v-a4d8cdf6]{margin:-2px 1px 0 0;padding:0;font-size:14px;line-height:0}.FSearchName[data-v-a4d8cdf6]{color:var(--global-primary-color)}.dataInfo[data-v-6b2ec07a]{max-width:90%;height:600px;margin:30px auto;padding-right:30px;overflow-y:auto}.search-btn2[data-v-6b2ec07a]{position:absolute;right:0;top:0}.note2[data-v-6b2ec07a]{display:inline-block;margin-left:16px}.note3[data-v-6b2ec07a]{display:inline-flex;line-height:38px;margin-left:12px}.note2[data-v-6b2ec07a],.note[data-v-6b2ec07a]{color:#999;font-size:12px}.note[data-v-6b2ec07a]{margin-top:4px;position:absolute;left:0}.note .layui-form-radio[data-v-6b2ec07a],.note .layui-form-radio i[data-v-6b2ec07a]{margin:-2px 1px 0 0;padding:0;font-size:14px;line-height:0}.FSearchName[data-v-6b2ec07a]{color:var(--global-primary-color)}.layui-item33[data-v-66f427dc]{width:90%;padding-right:30px;margin:30px auto 10px;display:block;overflow:auto;position:relative;clear:both}.menuBtn[data-v-66f427dc]{display:block;text-align:center;width:96%;margin:20px auto}.content-box[data-v-b2751b9c]{margin:30px 10px;display:block;position:relative;clear:both;float:none;min-height:740px}.row-select td[data-v-b2751b9c]{overflow:inherit}.layui-select[data-v-b2751b9c]{width:100%}.edit[data-v-b2751b9c]{color:green}[data-v-b2751b9c] .edit-item .layui-input{border-color:#5fb878!important}[data-v-b2751b9c] .edit-item .layui-input:hover{border-color:#009688!important;color:#009688}.isShow[data-v-b2751b9c]{width:370px;height:30px;border:none}.isHidden[data-v-b2751b9c],.isBomHidden[data-v-b2751b9c]{display:none} | ||||
| @ -0,0 +1 @@ | ||||
| .dataInfo[data-v-71a18e87]{max-width:90%;height:600px;margin:30px auto;padding-right:30px;overflow-y:auto}.search-btn2[data-v-71a18e87]{position:absolute;right:0;top:0}.note2[data-v-71a18e87]{display:inline-block;margin-left:16px}.note3[data-v-71a18e87]{display:inline-flex;line-height:38px;margin-left:12px}.note2[data-v-71a18e87],.note[data-v-71a18e87]{color:#999;font-size:12px}.note[data-v-71a18e87]{margin-top:4px;position:absolute;left:0}.note .layui-form-radio[data-v-71a18e87],.note .layui-form-radio i[data-v-71a18e87]{margin:-2px 1px 0 0;padding:0;font-size:14px;line-height:0}.FSearchName[data-v-71a18e87]{color:var(--global-primary-color)}.layui-item33[data-v-33342b24]{width:90%;padding-right:30px;margin:30px auto 10px;display:block;overflow:auto;position:relative;clear:both}.menuBtn[data-v-33342b24]{display:block;text-align:center;width:96%;margin:20px auto}.content-box[data-v-7d007464]{margin:30px 10px;display:block;position:relative;clear:both;float:none;min-height:740px}.row-select td[data-v-7d007464]{overflow:inherit}.layui-select[data-v-7d007464]{width:100%}.edit[data-v-7d007464]{color:green}[data-v-7d007464] .edit-item .layui-input{border-color:#5fb878!important}[data-v-7d007464] .edit-item .layui-input:hover{border-color:#009688!important;color:#009688}.isShow[data-v-7d007464]{width:370px;height:30px;border:none}.isHidden[data-v-7d007464],.isBomHidden[data-v-7d007464]{display:none} | ||||
											
												
													File diff suppressed because one or more lines are too long
												
											
										
									
								
											
												
													File diff suppressed because one or more lines are too long
												
											
										
									
								
											
												
													File diff suppressed because one or more lines are too long
												
											
										
									
								
											
												
													File diff suppressed because one or more lines are too long
												
											
										
									
								
											
												
													File diff suppressed because one or more lines are too long
												
											
										
									
								
											
												
													File diff suppressed because one or more lines are too long
												
											
										
									
								| @ -0,0 +1 @@ | ||||
| import{v as n}from"./index.58a4812e.js";async function r(a){var t=[];return await n.post("/api/Common/GetBasicList",{FType:a}).then(e=>{t=e.Data.sort(function(s,o){return s.FOrder>o.FOrder})}),t}async function u(a,t){let e=0;return await n.post("/api/"+t+"/GetDataModel",a).then(s=>{e=s.Data}),e}async function l(a,t){let e=0;return await n.post("/api/"+t+"/UpdateDataModel",a).then(s=>{e=s.Data}),e}async function c(a,t){let e=0;return await n.post("/api/"+t+"/InsertDataModel",a).then(s=>{e=s.Data}),e}async function p(a,t){let e=0;return await n.post("/api/"+t+"/DeleteDataById",{FID:a.FID||a}).then(s=>{e=s.Data}),e}async function D(a,t){a=a||{FPageIndex:1,FPageSize:10};let e={};return await n.post("/api/"+t+"/GetPageList",a).then(s=>{e=s}),e}async function f(a,t){let e={};return await n.post("/api/"+t+"/Save",a).then(s=>{e=s}),e}async function m(a){let t="";return await n.post("/api/Common/GetTempFile",{FType:a||1}).then(e=>{t=e.Data}),t}async function C(a){let t={};return await n.post("/api/Common/CheckIsHasPower",a).then(e=>{t=e.Data}),t}async function d(a){let t={};return await n.post("/api/Common/GetDataCodeList",a).then(e=>{t=e.Data}),t}async function h(){let a={};return await n.post("/api/Common/GetConfigList",{}).then(t=>{a=t.Data}),a}async function y(a){let t={};return await n.post("/api/Common/GetConfigValue",{FID:a}).then(e=>{t=e.Data}),t}async function g(a){let t={};return await n.post("/api/Common/StateDataCode",{FID:a}).then(e=>{t=e.Data}),t}async function w(a){let t={};return await n.post("/api/Common/DeleteDataCode",{FID:a}).then(e=>{t=e.Data}),t}async function F(a){let t={};return await n.post("/api/Common/ChangeDataCode",a).then(e=>{t=e.Data}),t}export{u as a,d as b,r as c,f as d,C as e,m as f,D as g,p as h,c as i,F as j,h as k,w as l,y as m,g as s,l as u}; | ||||
											
												
													File diff suppressed because one or more lines are too long
												
											
										
									
								| @ -0,0 +1 @@ | ||||
| import{v as o}from"./index.58a4812e.js";async function c(){var t=[];return await o.post("/api/Factory/GetFactoryList").then(a=>{t=a.Data}),t}async function i(t,a){let e=0;return await o.post("/api/Factory/CheckHasCode",{FID:t,FCode:a}).then(r=>{e=r.Data}),e}export{i as c,c as g}; | ||||
											
												
													File diff suppressed because one or more lines are too long
												
											
										
									
								
											
												
													File diff suppressed because one or more lines are too long
												
											
										
									
								
											
												
													File diff suppressed because one or more lines are too long
												
											
										
									
								
											
												
													File diff suppressed because one or more lines are too long
												
											
										
									
								| @ -0,0 +1 @@ | ||||
| import{_ as C,r as h,u as k,g as w,a as L,o as r,c as p,w as n,b as H,d as s,e as t,t as i,f as D,h as S,n as N,F as z,i as T,j as P,k as E,l as M,m as A,p as B,q as I,s as V}from"./index.58a4812e.js";/* empty css              */import{g as $}from"./common.a907f978.js";const O={setup(){let a=[{title:"\u9500\u552E\u53F7",key:"FSaleCode",align:"center"},{title:"\u53D1\u8D77\u65F6\u95F4",key:"FAddDate",align:"center",width:"182px"},{title:"\u5F53\u524D\u6D41\u7A0B",key:"FName",align:"center",width:"200px"},{title:"\u4E8B\u9879\u72B6\u6001",key:"FState",align:"center",width:"98px"},{title:"\u4EFB\u52A1\u6765\u6E90",key:"FDesc",align:"center"}];const o=h([]),l=h([" "," "," "," "]),e=h(""),f=k(),_=h([]);return{topCount:l,dataColumn:a,dataList:o,tableHeight:e,routerInfo:f,fastList:_}},mounted(){this._getHomeTopCount();let a=parseInt(this.$refs["lay-row3-div"].offsetHeight)-100;this.tableHeight=a+"px",this._getHomeFast(),this._getHomeNeed(a/40)},methods:{async _getHomeTopCount(){this.topCount=await w()||[0,0,0,0]},async _getHomeFast(){let a=await L({}),o=[];a.forEach(l=>{l.FChild.forEach(e=>{e.FName.indexOf("\u5168\u90E8")==-1&&e.FName.indexOf("\u7BA1\u7406")==-1&&o.length<8&&o.push(e)})}),this.fastList=o},async _getHomeNeed(a){let o={FPageIndex:1,FPageSize:Math.floor(a)};o.FPageSize=o.FPageSize<5?5:o.FPageSize;let l=await $(o,"Task");l.Data.List=l.Data.List||[],l.Data.List.forEach(e=>{e.FAddDate=e.FAddDate==null?"":this.dateFormat(e.FAddDate),e.FState=e.FState==2?"\u5DF2\u5B8C\u6210":"\u8FDB\u884C\u4E2D"}),this.dataList=l.Data.List||[]},dateFormat(a){return a.replace("T"," ").split(".")[0]},_goToMore(a){let o="";a==-1?o="/need/all":o=this.fastList[a].FRemark,this.routerInfo.push(o)}}},R=t("div",{class:"height20"},null,-1),j={class:"home-box1"},q={class:"icon"},G={class:"desc"},J={class:"count"},K=t("label",null,"\u672A\u5B8C\u4EE3\u529E\u4E8B\u9879",-1),Q={class:"home-box1"},U={class:"icon c1"},W={class:"desc"},X={class:"count"},Y=t("label",null,"\u4ECA\u65E5\u65B0\u589E\u5F85\u529E",-1),Z={class:"home-box1"},tt={class:"icon c2"},et={class:"desc"},ot={class:"count"},st=t("label",null,"\u534F\u540C\u8DEF\u7EBF",-1),at={class:"home-box1"},nt={class:"icon c3"},lt={class:"desc"},ct={class:"count"},it=t("label",null,"\u6211\u53C2\u4E0E\u7684\u8DEF\u7EBF",-1),_t=t("div",{class:"height10"},null,-1),dt={class:"lay-row2"},ht=t("h1",null,"\u5FEB\u6377\u5165\u53E3",-1),rt=["title"],ut={class:"lay-row3"},mt={class:"lay-row3-div",ref:"lay-row3-div"},pt={class:"home-box3"},ft=t("h1",null,"\u6700\u65B0\u5F85\u529E\u4E8B\u9879",-1);function gt(a,o,l,e,f,_){const F=P,d=E,c=M,g=A,y=B,b=I,v=V,x=H;return r(),p(x,{class:"home-layout"},{default:n(()=>[s(y,null,{default:n(()=>[s(F,{fluid:"true",style:{padding:"10px"}}),R,s(g,{space:"10"},{default:n(()=>[s(c,{md:"6"},{default:n(()=>[t("div",j,[t("p",q,[s(d,{type:"layui-icon-note",size:"26px"})]),t("p",G,[t("label",J,i(e.topCount[0]),1),K])])]),_:1}),s(c,{md:"6"},{default:n(()=>[t("div",Q,[t("p",U,[s(d,{type:"layui-icon-form",size:"26px"})]),t("p",W,[t("label",X,i(e.topCount[1]),1),Y])])]),_:1}),s(c,{md:"6"},{default:n(()=>[t("div",Z,[t("p",tt,[s(d,{type:"layui-icon-slider",size:"26px"})]),t("p",et,[t("label",ot,i(e.topCount[2]),1),st])])]),_:1}),s(c,{md:"6"},{default:n(()=>[t("div",at,[t("p",nt,[s(d,{type:"layui-icon-download-circle",size:"26px"})]),t("p",lt,[t("label",ct,i(e.topCount[3]),1),it])])]),_:1})]),_:1})]),_:1}),s(y,{class:"layui-header2"},{default:n(()=>[_t,t("div",dt,[s(g,{space:"10"},{default:n(()=>[s(c,{md:"24"},{default:n(()=>[ht]),_:1}),(r(!0),D(z,null,S(e.fastList,(u,m)=>(r(),p(c,{md:"3",key:m,onClick:yt=>_._goToMore(m)},{default:n(()=>[t("div",{class:N("home-box2 c"+m),title:u.FName},i(u.FName),11,rt)]),_:2},1032,["onClick"]))),128))]),_:1})])]),_:1}),s(v,null,{default:n(()=>[t("div",ut,[t("div",mt,[t("div",pt,[t("h2",{onClick:o[0]||(o[0]=u=>_._goToMore(-1))},"\u70B9\u51FB\u67E5\u770B\u66F4\u591A\u5F85\u529E\u4E8B\u9879"),ft]),e.tableHeight!=""?(r(),p(b,{key:0,height:e.tableHeight,columns:e.dataColumn,dataSource:e.dataList},null,8,["height","columns","dataSource"])):T("",!0)],512)])]),_:1})]),_:1})}var xt=C(O,[["render",gt]]);export{xt as default}; | ||||
											
												
													File diff suppressed because one or more lines are too long
												
											
										
									
								
											
												
													File diff suppressed because one or more lines are too long
												
											
										
									
								| @ -0,0 +1 @@ | ||||
| :root{--block-default-color: var(--global-checked-color);--block-border-radius: var(--global-border-radius)}.layui-quote{padding:15px;line-height:1.6;margin-bottom:10px;border-left:5px solid var(--block-default-color);border-radius:var(--block-border-radius);background-color:var(--global-neutral-color-1)}.layui-quote-nm{border-left:5px solid #eee} | ||||
| @ -0,0 +1 @@ | ||||
| import a from"./all.aa125321.js";import{_ as n,r as p,J as e,o as m,c as i}from"./index.58a4812e.js";/* empty css              *//* empty css              */import"./view.a8aea462.js";/* empty css              */import"./common.a907f978.js";import"./all.0c305d2b.js";import"./factory.56670aad.js";import"./materialType.20973eba.js";import"./package.a040d70a.js";/* empty css               *//* empty css               */const s={components:{AllData:a},setup(){return{dataInfoObj:p(2)}}};function c(o,f,l,t,_,d){const r=e("AllData");return m(),i(r,{dataInfoObj:t.dataInfoObj},null,8,["dataInfoObj"])}var C=n(s,[["render",c]]);export{C as default}; | ||||
| @ -0,0 +1 @@ | ||||
| import a from"./all.aa125321.js";import{_ as n,r as p,J as e,o as m,c}from"./index.58a4812e.js";/* empty css              *//* empty css              */import"./view.a8aea462.js";/* empty css              */import"./common.a907f978.js";import"./all.0c305d2b.js";import"./factory.56670aad.js";import"./materialType.20973eba.js";import"./package.a040d70a.js";/* empty css               *//* empty css               */const s={components:{AllData:a},setup(){return{dataInfoObj:p(1)}}};function i(o,f,l,t,_,d){const r=e("AllData");return m(),c(r,{dataInfoObj:t.dataInfoObj},null,8,["dataInfoObj"])}var C=n(s,[["render",i]]);export{C as default}; | ||||
											
												
													File diff suppressed because one or more lines are too long
												
											
										
									
								| @ -0,0 +1 @@ | ||||
| import{_ as e}from"./index.58a4812e.js";const r={name:"log.vue"};function o(t,a,n,s,_,c){return" 111 "}var f=e(r,[["render",o]]);export{f as default}; | ||||
											
												
													File diff suppressed because one or more lines are too long
												
											
										
									
								| @ -0,0 +1 @@ | ||||
| .content-box[data-v-36abbda6]{height:744px;display:block;position:relative;clear:both;float:none}.edit-box[data-v-36abbda6]{display:block;width:99%;text-align:center;margin:0 auto;clear:both;float:none}.edit-info[data-v-36abbda6]{margin:20px .75% 10px 0;width:47%;padding-left:1%;padding-right:1%;display:inline-block}.edit-info+.edit-info[data-v-36abbda6]{margin-left:.75%;margin-right:0}.layui-form-item[data-v-36abbda6]{margin-bottom:16px}.content-box[data-v-045e108a]{height:400px;margin:20px 10px;display:block;position:relative;clear:both;float:none} | ||||
| @ -0,0 +1 @@ | ||||
| import{v as n}from"./index.58a4812e.js";async function r(t){let a={};return await n.post("/api/MaterialType/GetInfoData",t||{}).then(e=>{a=e.Data}),a}async function i(t){let a=0;return await n.post("/api/MaterialType/ChangeInfoData",t).then(e=>{a=e.Data||0}),a}export{i as c,r as g}; | ||||
| @ -0,0 +1 @@ | ||||
| import{v as n}from"./index.58a4812e.js";async function i(t){let a={};return await n.post("/api/Package/GetPackageChildList",t).then(e=>{a=e}),a}async function s(t){let a=0;return await n.post("/api/Package/DeletePackageChild",{FID:t}).then(e=>{a=e.Data}),a}async function o(t){let a=0;return await n.post("/api/Package/GetPackageInfo",t).then(e=>{a=e.Data}),a}async function l(t){let a=0;return await n.post("/api/Package/UpdatePackageData",t).then(e=>{a=e.Data}),a}async function u(t){let a=0;return await n.post("/api/Package/DockMDMCode",t).then(e=>{a=e.Data}),a}async function p(t){let a=0;return await n.post("/api/Package/NoSupplyPackageChild",t).then(e=>{a=e.Data}),a}export{i as a,s as b,u as d,o as g,p as n,l as u}; | ||||
											
												
													File diff suppressed because one or more lines are too long
												
											
										
									
								
											
												
													File diff suppressed because one or more lines are too long
												
											
										
									
								
											
												
													File diff suppressed because one or more lines are too long
												
											
										
									
								
											
												
													File diff suppressed because one or more lines are too long
												
											
										
									
								
											
												
													File diff suppressed because one or more lines are too long
												
											
										
									
								| @ -0,0 +1 @@ | ||||
| import{S as e}from"./all.0c305d2b.js";import{_ as r,r as a,J as n,o as s,c as m}from"./index.58a4812e.js";/* empty css              *//* empty css              */import"./view.a8aea462.js";/* empty css              */import"./common.a907f978.js";import"./factory.56670aad.js";import"./materialType.20973eba.js";import"./package.a040d70a.js";/* empty css               */const c={components:{AllData:e},setup(){return{pageTypeObj:a(2)}}};function i(o,l,_,t,f,u){const p=n("AllData");return s(),m(p,{pageTypeObj:t.pageTypeObj},null,8,["pageTypeObj"])}var $=r(c,[["render",i]]);export{$ as default}; | ||||
											
												
													File diff suppressed because one or more lines are too long
												
											
										
									
								
											
												
													File diff suppressed because one or more lines are too long
												
											
										
									
								| @ -0,0 +1 @@ | ||||
| import{v as i}from"./index.58a4812e.js";async function r(e){e=e||{FPageIndex:1,FPageSize:10};let t={};return await i.post("/api/Teamwork/GetTeamworkPageList",e).then(a=>{t=a}),t}async function o(e){let t={FPageIndex:1,FPageSize:999,FTeamID:e},a=[];return await i.post("/api/Teamwork/GetTeamProcessList",t).then(s=>{a=s.Data.List||[]}),a}async function u(e){let t={};return await i.post("/api/Teamwork/GetTeamworkView",e).then(a=>{t=a.Data}),t}async function w(e){let t={FTeamID:e},a=[];return await i.post("/api/Teamwork/DockDownBomData",t).then(s=>{a=s}),a}async function p(e){let t=[];return await i.post("/api/Teamwork/EditTypeList",e).then(a=>{t=a}),t}async function c(e){let t={};return await i.post("/api/View/GetListByTeamId",e).then(a=>{t=a.Data}),t}async function l(e){let t={};return await i.post("/api/View/UpdateBatchById2",e).then(a=>{t=a}),t}async function m(e){let t={};return await i.post("/api/View/GetMaterialInfoListByTeamId",e).then(a=>{t=a}),t}export{p as E,m as G,c as a,o as b,r as c,w as d,u as g,l as u}; | ||||
											
												
													File diff suppressed because one or more lines are too long
												
											
										
									
								| @ -0,0 +1,118 @@ | ||||
| <template> | ||||
|     <lay-table style="margin:0 0 30px 0;" height="200px" :columns="dataColumn" :data-source="dataList"> | ||||
| 		<template v-slot:toolbar> | ||||
| 			<p style="float:left;">配方视图</p> | ||||
| 		</template> | ||||
| 	</lay-table> | ||||
| </template> | ||||
| <script> | ||||
|     import { | ||||
| 		ref | ||||
| 	} from 'vue'; | ||||
|     import { | ||||
| 		getTeamworkView | ||||
| 	} from "/src/api/api/teamwork"; | ||||
| 
 | ||||
|     export default { | ||||
|         setup() { | ||||
|             const viewList = ref([]); | ||||
|             const dataColumn = ref([ | ||||
|                 {type: 'number', title: '序号', width: '56'}, | ||||
|                 {key: '工厂', title: '工厂', align: 'center', width: '130px'}, | ||||
|                 {key: '开始生效日期', title: '开始生效日期', align: 'center', width: '130px'}, | ||||
|                 {key: 'BOM用途', title: 'BOM用途', align: 'center', width: '130px'}, | ||||
|                 {key: 'BOM状态', title: 'BOM状态', align: 'center', width: '130px'}, | ||||
|                 {key: '可选文本', title: '可选文本', align: 'center', width: '130px'}, | ||||
|                 {key: '可选BOM', title: '可选BOM', align: 'center', width: '130px'}, | ||||
|                 {key: '父项编码', title: '父项编码', align: 'center', width: '200px'}, | ||||
|                 {key: '父项描述', title: '父项描述', align: 'center', width: '300px'}, | ||||
|                 {key: '基本数量', title: '基本数量', align: 'center', width: '130px'}, | ||||
|                 {key: '基本单位', title: '基本单位', align: 'center', width: '130px'}, | ||||
|                 {key: '子项序号', title: '子项序号', align: 'center', width: '130px'}, | ||||
|                 {key: '项目类别', title: '项目类别', align: 'center', width: '130px'}, | ||||
|                 {key: '子项编码', title: '子项编码', align: 'center', width: '200px'}, | ||||
|                 {key: '子件描述', title: '子件描述', align: 'center', width: '300px'}, | ||||
|                 {key: '组件数量', title: '组件数量', align: 'center', width: '130px'}, | ||||
|                 {key: '计量单位', title: '计量单位', align: 'center', width: '130px'}, | ||||
|                 {key: '工程变更号', title: '工程变更号', align: 'center', width: '130px'}, | ||||
|                 {key: '项目ID', title: '项目ID', align: 'center', width: '130px'}, | ||||
|                 {key: '物料供应标识符', title: '物料供应标识符', align: 'center', width: '130px'}, | ||||
|                 {key: '备件标示', title: '备件标示', align: 'center', width: '130px'}, | ||||
|                 {key: '生产仓储地点', title: '生产仓储地点', align: 'center', width: '130px'}, | ||||
|                 {key: '组件损耗率', title: '组件损耗率', align: 'center', width: '130px'}, | ||||
|                 {key: '成本核算标识相关', title: '成本核算标识相关', align: 'center', width: '130px'}, | ||||
|                 {key: '生产相关', title: '生产相关', align: 'center', width: '130px'}, | ||||
|                 {key: 'BOM项目文本1', title: 'BOM项目文本1', align: 'center', width: '130px'}, | ||||
|                 {key: 'BOM项目文本2', title: 'BOM项目文本2', align: 'center', width: '130px'}, | ||||
|                 {key: '替代项目组', title: '替代项目组', align: 'center', width: '130px'}, | ||||
|                 {key: '优先级', title: '优先级', align: 'center', width: '130px'}, | ||||
|                 {key: '策略', title: '策略', align: 'center', width: '130px'}, | ||||
|                 {key: '使用可能性', title: '使用可能性', align: 'center', width: '130px'}, | ||||
|                 {key: '固定损耗数量', title: '固定损耗数量', align: 'center', width: '130px'} | ||||
|             ]); | ||||
|             const dataList = ref([]); | ||||
| 
 | ||||
|             return { | ||||
|                 viewList, | ||||
| 				dataColumn, | ||||
| 				dataList | ||||
| 			} | ||||
|         }, | ||||
|         props: { | ||||
| 			teamId: { | ||||
| 				type: String, | ||||
| 				default: () => "" | ||||
| 			}, | ||||
|             halfId: { | ||||
|                 type: String, | ||||
|                 default: () => "" | ||||
|             } | ||||
| 		}, | ||||
|         mounted() { | ||||
|             this.initPage(); | ||||
| 		}, | ||||
|         methods: { | ||||
|             async initPage() { | ||||
|                 let dataColumn = [{ | ||||
| 					type: "number", | ||||
| 					title: "序号", | ||||
| 					width: "56" | ||||
| 				}]; | ||||
|                 let dataList = []; | ||||
| 
 | ||||
| 				let postData = { | ||||
| 					FTeamID: this.teamId, | ||||
| 					FViewType: 2, | ||||
| 					FType: 1, | ||||
| 					HalfId : this.halfId | ||||
| 				}; | ||||
| 
 | ||||
| 				let result = await getTeamworkView(postData); | ||||
| 
 | ||||
|                 let formulaList = result["List1"] | ||||
| 
 | ||||
|                 if (formulaList) { | ||||
|                     for (let key in formulaList[0]) { | ||||
|                         let width = (key.indexOf("描述") != -1 || key == "文本" || key == "物料") ? "300px" : | ||||
|                             "130px"; | ||||
|                         width = key.indexOf("编码") != -1 ? "200px" : width; | ||||
|                         dataColumn.push({ | ||||
|                             key: key, | ||||
|                             title: key.split('.').pop(), | ||||
|                             align: "center", | ||||
|                             width: width | ||||
|                         }); | ||||
|                     } | ||||
|                      | ||||
|                     formulaList.forEach((item) => { | ||||
|                         dataList.push(item); | ||||
|                     }); | ||||
|                 } | ||||
|                  | ||||
|                 // this.dataColumn = dataColumn; | ||||
| 				this.dataList = dataList; | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
| </script> | ||||
| @ -0,0 +1,78 @@ | ||||
| <template> | ||||
|     <lay-container> | ||||
|         <view class="layui-item33 color999" :style="'max-height:900px'"> | ||||
|             <lay-row space="10"> | ||||
|                 <lay-col md="4" sm="12" xs="24" v-for="(item, index) in columns"> | ||||
|                     <lay-checkbox-group v-model="checkedItem"> | ||||
|                         <lay-checkbox :name="item.title" skin="primary" :value="item.key"> | ||||
|                             {{ item.title }} | ||||
|                         </lay-checkbox> | ||||
|                     </lay-checkbox-group> | ||||
|                 </lay-col> | ||||
|             </lay-row> | ||||
|         </view> | ||||
|         <view class="menuBtn"> | ||||
| 			<lay-button type="primary" @click="submitClick">确定</lay-button> | ||||
| 			<lay-button @click="cancelClick">取消</lay-button> | ||||
| 		</view> | ||||
|     </lay-container> | ||||
| </template> | ||||
| <script> | ||||
|     import { | ||||
| 		ref | ||||
| 	} from 'vue'; | ||||
|     export default { | ||||
|         setup() { | ||||
|             const columnList = ref([]); | ||||
|             const checkedItem = ref([]); | ||||
| 
 | ||||
|             return { | ||||
|                 columnList, | ||||
|                 checkedItem, | ||||
|             } | ||||
|         }, | ||||
|         props: { | ||||
|             columns: { | ||||
| 				type: Object, | ||||
| 				default: () => [], | ||||
| 			}, | ||||
|             freezingColumns: { | ||||
|                 type: Object, | ||||
| 				default: () => [], | ||||
|             } | ||||
|         }, | ||||
|         mounted() { | ||||
|             this.initPage(); | ||||
| 		}, | ||||
|         methods: { | ||||
|             initPage() { | ||||
|                 this.columnList = this.columns; | ||||
|                 this.checkedItem = this.freezingColumns.concat(); | ||||
|             }, | ||||
|             cancelClick() { | ||||
|                 this.$emit('cancelClick', this.freezingColumns); | ||||
|             }, | ||||
|             submitClick() { | ||||
|                 this.$emit('cancelClick', this.checkedItem); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| </script> | ||||
| <style scoped> | ||||
|     .layui-item33 { | ||||
| 		width: 90%; | ||||
| 		padding-right: 30px; | ||||
| 		margin: 30px auto 10px; | ||||
| 		display: block; | ||||
| 		overflow: auto; | ||||
| 		position: relative; | ||||
| 		clear: both;		 | ||||
| 	} | ||||
| 
 | ||||
|     .menuBtn { | ||||
| 		display: block; | ||||
| 		text-align: center; | ||||
| 		width: 96%; | ||||
| 		margin: 20px auto; | ||||
| 	} | ||||
| </style> | ||||
| @ -0,0 +1,85 @@ | ||||
| <template> | ||||
| 	<lay-table class="empty-small2 empty-small3" style="margin:30px 0;" height="200px" :columns="dataColumn" id="FID" | ||||
| 		:dataSource="dataList"> | ||||
| 		<template v-slot:toolbar> | ||||
| 			<p style="float:right;">操作日志</p> | ||||
| 			<lay-button size="sm" @click="_getPageList()">刷新</lay-button> | ||||
| 		</template> | ||||
| 	</lay-table> | ||||
| </template> | ||||
| <script> | ||||
| 	import { | ||||
| 		ref | ||||
| 	} from 'vue'; | ||||
| 	import { | ||||
| 		getPageList | ||||
| 	} from "/src/api/api/common"; | ||||
| 
 | ||||
| 	export default { | ||||
| 		setup() { | ||||
| 			let dataColumn = [{ | ||||
| 					title: "序号", | ||||
| 					key: "RowIndex", | ||||
| 					width: "80px" | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "操作时间", | ||||
| 					key: "FAddDate", | ||||
| 					width: "200px" | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "操作人", | ||||
| 					key: "FOptUser", | ||||
| 					width: "180px", | ||||
| 					align: 'center' | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "说明", | ||||
| 					key: "FDesc" | ||||
| 				} | ||||
| 			]; | ||||
| 			dataColumn.forEach((item) => { | ||||
| 				item.align = "center"; | ||||
| 			}); | ||||
| 			const dataList = ref([]); | ||||
| 			return { | ||||
| 				dataColumn, | ||||
| 				dataList | ||||
| 			} | ||||
| 		}, | ||||
| 		props: { | ||||
| 			dataInfoObj: { | ||||
| 				type: Object, | ||||
| 				default: () => {}, | ||||
| 			} | ||||
| 		}, | ||||
| 		mounted() { | ||||
| 			setTimeout((item) => { | ||||
| 				this._getPageList(); | ||||
| 			}, 100); | ||||
| 		}, | ||||
| 		methods: { | ||||
| 			cancelClick(isRefresh) { | ||||
| 				this.$emit('cancelClick', isRefresh !== undefined ? isRefresh : false); | ||||
| 			}, | ||||
| 			//日期处理 | ||||
| 			dateFormat(dataStr) { | ||||
| 				return dataStr.replace('T', ' ').split('.')[0]; | ||||
| 			}, | ||||
| 			async _getPageList() { | ||||
| 				if (this.dataInfoObj.FTeamID) { | ||||
| 					let postObj = { | ||||
| 						FTeamID: this.dataInfoObj.FTeamID, | ||||
| 						FType: this.dataInfoObj.FType, | ||||
| 						FPageSize: 99999 | ||||
| 					}; | ||||
| 					let result = await getPageList(postObj, 'OperateLog'); | ||||
| 					this.dataList = result.Data.List || []; | ||||
| 					this.dataList.forEach(item => { | ||||
| 						item.FAddDate = item.FAddDate == null ? "" : this.dateFormat(item.FAddDate); | ||||
| 					}); | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| </script> | ||||
| @ -0,0 +1,95 @@ | ||||
| <template> | ||||
| 	<lay-container fluid="true" class="content-box"> | ||||
| 		<lay-table v-if="dataColumn.length>0" :height="viewHeight+'px'" :columns="dataColumn" :data-source="dataList" | ||||
| 			:row-style="rowStyle"> | ||||
| 		</lay-table> | ||||
| 	</lay-container> | ||||
| </template> | ||||
| 
 | ||||
| <style scoped> | ||||
| 	.content-box { | ||||
| 		margin: 30px 10px; | ||||
| 		display: block; | ||||
| 		position: relative; | ||||
| 		clear: both; | ||||
| 		float: none; | ||||
| 	} | ||||
| </style> | ||||
| <script> | ||||
| 	import { | ||||
| 		ref | ||||
| 	} from 'vue'; | ||||
| 
 | ||||
| 	export default { | ||||
| 		setup() { | ||||
| 			const dataColumn = ref([]); | ||||
| 			const dataList = ref([]); | ||||
| 			const dataColor = ref([]); | ||||
| 			let colors = ["1E9FFF", "009688", "393D49", "5FB878"]; | ||||
| 			const rowStyle = function(row, rowIndex) { | ||||
| 				let color = ""; | ||||
| 				for (let idx = 0; idx < dataColor.value.length; idx++) { | ||||
| 					if (rowIndex > dataColor.value[idx]) color = "color:#" + colors[idx]; | ||||
| 				} | ||||
| 				return color; | ||||
| 			} | ||||
| 			return { | ||||
| 				dataColumn, | ||||
| 				dataList, | ||||
| 				dataColor, | ||||
| 				rowStyle, | ||||
| 			} | ||||
| 		}, | ||||
| 		props: { | ||||
| 			viewList: { | ||||
| 				type: Object, | ||||
| 				default: () => [], | ||||
| 			}, | ||||
| 			viewHeight: { | ||||
| 				type: Number, | ||||
| 				default: () => 600, | ||||
| 			} | ||||
| 		}, | ||||
| 		mounted() { | ||||
| 			this.initPage(); | ||||
| 		}, | ||||
| 		methods: { | ||||
| 			initPage() { | ||||
| 				let dataColumn = [{ | ||||
| 					type: "number", | ||||
| 					title: "序号", | ||||
| 					width: "56" | ||||
| 				}]; | ||||
| 				let dataList = []; | ||||
| 				let dataColor = [] | ||||
| 				this.viewList.forEach((item) => { | ||||
| 					if (item.length > 0) { | ||||
| 						if (dataColumn.length == 1) { | ||||
| 							for (let key in item[0]) { | ||||
| 								let width = (key.indexOf("描述") != -1 || key == "文本" || key == "物料") ? "300px" : | ||||
| 									"130px"; | ||||
| 								width = key.indexOf("编码") != -1 ? "200px" : width; | ||||
| 								dataColumn.push({ | ||||
| 									key: key, | ||||
| 									title: key.split('.').pop(), | ||||
| 									align: "center", | ||||
| 									width: width | ||||
| 								}); | ||||
| 							} | ||||
| 						} | ||||
| 						item.forEach((item2) => { | ||||
| 							dataList.push(item2); | ||||
| 						}); | ||||
| 						dataColor.push(dataList.length - 1); | ||||
| 					} | ||||
| 				}); | ||||
| 				this.dataColumn = dataColumn; | ||||
| 				this.dataList = dataList; | ||||
| 				this.dataColor = dataColor | ||||
| 			}, | ||||
| 			cancelClick() { | ||||
| 				this.$emit('cancelClick', false); | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| </script> | ||||
| @ -0,0 +1,333 @@ | ||||
| <template> | ||||
| 	<lay-container fluid="true" | ||||
| 				   :style="'padding:10px;height:'+(dataInfoObj!=undefined?(dataInfoObj.FHeight+'px'):'auto')"> | ||||
| 		<lay-row space="10"> | ||||
| 			<lay-col span="24"> | ||||
| 				<lay-card> | ||||
| 					<lay-form :model="searchObj" class="search-box"> | ||||
| 						<lay-row class="search-items"> | ||||
| 							<lay-form-item label="物料号" prop="FSaleCode"> | ||||
| 								<lay-input v-model="searchObj.FSaleCode"></lay-input> | ||||
| 							</lay-form-item> | ||||
| 							<lay-form-item label="类型" prop="FType"> | ||||
| 								<lay-select v-model="searchObj.FType"> | ||||
| 									<lay-select-option v-for="(tIdv,tIdx) in typeList" :key="tIdx" :value="tIdv.FValue" | ||||
| 													   :label="tIdv.FName"></lay-select-option> | ||||
| 								</lay-select> | ||||
| 							</lay-form-item> | ||||
| 							<lay-form-item v-if="postData.FState!=99" label="事项状态" prop="FState"> | ||||
| 								<lay-select v-model="searchObj.FState"> | ||||
| 									<lay-select-option v-for="(tv,tx) in stateList" :key="tx" :value="tv.id" | ||||
| 													   :label="tv.name"></lay-select-option> | ||||
| 								</lay-select> | ||||
| 							</lay-form-item> | ||||
| 							<lay-form-item label="发起日期" prop="FDateRange"> | ||||
| 								<lay-date-picker v-model="searchObj.FDateRange" range placeholder="type : date"> | ||||
| 								</lay-date-picker> | ||||
| 							</lay-form-item> | ||||
| 						</lay-row> | ||||
| 						<lay-form-item class="search-btn"> | ||||
| 							<lay-button size="sm" type="primary" @click="_clickSearch">搜索</lay-button> | ||||
| 							<lay-button size="sm" @click="_clickReset">重置</lay-button> | ||||
| 						</lay-form-item> | ||||
| 					</lay-form> | ||||
| 					<lay-table v-if="hasLoaded" :columns="dataColumn" id="id" :dataSource="dataList" | ||||
| 							   v-model:selectedKeys="selectedKeys" :checkbox="checkbox" :default-toolbar="defaultToolbar" | ||||
| 							   :page="dataList.length>0?pageInfo:null" @change="changePage"> | ||||
| 						<template v-slot:toolbar> | ||||
| 							<lay-button size="sm" @click="_getPageList(false,true)">刷新</lay-button> | ||||
| 							<lay-button size="sm" type="primary" @click="showEditMaterial(2)">修改</lay-button> | ||||
| 						</template> | ||||
| 						<template v-slot:FStateName="{ data }"> | ||||
| 							<span v-if="data.FStateName=='已完成'" style="color:#5FB878">{{ data.FStateName }}</span> | ||||
| 							<span v-else style="color:#1E9FFF">{{ data.FStateName }}</span> | ||||
| 						</template> | ||||
| 						<template v-if="dataInfoObj == undefined|| !dataInfoObj.FID" v-slot:operator="{ data }"> | ||||
| 							<lay-button size="xs" type="primary" @click="showEditMaterial(3)">详情</lay-button> | ||||
| 						</template> | ||||
| 					</lay-table> | ||||
| 				</lay-card> | ||||
| 			</lay-col> | ||||
| 		</lay-row> | ||||
| 		<lay-layer :area="modelArea[2]" v-model="showEditBox[2]" title="配方变更"> | ||||
| 			<EditMateria v-if="showEditBox[2]" :dataInfoObj="objInfoObj" @cancelClick="cancelClick"></EditMateria> | ||||
| 		</lay-layer> | ||||
| 		<lay-layer :area="modelArea[3]" v-model="showEditBox[3]" title="配方变更详情"> | ||||
| 			<ShowData1 v-if="showEditBox[3]" :dataInfoObj="objInfoObj" @cancelClick="cancelClick"></ShowData1> | ||||
| 		</lay-layer> | ||||
| 	</lay-container> | ||||
| </template> | ||||
| <script> | ||||
| 	import { | ||||
| 		ref, | ||||
| 		watch | ||||
| 	} from "vue"; | ||||
| 	import { | ||||
| 		getBasicList, | ||||
| 		getPageList | ||||
| 	} from "/src/api/api/common"; | ||||
| 	import ShowData1 from '../half/components/ShowData1.vue'; | ||||
| 	import EditMateria from '../half/components/EditMateria.vue'; | ||||
| 	import EditView from '../half/components/EditView.vue'; | ||||
| 	import '@layui/layui-vue/es/checkbox/index.css'; | ||||
| 	import '@layui/layui-vue/es/radio/index.css'; | ||||
| 
 | ||||
| 	export default { | ||||
| 		components: { | ||||
| 			EditMateria, | ||||
| 			EditView, | ||||
| 			ShowData1 | ||||
| 		}, | ||||
| 		setup() { | ||||
| 			let dataColumn = [ | ||||
| 			{ | ||||
| 				title: "序号", | ||||
| 				key: "FID", | ||||
| 				width: "160px", | ||||
| 				align: 'center', | ||||
| 				hide: false | ||||
| 			},{ | ||||
| 				title: "原实验号", | ||||
| 				key: "FMdmCode", | ||||
| 				width: "300px", | ||||
| 				align: 'center', | ||||
| 				hide: false | ||||
| 			}, | ||||
| 				{ | ||||
| 					title: "原版本号", | ||||
| 					key: "FSaleCode", | ||||
| 					width: "160px", | ||||
| 					align: 'center', | ||||
| 					hide: false | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "新实验号", | ||||
| 					key: "FTestCode", | ||||
| 					width: "160px", | ||||
| 					align: 'center', | ||||
| 					hide: false | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "新版本号", | ||||
| 					key: "FDesc", | ||||
| 					width: "400px", | ||||
| 					align: 'center' | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "产品分类", | ||||
| 					key: "FDesc", | ||||
| 					width: "400px", | ||||
| 					align: 'center' | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "发起时间", | ||||
| 					key: "FAddDate", | ||||
| 					width: "180px", | ||||
| 					align: 'center' | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "发起人", | ||||
| 					key: "FUserName", | ||||
| 					width: "178px", | ||||
| 					align: 'center' | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "操作", | ||||
| 					key: "operator", | ||||
| 					width: "130px", | ||||
| 					fixed: "right", | ||||
| 					customSlot: 'operator', | ||||
| 					align: 'center' | ||||
| 				} | ||||
| 			]; | ||||
| 			const selectedKeys = ref(["1"]); | ||||
| 			const checkbox = ref(false); | ||||
| 			const defaultToolbar = ref(true); | ||||
| 			const pageInfo = ref({ | ||||
| 				total: 0, | ||||
| 				limit: 10, | ||||
| 				current: 1 | ||||
| 			}); | ||||
| 			const dataList = ref([]); | ||||
| 			const typeList = ref([]); | ||||
| 			const searchObj = ref({}); | ||||
| 			const postData = ref({}); | ||||
| 			const MaterialModel= ref({}); | ||||
| 			const showEditBox = ref([false, false, false, false, false, false, false, false, false, false, false, false,false]); | ||||
| 			const modelArea = ref(["70%", "70%", "70%", "86%", "70%", "70%", "70%", "70%", "700px", "70%", "70%","70%","70%"]); | ||||
| 			const objInfoObj = ref({}); | ||||
| 			const editType = ref(1); | ||||
| 			const stateList = ref([{ | ||||
| 				id: 1, | ||||
| 				name: "进行中" | ||||
| 			}, { | ||||
| 				id: 2, | ||||
| 				name: "已完成" | ||||
| 			}]); | ||||
| 			const hasLoaded = ref(false); | ||||
| 			const dataItem=ref([]); | ||||
| 			return { | ||||
| 				selectedKeys, | ||||
| 				checkbox, | ||||
| 				defaultToolbar, | ||||
| 				dataColumn, | ||||
| 				dataList, | ||||
| 				pageInfo, | ||||
| 				searchObj, | ||||
| 				postData, | ||||
| 				typeList, | ||||
| 				showEditBox, | ||||
| 				modelArea, | ||||
| 				objInfoObj, | ||||
| 				editType, | ||||
| 				stateList, | ||||
| 				hasLoaded, | ||||
| 				MaterialModel, | ||||
| 				dataItem | ||||
| 			}; | ||||
| 		}, | ||||
| 		props: { | ||||
| 			dataInfoObj: { | ||||
| 				type: Object, | ||||
| 				default: () => {}, | ||||
| 			}, | ||||
| 			 | ||||
| 			pageTypeObj: { | ||||
| 				type: Number, | ||||
| 				default: () => 1, | ||||
| 			} | ||||
| 		}, | ||||
| 		mounted() { | ||||
| 			if (this.dataInfoObj) { | ||||
| 				this.dataColumn.pop(); | ||||
| 				this.dataColumn[0].hide = true; | ||||
| 				this.dataColumn[1].hide = true; | ||||
| 				this.dataColumn[2].hide = true; | ||||
| 				this.dataColumn[7].hide = false; | ||||
| 			} | ||||
| 			this._getTypeList(); | ||||
| 			this._getPageList(true); | ||||
| 		}, | ||||
| 		methods: { | ||||
| 			changePage(obj) { | ||||
| 				this.pageInfo.current = obj.current; | ||||
| 				this.pageInfo.limit = obj.limit; | ||||
| 				this._getPageList(); | ||||
| 			}, | ||||
| 			cancelClick(isRefresh, onlyRefresh) { | ||||
| 				if (isRefresh) { | ||||
| 					this._getPageList(true); | ||||
| 				} | ||||
| 				if (onlyRefresh) return false; | ||||
| 				for (let i = 0; i < this.showEditBox.length; i++) { | ||||
| 					this.showEditBox[i] = false; | ||||
| 				} | ||||
| 			}, | ||||
| 			async _getTypeList() { | ||||
| 				this.typeList = await getBasicList(33) || []; | ||||
| 			}, | ||||
| 			//分页列表 | ||||
| 			async _getPageList(isFirst, showOk) { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 				//this.dataList = []; | ||||
| 				this.pageInfo.total = 0; | ||||
| 				if (isFirst) { | ||||
| 					this.pageInfo.current = 1; | ||||
| 					this.pageInfo.total = 0; | ||||
| 				} | ||||
| 				if (this.dataInfoObj && this.dataInfoObj.FID) { | ||||
| 					this.postData.FTeamID = this.dataInfoObj.FID; | ||||
| 					this.postData.FIsUser = false; | ||||
| 				} | ||||
| 				if (this.pageTypeObj && this.pageTypeObj == 2) { | ||||
| 					this.postData.FState = 99; | ||||
| 				} | ||||
| 				this.postData.FPageIndex = this.pageInfo.current; | ||||
| 				this.postData.FPageSize = this.pageInfo.limit; | ||||
| 				let result = await getPageList(this.postData, "Task"); | ||||
| 				result.Data.List = result.Data.List || []; | ||||
| 				result.Data.List.forEach((item) => { | ||||
| 					let type = this.typeList.find(s => s.FValue === item.FType); | ||||
| 					item.FTypeName = type == null ? "" : type.FName; | ||||
| 					let state = this.stateList.find(s => s.id === item.FState) | ||||
| 					item.FStateName = state == null ? "" : state.name; | ||||
| 					item.FAddDate = item.FAddDate == null ? "" : this.dateFormat(item.FAddDate); | ||||
| 					item.FEditDate = item.FEditDate == null ? "" : this.dateFormat(item.FEditDate); | ||||
| 					item.FFinishDate = item.FFinishDate == null ? "" : this.dateFormat(item.FFinishDate); | ||||
| 					item["IsEdit"]=Math.floor(Math.random()*10)==0?"编辑":"新增"; | ||||
| 				}); | ||||
| 				this.pageInfo.total = result.Data.Total || 0; | ||||
| 				debugger | ||||
| 				this.dataList = result.Data.List; | ||||
| 				this.hasLoaded = true; | ||||
| 			}, | ||||
| 			//日期处理 | ||||
| 			dateFormat(dataStr) { | ||||
| 				return dataStr.replace('T', ' ').split('.')[0]; | ||||
| 			}, | ||||
| 			getData(data){ | ||||
|  				this.MaterialModel = data; | ||||
| 				for (let i = 0; i < this.showEditBox.length; i++) { | ||||
| 					this.showEditBox[i] = false; | ||||
| 				} | ||||
| 				this.showEditBox[11] = true; | ||||
| 				this.editType = 1; | ||||
| 
 | ||||
| 			}, | ||||
| 			showEditMaterial(i){ | ||||
| 				this.showEditBox[i] = true; | ||||
| 			}, | ||||
| 			_clickSetInfo(data, type) { | ||||
| 				 | ||||
| 				for (let i = 0; i < this.showEditBox.length; i++) { | ||||
| 					this.showEditBox[i] = false; | ||||
| 				} | ||||
| 				if (data.FType == 1) { | ||||
| 					data.FBoxType = 1; //配方选择 | ||||
| 				} else if (data.FType == 2) { | ||||
| 					data.FBoxType = 2; //BOM下载 | ||||
| 				} else if (data.FType == 9 || data.FType == 10) { | ||||
| 					data.FBoxType = 4; //新包材新增、新子项包材申请 | ||||
| 				} else if ((data.FType >= 3 && data.FType <= 7) || data.FType == 11) { | ||||
| 					data.FBoxType = 3; //视图编辑 | ||||
| 				} else if (data.FType == 8) { | ||||
| 					data.FBoxType = 5; //组编号申请 | ||||
| 				} else if (data.FType == 12) { | ||||
| 					data.FBoxType = 6; //成品视图物料组复核 | ||||
| 				} else if (data.FType == 13) { | ||||
| 					data.FBoxType = 7; //流程确认完成 | ||||
| 				} else if (data.FType == 14) { | ||||
| 					data.FBoxType = 8; //补充包材规格 | ||||
| 				} else if (data.FType == 15) { | ||||
| 					data.FBoxType = 9; //物料选择类型 | ||||
| 				}else if(data.FType==16){ | ||||
| 					this.dataItem=data; | ||||
| 					data.FBoxType = 10; //替代料确认 | ||||
| 				}else { | ||||
| 					return layer.msg("未知事项类型"); | ||||
| 				} | ||||
| 				this.objInfoObj = data; | ||||
| 				this.editType = type; | ||||
| 				this.showEditBox[data.FBoxType] = true; | ||||
| 			}, | ||||
| 
 | ||||
| 
 | ||||
| 			//检索-检索 | ||||
| 			_clickSearch() { | ||||
| 				this.postData = {}; | ||||
| 				for (let key in this.searchObj) { | ||||
| 					let val = this.searchObj[key]; | ||||
| 					if (val != null && val !== "") this.postData[key] = val; | ||||
| 				} | ||||
| 				this._getPageList(true); | ||||
| 			}, | ||||
| 			//检索-重置 | ||||
| 			_clickReset() { | ||||
| 				this.searchObj = {}; | ||||
| 				this._clickSearch(); | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| </script> | ||||
| @ -0,0 +1,341 @@ | ||||
| <template> | ||||
| 	<lay-container fluid="true" | ||||
| 				   :style="'padding:10px;height:'+(dataInfoObj!=undefined?(dataInfoObj.FHeight+'px'):'auto')"> | ||||
| 		<lay-row space="10"> | ||||
| 			<lay-col span="24"> | ||||
| 				<lay-card> | ||||
| 					<lay-form :model="searchObj" class="search-box"> | ||||
| 						<lay-row class="search-items"> | ||||
| 							<lay-form-item label="物料号" prop="FSaleCode"> | ||||
| 								<lay-input v-model="searchObj.FSaleCode"></lay-input> | ||||
| 							</lay-form-item> | ||||
| 							<lay-form-item label="当前流程" prop="FType"> | ||||
| 								<lay-select v-model="searchObj.FType"> | ||||
| 									<lay-select-option v-for="(tIdv,tIdx) in typeList" :key="tIdx" :value="tIdv.FValue" | ||||
| 													   :label="tIdv.FName"></lay-select-option> | ||||
| 								</lay-select> | ||||
| 							</lay-form-item> | ||||
| 							<lay-form-item v-if="postData.FState!=99" label="事项状态" prop="FState"> | ||||
| 								<lay-select v-model="searchObj.FState"> | ||||
| 									<lay-select-option v-for="(tv,tx) in stateList" :key="tx" :value="tv.id" | ||||
| 													   :label="tv.name"></lay-select-option> | ||||
| 								</lay-select> | ||||
| 							</lay-form-item> | ||||
| 							<lay-form-item label="发起日期" prop="FDateRange"> | ||||
| 								<lay-date-picker v-model="searchObj.FDateRange" range placeholder="type : date"> | ||||
| 								</lay-date-picker> | ||||
| 							</lay-form-item> | ||||
| 						</lay-row> | ||||
| 						<lay-form-item class="search-btn"> | ||||
| 							<lay-button size="sm" type="primary" @click="_clickSearch">搜索</lay-button> | ||||
| 							<lay-button size="sm" @click="_clickReset">重置</lay-button> | ||||
| 						</lay-form-item> | ||||
| 					</lay-form> | ||||
| 					<lay-table v-if="hasLoaded" :columns="dataColumn" id="id" :dataSource="dataList" | ||||
| 							   v-model:selectedKeys="selectedKeys" :checkbox="checkbox" :default-toolbar="defaultToolbar" | ||||
| 							   :page="dataList.length>0?pageInfo:null" @change="changePage"> | ||||
| 						<template v-slot:toolbar> | ||||
| 							<lay-button size="sm" @click="_getPageList(false,true)">刷新</lay-button> | ||||
| 							<lay-button size="sm" type="normal" style="float:right" @click="showEditMaterial(1)">导出</lay-button> | ||||
| 
 | ||||
| 						</template> | ||||
| 						<template v-slot:FStateName="{ data }"> | ||||
| 							<span v-if="data.FStateName=='已完成'" style="color:#5FB878">{{ data.FStateName }}</span> | ||||
| 							<span v-else style="color:#1E9FFF">{{ data.FStateName }}</span> | ||||
| 						</template> | ||||
| 						<template v-if="dataInfoObj == undefined|| !dataInfoObj.FID" v-slot:operator="{ data }"> | ||||
| 							<lay-button size="xs" type="primary" @click="showEditMaterial(3)">操作</lay-button> | ||||
| 						</template> | ||||
| 					</lay-table> | ||||
| 				</lay-card> | ||||
| 			</lay-col> | ||||
| 		</lay-row> | ||||
| 		<lay-layer :area="modelArea[2]" v-model="showEditBox[2]" :title="编辑物料"> | ||||
| 			<EditMateria v-if="showEditBox[2]" :dataInfoObj="objInfoObj" @cancelClick="cancelClick"></EditMateria> | ||||
| 		</lay-layer> | ||||
| 		<lay-layer :area="modelArea[3]" v-model="showEditBox[3]" :title="物料视图"> | ||||
| 			<EditView v-if="showEditBox[3]" :dataInfoObj="objInfoObj" @cancelClick="cancelClick"></EditView> | ||||
| 		</lay-layer> | ||||
| 	</lay-container> | ||||
| </template> | ||||
| <script> | ||||
| 	import { | ||||
| 		ref, | ||||
| 		watch | ||||
| 	} from "vue"; | ||||
| 	import { | ||||
| 		getBasicList, | ||||
| 		getPageList | ||||
| 	} from "/src/api/api/common"; | ||||
| 	import EditMateria from '../half/components/EditMateria.vue'; | ||||
| 	import EditView from '../half/components/EditView.vue'; | ||||
| 	import '@layui/layui-vue/es/checkbox/index.css'; | ||||
| 	import '@layui/layui-vue/es/radio/index.css'; | ||||
| 
 | ||||
| 	export default { | ||||
| 		components: { | ||||
| 			EditMateria, | ||||
| 			EditView | ||||
| 		}, | ||||
| 		setup() { | ||||
| 			let dataColumn = [ | ||||
| 			{ | ||||
| 				title: "序号", | ||||
| 				key: "FID", | ||||
| 				width: "160px", | ||||
| 				align: 'center', | ||||
| 				hide: false | ||||
| 			},{ | ||||
| 				title: "新实验号", | ||||
| 				key: "FMdmCode", | ||||
| 				width: "300px", | ||||
| 				align: 'center', | ||||
| 				hide: false | ||||
| 			}, | ||||
| 				{ | ||||
| 					title: "新版本号", | ||||
| 					key: "FSaleCode", | ||||
| 					width: "160px", | ||||
| 					align: 'center', | ||||
| 					hide: false | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "事项", | ||||
| 					key: "FTestCode", | ||||
| 					width: "160px", | ||||
| 					align: 'center', | ||||
| 					hide: false | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "产品分类", | ||||
| 					key: "FDesc", | ||||
| 					width: "400px", | ||||
| 					align: 'center' | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "发起时间", | ||||
| 					key: "FAddDate", | ||||
| 					width: "180px", | ||||
| 					align: 'center' | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "发起人", | ||||
| 					key: "FUserName", | ||||
| 					width: "178px", | ||||
| 					align: 'center' | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "负责人", | ||||
| 					key: "IsEdit", | ||||
| 					width: "98px", | ||||
| 					align: 'center', | ||||
| 					customSlot: '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "操作", | ||||
| 					key: "operator", | ||||
| 					width: "130px", | ||||
| 					fixed: "right", | ||||
| 					customSlot: 'operator', | ||||
| 					align: 'center' | ||||
| 				} | ||||
| 			]; | ||||
| 			const selectedKeys = ref(["1"]); | ||||
| 			const checkbox = ref(false); | ||||
| 			const defaultToolbar = ref(true); | ||||
| 			const pageInfo = ref({ | ||||
| 				total: 0, | ||||
| 				limit: 10, | ||||
| 				current: 1 | ||||
| 			}); | ||||
| 			const dataList = ref([]); | ||||
| 			const typeList = ref([]); | ||||
| 			const searchObj = ref({}); | ||||
| 			const postData = ref({}); | ||||
| 			const MaterialModel= ref({}); | ||||
| 			const showEditBox = ref([false, false, false, false, false, false, false, false, false, false, false, false,false]); | ||||
| 			const modelArea = ref(["70%", "70%", "70%", "86%", "70%", "70%", "70%", "70%", "700px", "70%", "70%","70%","70%"]); | ||||
| 			const objInfoObj = ref({}); | ||||
| 			const editType = ref(1); | ||||
| 			const stateList = ref([{ | ||||
| 				id: 1, | ||||
| 				name: "进行中" | ||||
| 			}, { | ||||
| 				id: 2, | ||||
| 				name: "已完成" | ||||
| 			}]); | ||||
| 			const hasLoaded = ref(false); | ||||
| 			const dataItem=ref([]); | ||||
| 			return { | ||||
| 				selectedKeys, | ||||
| 				checkbox, | ||||
| 				defaultToolbar, | ||||
| 				dataColumn, | ||||
| 				dataList, | ||||
| 				pageInfo, | ||||
| 				searchObj, | ||||
| 				postData, | ||||
| 				typeList, | ||||
| 				showEditBox, | ||||
| 				modelArea, | ||||
| 				objInfoObj, | ||||
| 				editType, | ||||
| 				stateList, | ||||
| 				hasLoaded, | ||||
| 				MaterialModel, | ||||
| 				dataItem | ||||
| 			}; | ||||
| 		}, | ||||
| 		props: { | ||||
| 			dataInfoObj: { | ||||
| 				type: Object, | ||||
| 				default: () => {}, | ||||
| 			}, | ||||
| 			 | ||||
| 			pageTypeObj: { | ||||
| 				type: Number, | ||||
| 				default: () => 1, | ||||
| 			} | ||||
| 		}, | ||||
| 		mounted() { | ||||
| 			if (this.dataInfoObj) { | ||||
| 				this.dataColumn.pop(); | ||||
| 				this.dataColumn[0].hide = true; | ||||
| 				this.dataColumn[1].hide = true; | ||||
| 				this.dataColumn[2].hide = true; | ||||
| 				this.dataColumn[7].hide = false; | ||||
| 			} | ||||
| 			this._getTypeList(); | ||||
| 			this._getPageList(true); | ||||
| 		}, | ||||
| 		methods: { | ||||
| 			changePage(obj) { | ||||
| 				this.pageInfo.current = obj.current; | ||||
| 				this.pageInfo.limit = obj.limit; | ||||
| 				this._getPageList(); | ||||
| 			}, | ||||
| 			cancelClick(isRefresh, onlyRefresh) { | ||||
| 				if (isRefresh) { | ||||
| 					this._getPageList(true); | ||||
| 				} | ||||
| 				if (onlyRefresh) return false; | ||||
| 				for (let i = 0; i < this.showEditBox.length; i++) { | ||||
| 					this.showEditBox[i] = false; | ||||
| 				} | ||||
| 			}, | ||||
| 			async _getTypeList() { | ||||
| 				this.typeList = await getBasicList(33) || []; | ||||
| 			}, | ||||
| 			//分页列表 | ||||
| 			async _getPageList(isFirst, showOk) { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 				//this.dataList = []; | ||||
| 				this.pageInfo.total = 0; | ||||
| 				if (isFirst) { | ||||
| 					this.pageInfo.current = 1; | ||||
| 					this.pageInfo.total = 0; | ||||
| 				} | ||||
| 				if (this.dataInfoObj && this.dataInfoObj.FID) { | ||||
| 					this.postData.FTeamID = this.dataInfoObj.FID; | ||||
| 					this.postData.FIsUser = false; | ||||
| 				} | ||||
| 				if (this.pageTypeObj && this.pageTypeObj == 2) { | ||||
| 					this.postData.FState = 99; | ||||
| 				} | ||||
| 				this.postData.FPageIndex = this.pageInfo.current; | ||||
| 				this.postData.FPageSize = this.pageInfo.limit; | ||||
| 				let result = await getPageList(this.postData, "Task"); | ||||
| 				result.Data.List = result.Data.List || []; | ||||
| 				result.Data.List.forEach((item) => { | ||||
| 					let type = this.typeList.find(s => s.FValue === item.FType); | ||||
| 					item.FTypeName = type == null ? "" : type.FName; | ||||
| 					let state = this.stateList.find(s => s.id === item.FState) | ||||
| 					item.FStateName = state == null ? "" : state.name; | ||||
| 					item.FAddDate = item.FAddDate == null ? "" : this.dateFormat(item.FAddDate); | ||||
| 					item.FEditDate = item.FEditDate == null ? "" : this.dateFormat(item.FEditDate); | ||||
| 					item.FFinishDate = item.FFinishDate == null ? "" : this.dateFormat(item.FFinishDate); | ||||
| 				}); | ||||
| 				this.pageInfo.total = result.Data.Total || 0; | ||||
| 				debugger | ||||
| 				this.dataList = [{"FSaleCode":"销售号测试","FTestCode":"KXFXG23030701", | ||||
| 					"FMdmCode":"1681355682","FFormulaName":"改名字了/2+KXFXG23030701+1.0000", | ||||
| 					"FViewType":2,"FUserName":"陈凯_TEST、陈超_TEST、林家亮、叶宏、施发权、张建财", | ||||
| 					"FMaterialHalfIDs":"","FID":789,"FTeamID":216,"FType":1,"FName":"配方选择", | ||||
| 					"FDesc":"没有合适配方,等待新配方选择","FFactoryID":-1,"FUserID":"2,4,8,9,11,12", | ||||
| 					"FState":1,"FCanEdit":1,"FAddDate":"2023-04-13 11:14:42","FEditUser":2,"FEditDate":"2023-04-13 11:14:42","FFinishDate":"","FTypeName":"","FStateName":"进行中"}, | ||||
| 					{"FSaleCode":"C555","FTestCode":"HBFSY23030701","FMdmCode":"1681323910","FFormulaName":"测试/test+HBFSY23030701+1.0000", | ||||
| 					"FViewType":1,"FUserName":"陈凯_TEST、陈超_TEST、林家亮、叶宏、宋佰昱、施发权、张建财","FMaterialHalfIDs":"67951","FID":788, | ||||
| 					"FTeamID":215,"FType":15,"FName":"物料分类","FDesc":"物料分类选择","FFactoryID":-1,"FUserID":"2,4,8,9,10,11,12","FState":1, | ||||
| 					"FCanEdit":1,"FAddDate":"2023-04-13 02:25:10","FEditUser":2,"FEditDate":"2023-04-13 02:25:10","FFinishDate":"","FTypeName":"","FStateName":"进行中"}]; | ||||
| 				this.hasLoaded = true; | ||||
| 			}, | ||||
| 			//日期处理 | ||||
| 			dateFormat(dataStr) { | ||||
| 				return dataStr.replace('T', ' ').split('.')[0]; | ||||
| 			}, | ||||
| 			getData(data){ | ||||
|  				this.MaterialModel = data; | ||||
| 				for (let i = 0; i < this.showEditBox.length; i++) { | ||||
| 					this.showEditBox[i] = false; | ||||
| 				} | ||||
| 				this.showEditBox[11] = true; | ||||
| 				this.editType = 1; | ||||
| 
 | ||||
| 			}, | ||||
| 			showEditMaterial(i){ | ||||
| 				this.showEditBox[i] = true; | ||||
| 			}, | ||||
| 			_clickSetInfo(data, type) { | ||||
| 				 | ||||
| 				for (let i = 0; i < this.showEditBox.length; i++) { | ||||
| 					this.showEditBox[i] = false; | ||||
| 				} | ||||
| 				if (data.FType == 1) { | ||||
| 					data.FBoxType = 1; //配方选择 | ||||
| 				} else if (data.FType == 2) { | ||||
| 					data.FBoxType = 2; //BOM下载 | ||||
| 				} else if (data.FType == 9 || data.FType == 10) { | ||||
| 					data.FBoxType = 4; //新包材新增、新子项包材申请 | ||||
| 				} else if ((data.FType >= 3 && data.FType <= 7) || data.FType == 11) { | ||||
| 					data.FBoxType = 3; //视图编辑 | ||||
| 				} else if (data.FType == 8) { | ||||
| 					data.FBoxType = 5; //组编号申请 | ||||
| 				} else if (data.FType == 12) { | ||||
| 					data.FBoxType = 6; //成品视图物料组复核 | ||||
| 				} else if (data.FType == 13) { | ||||
| 					data.FBoxType = 7; //流程确认完成 | ||||
| 				} else if (data.FType == 14) { | ||||
| 					data.FBoxType = 8; //补充包材规格 | ||||
| 				} else if (data.FType == 15) { | ||||
| 					data.FBoxType = 9; //物料选择类型 | ||||
| 				}else if(data.FType==16){ | ||||
| 					this.dataItem=data; | ||||
| 					data.FBoxType = 10; //替代料确认 | ||||
| 				}else { | ||||
| 					return layer.msg("未知事项类型"); | ||||
| 				} | ||||
| 				this.objInfoObj = data; | ||||
| 				this.editType = type; | ||||
| 				this.showEditBox[data.FBoxType] = true; | ||||
| 			}, | ||||
| 
 | ||||
| 
 | ||||
| 			//检索-检索 | ||||
| 			_clickSearch() { | ||||
| 				this.postData = {}; | ||||
| 				for (let key in this.searchObj) { | ||||
| 					let val = this.searchObj[key]; | ||||
| 					if (val != null && val !== "") this.postData[key] = val; | ||||
| 				} | ||||
| 				this._getPageList(true); | ||||
| 			}, | ||||
| 			//检索-重置 | ||||
| 			_clickReset() { | ||||
| 				this.searchObj = {}; | ||||
| 				this._clickSearch(); | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| </script> | ||||
| @ -0,0 +1,325 @@ | ||||
| <template> | ||||
| 	<lay-container fluid="true" | ||||
| 				   :style="'padding:10px;height:'+(dataInfoObj!=undefined?(dataInfoObj.FHeight+'px'):'auto')"> | ||||
| 		<lay-row space="10"> | ||||
| 			<lay-col span="24"> | ||||
| 				<lay-card> | ||||
| 					<lay-form :model="searchObj" class="search-box"> | ||||
| 						<lay-row class="search-items"> | ||||
| 							<lay-form-item label="物料号" prop="FSaleCode"> | ||||
| 								<lay-input v-model="searchObj.FSaleCode"></lay-input> | ||||
| 							</lay-form-item> | ||||
| 							<lay-form-item label="类型" prop="FType"> | ||||
| 								<lay-select v-model="searchObj.FType"> | ||||
| 									<lay-select-option v-for="(tIdv,tIdx) in typeList" :key="tIdx" :value="tIdv.FValue" | ||||
| 													   :label="tIdv.FName"></lay-select-option> | ||||
| 								</lay-select> | ||||
| 							</lay-form-item> | ||||
| 							<lay-form-item v-if="postData.FState!=99" label="模块" prop="FState"> | ||||
| 								<lay-select v-model="searchObj.FState"> | ||||
| 									<lay-select-option v-for="(tv,tx) in stateList" :key="tx" :value="tv.id" | ||||
| 													   :label="tv.name"></lay-select-option> | ||||
| 								</lay-select> | ||||
| 							</lay-form-item> | ||||
| 							<lay-form-item label="发起日期" prop="FDateRange"> | ||||
| 								<lay-date-picker v-model="searchObj.FDateRange" range placeholder="type : date"> | ||||
| 								</lay-date-picker> | ||||
| 							</lay-form-item> | ||||
| 						</lay-row> | ||||
| 						<lay-form-item class="search-btn"> | ||||
| 							<lay-button size="sm" type="primary" @click="_clickSearch">搜索</lay-button> | ||||
| 							<lay-button size="sm" @click="_clickReset">重置</lay-button> | ||||
| 						</lay-form-item> | ||||
| 					</lay-form> | ||||
| 					<lay-table v-if="hasLoaded" :columns="dataColumn" id="id" :dataSource="dataList" | ||||
| 							   v-model:selectedKeys="selectedKeys" :checkbox="checkbox" :default-toolbar="defaultToolbar" | ||||
| 							   :page="dataList.length>0?pageInfo:null" @change="changePage"> | ||||
| 						<template v-slot:toolbar> | ||||
| 							<lay-button size="sm" @click="_getPageList(false,true)">刷新</lay-button> | ||||
| 							<lay-button size="sm" type="normal" @click="showEditMaterial(1)">导出</lay-button> | ||||
| 						</template> | ||||
| 						<template v-slot:FStateName="{ data }"> | ||||
| 							<span v-if="data.FStateName=='已完成'" style="color:#5FB878">{{ data.FStateName }}</span> | ||||
| 							<span v-else style="color:#1E9FFF">{{ data.FStateName }}</span> | ||||
| 						</template> | ||||
| 						<template v-if="dataInfoObj == undefined|| !dataInfoObj.FID" v-slot:operator="{ data }"> | ||||
| 							<lay-button size="xs" type="primary" @click="showEditMaterial(3)">视图</lay-button> | ||||
| 						</template> | ||||
| 					</lay-table> | ||||
| 				</lay-card> | ||||
| 			</lay-col> | ||||
| 		</lay-row> | ||||
| 		<lay-layer :area="modelArea[1]" v-model="showEditBox[1]" title="新增物料"> | ||||
| 			<AddMateria v-if="showEditBox[1]" :dataInfoObj="objInfoObj" @cancelClick="cancelClick"></AddMateria> | ||||
| 		</lay-layer> | ||||
| 		<lay-layer :area="modelArea[2]" v-model="showEditBox[2]" title="修改物料"> | ||||
| 			<EditMateria v-if="showEditBox[2]" :dataInfoObj="objInfoObj" @cancelClick="cancelClick"></EditMateria> | ||||
| 		</lay-layer> | ||||
| 		<lay-layer :area="modelArea[3]" v-model="showEditBox[3]" title="编辑物料"> | ||||
| 			<EditView v-if="showEditBox[3]" :dataInfoObj="objInfoObj" @cancelClick="cancelClick"></EditView> | ||||
| 		</lay-layer> | ||||
| 	</lay-container> | ||||
| </template> | ||||
| <script> | ||||
| 	import { | ||||
| 		ref, | ||||
| 		watch | ||||
| 	} from "vue"; | ||||
| 	import { | ||||
| 		getBasicList, | ||||
| 		getPageList | ||||
| 	} from "/src/api/api/common"; | ||||
| 	import AddMateria from '../materia/components/AddMateria.vue'; | ||||
| 	import EditMateria from '../materia/components/EditMateria.vue'; | ||||
| 	import EditView from '../materia/components/EditView.vue'; | ||||
| 	import '@layui/layui-vue/es/checkbox/index.css'; | ||||
| 	import '@layui/layui-vue/es/radio/index.css'; | ||||
| 
 | ||||
| 	export default { | ||||
| 		components: { | ||||
| 			AddMateria, | ||||
| 			EditMateria, | ||||
| 			EditView | ||||
| 		}, | ||||
| 		setup() { | ||||
| 			let dataColumn = [{ | ||||
| 			type: "checkbox" | ||||
| 		}, | ||||
| 			{ | ||||
| 				title: "ID", | ||||
| 				key: "FID", | ||||
| 				width: "160px", | ||||
| 				align: 'center', | ||||
| 				hide: false | ||||
| 			},{ | ||||
| 				title: "模块", | ||||
| 				key: "FMdmCode", | ||||
| 				width: "300px", | ||||
| 				align: 'center', | ||||
| 				hide: false | ||||
| 			}, | ||||
| 				{ | ||||
| 					title: "功能", | ||||
| 					key: "FSaleCode", | ||||
| 					width: "160px", | ||||
| 					align: 'center', | ||||
| 					hide: false | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "操作描述", | ||||
| 					key: "FDesc", | ||||
| 					width: "160px", | ||||
| 					align: 'center', | ||||
| 					hide: false | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "操作时间", | ||||
| 					key: "FAddDate", | ||||
| 					width: "180px", | ||||
| 					align: 'center' | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "操作类型", | ||||
| 					key: "FTestCode", | ||||
| 					width: "400px", | ||||
| 					align: 'center' | ||||
| 				}, | ||||
| 				 | ||||
| 				{ | ||||
| 					title: "操作人", | ||||
| 					key: "FUserName", | ||||
| 					width: "178px", | ||||
| 					align: 'center' | ||||
| 				} | ||||
| 			]; | ||||
| 			const selectedKeys = ref(["1"]); | ||||
| 			const checkbox = ref(false); | ||||
| 			const defaultToolbar = ref(true); | ||||
| 			const pageInfo = ref({ | ||||
| 				total: 0, | ||||
| 				limit: 10, | ||||
| 				current: 1 | ||||
| 			}); | ||||
| 			const dataList = ref([]); | ||||
| 			const typeList = ref([]); | ||||
| 			const searchObj = ref({}); | ||||
| 			const postData = ref({}); | ||||
| 			const MaterialModel= ref({}); | ||||
| 			const showEditBox = ref([false, false, false, false, false, false, false, false, false, false, false, false,false]); | ||||
| 			const modelArea = ref(["70%", "70%", "70%", "86%", "70%", "70%", "70%", "70%", "700px", "70%", "70%","70%","70%"]); | ||||
| 			const objInfoObj = ref({}); | ||||
| 			const editType = ref(1); | ||||
| 			const stateList = ref([{ | ||||
| 				id: 1, | ||||
| 				name: "进行中" | ||||
| 			}, { | ||||
| 				id: 2, | ||||
| 				name: "已完成" | ||||
| 			}]); | ||||
| 			const hasLoaded = ref(false); | ||||
| 			const dataItem=ref([]); | ||||
| 			return { | ||||
| 				selectedKeys, | ||||
| 				checkbox, | ||||
| 				defaultToolbar, | ||||
| 				dataColumn, | ||||
| 				dataList, | ||||
| 				pageInfo, | ||||
| 				searchObj, | ||||
| 				postData, | ||||
| 				typeList, | ||||
| 				showEditBox, | ||||
| 				modelArea, | ||||
| 				objInfoObj, | ||||
| 				editType, | ||||
| 				stateList, | ||||
| 				hasLoaded, | ||||
| 				MaterialModel, | ||||
| 				dataItem | ||||
| 			}; | ||||
| 		}, | ||||
| 		props: { | ||||
| 			dataInfoObj: { | ||||
| 				type: Object, | ||||
| 				default: () => {}, | ||||
| 			}, | ||||
| 			 | ||||
| 			pageTypeObj: { | ||||
| 				type: Number, | ||||
| 				default: () => 1, | ||||
| 			} | ||||
| 		}, | ||||
| 		mounted() { | ||||
| 			if (this.dataInfoObj) { | ||||
| 				this.dataColumn.pop(); | ||||
| 				this.dataColumn[0].hide = true; | ||||
| 				this.dataColumn[1].hide = true; | ||||
| 				this.dataColumn[2].hide = true; | ||||
| 				this.dataColumn[7].hide = false; | ||||
| 			} | ||||
| 			this._getTypeList(); | ||||
| 			this._getPageList(true); | ||||
| 		}, | ||||
| 		methods: { | ||||
| 			changePage(obj) { | ||||
| 				this.pageInfo.current = obj.current; | ||||
| 				this.pageInfo.limit = obj.limit; | ||||
| 				this._getPageList(); | ||||
| 			}, | ||||
| 			cancelClick(isRefresh, onlyRefresh) { | ||||
| 				if (isRefresh) { | ||||
| 					this._getPageList(true); | ||||
| 				} | ||||
| 				if (onlyRefresh) return false; | ||||
| 				for (let i = 0; i < this.showEditBox.length; i++) { | ||||
| 					this.showEditBox[i] = false; | ||||
| 				} | ||||
| 			}, | ||||
| 			async _getTypeList() { | ||||
| 				this.typeList = await getBasicList(33) || []; | ||||
| 			}, | ||||
| 			//分页列表 | ||||
| 			async _getPageList(isFirst, showOk) { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 				//this.dataList = []; | ||||
| 				this.pageInfo.total = 0; | ||||
| 				if (isFirst) { | ||||
| 					this.pageInfo.current = 1; | ||||
| 					this.pageInfo.total = 0; | ||||
| 				} | ||||
| 				if (this.dataInfoObj && this.dataInfoObj.FID) { | ||||
| 					this.postData.FTeamID = this.dataInfoObj.FID; | ||||
| 					this.postData.FIsUser = false; | ||||
| 				} | ||||
| 				if (this.pageTypeObj && this.pageTypeObj == 2) { | ||||
| 					this.postData.FState = 99; | ||||
| 				} | ||||
| 				this.postData.FPageIndex = this.pageInfo.current; | ||||
| 				this.postData.FPageSize = this.pageInfo.limit; | ||||
| 				let result = await getPageList(this.postData, "Task"); | ||||
| 				result.Data.List = result.Data.List || []; | ||||
| 				result.Data.List.forEach((item) => { | ||||
| 					let type = this.typeList.find(s => s.FValue === item.FType); | ||||
| 					item.FTypeName = type == null ? "" : type.FName; | ||||
| 					let state = this.stateList.find(s => s.id === item.FState) | ||||
| 					item.FStateName = state == null ? "" : state.name; | ||||
| 					item.FAddDate = item.FAddDate == null ? "" : this.dateFormat(item.FAddDate); | ||||
| 					item.FEditDate = item.FEditDate == null ? "" : this.dateFormat(item.FEditDate); | ||||
| 					item.FFinishDate = item.FFinishDate == null ? "" : this.dateFormat(item.FFinishDate); | ||||
| 					item["IsEdit"]=Math.floor(Math.random()*10)==0?"编辑":"新增"; | ||||
| 				}); | ||||
| 				this.pageInfo.total = result.Data.Total || 0; | ||||
| 				debugger | ||||
| 				this.dataList = result.Data.List; | ||||
| 				this.hasLoaded = true; | ||||
| 			}, | ||||
| 			//日期处理 | ||||
| 			dateFormat(dataStr) { | ||||
| 				return dataStr.replace('T', ' ').split('.')[0]; | ||||
| 			}, | ||||
| 			getData(data){ | ||||
|  				this.MaterialModel = data; | ||||
| 				for (let i = 0; i < this.showEditBox.length; i++) { | ||||
| 					this.showEditBox[i] = false; | ||||
| 				} | ||||
| 				this.showEditBox[11] = true; | ||||
| 				this.editType = 1; | ||||
| 
 | ||||
| 			}, | ||||
| 			showEditMaterial(i){ | ||||
| 				this.showEditBox[i] = true; | ||||
| 			}, | ||||
| 			_clickSetInfo(data, type) { | ||||
| 				 | ||||
| 				for (let i = 0; i < this.showEditBox.length; i++) { | ||||
| 					this.showEditBox[i] = false; | ||||
| 				} | ||||
| 				if (data.FType == 1) { | ||||
| 					data.FBoxType = 1; //配方选择 | ||||
| 				} else if (data.FType == 2) { | ||||
| 					data.FBoxType = 2; //BOM下载 | ||||
| 				} else if (data.FType == 9 || data.FType == 10) { | ||||
| 					data.FBoxType = 4; //新包材新增、新子项包材申请 | ||||
| 				} else if ((data.FType >= 3 && data.FType <= 7) || data.FType == 11) { | ||||
| 					data.FBoxType = 3; //视图编辑 | ||||
| 				} else if (data.FType == 8) { | ||||
| 					data.FBoxType = 5; //组编号申请 | ||||
| 				} else if (data.FType == 12) { | ||||
| 					data.FBoxType = 6; //成品视图物料组复核 | ||||
| 				} else if (data.FType == 13) { | ||||
| 					data.FBoxType = 7; //流程确认完成 | ||||
| 				} else if (data.FType == 14) { | ||||
| 					data.FBoxType = 8; //补充包材规格 | ||||
| 				} else if (data.FType == 15) { | ||||
| 					data.FBoxType = 9; //物料选择类型 | ||||
| 				}else if(data.FType==16){ | ||||
| 					this.dataItem=data; | ||||
| 					data.FBoxType = 10; //替代料确认 | ||||
| 				}else { | ||||
| 					return layer.msg("未知事项类型"); | ||||
| 				} | ||||
| 				this.objInfoObj = data; | ||||
| 				this.editType = type; | ||||
| 				this.showEditBox[data.FBoxType] = true; | ||||
| 			}, | ||||
| 
 | ||||
| 
 | ||||
| 			//检索-检索 | ||||
| 			_clickSearch() { | ||||
| 				this.postData = {}; | ||||
| 				for (let key in this.searchObj) { | ||||
| 					let val = this.searchObj[key]; | ||||
| 					if (val != null && val !== "") this.postData[key] = val; | ||||
| 				} | ||||
| 				this._getPageList(true); | ||||
| 			}, | ||||
| 			//检索-重置 | ||||
| 			_clickReset() { | ||||
| 				this.searchObj = {}; | ||||
| 				this._clickSearch(); | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| </script> | ||||
| @ -0,0 +1,344 @@ | ||||
| <template> | ||||
| 	<lay-container fluid="true" | ||||
| 				   :style="'padding:10px;height:'+(dataInfoObj!=undefined?(dataInfoObj.FHeight+'px'):'auto')"> | ||||
| 		<lay-row space="10"> | ||||
| 			<lay-col span="24"> | ||||
| 				<lay-card> | ||||
| 					<lay-form :model="searchObj" class="search-box"> | ||||
| 						<lay-row class="search-items"> | ||||
| 							<lay-form-item label="物料号" prop="FSaleCode"> | ||||
| 								<lay-input v-model="searchObj.FSaleCode"></lay-input> | ||||
| 							</lay-form-item> | ||||
| 							<lay-form-item label="当前流程" prop="FType"> | ||||
| 								<lay-select v-model="searchObj.FType"> | ||||
| 									<lay-select-option v-for="(tIdv,tIdx) in typeList" :key="tIdx" :value="tIdv.FValue" | ||||
| 													   :label="tIdv.FName"></lay-select-option> | ||||
| 								</lay-select> | ||||
| 							</lay-form-item> | ||||
| 							<lay-form-item v-if="postData.FState!=99" label="事项状态" prop="FState"> | ||||
| 								<lay-select v-model="searchObj.FState"> | ||||
| 									<lay-select-option v-for="(tv,tx) in stateList" :key="tx" :value="tv.id" | ||||
| 													   :label="tv.name"></lay-select-option> | ||||
| 								</lay-select> | ||||
| 							</lay-form-item> | ||||
| 							<lay-form-item label="发起日期" prop="FDateRange"> | ||||
| 								<lay-date-picker v-model="searchObj.FDateRange" range placeholder="type : date"> | ||||
| 								</lay-date-picker> | ||||
| 							</lay-form-item> | ||||
| 						</lay-row> | ||||
| 						<lay-form-item class="search-btn"> | ||||
| 							<lay-button size="sm" type="primary" @click="_clickSearch">搜索</lay-button> | ||||
| 							<lay-button size="sm" @click="_clickReset">重置</lay-button> | ||||
| 						</lay-form-item> | ||||
| 					</lay-form> | ||||
| 					<lay-table v-if="hasLoaded" :columns="dataColumn" id="id" :dataSource="dataList" | ||||
| 							   v-model:selectedKeys="selectedKeys" :checkbox="checkbox" :default-toolbar="defaultToolbar" | ||||
| 							   :page="dataList.length>0?pageInfo:null" @change="changePage"> | ||||
| 						<template v-slot:toolbar> | ||||
| 							<lay-button size="sm" @click="_getPageList(false,true)">刷新</lay-button> | ||||
| 							<lay-button size="sm" type="normal" @click="showEditMaterial(1)">新增</lay-button> | ||||
| 							<lay-button size="sm" type="primary" @click="showEditMaterial(2)">修改</lay-button> | ||||
| 						</template> | ||||
| 						<template v-slot:FStateName="{ data }"> | ||||
| 							<span v-if="data.FStateName=='已完成'" style="color:#5FB878">{{ data.FStateName }}</span> | ||||
| 							<span v-else style="color:#1E9FFF">{{ data.FStateName }}</span> | ||||
| 						</template> | ||||
| 						<template v-if="dataInfoObj == undefined|| !dataInfoObj.FID" v-slot:operator="{ data }"> | ||||
| 							<lay-button size="xs" type="primary" @click="showEditMaterial(3)">视图</lay-button> | ||||
| 						</template> | ||||
| 					</lay-table> | ||||
| 				</lay-card> | ||||
| 			</lay-col> | ||||
| 		</lay-row> | ||||
| 		<lay-layer :area="modelArea[1]" v-model="showEditBox[1]" title="新增物料"> | ||||
| 			<AddMateria v-if="showEditBox[1]" :dataInfoObj="objInfoObj" @cancelClick="cancelClick"></AddMateria> | ||||
| 		</lay-layer> | ||||
| 		<lay-layer :area="modelArea[2]" v-model="showEditBox[2]" title="修改物料"> | ||||
| 			<EditMateria v-if="showEditBox[2]" :dataInfoObj="objInfoObj" @cancelClick="cancelClick"></EditMateria> | ||||
| 		</lay-layer> | ||||
| 		<lay-layer :area="modelArea[3]" v-model="showEditBox[3]" title="编辑物料"> | ||||
| 			<EditView v-if="showEditBox[3]" :dataInfoObj="objInfoObj" @cancelClick="cancelClick"></EditView> | ||||
| 		</lay-layer> | ||||
| 	</lay-container> | ||||
| </template> | ||||
| <script> | ||||
| 	import { | ||||
| 		ref, | ||||
| 		watch | ||||
| 	} from "vue"; | ||||
| 	import { | ||||
| 		getBasicList, | ||||
| 		getPageList | ||||
| 	} from "/src/api/api/common"; | ||||
| 	import AddMateria from '../materia/components/AddMateria.vue'; | ||||
| 	import EditMateria from '../materia/components/EditMateria.vue'; | ||||
| 	import EditView from '../materia/components/EditView.vue'; | ||||
| 	import '@layui/layui-vue/es/checkbox/index.css'; | ||||
| 	import '@layui/layui-vue/es/radio/index.css'; | ||||
| 
 | ||||
| 	export default { | ||||
| 		components: { | ||||
| 			AddMateria, | ||||
| 			EditMateria, | ||||
| 			EditView | ||||
| 		}, | ||||
| 		setup() { | ||||
| 			let dataColumn = [ | ||||
| 			{ | ||||
| 				title: "ID", | ||||
| 				key: "FID", | ||||
| 				width: "160px", | ||||
| 				align: 'center', | ||||
| 				hide: false | ||||
| 			},{ | ||||
| 				title: "物料号", | ||||
| 				key: "FMdmCode", | ||||
| 				width: "300px", | ||||
| 				align: 'center', | ||||
| 				hide: false | ||||
| 			}, | ||||
| 				{ | ||||
| 					title: "物料描述", | ||||
| 					key: "FSaleCode", | ||||
| 					width: "160px", | ||||
| 					align: 'center', | ||||
| 					hide: false | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "试验号", | ||||
| 					key: "FTestCode", | ||||
| 					width: "160px", | ||||
| 					align: 'center', | ||||
| 					hide: false | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "产品分类", | ||||
| 					key: "FDesc", | ||||
| 					width: "400px", | ||||
| 					align: 'center' | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "发起时间", | ||||
| 					key: "FAddDate", | ||||
| 					width: "180px", | ||||
| 					align: 'center' | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "发起人", | ||||
| 					key: "FUserName", | ||||
| 					width: "178px", | ||||
| 					align: 'center' | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "类型", | ||||
| 					key: "IsEdit", | ||||
| 					width: "98px", | ||||
| 					align: 'center', | ||||
| 					customSlot: '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "状态", | ||||
| 					key: "FStateName", | ||||
| 					width: "160px", | ||||
| 					align: 'center' | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "操作", | ||||
| 					key: "operator", | ||||
| 					width: "130px", | ||||
| 					fixed: "right", | ||||
| 					customSlot: 'operator', | ||||
| 					align: 'center' | ||||
| 				} | ||||
| 			]; | ||||
| 			const selectedKeys = ref(["1"]); | ||||
| 			const checkbox = ref(false); | ||||
| 			const defaultToolbar = ref(true); | ||||
| 			const pageInfo = ref({ | ||||
| 				total: 0, | ||||
| 				limit: 10, | ||||
| 				current: 1 | ||||
| 			}); | ||||
| 			const dataList = ref([]); | ||||
| 			const typeList = ref([]); | ||||
| 			const searchObj = ref({}); | ||||
| 			const postData = ref({}); | ||||
| 			const MaterialModel= ref({}); | ||||
| 			const showEditBox = ref([false, false, false, false, false, false, false, false, false, false, false, false,false]); | ||||
| 			const modelArea = ref(["70%", "70%", "70%", "86%", "70%", "70%", "70%", "70%", "700px", "70%", "70%","70%","70%"]); | ||||
| 			const objInfoObj = ref({}); | ||||
| 			const editType = ref(1); | ||||
| 			const stateList = ref([{ | ||||
| 				id: 1, | ||||
| 				name: "进行中" | ||||
| 			}, { | ||||
| 				id: 2, | ||||
| 				name: "已完成" | ||||
| 			}]); | ||||
| 			const hasLoaded = ref(false); | ||||
| 			const dataItem=ref([]); | ||||
| 			return { | ||||
| 				selectedKeys, | ||||
| 				checkbox, | ||||
| 				defaultToolbar, | ||||
| 				dataColumn, | ||||
| 				dataList, | ||||
| 				pageInfo, | ||||
| 				searchObj, | ||||
| 				postData, | ||||
| 				typeList, | ||||
| 				showEditBox, | ||||
| 				modelArea, | ||||
| 				objInfoObj, | ||||
| 				editType, | ||||
| 				stateList, | ||||
| 				hasLoaded, | ||||
| 				MaterialModel, | ||||
| 				dataItem | ||||
| 			}; | ||||
| 		}, | ||||
| 		props: { | ||||
| 			dataInfoObj: { | ||||
| 				type: Object, | ||||
| 				default: () => {}, | ||||
| 			}, | ||||
| 			 | ||||
| 			pageTypeObj: { | ||||
| 				type: Number, | ||||
| 				default: () => 1, | ||||
| 			} | ||||
| 		}, | ||||
| 		mounted() { | ||||
| 			if (this.dataInfoObj) { | ||||
| 				this.dataColumn.pop(); | ||||
| 				this.dataColumn[0].hide = true; | ||||
| 				this.dataColumn[1].hide = true; | ||||
| 				this.dataColumn[2].hide = true; | ||||
| 				this.dataColumn[7].hide = false; | ||||
| 			} | ||||
| 			this._getTypeList(); | ||||
| 			this._getPageList(true); | ||||
| 		}, | ||||
| 		methods: { | ||||
| 			changePage(obj) { | ||||
| 				this.pageInfo.current = obj.current; | ||||
| 				this.pageInfo.limit = obj.limit; | ||||
| 				this._getPageList(); | ||||
| 			}, | ||||
| 			cancelClick(isRefresh, onlyRefresh) { | ||||
| 				if (isRefresh) { | ||||
| 					this._getPageList(true); | ||||
| 				} | ||||
| 				if (onlyRefresh) return false; | ||||
| 				for (let i = 0; i < this.showEditBox.length; i++) { | ||||
| 					this.showEditBox[i] = false; | ||||
| 				} | ||||
| 			}, | ||||
| 			async _getTypeList() { | ||||
| 				this.typeList = await getBasicList(33) || []; | ||||
| 			}, | ||||
| 			//分页列表 | ||||
| 			async _getPageList(isFirst, showOk) { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 				//this.dataList = []; | ||||
| 				this.pageInfo.total = 0; | ||||
| 				if (isFirst) { | ||||
| 					this.pageInfo.current = 1; | ||||
| 					this.pageInfo.total = 0; | ||||
| 				} | ||||
| 				if (this.dataInfoObj && this.dataInfoObj.FID) { | ||||
| 					this.postData.FTeamID = this.dataInfoObj.FID; | ||||
| 					this.postData.FIsUser = false; | ||||
| 				} | ||||
| 				if (this.pageTypeObj && this.pageTypeObj == 2) { | ||||
| 					this.postData.FState = 99; | ||||
| 				} | ||||
| 				this.postData.FPageIndex = this.pageInfo.current; | ||||
| 				this.postData.FPageSize = this.pageInfo.limit; | ||||
| 				let result = await getPageList(this.postData, "Task"); | ||||
| 				result.Data.List = result.Data.List || []; | ||||
| 				result.Data.List.forEach((item) => { | ||||
| 					let type = this.typeList.find(s => s.FValue === item.FType); | ||||
| 					item.FTypeName = type == null ? "" : type.FName; | ||||
| 					let state = this.stateList.find(s => s.id === item.FState) | ||||
| 					item.FStateName = state == null ? "" : state.name; | ||||
| 					item.FAddDate = item.FAddDate == null ? "" : this.dateFormat(item.FAddDate); | ||||
| 					item.FEditDate = item.FEditDate == null ? "" : this.dateFormat(item.FEditDate); | ||||
| 					item.FFinishDate = item.FFinishDate == null ? "" : this.dateFormat(item.FFinishDate); | ||||
| 					item["IsEdit"]=Math.floor(Math.random()*10)==0?"编辑":"新增"; | ||||
| 				}); | ||||
| 				this.pageInfo.total = result.Data.Total || 0; | ||||
| 				debugger | ||||
| 				this.dataList = result.Data.List; | ||||
| 				this.hasLoaded = true; | ||||
| 			}, | ||||
| 			//日期处理 | ||||
| 			dateFormat(dataStr) { | ||||
| 				return dataStr.replace('T', ' ').split('.')[0]; | ||||
| 			}, | ||||
| 			getData(data){ | ||||
|  				this.MaterialModel = data; | ||||
| 				for (let i = 0; i < this.showEditBox.length; i++) { | ||||
| 					this.showEditBox[i] = false; | ||||
| 				} | ||||
| 				this.showEditBox[11] = true; | ||||
| 				this.editType = 1; | ||||
| 
 | ||||
| 			}, | ||||
| 			showEditMaterial(i){ | ||||
| 				this.showEditBox[i] = true; | ||||
| 			}, | ||||
| 			_clickSetInfo(data, type) { | ||||
| 				 | ||||
| 				for (let i = 0; i < this.showEditBox.length; i++) { | ||||
| 					this.showEditBox[i] = false; | ||||
| 				} | ||||
| 				if (data.FType == 1) { | ||||
| 					data.FBoxType = 1; //配方选择 | ||||
| 				} else if (data.FType == 2) { | ||||
| 					data.FBoxType = 2; //BOM下载 | ||||
| 				} else if (data.FType == 9 || data.FType == 10) { | ||||
| 					data.FBoxType = 4; //新包材新增、新子项包材申请 | ||||
| 				} else if ((data.FType >= 3 && data.FType <= 7) || data.FType == 11) { | ||||
| 					data.FBoxType = 3; //视图编辑 | ||||
| 				} else if (data.FType == 8) { | ||||
| 					data.FBoxType = 5; //组编号申请 | ||||
| 				} else if (data.FType == 12) { | ||||
| 					data.FBoxType = 6; //成品视图物料组复核 | ||||
| 				} else if (data.FType == 13) { | ||||
| 					data.FBoxType = 7; //流程确认完成 | ||||
| 				} else if (data.FType == 14) { | ||||
| 					data.FBoxType = 8; //补充包材规格 | ||||
| 				} else if (data.FType == 15) { | ||||
| 					data.FBoxType = 9; //物料选择类型 | ||||
| 				}else if(data.FType==16){ | ||||
| 					this.dataItem=data; | ||||
| 					data.FBoxType = 10; //替代料确认 | ||||
| 				}else { | ||||
| 					return layer.msg("未知事项类型"); | ||||
| 				} | ||||
| 				this.objInfoObj = data; | ||||
| 				this.editType = type; | ||||
| 				this.showEditBox[data.FBoxType] = true; | ||||
| 			}, | ||||
| 
 | ||||
| 
 | ||||
| 			//检索-检索 | ||||
| 			_clickSearch() { | ||||
| 				this.postData = {}; | ||||
| 				for (let key in this.searchObj) { | ||||
| 					let val = this.searchObj[key]; | ||||
| 					if (val != null && val !== "") this.postData[key] = val; | ||||
| 				} | ||||
| 				this._getPageList(true); | ||||
| 			}, | ||||
| 			//检索-重置 | ||||
| 			_clickReset() { | ||||
| 				this.searchObj = {}; | ||||
| 				this._clickSearch(); | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| </script> | ||||
											
												
													File diff suppressed because one or more lines are too long
												
											
										
									
								| @ -0,0 +1,118 @@ | ||||
| <template> | ||||
|     <lay-table style="margin:0 0 30px 0;" height="200px" :columns="dataColumn" :data-source="dataList"> | ||||
| 		<template v-slot:toolbar> | ||||
| 			<p style="float:left;">配方视图</p> | ||||
| 		</template> | ||||
| 	</lay-table> | ||||
| </template> | ||||
| <script> | ||||
|     import { | ||||
| 		ref | ||||
| 	} from 'vue'; | ||||
|     import { | ||||
| 		getTeamworkView | ||||
| 	} from "/src/api/api/teamwork"; | ||||
| 
 | ||||
|     export default { | ||||
|         setup() { | ||||
|             const viewList = ref([]); | ||||
|             const dataColumn = ref([ | ||||
|                 {type: 'number', title: '序号', width: '56'}, | ||||
|                 {key: '工厂', title: '工厂', align: 'center', width: '130px'}, | ||||
|                 {key: '开始生效日期', title: '开始生效日期', align: 'center', width: '130px'}, | ||||
|                 {key: 'BOM用途', title: 'BOM用途', align: 'center', width: '130px'}, | ||||
|                 {key: 'BOM状态', title: 'BOM状态', align: 'center', width: '130px'}, | ||||
|                 {key: '可选文本', title: '可选文本', align: 'center', width: '130px'}, | ||||
|                 {key: '可选BOM', title: '可选BOM', align: 'center', width: '130px'}, | ||||
|                 {key: '父项编码', title: '父项编码', align: 'center', width: '200px'}, | ||||
|                 {key: '父项描述', title: '父项描述', align: 'center', width: '300px'}, | ||||
|                 {key: '基本数量', title: '基本数量', align: 'center', width: '130px'}, | ||||
|                 {key: '基本单位', title: '基本单位', align: 'center', width: '130px'}, | ||||
|                 {key: '子项序号', title: '子项序号', align: 'center', width: '130px'}, | ||||
|                 {key: '项目类别', title: '项目类别', align: 'center', width: '130px'}, | ||||
|                 {key: '子项编码', title: '子项编码', align: 'center', width: '200px'}, | ||||
|                 {key: '子件描述', title: '子件描述', align: 'center', width: '300px'}, | ||||
|                 {key: '组件数量', title: '组件数量', align: 'center', width: '130px'}, | ||||
|                 {key: '计量单位', title: '计量单位', align: 'center', width: '130px'}, | ||||
|                 {key: '工程变更号', title: '工程变更号', align: 'center', width: '130px'}, | ||||
|                 {key: '项目ID', title: '项目ID', align: 'center', width: '130px'}, | ||||
|                 {key: '物料供应标识符', title: '物料供应标识符', align: 'center', width: '130px'}, | ||||
|                 {key: '备件标示', title: '备件标示', align: 'center', width: '130px'}, | ||||
|                 {key: '生产仓储地点', title: '生产仓储地点', align: 'center', width: '130px'}, | ||||
|                 {key: '组件损耗率', title: '组件损耗率', align: 'center', width: '130px'}, | ||||
|                 {key: '成本核算标识相关', title: '成本核算标识相关', align: 'center', width: '130px'}, | ||||
|                 {key: '生产相关', title: '生产相关', align: 'center', width: '130px'}, | ||||
|                 {key: 'BOM项目文本1', title: 'BOM项目文本1', align: 'center', width: '130px'}, | ||||
|                 {key: 'BOM项目文本2', title: 'BOM项目文本2', align: 'center', width: '130px'}, | ||||
|                 {key: '替代项目组', title: '替代项目组', align: 'center', width: '130px'}, | ||||
|                 {key: '优先级', title: '优先级', align: 'center', width: '130px'}, | ||||
|                 {key: '策略', title: '策略', align: 'center', width: '130px'}, | ||||
|                 {key: '使用可能性', title: '使用可能性', align: 'center', width: '130px'}, | ||||
|                 {key: '固定损耗数量', title: '固定损耗数量', align: 'center', width: '130px'} | ||||
|             ]); | ||||
|             const dataList = ref([]); | ||||
| 
 | ||||
|             return { | ||||
|                 viewList, | ||||
| 				dataColumn, | ||||
| 				dataList | ||||
| 			} | ||||
|         }, | ||||
|         props: { | ||||
| 			teamId: { | ||||
| 				type: String, | ||||
| 				default: () => "" | ||||
| 			}, | ||||
|             halfId: { | ||||
|                 type: String, | ||||
|                 default: () => "" | ||||
|             } | ||||
| 		}, | ||||
|         mounted() { | ||||
|             this.initPage(); | ||||
| 		}, | ||||
|         methods: { | ||||
|             async initPage() { | ||||
|                 let dataColumn = [{ | ||||
| 					type: "number", | ||||
| 					title: "序号", | ||||
| 					width: "56" | ||||
| 				}]; | ||||
|                 let dataList = []; | ||||
| 
 | ||||
| 				let postData = { | ||||
| 					FTeamID: this.teamId, | ||||
| 					FViewType: 2, | ||||
| 					FType: 1, | ||||
| 					HalfId : this.halfId | ||||
| 				}; | ||||
| 
 | ||||
| 				let result = await getTeamworkView(postData); | ||||
| 
 | ||||
|                 let formulaList = result["List1"] | ||||
| 
 | ||||
|                 if (formulaList) { | ||||
|                     for (let key in formulaList[0]) { | ||||
|                         let width = (key.indexOf("描述") != -1 || key == "文本" || key == "物料") ? "300px" : | ||||
|                             "130px"; | ||||
|                         width = key.indexOf("编码") != -1 ? "200px" : width; | ||||
|                         dataColumn.push({ | ||||
|                             key: key, | ||||
|                             title: key.split('.').pop(), | ||||
|                             align: "center", | ||||
|                             width: width | ||||
|                         }); | ||||
|                     } | ||||
|                      | ||||
|                     formulaList.forEach((item) => { | ||||
|                         dataList.push(item); | ||||
|                     }); | ||||
|                 } | ||||
|                  | ||||
|                 // this.dataColumn = dataColumn; | ||||
| 				this.dataList = dataList; | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
| </script> | ||||
| @ -0,0 +1,78 @@ | ||||
| <template> | ||||
|     <lay-container> | ||||
|         <view class="layui-item33 color999" :style="'max-height:900px'"> | ||||
|             <lay-row space="10"> | ||||
|                 <lay-col md="4" sm="12" xs="24" v-for="(item, index) in columns"> | ||||
|                     <lay-checkbox-group v-model="checkedItem"> | ||||
|                         <lay-checkbox :name="item.title" skin="primary" :value="item.key"> | ||||
|                             {{ item.title }} | ||||
|                         </lay-checkbox> | ||||
|                     </lay-checkbox-group> | ||||
|                 </lay-col> | ||||
|             </lay-row> | ||||
|         </view> | ||||
|         <view class="menuBtn"> | ||||
| 			<lay-button type="primary" @click="submitClick">确定</lay-button> | ||||
| 			<lay-button @click="cancelClick">取消</lay-button> | ||||
| 		</view> | ||||
|     </lay-container> | ||||
| </template> | ||||
| <script> | ||||
|     import { | ||||
| 		ref | ||||
| 	} from 'vue'; | ||||
|     export default { | ||||
|         setup() { | ||||
|             const columnList = ref([]); | ||||
|             const checkedItem = ref([]); | ||||
| 
 | ||||
|             return { | ||||
|                 columnList, | ||||
|                 checkedItem, | ||||
|             } | ||||
|         }, | ||||
|         props: { | ||||
|             columns: { | ||||
| 				type: Object, | ||||
| 				default: () => [], | ||||
| 			}, | ||||
|             freezingColumns: { | ||||
|                 type: Object, | ||||
| 				default: () => [], | ||||
|             } | ||||
|         }, | ||||
|         mounted() { | ||||
|             this.initPage(); | ||||
| 		}, | ||||
|         methods: { | ||||
|             initPage() { | ||||
|                 this.columnList = this.columns; | ||||
|                 this.checkedItem = this.freezingColumns.concat(); | ||||
|             }, | ||||
|             cancelClick() { | ||||
|                 this.$emit('cancelClick', this.freezingColumns); | ||||
|             }, | ||||
|             submitClick() { | ||||
|                 this.$emit('cancelClick', this.checkedItem); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| </script> | ||||
| <style scoped> | ||||
|     .layui-item33 { | ||||
| 		width: 90%; | ||||
| 		padding-right: 30px; | ||||
| 		margin: 30px auto 10px; | ||||
| 		display: block; | ||||
| 		overflow: auto; | ||||
| 		position: relative; | ||||
| 		clear: both;		 | ||||
| 	} | ||||
| 
 | ||||
|     .menuBtn { | ||||
| 		display: block; | ||||
| 		text-align: center; | ||||
| 		width: 96%; | ||||
| 		margin: 20px auto; | ||||
| 	} | ||||
| </style> | ||||
| @ -0,0 +1,85 @@ | ||||
| <template> | ||||
| 	<lay-table class="empty-small2 empty-small3" style="margin:30px 0;" height="200px" :columns="dataColumn" id="FID" | ||||
| 		:dataSource="dataList"> | ||||
| 		<template v-slot:toolbar> | ||||
| 			<p style="float:right;">操作日志</p> | ||||
| 			<lay-button size="sm" @click="_getPageList()">刷新</lay-button> | ||||
| 		</template> | ||||
| 	</lay-table> | ||||
| </template> | ||||
| <script> | ||||
| 	import { | ||||
| 		ref | ||||
| 	} from 'vue'; | ||||
| 	import { | ||||
| 		getPageList | ||||
| 	} from "/src/api/api/common"; | ||||
| 
 | ||||
| 	export default { | ||||
| 		setup() { | ||||
| 			let dataColumn = [{ | ||||
| 					title: "序号", | ||||
| 					key: "RowIndex", | ||||
| 					width: "80px" | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "操作时间", | ||||
| 					key: "FAddDate", | ||||
| 					width: "200px" | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "操作人", | ||||
| 					key: "FOptUser", | ||||
| 					width: "180px", | ||||
| 					align: 'center' | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "说明", | ||||
| 					key: "FDesc" | ||||
| 				} | ||||
| 			]; | ||||
| 			dataColumn.forEach((item) => { | ||||
| 				item.align = "center"; | ||||
| 			}); | ||||
| 			const dataList = ref([]); | ||||
| 			return { | ||||
| 				dataColumn, | ||||
| 				dataList | ||||
| 			} | ||||
| 		}, | ||||
| 		props: { | ||||
| 			dataInfoObj: { | ||||
| 				type: Object, | ||||
| 				default: () => {}, | ||||
| 			} | ||||
| 		}, | ||||
| 		mounted() { | ||||
| 			setTimeout((item) => { | ||||
| 				this._getPageList(); | ||||
| 			}, 100); | ||||
| 		}, | ||||
| 		methods: { | ||||
| 			cancelClick(isRefresh) { | ||||
| 				this.$emit('cancelClick', isRefresh !== undefined ? isRefresh : false); | ||||
| 			}, | ||||
| 			//日期处理 | ||||
| 			dateFormat(dataStr) { | ||||
| 				return dataStr.replace('T', ' ').split('.')[0]; | ||||
| 			}, | ||||
| 			async _getPageList() { | ||||
| 				if (this.dataInfoObj.FTeamID) { | ||||
| 					let postObj = { | ||||
| 						FTeamID: this.dataInfoObj.FTeamID, | ||||
| 						FType: this.dataInfoObj.FType, | ||||
| 						FPageSize: 99999 | ||||
| 					}; | ||||
| 					let result = await getPageList(postObj, 'OperateLog'); | ||||
| 					this.dataList = result.Data.List || []; | ||||
| 					this.dataList.forEach(item => { | ||||
| 						item.FAddDate = item.FAddDate == null ? "" : this.dateFormat(item.FAddDate); | ||||
| 					}); | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| </script> | ||||
| @ -0,0 +1,344 @@ | ||||
| <template> | ||||
| 	<lay-container fluid="true" | ||||
| 				   :style="'padding:10px;height:'+(dataInfoObj!=undefined?(dataInfoObj.FHeight+'px'):'auto')"> | ||||
| 		<lay-row space="10"> | ||||
| 			<lay-col span="24"> | ||||
| 				<lay-card> | ||||
| 					<lay-form :model="searchObj" class="search-box"> | ||||
| 						<lay-row class="search-items"> | ||||
| 							<lay-form-item label="物料号" prop="FSaleCode"> | ||||
| 								<lay-input v-model="searchObj.FSaleCode"></lay-input> | ||||
| 							</lay-form-item> | ||||
| 							<lay-form-item label="类型" prop="FType"> | ||||
| 								<lay-select v-model="searchObj.FType"> | ||||
| 									<lay-select-option v-for="(tIdv,tIdx) in typeList" :key="tIdx" :value="tIdv.FValue" | ||||
| 													   :label="tIdv.FName"></lay-select-option> | ||||
| 								</lay-select> | ||||
| 							</lay-form-item> | ||||
| 							<lay-form-item v-if="postData.FState!=99" label="事项状态" prop="FState"> | ||||
| 								<lay-select v-model="searchObj.FState"> | ||||
| 									<lay-select-option v-for="(tv,tx) in stateList" :key="tx" :value="tv.id" | ||||
| 													   :label="tv.name"></lay-select-option> | ||||
| 								</lay-select> | ||||
| 							</lay-form-item> | ||||
| 							<lay-form-item label="发起日期" prop="FDateRange"> | ||||
| 								<lay-date-picker v-model="searchObj.FDateRange" range placeholder="type : date"> | ||||
| 								</lay-date-picker> | ||||
| 							</lay-form-item> | ||||
| 						</lay-row> | ||||
| 						<lay-form-item class="search-btn"> | ||||
| 							<lay-button size="sm" type="primary" @click="_clickSearch">搜索</lay-button> | ||||
| 							<lay-button size="sm" @click="_clickReset">重置</lay-button> | ||||
| 						</lay-form-item> | ||||
| 					</lay-form> | ||||
| 					<lay-table v-if="hasLoaded" :columns="dataColumn" id="id" :dataSource="dataList" | ||||
| 							   v-model:selectedKeys="selectedKeys" :checkbox="checkbox" :default-toolbar="defaultToolbar" | ||||
| 							   :page="dataList.length>0?pageInfo:null" @change="changePage"> | ||||
| 						<template v-slot:toolbar> | ||||
| 							<lay-button size="sm" @click="_getPageList(false,true)">刷新</lay-button> | ||||
| 							<lay-button size="sm" type="normal" style="float:right" @click="showEditMaterial(1)">导出</lay-button> | ||||
| 
 | ||||
| 						</template> | ||||
| 						<template v-slot:FStateName="{ data }"> | ||||
| 							<span v-if="data.FStateName=='已完成'" style="color:#5FB878">{{ data.FStateName }}</span> | ||||
| 							<span v-else style="color:#1E9FFF">{{ data.FStateName }}</span> | ||||
| 						</template> | ||||
| 						<template v-if="dataInfoObj == undefined|| !dataInfoObj.FID" v-slot:operator="{ data }"> | ||||
| 							<lay-button size="xs" type="primary" @click="showEditMaterial(3)">操作</lay-button> | ||||
| 						</template> | ||||
| 					</lay-table> | ||||
| 				</lay-card> | ||||
| 			</lay-col> | ||||
| 		</lay-row> | ||||
| 		<lay-layer :area="modelArea[1]" v-model="showEditBox[1]" :title="新增物料"> | ||||
| 			<AddMateria v-if="showEditBox[1]" :dataInfoObj="objInfoObj" @cancelClick="cancelClick"></AddMateria> | ||||
| 		</lay-layer> | ||||
| 		<lay-layer :area="modelArea[2]" v-model="showEditBox[2]" :title="编辑物料"> | ||||
| 			<EditMateria v-if="showEditBox[2]" :dataInfoObj="objInfoObj" @cancelClick="cancelClick"></EditMateria> | ||||
| 		</lay-layer> | ||||
| 		<lay-layer :area="modelArea[3]" v-model="showEditBox[3]" :title="编辑物料"> | ||||
| 			<EditView v-if="showEditBox[3]" :dataInfoObj="objInfoObj" @cancelClick="cancelClick"></EditView> | ||||
| 		</lay-layer> | ||||
| 	</lay-container> | ||||
| </template> | ||||
| <script> | ||||
| 	import { | ||||
| 		ref, | ||||
| 		watch | ||||
| 	} from "vue"; | ||||
| 	import { | ||||
| 		getBasicList, | ||||
| 		getPageList | ||||
| 	} from "/src/api/api/common"; | ||||
| 	import AddMateria from '../materia/components/AddMateria.vue'; | ||||
| 	import EditMateria from '../materia/components/EditMateria.vue'; | ||||
| 	import EditView from '../materia/components/EditView.vue'; | ||||
| 	import '@layui/layui-vue/es/checkbox/index.css'; | ||||
| 	import '@layui/layui-vue/es/radio/index.css'; | ||||
| 
 | ||||
| 	export default { | ||||
| 		components: { | ||||
| 			AddMateria, | ||||
| 			EditMateria, | ||||
| 			EditView | ||||
| 		}, | ||||
| 		setup() { | ||||
| 			let dataColumn = [ | ||||
| 			{ | ||||
| 				title: "编号", | ||||
| 				key: "FID", | ||||
| 				width: "160px", | ||||
| 				align: 'center', | ||||
| 				hide: false | ||||
| 			},{ | ||||
| 				title: "物料号", | ||||
| 				key: "FMdmCode", | ||||
| 				width: "300px", | ||||
| 				align: 'center', | ||||
| 				hide: false | ||||
| 			}, | ||||
| 				{ | ||||
| 					title: "物料描述", | ||||
| 					key: "FSaleCode", | ||||
| 					width: "160px", | ||||
| 					align: 'center', | ||||
| 					hide: false | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "试验号", | ||||
| 					key: "FTestCode", | ||||
| 					width: "160px", | ||||
| 					align: 'center', | ||||
| 					hide: false | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "来源", | ||||
| 					key: "FDesc", | ||||
| 					width: "160px", | ||||
| 					align: 'center' | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "产品分类", | ||||
| 					key: "FDesc", | ||||
| 					width: "400px", | ||||
| 					align: 'center' | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "发起时间", | ||||
| 					key: "FAddDate", | ||||
| 					width: "180px", | ||||
| 					align: 'center' | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "发起人", | ||||
| 					key: "FUserName", | ||||
| 					width: "178px", | ||||
| 					align: 'center' | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "负责人", | ||||
| 					key: "IsEdit", | ||||
| 					width: "98px", | ||||
| 					align: 'center', | ||||
| 					customSlot: '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					title: "操作", | ||||
| 					key: "operator", | ||||
| 					width: "130px", | ||||
| 					fixed: "right", | ||||
| 					customSlot: 'operator', | ||||
| 					align: 'center' | ||||
| 				} | ||||
| 			]; | ||||
| 			const selectedKeys = ref(["1"]); | ||||
| 			const checkbox = ref(false); | ||||
| 			const defaultToolbar = ref(true); | ||||
| 			const pageInfo = ref({ | ||||
| 				total: 0, | ||||
| 				limit: 10, | ||||
| 				current: 1 | ||||
| 			}); | ||||
| 			const dataList = ref([]); | ||||
| 			const typeList = ref([]); | ||||
| 			const searchObj = ref({}); | ||||
| 			const postData = ref({}); | ||||
| 			const MaterialModel= ref({}); | ||||
| 			const showEditBox = ref([false, false, false, false, false, false, false, false, false, false, false, false,false]); | ||||
| 			const modelArea = ref(["70%", "70%", "70%", "86%", "70%", "70%", "70%", "70%", "700px", "70%", "70%","70%","70%"]); | ||||
| 			const objInfoObj = ref({}); | ||||
| 			const editType = ref(1); | ||||
| 			const stateList = ref([{ | ||||
| 				id: 1, | ||||
| 				name: "进行中" | ||||
| 			}, { | ||||
| 				id: 2, | ||||
| 				name: "已完成" | ||||
| 			}]); | ||||
| 			const hasLoaded = ref(false); | ||||
| 			const dataItem=ref([]); | ||||
| 			return { | ||||
| 				selectedKeys, | ||||
| 				checkbox, | ||||
| 				defaultToolbar, | ||||
| 				dataColumn, | ||||
| 				dataList, | ||||
| 				pageInfo, | ||||
| 				searchObj, | ||||
| 				postData, | ||||
| 				typeList, | ||||
| 				showEditBox, | ||||
| 				modelArea, | ||||
| 				objInfoObj, | ||||
| 				editType, | ||||
| 				stateList, | ||||
| 				hasLoaded, | ||||
| 				MaterialModel, | ||||
| 				dataItem | ||||
| 			}; | ||||
| 		}, | ||||
| 		props: { | ||||
| 			dataInfoObj: { | ||||
| 				type: Object, | ||||
| 				default: () => {}, | ||||
| 			}, | ||||
| 			 | ||||
| 			pageTypeObj: { | ||||
| 				type: Number, | ||||
| 				default: () => 1, | ||||
| 			} | ||||
| 		}, | ||||
| 		mounted() { | ||||
| 			if (this.dataInfoObj) { | ||||
| 				this.dataColumn.pop(); | ||||
| 				this.dataColumn[0].hide = true; | ||||
| 				this.dataColumn[1].hide = true; | ||||
| 				this.dataColumn[2].hide = true; | ||||
| 				this.dataColumn[7].hide = false; | ||||
| 			} | ||||
| 			this._getTypeList(); | ||||
| 			this._getPageList(true); | ||||
| 		}, | ||||
| 		methods: { | ||||
| 			changePage(obj) { | ||||
| 				this.pageInfo.current = obj.current; | ||||
| 				this.pageInfo.limit = obj.limit; | ||||
| 				this._getPageList(); | ||||
| 			}, | ||||
| 			cancelClick(isRefresh, onlyRefresh) { | ||||
| 				if (isRefresh) { | ||||
| 					this._getPageList(true); | ||||
| 				} | ||||
| 				if (onlyRefresh) return false; | ||||
| 				for (let i = 0; i < this.showEditBox.length; i++) { | ||||
| 					this.showEditBox[i] = false; | ||||
| 				} | ||||
| 			}, | ||||
| 			async _getTypeList() { | ||||
| 				this.typeList = await getBasicList(33) || []; | ||||
| 			}, | ||||
| 			//分页列表 | ||||
| 			async _getPageList(isFirst, showOk) { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 				//this.dataList = []; | ||||
| 				this.pageInfo.total = 0; | ||||
| 				if (isFirst) { | ||||
| 					this.pageInfo.current = 1; | ||||
| 					this.pageInfo.total = 0; | ||||
| 				} | ||||
| 				if (this.dataInfoObj && this.dataInfoObj.FID) { | ||||
| 					this.postData.FTeamID = this.dataInfoObj.FID; | ||||
| 					this.postData.FIsUser = false; | ||||
| 				} | ||||
| 				if (this.pageTypeObj && this.pageTypeObj == 2) { | ||||
| 					this.postData.FState = 99; | ||||
| 				} | ||||
| 				this.postData.FPageIndex = this.pageInfo.current; | ||||
| 				this.postData.FPageSize = this.pageInfo.limit; | ||||
| 				let result = await getPageList(this.postData, "Task"); | ||||
| 				result.Data.List = result.Data.List || []; | ||||
| 				result.Data.List.forEach((item) => { | ||||
| 					let type = this.typeList.find(s => s.FValue === item.FType); | ||||
| 					item.FTypeName = type == null ? "" : type.FName; | ||||
| 					let state = this.stateList.find(s => s.id === item.FState) | ||||
| 					item.FStateName = state == null ? "" : state.name; | ||||
| 					item.FAddDate = item.FAddDate == null ? "" : this.dateFormat(item.FAddDate); | ||||
| 					item.FEditDate = item.FEditDate == null ? "" : this.dateFormat(item.FEditDate); | ||||
| 					item.FFinishDate = item.FFinishDate == null ? "" : this.dateFormat(item.FFinishDate); | ||||
| 				}); | ||||
| 				this.pageInfo.total = result.Data.Total || 0; | ||||
| 				debugger | ||||
| 				this.dataList = result.Data.List; | ||||
| 				debugger | ||||
| 				this.hasLoaded = true; | ||||
| 			}, | ||||
| 			//日期处理 | ||||
| 			dateFormat(dataStr) { | ||||
| 				return dataStr.replace('T', ' ').split('.')[0]; | ||||
| 			}, | ||||
| 			getData(data){ | ||||
|  				this.MaterialModel = data; | ||||
| 				for (let i = 0; i < this.showEditBox.length; i++) { | ||||
| 					this.showEditBox[i] = false; | ||||
| 				} | ||||
| 				this.showEditBox[11] = true; | ||||
| 				this.editType = 1; | ||||
| 
 | ||||
| 			}, | ||||
| 			showEditMaterial(i){ | ||||
| 				this.showEditBox[i] = true; | ||||
| 			}, | ||||
| 			_clickSetInfo(data, type) { | ||||
| 				 | ||||
| 				for (let i = 0; i < this.showEditBox.length; i++) { | ||||
| 					this.showEditBox[i] = false; | ||||
| 				} | ||||
| 				if (data.FType == 1) { | ||||
| 					data.FBoxType = 1; //配方选择 | ||||
| 				} else if (data.FType == 2) { | ||||
| 					data.FBoxType = 2; //BOM下载 | ||||
| 				} else if (data.FType == 9 || data.FType == 10) { | ||||
| 					data.FBoxType = 4; //新包材新增、新子项包材申请 | ||||
| 				} else if ((data.FType >= 3 && data.FType <= 7) || data.FType == 11) { | ||||
| 					data.FBoxType = 3; //视图编辑 | ||||
| 				} else if (data.FType == 8) { | ||||
| 					data.FBoxType = 5; //组编号申请 | ||||
| 				} else if (data.FType == 12) { | ||||
| 					data.FBoxType = 6; //成品视图物料组复核 | ||||
| 				} else if (data.FType == 13) { | ||||
| 					data.FBoxType = 7; //流程确认完成 | ||||
| 				} else if (data.FType == 14) { | ||||
| 					data.FBoxType = 8; //补充包材规格 | ||||
| 				} else if (data.FType == 15) { | ||||
| 					data.FBoxType = 9; //物料选择类型 | ||||
| 				}else if(data.FType==16){ | ||||
| 					this.dataItem=data; | ||||
| 					data.FBoxType = 10; //替代料确认 | ||||
| 				}else { | ||||
| 					return layer.msg("未知事项类型"); | ||||
| 				} | ||||
| 				this.objInfoObj = data; | ||||
| 				this.editType = type; | ||||
| 				this.showEditBox[data.FBoxType] = true; | ||||
| 			}, | ||||
| 
 | ||||
| 
 | ||||
| 			//检索-检索 | ||||
| 			_clickSearch() { | ||||
| 				this.postData = {}; | ||||
| 				for (let key in this.searchObj) { | ||||
| 					let val = this.searchObj[key]; | ||||
| 					if (val != null && val !== "") this.postData[key] = val; | ||||
| 				} | ||||
| 				this._getPageList(true); | ||||
| 			}, | ||||
| 			//检索-重置 | ||||
| 			_clickReset() { | ||||
| 				this.searchObj = {}; | ||||
| 				this._clickSearch(); | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| </script> | ||||
					Loading…
					
					
				
		Reference in new issue