|
@@ -170,11 +170,8 @@
|
|
</el-form>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
- <el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>
|
|
|
|
- <el-button size="small" type="primary" v-if="method != 'view'" v-else-if="checkType===1" @click="getProgram()"
|
|
|
|
- icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
|
|
|
|
-<!-- <el-button size="small" type="primary" v-if="method != 'view'" v-else-if="checkType===2" @click="getProgram2()"
|
|
|
|
- icon="el-icon-circle-check" v-noMoreClick>确定</el-button>-->
|
|
|
|
|
|
+ <el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>
|
|
|
|
+ <el-button size="small" type="primary" v-if="method != 'view'" @click="getProgram()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
@@ -184,7 +181,7 @@
|
|
import ProjectRecordsService from '@/api/cw/projectRecords/ProjectRecordsService'
|
|
import ProjectRecordsService from '@/api/cw/projectRecords/ProjectRecordsService'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
- data() {
|
|
|
|
|
|
+ data () {
|
|
return {
|
|
return {
|
|
title: '项目选择',
|
|
title: '项目选择',
|
|
method: '',
|
|
method: '',
|
|
@@ -231,7 +228,7 @@ export default {
|
|
* num为空或者true,则允许多选
|
|
* num为空或者true,则允许多选
|
|
* num为其他任何值,则只可以单选
|
|
* num为其他任何值,则只可以单选
|
|
*/
|
|
*/
|
|
- init(isShow, num) {
|
|
|
|
|
|
+ init (isShow, num) {
|
|
if (this.commonJS.isEmpty(isShow)) {
|
|
if (this.commonJS.isEmpty(isShow)) {
|
|
this.isShow = true
|
|
this.isShow = true
|
|
this.checkType = '1'
|
|
this.checkType = '1'
|
|
@@ -278,6 +275,18 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
rows = this.$refs.projectTable.getCheckboxRecords()
|
|
rows = this.$refs.projectTable.getCheckboxRecords()
|
|
|
|
+ } else if (this.checkType === '2') {
|
|
|
|
+ if (this.commonJS.isEmpty(this.$refs.projectTable1.getCheckboxRecords())) {
|
|
|
|
+ this.$message.error('请至少选择一条数据')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (this.num === false) {
|
|
|
|
+ if (this.$refs.projectTable1.getCheckboxRecords().length > 1) {
|
|
|
|
+ this.$message.error('最多选择一条数据')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ rows = this.$refs.projectTable1.getCheckboxRecords()
|
|
} else {
|
|
} else {
|
|
if (this.commonJS.isEmpty(this.detail)) {
|
|
if (this.commonJS.isEmpty(this.detail)) {
|
|
this.$message.error('请填写开票详情')
|
|
this.$message.error('请填写开票详情')
|
|
@@ -337,7 +346,7 @@ export default {
|
|
this.close()
|
|
this.close()
|
|
this.$emit('getProgram', rows)
|
|
this.$emit('getProgram', rows)
|
|
}, */
|
|
}, */
|
|
- list() {
|
|
|
|
|
|
+ list () {
|
|
this.loading = true
|
|
this.loading = true
|
|
this.searchForm.status = '5'
|
|
this.searchForm.status = '5'
|
|
this.projectRecordsService.list({
|
|
this.projectRecordsService.list({
|
|
@@ -351,7 +360,7 @@ export default {
|
|
this.loading = false
|
|
this.loading = false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- list1() {
|
|
|
|
|
|
+ list1 () {
|
|
this.loading = true
|
|
this.loading = true
|
|
this.searchForm.status = '5'
|
|
this.searchForm.status = '5'
|
|
this.projectRecordsService.list1({
|
|
this.projectRecordsService.list1({
|
|
@@ -366,25 +375,25 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 当前页
|
|
// 当前页
|
|
- currentChangeHandle({currentPage, pageSize}) {
|
|
|
|
|
|
+ currentChangeHandle ({currentPage, pageSize}) {
|
|
this.tablePage.currentPage = currentPage
|
|
this.tablePage.currentPage = currentPage
|
|
this.tablePage.pageSize = pageSize
|
|
this.tablePage.pageSize = pageSize
|
|
this.list()
|
|
this.list()
|
|
},
|
|
},
|
|
- resetSearch() {
|
|
|
|
|
|
+ resetSearch () {
|
|
this.$refs.searchForm.resetFields()
|
|
this.$refs.searchForm.resetFields()
|
|
this.list()
|
|
this.list()
|
|
},
|
|
},
|
|
- currentChangeHandle1({currentPage, pageSize}) {
|
|
|
|
|
|
+ currentChangeHandle1 ({currentPage, pageSize}) {
|
|
this.tablePage.currentPage = currentPage
|
|
this.tablePage.currentPage = currentPage
|
|
this.tablePage.pageSize = pageSize
|
|
this.tablePage.pageSize = pageSize
|
|
this.list1()
|
|
this.list1()
|
|
},
|
|
},
|
|
- resetSearch1() {
|
|
|
|
|
|
+ resetSearch1 () {
|
|
this.$refs.searchForm.resetFields()
|
|
this.$refs.searchForm.resetFields()
|
|
this.list1()
|
|
this.list1()
|
|
},
|
|
},
|
|
- close() {
|
|
|
|
|
|
+ close () {
|
|
this.detail = ''
|
|
this.detail = ''
|
|
this.visible = false
|
|
this.visible = false
|
|
}
|
|
}
|