fix:1.仓储库存单位转换记录和库存关联更新
2.原材料和非原材料的数量区分
3.入库和出库记录删除单位转换库存更新
4.过磅单单位转换更新
已修改5个文件
237 ■■■■■ 文件已修改
src/views/inventoryManagement/dispatchLog/Record.vue 100 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/receiptManagement/Record.vue 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/stockManagement/Qualified.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/stockManagement/Subtract.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/stockReport/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/dispatchLog/Record.vue
@@ -42,85 +42,106 @@
                :row-key="(row) => row.id"
                style="width: 100%"
                height="calc(100vh - 18.5em)"
                :fit="true"
            >
                <el-table-column align="center" type="selection" width="55" />
                <el-table-column align="center" label="序号" type="index" width="60" />
                <el-table-column align="center" type="selection" min-width="55" fixed="left" />
                <el-table-column align="center" label="序号" type="index" min-width="60" fixed="left" />
        <el-table-column
            label="出库批次"
            prop="outboundBatches"
                    label="产品类型"
                    prop="parentName"
            min-width="100"
            show-overflow-tooltip
        />
                <el-table-column
                    label="出库日期"
                    prop="createTime"
                    label="车牌号"
                    prop="licensePlateNo"
                    min-width="120"
                    show-overflow-tooltip
                />
                <el-table-column
                    label="产品大类"
                    label="产品名称"
                    prop="productName"
                    min-width="120"
                    show-overflow-tooltip
                />
                <el-table-column
                    label="规格型号"
                    prop="model"
                    min-width="150"
                    show-overflow-tooltip
                />
                <el-table-column
                    label="单位"
                    prop="unit"
                    show-overflow-tooltip
                />
                <!-- <el-table-column
                    label="出库数量"
                    prop="stockOutNum"
                    show-overflow-tooltip
                /> -->
                <el-table-column
                    label="车牌号"
                    prop="licensePlateNo"
                    min-width="100"
                    show-overflow-tooltip
                />
                <el-table-column
                    label="毛重"
                    prop="grossWeight"
                    min-width="100"
                    show-overflow-tooltip
                />
                <el-table-column
                    label="皮重"
                    prop="tareWeight"
                    min-width="100"
                    show-overflow-tooltip
                />
                <el-table-column
                    label="净重"
                    prop="netWeight"
                    min-width="100"
                    show-overflow-tooltip
                />
                <el-table-column
                    label="出库人"
                    prop="createBy"
                    label="单位"
                    prop="unit"
                    min-width="80"
                    show-overflow-tooltip
                />
        <el-table-column label="来源"
                         prop="recordType"
                         show-overflow-tooltip>
          <template #default="scope">
            {{ getRecordType(scope.row.recordType) }}
          </template>
        </el-table-column>
        <el-table-column
            label="过磅日期"
            prop="weighingDate"
            min-width="120"
            show-overflow-tooltip
        />
        <el-table-column
            label="过磅员"
            prop="weighingOperator"
            min-width="100"
            show-overflow-tooltip
        />
                <el-table-column
                    label="出库人"
                    prop="createBy"
                    min-width="100"
                    show-overflow-tooltip
                />
        <el-table-column
            label="出库批次"
            prop="outboundBatches"
            min-width="150"
            show-overflow-tooltip
        />
        <el-table-column
            label="出库时间"
            prop="createTime"
            min-width="160"
            show-overflow-tooltip
        />
        <el-table-column label="来源"
                         prop="recordType"
                         min-width="100"
                         show-overflow-tooltip>
          <template #default="scope">
            {{ getRecordType(scope.row.recordType) }}
          </template>
        </el-table-column>
        <el-table-column label="操作"
                         width="260"
                         align="center">
                         min-width="200"
                         align="center"
                         fixed="right">
          <template #default="scope">
            <el-button
              v-if="scope.row.recordType === '0' && hasDispatchEdit"
@@ -129,7 +150,7 @@
              @click="handleEdit(scope.row)"
            >编辑</el-button>
            <el-button
              v-if="scope.row.recordType === '0'"
              v-if="scope.row.recordType === '0' && scope.row.parentName === '原材料'"
              type="primary"
              size="mini"
              @click="handlePreview(scope.row)"
@@ -144,7 +165,9 @@
        @close="closeEditModal"
      >
        <el-form label-width="140px" :model="editForm" label-position="top" ref="editFormRef">
          <!-- <el-form-item
          <!-- 非原材料显示出库数量 -->
          <template v-if="editForm.parentName !== '原材料'">
            <el-form-item
            label="出库数量"
            prop="stockOutNum"
          >
@@ -155,12 +178,12 @@
              :precision="0"
              controls-position="right"
              style="width: 100%"
              disabled
            />
          </el-form-item> -->
            </el-form-item>
          </template>
          <!-- 原材料显示过磅相关字段 -->
          <template v-if="editForm.parentName === '原材料'">
          <el-form-item
            label="车牌号"
            prop="licensePlateNo"
@@ -247,6 +270,7 @@
          >
            <el-input v-model="editForm.weighingOperator" />
          </el-form-item>
          </template>
        </el-form>
        <template #footer>
@@ -414,8 +438,12 @@
const handleEditSubmit = () => {
  editFormRef.value?.validate?.((valid) => {
    if (!valid) return;
    const { stockOutNum, ...payload } = editForm.value || {};
    editStockOut(payload).then(() => {
    const submitData = {
      ...editForm.value,
      productType: editForm.value.parentName === '原材料' ? 0 : 1,
      netWeight: editForm.value.parentName === '原材料' ? editForm.value.netWeight : editForm.value.stockOutNum
    };
    editStockOut(submitData).then(() => {
      closeEditModal();
      proxy.$modal.msgSuccess("编辑成功");
      getList();
src/views/inventoryManagement/receiptManagement/Record.vue
@@ -47,81 +47,98 @@
                :expand-row-keys="expandedRowKeys"
                :row-key="row => row.id"
                style="width: 100%"
                height="calc(100vh - 18.5em)">
                height="calc(100vh - 18.5em)"
                :fit="true">
        <el-table-column align="center"
                         type="selection"
                         width="55"/>
                         min-width="55"
                         fixed="left"/>
        <el-table-column align="center"
                         label="序号"
                         type="index"
                         width="60"/>
                         min-width="60"
                         fixed="left"/>
        <el-table-column label="产品类型"
                         prop="productType"
                         width="100"
                         prop="parentName"
                         min-width="100"
                         show-overflow-tooltip/>
        <el-table-column label="入库批次"
                         prop="inboundBatches"
                         width="280"
                         show-overflow-tooltip/>
        <el-table-column label="入库时间"
                         prop="createTime"
                         show-overflow-tooltip/>
        <el-table-column label="产品大类"
                         prop="productName"
                         show-overflow-tooltip/>
        <el-table-column label="规格型号"
                         prop="model"
                         show-overflow-tooltip/>
        <el-table-column label="单位"
                         prop="unit"
                         show-overflow-tooltip/>
        <!-- <el-table-column label="入库数量"
                         prop="stockInNum"
                         show-overflow-tooltip/> -->
        <el-table-column label="车牌号"
                         prop="licensePlateNo"
                         v-if="type === '0'"
                         min-width="120"
                         show-overflow-tooltip/>
        <el-table-column label="产品名称"
                         prop="productName"
                         min-width="120"
                         show-overflow-tooltip/>
        <el-table-column label="规格型号"
                         prop="model"
                         min-width="150"
                         show-overflow-tooltip/>
        <el-table-column label="入库数量"
                         prop="stockInNum"
                         min-width="100"
                         show-overflow-tooltip/>
        <el-table-column label="毛重"
                         prop="grossWeight"
                         v-if="type === '0'"
                         min-width="100"
                         show-overflow-tooltip/>
        <el-table-column label="皮重"
                         prop="tareWeight"
                         v-if="type === '0'"
                         min-width="100"
                         show-overflow-tooltip/>
        <el-table-column label="净重"
                         prop="netWeight"
                         v-if="type === '0'"
                         min-width="100"
                         show-overflow-tooltip/>
        <el-table-column label="单位"
                         prop="unit"
                         min-width="80"
                         show-overflow-tooltip/>
        <el-table-column label="过磅日期"
                         prop="weighingDate"
                         v-if="type === '0'"
                         min-width="160"
                         show-overflow-tooltip/>
        <el-table-column label="过磅员"
                         prop="weighingOperator"
                         v-if="type === '0'"
                         min-width="100"
                         show-overflow-tooltip/>
        <el-table-column label="入库人"
                         prop="createBy"
                         min-width="100"
                         show-overflow-tooltip/>
        <el-table-column label="入库时间"
                         prop="createTime"
                         min-width="160"
                         show-overflow-tooltip/>
        <el-table-column label="入库批次"
                         prop="inboundBatches"
                         min-width="150"
                         show-overflow-tooltip/>
        <el-table-column label="来源"
                         prop="recordType"
                         min-width="100"
                         show-overflow-tooltip>
          <template #default="scope">
            {{ getRecordType(scope.row.recordType) }}
          </template>
        </el-table-column>
        <el-table-column label="过磅日期"
                         prop="weighingDate"
                         v-if="type === '0'"
                         show-overflow-tooltip/>
        <el-table-column label="过磅员"
                         prop="weighingOperator"
                         v-if="type === '0'"
                         show-overflow-tooltip/>
        <el-table-column label="操作"
                         width="260"
                         align="center">
                         min-width="200"
                         align="center"
                         fixed="right">
          <template #default="scope">
            <el-button v-if="scope.row.recordType === '0' && hasReceiptEdit"
              type="primary"
              size="mini"
              @click="handleEdit(scope.row)"
            >编辑</el-button>
            <el-button v-if="scope.row.recordType === '0'"
            <el-button v-if="scope.row.recordType === '0' && scope.row.parentName === '原材料'"
                       type="primary"
                       size="mini"
                       @click="handlePreview(scope.row)">导出过磅单</el-button>
@@ -135,7 +152,9 @@
        @close="closeEditModal"
      >
        <el-form label-width="140px" :model="editForm" label-position="top" ref="editFormRef">
          <!-- <el-form-item
          <!-- 原材料显示入库数量 -->
          <template v-if="editForm.parentName !== '原材料'">
            <el-form-item
            label="入库数量"
            prop="stockInNum"
          >
@@ -146,13 +165,12 @@
              :precision="0"
              controls-position="right"
              style="width: 100%"
              disabled
            />
          </el-form-item> -->
            </el-form-item>
          </template>
          <template v-if="type === '0'">
          <!-- 非原材料显示过磅相关字段 -->
          <template v-if="type === '0' && editForm.parentName === '原材料'">
            <el-form-item
              label="车牌号"
              prop="licensePlateNo"
@@ -409,7 +427,12 @@
const handleEditSubmit = () => {
  editFormRef.value?.validate?.((valid) => {
    if (!valid) return;
    editStockInStock(editForm.value).then(() => {
    const submitData = {
      ...editForm.value,
      productType: editForm.value.parentName === '原材料' ? 0 : 1,
      netWeight: editForm.value.parentName === '原材料' ? editForm.value.netWeight : editForm.value.stockInNum
    };
    editStockInStock(submitData).then(() => {
      closeEditModal();
      proxy.$modal.msgSuccess("编辑成功");
      getList();
src/views/inventoryManagement/stockManagement/Qualified.vue
@@ -143,7 +143,10 @@
// 点击领用
const showSubtractModal = (row) => {
  console.log('row', row)
  record.value = row
  record.value = {
    ...row,
    productType: row.parentName === '原材料' ? 0 : 1
  }
  isShowSubtractModal.value = true
}
src/views/inventoryManagement/stockManagement/Subtract.vue
@@ -30,6 +30,28 @@
          <el-input v-model="formState.model"  disabled />
        </el-form-item>
        <!-- 非原材料显示数量字段 -->
        <el-form-item
            v-if="props.record.productType !== 0"
            label="数量"
            prop="qualitity"
            :rules="[
              { required: true, message: '请输入数量', trigger: ['blur', 'change'] }
            ]"
        >
          <el-input-number
              v-model="formState.qualitity"
              :min="0"
              :step="1"
              :precision="0"
              style="width: 100%"
              controls-position="right"
              placeholder="请输入数量"
          />
        </el-form-item>
        <!-- 原材料显示过磅相关字段 -->
        <template v-if="props.record.productType === 0">
        <el-form-item
            label="车牌号"
            prop="licensePlateNo"
@@ -116,6 +138,7 @@
        >
          <el-input v-model="formState.weighingOperator" />
        </el-form-item>
        </template>
        <el-form-item label="备注" prop="remark">
          <el-input v-model="formState.remark" type="textarea" />
src/views/inventoryManagement/stockReport/index.vue
@@ -176,7 +176,7 @@
             v-if="searchForm.reportType !== 'inout'"
           />
           <el-table-column
             label="产品大类"
             label="产品名称"
             prop="productName"
             show-overflow-tooltip
           />