1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/shiftHandover/shiftHandover"],{1154:function(e,n,t){"use strict";t.r(n);var o=t("c0af"),a=t("5e8f");for(var i in a)"default"!==i&&function(e){t.d(n,e,(function(){return a[e]}))}(i);t("d10c");var u,r=t("f0c5"),l=Object(r["a"])(a["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],u);n["default"]=l.exports},"232a":function(e,n,t){},"5a4d":function(e,n,t){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;t("cea2"),o(t("66fd")),t("2933");function o(e){return e&&e.__esModule?e:{default:e}}var a=function(){Promise.all([t.e("common/vendor"),t.e("components/htz-image-upload/htz-image-upload")]).then(function(){return resolve(t("6e8d"))}.bind(null,t)).catch(t.oe)},i={components:{htzImageUpload:a},data:function(){return{req:{materialName:null},formData:[],userList:[],materialList:[],successorName:null,successorId:null,userData:null,materialIndex:null}},onLoad:function(n){var t=this;t.getUser(),e.getStorage({key:"userInfo",success:function(e){t.userData=e.data},fail:function(){}})},methods:{selectMaterialList:function(e){var n=this;console.log(e),n.formData[n.materialIndex].qrCode=null,n.formData[n.materialIndex].qrCodeName=e.name,n.formData[n.materialIndex].quantity=null,n.formData[n.materialIndex].materialId=e.id,console.log(n.formData)},addShift:function(){var n=this;if(console.log(n.formData,123123123),n.successorId)if(0!=n.formData.length){for(var t=0;t<n.formData.length;t++){var o=n.formData[t];if(o.shiftHandoverPersonneId=n.userData.id,o.successorId=n.successorId,o.count=n.formData.length,console.log(o.weighingResults),0==o.weighingResults||!o.weighingResults)return void e.showToast({icon:"none",title:"请填写物料剩余数量",duration:2e3});if(!o.materialId)return void e.showToast({icon:"none",title:"请选择物料",duration:2e3})}n.$post("/mgr/shiftChange/addShift",n.formData).then((function(n){200==n.code&&(e.showToast({title:"提交成功,跳转中!"}),setTimeout((function(){wx.reLaunch({url:"/pages/home"})}),500))}))}else e.showToast({icon:"none",title:"请添加明细",duration:2e3});else e.showToast({icon:"none",title:"请选择交接人员",duration:2e3})},add:function(){var e=this;e.formData.push({shiftHandoverPersonneId:null,successorId:null,qrCode:null,qrCodeName:null,materialId:null,quantity:null,convolution:0,outerPackaging:0,weighingResults:0})},scanCode:function(n){var t=this;e.scanCode({onlyFromCamera:!0,success:function(o){e.showToast({icon:"loading",title:"加载中",duration:1500}),t.$post("/wx/common/gerMaterialInfoByQrcode",{qrCode:o.result}).then((function(e){200==e.code&&(t.formData[n].qrCode=e.data.qrCode,t.formData[n].qrCodeName=e.data.materialName,t.formData[n].quantity=e.data.quantity,t.formData[n].materialId=e.data.materialId)}))}})},openSelectQd:function(e){var n=this;n.materialIndex=e,this.$refs.popup.open("top")},reload:function(){this.req.keyword=null,this.getMaterial()},getMaterial:function(){var e=this;e.$post("/wx/common/getMaterial",e.req).then((function(n){200==n.code&&(e.materialList=n.data)}))},getUser:function(){var e=this;e.$post("/wx/common/getUser",e.formData).then((function(n){200==n.code&&(e.userList=n.data)}))},switchChange:function(e,n,t){var o=this;e.detail.value?o.formData[n][t]=1:o.formData[n][t]=0,console.log(o.formData)},bindPickerChange2:function(e){var n=this;console.log(n.userList[e.detail.value]),n.successorName=n.userList[e.detail.value].nickName,n.successorId=n.userList[e.detail.value].userId}}};n.default=i}).call(this,t("543d")["default"])},"5e8f":function(e,n,t){"use strict";t.r(n);var o=t("5a4d"),a=t.n(o);for(var i in o)"default"!==i&&function(e){t.d(n,e,(function(){return o[e]}))}(i);n["default"]=a.a},8355:function(e,n,t){"use strict";(function(e){t("6b59");o(t("66fd"));var n=o(t("1154"));function o(e){return e&&e.__esModule?e:{default:e}}wx.__webpack_require_UNI_MP_PLUGIN__=t,e(n.default)}).call(this,t("543d")["createPage"])},c0af:function(e,n,t){"use strict";t.d(n,"b",(function(){return a})),t.d(n,"c",(function(){return i})),t.d(n,"a",(function(){return o}));var o={uniForms:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/@dcloudio/uni-ui/lib/uni-forms/uni-forms")]).then(t.bind(null,"0588"))},uniFormsItem:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/@dcloudio/uni-ui/lib/uni-forms-item/uni-forms-item")]).then(t.bind(null,"7d31"))},uniIcons:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/@dcloudio/uni-ui/lib/uni-icons/uni-icons")]).then(t.bind(null,"4537"))},uniEasyinput:function(){return t.e("node-modules/@dcloudio/uni-ui/lib/uni-easyinput/uni-easyinput").then(t.bind(null,"d2c0"))},uniPopup:function(){return t.e("node-modules/@dcloudio/uni-ui/lib/uni-popup/uni-popup").then(t.bind(null,"6924"))},uniSearchBar:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/@dcloudio/uni-ui/lib/uni-search-bar/uni-search-bar")]).then(t.bind(null,"4eaf"))}},a=function(){var e=this,n=e.$createElement;e._self._c;e._isMounted||(e.e0=function(n,t){var o=[],a=arguments.length-2;while(a-- >0)o[a]=arguments[a+2];var i=o[o.length-1].currentTarget.dataset,u=i.eventParams||i["event-params"];t=u.index;return e.switchChange(n,t,"outerPackaging")},e.e1=function(n,t){var o=[],a=arguments.length-2;while(a-- >0)o[a]=arguments[a+2];var i=o[o.length-1].currentTarget.dataset,u=i.eventParams||i["event-params"];t=u.index;return e.switchChange(n,t,"convolution")})},i=[]},d10c:function(e,n,t){"use strict";var o=t("232a"),a=t.n(o);a.a}},[["8355","common/runtime","common/vendor"]]]);
|