Explorar o código

Merge branch 'develop_yh14' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into develop_yh14

chenrui %!s(int64=2) %!d(string=hai) anos
pai
achega
2a57507f5e

+ 86 - 6
package-lock.json

@@ -2046,6 +2046,33 @@
         }
       }
     },
+    "@vue/compiler-sfc": {
+      "version": "2.7.14",
+      "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-2.7.14.tgz",
+      "integrity": "sha512-aNmNHyLPsw+sVvlQFQ2/8sjNuLtK54TC6cuKnVzAY93ks4ZBrvwQSnkkIh7bsbNhum5hJBS00wSDipQ937f5DA==",
+      "requires": {
+        "@babel/parser": "^7.18.4",
+        "postcss": "^8.4.14",
+        "source-map": "^0.6.1"
+      },
+      "dependencies": {
+        "@babel/parser": {
+          "version": "7.21.1",
+          "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.1.tgz",
+          "integrity": "sha512-JzhBFpkuhBNYUY7qs+wTzNmyCWUHEaAFpQQD2YfU1rPL38/L43Wvid0fFkiOCnHvsGncRZgEPyGnltABLcVDTg=="
+        },
+        "postcss": {
+          "version": "8.4.21",
+          "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz",
+          "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==",
+          "requires": {
+            "nanoid": "^3.3.4",
+            "picocolors": "^1.0.0",
+            "source-map-js": "^1.0.2"
+          }
+        }
+      }
+    },
     "@vue/component-compiler-utils": {
       "version": "3.0.0",
       "resolved": "https://registry.npm.taobao.org/@vue/component-compiler-utils/download/@vue/component-compiler-utils-3.0.0.tgz",
@@ -5138,6 +5165,11 @@
         "cssom": "0.3.x"
       }
     },
+    "csstype": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz",
+      "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw=="
+    },
     "current-script-polyfill": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/current-script-polyfill/-/current-script-polyfill-1.0.0.tgz",
@@ -5192,8 +5224,7 @@
     "de-indent": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz",
-      "integrity": "sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0=",
-      "dev": true
+      "integrity": "sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0="
     },
     "debug": {
       "version": "3.1.0",
@@ -7807,8 +7838,7 @@
     "he": {
       "version": "1.2.0",
       "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
-      "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
-      "dev": true
+      "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw=="
     },
     "hex-color-regex": {
       "version": "1.1.0",
@@ -11595,6 +11625,11 @@
       "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz",
       "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ=="
     },
+    "nanoid": {
+      "version": "3.3.4",
+      "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
+      "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw=="
+    },
     "nanomatch": {
       "version": "1.2.13",
       "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
@@ -12536,6 +12571,11 @@
       "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
       "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
     },
+    "picocolors": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
+      "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
+    },
     "pify": {
       "version": "4.0.1",
       "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
@@ -14813,8 +14853,12 @@
     "source-map": {
       "version": "0.6.1",
       "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
-      "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
-      "dev": true
+      "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
+    },
+    "source-map-js": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
+      "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw=="
     },
     "source-map-resolve": {
       "version": "0.5.2",
@@ -16572,6 +16616,42 @@
       "resolved": "https://registry.npm.taobao.org/vue-cropper/download/vue-cropper-0.4.9.tgz",
       "integrity": "sha1-/mUPMlFuzykBS71KkHkZHI3Fpa4="
     },
+    "vue-easytable": {
+      "version": "2.24.0",
+      "resolved": "https://registry.npmjs.org/vue-easytable/-/vue-easytable-2.24.0.tgz",
+      "integrity": "sha512-5OcCw3EMLEb/cBLV/pMqRIhAmwt3FadXpoZvWhdE+SynthdNtTrQhxFKyjgpAmX6OPEMb9/XFNX86gDuIVnlxg==",
+      "requires": {
+        "lodash": "^4.17.20",
+        "resize-observer-polyfill": "^1.5.1",
+        "vue": "^2.6.12",
+        "vue-template-compiler": "^2.6.11"
+      },
+      "dependencies": {
+        "lodash": {
+          "version": "4.17.21",
+          "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+          "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
+        },
+        "vue": {
+          "version": "2.7.14",
+          "resolved": "https://registry.npmjs.org/vue/-/vue-2.7.14.tgz",
+          "integrity": "sha512-b2qkFyOM0kwqWFuQmgd4o+uHGU7T+2z3T+WQp8UBjADfEv2n4FEMffzBmCKNP0IGzOEEfYjvtcC62xaSKeQDrQ==",
+          "requires": {
+            "@vue/compiler-sfc": "2.7.14",
+            "csstype": "^3.1.0"
+          }
+        },
+        "vue-template-compiler": {
+          "version": "2.7.14",
+          "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.7.14.tgz",
+          "integrity": "sha512-zyA5Y3ArvVG0NacJDkkzJuPQDF8RFeRlzV2vLeSnhSpieO6LK2OVbdLPi5MPPs09Ii+gMO8nY4S3iKQxBxDmWQ==",
+          "requires": {
+            "de-indent": "^1.0.2",
+            "he": "^1.2.0"
+          }
+        }
+      }
+    },
     "vue-eslint-parser": {
       "version": "2.0.3",
       "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-2.0.3.tgz",

+ 1 - 0
package.json

@@ -33,6 +33,7 @@
     "vue-clipboard2": "^0.2.1",
     "vue-cookies": "^1.6.1",
     "vue-cropper": "0.4.9",
+    "vue-easytable": "^2.24.0",
     "vue-ls": "^3.2.1",
     "vue-pdf-signature": "^4.2.6",
     "vue-qr": "^3.2.2",

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1677115385615
+  "version": 1677135048382
 }

+ 6 - 0
src/main.js

@@ -8,6 +8,12 @@ import { VueAxios } from './utils/request'
 import Viewer from 'v-viewer'
 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'
 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>
         </template>
       </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-panel key="1" header="基础信息">
             <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-collapse-panel>
         </a-collapse>

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

@@ -5,7 +5,7 @@
         <!-- 自定义的二级文字标题 -->
         <template slot="subTitle">
           <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>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra" v-if="$hasPermissions('B_storeCallOutPrint')">
@@ -232,7 +232,7 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 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 ProductBrand from '../../common/productBrand.js'
 import { warehouseAllList } from '@/api/warehouse'
@@ -391,7 +391,7 @@ export default {
     },
     // 基本信息
     getDetail () {
-      storeCallOutDetail({ id: this.$route.params.id }).then(res => {
+      storeCallOutDetailSn({ sn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.basicInfoData = res.data
         } else {

+ 20 - 6
src/views/allocationManagement/storeTransferOut/list.vue

@@ -22,7 +22,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <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-col>
             <template v-if="advanced">
@@ -156,13 +156,14 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import getDate from '@/libs/getDate.js'
+import custList from '@/views/common/custList.vue'
 import basicInfoModal from './basicInfoModal.vue'
 import stateIcon from '@/views/common/stateIcon'
 import { storeCallOutList, storeCallOutAudit, storeCallOutDel, storeCallOutOut, storeCallOutQueryCount } from '@/api/storeCallOut'
 import { storeCallOutTypeAllList } from '@/api/storeCallOutType'
 export default {
   name: 'StoreCallOutList',
-  components: { STable, VSelect, basicInfoModal, rangeDate, stateIcon },
+  components: { STable, VSelect, basicInfoModal, rangeDate, stateIcon, custList },
   mixins: [commonMixin],
   data () {
     return {
@@ -182,7 +183,8 @@ export default {
         auditEndDate: '',
         outWarehouseBeginDate: '',
         outWarehouseEndDate: '',
-        putPersonName: undefined, //  调往对象
+        customerNameCurrent: undefined, //  调往对象
+        customerSnCurrent: undefined,
         callOutType: undefined, //  调拨类型
         state: undefined, //  业务状态
         settleState: undefined //  财务状态
@@ -221,7 +223,7 @@ export default {
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
         { 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: '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 : '--') } },
@@ -241,6 +243,16 @@ export default {
     }
   },
   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) {
       storeCallOutQueryCount(params).then(res => {
@@ -280,11 +292,13 @@ export default {
       this.$refs.outWareRangeDate.resetDate('')
       this.queryParam.outWarehouseBeginDate = ''
       this.queryParam.outWarehouseEndDate = ''
-
-      this.queryParam.putPersonName = undefined
+      this.$refs.custList.resetForm()
+      this.queryParam.customerSnCurrent = undefined
+      this.queryParam.customerNameCurrent = undefined
       this.queryParam.callOutType = undefined
       this.queryParam.state = undefined
       this.queryParam.settleState = undefined
+      
       if (!flag) {
         this.setIsHomeNav(this.$route.name, null)
       }

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

@@ -74,7 +74,7 @@
           <div class="table-page-search-wrapper">
             <a-row :gutter="15">
               <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-col :md="6" :sm="24">
                       <a-form-model-item label="产品编码">
@@ -88,7 +88,7 @@
                     </a-col>
                     <a-col :md="8" :sm="24">
                       <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-form-model-item>
                     </a-col>
@@ -98,42 +98,16 @@
             </a-row>
           </div>
           <!-- 列表 -->
-          <s-table
+          <ve-table
             class="sTable"
+            border-y
             ref="purchaseTable"
-            :style="{ height: tableHeight +'px', overflow: 'auto' }"
-            size="small"
-            :rowKey="(record) => record.id"
+            :max-height="tableHeight"
+            :virtual-scroll-option="{enable: true}"
             :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 v-else>
           <div v-if="!spinning&&localDataSource.length==0">
@@ -198,6 +172,45 @@ import chooseProductModal from './chooseProductModal.vue'
 import Print from '@/views/common/print.vue'
 import { hdPrint } from '@/libs/JGPrint'
 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 {
   name: 'PurchaseEdit',
   components: { STable, VSelect, ImportGuideModal, outStockModal, Print, chooseAddressModal, chooseProductModal, shopingCatModal },
@@ -222,25 +235,6 @@ export default {
         orderBy: 'purchase_bill_detail.CREATE_DATE desc'
       },
       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: [],
       openGuideModal: false, //  导入产品引导
       openOutStockModal: false,
@@ -255,21 +249,50 @@ export default {
     chooseColumns () {
       const _this = this
       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')) {
-        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
     }
   },
   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) {
       this.spinning = true
@@ -281,7 +304,7 @@ export default {
               if (isReset) {
                 this.resetPurchaseForm()
               } else {
-                this.$refs.purchaseTable.refresh(!!flag)
+                this.getTableData()
               }
             } else {
               this.localDataSource = []
@@ -304,14 +327,14 @@ export default {
         centered: true,
         closable: true,
         onOk () {
-          _this.delLoading = true
+          row.delLoading = true
           purchaseDetailDel({ id: row.id }).then(res => {
             if (res.status == 200) {
               _this.getOrderDetail(false, false, true)
               _this.$message.success(res.message)
-              _this.delLoading = false
+              row.delLoading = false
             } else {
-              _this.delLoading = false
+              row.delLoading = false
             }
           })
         }
@@ -329,7 +352,7 @@ export default {
       this.productForm.productName = ''
       this.productForm.productCode = ''
       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 :md="4" :sm="24">
             <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-col>
           <a-col :md="4" :sm="24">
@@ -114,9 +114,10 @@ import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
 import supplier from '@/views/common/supplier'
 import { storeCallOutTypeAllList } from '@/api/storeCallOutType'
+import custList from '@/views/common/custList.vue'
 import { reportStoreCallOutDetailList, reportStoreCallOutDetailTotal, reportStoreCallOutDetailExport } from '@/api/reportData'
 export default {
-  components: { STable, VSelect, rangeDate, ProductType, ProductBrand, supplier },
+  components: { STable, VSelect, rangeDate, ProductType, ProductBrand, supplier, custList },
   mixins: [commonMixin],
   data () {
     return {
@@ -141,7 +142,8 @@ export default {
         callOutType: undefined,
         productType: undefined,
         storeCallOutNo: '',
-        putPersonName: ''
+        customerNameCurrent: undefined, //  调往对象
+        customerSnCurrent: undefined,
       },
       rules: {
         'time': [{ required: true, message: '请选择审核时间', trigger: 'change' }]
@@ -180,7 +182,7 @@ export default {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { 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: '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 },
@@ -196,6 +198,16 @@ export default {
     }
   },
   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) {
       reportStoreCallOutDetailTotal(params).then(res => {
@@ -240,7 +252,9 @@ export default {
 
       this.queryParam.storeCallOutNo = ''
       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.productTypeSn1 = ''
       this.queryParam.productEntity.productTypeSn2 = ''

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

@@ -30,7 +30,7 @@
           </a-col>
           <a-col :md="4" :sm="24">
             <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-col>
           <a-col :md="4" :sm="24">
@@ -85,10 +85,11 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { downloadExcel } from '@/libs/JGPrint.js'
+import custList from '@/views/common/custList.vue'
 import { storeCallOutTypeAllList } from '@/api/storeCallOutType'
 import { reportStoreCallOutPageList, reportStoreCallOutListTotal, reportStoreCallOutExport } from '@/api/reportData'
 export default {
-  components: { STable, VSelect, rangeDate },
+  components: { STable, VSelect, rangeDate, custList },
   mixins: [commonMixin],
   data () {
     return {
@@ -102,7 +103,8 @@ export default {
         time: [],
         beginDate: '',
         endDate: '',
-        putPersonName: '',
+        customerNameCurrent: undefined, //  调往对象
+        customerSnCurrent: undefined,
         callOutType: undefined,
         storeCallOutNo: ''
       },
@@ -143,7 +145,7 @@ export default {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { 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: '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 : '--') } },
@@ -157,6 +159,16 @@ export default {
     }
   },
   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) {
       reportStoreCallOutListTotal(params).then(res => {
@@ -199,7 +211,9 @@ export default {
       this.queryParam.outWarehouseBeginDate = ''
       this.queryParam.outWarehouseEndDate = ''
 
-      this.queryParam.putPersonName = ''
+      this.$refs.custList.resetForm()
+      this.queryParam.customerSnCurrent = undefined
+      this.queryParam.customerNameCurrent = undefined
       this.queryParam.storeCallOutNo = ''
       this.queryParam.callOutType = undefined
       this.$refs.ruleForm.resetFields()

+ 17 - 17
vue.config.js

@@ -22,11 +22,11 @@ function isProd () {
   return process.env.NODE_ENV === 'production'
 }
 
-// 锟斤拷目锟斤拷锟斤拷锟斤拷锟�
-// 默锟斤拷锟斤拷锟斤拷拢锟斤拷锟斤拷羌锟斤拷锟斤拷锟斤拷应锟矫斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷母锟侥柯硷拷锟�
+// 锟斤拷目锟斤拷锟斤拷锟斤拷锟�1锟�7
+// 默锟斤拷锟斤拷锟斤拷拢锟斤拷锟斤拷羌锟斤拷锟斤拷锟斤拷应锟矫斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷母锟侥柯硷拷锟�1锟�7
 // 锟斤拷锟界:https://www.my-app.com/
 // 默锟较o拷'/'
-// 锟斤拷锟斤拷锟斤拷锟接︼拷贸锟斤拷锟斤拷锟斤拷锟斤拷锟铰凤拷锟斤拷校锟斤拷锟斤拷锟揭�拷锟斤拷锟街革拷锟斤拷锟铰凤拷锟�
+// 锟斤拷锟斤拷锟斤拷锟接︼拷贸锟斤拷锟斤拷锟斤拷锟斤拷锟铰凤拷锟斤拷校锟斤拷锟斤拷锟揭�拷锟斤拷锟街革拷锟斤拷锟铰凤拷锟�1锟�7
 // 锟斤拷锟界:https://www.foobar.com/my-app/
 // 锟斤拷要锟斤拷锟斤拷锟斤拷为'/my-app/'
 const BASE_URL = isProd ? '/' : '/'
@@ -61,14 +61,14 @@ const prodExternals = {
 
 // vue.config.js
 const vueConfig = {
-  runtimeCompiler: true, // 锟斤拷态锟斤拷锟斤拷锟斤拷锟�
+  runtimeCompiler: true, // 锟斤拷态锟斤拷锟斤拷锟斤拷锟�1锟�7
   publicPath: BASE_URL,
   configureWebpack: {
     optimization: isProd() ? {
           minimize: true,
           minimizer: [new TerserPlugin({
-              test: /\.js(\?.*)?$/i,    //匹锟斤拷锟斤拷锟窖癸拷锟斤拷锟斤拷募锟�
-              parallel: true,    //使锟矫讹拷锟斤拷滩锟斤拷锟斤拷锟斤拷锟�
+              test: /\.js(\?.*)?$/i,    //匹锟斤拷锟斤拷锟窖癸拷锟斤拷锟斤拷募锟�1锟�7
+              parallel: true,    //使锟矫讹拷锟斤拷滩锟斤拷锟斤拷锟斤拷锟�1锟�7
               terserOptions: {    //Terser 压锟斤拷锟斤拷锟斤拷
                   output:{comments: false},
                   compress: {//console删锟斤拷
@@ -91,7 +91,7 @@ const vueConfig = {
           test: new RegExp('\\.(' + ['js', 'css'].join('|') + ')$'),
           //只锟叫达拷小锟斤拷锟节革拷值锟斤拷锟斤拷源锟结被锟斤拷锟斤拷锟斤拷锟斤拷位锟斤拷 bytes锟斤拷默锟斤拷值锟斤拷 0锟斤拷
           threshold: 10240,
-          //只锟斤拷压锟斤拷锟斤拷小锟斤拷锟斤拷锟街碉拷锟斤拷锟皆达拷呕岜伙拷锟斤拷锟斤拷锟侥�拷锟街碉拷锟�0.8锟斤拷
+          //只锟斤拷压锟斤拷锟斤拷小锟斤拷锟斤拷锟街碉拷锟斤拷锟皆达拷呕岜伙拷锟斤拷锟斤拷锟侥�拷锟街碉拷锟�1锟�70.8锟斤拷
           minRatio: 0.8
         }),
       new WebpackVersionPlugin({
@@ -137,17 +137,17 @@ const vueConfig = {
     }
     
     config.optimization && config.optimization.splitChunks({
-        // 锟斤拷锟斤拷锟斤拷锟�
+        // 锟斤拷锟斤拷锟斤拷锟�1锟�7
         chunks: 'all', //锟斤拷选一锟斤拷"initial" 锟斤拷始锟斤拷锟斤拷"all"(默锟较撅拷锟斤拷all)锟斤拷"async"锟斤拷锟斤拷态锟斤拷锟截o拷 
-        minSize: 30000, // 锟轿筹拷一锟斤拷锟铰达拷锟斤拷锟斤拷锟叫★拷锟斤拷锟斤拷,只锟斤拷 >= minSize 锟斤拷bundle锟结被锟斤拷殖锟斤拷锟�30000
-        maxSize: 0, //锟斤拷锟街�帮拷锟斤拷锟斤拷锟街碉拷锟侥�拷锟轿�斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷
-        minChunks: 1, //锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷为2 锟斤拷么一锟斤拷锟斤拷源锟斤拷锟劫憋拷锟斤拷锟斤拷锟斤拷锟轿才匡拷锟皆憋拷锟斤拷殖锟斤拷锟�
+        minSize: 30000, // 锟轿筹拷一锟斤拷锟铰达拷锟斤拷锟斤拷锟叫★拷锟斤拷锟斤拷,只锟斤拷 >= minSize 锟斤拷bundle锟结被锟斤拷殖锟斤拷锟�1锟�730000
+        maxSize: 0, //锟斤拷锟街�帮拷锟斤拷锟斤拷锟街碉拷锟侥�拷锟轿�1锟�7锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷
+        minChunks: 1, //锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷为2 锟斤拷么一锟斤拷锟斤拷源锟斤拷锟劫憋拷锟斤拷锟斤拷锟斤拷锟轿才匡拷锟皆憋拷锟斤拷殖锟斤拷锟�1锟�7
         maxAsyncRequests: 5, // 锟斤拷锟斤拷锟斤拷氐锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷
         maxInitialRequests: 4, // 一锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷
         automaticNameDelimiter: '~', // 锟侥硷拷锟斤拷锟斤拷锟斤拷锟接凤拷
         name: true,
         cacheGroups: {
-        // node_modules模锟斤拷锟�
+        // node_modules模锟斤拷锟�1锟�7
         vendors: {
           test: /[\\/]node_modules[\\/]/,
           name: 'chunk-vendors',
@@ -158,7 +158,7 @@ const vueConfig = {
           chunks: 'all',
           priority: -10,
         },
-        // UI锟解单锟斤拷锟斤拷锟�
+        // UI锟解单锟斤拷锟斤拷锟�1锟�7
         antDesign: {
           name: 'chunk-antDesign',
           priority: 19, //  the weight needs to be larger than libs and app or it will be packaged into libs or app
@@ -173,14 +173,14 @@ const vueConfig = {
         common: {
           name: 'chunk-common',
           minChunks: 2,
-          maxSize: 1024, //锟斤拷锟街�帮拷锟斤拷锟斤拷锟街碉拷锟侥�拷锟轿�斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷
+          maxSize: 1024, //锟斤拷锟街�帮拷锟斤拷锟斤拷锟街碉拷锟侥�拷锟轿�1锟�7锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷
           priority: -20,
           reuseExistingChunk: true
         }
         }
     });
     
-    // 锟斤拷锟斤拷锟斤拷锟斤拷锟叫�
+    // 锟斤拷锟斤拷锟斤拷锟斤拷锟叫�1锟�7
     if (process.env.npm_config_report) {
       config.plugin('webpack-bundle-analyzer')
       .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin)
@@ -211,8 +211,8 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.0.183:8503/qpls-md',
-        target: 'http://p.iscm.360arrow.com/qpls-md',
+        target: 'http://192.168.0.216:8076/qpls-md',
+        // target: 'http://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         ws: true,
         changeOrigin: true,