Z 1 год назад
Родитель
Сommit
8c1cb97966

+ 10 - 0
src/api/saleManage/contact.js

@@ -10,6 +10,16 @@ export async function contactPage(params) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+/**
+ * 获取客户信息列表
+ */
+export async function contactPageUsages(params) {
+  const res = await request.get(`/eom/contact/page2Usages`, { params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
 
 /**
  * 获取客户信息详情

+ 13 - 13
src/views/purchasingManage/supplierManage/components/contactSearch.vue

@@ -26,19 +26,19 @@
           ></el-input>
         </el-form-item>
       </el-col>
-      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-        <el-form-item label="是否启用:" prop="codeOrSerialNo">
-          <el-select v-model="params.status" placeholder="请选择" class="w100" clearable>
-            <el-option
-              v-for="item in statusList"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-      </el-col>
-      <el-col style="display: flex;justify-content: end" v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+<!--      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">-->
+<!--        <el-form-item label="是否启用:" prop="codeOrSerialNo">-->
+<!--          <el-select v-model="params.status" placeholder="请选择" class="w100" clearable>-->
+<!--            <el-option-->
+<!--              v-for="item in statusList"-->
+<!--              :key="item.value"-->
+<!--              :label="item.label"-->
+<!--              :value="item.value"-->
+<!--            ></el-option>-->
+<!--          </el-select>-->
+<!--        </el-form-item>-->
+<!--      </el-col>-->
+      <el-col style="display: flex;justify-content: end" v-bind="styleResponsive ? { lg: 12, md: 12 } : { span: 12 }">
         <div class="ele-form-actions">
           <el-button
             type="primary"

+ 185 - 198
src/views/purchasingManage/supplierManage/components/parentList.vue

@@ -1,244 +1,231 @@
 <template>
-    <el-dialog title="选择供应商" :visible.sync="visible" :before-close="handleClose" :close-on-click-modal="false"  top="5vh"
-        :close-on-press-escape="false" append-to-body width="70%">
-        <el-card shadow="never">
+  <el-dialog title="选择供应商" :visible.sync="visible" :before-close="handleClose" :close-on-click-modal="false"
+             top="5vh"
+             :close-on-press-escape="false" append-to-body width="70%">
+    <el-card shadow="never">
 
-            <contact-search @search="reload"> </contact-search>
+      <contact-search @search="reload"></contact-search>
 
-            <ele-split-layout width="244px" allow-collapse :right-style="{ overflow: 'hidden' }">
-                <div class="ele-border-lighter split-layout-right-content">
-                    <AssetTree @handleNodeClick="handleNodeClick" id="19" :isFirstRefreshTable="false" ref="treeList" />
-                </div>
-                <!-- 表格 -->
-                <template v-slot:content>
-                    <ele-pro-table ref="table" :columns="columns" :datasource="datasource" row-key="id"
-                        height="calc(100vh - 350px)" class="dict-table" @cell-click="cellClick">
-                        <!-- 表头工具栏 -->
-                        <template v-slot:action="{ row }">
-                            <el-radio class="radio" v-model="radio" :label="row.id"><i></i></el-radio>
-                        </template>
-                    </ele-pro-table>
-                </template>
-            </ele-split-layout>
-
-
-
-
-
-
-
-        </el-card>
-
-        <div class="btns">
-            <el-button type="primary" size="small" @click="selected">选择</el-button>
-            <el-button size="small" @click="handleClose">关闭</el-button>
+      <ele-split-layout width="244px" allow-collapse :right-style="{ overflow: 'hidden' }">
+        <div class="ele-border-lighter split-layout-right-content">
+          <AssetTree @handleNodeClick="handleNodeClick" id="19" :isFirstRefreshTable="false" ref="treeList"/>
         </div>
-
-    </el-dialog>
+        <!-- 表格 -->
+        <template v-slot:content>
+          <ele-pro-table ref="table" :columns="columns" :datasource="datasource" row-key="id"
+                         height="calc(100vh - 450px)" class="dict-table" @cell-click="cellClick">
+            <!-- 表头工具栏 -->
+            <template v-slot:action="{ row }">
+              <el-radio class="radio" v-model="radio" :label="row.id"><i></i></el-radio>
+            </template>
+          </ele-pro-table>
+        </template>
+      </ele-split-layout>
+    </el-card>
+
+    <div slot="footer">
+      <el-button type="primary" size="small" @click="selected">选择</el-button>
+      <el-button size="small" @click="handleClose">关闭</el-button>
+    </div>
+
+  </el-dialog>
 </template>
 
 <script>
 
-import { contactPage } from '@/api/saleManage/contact';
+import {contactPageUsages} from '@/api/saleManage/contact';
 import ContactSearch from './contactSearch.vue';
 import AssetTree from '@/components/AssetTree';
-export default {
-    components: {
-        ContactSearch,
-        AssetTree
-    },
-    props: {
-        classType: {
-            type: Number,
-            default: 1
-        }
-    },
-    data() {
-        return {
-            visible: false,
-
-
-
-            columns: [
-
-                {
-                    action: 'action',
-                    slot: 'action',
-                    align: 'center',
-                    label: '选择'
-                },
-                {
-                    columnKey: 'index',
-                    label: '序号',
-                    type: 'index',
-                    width: 55,
-                    align: 'center',
-                    showOverflowTooltip: true,
-                    fixed: 'left'
-                },
-                {
-              prop: 'code',
-              label: '供应商编码',
-              align: 'center',
-              showOverflowTooltip: true,
-              minWidth: 140
-            },
-            {
-              prop: 'name',
-              label: '供应商名称',
-              align: 'center',
-              slot: 'name',
-              showOverflowTooltip: true,
-              minWidth: 200
-            },
-            {
-              prop: 'serialNo',
-              label: '供应商代号',
-              align: 'center',
-              showOverflowTooltip: true,
-              minWidth: 140
-            },
-            {
-              prop: 'phone',
-              label: '供应商电话',
-              align: 'center',
-              showOverflowTooltip: true,
-              minWidth: 120
-            },
-            {
-              prop: 'addressName',
-              label: '单位地址',
-              align: 'center',
-              showOverflowTooltip: true,
-              minWidth: 120,
-              formatter: (_row, _column, cellValue) => {
-                let addr = '' + _row.addressName ? _row.addressName.replaceAll(',', '') : '';
-                addr += _row.address ? _row.address : '';
-                return addr;
-              }
-            },
-            {
-              prop: 'linkName',
-              label: '联系人',
-              align: 'center',
-              showOverflowTooltip: true,
-              minWidth: 120
-            },
-            {
-              prop: 'linkPhone',
-              label: '联系人电话',
-              align: 'center',
-              showOverflowTooltip: true,
-              minWidth: 120
-            },
-            {
-              prop: 'status',
-              label: '状态',
-              align: 'center',
-              showOverflowTooltip: true,
-              minWidth: 100,
-              formatter: (_row, _column, cellValue) => {
-                return _row.status === 1 ? '启用' : '禁用';
-              }
-            },
-
-
-            ],
-
-            radio: null,
-        }
-    },
 
-    watch: {
+export default {
+  components: {
+    ContactSearch,
+    AssetTree
+  },
+  props: {
+    classType: {
+      type: Number,
+      default: 1
+    }
+  },
+  data() {
+    return {
+      visible: false,
+      columns: [
+        {
+          action: 'action',
+          slot: 'action',
+          align: 'center',
+          label: '选择'
+        },
+        {
+          columnKey: 'index',
+          label: '序号',
+          type: 'index',
+          width: 55,
+          align: 'center',
+          showOverflowTooltip: true,
+          fixed: 'left'
+        },
+        {
+          prop: 'code',
+          label: '供应商编码',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 140
+        },
+        {
+          prop: 'name',
+          label: '供应商名称',
+          align: 'center',
+          slot: 'name',
+          showOverflowTooltip: true,
+          minWidth: 200
+        },
+        {
+          prop: 'serialNo',
+          label: '供应商代号',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 140
+        },
+        {
+          prop: 'phone',
+          label: '供应商电话',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 120
+        },
+        {
+          prop: 'addressName',
+          label: '单位地址',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 120,
+          formatter: (_row, _column, cellValue) => {
+            let addr = '' + _row.addressName ? _row.addressName.replaceAll(',', '') : '';
+            addr += _row.address ? _row.address : '';
+            return addr;
+          }
+        },
+        {
+          prop: 'linkName',
+          label: '联系人',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 120
+        },
+        {
+          prop: 'linkPhone',
+          label: '联系人电话',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 120
+        },
+        {
+          prop: 'status',
+          label: '状态',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 100,
+          formatter: (_row, _column, cellValue) => {
+            return _row.status === 1 ? '启用' : '禁用';
+          }
+        },
 
-    },
-    methods: {
-        open(item) {
-            if (item) {
 
-                this.radio = item.id
-            }
-            this.visible = true
-        },
+      ],
 
+      radio: null,
+    }
+  },
 
-        /* 表格数据源 */
-        datasource({ page, limit, where, order }) {
-            return contactPage({
-                pageNum: page,
-                size: limit,
-                type: this.classType,
-                ...where
-            });
-        },
+  watch: {},
+  methods: {
+    open(item) {
+      if (item) {
 
+        this.radio = item.id
+      }
+      this.visible = true
+    },
 
-        /* 刷新表格 */
-        reload(where) {
-            this.$refs.table.reload({ page: 1, where });
-        },
 
-        handleNodeClick(data, node) {
-            this.curNodeData = data;
-            this.reload({ categoryId: data.id });
-        },
+    /* 表格数据源 */
+    datasource({page, limit, where, order}) {
+      return contactPageUsages({
+        pageNum: page,
+        size: limit,
+        type: this.classType,
+        ...where,
+        status: '1'
+      });
+    },
 
 
-        // 单击获取id
-        cellClick(row) {
-            this.current = row
-            this.radio = row.id
-        },
-        handleClose() {
-            this.visible = false
-            this.current = null
-            this.radio = ''
-        },
+    /* 刷新表格 */
+    reload(where) {
+      this.$refs.table.reload({page: 1, where});
+    },
 
-        selected() {
-            if (!this.current) {
-                return this.$message.warning('请选择上级客户')
-            }
-            this.$emit('changeParent', this.current)
-            this.handleClose()
-        },
+    handleNodeClick(data, node) {
+      this.curNodeData = data;
+      this.reload({categoryId: data.id});
+    },
 
 
+    // 单击获取id
+    cellClick(row) {
+      this.current = row
+      this.radio = row.id
+    },
+    handleClose() {
+      this.visible = false
+      this.current = null
+      this.radio = ''
+    },
 
+    selected() {
+      if (!this.current) {
+        return this.$message.warning('请选择上级客户')
+      }
+      this.$emit('changeParent', this.current)
+      this.handleClose()
+    },
 
 
-    }
+  }
 }
 </script>
 
 <style lang="scss" scoped>
 .tree_col {
-    border: 1px solid #eee;
-    padding: 10px 0;
-    box-sizing: border-box;
-    height: 500px;
-    overflow: auto;
+  border: 1px solid #eee;
+  padding: 10px 0;
+  box-sizing: border-box;
+  height: 500px;
+  overflow: auto;
 }
 
 .table_col {
-    padding-left: 10px;
+  padding-left: 10px;
 
-    ::v-deep .el-table th.el-table__cell {
-        background: #f2f2f2;
-    }
+  ::v-deep .el-table th.el-table__cell {
+    background: #f2f2f2;
+  }
 }
 
 .pagination {
-    text-align: right;
-    padding: 10px 0;
+  text-align: right;
+  padding: 10px 0;
 }
 
 .btns {
-    text-align: center;
-    padding: 10px 0;
+  text-align: center;
+  padding: 10px 0;
 }
 
 .topsearch {
-    margin-bottom: 15px;
+  margin-bottom: 15px;
 }
 </style>

+ 13 - 13
src/views/saleManage/contact/components/contactSearch.vue

@@ -26,19 +26,19 @@
           ></el-input>
         </el-form-item>
       </el-col>
-      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-        <el-form-item label="是否启用:" prop="codeOrSerialNo">
-          <el-select v-model="params.status" placeholder="请选择" class="w100" clearable>
-            <el-option
-              v-for="item in statusList"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-      </el-col>
-      <el-col style="display: flex;justify-content: end" v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+<!--      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">-->
+<!--        <el-form-item label="是否启用:" prop="codeOrSerialNo">-->
+<!--          <el-select v-model="params.status" placeholder="请选择" class="w100" clearable>-->
+<!--            <el-option-->
+<!--              v-for="item in statusList"-->
+<!--              :key="item.value"-->
+<!--              :label="item.label"-->
+<!--              :value="item.value"-->
+<!--            ></el-option>-->
+<!--          </el-select>-->
+<!--        </el-form-item>-->
+<!--      </el-col>-->
+      <el-col style="display: flex;justify-content: end" v-bind="styleResponsive ? { lg: 12, md: 12 } : { span: 12 }">
         <div class="ele-form-actions">
           <el-button
             type="primary"

+ 4 - 3
src/views/saleManage/contact/components/parentList.vue

@@ -33,7 +33,7 @@
 
 <script>
 
-import {contactPage} from '@/api/saleManage/contact';
+import {contactPageUsages} from '@/api/saleManage/contact';
 import ContactSearch from './contactSearch.vue';
 import AssetTree from '@/components/AssetTree';
 
@@ -156,11 +156,12 @@ export default {
 
     /* 表格数据源 */
     datasource({page, limit, where, order}) {
-      return contactPage({
+      return contactPageUsages({
         pageNum: page,
         size: limit,
         type: this.classType,
-        ...where
+        ...where,
+        status: '1'
       });
     },
 

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

@@ -148,7 +148,7 @@
           </div>
         </template>
       </ele-split-layout>
-      <!--      <contactList v-if="activeComp == 'contactList' && $hasPermission('eom:contact:staff') "></contactList>-->
+<!--            <contactList v-if="activeComp == 'contactList' && $hasPermission('eom:contact:staff') "></contactList>-->
       <contactListAdmin v-if="activeComp == 'contactList'"></contactListAdmin>
     </el-card>
 
@@ -454,7 +454,7 @@ export default {
     },
     openDetail(row) {
       // this.$refs.contactDetailDialogRef.open(row);
-      
+
       this.$refs.drawerRef.open(row,'myList');
     }
   }

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

@@ -28,6 +28,7 @@
               style="width: 100%"
             >
               <el-option :value="3" label="销售发货退货"></el-option>
+              <el-option :value="4" label="销售订单退货"></el-option>
               <el-option :value="1" label="售后退货"></el-option>
               <el-option :value="2" label="受托收货退货"></el-option>
             </el-select>
@@ -46,6 +47,14 @@
               placeholder="请输入"
             />
           </el-form-item>
+          <el-form-item v-else-if="form.returnSourceType == 4" label="销售订单" prop="orderId">
+            <el-input
+              clearable
+              v-model="form.orderNo"
+              @click.native="handleSaleOrderBtn"
+              placeholder="请输入"
+            />
+          </el-form-item>
           <el-form-item v-else label="发货单" prop="sendNo">
             <el-input
               clearable
@@ -54,6 +63,7 @@
               placeholder="请输入"
             />
           </el-form-item>
+
         </el-col>
       </el-row>
       <el-row>
@@ -216,6 +226,12 @@
       @changeParent="getInfo"
       ref="entrustedReceiveDialogRef"
     ></entrusted-receive-dialog>
+<!--    销售订单-->
+    <orderListDialog
+      ref="orderListDialogRef"
+      @changeParent="changeSaleOrder"
+      :contactData="contactData"
+    ></orderListDialog>
     <process-submit-dialog :processSubmitDialogFlag.sync="processSubmitDialogFlag" v-if="processSubmitDialogFlag" ref="processSubmitDialogRef" @reload="reload"></process-submit-dialog>
 
   </ele-modal>
@@ -246,10 +262,12 @@ import { getPSaleEntrustedReceiveDetailAPI } from '@/api/saleManage/entrustedRec
 import { getWarehouseListByIds } from '@/api/purchasingManage/returnGoods';
 import fileMain from "@/components/addDoc/index.vue";
 import processSubmitDialog from "@/BIZComponents/processSubmitDialog/processSubmitDialog.vue";
+import orderListDialog from "@/views/saleManage/saleOrder/invoice/components/orderListDialog.vue";
 
 export default {
   mixins: [dictMixins],
   components: {
+    orderListDialog,
     processSubmitDialog,
     fileMain,
     entrustedReceiveDialog,
@@ -286,6 +304,8 @@ export default {
       remark: '',
       sendId: '',
       sendNo: '',
+      orderId: '',
+      orderNo:'',
       totalAmount: '',
       returnType: '',
       pricingWay: '',
@@ -371,6 +391,7 @@ export default {
         this.form = Object.assign({}, this.form, {
           orderId: '',
           sendNo: '',
+          orderNo: '',
           sendId: '',
           contactName: '',
           contactId: '',
@@ -465,12 +486,21 @@ export default {
       this.getSendSaleOrderMultipleDetail(obj);
       // this.getSendSaleOrderDetail(obj.id);
     },
+    changeSaleOrder(obj={}) {
+      let params = {orderId: obj.id};
 
+      // this.orderId=obj.id
+      // this.form = Object.assign({},this.form,{
+      //   orderId: obj.id,
+      //   docNo: obj.docNo,
+      // })
+      this.getSendSaleOrderMultipleDetail(params);
+      // this.getSendSaleOrderDetail(obj.id);
+    },
     //多发货单详情
     async getSendSaleOrderMultipleDetail(params) {
       this.loading = true;
       const data = await getSendSaleOrderCordList(params);
-      console.log(data);
       //
       // if (data.entrustedCode) {
       //   await this.getInfo({ id: data.entrustedId });
@@ -484,12 +514,11 @@ export default {
           item.sendProductId = item.id;
           item.id = '';
         });
-        // console.log(data.productList)
-        // return
         this.$nextTick(() => {
+         let paramNo = this.form.returnSourceType == 3 ? 'sendNo' : 'orderNo'
           this.form = Object.assign({}, this.form, {
             orderId: data.orderId,
-            sendNo: data.docNo,
+            [paramNo]: data.docNo,
             sendId: data.id,
             contactName: data.contactName,
             contactId: data.contactId,
@@ -499,6 +528,7 @@ export default {
             entrustedReceiveId: '',
             entrustedReceiveCode: ''
           });
+          this.form.returnSourceType == 3
           this.$refs.inventoryTableref &&
             this.$refs.inventoryTableref.putTableValue(data.productList);
         });
@@ -520,8 +550,6 @@ export default {
           item.sendProductId = item.id;
           item.id = '';
         });
-        // console.log(data.productList)
-        // return
         this.$nextTick(() => {
           this.form = Object.assign({}, this.form, {
             orderId: data.orderId,
@@ -567,6 +595,12 @@ export default {
       };
       this.$refs.sendListDialogRef.open(item);
     },
+    handleSaleOrderBtn() {
+      let item = {
+        id: this.form.orderId
+      };
+      this.$refs.orderListDialogRef.open(item);
+    },
 
     //打开新增编辑弹框
     async open(type, row, sendId) {