From 7f454398a283b2058f60c4c7e7782f8acafbef24 Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Mon, 16 Dec 2024 18:19:57 +0800 Subject: [PATCH] init --- src/components/PlanPicker/index.vue | 298 ++++++++++++++++++ src/components/XyTable/index.vue | 2 +- src/router/index.js | 6 + src/views/away/index.vue | 4 +- src/views/contract/contractEdit.vue | 13 +- src/views/contract/contractList.vue | 11 +- .../contract/paymentRegistrationList.vue | 26 +- 7 files changed, 342 insertions(+), 18 deletions(-) create mode 100644 src/components/PlanPicker/index.vue diff --git a/src/components/PlanPicker/index.vue b/src/components/PlanPicker/index.vue new file mode 100644 index 0000000..1df0629 --- /dev/null +++ b/src/components/PlanPicker/index.vue @@ -0,0 +1,298 @@ + + + + + diff --git a/src/components/XyTable/index.vue b/src/components/XyTable/index.vue index 1952106..167ae91 100644 --- a/src/components/XyTable/index.vue +++ b/src/components/XyTable/index.vue @@ -173,7 +173,7 @@ export default { data={list} highlight-current-row={highlightCurrentRow} expand-row-keys={expandRowKeys} - height={height ?? tableHeight} + height={height ? height : tableHeight} className="v-table" style={tableStyle} row-key={rowKey} diff --git a/src/router/index.js b/src/router/index.js index a519a7d..69ec8ee 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -42,6 +42,12 @@ export const constantRoutes = [{ hidden: true }, + { + path: '/plan-picker', + component: () => import('@/components/PlanPicker'), + hidden: true + }, + { path: '/', component: Layout, diff --git a/src/views/away/index.vue b/src/views/away/index.vue index 8b8fc4d..bb9b518 100644 --- a/src/views/away/index.vue +++ b/src/views/away/index.vue @@ -499,9 +499,9 @@ export default { } else { let rows = this.$refs['xyTable'].getSelection() const baseInfo = { - "totalAmt": row.reduce((pre, cur) => pre + Number(row.expense??0),0), + "totalAmt": rows.reduce((pre, cur) => pre + Number(row?.expense??0),0), "chuchaishiyou": rows.map(row => row.title).toString(), - "xiangguanchuchaishenpidan": rows.map(i => row.flow_list.find(i => i.tag === 'chuchai')?.flow_id)?.filter(i => i)?.toString() + "xiangguanchuchaishenpidan": rows.map(row => row.flow_list.find(i => i.tag === 'chuchai')?.flow_id)?.filter(i => i)?.toString() }; url = `${process.env.VUE_APP_OUT_OLD}/#/flow/create?auth_token=${window.encodeURIComponent(getToken())}&module_name=oa&isSinglePage=1&module_id=78&out_away_id=${rows.map(i => i.id)?.toString()}&default_json=${JSON.stringify(baseInfo)}`; } diff --git a/src/views/contract/contractEdit.vue b/src/views/contract/contractEdit.vue index 4ec115f..a9f71e3 100644 --- a/src/views/contract/contractEdit.vue +++ b/src/views/contract/contractEdit.vue @@ -457,7 +457,7 @@ placeholder="请填写一般采购类型" v-model="form.common_type" style="width: 100%" - @change="e => form.name = `${e}(${$moment().format('YYYY-MM-DD HH:mm')})`" + @change="e => form.name = `${e}(${$moment().format('YYYY-MM-DD')})`" /> @@ -1499,6 +1499,9 @@ export default { this.form.contract_plan_links = [] } this.form.is_purchase = (this.flowIds?.find(i => i.id == this.form.flow_mod_id)?.type == 2 ? 1 : 0) || this.form.is_common_purchase; + if (this.form.is_common_purchase) { + this.form.is_contract = 1 + } // this.form.is_contract = this.flowIds?.find(i => i.id == this.form.flow_mod_id)?.type == 2 ? 0 : 1; if (!this.form.money) { this.form.money = this.form.plan_price @@ -1741,6 +1744,14 @@ export default { if (myPurchaseType) { next(vm => { vm.myPurchaseType = Number(myPurchaseType) + if (vm.myPurchaseType === 1) { + vm.myPurchaseType = 1 + vm.form.is_common_purchase = 0 + } else if (vm.myPurchaseType === 2) { + vm.step = 2 + vm.myPurchaseType = 2 + vm.form.is_common_purchase = 1 + } }) } else { MessageBox.confirm("请选择类型", "提示", { diff --git a/src/views/contract/contractList.vue b/src/views/contract/contractList.vue index 55f5e34..e8f1650 100644 --- a/src/views/contract/contractList.vue +++ b/src/views/contract/contractList.vue @@ -1195,7 +1195,7 @@ export default { customFn:row => { return (
- { this.flowStatus.get(row.FLOWSTATUS.caigou.getStatus()) || '无2' } + { this.flowStatus.get(row.FLOWSTATUS.caigou.getStatus()) || '无' }
{ (row.FLOWSTATUS.caigou.getStatus() !== 2 && row.FLOWSTATUS.caigou.getStatus() !== -2) ? this.toOaDetail('caigou',row)}}>查看 : '' @@ -1209,12 +1209,9 @@ export default { width: 145, prop: "invite_status", customFn:row => { - if (!row.FLOWSTATUS.zhaobiao.getStatus()) { - return (); - } return (
- { this.flowStatus.get(row.FLOWSTATUS.zhaobiao.getStatus()) } + { this.flowStatus.get(row.FLOWSTATUS.zhaobiao.getStatus()) || '无' }
{ (row.FLOWSTATUS.zhaobiao.getStatus() !== 2 && row.FLOWSTATUS.zhaobiao.getStatus() !== -2) ? { @@ -2357,10 +2354,10 @@ export default { flowStatus["caigou"].setExecutable(true) } } - if (item.purchase_way?.value !== '网上商城' && item.is_contract && item.purchase_way?.remark === 'true' && !item.is_substitute) { + if (item.purchase_way?.value !== '网上商城' && item.is_contract && (item.purchase_way?.remark === 'true' || item.is_common_purchase) && !item.is_substitute) { //不为网上商场 是合同\ flowStatus["zhaobiao"].setStatus(item.invite_status ?? 2) - if ((!item.invite_status || item.invite_status === 2) && caigou?.flow_status === 1) { + if ((!item.invite_status || item.invite_status === 2) && (caigou?.flow_status === 1 || common_purchase?.flow_status === 1)) { //采购完成,招标未开始 flowStatus["zhaobiao"].setExecutable(true) } diff --git a/src/views/contract/paymentRegistrationList.vue b/src/views/contract/paymentRegistrationList.vue index 150d771..23ad68f 100644 --- a/src/views/contract/paymentRegistrationList.vue +++ b/src/views/contract/paymentRegistrationList.vue @@ -129,7 +129,7 @@ > 资产申请 -