inOut.js 4.0 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/inOut/inOut"],{2569:function(t,o,e){"use strict";e.r(o);var n=e("83f5"),a=e("832f");for(var u in a)"default"!==u&&function(t){e.d(o,t,(function(){return a[t]}))}(u);e("fc3f");var i,s=e("f0c5"),r=Object(s["a"])(a["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],i);o["default"]=r.exports},5681:function(t,o,e){"use strict";(function(t){e("6b59");n(e("66fd"));var o=n(e("2569"));function n(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=e,t(o.default)}).call(this,e("543d")["createPage"])},"7a7a":function(t,o,e){},"832f":function(t,o,e){"use strict";e.r(o);var n=e("bb58"),a=e.n(n);for(var u in n)"default"!==u&&function(t){e.d(o,t,(function(){return n[t]}))}(u);o["default"]=a.a},"83f5":function(t,o,e){"use strict";e.d(o,"b",(function(){return a})),e.d(o,"c",(function(){return u})),e.d(o,"a",(function(){return n}));var n={uniForms:function(){return Promise.all([e.e("common/vendor"),e.e("node-modules/@dcloudio/uni-ui/lib/uni-forms/uni-forms")]).then(e.bind(null,"0588"))},uniFormsItem:function(){return Promise.all([e.e("common/vendor"),e.e("node-modules/@dcloudio/uni-ui/lib/uni-forms-item/uni-forms-item")]).then(e.bind(null,"7d31"))},uniIcons:function(){return Promise.all([e.e("common/vendor"),e.e("node-modules/@dcloudio/uni-ui/lib/uni-icons/uni-icons")]).then(e.bind(null,"4537"))}},a=function(){var t=this,o=t.$createElement;t._self._c},u=[]},bb58:function(t,o,e){"use strict";(function(t){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;e("cea2");var n=u(e("66fd")),a=e("2933");function u(t){return t&&t.__esModule?t:{default:t}}var i={data:function(){return{stockChangeData:[{text:"出库",value:20},{text:"补出库",value:23},{text:"绑定错误",value:24},{text:"退货出库",value:26},{text:"报废出库",value:27}],listData:[],formData:{stockHouseId:null,stockHouseName:null,qrCodeList:[]},req:{qrCodeList:[],stockHouseId:null},btnType:1,isScanCode:!1,userData:{},dtlData:null,qrCodeList:[],index:0,stockHouseData:[],date:null,userList:[],quantitytol:0}},onLoad:function(t){var o=this;o.userData=n.default.prototype.$userInfo,o.$post("/wx/common/getStockHouse",{}).then((function(t){o.stockHouseData=t.data})),o.date=(0,a.getTime)().substr(0,11),o.$post("/wx/common/getUser",{}).then((function(t){o.userList=t.data}))},methods:{addOutInfo:function(){var o=this;if(0!=o.qrCodeList.length){o.req.qrCodeList=[];for(var e=0;e<o.qrCodeList.length;e++)o.formData.qrCodeList.push(o.qrCodeList[e].qrCode);console.log(o.formData),o.$post("/wx/codeScanInOut/transfer",o.formData).then((function(o){200==o.code&&(t.showToast({title:"调仓成功,跳转中!"}),setTimeout((function(){wx.reLaunch({url:"/pages/home"})}),2e3))}))}else t.showToast({icon:"error",title:"请添加物料信息",duration:2e3})},delelte:function(o){var e=this;t.showModal({title:"提示",content:"你确定删除此信息么?",success:function(t){t.confirm&&(e.quantitytol=e.quantitytol-e.qrCodeList[o].quantity,e.qrCodeList.splice(o,1))}})},bindPickerChange:function(t){var o=this;o.formData.stockHouseId=o.stockHouseData[t.detail.value].id,o.addOutInfo()},scanCode:function(o){var e=this;t.scanCode({onlyFromCamera:!0,success:function(n){t.showToast({icon:"loading",title:"加载中",duration:1500}),e.$post("/wx/common/gerMaterialInfoByQrcode",{qrCode:n.result}).then((function(n){if(n.data.stockHouseId){if(e.dtlData){if(e.dtlData.stockHouseId!=n.data.stockHouseId)return void t.showToast({icon:"error",title:"仓库不一致",duration:2e3})}else{e.dtlData=n.data;for(var a=0;a<e.stockHouseData.length;a++)e.stockHouseData[a].id==e.dtlData.stockHouseId&&(console.log("找到"),e.stockHouseData.splice(a,1))}e.qrCodeList.push(n.data),e.quantitytol=e.quantitytol+n.data.quantity,o&&e.scanCode(o)}else t.showToast({icon:"error",title:"此物料不在库存内!",duration:2e3})}))}})}}};o.default=i}).call(this,e("543d")["default"])},fc3f:function(t,o,e){"use strict";var n=e("7a7a"),a=e.n(n);a.a}},[["5681","common/runtime","common/vendor"]]]);