index.wxml 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <view class="{{stopClick}}" style="padding:10px">
  2. <card>
  3. <view slot="content">
  4. {{mainData.workpresetjson.workname}}
  5. <view class="stuta">
  6. <view class="tag" style="background-color:{{sColors['未完成']}};" wx:if="{{mainData.status == '0'}}">未完成</view>
  7. <view class="tag" style="background-color:{{sColors['已完成']}};" wx:if="{{mainData.status == '1'}}">已完成</view>
  8. <view class="tag" style="background-color:{{sColors['进行中']}};" wx:if="{{mainData.status == '2'}}">进行中</view>
  9. <view class="tag" style="background-color:#0052D9;" wx:if="{{mainData.finishby}}" >{{mainData.finishby}}</view>
  10. </view>
  11. </view>
  12. </card>
  13. <view style="margin-bottom: 5px;" class="small"><text class="label">{{language['工序说明']||'工序说明'}}</text></view>
  14. <card>
  15. <view slot="content">
  16. {{mainData.workpresetjson.remarks?mainData.workpresetjson.remarks:language['暂无说明']||'暂无说明'}}
  17. </view>
  18. </card>
  19. <view style="margin-bottom: 5px;" class="small"><text class="label">{{language['参与人']||'参与人'}}</text></view>
  20. <card bindtap="showTeamDialog">
  21. <text class="label">{{language['参与人']||'参与人'}}:</text>
  22. <view slot="content">
  23. <view wx:if="{{mainData.team.length === 0}}">
  24. <text class="small">{{language['暂无参与人']||'暂无参与人'}}</text>
  25. </view>
  26. <view wx:else>
  27. <t-tag class="mr-5 mt-5" wx:for="{{mainData.team}}" wx:key="userid" variant="{{item.isleader === 1?'dark':'outline'}}" theme="{{item.isleader === 1?'primary':''}}">{{item.name}}</t-tag>
  28. </view>
  29. </view>
  30. </card>
  31. <t-dialog visible="{{showTeams}}" title="{{language['参与成员']||'参与成员'}}" confirm-btn="{{language['确定']||'确定'}}" cancel-btn="{{language['取消']||'取消'}}" bind:confirm="addUser" bind:cancel="showTeamDialog">
  32. <view slot="content">
  33. <view style="height: 40rpx;" />
  34. <view>
  35. <block wx:for="{{workers}}" wx:key="userid">
  36. <t-tag class="mr-5 mt-5" variant="{{wqp.query(teams,item.userid)?'dark':'outline'}}" theme="primary" data-item="{{item}}" bindtap="selectTeams">{{ item.position?item.position + '-':'' }}{{ item.name }}</t-tag>
  37. </block>
  38. </view>
  39. </view>
  40. </t-dialog>
  41. <wxs src="../../utils/wxmlQueryPer.wxs" module="wqp" />
  42. <!-- 是否确认 -->
  43. <view wx:if="{{mainData.workpresetjson.confirm}}">
  44. <view style="margin-bottom: 5px;" class="small">
  45. <text class="label">{{language['是否确认']||'是否确认'}}</text>
  46. <text wx:if="{{mainData.workpresetjson.confirm == 11}}" style="color:#e34d59">*</text>
  47. </view>
  48. <card>
  49. <view style="flex:1" slot="content">
  50. <t-tag bindtap="confirmValue" data-item="{{item}}" class="mr-5 mt-5" wx:for="{{mainData.workpresetjson.confirm_options}}" variant="{{item === form.confirm_value?'dark':'outline'}}" theme="{{item === form.confirm_value?'primary':''}}">{{language[item]||item}}</t-tag>
  51. </view>
  52. </card>
  53. </view>
  54. <!-- 上传附件 -->
  55. <view wx:if="{{mainData.workpresetjson.fileupload !== 0}}">
  56. <view style="margin-bottom: 5px;" class="small">
  57. <text class="label">{{language['上传附件']||'上传附件'}}</text>
  58. <text wx:if="{{mainData.workpresetjson.fileupload == 11}}" style="color:#e34d59">*</text>
  59. </view>
  60. <card>
  61. <view style="flex:1" slot="content">
  62. <upload id="fileUpload" bindData="{{bindNormalData}}"></upload>
  63. <!-- <image-viewer list="{{list}}"></image-viewer> -->
  64. </view>
  65. </card>
  66. </view>
  67. <!-- 文本信息 -->
  68. <view wx:if="{{mainData.workpresetjson.textedit !== 0}}">
  69. <view style="margin-bottom: 5px;" class="small">
  70. <text class="label">{{language['文本信息']||'文本信息'}}</text>
  71. <text wx:if="{{mainData.workpresetjson.textedit == 11}}" style="color:#e34d59">*</text>
  72. </view>
  73. <card>
  74. <view style="flex:1" slot="content">
  75. <t-textarea custom-style="padding:0" disabled="{{stopClick == 'stopClick'}}" value="{{form.textcontent}}" t-class="external-class" placeholder="{{language['请输入']||'请输入文字'}}" disableDefaultPadding="{{true}}" bind:blur="textContent" autosize />
  76. </view>
  77. </card>
  78. </view>
  79. <!-- 上传合同 -->
  80. <view wx:if="{{mainData.workpresetjson.contractupload !== 0}}">
  81. <view style="margin-bottom: 5px;" class="small">
  82. <text class="label">{{language['上传合同']||'上传合同'}}</text>
  83. <text wx:if="{{mainData.workpresetjson.contractupload == 11}}" style="color:#e34d59">*</text>
  84. </view>
  85. <card>
  86. <view style="flex:1" slot="content">
  87. <upload id="contractUpload" source="messageFile" bindData="{{bindContractData}}"></upload>
  88. </view>
  89. </card>
  90. </view>
  91. <!-- 是否有偿 -->
  92. <view wx:if="{{mainData.workpresetjson.amountpay !== 0}}">
  93. <view style="margin-bottom: 5px;" class="small">
  94. <text class="label">{{language['是否有偿']||'是否有偿'}}</text>
  95. <text wx:if="{{mainData.workpresetjson.amountpay == 11}}" style="color:#e34d59">*</text>
  96. </view>
  97. <card>
  98. <view style="flex:1" slot="content">
  99. <t-input default-value="{{form.amount}}" value='{{form.amount||0}}' label="{{language['输入金额']||'输入金额'}}" placeholder="{{language['输入金额']||'输入金额'}}" bind:blur="amountPay" borderless></t-input>
  100. </view>
  101. </card>
  102. </view>
  103. <!-- 客户签字 -->
  104. <view wx:if="{{mainData.workpresetjson.signature !== 0 && SignName}}">
  105. <view style="margin-bottom: 5px;" class="small">
  106. <text class="label">{{language['客户签字']||'客户签字'}}</text>
  107. <text wx:if="{{mainData.workpresetjson.signature == 11}}" style="color:#e34d59">*</text>
  108. </view>
  109. <card>
  110. <view style="flex:1" slot="content">
  111. <!-- <upload id="upload"></upload> -->
  112. <sign-name id='signName' bindData="{{bindSignNameData}}"></sign-name>
  113. </view>
  114. </card>
  115. </view>
  116. <!-- 物料及人员 -->
  117. <view wx:if="{{mainData.workpresetjson.additem !== 0 || mainData.workpresetjson.addperson !== 0}}">
  118. <view style="margin-bottom: 5px;" class="small"><text class="label">{{language['物料及人员']||'物料及人员'}}</text></view>
  119. <card>
  120. <view style="flex:1" slot="content">
  121. <view class="custom-tab-header">
  122. <view
  123. class="custom-tab-item {{activeTab === 0 ? 'active' : ''}}"
  124. wx:if="{{mainData.workpresetjson.addperson !== 0}}"
  125. bindtap="onTabChange"
  126. data-value="0"
  127. >
  128. <text>{{language['培训人员']||'培训人员'}}</text>
  129. <text wx:if="{{mainData.workpresetjson.addperson == 11}}" style="color:#e34d59;margin-left:4rpx">*</text>
  130. </view>
  131. <view
  132. class="custom-tab-item {{activeTab === 1 ? 'active' : ''}}"
  133. wx:if="{{mainData.workpresetjson.additem !== 0}}"
  134. bindtap="onTabChange"
  135. data-value="1"
  136. >
  137. <text>{{language['工单物料']||'工单物料'}}</text>
  138. <text wx:if="{{mainData.workpresetjson.additem == 11}}" style="color:#e34d59;margin-left:4rpx">*</text>
  139. </view>
  140. </view>
  141. <view class="custom-tab-content">
  142. <view wx:if="{{activeTab === 0 && mainData.workpresetjson.addperson !== 0}}">
  143. <card wx:for="{{mainData.trainers}}">
  144. <menber-card style="flex:1" slot="content" data="{{item}}" bind:delete="deleteMenber"></menber-card>
  145. </card>
  146. <view class="flex-align-center flex-around panel">
  147. <t-button size="extra-small" variant="primary" bind:tap="addTrainers">{{language['添加人员']||'添加人员'}}</t-button>
  148. </view>
  149. </view>
  150. <view wx:if="{{activeTab === 1 && mainData.workpresetjson.additem !== 0}}">
  151. <card style="margin-top:10px" wx:for="{{titems}}" wx:key="itemid">
  152. <product-card isdelete="{{stopClick != 'stopClick'}}" changeQty="{{stopClick != 'stopClick'}}" style="flex:1" slot="content" data="{{item}}" bind:delete="deleteMaterial" bind:input="qtyChange"></product-card>
  153. </card>
  154. <view class="flex-align-center flex-around panel">
  155. <t-button size="extra-small" variant="primary" bind:tap="addProduct">{{language['添加物料']||'添加物料'}}</t-button>
  156. </view>
  157. </view>
  158. </view>
  159. </view>
  160. </card>
  161. </view>
  162. <!-- 备注 -->
  163. <view>
  164. <view style="margin-bottom: 5px;" class="small"><text class="label">{{language['备注']||'备注'}}</text></view>
  165. <card>
  166. <view style="flex:1" slot="content">
  167. <t-textarea custom-style="padding:0" disabled="{{stopClick == 'stopClick'}}" value="{{form.remarks}}" t-class="external-class" placeholder="{{language['请输入备注']||'请输入备注'}}" disableDefaultPadding="{{true}}" bind:blur="remarkEdit" autosize />
  168. </view>
  169. </card>
  170. </view>
  171. <view wx:if="{{stopClick != 'stopClick'}}">
  172. <t-button style="margin-bottom:10px" theme="primary" size="large" bind:tap="confirmBill" block>{{language['确认完成']||'确认完成'}}</t-button>
  173. <t-button theme="primary" size="large" bind:tap="saveNode" data-info="needBack" block>{{language['保存']||'保存'}}</t-button>
  174. </view>
  175. </view>