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 lines
4.7 KiB
1 lines
4.7 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/demandHall/createProject/index"],{"034e":function(t,e,o){"use strict";o.r(e);var n=o("3622"),a=o("e795");for(var s in a)"default"!==s&&function(t){o.d(e,t,(function(){return a[t]}))}(s);o("dbb6");var c,i=o("f0c5"),r=Object(i["a"])(a["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],c);e["default"]=r.exports},"1e95":function(t,e,o){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=getApp(),n={data:function(){return{state:0,communicateId:null,projectId:null,detail:[],projectInfo:{},modeList:[],modeActive:1,projectName:"",resultContent:"",totalMoney:"",stageResultsDtoList:[],canConfirm:!1}},components:{},props:{},onLoad:function(t){console.log(t);var e=t.id,o=t.state||0;this.setData({communicateId:e,state:o}),this.getModeList(),0==o?this.getProjectInfo():this.getProjectDetail()},onReady:function(){},onShow:function(){},onHide:function(){},onUnload:function(){},onPullDownRefresh:function(){},onReachBottom:function(){},onShareAppMessage:function(){},methods:{inpChange:function(t){var e=t.currentTarget.dataset.t,o=t.detail.value;"n"==e?this.setData({projectName:o}):"t"==e?this.setData({totalMoney:o}):"c"==e&&this.setData({resultContent:o})},modeClick:function(t){var e=t.currentTarget.dataset.id,o=t.currentTarget.dataset.nums;if(0==this.state){this.setData({stageResultsDtoList:[]});for(var n=this.stageResultsDtoList,a=0;a<o;a++)n.push({name:a+1,money:"",content:""});this.setData({modeActive:e,stageResultsDtoList:n})}},changePrice:function(t){var e=Number(t.currentTarget.dataset.i),o=this.stageResultsDtoList;o[e].money=t.detail.value,this.setData({stageResultsDtoList:o})},changeContent:function(t){var e=Number(t.currentTarget.dataset.i),o=this.stageResultsDtoList;o[e].content=t.detail.value,this.setData({stageResultsDtoList:o})},submit:function(){var e={resourcesId:this.projectInfo.projectResource.resourceId,projectName:this.projectName,projectCode:this.projectInfo.projectCode,cooperationModeId:this.modeActive,resultContent:this.resultContent,stageResultsDtoList:this.stageResultsDtoList,totalMoney:this.totalMoney,providerId:this.projectInfo.projectProvider.prividerId,receiverId:this.projectInfo.projectReceiver.receiverId,communicateId:this.communicateId};""!=e.projectName?""!=e.totalMoney?""!=e.resultContent?o.http("post","Project/create",e).then((function(e){e.data.success&&(t.showToast({title:"操作成功!",duration:2e3}),setTimeout((function(){t.navigateBack({delta:1})}),2e3))})):t.showToast({title:"请描述交付成果!",icon:"none"}):t.showToast({title:"请填写项目总金额!",icon:"none"}):t.showToast({title:"请填写项目名称!",icon:"none"})},getModeList:function(){var t=this;o.http("get","CooperationMode/listCooperationMode").then((function(e){e.data.success&&t.setData({modeList:e.data.data})}))},getProjectInfo:function(){var t=this;console.log(this.communicateId),o.http("get","Project/toCreateProject",{communicateId:this.communicateId}).then((function(e){e.data.success&&t.setData({projectInfo:e.data.data})}))},getProjectDetail:function(){var t=this;o.http("get","Communicate/getProjectInfo",{communicateId:this.communicateId}).then((function(e){if(e.data.success){var o=e.data.data;t.setData({projectName:o.projectName,stageResultsDtoList:o.stageResultsDtoList,modeActive:o.stageResultsDtoList.length,resultContent:o.resultContent,totalMoney:o.totalMoney,canConfirm:o.canConfirm,projectId:o.id}),t["projectInfo.projectReceiver"]=o.projectReceiver,t["projectInfo.projectProvider"]=o.projectProvider,t["projectInfo.projectResource"]=o.projectResource}}))},confirm:function(){var e=this;t.showModal({title:"提示!",content:"是否确认立项?",success:function(n){n.confirm&&o.http("GET","Communicate/aggreProject",{projectId:e.projectId}).then((function(e){e.data.success&&(t.showToast({title:"操作成功!",duration:2e3}),setTimeout((function(){t.navigateBack({delta:1})}),2e3))}))}})},call:function(e){t.makePhoneCall({phoneNumber:e.currentTarget.dataset.phone})}}};e.default=n}).call(this,o("543d")["default"])},3622:function(t,e,o){"use strict";var n;o.d(e,"b",(function(){return a})),o.d(e,"c",(function(){return s})),o.d(e,"a",(function(){return n}));var a=function(){var t=this,e=t.$createElement;t._self._c},s=[]},"9d35":function(t,e,o){"use strict";(function(t){o("ef82");n(o("66fd"));var e=n(o("034e"));function n(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,o("543d")["createPage"])},b7d2:function(t,e,o){},dbb6:function(t,e,o){"use strict";var n=o("b7d2"),a=o.n(n);a.a},e795:function(t,e,o){"use strict";o.r(e);var n=o("1e95"),a=o.n(n);for(var s in n)"default"!==s&&function(t){o.d(e,t,(function(){return n[t]}))}(s);e["default"]=a.a}},[["9d35","common/runtime","common/vendor"]]]); |