|
@@ -74,7 +74,7 @@
|
|
|
icon="el-icon-folder-checked"
|
|
icon="el-icon-folder-checked"
|
|
|
title="入库申报"
|
|
title="入库申报"
|
|
|
v-if="dataType === 'asset'"
|
|
v-if="dataType === 'asset'"
|
|
|
- @click="projectCarry"
|
|
|
|
|
|
|
+ @click="projectStore"
|
|
|
/>
|
|
/>
|
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
</div>
|
|
</div>
|
|
@@ -316,7 +316,7 @@
|
|
|
:dialogType="diaType"
|
|
:dialogType="diaType"
|
|
|
@close="formDialogClose"
|
|
@close="formDialogClose"
|
|
|
@export="exportExcel"
|
|
@export="exportExcel"
|
|
|
- :ids="selectList"
|
|
|
|
|
|
|
+ :ids="selectList.map(ele => ele.id)"
|
|
|
:year="owerQuery.projectYear"
|
|
:year="owerQuery.projectYear"
|
|
|
/>
|
|
/>
|
|
|
<summary-dialog
|
|
<summary-dialog
|
|
@@ -377,8 +377,7 @@ import { getLazyList } from '@/api/project/index.js'
|
|
|
import summaryDialog from '@/views/home/component/summary_dialog.vue'
|
|
import summaryDialog from '@/views/home/component/summary_dialog.vue'
|
|
|
import { useStore } from '@/store/user.js'
|
|
import { useStore } from '@/store/user.js'
|
|
|
import confing from '@/config/website'
|
|
import confing from '@/config/website'
|
|
|
-import { ElMessageBox } from 'element-plus'
|
|
|
|
|
-import BasicContainer from '@/components/basic-container/main.vue'
|
|
|
|
|
|
|
+import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: 'dash',
|
|
name: 'dash',
|
|
@@ -649,7 +648,7 @@ export default {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
selectionChange(list) {
|
|
selectionChange(list) {
|
|
|
- this.selectList = list.map(sub => sub.id)
|
|
|
|
|
|
|
+ this.selectList = list
|
|
|
},
|
|
},
|
|
|
beforeOpen(done, type) {
|
|
beforeOpen(done, type) {
|
|
|
if (['edit'].includes(type)) {
|
|
if (['edit'].includes(type)) {
|
|
@@ -814,7 +813,7 @@ export default {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
this.$api.project
|
|
this.$api.project
|
|
|
- .projectCarry({ ids: this.selectList.join(',') })
|
|
|
|
|
|
|
+ .projectCarry({ ids: this.selectList.map(ele => ele.id).join(',') })
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
|
this.$message.success(res.msg)
|
|
this.$message.success(res.msg)
|
|
@@ -824,6 +823,42 @@ export default {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 项目入库预审
|
|
|
|
|
+ */
|
|
|
|
|
+ projectStore() {
|
|
|
|
|
+ if (this.selectList.length === 0) {
|
|
|
|
|
+ this.$message.error('请先选择要入库预审的项目')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ this.selectList.forEach(ele => {
|
|
|
|
|
+ if (ele.is_storage === 0) {
|
|
|
|
|
+ this.$message.error('存在未入库的项目')
|
|
|
|
|
+ throw ele
|
|
|
|
|
+ }
|
|
|
|
|
+ if (ele.is_report === 0) {
|
|
|
|
|
+ this.$message.error('存在未上报的项目')
|
|
|
|
|
+ throw ele
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ ElMessageBox.confirm('确定将已经勾选的项目提交入库预审?', '', {}).then(
|
|
|
|
|
+ res => {
|
|
|
|
|
+ if (res === 'confirm') {
|
|
|
|
|
+ this.$api.project
|
|
|
|
|
+ .projectStore({
|
|
|
|
|
+ ids: this.selectList.map(ele => ele.id).join(',')
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ this.$message.success(res.msg)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message.error(res.msg)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ )
|
|
|
|
|
+ },
|
|
|
/**
|
|
/**
|
|
|
* 项目退库
|
|
* 项目退库
|
|
|
*/
|
|
*/
|
|
@@ -904,7 +939,7 @@ export default {
|
|
|
{ ...this.queryData },
|
|
{ ...this.queryData },
|
|
|
{
|
|
{
|
|
|
columnName: res,
|
|
columnName: res,
|
|
|
- projectIds: this.selectList.join(','),
|
|
|
|
|
|
|
+ projectIds: this.selectList.map(ele => ele.id).join(','),
|
|
|
previewType: 1,
|
|
previewType: 1,
|
|
|
projectYear: year
|
|
projectYear: year
|
|
|
}
|
|
}
|
|
@@ -922,7 +957,7 @@ export default {
|
|
|
const dataIds = {
|
|
const dataIds = {
|
|
|
...this.queryData,
|
|
...this.queryData,
|
|
|
...item,
|
|
...item,
|
|
|
- projectIds: this.selectList.join(','),
|
|
|
|
|
|
|
+ projectIds: this.selectList.map(ele => ele.id).join(','),
|
|
|
previewType: 2
|
|
previewType: 2
|
|
|
}
|
|
}
|
|
|
this.$router.push({ query: dataIds, path: '/home/excel' })
|
|
this.$router.push({ query: dataIds, path: '/home/excel' })
|