海川开心:
1.销售管理、仓储物流一些字段赋默认值
2.生产报工改成可以多个报工
已修改2个文件
27 ■■■■■ 文件已修改
src/views/productionManagement/productionDispatching/components/autoDispatchDia.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionReporting/components/formDia.vue 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionDispatching/components/autoDispatchDia.vue
@@ -116,9 +116,6 @@
  
  // 构造提交数据 - 直接传递数组,不过滤
  const submitData = dispatchList.value
  console.log('提交自动派工数据:', submitData)
  // 调用API(这里需要根据实际接口调整)
  productionDispatchList(submitData).then(res => {
    proxy.$modal.msgSuccess(res.msg);
src/views/productionManagement/productionReporting/components/formDia.vue
@@ -7,7 +7,7 @@
                draggable
        @close="closeDia"
    >
      <el-form label-width="140px" label-position="top" :rules="rules" ref="formRef">
      <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef">
        <el-table
          :data="reportList"
          border
@@ -27,9 +27,9 @@
              <span>{{ scope.row.schedulingNum }}</span>
            </template>
          </el-table-column>
          <el-table-column label="待生产数量" prop="pendingNum" width="100">
          <el-table-column label="待生产数量" prop="pendingFinishNum" width="100">
            <template #default="scope">
              <span>{{ scope.row.pendingNum }}</span>
              <span>{{ scope.row.pendingFinishNum }}</span>
            </template>
          </el-table-column>
          <el-table-column label="本次生产数量" prop="finishedNum" width="150">
@@ -122,11 +122,12 @@
const operationType = ref('')
const reportList = ref([])
const data = reactive({
  form: {},
  rules: {
        schedulingNum: [{ required: true, message: "请输入", trigger: "blur" },],
  },
});
const { rules } = toRefs(data);
const { form, rules } = toRefs(data);
// 打开弹框
const openDialog = (type, rows) => {
@@ -150,7 +151,7 @@
            productCategory: row?.productCategory ?? '',
            specificationModel: row?.specificationModel ?? '',
            schedulingNum: total,
            pendingNum: Math.max(total - autoFill, 0),
            pendingFinishNum: pendingFinish, // 保存原始的待报工数量
            finishedNum: autoFill,
            unitPrice: unitPrice,
            totalPrice: (autoFill * unitPrice).toFixed(2),
@@ -165,7 +166,11 @@
        row.finishedNum = row.schedulingNum;
        proxy.$modal.msgWarning('本次生产数量不可大于排产数量')
    }
    row.pendingNum = row.schedulingNum - row.finishedNum;
    // 验证本次生产数量不能大于待报工数量
    if (value > row.pendingFinishNum) {
        row.finishedNum = row.pendingFinishNum;
        proxy.$modal.msgWarning('本次生产数量不可大于待报工数量')
    }
    calculateTotalPrice(row);
}
@@ -192,6 +197,10 @@
        }
        if (item.finishedNum > item.schedulingNum) {
            proxy.$modal.msgError(`第${i + 1}行本次生产数量不可大于排产数量`);
            return;
        }
        if (item.finishedNum > item.pendingFinishNum) {
            proxy.$modal.msgError(`第${i + 1}行本次生产数量不可大于待报工数量`);
            return;
        }
        if (!item.schedulingUserId) {
@@ -237,9 +246,6 @@
// 关闭弹框
const closeDia = () => {
  if (proxy.$refs.formRef) {
    proxy.resetForm("formRef");
  }
  dialogFormVisible.value = false;
  reportList.value = [];
  emit('close')