“linengliang”
2023-08-21 5a5042a11af0b8ec07ac74c99a014748ccf9b31c
src/views/spare/modules/sparePartCancellingStocks/SparePartCancellingStocksModal.vue
@@ -19,6 +19,7 @@
              :wrapperCol='wrapperCol'
            >
              <a-input
                :disabled="disableSubmit"
                placeholder='请输单据号'
                v-decorator="['num', validatorRules.num]"
              />
@@ -38,10 +39,19 @@
                dictCode="sys_depart,depart_name,id,del_flag!='1'"
                v-decorator="['departId', validatorRules.departId]"
              />-->
              <a-select
<!--              <a-select
                :placeholder="'请选择领用部门'"
                :options="this.departs"
                :disabled="disableSubmit"
                style="width: 100%"
                v-model='model.departId'
              />-->
              <a-tree-select
                style="width: 100%"
                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                :tree-data="treeData"
                placeholder="请选择领用部门"
                tree-default-expand-all
                v-model='model.departId'
              />
            </a-form-item>
@@ -88,6 +98,7 @@
      type='primary'
      :style="{ marginRight: '8px',marginBottom:'8px' }"
      :loading='confirmLoading'
      :disabled="disableSubmit"
      @click='selectSparePartInventory()'
    >增加备件库存信息
    </a-button>
@@ -108,6 +119,7 @@
        <div :key='col.dataIndex'>
          <a-input-number
            :value='text'
            :disabled="disableSubmit"
            v-if="col.dataIndex == 'mainQuantity'"
            :min='0'
            :max='record.outboundMainQuantity'
@@ -123,6 +135,7 @@
      >
        <a-popconfirm
          title='确定删除吗?'
          :disabled="disableSubmit"
          @confirm='() => handleDelete(text,record, index)'
        >
          <a>删除</a>
@@ -140,6 +153,7 @@
      <a-button
        @click='handleOk()'
        type='primary'
        :disabled="disableSubmit"
        :loading='confirmLoading'
      >确定
      </a-button>
@@ -166,6 +180,7 @@
  data() {
    return {
      departId:[],
      treeData:[],
      columns: [
        {
          title: '#',
@@ -304,6 +319,7 @@
      url: {
        add: '/spare/sparePartCancellingStocks/add',
        getSysDeparts: "/eam/equipment/getSysDeparts",
        loadOptions: '/sys/sysDepart/loadDepartTreeOptions',
        edit: '/spare/sparePartCancellingStocks/edit'
      },
@@ -344,10 +360,18 @@
    })
  },
  created() {
    this.getSysDeparts()
  },
  methods: {
    initOptions() {
      getAction(this.url.loadOptions).then(res => {
        if (res.success) {
          this.treeData = res.result
        } else {
          this.$message.warning(res.message)
        }
      })
    },
    getSysDeparts() {
      getAction(this.url.getSysDeparts).then((res) => {
        if (res.success) {
@@ -381,6 +405,7 @@
      that.form.resetFields()
      that.model = Object.assign({}, record)
      that.visible = true
      that.initOptions()
      that.warehouseId = record.warehouseId
      if (record.sparePartCancellingStocksDetailList != undefined) {
        const temp = [...record.sparePartCancellingStocksDetailList]