Browse Source

Merge branch 'faster_develop' into dev_web

dev_web
安虹睿 2 years ago
parent
commit
0eecdb497d
  1. 21
      WinIn.FasterZ.Wms.Fe/README.md
  2. 367
      WinIn.FasterZ.Wms.Fe/src/components/addEditFromApiPop/index copy.vue
  3. 261
      WinIn.FasterZ.Wms.Fe/src/components/addEditFromApiPop/index.vue
  4. 52
      WinIn.FasterZ.Wms.Fe/src/components/commonTabel-drawer/index.vue
  5. 1
      WinIn.FasterZ.Wms.Fe/src/components/currenButton/index.vue
  6. 7
      WinIn.FasterZ.Wms.Fe/src/components/currenTableFlex/index.vue
  7. 3
      WinIn.FasterZ.Wms.Fe/src/components/filterForDetailPage/index.vue
  8. 10
      WinIn.FasterZ.Wms.Fe/src/components/umyTable/index.vue
  9. 184
      WinIn.FasterZ.Wms.Fe/src/mixins/TableMixins.js
  10. 2
      WinIn.FasterZ.Wms.Fe/src/mixins/mixins.js
  11. 10
      WinIn.FasterZ.Wms.Fe/src/styles/index.scss
  12. 2195
      WinIn.FasterZ.Wms.Fe/src/utils/baseData/urlOption.js
  13. 98
      WinIn.FasterZ.Wms.Fe/src/utils/index.js
  14. 14
      WinIn.FasterZ.Wms.Fe/src/utils/request.js
  15. 122
      WinIn.FasterZ.Wms.Fe/src/views/demo/demo_MAndD.vue
  16. 113
      WinIn.FasterZ.Wms.Fe/src/views/demo/demo_onlyD.vue
  17. 116
      WinIn.FasterZ.Wms.Fe/src/views/demo/demo_onlyM.vue
  18. 14
      WinIn.FasterZ.Wms.Fe/src/views/menuList/AuthDepartment.vue
  19. 16
      WinIn.FasterZ.Wms.Fe/src/views/menuList/StoreWorkOrder.vue
  20. 11
      WinIn.FasterZ.Wms.Fe/src/views/menuList/StoreWorkOrderDetail.vue
  21. 43
      fe/PC/src/utils/tableColumns/index.js
  22. 41
      fe/PC/src/utils/tabsDesTions/index.js
  23. 43
      fe/PC/src/views/inventoryManage/InventoryQuery/InventoryBalance.vue
  24. 290
      fe/PC/src/views/inventoryManage/InventoryQuery/InventoryBalanceEdit.vue

21
WinIn.FasterZ.Wms.Fe/README.md

@ -124,3 +124,24 @@ pointNumberFixed 组合上方validType值仅等于pointNumber时:
小数点后方保留位数,如不填写默认为100位 小数点后方保留位数,如不填写默认为100位
<validType>+<pointNumberFixed>示例: <validType>+<pointNumberFixed>示例:
{ type:"input", label:"金额", prop:"money", validType:'pointNumber',pointNumberFixed:2}, { type:"input", label:"金额", prop:"money", validType:'pointNumber',pointNumberFixed:2},
[urlOpion示例]
// 添加页面需要配置位置
// 示例数据
export const TestSchool = {
baseURL:'TestSchool/base',//主表-列表
detailURL:'app/test-school',//主表-明细 + 明细-查看主表
detailListURL:'TestStudentDetail/base',//明细-列表,
// parentURL:null,//明细-查看主表:特殊接口,如果没有则走detailURL
// deleteURL:null,//删除特殊URL
// addURL:null,//新增特殊URL
// editURL:null,//编辑特殊URL
// exportURL:'exportURL',//导出特殊URL
<!-- 20231124 有主表的子列表 查看详情的主表信息处理 -->
//有主表的子表单页的主表信息接口,默认为当前的[detailURL]去掉[-Detail]
// mainShowMasterUrl:null,
//有主表的子表单页的主表链接参数,默认为[masterId]
// mainShowMasterId:'masterId',
//有主表的子表单页的主表路由[用于显示列转义],默认为[当前路由]去掉[Detail]
// masterRoute:null,
}

367
WinIn.FasterZ.Wms.Fe/src/components/addEditFromApiPop/index copy.vue

@ -0,0 +1,367 @@
<template>
<!-- 组件功能修改布局前版本 参数配置从api获取 -->
<el-dialog
:visible.sync="show"
:modal="false"
:modal-append-to-body="false"
:show-close="true"
@close="close"
class="searchPageComponents"
:fullscreen="true"
style="width:calc(100% - 28px);left:14px;top:14px;height:calc(100% - 28px)"
v-loading="Loading.addEditApiLoading"
>
<!-- 数据填写 -->
<div v-if="active === 0" style="height: 100%;">
<div class="centerInnerContent" :class="{'hasDetails' : flexTableData}">
<!-- 左侧主表 -->
<div class="leftMainForm">
<div class="dialogOuterTitle">{{formTitle}} 主表信息</div>
<!-- 表单 -->
<el-form
class="addEditFrom"
ref="addEditFrom_Ref"
v-if="formData"
:model="formData"
:rules="formRules"
>
<el-row :gutter="40">
<el-col
:span="item.colSpan || 12"
v-for="(item, index) in formItemData"
:key="index"
>
<el-form-item
:label="item.label"
:prop="item.prop"
v-if="item.label.toUpperCase() != 'DETAILS'"
>
<!-- 数值 -->
<el-input-number
v-if="item.apiBaseType === 'number'"
v-model="formData[item.prop]"
:min="item.minimum || undefined"
:max="item.maximum || undefined"
:maxlength="item.maxLength || undefined"
:minlength="item.minLength || undefined"
:disabled="Boolean(item.disabled)"
:placeholder="item.placeholder || '请输入' + item.label"
@change="changeValue(item.prop,item,$event)"
@clear="clearValue(item.prop,$event)"
></el-input-number>
<!-- 时间转换 -->
<el-date-picker
v-else-if="item.apiBaseType === 'datetime'"
v-model="formData[item.prop]"
type="datetime"
placeholder="选择日期时间"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-ddTHH:mm:ss"
:disabled="Boolean(item.disabled)"
></el-date-picker>
<!-- 布尔枚举 -->
<el-select
v-else-if="item.isEnums || item.apiBaseType === 'boolean'"
v-model="formData[item.prop]"
:placeholder="item.placeholder || '请选择' + item.label"
:disabled="Boolean(item.disabled)"
>
<el-option
v-for="item in item.enums_list"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
<!-- 文本框 -->
<!-- <el-input
v-else
type="textarea"
autosize
resize="none"
v-model="formData[item.prop]"
:placeholder="item.placeholder || '请输入' + item.label"
:disabled="Boolean(item.disabled)"
></el-input> -->
<el-input
v-else
v-model="formData[item.prop]"
:placeholder="item.placeholder || '请输入' + item.label"
:disabled="Boolean(item.disabled)"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<!-- 右侧子表 -->
<div class="rightDetailTable" v-if="flexTableData">
<div class="dialogOuterTitle">{{formTitle}} 子表信息</div>
<currenTableFlex
ref="currenTableFlex_Ref"
:isShowIndex="true"
:isEditable="true"
:setUTableHeight="230"
class="currenTableFlex"
:flexTableData="flexTableData"
:flexTableColumns="flexTableColumns"
></currenTableFlex>
</div>
</div>
<!-- 操作按钮 -->
<div slot="footer" class="dialog-footer">
<el-button @click="show = false"> </el-button>
<el-button type="primary" @click="submitHandle()"> </el-button>
</div>
</div>
<!-- 成功提示 -->
<div v-if="active === 1">
<el-result icon="success" title="成功提示" :subTitle="formTitle + '成功'">
<template slot="extra">
<el-button type="primary" size="medium" @click="exitHandle"
>退出</el-button
>
</template>
</el-result>
</div>
<!-- 错误提示 -->
<div v-if="active === 2">
<el-result icon="error" title="错误提示" :subTitle="formTitle + '失败'">
<template slot="extra">
<el-button type="primary" size="medium" @click="changeActive(0)"
>返回</el-button
>
<el-button type="primary" size="medium" @click="exitHandle"
>退出</el-button
>
</template>
</el-result>
</div>
</el-dialog>
</template>
<script>
import { ApiTypePost, ApiTypePut } from "@/api/wms-api"
import { LoadingMixins } from "@/mixins/LoadingMixins";
import currenTableFlex from "@/components/currenTableFlex"
import * as allUrlOption from '@/utils/baseData/urlOption'
export default {
name:"addEditFromApiPop",
mixins:[ LoadingMixins ],
components: { currenTableFlex },
props: {
//
editRowData:{
type: Object,
default: null
},
// add/edit
handleType:{
type: String,
default: null
},
//
submitForm:{
type:Function,
default:null
},
//
addSubmitUrl:{
type: String,
default: null
},
//
editSubmitUrl:{
type: String,
default: null
},
},
data () {
return {
//-
URLOption_detailList:allUrlOption[this.$route.name].detailListURL,
// dto
currentDtos:this.$store.getters.dtoColumnTypes[this.$route.name],
active:0,//0 1 2
show:true,
formTitle:null,//form
formData:{},//
formItemData:null,//item
formRules: {},//
flexTableData:null,//table
// flexTableColumns:null,//table
flexTableColumns: null,
}
},
mounted(){
this.initTitle()
this.initFormItems()
},
methods: {
// form
initTitle(){
if(this.handleType){
this.formTitle = this.handleType == 'add' ? '新增'+this.$route.name : '编辑'+this.$route.name
}
},
// rules
initFormItems(){
let _dtoList_type = this.handleType == 'add' ? 'C' : 'U'
let _dtoList = this.currentDtos[_dtoList_type].dtoList
//
let _formItems = _dtoList.filter(item=>{
return item.prop.toUpperCase() != 'DETAILS'
})
if(_formItems)this.formItemData = _formItems
//
if(this.handleType == 'edit' && this.editRowData){
this.formData = JSON.parse(JSON.stringify(this.editRowData))
}else{
this.formData = {}
}
//
let _list = _dtoList.filter(item=>{
return item.prop.toUpperCase() == 'DETAILS'
})
if(_list && _list.length > 0){
if(this.handleType == 'edit'){
this.flexTableData = this.formData[_list[0].prop]
}else{
this.flexTableData = []
}
}
//
if(this.URLOption_detailList){
let _detailApi = this.URLOption_detailList.slice(0,this.URLOption_detailList.lastIndexOf('/'))
let _detailDtos = this.$store.getters.dtoColumnTypes[_detailApi].S.dtoList
this.flexTableColumns = _detailDtos
}
//
this.formRules={}
_dtoList.forEach(item=>{
if(item.isRequired){
this.formRules[item.prop] = [{ required: true, trigger: "blur", message: "不可为空" }]
}
})
},
//
close() {
this.show = false
this.$emit("closePop")
},
//
submitHandle(){
this.$refs.addEditFrom_Ref.validate((valid) => {
if(this.submitForm){
this.submitForm(valid,this.formData,this.handleType,this.formItemData,this.formRules)
return
}
this.formData.details = this.flexTableData
this.Loading.addEditApiLoading = true
if (valid) {
//
if(this.handleType == 'add'){
ApiTypePost(
this.formData,
this.currentDtos.C.actionsUrl
).then(res => {
this.changeActive(1)
}).catch(err => {
this.changeActive(2)
})
}
//
else{
ApiTypePut(
this.formData,
this.formData.id,
this.currentDtos.U.actionsUrl
).then(res => {
this.changeActive(1)
}).catch(err => {
this.changeActive(2)
})
}
} else {
return false;
}
});
},
// 退
exitHandle(){
this.close()
if(this.active == '1')this.oldSkipCount = 1;
this.show = false
this.$emit("exitAfterHandle")
this.$nextTick(()=>{
this.active = 0
})
},
//
changeActive(sta){
this.active = sta
this.Loading.addEditApiLoading = false
},
//
changeValue(prop,item,val) {
this.$emit("changeValue", prop, item, val)
},
//
clearValue(prop,item,val) {
this.$emit("clearValue", prop, item, val)
},
}
}
</script>
<style lang="scss" scoped>
::v-deep .el-dialog__header{
padding: 0 !important;
}
::v-deep .el-row{
width: 100%;
}
::v-deep .addEditFrom{
height: calc(100%);
overflow: auto;
}
::v-deep .el-form-item__label{
float: unset;
}
::v-deep .el-input,.el-select,.el-input-number{
width: 100% !important;
}
.dialog-footer{
padding-top: 15px;
text-align: right;
}
.centerInnerContent{
height: calc(100% - 60px);
overflow: auto;
.leftMainForm{
height: calc(100% - 60px);
}
&.hasDetails{
display: flex;
.leftMainForm{
width: 50%;
flex-shrink: 0;
}
.rightDetailTable{
height: calc(100% - 60px);
width: calc(50%);
padding-left:40px;
border-left: #ddd solid 1px;
}
}
}
</style>

261
WinIn.FasterZ.Wms.Fe/src/components/addEditFromApiPop/index.vue

@ -1,10 +1,10 @@
<template> <template>
<!-- 组件功能普通新增编辑目前只有主参数配置从api获取 --> <!-- 组件功能新增编辑含有主子参数配置从api获取 -->
<el-dialog <el-dialog
:visible.sync="show" :visible.sync="show"
:modal="false" :modal="false"
:modal-append-to-body="false" :modal-append-to-body="false"
:show-close="true" :show-close="false"
@close="close" @close="close"
class="searchPageComponents" class="searchPageComponents"
:fullscreen="true" :fullscreen="true"
@ -13,10 +13,15 @@
> >
<!-- 数据填写 --> <!-- 数据填写 -->
<div v-if="active === 0" style="height: 100%;"> <div v-if="active === 0" style="height: 100%;">
<div class="centerInnerContent" :class="{'hasDetails' : flexTableData}"> <div class="centerInnerContent">
<!-- 左侧主表 --> <!-- 主表 -->
<div class="leftMainForm"> <div class="leftMainForm">
<div class="dialogOuterTitle">{{formTitle}} 主表信息</div> <div class="dialogOuterTitle">
{{formTitle}} <span v-if="isHaveDetail()">主表信息</span>
<div class="buttonBox" v-if="isHaveDetail()">
<el-button @click="detailPopShow = true" size="small" type="warning">编辑子表信息</el-button>
</div>
</div>
<!-- 表单 --> <!-- 表单 -->
<el-form <el-form
class="addEditFrom" class="addEditFrom"
@ -97,25 +102,46 @@
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
<!-- 右侧子表 --> </div>
<div class="rightDetailTable" v-if="flexTableData"> <!-- 操作按钮 -->
<div slot="footer" class="dialog-footer">
<el-button @click="show = false"> </el-button>
<el-button type="primary" @click="submitHandle()"> </el-button>
</div>
<!-- 模拟子表弹窗遮罩层为处理切换tab消失问题-->
<div class="imitateDetailPopModal" v-if="detailPopShow"></div>
<!-- 子表弹窗 -->
<el-dialog
:visible.sync="detailPopShow"
:show-close="false"
@close="closeDetailPop"
:append-to-body="false"
:modal-append-to-body="false"
width="95%"
top="2vh"
class="detailPop"
:modal="false"
>
<div class="rightDetailTable">
<div class="dialogOuterTitle">{{formTitle}} 子表信息</div> <div class="dialogOuterTitle">{{formTitle}} 子表信息</div>
<currenTableFlex <currenTableFlex
ref="currenTableFlex_Ref" ref="currenTableFlex_Ref"
:isShowIndex="true" :isShowIndex="true"
:isEditable="true" :isEditable="true"
:setUTableHeight="230" :setUTableHeight="290"
class="currenTableFlex" class="currenTableFlex"
:flexTableData="flexTableData" :flexTableData="flexTableData"
:flexTableColumns="flexTableColumns" :flexTableColumns="flexTableColumns"
:border="true"
></currenTableFlex> ></currenTableFlex>
</div> </div>
</div> <!-- 操作按钮 -->
<!-- 操作按钮 --> <div slot="footer" class="dialog-footer">
<div slot="footer" class="dialog-footer"> <el-button @click="closeDetailPop"> </el-button>
<el-button @click="show = false"> </el-button> <el-button type="primary" v-if="flexTableData && flexTableData.length > 0" @click="sureDetailHandle()"> </el-button>
<el-button type="primary" @click="submitHandle()"> </el-button> </div>
</div> </el-dialog>
</div> </div>
<!-- 成功提示 --> <!-- 成功提示 -->
<div v-if="active === 1"> <div v-if="active === 1">
@ -190,9 +216,12 @@ export default {
formData:{},// formData:{},//
formItemData:null,//item formItemData:null,//item
formRules: {},// formRules: {},//
detailPopShow:false,//
flexTableData:null,//table flexTableData:null,//table
// flexTableColumns:null,//table flexTableData_stag:null,//table
flexTableColumns: null, detailFormRules: {},//
flexTableColumns:null,//table
showDetailRulesTipper:false,//
} }
}, },
mounted(){ mounted(){
@ -210,11 +239,13 @@ export default {
initFormItems(){ initFormItems(){
let _dtoList_type = this.handleType == 'add' ? 'C' : 'U' let _dtoList_type = this.handleType == 'add' ? 'C' : 'U'
let _dtoList = this.currentDtos[_dtoList_type].dtoList let _dtoList = this.currentDtos[_dtoList_type].dtoList
// // detailsid
let _formItems = _dtoList.filter(item=>{ this.formItemData = []
return item.prop.toUpperCase() != 'DETAILS' _dtoList.forEach(item=>{
if(item.prop.toUpperCase() != "ID" && item.prop.toUpperCase() != 'DETAILS'){
this.formItemData.push(item)
}
}) })
if(_formItems)this.formItemData = _formItems
// //
if(this.handleType == 'edit' && this.editRowData){ if(this.handleType == 'edit' && this.editRowData){
this.formData = JSON.parse(JSON.stringify(this.editRowData)) this.formData = JSON.parse(JSON.stringify(this.editRowData))
@ -222,24 +253,47 @@ export default {
this.formData = {} this.formData = {}
} }
// //
let _list = _dtoList.filter(item=>{ let detail_list = _dtoList.filter(item=>{
return item.prop.toUpperCase() == 'DETAILS' return item.prop.toUpperCase() == 'DETAILS'
}) })
if(_list && _list.length > 0){ if(detail_list && detail_list.length > 0){
if(this.handleType == 'edit'){ if(this.handleType == 'edit'){
this.flexTableData = this.formData[_list[0].prop] this.flexTableData = this.formData[detail_list[0].prop]
}else{ }else{
this.flexTableData = [] this.flexTableData = []
} }
this.flexTableData_stag = JSON.parse(JSON.stringify(this.flexTableData))
} }
// //
if(this.URLOption_detailList){ if(this.URLOption_detailList){
let _detailApi = this.URLOption_detailList.slice(0,this.URLOption_detailList.lastIndexOf('/')) let _detailApi = this.URLOption_detailList.slice(0,this.URLOption_detailList.lastIndexOf('/'))
let _detailDtos = this.$store.getters.dtoColumnTypes[_detailApi].S.dtoList let _detailDtos = this.$store.getters.dtoColumnTypes[_detailApi].S.dtoList
this.flexTableColumns = _detailDtos this.flexTableColumns = []
// masterId
_detailDtos.forEach(item=>{
if(item.prop.toUpperCase() != "MASTERID"){
this.flexTableColumns.push(item)
}
})
// -
// todo:detailFormRules
// this.detailFormRules={}
// _detailDtos.forEach(item=>{
// if(item.isRequired){
// this.detailFormRules[item.prop] = [{ required: true, trigger: "blur", message: item.message }]
// }
// })
this.detailFormRules = {
itemCode:[{ required: true, trigger: "blur", message: "不可为空" }],
rawQty:[
{ required: true, trigger: "blur", message: "不可为空" },
{ valid:(val)=>{return this.numberOverControl(val,1,20)}, trigger: "blur", message: "必须大于0,且小于等于20" }
]
}
} }
// // -
this.formRules={} this.formRules={}
_dtoList.forEach(item=>{ _dtoList.forEach(item=>{
if(item.isRequired){ if(item.isRequired){
@ -247,43 +301,134 @@ export default {
} }
}) })
}, },
//
isHaveDetail(){
let _currentOption = allUrlOption[this.$route.name]
return _currentOption.isMaster && _currentOption.hasDetail && this.flexTableData
},
// //
close() { close() {
this.show = false this.show = false
this.$emit("closePop") this.$emit("closePop")
}, },
//
closeDetailPop() {
this.flexTableData = JSON.parse(JSON.stringify(this.flexTableData_stag))
this.detailPopShow = false
this.$emit("closeDetailPop")
},
//
numberOverControl(value,min,max){
let val = Number(value)
if(min && max){ return val >= min && val <= max }
if(min && !max){ return val >= min }
if(!min && max){ return val <= max }
},
//
sureDetailHandle(){
let _hasNoVaild = false
//
for(let i=0;i<this.flexTableData.length;i++){
for(let r in this.flexTableData[i]){
if(this.detailFormRules[r]){
for(let v = 0;v<this.detailFormRules[r].length;v++){
//
if(
this.detailFormRules[r][v].required &&
((!this.flexTableData[i][r] && this.flexTableData[i][r] != 0) || this.flexTableData[i][r].length <= 0)
){
_hasNoVaild = true
break
// if(!_hasNoVaild[r]){_hasNoVaild[r] = []}
// _hasNoVaild[r].push(this.detailFormRules[r][v])
}
//
if(this.detailFormRules[r][v].valid){
let _valid = this.detailFormRules[r][v].valid(this.flexTableData[i][r])
if(!_valid){
_hasNoVaild = true
break
}
}
}
}
}
}
//
if(_hasNoVaild){
let vaild_zh = {}
// ruleprop
this.flexTableColumns.forEach(item=>{
vaild_zh[item.prop] = item.label
})
//
let _tipper = "所有列检验规则:<br/>"
for(var i in this.detailFormRules){
this.detailFormRules[i].forEach(item=>{
_tipper += `${vaild_zh[i]}】列${item.message};<br/>`;
})
}
_tipper += '请按照要求填写'
if(!this.showDetailRulesTipper){
this.showDetailRulesTipper = _tipper
this.$message({
dangerouslyUseHTMLString: true,
message: _tipper,
type: 'error',
showClose:true,
onClose:(()=>{
this.showDetailRulesTipper = null
})
})
}
return
}
this.flexTableData_stag = JSON.parse(JSON.stringify(this.flexTableData))
this.detailPopShow = false
this.$emit("sureDetailPop")
},
// //
submitHandle(){ submitHandle(){
this.$refs.addEditFrom_Ref.validate((valid) => { this.$refs.addEditFrom_Ref.validate((valid) => {
if(this.submitForm){ if(this.submitForm){
this.submitForm(valid,this.formData,this.handleType,this.formItemData,this.formRules) this.submitForm(valid,this.formData,this.flexTableData,this.handleType,this.formItemData,this.formRules,this.detailFormRules)
return return
} }
this.formData.details = this.flexTableData
this.Loading.addEditApiLoading = true
if (valid) { if (valid) {
// if(this.isHaveDetail() && (!this.flexTableData || this.flexTableData.length <=0 )){
if(this.handleType == 'add'){ this.$confirm('您还未编辑子表信息, 是否确定提交?', '提示', {
ApiTypePost( confirmButtonText: '确定',
this.formData, cancelButtonText: '取消',
this.currentDtos.C.actionsUrl type: 'warning'
).then(res => { }).then(() => {
this.changeActive(1) this.formData.details = this.flexTableData
}).catch(err => { this.Loading.addEditApiLoading = true
this.changeActive(2) //
}) if(this.handleType == 'add'){
} ApiTypePost(
// this.formData,
else{ this.currentDtos.C.actionsUrl
ApiTypePut( ).then(res => {
this.formData, this.changeActive(1)
this.formData.id, }).catch(err => {
this.currentDtos.U.actionsUrl this.changeActive(2)
).then(res => { })
this.changeActive(1) }
}).catch(err => { //
this.changeActive(2) else{
}) ApiTypePut(
this.formData,
this.formData.id,
this.currentDtos.U.actionsUrl
).then(res => {
this.changeActive(1)
}).catch(err => {
this.changeActive(2)
})
}
}).catch(() => {
});
} }
} else { } else {
return false; return false;
@ -364,4 +509,20 @@ export default {
} }
} }
} }
.detailPop{
::v-deep .el-dialog{
margin-bottom:0
}
}
.imitateDetailPopModal{
background: rgba(0, 0, 0, 0.5);
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
</style> </style>

52
WinIn.FasterZ.Wms.Fe/src/components/commonTabel-drawer/index.vue

@ -49,6 +49,7 @@
@handleClick="handleClick" @handleClick="handleClick"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 详情 -->
<curren-descriptions <curren-descriptions
border border
v-if="scope.value == 'xq'" v-if="scope.value == 'xq'"
@ -59,6 +60,17 @@
:propsData="propsData" :propsData="propsData"
> >
</curren-descriptions> </curren-descriptions>
<!-- 主表信息 -->
<curren-descriptions
border
v-if="scope.value == 'masterInfo'"
:column="column"
:direction="direction"
:colon="false"
:tabsDesTions="masterColums"
:propsData="propsData.masterInfo"
>
</curren-descriptions>
<!-- 明细 包含分页 头部按钮等 --> <!-- 明细 包含分页 头部按钮等 -->
<tablePagination <tablePagination
ref="tablePaginationForMX_Ref" ref="tablePaginationForMX_Ref"
@ -104,11 +116,12 @@
</template> </template>
</umyTable> </umyTable>
<!-- 自定义扩展 --> <!-- 自定义扩展 -->
<umyTable <!-- <umyTable
v-if=" v-if="
scope.value == zdyValue && scope.value == zdyValue &&
scope.value != 'xq' && scope.value != 'xq' &&
scope.value != 'mx' && scope.value != 'mx' &&
scope.value != 'masterInfo' &&
scope.value != 'hz' && scope.value != 'hz' &&
scope.value != 'zwlcj' scope.value != 'zwlcj'
" "
@ -127,7 +140,7 @@
<template> <template>
<slot></slot> <slot></slot>
</template> </template>
</umyTable> </umyTable> -->
</template> </template>
</curren-tabs> </curren-tabs>
</div> </div>
@ -171,6 +184,10 @@ import pagination from "@/components/Pagination"
import rowDrop from "@/components/rowDrop/index.vue" import rowDrop from "@/components/rowDrop/index.vue"
import * as allUrlOption from '@/utils/baseData/urlOption' import * as allUrlOption from '@/utils/baseData/urlOption'
import { LoadingMixins } from "@/mixins/LoadingMixins"; import { LoadingMixins } from "@/mixins/LoadingMixins";
import {
initApiColumnsForDto,
sliceStrEndDelete
} from '@/utils/index'
export default { export default {
name: 'currenTabel-drawer', name: 'currenTabel-drawer',
components: { components: {
@ -309,7 +326,8 @@ export default {
// tabs // tabs
if (this.dropdownTabsData.length !== 0) { if (this.dropdownTabsData.length !== 0) {
return this.dropdownTabsData return this.dropdownTabsData
} else { }
else {
// //
// if (Object.keys(this.propsData).length != 0) { // if (Object.keys(this.propsData).length != 0) {
if (Object.keys(this.propsData)) { if (Object.keys(this.propsData)) {
@ -317,6 +335,14 @@ export default {
label: "详情", label: "详情",
name: 'xq' name: 'xq'
}] }]
if(this.propsData.masterInfo && this.propsData.masterInfo){
this.initDropdownTabsData.push({
label: "主表信息",
name: 'masterInfo'
})
let _master_name = this.URLOption.masterRoute || sliceStrEndDelete(this.$route.name,'Detail')
this.masterColums = initApiColumnsForDto(this.propsData.masterInfo,_master_name,this)
}
// 使 // 使
if(this.propsData.details){ if(this.propsData.details){
this.initDropdownTabsData.push({ this.initDropdownTabsData.push({
@ -343,9 +369,9 @@ export default {
detailHeaderButton:null,//- detailHeaderButton:null,//-
detailInfoTableData:null,//- detailInfoTableData:null,//-
detailInfoTitle:null,//-title detailInfoTitle:null,//-title
otherData:[], // tabs // otherData:[], // tabs
zdyTableColumns:[], // // zdyTableColumns:[], //
zdyValue:'', // // zdyValue:'', //
// firstTabs:'xq', // firstTabs:'xq',
initDropdownTabsData:[ initDropdownTabsData:[
{ {
@ -375,10 +401,14 @@ export default {
MaxResultCount: 20, MaxResultCount: 20,
}, },
totalCountForDetail:0, totalCountForDetail:0,
//-id
URLOption:allUrlOption[this.$route.name],
//-id //-id
URLOption_masterId:allUrlOption[this.$route.name].masterId || 'masterId', URLOption_masterId:allUrlOption[this.$route.name].masterId || 'masterId',
//- //-
URLOption_detailList:allUrlOption[this.$route.name].detailListURL, URLOption_detailList:allUrlOption[this.$route.name].detailListURL,
//
masterColums:null
} }
}, },
methods: { methods: {
@ -574,7 +604,7 @@ export default {
// tabs // tabs
handleClick (val) { handleClick (val) {
this.$emit("currenTabsChange", val);//tab this.$emit("currenTabsChange", val);//tab
this.zdyValue = val.name // this.zdyValue = val.name
this.dropdownTabsData.forEach( item => { this.dropdownTabsData.forEach( item => {
if (item.name == val.name) { if (item.name == val.name) {
let parent = this.$parent let parent = this.$parent
@ -582,12 +612,12 @@ export default {
// //
parent.firstTabs = val.name parent.firstTabs = val.name
if (val.name == 'xq' || val.name == 'mx' || val.name == 'hz') { if (val.name == 'xq' || val.name == 'mx' || val.name == 'hz') {
this.zdyTableColumns = [] // this.zdyTableColumns = []
this.otherData = [] // this.otherData = []
parent.tableLoading = false parent.tableLoading = false
} else { } else {
this.zdyTableColumns = [] // this.zdyTableColumns = []
this.otherData = [] // this.otherData = []
// this.firstTabs = val.name // this.firstTabs = val.name
// tab // tab
// if (item.functionName == 'getListByItemcode') { // if (item.functionName == 'getListByItemcode') {

1
WinIn.FasterZ.Wms.Fe/src/components/currenButton/index.vue

@ -67,7 +67,6 @@ export default {
this.Butttondata.forEach(item=>{ this.Butttondata.forEach(item=>{
if(item.float && item.float == 'right'){ if(item.float && item.float == 'right'){
this.buttonsRight.push(item) this.buttonsRight.push(item)
console.log(70,this.buttonsRight)
}else{ }else{
this.buttonsLeft.push(item) this.buttonsLeft.push(item)
} }

7
WinIn.FasterZ.Wms.Fe/src/components/currenTableFlex/index.vue

@ -278,7 +278,12 @@
methods: { methods: {
// //
flexOpenAddNew() { flexOpenAddNew() {
let _oneRow = Object.assign({}, this.flexTableData[0]) // null
let _oneRow = {}
this.flexTableColumns.forEach(item=>{
_oneRow[item.prop] = null
})
// _oneRow = Object.assign({}, this.flexTableData[0])
for(let key in _oneRow){ for(let key in _oneRow){
_oneRow[key] = null _oneRow[key] = null
} }

3
WinIn.FasterZ.Wms.Fe/src/components/filterForDetailPage/index.vue

@ -129,6 +129,7 @@ import { LoadingMixins } from "@/mixins/LoadingMixins";
import { mixins } from "@/mixins/mixins"; import { mixins } from "@/mixins/mixins";
import { filterSelectMixins } from '@/mixins/filter-Select' import { filterSelectMixins } from '@/mixins/filter-Select'
import {getListDesById,getPageListForDetail} from "@/api/wms-api" import {getListDesById,getPageListForDetail} from "@/api/wms-api"
import { initApiColumnsForDto } from '@/utils/index'
export default { export default {
name: 'filterForDetailPage', name: 'filterForDetailPage',
mixins: [ mixins: [
@ -263,7 +264,7 @@ export default {
.then(res=>{ .then(res=>{
// //
let _parentName = this.URLOption_detailList.substr(0,this.URLOption_detailList.indexOf('/')) let _parentName = this.URLOption_detailList.substr(0,this.URLOption_detailList.indexOf('/'))
let _Columns = this.initApiColumnsForDto(res.items[0],_parentName) let _Columns = initApiColumnsForDto(res.items[0],_parentName,this)
this.listColumns = this.initTableColumns(_Columns,'detailPage_api') this.listColumns = this.initTableColumns(_Columns,'detailPage_api')
// //
if(res){ if(res){

10
WinIn.FasterZ.Wms.Fe/src/components/umyTable/index.vue

@ -130,7 +130,7 @@
<u-table-column <u-table-column
v-if="buttonOperationList_left" v-if="buttonOperationList_left"
:fixed="'left'" :fixed="'left'"
width="auto" :width="operationLeftColumnWidth()"
min-width="120px" min-width="120px"
:align="'center'" :align="'center'"
:header-align="'center'" :header-align="'center'"
@ -144,6 +144,7 @@
:key="indexButton" :key="indexButton"
type="text" type="text"
size="mini" size="mini"
:style="{color:itemButton.color || '#409EFF'}"
@click="buttonOperationClick_left(scope.row, itemButton, indexButton)" @click="buttonOperationClick_left(scope.row, itemButton, indexButton)"
>{{itemButton.label}}</el-button> >{{itemButton.label}}</el-button>
</template> </template>
@ -250,7 +251,7 @@ export default {
// tableborder // tableborder
tableBorder: { tableBorder: {
type: Boolean, type: Boolean,
default: false, default: true,
}, },
// itemfixed // itemfixed
firstFixed: { firstFixed: {
@ -398,6 +399,11 @@ export default {
this.setTableHeightHandle() this.setTableHeightHandle()
}, },
methods: { methods: {
//
operationLeftColumnWidth(){
if(this.buttonOperationList_left.length == 1){return 120}
else{return this.buttonOperationList_left.length * 100}
},
// //
doFreshLayout(){ doFreshLayout(){
if (this.$refs.multipleTable && this.$refs.multipleTable.doLayout) { if (this.$refs.multipleTable && this.$refs.multipleTable.doLayout) {

184
WinIn.FasterZ.Wms.Fe/src/mixins/TableMixins.js

@ -1,11 +1,13 @@
import i18n from "@/lang"
import { import {
getPageList, getPageList,
getDetailed, getDetailed,
postDelete, postDelete,
ApiTypeDelete ApiTypeDelete
} from '@/api/wms-api' } from '@/api/wms-api'
import { zhApiColumnsLable,firstWordSizeChange } from '@/utils/index' import {
initApiColumnsForDto,
sliceStrEndDelete
} from '@/utils/index'
export const tableMixins = { export const tableMixins = {
data() { data() {
return { return {
@ -103,9 +105,22 @@ export const tableMixins = {
} }
// 编辑 api // 编辑 api
else if (item.name == "editFromApi") { else if (item.name == "editFromApi") {
this.addEditApiType = 'edit' // this.addEditApiType = 'edit'
this.editFromApiRowData = row // this.editFromApiRowData = row
this.displayDialog.addEditApiDialog = true; // this.displayDialog.addEditApiDialog = true;
let _url = this.URLOption_detail ? this.URLOption_detail : this.URLOption_base
this.Loading.tableLoading = true
getDetailed(row.id, _url)
.then(res=>{
this.addEditApiType = 'edit'
this.editFromApiRowData = res
this.displayDialog.addEditApiDialog = true;
this.Loading.tableLoading = false
})
.catch(err=>{
this.Loading.tableLoading = false
})
} }
// 删除 // 删除
else if (item.name == "delete"){ else if (item.name == "delete"){
@ -158,95 +173,6 @@ export const tableMixins = {
// if(detailsTable && detailsTable[this.$route.name])this.apiColumns_DetailsTable = this.initTableColumns(detailsTable[this.$route.name],'detail_api') // if(detailsTable && detailsTable[this.$route.name])this.apiColumns_DetailsTable = this.initTableColumns(detailsTable[this.$route.name],'detail_api')
// if(detailsPage && detailsPage[this.$route.name])this.apiColumns_DetailsPage = this.initTableColumns(detailsPage[this.$route.name],'detailPage_api') // if(detailsPage && detailsPage[this.$route.name])this.apiColumns_DetailsPage = this.initTableColumns(detailsPage[this.$route.name],'detailPage_api')
// }, // },
// get-dto-column-type接口表头类型初始化
initApiColumnsForDto(list,titleName){
let data = this.$store.getters.dtoColumnTypes
let _coloums = data[titleName].S
let _Columns_Table = []
if(_coloums){
let _data = _coloums.dtoList
_data.forEach(item=>{
// 如果list接口存在数据 ,与list接口返回字段比较处理,list接口存在的话则追加
let _if = firstWordSizeChange(item.name) != 'details'
if(list){
_if = firstWordSizeChange(item.name) in list && firstWordSizeChange(item.name) != 'details'
}
if(_if){
_Columns_Table.push(item)
}
})
}
if(list){
_Columns_Table = _Columns_Table.concat(this.specialAddColumns(list,titleName))
}
return _Columns_Table
},
// 添加特殊字段(api中没有的字段特殊处理)
specialAddColumns(list,titleName){
let _apiName = titleName
let _special_list=[]
// creationTime
if('creationTime' in list){
_special_list.push(
{
"name": "CreationTime",
"apiBaseType": "datetime",
"baseApiName": _apiName + 'CreationTime',
"label": zhApiColumnsLable(_apiName + 'CreationTime') || i18n.t('columNames.CreationTime'),
"prop": "creationTime",
}
)
}
// creatorId
if('creatorId' in list){
_special_list.push(
{
"name": "CreatorId",
"apiBaseType": "string",
"baseApiName": _apiName + 'CreatorId',
"label": zhApiColumnsLable(_apiName + 'CreatorId') || i18n.t('columNames.CreatorId'),
"prop": "creatorId",
}
)
}
// lastModificationTime
if('lastModificationTime' in list){
_special_list.push(
{
"name": "LastModificationTime",
"apiBaseType": "datetime",
"baseApiName": _apiName + 'LastModificationTime',
"label": zhApiColumnsLable(_apiName + 'LastModificationTime') || i18n.t('columNames.LastModificationTime'),
"prop": "lastModificationTime",
}
)
}
// lastModifierId
if('lastModifierId' in list){
_special_list.push(
{
"name": "LastModifierId",
"apiBaseType": "string",
"baseApiName": _apiName + 'LastModifierId',
"label": zhApiColumnsLable(_apiName + 'LastModifierId') || i18n.t('columNames.LastModifierId'),
"prop": "lastModifierId",
}
)
}
// tenantId
if('tenantId' in list){
_special_list.push(
{
"name": "TenantId",
"apiBaseType": "string",
"baseApiName": _apiName + 'TenantId',
"label": zhApiColumnsLable(_apiName + 'TenantId') || i18n.t('columNames.TenantId'),
"prop": "tenantId",
}
)
}
return _special_list
},
//渲染数据 //渲染数据
paging(callback,repeat) { paging(callback,repeat) {
this.Loading.tableLoading = true; this.Loading.tableLoading = true;
@ -255,7 +181,7 @@ export const tableMixins = {
.then(res=>{ .then(res=>{
// 表头处理 // 表头处理
let _list = res.items && res.items.length > 0 ? res.items[0] : null let _list = res.items && res.items.length > 0 ? res.items[0] : null
let _Columns = this.initApiColumnsForDto(_list,this.$route.name) let _Columns = initApiColumnsForDto(_list,this.$route.name,this)
this.apiColumns_Table = this.initTableColumns(_Columns) this.apiColumns_Table = this.initTableColumns(_Columns)
this.apiColumns_DesTions = _Columns this.apiColumns_DesTions = _Columns
// 页面数据处理 // 页面数据处理
@ -312,30 +238,54 @@ export const tableMixins = {
this.Loading.DrawerLoading = true this.Loading.DrawerLoading = true
this.displayDialog.detailsDialog = true; this.displayDialog.detailsDialog = true;
let _url = this.URLOption_detail ? this.URLOption_detail : this.URLOption_base let _url = this.URLOption_detail ? this.URLOption_detail : this.URLOption_base
getDetailed(val.id, _url) // 有主表信息子表(表头处理)
.then(res=>{ if(!this.URLOption.isMaster && this.URLOption.hasDetail){
// 打印使用的全部数据存储 let _showMasterUrl = this.URLOption.mainShowMasterUrl
this.tableDataDetails = JSON.parse(JSON.stringify(res)) if(!this.URLOption.mainShowMasterUrl){
// 数据处理 _showMasterUrl = sliceStrEndDelete(this.URLOption_detail,'-Detail')
this.propsData = res }
if (res.details) { Promise.all([
// 表头处理 getDetailed(val.id, _url),
let _parentName = this.URLOption_detailList.substr(0,this.URLOption_detailList.indexOf('/')) getDetailed(val[this.URLOption.mainShowMasterId || 'masterId'], _showMasterUrl)
this.apiColumns_DetailsTable = this.initTableColumns(this.initApiColumnsForDto(res.details[0],_parentName),'detail_api') ]).then((res) => {
if(this.$refs.currenDrawer_Ref){ let _allRes = JSON.parse(JSON.stringify(res[0]))
this.$refs.currenDrawer_Ref.getDetailList(res,()=>{ _allRes.masterInfo = res[1]
this.inlineDialogCallback() this.initInlineHttpBack(_allRes)
},()=>{ }).catch(()=>{
this.Loading.DrawerLoading = false
})
}
}else{
this.Loading.DrawerLoading = false
}
})
.catch(err=>{
this.Loading.DrawerLoading = false this.Loading.DrawerLoading = false
}) })
}
// 没有主表信息
else{
getDetailed(val.id, _url)
.then(res=>{
this.initInlineHttpBack(res)
})
.catch(err=>{
this.Loading.DrawerLoading = false
})
}
},
// 查看详情获取返回值后处理
initInlineHttpBack(res){
// 打印使用的全部数据存储
this.tableDataDetails = JSON.parse(JSON.stringify(res))
// 数据处理
this.propsData = res
if (res.details) {
// 表头处理
let _parentName = this.URLOption_detailList.substr(0,this.URLOption_detailList.indexOf('/'))
this.apiColumns_DetailsTable = this.initTableColumns(initApiColumnsForDto(res.details[0],_parentName,this),'detail_api')
if(this.$refs.currenDrawer_Ref){
this.$refs.currenDrawer_Ref.getDetailList(res,()=>{
this.inlineDialogCallback()
},()=>{
this.Loading.DrawerLoading = false
})
}
}else{
this.Loading.DrawerLoading = false
}
}, },
// 前端分页处理 // 前端分页处理
// detailListPageFromFE(data){ // detailListPageFromFE(data){

2
WinIn.FasterZ.Wms.Fe/src/mixins/mixins.js

@ -8,6 +8,8 @@ import { getLoginName } from "@/utils/auth"
export const mixins = { export const mixins = {
data() { data() {
return { return {
// 当前路由配置
URLOption:allUrlOption[this.$route.name],
//主表-列表 //主表-列表
URLOption_base:allUrlOption[this.$route.name].baseURL, URLOption_base:allUrlOption[this.$route.name].baseURL,
//主表-明细 //主表-明细

10
WinIn.FasterZ.Wms.Fe/src/styles/index.scss

@ -276,4 +276,14 @@ aside {
height: 22px; height: 22px;
background: #1890ff; background: #1890ff;
} }
.buttonBox{
position: absolute;
right: 10px;
top: 15px;
button{
float: left;
}
}
} }

2195
WinIn.FasterZ.Wms.Fe/src/utils/baseData/urlOption.js

File diff suppressed because it is too large

98
WinIn.FasterZ.Wms.Fe/src/utils/index.js

@ -3,6 +3,7 @@
*/ */
import {fileStorage, getPageList } from '@/api/wms-api' import {fileStorage, getPageList } from '@/api/wms-api'
import store from '@/store' import store from '@/store'
import i18n from "@/lang"
/** /**
* @param {string} url * @param {string} url
@ -429,3 +430,100 @@
} }
} }
// get-dto-column-type接口表头类型初始化
export function initApiColumnsForDto (list,titleName,that) {
let data = that.$store.getters.dtoColumnTypes
let _coloums = data[titleName].S
let _Columns_Table = []
if(_coloums){
let _data = _coloums.dtoList
_data.forEach(item=>{
// 如果list接口存在数据 ,与list接口返回字段比较处理,list接口存在的话则追加
let _if = firstWordSizeChange(item.name) != 'details'
if(list){
_if = firstWordSizeChange(item.name) in list && firstWordSizeChange(item.name) != 'details'
}
if(_if){
_Columns_Table.push(item)
}
})
}
if(list){
_Columns_Table = _Columns_Table.concat(specialAddColumns(list,titleName))
}
return _Columns_Table
}
// 特殊字段转义处理(api中没有的字段特殊处理)
export function specialAddColumns(list,titleName){
let _apiName = titleName
let _special_list=[]
// creationTime
if('creationTime' in list){
_special_list.push(
{
"name": "CreationTime",
"apiBaseType": "datetime",
"baseApiName": _apiName + 'CreationTime',
"label": zhApiColumnsLable(_apiName + 'CreationTime') || i18n.t('columNames.CreationTime'),
"prop": "creationTime",
}
)
}
// creatorId
if('creatorId' in list){
_special_list.push(
{
"name": "CreatorId",
"apiBaseType": "string",
"baseApiName": _apiName + 'CreatorId',
"label": zhApiColumnsLable(_apiName + 'CreatorId') || i18n.t('columNames.CreatorId'),
"prop": "creatorId",
}
)
}
// lastModificationTime
if('lastModificationTime' in list){
_special_list.push(
{
"name": "LastModificationTime",
"apiBaseType": "datetime",
"baseApiName": _apiName + 'LastModificationTime',
"label": zhApiColumnsLable(_apiName + 'LastModificationTime') || i18n.t('columNames.LastModificationTime'),
"prop": "lastModificationTime",
}
)
}
// lastModifierId
if('lastModifierId' in list){
_special_list.push(
{
"name": "LastModifierId",
"apiBaseType": "string",
"baseApiName": _apiName + 'LastModifierId',
"label": zhApiColumnsLable(_apiName + 'LastModifierId') || i18n.t('columNames.LastModifierId'),
"prop": "lastModifierId",
}
)
}
// tenantId
if('tenantId' in list){
_special_list.push(
{
"name": "TenantId",
"apiBaseType": "string",
"baseApiName": _apiName + 'TenantId',
"label": zhApiColumnsLable(_apiName + 'TenantId') || i18n.t('columNames.TenantId'),
"prop": "tenantId",
}
)
}
return _special_list
}
// 从字段中删除最后某字段
export function sliceStrEndDelete(str,deleteStr){
let _d_l = str.length - deleteStr.length
return str.slice(0,_d_l)
}

14
WinIn.FasterZ.Wms.Fe/src/utils/request.js

@ -102,14 +102,16 @@ service.interceptors.response.use(
// } // }
let err = error.response.data.error // for debug let err = error.response.data.error // for debug
if (err && err.validationErrors) { if (err && err.validationErrors) {
let _err_sum = ""
for (let item in err.validationErrors) { for (let item in err.validationErrors) {
Message({ _err_sum += err.validationErrors[item].message + '<br/>'
message: err.validationErrors[item].message,
type: 'error',
duration: 3 * 1000,
showClose:true
})
} }
Message({
message: _err_sum,
type: 'error',
duration: 5 * 1000,
dangerouslyUseHTMLString: true
})
} else { } else {
console.log(err) console.log(err)
// 用户登录,用户名密码错误,报400,后端返回 invalid_grant 信息,令牌受限 // 用户登录,用户名密码错误,报400,后端返回 invalid_grant 信息,令牌受限

122
WinIn.FasterZ.Wms.Fe/src/views/demo/demo_MAndD.vue

@ -0,0 +1,122 @@
<template>
<!-- 有子表的主表 -->
<div class="page-box" v-loading="Loading.tableLoading">
<tablePagination
v-if="apiColumns_Table"
:currenButtonData="currenButtonData"
:tableData="tableData"
:tableLoading="Loading.tableLoading"
:tableColumns="apiColumns_Table"
@rowDrop="rowDrop"
:totalCount="totalCount"
:multipleSelection="multipleSelection"
:MaxResultCount="PageListParams.MaxResultCount"
@topbutton="topbutton"
@inlineDialog="inlineDialog"
@sortChange="sortChange"
@alertoldSkipCount="alertoldSkipCount"
@alterResultCount="alterResultCount"
@handleSelectionChange="handleSelectionChange"
:currentPageProps="oldSkipCount"
:quicklySearchOption="quicklySearchOption"
@quicklySearchClick="quicklySearchClick"
@quicklySearchClear="quicklySearchClear"
:primarySearchOption="primarySearchOption"
@overallSearchFormClick="overallSearchFormClick"
:httpOverallSearchData="httpOverallSearchData"
:buttonOperationList_left="buttonOperationClick_leftBase"
@buttonOperationClick_left="buttonOperationClick_left"
:buttonOperationList_right="(data)=>{return buttonOperationList_rightApi(data,'edit|delete')}"
@buttonOperationClick_right="buttonOperationClick_right"
></tablePagination>
<curren-Drawer
ref="currenDrawer_Ref"
:title="apiColumns_DesTions"
@rowDrop="rowDrop"
:tableColumns="apiColumns_DetailsTable"
:tabsDesTions="apiColumns_DesTions"
:DrawerLoading="Loading.DrawerLoading"
:drawer="displayDialog.detailsDialog"
:propsData="propsData"
:Butttondata="[]"
@drawerShut="(val) => (displayDialog.detailsDialog = val)"
@drawerbutton="drawerbutton"
@handleCommand="drawerHandle"
@close-value="closeValue"
:totalCount="totalCountDetails"
:currentPage="oldSkipCountDetails"
:MaxResultCount="MaxResultCountDetails"
@alterResultCountDetails="alterResultCountDetails"
@alertoldSkipCountDetails="alertoldSkipCountDetails"
:buttonOperationList_left="operationButtonsDetail"
></curren-Drawer>
<!-- 明细查询页面 -->
<filterForDetailPage
v-if="filterForDetailShow"
:parentColumns="apiColumns_Table"
@closeDialog="changeFilterForDetailShow"
></filterForDetailPage>
<!-- 导出弹窗 -->
<exportDrop
v-if="displayDialog.exportDialog"
@closeDialog="closeExportDrop"
@exportDropSubmit="exportDropSubmit"
></exportDrop>
<!-- Api新增 -->
<addEditFromApiPop
v-if="displayDialog.addEditApiDialog"
:handleType="addEditApiType"
:editRowData="editFromApiRowData"
@closePop="closeAddEditApiPop"
@exitAfterHandle="paging"
></addEditFromApiPop>
</div>
</template>
<script>
import { tableMixins } from "@/mixins/TableMixins";
import { LoadingMixins } from "@/mixins/LoadingMixins";
import { drawerMixins } from "@/mixins/drawerMixins"
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins";
import { mixins } from "@/mixins/mixins";
import { filterSelectMixins } from '@/mixins/filter-Select'
export default {
name: "StoreWorkOrder",
mixins: [
tableMixins,
LoadingMixins,
drawerMixins,
TableHeaderMixins,
mixins,
filterSelectMixins,
],
data() {
return {
//
currenButtonData: [
this.defaultAddBtn(
{ name:'addFromApi'}
),//
this.defaultExportBtn({
isRedundance:true,
isDetailExport:true
}),//
this.defaultFieldSettingBtn(),//
this.defaultFreshBtn(),//
this.defaultFilterBtn(),//
this.defaultFilterForDetailBtn(),//
],
};
},
mounted() {
this.paging();
},
}
</script>
<style lang="scss" scoped>
@import "@/styles/basicData.scss";
</style>

113
WinIn.FasterZ.Wms.Fe/src/views/demo/demo_onlyD.vue

@ -0,0 +1,113 @@
<template>
<!-- 子表 -->
<div class="page-box" v-loading="Loading.tableLoading">
<tablePagination
v-if="apiColumns_Table"
:currenButtonData="currenButtonData"
:tableData="tableData"
:tableLoading="Loading.tableLoading"
:tableColumns="apiColumns_Table"
@rowDrop="rowDrop"
:totalCount="totalCount"
:multipleSelection="multipleSelection"
:MaxResultCount="PageListParams.MaxResultCount"
@topbutton="topbutton"
@inlineDialog="inlineDialog"
@sortChange="sortChange"
@alertoldSkipCount="alertoldSkipCount"
@alterResultCount="alterResultCount"
@handleSelectionChange="handleSelectionChange"
:currentPageProps="oldSkipCount"
:quicklySearchOption="quicklySearchOption"
@quicklySearchClick="quicklySearchClick"
@quicklySearchClear="quicklySearchClear"
:primarySearchOption="primarySearchOption"
@overallSearchFormClick="overallSearchFormClick"
:httpOverallSearchData="httpOverallSearchData"
:buttonOperationList_left="buttonOperationClick_leftBase"
@buttonOperationClick_left="buttonOperationClick_left"
:buttonOperationList_right="(data)=>{return buttonOperationList_rightApi(data,'edit|delete')}"
@buttonOperationClick_right="buttonOperationClick_right"
></tablePagination>
<!-- :buttonOperationList_left="buttonOperationClick_leftBase"
@buttonOperationClick_left="buttonOperationClick_left" -->
<curren-Drawer
ref="currenDrawer_Ref"
:title="apiColumns_DesTions"
@rowDrop="rowDrop"
:tableColumns="apiColumns_DetailsTable"
:tabsDesTions="apiColumns_DesTions"
:DrawerLoading="Loading.DrawerLoading"
:drawer="displayDialog.detailsDialog"
:propsData="propsData"
:Butttondata="[]"
@drawerShut="(val) => (displayDialog.detailsDialog = val)"
@drawerbutton="drawerbutton"
@handleCommand="drawerHandle"
@close-value="closeValue"
:totalCount="totalCountDetails"
:currentPage="oldSkipCountDetails"
:MaxResultCount="MaxResultCountDetails"
@alterResultCountDetails="alterResultCountDetails"
@alertoldSkipCountDetails="alertoldSkipCountDetails"
:buttonOperationList_left="operationButtonsDetail"
></curren-Drawer>
<!-- 导出弹窗 -->
<exportDrop
v-if="displayDialog.exportDialog"
@closeDialog="closeExportDrop"
@exportDropSubmit="exportDropSubmit"
></exportDrop>
<!-- Api新增 -->
<addEditFromApiPop
v-if="displayDialog.addEditApiDialog"
:handleType="addEditApiType"
:editRowData="editFromApiRowData"
@closePop="closeAddEditApiPop"
@exitAfterHandle="paging"
></addEditFromApiPop>
</div>
</template>
<script>
import { tableMixins } from "@/mixins/TableMixins";
import { LoadingMixins } from "@/mixins/LoadingMixins";
import { drawerMixins } from "@/mixins/drawerMixins"
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins";
import { newAndEdiDialogMixins } from "@/mixins/newAndEdiDialogMixins"
import { mixins } from "@/mixins/mixins";
import { filterSelectMixins } from '@/mixins/filter-Select'
export default {
name: "StoreWorkOrderDetail",
mixins: [
tableMixins,
LoadingMixins,
drawerMixins,
TableHeaderMixins,
mixins,
filterSelectMixins,
newAndEdiDialogMixins
],
data() {
return {
//
currenButtonData: [
this.defaultExportBtn({
isRedundance:true,
isDetailExport:true
}),//
this.defaultFieldSettingBtn(),//
this.defaultFreshBtn(),//
this.defaultFilterBtn(),//
],
};
},
mounted() {
this.paging();
},
}
</script>
<style lang="scss" scoped>
@import "@/styles/basicData.scss";
</style>

116
WinIn.FasterZ.Wms.Fe/src/views/demo/demo_onlyM.vue

@ -0,0 +1,116 @@
<template>
<!-- 没有子表的主表 -->
<div class="page-box" v-loading="Loading.tableLoading">
<tablePagination
v-if="apiColumns_Table"
:currenButtonData="currenButtonData"
:tableData="tableData"
:tableLoading="Loading.tableLoading"
:tableColumns="apiColumns_Table"
@rowDrop="rowDrop"
:totalCount="totalCount"
:multipleSelection="multipleSelection"
:MaxResultCount="PageListParams.MaxResultCount"
@topbutton="topbutton"
@inlineDialog="inlineDialog"
@sortChange="sortChange"
@alertoldSkipCount="alertoldSkipCount"
@alterResultCount="alterResultCount"
@handleSelectionChange="handleSelectionChange"
:currentPageProps="oldSkipCount"
:quicklySearchOption="quicklySearchOption"
@quicklySearchClick="quicklySearchClick"
@quicklySearchClear="quicklySearchClear"
:primarySearchOption="primarySearchOption"
@overallSearchFormClick="overallSearchFormClick"
:httpOverallSearchData="httpOverallSearchData"
:buttonOperationList_left="buttonOperationClick_leftBase"
@buttonOperationClick_left="buttonOperationClick_left"
:buttonOperationList_right="(data)=>{return buttonOperationList_rightApi(data,'edit|delete')}"
@buttonOperationClick_right="buttonOperationClick_right"
></tablePagination>
<!-- :buttonOperationList_left="buttonOperationClick_leftBase"
@buttonOperationClick_left="buttonOperationClick_left" -->
<curren-Drawer
ref="currenDrawer_Ref"
:title="apiColumns_DesTions"
@rowDrop="rowDrop"
:tableColumns="apiColumns_DetailsTable"
:tabsDesTions="apiColumns_DesTions"
:DrawerLoading="Loading.DrawerLoading"
:drawer="displayDialog.detailsDialog"
:propsData="propsData"
:Butttondata="[]"
@drawerShut="(val) => (displayDialog.detailsDialog = val)"
@drawerbutton="drawerbutton"
@handleCommand="drawerHandle"
@close-value="closeValue"
:totalCount="totalCountDetails"
:currentPage="oldSkipCountDetails"
:MaxResultCount="MaxResultCountDetails"
@alterResultCountDetails="alterResultCountDetails"
@alertoldSkipCountDetails="alertoldSkipCountDetails"
:buttonOperationList_left="operationButtonsDetail"
></curren-Drawer>
<!-- 导出弹窗 -->
<exportDrop
v-if="displayDialog.exportDialog"
@closeDialog="closeExportDrop"
@exportDropSubmit="exportDropSubmit"
></exportDrop>
<!-- Api新增 -->
<addEditFromApiPop
v-if="displayDialog.addEditApiDialog"
:handleType="addEditApiType"
:editRowData="editFromApiRowData"
@closePop="closeAddEditApiPop"
@exitAfterHandle="paging"
></addEditFromApiPop>
</div>
</template>
<script>
import { tableMixins } from "@/mixins/TableMixins";
import { LoadingMixins } from "@/mixins/LoadingMixins";
import { drawerMixins } from "@/mixins/drawerMixins"
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins";
import { newAndEdiDialogMixins } from "@/mixins/newAndEdiDialogMixins"
import { mixins } from "@/mixins/mixins";
import { filterSelectMixins } from '@/mixins/filter-Select'
export default {
name: "AuthDepartment",
mixins: [
tableMixins,
LoadingMixins,
drawerMixins,
TableHeaderMixins,
mixins,
filterSelectMixins,
newAndEdiDialogMixins
],
data() {
return {
//
currenButtonData: [
this.defaultAddBtn(
{ name:'addFromApi'}
),//
this.defaultExportBtn({
isRedundance:true,
isDetailExport:true
}),//
this.defaultFieldSettingBtn(),//
this.defaultFreshBtn(),//
this.defaultFilterBtn(),//
],
};
},
mounted() {
this.paging();
},
}
</script>
<style lang="scss" scoped>
@import "@/styles/basicData.scss";
</style>

14
WinIn.FasterZ.Wms.Fe/src/views/menuList/AuthDepartment.vue

@ -1,4 +1,5 @@
<template> <template>
<!-- 没有子表的主表 -->
<div class="page-box" v-loading="Loading.tableLoading"> <div class="page-box" v-loading="Loading.tableLoading">
<tablePagination <tablePagination
v-if="apiColumns_Table" v-if="apiColumns_Table"
@ -25,6 +26,8 @@
:httpOverallSearchData="httpOverallSearchData" :httpOverallSearchData="httpOverallSearchData"
:buttonOperationList_left="buttonOperationClick_leftBase" :buttonOperationList_left="buttonOperationClick_leftBase"
@buttonOperationClick_left="buttonOperationClick_left" @buttonOperationClick_left="buttonOperationClick_left"
:buttonOperationList_right="(data)=>{return buttonOperationList_rightApi(data,'edit|delete')}"
@buttonOperationClick_right="buttonOperationClick_right"
></tablePagination> ></tablePagination>
<!-- :buttonOperationList_left="buttonOperationClick_leftBase" <!-- :buttonOperationList_left="buttonOperationClick_leftBase"
@buttonOperationClick_left="buttonOperationClick_left" --> @buttonOperationClick_left="buttonOperationClick_left" -->
@ -55,6 +58,14 @@
@closeDialog="closeExportDrop" @closeDialog="closeExportDrop"
@exportDropSubmit="exportDropSubmit" @exportDropSubmit="exportDropSubmit"
></exportDrop> ></exportDrop>
<!-- Api新增 -->
<addEditFromApiPop
v-if="displayDialog.addEditApiDialog"
:handleType="addEditApiType"
:editRowData="editFromApiRowData"
@closePop="closeAddEditApiPop"
@exitAfterHandle="paging"
></addEditFromApiPop>
</div> </div>
</template> </template>
<script> <script>
@ -82,6 +93,9 @@ export default {
return { return {
// //
currenButtonData: [ currenButtonData: [
this.defaultAddBtn(
{ name:'addFromApi'}
),//
this.defaultExportBtn({ this.defaultExportBtn({
isRedundance:true, isRedundance:true,
isDetailExport:true isDetailExport:true

16
WinIn.FasterZ.Wms.Fe/src/views/menuList/StoreWorkOrder.vue

@ -1,5 +1,6 @@
<template> <template>
<!-- 有子表的主表 -->
<div class="page-box" v-loading="Loading.tableLoading"> <div class="page-box" v-loading="Loading.tableLoading">
<tablePagination <tablePagination
v-if="apiColumns_Table" v-if="apiColumns_Table"
@ -26,6 +27,8 @@
:httpOverallSearchData="httpOverallSearchData" :httpOverallSearchData="httpOverallSearchData"
:buttonOperationList_left="buttonOperationClick_leftBase" :buttonOperationList_left="buttonOperationClick_leftBase"
@buttonOperationClick_left="buttonOperationClick_left" @buttonOperationClick_left="buttonOperationClick_left"
:buttonOperationList_right="(data)=>{return buttonOperationList_rightApi(data,'edit|delete')}"
@buttonOperationClick_right="buttonOperationClick_right"
></tablePagination> ></tablePagination>
<curren-Drawer <curren-Drawer
ref="currenDrawer_Ref" ref="currenDrawer_Ref"
@ -60,6 +63,14 @@
@closeDialog="closeExportDrop" @closeDialog="closeExportDrop"
@exportDropSubmit="exportDropSubmit" @exportDropSubmit="exportDropSubmit"
></exportDrop> ></exportDrop>
<!-- Api新增 -->
<addEditFromApiPop
v-if="displayDialog.addEditApiDialog"
:handleType="addEditApiType"
:editRowData="editFromApiRowData"
@closePop="closeAddEditApiPop"
@exitAfterHandle="paging"
></addEditFromApiPop>
</div> </div>
</template> </template>
<script> <script>
@ -84,6 +95,9 @@ export default {
return { return {
// //
currenButtonData: [ currenButtonData: [
this.defaultAddBtn(
{ name:'addFromApi'}
),//
this.defaultExportBtn({ this.defaultExportBtn({
isRedundance:true, isRedundance:true,
isDetailExport:true isDetailExport:true
@ -91,7 +105,7 @@ export default {
this.defaultFieldSettingBtn(),// this.defaultFieldSettingBtn(),//
this.defaultFreshBtn(),// this.defaultFreshBtn(),//
this.defaultFilterBtn(),// this.defaultFilterBtn(),//
this.defaultFilterForDetailBtn()// this.defaultFilterForDetailBtn(),//
], ],
}; };
}, },

11
WinIn.FasterZ.Wms.Fe/src/views/menuList/StoreWorkOrderDetail.vue

@ -1,4 +1,5 @@
<template> <template>
<!-- 子表 -->
<div class="page-box" v-loading="Loading.tableLoading"> <div class="page-box" v-loading="Loading.tableLoading">
<tablePagination <tablePagination
v-if="apiColumns_Table" v-if="apiColumns_Table"
@ -25,6 +26,8 @@
:httpOverallSearchData="httpOverallSearchData" :httpOverallSearchData="httpOverallSearchData"
:buttonOperationList_left="buttonOperationClick_leftBase" :buttonOperationList_left="buttonOperationClick_leftBase"
@buttonOperationClick_left="buttonOperationClick_left" @buttonOperationClick_left="buttonOperationClick_left"
:buttonOperationList_right="(data)=>{return buttonOperationList_rightApi(data,'edit|delete')}"
@buttonOperationClick_right="buttonOperationClick_right"
></tablePagination> ></tablePagination>
<!-- :buttonOperationList_left="buttonOperationClick_leftBase" <!-- :buttonOperationList_left="buttonOperationClick_leftBase"
@buttonOperationClick_left="buttonOperationClick_left" --> @buttonOperationClick_left="buttonOperationClick_left" -->
@ -55,6 +58,14 @@
@closeDialog="closeExportDrop" @closeDialog="closeExportDrop"
@exportDropSubmit="exportDropSubmit" @exportDropSubmit="exportDropSubmit"
></exportDrop> ></exportDrop>
<!-- Api新增 -->
<addEditFromApiPop
v-if="displayDialog.addEditApiDialog"
:handleType="addEditApiType"
:editRowData="editFromApiRowData"
@closePop="closeAddEditApiPop"
@exitAfterHandle="paging"
></addEditFromApiPop>
</div> </div>
</template> </template>
<script> <script>

43
fe/PC/src/utils/tableColumns/index.js

@ -2586,6 +2586,49 @@ export const InventoryBalance = [
{ label: "最后事务类型", prop: "lastTransType", type: "filter", filters: "TransTypeBase" }, { label: "最后事务类型", prop: "lastTransType", type: "filter", filters: "TransTypeBase" },
{ label: "最后事务编号", prop: 'lastTransNumber' }, { label: "最后事务编号", prop: 'lastTransNumber' },
] ]
// 库存余额(解/冻) 20230407
export const InventoryBalanceActive = [
{
label: "物品代码",
prop: "itemCode",
fixed: "left",
type: "name",
width: orderWidth
},
{ label: "物品名称", prop: 'itemName' },
{ label: "物品描述1", prop: "itemDesc1" },
{ label: "物品描述2", prop: "itemDesc2" },
{ label: "配置", prop: "item_configurationFromFE" },
{ label: "库存数量", prop: "qty" },
{ label: "计量单位", prop: "uom" },
{ label: "批次", prop: "lot" },
{ label: "库位代码", prop: "locationCode" },
{ label: "库存状态", type: "filter", filters: "inventoryStage", prop: "status" },
{ label: "箱码", prop: "packingCode" },
{ label: "ERP储位", prop: "locationErpCode" },
{ label: "是否可用", prop: "isActive", type: "filter", filters: "whetherOrNot" },
{ label: "创建时间", prop: "creationTime",type: "dateTime" },
{ label: "生产日期", prop: "produceDate" ,type: "dateTime" },
{ label: "入库时间", prop: "putInTime", type: "dateTime" },
{ label: "过期日期", prop: "expireDate" ,type: "dateTime" },
{ label: "上次修改时间", prop: "lastModificationTime",type: "dateTime" },
{ label: "最后盘点时间", prop: "lastCountTime",type: "dateTime" },
{ label: "最后盘点计划单号", prop: "lastCountPlanNumber",width: orderWidth },
{ label: "最后盘点标签", prop: "lastCountLabel" },
{ label: "标包数量", prop: "stdPackQty" },
{ label: "库位组", prop: "locationGroup" },
{ label: "库区", prop: "locationArea" },
{ label: "管理类型", prop: "manageType", type: "filter", filters: "manageType" },
{ label: "序号", prop: "serialNumber" },
{ label: "备注", prop: "remark" },
{ label: "到货日期", prop: "arriveDate",type: "dateTime" },
{ label: "供应商批次", prop: "supplierBatch" },
{ label: "仓库代码", prop: 'warehouseCode' },
{ label: "最后事务类型", prop: "lastTransType", type: "filter", filters: "TransTypeBase" },
{ label: "最后事务编号", prop: 'lastTransNumber' },
]
// 库存事务 20230410 // 库存事务 20230410
export const InventoryTransaction = [ export const InventoryTransaction = [
{ {

41
fe/PC/src/utils/tabsDesTions/index.js

@ -1800,6 +1800,47 @@ export const InventoryInitialNote = [
// { label: "ID", prop: 'id' }, // { label: "ID", prop: 'id' },
// ************** 确认隐藏 ************************ // ************** 确认隐藏 ************************
] ]
// 库存余额(解/冻)
export const InventoryBalanceActive = [
{ label: "物品代码", prop: 'itemCode' },
{ label: "物品名称", prop: "itemName" },
{ label: "库存数量", prop: "qty" },
{ label: "计量单位", prop: "uom" },
{ label: "批次", prop: 'lot' },
{ label: "库位代码", prop: "locationCode" },
{ label: "库存状态", prop: "status",type: "filter", filters: "inventoryStage" },
{ label: "箱码", prop: 'packingCode' },
{ label: "ERP储位", prop: "locationErpCode" },
{ label: "是否可用", prop: "isActive", type: "filter", filters: "whetherOrNot" },
{ label: "创建时间", prop: "creationTime",type: "dateTime" },
{ label: "生产日期", prop: "produceDate" ,type: "dateTime" },
{ label: "入库时间", prop: "putInTime", type: "dateTime" },
{ label: "过期日期", prop: "expireDate" ,type: "dateTime" },
{ label: "上次修改时间", prop: "lastModificationTime",type: "dateTime" },
{ label: "最后盘点时间", prop: "lastCountTime", type: "dateTime" },
{ label: "最后盘点计划单号", prop: "lastCountPlanNumber" },
{ label: "最后盘点标签号", prop: "lastCountLabel" },
{ label: "物品描述", prop: "itemDesc1" },
{ label: "物品描述2", prop: "itemDesc2" },
{ label: "标包数量", prop: 'stdPackQty' },
{ label: "供应商批次", prop: 'supplierBatch' },
{ label: "事务ID", prop: "tenantId" },
{ label: "序号", prop: "serialNumber" },
{ label: "备注", prop: 'remark' },
{ label: "创建者ID", prop: "creatorId" },
{ label: "上次修改者ID", prop: "lastModifierId" },
{ label: "最后事务编号", prop: "lastTransNumber" },
{ label: "最后事务类型", prop: "lastTransType", type: "filter", filters: "TransTypeBase" },
{ label: "库区", prop: "locationArea" },
{ label: "库位组", prop: "locationGroup" },
{ label: "管理类型", prop: "manageType", type: "filter", filters: "manageType" },
{ label: "到货时间", prop: "arriveDate",type:"dateTime" },
{ label: "仓库代码", prop: "warehouseCode" },
// ************** 确认隐藏 ************************
// { label: "ID", prop: 'id' },
// ************** 确认隐藏 ************************
]
// 库存事务 20230410 // 库存事务 20230410
export const InventoryTransaction = [ export const InventoryTransaction = [
{ label: "事务编号", prop: "transNumber" }, { label: "事务编号", prop: "transNumber" },

43
fe/PC/src/views/inventoryManage/InventoryQuery/InventoryBalance.vue

@ -1,5 +1,6 @@
<template> <template>
<div class="page-box" v-loading="Loading.appMainLoading"> <div class="page-box" v-loading="Loading.appMainLoading">
<!-- 无批量启用的库存余额页面 -->
<tablePagination <tablePagination
:currenButtonData="currenButtonData" :currenButtonData="currenButtonData"
:tableData="tableData" :tableData="tableData"
@ -9,7 +10,7 @@
:totalCount="totalCount" :totalCount="totalCount"
:multipleSelection="multipleSelection" :multipleSelection="multipleSelection"
:MaxResultCount="PageListParams.MaxResultCount" :MaxResultCount="PageListParams.MaxResultCount"
@topbutton="topbuttonHandle" @topbutton="topbutton"
@inlineDialog="inlineDialog" @inlineDialog="inlineDialog"
@sortChange="sortChange" @sortChange="sortChange"
@alertoldSkipCount="alertoldSkipCount" @alertoldSkipCount="alertoldSkipCount"
@ -22,7 +23,6 @@
:primarySearchOption="primarySearchOption" :primarySearchOption="primarySearchOption"
@overallSearchFormClick="overallSearchFormClick" @overallSearchFormClick="overallSearchFormClick"
:httpOverallSearchData="httpOverallSearchData" :httpOverallSearchData="httpOverallSearchData"
:tableSelection="true"
> >
</tablePagination> </tablePagination>
<!-- 新增与编辑 --> <!-- 新增与编辑 -->
@ -107,14 +107,6 @@ export default {
currenButtonData: [ currenButtonData: [
this.defaultImportBtn(),// this.defaultImportBtn(),//
this.defaultExportBtn(),// this.defaultExportBtn(),//
{
type: "success",
icon: "el-icon-check",
label: "批量启用",
name: "batch-active",
size: "mini",
background:"#31bb99"
},
this.defaultFieldSettingBtn(),// this.defaultFieldSettingBtn(),//
this.defaultFreshBtn(),// this.defaultFreshBtn(),//
this.defaultFilterBtn(),// this.defaultFilterBtn(),//
@ -207,37 +199,6 @@ export default {
}); });
} }
}, },
topbuttonHandle(val,item){
//
if(val == 'batch-active'){
if(!this.multipleSelection || this.multipleSelection.length <= 0){
this.$warningMsg('请选择数据')
return
}
this.$confirm('此操作将启用已选 ('+this.multipleSelection.length+'条) 数据, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.Loading.tableLoading = true
let _ajaxs = []
this.multipleSelection.forEach(item=>{
_ajaxs.push(inventoryBalanceActive({id: item.id}))
})
Promise.all(_ajaxs).then((allData) => {
this.$successMsg('启用成功!')
this.Loading.tableLoading = false
this.paging()
}).catch((err)=>{
this.Loading.tableLoading = false
})
}).catch((err) => {
console.log(err)
});
}else{
this.topbutton(val,item)
}
},
// 0 // 0
// drawerHandle(val) { // drawerHandle(val) {
// if (val == 'delete') { // if (val == 'delete') {

290
fe/PC/src/views/inventoryManage/InventoryQuery/InventoryBalanceEdit.vue

@ -0,0 +1,290 @@
<template>
<div class="page-box" v-loading="Loading.appMainLoading">
<!-- 有批量启用的库存余额(/)页面 -->
<tablePagination
:currenButtonData="currenButtonData"
:tableData="tableData"
:tableLoading="Loading.tableLoading"
:tableColumns="tableColumns"
@rowDrop="rowDrop"
:totalCount="totalCount"
:multipleSelection="multipleSelection"
:MaxResultCount="PageListParams.MaxResultCount"
@topbutton="topbuttonHandle"
@inlineDialog="inlineDialog"
@sortChange="sortChange"
@alertoldSkipCount="alertoldSkipCount"
@alterResultCount="alterResultCount"
@handleSelectionChange="handleSelectionChange"
:currentPageProps="oldSkipCount"
:quicklySearchOption="quicklySearchOption"
@quicklySearchClick="quicklySearchClick"
@quicklySearchClear="quicklySearchClear"
:primarySearchOption="primarySearchOption"
@overallSearchFormClick="overallSearchFormClick"
:httpOverallSearchData="httpOverallSearchData"
:tableSelection="true"
>
</tablePagination>
<!-- 新增与编辑 -->
<!-- <newAndEdiDialog
:loading="Loading.newAndEdiLoading"
:active="active"
:pageStatus="pageStatus"
:formReveal="formReveal"
:formTitle="formTitle"
:displayDialog="editDialog"
:FormData="editFormData"
:Form="editForm"
:Options="editOptions"
:Handle="editHandle"
:Rules="editRules"
@FormSubmit="FormClick(arguments)"
@close="FormClose"
@goBack="goBack"
></newAndEdiDialog> -->
<!-- 新导入 disabledMethod 导入方式禁用 disabledIsAllowPartImport 是否局部导入禁用-->
<!-- methodValue 导入方式默认选项 是否局部导入 默认选项 -->
<importFile
:loading="Loading.importLoading"
:show="displayDialog.importDialog"
:URL="URL"
:disabledMethod = {method1:false,method2:false,method3:false}
:disabledIsAllowPartImport = {isAllowPartImport1:false,isAllowPartImport2:false}
isAllowPartImportValue="1"
@importClick="postImportMergeClick(arguments)"
@postImportDown="importDown"
></importFile>
<curren-Drawer
:title="tableColumns"
:DrawerLoading="Loading.DrawerLoading"
:drawer="displayDialog.detailsDialog"
:Butttondata="DrawerButtonData"
:propsData="propsData"
:tabsDesTions="tabsDesTions"
@drawerShut="(val) => (displayDialog.detailsDialog = val)"
@drawerbutton="drawerbutton"
@handleCommand="drawerHandle"
@close-value="closeValue"
></curren-Drawer>
</div>
</template>
<script>
import { updateExpireDate, postDelete ,getDetailed,inventoryBalanceActive } from "@/api/wms-api"
import { tableMixins } from "@/mixins/TableMixins"
import { LoadingMixins } from "@/mixins/LoadingMixins"
import { drawerMixins } from "@/mixins/drawerMixins"
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins"
import { newAndEdiDialogMixins } from "@/mixins/newAndEdiDialogMixins"
import { mixins } from "@/mixins/mixins"
export default {
name: "InventoryBalanceActive",
mixins: [
tableMixins,
LoadingMixins,
drawerMixins,
TableHeaderMixins,
mixins,
newAndEdiDialogMixins
],
computed: {
editDialog: {
get: function () {
return this.displayDialog.newDialog || this.displayDialog.editDialog;
},
},
//
hideButton: function () {
return function () {
return this.propsData.isActive
}
},
},
data () {
return {
showTableBaseFromFE:['configuration'],
URL: 'wms/inventory/inventory-balance',
//
currenButtonData: [
this.defaultImportBtn(),//
this.defaultExportBtn(),//
{
type: "success",
icon: "el-icon-check",
label: "批量启用",
name: "batch-active",
size: "mini",
background:"#31bb99"
},
this.defaultFieldSettingBtn(),//
this.defaultFreshBtn(),//
this.defaultFilterBtn(),//
],
DrawerButtonData: [
{
type: 'success',
icon: 'el-icon-check',
label: '启用',
hide: () => { return this.hideButton() },
name: "active",
size: 'mini'
},
],
//
// editFormData: {
// id: null,
// itemCode: null,
// itemName: null,
// itemDesc1: null,
// itemDesc2: null,
// produceDate: null,
// expireDate: null,
// locationCode: null,
// status: 1,
// lot: true,
// packingCode: true,
// containerCode: null,
// qty: null,
// locationArea: null,
// locationGroup: null,
// locationErpCode: null,
// putInTime: null,
// },
// editOptions: {},
// CreateForm: [
// { type: "input", label: "", prop: 'packingCode', colSpan: 12 },
// { type: "input", label: "", prop: 'sortingBase', colSpan: 12 },
// { type: "input", label: "", prop: 'serialNumber', colSpan: 12 },
// { type: "input", label: "", prop: 'lastCountPlanNumber', colSpan: 12 },
// { type: "input", label: "", prop: 'lastCountLabel', colSpan: 12 },
// { type: "input", label: "", prop: 'itemCode', colSpan: 12 },
// { type: "input", label: "", prop: 'batchCode', colSpan: 12 },
// { type: "input", label: "", prop: 'remark', colSpan: 12 },
// ],
// editForm: [
// { type: "input", label: "", prop: "itemCode", disabled:true, colSpan: 12 },
// { type: "input", label: "", prop: "itemName", disabled:true, colSpan: 12 },
// { type: "input", label: "", prop: "locationCode", disabled:true, colSpan: 12 },
// { type: "input", label: "", prop: "lot", disabled:true, colSpan: 12 },
// { type: "input", label: "", prop: "packingCode", disabled:true, colSpan: 12 },
// { type: "input", label: "", prop: "locationArea", disabled:true, colSpan: 12 },
// { type: "input", label: "", prop: "locationGroup", disabled:true, colSpan: 12 },
// { type: "dateTime", label: "", prop: "putInTime", disabled:true, colSpan: 12 },
// { type: "dateTime", label: "", prop: "produceDate", disabled:true, colSpan: 12 },
// { type: "dateTime", label: "", prop: "expireDate", colSpan: 12 },
// ],
// editRules: {
// expireDate: [{ required: true, trigger: "blur", message: "" }],
// },
};
},
mounted () {
this.paging();
},
methods: {
drawerbutton(val){
//
if(val == "active"){
this.$confirm('此操作将启用该数据, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.Loading.appMainLoading = true
inventoryBalanceActive({id: this.propsData.id}).then(res => {
this.$successMsg('启用成功!')
this.Loading.appMainLoading = false
this.displayDialog.detailsDialog = false
this.paging()
// getDetailed(this.propsData.id, this.URL).then(res => {
// this.propsData = res
// this.Loading.DrawerLoading = false
// })
}).catch(err => {
this.Loading.appMainLoading = false
})
}).catch((err) => {
console.log(err)
});
}
},
topbuttonHandle(val,item){
//
if(val == 'batch-active'){
if(!this.multipleSelection || this.multipleSelection.length <= 0){
this.$warningMsg('请选择数据')
return
}
this.$confirm('此操作将启用已选 ('+this.multipleSelection.length+'条) 数据, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.Loading.tableLoading = true
let _ajaxs = []
this.multipleSelection.forEach(item=>{
_ajaxs.push(inventoryBalanceActive({id: item.id}))
})
Promise.all(_ajaxs).then((allData) => {
this.$successMsg('启用成功!')
this.Loading.tableLoading = false
this.paging()
}).catch((err)=>{
this.Loading.tableLoading = false
})
}).catch((err) => {
console.log(err)
});
}else{
this.topbutton(val,item)
}
},
// 0
// drawerHandle(val) {
// if (val == 'delete') {
// if (this.propsData.qty == '0') {
// this.$confirm(', ?', '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
// this.Loading.appMainLoading = true
// this.displayDialog.detailsDialog = false
// postDelete(this.propsData.id, this.URL).then(res => {
// this.$successMsg('!')
// this.Loading.appMainLoading = false
// this.paging()
// }).catch(err => {
// this.Loading.appMainLoading = false
// })
// }).catch(() => {
// });
// } else {
// this.$message({
// message: " 0 ",
// type: "warning",
// });
// }
// }
// },
//()
// FormClick (val) {
// let params = {
// id: this.editFormData.id,
// expireDate: this.editFormData.expireDate
// }
// updateExpireDate(params, this.URL).then( res => {
// this.displayDialog.editDialog = false
// this.$message.success("");
// this.paging();
// }).catch( err => {
// this.$message.success("");
// console.log(err)
// })
// }
},
};
</script>
<style lang="scss" scoped>
@import "../../../styles/basicData.scss";
</style>
Loading…
Cancel
Save