1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/alldeatil/billdetail"],{"017e":function(t,e,n){"use strict";(function(t){n("5413");i(n("66fd"));var e=i(n("aa96"));function i(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=n,t(e.default)}).call(this,n("543d")["createPage"])},"5f78":function(t,e,n){},6284:function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return c})),n.d(e,"a",(function(){return i}));var i={uUpload:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-upload/u-upload")]).then(n.bind(null,"8bcb"))}},a=function(){var t=this,e=t.$createElement;t._self._c},c=[]},9175:function(t,e,n){"use strict";var i=n("5f78"),a=n.n(i);a.a},a85d:function(t,e,n){"use strict";n.r(e);var i=n("b1cb"),a=n.n(i);for(var c in i)"default"!==c&&function(t){n.d(e,t,(function(){return i[t]}))}(c);e["default"]=a.a},aa96:function(t,e,n){"use strict";n.r(e);var i=n("6284"),a=n("a85d");for(var c in a)"default"!==c&&function(t){n.d(e,t,(function(){return a[t]}))}(c);n("9175");var o,r=n("f0c5"),s=Object(r["a"])(a["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],o);e["default"]=s.exports},b1cb:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i,a=o(n("a34a")),c=n("595d");function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t,e,n,i,a,c,o){try{var r=t[c](o),s=r.value}catch(u){return void n(u)}r.done?e(s):Promise.resolve(s).then(i,a)}function f(t){return function(){var e=this,n=arguments;return new Promise((function(i,a){var c=t.apply(e,n);function o(t){l(c,i,a,o,r,"next",t)}function r(t){l(c,i,a,o,r,"throw",t)}o(void 0)}))}}var d={data:function(){return{id:"",msg:"",index:"",state:0,fileList4:[],feedback:"",disabled:!1,delablepic:!0,placehodertitle:"请输入审核反馈",contractId:"",statusText:""}},onLoad:function(t){if(i=this,this.state=this.$store.state.admin,1==this.state&&(this.disabled=!0,this.delablepic=!1),t.obj){var e=JSON.parse(t.obj);this.id=e.id,console.log(e,6464654),this.index=e.index,this.contractId=e.contractId,this.statusText=e.statusText,console.log(this.statusText,9999)}this.init()},methods:{init:function(){var e=this,n=this.id;t.showLoading(),t.$u.http.get("/api/Contract/contractDraft/".concat(n),{custom:{auth:!0}}).then((function(n){if(t.hideLoading(),e.msg=n,n.feedbackPicList){var i=n.feedbackPicList.map((function(t){return{url:t}}));e.fileList4=i}1==e.state?n.feedback.length>0?e.feedback=n.feedback:e.feedback="无":n.feedback.length>0?e.feedback=n.feedback:e.placehodertitle="请输入审核反馈"})).catch((function(n){t.hideLoading(),e.$toast(n.msg)}))},prviewPic:function(e){var n=[];n.push(e),t.previewImage({urls:n})},tryAgain:function(){var e={contractId:this.contractId,id:this.id,contractDrafts:[this.msg]};t.navigateTo({url:"/pages/alldeatil/addbill?obj="+JSON.stringify(e)})},addBill:function(){t.navigateTo({url:"/pages/alldeatil/addbill"})},examineSuccess:function(){t.showModal({title:"提示",content:"是否审核成功?",success:function(e){if(e.confirm){var n={id:Number(i.id),approveStatus:1};if(i.fileList4.length>0){var a=[];i.fileList4.forEach((function(t){a.push(t.url)})),n.feedbackPicList=a}var c=i.feedback;c.length>0&&(n.feedback=c),t.showLoading(),t.$u.http.post("api/Contract/approveContractDraft",n,{custom:{auth:!0}}).then((function(e){t.hideLoading(),i.editall=!1,i.quan=!1,i.$toast("操作成功"),setTimeout((function(){i.init()}),500)})).catch((function(e){t.hideLoading(),i.$toast(e.msg)}))}else e.cancel}})},examineFail:function(){t.showModal({title:"提示",content:"是否审核失败?",success:function(e){if(e.confirm){var n={id:Number(i.id),approveStatus:2};if(i.fileList4.length>0){var a=[];i.fileList4.forEach((function(t){a.push(t.url)})),n.feedbackPicList=a}var c=i.feedback;c.length>0&&(n.feedback=c),t.showLoading(),t.$u.http.post("api/Contract/approveContractDraft",n,{custom:{auth:!0}}).then((function(e){t.hideLoading(),i.editall=!1,i.quan=!1,i.$toast("操作成功"),setTimeout((function(){i.init()}),500)})).catch((function(e){t.hideLoading(),i.$toast(e.msg)}))}else e.cancel}})},deletePic:function(t){this["fileList".concat(t.name)].splice(t.index,1)},afterRead:function(t){var e=this;return f(a.default.mark((function n(){var i,c,o,r,u;return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:i=[].concat(t.file),c=e["fileList".concat(t.name)].length,i.map((function(n){e["fileList".concat(t.name)].push(s(s({},n),{},{status:"uploading",message:"上传中"}))})),o=0;case 4:if(!(o<i.length)){n.next=14;break}return n.next=7,e.uploadFilePromise(i[o].url);case 7:r=n.sent,u=e["fileList".concat(t.name)][c],e["fileList".concat(t.name)].splice(c,1,Object.assign(u,{status:"success",message:"",url:r})),c++;case 11:o++,n.next=4;break;case 14:case"end":return n.stop()}}),n)})))()},uploadFilePromise:function(e){return new Promise((function(n,i){t.uploadFile({url:c.mainUrl+"/api/File",filePath:e,name:"File",header:{"User-Agent":"apifox/1.0.0 (https://www.apifox.cn)"},formData:{File:JSON.stringify(e)},success:function(t){var e=JSON.parse(t.data);setTimeout((function(){n(e.data.file)}),1e3)}})}))}}};e.default=d}).call(this,n("543d")["default"])}},[["017e","common/runtime","common/vendor"]]]);
|