Преглед изворни кода

feat: 新增销售订单选择商品带出工艺路线

liujt пре 3 дана
родитељ
комит
ab7d321ef1

+ 2 - 0
src/BIZComponents/inventoryTable.vue

@@ -1965,6 +1965,8 @@ export default {
         // console.log('colorKey~~', item.colorKey);
         this.$set(parasm, 'modelKey', item.modelKey?.split(',')?.[0] || '');
         this.$set(parasm, 'colorKey', item.colorKey?.split(',')?.[0] || '');
+        this.$set(parasm, 'technologyRouteName', item.technologyRouteName || '');
+        this.$set(parasm, 'technologyRouteId', item.technologyRouteId || '');
         if (this.defTaxRate) {
           this.$set(
             parasm,

+ 9 - 6
src/views/commodityManagement/commodityPriceList/components/commodityPriceListDialog.vue

@@ -422,18 +422,21 @@
           return this.$message.warning('请至少选择一条数据');
         }
         let list = this.currentIndex == -1 ? this.selection : [this.current];
-
         list = list.map((item) => {
+          const itemList  = item.goodsPriceList.filter(item => item.isDefault == 1)
+          const goodsPrice = itemList.length > 0 ? itemList[0] :  item.goodsPriceList[0];
           return {
             ...item.categoryInfo,
             goodsId: item.id,
             to: item.id,
-            goodsPriceId: item.goodsPriceList[0]?.id,
+            goodsPriceId: goodsPrice?.id,
             level: item.level,
-            goodsPriceType: item.goodsPriceList[0]?.priceType,
-            singlePrice: item.goodsPriceList[0]?.unitPrice,
-            notaxSinglePrice: item.goodsPriceList[0]?.excludeTaxPrice,
-            taxRate: item.goodsPriceList[0]?.taxRate
+            goodsPriceType: goodsPrice?.priceType,
+            singlePrice: goodsPrice?.unitPrice,
+            notaxSinglePrice: goodsPrice?.excludeTaxPrice,
+            taxRate: goodsPrice?.taxRate,
+            technologyRouteName: goodsPrice?.technologyRouteName,
+            technologyRouteId: goodsPrice?.technologyRouteId,
           };
         });
         let codeList = list.map((item) => item.code);

+ 4 - 0
src/views/saleManage/saleOrder/index.vue

@@ -1120,6 +1120,7 @@ export default {
     },
 
     invoiceAll() {
+
       let partaIds = this.selection.map((item) => item.partaId);
       if (new Set(partaIds).size != 1) {
         return this.$message.warning('请选择相同客户的订单!');
@@ -1136,6 +1137,9 @@ export default {
             '已全部发货,不能创建发货单'
         );
       }
+      if(!this.selection.every((item) => item.isLock == 0 && item.needProduce == 1)){
+        return this.$message.warning('生产性订单未入库前不允许发货');
+      }
       if (
         this.selection.filter((item) => item.needProduce == 4)?.length &&
         this.selection.filter((item) => item.needProduce == 4)?.length !=