cuijian
2025-06-18 4af716ae6ae5858fe5b0cffba21483a6dc44e90d
src/views/tms/InboundOrderList.vue
@@ -18,7 +18,7 @@
                />
              </a-form-item>
            </a-col>
          <a-col :md="6" :sm="8">
          <!-- <a-col :md="6" :sm="8">
              <a-form-item label="经手人">
                <j-search-select-tag
                  placeholder="请选择经手人"
@@ -26,7 +26,7 @@
                  dict="sys_user,realname,id,del_flag!=1"
                />
              </a-form-item>
            </a-col>
            </a-col> -->
        </a-row>
      </a-form>
    </div>
@@ -49,6 +49,7 @@
      :dataSource="dataSource"
      :pagination="ipagination"
      :loading="loading"
      :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:'radio'}"
      @change="handleTableChange"
    >
      <!--状态栏个性展示-->
@@ -72,8 +73,8 @@
<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import InboundOrderModel from './modules/inbound/InboundOrderModel'
import InboundDetailList from './modules/inbound/InboundDetailList'
import InboundOrderModel from './modules/inboundOrder/InboundOrderModel'
import InboundDetailList from './modules/inboundOrder/InboundDetailList'
import { requestPut } from '@/api/manage'
import JDictSelectTag from '@/components/dict/JDictSelectTag'
import JSearchSelectTag from '@/components/dict/JSearchSelectTag'
@@ -93,10 +94,8 @@
      description: '入库申请单',
      url: {
        list: '/tms/inboundOrder/list',
        toolingStorageStatus: '/tooling/storage/toolingStorageStatus',
        importExcelUrl: 'tooling/storage/importExcel',
        exportXlsUrl: '/tooling/storage/exportXls',
        takeBack: '/tooling/storage/takeBack',
        importExcelUrl: '/tms/inboundOrder/importExcel',
        exportXlsUrl: '/tms/inboundOrder/exportXls',
        edit:'/tms/inboundOrder/edit',
        submit:'/tms/inboundOrder/submit'
      },
@@ -171,6 +170,7 @@
          scopedSlots: { customRender: 'action' },
        },
      ],
      loading:false
    }
  },
  computed: {
@@ -190,23 +190,28 @@
      return {
        on: {
          click: (e) => {
            //将当前选中的记录传到子页面
            this.$bus.$emit('getToolingStorageData', record)
            this.onSelectChange(record.id.split(","), [record]);
            //点击当前行变色
            let oldList = document.querySelectorAll('.checked-td-of-add-table')
            if (oldList) {
              for (let j = 0; j < oldList.length; j++) {
                oldList[j].classList.remove('checked-td-of-add-table')
              }
            }
            let children = e.target.parentNode.children
            for (let i = 0; i < children.length; i++) {
              children[i].classList.add('checked-td-of-add-table')
            }
            // let oldList = document.querySelectorAll('.checked-td-of-add-table')
            // if (oldList) {
            //   for (let j = 0; j < oldList.length; j++) {
            //     oldList[j].classList.remove('checked-td-of-add-table')
            //   }
            // }
            // let children = e.target.parentNode.children
            // for (let i = 0; i < children.length; i++) {
            //   children[i].classList.add('checked-td-of-add-table')
            // }
          },
        },
      }
    },
    onSelectChange(selectedRowKeys, selectionRows) {
        this.selectedRowKeys = selectedRowKeys;
        this.selectionRows = selectionRows;
        //将当前选中的记录传到子页面
        this.$bus.$emit('getToolingStorageData', this.selectionRows[0])
      },
    handleEdit: function (record) {
        this.$refs.modalForm.edit(record)
        this.$refs.modalForm.title = '编辑'
@@ -219,6 +224,7 @@
    },
    handleSubmit(record) {
        let that = this;
        that.loading = true
        getAction(that.url.submit, { id:record.id}).then((res) => {
          if (res.success) {
            that.$message.success(res.message);
@@ -226,6 +232,8 @@
          } else {
            that.$message.warning(res.message);
          }
        }).finally(() => {
          that.loading = false
        })
      },
  },