Parcourir la source

Merge branch 'master' into 新建订单流程

lxf il y a 1 an
Parent
commit
a6edf3c281
31 fichiers modifiés avec 799 ajouts et 209 suppressions
  1. 4 0
      src/components/makeGroupProduct/index.vue
  2. 4 0
      src/components/makeProduct/index.vue
  3. 2 0
      src/components/makeProduct/subsidiary/index.vue
  4. 4 0
      src/components/process/order.vue
  5. 13 10
      src/components/process/purchase.vue
  6. 40 0
      src/components/process/subscribe.vue
  7. 14 0
      src/router/index.js
  8. 24 2
      src/views/group/finance/check-bill/index.vue
  9. 2 9
      src/views/group/finance/check-bill/printOrder.vue
  10. 0 37
      src/views/group/finance/purchase-warehousing/index.vue
  11. 27 1
      src/views/group/finance/summary/index.vue
  12. 2 9
      src/views/group/finance/summary/printOrder.vue
  13. 3 3
      src/views/group/order/management/detail.vue
  14. 4 18
      src/views/group/order/management/index.vue
  15. 15 3
      src/views/group/picLibrary/picture/index.vue
  16. 10 2
      src/views/production/operation/batching/quick.vue
  17. 41 29
      src/views/production/operation/overclaim/index.vue
  18. 152 22
      src/views/production/schedule/order-inquiry/index.vue
  19. 19 6
      src/views/production/warehouse/check/index.vue
  20. 1 1
      src/views/production/warehouse/finished-parts-storage/index.vue
  21. 15 3
      src/views/production/warehouse/flow-record/index.vue
  22. 22 5
      src/views/production/warehouse/inventory/index.vue
  23. 32 7
      src/views/production/warehouse/outbound/index.vue
  24. 240 0
      src/views/production/warehouse/outbound/packing-materials/add.vue
  25. 20 7
      src/views/production/warehouse/putInStorage/index.vue
  26. 25 1
      src/views/subsidiary/finance/check-bill/index.vue
  27. 27 1
      src/views/subsidiary/finance/summary/index.vue
  28. 7 3
      src/views/subsidiary/order/management/add.vue
  29. 6 3
      src/views/subsidiary/order/management/design.vue
  30. 2 22
      src/views/subsidiary/order/management/index.vue
  31. 22 5
      src/views/subsidiary/warehouse/inventory/index.vue

+ 4 - 0
src/components/makeGroupProduct/index.vue

@@ -365,6 +365,7 @@ const formData = reactive({
         height: undefined,
         netWeight: undefined,
         sharedFolder: "",
+        artworkLibraryId: "0",
         bomSpecId: "",
         remark: "",
         packagingMaterialList: [],
@@ -508,6 +509,7 @@ const addSpecification = () => {
         height: undefined,
         netWeight: undefined,
         sharedFolder: "",
+        artworkLibraryId: "0",
         bomSpecId: "",
         remark: "",
         packagingMaterialList: [],
@@ -527,6 +529,7 @@ const addSpecification = () => {
           height: undefined,
           netWeight: undefined,
           sharedFolder: "",
+        artworkLibraryId: "0",
           bomSpecId: "",
           remark: "",
           packagingMaterialList: [],
@@ -704,6 +707,7 @@ const clickDrawingFile = (index) => {
 const selectPic = (row) => {
   formData.data.skuSpecList[drawingFileIndex.value].sharedFolder = row.fileUrl;
   formData.data.skuSpecList[drawingFileIndex.value].designImgUrl = row.imgUrl;
+  formData.data.skuSpecList[drawingFileIndex.value].artworkLibraryId = row.id;
   ElMessage({ message: "选择完成", type: "success" });
   openDrawingFile.value = false;
 };

+ 4 - 0
src/components/makeProduct/index.vue

@@ -361,6 +361,7 @@ const formData = reactive({
         height: undefined,
         netWeight: undefined,
         sharedFolder: "",
+        artworkLibraryId: "0",
         bomSpecId: "",
         remark: "",
         packagingMaterialList: [],
@@ -506,6 +507,7 @@ const addSpecification = () => {
         height: undefined,
         netWeight: undefined,
         sharedFolder: "",
+        artworkLibraryId: "0",
         bomSpecId: "",
         remark: "",
         packagingMaterialList: [],
@@ -525,6 +527,7 @@ const addSpecification = () => {
           height: undefined,
           netWeight: undefined,
           sharedFolder: "",
+          artworkLibraryId: "0",
           bomSpecId: "",
           remark: "",
           packagingMaterialList: [],
@@ -702,6 +705,7 @@ const clickDrawingFile = (index) => {
 const selectPic = (row) => {
   formData.data.skuSpecList[drawingFileIndex.value].sharedFolder = row.fileUrl;
   formData.data.skuSpecList[drawingFileIndex.value].designImgUrl = row.imgUrl;
+  formData.data.skuSpecList[drawingFileIndex.value].artworkLibraryId = row.id;
   ElMessage({ message: "选择完成", type: "success" });
   openDrawingFile.value = false;
 };

+ 2 - 0
src/components/makeProduct/subsidiary/index.vue

@@ -264,6 +264,7 @@ const formData = reactive({
         height: undefined,
         netWeight: undefined,
         sharedFolder: "",
+        artworkLibraryId: "0",
         bomSpecId: "",
         remark: "",
         packagingMaterialList: [],
@@ -507,6 +508,7 @@ const clickDrawingFile = (index) => {
 const selectPic = (row) => {
   formData.data.skuSpecList[drawingFileIndex.value].sharedFolder = row.fileUrl;
   formData.data.skuSpecList[drawingFileIndex.value].designImgUrl = row.imgUrl;
+  formData.data.skuSpecList[drawingFileIndex.value].artworkLibraryId = row.id;
   ElMessage({ message: "选择完成", type: "success" });
   openDrawingFile.value = false;
 };

+ 4 - 0
src/components/process/order.vue

@@ -616,6 +616,7 @@ const clickDrawingFile = (index) => {
 const selectPic = (row) => {
   formData.data.orderSkuList[drawingFileIndex.value].blueprint = row.imgUrl;
   formData.data.orderSkuList[drawingFileIndex.value].productionDocument = row.fileUrl;
+  formData.data.orderSkuList[drawingFileIndex.value].artworkLibraryId = row.id;
   ElMessage({ message: "选择完成", type: "success" });
   openDrawingFile.value = false;
 };
@@ -723,6 +724,7 @@ const pushProduct = async (res, SKU, row) => {
     orderSkuBomList: orderSkuBomList,
     blueprint: row.designImgUrl,
     productionDocument: row.sharedFolder,
+    artworkLibraryId: "0",
     inventoryQuantity: inventoryQuantity,
   });
   ElMessage({ message: "添加成功", type: "success" });
@@ -799,6 +801,7 @@ const uploadFile = async (file) => {
 };
 const handleSuccess = (UploadFile, index) => {
   formData.data.orderSkuList[index].productionDocument = UploadFile.raw.fileUrl;
+  formData.data.orderSkuList[index].artworkLibraryId = "0";
 };
 const uploadImgData = ref({});
 const uploadImgFile = async (file) => {
@@ -811,6 +814,7 @@ const uploadImgFile = async (file) => {
 };
 const handleImgSuccess = (UploadFile, index) => {
   formData.data.orderSkuList[index].blueprint = UploadFile.raw.fileUrl;
+  formData.data.orderSkuList[index].artworkLibraryId = "0";
 };
 const computeQuantity = (index, indexSKU) => {
   let quantity = 0;

+ 13 - 10
src/components/process/purchase.vue

@@ -67,7 +67,7 @@
                     style="width: 100%"
                     :controls="false"
                     :min="0"
-                    :precision="2" />
+                    :precision="3" />
                 </el-form-item>
               </template>
             </el-table-column>
@@ -93,7 +93,7 @@
             </el-table-column>
             <el-table-column label="不含税单价" width="100">
               <template #default="{ row }">
-                <div>{{ moneyFormat(Number(Math.round(((row.unitPrice * 100) / (100 + row.taxRate)) * 100) / 100)) }}</div>
+                <div>{{ moneyFormat(Number(Math.round(((row.unitPrice * 100) / (100 + row.taxRate)) * 1000) / 1000), 3) }}</div>
               </template>
             </el-table-column>
             <el-table-column label="可采购数量" width="100">
@@ -127,14 +127,17 @@
             </el-table-column>
             <el-table-column label="含税小计" align="right" width="120">
               <template #default="{ row }">
-                <div>{{ moneyFormat(Number(Math.round(row.unitPrice * row.purchaseQuantity * 100) / 100)) }}</div>
+                <div>{{ moneyFormat(Number(Math.round(row.unitPrice * row.purchaseQuantity * 1000) / 1000), 3) }}</div>
               </template>
             </el-table-column>
             <el-table-column label="不含税小计" align="right" width="120">
               <template #default="{ row }">
                 <div>
                   {{
-                    moneyFormat(Number(Math.round((Math.round(((row.unitPrice * 100) / (100 + row.taxRate)) * 100) / 100) * row.purchaseQuantity * 100) / 100))
+                    moneyFormat(
+                      Number(Math.round((Math.round(((row.unitPrice * 100) / (100 + row.taxRate)) * 1000) / 1000) * row.purchaseQuantity * 1000) / 1000),
+                      3
+                    )
                   }}
                 </div>
               </template>
@@ -203,9 +206,9 @@
       <template #money>
         <div style="width: 100%">
           <div style="padding: 8px; background-color: #e9f5fb; font-size: 12px; font-weight: 700">
-            <span>含税总金额: {{ moneyFormat(formData.data.totalAmountIncludingTax) }} ({{ formData.data.totalAmountIncludingTaxCn }})</span>
+            <span>含税总金额: {{ moneyFormat(formData.data.totalAmountIncludingTax, 3) }} ({{ formData.data.totalAmountIncludingTaxCn }})</span>
             <span style="margin-left: 32px">
-              不含税总金额: {{ moneyFormat(formData.data.totalAmountExcludingTax) }} ({{ formData.data.totalAmountExcludingTaxCn }})
+              不含税总金额: {{ moneyFormat(formData.data.totalAmountExcludingTax, 3) }} ({{ formData.data.totalAmountExcludingTaxCn }})
             </span>
           </div>
         </div>
@@ -481,15 +484,15 @@ const calculatedTotalAmount = () => {
   if (formData.data.purchaseBomList && formData.data.purchaseBomList.length > 0) {
     for (let i = 0; i < formData.data.purchaseBomList.length; i++) {
       if (formData.data.purchaseBomList[i].unitPrice && formData.data.purchaseBomList[i].purchaseQuantity) {
-        money = Number(Math.round((money + formData.data.purchaseBomList[i].unitPrice * formData.data.purchaseBomList[i].purchaseQuantity) * 100) / 100);
+        money = Number(Math.round((money + formData.data.purchaseBomList[i].unitPrice * formData.data.purchaseBomList[i].purchaseQuantity) * 1000) / 1000);
         if (formData.data.purchaseBomList[i].taxRate) {
           notTaxMoney = Number(
             Math.round(
               (notTaxMoney +
-                (Math.round(((formData.data.purchaseBomList[i].unitPrice * 100) / (100 + formData.data.purchaseBomList[i].taxRate)) * 100) / 100) *
+                (Math.round(((formData.data.purchaseBomList[i].unitPrice * 100) / (100 + formData.data.purchaseBomList[i].taxRate)) * 1000) / 1000) *
                   formData.data.purchaseBomList[i].purchaseQuantity) *
-                100
-            ) / 100
+                1000
+            ) / 1000
           );
         }
       }

+ 40 - 0
src/components/process/subscribe.vue

@@ -37,6 +37,13 @@
           </el-table>
         </div>
       </template>
+      <template #file>
+        <div style="width: 100%">
+          <div v-for="(item, index) in fileList" :key="index">
+            <a style="color: #409eff; cursor: pointer; word-break: break-all" @click="onPreviewFile(item.url)">{{ item.name }}</a>
+          </div>
+        </div>
+      </template>
     </byForm>
 
     <el-dialog title="选择物料" v-if="openMateriel" v-model="openMateriel" width="90%">
@@ -128,6 +135,20 @@ const formConfig = computed(() => {
       type: "slot",
       slotName: "materiel",
     },
+    route.query && route.query.processType == "20"
+      ? {
+          type: "title",
+          title: "附件",
+          label: "",
+        }
+      : {},
+    route.query && route.query.processType == "20"
+      ? {
+          type: "slot",
+          slotName: "file",
+          label: "附件",
+        }
+      : {},
   ];
 });
 const rules = ref({
@@ -184,18 +205,37 @@ const handleSubmit = async (flag) => {
 const getFormData = () => {
   return proxy.deepClone(formData.data);
 };
+const fileList = ref([]);
 watch(
   () => props.queryData,
   (newValue) => {
     formOption.disabled = judgeStatus();
     if (props.queryData && ["10", "20", "30", "40"].includes(route.query.processType)) {
       formData.data = proxy.deepClone(newValue);
+      if (route.query.processType == "20" && formData.data.id) {
+        proxy.post("/fileInfo/getList", { businessIdList: [formData.data.id] }).then((fileObj) => {
+          if (fileObj[formData.data.id] && fileObj[formData.data.id].length > 0) {
+            fileList.value = fileObj[formData.data.id].map((item) => {
+              return {
+                raw: item,
+                name: item.fileName,
+                url: item.fileUrl,
+              };
+            });
+          } else {
+            fileList.value = [];
+          }
+        });
+      }
     }
   },
   {
     deep: true,
   }
 );
+const onPreviewFile = (path) => {
+  window.open(path, "_blank");
+};
 onMounted(() => {
   if (route.query.subscribeStatus) {
     if (subscribeStore().subscribe.list && subscribeStore().subscribe.list.length > 0) {

+ 14 - 0
src/router/index.js

@@ -203,6 +203,20 @@ export const constantRoutes = [
     ],
   },
   {
+    path: "/outbound/packing-materials/add",
+    component: Layout,
+    redirect: "/outbound/packing-materials/add",
+    children: [
+      {
+        path: "/outbound/packing-materials/add",
+        name: "add-outbound",
+        component: () => import(/* webpackChunkName: "page" */ "@/views/production/warehouse/outbound/packing-materials/add.vue"),
+        props: true,
+        meta: { title: "包材出库" },
+      },
+    ],
+  },
+  {
     path: "/check/add",
     component: Layout,
     redirect: "/check/add",

+ 24 - 2
src/views/group/finance/check-bill/index.vue

@@ -69,7 +69,6 @@
               <el-table-column label="包装人工费 ¥" prop="packingLabor" align="right" width="110" />
               <el-table-column label="包材费 ¥" prop="packagingMaterialCost" align="right" width="100" />
               <el-table-column label="管理费 ¥" prop="managementFee" align="right" width="100" />
-              <el-table-column label="外箱包装费 ¥" prop="outerBoxPackingFee" align="right" width="110" />
               <el-table-column label="操作" align="center" fixed="right" width="60">
                 <template #default="{ $index }">
                   <el-button type="danger" @click="clickOrderDelete($index)" text>删除</el-button>
@@ -422,7 +421,6 @@ const selectOrder = (row) => {
     deliveryMaterialsFee: row.deliveryMaterialsFee,
     packingLabor: row.packingLabor,
     managementFee: row.managementFee,
-    outerBoxPackingFee: row.outerBoxPackingFee,
     packagingMaterialCost: row.packagingMaterialCost,
   });
   ElMessage({ message: "添加成功", type: "success" });
@@ -642,6 +640,30 @@ const clickPrint = (row) => {
   activeName.value = "sku";
   rowData.value = row;
   openPrint.value = true;
+  proxy.post("/statementOfAccount/getOrderClassifyTotalCount", [row.id]).then((res) => {
+    cardList.value = [
+      {
+        dictKey: 1,
+        dictValue: "万里牛订单(" + res.wlnOrderCount + ")",
+      },
+      {
+        dictKey: 2,
+        dictValue: "采购订单(" + res.purchaseOrderCount + ")",
+      },
+      {
+        dictKey: 3,
+        dictValue: "委外订单(" + res.outsourceOrderCount + ")",
+      },
+      {
+        dictKey: 4,
+        dictValue: "售后订单(" + res.afterSaleOrderCount + ")",
+      },
+      {
+        dictKey: 5,
+        dictValue: "无理由订单(" + res.noReasonOrderCount + ")",
+      },
+    ];
+  });
 };
 const clickCopyWLNCode = (row) => {
   ElMessage("复制数据中,请稍后");

+ 2 - 9
src/views/group/finance/check-bill/printOrder.vue

@@ -90,7 +90,6 @@ watch(
                           packingLaborSummary: res[i].skuSpecList[j].bomSpecList[y].packingLaborSummary,
                           managementFeeSummary: res[i].skuSpecList[j].bomSpecList[y].managementFeeSummary,
                           unitPriceSKU: res[i].skuSpecList[j].unitPrice,
-                          outerBoxPackingFee: res[i].outerBoxPackingFee,
                           total: res[i].total,
                           indexOne: indexOne,
                           indexTwo: indexTwo,
@@ -253,20 +252,14 @@ const columns = computed(() => {
       width: 120,
     },
     {
-      dataKey: "outerBoxPackingFee",
-      key: "column-18",
-      title: "外箱包装费",
-      width: 120,
-    },
-    {
       dataKey: "total",
-      key: "column-19",
+      key: "column-18",
       title: "合计",
       width: 120,
     },
   ];
 });
-const mergeColumnOne = [0, 1, 2, 18, 19];
+const mergeColumnOne = [0, 1, 2, 18];
 const mergeColumnTwo = [3, 4, 5, 16, 17];
 const Row = ({ rowData, cells }) => {
   if (rowData.indexOne > 1) {

+ 0 - 37
src/views/group/finance/purchase-warehousing/index.vue

@@ -178,43 +178,6 @@ const config = computed(() => {
         width: 120,
       },
     },
-    // {
-    //   attrs: {
-    //     label: "未税金额",
-    //     prop: "dimensionality",
-    //     width: 160,
-    //   },
-    //   render(val) {
-    //     return proxy.moneyFormat(val);
-    //   },
-    // },
-    // {
-    //   attrs: {
-    //     label: "税额",
-    //     prop: "dimensionality",
-    //     width: 160,
-    //   },
-    //   render(val) {
-    //     return proxy.moneyFormat(val);
-    //   },
-    // },
-    // {
-    //   attrs: {
-    //     label: "价税合计金额",
-    //     prop: "dimensionality",
-    //     width: 160,
-    //   },
-    //   render(val) {
-    //     return proxy.moneyFormat(val);
-    //   },
-    // },
-    // {
-    //   attrs: {
-    //     label: "税率",
-    //     prop: "dimensionality",
-    //     width: 160,
-    //   },
-    // },
   ];
 });
 const getList = async (req, status) => {

+ 27 - 1
src/views/group/finance/summary/index.vue

@@ -38,7 +38,7 @@
         </el-tabs>
       </div>
     </el-dialog>
-    
+
     <el-dialog title="Excel文件" v-if="openFileList" v-model="openFileList" width="60%">
       <ExcelFile></ExcelFile>
       <template #footer>
@@ -259,6 +259,32 @@ const clickPrint = (row) => {
   activeName.value = "sku";
   rowData.value = row;
   openPrint.value = true;
+  if (row.idGroupConcat) {
+    proxy.post("/statementOfAccount/getOrderClassifyTotalCount", row.idGroupConcat.split(",")).then((res) => {
+      cardList.value = [
+        {
+          dictKey: 1,
+          dictValue: "万里牛订单(" + res.wlnOrderCount + ")",
+        },
+        {
+          dictKey: 2,
+          dictValue: "采购订单(" + res.purchaseOrderCount + ")",
+        },
+        {
+          dictKey: 3,
+          dictValue: "委外订单(" + res.outsourceOrderCount + ")",
+        },
+        {
+          dictKey: 4,
+          dictValue: "售后订单(" + res.afterSaleOrderCount + ")",
+        },
+        {
+          dictKey: 5,
+          dictValue: "无理由订单(" + res.noReasonOrderCount + ")",
+        },
+      ];
+    });
+  }
 };
 const clickCopyWLNCode = (row) => {
   if (row.idGroupConcat) {

+ 2 - 9
src/views/group/finance/summary/printOrder.vue

@@ -89,7 +89,6 @@ watch(
                           packingLaborSummary: res[i].skuSpecList[j].bomSpecList[y].packingLaborSummary,
                           managementFeeSummary: res[i].skuSpecList[j].bomSpecList[y].managementFeeSummary,
                           unitPriceSKU: res[i].skuSpecList[j].unitPrice,
-                          outerBoxPackingFee: res[i].outerBoxPackingFee,
                           total: res[i].total,
                           indexOne: indexOne,
                           indexTwo: indexTwo,
@@ -259,20 +258,14 @@ const columns = computed(() => {
       width: 120,
     },
     {
-      dataKey: "outerBoxPackingFee",
-      key: "column-18",
-      title: "外箱包装费",
-      width: 120,
-    },
-    {
       dataKey: "total",
-      key: "column-19",
+      key: "column-18",
       title: "合计",
       width: 120,
     },
   ];
 });
-const mergeColumnOne = [0, 1, 2, 18, 19];
+const mergeColumnOne = [0, 1, 2, 18];
 const mergeColumnTwo = [3, 4, 5, 16, 17];
 const Row = ({ rowData, cells }) => {
   if (rowData.indexOne > 1) {

+ 3 - 3
src/views/group/order/management/detail.vue

@@ -335,7 +335,7 @@
               <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">包装人工费: ¥{{ moneyFormat(calculatedAmount("packingLabor"), 2) }}</span>
               <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">包材费: ¥{{ moneyFormat(calculatedPackagingMaterialCost(), 2) }}</span>
               <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">管理费: ¥{{ moneyFormat(calculatedAmount("managementFee"), 2) }}</span>
-              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">外箱包装费: ¥{{ moneyFormat(calculatedOuterBoxPackingFee(), 2) }}</span>
+              <!-- <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">外箱包装费: ¥{{ moneyFormat(calculatedOuterBoxPackingFee(), 2) }}</span> -->
             </div>
             <div style="padding: 8px 0 0 0">
               <span style="font-weight: 700; color: red">订单总金额(含税): ¥{{ moneyFormat(calculatedTotalAmount(), 2) }}</span>
@@ -784,7 +784,7 @@ const submitChangePrice = () => {
         formData.data.deliveryMaterialsFee = calculatedAmount("deliveryMaterialsFee");
         formData.data.packingLabor = calculatedAmount("packingLabor");
         formData.data.managementFee = calculatedAmount("managementFee");
-        formData.data.outerBoxPackingFee = calculatedOuterBoxPackingFee();
+        // formData.data.outerBoxPackingFee = calculatedOuterBoxPackingFee();
         formData.data.packagingMaterialCost = calculatedPackagingMaterialCost();
         formData.data.totalAmount = calculatedTotalAmount();
         if (fileList.value && fileList.value.length > 0) {
@@ -996,7 +996,7 @@ const calculatedTotalAmount = () => {
         calculatedAmount("deliveryMaterialsFee") +
         calculatedAmount("packingLabor") +
         calculatedAmount("managementFee") +
-        calculatedOuterBoxPackingFee() +
+        // calculatedOuterBoxPackingFee() +
         calculatedPackagingMaterialCost()) *
         100
     ) / 100

+ 4 - 18
src/views/group/order/management/index.vue

@@ -89,7 +89,6 @@
 import byTable from "/src/components/byTable/index";
 import { ElMessage, ElMessageBox } from "element-plus";
 import { copyText } from "vue3-clipboard";
-import { flowStatus } from "/src/utils/flowStatus";
 import DeliveryNote from "/src/components/order/deliveryNote/index";
 
 const { proxy } = getCurrentInstance();
@@ -181,24 +180,11 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "流程状态",
-        prop: "flowStatus",
-        width: 120,
-      },
-      render(val) {
-        return proxy.dictKeyValue(val, flowStatus());
-      },
-    },
-    {
-      attrs: {
         label: "订单状态",
         prop: "status",
         width: 120,
       },
-      render(val, row) {
-        if (val == 0 && row.flowStatus !== 2) {
-          return "";
-        }
+      render(val) {
         return proxy.dictKeyValue(val, proxy.useUserStore().allDict["order_status"]);
       },
     },
@@ -389,7 +375,7 @@ const config = computed(() => {
                 },
               }
             : {},
-          row.type === 1 && row.status == 40
+          !props.selectStatus && row.type === 1 && row.status == 40
             ? {
                 attrs: {
                   label: "送货单",
@@ -441,7 +427,7 @@ const config = computed(() => {
                 },
               }
             : {},
-          !props.selectStatus && [0, 10, 20].includes(row.status)
+          !props.selectStatus && [0, 10, 20].includes(row.status) && proxy.useUserStore().user.userId === "1"
             ? {
                 attrs: {
                   label: "删除",
@@ -454,7 +440,7 @@ const config = computed(() => {
                 },
               }
             : {},
-          !props.selectStatus && [30, 40].includes(row.status)
+          !props.selectStatus && [30, 40].includes(row.status) && proxy.useUserStore().user.userId === "1"
             ? {
                 attrs: {
                   label: "删除",

+ 15 - 3
src/views/group/picLibrary/picture/index.vue

@@ -50,7 +50,6 @@
             :before-upload="uploadFile"
             :on-success="handleSuccess"
             :on-preview="onPreviewFile"
-            :limit="1"
             style="width: 100%">
             <el-button style="background: #20b2aa; color: #fff; border: 1px solid #20b2aa">上传</el-button>
           </el-upload>
@@ -129,16 +128,26 @@ const rules = ref({
 const uploadData = ref({});
 const fileList = ref([]);
 const uploadFile = async (file) => {
+  console.log("111");
   const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
   uploadData.value = res.uploadBody;
   file.id = res.id;
   file.fileName = res.fileName;
   file.fileUrl = res.fileUrl;
-  file.uploadState = true;
   return true;
 };
 const handleSuccess = (any, UploadFile) => {
-  UploadFile.raw.uploadState = false;
+  fileList.value = [
+    {
+      raw: {
+        id: UploadFile.raw.id,
+        fileName: UploadFile.raw.fileName,
+        fileUrl: UploadFile.raw.fileUrl,
+      },
+      name: UploadFile.raw.fileName,
+      url: UploadFile.raw.fileUrl,
+    },
+  ];
 };
 const uploadMainData = ref({});
 const uploadMainFile = async (file) => {
@@ -239,6 +248,9 @@ const clickDelete = (row) => {
     })
     .catch(() => {});
 };
+const onPreviewFile = (file) => {
+  window.open(file.raw.fileUrl, "_blank");
+};
 </script>
 
 <style lang="scss" scoped>

+ 10 - 2
src/views/production/operation/batching/quick.vue

@@ -148,12 +148,20 @@ const clickCancel = () => {
 };
 onMounted(() => {
   proxy.post("/stockPreparation/outBomList", formData.data).then((res) => {
-    inOutStorageBomList.value = Object.freeze(res);
+    if (res && res.length > 0) {
+      inOutStorageBomList.value = Object.freeze(res.filter((item) => !["吊牌", "不干胶"].includes(item.classifyName)));
+    } else {
+      inOutStorageBomList.value = [];
+    }
   });
 });
 const changeDepartment = () => {
   proxy.post("/stockPreparation/outBomList", formData.data).then((res) => {
-    inOutStorageBomList.value = Object.freeze(res);
+    if (res && res.length > 0) {
+      inOutStorageBomList.value = Object.freeze(res.filter((item) => !["吊牌", "不干胶"].includes(item.classifyName)));
+    } else {
+      inOutStorageBomList.value = [];
+    }
   });
 };
 const statisticalQuantity = () => {

+ 41 - 29
src/views/production/operation/overclaim/index.vue

@@ -1,6 +1,11 @@
 <template>
   <el-card class="box-card">
     <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+      <template #orderId>
+        <div style="width: 100%">
+          <el-select-v2 v-model="formData.data.orderId" :options="productionOrder" placeholder="请选择订单号" @change="changeOrder()" style="width: 100%" filterable />
+        </div>
+      </template>
       <template #productionCostList>
         <div style="width: 100%">
           <el-table :data="formData.data.productionCostList" :row-style="{ height: '35px' }" header-row-class-name="tableHeader">
@@ -55,10 +60,17 @@ const getDemandData = () => {
     if (res.rows && res.rows.length > 0) {
       productionOrder.value = productionOrder.value.concat(
         res.rows.map((item) => {
-          return {
-            dictKey: item.orderId,
-            dictValue: item.code + " (" + item.wlnCode + ")",
-          };
+          if (item.wlnCode) {
+            return {
+              value: item.orderId,
+              label: item.code + " (" + item.wlnCode + ")",
+            };
+          } else {
+            return {
+              value: item.orderId,
+              label: item.code,
+            };
+          }
         })
       );
     }
@@ -83,34 +95,11 @@ const formData = reactive({
 const formConfig = computed(() => {
   return [
     {
-      type: "select",
+      type: "slot",
       label: "订单号",
+      slotName: "orderId",
       prop: "orderId",
-      data: productionOrder.value,
       itemWidth: 51,
-      fn: (val) => {
-        if (val) {
-          proxy.post("/productionExceedReceive/getOrderSkuList", { id: val }).then((res) => {
-            if (res && res.length > 0) {
-              formData.data.productionCostList = res.map((item) => {
-                return {
-                  bomSpecId: item.bomSpecId,
-                  name: item.name,
-                  code: item.code,
-                  bomCode: item.bomCode,
-                  quantity: undefined,
-                  orderQuantity: item.quantity,
-                  id: item.id,
-                };
-              });
-            } else {
-              formData.data.productionCostList = [];
-            }
-          });
-        } else {
-          formData.data.productionCostList = [];
-        }
-      },
     },
     {
       type: "select",
@@ -149,6 +138,29 @@ const clickCancel = () => {
   };
   submit.value.resetFields();
 };
+const changeOrder = () => {
+  if (formData.data.orderId) {
+    proxy.post("/productionExceedReceive/getOrderSkuList", { id: formData.data.orderId }).then((res) => {
+      if (res && res.length > 0) {
+        formData.data.productionCostList = res.map((item) => {
+          return {
+            bomSpecId: item.bomSpecId,
+            name: item.name,
+            code: item.code,
+            bomCode: item.bomCode,
+            quantity: undefined,
+            orderQuantity: item.quantity,
+            id: item.id,
+          };
+        });
+      } else {
+        formData.data.productionCostList = [];
+      }
+    });
+  } else {
+    formData.data.productionCostList = [];
+  }
+};
 </script>
 
 <style lang="scss" scoped>

+ 152 - 22
src/views/production/schedule/order-inquiry/index.vue

@@ -1,30 +1,40 @@
 <template>
-  <div>
-    <el-card class="box-card">
-      <byTable
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :config="config"
-        :loading="loading"
-        :searchConfig="searchConfig"
-        highlight-current-row
-        @get-list="getList"
-        @clickReset="clickReset">
-        <template #code="{ item }">
-          <div>
-            <a style="color: #409eff; cursor: pointer; word-break: break-all" @click="clickCode(item)">{{ item.code }}</a>
-          </div>
-        </template>
-        <template #address="{ item }">
-          <div>{{ item.province }}, {{ item.city }}, {{ item.county }}, {{ item.detailedAddress }}</div>
-        </template>
-      </byTable>
-    </el-card>
-  </div>
+  <el-card class="box-card">
+    <byTable
+      :source="sourceList.data"
+      :pagination="sourceList.pagination"
+      :config="config"
+      :loading="loading"
+      :searchConfig="searchConfig"
+      highlight-current-row
+      @get-list="getList"
+      @clickReset="clickReset">
+      <template #code="{ item }">
+        <div>
+          <a style="color: #409eff; cursor: pointer; word-break: break-all" @click="clickCode(item)">{{ item.code }}</a>
+        </div>
+      </template>
+      <template #address="{ item }">
+        <div>{{ item.province }}, {{ item.city }}, {{ item.county }}, {{ item.detailedAddress }}</div>
+      </template>
+    </byTable>
+
+    <el-dialog title="售后类型" v-if="openAfterSale" v-model="openAfterSale" width="300px" style="margin-top: 20vh !important">
+      <template #footer>
+        <el-button type="primary" @click="applyForAfterSale(1)" size="large" v-preReClick>退 货</el-button>
+        <el-button @click="applyForAfterSale(2)" size="large" v-preReClick>换 货</el-button>
+      </template>
+    </el-dialog>
+
+    <el-dialog title="送货单" v-if="openDeliveryNote" v-model="openDeliveryNote" width="1000px">
+      <DeliveryNote :rowData="rowData" @clickCancel="clickCancel"></DeliveryNote>
+    </el-dialog>
+  </el-card>
 </template>
 
 <script setup>
 import byTable from "/src/components/byTable/index";
+import DeliveryNote from "/src/components/order/deliveryNote/index";
 
 const { proxy } = getCurrentInstance();
 const departmentList = ref([{ dictKey: "0", dictValue: "胜德体育" }]);
@@ -146,6 +156,70 @@ const config = computed(() => {
         "min-width": 220,
       },
     },
+    {
+      attrs: {
+        label: "操作",
+        width: 180,
+        align: "center",
+        fixed: "right",
+      },
+      renderHTML(row) {
+        return [
+          [40, 50].includes(row.status)
+            ? {
+                attrs: {
+                  label: "售后",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  clickAfterSale(row);
+                },
+              }
+            : {},
+          row.type === 1 && row.status == 40
+            ? {
+                attrs: {
+                  label: "送货单",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  clickDeliveryNote(row);
+                },
+              }
+            : {},
+          row.status == 20
+            ? {
+                attrs: {
+                  label: "挂起",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  clickHangUp(row);
+                },
+              }
+            : {},
+          row.status == 60
+            ? {
+                attrs: {
+                  label: "取消挂起",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  clickCancelHangUp(row);
+                },
+              }
+            : {},
+        ];
+      },
+    },
   ];
 });
 const getDemandData = () => {
@@ -197,6 +271,62 @@ const clickCode = (row) => {
     },
   });
 };
+const openAfterSale = ref(false);
+const rowData = ref({});
+const clickAfterSale = (row) => {
+  rowData.value = row;
+  openAfterSale.value = true;
+};
+const applyForAfterSale = (type) => {
+  openAfterSale.value = false;
+  proxy.$router.replace({
+    path: "/order/after-sale/initiate",
+    query: {
+      orderInfoId: rowData.value.id,
+      type: type,
+      random: proxy.random(),
+    },
+  });
+};
+const openDeliveryNote = ref(false);
+const clickDeliveryNote = (row) => {
+  rowData.value = row;
+  openDeliveryNote.value = true;
+};
+const clickCancel = (status) => {
+  openDeliveryNote.value = false;
+  if (status) {
+    getList();
+  }
+};
+const clickHangUp = (row) => {
+  ElMessageBox.confirm("你是否确认此操作", "提示", {
+    confirmButtonText: "确定",
+    cancelButtonText: "取消",
+    type: "warning",
+  })
+    .then(() => {
+      proxy.post("/orderInfo/suspendOrder", { id: row.id }).then(() => {
+        ElMessage({ message: "操作成功", type: "success" });
+        getList();
+      });
+    })
+    .catch(() => {});
+};
+const clickCancelHangUp = (row) => {
+  ElMessageBox.confirm("你是否确认此操作", "提示", {
+    confirmButtonText: "确定",
+    cancelButtonText: "取消",
+    type: "warning",
+  })
+    .then(() => {
+      proxy.post("/orderInfo/cancelSuspendOrder", { id: row.id }).then(() => {
+        ElMessage({ message: "操作成功", type: "success" });
+        getList();
+      });
+    })
+    .catch(() => {});
+};
 </script>
 
 <style lang="scss" scoped>

+ 19 - 6
src/views/production/warehouse/check/index.vue

@@ -55,6 +55,7 @@ import byTable from "/src/components/byTable/index";
 const { proxy } = getCurrentInstance();
 const activeName = ref("first");
 const departmentList = ref([{ dictKey: "0", dictValue: "胜德体育" }]);
+const warehouseList = ref([]);
 const status = ref([
   { dictKey: "0", dictValue: "正常" },
   { dictKey: "1", dictValue: "异常" },
@@ -97,9 +98,10 @@ const searchConfig = computed(() => {
       label: "事业部",
     },
     {
-      type: "input",
-      prop: "warehouseName",
-      label: "仓库名称",
+      type: "select",
+      prop: "warehouseId",
+      data: warehouseList.value,
+      label: "仓库",
     },
     {
       type: "select",
@@ -133,9 +135,10 @@ const searchConfigTwo = computed(() => {
       label: "事业部",
     },
     {
-      type: "input",
-      prop: "warehouseName",
-      label: "仓库名称",
+      type: "select",
+      prop: "warehouseId",
+      data: warehouseList.value,
+      label: "仓库",
     },
     {
       type: "select",
@@ -349,6 +352,16 @@ const getDemandData = () => {
       );
     }
   });
+  proxy.post("/warehouse/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    if (res.rows && res.rows.length > 0) {
+      warehouseList.value = res.rows.map((item) => {
+        return {
+          dictKey: item.id,
+          dictValue: item.name,
+        };
+      });
+    }
+  });
 };
 getDemandData();
 const clickModal = () => {

+ 1 - 1
src/views/production/warehouse/finished-parts-storage/index.vue

@@ -280,7 +280,7 @@ const deriveExcel = () => {
   });
 };
 const deriveExcelTwo = () => {
-  proxy.getFile("/inventoryFinishedOrder/excelExport", sourceList.value.pagination).then((res) => {
+  proxy.getFile("/inventoryFinishedOrder/excelExport", sourceListTwo.value.pagination).then((res) => {
     proxy.downloadFile(res, "成品库明细.xlsx");
   });
 };

+ 15 - 3
src/views/production/warehouse/flow-record/index.vue

@@ -24,6 +24,7 @@ import byTable from "/src/components/byTable/index";
 
 const { proxy } = getCurrentInstance();
 const departmentList = ref([{ dictKey: "0", dictValue: "胜德体育" }]);
+const warehouseList = ref([]);
 const sourceList = ref({
   data: [],
   pagination: {
@@ -66,9 +67,10 @@ const searchConfig = computed(() => {
       label: "事业部",
     },
     {
-      type: "input",
-      prop: "warehouseName",
-      label: "仓库名称",
+      type: "select",
+      prop: "warehouseId",
+      data: warehouseList.value,
+      label: "仓库",
     },
     {
       type: "select",
@@ -229,6 +231,16 @@ const getDemandData = () => {
       );
     }
   });
+  proxy.post("/warehouse/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    if (res.rows && res.rows.length > 0) {
+      warehouseList.value = res.rows.map((item) => {
+        return {
+          dictKey: item.id,
+          dictValue: item.name,
+        };
+      });
+    }
+  });
 };
 getDemandData();
 const deriveExcel = () => {

+ 22 - 5
src/views/production/warehouse/inventory/index.vue

@@ -41,6 +41,9 @@
             <template #total="{ item }">
               <div>{{ getTotal(item) }}</div>
             </template>
+            <template #quantity="{ item }">
+              <div>{{ item.quantity + item.lockQuantity }}</div>
+            </template>
           </byTable>
         </el-card>
       </el-col>
@@ -176,7 +179,7 @@ const config = computed(() => {
       attrs: {
         label: "结存单价",
         prop: "balanceUnitPrice",
-        width: 120,
+        width: 110,
         align: "right",
       },
     },
@@ -184,15 +187,29 @@ const config = computed(() => {
       attrs: {
         label: "结存总价",
         slot: "total",
-        width: 160,
+        width: 140,
         align: "right",
       },
     },
     {
       attrs: {
-        label: "库存",
+        label: "锁定库存",
+        prop: "lockQuantity",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
+        label: "可用库存",
         prop: "quantity",
-        width: 120,
+        width: 110,
+      },
+    },
+    {
+      attrs: {
+        label: "库存",
+        slot: "quantity",
+        width: 110,
       },
     },
     props.selectStatus
@@ -246,7 +263,7 @@ const getDemandData = () => {
       }
     });
     proxy.post("/warehouse/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-      warehouseList.value[0].children = res.rows;
+      warehouseList.value[0].children = res.rows.filter((item) => item.type !== "1");
       if (!(route.query && route.query.backupDate)) {
         proxy.post("/inventory/getQuantityByWarehouse", { departmentId: sourceList.value.pagination.departmentId }).then((res) => {
           if (warehouseList.value[0].children && warehouseList.value[0].children.length > 0) {

+ 32 - 7
src/views/production/warehouse/outbound/index.vue

@@ -17,6 +17,10 @@
                     action: () => clickModal(),
                   }
                 : {},
+                {
+                    text: '包材出库',
+                    action: () => clickPackingMaterials(),
+                  }
             ]"
             @get-list="getList"
             @clickReset="clickReset">
@@ -62,6 +66,7 @@ import byTable from "/src/components/byTable/index";
 const { proxy } = getCurrentInstance();
 const activeName = ref("first");
 const departmentList = ref([{ dictKey: "0", dictValue: "胜德体育" }]);
+const warehouseList = ref([]);
 const sourceList = ref({
   data: [],
   pagination: {
@@ -111,9 +116,10 @@ const searchConfig = computed(() => {
       label: "事业部",
     },
     {
-      type: "input",
-      prop: "warehouseName",
-      label: "仓库名称",
+      type: "select",
+      prop: "warehouseId",
+      data: warehouseList.value,
+      label: "仓库",
     },
     {
       type: "select",
@@ -157,9 +163,10 @@ const searchConfigTwo = computed(() => {
       label: "事业部",
     },
     {
-      type: "input",
-      prop: "warehouseName",
-      label: "仓库名称",
+      type: "select",
+      prop: "warehouseId",
+      data: warehouseList.value,
+      label: "仓库",
     },
     {
       type: "select",
@@ -401,6 +408,16 @@ const getDemandData = () => {
       );
     }
   });
+  proxy.post("/warehouse/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    if (res.rows && res.rows.length > 0) {
+      warehouseList.value = res.rows.map((item) => {
+        return {
+          dictKey: item.id,
+          dictValue: item.name,
+        };
+      });
+    }
+  });
 };
 getDemandData();
 const clickCode = (row) => {
@@ -415,8 +432,16 @@ const clickModal = () => {
     },
   });
 };
+const clickPackingMaterials = () => {
+  proxy.$router.replace({
+    path: "/outbound/packing-materials/add",
+    query: {
+      random: proxy.random(),
+    },
+  });
+};
 const deriveExcel = () => {
-  proxy.postFile("/inOutStorageBom/exportExcel", sourceList.value.pagination).then((res) => {
+  proxy.postFile("/inOutStorageBom/exportExcel", sourceListTwo.value.pagination).then((res) => {
     proxy.downloadFile(res, "出库明细.xlsx");
   });
 };

+ 240 - 0
src/views/production/warehouse/outbound/packing-materials/add.vue

@@ -0,0 +1,240 @@
+<template>
+  <div>
+    <el-card class="box-card">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+        <template #basicInformation>
+          <div style="width: 100%">
+            <el-row>
+              <el-col :span="12">
+                <el-form-item label="事业部" prop="departmentId" style="width: 100%; margin-bottom: 18px">
+                  <el-select v-model="formData.data.departmentId" placeholder="请选择事业部" clearable style="width: 100%" disabled>
+                    <el-option v-for="item in departmentList" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
+                  </el-select>
+                </el-form-item>
+                <el-form-item label="仓库" prop="warehouseId" style="width: 100%; margin-bottom: 18px">
+                  <el-select v-model="formData.data.warehouseId" placeholder="请选择仓库" clearable style="width: 100%" disabled>
+                    <el-option v-for="item in warehouseList" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
+                  </el-select>
+                </el-form-item>
+                <el-form-item label="出库类型" prop="detailType" style="width: 100%; margin-bottom: 18px">
+                  <el-select v-model="formData.data.detailType" placeholder="请选择出库类型" clearable style="width: 100%" disabled>
+                    <el-option v-for="item in useUserStore().allDict['come_stock_type']" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
+                  </el-select>
+                </el-form-item>
+                <el-form-item label="申请人" prop="applicant" style="width: 100%; margin-bottom: 18px">
+                  <el-input v-model="formData.data.applicant" placeholder="请输入申请人" />
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="备注" prop="remark" style="width: 100%; margin-bottom: 18px">
+                  <el-input v-model="formData.data.remark" :rows="4" type="textarea" placeholder="请输入备注" />
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </div>
+        </template>
+        <template #inOutStorageBomList>
+          <div style="width: 100%; padding: 0 20px">
+            <div style="margin-bottom: 10px">
+              <el-button type="primary" size="small" @click="clickAddBOM()">选择BOM</el-button>
+            </div>
+            <el-table :data="formData.data.inOutStorageBomList" :row-style="{ height: '35px' }" header-row-class-name="tableHeader">
+              <el-table-column label="品号" prop="code" width="180" />
+              <el-table-column label="品名" prop="name" min-width="220" />
+              <el-table-column label="剩余库存" prop="surplusStock" width="140" />
+              <el-table-column label="出库数量" width="180">
+                <template #default="{ row, $index }">
+                  <el-form-item :prop="'inOutStorageBomList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" style="width: 100%">
+                    <el-input-number
+                      onmousewheel="return false;"
+                      v-model="row.quantity"
+                      placeholder="出库数量"
+                      style="width: 100%"
+                      :controls="false"
+                      :min="0"
+                      :precision="0" />
+                  </el-form-item>
+                </template>
+              </el-table-column>
+              <el-table-column label="操作" align="center" fixed="right" width="60">
+                <template #default="{ $index }">
+                  <el-button type="danger" @click="clickDelete($index)" text>删除</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </template>
+      </byForm>
+      <div style="text-align: center; margin: 10px">
+        <el-button @click="clickCancel()" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitForm()" size="large" v-preReClick>确 定</el-button>
+      </div>
+    </el-card>
+
+    <el-dialog title="选择BOM" v-if="openBOM" v-model="openBOM" width="90%">
+      <SelectInventory
+        :selectStatus="true"
+        :departmentId="formData.data.departmentId"
+        :warehouseId="formData.data.warehouseId"
+        @selectBOM="selectBOM"></SelectInventory>
+      <template #footer>
+        <el-button @click="openBOM = false" size="large">关 闭</el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import byForm from "/src/components/byForm/index";
+import { ElMessage } from "element-plus";
+import { useRouter } from "vue-router";
+import useTagsViewStore from "/src/store/modules/tagsView";
+import SelectInventory from "/src/views/production/warehouse/inventory/index";
+
+const { proxy } = getCurrentInstance();
+const departmentList = ref([{ dictKey: "0", dictValue: "胜德体育" }]);
+const warehouseList = ref([]);
+const router = useRouter();
+const submit = ref(null);
+const formOption = reactive({
+  inline: true,
+  labelWidth: "100px",
+  itemWidth: 100,
+  rules: [],
+  labelPosition: "right",
+});
+const formData = reactive({
+  data: {
+    type: 0,
+    applicant: proxy.useUserStore().user.nickName,
+    departmentId: "0",
+    warehouseId: "1684037201379213314",
+    detailType: "1",
+    inOutStorageBomList: [],
+  },
+});
+const formConfig = computed(() => {
+  return [
+    {
+      type: "title",
+      title: "出库信息",
+      label: "",
+    },
+    {
+      type: "slot",
+      slotName: "basicInformation",
+      label: "",
+    },
+    {
+      type: "title",
+      title: "物料信息",
+      label: "",
+    },
+    {
+      type: "slot",
+      slotName: "inOutStorageBomList",
+      label: "",
+    },
+  ];
+});
+const rules = ref({
+  departmentId: [{ required: true, message: "请选择事业部", trigger: "change" }],
+  warehouseId: [{ required: true, message: "请选择仓库", trigger: "change" }],
+  detailType: [{ required: true, message: "请选择出库类型", trigger: "change" }],
+  applicant: [{ required: true, message: "请输入申请人", trigger: "blur" }],
+  quantity: [{ required: true, message: "请输入出库数量", trigger: "blur" }],
+});
+const getDemandData = () => {
+  proxy.post("/department/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    if (res.rows && res.rows.length > 0) {
+      departmentList.value = departmentList.value.concat(
+        res.rows.map((item) => {
+          return {
+            dictKey: item.id,
+            dictValue: item.name,
+          };
+        })
+      );
+    }
+  });
+  proxy.post("/warehouse/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    if (res.rows && res.rows.length > 0) {
+      warehouseList.value = res.rows.map((item) => {
+        return {
+          dictKey: item.id,
+          dictValue: item.name,
+        };
+      });
+    }
+  });
+};
+getDemandData();
+const openBOM = ref(false);
+const clickAddBOM = () => {
+  if (!(formData.data.departmentId || formData.data.departmentId === "0")) {
+    return ElMessage("请先选择事业部");
+  }
+  if (!(formData.data.warehouseId || formData.data.warehouseId === "0")) {
+    return ElMessage("请先选择仓库");
+  }
+  openBOM.value = true;
+};
+const selectBOM = (item) => {
+  if (formData.data.inOutStorageBomList && formData.data.inOutStorageBomList.length > 0) {
+    let list = formData.data.inOutStorageBomList.filter((itemFilter) => itemFilter.bomSpecId === item.id);
+    if (list && list.length > 0) {
+      return ElMessage("该BOM已添加");
+    }
+  }
+  if (item.id) {
+    formData.data.inOutStorageBomList.push({
+      bomSpecId: item.bomSpecId,
+      code: item.bomSpecCode,
+      name: item.bomSpecName,
+      surplusStock: item.quantity,
+      quantity: undefined,
+    });
+    ElMessage({ message: "选择完成", type: "success" });
+  }
+};
+const clickDelete = (index) => {
+  formData.data.inOutStorageBomList.splice(index, 1);
+};
+const submitForm = () => {
+  submit.value.handleSubmit(() => {
+    if (formData.data.inOutStorageBomList && formData.data.inOutStorageBomList.length > 0) {
+      for (let i = 0; i < formData.data.inOutStorageBomList.length; i++) {
+        if (Number(formData.data.inOutStorageBomList[i].surplusStock) < Number(formData.data.inOutStorageBomList[i].quantity)) {
+          return ElMessage("出库数量大于剩余库存数量");
+        }
+      }
+      proxy.post("/inOutStorage/add", formData.data).then(() => {
+        ElMessage({
+          message: "提交成功",
+          type: "success",
+        });
+        clickCancel();
+      });
+    } else {
+      return ElMessage("请添加BOM");
+    }
+  });
+};
+const clickCancel = () => {
+  const useTagsStore = useTagsViewStore();
+  useTagsStore.delVisitedView(router.currentRoute.value);
+  router.replace({
+    path: "/production/warehouse/warehouse-outbound",
+  });
+};
+</script>
+
+<style lang="scss" scoped>
+::v-deep(.el-input-number .el-input__inner) {
+  text-align: left;
+}
+:deep(.el-dialog) {
+  margin-top: 10px !important;
+  margin-bottom: 10px !important;
+}
+</style>

+ 20 - 7
src/views/production/warehouse/putInStorage/index.vue

@@ -58,6 +58,7 @@ import byTable from "/src/components/byTable/index";
 const { proxy } = getCurrentInstance();
 const activeName = ref("first");
 const departmentList = ref([{ dictKey: "0", dictValue: "胜德体育" }]);
+const warehouseList = ref([]);
 const sourceList = ref({
   data: [],
   pagination: {
@@ -106,9 +107,10 @@ const searchConfig = computed(() => {
       label: "事业部",
     },
     {
-      type: "input",
-      prop: "warehouseName",
-      label: "仓库名称",
+      type: "select",
+      prop: "warehouseId",
+      data: warehouseList.value,
+      label: "仓库",
     },
     {
       type: "select",
@@ -152,9 +154,10 @@ const searchConfigTwo = computed(() => {
       label: "事业部",
     },
     {
-      type: "input",
-      prop: "warehouseName",
-      label: "仓库名称",
+      type: "select",
+      prop: "warehouseId",
+      data: warehouseList.value,
+      label: "仓库",
     },
     {
       type: "select",
@@ -396,6 +399,16 @@ const getDemandData = () => {
       );
     }
   });
+  proxy.post("/warehouse/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    if (res.rows && res.rows.length > 0) {
+      warehouseList.value = res.rows.map((item) => {
+        return {
+          dictKey: item.id,
+          dictValue: item.name,
+        };
+      });
+    }
+  });
 };
 getDemandData();
 const clickCode = (row) => {
@@ -411,7 +424,7 @@ const clickModal = () => {
   });
 };
 const deriveExcel = () => {
-  proxy.postFile("/inOutStorageBom/exportExcel", sourceList.value.pagination).then((res) => {
+  proxy.postFile("/inOutStorageBom/exportExcel", sourceListTwo.value.pagination).then((res) => {
     proxy.downloadFile(res, "入库明细.xlsx");
   });
 };

+ 25 - 1
src/views/subsidiary/finance/check-bill/index.vue

@@ -67,7 +67,7 @@
         </el-tabs>
       </div>
     </el-dialog>
-    
+
     <el-dialog title="Excel文件" v-if="openFileList" v-model="openFileList" width="60%">
       <ExcelFile></ExcelFile>
       <template #footer>
@@ -266,6 +266,30 @@ const clickPrint = (row) => {
   activeName.value = "sku";
   rowData.value = row;
   openPrint.value = true;
+  proxy.post("/statementOfAccount/getOrderClassifyTotalCount", [row.id]).then((res) => {
+    cardList.value = [
+      {
+        dictKey: 1,
+        dictValue: "万里牛订单(" + res.wlnOrderCount + ")",
+      },
+      {
+        dictKey: 2,
+        dictValue: "采购订单(" + res.purchaseOrderCount + ")",
+      },
+      {
+        dictKey: 3,
+        dictValue: "委外订单(" + res.outsourceOrderCount + ")",
+      },
+      {
+        dictKey: 4,
+        dictValue: "售后订单(" + res.afterSaleOrderCount + ")",
+      },
+      {
+        dictKey: 5,
+        dictValue: "无理由订单(" + res.noReasonOrderCount + ")",
+      },
+    ];
+  });
 };
 const openFileList = ref(false);
 const clickCancel = (status) => {

+ 27 - 1
src/views/subsidiary/finance/summary/index.vue

@@ -38,7 +38,7 @@
         </el-tabs>
       </div>
     </el-dialog>
-    
+
     <el-dialog title="Excel文件" v-if="openFileList" v-model="openFileList" width="60%">
       <ExcelFile></ExcelFile>
       <template #footer>
@@ -226,6 +226,32 @@ const clickPrint = (row) => {
   activeName.value = "sku";
   rowData.value = row;
   openPrint.value = true;
+  if (row.idGroupConcat) {
+    proxy.post("/statementOfAccount/getOrderClassifyTotalCount", row.idGroupConcat.split(",")).then((res) => {
+      cardList.value = [
+        {
+          dictKey: 1,
+          dictValue: "万里牛订单(" + res.wlnOrderCount + ")",
+        },
+        {
+          dictKey: 2,
+          dictValue: "采购订单(" + res.purchaseOrderCount + ")",
+        },
+        {
+          dictKey: 3,
+          dictValue: "委外订单(" + res.outsourceOrderCount + ")",
+        },
+        {
+          dictKey: 4,
+          dictValue: "售后订单(" + res.afterSaleOrderCount + ")",
+        },
+        {
+          dictKey: 5,
+          dictValue: "无理由订单(" + res.noReasonOrderCount + ")",
+        },
+      ];
+    });
+  }
 };
 const openFileList = ref(false);
 const clickCancel = (status) => {

+ 7 - 3
src/views/subsidiary/order/management/add.vue

@@ -350,7 +350,7 @@
               <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">包装人工费: ¥{{ moneyFormat(calculatedAmount("packingLabor"), 2) }}</span>
               <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">包材费: ¥{{ moneyFormat(calculatedPackagingMaterialCost(), 2) }}</span>
               <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">管理费: ¥{{ moneyFormat(calculatedAmount("managementFee"), 2) }}</span>
-              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">外箱包装费: ¥{{ moneyFormat(calculatedOuterBoxPackingFee(), 2) }}</span>
+              <!-- <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">外箱包装费: ¥{{ moneyFormat(calculatedOuterBoxPackingFee(), 2) }}</span> -->
             </div>
             <div style="padding: 8px 0 0 0">
               <span style="font-weight: 700; color: red">订单总金额(含税): ¥{{ moneyFormat(calculatedTotalAmount(), 2) }}</span>
@@ -607,6 +607,7 @@ const clickDrawingFile = (index) => {
 const selectPic = (row) => {
   formData.data.orderSkuList[drawingFileIndex.value].blueprint = row.imgUrl;
   formData.data.orderSkuList[drawingFileIndex.value].productionDocument = row.fileUrl;
+  formData.data.orderSkuList[drawingFileIndex.value].artworkLibraryId = row.id;
   ElMessage({ message: "选择完成", type: "success" });
   openDrawingFile.value = false;
 };
@@ -656,7 +657,7 @@ const submitForm = (status) => {
       formData.data.deliveryMaterialsFee = calculatedAmount("deliveryMaterialsFee");
       formData.data.packingLabor = calculatedAmount("packingLabor");
       formData.data.managementFee = calculatedAmount("managementFee");
-      formData.data.outerBoxPackingFee = calculatedOuterBoxPackingFee();
+      // formData.data.outerBoxPackingFee = calculatedOuterBoxPackingFee();
       formData.data.packagingMaterialCost = calculatedPackagingMaterialCost();
       formData.data.totalAmount = calculatedTotalAmount();
       if (fileList.value && fileList.value.length > 0) {
@@ -850,6 +851,7 @@ const selectProduct = (row, SKU) => {
         orderSkuBomList: orderSkuBomList,
         blueprint: row.designImgUrl,
         productionDocument: row.sharedFolder,
+        artworkLibraryId: "0",
         inventoryQuantity: inventoryQuantity,
       });
       ElMessage({ message: "添加成功", type: "success" });
@@ -926,6 +928,7 @@ const uploadFile = async (file) => {
 };
 const handleSuccess = (UploadFile, index) => {
   formData.data.orderSkuList[index].productionDocument = UploadFile.raw.fileUrl;
+  formData.data.orderSkuList[index].artworkLibraryId = "0";
 };
 const uploadImgData = ref({});
 const uploadImgFile = async (file) => {
@@ -938,6 +941,7 @@ const uploadImgFile = async (file) => {
 };
 const handleImgSuccess = (UploadFile, index) => {
   formData.data.orderSkuList[index].blueprint = UploadFile.raw.fileUrl;
+  formData.data.orderSkuList[index].artworkLibraryId = "0";
 };
 const computeQuantity = (index, indexSKU) => {
   let quantity = 0;
@@ -1021,7 +1025,7 @@ const calculatedTotalAmount = () => {
         calculatedAmount("deliveryMaterialsFee") +
         calculatedAmount("packingLabor") +
         calculatedAmount("managementFee") +
-        calculatedOuterBoxPackingFee() +
+        // calculatedOuterBoxPackingFee() +
         calculatedPackagingMaterialCost()) *
         100
     ) / 100

+ 6 - 3
src/views/subsidiary/order/management/design.vue

@@ -280,7 +280,7 @@
               <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">包装人工费: ¥{{ moneyFormat(calculatedAmount("packingLabor"), 2) }}</span>
               <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">包材费: ¥{{ moneyFormat(calculatedPackagingMaterialCost(), 2) }}</span>
               <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">管理费: ¥{{ moneyFormat(calculatedAmount("managementFee"), 2) }}</span>
-              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">外箱包装费: ¥{{ moneyFormat(calculatedOuterBoxPackingFee(), 2) }}</span>
+              <!-- <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">外箱包装费: ¥{{ moneyFormat(calculatedOuterBoxPackingFee(), 2) }}</span> -->
             </div>
             <div style="padding: 8px 0 0 0">
               <span style="font-weight: 700; color: red">订单总金额(含税): ¥{{ moneyFormat(calculatedTotalAmount(), 2) }}</span>
@@ -495,6 +495,7 @@ const clickDrawingFile = (index) => {
 const selectPic = (row) => {
   formData.data.orderSkuList[drawingFileIndex.value].blueprint = row.imgUrl;
   formData.data.orderSkuList[drawingFileIndex.value].productionDocument = row.fileUrl;
+  formData.data.orderSkuList[drawingFileIndex.value].artworkLibraryId = row.id;
   ElMessage({ message: "选择完成", type: "success" });
   openDrawingFile.value = false;
 };
@@ -535,7 +536,7 @@ const submitForm = (status) => {
       formData.data.deliveryMaterialsFee = calculatedAmount("deliveryMaterialsFee");
       formData.data.packingLabor = calculatedAmount("packingLabor");
       formData.data.managementFee = calculatedAmount("managementFee");
-      formData.data.outerBoxPackingFee = calculatedOuterBoxPackingFee();
+      // formData.data.outerBoxPackingFee = calculatedOuterBoxPackingFee();
       formData.data.packagingMaterialCost = calculatedPackagingMaterialCost();
       formData.data.totalAmount = calculatedTotalAmount();
       if (fileList.value && fileList.value.length > 0) {
@@ -660,6 +661,7 @@ const uploadFile = async (file) => {
 };
 const handleSuccess = (UploadFile, index) => {
   formData.data.orderSkuList[index].productionDocument = UploadFile.raw.fileUrl;
+  formData.data.orderSkuList[index].artworkLibraryId = '0';
 };
 const uploadImgData = ref({});
 const uploadImgFile = async (file) => {
@@ -672,6 +674,7 @@ const uploadImgFile = async (file) => {
 };
 const handleImgSuccess = (UploadFile, index) => {
   formData.data.orderSkuList[index].blueprint = UploadFile.raw.fileUrl;
+  formData.data.orderSkuList[index].artworkLibraryId = '0';
 };
 const computeQuantity = (index, indexSKU) => {
   let quantity = 0;
@@ -788,7 +791,7 @@ const calculatedTotalAmount = () => {
         calculatedAmount("deliveryMaterialsFee") +
         calculatedAmount("packingLabor") +
         calculatedAmount("managementFee") +
-        calculatedOuterBoxPackingFee() +
+        // calculatedOuterBoxPackingFee() +
         calculatedPackagingMaterialCost()) *
         100
     ) / 100

+ 2 - 22
src/views/subsidiary/order/management/index.vue

@@ -62,7 +62,6 @@
 import byTable from "/src/components/byTable/index";
 import { ElMessage, ElMessageBox } from "element-plus";
 import refreshStore from "/src/store/modules/refresh";
-import { flowStatus } from "/src/utils/flowStatus";
 
 const { proxy } = getCurrentInstance();
 const sourceList = ref({
@@ -94,12 +93,6 @@ const searchConfig = computed(() => {
     },
     {
       type: "select",
-      prop: "flowStatus",
-      label: "流程状态",
-      data: flowStatus(),
-    },
-    {
-      type: "select",
       prop: "status",
       dictKey: "order_status",
       label: "订单状态",
@@ -144,24 +137,11 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "流程状态",
-        prop: "flowStatus",
-        width: 120,
-      },
-      render(val) {
-        return proxy.dictKeyValue(val, flowStatus());
-      },
-    },
-    {
-      attrs: {
         label: "订单状态",
         prop: "status",
         width: 120,
       },
-      render(val, row) {
-        if (val == 0 && row.flowStatus !== 2) {
-          return "";
-        }
+      render(val) {
         return proxy.dictKeyValue(val, proxy.useUserStore().allDict["order_status"]);
       },
     },
@@ -340,7 +320,7 @@ const config = computed(() => {
                 },
               }
             : {},
-          row.status == 0 && row.flowStatus !== 1 && row.flowStatus !== 2
+          row.status == 0
             ? {
                 attrs: {
                   label: "编辑",

+ 22 - 5
src/views/subsidiary/warehouse/inventory/index.vue

@@ -41,6 +41,9 @@
             <template #total="{ item }">
               <div>{{ getTotal(item) }}</div>
             </template>
+            <template #quantity="{ item }">
+              <div>{{ item.quantity + item.lockQuantity }}</div>
+            </template>
           </byTable>
         </el-card>
       </el-col>
@@ -168,7 +171,7 @@ const config = computed(() => {
       attrs: {
         label: "结存单价",
         prop: "balanceUnitPrice",
-        width: 120,
+        width: 110,
         align: "right",
       },
     },
@@ -176,15 +179,29 @@ const config = computed(() => {
       attrs: {
         label: "结存总价",
         slot: "total",
-        width: 160,
+        width: 140,
         align: "right",
       },
     },
     {
       attrs: {
-        label: "库存",
+        label: "锁定库存",
+        prop: "lockQuantity",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
+        label: "可用库存",
         prop: "quantity",
-        width: 120,
+        width: 110,
+      },
+    },
+    {
+      attrs: {
+        label: "库存",
+        slot: "quantity",
+        width: 110,
       },
     },
   ];
@@ -205,7 +222,7 @@ const getDemandData = () => {
     });
   });
   proxy.post("/warehouse/page", { pageNum: 1, pageSize: 999 }).then((res) => {
-    warehouseList.value[0].children = res.rows;
+    warehouseList.value[0].children = res.rows.filter((item) => item.type !== "1");
     proxy.post("/inventory/getQuantityByWarehouse", { departmentId: sourceList.value.pagination.departmentId }).then((res) => {
       if (warehouseList.value[0].children && warehouseList.value[0].children.length > 0) {
         for (let i = 0; i < warehouseList.value[0].children.length; i++) {