富边电子
1.客户往来,销售合同号改为订单号。增加订单号查询搜索。
2.发货台账,没有时间显示,
3.指标统计改名为销售统计
4.采购台账,采购合同号改为采购单号。取消销售合同号。签订日期改为采购日期。付款方式取消显示。
5.供应商档案,取消供应商类型(甲乙丙丁),录入时也取消。
6.采购合同号改成采购单号。
7.采购报表,退款储量改成采购总价(或不显示)。
8.销售之后库存没有出库记录。
9.质量管理,检验员改成送件员。
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="维护时间:" prop="maintainTime"> |
| | | <el-date-picker |
| | | style="width: 100%" |
| | | v-model="form.maintainTime" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | type="date" |
| | | placeholder="请选择" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="供应商类型:" prop="supplierType"> |
| | | <el-select v-model="form.supplierType" placeholder="请选择" clearable> |
| | | <el-option label="甲" value="甲" /> |
| | | <el-option label="乙" value="乙" /> |
| | | <el-option label="丙" value="丙" /> |
| | | <el-option label="丁" value="丁" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="是否白名单:" prop="isWhite"> |
| | | <el-select v-model="form.isWhite" placeholder="请选择" clearable> |
| | | <el-option label="是" :value="0" /> |
| | |
| | | width: 250, |
| | | }, |
| | | { |
| | | label: "供应商类型", |
| | | prop: "supplierType", |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "纳税人识别号", |
| | | prop: "taxpayerIdentificationNum", |
| | | width: 230, |
| | |
| | | { |
| | | label: "维护人", |
| | | prop: "maintainUserName", |
| | | }, |
| | | |
| | | { |
| | | label: "维护时间", |
| | | prop: "maintainTime", |
| | | width:100 |
| | | }, |
| | | { |
| | | dataType: "action", |
| | |
| | | contactUserName: "", |
| | | contactUserPhone: "", |
| | | maintainUserId: "", |
| | | maintainTime: "", |
| | | supplierType: "", |
| | | isWhite: "", |
| | | }, |
| | | rules: { |
| | |
| | | contactUserName: [{ required: false, message: "请输入", trigger: "blur" }], |
| | | contactUserPhone: [{ required: false, message: "请输入", trigger: "blur" }], |
| | | maintainUserId: [{ required: false, message: "请选择", trigger: "change" }], |
| | | maintainTime: [{ required: false, message: "请选择", trigger: "change" }], |
| | | supplierType: [{ required: true, message: "请选择供应商类型", trigger: "change" }], |
| | | }, |
| | | }); |
| | | const { searchForm, form, rules } = toRefs(data); |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="维护时间:" prop="maintainTime"> |
| | | <el-date-picker |
| | | style="width: 100%" |
| | | v-model="form.maintainTime" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | type="date" |
| | | placeholder="请选择" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="供应商类型:" prop="supplierType"> |
| | | <el-select v-model="form.supplierType" placeholder="请选择" clearable> |
| | | <el-option label="甲" value="甲" /> |
| | | <el-option label="乙" value="乙" /> |
| | | <el-option label="丙" value="丙" /> |
| | | <el-option label="丁" value="丁" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="是否白名单:" prop="isWhite"> |
| | | <el-select v-model="form.isWhite" placeholder="请选择" clearable> |
| | | <el-option label="是" :value="0" /> |
| | |
| | | width: 250, |
| | | }, |
| | | { |
| | | label: "供应商类型", |
| | | prop: "supplierType", |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "纳税人识别号", |
| | | prop: "taxpayerIdentificationNum", |
| | | width: 230, |
| | |
| | | { |
| | | label: "维护人", |
| | | prop: "maintainUserName", |
| | | }, |
| | | |
| | | { |
| | | label: "维护时间", |
| | | prop: "maintainTime", |
| | | width:100 |
| | | }, |
| | | { |
| | | dataType: "action", |
| | |
| | | contactUserName: "", |
| | | contactUserPhone: "", |
| | | maintainUserId: "", |
| | | maintainTime: "", |
| | | supplierType: "", |
| | | isWhite: "", |
| | | }, |
| | | rules: { |
| | |
| | | contactUserName: [{ required: false, message: "请输入", trigger: "blur" }], |
| | | contactUserPhone: [{ required: false, message: "请输入", trigger: "blur" }], |
| | | maintainUserId: [{ required: false, message: "请选择", trigger: "change" }], |
| | | maintainTime: [{ required: false, message: "请选择", trigger: "change" }], |
| | | supplierType: [{ required: true, message: "请选择供应商类型", trigger: "change" }], |
| | | }, |
| | | }); |
| | | const { searchForm, form, rules } = toRefs(data); |
| | |
| | | prefix-icon="Search" |
| | | @change="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="采购合同号:"> |
| | | <el-form-item label="采购单号:"> |
| | | <el-input v-model="searchForm.purchaseContractNumber" |
| | | style="width: 240px" |
| | | placeholder="请输入" |
| | | @change="handleQuery" |
| | | clearable |
| | | :prefix-icon="Search" /> |
| | | </el-form-item> |
| | | <el-form-item label="销售合同号:"> |
| | | <el-input v-model="searchForm.salesContractNo" |
| | | placeholder="请输入" |
| | | clearable |
| | | prefix-icon="Search" |
| | | @change="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="项目名称:"> |
| | | <el-input v-model="searchForm.projectName" |
| | |
| | | label="序号" |
| | | type="index" |
| | | width="60" /> |
| | | <el-table-column label="采购合同号" |
| | | <el-table-column label="采购单号" |
| | | prop="purchaseContractNumber" |
| | | width="160" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="销售合同号" |
| | | prop="salesContractNo" |
| | | width="160" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="供应商名称" |
| | | prop="supplierName" |
| | |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="签订日期" |
| | | <el-table-column label="采购日期" |
| | | prop="executionDate" |
| | | width="100" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="付款方式" |
| | | width="100" |
| | | prop="paymentMethod" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="合同金额(元)" |
| | | prop="contractAmount" |
| | |
| | | ref="formRef"> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="采购合同号:" |
| | | <el-form-item label="采购单号:" |
| | | prop="purchaseContractNumber"> |
| | | <el-input v-model="form.purchaseContractNumber" |
| | | placeholder="请输入" |
| | | clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="销售合同号:" |
| | | prop="salesLedgerId"> |
| | | <el-select v-model="form.salesLedgerId" |
| | | placeholder="请选择" |
| | | filterable |
| | | clearable |
| | | @change="salesLedgerChange"> |
| | | <el-option v-for="item in salesContractList" |
| | | :key="item.id" |
| | | :label="item.salesContractNo" |
| | | :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="供应商名称:" |
| | | prop="supplierId"> |
| | |
| | | <el-option v-for="item in supplierList" |
| | | :key="item.id" |
| | | :label="item.supplierName" |
| | | :value="item.id" >{{item.supplierName + '---' + item.supplierType}}</el-option> |
| | | :value="item.id" >{{item.supplierName + '---' + item.supplierType}}</el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="项目名称" |
| | | prop="projectName"> |
| | |
| | | clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="付款方式"> |
| | | <el-input v-model="form.paymentMethod" |
| | | placeholder="请输入" |
| | | clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="签订日期:" |
| | | <el-form-item label="采购日期:" |
| | | prop="executionDate"> |
| | | <el-date-picker style="width: 100%" |
| | | v-model="form.executionDate" |
| | |
| | | return val ? `¥${parseFloat(val).toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : '¥0.00' |
| | | } |
| | | }, |
| | | { |
| | | label: '退款储量', |
| | | prop: 'purchaseAmount', |
| | | formatData: (val) => { |
| | | return val ? `¥${parseFloat(val).toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : '¥0.00' |
| | | } |
| | | }, |
| | | // { |
| | | // label: '退款储量', |
| | | // prop: 'purchaseAmount', |
| | | // formatData: (val) => { |
| | | // return val ? `¥${parseFloat(val).toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : '¥0.00' |
| | | // } |
| | | // }, |
| | | { |
| | | label: '采购次数', |
| | | prop: 'purchaseTimes', |
| | |
| | | <div class="search_form"> |
| | | <div class="search-row"> |
| | | <div class="search-item"> |
| | | <span class="search_title">工单编号:</span> |
| | | <el-input v-model="searchForm.workOrderNo" |
| | | <span class="search_title">入库日期:</span> |
| | | <el-date-picker v-model="searchForm.timeStr" |
| | | type="date" |
| | | placeholder="请选择日期" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | clearable |
| | | @change="handleQuery"/> |
| | | </div> |
| | | <div class="search-item"> |
| | | <span class="search_title">产品大类:</span> |
| | | <el-input v-model="searchForm.productName" |
| | | style="width: 240px" |
| | | placeholder="请输入" |
| | | @change="handleQuery" |
| | | clearable |
| | | prefix-icon="Search" /> |
| | | clearable/> |
| | | </div> |
| | | <div class="search-item"> |
| | | <el-button type="primary" |
| | | @click="handleQuery">搜索</el-button> |
| | | <el-button type="primary" @click="openAddDialog" style="margin-left: 10px;">新增</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | :tableData="tableData" |
| | | :page="page" |
| | | :tableLoading="tableLoading" |
| | | @pagination="pagination"> |
| | | <template #completionStatus="{ row }"> |
| | | <el-progress :percentage="toProgressPercentage(row?.completionStatus)" |
| | | :color="progressColor(toProgressPercentage(row?.completionStatus))" |
| | | :status="toProgressPercentage(row?.completionStatus) >= 100 ? 'success' : ''" /> |
| | | </template> |
| | | </PIMTable> |
| | | @pagination="pagination" /> |
| | | </div> |
| | | |
| | | <!-- 流转卡弹窗 --> |
| | |
| | | </el-dialog> |
| | | |
| | | <FilesDia ref="workOrderFilesRef" /> |
| | | |
| | | <!-- 新增工单弹窗 --> |
| | | <el-dialog v-model="addDialogVisible" |
| | | title="新增工单" |
| | | width="500px" |
| | | @close="closeAddDialog"> |
| | | <el-form ref="addFormRef" |
| | | :model="addForm" |
| | | :rules="addFormRules" |
| | | label-width="120px" |
| | | label-position="top"> |
| | | <el-form-item label="产品名称:" |
| | | prop="productId"> |
| | | <el-tree-select v-model="addForm.productId" |
| | | placeholder="请选择产品" |
| | | clearable |
| | | check-strictly |
| | | :data="productOptions" |
| | | :render-after-expand="false" |
| | | style="width: 100%" |
| | | @change="handleProductChange" /> |
| | | </el-form-item> |
| | | <el-form-item label="规格型号:" |
| | | prop="productModelId"> |
| | | <el-select v-model="addForm.productModelId" |
| | | placeholder="请选择规格型号" |
| | | clearable |
| | | style="width: 100%" |
| | | @change="handleModelChange" |
| | | filterable> |
| | | <el-option v-for="item in modelOptions" |
| | | :key="item.id" |
| | | :label="item.model" |
| | | :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="单位:" |
| | | prop="unit"> |
| | | <el-input v-model="addForm.unit" |
| | | placeholder="单位" |
| | | disabled |
| | | style="width: 100%" /> |
| | | </el-form-item> |
| | | <el-form-item label="数量:" |
| | | prop="quantity"> |
| | | <el-input-number v-model="addForm.quantity" |
| | | :min="1" |
| | | :step="1" |
| | | step-strictly |
| | | style="width: 100%" |
| | | placeholder="请输入数量" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button type="primary" |
| | | @click="handleAddSubmit">确定</el-button> |
| | | <el-button @click="closeAddDialog">取消</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | downProductWorkOrder, |
| | | } from "@/api/productionManagement/workOrder.js"; |
| | | import { getUserProfile, userListNoPageByTenantId } from "@/api/system/user.js"; |
| | | import { createStockInventory } from "@/api/inventoryManagement/stockInventory.js"; |
| | | import { getStockInRecordListPage } from "@/api/inventoryManagement/stockInRecord.js"; |
| | | import { productTreeList, modelList } from "@/api/basicData/product.js"; |
| | | import { findAllQualifiedStockInRecordTypeOptions } from "@/api/basicData/enum.js"; |
| | | import QRCode from "qrcode"; |
| | | import { getCurrentInstance, reactive, toRefs } from "vue"; |
| | | import FilesDia from "./components/filesDia.vue"; |
| | | const { proxy } = getCurrentInstance(); |
| | | |
| | | // 来源类型选项 |
| | | const stockRecordTypeOptions = ref([]); |
| | | |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "工单类型", |
| | | prop: "workOrderType", |
| | | width: "80", |
| | | label: "入库批次", |
| | | prop: "inboundBatches", |
| | | width: "280", |
| | | }, |
| | | { |
| | | label: "工单编号", |
| | | prop: "workOrderNo", |
| | | width: "140", |
| | | label: "入库时间", |
| | | prop: "createTime", |
| | | width: "160", |
| | | }, |
| | | { |
| | | label: "生产订单号", |
| | | prop: "productOrderNpsNo", |
| | | width: "140", |
| | | }, |
| | | { |
| | | label: "产品名称", |
| | | label: "产品大类", |
| | | prop: "productName", |
| | | width: "140", |
| | | }, |
| | | { |
| | | label: "规格", |
| | | label: "规格型号", |
| | | prop: "model", |
| | | }, |
| | | { |
| | |
| | | prop: "unit", |
| | | }, |
| | | { |
| | | label: "工序名称", |
| | | prop: "processName", |
| | | label: "入库数量", |
| | | prop: "stockInNum", |
| | | }, |
| | | { |
| | | label: "需求数量", |
| | | prop: "planQuantity", |
| | | width: "140", |
| | | label: "入库人", |
| | | prop: "createBy", |
| | | }, |
| | | { |
| | | label: "完成数量", |
| | | prop: "completeQuantity", |
| | | width: "140", |
| | | }, |
| | | { |
| | | label: "完成进度", |
| | | prop: "completionStatus", |
| | | dataType: "slot", |
| | | slot: "completionStatus", |
| | | width: "140", |
| | | }, |
| | | { |
| | | label: "计划开始时间", |
| | | prop: "planStartTime", |
| | | width: "140", |
| | | }, |
| | | { |
| | | label: "计划结束时间", |
| | | prop: "planEndTime", |
| | | width: "140", |
| | | }, |
| | | { |
| | | label: "实际开始时间", |
| | | prop: "actualStartTime", |
| | | width: "140", |
| | | }, |
| | | { |
| | | label: "实际结束时间", |
| | | prop: "actualEndTime", |
| | | width: "140", |
| | | }, |
| | | { |
| | | label: "操作", |
| | | width: "200", |
| | | align: "center", |
| | | dataType: "action", |
| | | fixed: "right", |
| | | operation: [ |
| | | { |
| | | name: "流转卡", |
| | | clickFun: row => { |
| | | downloadAndPrintWorkOrder(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "附件", |
| | | clickFun: row => { |
| | | openWorkOrderFiles(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "报工", |
| | | clickFun: row => { |
| | | showReportDialog(row); |
| | | }, |
| | | disabled: row => row.planQuantity <= 0, |
| | | }, |
| | | ], |
| | | label: "来源", |
| | | prop: "recordType", |
| | | formatData: (val) => { |
| | | return stockRecordTypeOptions.value.find(item => item.value === val)?.label || val; |
| | | } |
| | | }, |
| | | ]); |
| | | |
| | |
| | | userId: "", |
| | | productMainId: null, |
| | | }); |
| | | |
| | | // 新增工单相关 |
| | | const addDialogVisible = ref(false); |
| | | const addFormRef = ref(null); |
| | | const productOptions = ref([]); |
| | | const modelOptions = ref([]); |
| | | const addForm = reactive({ |
| | | productId: null, |
| | | productModelId: null, |
| | | productName: "", |
| | | productModelName: "", |
| | | unit: "", |
| | | quantity: 1, |
| | | }); |
| | | |
| | | // 新增表单校验规则 |
| | | const addFormRules = { |
| | | productId: [{ required: true, message: "请选择产品", trigger: "change" }], |
| | | productModelId: [{ required: true, message: "请选择规格型号", trigger: "change" }], |
| | | quantity: [{ required: true, message: "请输入数量", trigger: "blur" }], |
| | | }; |
| | | |
| | | // 本次生产数量验证规则 |
| | | const validateQuantity = (rule, value, callback) => { |
| | |
| | | |
| | | const data = reactive({ |
| | | searchForm: { |
| | | workOrderNo: "", |
| | | timeStr: "", |
| | | productName: "", |
| | | }, |
| | | }); |
| | | const { searchForm } = toRefs(data); |
| | |
| | | |
| | | const getList = () => { |
| | | tableLoading.value = true; |
| | | const params = { ...searchForm.value, ...page }; |
| | | productWorkOrderPage(params) |
| | | const params = { ...page }; |
| | | params.timeStr = searchForm.value.timeStr; |
| | | params.productName = searchForm.value.productName; |
| | | params.recordType = 2; // 默认查询 recordType 为 2(生产报工-合格入库)的数据 |
| | | params.type = '0'; // 合格入库类型 |
| | | getStockInRecordListPage(params) |
| | | .then(res => { |
| | | tableLoading.value = false; |
| | | tableData.value = res.data.records; |
| | |
| | | reportForm.userName = user ? user.nickName : ""; |
| | | }; |
| | | |
| | | // 打开新增弹窗 |
| | | const openAddDialog = () => { |
| | | // 重置表单 |
| | | addForm.productId = null; |
| | | addForm.productModelId = null; |
| | | addForm.productName = ""; |
| | | addForm.productModelName = ""; |
| | | addForm.unit = ""; |
| | | addForm.quantity = 1; |
| | | modelOptions.value = []; |
| | | // 加载产品树 |
| | | getProductOptions(); |
| | | addDialogVisible.value = true; |
| | | }; |
| | | |
| | | // 关闭新增弹窗 |
| | | const closeAddDialog = () => { |
| | | addFormRef.value?.resetFields(); |
| | | addDialogVisible.value = false; |
| | | }; |
| | | |
| | | // 获取产品树 |
| | | const getProductOptions = () => { |
| | | productTreeList().then((res) => { |
| | | productOptions.value = convertIdToValue(res); |
| | | }); |
| | | }; |
| | | |
| | | // 转换产品树数据 |
| | | function convertIdToValue(data) { |
| | | return data.map((item) => { |
| | | const { id, children, ...rest } = item; |
| | | const newItem = { |
| | | ...rest, |
| | | value: id, |
| | | }; |
| | | if (children && children.length > 0) { |
| | | newItem.children = convertIdToValue(children); |
| | | } |
| | | return newItem; |
| | | }); |
| | | } |
| | | |
| | | // 根据ID查找产品名称 |
| | | function findNodeById(nodes, productId) { |
| | | for (let i = 0; i < nodes.length; i++) { |
| | | if (nodes[i].value === productId) { |
| | | return nodes[i].label; |
| | | } |
| | | if (nodes[i].children && nodes[i].children.length > 0) { |
| | | const foundNode = findNodeById(nodes[i].children, productId); |
| | | if (foundNode) { |
| | | return foundNode; |
| | | } |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | // 产品选择变化 |
| | | const handleProductChange = (value) => { |
| | | addForm.productModelId = null; |
| | | addForm.unit = ""; |
| | | addForm.productModelName = ""; |
| | | if (value) { |
| | | addForm.productName = findNodeById(productOptions.value, value); |
| | | // 加载规格型号 |
| | | modelList({ id: value }).then((res) => { |
| | | modelOptions.value = res; |
| | | }); |
| | | } else { |
| | | modelOptions.value = []; |
| | | } |
| | | }; |
| | | |
| | | // 规格型号选择变化 |
| | | const handleModelChange = (value) => { |
| | | if (value) { |
| | | const model = modelOptions.value.find((item) => item.id === value); |
| | | if (model) { |
| | | addForm.unit = model.unit; |
| | | addForm.productModelName = model.model; |
| | | } |
| | | } else { |
| | | addForm.unit = ""; |
| | | addForm.productModelName = ""; |
| | | } |
| | | }; |
| | | |
| | | // 提交新增 |
| | | const handleAddSubmit = () => { |
| | | addFormRef.value?.validate((valid) => { |
| | | if (valid) { |
| | | const params = { |
| | | productId: addForm.productId, |
| | | productModelId: addForm.productModelId, |
| | | productName: addForm.productName, |
| | | productModelName: addForm.productModelName, |
| | | unit: addForm.unit, |
| | | qualitity: addForm.quantity, |
| | | type: "qualified", |
| | | warnNum: 0, |
| | | recordType: 2, |
| | | }; |
| | | createStockInventory(params).then((res) => { |
| | | proxy.$modal.msgSuccess("新增成功"); |
| | | closeAddDialog(); |
| | | getList(); |
| | | }); |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | // 获取来源类型选项 |
| | | const fetchStockRecordTypeOptions = () => { |
| | | findAllQualifiedStockInRecordTypeOptions() |
| | | .then(res => { |
| | | stockRecordTypeOptions.value = res.data; |
| | | }); |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | getList(); |
| | | // 获取用户列表 |
| | |
| | | userOptions.value = res.data; |
| | | } |
| | | }); |
| | | // 获取来源类型选项 |
| | | fetchStockRecordTypeOptions(); |
| | | }); |
| | | </script> |
| | | |
| | |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="检验员:" prop="checkName"> |
| | | <el-form-item label="送检员:" prop="checkName"> |
| | | <el-select v-model="form.checkName" placeholder="请选择" clearable> |
| | | <el-option v-for="item in userList" :key="item.nickName" :label="item.nickName" |
| | | :value="item.nickName"/> |
| | |
| | | <InspectionFormDia ref="inspectionFormDia" @close="handleQuery"></InspectionFormDia> |
| | | <FormDia ref="formDia" @close="handleQuery"></FormDia> |
| | | <files-dia ref="filesDia" @close="handleQuery"></files-dia> |
| | | <el-dialog v-model="dialogFormVisible" title="编辑检验员" width="30%" |
| | | <el-dialog v-model="dialogFormVisible" title="编辑送检员" width="30%" |
| | | @close="closeDia"> |
| | | <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef"> |
| | | <el-form-item label="检验员:" prop="checkName"> |
| | | <el-form-item label="送检员:" prop="checkName"> |
| | | <el-select v-model="form.checkName" placeholder="请选择" clearable> |
| | | <el-option v-for="item in userList" :key="item.nickName" :label="item.nickName" |
| | | :value="item.nickName"/> |
| | |
| | | width: 120 |
| | | }, |
| | | { |
| | | label: "检验员", |
| | | label: "送检员", |
| | | prop: "checkName", |
| | | }, |
| | | { |
| | |
| | | disabled: (row) => { |
| | | // 已提交则禁用 |
| | | if (row.inspectState == 1) return true; |
| | | // 如果检验员有值,只有当前登录用户能编辑 |
| | | // 如果送检员有值,只有当前登录用户能编辑 |
| | | if (row.checkName) { |
| | | return row.checkName !== userStore.nickName; |
| | | } |
| | |
| | | disabled: (row) => { |
| | | // 已提交则禁用 |
| | | if (row.inspectState == 1) return true; |
| | | // 如果检验员有值,只有当前登录用户能提交 |
| | | // 如果送检员有值,只有当前登录用户能提交 |
| | | if (row.checkName) { |
| | | return row.checkName !== userStore.nickName; |
| | | } |
| | |
| | | } |
| | | }, |
| | | { |
| | | name: "分配检验员", |
| | | name: "分配送检员", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | if (!row.checkName) { |
| | | open(row) |
| | | } else { |
| | | proxy.$modal.msgError("检验员已存在"); |
| | | proxy.$modal.msgError("送检员已存在"); |
| | | } |
| | | }, |
| | | disabled: (row) => { |
| | |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="检验员:" prop="checkName"> |
| | | <el-form-item label="送检员:" prop="checkName"> |
| | | <el-select v-model="form.checkName" placeholder="请选择" clearable> |
| | | <el-option v-for="item in userList" :key="item.nickName" :label="item.nickName" |
| | | :value="item.nickName"/> |
| | |
| | | <InspectionFormDia ref="inspectionFormDia" @close="handleQuery"></InspectionFormDia> |
| | | <FormDia ref="formDia" @close="handleQuery"></FormDia> |
| | | <files-dia ref="filesDia" @close="handleQuery"></files-dia> |
| | | <el-dialog v-model="dialogFormVisible" title="编辑检验员" width="30%" |
| | | <el-dialog v-model="dialogFormVisible" title="编辑送检员" width="30%" |
| | | @close="closeDia"> |
| | | <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef"> |
| | | <el-form-item label="检验员:" prop="checkName"> |
| | | <el-form-item label="送检员:" prop="checkName"> |
| | | <el-select v-model="form.checkName" placeholder="请选择" clearable> |
| | | <el-option v-for="item in userList" :key="item.nickName" :label="item.nickName" |
| | | :value="item.nickName"/> |
| | |
| | | width: 230 |
| | | }, |
| | | { |
| | | label: "检验员", |
| | | label: "送检员", |
| | | prop: "checkName", |
| | | }, |
| | | { |
| | |
| | | disabled: (row) => { |
| | | // 已提交则禁用 |
| | | if (row.inspectState == 1) return true; |
| | | // 如果检验员有值,只有当前登录用户能编辑 |
| | | // 如果送检员有值,只有当前登录用户能编辑 |
| | | if (row.checkName) { |
| | | return row.checkName !== userStore.nickName; |
| | | } |
| | |
| | | disabled: (row) => { |
| | | // 已提交则禁用 |
| | | if (row.inspectState == 1) return true; |
| | | // 如果检验员有值,只有当前登录用户能提交 |
| | | // 如果送检员有值,只有当前登录用户能提交 |
| | | if (row.checkName) { |
| | | return row.checkName !== userStore.nickName; |
| | | } |
| | |
| | | } |
| | | }, |
| | | { |
| | | name: "分配检验员", |
| | | name: "分配送检员", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | if (!row.checkName) { |
| | | open(row) |
| | | } else { |
| | | proxy.$modal.msgError("检验员已存在"); |
| | | proxy.$modal.msgError("送检员已存在"); |
| | | } |
| | | }, |
| | | disabled: (row) => { |
| | |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="检验员:" prop="checkName"> |
| | | <el-form-item label="送检员:" prop="checkName"> |
| | | <el-select v-model="form.checkName" placeholder="请选择" clearable style="width: 100%"> |
| | | <el-option v-for="item in userList" :key="item.nickName" :label="item.nickName" :value="item.nickName"/> |
| | | </el-select> |
| | |
| | | const currentProductId = ref(0); |
| | | const testStandardOptions = ref([]); // 指标选择下拉框数据 |
| | | const modelOptions = ref([]); |
| | | const userList = ref([]); // 检验员下拉列表 |
| | | const userList = ref([]); // 送检员下拉列表 |
| | | |
| | | // 编辑时:productMainId 或 purchaseLedgerId 任一有值则供应商、数量置灰 |
| | | const supplierQuantityDisabled = computed(() => { |
| | |
| | | const userRes = await userListNoPage(); |
| | | userList.value = userRes.data || []; |
| | | } catch (e) { |
| | | console.error("加载检验员列表失败", e); |
| | | console.error("加载送检员列表失败", e); |
| | | userList.value = []; |
| | | } |
| | | // 先重置表单数据(保持字段完整,避免弹窗首次渲染时触发必填红框“闪一下”) |
| | |
| | | <InspectionFormDia ref="inspectionFormDia" @close="handleQuery"></InspectionFormDia> |
| | | <FormDia ref="formDia" @close="handleQuery"></FormDia> |
| | | <files-dia ref="filesDia" @close="handleQuery"></files-dia> |
| | | <el-dialog v-model="dialogFormVisible" title="编辑检验员" width="30%" |
| | | <el-dialog v-model="dialogFormVisible" title="编辑送检员" width="30%" |
| | | @close="closeDia"> |
| | | <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef"> |
| | | <el-form-item label="检验员:" prop="checkName"> |
| | | <el-form-item label="送检员:" prop="checkName"> |
| | | <el-select v-model="form.checkName" placeholder="请选择" clearable> |
| | | <el-option v-for="item in userList" :key="item.nickName" :label="item.nickName" |
| | | :value="item.nickName"/> |
| | |
| | | width: 230 |
| | | }, |
| | | { |
| | | label: "检验员", |
| | | label: "送检员", |
| | | prop: "checkName", |
| | | }, |
| | | { |
| | |
| | | disabled: (row) => { |
| | | // 已提交则禁用 |
| | | if (row.inspectState == 1) return true; |
| | | // 如果检验员有值,只有当前登录用户能编辑 |
| | | if (row.checkName) { |
| | | return row.checkName !== userStore.nickName; |
| | | } |
| | | // 如果送检员有值,只有当前登录用户能编辑 |
| | | if (row.checkName) { |
| | | return row.checkName !== userStore.nickName; |
| | | } |
| | | return false; |
| | | } |
| | | }, |
| | |
| | | disabled: (row) => { |
| | | // 已提交则禁用 |
| | | if (row.inspectState == 1) return true; |
| | | // 如果检验员有值,只有当前登录用户能提交 |
| | | if (row.checkName) { |
| | | return row.checkName !== userStore.nickName; |
| | | } |
| | | // 如果送检员有值,只有当前登录用户能提交 |
| | | if (row.checkName) { |
| | | return row.checkName !== userStore.nickName; |
| | | } |
| | | return false; |
| | | } |
| | | }, |
| | | { |
| | | name: "分配检验员", |
| | | name: "分配送检员", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | if (!row.checkName) { |
| | | open(row) |
| | | } else { |
| | | proxy.$modal.msgError("检验员已存在"); |
| | | proxy.$modal.msgError("送检员已存在"); |
| | | } |
| | | }, |
| | | disabled: (row) => { |
| | |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="操作" width="220" align="center"> |
| | | <template #default="scope"> |
| | | <el-button |
| | | <!-- <el-button |
| | | link |
| | | type="primary" |
| | | :disabled="!isApproved(scope.row.status)" |
| | | @click="openForm('edit', scope.row)">补充发货信息</el-button> |
| | | @click="openForm('edit', scope.row)">补充发货信息</el-button> --> |
| | | <el-button |
| | | link |
| | | type="primary" |
| | |
| | | clearable |
| | | prefix-icon="Search" |
| | | /> |
| | | <span class="search_title" style="margin-left: 10px">订单号:</span> |
| | | <el-input |
| | | v-model="orderNoSearch" |
| | | style="width: 240px" |
| | | placeholder="输入订单号搜索" |
| | | @change="filterReceiptRecord" |
| | | clearable |
| | | prefix-icon="Search" |
| | | /> |
| | | <el-button type="primary" @click="handleQuery" style="margin-left: 10px" |
| | | >搜索</el-button |
| | | > |
| | |
| | | width="110" |
| | | /> |
| | | <el-table-column |
| | | label="销售合同号" |
| | | label="订单号" |
| | | prop="salesContractNo" |
| | | show-overflow-tooltip |
| | | width="200" |
| | |
| | | invoiceDate: "", |
| | | }, |
| | | }); |
| | | const orderNoSearch = ref(""); |
| | | const customerId = ref(""); |
| | | const { searchForm } = toRefs(data); |
| | | const originReceiptRecord = ref([]); |
| | |
| | | console.log("param", param); |
| | | customerInteractions(param).then((res) => { |
| | | originReceiptRecord.value = res.data; |
| | | handlePagination({ page: 1, limit: recordPage.size }); |
| | | recordTotal.value = res.data.length; |
| | | recordPage.current = 1; |
| | | filterReceiptRecord(); |
| | | }); |
| | | }; |
| | | |
| | |
| | | const handlePagination = ({ page, limit }) => { |
| | | recordPage.current = page; |
| | | recordPage.size = limit; |
| | | filterReceiptRecord(); |
| | | }; |
| | | |
| | | const start = (page - 1) * limit; |
| | | const end = start + limit; |
| | | |
| | | receiptRecord.value = originReceiptRecord.value.slice(start, end); |
| | | // 根据订单号过滤右边表格数据 |
| | | const filterReceiptRecord = () => { |
| | | let filteredData = originReceiptRecord.value; |
| | | if (orderNoSearch.value) { |
| | | filteredData = originReceiptRecord.value.filter(item => |
| | | item.salesContractNo && item.salesContractNo.includes(orderNoSearch.value) |
| | | ); |
| | | } |
| | | recordTotal.value = filteredData.length; |
| | | const start = (recordPage.current - 1) * recordPage.size; |
| | | const end = start + recordPage.size; |
| | | receiptRecord.value = filteredData.slice(start, end); |
| | | }; |
| | | |
| | | onMounted(() => { |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="发货日期:" prop="shippingDate"> |
| | | <el-date-picker |
| | | style="width: 100%" |
| | | v-model="deliveryForm.shippingDate" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | type="date" |
| | | placeholder="请选择发货日期" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="24" v-if="deliveryForm.type === '货车'"> |
| | | <el-form-item label="发货车牌号:" prop="shippingCarNumber"> |
| | | <el-input |
| | | v-model="deliveryForm.shippingCarNumber" |
| | | placeholder="请输入发货车牌号" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24" v-else> |
| | | <el-form-item label="快递公司:" prop="expressCompany"> |
| | | <el-input |
| | | v-model="deliveryForm.expressCompany" |
| | | placeholder="请输入快递公司" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30" v-if="deliveryForm.type === '快递'"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="快递单号:" prop="expressNumber"> |
| | | <el-input |
| | | v-model="deliveryForm.expressNumber" |
| | | placeholder="请输入快递单号" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="发货图片:"> |
| | | <el-upload |
| | | v-model:file-list="deliveryFileList" |
| | | :action="upload.url" |
| | | multiple |
| | | ref="deliveryFileUpload" |
| | | auto-upload |
| | | :headers="upload.headers" |
| | | :data="{ type: 9 }" |
| | | :on-success="handleDeliveryUploadSuccess" |
| | | :on-remove="handleDeliveryRemove" |
| | | list-type="picture-card" |
| | | :limit="9" |
| | | accept="image/png,image/jpeg,image/jpg" |
| | | > |
| | | <el-icon class="avatar-uploader-icon"><Plus /></el-icon> |
| | | <template #tip> |
| | | <div class="el-upload__tip"> |
| | | 支持 jpg、jpeg、png 格式,最多上传 9 张,单张大小不超过 10MB |
| | | </div> |
| | | </template> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <!-- 审批人选择(仿协同审批里的审批人节点选择) --> |
| | | <el-row> |
| | |
| | | // 发货相关 |
| | | const deliveryFormVisible = ref(false); |
| | | const currentDeliveryRow = ref(null); |
| | | const deliveryFileList = ref([]); |
| | | const deliveryFormData = reactive({ |
| | | deliveryForm: { |
| | | type: "货车", // 货车, 快递 |
| | | shippingDate: "", |
| | | shippingCarNumber: "", |
| | | expressCompany: "", |
| | | expressNumber: "", |
| | | }, |
| | | deliveryRules: { |
| | | type: [ |
| | | { required: true, message: "请选择发货类型", trigger: "change" } |
| | | ] |
| | | ], |
| | | shippingDate: [{ required: true, message: "请选择发货日期", trigger: "change" }], |
| | | shippingCarNumber: [ |
| | | { validator: (_, value, callback) => validateShippingCarNumber(value, callback), trigger: "blur" } |
| | | ], |
| | | expressCompany: [ |
| | | { validator: (_, value, callback) => validateExpressCompany(value, callback), trigger: "blur" } |
| | | ], |
| | | }, |
| | | }); |
| | | const { deliveryForm, deliveryRules } = toRefs(deliveryFormData); |
| | | |
| | | // 发货类型校验:货车时要求车牌,快递时要求快递公司 |
| | | const validateShippingCarNumber = (value, callback) => { |
| | | if (deliveryForm.value.type === "货车") { |
| | | if (!value) return callback(new Error("请输入发货车牌号")); |
| | | } |
| | | callback(); |
| | | }; |
| | | const validateExpressCompany = (value, callback) => { |
| | | if (deliveryForm.value.type === "快递") { |
| | | if (!value) return callback(new Error("请输入快递公司")); |
| | | } |
| | | callback(); |
| | | }; |
| | | |
| | | // 发货审批人节点(仿协同审批 infoFormDia.vue) |
| | | const approverNodes = ref([{ id: 1, userId: null }]); |
| | |
| | | currentDeliveryRow.value = row; |
| | | deliveryForm.value = { |
| | | type: "货车", |
| | | shippingDate: getCurrentDate(), |
| | | shippingCarNumber: "", |
| | | expressCompany: "", |
| | | expressNumber: "", |
| | | }; |
| | | deliveryFileList.value = []; |
| | | // 重置审批人节点(默认一个空节点) |
| | | approverNodes.value = [{ id: 1, userId: null }]; |
| | | nextApproverId = 2; |
| | | deliveryFormVisible.value = true; |
| | | }; |
| | | |
| | | // 发货图片上传成功回调 |
| | | const handleDeliveryUploadSuccess = (res, file, uploadFiles) => { |
| | | if (res.code === 200) { |
| | | file.tempId = res.data.tempId; |
| | | proxy.$modal.msgSuccess("上传成功"); |
| | | } else { |
| | | proxy.$modal.msgError(res.msg); |
| | | } |
| | | }; |
| | | |
| | | // 移除发货图片 |
| | | const handleDeliveryRemove = (file) => { |
| | | // 文件移除时自动从 fileList 中删除,无需额外处理 |
| | | }; |
| | | |
| | | // 提交发货表单 |
| | |
| | | // 保存当前展开的行ID,以便发货后重新加载子表格数据 |
| | | const currentExpandedKeys = [...expandedRowKeys.value]; |
| | | const salesLedgerId = currentDeliveryRow.value.salesLedgerId; |
| | | |
| | | // 获取上传图片的临时ID |
| | | let tempFileIds = []; |
| | | if (deliveryFileList.value !== null && deliveryFileList.value.length > 0) { |
| | | tempFileIds = deliveryFileList.value.map((item) => item.tempId); |
| | | } |
| | | |
| | | addShippingInfo({ |
| | | salesLedgerId: salesLedgerId, |
| | | salesLedgerProductId: currentDeliveryRow.value.id, |
| | | type: deliveryForm.value.type, |
| | | shippingDate: deliveryForm.value.shippingDate, |
| | | shippingCarNumber: deliveryForm.value.type === "货车" ? deliveryForm.value.shippingCarNumber : "", |
| | | expressCompany: deliveryForm.value.type === "快递" ? deliveryForm.value.expressCompany : "", |
| | | expressNumber: deliveryForm.value.type === "快递" ? deliveryForm.value.expressNumber : "", |
| | | tempFileIds: tempFileIds, |
| | | approveUserIds, |
| | | }) |
| | | .then(() => { |
| | |
| | | // 关闭发货弹框 |
| | | const closeDeliveryDia = () => { |
| | | proxy.resetForm("deliveryFormRef"); |
| | | deliveryFileList.value = []; |
| | | deliveryFormVisible.value = false; |
| | | currentDeliveryRow.value = null; |
| | | }; |