|
|
@@ -82,6 +82,25 @@
|
|
|
</template>
|
|
|
<template slot-scope="{ type, size, row, index, disabled }" slot="menu">
|
|
|
<el-button
|
|
|
+ v-if="reservoirArea == 1 && row.historyList.length"
|
|
|
+ :size="size"
|
|
|
+ :disabled="!row.id || form.statusName == '已入库' || isEdit || isEdits"
|
|
|
+ type="text"
|
|
|
+ @click="rowDelArea(row, index)"
|
|
|
+ >
|
|
|
+ 清空库区
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="reservoirArea == 1"
|
|
|
+ :size="size"
|
|
|
+ :disabled="!row.id || form.statusName == '已入库' || isEdit || isEdits"
|
|
|
+ type="text"
|
|
|
+ @click="rowArea(row, index)"
|
|
|
+ >
|
|
|
+ {{ row.historyList.length ? "查看库区" : "选择库区" }}
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="reservoirArea != 1"
|
|
|
:size="size"
|
|
|
:disabled="disabled || isEdit"
|
|
|
:type="type"
|
|
|
@@ -197,6 +216,7 @@
|
|
|
<el-button type="primary" @click="allClick('修改')" size="mini">修 改</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+ <view-area ref="viewArea" @areaData="areaData" :disabled="disabled || form.statusName == '已入库' || isEdit || isEdits"></view-area>
|
|
|
<el-dialog title="导入明细" append-to-body :visible.sync="excelBox2" width="555px" :close-on-click-modal="false" v-dialog-drag>
|
|
|
<avue-form
|
|
|
v-if="excelBox2"
|
|
|
@@ -231,12 +251,14 @@ import {
|
|
|
dotListAll,
|
|
|
removeItem
|
|
|
} from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
|
|
|
+import { itemRemove } from "@/api/tirePartsMall/salesManagement/outboundWorkOrder";
|
|
|
import { dateFormat } from "@/util/date";
|
|
|
import { getToken } from "@/util/auth";
|
|
|
import { getMenu } from "@/api/system/menu";
|
|
|
import reportDialog from "@/components/report-dialog/main";
|
|
|
import { corpsDescListAll } from "@/api/tirePartsMall/salesManagement/saleOrder";
|
|
|
import { isProcurement } from "@/api/basicData/configuration";
|
|
|
+import viewArea from "./components/viewArea.vue";
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
|
data() {
|
|
|
@@ -251,7 +273,6 @@ export default {
|
|
|
// 上传附件的需要参数
|
|
|
loadingBtn: false,
|
|
|
filesList: [],
|
|
|
-
|
|
|
switchDialog: false,
|
|
|
isEdit: false,
|
|
|
values: "",
|
|
|
@@ -470,7 +491,7 @@ export default {
|
|
|
editBtn: false, // 修改按钮
|
|
|
delBtn: false, //删除按钮
|
|
|
border: true,
|
|
|
- menuWidth: 160,
|
|
|
+ menuWidth: 250,
|
|
|
stripe: true,
|
|
|
span: 8,
|
|
|
addRowBtn: false,
|
|
|
@@ -599,13 +620,6 @@ export default {
|
|
|
// }, {
|
|
|
},
|
|
|
{
|
|
|
- label: "库区",
|
|
|
- prop: "reservoirAreaName",
|
|
|
- width: 140,
|
|
|
- hide: true,
|
|
|
- overHidden: true
|
|
|
- },
|
|
|
- {
|
|
|
label: "品牌",
|
|
|
prop: "brandName",
|
|
|
disabled: false,
|
|
|
@@ -809,9 +823,6 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
isProcurement({ param: "reservoir.area" }).then(res => {
|
|
|
- if (res.data.data == 1) {
|
|
|
- this.findObject(this.optionContacts.column, "reservoirAreaName").hide = false;
|
|
|
- }
|
|
|
this.reservoirArea = res.data.data;
|
|
|
});
|
|
|
this.findObject(this.optionContacts.column, "goodsId").change = ({ value, column }) => {
|
|
|
@@ -890,14 +901,57 @@ export default {
|
|
|
},
|
|
|
components: {
|
|
|
reportDialog,
|
|
|
- dicSelect
|
|
|
+ dicSelect,
|
|
|
+ viewArea
|
|
|
},
|
|
|
activated() {
|
|
|
this.$store.commit("DOMIO_IN_DETAIL");
|
|
|
},
|
|
|
methods: {
|
|
|
+ rowDelArea(row, index) {
|
|
|
+ if (row.historyList.filter(item => item.id).length) {
|
|
|
+ this.$confirm("是否撤销库区?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ let ids = [];
|
|
|
+ for (let item of row.historyList) {
|
|
|
+ ids.push(item.id);
|
|
|
+ }
|
|
|
+ itemRemove({ ids: ids.join(",") }).then(res => {
|
|
|
+ row.historyList = [];
|
|
|
+ row.reservoirAreaId = null;
|
|
|
+ row.reservoirAreaName = null;
|
|
|
+ row.dot = null;
|
|
|
+ row.sendNum = 0;
|
|
|
+ });
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ row.historyList = [];
|
|
|
+ row.reservoirAreaId = null;
|
|
|
+ row.reservoirAreaName = null;
|
|
|
+ row.dot = null;
|
|
|
+ row.sendNum = 0;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ rowArea(row, index) {
|
|
|
+ this.$refs.viewArea.openDialog(this.form, row, index);
|
|
|
+ },
|
|
|
+ areaData(row, index) {
|
|
|
+ this.form.shipItemsList[index].reservoirAreaId = row.reservoirAreaId;
|
|
|
+ this.form.shipItemsList[index].reservoirAreaName = row.reservoirAreaName;
|
|
|
+ this.form.shipItemsList[index].dot = row.dot;
|
|
|
+ this.form.shipItemsList[index].sendNum = row.sendNum;
|
|
|
+ this.form.shipItemsList[index].historyList = row.historyList;
|
|
|
+ },
|
|
|
allClick(name) {
|
|
|
if (name == "修改库区") {
|
|
|
+ for (let item of this.selectionMultilist) {
|
|
|
+ if (item.historyList.length > 0) {
|
|
|
+ return this.$message.error("请选择没有选择库区的数据");
|
|
|
+ }
|
|
|
+ }
|
|
|
this.fixForm = {
|
|
|
reservoirAreaId: null,
|
|
|
reservoirAreaName: null
|
|
|
@@ -913,8 +967,13 @@ export default {
|
|
|
for (let item of this.selectionMultilist) {
|
|
|
this.form.shipItemsList.forEach(row => {
|
|
|
if (item.id == row.id) {
|
|
|
- row.reservoirAreaId = this.fixForm.reservoirAreaId;
|
|
|
- row.reservoirAreaName = this.fixForm.reservoirAreaName;
|
|
|
+ row.historyList.push({
|
|
|
+ reservoirAreaId: this.fixForm.reservoirAreaId,
|
|
|
+ reservoirAreaName: this.fixForm.reservoirAreaName,
|
|
|
+ balanceQuantity:this.fixForm.balanceQuantity,
|
|
|
+ quantity: row.goodsNum
|
|
|
+ });
|
|
|
+ row.sendNum = row.goodsNum;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
@@ -930,9 +989,11 @@ export default {
|
|
|
if (name == "reservoirAreaName") {
|
|
|
if (row) {
|
|
|
this.fixForm.reservoirAreaId = row.id;
|
|
|
+ this.fixForm.balanceQuantity = row.balanceQuantity;
|
|
|
} else {
|
|
|
this.fixForm.reservoirAreaId = null;
|
|
|
this.fixForm.reservoirAreaName = null;
|
|
|
+ this.fixForm.balanceQuantity = row.balanceQuantity;
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
@@ -1105,8 +1166,8 @@ export default {
|
|
|
if (valid) {
|
|
|
if (this.reservoirArea == 1) {
|
|
|
for (let item of this.form.shipItemsList) {
|
|
|
- if (!item.reservoirAreaId) {
|
|
|
- return this.$message.error("请选择入库明细的库区");
|
|
|
+ if (!item.historyList.length) {
|
|
|
+ return this.$message.error("请选择库区");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1335,12 +1396,6 @@ export default {
|
|
|
this.findObject(this.optionContacts.column, "pattern").label = "规格型号1";
|
|
|
}
|
|
|
});
|
|
|
- isProcurement({ param: "reservoir.area" }).then(res => {
|
|
|
- if (res.data.data == 1) {
|
|
|
- this.findObject(this.optionContacts.column, "reservoirAreaName").hide = false;
|
|
|
- }
|
|
|
- this.reservoirArea = res.data.data;
|
|
|
- });
|
|
|
if (inSave) {
|
|
|
this.$message.success("保存成功");
|
|
|
//关闭窗口b
|
|
|
@@ -1356,12 +1411,6 @@ export default {
|
|
|
this.findObject(this.optionContacts.column, "pattern").label = "规格型号1";
|
|
|
}
|
|
|
});
|
|
|
- isProcurement({ param: "reservoir.area" }).then(res => {
|
|
|
- if (res.data.data == 1) {
|
|
|
- this.findObject(this.optionContacts.column, "reservoirAreaName").hide = false;
|
|
|
- }
|
|
|
- this.reservoirArea = res.data.data;
|
|
|
- });
|
|
|
if (inSave) {
|
|
|
this.$message.success("重置成功");
|
|
|
this.$refs[ref].$refs.dialogColumn.columnBox = false;
|