engin_detail.vue 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. <template>
  2. <div class="detail-container">
  3. <el-page-header @back="goBack" content="详情"></el-page-header>
  4. <div class="main-title">
  5. <div class="title">工程信息单</div>
  6. </div>
  7. <div class="diy-table-1">
  8. <el-row>
  9. <el-col :span="8" class="item">
  10. <div class="label">工程订单号</div>
  11. <div class="value">{{detailData.enginInfoNo}}</div>
  12. </el-col>
  13. <el-col :span="8" class="item">
  14. <div class="label">订单日期</div>
  15. <div class="value">{{detailData.orderDate}}</div>
  16. </el-col>
  17. <el-col :span="8" class="item">
  18. <div class="label">经销商编码</div>
  19. <div class="value">{{detailData.customerNumber}}</div>
  20. </el-col>
  21. <el-col :span="8" class="item">
  22. <div class="label">项目名称</div>
  23. <div class="value">{{detailData.projectName}}</div>
  24. </el-col>
  25. <el-col :span="8" class="item">
  26. <div class="label">单据类型</div>
  27. <div class="value">{{detailData.orderType}}</div>
  28. </el-col>
  29. <el-col :span="8" class="item">
  30. <div class="label">经销商名称</div>
  31. <div class="value">{{detailData.customerName}}</div>
  32. </el-col>
  33. <el-col :span="8" class="item">
  34. <div class="label">使用单位</div>
  35. <div class="value">{{detailData.useUnit}}</div>
  36. </el-col>
  37. <el-col :span="8" class="item">
  38. <div class="label">安装地址</div>
  39. <div class="value">{{detailData.installAddress}}</div>
  40. </el-col>
  41. <el-col :span="8" class="item">
  42. <div class="label">工程编号</div>
  43. <div class="value">{{detailData.projectNo}}</div>
  44. </el-col>
  45. <el-col :span="8" class="item">
  46. <div class="label">厂工程编码</div>
  47. <div class="value">{{detailData.enginFactoryNo}}</div>
  48. </el-col>
  49. <el-col :span="8" class="item">
  50. <div class="label">工程登录类型</div>
  51. <div class="value">{{detailData.enginSignType}}</div>
  52. </el-col>
  53. <el-col :span="8" class="item">
  54. <div class="label">联系人</div>
  55. <div class="value">{{detailData.linkman}}</div>
  56. </el-col>
  57. <el-col :span="8" class="item">
  58. <div class="label">联系电话</div>
  59. <div class="value">{{detailData.phone}}</div>
  60. </el-col>
  61. <el-col :span="8" class="item">
  62. <div class="label">固定电话</div>
  63. <div class="value">{{detailData.tel}}</div>
  64. </el-col>
  65. <el-col :span="8" class="item">
  66. <div class="label">制单人</div>
  67. <div class="value">{{detailData.createName}}</div>
  68. </el-col>
  69. <el-col :span="8" class="item">
  70. <div class="label">制单日期</div>
  71. <div class="value">{{detailData.createTime}}</div>
  72. </el-col>
  73. <el-col :span="8" class="item">
  74. <div class="label">合同有效期</div>
  75. <div class="value">{{detailData.contractExpireDate}}</div>
  76. </el-col>
  77. <el-col :span="8" class="item">
  78. <div class="label">业务员</div>
  79. <div class="value">{{detailData.serviceName}}</div>
  80. </el-col>
  81. <el-col :span="24" class="item">
  82. <div class="label">备注</div>
  83. <div class="value">{{detailData.remark}}</div>
  84. </el-col>
  85. </el-row>
  86. </div>
  87. <div class="main-title">
  88. <div class="title">货品信息</div>
  89. </div>
  90. <div class="table" style="margin-top: 20px">
  91. <el-table
  92. :data="detailData.items"
  93. element-loading-text="Loading"
  94. border
  95. fit
  96. highlight-current-row
  97. stripe
  98. max-height="400"
  99. show-summary
  100. :summary-method="$getSummaries">
  101. <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
  102. <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
  103. <el-table-column align="center" label="产品编码" prop="materialNumber" min-width="160" show-overflow-tooltip></el-table-column>
  104. <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
  105. <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
  106. <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
  107. <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
  108. <template slot-scope="scope">
  109. {{ scope.row.price | numToFixed }}
  110. </template>
  111. </el-table-column>
  112. <el-table-column align="right" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
  113. <el-table-column align="right" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip>
  114. <template slot-scope="scope">
  115. {{ scope.row.totalAmount | numToFixed }}
  116. </template>
  117. </el-table-column>
  118. <el-table-column align="center" label="备注" prop="remark" min-width="200" show-overflow-tooltip></el-table-column>
  119. <el-table-column align="center" label="税率" prop="taxRate" min-width="100" show-overflow-tooltip></el-table-column>
  120. </el-table>
  121. </div>
  122. <div>
  123. <div class="main-title">
  124. <div class="title">审批记录</div>
  125. </div>
  126. <div class="diy-table-1">
  127. <el-row :gutter="0">
  128. <el-col :span="12" class="item">
  129. <div class="label">审批人</div>
  130. <div class="value">{{detailData.confirmName}}</div>
  131. </el-col>
  132. <el-col :span="12" class="item">
  133. <div class="label">审批结果</div>
  134. <div class="value">{{detailData.examineStatus | statusFilter}}</div>
  135. </el-col>
  136. <el-col :span="24" class="item">
  137. <div class="label">审批说明</div>
  138. <div class="value">{{detailData.examineNote}}</div>
  139. </el-col>
  140. </el-row>
  141. </div>
  142. </div>
  143. <div class="page-footer">
  144. <div class="footer">
  145. <el-button type="primary" @click="overData" v-if="!isDealer" :disabled="detailData.examineStatus !== 'OK'">直调完结</el-button>
  146. <el-button @click="goBack">关 闭</el-button>
  147. </div>
  148. </div>
  149. </div>
  150. </template>
  151. <script>
  152. import { getEnginDetail, overEngin } from "@/api/supply/engin";
  153. export default {
  154. name: 'EnginDetail',
  155. componentName: 'EnginDetail',
  156. props: ['listItem'],
  157. filters: {
  158. statusFilter(val) {
  159. const statusList = [
  160. { label: '已保存', value: 'SAVE' },
  161. { label: '待审核', value: 'WAIT' },
  162. { label: '审核通过', value: 'OK' },
  163. { label: '审核驳回', value: 'FAIL' },
  164. { label: '已关闭', value: 'CLOSE' },
  165. ];
  166. let obj = statusList.find(o => o.value == val);
  167. return obj ? obj.label : ''
  168. }
  169. },
  170. data() {
  171. return {
  172. detailData: {},
  173. }
  174. },
  175. computed: {
  176. isExamine() {
  177. return this.detailData.examineStatus === 'OK' || this.detailData.examineStatus === 'FAIL'
  178. },
  179. isDealer() {
  180. return JSON.parse(localStorage.getItem("supply_user")).isCustomer
  181. },
  182. },
  183. created() {
  184. this.getDetail();
  185. },
  186. methods: {
  187. // 返回列表
  188. goBack() {
  189. this.$emit('backListFormDetail');
  190. },
  191. // 获取详情
  192. getDetail() {
  193. getEnginDetail({id: this.listItem.enginInfoId}).then(res => {
  194. if(res.data.items) {
  195. res.data.items.forEach(item => {
  196. item.sums1 = ['qty'];
  197. item.sums2 = ['totalAmount', 'price'];
  198. })
  199. }
  200. this.detailData = res.data;
  201. })
  202. },
  203. // 直调完结
  204. overData() {
  205. this.$confirm('此操作将直调完结订单, 是否继续?', '提示', {
  206. confirmButtonText: '确定',
  207. cancelButtonText: '取消',
  208. type: 'warning'
  209. }).then(() => {
  210. overEngin({id: this.listItem.enginInfoId}).then(res => {
  211. this.$successMsg();
  212. this.getDetail();
  213. })
  214. }).catch(() => {});
  215. },
  216. }
  217. }
  218. </script>
  219. <style scoped lang="scss">
  220. .detail-container {
  221. width: 100%;
  222. height: 100%;
  223. }
  224. .main-title {
  225. display: flex;
  226. justify-content: space-between;
  227. align-items: center;
  228. margin-top: 20px;
  229. height: 60px;
  230. border-bottom: 1px solid #DCDFE6;
  231. margin-bottom: 20px;
  232. .title {
  233. font-size: 16px;
  234. font-weight: 600;
  235. padding-left: 10px;
  236. }
  237. }
  238. </style>