|
@@ -0,0 +1,375 @@
|
|
|
|
|
+<template>
|
|
|
|
|
+ <div class="app-container">
|
|
|
|
|
+ <el-card shadow="never" class="mb16 filter-card">
|
|
|
|
|
+ <el-form :model="queryParams" ref="queryForm" :inline="true" size="small" class="list-search-form">
|
|
|
|
|
+ <el-form-item label="调拨单号" prop="transferNo">
|
|
|
|
|
+ <el-input v-model="queryParams.transferNo" placeholder="请输入调拨单号" clearable @keyup.enter.native="handleQuery" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="状态" prop="status">
|
|
|
|
|
+ <el-select v-model="queryParams.status" placeholder="全部" clearable style="width:140px">
|
|
|
|
|
+ <el-option v-for="(v, k) in statusMap" :key="k" :label="v" :value="k" />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item>
|
|
|
|
|
+ <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
|
|
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ </el-card>
|
|
|
|
|
+
|
|
|
|
|
+ <el-row :gutter="10" class="mb8 list-toolbar">
|
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
|
+ <el-button type="primary" icon="el-icon-plus" size="mini" @click="openEdit(null)" v-hasPermi="['supplychain:inventoryTransfer:add']">新增调拨单</el-button>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" />
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+
|
|
|
|
|
+ <el-table border v-loading="loading" :data="list" size="small" style="width:100%">
|
|
|
|
|
+ <el-table-column label="调拨单号" prop="transferNo" min-width="160" show-overflow-tooltip />
|
|
|
|
|
+ <el-table-column label="调出门店" prop="fromStoreName" min-width="120" show-overflow-tooltip />
|
|
|
|
|
+ <el-table-column label="调入门店" prop="toStoreName" min-width="120" show-overflow-tooltip />
|
|
|
|
|
+ <el-table-column label="总数量" prop="totalQuantity" min-width="80" align="center" />
|
|
|
|
|
+ <el-table-column label="总金额" prop="totalAmount" min-width="90" align="center" />
|
|
|
|
|
+ <el-table-column label="状态" align="center" min-width="90">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-tag :type="statusTagType(scope.row.status)" size="mini">{{ scope.row.statusName || statusMap[scope.row.status] || scope.row.status }}</el-tag>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="申请人" prop="applyUserName" min-width="90" align="center" />
|
|
|
|
|
+ <el-table-column label="申请时间" prop="applyTime" min-width="150" align="center" />
|
|
|
|
|
+ <el-table-column label="操作" align="center" width="280" fixed="right" class-name="small-padding fixed-width">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-button size="mini" type="text" icon="el-icon-view" @click="openDetail(scope.row)" v-hasPermi="['supplychain:inventoryTransfer:query']">详情</el-button>
|
|
|
|
|
+ <el-button v-if="scope.row.status === 'DRAFT'" size="mini" type="text" icon="el-icon-edit" @click="openEdit(scope.row)" v-hasPermi="['supplychain:inventoryTransfer:edit']">编辑</el-button>
|
|
|
|
|
+ <el-button v-if="scope.row.status === 'DRAFT'" size="mini" type="text" icon="el-icon-s-promotion" @click="handleSubmit(scope.row)" v-hasPermi="['supplychain:inventoryTransfer:submit']">提交</el-button>
|
|
|
|
|
+ <el-button v-if="scope.row.status === 'SUBMITTED'" size="mini" type="text" icon="el-icon-check" @click="openAudit(scope.row)" v-hasPermi="['supplychain:inventoryTransfer:audit']">审批</el-button>
|
|
|
|
|
+ <el-button v-if="scope.row.status === 'APPROVED'" size="mini" type="text" icon="el-icon-truck" @click="handleShip(scope.row)" v-hasPermi="['supplychain:inventoryTransfer:ship']">发货</el-button>
|
|
|
|
|
+ <el-button v-if="scope.row.status === 'IN_TRANSIT'" size="mini" type="text" icon="el-icon-box" @click="openReceive(scope.row)" v-hasPermi="['supplychain:inventoryTransfer:receive']">收货</el-button>
|
|
|
|
|
+ <el-button v-if="['DRAFT', 'SUBMITTED'].includes(scope.row.status)" size="mini" type="text" icon="el-icon-close" @click="handleCancel(scope.row)" v-hasPermi="['supplychain:inventoryTransfer:cancel']">取消</el-button>
|
|
|
|
|
+ <el-button v-if="scope.row.status === 'DRAFT'" size="mini" type="text" style="color:#f5222d" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['supplychain:inventoryTransfer:remove']">删除</el-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+
|
|
|
|
|
+ <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 新增/编辑弹窗 -->
|
|
|
|
|
+ <el-dialog :title="editTitle" :visible.sync="editVisible" width="760px" append-to-body @closed="resetEdit">
|
|
|
|
|
+ <el-form ref="editForm" :model="editForm" :rules="editRules" label-width="100px">
|
|
|
|
|
+ <el-row :gutter="10">
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="调出门店ID" prop="fromStoreId">
|
|
|
|
|
+ <el-input-number v-model="editForm.fromStoreId" :min="1" style="width:100%" placeholder="请输入调出门店ID" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="调出门店名称" prop="fromStoreName">
|
|
|
|
|
+ <el-input v-model="editForm.fromStoreName" placeholder="请输入调出门店名称" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="调入门店ID" prop="toStoreId">
|
|
|
|
|
+ <el-input-number v-model="editForm.toStoreId" :min="1" style="width:100%" placeholder="请输入调入门店ID" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="调入门店名称" prop="toStoreName">
|
|
|
|
|
+ <el-input v-model="editForm.toStoreName" placeholder="请输入调入门店名称" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-form-item label="备注" prop="remark">
|
|
|
|
|
+ <el-input v-model="editForm.remark" type="textarea" :rows="2" placeholder="请输入备注" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-divider content-position="left">调拨明细</el-divider>
|
|
|
|
|
+ <div v-for="(item, idx) in editForm.items" :key="idx" class="item-row">
|
|
|
|
|
+ <el-input-number v-model="item.productId" :min="1" size="small" placeholder="商品ID" style="width:100px" />
|
|
|
|
|
+ <el-input v-model="item.productName" size="small" placeholder="商品名称" style="width:160px" />
|
|
|
|
|
+ <el-input v-model="item.productSpec" size="small" placeholder="规格" style="width:110px" />
|
|
|
|
|
+ <el-input v-model="item.unit" size="small" placeholder="单位" style="width:70px" />
|
|
|
|
|
+ <el-input-number v-model="item.quantity" :min="1" size="small" placeholder="数量" style="width:90px" />
|
|
|
|
|
+ <el-input-number v-model="item.costPrice" :min="0" :precision="2" size="small" placeholder="成本价" style="width:110px" />
|
|
|
|
|
+ <el-button size="mini" type="text" style="color:#f5222d" icon="el-icon-delete" @click="removeItem(idx)" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-button size="mini" type="primary" plain icon="el-icon-plus" @click="addItem">添加明细</el-button>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ <div slot="footer">
|
|
|
|
|
+ <el-button @click="editVisible = false">取 消</el-button>
|
|
|
|
|
+ <el-button type="primary" :loading="submitting" @click="submitEdit">确 定</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 详情弹窗 -->
|
|
|
|
|
+ <el-dialog title="调拨单详情" :visible.sync="detailVisible" width="860px" append-to-body>
|
|
|
|
|
+ <el-descriptions :column="3" border size="small">
|
|
|
|
|
+ <el-descriptions-item label="调拨单号">{{ detail.transferNo }}</el-descriptions-item>
|
|
|
|
|
+ <el-descriptions-item label="状态">{{ detail.statusName || statusMap[detail.status] || detail.status }}</el-descriptions-item>
|
|
|
|
|
+ <el-descriptions-item label="总金额">{{ detail.totalAmount }}</el-descriptions-item>
|
|
|
|
|
+ <el-descriptions-item label="调出门店">{{ detail.fromStoreName }}</el-descriptions-item>
|
|
|
|
|
+ <el-descriptions-item label="调入门店">{{ detail.toStoreName }}</el-descriptions-item>
|
|
|
|
|
+ <el-descriptions-item label="总数量">{{ detail.totalQuantity }}</el-descriptions-item>
|
|
|
|
|
+ <el-descriptions-item label="申请人">{{ detail.applyUserName }}</el-descriptions-item>
|
|
|
|
|
+ <el-descriptions-item label="申请时间">{{ detail.applyTime }}</el-descriptions-item>
|
|
|
|
|
+ <el-descriptions-item label="备注">{{ detail.remark }}</el-descriptions-item>
|
|
|
|
|
+ </el-descriptions>
|
|
|
|
|
+ <el-divider content-position="left">明细</el-divider>
|
|
|
|
|
+ <el-table border :data="detail.items || []" size="small">
|
|
|
|
|
+ <el-table-column label="商品ID" prop="productId" min-width="80" align="center" />
|
|
|
|
|
+ <el-table-column label="商品名称" prop="productName" min-width="150" show-overflow-tooltip />
|
|
|
|
|
+ <el-table-column label="规格" prop="productSpec" min-width="100" />
|
|
|
|
|
+ <el-table-column label="单位" prop="unit" min-width="60" align="center" />
|
|
|
|
|
+ <el-table-column label="数量" prop="quantity" min-width="70" align="center" />
|
|
|
|
|
+ <el-table-column label="成本价" prop="costPrice" min-width="80" align="center" />
|
|
|
|
|
+ <el-table-column label="小计" prop="totalAmount" min-width="80" align="center" />
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+ <el-divider content-position="left">操作日志</el-divider>
|
|
|
|
|
+ <el-table border :data="logs" size="small" v-loading="logsLoading">
|
|
|
|
|
+ <el-table-column label="操作" prop="operationName" min-width="100" />
|
|
|
|
|
+ <el-table-column label="操作人" prop="operatorName" min-width="100" />
|
|
|
|
|
+ <el-table-column label="内容" prop="content" min-width="200" show-overflow-tooltip />
|
|
|
|
|
+ <el-table-column label="时间" prop="createTime" min-width="150" />
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 审批弹窗 -->
|
|
|
|
|
+ <el-dialog title="审批调拨单" :visible.sync="auditVisible" width="460px" append-to-body>
|
|
|
|
|
+ <el-form ref="auditForm" :model="auditForm" :rules="auditRules" label-width="100px">
|
|
|
|
|
+ <el-form-item label="调拨单号">
|
|
|
|
|
+ <el-input :value="auditForm.transferNo" disabled />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="审批结果" prop="approveResult">
|
|
|
|
|
+ <el-radio-group v-model="auditForm.approveResult">
|
|
|
|
|
+ <el-radio label="APPROVED">通过</el-radio>
|
|
|
|
|
+ <el-radio label="REJECTED">驳回</el-radio>
|
|
|
|
|
+ </el-radio-group>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="审批备注" prop="approveRemark">
|
|
|
|
|
+ <el-input v-model="auditForm.approveRemark" type="textarea" :rows="3" placeholder="请输入审批备注" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ <div slot="footer">
|
|
|
|
|
+ <el-button @click="auditVisible = false">取 消</el-button>
|
|
|
|
|
+ <el-button type="primary" :loading="submitting" @click="submitAudit">确 定</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 收货弹窗 -->
|
|
|
|
|
+ <el-dialog title="收货确认" :visible.sync="receiveVisible" width="460px" append-to-body>
|
|
|
|
|
+ <el-form ref="receiveForm" :model="receiveForm" label-width="100px">
|
|
|
|
|
+ <el-form-item label="调拨单号">
|
|
|
|
|
+ <el-input :value="receiveForm.transferNo" disabled />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="收货备注" prop="receiveRemark">
|
|
|
|
|
+ <el-input v-model="receiveForm.receiveRemark" type="textarea" :rows="3" placeholder="请输入收货备注" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ <div slot="footer">
|
|
|
|
|
+ <el-button @click="receiveVisible = false">取 消</el-button>
|
|
|
|
|
+ <el-button type="primary" :loading="submitting" @click="submitReceive">确 定</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+ </div>
|
|
|
|
|
+</template>
|
|
|
|
|
+
|
|
|
|
|
+<script>
|
|
|
|
|
+import {
|
|
|
|
|
+ listInventoryTransfer, getInventoryTransfer, addInventoryTransfer, updateInventoryTransfer,
|
|
|
|
|
+ delInventoryTransfer, submitInventoryTransfer, auditInventoryTransfer, shipInventoryTransfer,
|
|
|
|
|
+ receiveInventoryTransfer, cancelInventoryTransfer, listInventoryTransferLogs
|
|
|
|
|
+} from '@/api/admin/inventoryTransfer'
|
|
|
|
|
+
|
|
|
|
|
+export default {
|
|
|
|
|
+ name: 'AdminInventoryTransfer',
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ showSearch: true,
|
|
|
|
|
+ loading: false,
|
|
|
|
|
+ list: [],
|
|
|
|
|
+ total: 0,
|
|
|
|
|
+ queryParams: { pageNum: 1, pageSize: 10, transferNo: null, status: null },
|
|
|
|
|
+ statusMap: {
|
|
|
|
|
+ DRAFT: '草稿', SUBMITTED: '待审核', APPROVED: '已审核', REJECTED: '已驳回',
|
|
|
|
|
+ IN_TRANSIT: '运输中', RECEIVED: '已收货', CANCELLED: '已取消'
|
|
|
|
|
+ },
|
|
|
|
|
+ editVisible: false,
|
|
|
|
|
+ editTitle: '',
|
|
|
|
|
+ submitting: false,
|
|
|
|
|
+ editForm: { id: null, transferNo: null, fromStoreId: null, fromStoreName: '', toStoreId: null, toStoreName: '', remark: '', items: [] },
|
|
|
|
|
+ editRules: {
|
|
|
|
|
+ fromStoreId: [{ required: true, message: '请输入调出门店ID', trigger: 'blur' }],
|
|
|
|
|
+ toStoreId: [{ required: true, message: '请输入调入门店ID', trigger: 'blur' }]
|
|
|
|
|
+ },
|
|
|
|
|
+ detailVisible: false,
|
|
|
|
|
+ detail: {},
|
|
|
|
|
+ logs: [],
|
|
|
|
|
+ logsLoading: false,
|
|
|
|
|
+ auditVisible: false,
|
|
|
|
|
+ auditForm: { transferNo: '', approveResult: 'APPROVED', approveRemark: '' },
|
|
|
|
|
+ auditRules: { approveResult: [{ required: true, message: '请选择审批结果', trigger: 'change' }] },
|
|
|
|
|
+ receiveVisible: false,
|
|
|
|
|
+ receiveForm: { transferNo: '', receiveRemark: '' }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ created() {
|
|
|
|
|
+ this.getList()
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ getList() {
|
|
|
|
|
+ this.loading = true
|
|
|
|
|
+ listInventoryTransfer(this.queryParams).then(r => {
|
|
|
|
|
+ this.list = r.rows || []
|
|
|
|
|
+ this.total = r.total || 0
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ }).catch(() => { this.loading = false })
|
|
|
|
|
+ },
|
|
|
|
|
+ handleQuery() {
|
|
|
|
|
+ this.queryParams.pageNum = 1
|
|
|
|
|
+ this.getList()
|
|
|
|
|
+ },
|
|
|
|
|
+ resetQuery() {
|
|
|
|
|
+ this.resetForm('queryForm')
|
|
|
|
|
+ this.handleQuery()
|
|
|
|
|
+ },
|
|
|
|
|
+ statusTagType(status) {
|
|
|
|
|
+ const map = {
|
|
|
|
|
+ DRAFT: 'info', SUBMITTED: 'warning', APPROVED: 'success', REJECTED: 'danger',
|
|
|
|
|
+ IN_TRANSIT: 'primary', RECEIVED: 'success', CANCELLED: 'info'
|
|
|
|
|
+ }
|
|
|
|
|
+ return map[status] || 'info'
|
|
|
|
|
+ },
|
|
|
|
|
+ addItem() {
|
|
|
|
|
+ this.editForm.items.push({ productId: null, productName: '', productSpec: '', unit: '', quantity: 1, costPrice: 0 })
|
|
|
|
|
+ },
|
|
|
|
|
+ removeItem(idx) {
|
|
|
|
|
+ this.editForm.items.splice(idx, 1)
|
|
|
|
|
+ },
|
|
|
|
|
+ openEdit(row) {
|
|
|
|
|
+ this.resetEdit()
|
|
|
|
|
+ this.addItem()
|
|
|
|
|
+ if (row) {
|
|
|
|
|
+ this.editTitle = '编辑调拨单'
|
|
|
|
|
+ getInventoryTransfer(row.transferNo).then(r => {
|
|
|
|
|
+ const d = r.data || {}
|
|
|
|
|
+ this.editForm = {
|
|
|
|
|
+ id: d.id, transferNo: d.transferNo, fromStoreId: d.fromStoreId, fromStoreName: d.fromStoreName,
|
|
|
|
|
+ toStoreId: d.toStoreId, toStoreName: d.toStoreName, remark: d.remark,
|
|
|
|
|
+ items: (d.items || []).map(it => ({
|
|
|
|
|
+ productId: it.productId, productName: it.productName, productSpec: it.productSpec,
|
|
|
|
|
+ unit: it.unit, quantity: it.quantity, costPrice: it.costPrice
|
|
|
|
|
+ }))
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.editForm.items.length === 0) this.addItem()
|
|
|
|
|
+ this.editVisible = true
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.editTitle = '新增调拨单'
|
|
|
|
|
+ this.editVisible = true
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ submitEdit() {
|
|
|
|
|
+ this.$refs.editForm.validate(valid => {
|
|
|
|
|
+ if (!valid) return
|
|
|
|
|
+ const items = this.editForm.items.filter(it => it.productId)
|
|
|
|
|
+ if (items.length === 0) {
|
|
|
|
|
+ this.$message.warning('请至少添加一条调拨明细')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ const payload = { ...this.editForm, items }
|
|
|
|
|
+ this.submitting = true
|
|
|
|
|
+ const req = this.editForm.id ? updateInventoryTransfer(payload) : addInventoryTransfer(payload)
|
|
|
|
|
+ req.then(() => {
|
|
|
|
|
+ this.$message.success(this.editForm.id ? '修改成功' : '新增成功')
|
|
|
|
|
+ this.editVisible = false
|
|
|
|
|
+ this.getList()
|
|
|
|
|
+ }).finally(() => { this.submitting = false })
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ resetEdit() {
|
|
|
|
|
+ this.editForm = { id: null, transferNo: null, fromStoreId: null, fromStoreName: '', toStoreId: null, toStoreName: '', remark: '', items: [] }
|
|
|
|
|
+ if (this.$refs.editForm) this.$refs.editForm.resetFields()
|
|
|
|
|
+ },
|
|
|
|
|
+ openDetail(row) {
|
|
|
|
|
+ this.detail = {}
|
|
|
|
|
+ this.logs = []
|
|
|
|
|
+ this.detailVisible = true
|
|
|
|
|
+ getInventoryTransfer(row.transferNo).then(r => {
|
|
|
|
|
+ this.detail = r.data || {}
|
|
|
|
|
+ })
|
|
|
|
|
+ this.loadLogs(row.transferNo)
|
|
|
|
|
+ },
|
|
|
|
|
+ loadLogs(transferNo) {
|
|
|
|
|
+ this.logsLoading = true
|
|
|
|
|
+ listInventoryTransferLogs(transferNo).then(r => {
|
|
|
|
|
+ this.logs = r.data || []
|
|
|
|
|
+ this.logsLoading = false
|
|
|
|
|
+ }).catch(() => { this.logsLoading = false })
|
|
|
|
|
+ },
|
|
|
|
|
+ handleSubmit(row) {
|
|
|
|
|
+ this.$confirm(`确认提交调拨单 "${row.transferNo}"?`, '提示', { type: 'warning' }).then(() => {
|
|
|
|
|
+ submitInventoryTransfer(row.transferNo).then(() => {
|
|
|
|
|
+ this.$message.success('提交成功')
|
|
|
|
|
+ this.getList()
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ openAudit(row) {
|
|
|
|
|
+ this.auditForm = { transferNo: row.transferNo, approveResult: 'APPROVED', approveRemark: '' }
|
|
|
|
|
+ this.auditVisible = true
|
|
|
|
|
+ },
|
|
|
|
|
+ submitAudit() {
|
|
|
|
|
+ this.$refs.auditForm.validate(valid => {
|
|
|
|
|
+ if (!valid) return
|
|
|
|
|
+ this.submitting = true
|
|
|
|
|
+ auditInventoryTransfer(this.auditForm).then(() => {
|
|
|
|
|
+ this.$message.success('审批完成')
|
|
|
|
|
+ this.auditVisible = false
|
|
|
|
|
+ this.getList()
|
|
|
|
|
+ }).finally(() => { this.submitting = false })
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ handleShip(row) {
|
|
|
|
|
+ this.$confirm(`确认对调拨单 "${row.transferNo}" 执行发货?`, '提示', { type: 'warning' }).then(() => {
|
|
|
|
|
+ shipInventoryTransfer(row.transferNo).then(() => {
|
|
|
|
|
+ this.$message.success('发货成功')
|
|
|
|
|
+ this.getList()
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ openReceive(row) {
|
|
|
|
|
+ this.receiveForm = { transferNo: row.transferNo, receiveRemark: '' }
|
|
|
|
|
+ this.receiveVisible = true
|
|
|
|
|
+ },
|
|
|
|
|
+ submitReceive() {
|
|
|
|
|
+ this.submitting = true
|
|
|
|
|
+ receiveInventoryTransfer(this.receiveForm).then(() => {
|
|
|
|
|
+ this.$message.success('收货成功')
|
|
|
|
|
+ this.receiveVisible = false
|
|
|
|
|
+ this.getList()
|
|
|
|
|
+ }).finally(() => { this.submitting = false })
|
|
|
|
|
+ },
|
|
|
|
|
+ handleCancel(row) {
|
|
|
|
|
+ this.$confirm(`确认取消调拨单 "${row.transferNo}"?`, '提示', { type: 'warning' }).then(() => {
|
|
|
|
|
+ cancelInventoryTransfer(row.transferNo).then(() => {
|
|
|
|
|
+ this.$message.success('取消成功')
|
|
|
|
|
+ this.getList()
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ handleDelete(row) {
|
|
|
|
|
+ this.$confirm(`确认删除调拨单 "${row.transferNo}"?`, '提示', { type: 'warning' }).then(() => {
|
|
|
|
|
+ delInventoryTransfer(row.transferNo).then(() => {
|
|
|
|
|
+ this.$message.success('删除成功')
|
|
|
|
|
+ this.getList()
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+</script>
|
|
|
|
|
+
|
|
|
|
|
+<style scoped>
|
|
|
|
|
+.mb8 { margin-bottom: 8px; }
|
|
|
|
|
+.mb16 { margin-bottom: 16px; }
|
|
|
|
|
+.filter-card { padding-bottom: 0; }
|
|
|
|
|
+.item-row { display: flex; gap: 6px; margin-bottom: 8px; align-items: center; }
|
|
|
|
|
+</style>
|