index.wxml 7.3 KB

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