This commit is contained in:
linfso 2025-02-21 03:59:27 +08:00
parent 4508ca672f
commit 6f581abefa
3 changed files with 45 additions and 6 deletions

View File

@ -4,10 +4,10 @@
<div class="tab-container">
<el-tabs v-model="activeTab" class="center-tabs" @tab-click="handleTabsClick" @tab-remove="removeTab">
<el-tab-pane label="货物组批次列表" name="billList" >
<BigBatchListPanel ref="refBatchList" @onCreate="onCreateBatch" @onUpdate="onUpdateBatch" @onView="onViewBatch"> </BigBatchListPanel>
<BigBatchListPanel ref="refBatchList" @onCreate="onCreateBatch" @onUpdate="onUpdateBatch" @onCopy="onCopyBatch" @onView="onViewBatch"> </BigBatchListPanel>
</el-tab-pane>
<el-tab-pane label="批次编辑" name="batchEdit" v-if="openEditForm" closable="" >
<BigBatchEditForm :key="'batchEdit_'+batchId" :batchId="batchId" @on-changed="handleFormChanged" @on-cancel="cancelForm"></BigBatchEditForm>
<el-tab-pane :label="editTabTitle" name="batchEdit" v-if="openEditForm" closable="" >
<BigBatchEditForm :key="'batchEdit_'+batchId" :batchId="batchId" :isCopy="isCopy" @on-changed="handleFormChanged" @on-cancel="cancelForm"></BigBatchEditForm>
</el-tab-pane>
<el-tab-pane label="批次查看" name="batchView" v-if="openViewForm" closable >
<BigBatchEditForm :key="'batchView_'+batchId" :batchId="batchId" disabled ></BigBatchEditForm>
@ -39,6 +39,8 @@ export default {
openEditForm:false,
openViewForm:false,
batchId:null,
isCopy:false,
editTabTitle:'批次编辑',
};
},
created() {
@ -50,16 +52,28 @@ export default {
onCreateBatch(){
this.batchId=null;
this.openEditForm=true;
this.isCopy = false;
this.editTabTitle='批次创建';
this.activeTab='batchEdit';
},
onUpdateBatch(batchId){
this.batchId=batchId;
this.isCopy = false;
this.openEditForm=true;
this.editTabTitle='批次编辑';
this.activeTab='batchEdit';
},
onCopyBatch(batchId){
this.batchId=batchId;
this.openEditForm=true;
this.isCopy = true;
this.editTabTitle='批次复制';
this.activeTab='batchEdit';
},
onViewBatch(batchId){
this.batchId=batchId;
this.isCopy = false;
this.openViewForm=true;
this.activeTab='batchView';
},

View File

@ -384,6 +384,9 @@ export default {
type:[Number,Array],
required: false
},
isCopy:{
type:Boolean
},
disabled: {
type:[Boolean],
required: false
@ -664,6 +667,9 @@ export default {
if(this.batchId !=null) {
this.showBatchInfo(this.batchId);
this.coPackType = "edit";
}else{
this.reset();
@ -726,11 +732,11 @@ export default {
this.$modal.msgError(response && response.msg || "未知错误");
return;
}
// let resData = response.data;
// let time = {};
// time.carTime = resData.etd;
this.form = {...response.data};
this.emisCoPackDetail=[];
let resList = await listEmisTmsSiteBatchDtl({batchNo: this.form.batchNo});
if(!resList || resList.code != 200){
@ -773,6 +779,14 @@ export default {
this.currentId=null;
this.openForm= true;
this.titleForm = "修改组批次";
if(this.isCopy){
let resPack = await getTmsGroupBatchNo();
this.form.batchNo = resPack.data;
this.form.id = null;
this.coPackType = "add";
this.form.batchDate=parseTime(new Date());
}
},
getWaybillList(){

View File

@ -106,6 +106,14 @@
@click="handleAdd"
v-hasPermi="['emis:emisTmsSiteBatch:add']"
>新组批次</el-button>
<el-button style="margin-right: 5px;"
type="danger"
plain
size="mini"
:disabled="single"
@click="handleCopy"
v-hasPermi="['emis:emisTmsSiteBatch:edit']"
>复制批次</el-button>
<el-button style="margin-right: 5px;"
type="danger"
plain
@ -479,6 +487,9 @@ export default {
// let id = this.ids[0]
this.$emit("onUpdate",this.ids);
},
handleCopy() {
this.$emit("onCopy",this.ids);
},
handleShowBatchInfo(row){
this.$emit("onView",row.id);
},