master
xy 1 year ago
parent e103a5c73e
commit f4c5c38577

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

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

@ -460,11 +460,11 @@ export default {
goAway (row) {
const baseInfo = {
"flow_title": row.title,
"6583dbd6332fd": row.start_date,
"6583dbec5d888": row.end_date,
"6583dc097b6e2": row.title,
"chuchaikaishiriqi": row.start_date,
"chuchaijieshuriqi": row.end_date,
"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
}&default_json=${JSON.stringify(baseInfo)}`;
window.open(

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

@ -2877,7 +2877,7 @@ export default {
//
flowStatus["shenpi"].setStatus(item.join_status)
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)
}

@ -5,14 +5,7 @@
<img :src="require('@/assets/imgs/login-title.png')" alt="" />
</div>
<div
style="
display: flex;
justify-content: space-between;
padding: 0 41px 0 104px;
margin-top: 57px;
"
>
<div class="login-pannel">
<div class="left">
<img :src="require('@/assets/imgs/login-img1.png')" alt="" />
</div>
@ -307,6 +300,12 @@ $light_gray: #eee;
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 {
img {
width: 310px;
@ -366,4 +365,36 @@ $light_gray: #eee;
.form-item + .form-item {
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>

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

Loading…
Cancel
Save