zhang_12370
5 天以前 e48fff7164866d4afb3ec54b587de2c8c25e48de
上传采购管理登记人修改为用户昵称并匹配字段
已修改3个文件
15 ■■■■■ 文件已修改
src/views/procureMent/components/ProductionDialog.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procureMent/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/production/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procureMent/components/ProductionDialog.vue
@@ -96,7 +96,7 @@
          </el-input>
        </el-form-item>
        <el-form-item label="登记人" prop="registrantId">
          <el-input v-model="form.registrantId" disabled placeholder="请输入"/>
          <el-input :value="match(form.registrantId)" v-model.number="form.registrantId" disabled placeholder="请输入"/>
        </el-form-item>
        <el-form-item label="登记日期" prop="registrationDate">
          <el-date-picker
@@ -243,7 +243,9 @@
const userStore = useUserStore();
const userInfo = ref({});
const match = () => {
  return userInfo.value.nickName || "未知用户";
};
// 处理税率输入框失焦,确保精度
const handleTaxRateBlur = () => {
  if (
@@ -285,8 +287,9 @@
onMounted(async () => {
  let res = await userStore.getInfo();
  userInfo.value = res;
  userInfo.value = res.user;
  getDropdownData()
});
const rules = {
  supplierName: [
src/views/procureMent/index.vue
@@ -196,18 +196,18 @@
    // 触发ref里面的方法
    return;
  }
  console.log(userInfo.value)
  // 新建时初始化表单
  form.value = {
    supplierName: "",
    coal: "",
    unit: "吨",
    purchaseQuantity: "",
    priceExcludingTax: "",
    totalPriceExcludingTax: "",
    priceIncludingTax: "",
    totalPriceIncludingTax: "",
    taxRate: "",
    registrantId: userInfo.value.userName,
    registrantId: userInfo.value.userId,
    registrationDate: new Date().toISOString().split("T")[0],
  };
  // 新建时也需要设置 copyForm 用于重置功能
src/views/production/index.vue
@@ -216,7 +216,7 @@
.search-form {
  display: flex;
  justify-content: space-between;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 20px;