wms成品页面修改

master
mengjiao 7 months ago
parent cec40755dc
commit 9e1438db1e

@ -18,7 +18,26 @@ export function addOdsProductEmbryoInventory(data) {
contentType:'application/json', 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) { export function getSystemFinished(ID) {
return request({ 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) { export function addSystemFinished(data) {
return request({ return request({

@ -93,7 +93,7 @@
icon="el-icon-edit" icon="el-icon-edit"
size="mini" size="mini"
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdateTWO"
v-hasPermi="['systemFinished:systemFinished:edit']" v-hasPermi="['systemFinished:systemFinished:edit']"
>审核 >审核
</el-button> </el-button>
@ -311,6 +311,146 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 盘点调整框 -->
<el-dialog :title="title" :visible.sync="openTWO" width="1232px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-col :span="10" align="left">
<el-form-item label="盘点单号" prop="orderCode">
<el-input v-model="form.orderCode" placeholder="自动生成" :readonly="true"/>
</el-form-item>
</el-col>
<el-col :span="10"align="left">
<el-form-item label="盘点仓库" prop="userDefined1">
<el-select v-model="form.userDefined1" placeholder="请选择盘点仓库">
<el-option
v-for="item in Optionlistck"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="10" align="left">
<el-form-item label="盘点人" prop="userDefined2">
<el-input v-model="form.userDefined2" />
</el-form-item>
</el-col>
<el-col :span="10" align="left">
<el-form-item label="盘点时间" prop="userDefined5">
<el-input v-model="form.userDefined5" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table :data="associatedData" @selection-change="handleSelectionChange1">
<el-table-column type="selection" width="55" align="center" :index="indexMethod" />
<el-table-column label="序号" type="index"> </el-table-column>
<el-table-column label="库位" align="center" prop="locCode" />
<el-table-column label="托盘号" align="center" prop="userDefined2" />
<!-- <el-table-column label="批次号" align="center" prop="incomeBatchNo" />-->
<el-table-column label="产品编码" align="center" prop="materialCode" />
<el-table-column label="产品名称" align="center" prop="materialDesc" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="应盘数量" align="center" prop="locNumber" />
<el-table-column label="实际盘点数量" align="center" prop="realityNumber" />
<el-table-column label="盈亏" align="center">
<template slot-scope="scope">
{{ scope.row.locNumber > scope.row.realityNumber ? '盘亏' : (scope.row.locNumber < scope.row.realityNumber ? '盘盈' : '无') }}
</template>
</el-table-column>
<el-table-column label="盘点调整数量" align="center" width="180">
<template slot-scope="scope">
<el-input v-model="scope.row.adjustmentAmount" size="mini" placeholder="请输入调整数量" @change="handleAdjustment(scope.row)"></el-input>
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFormTWO"></el-button>
<el-button @click="cancelTWO"></el-button>
</div>
</el-dialog>
<!-- 盘点审核框 -->
<el-dialog :title="title" :visible.sync="openTEM" width="1232px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-col :span="10" align="left">
<el-form-item label="盘点单号" prop="orderCode">
<el-input v-model="form.orderCode" placeholder="自动生成" :readonly="true"/>
</el-form-item>
</el-col>
<el-col :span="10"align="left">
<el-form-item label="盘点仓库" prop="userDefined1">
<el-select v-model="form.userDefined1" placeholder="请选择盘点仓库">
<el-option
v-for="item in Optionlistck"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="10" align="left">
<el-form-item label="盘点人" prop="userDefined2">
<el-input v-model="form.userDefined2" />
</el-form-item>
</el-col>
<el-col :span="10" align="left">
<el-form-item label="盘点时间" prop="userDefined5">
<el-input v-model="form.userDefined5" />
</el-form-item>
</el-col>
<el-col :span="10" align="left">
<el-form-item label="盘点调整人:" prop="userDefined6">
<el-input v-model="form.userDefined6" />
</el-form-item>
</el-col>
<el-col :span="10" align="left">
<el-form-item label="盘点调整时间:" prop="userDefined7">
<el-input v-model="form.userDefined7" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table :data="associatedData" @selection-change="handleSelectionChange1">
<el-table-column type="selection" width="55" align="center" :index="indexMethod" />
<el-table-column label="序号" type="index"> </el-table-column>
<el-table-column label="库位" align="center" prop="locCode" />
<el-table-column label="托盘号" align="center" prop="userDefined2" />
<!-- <el-table-column label="批次号" align="center" prop="incomeBatchNo" />-->
<el-table-column label="产品编码" align="center" prop="materialCode" />
<el-table-column label="产品名称" align="center" prop="materialDesc" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="应盘数量" align="center" prop="locNumber" />
<el-table-column label="实际盘点数量" align="center" prop="realityNumber" />
<el-table-column label="盈亏" align="center">
<template slot-scope="scope">
{{ scope.row.locNumber > scope.row.realityNumber ? '盘亏' : (scope.row.locNumber < scope.row.realityNumber ? '盘盈' : '无') }}
</template>
</el-table-column>
<el-table-column label="盘点调整数量" align="center" prop="adjustmentAmount" />
<!-- -->
</el-table>
<el-input type="textarea" v-model="form.userDefined4" placeholder="审核意见"></el-input>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFormTEM"></el-button>
<el-button type="primary" @click="submitFormBOH"></el-button>
<el-button @click="cancelTEM"></el-button>
</div>
</el-dialog>
<!--订单选择弹窗-----------在父组件中接收选择的数据并将其添加到 selectedItemsList --> <!--订单选择弹窗-----------在父组件中接收选择的数据并将其添加到 selectedItemsList -->
<ItemSelectWorkOrderk <ItemSelectWorkOrderk
ref="ItemSelectWorkOrderk" ref="ItemSelectWorkOrderk"
@ -333,6 +473,9 @@
listSystemFinished, listSystemFinished,
getSystemFinished, getSystemFinished,
addOdsProductEmbryoInventory, addOdsProductEmbryoInventory,
AdjustInventoryList,
approve,
selectObtainTheAssociated,
delSystemFinished, delSystemFinished,
addSystemFinished, addSystemFinished,
updateSystemFinished } from "@/api/systemFinished/systemFinished"; updateSystemFinished } from "@/api/systemFinished/systemFinished";
@ -354,6 +497,7 @@
showFlags:false, showFlags:false,
// //
addoutorderList:[], addoutorderList:[],
associatedData:[],
// //
ids: [], ids: [],
// //
@ -374,6 +518,8 @@
title: "", title: "",
// //
open: false, open: false,
openTWO: false,
openTEM: false,
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -476,6 +622,8 @@
return '驳回'; return '驳回';
case "3": case "3":
return '已完成'; return '已完成';
case "4":
return '待审核';
default: default:
return ''; return '';
} }
@ -490,6 +638,17 @@
default: default:
return ''; return '';
} }
},
cancelTEM() {
this.openTEM = false;
this.associatedData = []; //
this.reset();
},
cancelTWO() {
this.openTWO = false;
this.associatedData = []; //
this.reset();
}, },
// //
cancel() { cancel() {
@ -566,6 +725,69 @@
// }); // });
// //
// }, // },
submitFormTEM() {
this.$refs["form"].validate(valid => {
if (valid) {
// formDataform
const formData = Object.assign({}, this.form);
// // addoutorderListformData
// 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) {
// formDataform
const formData = Object.assign({}, this.form);
// addoutorderListformData
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) {
// formDataform
const formData = Object.assign({}, this.form);
// // addoutorderListformData
// formData.odsProductEmbryoInventoryCorrelationList = this.associatedData;
formData.orderStatus = "2";
//
console.log("Merged Data:", formData);
const jsonData = JSON.stringify(formData);
//
approve(jsonData).then(response => {
//
}).catch(error => {
//
});
}
});
},
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
@ -599,7 +821,8 @@
this.open = true; this.open = true;
this.title = "盘点新增"; this.title = "盘点新增";
this.selectfactoryCodelist(); this.selectfactoryCodelist();
this.form.siteCode = '1000'; let factoryCode = localStorage.getItem('USER_POOL_NAME_CURRENT').substring(3)
this.form.siteCode = factoryCode;
this.getselect(); this.getselect();
}, },
getselect() { getselect() {
@ -627,10 +850,52 @@
row.id || this.ids row.id || this.ids
getSystemFinished(id).then(response => { getSystemFinished(id).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.openTWO = true;
this.title = "修改成品盘点单"; 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) { handleDeleteRW(row) {
console.log("Row Object:", row); console.log("Row Object:", row);

Loading…
Cancel
Save