billDetail.js 3.3 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/billDetail/billDetail"],{"13e9":function(t,i,e){"use strict";e.r(i);var n=e("5239"),a=e("f1e3");for(var o in a)["default"].indexOf(o)<0&&function(t){e.d(i,t,(function(){return a[t]}))}(o);var l=e("828b"),s=Object(l["a"])(a["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);i["default"]=s.exports},"1bd4":function(t,i,e){"use strict";(function(t,i){var n=e("47a9");e("7748");n(e("3240"));var a=n(e("13e9"));t.__webpack_require_UNI_MP_PLUGIN__=e,i(a.default)}).call(this,e("3223")["default"],e("df3c")["createPage"])},"1fae":function(t,i,e){"use strict";(function(t){Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var n=e("1a49"),a={data:function(){return{billId:"",type:"",detail:{},operationBtn:[]}},onLoad:function(i){var e=this;this.billId=i.billId,this.type=i.type,this.init(),t.$on("reloadBill",(function(){e.init()}))},methods:{init:function(){this.billId&&(this.operationBtn=[],1==this.type?(0,n.getPaymentDetailById)(this.billId).then(this.billSuccess):(0,n.getCommonPaymentDetailById)(this.billId).then(this.billSuccess))},operation:function(i){var e=this;3==i.id?t.showModal({title:"有极提示",content:"是否将账单发送给客户?",success:function(t){t.confirm&&(0,n.updatePayment)({id:e.billId,status:3}).then((function(t){200===t.code&&(e.init(),e.$toast("操作成功"))}))}}):this.$navigateTo(i.type+"?billId="+this.billId+"&type="+this.type)},billSuccess:function(t){200===t.code&&(this.detail=t.data,this.detail.status&&3!=this.detail.status||1!==this.$store.getters.identity.id&&4!==this.$store.getters.identity.id||this.operationBtn.push({id:1,name:"账单付款",type:"/pages/billRecord/billRecord"}),1===this.detail.status&&this.detail.organizationId===this.$store.getters.organization.id&&this.operationBtn.push({id:2,name:"账单发票",type:"/pages/billInvoice/billInvoice"}),2!=this.type||this.detail.status||this.detail.organizationId!==this.$store.getters.organization.id||this.operationBtn.push({id:3,name:"发送账单给客户",type:"/pages/billInvoice/billInvoice"}))}},components:{upload:function(){Promise.all([e.e("common/vendor"),e.e("components/common/upload")]).then(function(){return resolve(e("a455"))}.bind(null,e)).catch(e.oe)}}};i.default=a}).call(this,e("df3c")["default"])},5239: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:function(){return Promise.all([e.e("common/vendor"),e.e("uni_modules/uni-icons/components/uni-icons/uni-icons")]).then(e.bind(null,"3d33"))}},a=function(){var t=this,i=t.$createElement,e=(t._self._c,t.detail.id?t.__map(t.detail.paymentRecordList,(function(i,e){var n=t.__get_orig(i),a=i.attachment?JSON.parse(i.attachment):null;return{$orig:n,g0:a}})):null),n=t.detail.id?t.__map(t.detail.paymentInvoiceList,(function(i,e){var n=t.__get_orig(i),a=t.$field.findTypeName("invoiceType",i.type),o=i.attachment?JSON.parse(i.attachment):null;return{$orig:n,g1:a,g2:o}})):null,a=t.detail.id?t.operationBtn.length:null;t.$mp.data=Object.assign({},{$root:{l0:e,l1:n,g3:a}})},o=[]},f1e3:function(t,i,e){"use strict";e.r(i);var n=e("1fae"),a=e.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){e.d(i,t,(function(){return n[t]}))}(o);i["default"]=a.a}},[["1bd4","common/runtime","common/vendor"]]]);