glhcp/server/public/pc/_nuxt/aaa308f.js

1 line
5.8 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[15,20],{500:function(e,t,o){var content=o(514);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,o(18).default)("cfbdabb4",content,!0,{sourceMap:!1})},513:function(e,t,o){"use strict";o(500)},514:function(e,t,o){var r=o(17)((function(i){return i[1]}));r.push([e.i,".v-upload .el-upload--picture-card[data-v-9cabb86c]{height:76px;line-height:76px;width:76px}.v-upload .el-upload-list--picture-card .el-upload-list__item[data-v-9cabb86c]{height:76px;width:76px}",""]),r.locals={},e.exports=r},515:function(e,t,o){"use strict";o.r(t);o(300),o(30);var r=o(195),n={components:{},props:{limit:{type:Number,default:1},isSlot:{type:Boolean,default:!1},autoUpload:{type:Boolean,default:!0},onChange:{type:Function,default:function(){}}},watch:{},data:function(){return{url:r.a.baseUrl}},created:function(){},computed:{},methods:{success:function(e,t,o){this.autoUpload&&(this.$message({message:"上传成功",type:"success"}),this.$emit("success",o))},remove:function(e,t){this.$emit("remove",t)},error:function(e){this.$message({message:"上传失败,请重新上传",type:"error"})},beforeAvatarUpload:function(e){var t=e.name.substring(e.name.lastIndexOf(".")+1);console.log("fdsadsf");var o="jpg"===t,r="png"===t;return o||r?o||r||"jpeg"===t:(this.$message({message:"上传文件只能是 jpg, jpeg, png格式!",type:"warning"}),!1)}}},l=(o(513),o(9)),component=Object(l.a)(n,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"v-upload"},[t("el-upload",{attrs:{"list-type":"picture-card",action:e.url+"/api/file/formimage",limit:e.limit,"on-success":e.success,"on-error":e.error,"on-remove":e.remove,"on-change":e.onChange,headers:{token:e.$store.state.token},"auto-upload":e.autoUpload,accept:"image/jpg,image/jpeg,image/png","before-upload":e.beforeAvatarUpload}},[e.isSlot?e._t("default"):t("div",[t("div",{staticClass:"muted xs"},[e._v("上传图片")])])],2)],1)}),[],!1,null,"9cabb86c",null);t.default=component.exports},521:function(e,t,o){var content=o(537);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,o(18).default)("7fecf36c",content,!0,{sourceMap:!1})},536:function(e,t,o){"use strict";o(521)},537:function(e,t,o){var r=o(17)((function(i){return i[1]}));r.push([e.i,".input-express .dialog-footer[data-v-13601821]{text-align:center}.input-express .dialog-footer .el-button[data-v-13601821]{width:160px}",""]),r.locals={},e.exports=r},548:function(e,t,o){"use strict";o.r(t);var r=o(8),n=(o(56),o(300),o(12),o(21),{components:{},data:function(){return{showDialog:!1,form:{business:"",number:"",desc:""},rules:{business:[{required:!0,message:"请输入物流公司"}],number:[{required:!0,message:"请输入快递单号"}]},fileList:[]}},props:{value:{type:Boolean,default:!1},aid:{type:[String,Number],default:-1}},methods:{submitForm:function(){var e=this;console.log(this.$refs),this.$refs.inputForm.validate(function(){var t=Object(r.a)(regeneratorRuntime.mark((function t(o){var r,data;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o){t.next=10;break}return r=[],e.fileList.forEach((function(e){r.push(e.response.data)})),data={id:e.aid,express_name:e.form.business,invoice_no:e.form.number,express_remark:e.form.desc,express_image:r.length<=0?"":r[0].base_url},t.next=6,e.$post("after_sale/express",data);case 6:1==t.sent.code&&(e.$message({message:"提交成功",type:"success"}),e.showDialog=!1,e.$emit("success")),t.next=11;break;case 10:return t.abrupt("return",!1);case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},uploadSuccess:function(e){var t=Object.assign([],e);this.fileList=t}},watch:{value:function(e){this.showDialog=e},showDialog:function(e){this.$emit("input",e)}}}),l=n,c=(o(536),o(9)),component=Object(c.a)(l,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"input-express"},[t("el-dialog",{attrs:{title:"填写快递单号",visible:e.showDialog,width:"926px"},on:{"update:visible":function(t){e.showDialog=t}}},[t("el-form",{ref:"inputForm",attrs:{inline:"","label-width":"100px",model:e.form,rules:e.rules}},[t("el-form-item",{attrs:{label:"物流公司:",prop:"business"}},[t("el-input",{attrs:{size:"small",placeholder:"请输入物流公司名称"},model:{value:e.form.business,callback:function(t){e.$set(e.form,"business",t)},expression:"form.business"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"快递单号:",prop:"number"}},[t("el-input",{attrs:{size:"small",placeholder:"请输入快递单号"},model:{value:e.form.number,callback:function(t){e.$set(e.form,"number",t)},expression:"form.number"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"备注说明:",prop:"desc"}},[t("el-input",{staticStyle:{width:"632px"},attrs:{type:"textarea",placeholder:"请输入详细内容,选填",resize:"none",rows:"5"},model:{value:e.form.desc,callback:function(t){e.$set(e.form,"desc",t)},expression:"form.desc"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"上传凭证:",prop:"upload"}},[t("div",{staticClass:"xs muted"},[e._v("请上传快递单号凭证,选填")]),e._v(" "),t("upload",{attrs:{isSlot:"","file-list":e.fileList,limit:3},on:{success:e.uploadSuccess}},[t("div",{staticClass:"column-center",staticStyle:{height:"100%"}},[t("i",{staticClass:"el-icon-camera xs",staticStyle:{"font-size":"24px"}})])])],1)],1),e._v(" "),t("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("确定")]),e._v(" "),t("el-button",{on:{click:function(t){e.showDialog=!1}}},[e._v("取消")])],1)],1)],1)}),[],!1,null,"13601821",null);t.default=component.exports;installComponents(component,{Upload:o(515).default})}}]);