|
@@ -74,7 +74,6 @@
|
|
</p-table-edit-pro>
|
|
</p-table-edit-pro>
|
|
</p-tab-pane>
|
|
</p-tab-pane>
|
|
</p-tabs>
|
|
</p-tabs>
|
|
-
|
|
|
|
</p-card>
|
|
</p-card>
|
|
</p-spin>
|
|
</p-spin>
|
|
</template>
|
|
</template>
|
|
@@ -83,8 +82,8 @@
|
|
// 设置默认仓库
|
|
// 设置默认仓库
|
|
import { setwarehouse } from "@/views/kzyWMS/SearchModal/mixins_warehouse.js";
|
|
import { setwarehouse } from "@/views/kzyWMS/SearchModal/mixins_warehouse.js";
|
|
import { items, columns, columns2 } from "./config/accord.js";
|
|
import { items, columns, columns2 } from "./config/accord.js";
|
|
-import { search_page, initiative_save, urgent_save, updateByCode, getSwatichValue } from "../api/api.js";
|
|
|
|
-import store from "@/store";
|
|
|
|
|
|
+import { search_page, initiative_save, urgent_save, updateByCode, getSwatichValue } from "../api/api.js";
|
|
|
|
+
|
|
import { sorter } from "../../utils/sort";
|
|
import { sorter } from "../../utils/sort";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -92,7 +91,7 @@ export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
regValue: "1",
|
|
regValue: "1",
|
|
- activeKey:'1',
|
|
|
|
|
|
+ activeKey: "1",
|
|
items,
|
|
items,
|
|
columns: null,
|
|
columns: null,
|
|
data: [],
|
|
data: [],
|
|
@@ -157,7 +156,7 @@ export default {
|
|
this.getSwatichValue(this.$store.getters.warehouse.warehouseId);
|
|
this.getSwatichValue(this.$store.getters.warehouse.warehouseId);
|
|
this.data = [];
|
|
this.data = [];
|
|
this.data2 = [];
|
|
this.data2 = [];
|
|
- this.extract()
|
|
|
|
|
|
+ this.extract();
|
|
// this.getConfig();
|
|
// this.getConfig();
|
|
} else {
|
|
} else {
|
|
this.$exception(res);
|
|
this.$exception(res);
|
|
@@ -170,32 +169,32 @@ export default {
|
|
changTabs(activeKey) {
|
|
changTabs(activeKey) {
|
|
this.data = [];
|
|
this.data = [];
|
|
this.data2 = [];
|
|
this.data2 = [];
|
|
- this.extract()
|
|
|
|
|
|
+ this.extract();
|
|
},
|
|
},
|
|
getData(val) {
|
|
getData(val) {
|
|
- if (this.activeKey === '1') {
|
|
|
|
|
|
+ if (this.activeKey === "1") {
|
|
val = {
|
|
val = {
|
|
pageNum: this.pagination.current,
|
|
pageNum: this.pagination.current,
|
|
pageSize: this.pagination.pageSize,
|
|
pageSize: this.pagination.pageSize,
|
|
num: "querylocator",
|
|
num: "querylocator",
|
|
params: { ...val },
|
|
params: { ...val },
|
|
- }
|
|
|
|
|
|
+ };
|
|
}
|
|
}
|
|
- if (this.activeKey === '2') {
|
|
|
|
|
|
+ if (this.activeKey === "2") {
|
|
val = {
|
|
val = {
|
|
pageNum: this.pagination2.current,
|
|
pageNum: this.pagination2.current,
|
|
pageSize: this.pagination2.pageSize,
|
|
pageSize: this.pagination2.pageSize,
|
|
num: "querylocator_b",
|
|
num: "querylocator_b",
|
|
params: { ...val },
|
|
params: { ...val },
|
|
- }
|
|
|
|
|
|
+ };
|
|
}
|
|
}
|
|
- this.loading = true
|
|
|
|
|
|
+ this.loading = true;
|
|
search_page(val)
|
|
search_page(val)
|
|
.then((res) => {
|
|
.then((res) => {
|
|
if (res.success) {
|
|
if (res.success) {
|
|
if (res.data) {
|
|
if (res.data) {
|
|
let temp = res.data.list;
|
|
let temp = res.data.list;
|
|
- if (this.activeKey === '1') {
|
|
|
|
|
|
+ if (this.activeKey === "1") {
|
|
this.data = temp.map((item) => {
|
|
this.data = temp.map((item) => {
|
|
return {
|
|
return {
|
|
pieceQuantity: 0, //实补数量(混入后台未定义)
|
|
pieceQuantity: 0, //实补数量(混入后台未定义)
|
|
@@ -205,7 +204,7 @@ export default {
|
|
});
|
|
});
|
|
this.pagination.total = Number(res.data.totalCount);
|
|
this.pagination.total = Number(res.data.totalCount);
|
|
}
|
|
}
|
|
- if (this.activeKey === '2') {
|
|
|
|
|
|
+ if (this.activeKey === "2") {
|
|
this.data2 = temp.map((item) => {
|
|
this.data2 = temp.map((item) => {
|
|
return {
|
|
return {
|
|
pieceQuantity: 0, //实补数量(混入后台未定义)
|
|
pieceQuantity: 0, //实补数量(混入后台未定义)
|
|
@@ -217,12 +216,12 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
this.loading = false;
|
|
this.loading = false;
|
|
- if (this.activeKey === '1') {
|
|
|
|
|
|
+ if (this.activeKey === "1") {
|
|
this.selectId.length = 0;
|
|
this.selectId.length = 0;
|
|
this.selectData.length = 0;
|
|
this.selectData.length = 0;
|
|
this.selectedRowKeys.length = 0;
|
|
this.selectedRowKeys.length = 0;
|
|
}
|
|
}
|
|
- if (this.activeKey === '2') {
|
|
|
|
|
|
+ if (this.activeKey === "2") {
|
|
this.selectId2.length = 0;
|
|
this.selectId2.length = 0;
|
|
this.selectData2.length = 0;
|
|
this.selectData2.length = 0;
|
|
this.selectedRowKeys2.length = 0;
|
|
this.selectedRowKeys2.length = 0;
|
|
@@ -240,15 +239,15 @@ export default {
|
|
// 保存 提交
|
|
// 保存 提交
|
|
hanlderSubmit(event) {
|
|
hanlderSubmit(event) {
|
|
// event.preventDefault();
|
|
// event.preventDefault();
|
|
- if (this.selectData.length === 0 && this.activeKey === '1') {
|
|
|
|
|
|
+ if (this.selectData.length === 0 && this.activeKey === "1") {
|
|
this.$message.warning("请选择数据!");
|
|
this.$message.warning("请选择数据!");
|
|
- return
|
|
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
- if (this.selectData2.length === 0 && this.activeKey === '2') {
|
|
|
|
|
|
+ if (this.selectData2.length === 0 && this.activeKey === "2") {
|
|
this.$message.warning("请选择数据!");
|
|
this.$message.warning("请选择数据!");
|
|
- return
|
|
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
- if (this.selectData.length && this.activeKey === '1') {
|
|
|
|
|
|
+ if (this.selectData.length && this.activeKey === "1") {
|
|
this.$refs.tableAccord.validateFields((err, values) => {
|
|
this.$refs.tableAccord.validateFields((err, values) => {
|
|
if (!err) {
|
|
if (!err) {
|
|
// 较验实补件数(及对应补货数量)不能为0
|
|
// 较验实补件数(及对应补货数量)不能为0
|
|
@@ -261,14 +260,14 @@ export default {
|
|
warehouseId: this.$refs.search.form.getFieldsValue().warehouseId,
|
|
warehouseId: this.$refs.search.form.getFieldsValue().warehouseId,
|
|
details: [...this.selectData],
|
|
details: [...this.selectData],
|
|
};
|
|
};
|
|
- this.spinning = true
|
|
|
|
|
|
+ this.spinning = true;
|
|
urgent_save(params).then((res) => {
|
|
urgent_save(params).then((res) => {
|
|
- this.spinning = false
|
|
|
|
|
|
+ this.spinning = false;
|
|
if (res.success) {
|
|
if (res.success) {
|
|
this.$message.success("保存成功!");
|
|
this.$message.success("保存成功!");
|
|
- this.data = []
|
|
|
|
- this.data2 = []
|
|
|
|
- this.extract()
|
|
|
|
|
|
+ this.data = [];
|
|
|
|
+ this.data2 = [];
|
|
|
|
+ this.extract();
|
|
} else {
|
|
} else {
|
|
this.$exception(res);
|
|
this.$exception(res);
|
|
}
|
|
}
|
|
@@ -276,20 +275,20 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- if (this.selectData2.length && this.activeKey === '2') {
|
|
|
|
|
|
+ if (this.selectData2.length && this.activeKey === "2") {
|
|
this.$refs.tableBC.validateFields((err, values) => {
|
|
this.$refs.tableBC.validateFields((err, values) => {
|
|
if (!err) {
|
|
if (!err) {
|
|
let params = {
|
|
let params = {
|
|
warehouseId: this.$refs.search.form.getFieldsValue().warehouseId,
|
|
warehouseId: this.$refs.search.form.getFieldsValue().warehouseId,
|
|
details: [...this.selectData2],
|
|
details: [...this.selectData2],
|
|
};
|
|
};
|
|
- this.spinning = true
|
|
|
|
|
|
+ this.spinning = true;
|
|
initiative_save(params).then((res) => {
|
|
initiative_save(params).then((res) => {
|
|
- this.spinning = false
|
|
|
|
|
|
+ this.spinning = false;
|
|
if (res.success) {
|
|
if (res.success) {
|
|
this.$message.success("保存成功!");
|
|
this.$message.success("保存成功!");
|
|
- this.data2 = []
|
|
|
|
- this.extract()
|
|
|
|
|
|
+ this.data2 = [];
|
|
|
|
+ this.extract();
|
|
} else {
|
|
} else {
|
|
this.$exception(res);
|
|
this.$exception(res);
|
|
}
|
|
}
|
|
@@ -344,7 +343,7 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
colChange({ name, value, index, label, record, modalRowData, config, vNode, options, moment, event }) {
|
|
colChange({ name, value, index, label, record, modalRowData, config, vNode, options, moment, event }) {
|
|
- if(this.selectData.length === 0) return
|
|
|
|
|
|
+ if (this.selectData.length === 0) return;
|
|
this.selectData.forEach((item) => {
|
|
this.selectData.forEach((item) => {
|
|
if (item.id == record.id) {
|
|
if (item.id == record.id) {
|
|
item.pieceQuantity = value * record.caseConversionRate;
|
|
item.pieceQuantity = value * record.caseConversionRate;
|
|
@@ -352,7 +351,7 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
colChange2({ name, value, index, label, record, modalRowData, config, vNode, options, moment, event }) {
|
|
colChange2({ name, value, index, label, record, modalRowData, config, vNode, options, moment, event }) {
|
|
- if(this.selectData2.length === 0) return
|
|
|
|
|
|
+ if (this.selectData2.length === 0) return;
|
|
this.selectData2.forEach((item) => {
|
|
this.selectData2.forEach((item) => {
|
|
if (item.id == record.id) {
|
|
if (item.id == record.id) {
|
|
item.pieceQuantity = value * record.caseConversionRate;
|
|
item.pieceQuantity = value * record.caseConversionRate;
|
|
@@ -367,19 +366,19 @@ export default {
|
|
},
|
|
},
|
|
// 仅前台显示删除,后台不做删除
|
|
// 仅前台显示删除,后台不做删除
|
|
delShow() {
|
|
delShow() {
|
|
- if (this.selectData.length === 0 && this.activeKey === '1') {
|
|
|
|
|
|
+ if (this.selectData.length === 0 && this.activeKey === "1") {
|
|
this.$message.warning("请选择数据!");
|
|
this.$message.warning("请选择数据!");
|
|
- return
|
|
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
- if (this.selectData2.length === 0 && this.activeKey === '2') {
|
|
|
|
|
|
+ if (this.selectData2.length === 0 && this.activeKey === "2") {
|
|
this.$message.warning("请选择数据!");
|
|
this.$message.warning("请选择数据!");
|
|
- return
|
|
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
- if (this.selectId.length && this.activeKey === '1') {
|
|
|
|
|
|
+ if (this.selectId.length && this.activeKey === "1") {
|
|
this.$refs.tableAccord.removeRow(this.selectId);
|
|
this.$refs.tableAccord.removeRow(this.selectId);
|
|
this.selectId = [];
|
|
this.selectId = [];
|
|
}
|
|
}
|
|
- if (this.selectId2.length && this.activeKey === '2') {
|
|
|
|
|
|
+ if (this.selectId2.length && this.activeKey === "2") {
|
|
this.$refs.tableBC.removeRow(this.selectId2);
|
|
this.$refs.tableBC.removeRow(this.selectId2);
|
|
this.selectId2 = [];
|
|
this.selectId2 = [];
|
|
}
|
|
}
|
|
@@ -392,9 +391,10 @@ export default {
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
-.auto{
|
|
|
|
|
|
+.auto {
|
|
display: flex;
|
|
display: flex;
|
|
- justify-content: end;
|
|
|
|
|
|
+ justify-content: flex-end;
|
|
|
|
+
|
|
padding-bottom: 16px;
|
|
padding-bottom: 16px;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|