cordova-11/www/js/35.js
2022-05-25 07:48:07 +08:00

1 line
6.6 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[35],{7205:function(t,a,e){"use strict";e.r(a);var i=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("PageContainer",{ref:"container",attrs:{name:"线切片退火"}},[e("template",{slot:"header"},[e("Appbar",{attrs:{options:t.batchNumList,model:t.currentBatchNum},on:{"update:model":function(a){t.currentBatchNum=a}}}),t.category.steps.length>0?e("q-tabs",{staticClass:"text-grey common-tab",attrs:{"narrow-indicator":"",align:"left","active-color":"dark","indicator-color":"primary"},model:{value:t.tab,callback:function(a){t.tab=a},expression:"tab"}},t._l(t.category.steps,(function(t,a){return e("q-tab",{key:a,attrs:{ripple:!1,label:t.stepName,name:a}})})),1):t._e()],1),e("div",{staticClass:"mt-20 common-box"},[e("common-card",{attrs:{list:t.screenList},scopedSlots:t._u([{key:"default",fn:function(a){var i=a.data;return[e("tr",[e("td",{staticClass:"label"},[t._v("客户")]),e("td",[t._v(t._s(i.customerName))]),e("td",{staticClass:"label"},[t._v("档位")]),e("td",[t._v(t._s(i.gear))]),e("td",{staticClass:"label"},[t._v("流入数量")]),e("td",[t._v(t._s(i.inflowNum))])]),e("tr",[e("td",{staticClass:"label"},[t._v("流入时间")]),e("td",[t._v(t._s(i.inflowTime))]),e("td",{staticClass:"label"},[t._v("上站过站人")]),e("td",[t._v(t._s(i.inflowUser))])])]}}])}),e("CommonBox",{staticClass:"mg-b-20",attrs:{title:"过程录入"}},[e("CommonTitle",{attrs:{color:"green",icon:"icon-a-shuju1"}}),e("div",[e("q-form",{staticClass:"q-gutter-md mg-t-20",on:{reset:t.onReset}},[e("div",{staticClass:"row"},[e("div",{staticClass:"col mg-r-20"},[e("div",{staticClass:"label",class:{disable:t.noBatchNum}},[t._v("\n 设备编号\n ")]),e("select-fill",{attrs:{model:t.form.deviceId,useInput:!0,optionValue:"id",optionLabel:"deviceNum",options:t.deviceIdList,disable:t.noBatchNum,emitValue:!0,mapOptions:!0},on:{"update:model":function(a){return t.$set(t.form,"deviceId",a)},focus:function(a){return t.getDeviceList()}}})],1),e("div",{staticClass:"col mg-r-20"},[e("div",{staticClass:"label"},[t._v("\n 流出片数\n ")]),e("q-input",{attrs:{disable:"",type:"number"},model:{value:t.form.outflowNum,callback:function(a){t.$set(t.form,"outflowNum",a)},expression:"form.outflowNum"}})],1),e("div",{staticClass:"col mg-r-20"},[e("div",{staticClass:"label"},[t._v("\n 备注\n ")]),e("q-input",{attrs:{disable:0===t.screenList.length},model:{value:t.form.remarks,callback:function(a){t.$set(t.form,"remarks",a)},expression:"form.remarks"}})],1)])]),e("div",{staticClass:"mg-b-20"}),e("FormTable",{attrs:{labels:[{name:"质量类型",width:"33%"},"片数","操作"]}},[e("template",{slot:"tbody"},t._l(t.tuihuoQualityInfoList,(function(a,i){return e("tr",[e("td",[e("select-fill",{attrs:{model:a.qualityType,useInput:!0,optionValue:"qualityType",optionLabel:"qualityType",options:t.qualityList,disable:t.noBatchNum,emitValue:!0,mapOptions:!0},on:{"update:model":function(e){return t.$set(a,"qualityType",e)},focus:function(e){t.getQualityList(),t.getQualifiedFlag(i),t.compareSelectPosition(a)}}})],1),e("td",[e("q-input",{attrs:{placeholder:"请输入",filled:"",dense:"",disable:0===t.screenList.length},model:{value:a.num,callback:function(e){t.$set(a,"num",e)},expression:"item.num"}})],1),e("td",{staticClass:"edit_btn_group"},[e("div",[e("q-icon",{staticStyle:{"font-size":"28px",color:"grey","margin-right":"28px"},attrs:{name:"app:icon-a-tubiaotj1"},on:{click:function(a){return t.addRow(t.tuihuoQualityInfoList,{qualityType:"",num:"",qualifiedFlag:"",tailPieceFlag:""})}}}),e("q-icon",{staticStyle:{"font-size":"28px",color:"grey"},attrs:{name:"app:icon-a-tubiaotjbeifen1"},on:{click:function(a){return t.delRow(t.tuihuoQualityInfoList,i)}}})],1)])])})),0)],2)],1)],1),e("CommonBtngroup",{directives:[{name:"show",rawName:"v-show",value:t.currentBatchNum,expression:"currentBatchNum"}],on:{cancel:function(a){return t.clearData()},submit:t.onSubmit}})],1)],2)},s=[],o=(e("a79d"),e("d6f4")),l=e("6e23"),n=e("2f62"),u={name:"xianqiepiantuihuo",mixins:[o["default"]],components:{FormTable:l["default"]},computed:{...Object(n["b"])(["deviceIdList","qualityList"])},data(){return{form:{deviceId:"",outflowNum:"",remarks:""},submitLoading:!1,tuihuoQualityInfoList:[{qualityType:"",num:"",qualifiedFlag:"",tailPieceFlag:""}],qualityInfoSum:0,cacheMap:{}}},watch:{tuihuoQualityInfoList:{handler(t){this.qualityInfoSum=0,this.form.outflowNum=this.$u.judgeArrObj(t),console.log(this.form.outflowNum),t.forEach((t=>{t.num&&(this.qualityInfoSum+=parseInt(t.num))}))},immediate:!0,deep:!0}},methods:{getQualifiedFlag(t){this.$nextTick((()=>{this.qualityList.forEach((a=>{console.log(a.qualityType,val.qualityType,a.qualityType===val.qualityType),a.qualityType===val.qualityType&&(this.tuihuoQualityInfoList[t].qualifiedFlag=a.qualifiedFlag,this.tuihuoQualityInfoList[t].tailPieceFlag=a.tailPieceFlag)}))}))},compareSelectPosition(t){""!==t.qualityType&&(this.cacheMap[t.qualityType]?(this.$message.warning("不能重复选择!"),t.qualityType=""):this.cacheMap[t.qualityType]=!0,this.cacheMap=this.$options.data().cacheMap,this.tuihuoQualityInfoList.map((t=>{""!==t.qualityType&&(this.cacheMap[t.qualityType]=!0)})))},getFormData(){let t={},a=[];t={...this.form},t.qualityInfo=this.tuihuoQualityInfoList,t=JSON.stringify(t),a=this.screenList.map((t=>t.prodTaskId));let e={data:t,prodTaskIds:a,processId:this.queryPadRecord.processId};return console.log(e),e},onSubmit(){let t=!0,a=this.tuihuoQualityInfoList.filter((t=>!t.qualityType||!t.num));a.length>0?(this.$message.warning("请填写完表格数据再提交!"),t=!1):t=!0,t&&(this.qualityInfoSum!==this.scanNum?(this.$message.warning("质检总片数需要与扫码后总流入总数一致!"),t=!1):t=!0,t&&(""===this.form.deviceId?(this.$message.warning("请填完设备编号再提交!"),t=!1):t=!0,t&&(this.submitLoading=!0,this.$http({url:"/padProdRecord/add",method:"post",data:this.getFormData()}).then((t=>{this.$message.success(t.message),this.clearData(),this.loadPadRecord()})).finally((()=>{this.submitLoading=!1})))))},onReset(){},beforeClearData(){this.form=this.$options.data().form,this.tuihuoQualityInfoList=this.$options.data().tuihuoQualityInfoList},addRow(t,a){t.push(a)},delRow(t,a){1===t.length?this.$message.warning("不允许删除最后一行!"):(t.splice(a,1),this.cacheMap=this.$options.data().cacheMap,t.map((t=>{""!==t.qualityType&&(this.cacheMap[t.qualityType]=!0)})))}}},r=u,c=e("2877"),m=e("429b"),d=e("7460"),p=e("0378"),h=e("27f9"),f=e("0016"),y=e("eebe"),g=e.n(y),b=Object(c["a"])(r,i,s,!1,null,"6d264e2c",null);a["default"]=b.exports;g()(b,"components",{QTabs:m["a"],QTab:d["a"],QForm:p["a"],QInput:h["a"],QIcon:f["a"]})}}]);