goOut.js 4.2 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/goOut/goOut"],{"10be":function(t,e,o){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;o("b942");var n=u(o("66fd")),a=o("fc40");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:{operUserName:"",qrCodeList:[],stockChangeType:null,operUserId:null},req:{qrCodeList:[],stockHouseId:null},btnType:1,isScanCode:!1,userData:{},dtlData:null,qrCodeList:[],index:0,stockHouseData:[],date:null,userList:[],quantitytol:0}},onLoad:function(t){var e=this;e.userData=n.default.prototype.$userInfo,e.$post("/wx/common/getStockHouse",{}).then((function(t){e.stockHouseData=t.data})),e.date=(0,a.getTime)().substr(0,11),e.$post("/wx/common/getUser",{}).then((function(t){e.userList=t.data}))},methods:{addOutInfo:function(){var e=this;if(0!=e.qrCodeList.length)if(e.formData.operUserId)if(e.formData.stockChangeType){e.req.qrCodeList=[];for(var o=0;o<e.qrCodeList.length;o++)e.formData.qrCodeList.push(e.qrCodeList[o].qrCode);console.log(e.formData),e.$post("/wx/codeScanOut/addOutInfo",e.formData).then((function(e){200==e.code&&(t.showToast({title:"出库成功,跳转中!"}),setTimeout((function(){wx.reLaunch({url:"/pages/home"})}),2e3))}))}else t.showToast({icon:"error",title:"请选择出库类型",duration:2e3});else t.showToast({icon:"error",title:"请选择领料人",duration:2e3});else t.showToast({icon:"error",title:"请添加物料信息",duration:2e3})},delelte:function(e){var o=this;t.showModal({title:"提示",content:"你确定删除此信息么?",success:function(t){t.confirm&&(o.quantitytol=o.quantitytol-o.qrCodeList[e].quantity,o.qrCodeList.splice(e,1))}})},bindPickerChange:function(t){var e=this;e.formData.operUserName=e.userList[t.detail.value].nickName,e.formData.operUserId=e.userList[t.detail.value].userId},scanCode:function(e){var o=this;t.scanCode({onlyFromCamera:!0,success:function(n){t.showToast({icon:"loading",title:"加载中",duration:1500}),o.$post("/wx/common/gerMaterialInfoByQrcode",{qrCode:n.result}).then((function(n){for(var a=0;a<o.qrCodeList.length;a++)if(o.qrCodeList[a].qrCode==n.data.qrCode)return void t.showToast({icon:"error",title:"此二维码已扫描",duration:2e3});n.data.stockHouseId?(o.qrCodeList.push(n.data),o.quantitytol=n.data.quantity+o.quantitytol,e&&o.scanCode(e)):t.showToast({icon:"error",title:"此物料不在库存内!",duration:2e3})}))}})}}};e.default=i}).call(this,o("543d")["default"])},"3eae":function(t,e,o){"use strict";var n=o("cc54"),a=o.n(n);a.a},"53d3":function(t,e,o){"use strict";o.d(e,"b",(function(){return a})),o.d(e,"c",(function(){return u})),o.d(e,"a",(function(){return n}));var n={uniForms:function(){return Promise.all([o.e("common/vendor"),o.e("node-modules/@dcloudio/uni-ui/lib/uni-forms/uni-forms")]).then(o.bind(null,"d154"))},uniFormsItem:function(){return Promise.all([o.e("common/vendor"),o.e("node-modules/@dcloudio/uni-ui/lib/uni-forms-item/uni-forms-item")]).then(o.bind(null,"2df5"))},uniDataCheckbox:function(){return Promise.all([o.e("common/vendor"),o.e("node-modules/@dcloudio/uni-ui/lib/uni-data-checkbox/uni-data-checkbox")]).then(o.bind(null,"1bea"))},uniIcons:function(){return Promise.all([o.e("common/vendor"),o.e("node-modules/@dcloudio/uni-ui/lib/uni-icons/uni-icons")]).then(o.bind(null,"e302"))}},a=function(){var t=this,e=t.$createElement;t._self._c},u=[]},"9cea":function(t,e,o){"use strict";o.r(e);var n=o("10be"),a=o.n(n);for(var u in n)"default"!==u&&function(t){o.d(e,t,(function(){return n[t]}))}(u);e["default"]=a.a},b1a9:function(t,e,o){"use strict";(function(t){o("68a8");n(o("66fd"));var e=n(o("b3df"));function n(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=o,t(e.default)}).call(this,o("543d")["createPage"])},b3df:function(t,e,o){"use strict";o.r(e);var n=o("53d3"),a=o("9cea");for(var u in a)"default"!==u&&function(t){o.d(e,t,(function(){return a[t]}))}(u);o("3eae");var i,r=o("f0c5"),s=Object(r["a"])(a["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],i);e["default"]=s.exports},cc54:function(t,e,o){}},[["b1a9","common/runtime","common/vendor"]]]);