master
xy 2 years ago
parent e103a5c73e
commit f4c5c38577

@ -428,5 +428,12 @@ iframe {
height: 100vh; height: 100vh;
} }
} }
@media (max-width: 960px) {
.top-head-bar {
display: none !important;
}
.main-container {
top: 0 !important;
}
}
</style> </style>

@ -1,158 +1,158 @@
<template> <template>
<div> <div>
<el-steps :active="step" align-center> <!-- <el-steps :active="step" align-center>-->
<el-step title="选择预算计划"> </el-step> <!-- <el-step title="选择预算计划"> </el-step>-->
<el-step title="新增出差事项"> </el-step> <!-- <el-step title="新增出差事项"> </el-step>-->
<el-step title="新增成功"> </el-step> <!-- <el-step title="新增成功"> </el-step>-->
</el-steps> <!-- </el-steps>-->
<div style="padding: 20px"> <div style="padding: 20px">
<div v-show="step === 1"> <!-- <div v-show="step === 1">-->
<div style="display: flex;justify-content: space-between;align-items: center;"> <!-- <div style="display: flex;justify-content: space-between;align-items: center;">-->
<DatePicker <!-- <DatePicker-->
:value="planSelect.year" <!-- :value="planSelect.year"-->
placeholder="选择所属年份" <!-- placeholder="选择所属年份"-->
placement="bottom-start" <!-- placement="bottom-start"-->
style="width: 180px;margin-right: 10px;" <!-- style="width: 180px;margin-right: 10px;"-->
type="year" <!-- type="year"-->
@on-change="(e) => { <!-- @on-change="(e) => {-->
planSelect.year = e <!-- planSelect.year = e-->
getBudgets() <!-- getBudgets()-->
}" <!-- }"-->
></DatePicker> <!-- ></DatePicker>-->
<el-select <!-- <el-select-->
placeholder="科室选择" <!-- placeholder="科室选择"-->
clearable <!-- clearable-->
size="small" <!-- size="small"-->
v-model="planSelect.plan_department_id" <!-- v-model="planSelect.plan_department_id"-->
style="width: 180px;margin-right: 10px;" <!-- style="width: 180px;margin-right: 10px;"-->
@change="getBudgets" <!-- @change="getBudgets"-->
> <!-- >-->
<el-option <!-- <el-option-->
v-for="item in departments" <!-- v-for="item in departments"-->
:label="item.name" <!-- :label="item.name"-->
:value="item.id" <!-- :value="item.id"-->
:key="item.id" <!-- :key="item.id"-->
> <!-- >-->
</el-option> <!-- </el-option>-->
</el-select> <!-- </el-select>-->
<el-cascader <!-- <el-cascader-->
placeholder="资金类型选择" <!-- placeholder="资金类型选择"-->
:options="planTypes" <!-- :options="planTypes"-->
:props="{ <!-- :props="{-->
checkStrictly: false, <!-- checkStrictly: false,-->
label: 'name', <!-- label: 'name',-->
value: 'id', <!-- value: 'id',-->
}" <!-- }"-->
:value="planSelect.type" <!-- :value="planSelect.type"-->
clearable <!-- clearable-->
size="small" <!-- size="small"-->
style="width: 220px;margin-right: 10px;" <!-- style="width: 220px;margin-right: 10px;"-->
@change="(e) => { <!-- @change="(e) => {-->
planSelect.type = e[e.length - 1] || ''; <!-- planSelect.type = e[e.length - 1] || '';-->
getBudgets(); <!-- getBudgets();-->
}" <!-- }"-->
/> <!-- />-->
<Input <!-- <Input-->
v-model="planSelect.name" <!-- v-model="planSelect.name"-->
search <!-- search-->
enter-button="搜 索" <!-- enter-button="搜 索"-->
clearable <!-- clearable-->
placeholder="搜索预算计划.." <!-- placeholder="搜索预算计划.."-->
@on-search="getBudgets" <!-- @on-search="getBudgets"-->
/> <!-- />-->
</div> <!-- </div>-->
<xy-table <!-- <xy-table-->
:list="plans" <!-- :list="plans"-->
:show-index="false" <!-- :show-index="false"-->
:table-item="planTable" <!-- :table-item="planTable"-->
:height="boxheight" <!-- :height="boxheight"-->
style="margin-top: 10px" <!-- style="margin-top: 10px"-->
ref="editorPlanTable" <!-- ref="editorPlanTable"-->
row-key="id" <!-- row-key="id"-->
border <!-- border-->
default-expand-all <!-- default-expand-all-->
@select="planPick" <!-- @select="planPick"-->
:tree-props="{ children: 'notChildren', hasChildren: 'hasChildren' }" <!-- :tree-props="{ children: 'notChildren', hasChildren: 'hasChildren' }"-->
> <!-- >-->
<template v-slot:btns> <!-- <template v-slot:btns>-->
<el-table-column <!-- <el-table-column-->
label="使用金额(元)" <!-- label="使用金额(元)"-->
header-align="center" <!-- header-align="center"-->
width="144" <!-- width="144"-->
> <!-- >-->
<template slot-scope="scope" v-if="scope.row.pid === 0"> <!-- <template slot-scope="scope" v-if="scope.row.pid === 0">-->
<InputNumber <!-- <InputNumber-->
style="width: 120px" <!-- style="width: 120px"-->
:min="0" <!-- :min="0"-->
:precision="2" <!-- :precision="2"-->
:active-change="false" <!-- :active-change="false"-->
v-model="scope.row._inputMoney" <!-- v-model="scope.row._inputMoney"-->
:formatter=" <!-- :formatter="-->
(value) => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',') <!-- (value) => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')-->
" <!-- "-->
:parser="(value) => value.replace(/\$\s?|(,*)/g, '')" <!-- :parser="(value) => value.replace(/\$\s?|(,*)/g, '')"-->
></InputNumber> <!-- ></InputNumber>-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
</template> <!-- </template>-->
</xy-table> <!-- </xy-table>-->
<div style="display: flex; justify-content: flex-end"> <!-- <div style="display: flex; justify-content: flex-end">-->
<Page <!-- <Page-->
:total="planTotal" <!-- :total="planTotal"-->
show-elevator <!-- show-elevator-->
@on-change=" <!-- @on-change="-->
(e) => { <!-- (e) => {-->
planSelect.page = e; <!-- planSelect.page = e;-->
getBudgets(); <!-- getBudgets();-->
} <!-- }-->
" <!-- "-->
/> <!-- />-->
</div> <!-- </div>-->
<div style="text-align: center"> <!-- <div style="text-align: center">-->
<el-button type="primary" style="margin-top: 12px" @click="() => nextStep()" <!-- <el-button type="primary" style="margin-top: 12px" @click="() => nextStep()"-->
>下一步</el-button <!-- >下一步</el-button-->
> <!-- >-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<el-card v-show="step === 2"> <el-card v-show="step === 2">
<el-popover placement="right-start" width="660" trigger="click"> <!-- <el-popover placement="right-start" width="660" trigger="click">-->
<xy-table <!-- <xy-table-->
:list="planSelections" <!-- :list="planSelections"-->
size="mini" <!-- size="mini"-->
:table-item="[ <!-- :table-item="[-->
...planTable.slice(1), <!-- ...planTable.slice(1),-->
{ <!-- {-->
width: 120, <!-- width: 120,-->
align: 'right', <!-- align: 'right',-->
label: '使用金额(元)', <!-- label: '使用金额(元)',-->
prop: '_inputMoney', <!-- prop: '_inputMoney',-->
formatter: (v1, v2, value) => <!-- formatter: (v1, v2, value) =>-->
`${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ','), <!-- `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ','),-->
}, <!-- },-->
]" <!-- ]"-->
:height="400" <!-- :height="400"-->
style="width: 100%" <!-- style="width: 100%"-->
row-key="id" <!-- row-key="id"-->
border <!-- border-->
:tree-props="{ <!-- :tree-props="{-->
children: 'notChildren', <!-- children: 'notChildren',-->
hasChildren: 'hasChildren', <!-- hasChildren: 'hasChildren',-->
}" <!-- }"-->
> <!-- >-->
<template #btns></template> <!-- <template #btns></template>-->
</xy-table> <!-- </xy-table>-->
<el-button <!-- <el-button-->
icon="el-icon-s-order" <!-- icon="el-icon-s-order"-->
size="small" <!-- size="small"-->
type="primary" <!-- type="primary"-->
slot="reference" <!-- slot="reference"-->
>查看已选预算计划{{ planSelections.length }}</el-button <!-- >查看已选预算计划{{ planSelections.length }}</el-button-->
> <!-- >-->
</el-popover> <!-- </el-popover>-->
<el-form :model="form" :rules="rules" ref="form" label-width="120px" style="margin-top: 20px;"> <el-form :model="form" :rules="rules" ref="form" label-width="120px" style="margin-top: 20px;">
<el-form-item label="出差事由" prop="title"> <el-form-item label="出差事由" prop="title">
@ -181,7 +181,7 @@
<!-- </el-radio-group>--> <!-- </el-radio-group>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<div style="display: flex;justify-content: center;"> <div style="display: flex;justify-content: center;">
<el-button type="primary" plain @click="forwardStep"></el-button> <!-- <el-button type="primary" plain @click="forwardStep"></el-button>-->
<el-button type="warning" plain @click="reset"></el-button> <el-button type="warning" plain @click="reset"></el-button>
<el-button :loading="loading" type="primary" @click="submit"></el-button> <el-button :loading="loading" type="primary" @click="submit"></el-button>
</div> </div>
@ -206,7 +206,7 @@ export default {
departments: [], departments: [],
id: "", id: "",
step: 1, step: 2,
loading: false, loading: false,
plans: [], plans: [],
boxheight: 300, boxheight: 300,
@ -312,7 +312,7 @@ export default {
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
if (this.form.end_date && this.form.start_date) { if (this.form.end_date && this.form.start_date) {
if (this.$moment(this.form.end_date).isAfter(this.form.start_date)) { if (this.$moment(this.form.end_date).isAfter(this.form.start_date) || (this.form.end_date === this.form.start_date)) {
callback() callback()
} else { } else {
callback(new Error('结束时间不能小于开始时间')) callback(new Error('结束时间不能小于开始时间'))
@ -328,7 +328,7 @@ export default {
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
if (this.form.end_date && this.form.start_date) { if (this.form.end_date && this.form.start_date) {
if (this.$moment(this.form.end_date).isAfter(this.form.start_date)) { if (this.$moment(this.form.end_date).isAfter(this.form.start_date) || (this.form.end_date === this.form.start_date)) {
callback() callback()
} else { } else {
callback(new Error('结束时间不能小于开始时间')) callback(new Error('结束时间不能小于开始时间'))

@ -460,11 +460,11 @@ export default {
goAway (row) { goAway (row) {
const baseInfo = { const baseInfo = {
"flow_title": row.title, "flow_title": row.title,
"6583dbd6332fd": row.start_date, "chuchaikaishiriqi": row.start_date,
"6583dbec5d888": row.end_date, "chuchaijieshuriqi": row.end_date,
"6583dc097b6e2": row.title, "chuchaishiyou": row.title,
}; };
let url = `${process.env.VUE_APP_OUT_OLD}/flow/create/56?auth_token=${this.$store.getters.oa_token}&out_away_id=${ let url = `${process.env.VUE_APP_OUT_OLD}/flow/create/58?auth_token=${this.$store.getters.oa_token}&out_away_id=${
row.id row.id
}&default_json=${JSON.stringify(baseInfo)}`; }&default_json=${JSON.stringify(baseInfo)}`;
window.open( window.open(

@ -8,7 +8,7 @@
<div style="padding: 20px"> <div style="padding: 20px">
<div v-show="step === 1"> <div v-show="step === 1">
<div style="display: flex;justify-content: space-between;align-items: center;"> <div class="select-container">
<DatePicker <DatePicker
:value="planSelect.year" :value="planSelect.year"
placeholder="选择所属年份" placeholder="选择所属年份"
@ -79,6 +79,7 @@
<template v-slot:btns> <template v-slot:btns>
<el-table-column <el-table-column
label="使用金额(元)" label="使用金额(元)"
fixed="right"
header-align="center" header-align="center"
width="144" width="144"
> >
@ -208,7 +209,7 @@
<el-form-item prop="flow_mod_id" label="事前流程"> <el-form-item prop="flow_mod_id" label="事前流程">
<el-select v-model="form.flow_mod_id" style="width: 100%"> <el-select v-model="form.flow_mod_id" style="width: 100%">
<el-option v-for="item in flowIds" :key="item.id" :value="item.id" :label="item.name"></el-option> <el-option v-for="item in flowIdsFormat" :key="item.id" :value="item.id" :label="item.name"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -1288,14 +1289,16 @@ export default {
hideJSON = JSON.parse(this.$route.query.hide_json) hideJSON = JSON.parse(this.$route.query.hide_json)
if (!hideJSON) return if (!hideJSON) return
console.log(hideJSON) console.log(hideJSON)
setTimeout(() => {
this.$nextTick(() => { this.$nextTick(() => {
hideJSON.forEach(item => { hideJSON.forEach(item => {
let dom =document.querySelector(`.el-form-item label[for=${item}]`) let dom = document.querySelector(`.el-form-item label[for=${item}]`)
if (dom) { if (dom) {
dom.parentElement.style.display = 'none' dom.parentElement.style.display = 'none'
} }
}) })
}) })
},300)
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} }
@ -1449,6 +1452,7 @@ export default {
} }
if (this.step >= 3) return; if (this.step >= 3) return;
if (this.step === 1) { if (this.step === 1) {
this.hideFormItem()
const selections = this.$refs["editorPlanTable"].getSelection(); const selections = this.$refs["editorPlanTable"].getSelection();
if (selections?.length > 0) { if (selections?.length > 0) {
for (let i of selections) { for (let i of selections) {
@ -1474,7 +1478,9 @@ export default {
new_money: i.money, new_money: i.money,
})); }));
this.form.plan_price = selections.reduce((a, b) => a + Number(b._inputMoney), 0); this.form.plan_price = selections.reduce((a, b) => a + Number(b._inputMoney), 0);
if (selections[0]?.flow_mod_id && !this.form.flow_mod_id) {
this.form.flow_mod_id = selections[0]?.flow_mod_id; this.form.flow_mod_id = selections[0]?.flow_mod_id;
}
this.step = 2; this.step = 2;
} else { } else {
this.$message({ this.$message({
@ -1493,7 +1499,7 @@ export default {
this.form.contract_plan_links = [] 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_purchase = this.flowIds?.find(i => i.id == this.form.flow_mod_id)?.type == 2 ? 1 : 0;
this.form.is_contract = this.flowIds?.find(i => i.id == this.form.flow_mod_id)?.type == 2 ? 0 : 1; // this.form.is_contract = this.flowIds?.find(i => i.id == this.form.flow_mod_id)?.type == 2 ? 0 : 1;
if (this.type === 'add') { if (this.type === 'add') {
addContrant(this.form,true).then(res => { addContrant(this.form,true).then(res => {
this.btnLoading = false this.btnLoading = false
@ -1678,6 +1684,12 @@ export default {
} }
}, },
computed: { computed: {
flowIdsFormat () {
let temp = this.form.is_trade;
console.log(temp ? this.flowIds.filter(i => /工会/g.test(i.name)) : this.flowIds)
return temp ? this.flowIds.filter(i => /工会/g.test(i.name)) : this.flowIds
},
isOtherFlow () { isOtherFlow () {
return this.flowIds.find(i => i.id === this.form.flow_mod_id)?.type == 1; return this.flowIds.find(i => i.id === this.form.flow_mod_id)?.type == 1;
}, },
@ -1782,6 +1794,11 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.select-container {
display: flex;
justify-content: space-between;
align-items: center;
}
.form__contract-to-contracts--no { .form__contract-to-contracts--no {
min-height: 30px; min-height: 30px;
border: 1px solid #dcdee2; border: 1px solid #dcdee2;
@ -1824,4 +1841,32 @@ export default {
margin-top: 12px; margin-top: 12px;
} }
} }
@media (max-width: 960px) {
.select-container {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
& > * {
width: 100% !important;
flex: 1;
margin-bottom: 4px;
}
}
.el-form-body {
width: 100%;
display: grid;
grid-template-columns: repeat(1, 1fr);
grid-row-gap: 10px;
padding: 20px;
}
::v-deep .el-form-item--small.el-form-item > div {
margin-left: 0!important;
}
::v-deep .el-form-item__label {
display: block;
width: 100%!important;
}
}
</style> </style>

@ -2877,7 +2877,7 @@ export default {
// //
flowStatus["shenpi"].setStatus(item.join_status) flowStatus["shenpi"].setStatus(item.join_status)
if (item.join_status === 1 && (item.invite_status === 3 || if (item.join_status === 1 && (item.invite_status === 3 ||
(item.purchase_way?.remark === 'false' && item.purchase_status === 3))) { ((item.purchase_way?.remark === 'false' || item.flow_mod_id === 5 || item.flow_mod_id === 29) && item.purchase_status === 3))) {
// //
flowStatus["shenpi"].setExecutable(true) flowStatus["shenpi"].setExecutable(true)
} }

@ -5,14 +5,7 @@
<img :src="require('@/assets/imgs/login-title.png')" alt="" /> <img :src="require('@/assets/imgs/login-title.png')" alt="" />
</div> </div>
<div <div class="login-pannel">
style="
display: flex;
justify-content: space-between;
padding: 0 41px 0 104px;
margin-top: 57px;
"
>
<div class="left"> <div class="left">
<img :src="require('@/assets/imgs/login-img1.png')" alt="" /> <img :src="require('@/assets/imgs/login-img1.png')" alt="" />
</div> </div>
@ -307,6 +300,12 @@ $light_gray: #eee;
filter: drop-shadow(0px 5px 24.5px rgba(74, 113, 240, 0.23)); filter: drop-shadow(0px 5px 24.5px rgba(74, 113, 240, 0.23));
.login-pannel {
display: flex;
justify-content: space-between;
padding: 0 41px 0 104px;
margin-top: 57px;
}
.left { .left {
img { img {
width: 310px; width: 310px;
@ -366,4 +365,36 @@ $light_gray: #eee;
.form-item + .form-item { .form-item + .form-item {
margin-top: 18px; margin-top: 18px;
} }
@media (max-width: 960px) {
.form-container {
width: 90% !important;
height: 70% !important;
padding: 20px;
.title-container {
margin-top: 0;
& > img {
width: 100%;
object-fit: contain;
display: block;
margin: auto;
}
}
.left {
display: none;
}
.right {
width: 100%;
}
.login-pannel {
margin-top: 10% !important;
padding: 0 20px !important;
}
}
}
.login-container .el-form-item {
width: 100% !important;
}
</style> </style>

@ -31,6 +31,10 @@ export default {
calcRate () { calcRate () {
const appRef = this.$refs["formContainer"] const appRef = this.$refs["formContainer"]
if (!appRef) return if (!appRef) return
if (window.innerWidth < 980) {
appRef.style.transform = `scale(1, 1)`
return
}
// 当前宽高比 // 当前宽高比
const currentRate = parseFloat((window.innerWidth / window.innerHeight).toFixed(5)) const currentRate = parseFloat((window.innerWidth / window.innerHeight).toFixed(5))
if (appRef) { if (appRef) {

Loading…
Cancel
Save