import"./vendor-@yoyoboot.8e403b7f.js";import{M as V,dU as T,bV as q,dE as P,ge as G,v_ as _,e8 as O,dD as R,dL as W,dx as $,cu as Q,Gf as B,Iv as c,Iw as z,Ge as j,IA as w}from"./index.26c4c5e4.js";import K from"./lotonwip-begin.4e16adc0.js";import H from"./page-select-form-mes.89fbdf13.js";import J from"./add-ncr.95ce7bd9.js";import X from"./pdf-view.f492fc96.js";import{_ as Y}from"./vendor-vue-esign.0fac9558.js";import{f as Z,b8 as n,b2 as p,av as D,bu as i,c as o,ay as b,H as h,ax as C,aw as E,ah as ee}from"./vendor-@vue.54cfd5db.js";import"./vendor-@amap.00a31695.js";import"./vendor-vue.a043f652.js";import"./vendor-rxjs.4b938c8c.js";import"./vendor-pinia.43029f7e.js";import"./vendor-vue-demi.7cc19214.js";import"./vendor-moment.66c26c2c.js";import"./vendor-ant-design-vue.751c3cd3.js";import"./vendor-@babel.c5bc1229.js";import"./vendor-@ant-design.63c6b598.js";import"./vendor-@ctrl.20d759e6.js";import"./vendor-lodash-es.ed8922d2.js";import"./vendor-resize-observer-polyfill.9cb1d996.js";import"./vendor-async-validator.848b42ae.js";import"./vendor-scroll-into-view-if-needed.db58d6e4.js";import"./vendor-compute-scroll-into-view.c149e421.js";import"./vendor-dayjs.f75e2054.js";import"./vendor-lodash.10e97600.js";import"./vendor-dom-align.9a7fd630.js";import"./vendor-axios.6837fb6a.js";import"./vendor-vite-plugin-theme.cdb5aaa3.js";import"./vendor-tinycolor2.15555a92.js";import"./vendor-vue-router.ad0ee5aa.js";import"./vendor-crypto-js.0d2d00de.js";import"./vendor-qs.9c6d4952.js";import"./vendor-side-channel.852f6196.js";import"./vendor-es-errors.109e7893.js";import"./vendor-object-inspect.a19339a7.js";import"./vendor-side-channel-list.4eb79c5d.js";import"./vendor-side-channel-map.78013cdc.js";import"./vendor-get-intrinsic.009e6d91.js";import"./vendor-es-object-atoms.6b93c911.js";import"./vendor-math-intrinsics.9d903a04.js";import"./vendor-gopd.6af85623.js";import"./vendor-es-define-property.e29486e3.js";import"./vendor-has-symbols.e17f832c.js";import"./vendor-get-proto.d34ed19c.js";import"./vendor-dunder-proto.d7ff28e4.js";import"./vendor-call-bind-apply-helpers.6ae1c6b0.js";import"./vendor-function-bind.db802abf.js";import"./vendor-hasown.dde58836.js";import"./vendor-call-bound.baa752e5.js";import"./vendor-side-channel-weakmap.d8f21310.js";import"./vendor-@microsoft.9e93d44a.js";import"./vendor-nprogress.9650c9fb.js";import"./vendor-@vueuse.ed9fd59d.js";import"./vendor-@iconify.af65c3a5.js";import"./vendor-vue-types.1c81418c.js";import"./vendor-path-to-regexp.a7bc300e.js";import"./vendor-moment-timezone.63780abd.js";import"./vendor-msal.027eacca.js";import"./vendor-mitt.f0b9d348.js";import"./vendor-xlsx.a360fe3f.js";import"./vendor-@zxcvbn-ts.ab4410b0.js";import"./vendor-mockjs.b66bedb0.js";import"./vendor-vite-plugin-mock.545045f3.js";const te=Z({name:"lot-check-cp",components:{AddNcr:J,PdfView:X,LotonwipBegin:K},mixins:[V],props:{input:{type:Object,required:!0}},data(){const e=[{title:"\u5E8F\u53F7",dataIndex:"index",customRender:({index:u})=>u+1,width:50,align:"center"},{title:"\u68C0\u9A8C\u9879\u76EE\u4EE3\u7801",dataIndex:"ckItemCode",width:160},{title:"\u68C0\u9A8C\u9879\u76EE\u63CF\u8FF0",dataIndex:"ckItemName",width:160},{title:"\u8BBE\u8BA1\u6700\u5927\u503C",dataIndex:"setValueMax",width:100},{title:"\u8BBE\u8BA1\u6700\u5C0F\u503C",dataIndex:"setValueMin",width:100},{title:"\u5B9E\u9645\u503C",dataIndex:"testValue",width:100},{title:"A1",dataIndex:"a1",width:100},{title:"A2",dataIndex:"a2",width:100},{title:"\u5907\u6CE8",dataIndex:"memo",width:200}],t=[{title:"\u5E8F\u53F7",dataIndex:"index",customRender:({index:u})=>u+1,width:50,align:"center"},{title:"\u68C0\u9A8C\u9879\u76EE\u4EE3\u7801",dataIndex:"ckItemCode",width:160},{title:"\u68C0\u6D4B\u9879\u76EE\u540D\u79F0",dataIndex:"ckItemName",width:160},{title:"\u662F\u5426\u5408\u683C",dataIndex:"testResult",width:120}];return{icsMoDispatchingServiceProxy:new T,extService:new q,lotonWipService:new P,enumKeyService:new G,info:new _,opService:new O,checkService:new R,moService:new W,itemOp2CheckItemService:new $,checkItemService:new Q,filterText:"",disabled4UserCode:!1,disabled4lotNo:!0,disabled4lotCheckSave:!0,selectItems:[],dataSource4WG:[],columns4WG:t,dataSource4CC:[],columns4CC:e,verifyMsg:"",pdfPath:"",input4aa:[],comInput4LotonWipBegin:new B,color:"pink",currentOpInfo:"",segCode:""}},created(){},computed:{},mounted(){this.info=this.input,this.$nextTick(()=>{this.$refs.userCode.focus()}),this.currentOpInfo="\u52A0\u5DE5\u4EBA\u5458\u59D3\u540D:  \u70B9\u9635\u4F4D:",this.disabled4lotCheckSave=!1},watch:{},methods:{verifyTestValue(e){Number(e.testValue)>=Number(e.setValueMin)&&Number(e.testValue)<=Number(e.setValueMax)?e.a1=!0:e.a1=!1,Number(e.testValue)>=Number(e.exemptionValueMin)&&Number(e.testValue)<=Number(e.exemptionValueMax)?e.a2=!0:e.a2=!1},callback4Begin(e,t){this.pdfPath=t},enter4UserCode(){if(this.disabled4UserCode=!0,!this.info.userCode){this.verifyMsg=`\u8BF7\u8F93\u5165\u7528\u6237! \r
`,this.notify.warn(this.verifyMsg),this.disabled4UserCode=!1;return}this.checkService.getUserInfo(this.info.userCode).then(e=>{this.info.userCode=e.value,this.info.userName=e.text,this.disabled4UserCode=!0,this.disabled4lotNo=!1,this.$nextTick(()=>{this.$refs.lotNo.focus()}),this.loadCurrentTitleInfo()}).catch(e=>{this.disabled4UserCode=!1,this.info.userCode="",this.verifyMsg=e.response.error.message})},pageSelectForm(){const e=[{title:"\u5E8F\u53F7",dataIndex:"index",width:50,align:"center"},{title:"\u5355\u636E\u7F16\u53F7",dataIndex:"DocNo",width:100},{title:"\u5355\u636E\u884C\u53F7",dataIndex:"DocLineNo",width:80},{title:"\u5DE5\u5355\u5E8F\u5217\u53F7",dataIndex:"LotNo",width:150},{title:"\u5E8F\u5217\u53F7\u884C\u53F7",dataIndex:"LotSeq",width:100},{title:"\u6279\u6B21\u6570\u91CF",dataIndex:"LotQty",width:100},{title:"\u68C0\u9A8C\u65B9\u5F0F",dataIndex:"CheckClassText",width:100},{title:"\u6765\u6E90\u5355\u53F7",dataIndex:"SrcDocNo",width:150},{title:"\u6765\u6E90\u5355\u884C\u53F7",dataIndex:"SrcDocLineNo",width:100},{title:"\u7269\u6599\u7F16\u7801",dataIndex:"ItemCode",width:100},{title:"\u7269\u6599\u540D\u79F0",dataIndex:"ItemName",width:100}];let t=[];t.push({key:"1",columnName:"ItemCode",columnAction:c.columnAction_Contain,columnLogic:c.columnLogic_Or,columnValue:"",columnDataType:c.columnType_text,isFixedValue:!1}),t.push({key:"2",columnName:"LotNo",columnAction:c.columnAction_Contain,columnLogic:c.columnLogic_Or,columnValue:"",columnDataType:c.columnType_text,isFixedValue:!1}),t.push({key:"3",columnName:"CheckType",columnAction:c.columnAction_Equal,columnLogic:c.columnLogic_And,columnValue:"CP",columnDataType:c.columnType_text,isFixedValue:!0}),this.modalHelper.create(H,{dataColumns:e,queryColumnData:t,methodName:"\u5236\u7A0B\u68C0\u9A8C\u5E8F\u5217\u53F7\u9009\u62E9",checkType:z.single},{width:1600}).subscribe(u=>{if(u){let s=u[0];s&&(this.info.lotNo=s.LotNo,this.info.lotQty=s.LotQty,this.info.lotSeq=s.LotSeq,this.info.srcDocNo=s.SrcDocNo,this.info.srcDocLineNo=s.SrcDocLineNo,this.info.itemCode=s.ItemCode,this.info.itemName=s.ItemName,this.info.lotMidCheckId=s.Id,this.info.checkClass=s.CheckClass,this.segCode=s.SegCode,this.loadCurrentTitleInfo(),this.loadTestData(),this.segCode&&this.loadApperanceData())}})},loadCurrentTitleInfo(){this.currentOpInfo=" \u52A0\u5DE5\u4EBA\u5458\u59D3\u540D: "+this.info.userName+" \u70B9\u9635\u4F4D:"},checkInput(){return this.info.userCode?this.info.lotNo?this.info.srcDocNo?this.info.srcDocLineNo==0?(this.verifyMsg=`\u8BF7\u8F93\u5165\u6279\u6B21\u53F7!\r
`,!1):this.info.itemCode?this.info.itemName?!0:(this.verifyMsg=`\u8BF7\u8F93\u5165\u6279\u6B21\u53F7!\r
`,!1):(this.verifyMsg=`\u8BF7\u8F93\u5165\u6279\u6B21\u53F7!\r
`,!1):(this.verifyMsg=`\u8BF7\u8F93\u5165\u6279\u6B21\u53F7!\r
`,!1):(this.verifyMsg=`\u8BF7\u8F93\u5165\u6279\u6B21\u53F7!\r
`,!1):(this.verifyMsg=`\u8BF7\u8F93\u5165\u4EBA\u5458!\r
`,!1)},loadTestData(){let e=new B;e.parameter1=this.info.itemCode,this.itemOp2CheckItemService.queryItemOp2CheckItem(e).then(t=>{this.dataSource4CC=t}).catch(t=>{})},loadApperanceData(){let e=new j;e.value=this.segCode,this.checkItemService.queryCheckItemBySeg(e).then(t=>{this.dataSource4WG=t}).catch(t=>{})},checkCCCheckList(e){if(e.length>0)for(let t=0;t<e.length;t++){const u=e[t];if(!u.testValue)return this.verifyMsg="\u7B2C"+(t+1)+`\u884C\u8BF7\u8F93\u5165\u5B9E\u6D4B\u503C\r
`,this.notify.warn(this.verifyMsg),!1;this.verifyTestValue(u),u.lotNo=this.info.lotNo,u.lotSeq=this.info.lotSeq,u.seq=t+1,u.moCode=this.info.srcDocNo,u.moSeq=this.info.srcDocLineNo,u.itemCode=this.info.itemCode,u.id=0,u.a1==!0||u.a2==!0?u.testResult=w.Action_Good:u.testResult=w.Action_NG}return!0},checkWGCheckList(e){for(let t=0;t<e.length;t++){const u=e[t];if(!u.testResult)return this.verifyMsg="\u7B2C"+(t+1)+`\u884C\u8BF7\u8F93\u5165\u5916\u89C2\u68C0\u9A8C\u7ED3\u679C\r
`,this.notify.warn(this.verifyMsg),!1;u.lotNo=this.info.lotNo,u.lotSeq=this.info.lotSeq,u.seq=t+1,u.moCode=this.info.srcDocNo,u.moSeq=this.info.srcDocLineNo,u.itemCode=this.info.itemCode,u.id=0}return!0},lotCheckSave(){this.disabled4lotCheckSave=!0;let e=this.checkInput();if(!e){this.disabled4lotCheckSave=!1,this.notify.warn(this.verifyMsg);return}if(this.dataSource4WG.length==0){this.verifyMsg=`\u5FC5\u987B\u5B58\u5728\u5916\u89C2\u68C0\u9A8C\u9879\u76EE\r
`,this.notify.warn(this.verifyMsg),this.disabled4lotCheckSave=!1;return}if(e=this.checkCCCheckList(this.dataSource4CC),!e){this.disabled4lotCheckSave=!1;return}if(e=this.checkWGCheckList(this.dataSource4WG),!e){this.disabled4lotCheckSave=!1;return}this.info.checkItemList1=this.dataSource4WG,this.info.checkItemList2=this.dataSource4CC,this.checkService.lotCheckResultSave4CP(this.info).then(t=>{if(!t){this.verifyMsg=`\u5B8C\u5DE5\u5931\u8D25\r
`;return}this.notify.success("\u6210\u54C1\u68C0\u9A8COK"),this.disabled4lotCheckSave=!1,this.info=new _,this.disabled4UserCode=!1,this.$nextTick(()=>{this.$refs.userCode.focus()})}).catch(t=>{this.disabled4lotCheckSave=!1})}}}),oe={key:0,class:"editable-cell"},ie={key:0,class:"editable-cell"},ue={key:1,class:"editable-cell"},ae={key:2,class:"editable-cell"},le={key:3,class:"editable-cell"};function ne(e,t,u,s,se,re){const f=n("a-input"),m=n("a-form-item"),l=n("a-col"),y=n("a-button"),k=n("a-input-number"),v=n("a-row"),I=n("a-divider"),x=n("LotonwipBegin"),N=n("a-radio"),L=n("a-radio-group"),g=n("a-table"),S=n("a-card"),F=n("a-checkbox"),A=n("a-tooltip"),M=n("a-form");return p(),D(M,{ref:"formRef",form:e.info,model:e.info,autocomplete:"off","label-col":{span:8},"wrapper-col":{span:16}},{default:i(()=>[o(v,{gutter:24},{default:i(()=>[o(l,{span:4},{default:i(()=>[o(m,{label:e.l("UserCode"),name:"userCode"},{default:i(()=>[o(f,{value:e.info.userCode,"onUpdate:value":t[0]||(t[0]=a=>e.info.userCode=a),type:"text",disabled:e.disabled4UserCode,ref:"userCode",onPressEnter:e.enter4UserCode},null,8,["value","disabled","onPressEnter"])]),_:1},8,["label"])]),_:1}),o(l,{span:4},{default:i(()=>[o(m,{label:e.l("UserName"),name:"userName"},{default:i(()=>[o(f,{value:e.info.userName,"onUpdate:value":t[1]||(t[1]=a=>e.info.userName=a),type:"text",disabled:!0},null,8,["value"])]),_:1},8,["label"])]),_:1}),o(l,{span:4},{default:i(()=>[o(m,{label:e.l("LotNo"),name:"lotNo"},{default:i(()=>[o(f,{value:e.info.lotNo,"onUpdate:value":t[2]||(t[2]=a=>e.info.lotNo=a),type:"text",ref:"lotNo",disabled:!0},null,8,["value"])]),_:1},8,["label"])]),_:1}),o(l,{span:2},{default:i(()=>[o(y,{onClick:e.pageSelectForm,class:"info"},{default:i(()=>[...t[9]||(t[9]=[b("svg",{class:"icon","aria-hidden":"true"},[b("use",{"xlink:href":"#yo-icon-xuanze"})],-1),h("\u9009\u62E9 ",-1)])]),_:1},8,["onClick"])]),_:1}),o(l,{span:4},{default:i(()=>[o(m,{label:e.l("LotSeq"),name:"lotSeq"},{default:i(()=>[o(k,{value:e.info.lotSeq,"onUpdate:value":t[3]||(t[3]=a=>e.info.lotSeq=a),disabled:!0},null,8,["value"])]),_:1},8,["label"])]),_:1})]),_:1}),o(v,{gutter:24},{default:i(()=>[o(l,{span:4},{default:i(()=>[o(m,{label:e.l("MoCode"),name:"srcDocNo"},{default:i(()=>[o(f,{value:e.info.srcDocNo,"onUpdate:value":t[4]||(t[4]=a=>e.info.srcDocNo=a),type:"text",disabled:!0},null,8,["value"])]),_:1},8,["label"])]),_:1}),o(l,{span:4},{default:i(()=>[o(m,{label:e.l("MoSeq"),name:"srcDocLineNo"},{default:i(()=>[o(k,{value:e.info.srcDocLineNo,"onUpdate:value":t[5]||(t[5]=a=>e.info.srcDocLineNo=a),disabled:!0},null,8,["value"])]),_:1},8,["label"])]),_:1}),o(l,{span:4},{default:i(()=>[o(m,{label:e.l("ItemCode"),name:"itemCode"},{default:i(()=>[o(f,{value:e.info.itemCode,"onUpdate:value":t[6]||(t[6]=a=>e.info.itemCode=a),type:"text",disabled:!0},null,8,["value"])]),_:1},8,["label"])]),_:1}),o(l,{span:2}),o(l,{span:4},{default:i(()=>[o(m,{label:e.l("ItemName"),name:"itemName"},{default:i(()=>[o(f,{value:e.info.itemName,"onUpdate:value":t[7]||(t[7]=a=>e.info.itemName=a),type:"text",disabled:!0},null,8,["value"])]),_:1},8,["label"])]),_:1}),o(l,{span:4},{default:i(()=>[o(m,{label:e.l("LotQty"),name:"lotQty"},{default:i(()=>[o(k,{value:e.info.lotQty,"onUpdate:value":t[8]||(t[8]=a=>e.info.lotQty=a),disabled:!0},null,8,["value"])]),_:1},8,["label"])]),_:1}),o(l,{span:2},{default:i(()=>[o(y,{class:"info",onClick:e.lotCheckSave,disabled:e.disabled4lotCheckSave},{default:i(()=>[...t[10]||(t[10]=[b("svg",{class:"icon","aria-hidden":"true"},[b("use",{"xlink:href":"#yo-icon-bianji1"})],-1),h(" \u5B8C\u5DE5",-1)])]),_:1},8,["onClick","disabled"])]),_:1})]),_:1}),o(I,null,{default:i(()=>[...t[11]||(t[11]=[h("\u5206\u5272\u7EBF",-1)])]),_:1}),o(v,{gutter:24},{default:i(()=>[o(l,{span:16},{default:i(()=>[o(x,{input:e.comInput4LotonWipBegin,ref:"child4Begin",onSelectChange4Callback:e.callback4Begin},null,8,["input","onSelectChange4Callback"])]),_:1}),o(l,{span:8},{default:i(()=>[o(S,{bordered:!1,size:"small",title:"\u5916\u89C2\u68C0\u9A8C"},{default:i(()=>[o(g,{bordered:"",class:"table-container2","data-source":e.dataSource4WG,columns:e.columns4WG,pagination:!1,size:"small",scroll:{y:280}},{bodyCell:i(({column:a,text:U,record:r})=>[["testResult"].includes(a.dataIndex)?(p(),C("div",oe,[o(L,{value:r.testResult,"onUpdate:value":d=>r.testResult=d,name:"radioGroup"},{default:i(()=>[o(N,{value:"Good"},{default:i(()=>[...t[12]||(t[12]=[h("\u662F",-1)])]),_:1}),o(N,{value:"NG"},{default:i(()=>[...t[13]||(t[13]=[h("\u5426",-1)])]),_:1})]),_:1},8,["value","onUpdate:value"])])):E("",!0)]),_:1},8,["data-source","columns"])]),_:1}),o(S,{bordered:!1,size:"small",title:"\u5C3A\u5BF8\u68C0\u9A8C"},{default:i(()=>[o(g,{bordered:"",class:"table-container2","data-source":e.dataSource4CC,columns:e.columns4CC,pagination:!1,size:"small",scroll:{y:280}},{bodyCell:i(({column:a,text:U,record:r})=>[["testValue"].includes(a.dataIndex)?(p(),C("div",ie,[o(f,{value:r.testValue,"onUpdate:value":d=>r.testValue=d,type:"text",onPressEnter:d=>e.verifyTestValue(r)},null,8,["value","onUpdate:value","onPressEnter"])])):["a1"].includes(a.dataIndex)?(p(),C("div",ue,[o(F,{checked:r.a1,"onUpdate:checked":d=>r.a1=d,disabled:!0},null,8,["checked","onUpdate:checked"])])):["a2"].includes(a.dataIndex)?(p(),C("div",ae,[o(F,{checked:r.a2,"onUpdate:checked":d=>r.a2=d,disabled:!0},null,8,["checked","onUpdate:checked"])])):["memo"].includes(a.dataIndex)?(p(),C("div",le,[o(f,{value:r.memo,"onUpdate:value":d=>r.memo=d,type:"text"},null,8,["value","onUpdate:value"])])):E("",!0)]),_:1},8,["data-source","columns"])]),_:1})]),_:1})]),_:1}),o(I,null,{default:i(()=>[...t[14]||(t[14]=[h("\u5206\u5272\u7EBF",-1)])]),_:1}),o(v,{gutter:24},{default:i(()=>[o(l,{span:16},{default:i(()=>[(p(),D(A,{key:e.color,title:"\u70B9\u9635\u4F4D",color:e.color},{default:i(()=>[o(y,{style:{color:"rgb(243, 11, 108)"}},{default:i(()=>[h(ee(e.currentOpInfo),1)]),_:1})]),_:1},8,["color"]))]),_:1})]),_:1})]),_:1},8,["form","model"])}var yt=Y(te,[["render",ne],["__scopeId","data-v-587513c7"]]);export{yt as default};
