|
@@ -62,15 +62,31 @@
|
|
|
<el-form-item style="margin-left: 0">
|
|
|
<el-button type="info" icon="Search" @click="handleQuery">搜索
|
|
|
</el-button>
|
|
|
+ <el-button :disabled="queryParams.deptId == null || queryParams.deptId == '0'" type="primary" icon="Check" @click="handleTaksLot">一键盘点未开始批次
|
|
|
+ </el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div class="el-table-container">
|
|
|
<div class="el-table-inner-container">
|
|
|
<el-table v-loading="loading" :data="dataList" size="small" border height="100%">
|
|
|
<el-table-column label="行号" type="index" align="center" width="48" />
|
|
|
- <el-table-column label="计划单号" align="center" prop="productionPlanNo" width="104" />
|
|
|
- <el-table-column label="批次号" align="center" prop="lotCode" width="104" />
|
|
|
+ <el-table-column
|
|
|
+ label="批次号"
|
|
|
+ prop="lotCode"
|
|
|
+ align="center"
|
|
|
+ width="120px"
|
|
|
+ >
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button
|
|
|
+ link
|
|
|
+ type="primary"
|
|
|
+ @click="handleColumnClick(scope.row.lotCode)"
|
|
|
+ ><span>{{ scope.row.lotCode }}</span></el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="产品描述" align="center" prop="productDescription" />
|
|
|
+ <el-table-column label="箱号" align="center" prop="carrierName" width="120" />
|
|
|
<el-table-column label="生产状态" prop="isProductStatus" width="90" align="center" >
|
|
|
<template #default="scope">
|
|
|
<dict-tag :options="inventory_production_status" :value="scope.row.isProductStatus" />
|
|
@@ -169,17 +185,18 @@
|
|
|
|
|
|
</div>
|
|
|
<!-- 分页 -->
|
|
|
- <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
|
|
- v-model:limit="queryParams.pageSize" @pagination="getList" />
|
|
|
+ <paginationMax v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
|
|
+ v-model:limit="queryParams.pageSize" @pagination="getList" />
|
|
|
</div>
|
|
|
</el-drawer>
|
|
|
</template>
|
|
|
<script setup>
|
|
|
import {
|
|
|
- listTaksStockLot,updateTaksStockLot
|
|
|
+ listTaksStockLot,updateTaksStockLot,updateNoStartLot
|
|
|
} from "@/api/business/taksStockLot";
|
|
|
import { getDeptList } from "@/api/business/planDetailSubDetail.js";
|
|
|
import { ref } from "vue";
|
|
|
+import router from "@/router";
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
/** 字典 */
|
|
|
const { is_identification } = proxy.useDict("is_identification");
|
|
@@ -197,7 +214,7 @@ const dataList = ref([])
|
|
|
/** 查询对象 */
|
|
|
const queryParams = ref({
|
|
|
pageNum: 1,
|
|
|
- pageSize: 10,
|
|
|
+ pageSize: 50,
|
|
|
productDescription: "",
|
|
|
lotCode: "",
|
|
|
deptId: null,
|
|
@@ -214,7 +231,6 @@ const open = (row) => {
|
|
|
getDeptList().then((response) => {
|
|
|
deptList.value = response.data.rows;
|
|
|
isDispatch.value = response.data.others.isDispatch;
|
|
|
- loading.value = false;
|
|
|
if (isDispatch.value) {
|
|
|
deptList.value.unshift({ label: "全部", value: "0" });
|
|
|
}
|
|
@@ -224,6 +240,7 @@ const open = (row) => {
|
|
|
});
|
|
|
}
|
|
|
function getList() {
|
|
|
+ loading.value = true
|
|
|
listTaksStockLot(queryParams.value).then(res =>{
|
|
|
res.rows.forEach(element => {
|
|
|
element.isTaksStock = element.isTaksStock +""
|
|
@@ -231,6 +248,7 @@ function getList() {
|
|
|
});
|
|
|
dataList.value = res.rows;
|
|
|
total.value = res.total;
|
|
|
+ loading.value = false
|
|
|
})
|
|
|
}
|
|
|
function handleEdit(row,index) {
|
|
@@ -241,6 +259,16 @@ function handleEdit(row,index) {
|
|
|
}
|
|
|
console.log(row)
|
|
|
}
|
|
|
+//一键盘点
|
|
|
+function handleTaksLot() {
|
|
|
+ console.log(queryParams.value.deptId)
|
|
|
+ updateNoStartLot({takeStockPeriodId:queryParams.value.takeStockPeriodId,deptId:queryParams.value.deptId}).then(res =>{
|
|
|
+ if(res.code == 200){
|
|
|
+ proxy.$modal.msgSuccess("盘点成功");
|
|
|
+ getList()
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
function handleSave(row) {
|
|
|
updateTaksStockLot(row).then(res =>{
|
|
|
if(res.code == 200){
|
|
@@ -249,6 +277,10 @@ function handleSave(row) {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+/** 打开批次详情页 */
|
|
|
+function handleColumnClick(lotCode) {
|
|
|
+ router.push({ path: "/reviseBath/lotFormParticulars/" + lotCode });
|
|
|
+}
|
|
|
function handleChangeTaksStock(value,row,index) {
|
|
|
if(value == 0) {
|
|
|
dataList.value[index].taksStockNum = 0
|
|
@@ -276,7 +308,7 @@ const cancel = () => {
|
|
|
const reset = () => {
|
|
|
queryParams.value = {
|
|
|
pageNum: 1,
|
|
|
- pageSize: 10,
|
|
|
+ pageSize: 50,
|
|
|
productDescription: "",
|
|
|
lotCode: "",
|
|
|
deptId: null,
|