瀏覽代碼

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

zhangdan 3 年之前
父節點
當前提交
319d91c408
共有 2 個文件被更改,包括 28 次插入15 次删除
  1. 10 9
      src/components/Table/index.js
  2. 18 6
      src/views/numsGoodsShelves/shelfSet/basicInfoModal.vue

+ 10 - 9
src/components/Table/index.js

@@ -253,6 +253,7 @@ export default {
         selectedRowKeys: this.selectedRowKeys,
         selectedRows: this.selectedRows
       }
+      console.log(obj)
       this.$emit('rowSelection', obj)
     },
     onSelectChange (record, selected, selectedRows, nativeEvent) {
@@ -275,17 +276,17 @@ export default {
       if (selected) { //  选择
         this.selectedRows = [...this.selectedRows, ...changeRows]
       } else { //  取消
-        const arrId = []
-        this.selectedRows.map((item, index) => {
-          this.selectedRows.map((subItem, ind) => {
-            if (item[this.rowKeyName] == subItem[this.rowKeyName]) {
-              arrId.push(index)
-            }
-          })
+        const arrIds = []
+        changeRows.map((item, index) => {
+          arrIds.push(item[this.rowKeyName])
         })
-        arrId.map((item, index) => {
-          _this.selectedRows = _this.selectedRows.slice(item, item + 1)
+        const arrs = []
+        this.selectedRows.map((item, index) => {
+          if (arrIds.indexOf(item[this.rowKeyName]) == -1) {
+            arrs.push(item)
+          }
         })
+        this.selectedRows = arrs
       }
       this.updateSelect()
     },

+ 18 - 6
src/views/numsGoodsShelves/shelfSet/basicInfoModal.vue

@@ -17,7 +17,15 @@
         :rules="rules"
         :label-col="formItemLayout.labelCol"
         :wrapper-col="formItemLayout.wrapperCol">
-        <a-form-model-item label="关联客户" prop="customerSn">
+        <a-form-model-item prop="customerSn">
+          <template slot="label">
+            <a-tooltip placement="top">
+              <template slot="title">
+                <span>此数字货架,归属于您的哪一位客户。如果没有搜索到客户,请在客户管理功能中新建客户。</span>
+              </template>
+              关联客户<a-icon type="question-circle" style="color: rgba(0,0,0,.65);font-size: 16px;margin-left: 2px;vertical-align: sub;cursor: pointer;" />
+            </a-tooltip>
+          </template>
           <custList ref="custList" :isEnabled="true" @change="custChange"></custList>
         </a-form-model-item>
       </a-form-model>
@@ -56,8 +64,8 @@ export default {
       spinning: false,
       isShow: this.openModal, //  是否打开弹框
       formItemLayout: {
-        labelCol: { span: 4 },
-        wrapperCol: { span: 18 }
+        labelCol: { span: 5 },
+        wrapperCol: { span: 17 }
       },
       form: {
         customerSn: undefined
@@ -114,9 +122,13 @@ export default {
         if (this.nowData.customerSn) {
           const _this = this
           this.$nextTick(() => {
-            _this.form.customerSn = _this.nowData.customerSn
-            _this.$refs.custList.fetchUser(_this.nowData.customerName)
-            _this.$refs.custList.dealerName = { key: _this.nowData.customerSn, label: _this.nowData.customerName, row: _this.nowData }
+            _this.form.customerSn = _this.nowData.customerEntity && _this.nowData.customerEntity.customerSn
+            _this.$refs.custList.fetchUser(_this.nowData.customerEntity && _this.nowData.customerEntity.customerName)
+            _this.$refs.custList.dealerName = {
+              key: _this.nowData.customerEntity && _this.nowData.customerEntity.customerSn,
+              label: _this.nowData.customerEntity && _this.nowData.customerEntity.customerName,
+              row: _this.nowData
+            }
           })
         }
       }