yusheng пре 1 година
родитељ
комит
1989bc3950

+ 1 - 1
src/api/saleManage/contact.js

@@ -137,7 +137,7 @@ export async function contactDelete(data) {
  * 获取客户分类树
  */
 export async function contactTypeTree(data) {
-  const res = await request.get(`/main/categoryLevel/getTreeByPid/${data.type}`);
+  const res = await request.get(`/main/categoryLevel/getTreeByCode/${data.code}`);
   if (res.data.code == 0) {
     return res.data;
   }

+ 11 - 6
src/components/AssetTree/index.vue

@@ -19,7 +19,9 @@
 
 <script>
   import { getTreeByPid } from '@/api/classifyManage';
+  import { contactTypeTree } from '@/api/saleManage/contact';
   import { getProduceTreeByCode } from '@/api/saleManage/quotation';
+
   // let originId = '';
   // let originType = '';
   export default {
@@ -72,11 +74,11 @@
       nodeKey: {
         type: String,
         default: 'id'
+      },
+      codeS: {
+        type: String,
+        default: ''
       }
-      // appendRoot: {
-      //   type: Boolean,
-      //   default: false
-      // },
     },
     data() {
       return {
@@ -92,6 +94,8 @@
         if (this.code) {
           let typeObj = await getProduceTreeByCode(this.code);
           await this.getTreeData(typeObj[0]?.id);
+        } else if (this.codeS) {
+          await this.getTreeData();
         } else {
           await this.getTreeData(this.id);
         }
@@ -106,9 +110,10 @@
         try {
           this.treeLoading = true;
 
-          const res = await getTreeByPid(id);
+          const res = await (this.codeS ? contactTypeTree({code:this.codeS}): getTreeByPid(id));
           this.treeLoading = false;
-          if (res?.code === '0') {
+          console.log(res.data)
+          if (res?.code == '0') {
             this.treeList = res.data;
             this.$emit('setRootId', res.data[0].id);
             if (this.treeFormate) {

+ 1 - 1
src/views/contractManage/contractBook/components/generateContractsDialog.vue

@@ -70,7 +70,7 @@ export default {
     async getTreeData() {
       try {
         this.treeLoading = true;
-        const res = await contactTypeTree({type: 20});
+        const res = await contactTypeTree({ code: 'W9' });
         this.treeLoading = false;
         if (res?.code === '0') {
           this.treeList = res.data;

+ 2 - 2
src/views/contractManage/contractBook/index.vue

@@ -10,7 +10,7 @@
           <div class="ele-border-lighter sys-organization-list">
             <AssetTree
               @handleNodeClick="handleNodeClick"
-              id="20"
+              codeS="W9"
               :isFirstRefreshTable="false"
               ref="treeList"
             />
@@ -427,7 +427,7 @@ export default {
     async getTreeData() {
       try {
         this.treeLoading = true;
-        const res = await contactTypeTree({ type: 20 });
+        const res = await contactTypeTree({ code: 'W9' });
         this.treeLoading = false;
         if (res?.code === '0') {
           this.treeList = res.data;

+ 1 - 1
src/views/purchasingManage/inquiryManage/components/generateContractsDialog.vue

@@ -75,7 +75,7 @@ export default {
     async getTreeData() {
       try {
         this.treeLoading = true;
-        const res = await contactTypeTree({type: 20});
+        const res = await contactTypeTree({ code: 'W9' });
         this.treeLoading = false;
         if (res?.code === '0') {
           this.treeList = res.data;

+ 1 - 1
src/views/purchasingManage/inquiryManage/index.vue

@@ -323,7 +323,7 @@ import generateContractsDialog from "@/views/purchasingManage/inquiryManage/comp
       async getTreeData() {
         try {
           this.treeLoading = true;
-          const res = await contactTypeTree({ type: 20 });
+          const res = await contactTypeTree({ code: 'W9' });
           this.treeLoading = false;
           if (res?.code === '0') {
             this.treeList = res.data;

+ 2 - 2
src/views/purchasingManage/producerManage/index.vue

@@ -10,7 +10,7 @@
           <div class="ele-border-lighter sys-organization-list">
             <AssetTree
               @handleNodeClick="handleNodeClick"
-              :code="treeClassifyCodeEnum['producerType']"
+              codeS="W10"
               :isFirstRefreshTable="false"
               ref="treeList"
             />
@@ -318,7 +318,7 @@
       async getTreeData() {
         try {
           this.treeLoading = true;
-          let typeObj = await getProduceTreeByCode(this.treeClassifyCodeEnum['producerType']);
+          let typeObj = await getProduceTreeByCode('W10');
           const res = await contactTypeTree({ type:typeObj[0]?.id});
           this.treeLoading = false;
           if (res?.code === '0') {

+ 1 - 1
src/views/purchasingManage/purchaseOrder/components/generateOrderDialog.vue

@@ -73,7 +73,7 @@ export default {
     async getTreeData() {
       try {
         this.treeLoading = true;
-        const res = await contactTypeTree({type: 20});
+        const res = await contactTypeTree({ code: 'W9' });
         this.treeLoading = false;
         if (res?.code === '0') {
           this.treeList = res.data;

+ 1 - 1
src/views/purchasingManage/purchaseOrder/outSourceSend/components/product-list.vue

@@ -39,7 +39,7 @@
 import {getSaleOrderDetail} from '@/api/saleManage/saleorder';
 import {getByIdCondition} from '@/api/purchasingManage/purchaseOrder';
 import {getReceiveSaleOrderrecordDetail} from '@/api/purchasingManage/purchaseorderreceive';
-import {getSendSaleOrderrecordDetail} from '@/api/saleManage/saleordersendrecord';
+import {getSendSaleOrderrecordDetailSplit} from '@/api/saleManage/saleordersendrecord';
 
 export default {
   props: {

+ 2 - 2
src/views/purchasingManage/supplierManage/index.vue

@@ -10,7 +10,7 @@
           <div class="ele-border-lighter sys-organization-list">
             <AssetTree
               @handleNodeClick="handleNodeClick"
-              id="19"
+              codeS="W8,W10"
               :isFirstRefreshTable="false"
               ref="treeList"
             />
@@ -314,7 +314,7 @@
       async getTreeData() {
         try {
           this.treeLoading = true;
-          const res = await contactTypeTree({ type: '19' });
+          const res = await contactTypeTree({ code: 'W8,W10' });
           this.treeLoading = false;
           if (res?.code === '0') {
             this.treeList = res.data;

+ 1 - 1
src/views/saleManage/contact/contactList.vue

@@ -369,7 +369,7 @@ export default {
     async getTreeData() {
       try {
         this.treeLoading = true;
-        const res = await contactTypeTree({ type: 17 });
+        const res = await contactTypeTree({ code: 'W7' });
         this.treeLoading = false;
         if (res?.code === '0') {
           this.treeList = res.data;

+ 1 - 1
src/views/saleManage/contact/contactListAdmin.vue

@@ -447,7 +447,7 @@
       async getTreeData() {
         try {
           this.treeLoading = true;
-          const res = await contactTypeTree({ type: 17 });
+          const res = await contactTypeTree({ code: 'W7' });
           this.treeLoading = false;
           if (res?.code === '0') {
             this.treeList = res.data;

+ 2 - 2
src/views/saleManage/contact/index.vue

@@ -31,7 +31,7 @@
               @handleNodeClick="handleNodeClick"
               :defaultExpandedKeys="defaultExpandedKeys"
               :defaultExpandAll="false"
-              id="17"
+              codeS="W7"
               :isFirstRefreshTable="false"
               ref="treeList"
             />
@@ -478,7 +478,7 @@ export default {
     async getTreeData() {
       try {
         this.treeLoading = true;
-        const res = await contactTypeTree({ type: 17 });
+        const res = await contactTypeTree({ code: 'W7' });
         this.treeLoading = false;
         if (res?.code === '0') {
           this.treeList = res.data;

+ 1 - 1
src/views/saleManage/quotation/index.vue

@@ -352,7 +352,7 @@ export default {
     async getTreeData() {
       try {
         this.treeLoading = true;
-        const res = await contactTypeTree({ type: 20 });
+        const res = await ccontactTypeTree({ code: 'W9' });
         this.treeLoading = false;
         if (res?.code === '0') {
           this.treeList = res.data;

+ 2 - 2
src/views/saleManage/saleOrder/invoice/components/print-template.vue

@@ -223,7 +223,7 @@
 <script>
 import { mapGetters } from 'vuex';
 import JsBarcode from 'jsbarcode';
-import { getSendSaleOrderrecordDetail } from '@/api/saleManage/saleordersendrecord';
+import { getSendSaleOrderrecordDetailSplit } from '@/api/saleManage/saleordersendrecord';
 export default {
   name: 'print',
   computed: {
@@ -244,7 +244,7 @@ export default {
   methods: {
     open(id, isPrintPrice) {
       this.isPrintPrice = isPrintPrice;
-      getSendSaleOrderrecordDetail(id).then((data) => {
+      getSendSaleOrderrecordDetailSplit(id).then((data) => {
         if (JSON.stringify(data) != '{}') {
           this.formData = data;
           this.formData['carName']=data.carList.map(item=>item.name).toString()

+ 2 - 2
src/views/saleManage/saleOrder/invoice/components/product-list.vue

@@ -39,7 +39,7 @@
 import {getSaleOrderDetail} from '@/api/saleManage/saleorder';
 import {getByIdCondition} from '@/api/purchasingManage/purchaseOrder';
 import {getReceiveSaleOrderrecordDetail} from '@/api/purchasingManage/purchaseorderreceive';
-import {getSendSaleOrderrecordDetail} from '@/api/saleManage/saleordersendrecord';
+import {getSendSaleOrderrecordDetailSplit} from '@/api/saleManage/saleordersendrecord';
 
 export default {
   props: {
@@ -197,7 +197,7 @@ export default {
       this.loading = true;
       const data =
         this.type == 'send'
-          ? await getSendSaleOrderrecordDetail(id)
+          ? await getSendSaleOrderrecordDetailSplit(id)
           : this.type == 'receive'
             ? await getReceiveSaleOrderrecordDetail(id)
             : this.type == 'purchase'

+ 2 - 2
src/views/saleManage/saleOrder/invoiceConfirm/components/addInvoiceDialog.vue

@@ -273,7 +273,7 @@
   import taskInfoTable from '../../invoice/components/taskInfoTable.vue';
   import {
     addSendInformation,
-    getSendSaleOrderrecordDetail
+    getSendSaleOrderrecordDetailSplit
   } from '@/api/saleManage/saleordersendrecord';
   import { getPSaleEntrustedReceiveDetailAPI } from '@/api/saleManage/entrustedReceive';
   import { getcontactlink } from '@/api/saleManage/businessFollow';
@@ -675,7 +675,7 @@
       //发货单详情
       async getSaleOrderDetail(id) {
         this.loading = true;
-        const data = await getSendSaleOrderrecordDetail(id);
+        const data = await getSendSaleOrderrecordDetailSplit(id);
         this.loading = false;
         if (data) {
           this.form = data;

+ 2 - 2
src/views/saleManage/saleOrder/returnGoods/components/addReturnGoodsDialog.vue

@@ -255,7 +255,7 @@ import {
   submit,
   UpdateReturnInformation
 } from '@/api/saleManage/returnGoods';
-import {getSendSaleOrderCordList, getSendSaleOrderrecordDetail} from '@/api/saleManage/saleordersendrecord';
+import {getSendSaleOrderCordList, getSendSaleOrderrecordDetailSplit} from '@/api/saleManage/saleordersendrecord';
 import inventoryTable from './inventoryTable.vue';
 import sendListDialog from './sendListMultipleDialog.vue';
 //  import sendListDialog from './sendListDialog.vue';
@@ -543,7 +543,7 @@ export default {
     //发货单详情
     async getSendSaleOrderDetail(id) {
       this.loading = true;
-      const data = await getSendSaleOrderrecordDetail(id);
+      const data = await getSendSaleOrderrecordDetailSplit(id);
       if (data.entrustedCode) {
         await this.getInfo({ id: data.entrustedId });
         this.form.returnSourceType = 2;