Add initial order details to selector
This commit is contained in:
@@ -158,6 +158,7 @@ select:focus, input:focus, textarea:focus { border-color: var(--blue); box-shado
|
||||
.select-field select, .parameter-input { width: 100%; height: 43px; padding: 0 12px; }
|
||||
.text-field { margin-top: 13px; }
|
||||
.text-field input { height: 44px; padding: 0 13px; }
|
||||
.project-notes textarea { min-height: 78px; padding: 11px 13px; resize: vertical; line-height: 1.55; }
|
||||
.field-group { margin: 17px 0 13px; }
|
||||
.pill-row { display: flex; gap: 7px; margin-top: 8px; }
|
||||
.pill-row button { flex: 1; padding: 10px 7px; border: 1px solid #dce3ed; border-radius: 9px; background: white; cursor: pointer; font-size: 11px; }
|
||||
|
||||
41
app/page.tsx
41
app/page.tsx
@@ -17,7 +17,9 @@ type Requirements = {
|
||||
control: string;
|
||||
gear: string;
|
||||
annualVolume: string;
|
||||
firstOrderQuantity: string;
|
||||
currentModel: string;
|
||||
otherRequirements: string;
|
||||
painPoint: string;
|
||||
};
|
||||
|
||||
@@ -168,7 +170,9 @@ const DEFAULT_REQUIREMENTS: Requirements = {
|
||||
control: "不限",
|
||||
gear: "不限",
|
||||
annualVolume: "5000–50000件",
|
||||
firstOrderQuantity: "",
|
||||
currentModel: "",
|
||||
otherRequirements: "",
|
||||
painPoint: "交期",
|
||||
};
|
||||
|
||||
@@ -285,6 +289,7 @@ export default function Home() {
|
||||
const needsEngineer =
|
||||
!top?.coreCompatible ||
|
||||
requirements.annualVolume === "50000件以上" ||
|
||||
Number(requirements.firstOrderQuantity) >= 1000 ||
|
||||
requirements.application === "工业设备";
|
||||
|
||||
function update<K extends keyof Requirements>(key: K, value: Requirements[K]) {
|
||||
@@ -559,6 +564,21 @@ export default function Home() {
|
||||
<option>50000件以上</option>
|
||||
</select>
|
||||
</label>
|
||||
<label className="select-field">
|
||||
<span>首次采购数量(只)</span>
|
||||
<input
|
||||
className="parameter-input"
|
||||
type="number"
|
||||
min="1"
|
||||
step="1"
|
||||
inputMode="numeric"
|
||||
value={requirements.firstOrderQuantity}
|
||||
onChange={(event) => update("firstOrderQuantity", event.target.value)}
|
||||
placeholder="例如:500"
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
<div className="two-fields">
|
||||
<label className="select-field">
|
||||
<span>最想解决的问题</span>
|
||||
<select
|
||||
@@ -573,13 +593,22 @@ export default function Home() {
|
||||
<option>二供替代</option>
|
||||
</select>
|
||||
</label>
|
||||
<label className="select-field">
|
||||
<span>当前使用型号(选填)</span>
|
||||
<input
|
||||
className="parameter-input"
|
||||
value={requirements.currentModel}
|
||||
onChange={(event) => update("currentModel", event.target.value)}
|
||||
placeholder="例如:SG90 / DS-E001"
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
<label className="text-field">
|
||||
<span>当前使用型号(选填)</span>
|
||||
<input
|
||||
value={requirements.currentModel}
|
||||
onChange={(event) => update("currentModel", event.target.value)}
|
||||
placeholder="例如:SG90 / DS-E001 / 自定义型号"
|
||||
<label className="text-field project-notes">
|
||||
<span>其他要求备注(选填)</span>
|
||||
<textarea
|
||||
value={requirements.otherRequirements}
|
||||
onChange={(event) => update("otherRequirements", event.target.value)}
|
||||
placeholder="例如:防水等级、噪音、寿命、认证、安装尺寸、线长或交期要求"
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user