83 lines
4.9 KiB
Plaintext
83 lines
4.9 KiB
Plaintext
<!--pages/demand/contract/index.wxml-->
|
|
<view class="contract-container">
|
|
<view class="form-section">
|
|
<t-radio-group value="{{formData.contractType}}" bind:change="onContractTypeChange" class="radio-group-horizontal">
|
|
<t-radio value="personal" label="个人签约" />
|
|
<t-radio value="company" label="企业签约" />
|
|
</t-radio-group>
|
|
</view>
|
|
|
|
<!-- 个人签约表单 -->
|
|
<block wx:if="{{formData.contractType === 'personal'}}">
|
|
<view class="form-group">
|
|
<t-input label="个人姓名" placeholder="请输入姓名" value="{{formData.name}}" bind:change="onNameChange" />
|
|
<!-- 身份证号暂时隐藏:开发者普遍不愿提供个人敏感信息,后续如需开启请同时放开 validateForm 中的校验 -->
|
|
<!-- <t-input label="身份证号" placeholder="请输入身份证号" type="idcard" value="{{formData.idCard}}" bind:change="onIdCardChange" /> -->
|
|
<t-input label="联系电话" placeholder="请输入11位手机号" type="number" maxlength="{{11}}" value="{{formData.phone}}" bind:change="onPhoneChange" bind:blur="onPhoneBlur" status="{{phoneError ? 'error' : 'default'}}" tips="{{phoneError}}" />
|
|
</view>
|
|
</block>
|
|
|
|
<!-- 企业签约表单 -->
|
|
<block wx:if="{{formData.contractType === 'company'}}">
|
|
<view class="form-group">
|
|
<t-input label="企业名称" placeholder="请输入企业名称" value="{{formData.companyName}}" bind:change="onCompanyNameChange" />
|
|
<t-input label="法定代表人" placeholder="请输入法定代表人姓名" value="{{formData.legalPerson}}" bind:change="onLegalPersonChange" />
|
|
<t-input label="联系电话" placeholder="请输入11位手机号" type="number" maxlength="{{11}}" value="{{formData.companyPhone}}" bind:change="onCompanyPhoneChange" bind:blur="onCompanyPhoneBlur" status="{{companyPhoneError ? 'error' : 'default'}}" tips="{{companyPhoneError}}" />
|
|
</view>
|
|
</block>
|
|
<t-divider content="以上信息会做加密处理,对方不可见,仅作合同纠纷时使用" />
|
|
|
|
<!-- 开发信息 -->
|
|
<view class="form-group">
|
|
<!-- style 内联:t-textarea 根节点自带 padding: 32rpx,组件默认样式隔离,页面 wxss 不保证能覆盖,故用内联样式去掉左右内边距 -->
|
|
<t-textarea label="开发内容" placeholder="请详细描述开发内容" disabled="{{source != 'dev'}}" value="{{formData.taskContent}}" bind:change="onDevelopmentContentChange" style="padding-left:0;padding-right:0" />
|
|
|
|
<!-- 附件上传:需求说明文档等(客户签约时展示开发者上传的附件,仅可预览) -->
|
|
<view class="attach-card">
|
|
<view class="attach-head">
|
|
<text class="attach-title">{{source == 'dev' ? '上传附件(从聊天记录选择文件)' : '开发者上传的附件(点击可预览)'}}</text>
|
|
<text class="attach-extra">{{attachFiles.length}}/{{attachMax}}</text>
|
|
</view>
|
|
<view class="attach-list" wx:if="{{attachFiles.length}}">
|
|
<t-tag
|
|
wx:for="{{attachFiles}}"
|
|
wx:for-index="index"
|
|
wx:key="index"
|
|
class="file-tag-margin"
|
|
max-width="{{220}}"
|
|
size="medium"
|
|
variant="light"
|
|
data-index="{{index}}"
|
|
closable="{{source == 'dev'}}"
|
|
bind:close="handleRemoveAttach"
|
|
bind:tap="handlePreviewAttach"
|
|
>{{item.name}}</t-tag>
|
|
</view>
|
|
<t-upload
|
|
wx:if="{{source == 'dev' && attachFiles.length < attachMax}}"
|
|
files="{{[]}}"
|
|
gridConfig="{{gridConfig}}"
|
|
config="{{attachConfig}}"
|
|
size-limit="{{attachSizeLimit}}"
|
|
source="messageFile"
|
|
bind:success="handleSuccessAttach"
|
|
/>
|
|
</view>
|
|
|
|
<t-input label="总费用" placeholder="请输入总费用" suffix="元" align="right" type="number" tips="{{source == 'dev' ? '预计到手金额 ' + actualAccount + '元 + 10%的平台服务费' : '总费用 = 首付款50% + 尾款50%'}}" disabled="{{source != 'dev'}}" value="{{formData.totalCost}}" bind:change="onTotalCostChange" />
|
|
<t-input label="开发工期" placeholder="请输入开发工期" suffix="天" align="right" type="number" disabled="{{source != 'dev'}}" value="{{formData.needDays}}" bind:change="onDevelopmentPeriodChange" />
|
|
</view>
|
|
|
|
<!-- 签约条款 -->
|
|
<view class="agreement-section">
|
|
<t-checkbox value="{{formData.agreementChecked}}" bind:change="onAgreementChange">
|
|
我已阅读并同意
|
|
<navigator url="/pages/demand/agreement/index?url={{agreementUrl}}" class="agreement-link"><text class="agreement-mark">《</text><text class="agreement-text">签约服务条款</text><text class="agreement-mark">》</text></navigator>
|
|
</t-checkbox>
|
|
</view>
|
|
|
|
<!-- 提交按钮 -->
|
|
<view class="submit-section">
|
|
<t-button theme="primary" disabled="{{(source == 'dev' && contract.status == 2) || (source == 'customer' && contract.status2 == 2)}}" block bind:tap="onSubmit">确认签约</t-button>
|
|
</view>
|
|
</view> |