(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-42627ebc","chunk-92e5b0d0"],{1013: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("el-dialog",{attrs:{width:"1000px",visible:!0,top:"15vh","close-on-click-modal":!1,"append-to-body":!0,"destroy-on-close":!0},on:{close:t.close}},[n("div",{staticClass:"dialog-title",attrs:{slot:"title",align:"left"},slot:"title"},t._l(t.tabs,(function(e,r){return n("div",{key:r,staticClass:"tab-item",class:t.tabIndex==r?"active":"",on:{click:function(e){t.tabIndex=r}}},[t._v("\n "+t._s(e)+"\n ")])})),0),t._v(" "),n("el-form",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"},{name:"show",rawName:"v-show",value:0==t.tabIndex,expression:"tabIndex == 0"}],ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:t.formData,rules:t.rules}},t._l(t.formData.list,(function(e,r){return n("div",{key:r},[n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:"规格型号:"}},[t._v("\n "+t._s(e.baseGoodModelName)+"\n ")])],1),t._v(" "),n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:"单位:"}},[t._v("\n "+t._s(e.unit)+"\n ")])],1)],1),t._v(" "),t._l(e.recordUserInfos,(function(e,r){return n("el-row",{key:r,attrs:{gutter:20}},[n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:"分发数量:"}},[t._v("\n "+t._s(e.count)+"\n ")])],1),t._v(" "),n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:"使用人:"}},[e.isEdit?n("el-input",{staticStyle:{width:"120px"},model:{value:e.userName,callback:function(n){t.$set(e,"userName",n)},expression:"childItem.userName"}}):n("span",[t._v(t._s(e.userName))])],1)],1),t._v(" "),n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:"联系电话:"}},[e.isEdit?n("el-input",{staticStyle:{width:"120px"},model:{value:e.phone,callback:function(n){t.$set(e,"phone",n)},expression:"childItem.phone"}}):n("span",[t._v(t._s(e.phone))])],1)],1),t._v(" "),n("el-col",{attrs:{span:6}},[n("el-form-item",[n("span",{staticClass:"edit-text",on:{click:function(n){return t.handleEditItem(e)}}},[t._v(t._s(e.isEdit?"取消":"修改"))])])],1)],1)})),t._v(" "),r+1<t.formData.list.length?n("el-divider"):t._e()],2)})),0),t._v(" "),n("el-form",{directives:[{name:"show",rawName:"v-show",value:1==t.tabIndex,expression:"tabIndex == 1"}],ref:"ruleForm",staticClass:"demo-ruleForm",staticStyle:{width:"96%"},attrs:{model:t.formData,rules:t.rules}},t._l(t.list,(function(e,r){return n("div",{key:r},[n("el-row",{staticClass:"item-header",attrs:{gutter:20}},[n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:"修改时间:"}},[t._v("\n "+t._s(t._f("formatTime")(e.updateTime))+"\n ")])],1),t._v(" "),n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:"修改人:"}},[t._v("\n "+t._s(e.updateUserName)+"\n ")])],1)],1),t._v(" "),n("el-divider"),t._v(" "),t._l(e.recordSkuDtoList,(function(e,r){return[n("el-row",{key:r,attrs:{gutter:20}},[n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:"规格型号:"}},[t._v("\n "+t._s(e.baseGoodModelName)+"\n ")])],1),t._v(" "),n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:"单位:"}},[t._v("\n "+t._s(e.unit)+"\n ")])],1)],1),t._v(" "),t._l(e.recordUserInfos,(function(e,o){return n("el-row",{key:o+"_"+r,attrs:{gutter:20}},[n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:"分发数量:"}},[t._v("\n "+t._s(e.num)+"\n ")])],1),t._v(" "),n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:"使用人:"}},[t._v("\n "+t._s(e.useName)+"\n ")])],1),t._v(" "),n("el-col",{attrs:{span:6}},[n("el-form-item",{attrs:{label:"联系电话:"}},[n("span",[t._v(t._s(e.phone))])])],1)],1)})),t._v(" "),n("el-divider")]}))],2)})),0),t._v(" "),0==t.tabIndex?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("my-button",{attrs:{name:"保存",site:"form"},on:{click:t.save}})],1):t._e()],1)},o=[],i=n("f6e8"),a=n("a083"),s=n("271c"),u={components:{myButton:i["a"]},mixins:[s["default"]],props:{setting:{type:Object,default:function(){}}},data:function(){return{loading:!0,tabs:["修改使用人","使用记录"],tabIndex:0,list:[],formData:{list:[]},rules:{code:[{required:!0,message:"请输入机构编号",trigger:"blur"}],name:[{required:!0,message:"请输入机构名称",trigger:"blur"}],status:[{required:!0,message:"请选择状态",trigger:"blur"}]}}},created:function(){var t=this;Object(a["k"])({transferOrderId:this.setting.id}).then((function(e){var n=JSON.parse(JSON.stringify(e[0].recordSkuDtoList));n.map((function(e){e.recordUserInfos.map((function(n){n.baseGoodModelId=e.baseGoodModelId,n.baseUnit=e.unit,n.businessId=t.setting.id,n.count=n.num,n.tel=n.phone,n.procureModelId=e.procureModelId,n.userName=n.useName,n.isEdit=!1}))})),t.formData.list=n,t.list=e,t.loading=!1}))},methods:{getEditInfo:function(t){},handleEditItem:function(t){t.isEdit=!t.isEdit,t.isEdit||(console.log(t),t.phone=t.tel,t.userName=t.useName)},close:function(){this.$emit("close")},save:function(){var t=this;this.$refs.ruleForm.validate((function(e){if(e){var n=[];t.formData.list.map((function(t){t.recordUserInfos.map((function(t){n.push(t)}))})),Object(a["j"])({recordInfoList:n}).then((function(e){t.$message.success("保存成功!"),t.close(),t.$emit("search")})).catch((function(){t.$message.error("保存失败")}))}else t.$message.error("校验未通过,请检查。")}))}}},l=u,c=(n("4148"),n("2877")),d=Object(c["a"])(l,r,o,!1,null,"3207ba22",null);e["default"]=d.exports},"271c":function(t,e,n){"use strict";n.r(e);var r=n("6f7e"),o=n("2f62"),i=n("ac29"),a=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 u(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 l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){c(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(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=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:l(l({},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)"});i[t](n).then((function(t){console.log(t),Object(a["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)}}}},4148:function(t,e,n){"use strict";n("87e5")},"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 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),i=e.slice(8,10),a=e.slice(10,12),s=e.slice(12,14),u=n+"-"+r+"-"+o+" "+i+":"+a+":"+s;return u}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),i=n+"-"+r+"-"+o;return i}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 i=n[r]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?i:o(i))}return e}catch(a){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"),i=t.getMinutes().toString().padStart(2,"0"),a=t.getSeconds().toString().padStart(2,"0");return"".concat(e,"-").concat(n,"-").concat(r," ").concat(o,":").concat(i,":").concat(a)}function l(){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 c(t){if(t){t instanceof Date||(t=new Date(t.replace(/-/g,"/")));var e=t.getTime(),n=6e4,r=60*n,o=24*r,i=7*o,a=30*o,s=(new Date).getTime(),u=s-e;if(!(u<0)){var l=u/n,c=u/r,d=u/o,f=u/i,m=u/a,p="";if(m>=1&&m<=3)p=" "+parseInt(m)+"月前";else if(f>=1&&f<=3)p=" "+parseInt(f)+"周前";else if(d>=1&&d<=6)p=" "+parseInt(d)+"天前";else if(c>=1&&c<=23)p=" "+parseInt(c)+"小时前";else if(l>=1&&l<=59)p=" "+parseInt(l)+"分钟前";else if(u>=0&&u<=n)p="刚刚";else{var g=new Date;g.setTime(e);var h=g.getFullYear(),b=g.getMonth()+1<10?"0"+(g.getMonth()+1):g.getMonth()+1,v=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();p=h+"-"+b+"-"+v}return p}}}n.r(e),n.d(e,"DateToLong",(function(){return r})),n.d(e,"LongToDateTime",(function(){return i})),n.d(e,"LongToDate",(function(){return a})),n.d(e,"formatDate",(function(){return s})),n.d(e,"formattedDate",(function(){return u})),n.d(e,"formattedDateDuan",(function(){return l})),n.d(e,"timeago",(function(){return c}))},"87e5":function(t,e,n){},a083:function(t,e,n){"use strict";n.d(e,"d",(function(){return o})),n.d(e,"f",(function(){return i})),n.d(e,"g",(function(){return a})),n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return u})),n.d(e,"e",(function(){return l})),n.d(e,"h",(function(){return c})),n.d(e,"c",(function(){return d})),n.d(e,"i",(function(){return f})),n.d(e,"k",(function(){return m})),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 i(t){return Object(r["a"])({url:"/pc/l/wh/form/transfer/import",method:"post",data:t})}function a(t){return Object(r["a"])({url:"/pc/l/wh/form/transfer/list",method:"get",params:t})}function s(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 l(t){return Object(r["a"])({url:"/pc/l/wh/form/transfer/detail",method:"get",params:t})}function c(t){return Object(r["a"])({url:"/pc/l/wh/form/transfer/output",method:"post",params:t})}function d(t){return Object(r["a"])({url:"/pc/l/wh/form/transfer/income",method:"post",params:t})}function f(t){return Object(r["a"])({url:"/pc/l/wh/form/transfer/updStatus",method:"post",params:t})}function m(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})}},ac29:function(t,e,n){"use strict";n.r(e),n.d(e,"outputExport",(function(){return o})),n.d(e,"procureExport",(function(){return i})),n.d(e,"transferExport",(function(){return a})),n.d(e,"inventoryExport",(function(){return s})),n.d(e,"scrappedExport",(function(){return u})),n.d(e,"deptScrappedExport",(function(){return l}));var r=n("b775");function o(t){return Object(r["a"])({url:"/pc/l/wh/form/output/list/export",method:"get",params:t})}function i(t){return Object(r["a"])({url:"/pc/whForm/procure/list/export",method:"get",params:t})}function a(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 u(t){return Object(r["a"])({url:"/pc/l/wh/form/scrapped/list/export",method:"get",params:t})}function l(t){return Object(r["a"])({url:"/pc/l/wh/form/scrapped/deptList/export",method:"get",params:t})}}}]);
|