(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4b0d1d89"],{2808:function(t,e,n){"use strict";n("84d8")},"4f6e":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("win-md",{staticClass:"stock-detail",attrs:{title:"上传调拨手续",width:"800px",loading:t.loading},on:{close:t.close}},[n("upload",{ref:"uploadRef",attrs:{values:t.fileList,settings:t.uploadSettings},on:{"on-change":t.uploadChange}}),t._v(" "),n("el-button",{staticStyle:{float:"right","margin-right":"50px","margin-top":"20px"},attrs:{name:"上传调拨手续",site:"form",type:"primary",size:"mini"},on:{click:function(e){return t.allocationProcedures()}}},[t._v("\n 上传调拨手续\n ")])],1)},o=[],a=n("f76d"),i=n("6f7e"),c=n("dee4"),u=n("c82c"),s=n.n(u),l=(n("0808"),n("dcec")),f=n("decf"),d=n("a083"),g=null,p={computed:{de:function(){return l["a"]}},components:{winMd:a["a"],upload:f["a"]},props:{setting:{type:Object,default:function(){}}},data:function(){return{procureDoc:"",uploadSettings:{title:"上传",max:20,num:2,tip:"",uploadUrl:Object(c["d"])(),multiple:!0,disabled:!1},loading:!0,fileList:[],detail:{baseCategoryName:"",businessFormCode:"",goodsTemplateName:"",procureDoc:"",agencyId:"",agencyName:"",states:"",createName:"",time:"",procureGoods:[{},{}],fileKey:Math.random()}}},filters:{formatTime:function(t){return t?i["LongToDateTime"](t):"-"},formatPrice:function(t){return t/100}},created:function(){this.loading=!1,this.fileList=[]},methods:{initPreviewImg:function(){null!=g&&g.destroy();var t=document.querySelector("#uploadPreviewImages");g=new s.a(t,{})},handlePreview:function(t){if(!this.checkImg(t.name))return!1;for(var e=0,n=0;n<this.fileList.length;n++){var r=this.fileList[n];if(this.checkImg(r.name)){if(t.id==r.id)break;e++}}g.view(e)},checkImg:function(t){var e=t.substring(t.lastIndexOf("."),t.length),n=[".jpg",".jpeg",".png",".bmp"];return!(n.indexOf(e)<0)},getUrl:function(t){return"http://"==t.substr(0,7).toLowerCase()||"https://"==t.substr(0,8).toLowerCase()?t:Object(c["c"])()+t},close:function(){this.$emit("close")},uploadChange:function(){var t=this.$refs.uploadRef.fileList,e=JSON.stringify(t);console.log(e),this.procureDoc=e;var n=this.setting.id;console.log(n)},allocationProcedures:function(){var t=this,e=this.setting.id,n=this.procureDoc;null!=e&&""!==n?Object(d["f"])({idStr:e,procureDoc:n,type:"0"}).then((function(e){t.loading=!1,t.$message.success("保存成功!"),t.close(),t.$emit("search")})).catch((function(e){t.loading=!1,console.log("edit err",e),t.$message.error("保存失败")})):this.$message.error("请上传图片!")}}},m=p,h=(n("2808"),n("2877")),b=Object(h["a"])(m,r,o,!1,null,"1bcecb62",null);e["default"]=b.exports},"6f7e":function(t,e,n){"use strict";function r(t){if(null==t||void 0==t||""==t||"null"==t||"undefined"==t)return!0;var e=t.toString().replace(/\s/g,"").replace(/-/g,"").replace(/:/g,"");return e}function o(t){return("00"+t).substr(t.length)}function a(t){if(null==t||void 0==t||""==t||"null"==t||"undefined"==t)return!0;var e=t.toString(),n=e.slice(0,4),r=e.slice(4,6),o=e.slice(6,8),a=e.slice(8,10),i=e.slice(10,12),c=e.slice(12,14),u=n+"-"+r+"-"+o+" "+a+":"+i+":"+c;return u}function i(t){if(null==t||void 0==t||""==t||"null"==t||"undefined"==t)return!0;var e=t.toString(),n=e.slice(0,4),r=e.slice(4,6),o=e.slice(6,8),a=n+"-"+r+"-"+o;return a}function c(t,e){try{t instanceof Date||(t=new Date(t)),void 0!=e&&""!=e||(e="yyyy-MM-dd hh:mm:ss"),/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var n={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(var r in n)if(new RegExp("(".concat(r,")")).test(e)){var a=n[r]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?a:o(a))}return e}catch(i){return"-"}}function u(){var t=new Date,e=t.getFullYear(),n=(t.getMonth()+1).toString().padStart(2,"0"),r=t.getDate().toString().padStart(2,"0"),o=t.getHours().toString().padStart(2,"0"),a=t.getMinutes().toString().padStart(2,"0"),i=t.getSeconds().toString().padStart(2,"0");return"".concat(e,"-").concat(n,"-").concat(r," ").concat(o,":").concat(a,":").concat(i)}function s(){var t=new Date,e=t.getFullYear(),n=(t.getMonth()+1).toString().padStart(2,"0"),r=t.getDate().toString().padStart(2,"0");return"".concat(e,"-").concat(n,"-").concat(r)}function l(t){if(t){t instanceof Date||(t=new Date(t.replace(/-/g,"/")));var e=t.getTime(),n=6e4,r=60*n,o=24*r,a=7*o,i=30*o,c=(new Date).getTime(),u=c-e;if(!(u<0)){var s=u/n,l=u/r,f=u/o,d=u/a,g=u/i,p="";if(g>=1&&g<=3)p=" "+parseInt(g)+"月前";else if(d>=1&&d<=3)p=" "+parseInt(d)+"周前";else if(f>=1&&f<=6)p=" "+parseInt(f)+"天前";else if(l>=1&&l<=23)p=" "+parseInt(l)+"小时前";else if(s>=1&&s<=59)p=" "+parseInt(s)+"分钟前";else if(u>=0&&u<=n)p="刚刚";else{var m=new Date;m.setTime(e);var h=m.getFullYear(),b=m.getMonth()+1<10?"0"+(m.getMonth()+1):m.getMonth()+1,v=m.getDate()<10?"0"+m.getDate():m.getDate();m.getHours()<10?m.getHours():m.getHours(),m.getMinutes()<10?m.getMinutes():m.getMinutes(),m.getSeconds()<10?m.getSeconds():m.getSeconds();p=h+"-"+b+"-"+v}return p}}}n.r(e),n.d(e,"DateToLong",(function(){return r})),n.d(e,"LongToDateTime",(function(){return a})),n.d(e,"LongToDate",(function(){return i})),n.d(e,"formatDate",(function(){return c})),n.d(e,"formattedDate",(function(){return u})),n.d(e,"formattedDateDuan",(function(){return s})),n.d(e,"timeago",(function(){return l}))},"84d8":function(t,e,n){},a083:function(t,e,n){"use strict";n.d(e,"d",(function(){return o})),n.d(e,"f",(function(){return a})),n.d(e,"g",(function(){return i})),n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return u})),n.d(e,"e",(function(){return s})),n.d(e,"h",(function(){return l})),n.d(e,"c",(function(){return f})),n.d(e,"i",(function(){return d})),n.d(e,"k",(function(){return g})),n.d(e,"j",(function(){return p}));var r=n("b775");function o(t){return Object(r["a"])({url:"/pc/l/wh/form/transfer/add",method:"post",data:t})}function a(t){return Object(r["a"])({url:"/pc/l/wh/form/transfer/import",method:"post",data:t})}function i(t){return Object(r["a"])({url:"/pc/l/wh/form/transfer/list",method:"get",params:t})}function c(t){return Object(r["a"])({url:"/pc/fin/sys/tenant/get/parent/tenant",method:"get",params:t})}function u(t){return Object(r["a"])({url:"/pc/base/goods/template/query/warehouse/goods",method:"get",params:t})}function s(t){return Object(r["a"])({url:"/pc/l/wh/form/transfer/detail",method:"get",params:t})}function l(t){return Object(r["a"])({url:"/pc/l/wh/form/transfer/output",method:"post",params:t})}function f(t){return Object(r["a"])({url:"/pc/l/wh/form/transfer/income",method:"post",params:t})}function d(t){return Object(r["a"])({url:"/pc/l/wh/form/transfer/updStatus",method:"post",params:t})}function g(t){return Object(r["a"])({url:"/pc/l/wh/form/transfer/use/record",method:"get",params:t})}function p(t){return Object(r["a"])({url:"/pc/l/wh/form/transfer/useInfo/update",method:"POST",data:t})}}}]);
|