sen
4 天以前 66026cb727dfee50700d7ed3e54fd1c44fc3bab8
修改调度单委托报关卸货,多选,增加作废
6个文件已修改
207 ■■■■ 已修改文件
ui/admin-ui3/src/api/tms/tmsApBill.ts 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ui/admin-ui3/src/api/tms/tmsArBill.ts 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ui/admin-ui3/src/api/tms/tmsDispatchOrder.ts 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ui/admin-ui3/src/views/tms/tmsApBill/index.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ui/admin-ui3/src/views/tms/tmsArBill/index.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ui/admin-ui3/src/views/tms/tmsDispatchOrder/index.vue 138 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ui/admin-ui3/src/api/tms/tmsApBill.ts
@@ -103,4 +103,13 @@
        method:'get',
         params: query
    })
}
}
/**
 * 作废应付账单
 */
export const tmsApBillCancelPush: requestType = (id) => {
    return request({
        url: '/tms/tmsApBill/cancelPush/' + id,
        method: 'post',
    })
}
ui/admin-ui3/src/api/tms/tmsArBill.ts
@@ -120,4 +120,14 @@
        method:'get',
        params:query
    })
}
/**
 * 作废
 */
export const tmsArBillCancelPush: requestType = (id) => {
    return request({
        url: '/tms/tmsArBill/cancelPush/' + id,
        method: 'post',
    })
}
ui/admin-ui3/src/api/tms/tmsDispatchOrder.ts
@@ -260,6 +260,8 @@
        data
    })
}
export const loadingOrder: requestType = (data) => {
    return request({
        url: '/tms/tmsDispatchOrder/loadingOrder',
@@ -267,7 +269,6 @@
        data
    })
}
/**
 * 导出调度单管理
ui/admin-ui3/src/views/tms/tmsApBill/index.vue
@@ -32,6 +32,10 @@
        <el-link size="small" type="primary" v-if="row.pushStatus == 3 || row.pushStatus == 4|| row.pushStatus == 0"
          @click="handleManualPush(row)" class="link-btn" underline="never" icon="el-icon-upload">手动推送
        </el-link>
           <el-link size="small" type="primary" v-if="[0, 2].includes(row.status)" @click="handleClose(row)"
            class="link-btn" v-hasPermi="['tms:tmsApBill:closeOrder']" underline="never" icon="el-icon-close">
            作废
          </el-link>
        <el-link size="small" type="primary" v-if="row.status == 0" @click="handleEdit(row)" class="link-btn"
          :underline="false" icon="el-icon-edit">账单确认
        </el-link>
@@ -132,7 +136,7 @@
  exportTmsApBill,
  getTmsApBill,
  listTmsApBill,
  updateTmsApBill, manualPushTmsApBill,getPayableAuditLog
  updateTmsApBill, manualPushTmsApBill,getPayableAuditLog,tmsApBillCancelPush
} from "@/api/tms/tmsApBill";
import useCurrentInstance from "@/utils/useCurrentInstance";
import { computed, reactive, ref, toRefs } from "vue";
@@ -470,4 +474,21 @@
  })
}
const handleClose = (row: any) => {
  ElMessageBox.confirm("是否对应付账单" + row.systemNo + "进行作废?", '系统提示', {
    confirmButtonText: '确定',
    cancelButtonText: '取消',
    type: 'warning'
  }).then(() => {
    return tmsApBillCancelPush(row.id);
  }).then(() => {
    onLoad(page.value);
    ElMessage({
      message: "操作成功!",
      type: 'success'
    })
  });
}
</script>
ui/admin-ui3/src/views/tms/tmsArBill/index.vue
@@ -47,6 +47,10 @@
        <el-link size="small" type="primary" @click="handleEdit(row)" class="link-btn" underline="never"
          icon="el-icon-edit">修改
        </el-link>
           <el-link size="small" type="primary" v-if="[0, 2].includes(row.status)" @click="handleClose(row)"
            class="link-btn" v-hasPermi="['tms:tmsArBill:closeOrder']" underline="never" icon="el-icon-close">
            作废
          </el-link>
        <el-link size="small" type="primary" @click="handleLog(row)" class="link-btn" underline="never"
          icon="el-icon-tickets">日志
        </el-link>
@@ -144,7 +148,7 @@
  getTmsArBill,
  listTmsArBill,
  updateTmsArBill, cancelArBill,
  exportArBillFormat,manualPushTmsArBill,listReceivableAuditLog
  exportArBillFormat,manualPushTmsArBill,listReceivableAuditLog,tmsArBillCancelPush
} from "@/api/tms/tmsArBill";
import useCurrentInstance from "@/utils/useCurrentInstance";
import { computed, reactive, ref, toRefs } from "vue";
@@ -535,5 +539,19 @@
  })
}
const handleClose = (row: any) => {
  ElMessageBox.confirm("是否对应收账单" + row.systemNo + "进行作废?", '系统提示', {
    confirmButtonText: '确定',
    cancelButtonText: '取消',
    type: 'warning'
  }).then(() => {
    return tmsArBillCancelPush(row.id);
  }).then(() => {
    onLoad(page.value);
    ElMessage({
      message: "操作成功!",
      type: 'success'
    })
  });
}
</script>
ui/admin-ui3/src/views/tms/tmsDispatchOrder/index.vue
@@ -23,7 +23,8 @@
          <span>{{ dictFormat(order_type, row?.orderType || form?.orderType) }}</span>
        </template>
        <template v-else>
          <el-select v-model="form.orderType" placeholder="请选择订单类型"  @change="(val) => handleOrderTypeChange(val)" style="width: 100%" clearable>
          <el-select v-model="form.orderType" placeholder="请选择订单类型" @change="(val) => handleOrderTypeChange(val)"
            style="width: 100%" clearable>
            <el-option v-for="item in order_type" :key="item.value" :label="item.label" :value="parseInt(item.value)" />
          </el-select>
        </template>
@@ -78,11 +79,10 @@
        <el-button type="primary" icon="Male" :disabled="pageF.single" @click="handleConnectHang"
          v-hasPermi="['tms:tmsDispatchOrder:connectHang']">接挂
        </el-button>
        <el-button type="warning" icon="Avatar" :disabled="!(isCustoms == 0)" @click="handleCustoms"
        <el-button type="warning" icon="Avatar" :disabled="selectionList.length === 0" @click="handleCustoms"
          v-hasPermi="['tms:tmsDispatchOrder:customs']">委托报关信息
        </el-button>
        <el-button type="primary" icon="UserFilled" :disabled="!(isLoad == 0)" @click="handleLoading"
        <el-button type="primary" icon="UserFilled" :disabled="selectionList.length === 0" @click="handleLoading"
          v-hasPermi="['tms:tmsDispatchOrder:loading']">委托卸货信息
        </el-button>
        <el-button type="primary" icon="UserFilled" :disabled="pageF.single" @click="handleZZ"
@@ -299,26 +299,40 @@
      </div>
      <div v-if="optionType == 'customs'">
        <el-descriptions style="margin-bottom: 20px" :column="2" border>
        <el-descriptions v-if="optionNum == 'radio'" style="margin-bottom: 20px" :column="2" border>
          <el-descriptions-item label="调度单号">{{ form.dispatchNo }}</el-descriptions-item>
          <el-descriptions-item label="客户">{{ form.customerName }}</el-descriptions-item>
          <el-descriptions-item label="项目名称">{{ form.projectName }}</el-descriptions-item>
          <el-descriptions-item label="运输路线">{{ form.transportLine }}</el-descriptions-item>
        </el-descriptions>
        <el-table v-if="optionNum == 'checkbox'" :data="clearanceList" border size="small"
          style="width: 100%; margin-bottom: 20px">
          <el-table-column prop="dispatchNo" label="调度单号" width="150" />
          <el-table-column prop="customerName" label="客户" min-width="120" show-overflow-tooltip />
          <el-table-column prop="projectName" label="项目名称" min-width="120" show-overflow-tooltip />
          <el-table-column prop="transportLine" label="运输路线" min-width="150" show-overflow-tooltip />
        </el-table>
        <avue-form v-model="form" ref="boxFormRef" :option="boxFormOption">
        </avue-form>
      </div>
      <div v-if="optionType == 'loading'">
        <el-descriptions style="margin-bottom: 20px" :column="2" border>
            <el-descriptions v-if="optionNum == 'radio'" style="margin-bottom: 20px" :column="2" border>
          <el-descriptions-item label="调度单号">{{ form.dispatchNo }}</el-descriptions-item>
          <el-descriptions-item label="客户">{{ form.customerName }}</el-descriptions-item>
          <el-descriptions-item label="项目名称">{{ form.projectName }}</el-descriptions-item>
          <el-descriptions-item label="运输路线">{{ form.transportLine }}</el-descriptions-item>
        </el-descriptions>
        <el-table v-if="optionNum == 'checkbox'" :data="clearanceList" border size="small"
          style="width: 100%; margin-bottom: 20px">
          <el-table-column prop="dispatchNo" label="调度单号" width="150" />
          <el-table-column prop="customerName" label="客户" min-width="120" show-overflow-tooltip />
          <el-table-column prop="projectName" label="项目名称" min-width="120" show-overflow-tooltip />
          <el-table-column prop="transportLine" label="运输路线" min-width="150" show-overflow-tooltip />
        </el-table>
        <avue-form v-model="form" ref="boxFormRef" :option="boxFormOption">
        </avue-form>
      </div>
      <template #footer>
@@ -665,7 +679,7 @@
  importTemplateTmsDispatchOrder, ypdddjSumbit,
  tmsTmsDispatchOrderImportLog,
  saveTmsFinanceDetail2,
  getLastLicensePlate
  getLastLicensePlate,
} from "@/api/tms/tmsDispatchOrder";
import useCurrentInstance from "@/utils/useCurrentInstance";
import { computed, onMounted, onBeforeUnmount, reactive, ref, toRefs, watch, getCurrentInstance, nextTick } from "vue";
@@ -3199,9 +3213,9 @@
  }
});
const zzItemsTableData = ref();
/* 报关列表 */
const clearanceList = ref([]);
const optionNum = ref(''); // 用于区分是报关还是装卸
const {
  tableData,
@@ -3237,6 +3251,7 @@
  },
  handleSelectionChangeFunc: (selection: any) => {
    selectionList.value = selection;
    clearanceList.value = selection;
    if (selection.length > 0) {
      isCustoms.value = selection[0].isCustoms;
      isLoad.value = selection[0].isLoad;
@@ -3538,11 +3553,24 @@
      pageF.isUploading = false;
    })
  } else if (optionType.value === 'customs') {
    customsOrder({
      id: form.value.id,
      customsServiceProviderId: form.value.customsServiceProviderId,
      customsServiceProviderName: form.value.customsServiceProviderName,
    }).then(res => {
    let result = <any>[];
    if (optionNum.value == 'checkbox') {
      result = clearanceList.value.map(item => {
        return {
          id: item.id,
          customsServiceProviderId: form.value.customsServiceProviderId,
          customsServiceProviderName: form.value.customsServiceProviderName
        };
      });
    }else if (optionNum.value == 'radio') {
      result = [{
        id: form.value.id,
        customsServiceProviderId: form.value.customsServiceProviderId,
        customsServiceProviderName: form.value.customsServiceProviderName
      }]
    }
    customsOrder(result).then(res => {
      ElMessage({
        message: "提交成功!",
        type: 'success'
@@ -3553,11 +3581,25 @@
      pageF.isUploading = false;
    })
  } else if (optionType.value === 'loading') {
    loadingOrder({
      id: form.value.id,
      loadingServiceProviderId: form.value.loadingServiceProviderId,
      loadingServiceProviderName: form.value.loadingServiceProviderName,
    }).then(res => {
       let result = <any>[];
    if (optionNum.value == 'checkbox') {
      result = clearanceList.value.map(item => {
        return {
          id: item.id,
          loadingServiceProviderId: form.value.loadingServiceProviderId,
          loadingServiceProviderName: form.value.loadingServiceProviderName
        };
      });
    }else if (optionNum.value == 'radio') {
      result = [{
        id: form.value.id,
        loadingServiceProviderId: form.value.loadingServiceProviderId,
        loadingServiceProviderName: form.value.loadingServiceProviderName
      }]
    }
    loadingOrder(result).then(res => {
      ElMessage({
        message: "提交成功!",
        type: 'success'
@@ -4194,17 +4236,32 @@
const handleCustoms = () => {
  title.value = '补充委托报关信息';
  open.value = true;
  form.value = selectionList.value[0];
  form.value = clearanceList.value[0];
  optionType.value = 'customs';
  optionNum.value = 'checkbox'
  boxFormOption.value = customsOption.value;
}
const handleCustomsAdd = (selectionList) => {
const handleCustomsAdd = (row) => {
  title.value = '补充委托装卸信息';
   clearanceList.value = [];
  // 2. 清除表格视觉上的选中状态
  if (crudRef.value) {
    crudRef.value.clearSelection();
  }
  // 3. 重置表单
  form.value = {};
  // 4. 将当前点击的行数据赋值给 form,用于弹窗编辑
  Object.assign(form.value, row);
  open.value = true;
  form.value = selectionList;
  optionType.value = 'loading';
  optionNum.value = 'radio';
  boxFormOption.value = loadingOption.value;
}
const handleLoading = () => {
@@ -4212,14 +4269,33 @@
  open.value = true;
  form.value = selectionList.value[0];
  optionType.value = 'loading';
  optionNum.value = 'checkbox'
  boxFormOption.value = loadingOption.value;
}
const handleLoadingAdd = (selectionList) => {
  title.value = '补充委托装卸信息';
const handleLoadingAdd = (row: any) => {
  // 1. 清空批量选中的数据列表,导致顶部按钮 disabled (length === 0)
  clearanceList.value = [];
  // 2. 清除表格视觉上的选中状态
  if (crudRef.value) {
    crudRef.value.clearSelection();
  }
  // 3. 重置表单
  form.value = {};
  // 4. 将当前点击的行数据赋值给 form,用于弹窗编辑
  Object.assign(form.value, row);
  // 5. 设置弹窗配置
  title.value = '补充委托报关信息';
  optionType.value = 'customs';
  optionNum.value = 'radio';
  boxFormOption.value = customsOption.value;
  // 6. 打开弹窗
  open.value = true;
  form.value = selectionList;
  optionType.value = 'loading';
  boxFormOption.value = loadingOption.value;
  // 【调试】此时打印,长度应为 0
}
const quotationItems = ref();
const getQuotationItems = async () => {
@@ -4959,7 +5035,7 @@
const handleOrderTypeChange = (value: any) => {
  // 防止 value 为 null 或 undefined 时出错 (当清空选择时)
  if (value === null || value === undefined) {
     return;
    return;
  }
  option.value.group.forEach((item: any) => {
@@ -4970,7 +5046,7 @@
          cItem.required = !(value == 1);
        });
      }
      // 处理卸货点必填规则
      if (item.column.receiverId && item.column.receiverId.rules) {
        item.column.receiverId.rules.forEach((cItem: any) => {