Browse Source

列表添加右侧操作列

noToken
安虹睿 1 year ago
parent
commit
e7a0afdf62
  1. 1
      PC/InterFace.Dash/public/config.js
  2. 1
      PC/InterFace.Dash/src/App.vue
  3. 29
      PC/InterFace.Dash/src/api/wms-business.js
  4. 15
      PC/InterFace.Dash/src/components/tablePagination/index.vue
  5. 7
      PC/InterFace.Dash/src/components/umyTable/index.vue
  6. 25
      PC/InterFace.Dash/src/views/menuList/MessageReceive.vue

1
PC/InterFace.Dash/public/config.js

@ -1,6 +1,7 @@
// dev_win // dev_win
// window.SITE_CONFIG['base'] = 'http://dev.ccwin-in.com:60068' // window.SITE_CONFIG['base'] = 'http://dev.ccwin-in.com:60068'
window.SITE_CONFIG['base'] = 'http://192.168.0.180:60068' window.SITE_CONFIG['base'] = 'http://192.168.0.180:60068'
window.SITE_CONFIG['businessApi'] = 'http://dev.ccwin-in.com:10097'
window.SITE_CONFIG['columnsApiNames'] = '/api/abp/application-localization' window.SITE_CONFIG['columnsApiNames'] = '/api/abp/application-localization'
// window.SITE_CONFIG['columnsApiNames'] = '/api/abp/application-configuration' // window.SITE_CONFIG['columnsApiNames'] = '/api/abp/application-configuration'
window.SITE_CONFIG['columnsApiNamesZh'] = 'Z' window.SITE_CONFIG['columnsApiNamesZh'] = 'Z'

1
PC/InterFace.Dash/src/App.vue

@ -9,6 +9,7 @@ export default {
name: 'App' name: 'App'
} }
localStorage.setItem('base',window.SITE_CONFIG['base']) localStorage.setItem('base',window.SITE_CONFIG['base'])
localStorage.setItem('businessApi',window.SITE_CONFIG['businessApi'])
localStorage.setItem('columnsApiNames',window.SITE_CONFIG['columnsApiNames']) localStorage.setItem('columnsApiNames',window.SITE_CONFIG['columnsApiNames'])
localStorage.setItem('columnsApiNamesZh',window.SITE_CONFIG['columnsApiNamesZh']) localStorage.setItem('columnsApiNamesZh',window.SITE_CONFIG['columnsApiNamesZh'])
localStorage.setItem('isAutoLogin',window.SITE_CONFIG['isAutoLogin']) localStorage.setItem('isAutoLogin',window.SITE_CONFIG['isAutoLogin'])

29
PC/InterFace.Dash/src/api/wms-business.js

@ -0,0 +1,29 @@
// 外部业务数据接口
import request from '@/utils/request'
let businessApi = localStorage.getItem('businessApi')
// 获取表头数据
export function messageReceiveUpdateStatsById(id) {
return request({
method:'get',
url: businessApi + '/api/wms/message-receive/update-stats-by-id/'+id,
})
}
// // 测试数据-明细-列表
// export function TestSchoolDetailList(data,includeDetails) {
// return request({
// method:'post',
// url: base_api + '/api/TestStudentDetail/base/get-list-page-by-filter?includeDetails='+Boolean(includeDetails),
// data
// })
// }
// // 测试数据-明细-删除
// export function TestSchoolDetailList_delete(id) {
// return request({
// method:'DELETE',
// url: base_api + '/api/TestStudentDetail/base/delete-by-id',
// params:{id:id}
// })
// }

15
PC/InterFace.Dash/src/components/tablePagination/index.vue

@ -53,6 +53,8 @@
@inlineDialog="inlineDialog" @inlineDialog="inlineDialog"
:buttonOperationList_left="buttonOperationList_left" :buttonOperationList_left="buttonOperationList_left"
@buttonOperationClick_left="buttonOperationClick_left" @buttonOperationClick_left="buttonOperationClick_left"
:buttonOperationList_right="buttonOperationList_right"
@buttonOperationClick_right="buttonOperationClick_right"
:tableBorder="true" :tableBorder="true"
:firstFixed="true" :firstFixed="true"
:cellStyle = "cellStyle" :cellStyle = "cellStyle"
@ -115,11 +117,16 @@ export default {
return [] return []
} }
}, },
// // ()
buttonOperationList_left:{ buttonOperationList_left:{
type: Array, type: Array,
default: null, default: null,
}, },
// ()
buttonOperationList_right:{
type: Function,
default: null,
},
// //
tableData: { tableData: {
type: Array, type: Array,
@ -341,10 +348,14 @@ export default {
sortChange (data) { sortChange (data) {
this.$emit('sortChange', data) this.$emit('sortChange', data)
}, },
//table //table()
buttonOperationClick_left(row, item, index) { buttonOperationClick_left(row, item, index) {
this.$emit("buttonOperationClick_left", row, item, index); this.$emit("buttonOperationClick_left", row, item, index);
}, },
//table()
buttonOperationClick_right(row, item, index) {
this.$emit("buttonOperationClick_right", row, item, index);
},
// //
// /showSearchOverall // /showSearchOverall
getShowSearchOverall(val){ getShowSearchOverall(val){

7
PC/InterFace.Dash/src/components/umyTable/index.vue

@ -53,7 +53,8 @@
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-for="(itemButton, indexButton) in buttonOperationList_right" v-for="(itemButton, indexButton) in buttonOperationList_right(scope.row)"
v-show="!itemButton.hide"
:key="indexButton" :key="indexButton"
type="text" type="text"
size="mini" size="mini"
@ -372,6 +373,8 @@
:append-to-body="true" :append-to-body="true"
:show-close="true" :show-close="true"
:title="'内容详情'" :title="'内容详情'"
:close-on-click-modal="true"
:close-on-press-escape="true"
> >
{{ showDetailData ? showDetailData + "" : showDetailData }} {{ showDetailData ? showDetailData + "" : showDetailData }}
</el-dialog> </el-dialog>
@ -470,7 +473,7 @@ export default {
}, },
// () // ()
buttonOperationList_right:{ buttonOperationList_right:{
type: Array, type: Function,
default: null, default: null,
}, },
// //

25
PC/InterFace.Dash/src/views/menuList/MessageReceive.vue

@ -23,6 +23,8 @@
:primarySearchOption="primarySearchOption" :primarySearchOption="primarySearchOption"
@overallSearchFormClick="overallSearchFormClick" @overallSearchFormClick="overallSearchFormClick"
:httpOverallSearchData="httpOverallSearchData" :httpOverallSearchData="httpOverallSearchData"
:buttonOperationList_right="buttonOperationList_right"
@buttonOperationClick_right="buttonOperationClick_right"
></tablePagination> ></tablePagination>
<!-- 导出弹窗 --> <!-- 导出弹窗 -->
<exportDrop <exportDrop
@ -44,7 +46,7 @@ import { getToken } from '@/utils/auth'
import * as tableColumns_api from "@/utils/tableColumns_api/index" // import * as tableColumns_api from "@/utils/tableColumns_api/index" //
import * as tabsDesTions_api from "@/utils/tabsDesTions_api/index" // import * as tabsDesTions_api from "@/utils/tabsDesTions_api/index" //
import * as detailsTableColumns_api from "@/utils/detailsTableColumns_api/index" // import * as detailsTableColumns_api from "@/utils/detailsTableColumns_api/index" //
import { messageReceiveUpdateStatsById } from "@/api/wms-business"
export default { export default {
name: "MessageReceive", name: "MessageReceive",
@ -75,6 +77,27 @@ export default {
this.initApiColumns(tableColumns_api,tabsDesTions_api,detailsTableColumns_api) this.initApiColumns(tableColumns_api,tabsDesTions_api,detailsTableColumns_api)
this.paging(); this.paging();
}, },
methods:{
buttonOperationList_right(data){
let _btn = [{
label:'修改已接受',
name:'isRecept',
hide:true
}]
if(data.receiveStatus == '1'){
_btn[0].hide = false
}
return _btn
},
buttonOperationClick_right(row, item, index){
if(item.name == 'isRecept'){
messageReceiveUpdateStatsById(row.id).then(result => {
this.$successMsg("修改成功");
this.paging()
})
}
}
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

Loading…
Cancel
Save