|
|
@@ -104,8 +104,8 @@
|
|
|
size="small"
|
|
|
plain
|
|
|
:disabled="detailData.seeDisabled || selectionList.length == 0 || disabled"
|
|
|
- @click.stop="allClick('拆单')"
|
|
|
- >拆单</el-button
|
|
|
+ @click.stop="allClick('合拆票')"
|
|
|
+ >合拆票</el-button
|
|
|
>
|
|
|
<!-- <el-button type="success" size="small" plain @click.stop="$refs.splitOrder.openDialog(assemblyForm)">合票</el-button> -->
|
|
|
<el-button type="success" size="small" plain @click.stop="$refs.print.openDialog()">
|
|
|
@@ -142,7 +142,7 @@
|
|
|
v-if="assemblyForm.billType != 'MM'"
|
|
|
:type="scope.type"
|
|
|
:size="scope.size"
|
|
|
- :disabled="detailData.seeDisabled || pleasereviewType || showLock || disabled"
|
|
|
+ :disabled="detailData.seeDisabled || pleasereviewType || showLock || disabled || scope.row.containerNumber"
|
|
|
@click.stop="rowDel(scope.row, scope.index)"
|
|
|
>{{ $t("btn118n.deleted") }}
|
|
|
</el-button>
|
|
|
@@ -700,7 +700,7 @@ export default {
|
|
|
this.$emit("selectionChange", [val]);
|
|
|
},
|
|
|
allClick(name) {
|
|
|
- if (name == "拆单") {
|
|
|
+ if (name == "合拆票") {
|
|
|
for (let item of this.selectionList) {
|
|
|
if (!item.cntrNo) {
|
|
|
return this.$message.error("箱号不能为空");
|
|
|
@@ -1260,8 +1260,14 @@ export default {
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
let arrids = [];
|
|
|
- for (let item of this.assemblyForm.containersList.filter(item => !item.containerNumber)) {
|
|
|
- arrids.push(item.id);
|
|
|
+ if (this.assemblyForm.billType != "MM") {
|
|
|
+ for (let item of this.assemblyForm.containersList.filter(item => !item.containerNumber)) {
|
|
|
+ arrids.push(item.id);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ for (let item of this.assemblyForm.containersList) {
|
|
|
+ arrids.push(item.id);
|
|
|
+ }
|
|
|
}
|
|
|
// 清除箱号接口
|
|
|
if (arrids.length) {
|
|
|
@@ -1283,8 +1289,14 @@ export default {
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
let arrids = [];
|
|
|
- for (let item of this.assemblyForm.containersList.filter(item => !item.containerNumber)) {
|
|
|
- arrids.push(item.id);
|
|
|
+ if (this.assemblyForm.billType != "MM") {
|
|
|
+ for (let item of this.assemblyForm.containersList.filter(item => !item.containerNumber)) {
|
|
|
+ arrids.push(item.id);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ for (let item of this.assemblyForm.containersList) {
|
|
|
+ arrids.push(item.id);
|
|
|
+ }
|
|
|
}
|
|
|
if (arrids.length) {
|
|
|
containersRevoke(arrids.join(",")).then(res => {
|
|
|
@@ -1302,7 +1314,7 @@ export default {
|
|
|
if (this.selectionList.length > 0) {
|
|
|
let arrids = [];
|
|
|
for (let item of this.selectionList) {
|
|
|
- if (item.containerNumber) {
|
|
|
+ if (item.containerNumber && this.assemblyForm.billType != "MM") {
|
|
|
return this.$message.error("放箱号有值,不允许清空");
|
|
|
}
|
|
|
arrids.push(item.id);
|
|
|
@@ -1407,6 +1419,9 @@ export default {
|
|
|
},
|
|
|
// 删除
|
|
|
rowDel(row, index) {
|
|
|
+ // if (row.containerNumber) {
|
|
|
+ // return this.$message.error("放箱号有值,不允许删除");
|
|
|
+ // }
|
|
|
if (row.id) {
|
|
|
this.$confirm("确定将选择数据删除?", {
|
|
|
confirmButtonText: "确定",
|
|
|
@@ -1439,8 +1454,14 @@ export default {
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
let arrids = [];
|
|
|
- for (let item of this.assemblyForm.containersList.filter(item => !item.containerNumber)) {
|
|
|
- arrids.push(item.id);
|
|
|
+ if (this.assemblyForm.billType != "MM") {
|
|
|
+ for (let item of this.assemblyForm.containersList.filter(item => !item.containerNumber)) {
|
|
|
+ arrids.push(item.id);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ for (let item of this.assemblyForm.containersList) {
|
|
|
+ arrids.push(item.id);
|
|
|
+ }
|
|
|
}
|
|
|
if (arrids.length) {
|
|
|
containersRemove(arrids.join(",")).then(() => {
|