Browse Source

【agv-pc】成品发运汇总切换视图功能

dev_pc_agv
安虹睿 4 months ago
parent
commit
944ec0fac8
  1. 8
      fe/PC/src/api/wms-api.js
  2. 16
      fe/PC/src/components/tablePagination/index.vue
  3. 11
      fe/PC/src/components/umyTable/index.vue
  4. 139
      fe/PC/src/views/finishedProductManage/deliver/FISDeliverRequest.vue
  5. 548
      fe/PC/src/views/finishedProductManage/deliver/FISDeliverRequest_unfold.vue

8
fe/PC/src/api/wms-api.js

@ -826,6 +826,14 @@ export function getGPYInfo(data) {
}) })
} }
// 成品发运-汇总
export function getDeliverRequestFisByContainer() {
return request({
url: baseURL + 'wms/store/deliver-request-fis/get-list-by-container',
method: 'post',
})
}
// 客户退拆任务-完成 todo // 客户退拆任务-完成 todo
// export async function productionRecycleJobComplete(id) { // export async function productionRecycleJobComplete(id) {
// return request({ // return request({

16
fe/PC/src/components/tablePagination/index.vue

@ -55,6 +55,7 @@
:cellStyle = "cellStyle" :cellStyle = "cellStyle"
:showOverflowTooltip="showOverflowTooltip" :showOverflowTooltip="showOverflowTooltip"
:tableRowClassName="tableRowClassName" :tableRowClassName="tableRowClassName"
:selectionIsFixed="selectionIsFixed"
> >
<!-- 最前方table插槽 --> <!-- 最前方table插槽 -->
<template v-slot:beforeTableColumn> <template v-slot:beforeTableColumn>
@ -67,6 +68,7 @@
</div> </div>
<!-- 页码 --> <!-- 页码 -->
<pagination <pagination
v-if="showPager"
:totalCount="totalCount" :totalCount="totalCount"
:pagesizeProps="MaxResultCount" :pagesizeProps="MaxResultCount"
:currentPageProps="currentPageProps" :currentPageProps="currentPageProps"
@ -90,6 +92,16 @@ export default {
rowDrop rowDrop
}, },
props: { props: {
//
showPager:{
type: Boolean,
default: true,
},
//
selectionIsFixed:{
type: Boolean,
default: true,
},
// app-main100% // app-main100%
setUTableHeight: { setUTableHeight: {
type: Number, type: Number,
@ -260,11 +272,13 @@ export default {
this.closeRowDrop() this.closeRowDrop()
} }
}) })
// //
if(this.primarySearchOption && this.primarySearchOption.length > 0){this.headerFilterClick()} if(this.primarySearchOption && this.primarySearchOption.length > 0){this.headerFilterClick()}
}, },
methods: { methods: {
getUMyTable(){
return this.$refs.tablePaginationTableRef.getUMyTable()
},
// //
clearSelection(){ clearSelection(){
this.$refs.tablePaginationTableRef.clearSelection(); this.$refs.tablePaginationTableRef.clearSelection();

11
fe/PC/src/components/umyTable/index.vue

@ -20,11 +20,12 @@
use-virtual use-virtual
:cell-class-name="cellClassName" :cell-class-name="cellClassName"
@expand-change="handleExpandChange" @expand-change="handleExpandChange"
:reserve-selection="true"
> >
<!-- 最前端列插槽 --> <!-- 最前端列插槽 -->
<slot name="beforeTableColumn"></slot> <slot name="beforeTableColumn"></slot>
<!-- :tree-props="treeProps" height 不能共存 此组件暂不支持tree的格式--> <!-- :tree-props="treeProps" height 不能共存 此组件暂不支持tree的格式-->
<u-table-column v-if="selectionTable" fixed="left" type="selection" :reserve-selection="true" :selectable='selectEnable'/> <u-table-column v-if="selectionTable" :fixed="selectionIsFixed" type="selection" :reserve-selection="true" :selectable='selectEnable'/>
<u-table-column v-if="isShowIndex" type="index" fixed="left" label="序号" width="50" /> <u-table-column v-if="isShowIndex" type="index" fixed="left" label="序号" width="50" />
<template v-for="(item, index) in TableSize"> <template v-for="(item, index) in TableSize">
<u-table-column <u-table-column
@ -417,6 +418,11 @@ export default {
}, },
}, },
props: { props: {
//
selectionIsFixed:{
type: Boolean,
default: true,
},
// //
showOverflowTooltip:{ showOverflowTooltip:{
type: Boolean, type: Boolean,
@ -587,6 +593,9 @@ export default {
this.setTableHeightHandle() this.setTableHeightHandle()
}, },
methods: { methods: {
getUMyTable(){
return this.$refs.multipleTable
},
// //
handleExpandChange(row, expandedRows) { handleExpandChange(row, expandedRows) {
if (expandedRows.length) { if (expandedRows.length) {

139
fe/PC/src/views/finishedProductManage/deliver/FISDeliverRequest.vue

@ -1,6 +1,7 @@
<template> <template>
<div class="page-box" v-loading="Loading.appMainLoading"> <div class="page-box FISDeliverRequestPage" v-loading="Loading.appMainLoading">
<tablePagination <tablePagination
v-if="!isUnfoldMode"
ref="FISDeliverRequestTable_Ref" ref="FISDeliverRequestTable_Ref"
:currenButtonData="currenButtonData" :currenButtonData="currenButtonData"
:tableData="tableData" :tableData="tableData"
@ -24,50 +25,7 @@
@overallSearchFormClick="(options)=>{overallSearchFormClick(options,overallSearchFormCallback)}" @overallSearchFormClick="(options)=>{overallSearchFormClick(options,overallSearchFormCallback)}"
:httpOverallSearchData="httpOverallSearchData" :httpOverallSearchData="httpOverallSearchData"
:tableSelection="true" :tableSelection="true"
> ></tablePagination>
<!-- <template v-slot:beforeTableColumn>
<u-table-column type="expand" fixed="left">
<template slot-scope="props">
<el-table
max-height="250"
:data="tableData2"
:border="true"
>
<el-table-column
prop="code"
label="ERP料号"
width="180">
</el-table-column>
<el-table-column
prop="date"
label="日期"
width="230">
</el-table-column>
<el-table-column
prop="qty"
width="260"
label="数量">
</el-table-column>
<el-table-column
prop="number"
width="260"
label="底盘号">
</el-table-column>
<el-table-column
prop="chkw"
width="260"
label="出货库位">
</el-table-column>
<el-table-column
prop="chkw2"
width="260"
label="出货ERP储位">
</el-table-column>
</el-table>
</template>
</u-table-column>
</template> -->
</tablePagination>
<!--抽屉--> <!--抽屉-->
<curren-Drawer <curren-Drawer
:title="tableColumns" :title="tableColumns"
@ -124,6 +82,13 @@
<el-button type="primary" @click="creatDeliverTipSure()"> </el-button> <el-button type="primary" @click="creatDeliverTipSure()"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 汇总模式 -->
<div class="unfoldModePageOuter" v-if="isUnfoldMode">
<unfoldModePage
ref="unfoldModePage"
@closeUnfoldMode="closeUnfoldMode"
></unfoldModePage>
</div>
</div> </div>
</template> </template>
<script> <script>
@ -142,8 +107,11 @@ import { TableHeaderMixins } from "@/mixins/TableHeaderMixins"
import { mixins } from "@/mixins/mixins" import { mixins } from "@/mixins/mixins"
import { requestData } from "@/utils/processButtonData" import { requestData } from "@/utils/processButtonData"
import { initPrintAllData } from '@/mixins/printMixin' import { initPrintAllData } from '@/mixins/printMixin'
import unfoldModePage from "@/views/finishedProductManage/deliver/FISDeliverRequest_unfold"; //
export default { export default {
name: "FISDeliverRequest", name: "FISDeliverRequest_unfold",
components:{ unfoldModePage },
mixins: [ mixins: [
tableMixins, tableMixins,
LoadingMixins, LoadingMixins,
@ -173,40 +141,16 @@ export default {
}, },
data () { data () {
return { return {
tableData2: [{
code:'CA130D0A012AA',
date: '2016-05-02',
qty: '20',
number: '111',
chkw:'WIP',
chkw2:'WIP'
},{
code:'CA130D0A013AA',
date: '2016-05-02',
qty: '5',
number: '222',
chkw:'WIP',
chkw2:'WIP'
},{
code:'CA130D0A013AA',
date: '2016-05-02',
qty: '15',
number: '333',
chkw:'WIP',
chkw2:'WIP'
},{
code:'CA130D0A013AA',
date: '2016-05-02',
qty: '12',
number: '444',
chkw:'WIP',
chkw2:'WIP'
},],
URL: 'wms/store/deliver-request-fis', URL: 'wms/store/deliver-request-fis',
pagingShowDetail:true, pagingShowDetail:true,
importUploadURL:'wms/store/deliver-request/import', importUploadURL:'wms/store/deliver-request/import',
// //
currenButtonData: [ currenButtonData: [
{
label: "切换汇总模式",
name: "toUnfold",
size: "mini",
},
this.defaultImportBtn(),// this.defaultImportBtn(),//
{ {
type: "success", type: "success",
@ -268,7 +212,8 @@ export default {
}, },
creatDeliverRules:{ creatDeliverRules:{
truckNumber: [{ required: true, trigger: "blur", message: "不可为空" }] truckNumber: [{ required: true, trigger: "blur", message: "不可为空" }]
} },
isUnfoldMode:false,//
}; };
}, },
mounted () { mounted () {
@ -280,12 +225,17 @@ export default {
this.showFilterSta_fis = false this.showFilterSta_fis = false
}, },
// fis // fis
fasterSearchHandle(type){ fasterSearchHandle(type,requestStatus){
this.PageListParams.condition.filters = [{ this.PageListParams.condition.filters = [{
logic: "And", logic: "And",
column: "deliverRequestType", column: "deliverRequestType",
action: "==", action: "==",
value: String(type) value: String(type)
},{
logic: "And",
column: "requestStatus",
action: "!=",
value: String(requestStatus)
}] }]
this.paging() this.paging()
this.httpOverallSearchData = null this.httpOverallSearchData = null
@ -321,18 +271,36 @@ export default {
else if(val == 'normalSta'){ else if(val == 'normalSta'){
this.showFilterSta_normal = true this.showFilterSta_normal = true
this.showFilterSta_fis = false this.showFilterSta_fis = false
this.fasterSearchHandle('1') this.fasterSearchHandle('1','6')
} }
// fis // fis
else if(val == 'FISSta'){ else if(val == 'FISSta'){
this.showFilterSta_fis = true this.showFilterSta_fis = true
this.showFilterSta_normal = false this.showFilterSta_normal = false
this.fasterSearchHandle('2') this.fasterSearchHandle('2','6')
} }
// //
else if(val == 'normalSta-reset' || val == 'FISSta-reset'){ else if(val == 'normalSta-reset' || val == 'FISSta-reset'){
this.resetSearchHandle() this.resetSearchHandle()
} }
//
else if(val == 'toUnfold'){
if(this.multipleSelection && this.multipleSelection.length > 0){
this.$confirm('切换模式后,已选数据将清空,是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$refs.FISDeliverRequestTable_Ref.clearSelection()
this.isUnfoldMode = true
}).catch(() => {
});
}else{
this.$refs.FISDeliverRequestTable_Ref.clearSelection()
this.isUnfoldMode = true
}
}
else{ else{
this.topbutton(val,item) this.topbutton(val,item)
} }
@ -459,6 +427,7 @@ export default {
this.creatDeliverTipSure() this.creatDeliverTipSure()
} }
}).catch(err => { }).catch(err => {
this.Loading.appMainLoading = false
}) })
} else { } else {
console.log('error submit!!'); console.log('error submit!!');
@ -482,6 +451,10 @@ export default {
}).catch(err => { }).catch(err => {
this.Loading.appMainLoading = false this.Loading.appMainLoading = false
}) })
},
closeUnfoldMode(){
this.isUnfoldMode = false
this.resetSearchHandle()
} }
} }
} }
@ -494,4 +467,12 @@ export default {
// ::v-deep .el-table__fixed{ // ::v-deep .el-table__fixed{
// height:100% !important // height:100% !important
// } // }
.unfoldModePageOuter{
position: absolute;
left:0;
top:0;
right:0;
bottom:0;
background:#fff
}
</style> </style>

548
fe/PC/src/views/finishedProductManage/deliver/FISDeliverRequest_unfold.vue

@ -0,0 +1,548 @@
<template>
<div class="page-box" v-loading="Loading.appMainLoading">
<tablePagination
ref="FISDeliverRequestTable_unfoldRef"
: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="(options)=>{overallSearchFormClick(options,overallSearchFormCallback)}"
:httpOverallSearchData="httpOverallSearchData"
:tableSelection="true"
:selectionIsFixed="false"
:showPager="false"
:setUTableHeight="120"
>
<template v-slot:beforeTableColumn>
<u-table-column type="expand">
<template slot-scope="props">
<u-table
max-height="280"
:data="props.row.requestDetailDtos"
:border="true"
row-key="id"
>
<u-table-column
v-for="(item, index) in detailTableColumns"
:prop="item.prop"
:label="item.label">
</u-table-column>
</u-table>
</template>
</u-table-column>
</template>
</tablePagination>
<!--抽屉-->
<curren-Drawer
:title="tableColumns"
:DrawerLoading="Loading.DrawerLoading"
:drawer="displayDialog.detailsDialog"
:propsData="propsData"
:tabsDesTions="tabsDesTions"
:Butttondata="DrawerButtonData"
@drawerShut="(val) => (displayDialog.detailsDialog = val)"
@drawerbutton="drawerbuttonHandle"
@handleCommand="drawerHandle"
@close-value="closeValue"
:tableColumns="detailsTableColumns"
:totalCount="totalCountDetails"
:MaxResultCount="MaxResultCountDetails"
@alterResultCountDetails="alterResultCountDetails"
@alertoldSkipCountDetails="alertoldSkipCountDetails"
></curren-Drawer>
<!-- 新导入 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('wms/store/deliver-request')"
></importFile>
<!-- 批量生成发货单弹窗 -->
<el-dialog
title="批量生成发货单"
:visible="creatDeliverShow"
:append-to-body="true"
>
<el-form :model="creatDeliverForm" :rules="creatDeliverRules" ref="creatDeliverRef">
<el-form-item label="车牌号" prop="truckNumber">
<el-input v-model="creatDeliverForm.truckNumber"></el-input>
</el-form-item>
</el-form>
<div slot="footer">
<el-button @click="creatDeliverClose()"> </el-button>
<el-button type="primary" @click="creatDeliverSure()"> </el-button>
</div>
</el-dialog>
<!-- 批量生成发货单提示-弹窗 -->
<el-dialog
:visible="creatDeliverTipShow"
:append-to-body="true"
>
<div v-html="creatDeliverTipper"></div>
<div slot="footer">
<el-button type="primary" @click="creatDeliverTipSure()"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
processRequest,
getDetailed,
getPageListWip,
deliverRequestHandleList,
deliverRequestHandleTip,
deliverRequestDelete,
getDeliverRequestFisByContainer
} 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 { mixins } from "@/mixins/mixins"
import { requestData } from "@/utils/processButtonData"
import { initPrintAllData } from '@/mixins/printMixin'
export default {
name: "FISDeliverRequest_unfold",
mixins: [
tableMixins,
LoadingMixins,
drawerMixins,
TableHeaderMixins,
mixins,
],
computed: {
// ()
hideButton_normalSta: function () {
return function (val) {
return this.showFilterSta_normal == val
}
},
// (FIS)
hideButton_FISSta: function () {
return function (val) {
return this.showFilterSta_fis == val
}
},
//
hideDelButton: function () {
return function () {
return this.propsData.deliverRequestType != 1
}
},
},
data () {
return {
URL: 'wms/store/deliver-request-fis/get-list-by-container',
pagingShowDetail:true,
importUploadURL:'wms/store/deliver-request/import',
//
currenButtonData: [
{
label: "返回普通模式",
name: "toNormal",
size: "mini",
},
// this.defaultImportBtn(),//
{
type: "success",
icon: "el-icon-d-arrow-right",
label: "批量生成发货单",
name: "creatDeliver",
size: "mini",
},
{
label: "全部折叠",
name: "toggleAllExpansion",
size: "mini",
type: "primary",
},
// {
// type: "primary",
// label: "[]",
// name: "normalSta",
// size: "mini",
// hide: () => { return this.hideButton_normalSta(true) },
// },
// {
// type: "danger",
// label: "[]",
// name: "normalSta-reset",
// size: "mini",
// hide: () => { return this.hideButton_normalSta(false) },
// },
// {
// type: "warning",
// label: "[FIS]",
// name: "FISSta",
// size: "mini",
// hide: () => { return this.hideButton_FISSta(true) },
// },
// {
// type: "danger",
// label: "[FIS]",
// name: "normalSta-reset",
// size: "mini",
// hide: () => { return this.hideButton_FISSta(false) },
// },
this.defaultFieldSettingBtn(),//
this.defaultFreshBtn(),//
// this.defaultFilterBtn(),//
],
tableColumns:[
{ label: "器具编号", prop: 'mesDeliveryContainer'},
{ label: "最大时间", prop: "maxDateTime", type: "dateTime" },
{ label: "最小时间", prop: 'minDateTime', type: "dateTime"},
{ label: "客户代码", prop: 'customerCode'},
{ label: "客户名称", prop: 'customerName'},
{ label: "客户简称", prop: 'customerShortName'},
{ label: "客户地址", prop: 'customerAddress'},
{ label: "创建时间", prop: "creationTime",type: "dateTime"},
],
//
detailTableColumns:[
{ label: "ERP料号", prop: 'itemCode' },
{ label: "料号描述", prop: 'itemDesc1' },
{ label: "底盘号", prop: 'identityNo' },
{ label: "Mes发货计划号", prop: 'mesDeliveryPlan' },
{ label: "Mes器具号", prop: 'mesDeliveryContainer' },
{ label: "数量", prop: 'qty' },
{ label: "单位", prop: 'uom' },
{ label: "标包数量", prop: 'stdPackQty' },
],
DrawerButtonData: [
{
type: "danger",
label: "删除",
name: "delete",
size: "mini",
hide: () => { return this.hideDelButton() },
},
// ...requestData(this)
],
showFilterSta_normal:false,//
showFilterSta_fis:false,//fis
//
creatDeliverShow:false,
creatDeliverTipShow:false,
creatDeliverTipper:"",
creatDeliverForm:{
truckNumber:""
},
creatDeliverRules:{
truckNumber: [{ required: true, trigger: "blur", message: "不可为空" }]
},
// masterID
selectedDetailsArr:[]
};
},
mounted () {
this.paging(()=>{
this.$nextTick(()=>{
this.$refs.FISDeliverRequestTable_unfoldRef.clearSelection()
})
});
},
methods:{
paging(callback) {
this.initPagingHeaderBtn()
this.Loading.tableLoading = true;
getDeliverRequestFisByContainer().then(res => {
res.forEach((item,key)=>{ item.id = key + 1 })
this.tableData = res
this.totalCount = res.length
this.pagingCallback(callback)
}).catch(err => {
this.Loading.tableLoading = false
})
// this.PageListParams.SkipCount = (this.oldSkipCount - 1) * this.PageListParams.MaxResultCount,
// getPageList(this.PageListParams, this.URL,this.pagingShowDetail,this.listURL).then(res => {
// this.tableData = res.items
// this.totalCount = res.totalCount
// this.pagingCallback(callback)
// }).catch(err => {
// this.Loading.tableLoading = false
// })
},
overallSearchFormCallback(){
this.showFilterSta_normal = false
this.showFilterSta_fis = false
},
// fis
fasterSearchHandle(type){
this.PageListParams.condition.filters = [{
logic: "And",
column: "deliverRequestType",
action: "==",
value: String(type)
}]
this.paging()
this.httpOverallSearchData = null
},
// fis
resetSearchHandle(){
this.showFilterSta_normal = false
this.showFilterSta_fis = false
this.PageListParams.condition.filters = []
this.paging()
this.httpOverallSearchData = null
},
topbuttonHandle(val,item){
//
if(val == "creatDeliver"){
if(!this.multipleSelection || this.multipleSelection.length <= 0){
this.$warningMsg("至少选择一条数据")
return
}
let _hasNoSame = 0
for(let i = 0;i<this.multipleSelection.length;i++){
if(this.multipleSelection[i].customerCode != this.multipleSelection[0].customerCode){
_hasNoSame ++
}
}
if(_hasNoSame != 0){
this.$errorMsg("所选数据的客户代码必须一致!")
return
}
this.creatDeliverShow = true
}
//
else if(val == 'normalSta'){
this.showFilterSta_normal = true
this.showFilterSta_fis = false
this.fasterSearchHandle('1')
}
// fis
else if(val == 'FISSta'){
this.showFilterSta_fis = true
this.showFilterSta_normal = false
this.fasterSearchHandle('2')
}
//
else if(val == 'normalSta-reset' || val == 'FISSta-reset'){
this.resetSearchHandle()
}
//
else if(val == 'toNormal'){
if(this.multipleSelection && this.multipleSelection.length > 0){
this.$confirm('切换模式后,已选数据将清空,是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$refs.FISDeliverRequestTable_unfoldRef.clearSelection()
this.$emit("closeUnfoldMode")
}).catch(() => {
});
}else{
this.$refs.FISDeliverRequestTable_unfoldRef.clearSelection()
this.$emit("closeUnfoldMode")
}
}
//
else if(val == 'toggleAllExpansion'){
this.toggleAllExpansion()
}
else{
this.topbutton(val,item)
}
},
printHandle(){
this.Loading.appMainLoading = true
let param = {
maxResultCount: 1000,
condition: {
filters: [{
logic: "And",
column: "deliverRequestNumber",
action: "==",
value: this.propsData.number
}]
},
sorting: "",
skipCount: 0
}
//
this.Loading.appMainLoading = true
getPageListWip(param, 'wms/store/deliver-note/list-for-fis',true)
.then(async res => {
let _option = {
details:{
packingCode:"toPackingCode",
}
}
let data = await initPrintAllData(res.items[0],'chdmxb.rdlx',false,_option);
this.Print(data)
this.Loading.appMainLoading = false
})
.catch(err=>{
console.log(err)
})
},
drawerbuttonHandle(val){
//
// if (val == 'agreeRequest') {
// this.Loading.appMainLoading = true
// processRequest(this.propsData.id, this.URL + '/agree/').then(res => {
// getDetailed(this.propsData.id, this.URL).then(res => {
// this.propsData = res
// })
// this.paging()
// this.$confirm('', '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
// //
// this.printHandle()
// }).catch(() => {
// });
// this.Loading.appMainLoading = false
// }).catch(err => {
// this.Loading.appMainLoading = false
// })
// }
if(val == 'delete'){
this.$confirm('您确定删除吗, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.Loading.appMainLoading = true;
deliverRequestDelete(this.propsData.id)
.then(res=>{
this.$successMsg("删除成功!")
this.paging()
this.displayDialog.detailsDialog = false
this.Loading.appMainLoading = false;
}).catch(() => {
this.Loading.appMainLoading = false;
});
}).catch(() => {
});
}
else{
this.drawerbutton(val)
}
},
// -
creatDeliverClose(){
this.creatDeliverForm.truckNumber = ""
this.creatDeliverShow = false
},
// -
creatDeliverSure(){
this.$refs.creatDeliverRef.validate((valid) => {
if (valid) {
this.Loading.appMainLoading = true
//
let _allDetails = []
this.multipleSelection.forEach(item=>{
item.requestDetailDtos.forEach(dItem=>{
dItem.customerCode = item.customerCode
})
_allDetails=[...item.requestDetailDtos,..._allDetails]
})
// masterID
let _masters = []
this.selectedDetailsArr = []
_allDetails.forEach(item=>{
if(!(_masters.includes(item.masterID))){
_masters.push(item.masterID)
this.selectedDetailsArr.push(item)
}
})
//
let _details = {}
this.selectedDetailsArr.forEach(deItem=>{
let _name = deItem.customerCode + '_' + deItem.itemCode
if(!_details[_name])_details[_name] = deItem
})
//
let _dtos = []
for(let i in _details){
let _item = {
customerCode:_details[i].customerCode,
itemCode:_details[i].itemCode
}
_dtos.push(_item)
}
deliverRequestHandleTip(_dtos)
.then(res => {
this.Loading.appMainLoading = false
//
if(res && res.length > 0){
this.creatDeliverTipper = res
this.creatDeliverTipShow = true
}
//
else{
this.creatDeliverTipSure()
}
}).catch(err => {
this.Loading.appMainLoading = false
})
} else {
console.log('error submit!!');
return false;
}
});
},
creatDeliverTipSure(){
this.Loading.appMainLoading = true
let _params = {truckNumber:String(this.creatDeliverForm.truckNumber)}
let _ids = []
this.selectedDetailsArr.forEach(select=>{ _ids.push(select.masterID) })
this.creatDeliverClose()
this.creatDeliverTipShow = false
deliverRequestHandleList(_ids,_params)
.then(res => {
this.Loading.appMainLoading = false
this.$refs.FISDeliverRequestTable_unfoldRef.clearSelection()
this.paging()
this.$successMsg('操作成功!')
}).catch(err => {
this.Loading.appMainLoading = false
})
},
//
toggleAllExpansion() {
this.tableData.forEach(row => {
this.$refs.FISDeliverRequestTable_unfoldRef.getUMyTable().toggleRowExpansion(row, false);
});
},
}
}
</script>
<style lang="scss" scoped>
@import "../../../styles/mainbasicData.scss";
::v-deep .el-table__expanded-cell{
padding:20px 20px 20px 120px !important
}
// ::v-deep .el-table__fixed{
// height:100% !important
// }
</style>
Loading…
Cancel
Save