qushaowei
2024-01-11 52b10180d77f2962e519300469811a911afa3cf2
src/views/eam/modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue
@@ -107,9 +107,9 @@
              </a-col>
            </a-row>
            <a-row :gutter="24">
              <a-col :span="24">
              <a-col :span="17">
                <a-form-item
                  label="问题及处理措施描述"
                  label="问题/处理措施"
                  :labelCol="{span:3}"
                  :wrapperCol="{span:18}"
                  class="hightColor"
@@ -119,6 +119,21 @@
                    :disabled="this.model.status!='4'"
                    :placeholder="'请输入问题及处理措施描述'"
                    v-model="model.description"
                  />
                </a-form-item>
              </a-col>
              <a-col :span="7">
                <a-form-item
                  label="报工人"
                  :labelCol="{span:4}"
                  :wrapperCol="{span:17}"
                  class="hightColor"
                >
                  <a-input
                    :disabled="this.model.status!='4'"
                    allow-clear
                    placeholder="请输入报工人"
                    v-model="model.maintenanceUserId"
                  />
                </a-form-item>
              </a-col>
@@ -417,11 +432,11 @@
          }
        },
        {
          title: '部位',
          align: 'center',
          dataIndex: 'location',
        },
        // {
        //   title: '部位',
        //   align: 'center',
        //   dataIndex: 'location',
        // },
        // class: "notshow"
        // {
        //   title: '示意图',
@@ -431,15 +446,15 @@
        // },
        // class: "notshow"
        {
          title: '保养项目',
          title: '保养内容',
          align: 'center',
          dataIndex: 'maintenanceProjectNum',
        },
        {
          title: '保养标准',
          align: 'center',
          dataIndex: 'standard',
        },
        // {
        //   title: '保养标准',
        //   align: 'center',
        //   dataIndex: 'standard',
        // },
        // {
        //   title: '方法',
        //   align: 'center',
@@ -599,13 +614,31 @@
    handleReport() {
      const that = this;
      that.confirmLoading = true;
      for (let i = 0; i < that.dataSource.length; i++) {
        let o = this.dataSource[i]
        if (o.maintenanceOrderDetailUda2 == null || o.maintenanceOrderDetailUda2 == '') {
          that.$message.warning("请填写第" + (i + 1) + "执行情况!");
          that.confirmLoading = false;
          return
        }
        if (o.maintenanceOrderDetailUda1 == null || o.maintenanceOrderDetailUda1 == '') {
          that.$message.warning("请填写第" + (i + 1) + "保养人!");
          that.confirmLoading = false;
          return
        }
      }
      if (that.model.maintenanceUserId == null || that.model.maintenanceUserId == "") {
        that.$message.warning("请填写报工人!");
        that.confirmLoading = false;
        return
      }
      this.$confirm({
        title: '保养工单报工',
        content: '提示:报工后保养完工,请谨慎操作!',
        okText: '确认',
        cancelText: '取消',
        onOk() {
          requestPut(that.url.report, { id: that.model.id, status: '5', description: that.model.description }).then((res) => {
          requestPut(that.url.report, { id: that.model.id, status: '5', description: that.model.description, dailyMaintenanceOrderDetails: that.dataSource, maintenanceUserId: that.model.maintenanceUserId }).then((res) => {
            if (res.success) {
              that.model.status = '5'
              that.$message.success(res.message)
@@ -657,6 +690,19 @@
    handleOk() {
      const that = this
      this.loading = true;
      for (let i = 0; i < that.dataSource.length; i++) {
        let o = this.dataSource[i]
        if (o.maintenanceOrderDetailUda2 == null || o.maintenanceOrderDetailUda2 == '') {
          that.$message.warning("请填写第" + (i + 1) + "执行情况!");
          that.loading = false;
          return
        }
        if (o.maintenanceOrderDetailUda1 == null || o.maintenanceOrderDetailUda1 == '') {
          that.$message.warning("请填写第" + (i + 1) + "保养人!");
          that.loading = false;
          return
        }
      }
      this.form.validateFields((err, values) => {
        if (!err) {
          that.confirmLoading = true