chunk-7aab803c.43743493.js 9.4 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7aab803c","chunk-2d0df437"],{"88bc":function(e,t,a){(function(t){var a=1/0,r=9007199254740991,l="[object Arguments]",n="[object Function]",i="[object GeneratorFunction]",o="[object Symbol]",c="object"==typeof t&&t&&t.Object===Object&&t,s="object"==typeof self&&self&&self.Object===Object&&self,u=c||s||Function("return this")();function d(e,t,a){switch(a.length){case 0:return e.call(t);case 1:return e.call(t,a[0]);case 2:return e.call(t,a[0],a[1]);case 3:return e.call(t,a[0],a[1],a[2])}return e.apply(t,a)}function b(e,t){var a=-1,r=e?e.length:0,l=Array(r);while(++a<r)l[a]=t(e[a],a,e);return l}function f(e,t){var a=-1,r=t.length,l=e.length;while(++a<r)e[l+a]=t[a];return e}var p=Object.prototype,h=p.hasOwnProperty,m=p.toString,g=u.Symbol,v=p.propertyIsEnumerable,y=g?g.isConcatSpreadable:void 0,w=Math.max;function O(e,t,a,r,l){var n=-1,i=e.length;a||(a=D),l||(l=[]);while(++n<i){var o=e[n];t>0&&a(o)?t>1?O(o,t-1,a,r,l):f(l,o):r||(l[l.length]=o)}return l}function j(e,t){return e=Object(e),C(e,t,(function(t,a){return a in e}))}function C(e,t,a){var r=-1,l=t.length,n={};while(++r<l){var i=t[r],o=e[i];a(o,i)&&(n[i]=o)}return n}function k(e,t){return t=w(void 0===t?e.length-1:t,0),function(){var a=arguments,r=-1,l=w(a.length-t,0),n=Array(l);while(++r<l)n[r]=a[t+r];r=-1;var i=Array(t+1);while(++r<t)i[r]=a[r];return i[t]=n,d(e,this,i)}}function D(e){return x(e)||S(e)||!!(y&&e&&e[y])}function T(e){if("string"==typeof e||P(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}function S(e){return M(e)&&h.call(e,"callee")&&(!v.call(e,"callee")||m.call(e)==l)}var x=Array.isArray;function $(e){return null!=e&&A(e.length)&&!L(e)}function M(e){return q(e)&&$(e)}function L(e){var t=F(e)?m.call(e):"";return t==n||t==i}function A(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function F(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function q(e){return!!e&&"object"==typeof e}function P(e){return"symbol"==typeof e||q(e)&&m.call(e)==o}var V=k((function(e,t){return null==e?{}:j(e,b(O(t,1),T))}));e.exports=V}).call(this,a("c8ba"))},b8ad3:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:1200,visible:e.visible,maskClosable:!1,confirmLoading:e.confirmLoading},on:{ok:e.handleOk,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-row",{staticClass:"form-row",attrs:{gutter:0}},[t("a-col",{attrs:{lg:8}},[t("a-form-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"订单号"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["orderCode",{rules:[{required:!0,message:"请输入订单号!"}]}],expression:"['orderCode', {rules: [{ required: true, message: '请输入订单号!' }]}]"}],attrs:{placeholder:"请输入订单号"}})],1)],1),t("a-col",{attrs:{lg:8}},[t("a-form-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"订单类型"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["ctype",{}],expression:"['ctype',{}]"}],attrs:{placeholder:"请选择订单类型"}},[t("a-select-option",{attrs:{value:"1"}},[e._v("国内订单")]),t("a-select-option",{attrs:{value:"2"}},[e._v("国际订单")])],1)],1)],1),t("a-col",{attrs:{lg:8}},[t("a-form-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"订单日期"}},[t("a-date-picker",{directives:[{name:"decorator",rawName:"v-decorator",value:["orderDate",{}],expression:"[ 'orderDate',{}]"}],staticStyle:{width:"100%"},attrs:{showTime:"",format:"YYYY-MM-DD HH:mm:ss"}})],1)],1)],1),t("a-row",{staticClass:"form-row",attrs:{gutter:0}},[t("a-col",{attrs:{lg:8}},[t("a-form-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"订单金额"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["orderMoney",{}],expression:"[ 'orderMoney', {}]"}],staticStyle:{width:"100%"},attrs:{placeholder:"请输入订单金额"}})],1)],1),t("a-col",{attrs:{lg:8}},[t("a-form-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"订单备注"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["content",{}],expression:"['content', {}]"}],attrs:{placeholder:"请输入订单备注"}})],1)],1)],1)],1),t("a-tabs",{on:{change:e.handleChangeTabs},model:{value:e.activeKey,callback:function(t){e.activeKey=t},expression:"activeKey"}},[t("a-tab-pane",{key:"1",attrs:{tab:"客户信息",forceRender:!0}},[t("j-editable-table",{ref:"editableTable1",attrs:{loading:e.table1.loading,columns:e.table1.columns,dataSource:e.table1.dataSource,maxHeight:300,rowNumber:!0,rowSelection:!0,actionButton:!0}})],1),t("a-tab-pane",{key:"2",attrs:{tab:"机票信息",forceRender:!0}},[t("j-editable-table",{ref:"editableTable2",attrs:{loading:e.table2.loading,columns:e.table2.columns,dataSource:e.table2.dataSource,maxHeight:300,rowNumber:!0,rowSelection:!0,actionButton:!0}})],1)],1)],1)],1)},l=[],n=a("7550"),i=a("e2e0"),o=a("0fea"),c=a("2dab"),s=a("88bc"),u=a.n(s),d=a("c1df"),b=a.n(d);function f(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function p(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?f(Object(a),!0).forEach((function(t){h(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):f(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function h(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var m={name:"JeecgOrderModalForJEditableTable",components:{JDate:c["default"],JEditableTable:n["default"]},data:function(){return{title:"操作",visible:!1,form:this.$form.createForm(this),confirmLoading:!1,model:{},labelCol:{xs:{span:24},sm:{span:6}},wrapperCol:{xs:{span:24},sm:{span:18}},activeKey:"1",table1:{loading:!1,dataSource:[],columns:[{title:"客户名",key:"name",width:"24%",type:i["a"].input,defaultValue:"",placeholder:"请输入${title}",validateRules:[{required:!0,message:"${title}不能为空"}]},{title:"性别",key:"sex",width:"18%",type:i["a"].select,options:[{title:"男",value:"1"},{title:"女",value:"2"}],defaultValue:"",placeholder:"请选择${title}"},{title:"身份证号",key:"idcard",width:"24%",type:i["a"].input,defaultValue:"",placeholder:"请输入${title}",validateRules:[{pattern:"^\\d{6}(18|19|20)?\\d{2}(0[1-9]|1[012])(0[1-9]|[12]\\d|3[01])\\d{3}(\\d|[xX])$",message:"${title}格式不正确"}]},{title:"手机号",key:"telphone",width:"24%",type:i["a"].input,defaultValue:"",placeholder:"请输入${title}",validateRules:[{pattern:"^1(3|4|5|7|8)\\d{9}$",message:"${title}格式不正确"}]}]},table2:{loading:!1,dataSource:[],columns:[{title:"航班号",key:"ticketCode",width:"40%",type:i["a"].input,defaultValue:"",placeholder:"请输入${title}",validateRules:[{required:!0,message:"${title}不能为空"}]},{title:"航班时间",key:"tickectDate",width:"30%",type:i["a"].date,placeholder:"请选择${title}",defaultValue:""}]},url:{add:"/test/jeecgOrderMain/add",edit:"/test/jeecgOrderMain/edit",orderCustomerList:"/test/jeecgOrderMain/queryOrderCustomerListByMainId",orderTicketList:"/test/jeecgOrderMain/queryOrderTicketListByMainId"}}},created:function(){},methods:{getAllTable:function(){return Promise.all([Object(i["c"])(this,"editableTable1"),Object(i["c"])(this,"editableTable2")])},add:function(){this.getAllTable().then((function(e){e[0].add(),e[1].add()})),this.edit({})},edit:function(e){var t=this;if(this.visible=!0,this.activeKey="1",this.form.resetFields(),this.model=Object.assign({},e),this.$nextTick((function(){t.form.setFieldsValue(u()(t.model,"orderCode","ctype","orderMoney","content")),t.form.setFieldsValue({orderDate:t.model.orderDate?b()(t.model.orderDate):null})})),this.model.id){var a={id:this.model.id};this.requestTableData(this.url.orderCustomerList,a,this.table1),this.requestTableData(this.url.orderTicketList,a,this.table2)}},close:function(){this.visible=!1,this.getAllTable().then((function(e){e[0].initialize(),e[1].initialize()})),this.$emit("close")},requestTableData:function(e,t,a){a.loading=!0,Object(o["c"])(e,t).then((function(e){a.dataSource=e.result||[]})).finally((function(){a.loading=!1}))},handleOk:function(){this.validateFields()},handleCancel:function(){this.close()},handleChangeTabs:function(e){Object(i["c"])(this,"editableTable".concat(e)).then((function(e){e.resetScrollTop()}))},validateFields:function(){var e=this;this.getAllTable().then((function(t){return Object(i["d"])(e.form,t)})).then((function(t){var a=e.classifyIntoFormData(t);return e.requestAddOrEdit(a)})).catch((function(t){t.error===i["b"]&&(e.activeKey=null==t.index?e.activeKey:(t.index+1).toString())}))},classifyIntoFormData:function(e){var t=Object.assign(this.model,e.formValue);return t.orderDate=t.orderDate?t.orderDate.format("YYYY-MM-DD HH:mm:ss"):null,p(p({},t),{},{jeecgOrderCustomerList:e.tablesValue[0].values,jeecgOrderTicketList:e.tablesValue[1].values})},requestAddOrEdit:function(e){var t=this,a=this.url.add,r="post";this.model.id&&(a=this.url.edit,r="put"),this.confirmLoading=!0,Object(o["i"])(a,e,r).then((function(e){e.success?(t.$message.success(e.message),t.$emit("ok"),t.close()):t.$message.warning(e.message)})).finally((function(){t.confirmLoading=!1}))}}},g=m,v=a("2877"),y=Object(v["a"])(g,r,l,!1,null,"69b37a74",null);t["default"]=y.exports}}]);