Răsfoiți Sursa

其他出入库流程,以及部分bug解决

cz 1 an în urmă
părinte
comite
89b6da1837

+ 2 - 1
src/components/byTable/index.vue

@@ -439,8 +439,9 @@ export default defineComponent({
       const prop = item.attrs.prop;
       const propValue = prop && scope.row[prop];
       scope.row.$index = scope.$index;
+      // const args = propValue !== undefined ? propValue : scope.row;
       const args = propValue !== undefined ? propValue : scope.row;
-
+      console.log(args, "awdaw");
       return item[fn.name][fn.type](getParent.value, args);
     };
     // 匹配 render 开头的函数

+ 1 - 4
src/components/headerBar/header-bar.vue

@@ -790,10 +790,7 @@ const handleOpenDrawer = () => {
 const handlePushRouter = (att) => {
   let pageObj = {
     1: "Backlog",
-    2:
-      proxy.useUserStore().user.companyId == "100"
-        ? "PriceSheetEHSD"
-        : "PriceSheetEstimate",
+    2: "PriceSheetEstimate",
     3: "ProductionOrder",
     4: "WaitingForStorage",
     5: "WaitingForDelivery",

+ 386 - 0
src/components/process/SF/ManualDelivery.vue

@@ -0,0 +1,386 @@
+<template>
+  <div style="width: 100%; padding: 0px 15px">
+    <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom">
+      <template #details>
+        <div style="width: 100%">
+          <el-button type="primary" @click="clickAdd()" v-if="!judgeStatus()">添加明细</el-button>
+          <el-table :data="formData.data.list" style="width: 100%; margin-top: 16px">
+            <el-table-column label="图片" width="70" align="center">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <img v-if="row.fileUrl" :src="row.fileUrl" class="pic" @click="openImg(row.fileUrl)" />
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column prop="productCode" label="编码" width="190" />
+            <el-table-column prop="productName" label="名称" min-width="160" />
+            <el-table-column label="规格尺寸 (cm)" min-width="100">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                </div>
+              </template>
+            </el-table-column>
+            <!-- <el-table-column prop="productUnit" label="单位" width="100" :formatter="
+                  (row) => dictKeyValue(row.productUnit, materialUnitData)
+                " /> -->
+            <el-table-column prop="stockQuantity" label="库存数量" width="100" v-if="!judgeStatus()" />
+            <el-table-column prop="availableQuantity" label="可用库存" width="100" v-if="!judgeStatus()" />
+            <el-table-column label="出库数量" width="140">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'list.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                    <el-input-number v-model="row.quantity" placeholder="请输入出库数量" style="width: 100%" :precision="0" :controls="false" :min="1"
+                                     onmousewheel="return false;" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column align="center" label="操作" width="80" fixed="right" v-if="!judgeStatus()">
+              <template #default="{ row, $index }">
+                <el-button type="primary" link @click="handleDelete($index)">删除</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </template>
+    </byForm>
+    <el-dialog v-model="openProduct" title="物品选择" width="90%" append-to-body destroy-on-close>
+      <InventoryInquiry :selectStatus="true" :warehouseId="formData.data.warehouseId" @selectGood="selectGood" :key="formData.data.warehouseId">
+      </InventoryInquiry>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import byForm from "@/components/byForm/index";
+import { useRoute } from "vue-router";
+import InventoryInquiry from "@/views/purchaseSales/outAndInWarehouse/inventoryInquiry/index";
+
+const { proxy } = getCurrentInstance();
+const route = useRoute();
+// 接收父组件的传值
+const props = defineProps({
+  queryData: Object,
+});
+const openProduct = ref(false);
+const warehouseList = ref([]);
+const warehouseListOne = ref([]);
+const userList = ref([]);
+const deptData = ref([]);
+const outBoundReason = ref([
+  {
+    label: "生产打样",
+    value: "0",
+  },
+  {
+    label: "生产超领",
+    value: "1",
+  },
+  {
+    label: "出库申请",
+    value: "2",
+  },
+  {
+    label: "借用出库",
+    value: "3",
+  },
+  {
+    label: "其他出库",
+    value: "10",
+  },
+]);
+const produceOrder = ref([]);
+const lendData = ref([]);
+const lendDataOne = ref([]);
+const formData = reactive({
+  data: {
+    fileList: [],
+    list: [],
+  },
+});
+const formDom = ref(null);
+const judgeStatus = () => {
+  if (route.query.processType == 20 || route.query.processType == 10) {
+    return true;
+  }
+  if (props.queryData.recordList && props.queryData.recordList.length > 0) {
+    let data = props.queryData.recordList.filter(
+      (item) => item.status === 2 && item.nodeType !== 1
+    );
+    if (data && data.length > 0) {
+      return true;
+    }
+  }
+  return false;
+};
+const formOption = reactive({
+  inline: true,
+  labelWidth: 110,
+  itemWidth: 100,
+  disabled: false,
+});
+const formConfig = computed(() => {
+  return [
+    {
+      type: "title1",
+      title: "基本信息",
+    },
+    {
+      type: "treeSelect",
+      prop: "companyId",
+      label: "业务公司",
+      data: proxy.useUserStore().allDict["tree_company_data"],
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
+      itemWidth: 50,
+      fn: (val) => {
+        formData.data.warehouseId = "";
+        getWarehouseList(val);
+      },
+    },
+    {
+      type: "select",
+      prop: "warehouseId",
+      label: "仓库名称",
+      required: true,
+      data: warehouseListOne.value,
+      fn: () => {
+        changeWarehouse();
+      },
+      itemWidth: 50,
+    },
+    {
+      type: "input",
+      prop: "exWarehousePerson",
+      label: "领料人",
+      itemWidth: 50,
+    },
+    {
+      type: "select",
+      prop: "type",
+      label: "出库原因",
+      required: true,
+      data: outBoundReason.value,
+      fn: (val) => {
+        if (["1", "2", "0", "10"].includes(val)) {
+          formData.data.expectRestitutionTime = "";
+        } else {
+          formData.data.prodOrderId = "";
+        }
+      },
+      itemWidth: 50,
+    },
+    {
+      type: "select",
+      prop: "prodOrderId",
+      label: "生产订单",
+      data: produceOrder.value,
+      filterable: true,
+      itemWidth: 50,
+      isShow: ["1", "2", "0", "10"].includes(formData.data.type),
+    },
+    // {
+    //   type: "select",
+    //   prop: "ssdd",
+    //   label: "销售订单",
+    //   data: outBoundReason.value,
+    //   itemWidth: 50,
+    //   isShow: formData.data.aa == "3",
+    // },
+    {
+      type: "date",
+      itemType: "date",
+      prop: "expectRestitutionTime",
+      label: "归还日期",
+      itemWidth: 50,
+      isShow: formData.data.type == "3",
+    },
+    {
+      type: "input",
+      itemType: "textarea",
+      prop: "remarks",
+      label: "备注",
+      itemWidth: 100,
+    },
+    {
+      type: "slot",
+      slotName: "details",
+      label: "出库明细",
+    },
+  ];
+});
+
+const rules = ref({
+  companyId: [{ required: true, message: "请选择业务公司", trigger: "change" }],
+  warehouseId: [{ required: true, message: "请选择仓库", trigger: "change" }],
+  exWarehousePerson: [
+    { required: true, message: "请输入领料人", trigger: "blur" },
+  ],
+  type: [{ required: true, message: "请选择出库原因", trigger: "change" }],
+  prodOrderId: [
+    { required: true, message: "请选择生产订单", trigger: "change" },
+  ],
+  expectRestitutionTime: [
+    { required: true, message: "请选择归还日期", trigger: "change" },
+  ],
+  quantity: [{ required: true, message: "请输入出库数量", trigger: "blur" }],
+  remarks: [{ required: true, message: "请输入备注", trigger: "blur" }],
+});
+
+const isFormDetail = ref(false);
+if (route.query && route.query.processType && route.query.processType == 20) {
+  isFormDetail.value = true;
+}
+
+const getDict = () => {
+  // proxy.post("/warehouse/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+  //   if (res.rows && res.rows.length > 0) {
+  //     warehouseList.value = res.rows.map((item) => {
+  //       return {
+  //         label: item.name,
+  //         value: item.id,
+  //       };
+  //     });
+  //   }
+  // });
+
+  proxy
+    .post("produceOrder/page", {
+      pageNum: 1,
+      pageSize: 9999,
+      neProduceStatus: "10,99",
+    })
+    .then((res) => {
+      produceOrder.value = res.rows.map((x) => ({
+        label: x.code,
+        value: x.id,
+      }));
+      produceOrder.value.unshift({
+        label: "无",
+        value: -1,
+      });
+    });
+};
+getDict();
+
+const getWarehouseList = (val) => {
+  proxy
+    .post("/warehouse/page", {
+      pageNum: 1,
+      pageSize: 999,
+      companyId: val,
+    })
+    .then((res) => {
+      warehouseListOne.value = res.rows.map((item) => {
+        return {
+          label: item.name,
+          value: item.id,
+        };
+      });
+    });
+};
+
+const changeWarehouse = () => {
+  formData.data.list = [];
+};
+
+const clickAdd = () => {
+  if (formData.data.warehouseId) {
+    openProduct.value = true;
+  } else {
+    proxy.msgTip("请先选择仓库", 2);
+  }
+};
+
+const handleDelete = (index) => {
+  formData.data.list.splice(index, 1);
+};
+
+const selectGood = (row) => {
+  let fileUrl = "";
+  if (row.fileList && row.fileList.length > 0) {
+    fileUrl = row.fileList[0].fileUrl;
+  }
+  formData.data.list.push({
+    fileUrl: fileUrl,
+    productCode: row.productCustomCode,
+    productId: row.productId,
+    productName: row.productName,
+    productLength: row.productLength,
+    productWidth: row.productWidth,
+    productHeight: row.productHeight,
+    stockQuantity: row.quantity,
+    availableQuantity: row.availableQuantity || 0,
+    quantity: null,
+  });
+  proxy.msgTip("选择成功");
+};
+
+const handleSubmit = async (isStag = false) => {
+  if (isStag) {
+    return true;
+  }
+  let flag = await formDom.value.handleSubmit(() => {});
+  if (flag) {
+    if (formData.data.list && formData.data.list.length > 0) {
+      for (let i = 0; i < formData.data.list.length; i++) {
+        if (
+          formData.data.list[i].stockQuantity < formData.data.list[i].quantity
+        ) {
+          proxy.msgTip("出库数量不能大于库存数量", 2);
+          return false;
+        }
+      }
+    } else {
+      proxy.msgTip("请添加出库明细", 2);
+      return false;
+    }
+    return true;
+  } else {
+    setTimeout(() => {
+      const errorDiv = document.getElementsByClassName("is-error");
+      errorDiv[0].scrollIntoView();
+    }, 0);
+  }
+  return flag;
+};
+
+const getFormData = () => {
+  return proxy.deepClone(formData.data);
+};
+// 向父组件暴露
+defineExpose({
+  getFormData,
+  handleSubmit,
+});
+
+const getAllData = (businessId) => {
+  if (businessId) {
+    proxy.post("/manualStock/detail", { id: businessId }).then((res) => {
+      getWarehouseList(res.companyId);
+      res.type = res.type + "";
+      formData.data = res;
+      let ids = formData.data.list.map((x) => x.productId);
+      proxy.getFileData({
+        businessIdList: ids,
+        data: formData.data.list,
+        att: "productId",
+        businessType: "0",
+        fileAtt: "fileList",
+        filePathAtt: "fileUrl",
+      });
+    });
+  }
+};
+
+onMounted(() => {
+  formOption.disabled = judgeStatus();
+  if (route.query.businessId) {
+    getAllData(route.query.businessId);
+  }
+});
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 469 - 0
src/components/process/SF/ManualWarehousing.vue

@@ -0,0 +1,469 @@
+<template>
+  <div style="width: 100%; padding: 0px 15px">
+    <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom">
+      <template #details>
+        <div style="width: 100%">
+          <el-button type="primary" @click="openProduct = true" v-if="!judgeStatus()"
+                     :disabled="['100','103'].includes(formData.data.type)">添加明细</el-button>
+          <el-table :data="formData.data.list" style="width: 100%; margin-top: 16px">
+            <el-table-column label="图片" width="70" align="center">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <img v-if="row.fileUrl" :src="row.fileUrl" class="pic" @click="openImg(row.fileUrl)" />
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column prop="productCode" label="编码" width="190" />
+            <el-table-column prop="productName" label="名称" min-width="220" />
+            <el-table-column label="规格尺寸 (cm)" min-width="160">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                </div>
+              </template>
+            </el-table-column>
+            <!-- <el-table-column prop="productUnit" label="单位" width="100" :formatter="
+                  (row) => dictKeyValue(row.productUnit, materialUnitData)
+                " /> -->
+            <el-table-column label="入库数量" width="140">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'list.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                    <el-input-number v-model="row.quantity" placeholder="请输入数量" style="width: 100%" :precision="0" :controls="false" :min="1"
+                                     onmousewheel="return false;" :disabled="['100','103'].includes(formData.data.type)" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column align="center" label="操作" width="80" fixed="right" v-if="!['100','103'].includes(formData.data.type) && !judgeStatus()">
+              <template #default="{ row, $index }">
+                <el-button type="primary" link @click="handleDelete($index)">删除</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </template>
+    </byForm>
+    <el-dialog v-if="openProduct" v-model="openProduct" title="物品选择" width="90%" append-to-body>
+      <SelectAllGood @selectGood="selectGood"></SelectAllGood>
+      <!-- <SelectMaterial @selectMaterial="selectMaterial"></SelectMaterial> -->
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import byForm from "@/components/byForm/index";
+import { useRoute } from "vue-router";
+import SelectAllGood from "@/components/product/SelectAllGood";
+
+const { proxy } = getCurrentInstance();
+const route = useRoute();
+// 接收父组件的传值
+const props = defineProps({
+  queryData: Object,
+});
+const openProduct = ref(false);
+const warehouseList = ref([]);
+const warehouseListOne = ref([]);
+const userList = ref([]);
+const deptData = ref([]);
+const inBoundReason = ref([
+  {
+    label: "借用归还",
+    value: "100",
+  },
+  {
+    label: "退料入库",
+    value: "101",
+  },
+  {
+    label: "废料入库",
+    value: "102",
+  },
+  {
+    label: "丢件寻回",
+    value: "103",
+  },
+  {
+    label: "超领归还",
+    value: "108",
+  },
+  {
+    label: "错领归还",
+    value: "109",
+  },
+  {
+    label: "其他入库",
+    value: "110",
+  },
+]);
+const produceOrder = ref([]);
+const lendData = ref([]);
+const lendDataOne = ref([]);
+const formData = reactive({
+  data: {
+    fileList: [],
+    list: [],
+  },
+});
+const formDom = ref(null);
+const judgeStatus = () => {
+  if (route.query.processType == 20 || route.query.processType == 10) {
+    return true;
+  }
+  if (props.queryData.recordList && props.queryData.recordList.length > 0) {
+    let data = props.queryData.recordList.filter(
+      (item) => item.status === 2 && item.nodeType !== 1
+    );
+    if (data && data.length > 0) {
+      return true;
+    }
+  }
+  return false;
+};
+const formOption = reactive({
+  inline: true,
+  labelWidth: 110,
+  itemWidth: 100,
+  disabled: false,
+});
+const formConfig = computed(() => {
+  return [
+    {
+      type: "title1",
+      title: "基本信息",
+    },
+    {
+      type: "treeSelect",
+      prop: "companyId",
+      label: "业务公司",
+      data: proxy.useUserStore().allDict["tree_company_data"],
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
+      itemWidth: 50,
+      fn: (val) => {
+        formData.data.warehouseId = "";
+        getWarehouseList(val);
+      },
+    },
+    {
+      type: "select",
+      prop: "warehouseId",
+      label: "仓库名称",
+      required: true,
+      data: warehouseListOne.value,
+      itemWidth: 50,
+    },
+    {
+      type: "input",
+      prop: "exWarehousePerson",
+      label: "申请入库人",
+      itemWidth: 50,
+    },
+    {
+      type: "select",
+      prop: "type",
+      label: "入库原因",
+      required: true,
+      data: inBoundReason.value,
+      fn: (val) => {
+        formData.data.list = [];
+        if (["101", "102", "108", "109", "110"].includes(val)) {
+          formData.data.borrowId = "";
+          formData.data.loseId = "";
+        } else if (val == "103") {
+          formData.data.borrowId = "";
+          formData.data.prodOrderId = "";
+        } else {
+          formData.data.loseId = "";
+          formData.data.prodOrderId = "";
+        }
+      },
+      itemWidth: 50,
+    },
+    {
+      type: "select",
+      prop: "prodOrderId",
+      label: "生产订单",
+      data: produceOrder.value,
+      filterable: true,
+      itemWidth: 50,
+      isShow: ["101", "102", "108", "109", "110"].includes(formData.data.type),
+    },
+    {
+      type: "select",
+      prop: "borrowId",
+      label: "借出单",
+      data: lendData.value,
+      filterable: true,
+      itemWidth: 50,
+      isShow: formData.data.type == "100",
+      fn: (val) => {
+        if (val) {
+          proxy.post("/stockJournal/detail", { id: val }).then((res) => {
+            if (res.list && res.list.length < 1) {
+              return;
+            }
+            let ids = res.list.map((x) => x.productId);
+            formData.data.list = res.list.map((x) => ({
+              fileUrl: "",
+              productCode: x.productCode,
+              productId: x.productId,
+              productName: x.productName,
+              productLength: x.productLength,
+              productWidth: x.productWidth,
+              productHeight: x.productHeight,
+              quantity: x.quantity,
+            }));
+            proxy.getFileData({
+              businessIdList: ids,
+              data: formData.data.list,
+              att: "productId",
+              businessType: "0",
+              fileAtt: "fileList",
+              filePathAtt: "fileUrl",
+            });
+          });
+        }
+      },
+    },
+    {
+      type: "select",
+      prop: "loseId",
+      label: "丢件单",
+      data: lendDataOne.value,
+      filterable: true,
+      itemWidth: 50,
+      isShow: formData.data.type == "103",
+      fn: (val) => {
+        const current = lendDataOne.value.find((x) => x.value == val);
+        if (current && current.materialId) {
+          let ids = [current.materialId];
+          formData.data.list = [
+            {
+              fileUrl: "",
+              productCode: current.materialCode,
+              productId: current.materialId,
+              productName: current.materialName,
+              productLength: current.materialLength,
+              productWidth: current.materialWidth,
+              productHeight: current.materialHeight,
+              quantity: current.quantity,
+            },
+          ];
+          proxy.getFileData({
+            businessIdList: ids,
+            data: formData.data.list,
+            att: "productId",
+            businessType: "0",
+            fileAtt: "fileList",
+            filePathAtt: "fileUrl",
+          });
+        }
+      },
+    },
+    {
+      type: "input",
+      itemType: "textarea",
+      prop: "remarks",
+      label: "备注",
+      itemWidth: 100,
+    },
+    {
+      type: "slot",
+      slotName: "details",
+      label: "入库明细",
+    },
+  ];
+});
+
+const rules = ref({
+  companyId: [{ required: true, message: "请选择业务公司", trigger: "change" }],
+  warehouseId: [{ required: true, message: "请选择仓库", trigger: "change" }],
+  exWarehousePerson: [
+    { required: true, message: "请输入领料人", trigger: "blur" },
+  ],
+  type: [{ required: true, message: "请选择入库原因", trigger: "change" }],
+  prodOrderId: [
+    { required: true, message: "请选择生产订单", trigger: "change" },
+  ],
+  borrowId: [
+    { required: true, message: "请选择借用出库单", trigger: "change" },
+  ],
+  loseId: [{ required: true, message: "请选择丢件单", trigger: "change" }],
+  quantity: [{ required: true, message: "请输入入库数量", trigger: "blur" }],
+  remarks: [{ required: true, message: "请输入备注", trigger: "blur" }],
+});
+
+const isFormDetail = ref(false);
+if (route.query && route.query.processType && route.query.processType == 20) {
+  isFormDetail.value = true;
+}
+
+const getDict = () => {
+  // proxy.post("/warehouse/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+  //   if (res.rows && res.rows.length > 0) {
+  //     warehouseList.value = res.rows.map((item) => {
+  //       return {
+  //         label: item.name,
+  //         value: item.id,
+  //       };
+  //     });
+  //   }
+  // });
+
+  proxy
+    .post("produceOrder/page", {
+      pageNum: 1,
+      pageSize: 9999,
+      neProduceStatus: "10,99",
+    })
+    .then((res) => {
+      produceOrder.value = res.rows.map((x) => ({
+        label: x.code,
+        value: x.id,
+      }));
+      produceOrder.value.unshift({
+        label: "无",
+        value: -1,
+      });
+    });
+
+  proxy
+    .post("/stockJournal/page", {
+      pageNum: 1,
+      pageSize: 9999,
+      isRestitution: 0,
+      type: "3",
+    })
+    .then((res) => {
+      lendData.value = res.rows.map((x) => ({
+        label:
+          x.code +
+          " " +
+          x.expectRestitutionTime.slice(0, 10) +
+          " " +
+          x.exWarehousePerson +
+          " " +
+          x.remarks,
+        value: x.id,
+      }));
+    });
+
+  proxy
+    .post("/reportLossesDetails/page", {
+      pageNum: 1,
+      pageSize: 9999,
+      type: "2",
+    })
+    .then((res) => {
+      lendDataOne.value = res.rows.map((x) => ({
+        ...x,
+        label:
+          // x.code +
+          // " " +
+          x.repoTime.slice(0, 10) + " " + x.respUserName + " 数量" + x.quantity,
+        value: x.id,
+      }));
+    });
+};
+getDict();
+
+const getWarehouseList = (val) => {
+  proxy
+    .post("/warehouse/page", {
+      pageNum: 1,
+      pageSize: 999,
+      companyId: val,
+    })
+    .then((res) => {
+      warehouseListOne.value = res.rows.map((item) => {
+        return {
+          label: item.name,
+          value: item.id,
+        };
+      });
+    });
+};
+
+const handleDelete = (index) => {
+  formData.data.list.splice(index, 1);
+};
+
+const selectGood = (row) => {
+  console.log(row, "asdasd");
+  let fileUrl = "";
+  if (row.fileList && row.fileList.length > 0) {
+    fileUrl = row.fileList[0].fileUrl;
+  }
+  formData.data.list.push({
+    fileUrl: fileUrl,
+    productCode: row.customCode,
+    productId: row.id,
+    productName: row.name,
+    productLength: row["length"],
+    productWidth: row.width,
+    productHeight: row.height,
+    quantity: null,
+  });
+  proxy.msgTip("选择成功");
+};
+
+const handleSubmit = async (isStag = false) => {
+  if (isStag) {
+    return true;
+  }
+  let flag = await formDom.value.handleSubmit(() => {});
+  if (flag) {
+    if (!(formData.data.list && formData.data.list.length > 0)) {
+      proxy.msgTip("请添加入库明细", 2);
+      return false;
+    }
+    return true;
+  } else {
+    setTimeout(() => {
+      const errorDiv = document.getElementsByClassName("is-error");
+      errorDiv[0].scrollIntoView();
+    }, 0);
+  }
+  return flag;
+};
+
+const getFormData = () => {
+  return proxy.deepClone(formData.data);
+};
+// 向父组件暴露
+defineExpose({
+  getFormData,
+  handleSubmit,
+});
+
+const getAllData = (businessId) => {
+  if (businessId) {
+    proxy.post("/manualStock/detail", { id: businessId }).then((res) => {
+      getWarehouseList(res.companyId);
+      res.type = res.type + "";
+      formData.data = res;
+      let ids = formData.data.list.map((x) => x.productId);
+      proxy.getFileData({
+        businessIdList: ids,
+        data: formData.data.list,
+        att: "productId",
+        businessType: "0",
+        fileAtt: "fileList",
+        filePathAtt: "fileUrl",
+      });
+    });
+  }
+};
+
+onMounted(() => {
+  formOption.disabled = judgeStatus();
+  if (route.query.businessId) {
+    getAllData(route.query.businessId);
+  }
+});
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 5 - 0
src/components/process/SF/MedicalAndsocialSecurity.vue

@@ -245,6 +245,10 @@ const handleSubmit = async (isStag = false) => {
   return flag;
 };
 
+const dataRollback = () => {
+  formData.data.applyItem = formData.data.applyItem.split(",");
+};
+
 const getFormData = () => {
   return proxy.deepClone(formData.data);
 };
@@ -252,6 +256,7 @@ const getFormData = () => {
 defineExpose({
   getFormData,
   handleSubmit,
+  dataRollback,
 });
 
 const getAllData = (businessId) => {

+ 1 - 0
src/components/product/SelectAllGood.vue

@@ -392,6 +392,7 @@ const handleSubmit = () => {
 };
 
 const clickSelect = (item) => {
+  console.log(item, "awdwa");
   proxy.$emit("selectGood", item);
 };
 

+ 24 - 1
src/views/EHSD/productLibrary/waitCreateProduct/index.vue

@@ -48,12 +48,14 @@
           </template>
           <template #rawMaterialIdSlot>
             <div style="width:100%;padding-left:25px">
+
               <div>
                 <el-button type="primary" @click="openDialog(1)" plain>主材</el-button>
                 <el-button type="primary" @click="openDialog(2)" plain>工艺</el-button>
                 <el-button type="primary" @click="openDialog(3)" plain>辅材</el-button>
               </div>
-              <el-table :data="formData.data.productBomDetailList" style="width: 100%; margin-top: 16px">
+              <div style="color:red"> BOM主材请选择有属性原材料,并移除下表中标红的数据</div>
+              <el-table :data="formData.data.productBomDetailList" style="width: 100%; margin-top: 16px" :row-class-name="getRowClass">
                 <el-table-column prop="materialName" label="物料名称" width="170" />
                 <el-table-column prop="materialCode" label="物料编码" width="190" />
                 <el-table-column label="规格尺寸 (cm)" width="140">
@@ -1129,6 +1131,13 @@ const submitForm = () => {
       if (!(type1 && type3)) {
         return proxy.msgTip("未选择主材和工艺", 2);
       }
+      let isWsx = null;
+      isWsx = formData.data.productBomDetailList.some(
+        (x) => x.type == 1 && x.ancestors == 110
+      );
+      if (isWsx) {
+        return proxy.msgTip("还未移除无属性原材料", 2);
+      }
     }
 
     let checkNum = 0;
@@ -1217,6 +1226,7 @@ const getDtl = (row) => {
       lossRate: x.lossRate,
       quantity: x.quantity,
       remark: x.remark || "",
+      ancestors: x.type == 1 ? 110 : null,
     })),
     productCustomInfoList: row.quotationProductCustomInfoList || [],
     rawMaterialIdLabel: row.rawMaterialName + "," + row.rawMaterialCode,
@@ -1448,6 +1458,7 @@ const selectRawMaterial = (row) => {
         standardDosage: 1,
         lossRate: null,
         remark: "",
+        ancestors: 100,
       });
       proxy.msgTip("选择成功");
     } else {
@@ -1509,6 +1520,13 @@ const selectTechnology = (row) => {
     return proxy.msgTip("选择成功", 1);
   }
 };
+
+const getRowClass = ({ row }) => {
+  if (row.type == 1 && row.ancestors == 110) {
+    return "redClass";
+  }
+  return "";
+};
 </script>
 
 <style lang="scss" scoped>
@@ -1549,4 +1567,9 @@ const selectTechnology = (row) => {
 :deep(.el-checkbox) {
   margin-right: 0px;
 }
+.redClass {
+  color: #f54a45 !important;
+}
+</style>
+<style>
 </style>

+ 3 - 3
src/views/EHSD/saleContract/priceSheetEHSD/index.vue

@@ -175,8 +175,8 @@
 
         <template #commodity>
           <div style="width: 100%;padding-left:25px">
-            <el-button type="warning" @click="clickPushProduct" plain style="margin-bottom: 16px" v-if="!isDetail"
-                       :disabled="!formData.data.companyId">定制</el-button>
+            <el-button type="warning" @click="clickPushProduct" plain style="margin-bottom: 16px" v-if="!isDetail">定制</el-button>
+            <!-- :disabled="!formData.data.companyId" -->
             <!-- <el-button type="primary" @click="openProductCompany = true" plain style="margin-bottom: 16px" v-if="!isDetail"
                        :disabled="!formData.data.companyId">选择产品库</el-button> -->
             <el-collapse v-model="activeNames">
@@ -1215,7 +1215,7 @@
     </el-dialog>
 
     <el-dialog :title="'原材料选择'" v-model="openSelectRawMaterial" width="90%" destroy-on-close>
-      <SelectMaterial :ancestors="100" @selectMaterial="selectRawMaterial"></SelectMaterial>
+      <SelectMaterial :ancestors="110" @selectMaterial="selectRawMaterial"></SelectMaterial>
       <template #footer>
         <el-button @click="openSelectRawMaterial = false" size="defualt" v-debounce>取 消</el-button>
       </template>

+ 1 - 4
src/views/index.vue

@@ -505,10 +505,7 @@ const toUrl = (att) => {
 
   let pageObj = {
     1: "Backlog",
-    2:
-      proxy.useUserStore().user.companyId == "100"
-        ? "PriceSheetEHSD"
-        : "PriceSheetEstimate",
+    2: "PriceSheetEstimate",
     3: "ProductionOrder",
     4: "WaitingForStorage",
     5: "WaitingForDelivery",

+ 15 - 1
src/views/process/processApproval/index.vue

@@ -73,6 +73,12 @@
         <InvoicingApplication ref="makeDom" v-else-if="flowForm.flowKey == 'invoice_apply_flow'" :queryData="queryData.data">
         </InvoicingApplication>
 
+        <ManualWarehousing ref="makeDom" v-else-if="flowForm.flowKey == 'manual_in_stock_flow'" :queryData="queryData.data">
+        </ManualWarehousing>
+
+        <ManualDelivery ref="makeDom" v-else-if="flowForm.flowKey == 'manual_out_stock_flow'" :queryData="queryData.data">
+        </ManualDelivery>
+
         <!-- 取消到账认领 -->
         <!-- <CancelClaim ref="makeDom" v-else-if="flowForm.flowKey == 'claim_del_flow'" :queryData="queryData.data"></CancelClaim> -->
       </div>
@@ -242,6 +248,8 @@ import ActivityPriceInventory from "@/components/process/SF/ActivityPriceInvento
 import PersonalInvoice from "@/components/process/SF/PersonalInvoice";
 import InvoiceTaxDeduction from "@/components/process/SF/InvoiceTaxDeduction";
 import InvoicingApplication from "@/components/process/SF/InvoicingApplication";
+import ManualWarehousing from "@/components/process/SF/ManualWarehousing";
+import ManualDelivery from "@/components/process/SF/ManualDelivery";
 
 import PurchasePayment from "@/components/process/PurchasePayment";
 import SendFunds from "@/components/process/SendFunds";
@@ -351,6 +359,9 @@ const handleResult = (res) => {
       type: "info",
     });
   }
+  if (flowForm.flowKey == "medical_insurance_flow") {
+    makeDom.value.dataRollback();
+  }
 };
 
 const uploadFile = async (file) => {
@@ -408,7 +419,7 @@ const handleSubmit = async (_type) => {
                 version: route.query.version,
                 flowId: route.query.id,
                 skipSetData: true,
-                selectUserList: nextHandleUser.value || [],
+                selectUserList: nextHandleUser.value,
               })
               .then(
                 (res) => {
@@ -425,6 +436,7 @@ const handleSubmit = async (_type) => {
                 ...flowForm,
                 data,
                 skipSetData: true,
+                selectUserList: nextHandleUser.value,
               })
               .then(
                 (res) => {
@@ -576,6 +588,8 @@ const skipPage = () => {
     personal_invoice_flow: "PersonalInvoice",
     invoice_tax_deduction_flow: "InvoiceTaxDeduction",
     invoice_apply_flow: "InvoicingApplication",
+    manual_in_stock_flow: "ManualWarehousing",
+    manual_out_stock_flow: "ManualDelivery",
   };
   const useTagsStore = useTagsViewStore();
   useTagsStore.delVisitedView(router.currentRoute.value);

+ 239 - 22
src/views/purchaseSales/outAndInWarehouse/manualDelivery/index.vue

@@ -1,13 +1,36 @@
 <template>
   <div class="pageIndexClass">
+    <div style="background:#fff;padding:10px 10px 0 10px">
+      <el-tabs v-model="activeName" type="card" class="demo-tabs" @tab-change="handleTabChange">
+        <el-tab-pane label="出库明细" name="1">
+        </el-tab-pane>
+        <el-tab-pane label="出库批次" name="2">
+        </el-tab-pane>
+      </el-tabs>
+    </div>
     <div class="content">
-      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
-               highlight-current-row :action-list="[
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :otherHeight="65" :config="config" :loading="loading"
+               :selectConfig="selectConfig" highlight-current-row :action-list="[
+          {
+            text: '其他出库',
+            action: () => openModal(),
+          },
+        ]" @get-list="getList" v-if="activeName=='1'">
+
+        <template #pic="{item}">
+          <div style="width: 100%">
+            <img v-if="item.fileUrl" :src="item.fileUrl" class="pic" @click="openImg(item.fileUrl)" />
+          </div>
+        </template>
+
+      </byTable>
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :otherHeight="65" :config="configOne" :loading="loading"
+               :selectConfig="selectConfig" highlight-current-row :action-list="[
           {
             text: '其他出库',
             action: () => openModal(),
           },
-        ]" @get-list="getList">
+        ]" @get-list="getList" v-if="activeName=='2'">
 
         <template #pic="{item}">
           <div style="width: 100%">
@@ -15,6 +38,12 @@
           </div>
         </template>
 
+        <template #code="{item}">
+          <div style="width: 100%">
+            <span class="el-click" @click="getDtl(item)">{{item.code}}</span>
+          </div>
+        </template>
+
       </byTable>
     </div>
 
@@ -83,8 +112,10 @@ import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
 import { ElMessage } from "element-plus";
 import InventoryInquiry from "@/views/purchaseSales/outAndInWarehouse/inventoryInquiry/index";
+import useRefreshTableData from "@/hooks/refreshTableData";
 
 const { proxy } = getCurrentInstance();
+const activeName = ref("1");
 const warehouseList = ref([]);
 const warehouseListOne = ref([]);
 const outBoundReason = ref([
@@ -128,6 +159,20 @@ const sourceList = ref({
   },
 });
 const loading = ref(false);
+const statusData = ref([
+  {
+    label: "审批中",
+    value: 10,
+  },
+  {
+    label: "审批驳回",
+    value: 20,
+  },
+  {
+    label: "审批通过",
+    value: 30,
+  },
+]);
 const selectConfig = computed(() => {
   return [
     {
@@ -159,6 +204,11 @@ const selectConfig = computed(() => {
         },
       ],
     },
+    {
+      label: "审批状态",
+      prop: "status",
+      data: statusData.value,
+    },
   ];
 });
 const config = computed(() => {
@@ -182,12 +232,22 @@ const config = computed(() => {
       attrs: {
         label: "单号",
         prop: "code",
-        width: 120,
+        width: 150,
         fixed: "left",
       },
     },
     {
       attrs: {
+        label: "审批状态",
+        prop: "status",
+        width: 100,
+      },
+      render(type) {
+        return proxy.dictValueLabel(type, statusData.value);
+      },
+    },
+    {
+      attrs: {
         label: "出库原因",
         prop: "type",
         width: 110,
@@ -214,7 +274,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "物品编码",
-        prop: "productCustomCode",
+        prop: "productCode",
         width: 160,
       },
     },
@@ -242,6 +302,128 @@ const config = computed(() => {
     //     return proxy.dictKeyValue(unit, materialUnitData.value);
     //   },
     // },
+    // {
+    //   attrs: {
+    //     label: "关联生产订单",
+    //     prop: "prodOrderCode",
+    //     width: 150,
+    //   },
+    //   render(val) {
+    //     if (val) {
+    //       return val;
+    //     }
+    //     return "-";
+    //   },
+    // },
+    {
+      attrs: {
+        label: "约定归还日期",
+        prop: "expectRestitutionTime",
+        width: 150,
+      },
+      render(val) {
+        if (val) {
+          return val.slice(0, 10);
+        }
+        return "-";
+      },
+    },
+    {
+      attrs: {
+        label: "实际归还日期",
+        prop: "restitutionTime",
+        width: 150,
+      },
+      render(val) {
+        if (val) {
+          return val.slice(0, 10);
+        }
+        return "-";
+      },
+    },
+    {
+      attrs: {
+        label: "出库数量",
+        prop: "quantity",
+        width: 140,
+      },
+    },
+    {
+      attrs: {
+        label: "领料人",
+        prop: "exWarehousePerson",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
+        label: "备注",
+        prop: "remarks",
+        "min-width": 200,
+      },
+    },
+    {
+      attrs: {
+        label: "操作人",
+        prop: "opUserName",
+        width: 110,
+      },
+    },
+  ];
+});
+
+const configOne = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "业务公司",
+        prop: "companyName",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
+        label: "操作时间",
+        prop: "createTime",
+        width: 160,
+        fixed: "left",
+      },
+    },
+    {
+      attrs: {
+        label: "单号",
+        slot: "code",
+        width: 150,
+        fixed: "left",
+      },
+    },
+    {
+      attrs: {
+        label: "审批状态",
+        prop: "status",
+        width: 100,
+      },
+      render(type) {
+        return proxy.dictValueLabel(type, statusData.value);
+      },
+    },
+    {
+      attrs: {
+        label: "出库原因",
+        prop: "type",
+        width: 110,
+      },
+      render(val) {
+        return proxy.dictValueLabel(val, outBoundReason.value);
+      },
+    },
+    {
+      attrs: {
+        label: "仓库名称",
+        prop: "warehouseName",
+        width: 150,
+      },
+    },
     {
       attrs: {
         label: "关联生产订单",
@@ -255,6 +437,7 @@ const config = computed(() => {
         return "-";
       },
     },
+
     {
       attrs: {
         label: "约定归还日期",
@@ -283,13 +466,6 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "出库数量",
-        prop: "quantity",
-        width: 140,
-      },
-    },
-    {
-      attrs: {
         label: "领料人",
         prop: "exWarehousePerson",
         width: 110,
@@ -311,6 +487,7 @@ const config = computed(() => {
     },
   ];
 });
+
 const getDict = () => {
   proxy.post("/warehouse/page", { pageNum: 1, pageSize: 999 }).then((res) => {
     if (res.rows && res.rows.length > 0) {
@@ -340,18 +517,17 @@ const getDict = () => {
       });
     });
 };
+const requestUrl = ref("/manualStockDetails/page");
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy
-    .post("/stockJournalDetails/page", sourceList.value.pagination)
-    .then((res) => {
-      sourceList.value.data = res.rows;
-      sourceList.value.pagination.total = res.total;
-      setTimeout(() => {
-        loading.value = false;
-      }, 200);
-
+  proxy.post(requestUrl.value, sourceList.value.pagination).then((res) => {
+    sourceList.value.data = res.rows;
+    sourceList.value.pagination.total = res.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+    if (activeName.value == "1") {
       const productIdList = res.rows.map((x) => x.productId);
       // 请求文件数据并回显
       if (productIdList.length > 0) {
@@ -364,8 +540,26 @@ const getList = async (req) => {
           filePathAtt: "fileUrl",
         });
       }
-    });
+    }
+  });
 };
+
+const handleTabChange = (val) => {
+  sourceList.value.pagination = {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+    warehouseId: "",
+    type: "",
+    opType: "2",
+    isRestitution: "",
+  };
+  requestUrl.value =
+    val == "1" ? "/manualStockDetails/page" : "/manualStock/page";
+  getList();
+};
+
 getDict();
 getList();
 const dialogVisible = ref(false);
@@ -502,6 +696,15 @@ const rules = ref({
   remarks: [{ required: true, message: "请输入备注", trigger: "blur" }],
 });
 const openModal = () => {
+  proxy.$router.replace({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "manual_out_stock_flow",
+      flowName: "其他出库发起流程",
+      random: proxy.random(),
+    },
+  });
+  return;
   formData.data = {
     type: "",
     list: [],
@@ -596,6 +799,20 @@ const submitForm = () => {
 const handleDelete = (index) => {
   formData.data.list.splice(index, 1);
 };
+useRefreshTableData(getList);
+
+const getDtl = (row) => {
+  proxy.$router.push({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "manual_out_stock_flow",
+      flowName: "其他出库流程查看",
+      random: proxy.random(),
+      businessId: row.id,
+      processType: 20,
+    },
+  });
+};
 </script>
 
 <style lang="scss" scoped>

+ 225 - 29
src/views/purchaseSales/outAndInWarehouse/manualWarehousing/index.vue

@@ -1,13 +1,21 @@
 <template>
   <div class="pageIndexClass">
+    <div style="background:#fff;padding:10px 10px 0 10px">
+      <el-tabs v-model="activeName" type="card" class="demo-tabs" @tab-change="handleTabChange">
+        <el-tab-pane label="入库明细" name="1">
+        </el-tab-pane>
+        <el-tab-pane label="入库批次" name="2">
+        </el-tab-pane>
+      </el-tabs>
+    </div>
     <div class="content">
-      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
-               highlight-current-row :action-list="[
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :otherHeight="65" :config="config" :loading="loading"
+               :selectConfig="selectConfig" highlight-current-row :action-list="[
           {
             text: '其他入库',
             action: () => openModal(),
           },
-        ]" @get-list="getList">
+        ]" @get-list="getList" v-if="activeName=='1'">
 
         <template #pic="{item}">
           <div style="width: 100%">
@@ -15,6 +23,34 @@
           </div>
         </template>
 
+        <!-- <template #code="{item}">
+          <div style="width: 100%">
+            <span class="el-click" @click="getDtl(item)">{{item.code}}</span>
+          </div>
+        </template> -->
+
+      </byTable>
+
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :otherHeight="65" :config="configOne" :loading="loading"
+               :selectConfig="selectConfig" highlight-current-row :action-list="[
+          {
+            text: '其他入库',
+            action: () => openModal(),
+          },
+        ]" @get-list="getList" v-if="activeName=='2'">
+
+        <template #pic="{item}">
+          <div style="width: 100%">
+            <img v-if="item.fileUrl" :src="item.fileUrl" class="pic" @click="openImg(item.fileUrl)" />
+          </div>
+        </template>
+
+        <template #code="{item}">
+          <div style="width: 100%">
+            <span class="el-click" @click="getDtl(item)">{{item.code}}</span>
+          </div>
+        </template>
+
       </byTable>
     </div>
 
@@ -82,7 +118,10 @@ import byForm from "@/components/byForm/index";
 import { ElMessage } from "element-plus";
 import SelectAllGood from "@/components/product/SelectAllGood";
 // import SelectMaterial from "@/components/product/SelectMaterial.vue";
+import useRefreshTableData from "@/hooks/refreshTableData";
+
 const { proxy } = getCurrentInstance();
+const activeName = ref("1");
 const warehouseList = ref([]);
 const warehouseListOne = ref([]);
 const materialUnitData = computed(
@@ -134,6 +173,20 @@ const sourceList = ref({
   },
 });
 const loading = ref(false);
+const statusData = ref([
+  {
+    label: "审批中",
+    value: 10,
+  },
+  {
+    label: "审批驳回",
+    value: 20,
+  },
+  {
+    label: "审批通过",
+    value: 30,
+  },
+]);
 const selectConfig = computed(() => {
   return [
     {
@@ -151,6 +204,11 @@ const selectConfig = computed(() => {
       prop: "type",
       data: inBoundReason.value,
     },
+    {
+      label: "审批状态",
+      prop: "status",
+      data: statusData.value,
+    },
   ];
 });
 const config = computed(() => {
@@ -174,12 +232,22 @@ const config = computed(() => {
       attrs: {
         label: "单号",
         prop: "code",
-        width: 120,
+        width: 150,
         fixed: "left",
       },
     },
     {
       attrs: {
+        label: "审批状态",
+        prop: "status",
+        width: 100,
+      },
+      render(type) {
+        return proxy.dictValueLabel(type, statusData.value);
+      },
+    },
+    {
+      attrs: {
         label: "入库原因",
         prop: "type",
         width: 110,
@@ -206,7 +274,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "物品编码",
-        prop: "productCustomCode",
+        prop: "productCode",
         width: 160,
       },
     },
@@ -234,6 +302,102 @@ const config = computed(() => {
     //     return proxy.dictKeyValue(unit, materialUnitData.value);
     //   },
     // },
+    // {
+    //   attrs: {
+    //     label: "关联生产订单",
+    //     prop: "prodOrderCode",
+    //     width: 150,
+    //   },
+    //   render(val) {
+    //     if (val) {
+    //       return val;
+    //     }
+    //     return "-";
+    //   },
+    // },
+    {
+      attrs: {
+        label: "入库数量",
+        prop: "quantity",
+        width: 140,
+      },
+    },
+    {
+      attrs: {
+        label: "申请入库人",
+        prop: "exWarehousePerson",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
+        label: "备注",
+        prop: "remarks",
+        "min-width": 200,
+      },
+    },
+    {
+      attrs: {
+        label: "操作人",
+        prop: "opUserName",
+        width: 110,
+      },
+    },
+  ];
+});
+
+const configOne = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "业务公司",
+        prop: "companyName",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
+        label: "操作时间",
+        prop: "createTime",
+        width: 160,
+        fixed: "left",
+      },
+    },
+    {
+      attrs: {
+        label: "单号",
+        slot: "code",
+        width: 150,
+        fixed: "left",
+      },
+    },
+    {
+      attrs: {
+        label: "审批状态",
+        prop: "status",
+        width: 100,
+      },
+      render(type) {
+        return proxy.dictValueLabel(type, statusData.value);
+      },
+    },
+    {
+      attrs: {
+        label: "入库原因",
+        prop: "type",
+        width: 110,
+      },
+      render(val) {
+        return proxy.dictValueLabel(val, inBoundReason.value);
+      },
+    },
+    {
+      attrs: {
+        label: "仓库名称",
+        prop: "warehouseName",
+        width: 150,
+      },
+    },
     {
       attrs: {
         label: "关联生产订单",
@@ -249,13 +413,6 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "入库数量",
-        prop: "quantity",
-        width: 140,
-      },
-    },
-    {
-      attrs: {
         label: "申请入库人",
         prop: "exWarehousePerson",
         width: 110,
@@ -277,6 +434,7 @@ const config = computed(() => {
     },
   ];
 });
+
 const getDict = () => {
   proxy.post("/warehouse/page", { pageNum: 1, pageSize: 999 }).then((res) => {
     if (res.rows && res.rows.length > 0) {
@@ -344,18 +502,18 @@ const getDict = () => {
       }));
     });
 };
+const requestUrl = ref("/manualStockDetails/page");
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy
-    .post("/stockJournalDetails/page", sourceList.value.pagination)
-    .then((res) => {
-      sourceList.value.data = res.rows;
-      sourceList.value.pagination.total = res.total;
-      setTimeout(() => {
-        loading.value = false;
-      }, 200);
+  proxy.post(requestUrl.value, sourceList.value.pagination).then((res) => {
+    sourceList.value.data = res.rows;
+    sourceList.value.pagination.total = res.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
 
+    if (activeName.value == "1") {
       const productIdList = res.rows.map((x) => x.productId);
       // 请求文件数据并回显
       if (productIdList.length > 0) {
@@ -368,7 +526,22 @@ const getList = async (req) => {
           filePathAtt: "fileUrl",
         });
       }
-    });
+    }
+  });
+};
+const handleTabChange = (val) => {
+  sourceList.value.pagination = {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+    warehouseId: "",
+    type: "",
+    opType: "1",
+  };
+  requestUrl.value =
+    val == "1" ? "/manualStockDetails/page" : "/manualStock/page";
+  getList();
 };
 getDict();
 getList();
@@ -407,14 +580,13 @@ const formConfig = computed(() => {
             companyId: val,
           })
           .then((res) => {
-            if (res.rows && res.rows.length > 0) {
-              warehouseListOne.value = res.rows.map((item) => {
-                return {
-                  label: item.name,
-                  value: item.id,
-                };
-              });
-            }
+            formData.data.warehouseId = "";
+            warehouseListOne.value = res.rows.map((item) => {
+              return {
+                label: item.name,
+                value: item.id,
+              };
+            });
           });
       },
     },
@@ -566,6 +738,15 @@ const rules = ref({
   remarks: [{ required: true, message: "请输入备注", trigger: "blur" }],
 });
 const openModal = () => {
+  proxy.$router.replace({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "manual_in_stock_flow",
+      flowName: "其他入库发起流程",
+      random: proxy.random(),
+    },
+  });
+  return;
   getDict();
   formData.data = {
     type: "",
@@ -686,6 +867,21 @@ const acquireSelectList = () => {
 const handleClickFile = (fileUrl) => {
   window.open(fileUrl, "_blank");
 };
+
+useRefreshTableData(getList);
+
+const getDtl = (row) => {
+  proxy.$router.push({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "manual_in_stock_flow",
+      flowName: "其他入库流程查看",
+      random: proxy.random(),
+      businessId: row.id,
+      processType: 20,
+    },
+  });
+};
 </script>
 
 <style lang="scss" scoped>