|
|
|
@ -93,7 +93,7 @@
|
|
|
|
|
icon="el-icon-edit"
|
|
|
|
|
size="mini"
|
|
|
|
|
:disabled="single"
|
|
|
|
|
@click="handleUpdate"
|
|
|
|
|
@click="handleUpdateTWO"
|
|
|
|
|
v-hasPermi="['systemFinished:systemFinished:edit']"
|
|
|
|
|
>审核
|
|
|
|
|
</el-button>
|
|
|
|
@ -311,6 +311,146 @@
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</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 中:-->
|
|
|
|
|
<ItemSelectWorkOrderk
|
|
|
|
|
ref="ItemSelectWorkOrderk"
|
|
|
|
@ -333,6 +473,9 @@
|
|
|
|
|
listSystemFinished,
|
|
|
|
|
getSystemFinished,
|
|
|
|
|
addOdsProductEmbryoInventory,
|
|
|
|
|
AdjustInventoryList,
|
|
|
|
|
approve,
|
|
|
|
|
selectObtainTheAssociated,
|
|
|
|
|
delSystemFinished,
|
|
|
|
|
addSystemFinished,
|
|
|
|
|
updateSystemFinished } from "@/api/systemFinished/systemFinished";
|
|
|
|
@ -354,6 +497,7 @@
|
|
|
|
|
showFlags:false,
|
|
|
|
|
//
|
|
|
|
|
addoutorderList:[],
|
|
|
|
|
associatedData:[],
|
|
|
|
|
// 选中数组
|
|
|
|
|
ids: [],
|
|
|
|
|
// 非单个禁用
|
|
|
|
@ -374,6 +518,8 @@
|
|
|
|
|
title: "",
|
|
|
|
|
// 是否显示弹出层
|
|
|
|
|
open: false,
|
|
|
|
|
openTWO: false,
|
|
|
|
|
openTEM: false,
|
|
|
|
|
// 查询参数
|
|
|
|
|
queryParams: {
|
|
|
|
|
pageNum: 1,
|
|
|
|
@ -476,6 +622,8 @@
|
|
|
|
|
return '驳回';
|
|
|
|
|
case "3":
|
|
|
|
|
return '已完成';
|
|
|
|
|
case "4":
|
|
|
|
|
return '待审核';
|
|
|
|
|
default:
|
|
|
|
|
return '';
|
|
|
|
|
}
|
|
|
|
@ -490,6 +638,17 @@
|
|
|
|
|
default:
|
|
|
|
|
return '';
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
cancelTEM() {
|
|
|
|
|
this.openTEM = false;
|
|
|
|
|
this.associatedData = []; // 清空表格数据
|
|
|
|
|
this.reset();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
cancelTWO() {
|
|
|
|
|
this.openTWO = false;
|
|
|
|
|
this.associatedData = []; // 清空表格数据
|
|
|
|
|
this.reset();
|
|
|
|
|
},
|
|
|
|
|
// 取消按钮
|
|
|
|
|
cancel() {
|
|
|
|
@ -566,6 +725,69 @@
|
|
|
|
|
// });
|
|
|
|
|
//
|
|
|
|
|
// },
|
|
|
|
|
submitFormTEM() {
|
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|