|
|
|
@ -47,7 +47,7 @@
|
|
|
|
|
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
<el-form-item prop="invWarehouseCode">
|
|
|
|
|
<el-select v-model="formData.invWarehouseCode" placeholder="盘点分库信息"
|
|
|
|
|
<el-select v-model="formData.invWarehouseCode" placeholder="养护仓库信息"
|
|
|
|
|
:disabled="detailList.length >0 "
|
|
|
|
|
@change="warehouseChange"
|
|
|
|
|
clearable>
|
|
|
|
@ -70,7 +70,7 @@
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
<el-form-item class="query-form-item" prop="invSpaceCode">
|
|
|
|
|
<el-select v-model="formData.invSpaceCode" placeholder="盘点货位信息"
|
|
|
|
|
<el-select v-model="formData.invSpaceCode" placeholder="养护货位信息"
|
|
|
|
|
:disabled="detailList.length >0 "
|
|
|
|
|
clearable>
|
|
|
|
|
<el-option
|
|
|
|
@ -134,7 +134,7 @@
|
|
|
|
|
<el-table v-loading="loading" :data="detailList" style="width: 100%; margin-top: 10px;"
|
|
|
|
|
max-height="300" height="300" ref="multipleTable">
|
|
|
|
|
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
|
|
|
|
<el-table-column label="条码" width="150" prop="code"></el-table-column>
|
|
|
|
|
<el-table-column label="条码" width="180" prop="code" show-overflow-tooltip></el-table-column>
|
|
|
|
|
<el-table-column width="150"
|
|
|
|
|
label="产品通用名"
|
|
|
|
|
prop="productName"
|
|
|
|
@ -142,7 +142,7 @@
|
|
|
|
|
></el-table-column>
|
|
|
|
|
<el-table-column width="150" label="规格型号" prop="ggxh" show-overflow-tooltip></el-table-column>
|
|
|
|
|
<el-table-column width="150" label="批次号" prop="batchNo"></el-table-column>
|
|
|
|
|
<el-table-column width="150" label="养护数量" prop="count" show-overflow-tooltip></el-table-column>
|
|
|
|
|
<el-table-column width="150" label="养护数量" prop="count"></el-table-column>
|
|
|
|
|
<el-table-column width="150" label="养护状态" prop="maintenanceStatus">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-radio :disabled="scope.$index !== currentIndex" v-model="scope.row.maintenanceStatus"
|
|
|
|
@ -216,65 +216,56 @@
|
|
|
|
|
v-if="selectInvProductVisible"
|
|
|
|
|
:append-to-body='true'
|
|
|
|
|
>
|
|
|
|
|
<el-card>
|
|
|
|
|
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-form-item class="query-form-item">
|
|
|
|
|
<el-input v-model="filterQuery.nameCode" placeholder="产品标识DI"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item class="query-form-item">
|
|
|
|
|
<el-input v-model="filterQuery.cpmctymc" placeholder="产品名称"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item class="query-form-item">
|
|
|
|
|
<el-input v-model="filterQuery.batchNo" placeholder="批次号"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button-group>
|
|
|
|
|
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
|
|
|
|
|
<el-button type="primary" icon="search" @click="queryInvProducts"
|
|
|
|
|
>查询
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button type="primary" icon="search" @click="combine">确定</el-button>
|
|
|
|
|
</el-button-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form>
|
|
|
|
|
<el-form :inline="true" :model="filterQuery" size="mini">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-form-item class="query-form-item">
|
|
|
|
|
<el-input v-model="filterQuery.nameCode" placeholder="产品标识DI" clearable></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item class="query-form-item">
|
|
|
|
|
<el-input v-model="filterQuery.cpmctymc" placeholder="产品名称" clearable></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item class="query-form-item">
|
|
|
|
|
<el-input v-model="filterQuery.batchNo" placeholder="批次号" clearable></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button-group>
|
|
|
|
|
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
|
|
|
|
|
<el-button type="primary" icon="search" @click="queryInvProducts"
|
|
|
|
|
>查询
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button type="primary" icon="search" @click="combine">确定</el-button>
|
|
|
|
|
</el-button-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="productList" style="width: 100%"
|
|
|
|
|
highlight-current-row="false"
|
|
|
|
|
:row-key="getRowKeys"
|
|
|
|
|
@selection-change="handleSelectionChange"
|
|
|
|
|
ref="multipleTable">
|
|
|
|
|
<el-table-column
|
|
|
|
|
type="selection"
|
|
|
|
|
:reserve-selection="true"
|
|
|
|
|
width="55">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="序号" type="index"></el-table-column>
|
|
|
|
|
<el-table-column label="产品标识" prop="nameCode"></el-table-column>
|
|
|
|
|
<el-table-column label="产品名称" prop="cpmctymc"></el-table-column>
|
|
|
|
|
<el-table-column label="规格型号" prop="ggxh"></el-table-column>
|
|
|
|
|
<el-table-column label="批次号" prop="batchNo"></el-table-column>
|
|
|
|
|
<el-table-column label="生产日期" prop="productionDate"></el-table-column>
|
|
|
|
|
<el-table-column label="失效日期" prop="expireDate"></el-table-column>
|
|
|
|
|
<el-table-column label="入库数量" prop="inCount"></el-table-column>
|
|
|
|
|
<el-table-column label="出库数量" prop="outCount"></el-table-column>
|
|
|
|
|
<el-table-column label="结余数量" prop="reCount">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ (scope.row.inCount - scope.row.outCount) }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<el-table v-loading="loading" :data="productList" style="width: 100%"
|
|
|
|
|
highlight-current-row="false"
|
|
|
|
|
:row-key="getRowKeys"
|
|
|
|
|
@selection-change="handleSelectionChange"
|
|
|
|
|
ref="multipleTable">
|
|
|
|
|
<el-table-column
|
|
|
|
|
type="selection"
|
|
|
|
|
:reserve-selection="true"
|
|
|
|
|
width="55">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="序号" type="index"></el-table-column>
|
|
|
|
|
<el-table-column label="产品标识" prop="nameCode"></el-table-column>
|
|
|
|
|
<el-table-column label="产品名称" prop="cpmctymc"></el-table-column>
|
|
|
|
|
<el-table-column label="规格型号" prop="ggxh"></el-table-column>
|
|
|
|
|
<el-table-column label="批次号" prop="batchNo"></el-table-column>
|
|
|
|
|
<el-table-column label="生产日期" prop="productionDate" width="120"></el-table-column>
|
|
|
|
|
<el-table-column label="失效日期" prop="expireDate" width="120"></el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<el-pagination
|
|
|
|
|
:page-size="filterQuery.limit"
|
|
|
|
|
:current-page="filterQuery.page"
|
|
|
|
|
@current-change="handleCurrentChange"
|
|
|
|
|
layout="prev, pager, next"
|
|
|
|
|
:total="productTotal"
|
|
|
|
|
></el-pagination>
|
|
|
|
|
</el-card>
|
|
|
|
|
<el-pagination
|
|
|
|
|
:page-size="filterQuery.limit"
|
|
|
|
|
:current-page="filterQuery.page"
|
|
|
|
|
@current-change="handleCurrentChange"
|
|
|
|
|
layout="prev, pager, next"
|
|
|
|
|
:total="productTotal"
|
|
|
|
|
></el-pagination>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
@ -291,6 +282,7 @@ import {
|
|
|
|
|
deleteDetail,
|
|
|
|
|
getMAOrderDetailList
|
|
|
|
|
} from "@/api/inventory/invMAOrder";
|
|
|
|
|
import {getMAInvProducts} from "@/api/inventory/InvProducts";
|
|
|
|
|
import {isBlank} from "@/utils/strUtil";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
@ -311,11 +303,13 @@ export default {
|
|
|
|
|
nameCode: null,
|
|
|
|
|
cpmctymc: null,
|
|
|
|
|
batchNo: null,
|
|
|
|
|
invWarehouseCode: null,
|
|
|
|
|
invSpaceCode: null,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 10
|
|
|
|
|
},
|
|
|
|
|
productList: [],
|
|
|
|
|
productTotal: null,
|
|
|
|
|
productTotal: 0,
|
|
|
|
|
warehouseList: [],
|
|
|
|
|
spaceList: [],
|
|
|
|
|
formData: {
|
|
|
|
@ -323,13 +317,15 @@ export default {
|
|
|
|
|
createTime: null,
|
|
|
|
|
invWarehouseCode: null,
|
|
|
|
|
invSpaceCode: null,
|
|
|
|
|
status: 0,
|
|
|
|
|
code: null,
|
|
|
|
|
},
|
|
|
|
|
detailList: [],
|
|
|
|
|
loading: false,
|
|
|
|
|
scanText: "扫码录入:",
|
|
|
|
|
currentIndex: -1,
|
|
|
|
|
selectInvProductVisible: false
|
|
|
|
|
selectInvProductVisible: false,
|
|
|
|
|
multiProduct: []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
@ -353,10 +349,14 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
selectInvProduct() {
|
|
|
|
|
if (isBlank(this.formData.orderId)) {
|
|
|
|
|
this.saveOrder();
|
|
|
|
|
if (isBlank(this.formData.invWarehouseCode)) {
|
|
|
|
|
this.$message.error("请选择养护仓库");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//保存或更新养护记录仓库信息
|
|
|
|
|
this.saveOrder();
|
|
|
|
|
this.onReset();
|
|
|
|
|
this.selectInvProductVisible = true;
|
|
|
|
|
},
|
|
|
|
|
saveMAOrder() {
|
|
|
|
|
this.saveOrder();
|
|
|
|
@ -370,9 +370,8 @@ export default {
|
|
|
|
|
if (!isBlank(this.formData.orderId)) {
|
|
|
|
|
//更新单据
|
|
|
|
|
updateOrder(this.formData).then((res) => {
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
this.$message.success("更新成功!");
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
this.$message.error("更新单据信息失败!");
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
addOrder(this.formData).then((res) => {
|
|
|
|
@ -478,17 +477,73 @@ export default {
|
|
|
|
|
this.currentIndex = index;
|
|
|
|
|
},
|
|
|
|
|
onReset() {
|
|
|
|
|
this.filterQuery = {};
|
|
|
|
|
this.filterQuery = {
|
|
|
|
|
nameCode: null,
|
|
|
|
|
cpmctymc: null,
|
|
|
|
|
batchNo: null,
|
|
|
|
|
invWarehouseCode: null,
|
|
|
|
|
invSpaceCode: null,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 10
|
|
|
|
|
};
|
|
|
|
|
this.multiProduct = [];
|
|
|
|
|
this.queryInvProducts();
|
|
|
|
|
},
|
|
|
|
|
handleCurrentChange(val) {
|
|
|
|
|
this.filterQuery.page = 1;
|
|
|
|
|
this.filterQuery.page = val;
|
|
|
|
|
this.queryInvProducts();
|
|
|
|
|
},
|
|
|
|
|
queryInvProducts() {
|
|
|
|
|
|
|
|
|
|
this.filterQuery.invWarehouseCode = this.formData.invWarehouseCode;
|
|
|
|
|
this.filterQuery.invSpaceCode = this.formData.invSpaceCode;
|
|
|
|
|
getMAInvProducts(this.filterQuery).then((res) => {
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
this.productList = res.data.list || [];
|
|
|
|
|
this.productTotal = res.data.total || 0;
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(res.message);
|
|
|
|
|
this.productList = [];
|
|
|
|
|
this.productTotal = 0;
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
this.$message.error(error.message);
|
|
|
|
|
this.productList = [];
|
|
|
|
|
this.productTotal = 0;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
combine() {
|
|
|
|
|
|
|
|
|
|
if (this.multiProduct.length === 0) {
|
|
|
|
|
this.$message.error("请选择养护产品!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let invProductIds = [];
|
|
|
|
|
this.multiProduct.forEach(item => {
|
|
|
|
|
invProductIds.push(item.id);
|
|
|
|
|
});
|
|
|
|
|
let params = {
|
|
|
|
|
orderIdFk: this.formData.orderId,
|
|
|
|
|
invProductIds: invProductIds
|
|
|
|
|
};
|
|
|
|
|
batchAddDetail(params).then((res) => {
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
this.$message.success("录入成功!");
|
|
|
|
|
this.selectInvProductVisible = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(res.message);
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
this.$message.error(error.message);
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getRowKeys(row) {
|
|
|
|
|
return row.id;
|
|
|
|
|
},
|
|
|
|
|
handleSelectionChange(selectedRows) {
|
|
|
|
|
this.multiProduct = [];
|
|
|
|
|
selectedRows.forEach(item => {
|
|
|
|
|
this.multiProduct.push(item);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|