(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-04ce482c"],{"0bcb":function(t,e,r){"use strict";r("1aec")},"1aec":function(t,e,r){},"433d":function(t,e,r){"use strict";var n=r("c559"),o={ftpUrl:n["a"].ftpUrl,apiBaseURL:n["a"].apiBaseURL};e["a"]=o},"6ec5":function(t,e,r){"use strict";r.d(e,"l",(function(){return a})),r.d(e,"a",(function(){return i})),r.d(e,"g",(function(){return s})),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 h})),r.d(e,"m",(function(){return g})),r.d(e,"k",(function(){return m})),r.d(e,"s",(function(){return b})),r.d(e,"r",(function(){return y})),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 D}));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 i(t){return Object(n["a"])({url:"/pc/base/category/add",method:"post",data:t})}function s(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 h(t){return Object(n["a"])({url:"/pc/base/goods/template/query/goodsTemplate",method:"get",params:t})}function g(t){return Object(n["a"])({url:"/pc/base/goods/models/query/goodsModel",method:"get",params:t})}function m(t){return n["a"].get(o["a"].apiBaseURL+"/pc/base/category/select/tree",{params:t})}function b(t){return Object(n["a"])({url:"/pc/base/warehouse/select/number",method:"get",params:t})}function y(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 D(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),i=e.slice(10,12),s=e.slice(12,14),u=r+"-"+n+"-"+o+" "+a+":"+i+":"+s;return u}function i(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 s(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(i){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"),i=t.getSeconds().toString().padStart(2,"0");return"".concat(e,"-").concat(r,"-").concat(n," ").concat(o,":").concat(a,":").concat(i)}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,i=30*o,s=(new Date).getTime(),u=s-e;if(!(u<0)){var c=u/r,l=u/n,d=u/o,f=u/a,p=u/i,h="";if(p>=1&&p<=3)h=" "+parseInt(p)+"月前";else if(f>=1&&f<=3)h=" "+parseInt(f)+"周前";else if(d>=1&&d<=6)h=" "+parseInt(d)+"天前";else if(l>=1&&l<=23)h=" "+parseInt(l)+"小时前";else if(c>=1&&c<=59)h=" "+parseInt(c)+"分钟前";else if(u>=0&&u<=r)h="刚刚";else{var g=new Date;g.setTime(e);var m=g.getFullYear(),b=g.getMonth()+1<10?"0"+(g.getMonth()+1):g.getMonth()+1,y=g.getDate()<10?"0"+g.getDate():g.getDate();g.getHours()<10?g.getHours():g.getHours(),g.getMinutes()<10?g.getMinutes():g.getMinutes(),g.getSeconds()<10?g.getSeconds():g.getSeconds();h=m+"-"+b+"-"+y}return h}}}r.r(e),r.d(e,"DateToLong",(function(){return n})),r.d(e,"LongToDateTime",(function(){return a})),r.d(e,"LongToDate",(function(){return i})),r.d(e,"formatDate",(function(){return s})),r.d(e,"formattedDate",(function(){return u})),r.d(e,"formattedDateDuan",(function(){return c})),r.d(e,"timeago",(function(){return l}))},ae0b: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:t.setting.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:"warehouseId"}},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择",clearable:""},model:{value:t.formData.warehouseId,callback:function(e){t.$set(t.formData,"warehouseId",e)},expression:"formData.warehouseId"}},t._l(t.warehouseOptions,(function(t){return r("el-option",{key:t.id,attrs:{label:t.warehouseName,value:t.id}})})),1)],1)],1),t._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"出库时间",prop:"dealTime"}},[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.dealTime,callback:function(e){t.$set(t.formData,"dealTime",e)},expression:"formData.dealTime"}})],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:"doc"}},[r("upload",{ref:"uploadRef",attrs:{settings:t.uploadSettings},on:{"on-change":t.uploadChange}})],1)],1)],1),t._v(" "),t._l(t.formData.goods,(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:"goods."+n+".baseCategoryId",rules:{required:!0,message:"请选择",trigger:"change"}}},[r("el-cascader",{staticStyle:{width:"100%"},attrs:{options:t.categoryOptions,placeholder:"请选择物品分类",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:"goods."+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:"goods."+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",{attrs:{"label-width":"0",prop:"goods."+n+".models."+e.$index+".counts",rules:t.rules.counts}},[r("el-input",{attrs:{type:"number"},on:{change:function(r){return t.countsChange(r,n,e.$index)}},model:{value:e.row.counts,callback:function(r){t.$set(e.row,"counts",r)},expression:"scope.row.counts"}})],1)]}}],null,!0)})],1),t._v(" "),r("div",{staticClass:"btn-group"},[t.formData.goods.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.goods.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("el-button",{attrs:{name:"保存",type:"primary",size:"medium",loading:t.btnloading},on:{click:t.handleSubmit}},[t._v("保存")])],1)],1)},o=[],a=r("6ec5"),i=r("efdb"),s=r("c56b"),u=r("f6e8"),c=r("f76d"),l=r("decf"),d=r("dee4"),f=r("2f62"),p=r("6f7e");function h(t){return h="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},h(t)}function g(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,i=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){s=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}function m(t){return w(t)||v(t)||y(t)||b()}function b(){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 O(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)?O(t,e):void 0}}function v(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function w(t){if(Array.isArray(t))return O(t)}function O(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"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),L(r),b}},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;L(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),b}},e}function D(t,e,r,n,o,a,i){try{var s=t[a](i),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function S(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){D(a,n,o,i,s,"next",t)}function s(t){D(a,n,o,i,s,"throw",t)}i(void 0)}))}}function x(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 j(t){for(var e=1;eo&&(this.$message.warning("数额超过现有库存"),n.counts=o>0?o:null)},handleSubmit:function(){var t=this;this.$refs["ruleForm"].validate((function(e){if(e){if(t.loading)return;t.loading=!0,t.btnloading=!0,console.log("this.formData",t.formData),Object(i["a"])(t.formData).then((function(e){t.$message.success("保存成功!"),t.btnloading=!1,t.loading=!1,t.close(),t.$emit("search")})).catch((function(e){console.log("edit err",e),t.btnloading=!1,t.loading=!1,t.$message.error("保存失败")}))}else t.$message.error("校验未通过,请检查。"),t.btnloading=!1}))},close:function(){this.formData={warehouseId:"",dealTime:"",goods:[]},this.$emit("close")}}},L=E,M=(r("0bcb"),r("2877")),C=Object(M["a"])(L,n,o,!1,null,"28fdcaf6",null);e["default"]=C.exports},c56b:function(t,e,r){"use strict";r.d(e,"b",(function(){return a})),r.d(e,"a",(function(){return i}));var n=r("b775"),o=r("433d");function a(t){return n["a"].get(o["a"].apiBaseURL+"/pc/base/category/select/tree",{params:t})}function i(t){return Object(n["a"])({url:"/pc/base/category/detail",method:"get",params:t})}},efdb:function(t,e,r){"use strict";r.d(e,"c",(function(){return o})),r.d(e,"a",(function(){return a})),r.d(e,"b",(function(){return i}));var n=r("b775");function o(t){return Object(n["a"])({url:"/pc/l/wh/form/output/list",method:"get",params:t})}function a(t){return Object(n["a"])({url:"/pc/l/wh/form/output/add",method:"post",data:t})}function i(t){return Object(n["a"])({url:"/pc/l/wh/form/output/detail",method:"get",params:t})}}}]);