+
@@ -1082,9 +1114,11 @@ import contractSign from "@/views/contract/components/contractSign";
import contractPaymentRegistration from "@/views/contract/components/contractPaymentRegistration";
import biddingUpload from "./components/biddingUpload.vue";
import oaFiles from './components/oaFiles.vue';
+import addContractLedger from '@/views/contract/components/addContractLedger.vue'
let iframe;
export default {
components: {
+ addContractLedger,
editor,
detail,
paymentRegistration,
@@ -1181,7 +1215,7 @@ export default {
};
return {
- userList: ["liuxiangyu", "zhushulan", "admin", "jiangjiao"],
+ userList: ["ma_sm", "admin", "yu_l","wang_yx","li_f","chen_y"],
nowContract: {},
window: {
width: 0,
@@ -1271,6 +1305,81 @@ export default {
list: [], //数据
total: 0,
//表格
+ ledgerTable: [
+ {
+ label: "项目名称",
+ width: 380,
+ prop: "name",
+ fixed: "left",
+ align: "left",
+ },
+ {
+ label: "合同编号",
+ width: 200,
+ prop: 'number',
+ align: 'center'
+ },
+ {
+ label: "合同签订价(元)",
+ width: 140,
+ prop: "money",
+ align: "right",
+ formatter: (cell, data, value) => {
+ return Number(value)
+ .toFixed(2)
+ .replace(/(\d)(?=(\d{3})+\.)/g, "$1,");
+ },
+ },
+ {
+ label: "供应商/服务商",
+ width: 220,
+ prop: "supply",
+ align: "left",
+ },
+ {
+ label: "业务科室",
+ width: 140,
+ prop: "department.name",
+ },
+ {
+ label: "经办人",
+ width: 140,
+ prop: "admin.name",
+ },
+ {
+ label: "合同服务日期",
+ width: 200,
+ customFn: (row) => {
+ if (row.start_date && row.end_date) {
+ return (
+
+
+ {row.start_date} ~ {row.end_date}
+
+
+ );
+ } else {
+ return
;
+ }
+ },
+ },
+ {
+ label: "签订日期",
+ width: 160,
+ prop: "date",
+ formatter: (cell, data, value) => {
+ if (value) return parseTime(new Date(value), "{y}-{m}-{d}");
+ },
+ },
+ {
+ label: "创建日期",
+ width: 160,
+ prop: "created_at",
+ formatter: (cell, data, value) => {
+ return parseTime(new Date(value), "{y}-{m}-{d}");
+ },
+ },
+ ],
table: [
{
label: "项目名称",
@@ -1374,30 +1483,11 @@ export default {
label: "采购业务审批流程",
width: 158,
prop: "purchase_status",
- formatter: (cell, data, value) => {
- if (cell.is_substitute || cell.is_simple) {
- return "无";
- }
- switch (value) {
- case 1:
- return "待申请";
- break;
- case 2:
- return "流转中";
- break;
- case 3:
- return "已办结";
- break;
- default:
- return "异常";
- break;
- }
- },
customFn:row => {
+ if (row.is_substitute || row.is_simple || !row.is_contract) {
+ return (
无);
+ }
const getDate = (value) => {
- if (row.is_substitute || row.is_simple) {
- return "无";
- }
switch (value) {
case 1:
return "待申请";
@@ -1428,36 +1518,14 @@ export default {
label: "招标审核流程",
width: 145,
prop: "invite_status",
- formatter: (cell, data, value) => {
- if (cell.is_substitute || cell.is_simple) {
- return "无";
- }
- if (cell.purchase_way?.remark === "false") {
- return "无";
+ customFn:row => {
+ if (row.is_substitute || row.is_simple || !row.is_contract) {
+ return (
无);
}
- switch (value) {
- case 1:
- return "待申请";
- break;
- case 2:
- return "流转中";
- break;
- case 3:
- return "已办结";
- break;
- default:
- return "异常";
- break;
+ if (row.purchase_way?.remark === "false") {
+ return (
无);
}
- },
- customFn:row => {
const getDate = (value) => {
- if (row.is_substitute || row.is_simple) {
- return "无";
- }
- if (row.purchase_way?.remark === "false") {
- return "无";
- }
switch (value) {
case 1:
return "待申请";
@@ -1494,30 +1562,11 @@ export default {
label: "合同审批流程",
width: 145,
prop: "join_status",
- formatter: (cell, data, value) => {
- if (cell.is_simple) {
- return "无";
- }
- switch (value) {
- case 1:
- return "待申请";
- break;
- case 2:
- return "流转中";
- break;
- case 3:
- return "已办结";
- break;
- default:
- return "异常";
- break;
- }
- },
customFn:row => {
+ if (row.is_simple || !row.is_contract) {
+ return (
无);
+ }
const getDate = (value) => {
- if (row.is_simple) {
- return "无";
- }
switch (value) {
case 1:
return "待申请";
@@ -1739,13 +1788,7 @@ export default {
planTableSearch: [
{
label: "分类",
- prop: "type",
- formatter: (cell, data, value) => {
- let res = this.moneyWay.filter((item) => {
- return item.id === value;
- });
- return res[0]?.value || "未知";
- },
+ prop: "type_detail.value",
},
{
label: "年份",
@@ -1800,12 +1843,6 @@ export default {
width: 80,
align: "center",
},
- {
- label: "隶属",
- prop: "pid_info.name",
- width: 180,
- align: "left",
- },
{
label: "名称",
prop: "name",
@@ -1842,6 +1879,7 @@ export default {
isShowAdd: false,
form: {
name: "",
+ is_contract: 1,
is_simple: 0,
supply: "",
money: 0,
@@ -1920,6 +1958,7 @@ export default {
planSearch: {
name: "",
plan_department_id: "",
+ year: ""
},
planTotal: 0,
plansPageIndex: 1,
@@ -2005,7 +2044,7 @@ export default {
console.log(res)
if (res && res.flow?.id) {
window.open(
- `http://hjjc-szemcold-test.ali251.langye.net/index.php?s=/flow/edit/id/${res.flow.id}&auth_token=${this.$store.getters.oa_token}`,
+ `${process.env.VUE_APP_OUT_OLD}/index.php?s=/flow/edit/id/${res.flow.id}&auth_token=${this.$store.getters.oa_token}`,
"bidding",
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
)
@@ -2104,7 +2143,7 @@ export default {
},
cellStyle({ row, column, rowIndex, columnIndex }) {
if (column.property === "req_status") {
- if (row.is_plan || row.is_substitute || row.is_simple) {
+ if (row.is_plan || row.is_substitute || row.is_simple || !row.is_contract) {
return {
color: "rgb(140,140,140)",
};
@@ -2273,9 +2312,6 @@ export default {
//采购流程
async buyProcess(row) {
- let zijinlaiyuanjuti = row.plans?.map(plan => {
- return this.plans.find(p => p.id === plan.pid)?.name
- })
this.setNowContract(row, "caigou");
let baseInfo = {
title: row?.name,
@@ -2291,11 +2327,12 @@ export default {
if (index === 0) {
return cur?.value;
} else {
- return prev + "," + cur?.value;
+
}
}, ""),
- zijinlaiyuanjuti: zijinlaiyuanjuti.toString()
+ zijinlaiyuanjuti: row?.plans.reduce((pre,cur,index)=>(index === 0 ? cur?.name : pre+cur?.name+","),"")
};
+ console.log(baseInfo.zijinlaiyuanjuti)
// let res = await getOatoken()
let url = `${process.env.VUE_APP_OUT_OLD}?s=/flow/add/modid/8&auth_token=${this.$store.getters.oa_token}&out_caigou_id=${
row.id
@@ -2394,7 +2431,8 @@ export default {
page: this.plansPageIndex,
plan_department_id: this.planSearch.plan_department_id,
top_pid: '',
- is_tree: 1
+ is_tree: 1,
+ year: this.planSearch.year
});
this.plans = res.list;
@@ -2446,6 +2484,11 @@ export default {
},
//获取合同列表
async getContracts(is_export,noloading=false) {
+ if (/contractLedger/g.test(this.$route.path)) {
+ this.select.is_contract = 1
+ } else {
+ this.select.is_contract = ""
+ }
const res = await getContract({
page_size: this.select.pageSize,
page: this.select.pageIndex,
diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue
index b1e0080..b2717d5 100644
--- a/src/views/dashboard/index.vue
+++ b/src/views/dashboard/index.vue
@@ -154,7 +154,7 @@