Houjie
2025-05-26 c3f9133f259abacf02ae5acb2e5b4352f40d9b22
src/views/tms/requirement/modules/ToolsSharpeningModal.vue
@@ -45,7 +45,7 @@
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-model-item prop="operator" label="责任人">
            <a-form-model-item prop="responsiblePerson" label="责任人">
              <j-dict-select-tag type="list" v-model="model.responsiblePerson" dictCode="sys_user,realname,id"
                                 placeholder="请选择责任人" :disabled="disableSubmit" />
            </a-form-model-item>
@@ -97,10 +97,15 @@
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="24">
            <a-form-model-item label="备注" :labelCol="{span:2}" :wrapperCol="{span:21}" prop="remark">
          <a-col :span="12">
            <a-form-model-item label="存储位置" prop="storageLocation">
              <a-input placeholder="选择填写存储位置" v-model="model.positionCode" readOnly
                       :disabled="disableSubmit" />
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="备注">
              <a-textarea v-model="model.remark" rows="3" placeholder="请输入备注" :disabled="disableSubmit" />
            </a-form-model-item>
          </a-col>
@@ -121,7 +126,7 @@
</template>
<script>
import { getAction, httpAction, postAction, requestPut } from '@/api/manage'
import { getAction, postAction, requestPut } from '@/api/manage'
import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js'
import ToolsModal from '@views/tms/requirement/modules/ToolsModal.vue'
@@ -153,16 +158,12 @@
        sharpeningTime: [
          { required: true, message: '请选择刃磨日期!' }
        ],
        responsibleRerson: [
        responsiblePerson: [
          { required: true, message: '请选择责任人!' }
        ],
        sharpeningResult: [
          { required: true, message: '请输入刃磨结果及建议!' }
        ],
        responsiblePerson: [
          { required: true, message: '请选择责任人!' }
        ]
      },
      url: {
        add: '/tms/toolSharpening/add',
@@ -208,7 +209,7 @@
    edit(record) {
      console.log(record)
      this.model = Object.assign({}, record)
      // this.model = Object.assign({}, record)
      this.visible = true
      getAction(this.url.queryDetailList, {
        id: record.id,
@@ -216,8 +217,17 @@
        pageSize: 99999
      }).then((res) => {
        if (res.success) {
          console.log(res.result.records)
          this.dataSource = res.result.records
          const readOnlyData = res.result.records[0] || {}
          this.model = Object.assign({}, this.model, {
            paramaTableName: readOnlyData.paramaTableName_dictText,
            applicationType: readOnlyData.applicationType_dictText,
            provinceCity: readOnlyData.provinceCity,
            warehouseId: readOnlyData.warehouseId,
            positionCode: readOnlyData.positionCode,
            mainUnit: readOnlyData.mainUnit,
            toolModel: readOnlyData.toolModel
          })
        } else {
          this.dataSource = null
        }