lilei 2 lat temu
rodzic
commit
078da9c65d

+ 1 - 1
public/version.json

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

+ 5 - 1
src/components/Table/index.js

@@ -357,13 +357,17 @@ export default {
         // 自定义属性,也就是官方文档中的props,可通过条件来控制样式
         style: {
           //  设置行背景色
-          'background-color': record[this.rowKeyName] === this.leftAlignId ? '#fff1c5' : ''
+          'background-color': record[this.rowKeyName] == this.leftAlignId ? '#fff1c5' : ''
         },
         on: {
           // 鼠标单击行
           click: event => {
             // 记录当前点击的行标识
             this.leftAlignId = record[this.rowKeyName]
+          },
+          dblclick: (event) => {
+            event.stopPropagation()
+            this.$emit('dblclick', record, index)
           }
         }
       }

+ 74 - 71
src/core/directives/dragModal.js

@@ -12,81 +12,84 @@ const dragModal = Vue.directive('drag', (el, binding, vnode, oldVnode) => {
   // inserted (el, binding, vnode, oldVnode) {
   Vue.nextTick(() => {
     const isThemeModal = el.classList.contains('grid-theme')
-    const dialogHeaderEl = isThemeModal ? el.querySelector('.ant-tabs-bar') : document.querySelector('.ant-modal-header')
-    const dragDom = isThemeModal ? el.querySelector('.ant-modal') : document.querySelector('.ant-modal')
-    // dialogHeaderEl.style.cursor = 'move';
-    dialogHeaderEl.style.cssText += ';cursor:move;'
-    // dragDom.style.cssText += ';top:0px;'
-    
-    // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
-    const sty = (function () {
-      if (window.document.currentStyle) {
-        return (dom, attr) => dom.currentStyle[attr]
-      } else {
-        return (dom, attr) => getComputedStyle(dom, false)[attr]
-      }
-    })()
-
-    dialogHeaderEl.onmousedown = (e) => {
-      // 鼠标按下,计算当前元素距离可视区的距离
-      const disX = e.clientX - dialogHeaderEl.offsetLeft
-      const disY = e.clientY - dialogHeaderEl.offsetTop
-
-      const screenWidth = document.body.clientWidth // body当前宽度
-      const screenHeight = document.documentElement.clientHeight // 可见区域高度(应为body高度,可某些环境下无法获取)
-
-      const dragDomWidth = dragDom.offsetWidth // 对话框宽度
-      const dragDomheight = dragDom.offsetHeight // 对话框高度
-
-      const minDragDomLeft = dragDom.offsetLeft
-      const maxDragDomLeft = screenWidth - dragDom.offsetLeft - dragDomWidth - (isThemeModal ? 10 : 0)
-
-      const minDragDomTop = dragDom.offsetTop
-      const maxDragDomTop = screenHeight - dragDom.offsetTop - dragDomheight - (isThemeModal ? 10 : 0)
-
-      // 获取到的值带px 正则匹配替换
-      let styL = sty(dragDom, 'left')
-      let styT = sty(dragDom, 'top')
-
-      // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
-      if (styL.includes('%')) {
-        // eslint-disable-next-line no-useless-escape
-        styL = +document.body.clientWidth * (+styL.replace(/\%/g, '') / 100)
-        // eslint-disable-next-line no-useless-escape
-        styT = +document.body.clientHeight * (+styT.replace(/\%/g, '') / 100)
-      } else {
-        styL = +styL.replace(/\px/g, '')
-        styT = +styT.replace(/\px/g, '')
-      };
-
-      document.onmousemove = function (e) {
-        // 通过事件委托,计算移动的距离
-        let left = e.clientX - disX
-        let top = e.clientY - disY
-
-        // 边界处理
-        if (-(left) > minDragDomLeft) {
-          left = -(minDragDomLeft)
-        } else if (left > maxDragDomLeft) {
-          left = maxDragDomLeft
+    const dialogHeaderEl = isThemeModal ? el.querySelector('.ant-tabs-bar') : el.querySelector('.ant-modal-header')
+    const dragDom = isThemeModal ? el.querySelector('.ant-modal') : el.querySelector('.ant-modal')
+    if(dialogHeaderEl){
+      // dialogHeaderEl.style.cursor = 'move';
+      dialogHeaderEl.style.cssText += ';cursor:move;user-select:none;'
+      // dragDom.style.cssText += ';top:0px;'
+      dragDom.style.cssText += `;left:0px;top:0px;`
+      // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
+      const sty = (function () {
+        if (window.document.currentStyle) {
+          return (dom, attr) => dom.currentStyle[attr]
+        } else {
+          return (dom, attr) => getComputedStyle(dom, false)[attr]
         }
-
-        if (-(top) > minDragDomTop) {
-          top = -(minDragDomTop)
-        } else if (top > maxDragDomTop) {
-          top = maxDragDomTop
+      })()
+      
+      dialogHeaderEl.onmousedown = (e) => {
+        // 鼠标按下,计算当前元素距离可视区的距离
+        const disX = e.clientX - dialogHeaderEl.offsetLeft
+        const disY = e.clientY - dialogHeaderEl.offsetTop
+      
+        const screenWidth = document.body.clientWidth // body当前宽度
+        const screenHeight = document.documentElement.clientHeight // 可见区域高度(应为body高度,可某些环境下无法获取)
+      
+        const dragDomWidth = dragDom.offsetWidth // 对话框宽度
+        const dragDomheight = dragDom.offsetHeight // 对话框高度
+      
+        const minDragDomLeft = dragDom.offsetLeft
+        const maxDragDomLeft = screenWidth - dragDom.offsetLeft - dragDomWidth - (isThemeModal ? 10 : 0)
+      
+        const minDragDomTop = dragDom.offsetTop
+        const maxDragDomTop = screenHeight - dragDom.offsetTop - dragDomheight - (isThemeModal ? 10 : 0)
+      
+        // 获取到的值带px 正则匹配替换
+        let styL = sty(dragDom, 'left')
+        let styT = sty(dragDom, 'top')
+        
+        // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
+        if (styL.includes('%')) {
+          // eslint-disable-next-line no-useless-escape
+          styL = +document.body.clientWidth * (+styL.replace(/\%/g, '') / 100)
+          // eslint-disable-next-line no-useless-escape
+          styT = +document.body.clientHeight * (+styT.replace(/\%/g, '') / 100)
+        } else {
+          styL = +styL.replace(/\px/g, '')
+          styT = +styT.replace(/\px/g, '')
+        };
+      
+        document.onmousemove = function (e) {
+          // 通过事件委托,计算移动的距离
+          let left = e.clientX - disX
+          let top = e.clientY - disY
+      
+          // 边界处理
+          if (-(left) > minDragDomLeft) {
+            left = -(minDragDomLeft)
+          } else if (left > maxDragDomLeft) {
+            left = maxDragDomLeft
+          }
+      
+          if (-(top) > minDragDomTop) {
+            top = -(minDragDomTop)
+          } else if (top > maxDragDomTop) {
+            top = maxDragDomTop
+          }
+          // 移动当前元素
+          dragDom.style.cssText += `;left:${left + styL}px;top:${top + styT}px;`
         }
-        // 移动当前元素
-        dragDom.style.cssText += `;left:${left + styL}px;top:${top + styT}px;`
-      }
-
-      document.onmouseup = function (e) {
-        document.onmousemove = null
-        document.onmouseup = null
-        dragDom.releaseCapture && dragDom.releaseCapture();
+      
+        document.onmouseup = function (e) {
+          document.onmousemove = null
+          document.onmouseup = null
+          dragDom.releaseCapture && dragDom.releaseCapture();
+        }
+         dragDom.setCapture && dragDom.setCapture();
       }
-       dragDom.setCapture && dragDom.setCapture();
     }
+    
   })
 })
 

+ 5 - 11
src/views/allocationManagement/chainTransferOut/edit.vue

@@ -70,9 +70,10 @@
               class="sTable"
               ref="table"
               size="small"
-              :rowKey="(record) => record.stockSn+record.productSn+record.warehouseSn+record.warehouseLocationSn"
+              :rowKey="(record) => record.stockDetailSn"
+              rowKeyName="stockDetailSn"
               :columns="columns"
-              :customRow="handleClickRow"
+              @dblclick="handleClickRow"
               :data="loadData"
               :defaultLoadData="false"
               :scroll="{ y: 300 }"
@@ -93,7 +94,7 @@
               </template>
               <!-- 操作 -->
               <template slot="action" slot-scope="text, record">
-                <a-button size="small" type="link" class="button-primary" @click.stop="handleAdd(record)" id="chainTransferOutEdit-add-btn">添加</a-button>
+                <a-button size="small" type="link" class="button-primary" @click="handleAdd(record)" id="chainTransferOutEdit-add-btn">添加</a-button>
               </template>
             </s-table>
           </a-collapse-panel>
@@ -321,14 +322,7 @@ export default {
     },
     // 双击快速添加
     handleClickRow (record) {
-      return {
-        on: {
-          dblclick: (event) => {
-            event.stopPropagation()
-            this.handleAdd(record)
-          }
-        }
-      }
+      this.handleAdd(record)
     },
     // 基本信息
     getDetail () {

+ 5 - 11
src/views/allocationManagement/storeTransferOut/edit.vue

@@ -66,9 +66,10 @@
               class="sTable"
               ref="table"
               size="small"
-              :rowKey="(record) => record.stockSn+record.productSn+record.warehouseSn+record.warehouseLocationSn"
+              :rowKey="(record) => record.stockDetailSn"
+              rowKeyName="stockDetailSn"
               :columns="columns"
-              :customRow="handleClickRow"
+              @dblclick="handleClickRow"
               :data="loadData"
               :scroll="{ y: 300 }"
               :defaultLoadData="false"
@@ -103,7 +104,7 @@
                   v-if="record.currentQty"
                   type="link"
                   class="button-primary"
-                  @click.stop="handleAdd(record)"
+                  @click="handleAdd(record)"
                   id="storeTransferOutEdit-add-btn">添加</a-button>
                 <span v-else>--</span>
               </template>
@@ -356,14 +357,7 @@ export default {
     },
     // 双击快速添加
     handleClickRow (record) {
-      return {
-        on: {
-          dblclick: (event) => {
-            event.stopPropagation()
-            this.handleAdd(record)
-          }
-        }
-      }
+      this.handleAdd(record)
     },
     // 已选产品  重置
     chooseResetSearchForm () {

+ 4 - 10
src/views/allocationManagement/warehouseAllocation/edit.vue

@@ -67,9 +67,10 @@
               class="sTable"
               ref="table"
               size="small"
-              :rowKey="(record) => record.stockSn+record.productSn+record.warehouseSn+record.warehouseLocationSn"
+              :rowKey="(record) => record.stockDetailSn"
+              rowKeyName="stockDetailSn"
               :columns="columns"
-              :customRow="handleClickRow"
+              @dblclick="handleClickRow"
               :data="loadData"
               :defaultLoadData="false"
               :scroll="{ y: 300 }"
@@ -333,14 +334,7 @@ export default {
     },
     // 双击快速添加
     handleClickRow (record) {
-      return {
-        on: {
-          dblclick: (event) => {
-            event.stopPropagation()
-            this.handleAdd(record)
-          }
-        }
-      }
+      this.handleAdd(record)
     },
     // 已选产品  重置
     chooseResetSearchForm () {

+ 5 - 11
src/views/bulkManagement/bulkReturnGoods/edit.vue

@@ -53,9 +53,10 @@
           class="sTable"
           ref="table"
           size="small"
-          :rowKey="(record) => record.id"
+          :rowKey="(record) => record.stockDetailSn"
+          rowKeyName="stockDetailSn"
           :columns="columns"
-          :customRow="handleClickRow"
+          @dblclick="handleClickRow"
           :data="loadData"
           :defaultLoadData="false"
           :scroll="{ y:150 }"
@@ -95,7 +96,7 @@
               v-if="record.currentQty>0"
               type="link"
               class="button-primary"
-              @click.stop="handleAdd(record)"
+              @click="handleAdd(record)"
               id="bulkReturnGoodsEdit-add-btn">添加</a-button>
             <span v-else>--</span>
           </template>
@@ -440,14 +441,7 @@ export default {
     },
     // 双击快速添加
     handleClickRow (record) {
-      return {
-        on: {
-          dblclick: (event) => {
-            event.stopPropagation()
-            this.handleAdd(record)
-          }
-        }
-      }
+      this.handleAdd(record)
     },
     // 仓库
     getWarehouse () {

+ 3 - 10
src/views/bulkManagement/bulkReturnGoods/grabEdit.vue

@@ -46,7 +46,7 @@
           size="small"
           :rowKey="(record) => record.id"
           :columns="columns"
-          :customRow="handleClickRow"
+          @dblclick="handleClickRow"
           :defaultLoadData="false"
           :data="loadData"
           :scroll="{ y:150 }"
@@ -81,7 +81,7 @@
           </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
-            <a-button size="small" type="link" class="button-primary" @click.stop="handleAdd(record)" id="bulkReturnGoodsEdit-add-btn">添加</a-button>
+            <a-button size="small" type="link" class="button-primary" @click="handleAdd(record)" id="bulkReturnGoodsEdit-add-btn">添加</a-button>
           </template>
         </s-table>
       </a-card>
@@ -430,14 +430,7 @@ export default {
     },
     // 双击快速添加
     handleClickRow (record) {
-      return {
-        on: {
-          dblclick: (event) => {
-            event.stopPropagation()
-            this.handleAdd(record)
-          }
-        }
-      }
+      this.handleAdd(record)
     },
     // 仓库
     getWarehouse () {

+ 3 - 10
src/views/bulkManagement/bulkWarehousingOrder/edit.vue

@@ -92,7 +92,7 @@
                 size="small"
                 :rowKey="(record) => record.id"
                 :columns="columns"
-                :customRow="handleClickRow"
+                @dblclick="handleClickRow"
                 :data="loadData"
                 :defaultLoadData="false"
                 :scroll="{ y: 150 }"
@@ -145,7 +145,7 @@
                 </template>
                 <!-- 操作 -->
                 <template slot="action" slot-scope="text, record">
-                  <a-button size="small" type="link" class="button-primary" @click.stop="handleAdd(record)" id="bulkWarehousingOrderEdit-add-btn">添加</a-button>
+                  <a-button size="small" type="link" class="button-primary" @click="handleAdd(record)" id="bulkWarehousingOrderEdit-add-btn">添加</a-button>
                 </template>
               </s-table>
             </div>
@@ -531,14 +531,7 @@ export default {
     },
     // 双击快速添加
     handleClickRow (record) {
-      return {
-        on: {
-          dblclick: (event) => {
-            event.stopPropagation()
-            this.handleAdd(record)
-          }
-        }
-      }
+      this.handleAdd(record)
     },
     // 基本信息
     getDetail () {

+ 0 - 1
src/views/common/custType.js

@@ -17,7 +17,6 @@ const custType = {
   props: {
     value: {
       type: String,
-      default: ''
     },
     id: {
       type: String,

+ 3 - 10
src/views/inventoryManagement/inventoryChecking/selfDisk.vue

@@ -88,7 +88,7 @@
           :row-selection="{ columnWidth: 40 }"
           @rowSelection="rowSelectionFun"
           :columns="columns"
-          :customRow="handleClickRow"
+          @dblclick="handleClickRow"
           :data="loadData"
           :scroll="{ y: 150 }"
           :defaultLoadData="false"
@@ -105,7 +105,7 @@
               type="link"
               class="button-primary"
               :disabled="spinning"
-              @click.stop="handleAdd(record)"
+              @click="handleAdd(record)"
               id="inventoryCheckSelfDiskList-add-btn">添加</a-button>
           </template>
         </s-table>
@@ -562,14 +562,7 @@ export default {
     },
     // 双击快速添加
     handleClickRow (record) {
-      return {
-        on: {
-          dblclick: (event) => {
-            event.stopPropagation()
-            this.handleAdd(record)
-          }
-        }
-      }
+      this.handleAdd(record)
     },
     // 只查看有库存
     onlySeeStock (e) {

+ 1 - 1
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -158,7 +158,7 @@
       </s-table>
     </a-spin>
     <!-- 库存详情 -->
-    <inventory-query-detail-modal :openModal="openModal" :nowData="nowData" @close="closeModal" />
+    <inventory-query-detail-modal v-drag :openModal="openModal" :nowData="nowData" @close="closeModal" />
   </a-card>
 </template>
 

+ 0 - 11
src/views/purchasingManagement/purchaseReturn/edit.vue

@@ -325,17 +325,6 @@ export default {
         }
       })
     },
-    // 双击快速添加
-    handleClickRow (record) {
-      return {
-        on: {
-          dblclick: (event) => {
-            event.stopPropagation()
-            this.handleAdd(record)
-          }
-        }
-      }
-    },
     // 导入明细
     handleImport () {},
     //  删除

+ 0 - 11
src/views/purchasingManagement/purchaseReturnApplyForm/edit.vue

@@ -413,17 +413,6 @@ export default {
         }
       })
     },
-    // 双击快速添加
-    handleClickRow (record) {
-      return {
-        on: {
-          dblclick: (event) => {
-            event.stopPropagation()
-            this.handleAdd(record)
-          }
-        }
-      }
-    },
     // 导入明细
     handleImport () {},
     // 重置已选产品列表

+ 1 - 8
src/views/purchasingManagement/purchaseReturnOutSync/edit.vue

@@ -399,14 +399,7 @@ export default {
     },
     // 双击快速添加
     handleClickRow (record) {
-      return {
-        on: {
-          dblclick: (event) => {
-            event.stopPropagation()
-            this.handleAdd(record)
-          }
-        }
-      }
+      this.handleAdd(record)
     },
     // 导入明细
     handleImport () {},

+ 0 - 10
src/views/purchasingManagement/purchaseReturnOutSync/grapEdit.vue

@@ -391,16 +391,6 @@ export default {
         }
       })
     },
-    // 双击快速添加
-    handleClickRow (record) {
-      return {
-        on: {
-          dblclick: (event) => {
-            this.handleAdd(record)
-          }
-        }
-      }
-    },
     // 导入明细
     handleImport () {},
     //  删除

+ 1 - 0
src/views/salesManagement/productPricing/productSalesRecordModal.vue

@@ -5,6 +5,7 @@
       class="salesRecord-price-modal"
       :footer="null"
       :maskClosable="false"
+      v-drag
       :title="modalTit"
       v-model="isShow"
       @cancle="isShow=false"

+ 1 - 0
src/views/salesManagement/salesQuery/productSalesRecordModal.vue

@@ -6,6 +6,7 @@
       :footer="null"
       :maskClosable="false"
       :title="modalTit"
+      v-drag
       v-model="isShow"
       @cancel="isShow=false"
       :width="960">

+ 4 - 12
src/views/salesManagement/salesQuery/queryPart.vue

@@ -101,7 +101,7 @@
       rowKeyName="no"
       :columns="columns"
       :data="loadData"
-      :customRow="handleClickRow"
+      @dblclick="handleClickRow"
       :defaultLoadData="false"
       :pageSize="10"
       :scroll="{ y: 149 }"
@@ -148,13 +148,13 @@
           size="small"
           type="link"
           class="button-primary"
-          @click.stop="handleAdd(record)"
+          @click="handleAdd(record)"
           id="productInfoList-edit-btn">添加</a-button>
         <a-button
           size="small"
           type="link"
           class="button-primary"
-          @click.stop="handleDetail(record)"
+          @click="handleDetail(record)"
           id="productInfoList-detail-btn"
           style="margin-left: 5px;">销售记录</a-button>
       </template>
@@ -357,15 +357,7 @@ export default {
     },
     // 双击列表
     handleClickRow (record) {
-      const _this = this
-      return {
-        on: {
-          dblclick: (event) => {
-            event.stopPropagation()
-            _this.$emit('add', record)
-          }
-        }
-      }
+      this.$emit('add', record)
     },
     //  重置
     resetSearchForm () {

+ 7 - 22
src/views/salesManagement/salesReturn/queryPart.vue

@@ -63,15 +63,6 @@
             style="width: 100%;" />
         </div>
       </template>
-      <span slot="customTitle">
-        操作
-        <!-- <a-popover>
-          <template slot="content">
-            双击列表配件可快速选中添加
-          </template>
-          <a-icon type="question-circle" theme="twoTone" />
-        </a-popover> -->
-      </span>
       <!-- 本次退货数量 -->
       <template slot="returnQty" slot-scope="text, record">
         <a-input-number
@@ -241,7 +232,7 @@ export default {
         { title: '本次退货数量', align: 'center', width: '7%', scopedSlots: { customRender: 'returnQty' } },
         { title: '废品数量', align: 'center', width: '6%', scopedSlots: { customRender: 'celQty' } },
         { title: '仓库仓位', scopedSlots: { customRender: 'warehouse' }, width: '10%', align: 'center' },
-        { slots: { title: 'customTitle' }, scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }]
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }]
     } else {
       this.columns = [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
@@ -253,7 +244,7 @@ export default {
         { title: '仓库仓位', scopedSlots: { customRender: 'warehouse' }, width: '10%', align: 'center' },
         { title: '本次退货数量', align: 'center', width: '7%', scopedSlots: { customRender: 'returnQty' } },
         { title: '废品数量', align: 'center', width: '6%', scopedSlots: { customRender: 'celQty' } },
-        { slots: { title: 'customTitle' }, scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }]
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }]
     }
   },
   methods: {
@@ -265,17 +256,11 @@ export default {
     // 双击列表选择配件
     handleClickRow (record) {
       const _this = this
-      return {
-        on: {
-          dblclick: (event) => {
-            if ((_this.grabFlag == 1) && (record.qty == record.hasReturnQty)) {
-              _this.$message.info('该产品暂时不能添加')
-            } else {
-              event.stopPropagation()
-              _this.$emit('add', record, 'new')
-            }
-          }
-        }
+      if ((_this.grabFlag == 1) && (record.qty == record.hasReturnQty)) {
+        _this.$message.info('该产品暂时不能添加')
+      } else {
+        event.stopPropagation()
+        _this.$emit('add', record, 'new')
       }
     },
     // 修改仓库仓位

+ 2 - 2
vue.config.js

@@ -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.115:8503/qpls-md',
-        // target: 'http://p.iscm.360arrow.com/qpls-md',
+        // target: 'http://192.168.0.115:8503/qpls-md',
+        target: 'http://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         ws: true,
         changeOrigin: true,