index.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <template>
  2. <zj-page-container v-if="orderInfo">
  3. <zj-page-fill class="neibuview">
  4. <zj-form-container
  5. ref="formRef"
  6. :form-data="orderInfo"
  7. :form-rules="formRules"
  8. :form-attributes="{ size: 'mini' }"
  9. >
  10. <!-- 派工信息 创建不需要 -->
  11. <zj-form-module
  12. v-if="id"
  13. title="派工信息"
  14. label-width="100px"
  15. :form-data="orderInfo"
  16. :form-items="dispatchInfo"
  17. >
  18. <div slot="internal-bottom" style="text-align: right">
  19. <copy-info
  20. text="复制工单信息"
  21. columnCopyClass="columnCopyClasslinonnoin"
  22. :info="dispatchInfo"
  23. :order-info="orderInfo"
  24. />
  25. </div>
  26. <div slot="right" style="width: 55%; position: relative">
  27. <div class="pgxxTable">
  28. <zj-table
  29. :columns="logColumns"
  30. :table-data="logList"
  31. :table-attributes="{ height: '100%', border: true }"
  32. />
  33. </div>
  34. </div>
  35. </zj-form-module>
  36. <!-- 基本信息 -->
  37. <zj-form-module title="基本信息" :form-data="orderInfo" :form-items="basicInfo" />
  38. <!-- 服务信息 -->
  39. <zj-form-module title="服务信息" label-width="140px" :form-data="orderInfo" :form-items="serviceInfo" />
  40. <!-- 产品信息 -->
  41. <zj-form-module
  42. title="产品信息"
  43. :form-data="orderInfo"
  44. :form-items="workOrderType == 4 ? product_wb : product"
  45. />
  46. <!-- 其它信息 -->
  47. <!-- <zj-form-module title="其它信息" :form-data="orderInfo" :form-items="otherInfo" /> -->
  48. <!-- 派单信息 -->
  49. <zj-form-module title="派单信息" label-width="100px" :form-data="orderInfo" :form-items="pandanxinxi" />
  50. </zj-form-container>
  51. </zj-page-fill>
  52. <!-- 操作按钮 -->
  53. <div>
  54. <div style="box-sizing: border-box; padding: 10px 10px 0" v-if="id">
  55. <!-- 关闭 -->
  56. <!-- <close-button /> -->
  57. <!-- 1,保存 -->
  58. <commitSave v-if="~btnRestrict.indexOf(1)" :orderInfo="orderInfo" :orderType="orderType" />
  59. <!-- 2,过程反馈 -->
  60. <processFeedback
  61. v-if="~btnRestrict.indexOf(2)"
  62. resultCodeName="过程反馈"
  63. :orderInfo="orderInfo"
  64. :orderType="orderType"
  65. />
  66. <!-- 3,设为异常 -->
  67. <abnormal v-if="~btnRestrict.indexOf(3)" :orderInfo="orderInfo" :orderType="orderType" />
  68. <!-- 4,加急 -->
  69. <urgent v-if="~btnRestrict.indexOf(4)" :orderInfo="orderInfo" :orderType="orderType" />
  70. <!-- 5,不加急 -->
  71. <unurgent v-if="~btnRestrict.indexOf(5)" :orderInfo="orderInfo" :orderType="orderType" />
  72. <!-- 6,取消工单 -->
  73. <cancelOrder
  74. v-if="
  75. ~btnRestrict.indexOf(6) &&
  76. (userInfo.type == 1 || `(${userInfo.userName})${userInfo.nickName}` == orderInfo.createBy)
  77. "
  78. :orderInfo="orderInfo"
  79. :orderType="orderType"
  80. />
  81. <!-- 7,回访 -->
  82. <processFeedback
  83. v-if="~btnRestrict.indexOf(7)"
  84. resultCodeName="回访"
  85. resultCode="回访"
  86. :orderInfo="orderInfo"
  87. :orderType="orderType"
  88. />
  89. <!-- 8,新建工单 -->
  90. <!-- 9,工单驳回 -->
  91. <orderReject v-if="~btnRestrict.indexOf(9)" :orderInfo="orderInfo" :orderType="orderType" />
  92. <!-- 10,激活工单 -->
  93. <activateOrder v-if="~btnRestrict.indexOf(10)" :orderInfo="orderInfo" :orderType="orderType" />
  94. <!-- 21,总部下载 -->
  95. <orderBaseDow v-if="orderInfo && orderInfo.isImportExcel" :orderInfo="orderInfo" :orderType="orderType" />
  96. <!-- <cloneWorkOrderBtn v-if="~btnRestrict.indexOf(20)" :orderInfo="orderInfo" :orderType="orderType" /> -->
  97. <!-- 工作联络函 -->
  98. <workContactLetter :orderInfo="orderInfo" :orderType="orderType" />
  99. </div>
  100. <div style="box-sizing: border-box; padding: 10px 10px 0" v-else>
  101. <!-- 关闭 -->
  102. <close-button />
  103. <!-- 1,下派服务单 -->
  104. <commitSave :orderInfo="orderInfo" :orderType="orderType" />
  105. </div>
  106. </div>
  107. </zj-page-container>
  108. </template>
  109. <script>
  110. import workOrderLogic from './mixins/workOrderLogic.js'
  111. import basicInfo from './mixins/basicInfo.js'
  112. import dispatchInfo from './mixins/dispatchInfo.js'
  113. import otherInfo from './mixins/otherInfo.js'
  114. import productColumns from './mixins/productColumns.js'
  115. import wb_productColumns from './mixins/wb_productColumns.js'
  116. import serviceInfo from './mixins/serviceInfo.js'
  117. import pandanxinxi from './mixins/pandanxinxi.js'
  118. import copyInfo from './buttons/copyInfo.vue'
  119. import closeButton from './buttons/closeButton.vue'
  120. import commitSave from './buttons/commitSave.vue'
  121. import urgent from './buttons/urgent.vue'
  122. import unurgent from './buttons/unurgent.vue'
  123. import abnormal from './buttons/abnormal.vue'
  124. import cloneWorkOrderBtn from './buttons/cloneWorkOrder.vue'
  125. import processFeedback from './buttons/processFeedback.vue'
  126. import cancelOrder from './buttons/cancelOrder.vue'
  127. import orderReject from './buttons/orderReject.vue'
  128. import activateOrder from './buttons/activateOrder.vue'
  129. import orderBaseDow from './buttons/orderBaseDow.vue'
  130. import workContactLetter from './buttons/workContactLetter.vue'
  131. export default {
  132. components: {
  133. copyInfo,
  134. closeButton,
  135. commitSave,
  136. urgent,
  137. unurgent,
  138. abnormal,
  139. processFeedback,
  140. cancelOrder,
  141. orderReject,
  142. activateOrder,
  143. cloneWorkOrderBtn,
  144. orderBaseDow,
  145. workContactLetter
  146. },
  147. mixins: [
  148. workOrderLogic,
  149. basicInfo,
  150. dispatchInfo,
  151. otherInfo,
  152. productColumns,
  153. wb_productColumns,
  154. serviceInfo,
  155. pandanxinxi
  156. ],
  157. methods: {
  158. allVerify(cb) {
  159. this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
  160. cb && cb(valid, invalidFields, errLabels)
  161. })
  162. },
  163. appointVerify(arr, cb) {
  164. this.$refs.formRef.validateField(arr, (valid, invalidFields, errLabels) => {
  165. cb && cb(valid, invalidFields, errLabels)
  166. })
  167. }
  168. }
  169. }
  170. </script>
  171. <style lang="scss" scoped>
  172. .neibuview {
  173. box-sizing: border-box;
  174. padding-left: 16px;
  175. ::v-deep & > .zj-page-fill-scroll {
  176. box-sizing: border-box;
  177. padding-right: 16px;
  178. & > div:nth-child(1) {
  179. margin-top: 20px;
  180. }
  181. }
  182. }
  183. .pgxxTable {
  184. position: absolute;
  185. top: 0;
  186. bottom: 0;
  187. left: 0;
  188. right: 0;
  189. }
  190. .withinLine {
  191. display: inline-block;
  192. ::v-deep .el-button {
  193. margin-left: 0;
  194. margin-right: 10px;
  195. margin-bottom: 10px;
  196. }
  197. }
  198. .redbordererr {
  199. ::v-deep .el-form-item {
  200. margin: 0 !important;
  201. overflow: hidden;
  202. }
  203. }
  204. </style>