cuilei
2025-06-05 d143229425261196520641bff9d2aaf14bfe9013
src/views/tms/modules/outBound/OutboundOrderModal.vue
@@ -75,7 +75,8 @@
      </a-form-model>
    </a-spin>
    <a-button v-show="selectBorrowTool" type="primary" :style="{ marginBottom: '8px' }" @click="selectOutBoundTool">选择出库工具</a-button>
    <a-button v-show="selectBorrowTool" type="primary" :style="{ marginBottom: '8px' }" @click="selectBorrowOutBoundTool">选择出库工具</a-button>
    <a-button v-show="selectSharpenTool" type="primary" :style="{ marginBottom: '8px' }" @click="selectSharpenOutBoundTool">选择刃磨工具</a-button>
    <a-table
      ref="table"
      size="middle"
@@ -111,7 +112,8 @@
      <a-button @click="handleOk" :disabled="isDisabled" type="primary">确定</a-button>
    </template>
    <j-select-outbound-tool-modal ref="selectOutBoundToolModal"></j-select-outbound-tool-modal>
    <j-select-borrow-outbound-tool-modal ref="selectBorrowOutBoundToolModal"></j-select-borrow-outbound-tool-modal>
    <j-select-sharpen-outbound-tool-modal ref="selectSharpenOutBoundToolModal"></j-select-sharpen-outbound-tool-modal>
  </j-modal>
</template>
@@ -121,7 +123,8 @@
  import { httpAction } from '@/api/manage'
  import { validateDuplicateValue } from '@/utils/util'
  import OutboundDetailList from '../../OutboundDetailList.vue'
  import JSelectOutboundToolModal from './JSelectOutboundToolModal.vue'
  import JSelectBorrowOutboundToolModal from './JSelectBorrowOutboundToolModal.vue'
  import JSelectSharpenOutboundToolModal from './JSelectSharpenOutboundToolModal.vue'
  import { getAction } from '../../../../api/manage'
  import title from 'ant-design-vue/lib/skeleton/Title'
@@ -129,7 +132,8 @@
    name: "OutboundOrderModal",
    components: {
      OutboundDetailList,
      JSelectOutboundToolModal
      JSelectBorrowOutboundToolModal,
      JSelectSharpenOutboundToolModal
    },
    data () {
      return {
@@ -140,6 +144,7 @@
        isDisabled: false,
        addShow: true,
        selectBorrowTool: false,
        selectSharpenTool: false,
        model:{
        },
        labelCol: {
@@ -264,15 +269,23 @@
      handleTypeChange(value) {
        if (value === '1') {
          this.selectBorrowTool = true
          this.selectSharpenTool = false
          this.dataSource = []
        }
        if (value === '2') {
          this.selectBorrowTool = false
          this.selectSharpenTool = false
          this.dataSource = []
        }
        if (value === '3') {
          this.selectBorrowTool = false
          this.selectSharpenTool = false
          this.dataSource = []
        }
        if (value === '4') {
          this.selectBorrowTool = false
          this.selectSharpenTool = true
          this.dataSource = []
        }
      },
      handleDelete(record, index) {
@@ -296,7 +309,7 @@
          this.dataSource = temp
        }
      },
      selectOutBoundTool() {
      selectBorrowOutBoundTool() {
        console.log(this.dataSource)
        let ids = ''
        if (this.title === '新增') {
@@ -305,7 +318,18 @@
        if (this.title === '编辑') {
         ids = this.dataSource.map(item => item.toolLedgerDetailId).join(',')
        }
        this.$refs.selectOutBoundToolModal.showOrderModal(ids)
        this.$refs.selectBorrowOutBoundToolModal.showOrderModal(ids)
      },
      selectSharpenOutBoundTool() {
        console.log(this.dataSource)
        let ids = ''
        if (this.title === '新增') {
          ids = this.dataSource.map(item => item.id).join(',')
        }
        if (this.title === '编辑') {
          ids = this.dataSource.map(item => item.toolSharpeningId).join(',')
        }
        this.$refs.selectSharpenOutBoundToolModal.showOrderModal(ids)
      },
      add () {
        this.addShow = false
@@ -344,6 +368,7 @@
        this.$emit('close');
        this.addShow = true
        this.selectBorrowTool = false
        this.selectSharpenTool = false
        this.visible = false;
        this.$refs.form.clearValidate();
      },