gaoluyang
16 小时以前 febea618511ccf304fed635045f018032f620ba9
Merge remote-tracking branch 'origin/dev_New' into dev_New
已修改2个文件
73 ■■■■■ 文件已修改
src/views/productionManagement/productionCosting/index.vue 63 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/qualityManagement/nonconformingManagement/index.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionCosting/index.vue
@@ -4,12 +4,28 @@
            <!-- 左侧台账 + 顶部筛选 -->
            <div class="left-panel">
                <div class="left-header">
                    <!-- <div class="left-title">生产台账</div> -->
                    <el-radio-group v-model="dateType" size="small" @change="handleDateTypeChange">
                        <el-radio-button label="day">日</el-radio-button>
                        <el-radio-button label="month">月</el-radio-button>
                    </el-radio-group>
          <el-form :model="searchForm" inline>
            <el-form-item prop="dateType">
              <el-radio-group v-model="searchForm.dateType" size="small" @change="handleDateTypeChange">
                <el-radio-button label="day">日</el-radio-button>
                <el-radio-button label="month">月</el-radio-button>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="日期:" prop="dateRange">
              <el-date-picker
                  v-model="searchForm.dateRange"
                  :type="searchForm.dateType === 'day' ? 'date' : 'daterange'"
                  range-separator="至"
                  start-placeholder="开始日期"
                  end-placeholder="结束日期"
                  format="YYYY-MM-DD"
                  value-format="YYYY-MM-DD"
                  style="width: 300px"
                  @change="handleDateRangeChange"
              />
            </el-form-item>
          </el-form>
                </div>
                <PIMTable
                    rowKey="id"
@@ -139,7 +155,6 @@
const tableLoading1 = ref(false);
const leftTableData = ref([]);
// 日 / 月 切换(默认按日)
const dateType = ref("day");
const page = reactive({
    current: 1,
    size: 100,
@@ -156,6 +171,8 @@
    searchForm: {
        schedulingUserName: "",
        salesContractNo: "",
    dateType: "day",
    dateRange: undefined,
        entryDate: [
            dayjs().format("YYYY-MM-DD"),
            dayjs().add(1, "day").format("YYYY-MM-DD"),
@@ -178,21 +195,26 @@
    getList1();
};
const changeDaterange = (value) => {
const handleDateRangeChange = (value) => {
    if (value) {
        searchForm.value.entryDateStart = dayjs(value[0]).format("YYYY-MM-DD");
        searchForm.value.entryDateEnd = dayjs(value[1]).format("YYYY-MM-DD");
    if (searchForm.value.dateType === "day") {
      searchForm.value.entryDate = value;
    } else {
      searchForm.value.entryDateStart = dayjs(value[0]).format("YYYY-MM-DD");
      searchForm.value.entryDateEnd = dayjs(value[1]).format("YYYY-MM-DD");
    }
    } else {
        searchForm.value.entryDate = undefined;
        searchForm.value.entryDateStart = undefined;
        searchForm.value.entryDateEnd = undefined;
    }
    handleQuery();
  reloadData()
};
const getList = () => {
    tableLoading.value = true;
    const params = { ...searchForm.value, ...page };
    params.dateType = dateType.value;
    params.entryDate = undefined
  salesLedgerProductionAccountingList(params).then((res) => {
        tableLoading.value = false;
@@ -239,11 +261,20 @@
// 左侧日/月切换
const handleDateTypeChange = () => {
    // 这里只作为筛选条件的一部分,直接重新查询列表
  page.current = 1;
    getList();
  handleQuery()
  searchForm.value.dateRange = undefined;
  searchForm.value.entryDate = undefined;
  searchForm.value.entryDateStart = undefined;
  searchForm.value.entryDateEnd = undefined;
  reloadData()
};
const reloadData = () => {
  page.current = 1;
  page1.current = 1;
  getList();
  tableData.value = []
}
// 点击左侧行,刷右侧明细(按生产人过滤)
const handleLeftRowClick = (row) => {
    searchForm.value.schedulingUserName = row.schedulingUserName || "";
src/views/qualityManagement/nonconformingManagement/index.vue
@@ -177,16 +177,8 @@
    label: "操作",
    align: "center",
    fixed: "right",
    width: 120,
    width: 100,
    operation: [
      {
        name: "编辑",
        type: "text",
        clickFun: (row) => {
          openForm("edit", row);
        },
        disabled: (row) => row.inspectState === 1,
      },
      {
        name: "处理",
        type: "text",