index.vue 5.5 KB

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