فهرست منبع

Merge branch 'purchaseDev' of http://172.16.100.139/new-business/drp-web into purchaseDev

002201 1 سال پیش
والد
کامیت
dbcc63ef22

+ 8 - 1
src/api/business/purchase/purchase-order.js

@@ -145,6 +145,13 @@ const returnedGoods = (data) =>{
   });
 }
 
+const toOA =(userName, fdId) => {
+  return request({
+    url: `/oaflow/redirectToOa/${userName}/${fdId}`,
+    method: 'get',
+  })
+}
+
 export default {
   list,
   details,
@@ -162,6 +169,6 @@ export default {
   REFER,
   putInStorage,
   returnedGoods,
-
+  toOA,
 
 }

+ 11 - 11
src/views/material/basicFile/details.vue

@@ -1796,9 +1796,9 @@
       // 保存修改
       handleSave() {
         console.log('保存修改');
-        this.$refs['basicMessageRef'].validate(async (valid) => {
+        // this.$refs['basicMessageRef'].validate(async (valid) => {
 
-          if (valid) {
+        //   if (valid) {
             this.loading = true;
             // 普通保存修改
             this.updateButtonGroup && this.handleSaveMaterial(() => {
@@ -1811,16 +1811,16 @@
               this.maintainNewVersion = false;
               this.handleRefresh();
             })
-          } else {
-            this.$notify.error({
-              title: '错误',
-              message: '存在必填项未填写!'
-            });
+        //   } else {
+        //     this.$notify.error({
+        //       title: '错误',
+        //       message: '存在必填项未填写!'
+        //     });
             
-            console.log('error submit!!');
-            return false;
-          }
-        })
+        //     console.log('error submit!!');
+        //     return false;
+        //   }
+        // })
 
       },
       // 物料类别列表选中

+ 79 - 79
src/views/purchase/purchase-order/column.js

@@ -137,13 +137,13 @@ export const TableColumns = [
       key: "money", 
       title: "价税合计",
       width:80,
-      // precision:2,
+      // 
     },
     attr:{
-      is: "el-computed-input-v2",
-      formatter: (prop) => {
-        return prop ? (prop * 1).toFixed(2) : prop;
-      },
+      // is: "el-computed-input-v2",
+      // formatter: (prop) => {
+      //   return prop ? (prop * 1).toFixed(2) : prop;
+      // },
       isHidden:true,
     },
  },
@@ -182,23 +182,23 @@ export const TableColumns = [
       key: "rebateMoney", 
       title: "订单使用返利金额" ,
       width:100,
-      // precision:2,
+      // 
     },
     attr:{
-      is: "el-computed-input-v2",
-          formatter: (prop) => {
-            return prop ? (prop * 1).toFixed(2) : prop;
-          },
+      // is: "el-computed-input-v2",
+          // formatter: (prop) => {
+          //   return prop ? (prop * 1).toFixed(2) : prop;
+          // },
       isHidden:true,
     },
   },
   { 
-    item:{key: "deductionMoney", title: "订单抵扣余款金额" ,precision:2,},
+    item:{key: "deductionMoney", title: "订单抵扣余款金额" ,},
     attr:{
-      is: "el-computed-input-v2",
-          formatter: (prop) => {
-            return prop ? (prop * 1).toFixed(2) : prop;
-          },
+      // is: "el-computed-input-v2",
+          // formatter: (prop) => {
+          //   return prop ? (prop * 1).toFixed(2) : prop;
+          // },
       isHidden:true,
      
     },
@@ -269,34 +269,34 @@ export const TableColumns = [
     },
   },
   { 
-    item:{ key: "applyPaymentMoney", title: "累计付款申请金额", precision:2,},
+    item:{ key: "applyPaymentMoney", title: "累计付款申请金额", },
     attr:{
-      is: "el-computed-input-v2",
-          formatter: (prop) => {
-            return prop ? (prop * 1).toFixed(2) : prop;
-          },
+      // is: "el-computed-input-v2",
+          // formatter: (prop) => {
+          //   return prop ? (prop * 1).toFixed(2) : prop;
+          // },
       isHidden:true,
     },
     width:100,
   },
   { 
-    item:{ key: "paymentMoney", title: "累计付款金额" ,precision:2,},
+    item:{ key: "paymentMoney", title: "累计付款金额" ,},
     attr:{
-      is: "el-computed-input-v2",
-          formatter: (prop) => {
-            return prop ? (prop * 1).toFixed(2) : prop;
-          },
+      // is: "el-computed-input-v2",
+      //     formatter: (prop) => {
+      //       return prop ? (prop * 1).toFixed(2) : prop;
+      //     },
       isHidden:true,
     },
     width:100,
   },
   { 
-    item:{ key: "invoiceMoney", title: "发票金额" ,precision:2,},
+    item:{ key: "invoiceMoney", title: "发票金额" ,},
     attr:{
-      is: "el-computed-input-v2",
-          formatter: (prop) => {
-            return prop ? (prop * 1).toFixed(2) : prop;
-          },
+      // is: "el-computed-input-v2",
+          // formatter: (prop) => {
+          //   return prop ? (prop * 1).toFixed(2) : prop;
+          // },
       isHidden:true,
     },
     width:100,
@@ -585,7 +585,7 @@ export const TabColumns = [
         },
       },
       { 
-        item:{key: "qty", title: "数量",width:80, },
+        item:{key: "qty", title: "数量",width:120, },
         attr:{
           isHidden:true,
         },
@@ -598,84 +598,84 @@ export const TabColumns = [
        
       },
       { 
-        item:{key: "taxPrice", title: "含税单价" ,width:80,precision:2,},
+        item:{key: "taxPrice", title: "含税单价" ,width:120,},
         attr:{
-          is: "el-computed-input-v2",
-          formatter: (prop) => {
-            return prop ? (prop * 1).toFixed(2) : prop;
-          },
+          // is: "el-computed-input-v2",
+          // formatter: (prop) => {
+          //   return prop ? (prop * 1).toFixed(2) : prop;
+          // },
         },
       },
       { 
-        item:{key: "money", title: "价税合计" ,width:80, precision:2,},
+        item:{key: "money", title: "价税合计" ,width:120, },
         attr:{
-          is: "el-computed-input-v2",
-          formatter: (prop) => {
-            return prop ? (prop * 1).toFixed(2) : prop;
-          },
+          // is: "el-computed-input-v2",
+          // formatter: (prop) => {
+          //   return prop ? (prop * 1).toFixed(2) : prop;
+          // },
         },
       },
       { 
-        item:{key: "tax", title: "税率" ,width:80, precision:2,},
+        item:{key: "tax", title: "税率" ,width:120, },
         attr:{
-          is: "el-computed-input-v2",
-          formatter: (prop) => {
-            return prop ? (prop * 1).toFixed(2) : prop;
-          },
+          // is: "el-computed-input-v2",
+          // formatter: (prop) => {
+          //   return prop ? (prop * 1).toFixed(2) : prop;
+          // },
         },
       },
       { 
-        item:{key: "taxDeductMoneya", title: "折扣金额", width:80, precision:2, },
+        item:{key: "taxDeductMoneya", title: "折扣金额", width:80,  },
         attr:{
-          is: "el-computed-input-v2",
-          formatter: (prop) => {
-            return prop ? (prop * 1).toFixed(2) : prop;
-          },
+          // is: "el-computed-input-v2",
+          // formatter: (prop) => {
+          //   return prop ? (prop * 1).toFixed(2) : prop;
+          // },
         },
       },
       { 
         item:{key: "arrivalQty", title: "已到货数量" , width:80,},
         attr:{
-          is: "el-computed-input-v2",
-          formatter: (prop) => {
-            return prop ? (prop * 1).toFixed(2) : prop;
-          },
+          // is: "el-computed-input-v2",
+          // formatter: (prop) => {
+          //   return prop ? (prop * 1).toFixed(2) : prop;
+          // },
         },
       },
       { 
         item:{key: "unarrivedQty", title: "未到货数量" , width:80,},
         attr:{
-          is: "el-computed-input-v2",
-          formatter: (prop) => {
-            return prop ? (prop * 1).toFixed(2) : prop;
-          },
+          // is: "el-computed-input-v2",
+          // formatter: (prop) => {
+          //   return prop ? (prop * 1).toFixed(2) : prop;
+          // },
         },
       },
       { 
-        item:{key: "price", title: "无税单价" , idth:80, precision:2,},
+        item:{key: "price", title: "无税单价" , width:120, },
         attr:{
-          is: "el-computed-input-v2",
-          formatter: (prop) => {
-            return prop ? (prop * 1).toFixed(2) : prop;
-          },
+          // is: "el-computed-input-v2",
+          // formatter: (prop) => {
+          //   return prop ? (prop * 1).toFixed(2) : prop;
+          // },
         },
       },
       { 
-        item:{key: "notaxMoney", title: "无税金额" , width:80, precision:2,},
+        item:{key: "notaxMoney", title: "无税金额" , width:120, },
         attr:{
-          is: "el-computed-input-v2",
-          formatter: (prop) => {
-            return prop ? (prop * 1).toFixed(2) : prop;
-          },
+          // is: "el-computed-input-v2",
+          // formatter: (prop) => {
+          //   return prop ? (prop * 1).toFixed(2) : prop;
+          // },
         },
       },
-      { 
-        item:{key: "priceSource", title: "价格目录ID", width:10, },
-        attr:{
-          isHidden:true,
-        },
+      // { 
+      //   item:{key: "priceSource", title: "价格目录ID", width:10, },
+      //   attr:{
+      //     isHidden:true,
+      //   },
        
-      },
+      // },
       {
         item:{
           key: "isStorage",
@@ -889,10 +889,10 @@ export const TabColumns = [
           width:80,
         },
         attr:{
-          is: "el-computed-input-v2",
-          formatter: (prop) => {
-            return prop ? (prop * 1).toFixed(2) : prop;
-          },
+          // is: "el-computed-input-v2",
+          // formatter: (prop) => {
+          //   return prop ? (prop * 1).toFixed(2) : prop;
+          // },
         },
       },
       { 

+ 23 - 2
src/views/purchase/purchase-order/index.vue

@@ -96,6 +96,23 @@ export default {
         }
       }
     },
+    async jumpFlow(row){
+      const {name} = this.$store.state.user;
+
+      try {
+
+        let {code,msg,oaUrl} = await orderApi.toOA(name,row.flowId);
+
+        if(code == 200){
+          window.open(oaUrl)
+        }
+        
+      } catch (error) {
+        
+      }finally{
+
+      }
+    },
     setSelectable(){
       return true
     },
@@ -115,8 +132,6 @@ export default {
       this.page.pageNum = 1;
 
       this.page.pageSize = 10;
-      console.log(this,'this-------------------');
-
       this.$refs.purchaseTable.$refs.superTable.clearSelection();
 
       for (const key in this.tabTableDatas) {
@@ -687,6 +702,12 @@ export default {
                 v-hasPermi="['material:order:toOa']" 
                 @click.stop="handleSubmit(scope.row)"
               >提交</el-button>
+              <el-button 
+                v-if="scope.row.flowId && scope.row.flowId !== ''" 
+                type="text" 
+                size="mini"
+                @click.stop="jumpFlow(scope.row)"
+              >流程跳转</el-button>
             </template>
         </el-table-column>