huminmin
7 天以前 b72742d84cb92e1dd78160898a3d534a2177409e
Merge branch 'dev_NEW_pro' of http://114.132.189.42:9002/r/product-inventory-management into dev_NEW_pro
已修改2个文件
47 ■■■■■ 文件已修改
src/views/productionManagement/productionProcess/index.vue 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/salesQuotation/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productionProcess/index.vue
@@ -285,7 +285,7 @@
</template>
<script setup>
  import { ref, reactive, onMounted } from "vue";
  import { ref, reactive, computed, onMounted } from "vue";
  import { ElMessage, ElMessageBox } from "element-plus";
  import { Plus, Edit, Delete, Search } from "@element-plus/icons-vue";
  import PIMTable from "@/components/PIMTable/PIMTable.vue";
@@ -310,8 +310,19 @@
  const processLoading = ref(false);
  const deviceOptions = ref([]);
  // 参数列表数据
  const paramList = ref([]);
  // 工序已选参数表格分页(接口一次返回全量)
  const paramPage2 = ref({
    current: 1,
    size: 10,
    total: 0,
  });
  const paramListRaw = ref([]);
  const paramList = computed(() => {
    const all = paramListRaw.value;
    const { current, size } = paramPage2.value;
    const start = (current - 1) * size;
    return all.slice(start, start + size);
  });
  const paramLoading = ref(false);
  // 数据字典
@@ -482,21 +493,21 @@
    }
  };
  const paramPage2 = ref({
    current: 1,
    size: 10,
    total: 0,
  });
  // 获取参数列表
  const getParamList = processId => {
    paramLoading.value = true;
    console.log(paramPage2.value, "paramPage2.value");
    getProcessParamList({ technologyOperationId: processId })
      .then(res => {
        console.log(res, "res");
        paramList.value = res.data || [];
        paramPage2.value.total = 0;
        const list = res.data || [];
        paramListRaw.value = Array.isArray(list) ? list : [];
        paramPage2.value.total = paramListRaw.value.length;
        const maxPage = Math.max(
          1,
          Math.ceil(paramPage2.value.total / paramPage2.value.size) || 1
        );
        if (paramPage2.value.current > maxPage) {
          paramPage2.value.current = maxPage;
        }
      })
      .catch(() => {
        ElMessage.error("获取参数列表失败");
@@ -509,6 +520,7 @@
  // 选择工序
  const selectProcess = process => {
    selectedProcess.value = process;
    paramPage2.value.current = 1;
    getParamList(process.id);
  };
@@ -553,7 +565,8 @@
          getProcessList();
          if (selectedProcess.value?.id === process.id) {
            selectedProcess.value = null;
            paramList.value = [];
            paramListRaw.value = [];
            paramPage2.value.total = 0;
          }
        })
        .catch(() => {
@@ -741,10 +754,8 @@
  };
  const handleParamPagination = obj => {
    console.log(obj, "obj");
    paramPage2.value.current = obj.page;
    paramPage2.value.size = obj.limit;
    getParamList(selectedProcess.value.id);
  };
  // 获取数据字典
src/views/salesManagement/salesQuotation/index.vue
@@ -300,7 +300,6 @@
import Pagination from '@/components/PIMTable/Pagination.vue'
import FormDialog from '@/components/Dialog/FormDialog.vue'
import {getQuotationList,addQuotation,updateQuotation,deleteQuotation} from '@/api/salesManagement/salesQuotation.js'
import {customerList} from "@/api/salesManagement/salesLedger.js";
import {modelList, productTreeList} from "@/api/basicData/product.js";
import {listCustomer} from "@/api/basicData/customer.js";
import { userListNoPage } from "@/api/system/user.js";
@@ -316,7 +315,7 @@
const quotationList = ref([])
const userList = ref([])
const productOptions = ref([]);
const modelOptions = ref([]);
const modelOptions  = ref([]);
const pagination = reactive({
  total: 3,
  currentPage: 1,
@@ -791,6 +790,7 @@
onMounted(()=>{
  getUserList()
  handleSearch()
  fetchCustomerOptions()
})
</script>