优化
This commit is contained in:
@@ -4,13 +4,13 @@
|
||||
<el-form-item label="盘点单据" prop="stockCheckId">
|
||||
<el-input
|
||||
v-model="queryParams.stockCheckId"
|
||||
placeholder="请输入盘点单据"
|
||||
placeholder="请输入盘点单据号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="盘库类型" prop="checkType">
|
||||
<el-select v-model="queryParams.checkType" placeholder="请选择盘库类型" clearable>
|
||||
<el-form-item label="盘点类型" prop="checkType">
|
||||
<el-select v-model="queryParams.checkType" placeholder="请选择盘点类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.check_stock_type"
|
||||
:key="dict.value"
|
||||
@@ -19,8 +19,8 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择状态">
|
||||
<el-form-item label="单据状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.check_bill_status"
|
||||
:key="dict.value"
|
||||
@@ -46,17 +46,6 @@
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleInvalidated"
|
||||
v-hasPermi="['check:stockCheck:edit']"
|
||||
>作废</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
@@ -90,7 +79,17 @@
|
||||
v-hasPermi="['check:stockCheck:edit']"
|
||||
>确认</el-button>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleInvalidated"
|
||||
v-hasPermi="['check:stockCheck:edit']"
|
||||
>作废</el-button>
|
||||
</el-col>
|
||||
|
||||
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
@@ -99,7 +98,7 @@
|
||||
<el-table v-loading="loading" :data="stockCheckList" @selection-change="handleSelectionChange" @row-click="handleRowClick" max-height="400">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="盘点单据" align="left" prop="stockCheckId" />
|
||||
<el-table-column label="盘库类型" align="left" prop="checkType">
|
||||
<el-table-column label="盘点类型" align="left" prop="checkType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.check_stock_type" :value="scope.row.checkType"/>
|
||||
</template>
|
||||
@@ -113,9 +112,9 @@
|
||||
<!-- <el-table-column label="仓库" align="left" prop="warehouseName" />-->
|
||||
<el-table-column label="部门" align="left" prop="departmentName" />
|
||||
<el-table-column label="创建人" align="left" prop="createManId" />
|
||||
<el-table-column label="盘点位置" align="left" prop="spare1" />
|
||||
<el-table-column label="建立时间" align="left" prop="createDate" />
|
||||
<el-table-column label="完成日期" align="left" prop="finishDate" />
|
||||
<!-- <el-table-column label="盘点位置" align="left" prop="spare1" />-->
|
||||
<el-table-column label="创建时间" align="left" prop="createDate" />
|
||||
<el-table-column label="完成时间" align="left" prop="finishDate" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
@@ -130,8 +129,8 @@
|
||||
<el-table-column label="子单ID" align="left" prop="stockCheckDetailId" width="160" />
|
||||
<el-table-column label="主单ID" align="left" prop="stockCheckId" width="160" />
|
||||
<el-table-column label="货位名称" align="left" prop="cargoSpaceName" width="160"/>
|
||||
<el-table-column label="物料编码" align="left" prop="productId"/><!--物料编码-->
|
||||
<el-table-column label="物料名称" align="left" prop="productName" width="160"/><!--物料编码-->
|
||||
<el-table-column label="品号" align="left" prop="productId"/><!--品号-->
|
||||
<el-table-column label="品名" align="left" prop="productName" width="160"/><!--品号-->
|
||||
<el-table-column label="批号" align="left" prop="lotNo"/><!--批号-->
|
||||
<el-table-column label="机型" align="left" prop="unit"/><!--机型-->
|
||||
<el-table-column label="分销" align="left" prop="spare9"/><!--分销-->
|
||||
@@ -236,8 +235,8 @@ export default {
|
||||
// 所有出口数据(按仓库ID分组)
|
||||
allExitOptions: {
|
||||
'01': [
|
||||
{ exitId: "L2013", exitName: 'L2013' },
|
||||
{ exitId: 'L2012', exitName: 'L2012' },
|
||||
{ exitId: "L2004", exitName: 'L2004' },
|
||||
{ exitId: 'L2006', exitName: 'L2006' },
|
||||
]
|
||||
},
|
||||
// 当前审核的单据
|
||||
@@ -257,7 +256,7 @@ export default {
|
||||
checkType: null,
|
||||
createDate: null,
|
||||
createManId: null,
|
||||
status: '1',
|
||||
status: null,
|
||||
warehouseId: null,
|
||||
finishDate: null,
|
||||
erpBill: null,
|
||||
@@ -280,7 +279,7 @@ export default {
|
||||
{ required: true, message: "请输入盘点单据ID", trigger: "blur" }
|
||||
],
|
||||
checkType: [
|
||||
{ required: true, message: "请选择盘库类型", trigger: "change" }
|
||||
{ required: true, message: "请选择盘点类型", trigger: "change" }
|
||||
],
|
||||
createDate: [
|
||||
{ required: true, message: "请选择创建日期", trigger: "blur" }
|
||||
@@ -422,7 +421,7 @@ export default {
|
||||
/** 作废按钮操作 */
|
||||
handleInvalidated(row) {
|
||||
let stockCheck = this.stockCheckList.find(item => item.stockGuid === (row.stockGuid || this.ids[0]));
|
||||
if (stockCheck.status === "1") {
|
||||
if (stockCheck.status === "1" || stockCheck.status === "2") {
|
||||
let data = {
|
||||
"stockGuid": stockCheck.stockGuid,
|
||||
"status": "5"
|
||||
@@ -432,7 +431,7 @@ export default {
|
||||
this.getList()
|
||||
})
|
||||
} else {
|
||||
this.$modal.msgError('只有未审核的单据可以作废')
|
||||
this.$modal.msgError('只有未执行的单据可以作废')
|
||||
}
|
||||
},
|
||||
/** 审核按钮操作 */
|
||||
@@ -443,13 +442,14 @@ export default {
|
||||
return
|
||||
}
|
||||
if (stockCheck.status === "1") {
|
||||
// 保存当前审核的单据
|
||||
this.currentAuditStock = stockCheck
|
||||
// 根据单据的仓库ID设置出口选项
|
||||
this.setExitOptionsByWarehouse(stockCheck.warehouseId)
|
||||
// 显示审核弹窗
|
||||
this.auditDialogVisible = true
|
||||
this.auditForm.exitId = null
|
||||
const data = {
|
||||
"stockGuid": stockCheck.stockGuid,
|
||||
"status": "2"
|
||||
}
|
||||
updateStockCheck(data).then(response => {
|
||||
this.$modal.msgSuccess('审核成功')
|
||||
this.getList()
|
||||
})
|
||||
} else {
|
||||
this.$modal.msgError('只有未审核的单据可以审核')
|
||||
}
|
||||
@@ -480,7 +480,7 @@ export default {
|
||||
"stockGuid": this.ids[0]
|
||||
}
|
||||
autoAllocation(stockCheckData).then(response => {
|
||||
this.$modal.msgSuccess('自动分配成功')
|
||||
this.$modal.msgSuccess(response.msg)
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
@@ -526,10 +526,8 @@ export default {
|
||||
if (valid) {
|
||||
const data = {
|
||||
"stockGuid": this.currentAuditStock.stockGuid,
|
||||
"status": "2",
|
||||
"spare1": this.auditForm.exitId // 将选择的出口数据放入spare1字段
|
||||
"status": "2"
|
||||
}
|
||||
console.log('审核数据(含出口信息):', data)
|
||||
|
||||
updateStockCheck(data).then(response => {
|
||||
this.$modal.msgSuccess('审核成功')
|
||||
|
||||
Reference in New Issue
Block a user