pages-receipt-batch-detail.161e8dd0.js
15.6 KB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-receipt-batch-detail"],{"0a02":function(t,e,n){"use strict";var i=n("bf3f"),o=n.n(i);o.a},"19ef":function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return i}));var i={uniIcons:n("1968").default,uniPopup:n("71e4").default},o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",[n("v-uni-view",{staticClass:"content"},[n("v-uni-view",{staticClass:"top"},[n("v-uni-view",{staticClass:"common u-f u-f-jcsb plr-10"},[n("v-uni-view",[t._v("入库单号")]),n("v-uni-view",[t._v(t._s(t.detailInfo.code))])],1),n("v-uni-view",{staticClass:"common u-f u-f-jcsb plr-10"},[n("v-uni-view",[t._v("入库状态")]),n("v-uni-view",[t.detailInfo.lastStatus>=800?n("v-uni-text",{staticClass:"already"},[t._v("已完成")]):n("v-uni-text",{staticClass:"not"},[t._v("未完成")])],1)],1),n("v-uni-view",{staticClass:"common u-f u-f-jcsb plr-10"},[n("v-uni-view",[t._v("入库类型")]),n("v-uni-view",[t._v(t._s(t.receiptTypeFormat(t.detailInfo.receiptType)))])],1),n("v-uni-view",{staticClass:"common u-f u-f-jcsb plr-10"},[n("v-uni-view",[t._v("入库仓库")]),n("v-uni-view",[t._v(t._s(t.warehouseCodeFormat(t.detailInfo.warehouseCode)))])],1),n("v-uni-view",{staticClass:"common u-f u-f-jcsb plr-10"},[n("v-uni-view",[t._v("入库日期")]),n("v-uni-view",[t._v(t._s(t.formatDate(t.detailInfo.created)))])],1)],1),n("v-uni-view",{staticClass:"center"},[n("v-uni-view",{staticClass:"common u-f u-f-jcsb plr-10"},[n("v-uni-view",[t._v("物料")]),n("v-uni-view",{staticClass:"num"},[t._v("合计数量:"+t._s(t.materialTotal))])],1),n("v-uni-view",{staticClass:"select-content"},t._l(t.materialArr,(function(e,i){return n("v-uni-view",{key:i,staticClass:"select-list u-f u-f-jcsb u-f-aic plr-10",on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.showPop(e)}}},[n("v-uni-view",{staticClass:"left-content"},[n("v-uni-view",{staticClass:"name"},[t._v(t._s(e.materialName))]),n("v-uni-view",{staticClass:"code"},[t._v("编号:"+t._s(e.materialCode))]),n("v-uni-view",{staticClass:"total"},[t._v("数量:"+t._s(e.totalQty)+t._s(t.detailInfo.materialUnit))])],1),n("v-uni-view",{staticClass:"spec u-f u-f-aic"},[n("v-uni-text",{staticClass:"model"},[t._v("型号:"+t._s(e.materialSpec))]),n("uni-icons",{attrs:{type:"arrowright",size:"18",color:"gray"}})],1)],1)})),1)],1),n("v-uni-view",{staticClass:"bottom"},[n("v-uni-view",{staticClass:"common u-f u-f-jcsb plr-10"},[n("v-uni-view",[t._v("货主")]),n("v-uni-view",[t._v(t._s(t.companyCodeFormat(t.detailInfo.companyCode)))])],1),n("v-uni-view",{staticClass:"common u-f u-f-jcsb plr-10"},[n("v-uni-view",[t._v("创建人")]),n("v-uni-view",[t._v(t._s(t.detailInfo.createdBy))])],1),n("v-uni-view",{staticClass:"common u-f u-f-jcsb plr-10"},[n("v-uni-view",[t._v("创建时间")]),n("v-uni-view",[t._v(t._s(t.formatTime(t.detailInfo.created)))])],1)],1)],1),n("v-uni-view",{directives:[{name:"show",rawName:"v-show",value:1==t.flag,expression:"flag == true"}],staticClass:"mask",on:{touchmove:function(e){e.stopPropagation(),e.preventDefault(),arguments[0]=e=t.$handleEvent(e)},click:function(e){arguments[0]=e=t.$handleEvent(e),t.maskClick.apply(void 0,arguments)}}},[n("v-uni-view",{staticClass:"operate"},[t.firstStatus<100?n("v-uni-view",{staticClass:"modify",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.goEdit(t.detailInfo.id)}}},[t._v("修改")]):t._e(),t.firstStatus<100?n("v-uni-view",{staticClass:"delete",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.delReceipt(t.detailInfo.id,t.index)}}},[t._v("删除")]):t._e(),t.lastStatus<800?n("v-uni-view",{staticClass:"receive",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.receive(t.materialArr)}}},[t._v("收货")]):t._e(),t.containerIds.length>0?n("v-uni-view",{staticClass:"cancel-receive",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.cancelReceipt.apply(void 0,arguments)}}},[t._v("取消收货")]):t._e()],1),n("v-uni-view",{staticClass:"cancel"},[t._v("取消")])],1),n("uni-popup",{ref:"popup",attrs:{type:"bottom"}},[n("v-uni-view",{staticClass:"pop-box"},[n("v-uni-view",{staticClass:"pop-title u-f u-f-jcsb u-f-aic plr-10"},[n("v-uni-view",[t._v("查看明细")]),n("v-uni-view",{staticClass:"u-f u-f-aic",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.clearCart.apply(void 0,arguments)}}},[n("uni-icons",{attrs:{type:"close",size:"17"}}),n("v-uni-text",{staticClass:"clear",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.popClose.apply(void 0,arguments)}}},[t._v("关闭")])],1)],1),n("v-uni-view",{staticClass:"pop-content",on:{touchmove:function(e){e.stopPropagation(),e.preventDefault(),arguments[0]=e=t.$handleEvent(e)}}},[n("v-uni-view",{staticClass:"content-top plr-10"},[n("v-uni-view",{staticClass:"u-f u-f-jcsb"},[n("v-uni-view",{staticClass:"name"},[t._v(t._s(t.detailInfo.materialName))])],1),n("v-uni-view",{staticClass:"u-f u-f-jcsb c-s"},[n("v-uni-view",[t._v("编号:"+t._s(t.detailInfo.materialCode))]),n("v-uni-view",[t._v("型号:"+t._s(t.detailInfo.materialSpec))])],1)],1),n("v-uni-view",{staticClass:"content-center"},[n("v-uni-view",{staticClass:"u-f u-f-jcsb qty plr-10"},[n("v-uni-view",[t._v("总数量")]),n("v-uni-view",[t._v(t._s(t.detailInfo.totalQty)+t._s(t.detailInfo.materialUnit))])],1),n("v-uni-view",{staticClass:"u-f u-f-jcsb qty plr-10"},[n("v-uni-view",[t._v("已收数量")]),n("v-uni-view",[t._v(t._s(t.detailInfo.openQty)+t._s(t.detailInfo.materialUnit))])],1)],1)],1),n("v-uni-view",{staticClass:"pop-footer u-f u-f-aic"},[n("v-uni-button",{staticClass:"closeBtn",attrs:{type:"default",plain:!0},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.popClose.apply(void 0,arguments)}}},[t._v("关闭")])],1)],1)],1)],1)},a=[]},"2e71":function(t,e,n){"use strict";n.r(e);var i=n("e477"),o=n.n(i);for(var a in i)"default"!==a&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=o.a},"6fca":function(t,e,n){"use strict";n.r(e);var i=n("19ef"),o=n("2e71");for(var a in o)"default"!==a&&function(t){n.d(e,t,(function(){return o[t]}))}(a);n("0a02");var c,r=n("f0c5"),s=Object(r["a"])(o["default"],i["b"],i["c"],!1,null,"07b510d8",null,!1,i["a"],c);e["default"]=s.exports},bf3f:function(t,e,n){var i=n("f361");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var o=n("4f06").default;o("ac4af114",i,!0,{sourceMap:!1,shadowMode:!1})},e477:function(t,e,n){"use strict";(function(t){n("4de4"),n("4160"),n("d81d"),n("d3b7"),n("25f0"),n("159b"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={data:function(){return{flag:!1,detailInfo:{},companyArr:[],warehouseArr:[],receiptTypeArr:[],materialArr:[],receiptInfoArr:[],materialTotal:null,timer:null,timer2:null,firstStatus:null,lastStatus:null,receiptId:null,containerIds:[],index:null,code:"",id:null,batch:"",projectNo:""}},onNavigationBarButtonTap:function(){this.flag=!this.flag},onBackPress:function(){this.$prePage().handleEdit(this.index,this.detailInfo)},onLoad:function(t){var e=this;this.id=t.id,this.index=t.index,this.code=t.code,this.getReceiptHeader(t.id),this.getScanBill(t.code),this.getReceiptInfoByBill(t.code),this.$api.dict.getCompaniesByToken().then((function(t){e.companyArr=t.data})),this.$api.dict.getReceiptType().then((function(t){e.receiptTypeArr=t.data.data})),this.$api.dict.getWarehouseByUserCode(uni.getStorageSync("historyUser").username).then((function(t){e.warehouseArr=t.data.data}))},onUnload:function(){this.timer&&(clearTimeout(this.timer),this.timer=null),this.timer2&&(clearTimeout(this.timer2),this.timer2=null)},methods:{getReceiptHeader:function(t){var e=this;this.$api.receipt.getReceiptHeader(t).then((function(t){e.detailInfo=t.data.data,e.firstStatus=t.data.data.firstStatus,e.lastStatus=t.data.data.lastStatus}))},getScanBill:function(t){var e=this;this.$api.receipt.listScanBill(t).then((function(t){e.batch=t.data.data[0].batch,e.projectNo=t.data.data[0].projectNo,e.materialArr=t.data.data;var n=null;e.materialArr.forEach((function(t){n+=t.totalQty})),e.materialTotal=n}))},getReceiptInfoByBill:function(t){var e=this;this.$api.receipt.getReceiptInfoByBill(t).then((function(t){e.receiptInfoArr=t.data.data.filter((function(t){return t.status<10})),e.containerIds=e.receiptInfoArr.map((function(t){return t.id}))}))},companyCodeFormat:function(t){return this.selectCommonLabel(this.companyArr,t)},warehouseCodeFormat:function(t){return this.selectCommonLabel(this.warehouseArr,t)},receiptTypeFormat:function(t){return this.selectCommonLabel(this.receiptTypeArr,t)},showPop:function(t){this.detailInfo=t,this.$refs.popup.open()},maskClick:function(){this.flag=!1},popClose:function(){this.$refs.popup.close()},delReceipt:function(e,n){var i=this;uni.showModal({title:"提示",content:"确定要删除吗?",success:function(o){o.confirm?(i.flag=!1,i.$api.receipt.delReceiptHeader(e).then((function(t){200==t.data.code?(i.$prePage().handleDel(n),i.$wx.showToast({title:"删除成功!"}),i.timer=setTimeout((function(){uni.navigateBack()}),400)):uni.showModal({title:"提示",content:t.data.msg})}))):o.cancel&&t.log("用户点击取消")}})},cancelReceipt:function(){var e=this;uni.showModal({title:"提示",content:"确定要取消收货吗?",success:function(n){n.confirm?(e.flag=!1,e.$api.receipt.delReceiptContainer(e.containerIds.toString()).then((function(t){200==t.data.code?(e.$prePage()._data.queryParams.pageNum=1,e.$prePage().getReceiptList(),e.$wx.showToast({title:"取消收货成功!"}),e.timer2=setTimeout((function(){uni.navigateBack()}),400)):uni.showModal({title:"提示",content:t.data.msg})}))):n.cancel&&t.log("用户点击取消")}})},goEdit:function(t){try{var e=this.materialArr.map((function(t){return{companyCode:t.companyCode,name:t.materialName,code:t.materialCode,spec:t.materialSpec,unit:t.materialUnit,qty:t.totalQty}}));uni.setStorageSync("receipt_detail",e)}catch(n){}uni.navigateTo({url:"add-edit?type=edit&id="+t+"&code="+this.code+"&category="+this.detailInfo.receiptType+"&batch="+this.batch+"&projectNo="+this.projectNo})},receive:function(t){try{uni.setStorageSync("receiptDetailMaterial",t)}catch(e){}uni.navigateTo({url:"receive?receiptCode="+this.detailInfo.code+"&id="+this.id+"&code="+this.code})}}};e.default=i}).call(this,n("5a52")["default"])},f361:function(t,e,n){var i=n("24fb");e=i(!1),e.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.content[data-v-07b510d8]{overflow-y:auto}.content .top[data-v-07b510d8],\r\n.content .center[data-v-07b510d8],\r\n.content .bottom[data-v-07b510d8]{background-color:#fff}.content .top .common[data-v-07b510d8],\r\n.content .center .common[data-v-07b510d8],\r\n.content .bottom .common[data-v-07b510d8]{height:%?90?%;line-height:%?90?%;font-size:%?32?%;border-bottom:%?2?% solid #e5e5e5}.content .top .common .already[data-v-07b510d8],\r\n.content .center .common .already[data-v-07b510d8],\r\n.content .bottom .common .already[data-v-07b510d8]{color:#4cd964}.content .top .common .not[data-v-07b510d8],\r\n.content .center .common .not[data-v-07b510d8],\r\n.content .bottom .common .not[data-v-07b510d8]{color:#f0ad4e}.content .top .common .num[data-v-07b510d8],\r\n.content .center .common .num[data-v-07b510d8],\r\n.content .bottom .common .num[data-v-07b510d8]{color:#007aff;font-size:%?28?%}.content .center[data-v-07b510d8]{margin:%?20?% 0}.content .center .select-content .select-list[data-v-07b510d8]{height:%?170?%;background-color:#fff;border-bottom:%?2?% solid #e5e5e5}.content .center .select-content .select-list .left-content .name[data-v-07b510d8]{font-size:%?32?%;font-weight:700}.content .center .select-content .select-list .left-content .code[data-v-07b510d8],\r\n.content .center .select-content .select-list .left-content .total[data-v-07b510d8]{margin-top:%?10?%}.content .center .select-content .select-list .left-content .code[data-v-07b510d8]{color:#979797}.content .center .select-content .select-list .left-content .total[data-v-07b510d8]{color:#007aff}.content .center .select-content .select-list .spec[data-v-07b510d8]{color:#979797}.content .center .select-content .select-list .spec .model[data-v-07b510d8]{margin-right:%?10?%}.content .center .select-content .select-list .spec .uni-icons[data-v-07b510d8]{margin-right:%?-10?%}.mask[data-v-07b510d8]{position:fixed;z-index:999;inset:0;top:0;width:100%;height:100%;background-color:rgba(0,0,0,.4);-webkit-transition-duration:.3s;transition-duration:.3s}.mask .operate[data-v-07b510d8]{position:absolute;left:%?20?%;right:%?20?%;bottom:%?130?%;color:#007aff;background-color:#fff;font-size:%?32?%}.mask .operate .modify[data-v-07b510d8],\r\n.mask .operate .delete[data-v-07b510d8],\r\n.mask .operate .receive[data-v-07b510d8],\r\n.mask .operate .cancel-receive[data-v-07b510d8]{height:%?90?%;line-height:%?90?%;text-align:center;border-bottom:%?2?% solid #e5e5e5}.mask .operate .cancel-receive[data-v-07b510d8]{border:none}.mask .cancel[data-v-07b510d8]{position:absolute;left:%?20?%;right:%?20?%;bottom:%?20?%;height:%?90?%;line-height:%?90?%;text-align:center;color:#007aff;background-color:#fff;font-size:%?32?%;font-weight:700}.footer[data-v-07b510d8]{position:fixed;width:100%;bottom:0;height:%?100?%;border-top:%?2?% solid #e5e5e5;border-bottom:%?2?% solid #e5e5e5;background-color:#fff}.footer .del[data-v-07b510d8],\r\n.footer .save[data-v-07b510d8],\r\n.footer .rece[data-v-07b510d8]{width:%?220?%;height:%?60?%;line-height:%?60?%;margin:0 %?20?%;border:%?2?% solid #e5e5e5;-webkit-border-radius:%?80?%!important;border-radius:%?80?%!important;text-align:center;border-color:#e5e5e5}.footer .btn[data-v-07b510d8]{width:50%}.footer .btn2[data-v-07b510d8]{width:100%}.pop-box[data-v-07b510d8]{position:relative;background-color:#f8f8f8;height:%?800?%}.pop-box .pop-title[data-v-07b510d8]{height:%?80?%}.pop-box .pop-title .clear[data-v-07b510d8]{margin-left:%?4?%}.pop-box .pop-content .content-top[data-v-07b510d8]{height:%?130?%;background-color:#fff;border-bottom:%?2?% solid #e5e5e5}.pop-box .pop-content .content-top .c-s[data-v-07b510d8]{margin-top:%?10?%;color:#979797}.pop-box .pop-content .content-top .name[data-v-07b510d8]{margin-top:%?20?%;font-size:%?32?%;font-weight:700}.pop-box .pop-content .content-center[data-v-07b510d8]{margin-top:%?20?%;font-size:%?32?%}.pop-box .pop-content .content-center .qty[data-v-07b510d8],\r\n.pop-box .pop-content .content-center .unit[data-v-07b510d8]{height:%?90?%;line-height:%?90?%;background-color:#fff;border-bottom:%?2?% solid #e5e5e5}.pop-box .pop-footer[data-v-07b510d8]{position:absolute;width:100%;bottom:0;height:%?130?%;border-top:%?2?% solid #e5e5e5;border-bottom:%?2?% solid #e5e5e5;background-color:#fff}.pop-box .pop-footer .closeBtn[data-v-07b510d8]{width:100%;margin:0 %?20?%;border-color:#e5e5e5;-webkit-border-radius:%?90?%;border-radius:%?90?%}',""]),t.exports=e}}]);