add.wxml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <!-- 前台导入wxmlUtil.wxs -->
  2. <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
  3. <!-- 设置金额和价格的小数位数 -->
  4. <view style="display:none">{{wxmlUtil.setNumberOfDecimalPlacesAmount(numberOfDecimalPlacesAmount)}}</view>
  5. <loading wx:if="{{loading}}" loadingName="加载中" backgroundColor="#f2f2f2;" opacity="0.8"></loading>
  6. <view class="dk-card-outer-class">
  7. <!-- 单据信息 -->
  8. <view class="dk-card-class">
  9. <!--客户名称-->
  10. <van-field label-class="red-label" data-key="reportUserName" value="{{ form.reportUserName }}" input-align="left" label="业务员" placeholder="请选择业务员" is-link catchtap="openSingle" autosize border="{{ false }}" readonly="{{true}}" input-class="dk-cell-value-class" data-type='staff'>
  11. </van-field>
  12. <van-field label-class="red-label" data-key="orgName" value="{{ form.orgName }}" input-align="left" label="部门" placeholder="请选择部门" autosize border="{{ false }}" readonly="{{true}}" input-class="dk-cell-value-class" data-type='org'>
  13. </van-field>
  14. <!-- <van-field label-class="red-label" data-key="orgName" value="{{ form.reportUserName }}" input-align="left" label="报备人" placeholder="" autosize border="{{ false }}" readonly="{{true}}" input-class="dk-cell-value-class" data-type='org'>
  15. </van-field> -->
  16. <van-field disabled='{{editFlag || staffFlag || orgFlag || genderFlag || customerSourceFlag || numberToiletsFlag || decorationTypeFlag || houseTypeFlag || decorationStyleFlag || ageCompositionFlag || decisionMakerFlag}}' label-class="red-label" value="{{ form.customerName }}" input-align="left" label="客户名称" placeholder="请输入客户名称" data-type='name' autosize border="{{ false }}" bind:change="fieldChange">
  17. </van-field>
  18. <!--联系电话-->
  19. <dk-number-phone-input disabled="{{staffFlag || orgFlag || genderFlag || customerSourceFlag || numberToiletsFlag || decorationTypeFlag || houseTypeFlag || decorationStyleFlag || ageCompositionFlag || decisionMakerFlag}}"
  20. dataKey="phone"
  21. labelClass="red-label"
  22. rightIcon="phone"
  23. value="{{form.customerPhone}}"
  24. bind:changeField="changeCustomerFormFieldPhone"
  25. bind:changeFieldblur="blurCustomerPhone" errorMessage="客户电话格式错误"
  26. label="客户电话"
  27. placeholder="请输入客户电话"></dk-number-phone-input>
  28. <!--客户地址-->
  29. <van-field input-width="200rpx" input-class="dk-cell-value-class" label-class="red-label" input-align="left" data-key="address" maxlength="25" type="textarea" value="{{ wxmlUtil.addressToIndexOf((form.addressArea.province?form.addressArea.province:'') + (form.addressArea.city?form.addressArea.city:'') + (form.addressArea.district?form.addressArea.district:'') + (form.addressName?form.addressName:'')) }}" label="客户地址" placeholder="请选择客户地址" autosize border="{{ false }}" right-icon="location" color="#95A8CB" data-type='address' catchtap="onClickWxchartAddress" readonly="{{true}}">
  30. </van-field>
  31. <!--门牌号-->
  32. <van-field disabled='{{staffFlag || orgFlag || genderFlag || customerSourceFlag || numberToiletsFlag || decorationTypeFlag || houseTypeFlag || decorationStyleFlag || ageCompositionFlag || decisionMakerFlag}}' input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="red-label" data-key="addressNo" maxlength="25" type="text" value="{{ form.addressNo }}" input-align="right" label="门牌号" placeholder="请输入门牌号" autosize border="{{ false }}" bind:change="onAddressNoChange">
  33. </van-field>
  34. <!--性别-->
  35. <van-field input-width="200rpx" input-class="dk-cell-value-class" label-class="red-label" input-align="left" data-key="gender" maxlength="25" type="text" value="{{ form.gender }}" label="性别" placeholder="请选择性别" autosize border="{{ false }}" right-icon="arrow" color="#95A8CB" data-type='gender' catchtap="openSingle" readonly="{{true}}">
  36. </van-field>
  37. <!--客户来源-->
  38. <van-field input-width="200rpx" input-class="dk-cell-value-class" label-class="red-label" input-align="left" data-key="customerFrom" maxlength="25" type="text" value="{{ form.customerFromName }}" label="客户来源" placeholder="请选择客户来源" autosize border="{{ false }}" right-icon="arrow" color="#95A8CB" data-type='customerFrom' catchtap="openSingle" readonly="{{true}}">
  39. </van-field>
  40. <!--卫生间数-->
  41. <van-field input-width="200rpx" input-class="dk-cell-value-class" label-class="red-label" input-align="left" data-key="toiletCount" maxlength="25" type="text" value="{{ form.toiletCountName }}" label="装修户型" placeholder="请选择装修户型" autosize border="{{ false }}" right-icon="arrow" color="#95A8CB" data-type='toiletCount' catchtap="openSingle" readonly="{{true}}">
  42. </van-field>
  43. <!--装修类型-->
  44. <van-field input-width="200rpx" input-class="dk-cell-value-class" label-class="red-label" input-align="left" data-key="fitupType" maxlength="25" type="text" value="{{ form.fitupTypeName }}" label="装修类型" placeholder="请选择装修类型" autosize border="{{ false }}" right-icon="arrow" color="#95A8CB" data-type='fitupType' catchtap="openSingle" readonly="{{true}}">
  45. </van-field>
  46. <!--装修类型-->
  47. <van-field input-width="200rpx" input-class="dk-cell-value-class" input-align="left" data-key="houseType" maxlength="25" type="text" value="{{ form.houseTypeName }}" label="房屋类型" placeholder="请选择房屋类型" autosize border="{{ false }}" right-icon="arrow" color="#95A8CB" data-type='houseType' catchtap="openSingle" readonly="{{true}}">
  48. </van-field>
  49. <!--装修风格-->
  50. <van-field input-width="200rpx" input-class="dk-cell-value-class" input-align="left" data-key="fitupStyle" maxlength="25" type="text" value="{{ form.fitupStyleName }}" label="装修风格" placeholder="请选择装修风格" autosize border="{{ false }}" right-icon="arrow" color="#95A8CB" data-type='fitupStyle' catchtap="openSingle" readonly="{{true}}">
  51. </van-field>
  52. <!--年龄构成-->
  53. <van-field input-width="200rpx" input-class="dk-cell-value-class" input-align="left" data-key="ageComposition" maxlength="25" type="text" value="{{ form.ageCompositionName }}" label="年龄构成" placeholder="请选择年龄构成" autosize border="{{ false }}" right-icon="arrow" color="#95A8CB" data-type='ageComposition' catchtap="openSingle" readonly="{{true}}">
  54. </van-field>
  55. <!--决策者-->
  56. <van-field input-width="200rpx" input-class="dk-cell-value-class" input-align="left" data-key="decisionMaker" maxlength="25" type="text" value="{{ form.decisionMakerName }}" label="决策者" placeholder="请选择决策者" autosize border="{{ false }}" right-icon="arrow" color="#95A8CB" data-type='decisionMaker' catchtap="openSingle" readonly="{{true}}">
  57. </van-field>
  58. <!--客户标签-->
  59. <van-field input-width="200rpx" input-class="dk-cell-value-class" label-class="nomal-label" input-align="left" data-key="initialPassword" maxlength="25" type="text" value="{{ form.initialPassword }}" label="客户标签" placeholder="请选择客户标签" autosize border="{{ false }}" right-icon="arrow" color="#95A8CB" data-type='initialPassword' catchtap="changeFieldTags" readonly="{{true}}">
  60. </van-field>
  61. <van-field input-width="200rpx" input-class="dk-cell-value-class" label-class="nomal-label" input-align="left" data-key="customerClassified" maxlength="25" type="text" value="{{ form.customerClassifiedName }}" label="客户分类" placeholder="请选择客户分类" autosize border="{{ false }}" right-icon="arrow" color="#95A8CB" data-type='customerClassified' catchtap="changeFieldCustomerClassified" readonly="{{true}}">
  62. </van-field>
  63. <view class="tags" wx:if="{{taglist.length>0}}">
  64. <view style="margin-left: 12px;" wx:for="{{taglist}}" wx:for-index="indext" wx:for-item="itemt">
  65. <dk-van-tag roundFlag="{{true}}" value="{{ itemt.tagName }}"></dk-van-tag>
  66. </view>
  67. </view>
  68. <!--联系人-->
  69. <van-field disabled='{{staffFlag || orgFlag || genderFlag || customerSourceFlag || numberToiletsFlag || decorationTypeFlag || houseTypeFlag || decorationStyleFlag || ageCompositionFlag || decisionMakerFlag}}' input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="nomal-label" data-key="contactName" maxlength="25" type="text" value="{{ form.contactName }}" input-align="left" label="联系人" placeholder="请输入联系人" autosize border="{{ false }}" bind:change="fieldChange" data-type='contactName'>
  70. </van-field>
  71. <!--联系电话-->
  72. <!--联系电话-->
  73. <dk-number-phone-input disabled="{{staffFlag || orgFlag || genderFlag || customerSourceFlag || numberToiletsFlag || decorationTypeFlag || houseTypeFlag || decorationStyleFlag || ageCompositionFlag || decisionMakerFlag}}"
  74. dataKey="contactPhones"
  75. value="{{ form.contactPhones}}"
  76. bind:changeField="changeCustomerFormOtherFieldPhone"
  77. bind:changeFieldblur="blurCustomerOtherPhone"
  78. errorMessage="联系电话格式错误"></dk-number-phone-input>
  79. <!--备注-->
  80. <van-field disabled='{{staffFlag || orgFlag || genderFlag || customerSourceFlag || numberToiletsFlag || decorationTypeFlag || houseTypeFlag || decorationStyleFlag || ageCompositionFlag || decisionMakerFlag}}' input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="nomal-label" data-key="remarks" maxlength="1000" type="textarea" value="{{ form.remarks }}" input-align="left" label="备注" placeholder="请输入备注" autosize border="{{ false }}" bind:change="fieldChange" data-type='remarks'>
  81. </van-field>
  82. <view style="display:flex;width:100%;margin: 1vw; padding-top: 20rpx;">
  83. <view style="width: 30%; flex:1;color: #95A8CB;font-size: 28rpx;padding-left: 27rpx;">附件</view>
  84. <view style="width: 70%;text-align: left;">
  85. <van-uploader max-count="5" accept="image" style="margin-left: 4%;border-radius: 15rpx;" preview-size="160rpx;" file-list="{{ fileList }}" bind:delete="deleteImg" bind:after-read="afterRead" multiple="true" imageFit="aspectFit" />
  86. </view>
  87. </view>
  88. </view>
  89. <view style="height:150rpx;width:100%;"></view>
  90. </view>
  91. <!-- 保存 -->
  92. <view class="bottom-class">
  93. <van-button custom-class="save-button-class" disabled="{{loadingButtonFlag}}" loading="{{loadingButtonFlag}}" bind:click="submitData" type="default">保存
  94. </van-button>
  95. </view>
  96. <!-- dialog -->
  97. <van-dialog id="van-dialog" />
  98. <!-- 销售人员 -->
  99. <dk-single-dropdown-item show="{{staffFlag}}" id='staff' typeName='staff' bind:muticommit='mutiSearch' bind:muticlose='muticlose'></dk-single-dropdown-item>
  100. <!-- 部门 -->
  101. <dk-single-dropdown-item show="{{orgFlag}}" id='org' typeName='org' bind:muticommit='mutiSearch' bind:muticlose='muticlose'></dk-single-dropdown-item>
  102. <!-- 性别 -->
  103. <dk-single-dropdown-item show="{{genderFlag}}" content="{{form.gender}}" id='gender' typeName='gender' bind:muticommit='mutiSearch' bind:muticlose='muticlose'></dk-single-dropdown-item>
  104. <!-- 客户来源 -->
  105. <dk-single-dropdown-item channelId="{{channelId}}" show="{{customerSourceFlag}}" contentID="{{form.customerFrom}}" id='customerFrom' typeName='customerFrom' bind:muticommit='mutiSearch' bind:muticlose='muticlose'></dk-single-dropdown-item>
  106. <!-- 卫生间数 -->
  107. <dk-single-dropdown-item show="{{numberToiletsFlag}}" contentID="{{form.toiletCount}}" id='toiletCount' typeName='toiletCount' bind:muticommit='mutiSearch' bind:muticlose='muticlose'></dk-single-dropdown-item>
  108. <!-- 装修类型 -->
  109. <dk-single-dropdown-item show="{{decorationTypeFlag}}" contentID="{{form.fitupType}}" id='fitupType' typeName='fitupType' bind:muticommit='mutiSearch' bind:muticlose='muticlose'></dk-single-dropdown-item>
  110. <!-- 房屋类型 -->
  111. <dk-single-dropdown-item show="{{houseTypeFlag}}" contentID="{{form.houseType}}" id='houseType' typeName='houseType' bind:muticommit='mutiSearch' bind:muticlose='muticlose'></dk-single-dropdown-item>
  112. <!-- 装修风格 -->
  113. <dk-single-dropdown-item show="{{decorationStyleFlag}}" contentID="{{form.fitupStyle}}" id='fitupStyle' typeName='fitupStyle' bind:muticommit='mutiSearch' bind:muticlose='muticlose'></dk-single-dropdown-item>
  114. <!-- 年龄构成 -->
  115. <dk-single-dropdown-item show="{{ageCompositionFlag}}" contentID="{{form.ageComposition}}" id='ageComposition' typeName='ageComposition' bind:muticommit='mutiSearch' bind:muticlose='muticlose'></dk-single-dropdown-item>
  116. <!-- 决策者 -->
  117. <dk-single-dropdown-item show="{{decisionMakerFlag}}" contentID="{{form.decisionMaker}}" id='decisionMaker' typeName='decisionMaker' bind:muticommit='mutiSearch' bind:muticlose='muticlose'></dk-single-dropdown-item>
  118. <!-- 客户分类 -->
  119. <dk-single-dropdown-item show="{{customerClassifiedFlag}}" id='customerClassified' typeName='customerClassified' bind:muticommit='mutiSearch' bind:muticlose='muticlose'></dk-single-dropdown-item>