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