(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3f5e2ac6","chunk-04ce482c","chunk-ffd74c96","chunk-92e5b0d0","chunk-2d0e66d0"],{"0bcb":function(t,e,n){"use strict";n("1aec")},"1aec":function(t,e,n){},"271c":function(t,e,n){"use strict";n.r(e);var r=n("6f7e"),o=n("2f62"),a=n("ac29"),i=n("dee4");function s(t){return s="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},s(t)}function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function u(t,e,n){return(e=d(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function d(t){var e=f(t,"string");return"symbol"==s(e)?e:e+""}function f(t,e){if("object"!=s(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}e["default"]={data:function(){return{loading:!1,list:[],items:[],filterFrom:{},editSetting:{title:"",id:"",orgId:"",show:!1},uploadPageSetting:{title:"上传页面",id:"",orgId:"",show:!1},detailSetting:{title:"详情",id:"",show:!1},pageNum:1,pageSize:10,total:0}},computed:c(c({},Object(o["b"])(["userInfo"])),{},{clientHeight:function(){return document.documentElement.clientHeight}}),created:function(){},filters:{formatTime:function(t){return t?r["LongToDateTime"](t):"-"}},methods:{handleExport:function(t,e,n){var r=this,o=this.$loading({lock:!0,text:"导出中,请稍候...",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});a[t](n).then((function(t){console.log(t),Object(i["a"])(t),r.$message.success("导出成功!"),o.close()})).catch((function(){o.close()}))},handleAdd:function(){this.editSetting.id=null,this.editSetting.info=null,this.editSetting.title="新增",this.editSetting.show=!0},handleEdit:function(t){this.editSetting.id=t.id,this.editSetting.info=null,this.editSetting.title="编辑",this.editSetting.show=!0},handleDetail:function(t){this.detailSetting.id=t.id,this.detailSetting.title="详情",this.detailSetting.show=!0},handleUploadPage:function(t){this.uploadPageSetting.id=t.id,this.uploadPageSetting.title="导入",this.uploadPageSetting.show=!0},handleSizeChange:function(t){this.pageSize=t,this.search({pageNum:1})},handleCurrentChange:function(t){this.pageNum=t,this.search()},search:function(t){t&&(this.pageNum=t),this.fetchData()},refreshData:function(){this.pageNum=1,this.pageSize=10,this.search()},fifterForm:function(t){this.filterFrom=Object.assign(this.filterFrom,t),this.search(1)}}}},3401:function(t,e,n){"use strict";n("4e10")},4260:function(t,e,n){"use strict";n("8dbd")},"433d":function(t,e,n){"use strict";var r=n("c559"),o={ftpUrl:r["a"].ftpUrl,apiBaseURL:r["a"].apiBaseURL};e["a"]=o},"4e10":function(t,e,n){},"6ec5":function(t,e,n){"use strict";n.d(e,"l",(function(){return a})),n.d(e,"a",(function(){return i})),n.d(e,"g",(function(){return s})),n.d(e,"c",(function(){return l})),n.d(e,"j",(function(){return c})),n.d(e,"f",(function(){return u})),n.d(e,"d",(function(){return d})),n.d(e,"e",(function(){return f})),n.d(e,"p",(function(){return p})),n.d(e,"n",(function(){return m})),n.d(e,"m",(function(){return g})),n.d(e,"k",(function(){return h})),n.d(e,"s",(function(){return v})),n.d(e,"r",(function(){return b})),n.d(e,"q",(function(){return y})),n.d(e,"o",(function(){return w})),n.d(e,"b",(function(){return S})),n.d(e,"i",(function(){return _})),n.d(e,"h",(function(){return O}));var r=n("b775"),o=n("433d");function a(t){return r["a"].get(o["a"].apiBaseURL+"/pc/fin/sys/tenant/select/tree_fin_tenant",{params:t})}function i(t){return Object(r["a"])({url:"/pc/base/category/add",method:"post",data:t})}function s(t){return Object(r["a"])({url:"/pc/base/category/edit",method:"post",data:t})}function l(t){return Object(r["a"])({url:"/pc/base/warehouse/add",method:"post",data:t})}function c(t){return Object(r["a"])({url:"/pc/base/warehouse/edit",method:"post",data:t})}function u(t){return Object(r["a"])({url:"/pc/base/warehouse/del",method:"delete",data:t})}function d(){return Object(r["a"])({url:"/pc/base/goods/template/select/classificationCode",method:"get"})}function f(t){return Object(r["a"])({url:"/pc/base/category/del",method:"delete",data:t})}function p(t){return Object(r["a"])({url:"/pc/base/warehouse/select/tenant_warehouse",method:"get",params:t})}function m(t){return Object(r["a"])({url:"/pc/base/goods/template/query/goodsTemplate",method:"get",params:t})}function g(t){return Object(r["a"])({url:"/pc/base/goods/models/query/goodsModel",method:"get",params:t})}function h(t){return r["a"].get(o["a"].apiBaseURL+"/pc/base/category/select/tree",{params:t})}function v(t){return Object(r["a"])({url:"/pc/base/warehouse/select/number",method:"get",params:t})}function b(t){return Object(r["a"])({url:"/pc/base/warehouse/select/in/warehouse/num",method:"get",params:t})}function y(t){return Object(r["a"])({url:"/pc/fin/sys/tenant/user/query/user",method:"get",params:t})}function w(t){return Object(r["a"])({url:"/pc/base/goods/models/queryGoodsModelInfo",method:"get",params:t})}function S(t){return Object(r["a"])({url:"/pc/fin/sys/tenant/add",method:"post",data:t})}function _(t){return Object(r["a"])({url:"/pc/fin/sys/tenant/edit",method:"post",data:t})}function O(t){return Object(r["a"])({url:"/pc/fin/sys/tenant/editState",method:"post",data:t})}},"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),s=e.slice(12,14),l=n+"-"+r+"-"+o+" "+a+":"+i+":"+s;return l}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 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 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 l(){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 c(){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 u(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,s=(new Date).getTime(),l=s-e;if(!(l<0)){var c=l/n,u=l/r,d=l/o,f=l/a,p=l/i,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(u>=1&&u<=23)m=" "+parseInt(u)+"小时前";else if(c>=1&&c<=59)m=" "+parseInt(c)+"分钟前";else if(l>=0&&l<=n)m="刚刚";else{var g=new Date;g.setTime(e);var h=g.getFullYear(),v=g.getMonth()+1<10?"0"+(g.getMonth()+1):g.getMonth()+1,b=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();m=h+"-"+v+"-"+b}return m}}}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 s})),n.d(e,"formattedDate",(function(){return l})),n.d(e,"formattedDateDuan",(function(){return c})),n.d(e,"timeago",(function(){return u}))},"8dbd":function(t,e,n){},"904d":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("div",{staticClass:"app-container stock-container"},[n("el-container",[n("el-card",{staticClass:"box-card",staticStyle:{width:"100%"},attrs:{shadow:"never"}},[n("div",{staticClass:"filter-container"},[n("my-search",{ref:"searchBar",attrs:{items:t.items},on:{search:t.fifterForm}})],1),t._v(" "),n("el-row",{staticStyle:{"margin-top":"15px"}},[n("el-col",[n("div",{staticClass:"table-tool-bar",staticStyle:{"margin-bottom":"15px"}},[n("my-button",{attrs:{name:"新增",site:"tools",size:"medium"},on:{click:t.handleAdd}})],1),t._v(" "),n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[n("div",{style:{"overflow-y":"auto",height:"calc(100vh - 352px)"}},[t.list.length?n("el-row",{staticClass:"card",attrs:{gutter:5}},t._l(t.list,(function(e,r){return n("el-col",{key:r,staticClass:"cm-item"},[n("el-card",{staticClass:"card-data"},[n("div",{staticClass:"card-container"},[n("div",{staticClass:"card-header"},[n("div",{staticClass:"card-header-left"},[n("span",[t._v("出库单号:")]),t._v(" "),n("span",{staticClass:"value"},[t._v(t._s(e.businessFormCode))])]),t._v(" "),n("div",{staticClass:"card-header-right"},[n("el-button",{attrs:{site:"form",type:"success",size:"mini"},on:{click:function(n){return t.handleExport("outputExport","出库单-"+e.businessFormCode,{id:e.id})}}},[t._v("导出出库单")]),t._v(" "),n("el-button",{attrs:{name:"查看详情",site:"form",type:"info",size:"mini"},on:{click:function(n){return t.handleDetail(e)}}},[t._v("查看详情")])],1)]),t._v(" "),n("div",{staticClass:"one-hed"},[n("div",{staticClass:"box"},[n("span",{staticClass:"span-two"},[t._v("机构:")]),t._v(t._s(e.agencyName))]),t._v(" "),n("div",{staticClass:"box"},[n("span",{staticClass:"span-two"},[t._v("操作人:")]),t._v(t._s(e.operatorName))]),t._v(" "),n("div",{staticClass:"box"},[n("span",{staticClass:"span-two"},[t._v("出库时间:")]),t._v(t._s(t._f("formatTime")(e.dealTime))+"\n ")])]),t._v(" "),n("div",{staticClass:"card-end"},t._l(e.formOutputTemplateInfoList,(function(e,r){return n("div",{key:r,staticClass:"item"},[n("div",{staticClass:"name"},[t._v(t._s(e.goodsName))]),t._v(" "),n("div",{staticClass:"value-box"},[n("div",{staticClass:"value-box-item"},[n("span",{staticClass:"label"},[t._v("数量:")]),t._v(" "),n("span",{staticClass:"value"},[t._v(t._s(e.count))]),t._v(" "),n("span",{staticClass:"unit"},[t._v(t._s(e.unit))])])])])})),0)])])],1)})),1):n("el-empty",{attrs:{description:"暂无数据"}})],1)]),t._v(" "),n("el-pagination",{attrs:{small:!1,"current-page":t.pageNum,"page-sizes":[5,10,20,50,100,200,300,400,500],"page-size":t.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1)],1)],1),t._v(" "),t.editSetting.show?n("edit",{ref:"editRef",attrs:{setting:t.editSetting},on:{close:function(e){t.editSetting.show=!1},search:t.refreshData}}):t._e(),t._v(" "),t.detailSetting.show?n("detail",{ref:"detailRef",attrs:{setting:t.detailSetting},on:{close:function(e){t.detailSetting.show=!1}}}):t._e()],1)},o=[],a=n("efdb"),i=n("f6e8"),s=n("9960"),l=n("ae0b"),c=n("9f01"),u=n("271c"),d=n("433d");function f(t){return f="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},f(t)}function p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function m(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?p(Object(n),!0).forEach((function(e){g(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function g(t,e,n){return(e=h(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function h(t){var e=v(t,"string");return"symbol"==f(e)?e:e+""}function v(t,e){if("object"!=f(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var b={name:"index",mixins:[u["default"]],components:{MyButton:i["a"],myImport:s["default"],edit:l["default"],detail:c["default"]},data:function(){return{list:[],items:[{type:"text",dataIndex:"businessFormCode",label:"出库单号",placeholder:"请输入",defaultValue:""},{type:"cascader",dataIndex:"agencyId",label:"机构",placeholder:"请选择",optionsConfig:{url:"/pc/fin/sys/tenant/select/tree_fin_tenant",props:null},cascader:[{key:"goodsTemplateId",queryKey:"agencyId"}],defaultValue:"",options:[]},{type:"select",dataIndex:"goodsTemplateId",label:"物品名称",placeholder:"请输入",defaultValue:"",options:[],optionsConfig:{label:"goodsName",value:"id",url:d["a"].apiBaseURL+"/pc/base/goods/template/query/goodsTemplate"}},{type:"text",dataIndex:"createName",label:"创建人",placeholder:"请输入",defaultValue:""},{type:"date-picker",dataIndex:"startTime",label:"出库时间",defaultValue:""},{type:"date-picker",dataIndex:"endTime",label:"至",defaultValue:""}]}},created:function(){this.fetchData()},methods:{fetchData:function(){var t=this;this.loading=!0,Object(a["c"])(m({pageNum:this.pageNum,pageSize:this.pageSize},this.filterFrom)).then((function(e){t.list=e.datas,t.total=e.totalRows,t.loading=!1}))}}},y=b,w=(n("4260"),n("2877")),S=Object(w["a"])(y,r,o,!1,null,"9e2fc5e8",null);e["default"]=S.exports},9960:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.dialogShow?n("el-dialog",{attrs:{width:"40%",center:!0,"close-on-click-modal":!1,"close-on-press-escape":!1,title:t.dialogTitle,"before-close":t.beforeClose,modal:t.modal,visible:t.dialogShow}},[n("el-row",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{"element-loading-text":"数据导入中"}},[n("el-col",{attrs:{span:24}},[n("el-form",[null!=t.templateSettings.templateUrl?n("el-form-item",{attrs:{label:"下载模板:",prop:"lon"}},[n("a",{staticClass:"blue-txt",staticStyle:{color:"#409EFF"},attrs:{href:t.templateSettings.templateUrl,target:"_blank",rel:"noreferrer noopener"}},[t._v(t._s(t.templateSettings.templateName))])]):t._e(),t._v(" "),n("el-form-item",{attrs:{label:"选取文件:",prop:"lon"}},[n("el-upload",{ref:t.fileSettings.ref,staticClass:"upload-demo",attrs:{headers:t.headers,name:"file",data:t.fileSettings.data,action:t.fileSettings.uploadUrl,"before-upload":t.beforeAvatarUpload,"on-success":t.handleUploadSuccess,"on-change":t.file,multiple:t.fileSettings.multiple,limit:t.fileSettings.num,accept:t.fileSettings.accept,"auto-upload":t.fileSettings.autoUpload}},[n("el-button",{attrs:{size:"small",type:"primary"}},[t._v(t._s(t.fileSettings.title))]),t._v(" "),n("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[t._v("只能上传"+t._s(t.fileSettings.num)+"个格式为"+t._s(t.fileSettings.accept)+"的文件,且不超过"+t._s(t.fileSettings.max)+"kb")])],1)],1),t._v(" "),n("el-form-item",{attrs:{label:"导入数据:",prop:"lon"}},[n("el-button",{staticStyle:{"margin-left":"10px"},attrs:{size:"small",type:"success"},on:{click:t.handleSubmit}},[t._v("开始导入")])],1)],1)],1)],1)],1):t._e()},o=[],a=n("5f87"),i=n("83d6"),s={props:{importSetting:{type:Object,default:function(){return{}}},dialogShow:{type:Boolean,default:!1},modal:{type:Boolean,default:!1},dialogTitle:{type:String,default:""}},data:function(){return{headers:{},loading:!1,fileSettings:{ref:"myFile",data:{},title:"点击上传",max:1024,num:1,accept:".xlsx",uploadUrl:"",type:"text",multiple:!1,disabled:!1,autoUpload:!1,onSuccess:null},isUpload:!1,templateSettings:{templateName:"模板下载",templateUrl:null}}},watch:{dialogShow:function(t){t&&(this.fileSettings=Object.assign(this.fileSettings,this.importSetting.fileSettings),this.templateSettings=Object.assign(this.templateSettings,this.importSetting.templateSettings),console.log(this.templateSettings),this.fileSettings.onSuccess=this.importSetting.onSuccess)}},mounted:function(){this.headers[i["sessionToken"]]=Object(a["a"])()},methods:{beforeClose:function(){var t=this;this.loading?this.$confirm("正在执行导入,确认关闭?").then((function(){t.importSetting.dialogShow=!1,t.loading=!1})).catch():this.importSetting.dialogShow=!1},beforeAvatarUpload:function(t){var e=this.fileSettings.accept.split(",").indexOf(t.name.substr(t.name.lastIndexOf("."),t.name.length).toLocaleString())>-1;e||this.$message.error("上传文件只能是 ".concat(this.fileSettings.accept," 格式!"));var n=t.size/1024<this.fileSettings.max;return n||this.$message.error("上传文件大小不能超过 "+this.fileSettings.max+"kb!"),e&&n},handleSubmit:function(){this.isUpload?this.$refs[this.fileSettings.ref].submit():this.$message.error("请上传文件")},file:function(t,e){t&&(this.isUpload=!0)},handleUploadSuccess:function(t,e,n){var r=this;this.fileSettings.onSuccess&&(this.loading=!0,this.fileSettings.onSuccess(t,(function(){r.loading=!1,r.importSetting.dialogShow=!1})))}}},l=s,c=n("2877"),u=Object(c["a"])(l,r,o,!1,null,null,null);e["default"]=u.exports},"9f01":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:t.setting.title,width:"800px",loading:t.loading},on:{close:t.close}},[n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:8}},[n("span",[t._v("出库单号:")]),t._v(" "),n("span",[t._v(t._s(t.detail.businessFormCode))])]),t._v(" "),n("el-col",{attrs:{span:8}},[n("span",[t._v("出库仓库:")]),t._v(" "),n("span",[t._v(t._s(t.detail.warehouseName))])]),t._v(" "),n("el-col",{attrs:{span:8}},[n("span",[t._v("所属机构:")]),t._v(" "),n("span",[t._v(t._s(t.detail.agencyName))])])],1),t._v(" "),n("el-row",{staticStyle:{"margin-top":"20px"},attrs:{gutter:20}},[n("el-col",{attrs:{span:8}},[n("span",[t._v("创建人:")]),t._v(" "),n("span",[t._v(t._s(t.detail.operatorName))])]),t._v(" "),n("el-col",{attrs:{span:8}},[n("span",[t._v("出库时间:")]),t._v(" "),n("span",[t._v(t._s(t._f("formatTime")(t.detail.dealTime)))])])],1),t._v(" "),t.fileList&&t.fileList.length?n("el-row",{staticStyle:{"margin-top":"20px"},attrs:{gutter:20}},[n("el-col",{staticClass:"img-row",attrs:{span:24}},[n("span",[t._v("出库手续:")]),t._v(" "),t._l(t.fileList,(function(e,r){return n("div",{key:r,staticClass:"img-box",on:{click:function(n){return t.handlePreview(e)}}},[n("img",{staticClass:"img",attrs:{src:t.getUrl(e.path),alt:""}})])}))],2)],1):t._e(),t._v(" "),t._l(t.detail.fromOutputGoods,(function(e,r){return n("div",{key:r,staticClass:"goods-card"},[n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:8}},[n("span",[t._v("物品分类:")]),t._v(" "),n("span",[t._v(t._s(e.categoryName))])]),t._v(" "),n("el-col",{attrs:{span:8}},[n("span",[t._v("物品名称:")]),t._v(" "),n("span",[t._v(t._s(e.goodsName))])])],1),t._v(" "),n("el-table",{staticStyle:{"margin-top":"20px"},attrs:{data:e.models,stripe:!0}},[n("el-table-column",{attrs:{prop:"baseGoodsModelsName",label:"规格型号",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.baseGoodsModelsName)+"\n ")]}}],null,!0)}),t._v(" "),n("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(" "),n("el-table-column",{attrs:{prop:"counts",label:"出库数量",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.counts)+"\n ")]}}],null,!0)}),t._v(" "),n("el-table-column",{attrs:{prop:"totalAmount",label:"金额",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.totalAmount)+"\n ")]}}],null,!0)})],1)],1)})),t._v(" "),n("div",{staticStyle:{display:"none"},attrs:{id:"uploadPreviewImages"}},t._l(t.fileList,(function(e,r){return n("span",{key:r},[t.checkImg(e.name)?n("img",{staticClass:"v-img",staticStyle:{width:"100px",height:"100px"},attrs:{src:t.getUrl(e.path),alt:e.name}}):t._e()])})),0)],2)},o=[],a=n("efdb"),i=n("f76d"),s=n("6f7e"),l=n("dee4"),c=n("c82c"),u=n.n(c),d=(n("0808"),null),f={components:{winMd:i["a"]},props:{setting:{type:Object,default:function(){}}},data:function(){return{loading:!0,fileList:[],detail:{categoryName:"",businessFormCode:"",goodsName:"",agencyId:"",agencyName:"",states:"",createName:"",fromOutputGoods:[]}}},filters:{formatTime:function(t){if(t)return s["LongToDateTime"](t)}},created:function(){var t=this;Object(a["b"])({id:this.setting.id}).then((function(e){t.detail=e,t.fileList=t.detail.doc?JSON.parse(t.detail.doc):[],t.loading=!1,t.$nextTick((function(){t.initPreviewImg()}))}))},methods:{initPreviewImg:function(){null!=d&&d.destroy();var t=document.querySelector("#uploadPreviewImages");d=new u.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++}}d.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(l["c"])()+t},close:function(){this.$emit("close")}}},p=f,m=(n("3401"),n("2877")),g=Object(m["a"])(p,r,o,!1,null,"145e5635",null);e["default"]=g.exports},ac29:function(t,e,n){"use strict";n.r(e),n.d(e,"outputExport",(function(){return o})),n.d(e,"procureExport",(function(){return a})),n.d(e,"transferExport",(function(){return i})),n.d(e,"inventoryExport",(function(){return s})),n.d(e,"scrappedExport",(function(){return l})),n.d(e,"deptScrappedExport",(function(){return c}));var r=n("b775");function o(t){return Object(r["a"])({url:"/pc/l/wh/form/output/list/export",method:"get",params:t})}function a(t){return Object(r["a"])({url:"/pc/whForm/procure/list/export",method:"get",params:t})}function i(t){return Object(r["a"])({url:"/pc/l/wh/form/transfer/list/export",method:"get",params:t})}function s(t){return Object(r["a"])({url:"/pc/l/wh/form/inventory/list/export",method:"get",params:t})}function l(t){return Object(r["a"])({url:"/pc/l/wh/form/scrapped/list/export",method:"get",params:t})}function c(t){return Object(r["a"])({url:"/pc/l/wh/form/scrapped/deptList/export",method:"get",params:t})}},ae0b: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-edit",attrs:{title:t.setting.title+"出库",width:"800px"},on:{close:t.close}},[n("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"}},[n("div",{staticClass:"main-w"},[n("el-row",{staticClass:"headerHeight",attrs:{gutter:24}},[n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:"出库仓库",prop:"warehouseId"}},[n("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 n("el-option",{key:t.id,attrs:{label:t.warehouseName,value:t.id}})})),1)],1)],1),t._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:"出库时间",prop:"dealTime"}},[n("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(" "),n("el-row",{staticClass:"headerHeight",attrs:{gutter:24}},[n("el-col",{attrs:{span:24}},[n("el-form-item",{attrs:{label:"出库手续",prop:"doc"}},[n("upload",{ref:"uploadRef",attrs:{settings:t.uploadSettings},on:{"on-change":t.uploadChange}})],1)],1)],1),t._v(" "),t._l(t.formData.goods,(function(e,r){return n("div",{key:r,staticClass:"goods-card"},[n("el-row",{attrs:{gutter:24}},[n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:"物品分类",prop:"goods."+r+".baseCategoryId",rules:{required:!0,message:"请选择",trigger:"change"}}},[n("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,r)}},model:{value:e.baseCategoryId,callback:function(n){t.$set(e,"baseCategoryId",n)},expression:"goodsItem.baseCategoryId"}})],1)],1),t._v(" "),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:"物品名称",prop:"goods."+r+".baseGoodsTemplateId",rules:t.rules.baseGoodsTemplateId}},[n("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.baseCategoryId?"请选择物品":"请先选择物品分类",filterable:"",clearable:"",disabled:!e.baseCategoryId},on:{change:function(e){return t.goodsTemplateChange(e,r)}},model:{value:e.baseGoodsTemplateId,callback:function(n){t.$set(e,"baseGoodsTemplateId",n)},expression:"goodsItem.baseGoodsTemplateId"}},t._l(e.goodsOptions,(function(t){return n("el-option",{key:t.id,attrs:{label:t.goodsName,value:t.id}})})),1)],1)],1)],1),t._v(" "),n("el-row",{attrs:{gutter:24}},[n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:"规格型号",prop:"goods."+r+".modelsIds",rules:{required:!0,message:"请选择规格型号",trigger:"change"}}},[n("el-select",{staticStyle:{width:"100%"},attrs:{multiple:"",clearable:"",placeholder:e.baseGoodsTemplateId?"请选择规格型号":"请先选择物品名称",disabled:!e.baseGoodsTemplateId},on:{change:function(e){return t.modelChange(e,r)},"remove-tag":function(e){return t.modelRemoveTag(e,r)},clear:function(e){return t.modelRemoveTag(-1,r)}},model:{value:e.modelsIds,callback:function(n){t.$set(e,"modelsIds",n)},expression:"goodsItem.modelsIds"}},t._l(e.modelsOptions,(function(t){return n("el-option",{key:t.id,attrs:{label:t.modelName,value:t.id}})})),1)],1)],1)],1),t._v(" "),n("el-table",{attrs:{data:e.models,stripe:!0}},[n("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(" "),n("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(" "),n("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(" "),n("el-table-column",{attrs:{prop:"counts",label:"出库数量",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-form-item",{attrs:{"label-width":"0",prop:"goods."+r+".models."+e.$index+".counts",rules:t.rules.counts}},[n("el-input",{attrs:{type:"number"},on:{change:function(n){return t.countsChange(n,r,e.$index)}},model:{value:e.row.counts,callback:function(n){t.$set(e.row,"counts",n)},expression:"scope.row.counts"}})],1)]}}],null,!0)})],1),t._v(" "),n("div",{staticClass:"btn-group"},[t.formData.goods.length>1?n("el-button",{attrs:{name:"移除",type:"danger",plain:"",size:"mini"},on:{click:function(e){return t.removeGoods(r)}}},[t._v("移除")]):t._e(),t._v(" "),t.formData.goods.length-1==r?n("el-button",{attrs:{name:"新增物品",type:"primary",plain:"",size:"mini"},on:{click:t.addGoods}},[t._v("新增物品")]):t._e()],1)],1)}))],2)]),t._v(" "),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer",align:"center"},slot:"footer"},[n("my-button",{attrs:{name:"取消",site:"form"},on:{click:t.close}}),t._v(" "),n("el-button",{attrs:{name:"保存",type:"primary",size:"medium",loading:t.btnloading},on:{click:t.handleSubmit}},[t._v("保存")])],1)],1)},o=[],a=n("6ec5"),i=n("efdb"),s=n("c56b"),l=n("f6e8"),c=n("f76d"),u=n("decf"),d=n("dee4"),f=n("2f62"),p=n("6f7e");function m(t){return m="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},m(t)}function g(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=b(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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(){n=n.call(t)},n:function(){var t=n.next();return i=t.done,t},e:function(t){s=!0,a=t},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw a}}}}function h(t){return w(t)||y(t)||b(t)||v()}function v(){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 b(t,e){if(t){if("string"==typeof t)return S(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(t,e):void 0}}function y(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function w(t){if(Array.isArray(t))return S(t)}function S(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function _(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var a=e&&e.prototype instanceof b?e:b,i=Object.create(a.prototype),s=new N(r||[]);return o(i,"_invoke",{value:D(t,n,s)}),i}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=u;var f="suspendedStart",p="suspendedYield",g="executing",h="completed",v={};function b(){}function y(){}function w(){}var S={};c(S,i,(function(){return this}));var O=Object.getPrototypeOf,x=O&&O(O(L([])));x&&x!==n&&r.call(x,i)&&(S=x);var j=w.prototype=b.prototype=Object.create(S);function I(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function n(o,a,i,s){var l=d(t[o],t,a);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==m(u)&&r.call(u,"__await")?e.resolve(u.__await).then((function(t){n("next",t,i,s)}),(function(t){n("throw",t,i,s)})):e.resolve(u).then((function(t){c.value=t,i(c)}),(function(t){return n("throw",t,i,s)}))}s(l.arg)}var a;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return a=a?a.then(o,o):o()}})}function D(e,n,r){var o=f;return function(a,i){if(o===g)throw Error("Generator is already running");if(o===h){if("throw"===a)throw i;return{value:t,done:!0}}for(r.method=a,r.arg=i;;){var s=r.delegate;if(s){var l=k(s,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=g;var c=d(e,n,r);if("normal"===c.type){if(o=r.done?h:p,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=h,r.method="throw",r.arg=c.arg)}}}function k(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,k(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var a=d(o,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var i=a.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw new TypeError(m(e)+" is not iterable")}return y.prototype=w,o(j,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:y,configurable:!0}),y.displayName=c(w,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,c(t,l,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},I(C.prototype),c(C.prototype,s,(function(){return this})),e.AsyncIterator=C,e.async=function(t,n,r,o,a){void 0===a&&(a=Promise);var i=new C(u(t,n,r,o),a);return e.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},I(j),c(j,l,"Generator"),c(j,i,(function(){return this})),c(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=L,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(E),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return s.type="throw",s.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}function O(t,e,n,r,o,a,i){try{var s=t[a](i),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,o)}function x(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var a=t.apply(e,n);function i(t){O(a,r,o,i,s,"next",t)}function s(t){O(a,r,o,i,s,"throw",t)}i(void 0)}))}}function j(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function I(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?j(Object(n),!0).forEach((function(e){C(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function C(t,e,n){return(e=D(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function D(t){var e=k(t,"string");return"symbol"==m(e)?e:e+""}function k(t,e){if("object"!=m(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=m(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var T={components:{MyButton:l["a"],winMd:c["a"],upload:u["a"]},props:{setting:{type:Object,default:function(){}}},data:function(){var t=this,e=function(e,n,r){if(!n)return r(new Error("请选择"));var o=t.formData.goods.filter((function(t){return t.baseGoodsTemplateId==n}));if(!o||1!=o.length)return r(new Error("已选过此物品"));r()};return{loading:!0,btnloading:!1,warehouseOptions:[],categoryOptions:[],modelList:[],formData:{warehouseId:"",dealTime:p["formatDate"](new Date,"yyyyMMddhhmmss"),doc:"",goods:[]},goodsItem:{baseCategoryIds:"",baseCategoryId:"",baseGoodsTemplateId:"",goodsTemplateName:"",goodsOptions:[],modelsOptions:[],models:[],modelsIds:[]},modelsItem:{baseGoodsModelsId:"",worehouseCount:0,counts:null,unit:null,totalAmount:0},rules:{warehouseId:[{required:!0,message:"请选择仓库",trigger:"change"}],dealTime:[{required:!0,message:"请选择时间",trigger:"change"}],doc:[{required:!0,message:"请上传审批手续",trigger:"change"}],baseCategoryId:[{required:!0,message:"请选择物品分类",trigger:"change"}],baseGoodsTemplateId:[{required:!0,message:"请选择物品",trigger:"change"},{validator:e,trigger:["blur","change"]}],modelsIds:[{required:!0,message:"请选择规格型号",trigger:"change"}],counts:[{required:!0,message:"请输入",trigger:"change"}]},uploadSettings:{title:"上传",max:20,num:10,tip:"",uploadUrl:Object(d["d"])(),multiple:!0,disabled:!1}}},computed:I({},Object(f["b"])(["userInfo"])),created:function(){this.init()},methods:{init:function(){var t=x(_().mark((function t(){var e;return _().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.getWarehouseList();case 2:return t.next=4,this.getgoodsTemplate();case 4:return t.next=6,this.getgoodsModel();case 6:return t.next=8,Object(s["b"])();case 8:e=t.sent,this.categoryOptions=this.removeEmptyChildren(e),this.loading=!1;case 11:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),getWarehouseList:function(){var t=x(_().mark((function t(){var e=this;return _().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(a["p"])({agencyId:this.userInfo.tenantId}).then((function(t){e.warehouseOptions=t,t.length&&e.formData.goods.push(JSON.parse(JSON.stringify(e.goodsItem))),e.warehouseOptions.length&&!e.formData.warehouseId&&(e.formData.warehouseId=e.warehouseOptions[0].id)})).catch((function(t){console.log("err",t)}));case 2:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),removeEmptyChildren:function(t){var e=this;return t.forEach((function(t){t.children&&t.children.length?e.removeEmptyChildren(t.children):delete t.children})),t},getgoodsTemplate:function(){var t=x(_().mark((function t(e,n){var r=this;return _().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(a["n"])({agencyId:this.userInfo.tenantId,categoryId:e||""}).then((function(t){n||0==n?r.$set(r.formData.goods[n],"goodsOptions",t):r.goodsTemplatelAll=t}));case 2:case"end":return t.stop()}}),t,this)})));function e(e,n){return t.apply(this,arguments)}return e}(),getgoodsModel:function(){var t=x(_().mark((function t(e,n){var r=this;return _().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(a["m"])({goodsTemplatesId:e||""}).then((function(t){n||0==n?r.$set(r.formData.goods[n],"modelsOptions",t):r.goodsModelAll=t}));case 2:case"end":return t.stop()}}),t)})));function e(e,n){return t.apply(this,arguments)}return e}(),getGoodsTemplateName:function(t){var e=this.goodsTemplatelAll.find((function(e){return e.id==t}));if(e)return e.goodsName},getGoodsModelsName:function(t){var e=this.goodsModelAll.find((function(e){return e.id==t}));if(e)return e.modelName},categoryChange:function(t,e){this.formData.goods[e].goodsOptions=[],this.formData.goods[e].baseGoodsTemplateId="",this.formData.goods[e].goodsTemplateName="",this.formData.goods[e].modelsOptions=[],this.formData.goods[e].modelsIds=[],this.formData.goods[e].models=[],this.getgoodsTemplate(t,e)},goodsTemplateChange:function(t,e){this.formData.goods[e].modelsOptions=[],this.formData.goods[e].modelsIds=[],this.formData.goods[e].models=[],this.formData.goods[e].goodsTemplateName=this.getGoodsTemplateName(t),this.getgoodsModel(t,e)},modelChange:function(){var t=x(_().mark((function t(e,n){var r,o,i,s,l,c=this;return _().wrap((function(t){while(1)switch(t.prev=t.next){case 0:r=h(this.formData.goods[n].models),o=JSON.stringify(r),i=g(e),t.prev=3,l=_().mark((function t(){var e,n,i;return _().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e=s.value,-1!=o.indexOf(e)){t.next=7;break}return n=c.goodsModelAll.find((function(t){return t.id==e})),t.next=5,Object(a["s"])({warehouseId:c.formData.warehouseId,baseGoodsModelsId:e,states:1,buyType:null});case 5:i=t.sent,r.push(I(I({},c.modelsItem),{},{baseGoodsModelsId:e,unit:n.unit,worehouseCount:i}));case 7:case"end":return t.stop()}}),t)})),i.s();case 6:if((s=i.n()).done){t.next=10;break}return t.delegateYield(l(),"t0",8);case 8:t.next=6;break;case 10:t.next=15;break;case 12:t.prev=12,t.t1=t["catch"](3),i.e(t.t1);case 15:return t.prev=15,i.f(),t.finish(15);case 18:this.formData.goods[n].models=r;case 19:case"end":return t.stop()}}),t,this,[[3,12,15,18]])})));function e(e,n){return t.apply(this,arguments)}return e}(),modelRemoveTag:function(t,e){if(-1!==t){var n=this.formData.goods[e].models,r=n.findIndex((function(e){return e.baseGoodsModelsId==t}));this.formData.goods[e].models.splice(r,1)}else this.formData.goods[e].models=[]},uploadChange:function(){var t=this.$refs.uploadRef.fileList;this.formData.doc=JSON.stringify(t)},addGoods:function(){this.formData.goods.push(JSON.parse(JSON.stringify(this.goodsItem)))},removeGoods:function(t){this.formData.goods.splice(t,1)},countsChange:function(t,e,n){var r=this.formData.goods[e].models[n],o=r.worehouseCount;0==t&&(this.$message.warning("数额不能为0"),r.counts=null),t>o&&(this.$message.warning("数额超过现有库存"),r.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")}}},E=T,N=(n("0bcb"),n("2877")),L=Object(N["a"])(E,r,o,!1,null,"28fdcaf6",null);e["default"]=L.exports},c56b:function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return i}));var r=n("b775"),o=n("433d");function a(t){return r["a"].get(o["a"].apiBaseURL+"/pc/base/category/select/tree",{params:t})}function i(t){return Object(r["a"])({url:"/pc/base/category/detail",method:"get",params:t})}},efdb:function(t,e,n){"use strict";n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return i}));var r=n("b775");function o(t){return Object(r["a"])({url:"/pc/l/wh/form/output/list",method:"get",params:t})}function a(t){return Object(r["a"])({url:"/pc/l/wh/form/output/add",method:"post",data:t})}function i(t){return Object(r["a"])({url:"/pc/l/wh/form/output/detail",method:"get",params:t})}}}]);
|