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
// window.SITE_CONFIG['base'] = 'http://dev.ccwin-in.com: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-configuration'
window.SITE_CONFIG['columnsApiNamesZh'] = 'Z'

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

@ -9,6 +9,7 @@ export default {
name: 'App'
}
localStorage.setItem('base',window.SITE_CONFIG['base'])
localStorage.setItem('businessApi',window.SITE_CONFIG['businessApi'])
localStorage.setItem('columnsApiNames',window.SITE_CONFIG['columnsApiNames'])
localStorage.setItem('columnsApiNamesZh',window.SITE_CONFIG['columnsApiNamesZh'])
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"
:buttonOperationList_left="buttonOperationList_left"
@buttonOperationClick_left="buttonOperationClick_left"
:buttonOperationList_right="buttonOperationList_right"
@buttonOperationClick_right="buttonOperationClick_right"
:tableBorder="true"
:firstFixed="true"
:cellStyle = "cellStyle"
@ -115,11 +117,16 @@ export default {
return []
}
},
//
// ()
buttonOperationList_left:{
type: Array,
default: null,
},
// ()
buttonOperationList_right:{
type: Function,
default: null,
},
//
tableData: {
type: Array,
@ -341,10 +348,14 @@ export default {
sortChange (data) {
this.$emit('sortChange', data)
},
//table
//table()
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
getShowSearchOverall(val){

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

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

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

@ -23,6 +23,8 @@
:primarySearchOption="primarySearchOption"
@overallSearchFormClick="overallSearchFormClick"
:httpOverallSearchData="httpOverallSearchData"
:buttonOperationList_right="buttonOperationList_right"
@buttonOperationClick_right="buttonOperationClick_right"
></tablePagination>
<!-- 导出弹窗 -->
<exportDrop
@ -44,7 +46,7 @@ import { getToken } from '@/utils/auth'
import * as tableColumns_api from "@/utils/tableColumns_api/index" //
import * as tabsDesTions_api from "@/utils/tabsDesTions_api/index" //
import * as detailsTableColumns_api from "@/utils/detailsTableColumns_api/index" //
import { messageReceiveUpdateStatsById } from "@/api/wms-business"
export default {
name: "MessageReceive",
@ -75,6 +77,27 @@ export default {
this.initApiColumns(tableColumns_api,tabsDesTions_api,detailsTableColumns_api)
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>
<style lang="scss" scoped>

Loading…
Cancel
Save