pages-cycle-add.adde3564.js
8.72 KB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-cycle-add"],{"0c43":function(e,t,n){var i=n("8d84");"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=n("4f06").default;a("089d37d4",i,!0,{sourceMap:!1,shadowMode:!1})},"115b":function(e,t,n){"use strict";var i;n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return i}));var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",[n("v-uni-view",{staticClass:"header"},[n("v-uni-view",{staticClass:"content"},[n("v-uni-view",{staticClass:"content-item u-f u-f-aic plr-10"},[n("v-uni-view",{staticClass:"title require u-f1"},[e._v("盘点类型")]),n("v-uni-view",{staticClass:"inp u-f3"},[n("v-uni-picker",{attrs:{value:e.typeIndex,"range-key":"dictLabel",range:e.countTypeArr},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.typePickerChange.apply(void 0,arguments)}}},[n("v-uni-view",{staticClass:"u-f u-f-aic fr"},[n("v-uni-view",{staticClass:"uni-input"},[-1==e.typeIndex?n("v-uni-text",{staticClass:"placeholder-color"},[e._v("请选择")]):n("v-uni-text",[e._v(e._s(e.countTypeArr[e.typeIndex].dictLabel))])],1)],1)],1)],1)],1),n("v-uni-view",{staticClass:"content-item u-f u-f-aic plr-10"},[n("v-uni-view",{staticClass:"title require u-f1"},[e._v("盘点方式")]),n("v-uni-view",{staticClass:"inp u-f3"},[n("v-uni-picker",{attrs:{value:e.preferenceIndex,"range-key":"name",range:e.preferenceArr},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.preferencePickerChange.apply(void 0,arguments)}}},[n("v-uni-view",{staticClass:"u-f u-f-aic fr"},[n("v-uni-view",{staticClass:"uni-input"},[-1==e.preferenceIndex?n("v-uni-text",{staticClass:"placeholder-color"},[e._v("请选择")]):n("v-uni-text",[e._v(e._s(e.preferenceArr[e.preferenceIndex].name))])],1)],1)],1)],1)],1),n("v-uni-view",{staticClass:"content-item u-f u-f-aic plr-10"},[n("v-uni-view",{staticClass:"title require u-f1"},[e._v("货主")]),n("v-uni-view",{staticClass:"inp u-f3"},[n("v-uni-picker",{attrs:{value:e.companyIndex,"range-key":"name",range:e.companyArr},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.companyPickerChange.apply(void 0,arguments)}}},[n("v-uni-view",{staticClass:"u-f u-f-aic fr"},[n("v-uni-view",{staticClass:"uni-input"},[-1==e.companyIndex?n("v-uni-text",{staticClass:"placeholder-color"},[e._v("请选择")]):n("v-uni-text",[e._v(e._s(e.companyArr[e.companyIndex].name))])],1)],1)],1)],1)],1),n("v-uni-view",{staticClass:"content-item u-f u-f-aic plr-10"},[n("v-uni-view",{staticClass:"title u-f1"},[e._v("原始盘点内部号")]),n("v-uni-view",{staticClass:"inp u-f2"},[n("v-uni-input",{model:{value:e.form.countOrderId,callback:function(t){e.$set(e.form,"countOrderId",t)},expression:"form.countOrderId"}})],1)],1),n("v-uni-view",{staticClass:"content-item u-f u-f-aic plr-10"},[n("v-uni-view",{staticClass:"title u-f1"},[e._v("源盘点单号")]),n("v-uni-view",{staticClass:"inp u-f3"},[n("v-uni-input",{model:{value:e.form.sourceCode,callback:function(t){e.$set(e.form,"sourceCode",t)},expression:"form.sourceCode"}})],1)],1),n("v-uni-view",{staticClass:"content-item u-f u-f-aic plr-10"},[n("v-uni-view",{staticClass:"title u-f1"},[e._v("抽盘范围(单位 %)")]),n("v-uni-view",{staticClass:"inp u-f1"},[n("v-uni-input",{model:{value:e.form.range,callback:function(t){e.$set(e.form,"range",t)},expression:"form.range"}})],1)],1),n("v-uni-view",{staticClass:"content-item u-f u-f-aic plr-10"},[n("v-uni-view",{staticClass:"title u-f1"},[e._v("备注")]),n("v-uni-view",{staticClass:"inp u-f3"},[n("v-uni-input",{model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1)],1)],1)],1),n("v-uni-view",{staticClass:"footer u-f u-f-aic"},[n("v-uni-button",{staticClass:"btn",attrs:{loading:e.loading,type:"warn",disabled:e.disabled},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.save.apply(void 0,arguments)}}},[e._v("保存")])],1)],1)},r=[]},1649:function(e,t,n){"use strict";n.r(t);var i=n("370a"),a=n.n(i);for(var r in i)"default"!==r&&function(e){n.d(t,e,(function(){return i[e]}))}(r);t["default"]=a.a},"370a":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i={data:function(){return{loading:!1,disabled:!1,form:{countType:"",preferenceCode:"",companyCode:"",countOrderId:"",sourceCode:"",remark:"",range:null},typeIndex:-1,preferenceIndex:-1,companyIndex:-1,countTypeArr:[],preferenceArr:[],companyArr:[],timer:null}},onLoad:function(){var e=this;this.getDicts("cyclecountType").then((function(t){e.countTypeArr=t.data.data})),this.$api.dict.getCompaniesByToken().then((function(t){e.companyArr=t.data})),this.$api.cycle.listCycleCountPreference().then((function(t){e.preferenceArr=t.data.rows}))},onUnload:function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},methods:{typePickerChange:function(e){this.typeIndex=e.target.value,this.form.countType=this.countTypeArr[this.typeIndex].dictValue},preferencePickerChange:function(e){this.preferenceIndex=e.target.value,this.form.preferenceCode=this.preferenceArr[this.preferenceIndex].code},companyPickerChange:function(e){this.companyIndex=e.target.value,this.form.companyCode=this.companyArr[this.companyIndex].code},save:function(){var e=this;if(this.loading)return!1;this.form.countType?this.form.preferenceCode?this.form.companyCode?/^([1-9]?\d|100)$/.test(this.form.range)||!this.form.range?(this.loading=!0,this.disabled=!0,this.$api.cycle.addCycleCountHeader(this.form).then((function(t){200==t.data.code?(e.loading=!1,e.disabled=!1,e.$prePage()._data.queryParams.pageNum=1,e.$prePage().getCycleCountHeader(),e.$wx.showToast({title:"保存成功!"}),e.timer=setTimeout((function(){uni.navigateBack()}),400)):(uni.showModal({title:"提示",content:t.data.msg}),e.loading=!1,e.disabled=!1)})).catch((function(t){e.loading=!1,e.disabled=!1}))):uni.showModal({title:"提示",content:"抽盘范围只能1~100内正数!",showCancel:!1}):uni.showModal({title:"提示",content:"货主不能为空!",showCancel:!1}):uni.showModal({title:"提示",content:"盘点方式不能为空!",showCancel:!1}):uni.showModal({title:"提示",content:"盘点类型不能为空!",showCancel:!1})}}};t.default=i},"79f7":function(e,t,n){"use strict";var i=n("0c43"),a=n.n(i);a.a},"8d84":function(e,t,n){var i=n("24fb");t=i(!1),t.push([e.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/* 文章场景相关 */.header[data-v-4b3aa62c]{overflow-y:auto}.header .content[data-v-4b3aa62c]{background-color:#fff}.header .content .content-item[data-v-4b3aa62c]{height:%?90?%;line-height:%?90?%;border-bottom:%?2?% solid #e5e5e5}.header .content .content-item .title[data-v-4b3aa62c]{font-size:%?32?%}.header .content .content-item .inp[data-v-4b3aa62c]{text-align:right;font-size:%?32?%}.header .content .content-item .inp[data-v-4b3aa62c] uni-radio .uni-radio-input{margin-right:0}.header .content .content-item .inp .picker[data-v-4b3aa62c]{-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.header .content .content-item .require[data-v-4b3aa62c]{position:relative}.header .content .content-item .require[data-v-4b3aa62c]::after{position:absolute;content:"*";color:red;font-size:%?48?%;top:%?6?%;left:%?-20?%}.footer[data-v-4b3aa62c]{position:fixed;bottom:0;width:100%;height:%?140?%;background-color:#fff;border-top:%?2?% solid #e1f3d8}.footer .btn[data-v-4b3aa62c]{width:100%;height:%?80?%;line-height:%?80?%;color:#fff;text-align:center;font-size:%?32?%;-webkit-border-radius:%?50?%;border-radius:%?50?%;margin:0 %?30?%;background-color:#007aff}',""]),e.exports=t},e975:function(e,t,n){"use strict";n.r(t);var i=n("115b"),a=n("1649");for(var r in a)"default"!==r&&function(e){n.d(t,e,(function(){return a[e]}))}(r);n("79f7");var o,c=n("f0c5"),s=Object(c["a"])(a["default"],i["b"],i["c"],!1,null,"4b3aa62c",null,!1,i["a"],o);t["default"]=s.exports}}]);