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