Prechádzať zdrojové kódy

1.去掉子表采购订单id
2.解决删除之后子表展示信息没有清空
3.新增付款协议

002390 2 rokov pred
rodič
commit
26d10783fd

+ 16 - 0
src/api/business/purchase/purchase-order.js

@@ -1,4 +1,5 @@
 import request from "@/utils/request";
+import axios from "axios";
 
 // 采购订单修订列表
 const list = (data, page) => {
@@ -97,6 +98,20 @@ const toNc = (data) => {
     data,
   });
 }
+// 付款协议  https://sy.derom.com/apiproxy/service/ssoRegServlet?userCode=000156&busiCenter=001
+const payRequest = (userCode) => {
+
+  return new Promise(resolve => {
+    // 当前 Promise 的状态由传入的 Promise 去决定
+    axios.get(`/sy-derom/apiproxy/service/ssoRegServlet?userCode=${userCode}&busiCenter=001`)
+    .then(res =>{
+      if(res.status == 200){
+        resolve(res.data)
+      }
+    })
+  })
+  
+}
 
 export default {
   list,
@@ -110,5 +125,6 @@ export default {
   documentsReturn,
   close,
   toNc,
+  payRequest,
 
 }

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

@@ -373,7 +373,7 @@ export const TabColumns = [
     key: 'puOrderItemList',
     tableColumns: [
       { key: "rowNo", title: "行号", inputType: "Input", },
-      { key: "orderId", title: "采购订单ID", inputType: "Input", width: 180 },
+      // { key: "orderId", title: "采购订单ID", inputType: "Input", width: 180 },
       // {key: "material",title: "物料",inputType: "Input",   },
       {
         key: "materialName",

+ 8 - 3
src/views/purchase/purchase-order/column.js

@@ -139,7 +139,7 @@ export const TabColumns = [
     key: 'puOrderItemList',
     tableColumns: [
       { key: "rowNo", title: "行号" },
-      { key: "orderId", title: "采购订单ID" },
+      // { key: "orderId", title: "采购订单ID" },
       { key: "material", title: "物料" },
       { key: "materialName", title: "物料名称", width: 180 },
       { key: "materialCode", title: "物料编码", width: 180 },
@@ -247,7 +247,12 @@ export const TabColumns = [
         inputType: "Select",
         referName: "sys_price_type", // 字典名
       },
-      { key: "isDistributionPrice", title: "配送价" },
+      { 
+        key: "isDistributionPrice", 
+        title: "配送价",
+        inputType: 'Checkbox',
+        width:80,
+       },
       // { key: "tenantId", title: "租户号" },
       // { key: "revision", title: "乐观锁" },
       { key: "createByName", title: "创建人" },
@@ -269,7 +274,7 @@ export const TabColumns = [
     key: 'puOrderExecuteList',
     tableColumns: [
       // { key: "id", title: "主键" },
-      { key: "orderId", title: "采购订单ID", width: 180 },
+      // { key: "orderId", title: "采购订单ID", width: 180 },
       { key: "rowno", title: "行号" },
       { key: "material", title: "物料", width: 180 },
       { key: "materialName", title: "物料名称", width: 180 },

+ 2 - 2
src/views/purchase/purchase-order/components/FileUploadCenter/index.vue

@@ -75,8 +75,8 @@ export default {
     return {
       number: 0,
       uploadList: [],
-      baseUrl: '/file',
-      uploadFileUrl: '/file' + "/document-center/fastdfs/upload", // 上传文件服务器地址
+      baseUrl: '/sy-derom',
+      uploadFileUrl: "/sy-derom/document-center/fastdfs/upload", // 上传文件服务器地址
       fileList: [],
     };
   },

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

@@ -63,7 +63,14 @@ export default {
       } catch (err) {
         //
       } finally {
+        
         this.loading = false;
+
+        for (const key in this.tabTableDatas) {
+
+          this.tabTableDatas[key] = [];
+
+        }
       }
     },
     handleSearchChange() {
@@ -242,6 +249,27 @@ export default {
         this.loading = false;
       }
     },
+    // 付款协议
+    async handlePaymentRequest(){
+      // name:工号
+      try {
+        let {name} = this.$store.state.user;
+
+        await orderApi.payRequest(name).then(res=>{
+
+          if(res){
+
+            let url = `uclient://start/http://172.16.100.2:8081?ssoKey=${res}&uiloader=nc.uap.lfw.applet.PortalUILoader&nodeId=40040407`
+
+            window.location.href = url;
+          }
+        });
+
+      } catch (error) {
+        
+      }
+      
+    },
     handleSelect(selection, row) {
 
       this.checkedList = selection;
@@ -318,6 +346,7 @@ export default {
 
         <el-button-group style="margin-left: 10px">
           <!-- <el-button size="mini">采购退货</el-button> -->
+          <el-button size="mini" @click="handlePaymentRequest">付款申请</el-button>
 
           <!-- <el-button size="mini">附件管理</el-button>
           <el-button size="mini">单据追溯</el-button> -->

+ 2 - 2
vue.config.js

@@ -57,11 +57,11 @@ module.exports = {
         changeOrigin: true,
         pathRewrite: { [`^/drp-file`]: "" },
       },
-      "/file": {
+      "/sy-derom": {
         // target: process.env.NODE_ENV == "development" ? `https://test-sy.derom.com` : `https://sy.derom.com`,
         target: `https://sy.derom.com`,
         changeOrigin: true,
-        pathRewrite: { [`^/file`]: "" },
+        pathRewrite: { [`^/sy-derom`]: "" },
       },
     },
     disableHostCheck: true,