require('../../../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["packageA/pages/goods/components/CreateBound"],{403:function(n,e,o){"use strict";o.r(e);var t=o(404),u=o(406);for(var r in u)["default"].indexOf(r)<0&&function(n){o.d(e,n,(function(){return u[n]}))}(r);o(408);var i,d=o(40),s=Object(d["default"])(u["default"],t["render"],t["staticRenderFns"],!1,null,"67d18a7a",null,!1,t["components"],i);s.options.__file="packageA/pages/goods/components/CreateBound.vue",e["default"]=s.exports},404:function(n,e,o){"use strict";o.r(e);var t=o(405);o.d(e,"render",(function(){return t["render"]})),o.d(e,"staticRenderFns",(function(){return t["staticRenderFns"]})),o.d(e,"recyclableRender",(function(){return t["recyclableRender"]})),o.d(e,"components",(function(){return t["components"]}))},405:function(n,e,o){"use strict";var t;o.r(e),o.d(e,"render",(function(){return u})),o.d(e,"staticRenderFns",(function(){return i})),o.d(e,"recyclableRender",(function(){return r})),o.d(e,"components",(function(){return t}));try{t={uniDrawer:function(){return o.e("uni_modules/uni-drawer/components/uni-drawer/uni-drawer").then(o.bind(null,450))},uniSection:function(){return o.e("uni_modules/uni-section/components/uni-section/uni-section").then(o.bind(null,160))},uniForms:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uni-forms/components/uni-forms/uni-forms")]).then(o.bind(null,259))},uniFormsItem:function(){return o.e("uni_modules/uni-forms/components/uni-forms-item/uni-forms-item").then(o.bind(null,272))},uniDataSelect:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uni-data-select/components/uni-data-select/uni-data-select")]).then(o.bind(null,356))},uniEasyinput:function(){return o.e("uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput").then(o.bind(null,252))},uniDatetimePicker:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker")]).then(o.bind(null,457))},uniCard:function(){return o.e("uni_modules/uni-card/components/uni-card/uni-card").then(o.bind(null,217))},uniList:function(){return o.e("uni_modules/uni-list/components/uni-list/uni-list").then(o.bind(null,231))},uniListItem:function(){return o.e("uni_modules/uni-list/components/uni-list-item/uni-list-item").then(o.bind(null,238))},uniTag:function(){return o.e("uni_modules/uni-tag/components/uni-tag/uni-tag").then(o.bind(null,175))}}}catch(d){if(-1===d.message.indexOf("Cannot find module")||-1===d.message.indexOf(".vue"))throw d;console.error(d.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var u=function(){var n=this,e=n.$createElement,o=(n._self._c,"in"===n.type?n.form.goodsDesc.length||0:null),t="out"===n.type?n.form.outboundLocation.length||0:null,u=n.form.remark.length||0;n.$mp.data=Object.assign({},{$root:{g0:o,g1:t,g2:u}})},r=!1,i=[];u._withStripped=!0},406:function(n,e,o){"use strict";o.r(e);var t=o(407),u=o.n(t);for(var r in t)["default"].indexOf(r)<0&&function(n){o.d(e,n,(function(){return t[n]}))}(r);e["default"]=u.a},407:function(n,e,o){"use strict";(function(n){var t=o(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=t(o(11)),r=t(o(57));o(60);function i(n,e){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.push.apply(o,t)}return o}function d(n){for(var e=1;e0&&(o=o.concat(n.children.map((function(n){return d(d({},n),{},{value:n.accountId,text:n.accountName})}))))})),o}},props:{cats:{type:Array,default:function(){return[]}}},data:function(){return{type:void 0,rules:{accountId:{rules:[{required:!0,errorMessage:"in"===this.type?"入库人员":"出库人员"}],validateTrigger:"submit"},intboundType:{rules:[{required:!0,errorMessage:"请选择入库类型"}],validateTrigger:"submit"},outboundType:{rules:[{required:!0,errorMessage:"请选择出库类型"}],validateTrigger:"submit"},goodsCatId:{rules:[{required:!0,errorMessage:"请选择物资种类"}],validateTrigger:"submit"}},inboundTypeList:[{value:1,text:"正常入库"},{value:2,text:"报溢"}],outboundTypeList:[{value:1,text:"正常出库"},{value:2,text:"报损"},{value:3,text:"过期"}],form:{groupId:void 0,groupName:void 0,inboundId:0,inboundType:1,inboundTime:"",inboundLocation:"",accountId:"",accountName:"",goodsType:"",goodsCatId:1,goodsCatTitle:"",qty:1,goodsNo:"",goodsTitle:"",goodsPdDate:"",goodsExpDate:"",goodsDesc:"",remark:"",outboundId:0,outboundType:1,outboundTime:"",outboundLocation:""}}},methods:{resetForm:function(){this.form={groupId:void 0,groupName:void 0,inboundId:0,inboundType:1,inboundTime:"",inboundLocation:"",accountId:"",accountName:"",goodsType:"",goodsCatId:1,goodsCatTitle:"",qty:1,goodsNo:"",goodsTitle:"",goodsPdDate:"",goodsExpDate:"",goodsDesc:"",remark:"",outboundId:0,outboundType:1,outboundTime:"",outboundLocation:""}},onSubmit:function(){var e=this;this.$refs.form.validate().then((function(o){var t="in"===e.type?r.default.createInbound:r.default.createOutbound,u=e.userList.find((function(n){return e.form.accountId===n.accountId})),i=e.goodsCats.find((function(n){return e.form.goodsCatId===n.value})),s={accountId:u.accountId,accountName:u.accountName,positionId:u.positionId,positionName:u.positionName,ocId:e.ocId,goodsType:e.form.goodsType,goodsCatId:i.value,goodsCatTitle:i.text,qty:e.form.qty,remark:e.form.remark};s="in"===e.type?d(d({},s),{},{goodsNo:e.form.goodsNo,goodsTitle:e.form.goodsTitle,goodsPdDate:e.form.goodsPdDate,goodsExpDate:e.form.goodsExpDate,goodsDesc:e.form.goodsDesc,inboundId:e.form.inboundId,inboundType:e.form.inboundType,inboundTime:e.form.inboundTime,inboundLocation:e.form.inboundLocation}):d(d({},s),{},{outboundId:e.form.outboundId,outboundType:e.form.outboundType,outboundTime:e.form.outboundTime,outboundLocation:e.form.outboundLocation}),t(s).then((function(){n.showToast({icon:"none",title:"成功!!"}),e.$emit("success","in"===e.type?1:2),e.close()}))})).catch((function(e){n.showToast({icon:"none",title:"请检查填写信息!"})}))},show:function(n){var e=n.type,o=n.item;this.resetForm(),this.form=d(d({},this.form),o),this.type=e,this.$refs.drawer.open()},close:function(){this.$refs.drawer.close()}}};e.default=s}).call(this,o(2)["default"])},408:function(n,e,o){"use strict";o.r(e);var t=o(409),u=o.n(t);for(var r in t)["default"].indexOf(r)<0&&function(n){o.d(e,n,(function(){return t[n]}))}(r);e["default"]=u.a},409:function(n,e,o){}}]); //# sourceMappingURL=../../../../../.sourcemap/mp-weixin/packageA/pages/goods/components/CreateBound.js.map ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([ 'packageA/pages/goods/components/CreateBound-create-component', { 'packageA/pages/goods/components/CreateBound-create-component':(function(module, exports, __webpack_require__){ __webpack_require__('2')['createComponent'](__webpack_require__(403)) }) }, [['packageA/pages/goods/components/CreateBound-create-component']] ]);