From 9e1438db1e035a41b00749a7d14f6b643ceef3cd Mon Sep 17 00:00:00 2001
From: mengjiao <3338049200@qq,com>
Date: Thu, 9 May 2024 16:39:20 +0800
Subject: [PATCH] =?UTF-8?q?wms=E6=88=90=E5=93=81=E9=A1=B5=E9=9D=A2?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/systemFinished/systemFinished.js | 29 +++
src/views/wms/systemFinished/index.vue | 273 ++++++++++++++++++++++-
2 files changed, 298 insertions(+), 4 deletions(-)
diff --git a/src/api/systemFinished/systemFinished.js b/src/api/systemFinished/systemFinished.js
index 84c8957..eaf4bac 100644
--- a/src/api/systemFinished/systemFinished.js
+++ b/src/api/systemFinished/systemFinished.js
@@ -18,7 +18,26 @@ export function addOdsProductEmbryoInventory(data) {
contentType:'application/json',
});
}
+// 调整成品盘点单
+export function AdjustInventoryList(data) {
+ return request({
+ url: '/wms/systemFinished/AdjustInventoryList',
+ method: 'post',
+ data: data,
+ contentType:'application/json',
+ });
+}
+
+// 审核
+export function approve(data) {
+ return request({
+ url: '/wms/systemFinished/approve',
+ method: 'post',
+ data: data,
+ contentType:'application/json',
+ });
+}
// 查询成品盘点单详细
export function getSystemFinished(ID) {
return request({
@@ -27,6 +46,16 @@ export function getSystemFinished(ID) {
});
}
+// 获取盘点单的关联信息
+export function selectObtainTheAssociated(data) {
+ return request({
+ url: '/wms/systemFinished/selectObtainTheAssociated',
+ method: 'post',
+ data: data
+ });
+}
+
+
// 新增成品盘点单
export function addSystemFinished(data) {
return request({
diff --git a/src/views/wms/systemFinished/index.vue b/src/views/wms/systemFinished/index.vue
index 68d0c7a..0658d19 100644
--- a/src/views/wms/systemFinished/index.vue
+++ b/src/views/wms/systemFinished/index.vue
@@ -93,7 +93,7 @@
icon="el-icon-edit"
size="mini"
:disabled="single"
- @click="handleUpdate"
+ @click="handleUpdateTWO"
v-hasPermi="['systemFinished:systemFinished:edit']"
>审核
@@ -311,6 +311,146 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.locNumber > scope.row.realityNumber ? '盘亏' : (scope.row.locNumber < scope.row.realityNumber ? '盘盈' : '无') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.locNumber > scope.row.realityNumber ? '盘亏' : (scope.row.locNumber < scope.row.realityNumber ? '盘盈' : '无') }}
+
+
+
+
+
+
+
+
+
+
{
+ if (valid) {
+ // 创建一个新对象formData并将form属性赋值给它
+ const formData = Object.assign({}, this.form);
+
+ // // 将addoutorderList数组赋值给formData对象
+ // formData.odsProductEmbryoInventoryCorrelationList = this.associatedData;
+ formData.orderStatus = "3";
+ // 打印整合后的数据对象
+ console.log("Merged Data:", formData);
+ const jsonData = JSON.stringify(formData);
+ // 调用接口并传递整合后的数据对象
+ approve(jsonData).then(response => {
+ // 处理接口返回结果
+ }).catch(error => {
+ // 处理接口请求错误
+ });
+ }
+ });
+ },
+ submitFormTWO() {
+ this.$refs["form"].validate(valid => {
+ if (valid) {
+ // 创建一个新对象formData并将form属性赋值给它
+ const formData = Object.assign({}, this.form);
+
+ // 将addoutorderList数组赋值给formData对象
+ formData.odsProductEmbryoInventoryCorrelationList = this.associatedData;
+
+ // 打印整合后的数据对象
+ console.log("Merged Data:", formData);
+ const jsonData = JSON.stringify(formData);
+ // 调用接口并传递整合后的数据对象
+ AdjustInventoryList(jsonData).then(response => {
+ // 处理接口返回结果
+ }).catch(error => {
+ // 处理接口请求错误
+ });
+ }
+ });
+ },
+ submitFormBOH() {
+ this.$refs["form"].validate(valid => {
+ if (valid) {
+ // 创建一个新对象formData并将form属性赋值给它
+ const formData = Object.assign({}, this.form);
+
+ // // 将addoutorderList数组赋值给formData对象
+ // formData.odsProductEmbryoInventoryCorrelationList = this.associatedData;
+ formData.orderStatus = "2";
+ // 打印整合后的数据对象
+ console.log("Merged Data:", formData);
+ const jsonData = JSON.stringify(formData);
+ // 调用接口并传递整合后的数据对象
+ approve(jsonData).then(response => {
+ // 处理接口返回结果
+ }).catch(error => {
+ // 处理接口请求错误
+ });
+ }
+ });
+ },
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
@@ -599,7 +821,8 @@
this.open = true;
this.title = "盘点新增";
this.selectfactoryCodelist();
- this.form.siteCode = '1000';
+ let factoryCode = localStorage.getItem('USER_POOL_NAME_CURRENT').substring(3)
+ this.form.siteCode = factoryCode;
this.getselect();
},
getselect() {
@@ -627,10 +850,52 @@
row.id || this.ids
getSystemFinished(id).then(response => {
this.form = response.data;
- this.open = true;
- this.title = "修改成品盘点单";
+ this.openTWO = true;
+ this.title = "盘点单调整";
+ const tem = { orderCode: response.data.orderCode };
+ console.log("orderCodeorderCodeorderCodeorderCode---"+row.orderCode)
+ const data = JSON.stringify(tem);
+ this.getAssociatedData(data)
});
+ this.getselect();
},
+ handleUpdateTWO(row) {
+ this.reset();
+ const id =
+ row.id || this.ids
+ getSystemFinished(id).then(response => {
+ this.form = response.data;
+ this.openTEM = true;
+ this.title = "盘点单审核";
+ const tem = { orderCode: response.data.orderCode };
+ console.log("orderCodeorderCodeorderCodeorderCode---"+row.orderCode)
+ const data = JSON.stringify(tem);
+ this.getAssociatedData(data)
+ });
+ this.getselect();
+ },
+ getAssociatedData(data) {
+ selectObtainTheAssociated(data).then(response => {
+ this.associatedData = response.data;
+
+ }).catch(error => {
+ console.error('获取数据失败:', error);
+ });
+
+ },
+ handleAdjustment(row) {
+ // 在这里可以编写处理调整数量的逻辑
+ console.log('调整数量为:', row.adjustmentAmount);
+
+ // 例如,你可以在这里更新数据,发送请求等操作
+ // 例如:row.adjustmentAmount = 新的调整数量
+ // 更新数据:this.$set(row, 'adjustmentAmount', 新的调整数量)
+ row.adjustmentAmount = parseFloat(row.adjustmentAmount); // 将输入的值转换为数字类型保存
+ console.log('调整数量为:', row.adjustmentAmount);
+ // 如果需要发送请求,可以在这里调用接口
+ // 例如:this.$axios.post('/api/adjust', { id: row.id, amount: row.adjustmentAmount })
+ },
+
handleDeleteRW(row) {
console.log("Row Object:", row);