Browse Source

调拨客户合并

lilei 2 years ago
parent
commit
c70c59b62b

+ 6 - 0
src/main.js

@@ -8,6 +8,12 @@ import { VueAxios } from './utils/request'
 import Viewer from 'v-viewer'
 import Viewer from 'v-viewer'
 import 'viewerjs/dist/viewer.css'
 import 'viewerjs/dist/viewer.css'
 
 
+// 引入样式
+import "vue-easytable/libs/theme-default/index.css";
+// 引入组件库
+import VueEasytable from "vue-easytable";
+Vue.use(VueEasytable);
+
 import { ConfigProvider } from 'ant-design-vue'
 import { ConfigProvider } from 'ant-design-vue'
 Vue.use(ConfigProvider)
 Vue.use(ConfigProvider)
 
 

+ 7 - 7
src/views/allocationManagement/storeTransferOut/detail.vue

@@ -19,16 +19,16 @@
           <Print :disabled="localDataSource.length==0" :showExport="false" @handlePrint="handlePrint"></Print>
           <Print :disabled="localDataSource.length==0" :showExport="false" @handlePrint="handlePrint"></Print>
         </template>
         </template>
       </a-page-header>
       </a-page-header>
-      <a-card size="small" :bordered="false" class="storeTransferOutDetail-cont">
+      <a-card size="small" :bordered="false" class="storeTransferOutDetail-cont" v-if="basicInfoData">
         <a-collapse :activeKey="['1']">
         <a-collapse :activeKey="['1']">
           <a-collapse-panel key="1" header="基础信息">
           <a-collapse-panel key="1" header="基础信息">
             <a-descriptions :column="3">
             <a-descriptions :column="3">
-              <a-descriptions-item label="调往对象名称">{{ (basicInfoData&&basicInfoData.putPersonName) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="店内调出单号">{{ (basicInfoData&&basicInfoData.storeCallOutNo) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="财务状态">{{ (basicInfoData&&basicInfoData.settleStateDictValue) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="调拨类型">{{ (basicInfoData&&basicInfoData.callOutTypeName) || '--' }}</a-descriptions-item>
-              <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remark) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="调往对象名称">{{ (basicInfoData.putPersonType=='EMPLOYEE'?basicInfoData.putPersonName:(basicInfoData.customerNameCurrent==basicInfoData.putPersonName?basicInfoData.customerNameCurrent:basicInfoData.customerNameCurrent+'('+basicInfoData.putPersonName+')')) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="店内调出单号">{{ (basicInfoData.storeCallOutNo) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="业务状态">{{ (basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="财务状态">{{ (basicInfoData.settleStateDictValue) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="调拨类型">{{ (basicInfoData.callOutTypeName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="备注">{{ (basicInfoData.remark) || '--' }}</a-descriptions-item>
             </a-descriptions>
             </a-descriptions>
           </a-collapse-panel>
           </a-collapse-panel>
         </a-collapse>
         </a-collapse>

+ 3 - 3
src/views/allocationManagement/storeTransferOut/edit.vue

@@ -5,7 +5,7 @@
         <!-- 自定义的二级文字标题 -->
         <!-- 自定义的二级文字标题 -->
         <template slot="subTitle">
         <template slot="subTitle">
           <a id="storeTransferOutEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
           <a id="storeTransferOutEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-          <span style="margin: 0 15px;color: #666;">调往对象名称:{{ (basicInfoData&&basicInfoData.putPersonName) || '--' }}</span>
+          <span style="margin: 0 15px;color: #666;" v-if="basicInfoData">调往对象名称:{{ (basicInfoData.putPersonType=='EMPLOYEE'?basicInfoData.putPersonName:(basicInfoData.customerNameCurrent==basicInfoData.putPersonName?basicInfoData.customerNameCurrent:basicInfoData.customerNameCurrent+'('+basicInfoData.putPersonName+')')) || '--' }}</span>
         </template>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra" v-if="$hasPermissions('B_storeCallOutPrint')">
         <template slot="extra" v-if="$hasPermissions('B_storeCallOutPrint')">
@@ -232,7 +232,7 @@
 import { commonMixin } from '@/utils/mixin'
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
 import { getOperationalPrecision } from '@/libs/tools.js'
 import { getOperationalPrecision } from '@/libs/tools.js'
-import { storeCallOutDetailList, storeCallOutDetail, storeCallOutDetailCount, storeCallOutDetailSave, storeCallOutDetailDel, storeCallOutSubmit, storeCallOutDetailPrint } from '@/api/storeCallOut'
+import { storeCallOutDetailList, storeCallOutDetailSn, storeCallOutDetailCount, storeCallOutDetailSave, storeCallOutDetailDel, storeCallOutSubmit, storeCallOutDetailPrint } from '@/api/storeCallOut'
 import ProductType from '../../common/productType.js'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
 import ProductBrand from '../../common/productBrand.js'
 import { warehouseAllList } from '@/api/warehouse'
 import { warehouseAllList } from '@/api/warehouse'
@@ -389,7 +389,7 @@ export default {
     },
     },
     // 基本信息
     // 基本信息
     getDetail () {
     getDetail () {
-      storeCallOutDetail({ id: this.$route.params.id }).then(res => {
+      storeCallOutDetailSn({ sn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           this.basicInfoData = res.data
           this.basicInfoData = res.data
         } else {
         } else {

+ 19 - 5
src/views/allocationManagement/storeTransferOut/list.vue

@@ -22,7 +22,7 @@
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
               <a-form-item label="调往对象名称">
               <a-form-item label="调往对象名称">
-                <a-input id="storeTransferOutList-putPersonName" v-model.trim="queryParam.putPersonName" allowClear placeholder="请输入调往对象名称"/>
+                <custList id="storeTransferOutList-putPersonName" ref="custList" @change="custChange"></custList>
               </a-form-item>
               </a-form-item>
             </a-col>
             </a-col>
             <template v-if="advanced">
             <template v-if="advanced">
@@ -156,13 +156,14 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
 import getDate from '@/libs/getDate.js'
 import getDate from '@/libs/getDate.js'
+import custList from '@/views/common/custList.vue'
 import basicInfoModal from './basicInfoModal.vue'
 import basicInfoModal from './basicInfoModal.vue'
 import stateIcon from '@/views/common/stateIcon'
 import stateIcon from '@/views/common/stateIcon'
 import { storeCallOutList, storeCallOutAudit, storeCallOutDel, storeCallOutOut, storeCallOutQueryCount } from '@/api/storeCallOut'
 import { storeCallOutList, storeCallOutAudit, storeCallOutDel, storeCallOutOut, storeCallOutQueryCount } from '@/api/storeCallOut'
 import { storeCallOutTypeAllList } from '@/api/storeCallOutType'
 import { storeCallOutTypeAllList } from '@/api/storeCallOutType'
 export default {
 export default {
   name: 'StoreCallOutList',
   name: 'StoreCallOutList',
-  components: { STable, VSelect, basicInfoModal, rangeDate, stateIcon },
+  components: { STable, VSelect, basicInfoModal, rangeDate, stateIcon, custList },
   mixins: [commonMixin],
   mixins: [commonMixin],
   data () {
   data () {
     return {
     return {
@@ -182,7 +183,8 @@ export default {
         auditEndDate: '',
         auditEndDate: '',
         outWarehouseBeginDate: '',
         outWarehouseBeginDate: '',
         outWarehouseEndDate: '',
         outWarehouseEndDate: '',
-        putPersonName: undefined, //  调往对象
+        customerNameCurrent: undefined, //  调往对象
+        customerSnCurrent: undefined,
         callOutType: undefined, //  调拨类型
         callOutType: undefined, //  调拨类型
         state: undefined, //  业务状态
         state: undefined, //  业务状态
         settleState: undefined //  财务状态
         settleState: undefined //  财务状态
@@ -221,7 +223,7 @@ export default {
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '创建时间', dataIndex: 'createDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '店内调出单号', scopedSlots: { customRender: 'storeCallOutNo' }, width: '14%', align: 'center' },
         { title: '店内调出单号', scopedSlots: { customRender: 'storeCallOutNo' }, width: '14%', align: 'center' },
-        { title: '调往对象名称', dataIndex: 'putPersonName', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '调往对象名称', width: '16%', align: 'center', customRender: function (text, record) { return (record.putPersonType == 'CUSTOMER' ? record.customerNameCurrent: record.putPersonName) || '--' }, ellipsis: true },
         { title: '调拨类型', dataIndex: 'callOutTypeName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '调拨类型', dataIndex: 'callOutTypeName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '总款数', dataIndex: 'productTotalCategory', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总款数', dataIndex: 'productTotalCategory', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总数量', dataIndex: 'productTotalQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总数量', dataIndex: 'productTotalQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -241,6 +243,16 @@ export default {
     }
     }
   },
   },
   methods: {
   methods: {
+    custChange (v, row) {
+      console.log(v, row)
+      if (row && row.customerSn) {
+        this.queryParam.customerSnCurrent = row.customerSn
+        this.queryParam.customerNameCurrent = undefined
+      } else {
+        this.queryParam.customerNameCurrent = v
+        this.queryParam.customerSnCurrent = undefined
+      }
+    },
     // 统计
     // 统计
     getCount (params) {
     getCount (params) {
       storeCallOutQueryCount(params).then(res => {
       storeCallOutQueryCount(params).then(res => {
@@ -281,10 +293,12 @@ export default {
       this.queryParam.outWarehouseBeginDate = ''
       this.queryParam.outWarehouseBeginDate = ''
       this.queryParam.outWarehouseEndDate = ''
       this.queryParam.outWarehouseEndDate = ''
 
 
-      this.queryParam.putPersonName = undefined
+      this.queryParam.customerSnCurrent = undefined
+      this.queryParam.customerNameCurrent = undefined
       this.queryParam.callOutType = undefined
       this.queryParam.callOutType = undefined
       this.queryParam.state = undefined
       this.queryParam.state = undefined
       this.queryParam.settleState = undefined
       this.queryParam.settleState = undefined
+      this.$refs.custList.resetForm()
       if (!flag) {
       if (!flag) {
         this.setIsHomeNav(this.$route.name, null)
         this.setIsHomeNav(this.$route.name, null)
       }
       }

+ 90 - 67
src/views/purchasingManagement/purchaseOrderNew/edit.vue

@@ -74,7 +74,7 @@
           <div class="table-page-search-wrapper">
           <div class="table-page-search-wrapper">
             <a-row :gutter="15">
             <a-row :gutter="15">
               <a-col :span="24">
               <a-col :span="24">
-                <a-form-model :model="productForm" layout="inline" @keyup.enter.native="$refs.purchaseTable.refresh(true)" >
+                <a-form-model :model="productForm" layout="inline" @keyup.enter.native="getTableData()" >
                   <a-row :gutter="15">
                   <a-row :gutter="15">
                     <a-col :md="6" :sm="24">
                     <a-col :md="6" :sm="24">
                       <a-form-model-item label="产品编码">
                       <a-form-model-item label="产品编码">
@@ -88,7 +88,7 @@
                     </a-col>
                     </a-col>
                     <a-col :md="8" :sm="24">
                     <a-col :md="8" :sm="24">
                       <a-form-model-item style="margin-bottom: 10px;">
                       <a-form-model-item style="margin-bottom: 10px;">
-                        <a-button type="primary" @click="$refs.purchaseTable.refresh(true)" :disabled="purchaseDisabled" id="purchaseNewOrderEdit-refresh">查询</a-button>
+                        <a-button type="primary" @click="getTableData()" :disabled="purchaseDisabled" id="purchaseNewOrderEdit-refresh">查询</a-button>
                         <a-button style="margin-left: 5px" @click="resetPurchaseForm" id="purchaseNewOrderEdit-reset">重置</a-button>
                         <a-button style="margin-left: 5px" @click="resetPurchaseForm" id="purchaseNewOrderEdit-reset">重置</a-button>
                       </a-form-model-item>
                       </a-form-model-item>
                     </a-col>
                     </a-col>
@@ -98,42 +98,16 @@
             </a-row>
             </a-row>
           </div>
           </div>
           <!-- 列表 -->
           <!-- 列表 -->
-          <s-table
+          <ve-table
             class="sTable"
             class="sTable"
+            border-y
             ref="purchaseTable"
             ref="purchaseTable"
-            :style="{ height: tableHeight +'px', overflow: 'auto' }"
-            size="small"
-            :rowKey="(record) => record.id"
+            :max-height="tableHeight"
+            :virtual-scroll-option="{enable: true}"
             :columns="chooseColumns"
             :columns="chooseColumns"
-            :data="chooseLoadData"
-            :defaultLoadData="false"
-            :showPagination="false"
-            :pageSize="5000"
-            bordered>
-            <!-- 采购数量 -->
-            <template slot="storageQuantity" slot-scope="text, record">
-              <a-input-number
-                size="small"
-                id="purchaseNewOrderEdit-qty"
-                v-model="record.qty"
-                :precision="0"
-                :min="1"
-                :max="999999"
-                @blur="e => qtyBlur(e.target.value, record)"
-                style="width: 100%;"
-                placeholder="请输入" />
-            </template>
-            <!-- 操作 -->
-            <template slot="action" slot-scope="text, record">
-              <a-button
-                size="small"
-                type="link"
-                class="button-error"
-                :loading="delLoading"
-                @click="handleDel(record)"
-                id="purchaseNewOrderEdit-del-btn">删除</a-button>
-            </template>
-          </s-table>
+            :table-data="localDataSource"
+            row-key-field-name="id"
+          />
         </div>
         </div>
         <div v-else>
         <div v-else>
           <div v-if="!spinning&&localDataSource.length==0">
           <div v-if="!spinning&&localDataSource.length==0">
@@ -198,6 +172,45 @@ import chooseProductModal from './chooseProductModal.vue'
 import Print from '@/views/common/print.vue'
 import Print from '@/views/common/print.vue'
 import { hdPrint } from '@/libs/JGPrint'
 import { hdPrint } from '@/libs/JGPrint'
 const shopingCatModal = () => import(/* webpackChunkName: "shopingCatModal" */ '@/views/common/shopingCatModal.vue')
 const shopingCatModal = () => import(/* webpackChunkName: "shopingCatModal" */ '@/views/common/shopingCatModal.vue')
+const qtyComp = {
+        name: "qtyComp",
+        template: `
+        <a-input-number
+              size="small"
+              v-model="row.qty"
+              :precision="0"
+              :min="1"
+              :max="999999"
+              @blur="e => that.qtyBlur(e.target.value, row)"
+              style="width: 100%;"
+              placeholder="请输入" />
+    `,
+        props: {
+            row: Object,
+            column: Object,
+            rowIndex: Number,
+            that: Object
+        },
+    };
+const actionComp = {
+        name: "actionComp",
+        template: `
+        <a-button
+          size="small"
+          type="link"
+          class="button-error"
+          :loading="row.delLoading"
+          @click="that.handleDel(row)"
+          >删除</a-button>
+    `,
+        props: {
+            row: Object,
+            column: Object,
+            rowIndex: Number,
+            that: Object
+        },
+    };
+
 export default {
 export default {
   name: 'PurchaseEdit',
   name: 'PurchaseEdit',
   components: { STable, VSelect, ImportGuideModal, outStockModal, Print, chooseAddressModal, chooseProductModal, shopingCatModal },
   components: { STable, VSelect, ImportGuideModal, outStockModal, Print, chooseAddressModal, chooseProductModal, shopingCatModal },
@@ -222,25 +235,6 @@ export default {
         orderBy: 'purchase_bill_detail.CREATE_DATE desc'
         orderBy: 'purchase_bill_detail.CREATE_DATE desc'
       },
       },
       purchaseDisabled: false, //  查询、重置按钮是否可操作
       purchaseDisabled: false, //  查询、重置按钮是否可操作
-      // 加载数据方法 必须为 Promise 对象
-      chooseLoadData: parameter => {
-        this.disabled = true
-        this.spinning = true
-        // 查询总计
-        const params = Object.assign({ pageNo: 1, pageSize: 5000 }, this.productForm, { purchaseBillSn: this.$route.params.sn })
-        return purchaseDetailList(params).then(res => {
-          const data = res.data
-          const no = (data.pageNo - 1) * data.pageSize
-          for (var i = 0; i < data.list.length; i++) {
-            data.list[i].no = no + i + 1
-            data.list[i].qtyBackups = data.list[i].qty
-          }
-          this.localDataSource = data.list
-          this.disabled = false
-          this.spinning = false
-          return data
-        })
-      },
       localDataSource: [],
       localDataSource: [],
       openGuideModal: false, //  导入产品引导
       openGuideModal: false, //  导入产品引导
       openOutStockModal: false,
       openOutStockModal: false,
@@ -255,21 +249,50 @@ export default {
     chooseColumns () {
     chooseColumns () {
       const _this = this
       const _this = this
       const arr = [
       const arr = [
-        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '20%', align: 'center' },
-        { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '35%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '采购数量', scopedSlots: { customRender: 'storageQuantity' }, width: '8%', align: 'center' },
-        { title: '单位', dataIndex: 'dealerProductEntity.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
+        { title: '序号', key: "a", field: 'no', width: '5%', align: 'center' },
+        { title: '产品编码',key: "b", field: 'productCode', width: '20%', align: 'center'},
+        { title: '产品名称',key: "c", field: 'productName', width: '35%', align: 'center', ellipsis: true },
+        { title: '采购数量',key: "d", width: '8%', align: 'center',
+        renderBodyCell: ({ row, column, rowIndex }, h) => {
+            return <qtyComp row={row} column={column} rowIndex={rowIndex} that={_this} />
+        }},
+        { title: '单位',key: "e", field: 'productUnit', width: '8%', align: 'center' },
+        { title: '操作',key: "f", width: '8%', align: 'center',
+        renderBodyCell: ({ row, column, rowIndex }, h) => {
+            return <actionComp row={row} column={column} rowIndex={rowIndex} that={_this} />
+        }}
       ]
       ]
       if (this.$hasPermissions('M_ShowAllCost')) {
       if (this.$hasPermissions('M_ShowAllCost')) {
-        arr.splice(3, 0, { title: '采购单价', dataIndex: 'discountedPrice', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
-        arr.splice(6, 0, { title: '采购金额', dataIndex: 'discountedAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
+        arr.splice(3, 0, { title: '采购单价',key: "h", field: 'discountedPrice', width: '8%', align: 'right'})
+        arr.splice(6, 0, { title: '采购金额',key: "i", field: 'discountedAmount', width: '8%', align: 'right'})
       }
       }
       return arr
       return arr
     }
     }
   },
   },
   methods: {
   methods: {
+    getTableData(){
+        this.disabled = true
+        this.spinning = true
+        // 查询总计
+        const params = Object.assign({ pageNo: 1, pageSize: 10000 }, this.productForm, { purchaseBillSn: this.$route.params.sn })
+        purchaseDetailList(params).then(res => {
+          const data = res.data
+          const no = (data.pageNo - 1) * data.pageSize
+          for (var i = 0; i < data.list.length; i++) {
+            const row = data.list[i]
+            row.no = no + i + 1
+            row.qtyBackups = row.qty
+            row.productCode = row.dealerProductEntity.code || '--'
+            row.productName = row.dealerProductEntity.name || '--'
+            row.productUnit = row.dealerProductEntity.unit || '--'
+            row.discountedPrice = (row.discountedPrice||row.discountedPrice==0)?this.toThousands(row.discountedPrice, 2):'--'
+            row.discountedAmount = (row.discountedAmount||row.discountedAmount==0)?this.toThousands(row.discountedAmount, 2):'--'
+          }
+          this.localDataSource = data.list
+          this.disabled = false
+          this.spinning = false
+        })
+    },
     // 获取采购单基本信息
     // 获取采购单基本信息
     getOrderDetail (noRefashTable, isReset, flag) {
     getOrderDetail (noRefashTable, isReset, flag) {
       this.spinning = true
       this.spinning = true
@@ -281,7 +304,7 @@ export default {
               if (isReset) {
               if (isReset) {
                 this.resetPurchaseForm()
                 this.resetPurchaseForm()
               } else {
               } else {
-                this.$refs.purchaseTable.refresh(!!flag)
+                this.getTableData()
               }
               }
             } else {
             } else {
               this.localDataSource = []
               this.localDataSource = []
@@ -304,14 +327,14 @@ export default {
         centered: true,
         centered: true,
         closable: true,
         closable: true,
         onOk () {
         onOk () {
-          _this.delLoading = true
+          row.delLoading = true
           purchaseDetailDel({ id: row.id }).then(res => {
           purchaseDetailDel({ id: row.id }).then(res => {
             if (res.status == 200) {
             if (res.status == 200) {
               _this.getOrderDetail(false, false, true)
               _this.getOrderDetail(false, false, true)
               _this.$message.success(res.message)
               _this.$message.success(res.message)
-              _this.delLoading = false
+              row.delLoading = false
             } else {
             } else {
-              _this.delLoading = false
+              row.delLoading = false
             }
             }
           })
           })
         }
         }
@@ -329,7 +352,7 @@ export default {
       this.productForm.productName = ''
       this.productForm.productName = ''
       this.productForm.productCode = ''
       this.productForm.productCode = ''
       this.$nextTick(() => {
       this.$nextTick(() => {
-        this.$refs.purchaseTable.refresh(true)
+        this.getTableData()
       })
       })
     },
     },
     //  添加或修改
     //  添加或修改

+ 19 - 5
src/views/reportData/storeTransferOutReport/detailList.vue

@@ -30,7 +30,7 @@
           </a-col>
           </a-col>
           <a-col :md="4" :sm="24">
           <a-col :md="4" :sm="24">
             <a-form-item label="调往对象">
             <a-form-item label="调往对象">
-              <a-input id="sstoreTransOutReport-putPersonName" v-model.trim="queryParam.putPersonName" allowClear placeholder="请输入调往对象"/>
+              <custList id="storeTransOutReport-putPersonName" ref="custList" @change="custChange"></custList>
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
           <a-col :md="4" :sm="24">
           <a-col :md="4" :sm="24">
@@ -114,9 +114,10 @@ import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
 import ProductBrand from '../../common/productBrand.js'
 import supplier from '@/views/common/supplier'
 import supplier from '@/views/common/supplier'
 import { storeCallOutTypeAllList } from '@/api/storeCallOutType'
 import { storeCallOutTypeAllList } from '@/api/storeCallOutType'
+import custList from '@/views/common/custList.vue'
 import { reportStoreCallOutDetailList, reportStoreCallOutDetailTotal, reportStoreCallOutDetailExport } from '@/api/reportData'
 import { reportStoreCallOutDetailList, reportStoreCallOutDetailTotal, reportStoreCallOutDetailExport } from '@/api/reportData'
 export default {
 export default {
-  components: { STable, VSelect, rangeDate, ProductType, ProductBrand, supplier },
+  components: { STable, VSelect, rangeDate, ProductType, ProductBrand, supplier, custList },
   mixins: [commonMixin],
   mixins: [commonMixin],
   data () {
   data () {
     return {
     return {
@@ -141,7 +142,8 @@ export default {
         callOutType: undefined,
         callOutType: undefined,
         productType: undefined,
         productType: undefined,
         storeCallOutNo: '',
         storeCallOutNo: '',
-        putPersonName: ''
+        customerNameCurrent: undefined, //  调往对象
+        customerSnCurrent: undefined,
       },
       },
       rules: {
       rules: {
         'time': [{ required: true, message: '请选择审核时间', trigger: 'change' }]
         'time': [{ required: true, message: '请选择审核时间', trigger: 'change' }]
@@ -180,7 +182,7 @@ export default {
       const arr = [
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '店内调出单号', dataIndex: 'storeCallOutNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '店内调出单号', dataIndex: 'storeCallOutNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调往对象', dataIndex: 'putPersonName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '调往对象', width: '15%', align: 'center', customRender: function (text, record) { return record.putPersonName || '--' }, ellipsis: true },
         { title: '调拨类型', dataIndex: 'callOutTypeName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '调拨类型', dataIndex: 'callOutTypeName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'productEntity.code', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'productEntity.code', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productEntity.name', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品名称', dataIndex: 'productEntity.name', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
@@ -196,6 +198,16 @@ export default {
     }
     }
   },
   },
   methods: {
   methods: {
+    custChange (v, row) {
+      console.log(v, row)
+      if (row && row.customerSn) {
+        this.queryParam.customerSnCurrent = row.customerSn
+        this.queryParam.customerNameCurrent = undefined
+      } else {
+        this.queryParam.customerNameCurrent = v
+        this.queryParam.customerSnCurrent = undefined
+      }
+    },
     // 合计
     // 合计
     getCount (params) {
     getCount (params) {
       reportStoreCallOutDetailTotal(params).then(res => {
       reportStoreCallOutDetailTotal(params).then(res => {
@@ -240,7 +252,9 @@ export default {
 
 
       this.queryParam.storeCallOutNo = ''
       this.queryParam.storeCallOutNo = ''
       this.queryParam.callOutType = undefined
       this.queryParam.callOutType = undefined
-      this.queryParam.putPersonName = ''
+      this.$refs.custList.resetForm()
+      this.queryParam.customerSnCurrent = undefined
+      this.queryParam.customerNameCurrent = undefined
       this.queryParam.productEntity.productBrandSn = undefined
       this.queryParam.productEntity.productBrandSn = undefined
       this.queryParam.productEntity.productTypeSn1 = ''
       this.queryParam.productEntity.productTypeSn1 = ''
       this.queryParam.productEntity.productTypeSn2 = ''
       this.queryParam.productEntity.productTypeSn2 = ''

+ 19 - 5
src/views/reportData/storeTransferOutReport/list.vue

@@ -30,7 +30,7 @@
           </a-col>
           </a-col>
           <a-col :md="4" :sm="24">
           <a-col :md="4" :sm="24">
             <a-form-item label="调往对象">
             <a-form-item label="调往对象">
-              <a-input id="sstoreTransOutReport-putPersonName" v-model.trim="queryParam.putPersonName" allowClear placeholder="请输入调往对象"/>
+              <custList id="storeTransOutReport-putPersonName" ref="custList" @change="custChange"></custList>
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
           <a-col :md="4" :sm="24">
           <a-col :md="4" :sm="24">
@@ -85,10 +85,11 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { downloadExcel } from '@/libs/JGPrint.js'
 import { downloadExcel } from '@/libs/JGPrint.js'
+import custList from '@/views/common/custList.vue'
 import { storeCallOutTypeAllList } from '@/api/storeCallOutType'
 import { storeCallOutTypeAllList } from '@/api/storeCallOutType'
 import { reportStoreCallOutPageList, reportStoreCallOutListTotal, reportStoreCallOutExport } from '@/api/reportData'
 import { reportStoreCallOutPageList, reportStoreCallOutListTotal, reportStoreCallOutExport } from '@/api/reportData'
 export default {
 export default {
-  components: { STable, VSelect, rangeDate },
+  components: { STable, VSelect, rangeDate, custList },
   mixins: [commonMixin],
   mixins: [commonMixin],
   data () {
   data () {
     return {
     return {
@@ -102,7 +103,8 @@ export default {
         time: [],
         time: [],
         beginDate: '',
         beginDate: '',
         endDate: '',
         endDate: '',
-        putPersonName: '',
+        customerNameCurrent: undefined, //  调往对象
+        customerSnCurrent: undefined,
         callOutType: undefined,
         callOutType: undefined,
         storeCallOutNo: ''
         storeCallOutNo: ''
       },
       },
@@ -143,7 +145,7 @@ export default {
       const arr = [
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '店内调出单号', dataIndex: 'storeCallOutNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '店内调出单号', dataIndex: 'storeCallOutNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调往对象', dataIndex: 'putPersonName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '调往对象', width: '15%', align: 'center', customRender: function (text, record) { return record.putPersonName || '--' }, ellipsis: true },
         { title: '调拨类型', dataIndex: 'callOutTypeName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '调拨类型', dataIndex: 'callOutTypeName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '款数', dataIndex: 'productTotalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '款数', dataIndex: 'productTotalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '数量', dataIndex: 'productTotalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '数量', dataIndex: 'productTotalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -157,6 +159,16 @@ export default {
     }
     }
   },
   },
   methods: {
   methods: {
+    custChange (v, row) {
+      console.log(v, row)
+      if (row && row.customerSn) {
+        this.queryParam.customerSnCurrent = row.customerSn
+        this.queryParam.customerNameCurrent = undefined
+      } else {
+        this.queryParam.customerNameCurrent = v
+        this.queryParam.customerSnCurrent = undefined
+      }
+    },
     // 合计
     // 合计
     getCount (params) {
     getCount (params) {
       reportStoreCallOutListTotal(params).then(res => {
       reportStoreCallOutListTotal(params).then(res => {
@@ -199,7 +211,9 @@ export default {
       this.queryParam.outWarehouseBeginDate = ''
       this.queryParam.outWarehouseBeginDate = ''
       this.queryParam.outWarehouseEndDate = ''
       this.queryParam.outWarehouseEndDate = ''
 
 
-      this.queryParam.putPersonName = ''
+      this.$refs.custList.resetForm()
+      this.queryParam.customerSnCurrent = undefined
+      this.queryParam.customerNameCurrent = undefined
       this.queryParam.storeCallOutNo = ''
       this.queryParam.storeCallOutNo = ''
       this.queryParam.callOutType = undefined
       this.queryParam.callOutType = undefined
       this.$refs.ruleForm.resetFields()
       this.$refs.ruleForm.resetFields()