|
@@ -21,27 +21,34 @@
|
|
|
<div style="display: flex;align-items: center;justify-content: space-between">
|
|
|
<div>
|
|
|
<!--<el-button type="primary" size="small" @click="DistributionBox">配箱</el-button>-->
|
|
|
- <el-button type="danger" size="small"
|
|
|
+ <!--<el-button type="danger" size="small"-->
|
|
|
+ <!-- :disabled="detailData.seeDisabled || pleasereviewType"-->
|
|
|
+ <!-- @click="revokefun">撤销-->
|
|
|
+ <!--</el-button>-->
|
|
|
+ <!--<el-button type="danger" size="small"-->
|
|
|
+ <!-- :disabled="detailData.seeDisabled || pleasereviewType"-->
|
|
|
+ <!-- @click="wholeRevokefun">全部撤销-->
|
|
|
+ <!--</el-button>-->
|
|
|
+ <el-button type="warning" size="small"
|
|
|
:disabled="detailData.seeDisabled || pleasereviewType"
|
|
|
- @click="revokefun">撤销
|
|
|
+ @click="cleanCntrNofun">清除箱号
|
|
|
</el-button>
|
|
|
- <el-button type="danger" size="small"
|
|
|
+ <el-button type="info" plain size="small"
|
|
|
:disabled="detailData.seeDisabled || pleasereviewType"
|
|
|
- @click="wholeRevokefun">全部撤销
|
|
|
+ @click="oneclickEditing">一键编辑
|
|
|
</el-button>
|
|
|
- <el-button type="warning" size="small"
|
|
|
+ <el-button type="primary" size="small"
|
|
|
:disabled="detailData.seeDisabled || pleasereviewType"
|
|
|
- @click="cleanCntrNofun">清除箱号
|
|
|
+ @click="containersSubmitListfun" >一键保存
|
|
|
</el-button>
|
|
|
- <el-button type="primary" size="small"
|
|
|
+ <el-button type="danger" size="small"
|
|
|
:disabled="detailData.seeDisabled || pleasereviewType"
|
|
|
- @click="containersSubmitListfun" >批量保存
|
|
|
+ @click="handleDelete">一键删除
|
|
|
</el-button>
|
|
|
<el-button type="success" size="small"
|
|
|
:disabled="detailData.seeDisabled || !assemblyForm.id || pleasereviewType"
|
|
|
@click="excelBox = true" >导入箱号,铅封号
|
|
|
</el-button>
|
|
|
-
|
|
|
<!--<el-button type="warning" size="small"-->
|
|
|
<!-- :disabled="numberfalsefun() || assemblyForm.id"-->
|
|
|
<!-- @click="equalDistribution">平均分配</el-button>-->
|
|
@@ -53,19 +60,19 @@
|
|
|
<!--</div>-->
|
|
|
</div>
|
|
|
</template>
|
|
|
- <template slot-scope="scope" slot="menu">
|
|
|
- <el-button v-if="scope.row.edit" :type="scope.type" :size="scope.size" icon="el-icon-edit"
|
|
|
- @click.stop="rowSavefun(scope.row, scope.index)">保存
|
|
|
- </el-button>
|
|
|
- <el-button v-else :type="scope.type" :size="scope.size" icon="el-icon-edit"
|
|
|
- :disabled="detailData.seeDisabled || pleasereviewType"
|
|
|
- @click.stop="rowCellfun(scope.row, scope.index)">编辑
|
|
|
- </el-button>
|
|
|
- <el-button :type="scope.type" :size="scope.size" icon="el-icon-delete"
|
|
|
- :disabled="detailData.seeDisabled || pleasereviewType"
|
|
|
- @click.stop="rowDel(scope.row, scope.index)">删除
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
+ <!--<template slot-scope="scope" slot="menu">-->
|
|
|
+ <!-- <el-button v-if="scope.row.edit" :type="scope.type" :size="scope.size" icon="el-icon-edit"-->
|
|
|
+ <!-- @click.stop="rowSavefun(scope.row, scope.index)">保存-->
|
|
|
+ <!-- </el-button>-->
|
|
|
+ <!-- <el-button v-else :type="scope.type" :size="scope.size" icon="el-icon-edit"-->
|
|
|
+ <!-- :disabled="detailData.seeDisabled || pleasereviewType"-->
|
|
|
+ <!-- @click.stop="rowCellfun(scope.row, scope.index)">编辑-->
|
|
|
+ <!-- </el-button>-->
|
|
|
+ <!-- <el-button :type="scope.type" :size="scope.size" icon="el-icon-delete"-->
|
|
|
+ <!-- :disabled="detailData.seeDisabled || pleasereviewType"-->
|
|
|
+ <!-- @click.stop="rowDel(scope.row, scope.index)">删除-->
|
|
|
+ <!-- </el-button>-->
|
|
|
+ <!--</template>-->
|
|
|
<template slot-scope="scope" slot="cntrNo">
|
|
|
<el-input v-if="scope.row.edit" v-model="scope.row.cntrNo" maxlength='11'
|
|
|
size="small" clearable placeholder="请输入箱号" @input="cntrNoInput(scope.row,'cntrNo')"></el-input>
|
|
@@ -215,6 +222,7 @@ import {getToken} from "@/util/auth";
|
|
|
dialogClickModal: false,
|
|
|
refreshBtn:false,
|
|
|
columnBtn:false,
|
|
|
+ menu:false,
|
|
|
column: [
|
|
|
{
|
|
|
label: "箱型",
|
|
@@ -427,6 +435,13 @@ import {getToken} from "@/util/auth";
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
+ // 配像一键编辑
|
|
|
+ oneclickEditing(){
|
|
|
+ for(let item of this.assemblyForm.containersList) {
|
|
|
+ this.$delete(item, 'edit')
|
|
|
+ this.$set(item,'edit',true)
|
|
|
+ }
|
|
|
+ },
|
|
|
// 配箱批量保存
|
|
|
containersSubmitListfun(){
|
|
|
if (!this.assemblyForm.id) {
|
|
@@ -474,7 +489,7 @@ import {getToken} from "@/util/auth";
|
|
|
console.log(error);
|
|
|
});
|
|
|
},
|
|
|
- // 删除
|
|
|
+ // 删除
|
|
|
rowDel(row) {
|
|
|
this.$confirm("确定将选择数据删除?", {
|
|
|
confirmButtonText: "确定",
|
|
@@ -493,6 +508,7 @@ import {getToken} from "@/util/auth";
|
|
|
this.$emit('billsDetailfun')
|
|
|
});
|
|
|
},
|
|
|
+ // 一键删除
|
|
|
handleDelete() {
|
|
|
if (this.selectionList.length === 0) {
|
|
|
this.$message.warning("请选择至少一条数据");
|
|
@@ -507,11 +523,12 @@ import {getToken} from "@/util/auth";
|
|
|
return containersRemove(this.ids);
|
|
|
})
|
|
|
.then(() => {
|
|
|
- this.onLoad(this.page);
|
|
|
+ // this.onLoad(this.page);
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
message: "操作成功!"
|
|
|
});
|
|
|
+ this.$emit('billsDetailfun')
|
|
|
this.$refs.crud.toggleSelection();
|
|
|
});
|
|
|
},
|
|
@@ -525,16 +542,17 @@ import {getToken} from "@/util/auth";
|
|
|
},
|
|
|
// 当选择项发生变化时会触发该事件
|
|
|
selectionChange(list) {
|
|
|
- let arr = []
|
|
|
- if (list.length > 1) {
|
|
|
- this.$refs.crud.toggleSelection() // 先清空所以选择的数据
|
|
|
- arr = [list[list.length -1]] // 获取最新点击的数组
|
|
|
- this.$refs.crud.toggleSelection(arr,true) // 把刚点击的数组变成选择状态
|
|
|
- }else {
|
|
|
- arr = list
|
|
|
- }
|
|
|
- this.selectionList = arr
|
|
|
- this.$emit('selectionChange',this.selectionList)
|
|
|
+ this.selectionList = list
|
|
|
+ // let arr = []
|
|
|
+ // if (list.length > 1) {
|
|
|
+ // this.$refs.crud.toggleSelection() // 先清空所以选择的数据
|
|
|
+ // arr = [list[list.length -1]] // 获取最新点击的数组
|
|
|
+ // this.$refs.crud.toggleSelection(arr,true) // 把刚点击的数组变成选择状态
|
|
|
+ // }else {
|
|
|
+ // arr = list
|
|
|
+ // }
|
|
|
+ // this.selectionList = arr
|
|
|
+ // this.$emit('selectionChange',this.selectionList)
|
|
|
},
|
|
|
selectionClear() {
|
|
|
this.selectionList = [];
|