You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
32 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["package1/index/waitStorageDetail"],{"0236":function(t,e,a){"use strict";(function(t,s){var i=a("47a9"),u=a("3b2d");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(a("7eb4")),r=i(a("ee10")),o=(i(a("60b9")),function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==u(t)&&"function"!==typeof t)return{default:t};var a=c(e);if(a&&a.has(t))return a.get(t);var s={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in t)if("default"!==n&&Object.prototype.hasOwnProperty.call(t,n)){var r=i?Object.getOwnPropertyDescriptor(t,n):null;r&&(r.get||r.set)?Object.defineProperty(s,n,r):s[n]=t[n]}s.default=t,a&&a.set(t,s);return s}(a("769c")));i(a("2df0"));function c(t){if("function"!==typeof WeakMap)return null;var e=new WeakMap,a=new WeakMap;return(c=function(t){return t?a:e})(t)}var l={data:function(){return{sales:{},goodsList:[],isReturn:!1,shouldPay:0,shopOwnerPhone:t.getStorageSync("shopOwnerPhone"),username:t.getStorageSync("username"),shopId:"",shopName:t.getStorageSync("shopName"),noPay:0,claerSubmitBtn:0,alreadyPay:0,otherPay:0,bufferData:[],remark:"",list:[],printHeight:0,qianhuoCount:0,zhiqianqiankuan:0,isShare:!1,yuedikou:0,leijiqiankuan:0,id:"",type:"",bigImg:[],supplier:[],dealings:[],collection:[],returnInv:0,storeFlag:""}},components:{kkPrinter:function(){Promise.all([a.e("common/vendor"),a.e("components/kk-printer/index")]).then(function(){return resolve(a("4af3"))}.bind(null,a)).catch(a.oe)}},filters:{sliceMsg:function(t){var e="";if("string"==typeof t){var a=JSON.parse(t);for(var s in a)e+=a[s]+"/"}return e}},onShareAppMessage:function(){return s.updateShareMenu({isPrivateMessage:!0,success:function(){},fail:function(){}}),1==this.returnInv?{title:this.shopName+" "+this.sales.createTime+"的采购退货单",imageUrl:"https://jewel-shop.oss-cn-beijing.aliyuncs.com/b28b3d46c21d4f60a334b25f56175cf3.jpg",path:"/package1/index/waitStorageDetail?returnInv=1&id="+this.sales.id+"&shopId="+t.getStorageSync("shopId")}:{title:this.shopName+" "+this.sales.createTime+"的采购单",imageUrl:"https://jewel-shop.oss-cn-beijing.aliyuncs.com/b28b3d46c21d4f60a334b25f56175cf3.jpg",path:"/package1/index/waitStorageDetail?id="+this.sales.id+"&shopId="+t.getStorageSync("shopId")}},onShow:function(){s.openBluetoothAdapter({mode:"central"}),this.shopId=t.getStorageSync("shopId")},onLoad:function(e){this.id=e.id,this.returnInv=e.returnInv,this.storeFlag=e.storeFlag||"",1==e.returnInv?(this.getWaitStorage(e.id),t.setNavigationBarTitle({title:"采购退货详情"})):(this.getWaitStorage(e.id),this.collectionList(e.id)),this.isShare=!!e.shopId,this.type=t.getStorageSync("type")},methods:{confirmInventory:function(){for(var e=this,a=[],s=0;s<e.goodsList.length;s++)if(e.goodsList[s].purchaseQian>0){var i={productName:e.goodsList[s].productName,productSn:e.goodsList[s].productSn,productId:e.goodsList[s].productId,productCount:e.goodsList[s].purchaseQian};a.push(i)}e.$nextTick((function(){e.tui.request("/app/purchaseConfirm/addPurchaseConfirm","POST",{purchaseId:e.sales.id,purchaseTime:e.sales.createTime,createBy:e.sales.createBy,createByName:e.sales.createByName,supplierName:e.sales.supplierName,supplierId:e.sales.supplierId,purchaseConfirmDetailsList:a},!1,!1).then((function(a){200==a.code?(t.showToast({title:"确认成功!",icon:"none",duration:1e3}),t.navigateBack()):e.tui.toast(a.message)})).catch((function(t){}))}))},getPrintHeight:function(){this.printHeight=960;for(var t=0;t<this.newData.length;t++){this.printHeight+=40;for(var e=0;e<this.newData[t].stockLogList1.length;e++)this.printHeight+=40}},getChildrenPic:function(t){var e=this,a=this;this.tui.request("/app/productPicture/getProductPictureByProductId","POST",{productId:t.productId},!1,!0).then((function(s){if(200==s.code){if(t.productPictures=[],s.result.length>0)for(var i=0;i<s.result.length;i++){var u={productPicture:s.result[i].productPicture};t.productPictures.push(u)}setTimeout((function(e){a.largeImg(t)}),400)}else e.tui.toast(s.message)})).catch((function(t){}))},l