瀏覽代碼

修改订单

fubin 2 年之前
父節點
當前提交
e1cb9a7b6f

+ 1 - 0
src/api/pages/sale/order-out.js

@@ -8,6 +8,7 @@ export default {
     prefix: '/mdm-server/ivt/outbound_sale_order/',
     selectOutboundInfoById: 'select_outbound_info_by_id',
     getOutboundForUpdate: 'get_outbound_for_update',
+    getOutboundTogetherForUpdate: 'get_outbound_together_for_update',
     getOutForReturn: 'get_out_for_return',
     outboundInsert: 'outbound_insert',
     outboundUpdate: 'outbound_update',

+ 2 - 2
src/view/sale/order-out/formTogether.vue

@@ -1,4 +1,4 @@
-<!-- @desc:新建销售出库  @auth:付斌  @time:2023-09-25 14:10 -->
+<!-- @desc:新建销售出库,用于不引用原单,直接新建的出库单  @auth:付斌  @time:2023-09-25 14:10 -->
 <template>
   <div class="main-div">
     <DkCollapse @on-change="changeCollapse" ref="collapse">
@@ -590,7 +590,7 @@ export default {
      */
     detail(id) {
       if (this.type === this.$config.formMode.edit) {
-        return this.excuteNoParam(this.$service.orderOutService, this.$service.orderOutService.getOutboundForUpdate, [id]);
+        return this.excuteNoParam(this.$service.orderOutService, this.$service.orderOutService.getOutboundTogetherForUpdate, [id]);
       }
     },
     /**

+ 16 - 6
src/view/sale/order-out/index.vue

@@ -359,15 +359,25 @@ export default {
 
     },
     /**
-     * @desc   : 打开附件
+     * @desc   :校验按钮
      * @author : 付斌
-     * @date   : 2022-07-19 19:56
+     * @date   : 2024-03-09 16:58
      */
-    openFile(row) {
-      window.open(this.$config.imgUrl + row.url)
+    openValidData(btnName, rows) {
+      if (btnName === 'outReturn') {
+        if (rows && rows.length > 0) {
+          if (!rows[0].flgValid) {
+            this.$Message.warning(this.$t('W_007', {'param': '当前单据已作废'}));
+            return false;
+          }
+          if (rows[0].fromId) {
+            this.$Message.warning(this.$t('W_007', {'param': '有来源单号的出库单,请从订单处退货'}));
+            return false;
+          }
+        }
+      }
+      return true;
     },
-
-
   },
   created() {
     this.primaryKey = 'outId'  // 设置主键Id

+ 1 - 1
src/view/sale/order-return/formOther.vue

@@ -1,4 +1,4 @@
-<!-- @desc:销售退货入库新建  @auth:付斌  @time:2023-10-23 14:10 -->
+<!-- @desc:销售退货入库新建,用于不引用原单,直接新建的退货单  @auth:付斌  @time:2023-10-23 14:10 -->
 <template>
   <div class="main-div">
     <DkCollapse @on-change="changeCollapse" ref="collapse">

+ 9 - 0
src/view/sale/order-return/index.vue

@@ -272,6 +272,15 @@ export default {
       })
     },
     /**
+     * @desc   :设置参数
+     * @author : 付斌
+     * @date   : 2024-03-08 14:48
+     */
+    setSearchParams(params) {
+      params.outType = '出库类型-销售出库退货'
+      return params;
+    },
+    /**
      * @desc   : 查询数据
      * @author : 付斌
      * @date   : 2024-03-07 16:01