basic-data.wxml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <!-- 顶部信息 -->
  2. <van-sticky scroll-top="0">
  3. <van-search model:value="{{ searchText }}" bind:change="onSearchText" bind:search="doSearch" placeholder="请输入资料名称/备注"> </van-search>
  4. <van-dropdown-menu active-color="#1B365D">
  5. <van-dropdown-item id="status" title="{{statusItem.text }}">
  6. <dk-dropdown-switch dataList="{{statusList}}" bind:commit='dropdownSwitchCommit'></dk-dropdown-switch>
  7. </van-dropdown-item>
  8. </van-dropdown-menu>
  9. </van-sticky>
  10. <view style="display: flex;">
  11. <!-- 左侧菜单列表 -->
  12. <van-sidebar activeKey="{{sideKey}}" bindchange="changeSidebar" custom-class="left-class">
  13. <view style="height:calc({{windowHeight+'px'}} - {{'390rpx'}});overflow: scroll;">
  14. <van-sidebar-item wx:key="index" custom-class="{{sideKey - 1 == index? 'sidebar-item-before': (sideKey + 1 == index?'sidebar-item-next':'sidebar-item')}}" title="{{item.name}}" data-id="{{item.id}}" wx:for="{{leftData}}" />
  15. </view>
  16. </van-sidebar>
  17. <!-- 内容列表 -->
  18. <view style="margin-left: 140rpx;width: 100%;">
  19. <view wx:for="{{tableData}}" wx:key="index" class="main-class">
  20. <van-swipe-cell right-width="{{ 65 }}">
  21. <view bind:tap="toDetail" data-index="{{index}}" class="main-foot" style="border-radius:15rpx;">
  22. <view class="table-content">
  23. <view wx:if="{{fieldData.typeName != '客户标签'}}" class="table-content-row">
  24. <view style="display: flex;">
  25. <view style="font-size: 15px;font-weight: 600;width: 80%;">
  26. {{fieldData.typeName}}
  27. </view>
  28. <view wx:if="{{item.defFlag}}" style="height: 49rpx;border-radius: 6rpx;background-color:#CAA977;text-align: center;width: 20%;margin-right: 10rpx;">
  29. <text style=" font-size: 13px;color: #FFFFFF;">{{'默认'}}</text>
  30. </view>
  31. <view style="height: 49rpx;border-radius: 6rpx;background-color: {{ item.flagValue ?'#77C5D5':'rgba(228, 0, 43, 1)'}};text-align: center;width: 20%;">
  32. <text style=" font-size: 13px;color: #FFFFFF;">{{item.flagValue ? '启用' : '停用'}}</text>
  33. </view>
  34. </view>
  35. </view>
  36. <view wx:if="{{fieldData.typeName != '客户标签'}}" wx:for="{{fieldData}}" wx:for-index="key" wx:for-item="value">
  37. <view class="table-row" wx:if="{{'typeName' != key}}">
  38. <view class="table-content-row">
  39. <view style="display: flex;">
  40. <view class="table-content-row-font">
  41. <dk-text fontSize="14px" color="#95A8CB" fontWeight="nomal" value="{{value}}" copyValue="{{item[key]}}"></dk-text>
  42. </view>
  43. <view class="table-content-class">
  44. {{item[key]?item[key]:''}}
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. <view class="table-content-row" wx:if="{{fieldData.typeName == '客户标签'}}">
  51. <view style="display: flex;">
  52. <view style="font-size: 15px;font-weight: 600;width: 80%;">
  53. {{item.code}}
  54. </view>
  55. <view style="width: 20%;text-align: right;" bind:tap="openArrow" data-index="{{index}}">
  56. <van-icon name="{{'arrow-down'}}" color="#1B365D" />
  57. </view>
  58. </view>
  59. </view>
  60. <view wx:if="{{fieldData.typeName == '客户标签'}}">
  61. <view class="table-content">
  62. <view style="width: 80%;flex-direction: row;margin-top: 0px;" wx:if="{{item.list}}">
  63. <view wx:for="{{item.list}}" wx:for-index="arrow_1_index" wx:for-item="arrow_1_item" class="table-content-row" style="width:100%;margin-left: 20rpx;">
  64. <view style="display: flex;">
  65. <view style="width: 10%;" bind:tap="openArrow" data-index="{{index}}">
  66. <van-icon name="{{arrow_1_item.arrow_2 ? 'arrow-down':'arrow'}}" color="#1B365D" />
  67. </view>
  68. <view style="font-size: 14px;font-weight: 600;width: 80%;" bind:tap="openArrow" data-index="{{arrow_1_index}}">
  69. {{arrow_1_item.code}}
  70. </view>
  71. <view style="height: 49rpx;border-radius: 6rpx;background-color: {{ arrow_1_item.flagValue ?'#77C5D5':'rgba(228, 0, 43, 1)'}};text-align: center;width: 20%;">
  72. <text style=" font-size: 13px;color: #FFFFFF;">{{arrow_1_item.flagValue ? '启用' : '停用'}}</text>
  73. </view>
  74. </view>
  75. <view class="table-row" style="width: 100%;" wx:if="{{arrow_1_item.arrow_2}}">
  76. <view wx:for="{{arrow_1_item.arrow_2_list}}" wx:for-index="arrow_2_index" wx:for-item="arrow_2_item" class="table-content-row" style="width:100%;padding-left:10px;padding-right: 2rpx;">
  77. <view style="display: flex;">
  78. <view style="width: 10%;" bind:tap="openArrow" data-index="{{index}}">
  79. <van-icon name="{{arrow_2_item.arrow_2 ? 'arrow-down':'arrow'}}" color="#1B365D" />
  80. </view>
  81. <view style="font-size: 14px;font-weight: 600;width: 80%;" bind:tap="openArrow" data-index="{{arrow_2_index}}">
  82. {{arrow_2_item.name}}
  83. </view>
  84. <view style="height: 49rpx;border-radius: 6rpx;background-color: {{ arrow_2_item.flagValue ?'#77C5D5':'rgba(228, 0, 43, 1)'}};text-align: center;width: 20%;">
  85. <text style=" font-size: 13px;color: #FFFFFF;">{{arrow_2_item.flagValue ? '启用' : '停用'}}</text>
  86. </view>
  87. </view>
  88. </view>
  89. </view>
  90. </view>
  91. </view>
  92. </view>
  93. </view>
  94. </view>
  95. </view>
  96. <view data-index="{{index}}" bind:tap="onCloseDel" slot="right">{{item.flagValue ? '停用' : '启用'}}</view>
  97. </van-swipe-cell>
  98. </view>
  99. <!-- 保留高度 -->
  100. <view style="height: 220rpx;"></view>
  101. </view>
  102. </view>
  103. <!-- 弹窗 编辑/新建-->
  104. <van-popup show="{{showPopup}}" position="bottom" bind:close="onClosePopup" custom-class="function-pop-class">
  105. <view style="background-color:#F8F9FD;color:#1B365D;font-size: 17px;font-weight: 600;display: flex;justify-content: left;align-items: center;padding: 40rpx;">
  106. <view style="width: 70%;">{{fieldData.typeName}}</view>
  107. <view wx:if="{{fieldData.typeName !== '客户标签'}}" style="display: flex;justify-content: center;align-items: center;width: 30%;">
  108. <van-checkbox size="13" value="{{true}}" data-index="{{index}}" checked-color="#1989FA" /><view style="margin-left: 20rpx;font-size: 13px;">默认</view>
  109. </view>
  110. </view>
  111. <view wx:for="{{fieldData}}" wx:for-index="key" wx:for-item="value" wx:if="{{'typeName' != key}}">
  112. <van-field wx:if="{{key == 'warehouseCode' || key == 'channelCode' || key =='incomeCode' || key =='expenditureCode' || key =='reasonCode'|| key =='paymentCode' }}" disabled="{{true}}" input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="nomal-label" maxlength="50" value="{{ showPopupItem[key] }}" input-align="right" label="{{ value}}" placeholder="{{'请输入' + value}}" autosize border="{{ false }}">
  113. </van-field>
  114. <van-field wx:if="{{key !== 'warehouseCode' && key !== 'channelCode' && key !=='incomeCode' && key !=='expenditureCode' && key !=='reasonCode' && key !=='paymentCode' }}" disabled="{{false}}" input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="{{(key == 'warehouseName' || key == 'channelName' || key =='incomeName' && key =='expenditureName' || key =='reasonName'|| key =='paymentName' ) ? 'red-label':'' }}" maxlength="50" value="{{ showPopupItem[key] }}" input-align="right" label="{{ value}}" placeholder="{{'请输入' + value}}" autosize border="{{ false }}">
  115. </van-field>
  116. </view>
  117. <view wx:if="{{fieldData.typeName == '客户标签'}}">
  118. <van-field disabled="{{false}}" input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="nomal-label" disabled="{{true}}" maxlength="50" value="ZL00001" input-align="right" label="标签编码" placeholder="{{'请输入' + '标签编码'}}" autosize border="{{ false }}">
  119. </van-field>
  120. <van-field disabled="{{false}}" input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="nomal-label" disabled="{{true}}" maxlength="50" value="年龄构成" input-align="right" label="标签分类" placeholder="{{'请输入' + '标签分类'}}" autosize border="{{ false }}">
  121. </van-field>
  122. <van-field disabled="{{false}}" input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="red-label" disabled="{{true}}" maxlength="50" value="90后" input-align="right" label="标签名称" placeholder="{{'请输入' + '标签名称'}}" autosize border="{{ false }}">
  123. </van-field>
  124. </view>
  125. <van-field disabled="{{false}}" input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="nomal-label" maxlength="50" value="" input-align="right" label="备注" placeholder="{{'请输入' + '备注'}}" autosize border="{{ false }}">
  126. </van-field>
  127. <!-- <van-field input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="red-label" data-key="addressNo" maxlength="50" value="{{ showPopupItem.name }}" input-align="right" label="仓库名称" placeholder="请输入仓库名称" autosize border="{{ false }}" bind:change="changeCustomerFormField">
  128. </van-field>
  129. <van-field input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="nomal-label" data-key="addressNo" maxlength="50" value="{{ showPopupItem.value }}" input-align="right" label="仓库主管" placeholder="请输入仓库主管" autosize border="{{ false }}" bind:change="changeCustomerFormField">
  130. </van-field>
  131. <van-field input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="nomal-label" data-key="addressNo" maxlength="50" value="{{ showPopupItem.value }}" input-align="right" label="主管电话" placeholder="请输入主管电话" autosize border="{{ false }}" bind:change="changeCustomerFormField">
  132. </van-field>
  133. <van-field input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="nomal-label" data-key="addressNo" maxlength="50" value="{{ showPopupItem.remark }}" input-align="right" label="备注" placeholder="请输入备注" autosize border="{{ false }}" bind:change="changeCustomerFormField">
  134. </van-field> -->
  135. <!-- 保留 -->
  136. <!-- <van-field input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="nomal-label" data-key="addressNo" maxlength="50" value="{{ form.customerForm.addressNo }}" input-align="right" label="仓库名称" placeholder="请输入仓库名称" autosize border="{{ false }}" bind:change="changeCustomerFormField">
  137. </van-field> -->
  138. <view style="display: flex; padding:35rpx 34rpx 62rpx 34rpx;">
  139. <view style="width:48%">
  140. <van-button size="large" plain round color="#1B365D" custom-style="height:88rpx;" bind:click="onClosePopup" type="default">取消
  141. </van-button>
  142. </view>
  143. <view style="width: 4%;"></view>
  144. <view style="width:48%;">
  145. <van-button size="large" round color="#1B365D" custom-style="height:88rpx;" bind:click="allClean" type="default">保存
  146. </van-button>
  147. </view>
  148. </view>
  149. </van-popup>
  150. <!-- 底部信息 -->
  151. <dk-save-bottom flagTypeName="basic-data" bottomClass="{{true}}" bind:submit="toClose" bind:allClean="toAdd" />