pages-material-detail.229b7a09.js
7.96 KB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-material-detail"],{"0e84":function(t,i,e){"use strict";e.r(i);var n=e("af5c"),a=e.n(n);for(var o in n)"default"!==o&&function(t){e.d(i,t,(function(){return n[t]}))}(o);i["default"]=a.a},"60c1":function(t,i,e){var n=e("24fb");i=n(!1),i.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-24336488]{overflow-y:auto;padding-bottom:%?100?%}.content .top[data-v-24336488],\r\n.content .bottom[data-v-24336488]{background-color:#fff}.content .top .common[data-v-24336488],\r\n.content .bottom .common[data-v-24336488]{height:%?90?%;line-height:%?90?%;font-size:%?32?%;border-bottom:%?2?% solid #e5e5e5}.content .bottom[data-v-24336488]{margin:%?20?% 0}.footer[data-v-24336488]{position:fixed;width:100%;bottom:0;height:%?100?%;border-top:%?2?% solid #e5e5e5;border-bottom:%?2?% solid #e5e5e5;background-color:#fff}.footer .delBtn[data-v-24336488],\r\n.footer .saveBtn[data-v-24336488]{width:%?320?%;-webkit-border-radius:%?90?%!important;border-radius:%?90?%!important;margin-left:%?20?%;border-color:#e5e5e5}',""]),t.exports=i},"8e3a":function(t,i,e){"use strict";e.r(i);var n=e("e919"),a=e("0e84");for(var o in a)"default"!==o&&function(t){e.d(i,t,(function(){return a[t]}))}(o);e("aede");var r,s=e("f0c5"),u=Object(s["a"])(a["default"],n["b"],n["c"],!1,null,"24336488",null,!1,n["a"],r);i["default"]=u.exports},ad9f:function(t,i,e){var n=e("60c1");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=e("4f06").default;a("94b4dfba",n,!0,{sourceMap:!1,shadowMode:!1})},aede:function(t,i,e){"use strict";var n=e("ad9f"),a=e.n(n);a.a},af5c:function(t,i,e){"use strict";(function(t){Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var e={data:function(){return{detailInfo:{},companyArr:[],warehouseArr:[],enableArr:[],materialTypeArr:[],mixArr:[],serialNumArr:[],timer:null,index:null}},onBackPress:function(t){this.$prePage().handleEdit(this.index,this.detailInfo)},onLoad:function(t){var i=this;this.index=t.index,this.getMaterial(t.id),this.$api.dict.getCompaniesByToken().then((function(t){i.companyArr=t.data})),this.getDicts("autoGenSerialNum").then((function(t){i.serialNumArr=t.data.data})),this.getDicts("enable").then((function(t){i.enableArr=t.data.data})),this.$api.material.getMaterialType().then((function(t){i.materialTypeArr=t.data.data}));try{var e=uni.getStorageSync("historyUser").username;e&&this.$api.dict.getWarehouseByUserCode(e).then((function(t){i.warehouseArr=t.data.data}))}catch(n){}this.getDicts("isMix").then((function(t){i.mixArr=t.data.data})),uni.$on("editUpdateMaterial",(function(){i.getMaterial(t.id)}))},onUnload:function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},methods:{getMaterial:function(t){var i=this;this.$api.material.getCurrMaterial(t).then((function(t){200==t.data.code&&(i.detailInfo=t.data.data)}))},companyCodeFormat:function(t){return this.selectCommonLabel(this.companyArr,t)},warehouseCodeFormat:function(t){return this.selectCommonLabel(this.warehouseArr,t)},isAutoFormat:function(t){return this.selectDictLabel(this.serialNumArr,t)},enableFormat:function(t){return this.selectDictLabel(this.enableArr,t)},materialTypeFormat:function(t){return this.selectCommonLabel(this.materialTypeArr,t)},isMixFormat:function(t){return this.selectDictLabel(this.mixArr,t)},delMaterial:function(i,e){var n=this;uni.showModal({title:"提示",content:"确定要删除该物料吗?",success:function(a){a.confirm?n.$api.material.delMaterial(i).then((function(t){200==t.data.code?(n.$prePage().handleDel(e),n.$wx.showToast({title:"删除成功!"}),n.timer=setTimeout((function(){uni.navigateBack()}),400)):uni.showModal({title:"提示",content:t.data.msg})})):a.cancel&&t.log("用户点击取消")}})},goEdit:function(t){uni.navigateTo({url:"add-edit?page=detail&type=edit&id="+t})}}};i.default=e}).call(this,e("5a52")["default"])},e919:function(t,i,e){"use strict";e.d(i,"b",(function(){return a})),e.d(i,"c",(function(){return o})),e.d(i,"a",(function(){return n}));var n={uniIcons:e("1968").default},a=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("v-uni-view",[e("v-uni-view",{staticClass:"content"},[e("v-uni-view",{staticClass:"top"},[e("v-uni-view",{staticClass:"common u-f u-f-jcsb plr-10"},[e("v-uni-view",[t._v("物料名称")]),e("v-uni-view",[t._v(t._s(t.detailInfo.name))])],1),e("v-uni-view",{staticClass:"common u-f u-f-jcsb plr-10"},[e("v-uni-view",[t._v("物料编码")]),e("v-uni-view",[t._v(t._s(t.detailInfo.code))])],1),e("v-uni-view",{staticClass:"common u-f u-f-jcsb plr-10"},[e("v-uni-view",[t._v("物料分类")]),e("v-uni-view",[t._v(t._s(t.materialTypeFormat(t.detailInfo.type)))])],1),e("v-uni-view",{staticClass:"common u-f u-f-jcsb plr-10"},[e("v-uni-view",[t._v("规格型号")]),e("v-uni-view",[t._v(t._s(t.detailInfo.spec))])],1),e("v-uni-view",{staticClass:"common u-f u-f-jcsb plr-10"},[e("v-uni-view",[t._v("单位")]),e("v-uni-view",[t._v(t._s(t.detailInfo.unit))])],1),e("v-uni-view",{staticClass:"common u-f u-f-jcsb plr-10"},[e("v-uni-view",[t._v("货主")]),e("v-uni-view",[t._v(t._s(t.companyCodeFormat(t.detailInfo.companyCode)))])],1)],1),e("v-uni-view",{staticClass:"bottom"},[e("v-uni-view",{staticClass:"common u-f u-f-jcsb plr-10"},[e("v-uni-view",[t._v("自动生成序列号")]),e("v-uni-view",[t._v(t._s(t.isAutoFormat(t.detailInfo.autoGenSerialNum)))])],1),e("v-uni-view",{staticClass:"common u-f u-f-jcsb plr-10"},[e("v-uni-view",[t._v("保质期")]),e("v-uni-view",[t._v(t._s(t.detailInfo.daysToExpire)+"天")])],1),e("v-uni-view",{staticClass:"common u-f u-f-jcsb plr-10"},[e("v-uni-view",[t._v("状态")]),e("v-uni-view",[t._v(t._s(t.enableFormat(t.detailInfo.enable)))])],1),e("v-uni-view",{staticClass:"common u-f u-f-jcsb plr-10"},[e("v-uni-view",[t._v("是否允许混放")]),e("v-uni-view",[t._v(t._s(t.isMixFormat(t.detailInfo.isMix)))])],1),e("v-uni-view",{staticClass:"common u-f u-f-jcsb plr-10"},[e("v-uni-view",[t._v("收货预警天数")]),e("v-uni-view",[t._v(t._s(t.detailInfo.minShelfLifeDays)+"天")])],1),e("v-uni-view",{staticClass:"common u-f u-f-jcsb plr-10"},[e("v-uni-view",[t._v("记录序列号")]),e("v-uni-view",[t._v(t._s(t.detailInfo.trackSerialNum))])],1),e("v-uni-view",{staticClass:"common u-f u-f-jcsb plr-10"},[e("v-uni-view",[t._v("数据版本")]),e("v-uni-view",[t._v(t._s(t.detailInfo.version))])],1),e("v-uni-view",{staticClass:"common u-f u-f-jcsb plr-10"},[e("v-uni-view",[t._v("仓库")]),e("v-uni-view",[t._v(t._s(t.warehouseCodeFormat(t.detailInfo.warehouseCode)))])],1)],1)],1),e("v-uni-view",{staticClass:"footer u-f u-f-aic"},[e("v-uni-button",{staticClass:"delBtn",attrs:{type:"default",size:"mini",plain:!0},on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.delMaterial(t.detailInfo.id,t.index)}}},[e("uni-icons",{attrs:{type:"trash",size:"14"}}),t._v("删除")],1),e("v-uni-button",{staticClass:"saveBtn",attrs:{type:"default",size:"mini",plain:!0},on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.goEdit(t.detailInfo.id,t.index)}}},[e("uni-icons",{attrs:{type:"compose",size:"14"}}),t._v("修改")],1)],1)],1)},o=[]}}]);