chunk-c8a4e584.4db4466a.js 12 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c8a4e584"],{"000e":function(e,t,a){"use strict";var r=a("da63"),i=a.n(r);i.a},da63:function(e,t,a){},fce8:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"in-park-order"},[a("div",{staticClass:"form"},[a("div",{staticClass:"form-item",staticStyle:{display:"flex",padding:"15px 0px"},on:{click:function(t){return e.openParkSelect("aboultPark")}}},[e._m(0),a("div",[e._v(e._s(e.form.aboultPark?e.form.aboultPark:"请选择"))])]),a("div",{staticClass:"form-item width30 ws"},[a("div",{staticStyle:{padding:"15px 0px",display:"flex"}},[e._m(1),a("div",{staticStyle:{display:"flex",width:"70%"}},[a("search",{attrs:{ifshowadvice:!0,value:e.searchValue},on:{clear:e.clearValue,focus:e.showAdvice,getadvice:e.getAdvice,input:e.getSearchValue}}),a("div",{staticStyle:{color:"#2871ff"},on:{click:function(t){return e.addSelectedList()}}},[e._v("添加")])],1)]),a("van-row",e._l(e.getGoodsSelectedList,function(t,r){return a("van-col",{attrs:{span:"12"}},[a("div",{staticStyle:{width:"100%",display:"flex",margin:"5px 0","justify-content":"space-between"}},[a("div",{staticClass:"chaochuyincang",staticStyle:{width:"80%"}},[e._v("\n "+e._s(t.qymc)+"\n ")]),a("van-icon",{attrs:{name:"cross"},on:{click:function(t){return e.deleteGoodsSelectedList(r)}}})],1)])}),1)],1),a("div",{staticClass:"form-item",staticStyle:{display:"flex",padding:"15px 0px"}},[e._m(2),a("input",{directives:[{name:"model",rawName:"v-model",value:e.form.fromCompanyName,expression:"form.fromCompanyName"}],attrs:{placeholder:"请输入",type:"text"},domProps:{value:e.form.fromCompanyName},on:{input:function(t){t.target.composing||e.$set(e.form,"fromCompanyName",t.target.value)}}})]),a("div",{staticClass:"form-item",staticStyle:{display:"flex",padding:"15px 0px"}},[e._m(3),a("input",{directives:[{name:"model",rawName:"v-model",value:e.form.driverName,expression:"form.driverName"}],attrs:{placeholder:"请输入",type:"text"},domProps:{value:e.form.driverName},on:{input:function(t){t.target.composing||e.$set(e.form,"driverName",t.target.value)}}})]),a("div",{staticClass:"form-item",staticStyle:{display:"flex",padding:"15px 0px"}},[e._m(4),a("input",{directives:[{name:"model",rawName:"v-model",value:e.form.driverPhone,expression:"form.driverPhone"}],attrs:{placeholder:"请输入",type:"text"},domProps:{value:e.form.driverPhone},on:{input:function(t){t.target.composing||e.$set(e.form,"driverPhone",t.target.value)}}})]),a("div",{staticClass:"form-item",staticStyle:{display:"flex",padding:"15px 0px"}},[e._m(5),a("input",{directives:[{name:"model",rawName:"v-model",value:e.form.carNumber,expression:"form.carNumber"}],attrs:{placeholder:"请输入",type:"text"},domProps:{value:e.form.carNumber},on:{input:function(t){t.target.composing||e.$set(e.form,"carNumber",t.target.value)}}})]),a("div",{staticClass:"form-item",staticStyle:{display:"flex",padding:"15px 0px"}},[e._m(6),a("input",{directives:[{name:"model",rawName:"v-model",value:e.form.cargoWeight,expression:"form.cargoWeight"}],attrs:{placeholder:"请输入",type:"text"},domProps:{value:e.form.cargoWeight},on:{input:function(t){t.target.composing||e.$set(e.form,"cargoWeight",t.target.value)}}})]),a("div",{staticClass:"form-item",staticStyle:{display:"flex",padding:"15px 0px"},on:{click:function(t){return e.openDatePicker("inParkDate")}}},[e._m(7),a("input",{directives:[{name:"model",rawName:"v-model",value:e.form.inParkTime,expression:"form.inParkTime"}],attrs:{placeholder:"请选择",type:"text",readonly:""},domProps:{value:e.form.inParkTime},on:{input:function(t){t.target.composing||e.$set(e.form,"inParkTime",t.target.value)}}}),a("van-icon",{attrs:{name:"arrow"}})],1),a("div",{staticClass:"form-item"},[e._m(8),a("div",{staticStyle:{"margin-top":"8px"}},[a("textarea",{directives:[{name:"model",rawName:"v-model",value:e.form.cargoInfo,expression:"form.cargoInfo"}],staticStyle:{width:"100%"},attrs:{autosize:"",maxlength:500,placeholder:"请输入留言",rows:5,"show-word-limit":"",type:"textarea"},domProps:{value:e.form.cargoInfo},on:{input:function(t){t.target.composing||e.$set(e.form,"cargoInfo",t.target.value)}}})])])]),a("div",{staticClass:"btn-view"},[a("button",{staticClass:"btn btn1",on:{click:function(t){return e.goBack()}}},[e._v("关闭")]),a("button",{staticClass:"btn btn2",on:{click:function(t){return e.submitData(0)}}},[e._v("提交")])]),a("current-select",{ref:"currentSelect",attrs:{columns:e.yuanquList},on:{getAboultPark:e.getAboultPark}}),a("zhaozu-select",{ref:"zhaozuSelect"}),a("data-picker",{ref:"dataPicker",on:{getInParkTime:e.getInParkTime}})],1)},i=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"form-label width30 ws"},[a("span",{staticClass:"required"},[e._v("*")]),e._v("所属园区:\n ")])},function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"form-label width30 ws"},[a("span",{staticClass:"required"},[e._v("*")]),e._v("收货公司:\n ")])},function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"form-label width30 ws"},[a("span",{staticClass:"required"},[e._v("*")]),e._v("发货公司\n "),a("br"),e._v("\n /物流公司:\n ")])},function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"form-label width30 ws"},[a("span",{staticClass:"required"},[e._v("*")]),e._v("司机姓名\n ")])},function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"form-label width30 ws"},[a("span",{staticClass:"required"},[e._v("*")]),e._v("司机电话\n ")])},function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"form-label width30 ws"},[a("span",{staticClass:"required"},[e._v("*")]),e._v("车牌号\n ")])},function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"form-label width30 ws"},[a("span",{staticClass:"required"},[e._v("*")]),e._v("货物重量(吨)\n ")])},function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"form-label ws"},[a("span",{staticClass:"required"},[e._v("*")]),e._v("入园预约时间\n ")])},function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"form-label",staticStyle:{padding:"5px 0px"}},[a("span",{staticClass:"required"},[e._v("*")]),e._v("货物信息:\n ")])}],n=a("795b"),o=a.n(n),s=(a("28a5"),a("7514"),a("96cf"),a("3b8d")),c=a("3089"),l=a("da5e"),u=a("bc3a"),m=a.n(u),d=a("b28f"),f=a("e244"),p=a("0350"),h=a("a046"),v=a("5cab"),g={name:"in-park-order",components:{zhaozuSelect:p["a"],Form:c["Form"],Field:c["Field"],currentSelect:l["a"],search:f["a"],dataPicker:h["a"]},data:function(){return{getGoodsSelectedList:[],pattern:/\d{6}/,active:"",form:{},fileList:[],searchValue:"",yuanquList:[],inParkTime:"",id:""}},mounted:function(){this.id=this.$route.query.id,this.findYuanQuList()},methods:{goBack:function(){this.$router.go(-1)},detail:function(){var e=Object(s["a"])(regeneratorRuntime.mark(function e(){var t,a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(d["b"])(this.id);case 2:t=e.sent,console.log(this.yuanquList),this.info=t,a=this.yuanquList.find(function(e){return e.value==t.yuanquId}),this.form.yuanquId=a.value,this.form.aboultPark=a.text,this.form.cargoWeight=t.cargoWeight,this.form.cargoInfo=t.cargoInfo,this.form.driverName=t.driverName,this.form.carNumber=t.carNumber,this.form.driverPhone=t.driverPhone,this.form.fromCompanyName=t.fromCompanyName,console.log("data.toCompaniesName.split()",t.toCompaniesName.split()),this.getGoodsSelectedList=t.toCompaniesName.split(",").map(function(e){return{qymc:e}}),console.log(this.getGoodsSelectedList),this.form.inParkTime=this.$common.transDate(t.appointmentInParkTime,"yyyy-MM-dd"),console.log(this.form.toCompaniesName);case 19:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}(),submitData:function(){var e=Object(s["a"])(regeneratorRuntime.mark(function e(t){var a,r,i;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(this.form.yuanquId){e.next=2;break}return e.abrupt("return",Object(c["Toast"])("请选择所属园区"));case 2:if(0!=this.getGoodsSelectedList.length){e.next=4;break}return e.abrupt("return",Object(c["Toast"])("请添加收货公司"));case 4:if(this.form.driverName){e.next=6;break}return e.abrupt("return",Object(c["Toast"])("请填写司机姓名"));case 6:if(this.form.driverPhone){e.next=8;break}return e.abrupt("return",Object(c["Toast"])("请填写司机手机号"));case 8:if(this.form.carNumber){e.next=10;break}return e.abrupt("return",Object(c["Toast"])("请填写车牌号"));case 10:if(this.form.cargoWeight){e.next=12;break}return e.abrupt("return",Object(c["Toast"])("请填写重量"));case 12:if(this.form.cargoInfo){e.next=14;break}return e.abrupt("return",Object(c["Toast"])("请填写填写货物信息"));case 14:if(this.form.fromCompanyName){e.next=16;break}return e.abrupt("return",Object(c["Toast"])("请填写发货/物流公司"));case 16:return a=this.getGoodsSelectedList.map(function(e){return e.qymc}),r={yuanquId:this.form.yuanquId,toCompaniesName:a.join(","),fromCompanyName:this.form.fromCompanyName,appointmentInParkTime:this.form.inParkTime,cargoWeight:this.form.cargoWeight,cargoInfo:this.form.cargoInfo,driverName:this.form.driverName,driverPhone:this.form.driverPhone,carNumber:this.form.carNumber,status:t,createdBy:v["a"].currUser().id},e.next=20,Object(d["a"])(r);case 20:return i=e.sent,200==i.code&&0==t?(Object(c["Toast"])("提交成功"),this.$router.go(-1)):Object(c["Toast"])("保存成功"),e.abrupt("return");case 23:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),openDatePicker:function(e){this.$refs.dataPicker.setVisible(!0)},getInParkTime:function(e){this.form.inParkTime=e,this.$forceUpdate()},addSelectedList:function(){console.log(this.searchValue),this.searchValue&&0!=this.searchValue.length?this.getGoodsSelectedList.push({qymc:this.searchValue}):Object(c["Toast"])("请输入想要添加的收货公司")},findYuanQuList:function(){var e=Object(s["a"])(regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(d["d"])();case 2:t=e.sent,this.yuanquList=t.map(function(e){return{text:e.groupName,value:e.id}}),this.detail();case 5:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}(),deleteGoodsSelectedList:function(e){this.getGoodsSelectedList.splice(e,1)},showAdvice:function(e){console.log(e)},getAdvice:function(e){this.getGoodsSelectedList.push(e),console.log(e)},getSearchValue:function(e){this.searchValue=e},clearValue:function(){this.searchValue=""},openZhaozuType:function(){this.$refs.zhaozuSelect.setVisible(!0)},beforeDelete:function(e,t){var a=this;return a.fileList.splice(t.index,1),function(e,r){var i=r.index;a.fileList[t.index].splice(i,1)}},uploadImg:function(e){var t=this,a=new FormData;a.append("file",e.file),console.log(a.get("file"));var r={headers:{"Content-Type":"multipart/form-data","MVVM-Key":String((new Date).getTime()),xx:"anything"}};return new o.a(function(e,i){m.a.post("/industryParkApi/wx/fileController/upload",a,r).then(function(e){var a=e.data.data.substring(1,e.data.data.length);a=a.substring(0,a.length-1),console.log(t.$common.castEval(a)),t.fileUrlList.push(t.$common.castEval(a))}).catch(function(e,t){i(e,t)})})},afterRead:function(e){var t=this;e instanceof Array?e.map(function(e){t.uploadImg(e)}):this.uploadImg(e)},getAboultPark:function(e,t){console.log(e),this.form[t]=e.text,this.form.yuanquId=e.value,this.$forceUpdate()},openParkSelect:function(e){this.$refs.currentSelect.setVisible(!0,{},e)},asyncValidator:function(e){return new o.a(function(t){c["Toast"].loading("验证中..."),setTimeout(function(){c["Toast"].clear(),t(/\d{6}/.test(e))},1e3)})},validator:function(e){return/1\d{10}/.test(e)},onFailed:function(e){console.log("failed",e)}}},b=g,y=(a("000e"),a("2877")),x=Object(y["a"])(b,r,i,!1,null,null,null);t["default"]=x.exports}}]);