crm_second_opening_mini/pages/index/groupCompany/contract/contractDetail.js

385 lines
17 KiB
JavaScript

(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
["pages/index/groupCompany/contract/contractDetail"], {
"0875": function(t, n, e) {
"use strict";
e.r(n);
var i = e("8a6f"),
o = e.n(i);
for (var a in i)["default"].indexOf(a) < 0 && function(t) {
e.d(n, t, (function() {
return i[t]
}))
}(a);
n["default"] = o.a
},
"0e79": function(t, n, e) {
"use strict";
var i = e("b1eb"),
o = e.n(i);
o.a
},
"7a9b": function(t, n, e) {
"use strict";
(function(t, n) {
var i = e("4ea4");
e("8886");
i(e("66fd"));
var o = i(e("f553"));
t.__webpack_require_UNI_MP_PLUGIN__ = e, n(o.default)
}).call(this, e("bc2e")["default"], e("543d")["createPage"])
},
"8a6f": function(t, n, e) {
"use strict";
(function(t) {
Object.defineProperty(n, "__esModule", {
value: !0
}), n.default = void 0;
var i = e("0c59"),
o = e("c0a8"),
a = e("76dd"),
c = e("dc92"),
s = {
mixins: [o.pageJumps],
created: function() {},
data: function() {
return {
id: "",
contract_id: "",
relation_id: "",
relation_type: 3,
info: {},
srollLeft: 0,
taskShow: !1,
show: !1,
fileList: [],
opera_list: [],
plan_list: [],
payment_list: [],
type: 3,
types: 3,
BASE_IMG_URL: i.BASE_IMG_URL,
list: [{
num: "123",
name: "回款记录"
}, {
num: "321",
name: "回款计划"
}, {
num: "222",
name: "操作记录"
}],
current: 0,
lists: [{
name: "跟进记录",
status: 0
}, {
name: "发票",
status: 1
}, {
name: "费用",
status: 2
}, {
name: "回款",
status:3
}, {
name: "基本信息",
status:4
}],
payment_approval: {},
has_amount_view:false,
consumeList:[],//费用记录列表
billList:[],//发票列表
collectionList:[]//回款列表
}
},
onLoad: function(t) {
this.id = t.id;
let has_amount_view = wx.getStorageSync('has_amount_view');
this.has_amount_view = has_amount_view;
},
onHide: function() {
this.show = !1
},
onShow: function() {
this.info = null, this.getInfo(), this.getOperalist(), this.getPlanlist(), this.getPaymentlist(), this.getFile(), this.getApprovalList(),this.getConsumeList(),this.getBillList(),this.getCollectionList()
},
components: {
customerDynamic: function() {
Promise.all([e.e("common/vendor"), e.e("components/content/customerDynamic/customerDynamic")]).then(function() {
return resolve(e("dd11"))
}.bind(null, e)).catch(e.oe)
},
baseInfo: function() {
e.e("pages/index/groupCompany/contract/baseInfo").then(function() {
return resolve(e("ccbc"))
}.bind(null, e)).catch(e.oe)
}
},
methods: {
getApprovalList: function() {
var t = this,
n = {
type: "contract",
relation_id: this.id
};
(0, c.netApprovalDetail)(n).then((function(n) {
t.payment_approval = n.data
}))
},
change: function(t) {
this.current = t
},
tabs_change: function(t) {
this.current = t, this.mescroll.resetUpScroll()
},
moreClick: function() {
this.show = !0
},
onClose: function() {
this.show = !1
},
accessory: function(n) {
t.navigateTo({
url: "/pages/index/groupCompany/attachment/attachment?id=" + n + "&types=" + this.types
})
},
lookDetail: function(n) {
-1 != n.types.indexOf("image") ? t.previewImage({
urls: [n.file_path]
}) : t.downloadFile({
url: n.file_path,
success: function(n) {
t.openDocument({
filePath: n.tempFilePath,
success: function(t) {
return console.log("成功打开文档")
}
})
},
fail: function(t) {
console.log(t, "shibai")
}
})
},
getFile: function() {
var t = this,
n = {
contract_id: this.id
};
(0, a.netContractFileList)(n).then((function(n) {
t.fileList = n.data
}))
},
getPlanlist: function() {
var t = this;
(0, a.netPlanListf)({
contract_id: this.id
}).then((function(n) {
t.plan_list = n.data.data
}))
},
getPaymentlist: function() {
var t = this;
(0, a.netPaymentList)({
contract_id: this.id
}).then((function(n) {
t.payment_list = n.data.data
}))
},
getOperalist: function() {
var t = this,
n = {
relation_type: 3,
relation_id: this.id
};
(0, a.netOperationList)(n).then((function(n) {
t.opera_list = n.data
}))
},
payment: function(n) {
t.navigateTo({
url: "/pages/index/groupCompany/contract/returned?id=" + n + "&kehuid=" + this.info.customer.id
})
},
plan: function(n) {
t.navigateTo({
url: "/pages/index/groupCompany/contract/plan?id=" + n + "&kehuid=" + this.info.customer.id
})
},
opera: function(n) {
t.navigateTo({
url: "/pages/index/groupCompany/contract/operation?id=" + n + "&relation_type=" + this.type
})
},
addContract: function(n) {
t.navigateTo({
url: "/pagesA/crm/contract/contract?id=" + n
})
},
getInfo: function() {
var t = this;
(0, a.netContractDetail)({
id: this.id
}).then((function(n) {
t.info = n.data
}))
},
//获取合同详情页面的费用记录
getConsumeList: function() {
var t = this;
(0, a.getConsumeList)({
contract_id: this.id,
page:1,
limit:9999,
}).then((function(n) {
console.log(n,'aaa')
t.consumeList = n.data
}))
},
//获取合同详情页面的发票记录
getBillList: function() {
var t = this;
(0, a.getBillList)({
contract_id: this.id,
page:1,
limit:9999,
}).then((function(n) {
console.log(n,'bbb')
t.billList = n.data.list
}))
},
//获取合同详情页面的回款记录
getCollectionList: function() {
var t = this;
(0, a.getCollectionList)({
contract_id: this.id,
page:1,
limit:9999,
}).then((function(n) {
console.log(n,'ccc')
t.collectionList = n.data.data
}))
},
toKehuInfo: function() {
t.navigateTo({
url: "/pages/index/groupCompany/groupCompany?id=" + this.info.customer.id
})
},
toAddPlan: function(n) {
t.navigateTo({
url: "/pages/index/groupCompany/contract/addPaymentPlan?id=" + n + "&kehuid=" + this.info.customer.id
})
},
toAddPayment: function(n) {
t.navigateTo({
url: "/pages/index/groupCompany/contract/addPayment?id=" + n + "&kehuid=" + this.info.customer.id
})
},
toAddBills: function(n) {
t.navigateTo({
url: "/pages/index/groupCompany/bills/addBills?agreementId=" + n
})
},
toAddCost: function(n) {
t.navigateTo({
url: "/pages/index/groupCompany/cost/addCost?agreementId=" + n
})
},
toEditcontract: function(n) {
t.navigateTo({
url: "/pages/index/groupCompany/contract/editContract?id=" + n + "&kehuid=" + this.info.customer.id
})
},
removeExamine: function(n) {
var e = this;
t.showModal({
title: "提示",
content: "请确认是否撤回?",
success: function(i) {
i.confirm && (0, a.netCancelExamine)({
id: n
}).then((function(n) {
t.showToast({
title: n.msg,
icon: "none"
}), setTimeout((function() {
e.getInfo()
}), 2e3)
}))
}
})
},
toPass: function() {
t.navigateTo({
url: "/pages/examine/examine?id=" + this.id + "&type=contract&status=1"
})
},
toRefuse: function() {
t.navigateTo({
url: "/pages/examine/examine?id=" + this.id + "&type=contract&status=2"
})
}
}
};
n.default = s
}).call(this, e("543d")["default"])
},
b1eb: function(t, n, e) {},
f4e0: function(t, n, e) {
"use strict";
e.d(n, "b", (function() {
return o
})), e.d(n, "c", (function() {
return a
})), e.d(n, "a", (function() {
return i
}));
var i = {
uTabs: function() {
return Promise.all([e.e("common/vendor"), e.e("uview-ui/components/u-tabs/u-tabs")]).then(e.bind(null, "5924"))
},
uPopup: function() {
return e.e("uview-ui/components/u-popup/u-popup").then(e.bind(null, "9770"))
}
},
o = function() {
var t = this.$createElement,
n = (this._self._c, this.payment_list.length),
e = this.plan_list.length,
i = this.fileList.length,
o = this.opera_list.length;
this.$mp.data = Object.assign({}, {
$root: {
g0: n,
g1: e,
g2: i,
g3: o
}
})
},
a = []
},
f553: function(t, n, e) {
"use strict";
e.r(n);
var i = e("f4e0"),
o = e("0875");
for (var a in o)["default"].indexOf(a) < 0 && function(t) {
e.d(n, t, (function() {
return o[t]
}))
}(a);
e("0e79");
var c = e("f0c5"),
s = Object(c["a"])(o["default"], i["b"], i["c"], !1, null, null, null, !1, i["a"], void 0);
n["default"] = s.exports
}
},
[
["7a9b", "common/runtime", "common/vendor"]
]
]);