1 line
5.1 KiB
JavaScript
1 line
5.1 KiB
JavaScript
|
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/groupCompany/cost/addCost"],{1748:function(e,t,n){"use strict";n.r(t);var i=n("8a20"),o=n.n(i);for(var s in i)["default"].indexOf(s)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(s);t["default"]=o.a},2366:function(e,t,n){},"47b9":function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return i}));var i={uActionSheet:function(){return n.e("uview-ui/components/u-action-sheet/u-action-sheet").then(n.bind(null,"b13b"))}},o=function(){var e=this.$createElement,t=(this._self._c,this.imgList.length),n=this.fileList.length;this.$mp.data=Object.assign({},{$root:{g0:t,g1:n}})},s=[]},"51e1":function(e,t,n){"use strict";n.r(t);var i=n("47b9"),o=n("1748");for(var s in o)["default"].indexOf(s)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(s);n("f416");var c=n("f0c5"),u=Object(c["a"])(o["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);t["default"]=u.exports},"7b73":function(e,t,n){"use strict";(function(e,t){var i=n("4ea4");n("8886");i(n("66fd"));var o=i(n("51e1"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(o.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},"8a20":function(e,t,n){"use strict";(function(e,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n("76dd"),s=n("dc92"),c=n("0c59"),u=n("8683"),a={mixins:[u.commonF],components:{fixedApproval:function(){n.e("components/fixedApproval").then(function(){return resolve(n("d3f7"))}.bind(null,n)).catch(n.oe)},selectCustomer:function(){Promise.all([n.e("common/vendor"),n.e("components/selectCustomer")]).then(function(){return resolve(n("5bcd"))}.bind(null,n)).catch(n.oe)}},data:function(){return{noClick:!0,customer_id:"",consume_time:"",consume_type:"",money:"",remark:"",file_ids:"",BASE_IMG_URL:c.BASE_IMG_URL,typeList:[],index:null,DefaultRemind:[],remindPeople:[],remindType:"consume",imgList:[],fileList:[],uploadShow:!1,uploadActions:[{id:1,text:"拍照",color:"#03aa96"},{id:2,text:"从相册中选择",color:"#03aa96"}],customerList:[],customerIndex:null,customerObj:{},approvalPro:{},isRequired:!1}},onLoad:function(e){e.kehuid&&(this.customer_id=e.kehuid,this.getKehu()),this.getType(),this.getProcess()},methods:{changeRequired:function(e){this.isRequired=e.detail.value},getProcess:function(){var e=this;(0,s.netApprovalProcess)({type:"consume"}).then((function(t){e.approvalPro=t.data}))},getKehu:function(){var e=this;(0,o.netPrevCustomer)().then((function(t){e.customerList=t.data,e.customer_id&&e.customerList.forEach((function(t,n){t.id==e.customer_id&&(e.customerObj=t)}))}))},changeCustomer:function(e){this.$refs.customerChild.init()},getCustomerinfo:function(e){this.customerObj=e},getType:function(){var e=this;(0,o.netSelect)().then((function(t){e.typeList=t.data["消费方式"]}))},changeTime:function(e){this.consume_time=e.detail.value},changeType:function(e){this.consume_type=this.typeList[e.detail.value]},uploadClick:function(){this.uploadShow=!0},onCancel:function(){this.uploadShow=!1},uploadType:function(t){var n=this;0==t?e.chooseImage({sourceType:["camera"],sizeType:["compressed"],success:function(e){var t=e.tempFilePaths;t.forEach((function(e){n.uploadFile(e,1)}))}}):1==t?e.chooseImage({sourceType:["album"],sizeType:["compressed"],success:function(e){var t=e.tempFilePaths;t.forEach((function(e){n.uploadFile(e,1)}))}}):i.chooseMessageFile({count:1,type:"file",success:function(e){var t=e.tempFiles[0];n.uploadFile(t,2)},fail:function(e){console.log(e)}})},uploadFile:function(t,n){var i=this;e.uploadFile({url:s.uploadUrl,name:"file",header:{token:e.getStorageSync("token")},filePath:1==n?t:t.path,success:function(o){var s=JSON.parse(o.data);i.uploadShow=!1,1==s.code?1==n?i.imgList.push(s.data):(t=Object.assign({},t,s.data),i.fileList.push(t)):e.showToast({title:"上传失败",icon:"none"})},fail:function(e){console.log(e)}})},delImg:function(e){this.imgList.splice(e,1)},delFile:function(e){this.fileList.splice(e,1)},moreClick:function(){e.navigateTo({url:"/pagesA/crm/selectMember/selectM
|