"use strict";(self["webpackChunkvoghion_vue_admin"]=self["webpackChunkvoghion_vue_admin"]||[]).push([[87796],{87796:function(e,t,o){o.r(t),o.d(t,{default:function(){return h}});var n=function(){var e=this,t=e._self._c;return t("div",[t("el-card",{staticClass:"box-card"},[t("div",{attrs:{slot:"header"},slot:"header"},[t("h3",[e._v("子订单与 erp token 校验")])]),t("el-form",{ref:"tokenForm",staticClass:"token-form",attrs:{model:e.tokenForm,rules:e.tokenFormRules,"label-width":"120px"}},[t("el-form-item",{attrs:{label:"子订单号",prop:"showDetailId"}},[t("el-input",{attrs:{placeholder:"请输入"},on:{change:e.handleChange,submit:e.handleNext},model:{value:e.tokenForm.showDetailId,callback:function(t){e.$set(e.tokenForm,"showDetailId",t)},expression:"tokenForm.showDetailId"}})],1),t("el-form-item",{attrs:{label:"ERP-Token",prop:"token"}},[t("el-input",{ref:"tokenInput",attrs:{placeholder:"请输入"},on:{change:e.handleChange,submit:e.handleMatchToken},model:{value:e.tokenForm.token,callback:function(t){e.$set(e.tokenForm,"token",t)},expression:"tokenForm.token"}})],1),t("el-form-item",{directives:[{name:"show",rawName:"v-show",value:e.apiResponse,expression:"apiResponse"}],attrs:{label:"匹配"}},[e.tokenResult?t("span",{staticClass:"c-success"},[e._v("是")]):t("span",{staticClass:"c-danger"},[e._v("否")])]),t("el-form-item",[t("el-button",{attrs:{type:"primary",loading:e.tokenLoading},on:{click:e.handleMatchToken}},[e._v("校验")])],1)],1)],1)],1)},s=[],a={data(){return{tokenForm:{showDetailId:"",token:""},tokenFormRules:{showDetailId:{required:!0,message:"请输入子订单号"},token:{required:!0,message:"请输入 ERP token"}},tokenLoading:!1,apiResponse:!1,tokenResult:!1}},mounted(){},methods:{handleChange(){this.apiResponse=!1},handleNext(){this.tokenForm.showDetailId&&(this.tokenForm.token?this.handleMatchToken():this.$refs.tokenInput.focus())},handleMatchToken(){this.$refs.tokenForm.validate((e=>{e&&(this.tokenLoading=!0,this.apiResponse=!1,this.$store.dispatch({type:"order/checkOrderShopTokenMatch",payload:this.tokenForm}).then((e=>{this.tokenLoading=!1,"boolean"===typeof e&&(this.apiResponse=!0,this.tokenResult=e)})))}))}}},l=a,r=o(81656),i=(0,r.A)(l,n,s,!1,null,"5063416c",null),h=i.exports}}]);