(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-106818c5"],{"433d":function(t,e,r){"use strict";var n=r("c559"),o={ftpUrl:n["a"].ftpUrl,apiBaseURL:n["a"].apiBaseURL};e["a"]=o},5234:function(t,e,r){"use strict";r("e2f2")},"6ec5":function(t,e,r){"use strict";r.d(e,"l",(function(){return a})),r.d(e,"a",(function(){return s})),r.d(e,"g",(function(){return i})),r.d(e,"c",(function(){return u})),r.d(e,"j",(function(){return c})),r.d(e,"f",(function(){return l})),r.d(e,"d",(function(){return d})),r.d(e,"e",(function(){return f})),r.d(e,"p",(function(){return p})),r.d(e,"n",(function(){return m})),r.d(e,"m",(function(){return h})),r.d(e,"k",(function(){return g})),r.d(e,"s",(function(){return y})),r.d(e,"r",(function(){return b})),r.d(e,"q",(function(){return v})),r.d(e,"o",(function(){return w})),r.d(e,"b",(function(){return O})),r.d(e,"i",(function(){return I})),r.d(e,"h",(function(){return j}));var n=r("b775"),o=r("433d");function a(t){return n["a"].get(o["a"].apiBaseURL+"/pc/fin/sys/tenant/select/tree_fin_tenant",{params:t})}function s(t){return Object(n["a"])({url:"/pc/base/category/add",method:"post",data:t})}function i(t){return Object(n["a"])({url:"/pc/base/category/edit",method:"post",data:t})}function u(t){return Object(n["a"])({url:"/pc/base/warehouse/add",method:"post",data:t})}function c(t){return Object(n["a"])({url:"/pc/base/warehouse/edit",method:"post",data:t})}function l(t){return Object(n["a"])({url:"/pc/base/warehouse/del",method:"delete",data:t})}function d(){return Object(n["a"])({url:"/pc/base/goods/template/select/classificationCode",method:"get"})}function f(t){return Object(n["a"])({url:"/pc/base/category/del",method:"delete",data:t})}function p(t){return Object(n["a"])({url:"/pc/base/warehouse/select/tenant_warehouse",method:"get",params:t})}function m(t){return Object(n["a"])({url:"/pc/base/goods/template/query/goodsTemplate",method:"get",params:t})}function h(t){return Object(n["a"])({url:"/pc/base/goods/models/query/goodsModel",method:"get",params:t})}function g(t){return n["a"].get(o["a"].apiBaseURL+"/pc/base/category/select/tree",{params:t})}function y(t){return Object(n["a"])({url:"/pc/base/warehouse/select/number",method:"get",params:t})}function b(t){return Object(n["a"])({url:"/pc/base/warehouse/select/in/warehouse/num",method:"get",params:t})}function v(t){return Object(n["a"])({url:"/pc/fin/sys/tenant/user/query/user",method:"get",params:t})}function w(t){return Object(n["a"])({url:"/pc/base/goods/models/queryGoodsModelInfo",method:"get",params:t})}function O(t){return Object(n["a"])({url:"/pc/fin/sys/tenant/add",method:"post",data:t})}function I(t){return Object(n["a"])({url:"/pc/fin/sys/tenant/edit",method:"post",data:t})}function j(t){return Object(n["a"])({url:"/pc/fin/sys/tenant/editState",method:"post",data:t})}},"6f7e":function(t,e,r){"use strict";function n(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(),r=e.slice(0,4),n=e.slice(4,6),o=e.slice(6,8),a=e.slice(8,10),s=e.slice(10,12),i=e.slice(12,14),u=r+"-"+n+"-"+o+" "+a+":"+s+":"+i;return u}function s(t){if(null==t||void 0==t||""==t||"null"==t||"undefined"==t)return!0;var e=t.toString(),r=e.slice(0,4),n=e.slice(4,6),o=e.slice(6,8),a=r+"-"+n+"-"+o;return a}function i(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 r={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(var n in r)if(new RegExp("(".concat(n,")")).test(e)){var a=r[n]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?a:o(a))}return e}catch(s){return"-"}}function u(){var t=new Date,e=t.getFullYear(),r=(t.getMonth()+1).toString().padStart(2,"0"),n=t.getDate().toString().padStart(2,"0"),o=t.getHours().toString().padStart(2,"0"),a=t.getMinutes().toString().padStart(2,"0"),s=t.getSeconds().toString().padStart(2,"0");return"".concat(e,"-").concat(r,"-").concat(n," ").concat(o,":").concat(a,":").concat(s)}function c(){var t=new Date,e=t.getFullYear(),r=(t.getMonth()+1).toString().padStart(2,"0"),n=t.getDate().toString().padStart(2,"0");return"".concat(e,"-").concat(r,"-").concat(n)}function l(t){if(t){t instanceof Date||(t=new Date(t.replace(/-/g,"/")));var e=t.getTime(),r=6e4,n=60*r,o=24*n,a=7*o,s=30*o,i=(new Date).getTime(),u=i-e;if(!(u<0)){var c=u/r,l=u/n,d=u/o,f=u/a,p=u/s,m="";if(p>=1&&p<=3)m=" "+parseInt(p)+"月前";else if(f>=1&&f<=3)m=" "+parseInt(f)+"周前";else if(d>=1&&d<=6)m=" "+parseInt(d)+"天前";else if(l>=1&&l<=23)m=" "+parseInt(l)+"小时前";else if(c>=1&&c<=59)m=" "+parseInt(c)+"分钟前";else if(u>=0&&u<=r)m="刚刚";else{var h=new Date;h.setTime(e);var g=h.getFullYear(),y=h.getMonth()+1<10?"0"+(h.getMonth()+1):h.getMonth()+1,b=h.getDate()<10?"0"+h.getDate():h.getDate();h.getHours()<10?h.getHours():h.getHours(),h.getMinutes()<10?h.getMinutes():h.getMinutes(),h.getSeconds()<10?h.getSeconds():h.getSeconds();m=g+"-"+y+"-"+b}return m}}}r.r(e),r.d(e,"DateToLong",(function(){return n})),r.d(e,"LongToDateTime",(function(){return a})),r.d(e,"LongToDate",(function(){return s})),r.d(e,"formatDate",(function(){return i})),r.d(e,"formattedDate",(function(){return u})),r.d(e,"formattedDateDuan",(function(){return c})),r.d(e,"timeago",(function(){return l}))},"9dae":function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("win-md",{staticClass:"stock-edit",attrs:{title:"调拨申请",width:"800px"},on:{close:t.close}},[r("el-form",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"ruleForm",staticClass:"form",attrs:{model:t.formData,rules:t.rules,"label-width":"120px"}},[r("div",{staticClass:"main-w"},[r("el-row",{staticClass:"headerHeight",attrs:{gutter:24}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"调拨机构",prop:"outAgencyId"}},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择"},model:{value:t.formData.outAgencyId,callback:function(e){t.$set(t.formData,"outAgencyId",e)},expression:"formData.outAgencyId"}},t._l(t.agencyOptions,(function(t){return r("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1)],1),t._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"调拨时间",clearable:"",prop:"createTime"}},[r("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"datetime",clearable:"",value:"yyyy-MM-dd HH:mm:ss","value-format":"yyyyMMddHHmmss",placeholder:"请选择日期"},model:{value:t.formData.createTime,callback:function(e){t.$set(t.formData,"createTime",e)},expression:"formData.createTime"}})],1)],1)],1),t._v(" "),r("el-row",{staticClass:"headerHeight",attrs:{gutter:24}},[r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"调拨手续",prop:"procureDoc"}},[r("upload",{ref:"uploadRef",attrs:{settings:t.uploadSettings},on:{"on-change":t.uploadChange}})],1)],1)],1),t._v(" "),t._l(t.formData.transferGoods,(function(e,n){return r("div",{key:n,staticClass:"goods-card"},[r("el-row",{attrs:{gutter:24}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"物品分类",prop:"transferGoods."+n+".baseCategoryId",rules:{required:!0,message:"请选择物品分类",trigger:"change"}}},[r("el-cascader",{staticStyle:{width:"100%"},attrs:{options:t.categoryOptions,props:{value:"id",emitPath:!1},"show-all-levels":!1,filterable:"",clearable:""},on:{change:function(e){return t.categoryChange(e,n)}},model:{value:e.baseCategoryId,callback:function(r){t.$set(e,"baseCategoryId",r)},expression:"goodsItem.baseCategoryId"}})],1)],1),t._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"物品名称",prop:"transferGoods."+n+".baseGoodsTemplateId",rules:t.rules.baseGoodsTemplateId}},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.baseCategoryId?"请选择物品":"请先选择物品分类",filterable:"",clearable:"",disabled:!e.baseCategoryId},on:{change:function(e){return t.goodsTemplateChange(e,n)}},model:{value:e.baseGoodsTemplateId,callback:function(r){t.$set(e,"baseGoodsTemplateId",r)},expression:"goodsItem.baseGoodsTemplateId"}},t._l(e.goodsOptions,(function(t){return r("el-option",{key:t.id,attrs:{label:t.goodsName,value:t.id}})})),1)],1)],1)],1),t._v(" "),r("el-row",{attrs:{gutter:24}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"规格型号",prop:"transferGoods["+n+"].modelsIds",rules:{required:!0,message:"请选择",trigger:"change"}}},[r("el-select",{staticStyle:{width:"100%"},attrs:{multiple:"",clearable:"",placeholder:e.baseGoodsTemplateId?"请选择规格型号":"请先选择物品名称",disabled:!e.baseGoodsTemplateId},on:{change:function(e){return t.modelChange(e,n)},"remove-tag":function(e){return t.modelRemoveTag(e,n)},clear:function(e){return t.modelRemoveTag(-1,n)}},model:{value:e.modelsIds,callback:function(r){t.$set(e,"modelsIds",r)},expression:"goodsItem.modelsIds"}},t._l(e.modelsOptions,(function(t){return r("el-option",{key:t.id,attrs:{label:t.modelName,value:t.id}})})),1)],1)],1)],1),t._v(" "),r("el-table",{attrs:{data:e.models,stripe:!0}},[r("el-table-column",{attrs:{prop:"baseGoodsModelsId",label:"规格型号",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.getGoodsModelsName(e.row.baseGoodsModelsId))+"\n ")]}}],null,!0)}),t._v(" "),r("el-table-column",{attrs:{label:"单位",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.unit)+"\n ")]}}],null,!0)}),t._v(" "),r("el-table-column",{attrs:{prop:"price",label:"剩余库存",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.worehouseCount)+"\n ")]}}],null,!0)}),t._v(" "),r("el-table-column",{attrs:{prop:"counts",label:"申请数量",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-form-item",{staticStyle:{"margin-bottom":"0"},attrs:{"label-width":"0",prop:"transferGoods["+n+"].models["+e.$index+"].counts",rules:t.rules.counts}},[r("el-input",{attrs:{placeholder:"请输入"},on:{change:function(r){return t.countsChange(r,n,e.$index)}},model:{value:e.row.counts,callback:function(r){t.$set(e.row,"counts",t._n(r))},expression:"scope.row.counts"}})],1)]}}],null,!0)})],1),t._v(" "),r("div",{staticClass:"btn-group"},[t.formData.transferGoods.length>1?r("el-button",{attrs:{name:"移除",type:"danger",plain:"",size:"mini"},on:{click:function(e){return t.removeGoods(n)}}},[t._v("移除")]):t._e(),t._v(" "),t.formData.transferGoods.length-1==n?r("el-button",{attrs:{name:"新增物品",type:"primary",plain:"",size:"mini"},on:{click:t.addGoods}},[t._v("新增物品")]):t._e()],1)],1)}))],2)]),t._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer",align:"center"},slot:"footer"},[r("my-button",{attrs:{name:"取消",site:"form"},on:{click:t.close}}),t._v(" "),r("my-button",{attrs:{name:"保存",site:"form"},on:{click:t.handleSubmit}})],1)],1)},o=[],a=r("a083"),s=r("6ec5"),i=r("f6e8"),u=r("f76d"),c=r("decf"),l=r("dee4"),d=r("2f62"),f=r("6f7e");function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function m(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=y(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,i=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){i=!0,a=t},f:function(){try{s||null==r.return||r.return()}finally{if(i)throw a}}}}function h(t){return v(t)||b(t)||y(t)||g()}function g(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function y(t,e){if(t){if("string"==typeof t)return w(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(t,e):void 0}}function b(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function v(t){if(Array.isArray(t))return w(t)}function w(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=0;--a){var s=this.tryEntries[a],i=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var u=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(u&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:C(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function I(t,e,r,n,o,a,s){try{var i=t[a](s),u=i.value}catch(t){return void r(t)}i.done?e(u):Promise.resolve(u).then(n,o)}function j(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function s(t){I(a,n,o,s,i,"next",t)}function i(t){I(a,n,o,s,i,"throw",t)}s(void 0)}))}}function D(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function S(t){for(var e=1;eo&&(this.$message.warning("数量超过现有库存"),n.counts=o)},handleSubmit:function(){var t=this;this.$refs["ruleForm"].validate((function(e){if(e){if(t.loading)return;t.loading=!0,Object(a["d"])(t.formData).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("保存失败")}))}else t.$message.error("校验未通过,请检查。")}))},close:function(){this.$emit("close")}}},k=_,E=(r("5234"),r("2877")),M=Object(E["a"])(k,n,o,!1,null,"3881f82a",null);e["default"]=M.exports},a083:function(t,e,r){"use strict";r.d(e,"d",(function(){return o})),r.d(e,"f",(function(){return a})),r.d(e,"g",(function(){return s})),r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return u})),r.d(e,"e",(function(){return c})),r.d(e,"h",(function(){return l})),r.d(e,"c",(function(){return d})),r.d(e,"i",(function(){return f})),r.d(e,"k",(function(){return p})),r.d(e,"j",(function(){return m}));var n=r("b775");function o(t){return Object(n["a"])({url:"/pc/l/wh/form/transfer/add",method:"post",data:t})}function a(t){return Object(n["a"])({url:"/pc/l/wh/form/transfer/import",method:"post",data:t})}function s(t){return Object(n["a"])({url:"/pc/l/wh/form/transfer/list",method:"get",params:t})}function i(t){return Object(n["a"])({url:"/pc/fin/sys/tenant/get/parent/tenant",method:"get",params:t})}function u(t){return Object(n["a"])({url:"/pc/base/goods/template/query/warehouse/goods",method:"get",params:t})}function c(t){return Object(n["a"])({url:"/pc/l/wh/form/transfer/detail",method:"get",params:t})}function l(t){return Object(n["a"])({url:"/pc/l/wh/form/transfer/output",method:"post",params:t})}function d(t){return Object(n["a"])({url:"/pc/l/wh/form/transfer/income",method:"post",params:t})}function f(t){return Object(n["a"])({url:"/pc/l/wh/form/transfer/updStatus",method:"post",params:t})}function p(t){return Object(n["a"])({url:"/pc/l/wh/form/transfer/use/record",method:"get",params:t})}function m(t){return Object(n["a"])({url:"/pc/l/wh/form/transfer/useInfo/update",method:"POST",data:t})}},e2f2:function(t,e,r){}}]);