Browse Source

1.整单退回增加退回原因,成功之后刷新页面
2.列表增加订单来源

002390 2 years ago
parent
commit
dd02d83678

+ 0 - 1
src/views/purchase/purchase-order/add/index.vue

@@ -174,7 +174,6 @@ export default {
 
           // 是否完成询价,新增明细行需默认明细为false
           rowData["whetherCompleteInquiry"] = false;
-          console.log(rowData,'rowData');
           this.params[key].push(rowData);
         }
       }

+ 7 - 1
src/views/purchase/purchase-order/column.js

@@ -27,6 +27,13 @@ export const TableColumns = [
   // { key: "supplier", title: "供应商" },
   { key: "supplierName", title: "供应商", inputType: "Input" },
   { key: "paymentAgreementName", title: "付款协议" },
+  {
+    key: "source",
+    title: "订单来源",  
+    inputType: "Select",
+    referName: "order_source", // 字典名
+    width:80,
+  },
   // { key: "paymentAgreement", title: "付款协议" },
   
   // { key: "buyer", title: "采购员" },ut
@@ -130,7 +137,6 @@ export const TableColumns = [
   { key: "operatingItemsName", title: "经营性项目" },
   { key: "isArrivalReson", title: "到货超期原因" },
   { key: "midOrderNo", title: "中台采购订单号" },
-  { key: "remark", title: "备注" },
 ];
 
 export const TabColumns = [

+ 29 - 18
src/views/purchase/purchase-order/index.vue

@@ -218,21 +218,35 @@ export default {
     },
     //  整单退回
     handleAllSendBack() {
-      let data = {
-        id: this.checkedList[0].id,
-        documentIds: [],
-        baskCause: ''
-      }
-      console.log(data);
-      try {
-        this.loading = true;
-        let { code, msg } = orderApi.documentsReturn(data);
-
-      } catch (error) {
 
-      } finally {
-        this.loading = false;
-      }
+      this.$prompt('请输入退回原因', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          inputPattern: /\s*\S+?/,
+          inputErrorMessage: '退回原因不能为空'
+        }).then(({ value }) => {
+          let data = {
+            id: this.checkedList[0].id,
+            documentIds: [],
+            baskCause: value,
+          };
+          console.log(data);
+          try {
+
+            let { code, msg } = orderApi.documentsReturn(data);
+
+            if (code == 200) {
+
+              this.fetchList(this.params, this.page);
+
+            }
+          } catch (error) {
+          } finally {
+          }
+        }).catch(() => {    
+        });
+      
+      
     },
     // 判断是否满足整单关闭
     judgeIsAllClose() {
@@ -253,8 +267,6 @@ export default {
       // 未审批状态下整单关闭
       try {
 
-        this.loading = true;
-
         let puOrderIds = this.checkedList.map(order => {
 
           return order.id;
@@ -272,7 +284,6 @@ export default {
       } catch (error) {
 
       } finally {
-        this.loading = false;
       }
     },
     // 付款协议
@@ -303,7 +314,7 @@ export default {
       console.log(this.checkedList, 'this.checkedList');
 
     },
-  },
+  }
 };
 </script>