goOut.js 4.2 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/goOut/goOut"],{"11cd":function(t,e,o){"use strict";o.d(e,"b",(function(){return u})),o.d(e,"c",(function(){return i})),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,"0588"))},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,"7d31"))},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,"8bbc"))},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,"4537"))}},u=function(){var t=this,e=t.$createElement;t._self._c},i=[]},"13d8":function(t,e,o){"use strict";(function(t){o("6b59");n(o("66fd"));var e=n(o("1e0f"));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"])},"1e0f":function(t,e,o){"use strict";o.r(e);var n=o("11cd"),u=o("f1ed");for(var i in u)"default"!==i&&function(t){o.d(e,t,(function(){return u[t]}))}(i);o("61ce");var r,a=o("f0c5"),s=Object(a["a"])(u["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],r);e["default"]=s.exports},"1e43":function(t,e,o){},"61ce":function(t,e,o){"use strict";var n=o("1e43"),u=o.n(n);u.a},c0bf:function(t,e,o){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;o("cea2");var n=i(o("66fd")),u=o("2933");function i(t){return t&&t.__esModule?t:{default:t}}var r={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,u.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 u=0;u<o.qrCodeList.length;u++)if(o.qrCodeList[u].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=r}).call(this,o("543d")["default"])},f1ed:function(t,e,o){"use strict";o.r(e);var n=o("c0bf"),u=o.n(n);for(var i in n)"default"!==i&&function(t){o.d(e,t,(function(){return n[t]}))}(i);e["default"]=u.a}},[["13d8","common/runtime","common/vendor"]]]);