|
|
|
@ -21,6 +21,8 @@
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="盘点位置" prop="locCode">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.locCode"
|
|
|
|
@ -29,9 +31,9 @@
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="盘点单状态" prop="userDefined2">
|
|
|
|
|
<el-form-item label="盘点单状态" prop="orderStatus">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.userDefined2"
|
|
|
|
|
v-model="queryParams.orderStatus"
|
|
|
|
|
placeholder="盘点单状态"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
@ -103,7 +105,7 @@
|
|
|
|
|
icon="el-icon-delete"
|
|
|
|
|
size="mini"
|
|
|
|
|
:disabled="multiple"
|
|
|
|
|
@click="handleDelete"
|
|
|
|
|
@click="handleDeleteRW"
|
|
|
|
|
v-hasPermi="['systemFinished:systemFinished:remove']"
|
|
|
|
|
>关闭
|
|
|
|
|
</el-button>
|
|
|
|
@ -145,11 +147,11 @@
|
|
|
|
|
<el-table-column label="库存数量" align="center" prop="locNumber"v-if="false" />
|
|
|
|
|
<el-table-column label="单位" align="center" prop="Unit"v-if="false" />
|
|
|
|
|
<el-table-column label="实际数量" align="center" prop="realityNumber"v-if="false" />
|
|
|
|
|
<el-table-column label="订单状态" align="center" prop="orderStatus"/>
|
|
|
|
|
<el-table-column label="盘点单状态" align="center" prop="orderStatus"/>
|
|
|
|
|
<el-table-column label="盘点仓库" align="center" prop="userDefined1"/>
|
|
|
|
|
<el-table-column label="盘点位置" align="center" prop="locCode"/>
|
|
|
|
|
<el-table-column label="盘点类型" align="center" prop="userDefined3" />
|
|
|
|
|
<el-table-column label="盘点单状态" align="center" prop="userDefined2"/>
|
|
|
|
|
<!-- <el-table-column label="盘点单状态" align="center" prop="userDefined2"/>-->
|
|
|
|
|
|
|
|
|
|
<el-table-column label="审核意见" align="center" prop="userDefined4" />
|
|
|
|
|
<el-table-column label="盘点时间" align="center" prop="userDefined5"/>
|
|
|
|
@ -189,7 +191,7 @@
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-delete"
|
|
|
|
|
@click="handleDelete(scope.row)"
|
|
|
|
|
@click="handleDeleteRW(scope.row)"
|
|
|
|
|
v-hasPermi="['systemFinished:systemFinished:remove']"
|
|
|
|
|
>删除
|
|
|
|
|
</el-button>
|
|
|
|
@ -209,44 +211,86 @@
|
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="1232px" append-to-body>
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-col :span="10" align="left">
|
|
|
|
|
<el-form-item label="盘点单号" prop="orderCode">
|
|
|
|
|
<el-input v-model="form.orderCode" placeholder="请输入盘点单号"/>
|
|
|
|
|
<el-input v-model="form.orderCode" placeholder="自动生成" :readonly="true"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<!-- <el-col :span="8">-->
|
|
|
|
|
<!-- <el-form-item label="工厂编码" prop="siteCode">-->
|
|
|
|
|
<!-- <el-input v-model="form.siteCode" placeholder="请输入工厂编码"/>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
|
|
|
|
|
<el-col :span="10"align="left">
|
|
|
|
|
<el-form-item label="工厂编码" prop="siteCode">
|
|
|
|
|
<el-input v-model="form.siteCode" placeholder="请输入工厂编码"/>
|
|
|
|
|
<el-select v-model="form.siteCode" placeholder="请选择工厂编码"placement="bottom">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in factoryOptions"
|
|
|
|
|
:key="item.value"
|
|
|
|
|
:label="item.label"
|
|
|
|
|
:value="item.value"
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-col :span="10"align="left">
|
|
|
|
|
<el-form-item label="盘点仓库" prop="userDefined1">
|
|
|
|
|
<el-input v-model="form.userDefined1" placeholder="请输入盘点仓库"/>
|
|
|
|
|
<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="8">
|
|
|
|
|
<el-form-item label="盘点位置" prop="locCode">
|
|
|
|
|
<el-input v-model="form.locCode" placeholder="请输入盘点位置"/>
|
|
|
|
|
<el-col :span="10"align="left">
|
|
|
|
|
<el-form-item label="盘点位置" prop="userDefined1">
|
|
|
|
|
<el-select v-model="form.locCode" placeholder="请选择盘点位置"placement="bottom">
|
|
|
|
|
<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="8">
|
|
|
|
|
<el-col :span="10" align="left">
|
|
|
|
|
<el-form-item label="盘点类型" prop="userDefined3">
|
|
|
|
|
<el-input v-model="form.userDefined3" placeholder="请输入盘点类型"/>
|
|
|
|
|
<el-select v-model="form.userDefined3" placeholder="请选择盘点类型"placement="bottom">
|
|
|
|
|
<el-option label="明盘" value="0"></el-option>
|
|
|
|
|
<el-option label="盲盘" value="1"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-col :span="10" align="left">
|
|
|
|
|
<el-form-item label="盘点策略" prop="userDefined10">
|
|
|
|
|
<el-input v-model="form.userDefined10" placeholder="请输入盘点策略"/>
|
|
|
|
|
<el-select v-model="form.userDefined10" placeholder="请选择盘点策略"placement="bottom">
|
|
|
|
|
<el-option label="物料盘点" value="0"></el-option>
|
|
|
|
|
<el-option label="库位盘点" value="1"></el-option>
|
|
|
|
|
<el-option label="手工盘点" value="2"></el-option>
|
|
|
|
|
<el-option label="变动盘点" value="3"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="10">
|
|
|
|
|
<el-form-item label="产品状态" prop="userDefined11">
|
|
|
|
|
<el-input v-model="form.userDefined11" placeholder="请输入用户自定义属性11"/>
|
|
|
|
|
<el-select v-model="form.userDefined11" placeholder="请选择产品状态"placement="bottom">
|
|
|
|
|
<el-option label="全部" value="0"></el-option>
|
|
|
|
|
<el-option label="非限制" value="1"></el-option>
|
|
|
|
|
<el-option label="冻结" value="2"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
|
|
|
|
|
<el-col :span="10">
|
|
|
|
|
<el-form-item label="备注" prop="Remark">
|
|
|
|
|
<el-input v-model="form.Remark" type="textarea" placeholder="请输入内容"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -256,29 +300,28 @@
|
|
|
|
|
</el-form>
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handlequeryform">清空</el-button>
|
|
|
|
|
<el-button type="primary" plain icon="el-icon-delete" size="mini" @click="Warehempty">清空</el-button>
|
|
|
|
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="WarehouseLocationCreation">仓库/位置创建</el-button>
|
|
|
|
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="MaterialCreation()">物资创建</el-button>
|
|
|
|
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="WarehouseLocationCreationTWO()">物资创建</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-table :data="addoutorderList" @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="wlCode" />
|
|
|
|
|
<el-table-column label="托盘号" align="center" prop="sn" />
|
|
|
|
|
<el-table-column label="批次号" align="center" prop="incomeBatchNo" />
|
|
|
|
|
<el-table-column label="物料编码" align="center" prop="materialCode" />
|
|
|
|
|
<el-table-column label="物料名称" align="center" prop="materialName" />
|
|
|
|
|
<!-- <el-table-column label="批次号" align="center" prop="incomeBatchNo" />-->
|
|
|
|
|
<el-table-column label="产品编码" align="center" prop="productCode" />
|
|
|
|
|
<el-table-column label="产品名称" align="center" prop="productName" />
|
|
|
|
|
<el-table-column label="单位" align="center" prop="unit" />
|
|
|
|
|
<el-table-column label="应盘数量" align="center" prop="quantity" />
|
|
|
|
|
|
|
|
|
|
<el-table-column label="应盘数量" align="center" prop="amount" />
|
|
|
|
|
<el-table-column label="操作" align="center" width="180">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button type="text" size="mini" @click="handleDeleteRW(scope.row)">删除</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
@ -287,12 +330,20 @@
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<!--订单选择弹窗-->
|
|
|
|
|
<!--订单选择弹窗-----------在父组件中接收选择的数据,并将其添加到 selectedItemsList 中:-->
|
|
|
|
|
<ItemSelectWorkOrderk
|
|
|
|
|
ref="ItemSelectWorkOrderk"
|
|
|
|
|
@onSelected="onSelectWorkOrder"
|
|
|
|
|
></ItemSelectWorkOrderk>
|
|
|
|
|
|
|
|
|
|
<ItemSelectWorkOrderkTwo
|
|
|
|
|
ref="ItemSelectWorkOrderkTwo"
|
|
|
|
|
@onSelected="onSelectWorkOrder"
|
|
|
|
|
></ItemSelectWorkOrderkTwo>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -300,19 +351,24 @@
|
|
|
|
|
import {
|
|
|
|
|
listSystemFinished,
|
|
|
|
|
getSystemFinished,
|
|
|
|
|
addOdsProductEmbryoInventory,
|
|
|
|
|
delSystemFinished,
|
|
|
|
|
addSystemFinished,
|
|
|
|
|
updateSystemFinished } from "@/api/systemFinished/systemFinished";
|
|
|
|
|
import ItemSelectWorkOrderk from "./selectWorkOrder.vue";
|
|
|
|
|
import ItemSelectWorkOrderkTwo from "./selectWorkOrderTwo.vue";
|
|
|
|
|
import {getBoardFactory} from "../../../api/kanban/Packagingline";
|
|
|
|
|
import {getlistCK} from "../../../api/wms/outorder";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "SystemFinished",
|
|
|
|
|
components: { ItemSelectWorkOrderk},
|
|
|
|
|
components: { ItemSelectWorkOrderk,ItemSelectWorkOrderkTwo},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
// 遮罩层
|
|
|
|
|
loading: true,
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
selectedItemsList: [],
|
|
|
|
|
//
|
|
|
|
|
showFlags:false,
|
|
|
|
|
//
|
|
|
|
@ -330,7 +386,9 @@
|
|
|
|
|
// 成品盘点单表格数据
|
|
|
|
|
systemFinishedList: [],
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
factoryOptions:[],
|
|
|
|
|
Optionlistck:[],
|
|
|
|
|
locCodelistck:[],
|
|
|
|
|
// 弹出层标题
|
|
|
|
|
title: "",
|
|
|
|
|
// 是否显示弹出层
|
|
|
|
@ -430,6 +488,7 @@
|
|
|
|
|
// 取消按钮
|
|
|
|
|
cancel() {
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.addoutorderList = []; // 清空表格数据
|
|
|
|
|
this.reset();
|
|
|
|
|
},
|
|
|
|
|
// 表单重置
|
|
|
|
@ -479,6 +538,49 @@
|
|
|
|
|
this.resetForm("queryForm");
|
|
|
|
|
this.handleQuery();
|
|
|
|
|
},
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
// submitForm() {
|
|
|
|
|
// this.$refs["form"].validate(valid => {
|
|
|
|
|
// console.log("-"+valid)
|
|
|
|
|
// if (valid) {
|
|
|
|
|
// console.log("---"+this.form)
|
|
|
|
|
//
|
|
|
|
|
// // 使用 JSON.stringify() 将对象转换为字符串再打印
|
|
|
|
|
// console.log("--- Form Data:", JSON.stringify(this.form));
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
// console.log("---"+this.addoutorderList)
|
|
|
|
|
// this.addoutorderList.forEach(item => {
|
|
|
|
|
// console.log(item);
|
|
|
|
|
// });
|
|
|
|
|
//
|
|
|
|
|
// addOdsProductEmbryoInventory().then(response => {
|
|
|
|
|
//
|
|
|
|
|
// });
|
|
|
|
|
//
|
|
|
|
|
// },
|
|
|
|
|
submitForm() {
|
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
// 创建一个新对象formData并将form属性赋值给它
|
|
|
|
|
const formData = Object.assign({}, this.form);
|
|
|
|
|
|
|
|
|
|
// 将addoutorderList数组赋值给formData对象
|
|
|
|
|
formData.addoutorderList = this.addoutorderList;
|
|
|
|
|
|
|
|
|
|
// 打印整合后的数据对象
|
|
|
|
|
console.log("Merged Data:", formData);
|
|
|
|
|
const jsonData = JSON.stringify(formData);
|
|
|
|
|
// 调用接口并传递整合后的数据对象
|
|
|
|
|
addOdsProductEmbryoInventory(jsonData).then(response => {
|
|
|
|
|
// 处理接口返回结果
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
// 处理接口请求错误
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 多选框选中数据
|
|
|
|
|
handleSelectionChange(selection) {
|
|
|
|
|
this.ids = selection.map(item => item.ID)
|
|
|
|
@ -490,6 +592,27 @@
|
|
|
|
|
this.reset();
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "盘点新增";
|
|
|
|
|
this.selectfactoryCodelist();
|
|
|
|
|
this.form.siteCode = '1000';
|
|
|
|
|
this.getselect();
|
|
|
|
|
},
|
|
|
|
|
getselect() {
|
|
|
|
|
// config.headers['poolName'] = localStorage.getItem('USER_POOL_NAME_CURRENT');
|
|
|
|
|
let factoryCode = localStorage.getItem('USER_POOL_NAME_CURRENT').substring(3)
|
|
|
|
|
let params = { factoryCode: factoryCode }; // 构造一个包含工厂代码的对象
|
|
|
|
|
let paramsJSON = JSON.stringify(params); // 将对象转换为JSON字符串
|
|
|
|
|
console.log(factoryCode)
|
|
|
|
|
getlistCK(paramsJSON).then(response => {
|
|
|
|
|
//this.Optionlistck = response.data
|
|
|
|
|
console.log(response)
|
|
|
|
|
if (response.data) {
|
|
|
|
|
this.Optionlistck = response.data.map(item => ({
|
|
|
|
|
value: item.userDefined1,
|
|
|
|
|
label: item.userDefined2
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
// console.log(this.Optionlistck)
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
handleUpdate(row) {
|
|
|
|
@ -502,30 +625,69 @@
|
|
|
|
|
this.title = "修改成品盘点单";
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
handleDeleteRW(row){
|
|
|
|
|
let datas =this.addoutorderList
|
|
|
|
|
for(var i=0;i<datas.length;i++){
|
|
|
|
|
if (datas[i],key==row.key){
|
|
|
|
|
datas.splice(i,1);
|
|
|
|
|
}
|
|
|
|
|
handleDeleteRW(row) {
|
|
|
|
|
console.log("Row Object:", row);
|
|
|
|
|
|
|
|
|
|
if (row && row.storageId) {
|
|
|
|
|
let datas = this.addoutorderList;
|
|
|
|
|
for (var i = 0; i < datas.length; i++) {
|
|
|
|
|
if (datas[i].storageId === row.storageId) {
|
|
|
|
|
datas.splice(i, 1);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
console.error("Unique identifier 'storageId' is not defined in the row object.");
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
selectfactoryCodelist() {
|
|
|
|
|
const _this = this;
|
|
|
|
|
// 假设getFactoryData是用于获取工厂数据的接口函数
|
|
|
|
|
getBoardFactory({
|
|
|
|
|
factory: null
|
|
|
|
|
})
|
|
|
|
|
.then((response) => {
|
|
|
|
|
console.log(response)
|
|
|
|
|
if (response.data) {
|
|
|
|
|
_this.factoryOptions = response.data.map(item => ({
|
|
|
|
|
value: item.parentName,
|
|
|
|
|
label: item.deptName
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((error) => {
|
|
|
|
|
console.error("Failed to fetch factory data: ", error);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
WarehouseLocationCreation(){
|
|
|
|
|
console.log("---sda")
|
|
|
|
|
this.$refs.ItemSelectWorkOrderk.showFlags = true;
|
|
|
|
|
console.log("---ssda")
|
|
|
|
|
},
|
|
|
|
|
onSelectWorkOrder(obj) {
|
|
|
|
|
this.form.orderNo = obj.workorderCode;
|
|
|
|
|
this.form.materialName = obj.materialName;
|
|
|
|
|
this.form.materialCode = obj.materialCode;
|
|
|
|
|
this.form.quality = obj.quality;
|
|
|
|
|
this.form.unit = obj.unit;
|
|
|
|
|
this.form.incomeTime = obj.incomeTime;
|
|
|
|
|
getBatchList(obj.workorderCode).then(response => {
|
|
|
|
|
this.batchList = response;
|
|
|
|
|
});
|
|
|
|
|
WarehouseLocationCreationTWO(){
|
|
|
|
|
console.log("---sda")
|
|
|
|
|
this.$refs.ItemSelectWorkOrderkTwo.showFlags = true;
|
|
|
|
|
console.log("---ssda")
|
|
|
|
|
},
|
|
|
|
|
Warehempty(){
|
|
|
|
|
this.addoutorderList = []; // 清空数据
|
|
|
|
|
},
|
|
|
|
|
onSelectWorkOrder(selectedData) {
|
|
|
|
|
console.log("----------;;"+selectedData.length)
|
|
|
|
|
// this.form.unit = selectedData.unit;
|
|
|
|
|
// this.form.productName = selectedData.productName;
|
|
|
|
|
// this.form.productCode = selectedData.productCode;
|
|
|
|
|
// this.form.amount = selectedData.amount;
|
|
|
|
|
// this.form.wlCode = selectedData.wlCode;
|
|
|
|
|
// this.form.sn = selectedData.sn;
|
|
|
|
|
// 将选择的数据添加到 addoutorderList 数组中
|
|
|
|
|
// this.addoutorderList.push(selectedData);
|
|
|
|
|
this.addoutorderList.push(...selectedData);
|
|
|
|
|
//查询库存--精确到库位
|
|
|
|
|
// getBatchList(obj.workorderCode).then(response => {
|
|
|
|
|
// this.batchList = response;
|
|
|
|
|
// });
|
|
|
|
|
},
|
|
|
|
|
MaterialCreation(){
|
|
|
|
|
|
|
|
|
|