fix: 修复钢卷入库页面日期格式和操作功能
修复收货计划日期格式从"yyyy-MM-dd HH:mm:ss"改为"yyyy-MM-dd" 添加拒签和删除操作按钮功能 默认选中当天收货计划并提示未创建计划 修复表单提交后未正确重置的问题
This commit is contained in:
@@ -311,7 +311,7 @@ export default {
|
|||||||
const s = String(val)
|
const s = String(val)
|
||||||
const parts = s.split(':')
|
const parts = s.split(':')
|
||||||
const last = parts[parts.length - 1]
|
const last = parts[parts.length - 1]
|
||||||
const num = Number(last)
|
const num = last
|
||||||
return Number.isNaN(num) ? null : num
|
return Number.isNaN(num) ? null : num
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -16,8 +16,10 @@
|
|||||||
<el-option v-for="item in planList" :key="item.planId" :label="item.planName"
|
<el-option v-for="item in planList" :key="item.planId" :label="item.planName"
|
||||||
:value="item.planId" />
|
:value="item.planId" />
|
||||||
</el-select>
|
</el-select>
|
||||||
|
<!-- 默认选中今天的收货计划,如果今天还没有收货计划,提醒创建收货计划 -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 查找并选择,选择收货计划, 使用远程搜索 -->
|
<!-- 查找并选择,选择收货计划, 使用远程搜索 -->
|
||||||
|
<el-alert v-if="noPlan" type="warning" title="今天还没有收货计划,点击创建" show-icon @click.native="$router.push('/receive/plan')"></el-alert>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
@@ -45,12 +47,6 @@
|
|||||||
clearable />
|
clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="12">
|
|
||||||
<el-form-item label="实际库区" prop="actualWarehouseId">
|
|
||||||
<actual-warehouse-select v-model="form.actualWarehouseId" placeholder="请选择实际库区" style="width: 100%;"
|
|
||||||
clearable />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col> -->
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="班组" prop="team">
|
<el-form-item label="班组" prop="team">
|
||||||
<el-input v-model="form.team" placeholder="请输入班组" />
|
<el-input v-model="form.team" placeholder="请输入班组" />
|
||||||
@@ -179,11 +175,16 @@
|
|||||||
<el-tag v-else type="primary">未收货</el-tag>
|
<el-tag v-else type="primary">未收货</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="操作">
|
<el-table-column label="操作">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button v-if="scope.row.actionStatus == 0 || scope.row.actionStatus == 1" type="primary" @click="openReceiptModal(scope.row)">签收</el-button>
|
<el-button v-if="scope.row.actionStatus == 0 || scope.row.actionStatus == 1" type="primary"
|
||||||
|
@click="openReceiptModal(scope.row)" v-loading="buttonLoading">签收</el-button>
|
||||||
|
<el-button v-if="scope.row.actionStatus == 0 || scope.row.actionStatus == 1" type="danger"
|
||||||
|
@click="handleReject(scope.row)" v-loading="buttonLoading">拒签</el-button>
|
||||||
|
<el-button v-if="scope.row.actionStatus == 3" type="warning" v-loading="buttonLoading"
|
||||||
|
@click="handleDelete(scope.row)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column> -->
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<Pagination v-show="total > 0" :total="total" :page.sync="pagination.pageNum"
|
<Pagination v-show="total > 0" :total="total" :page.sync="pagination.pageNum"
|
||||||
@@ -220,8 +221,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { addMaterialCoil, updateMaterialCoilSimple, getMaterialCoil } from '@/api/wms/coil'
|
import { getMaterialCoil } from '@/api/wms/coil'
|
||||||
import { listPendingAction, addPendingAction, updatePendingAction } from '@/api/wms/pendingAction'
|
import { listPendingAction, delPendingAction, updatePendingAction } from '@/api/wms/pendingAction'
|
||||||
import MaterialSelect from "@/components/KLPService/MaterialSelect";
|
import MaterialSelect from "@/components/KLPService/MaterialSelect";
|
||||||
import ActualWarehouseSelect from "@/components/KLPService/ActualWarehouseSelect";
|
import ActualWarehouseSelect from "@/components/KLPService/ActualWarehouseSelect";
|
||||||
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
|
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
|
||||||
@@ -259,6 +260,7 @@ export default {
|
|||||||
trimmingRequirement: null,
|
trimmingRequirement: null,
|
||||||
packingStatus: null,
|
packingStatus: null,
|
||||||
packagingRequirement: null,
|
packagingRequirement: null,
|
||||||
|
planId: null,
|
||||||
},
|
},
|
||||||
loading: false,
|
loading: false,
|
||||||
buttonLoading: false,
|
buttonLoading: false,
|
||||||
@@ -297,7 +299,7 @@ export default {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
planList: [],
|
planList: [],
|
||||||
|
noPlan: false,
|
||||||
// 确认收货表单参数
|
// 确认收货表单参数
|
||||||
receiptModalVisible: false,
|
receiptModalVisible: false,
|
||||||
receiptForm: {
|
receiptForm: {
|
||||||
@@ -308,10 +310,13 @@ export default {
|
|||||||
remark: null,
|
remark: null,
|
||||||
},
|
},
|
||||||
coilInfo: {},
|
coilInfo: {},
|
||||||
|
todayPlanId: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList()
|
this.getList()
|
||||||
|
this.getTodayPlan()
|
||||||
|
this.remoteMethod('')
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
// 动态显示标签
|
// 动态显示标签
|
||||||
@@ -341,6 +346,20 @@ export default {
|
|||||||
this.planList = res.rows
|
this.planList = res.rows
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getTodayPlan() {
|
||||||
|
// 获取今天的收货计划
|
||||||
|
// 计划日期格式为yyyy-MM-dd
|
||||||
|
let today = new Date().toISOString().substring(0, 10)
|
||||||
|
// let today = '2025-01-01'
|
||||||
|
listDeliveryPlan({ planDate: today, pageNum: 1, pageSize: 1, planType: 1 }).then(res => {
|
||||||
|
if (res.rows.length > 0) {
|
||||||
|
this.form.planId = res.rows[0]?.planId
|
||||||
|
this.todayPlanId = res.rows[0]?.planId
|
||||||
|
} else {
|
||||||
|
this.noPlan = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
getList() {
|
getList() {
|
||||||
// 获取入库历史
|
// 获取入库历史
|
||||||
this.loading = true
|
this.loading = true
|
||||||
@@ -358,7 +377,19 @@ export default {
|
|||||||
handleCoil(COIL_ACTIONS.RECEIVE, this.form, this.form.planId)
|
handleCoil(COIL_ACTIONS.RECEIVE, this.form, this.form.planId)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
this.$modal.msgSuccess("入库成功");
|
this.$modal.msgSuccess("入库成功");
|
||||||
this.$refs.form.resetFields();
|
this.form = {
|
||||||
|
itemId: null,
|
||||||
|
itemType: 'raw_material',
|
||||||
|
warehouseId: '1988150044862377986', // 酸连轧原料库
|
||||||
|
netWeight: null,
|
||||||
|
grossWeight: null,
|
||||||
|
remark: null,
|
||||||
|
dataType: 10, // 表示将要入库但是还未入库的钢卷,一般用于钢卷入库的操作去创建一个无法被检索到的钢卷
|
||||||
|
trimmingRequirement: null,
|
||||||
|
packingStatus: null,
|
||||||
|
packagingRequirement: null,
|
||||||
|
planId: this.todayPlanId,
|
||||||
|
}
|
||||||
this.getList()
|
this.getList()
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.buttonLoading = false;
|
this.buttonLoading = false;
|
||||||
@@ -389,11 +420,45 @@ export default {
|
|||||||
.then(_ => {
|
.then(_ => {
|
||||||
this.$message.success("确认收货成功");
|
this.$message.success("确认收货成功");
|
||||||
this.getList()
|
this.getList()
|
||||||
|
this.receiptModalVisible = false;
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.buttonLoading = false;
|
this.buttonLoading = false;
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
handleReject(row) {
|
||||||
|
this.$modal.confirm("确认拒签吗?", "拒签确认", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.buttonLoading = true;
|
||||||
|
updatePendingAction({
|
||||||
|
...row,
|
||||||
|
actionStatus: 3, // 3表示拒签
|
||||||
|
}).then(response => {
|
||||||
|
this.$modal.msgSuccess("拒签成功");
|
||||||
|
this.getList();
|
||||||
|
}).finally(() => {
|
||||||
|
this.buttonLoading = false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleDelete(row) {
|
||||||
|
this.$modal.confirm("确认删除吗?", "删除确认", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.buttonLoading = true;
|
||||||
|
delPendingAction(row.actionId).then(response => {
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
this.getList();
|
||||||
|
}).finally(() => {
|
||||||
|
this.buttonLoading = false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
// 取消操作
|
// 取消操作
|
||||||
cancel() {
|
cancel() {
|
||||||
this.form = {};
|
this.form = {};
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<el-input v-model="queryParams.planName" placeholder="请输入收货计划名称" clearable @keyup.enter.native="handleQuery" />
|
<el-input v-model="queryParams.planName" placeholder="请输入收货计划名称" clearable @keyup.enter.native="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="计划日期" prop="planDate">
|
<el-form-item label="计划日期" prop="planDate">
|
||||||
<el-date-picker clearable v-model="queryParams.planDate" type="date" value-format="yyyy-MM-dd HH:mm:ss"
|
<el-date-picker clearable v-model="queryParams.planDate" type="date" value-format="yyyy-MM-dd"
|
||||||
placeholder="请选择计划日期">
|
placeholder="请选择计划日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|||||||
Reference in New Issue
Block a user