|
|
@@ -146,7 +146,7 @@
|
|
|
v-if="assemblyForm.billType != 'MM'"
|
|
|
:type="scope.type"
|
|
|
:size="scope.size"
|
|
|
- :disabled="detailData.seeDisabled || pleasereviewType || showLock || disabled || scope.row.containerNumber"
|
|
|
+ :disabled="detailData.seeDisabled || pleasereviewType || showLock || disabled || !(!scope.row.containerNumber)"
|
|
|
@click.stop="rowDel(scope.row, scope.index)"
|
|
|
>{{ $t("btn118n.deleted") }}
|
|
|
</el-button>
|
|
|
@@ -186,7 +186,7 @@
|
|
|
placeholder="请输入箱号"
|
|
|
@input="cntrNoInput(scope.row, 'cntrNo')"
|
|
|
@change="verifyChange(scope.row, 'cntrNo')"
|
|
|
- :disabled="scope.row.containerNumber&&assemblyForm.billType != 'MM'"
|
|
|
+ :disabled="!(!scope.row.containerNumber)&&assemblyForm.billType != 'MM'"
|
|
|
></el-input>
|
|
|
<span v-else>{{ scope.row.cntrNo }}</span>
|
|
|
</template>
|
|
|
@@ -1447,31 +1447,26 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 一键删除
|
|
|
- handleDelete() {
|
|
|
- for (let item of this.assemblyForm.containersList) {
|
|
|
+ handleDelete() {
|
|
|
+ if (this.selectionList.length === 0) {
|
|
|
+ this.$message.warning("请选择至少一条数据");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ for (let item of this.selectionList) {
|
|
|
if (!item.id) return this.$message.error("明细存在未保存数据,请点击行删除");
|
|
|
if (item.quantity > 0) return this.$message.error("请先撤销,再删除配箱");
|
|
|
if (item.containerNumber && this.assemblyForm.billType != "MM") {
|
|
|
return this.$message.error("放箱号有值,不允许清空");
|
|
|
}
|
|
|
}
|
|
|
- this.$confirm("确定将全部数据删除?", {
|
|
|
+ this.$confirm("确定将数据删除?", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
let arrids = [];
|
|
|
- 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(() => {
|
|
|
+ if (this.ids) {
|
|
|
+ containersRemove(this.ids).then(() => {
|
|
|
// this.onLoad(this.page);
|
|
|
this.$message({
|
|
|
type: "success",
|