Merge pull request 'dd' (#389) from dd into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/389
This commit is contained in:
@@ -25,9 +25,9 @@ steps:
|
||||
- npm -v
|
||||
- mkdir -p ./node_modules
|
||||
- export NODE_MODULES_PATH=`pwd`/node_modules
|
||||
- npm config set registry https://registry.npmmirror.com
|
||||
- set NODE_OPTIONS=--openssl-legacy-provider
|
||||
- npm install
|
||||
# - npm config set registry https://registry.npmmirror.com
|
||||
# - set NODE_OPTIONS=--openssl-legacy-provider
|
||||
# - npm install
|
||||
- npm run build
|
||||
- ls /app/build/$DRONE_REPO_NAME/
|
||||
- echo $NODE_MODULES_PATH
|
||||
|
||||
9588
package-lock.json
generated
9588
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -152,3 +152,9 @@ export const updateLedger = (data) => {
|
||||
data: data
|
||||
});
|
||||
};
|
||||
export const searchUpdateLedgerData = (projectId) => {
|
||||
return request({
|
||||
url: `/workflow/mosr/expense/ledger/${projectId}`,
|
||||
method: "get"
|
||||
});
|
||||
};
|
||||
|
||||
@@ -22,7 +22,7 @@ export function getDepartmentTree() {
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
export function getMosrDept(params) {
|
||||
export function getMosrUser(params) {
|
||||
return request({
|
||||
url: '/admin/mosr/user/choose',
|
||||
method: 'get',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-button color="#DED0B2" style="float: right;margin: 0 10px 10px 0" @click="exportTable">导出</el-button>
|
||||
<el-table ref="table" :data="tableData" style="width: 100%;height: 479px" :show-summary="true"
|
||||
<el-table ref="table" :data="tableData" style="width: 100%;height: 479px" :show-summary="true" border
|
||||
:summary-method="getSummaries" v-loading="loading" :header-cell-style="{background:'#f5f7fa'}">
|
||||
<el-table-column type="index" label="序号" align="center" width="60"/>
|
||||
<el-table-column prop="projectName" label="项目名称" align="center"/>
|
||||
@@ -24,7 +24,8 @@
|
||||
<el-table-column prop="afterTax" label="分摊金额" align="center">
|
||||
<template #default="scope">
|
||||
<div v-if="scope.row.afterTax !== null">
|
||||
{{ toThousands(scope.row.afterTax) }}
|
||||
<!-- {{ toThousands(scope.row.afterTax) }}-->
|
||||
{{ scope.row.afterTax }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -70,7 +71,7 @@ const getSummaries = (param) => {
|
||||
return prev
|
||||
}
|
||||
}, 0)}`
|
||||
sums[index] = toThousands(sums[index])
|
||||
// sums[index] = toThousands(sums[index])
|
||||
} else {
|
||||
sums[index] = '-'
|
||||
}
|
||||
|
||||
@@ -12,32 +12,105 @@
|
||||
<script setup lang="jsx">
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
import {toThousands} from '@/utils/changePrice.js'
|
||||
import {computed, ref} from "vue";
|
||||
import {getBaseInfoApi} from "@/components/steps/api";
|
||||
import {searchUpdateLedgerData} from "@/api/project-manage";
|
||||
import {ElNotification} from "element-plus";
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const schema = computed(() => {
|
||||
return [
|
||||
{
|
||||
label: '征集名称',
|
||||
prop: 'requirementName',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
const formArray = ref([
|
||||
{
|
||||
label: '征集名称',
|
||||
prop: 'requirementName',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
}
|
||||
])
|
||||
const formDataArray = ref([
|
||||
{
|
||||
label: '征集名称',
|
||||
prop: 'requirementName',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目负责人',
|
||||
prop: 'projectChargePerson',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目开始时间',
|
||||
prop: 'startTime',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目预计持续时间',
|
||||
prop: 'endTime',
|
||||
colProps: {
|
||||
span: 12
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目开展方式',
|
||||
prop: 'projectDevelopmentWay',
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目预算',
|
||||
prop: 'projectBudgetDescription',
|
||||
colProps: {
|
||||
span: 24
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '项目总体完成率(%)',
|
||||
prop: 'projectCompletionRate',
|
||||
colProps: {
|
||||
span: 6
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '已完成工作量',
|
||||
prop: 'completeWork',
|
||||
colProps: {
|
||||
span: 18
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
const tableData = ref({})
|
||||
const schema = computed(() => {
|
||||
if (JSON.stringify(tableData.value) !== '{}') {
|
||||
return formDataArray.value
|
||||
} else {
|
||||
return formArray.value
|
||||
}
|
||||
})
|
||||
const baseForm = ref()
|
||||
const tableIns = ref()
|
||||
const btns=ref([
|
||||
const btns = ref([
|
||||
{name: '表格更新', key: 'update', color: '#DED0B2', auth: ''}
|
||||
])
|
||||
const searchConfig = reactive([
|
||||
@@ -158,10 +231,10 @@ const tableConfig = reactive({
|
||||
},
|
||||
btns: btns.value
|
||||
})
|
||||
if(route.query.state!=4){
|
||||
if (route.query.state !== '4') {
|
||||
btns.value.push({name: '上传费用', key: 'add', color: '#DED0B2', auth: ''})
|
||||
}
|
||||
const handleUpdateTable=()=>{
|
||||
const handleUpdateTable = () => {
|
||||
router.push({
|
||||
name: 'Implementation/update',
|
||||
query: {
|
||||
@@ -201,6 +274,21 @@ const search = (val) => {
|
||||
tableConfig.params = {...val, projectId: route.query.id}
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
const init = async () => {
|
||||
const {code, msg, data} = await searchUpdateLedgerData(route.query.id)
|
||||
if (data) {
|
||||
tableData.value = data
|
||||
baseForm.value.setValues(data)
|
||||
}
|
||||
// if (code !== 1000) {
|
||||
// ElNotification({
|
||||
// title: '提示',
|
||||
// message: msg,
|
||||
// type: 'error'
|
||||
// })
|
||||
// }
|
||||
}
|
||||
init()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="projectChargePerson" label="项目负责人">
|
||||
{{currentPerson.name}}
|
||||
{{tableForm.projectChargePerson?tableForm.projectChargePerson: currentPerson.name }}
|
||||
<el-button @click="showPersonnelPicker">
|
||||
{{ currentPerson.name ? '更改' : '请选择研发人员' }}
|
||||
{{ tableForm.projectChargePerson||currentPerson.name ? '更改' : '请选择研发人员' }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -54,9 +54,9 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="projectCompletionRate" label="项目总体完成率">
|
||||
<el-input v-model="tableForm.projectCompletionRate" placeholder="请输入项目总体完成率" clearable>
|
||||
</el-input>
|
||||
<el-form-item prop="projectCompletionRate" label="项目总体完成率(%)">
|
||||
<el-input-number v-model="tableForm.projectCompletionRate" placeholder="请输入项目总体完成率" :controls="false" style="width: 200px">
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="16" :offset="1">
|
||||
@@ -82,6 +82,7 @@ import {ref} from "vue";
|
||||
import UserPicker from "@/views/workflow/process/common/UserPicker.vue";
|
||||
|
||||
import {useTagsView} from '@/stores/tagsview.js'
|
||||
import {searchUpdateLedgerData} from "@/api/project-manage";
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
const baseForm = ref()
|
||||
@@ -103,7 +104,7 @@ const userPicker = ref()
|
||||
const selected = (select) => {
|
||||
for (const selectElement of select) {
|
||||
currentPerson.value = selectElement
|
||||
tableForm.value.projectChargePerson=selectElement.id
|
||||
tableForm.value.projectChargePerson = selectElement.id
|
||||
}
|
||||
}
|
||||
const disabledDate = (time) => {
|
||||
@@ -116,22 +117,10 @@ const showPersonnelPicker = () => {
|
||||
userPicker.value.showUserPicker()
|
||||
}
|
||||
const handleSubmit = async () => {
|
||||
console.log('tableForm', tableForm.value)
|
||||
let params={
|
||||
let params = {
|
||||
...tableForm.value,
|
||||
projectId:route.query.id
|
||||
projectId: route.query.id
|
||||
}
|
||||
// tableForm.value={
|
||||
// "projectName": "测试上报622",
|
||||
// "completeWork": "已完成系统性需求调研、核心业务流程梳理以及研发计划的制定。",
|
||||
// "endTime": "2024-06-26",
|
||||
// "projectBudgetDescription": "本项目总研发投入预算为xx万元,其中支付给外部专业机构的合作研发费用预计为xx万元。(示例)",
|
||||
// "projectChargePerson": 161,
|
||||
// "projectCompletionRate": "40",
|
||||
// "projectDevelopmentWay": "项目采用合作研发模式,由省国经公司牵头,联合本领域外部专业研究机构作为合作方共同开展。",
|
||||
// "projectId": "",
|
||||
// "startTime": "2024-06-11"
|
||||
// }
|
||||
updateLedger(params).then(res => {
|
||||
if (res.code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
@@ -154,11 +143,19 @@ const getBaseInfo = async () => {
|
||||
const {code, data} = await getBaseInfoApi(route.query.id)
|
||||
tableForm.value.projectName = data.projectName
|
||||
}
|
||||
|
||||
getBaseInfo()
|
||||
const init = () => {
|
||||
|
||||
const init = async () => {
|
||||
const {code, msg, data} = await searchUpdateLedgerData(route.query.id)
|
||||
tableForm.value = data
|
||||
if (code !== 1000) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: msg,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
init()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -70,9 +70,8 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {computed, defineProps, defineExpose} from "vue";
|
||||
import {ElMessageBox} from "element-plus";
|
||||
import {getMosrDept} from "@/api/workflow/process-user";
|
||||
import {getMosrUser} from "@/api/workflow/process-user";
|
||||
|
||||
const props = defineProps({
|
||||
value: {
|
||||
@@ -155,7 +154,7 @@ const getList = (flag) => {
|
||||
chooseName: filterText.value
|
||||
}
|
||||
}
|
||||
getMosrDept(params).then(res => {
|
||||
getMosrUser(params).then(res => {
|
||||
// if (res.data) {
|
||||
if (selectItem.type === -1) {
|
||||
dataList.value = res.data;
|
||||
|
||||
Reference in New Issue
Block a user