龚焕茏
2024-04-17 6336e782cdc1eb27ee7fb0dfbf27c909e02d9453
工单事后报备:新增点位id
3个文件已修改
30 ■■■■ 已修改文件
src/api/platform/work-order.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/work-order/distribute/index.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/work-order/index.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/platform/work-order.js
@@ -28,9 +28,9 @@
}
// 下发选择工单
export function selectedIdsDistribute(data, unitId) {
export function selectedIdsDistribute(data) {
  return request({
    url: '/work-order/distribute/ids' + '?unitId=' + unitId,
    url: '/work-order/distribute/ids',
    method: 'post',
    data: data
  })
src/views/system/work-order/distribute/index.vue
@@ -112,6 +112,7 @@
            reserve-keyword
            placeholder="请选择来源"
            :remote-method="remoteGetPoints"
            @change="setPointId"
            :loading="selectLoading">
            <el-option
              v-for="item in pointList"
@@ -146,6 +147,10 @@
  name: 'index',
  data() {
    return {
      selectedIdsDistributeForm: {
        ids: [],
        unitId: null
      },
      unitList: [],
      settingForm: {
        // 离线
@@ -243,6 +248,10 @@
    },
  },
  methods: {
    setPointId(selectedValue) {
      const selectedItem = this.pointList.find(item => item.value === selectedValue);
      this.form.pointId = selectedItem.id
    },
    submitSetting() {
      this.$refs['settingForm'].validate((valid) => {
        if (valid) {
@@ -278,7 +287,8 @@
    },
    // 全部下发
    allDistribute() {
      selectedIdsDistribute([], this.unitId).then(res => {
      this.selectedIdsDistributeForm.unitId = this.unitId
      selectedIdsDistribute(this.selectedIdsDistributeForm).then(res => {
        this.$message.success("工单下发成功")
        this.page();
      })
@@ -304,8 +314,11 @@
        this.$message.warning("请先选择要下发的工单")
        return
      } 
      selectedIdsDistribute(this.multipleSelection, this.unitId).then(res => {
      this.selectedIdsDistributeForm.unitId = this.unitId;
      this.selectedIdsDistributeForm.ids = this.multipleSelection;
      selectedIdsDistribute(this.selectedIdsDistributeForm).then(res => {
        this.$message.success("工单下发成功")
        this.selectedIdsDistributeForm.ids = [];
        this.page();
      })
    },
src/views/system/work-order/index.vue
@@ -102,8 +102,8 @@
    <!-- 事后报备 -->
    <el-dialog title="事后报备" :visible.sync="reportOpen" width="600px" append-to-body>
      <el-form ref="reportForm" :model="reportForm" :rules="reportFormRules" label-width="80px">
        <el-form-item label="点位" prop="pointId">
          <el-input v-model="reportForm.pointId" disabled />
        <el-form-item label="点位" prop="source">
          <el-input v-model="reportForm.source" disabled />
        </el-form-item>
        <el-form-item label="报备类型">
          <el-input v-model="reportForm.reportType" disabled />
@@ -403,7 +403,7 @@
        if (valid) {
          addReport(this.reportForm).then(response => {
            this.$modal.msgSuccess("成功提交报备");
            this.open = false;
            this.reportOpen = false;
            this.getList();
          });
        }
@@ -411,7 +411,8 @@
    },
    // 事后报备按钮
    handleReport(row) {
      this.reportForm.pointId = row.source;
      this.reportForm.pointId = row.pointId;
      this.reportForm.source = row.source;
      this.reportOpen = true;
    },
    // 审核按钮