engin_detail.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  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="120" show-overflow-tooltip></el-table-column>
  104. <el-table-column align="center" label="产品编码" prop="materialOldNumber" min-width="120" show-overflow-tooltip></el-table-column>
  105. <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
  106. <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
  107. <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
  108. <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
  109. <template slot-scope="scope">
  110. {{ scope.row.price | numToFixed }}
  111. </template>
  112. </el-table-column>
  113. <el-table-column align="right" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
  114. <el-table-column align="right" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip>
  115. <template slot-scope="scope">
  116. {{ scope.row.totalAmount | numToFixed }}
  117. </template>
  118. </el-table-column>
  119. <el-table-column align="center" label="备注" prop="remark" min-width="200" show-overflow-tooltip></el-table-column>
  120. <el-table-column align="center" label="税率" prop="taxRate" min-width="100" show-overflow-tooltip></el-table-column>
  121. </el-table>
  122. </div>
  123. <div>
  124. <div class="main-title">
  125. <div class="title">审批记录</div>
  126. </div>
  127. <div class="diy-table-1">
  128. <el-row :gutter="0">
  129. <el-col :span="12" class="item">
  130. <div class="label">审批人</div>
  131. <div class="value">{{detailData.confirmName}}</div>
  132. </el-col>
  133. <el-col :span="12" class="item">
  134. <div class="label">审批结果</div>
  135. <div class="value">{{detailData.examineStatus | statusFilter}}</div>
  136. </el-col>
  137. <el-col :span="24" class="item">
  138. <div class="label">审批说明</div>
  139. <div class="value">{{detailData.examineNote}}</div>
  140. </el-col>
  141. </el-row>
  142. </div>
  143. </div>
  144. <div class="page-footer">
  145. <div class="footer">
  146. <el-button type="primary" @click="overData" v-if="!isDealer" :disabled="detailData.examineStatus !== 'OK'">直调完结</el-button>
  147. <el-button @click="goBack">关 闭</el-button>
  148. </div>
  149. </div>
  150. </div>
  151. </template>
  152. <script>
  153. import { getEnginDetail, overEngin } from "@/api/supply/engin";
  154. export default {
  155. name: 'EnginDetail',
  156. componentName: 'EnginDetail',
  157. props: ['listItem'],
  158. filters: {
  159. statusFilter(val) {
  160. const statusList = [
  161. { label: '已保存', value: 'SAVE' },
  162. { label: '待审核', value: 'WAIT' },
  163. { label: '审核通过', value: 'OK' },
  164. { label: '审核驳回', value: 'FAIL' },
  165. { label: '已关闭', value: 'CLOSE' },
  166. ];
  167. let obj = statusList.find(o => o.value == val);
  168. return obj ? obj.label : ''
  169. }
  170. },
  171. data() {
  172. return {
  173. detailData: {},
  174. }
  175. },
  176. computed: {
  177. isExamine() {
  178. return this.detailData.examineStatus === 'OK' || this.detailData.examineStatus === 'FAIL'
  179. },
  180. isDealer() {
  181. return JSON.parse(localStorage.getItem("supply_user")).isCustomer
  182. },
  183. },
  184. created() {
  185. this.getDetail();
  186. },
  187. methods: {
  188. // 返回列表
  189. goBack() {
  190. this.$emit('backListFormDetail');
  191. },
  192. // 获取详情
  193. getDetail() {
  194. getEnginDetail({id: this.listItem.enginInfoId}).then(res => {
  195. if(res.data.items) {
  196. res.data.items.forEach(item => {
  197. item.sums1 = ['qty'];
  198. item.sums2 = ['totalAmount', 'price'];
  199. })
  200. }
  201. this.detailData = res.data;
  202. })
  203. },
  204. // 直调完结
  205. overData() {
  206. this.$confirm('此操作将直调完结订单, 是否继续?', '提示', {
  207. confirmButtonText: '确定',
  208. cancelButtonText: '取消',
  209. type: 'warning'
  210. }).then(() => {
  211. overEngin({id: this.listItem.enginInfoId}).then(res => {
  212. this.$successMsg();
  213. this.getDetail();
  214. })
  215. }).catch(() => {});
  216. },
  217. }
  218. }
  219. </script>
  220. <style scoped lang="scss">
  221. .detail-container {
  222. width: 100%;
  223. height: 100%;
  224. }
  225. .main-title {
  226. display: flex;
  227. justify-content: space-between;
  228. align-items: center;
  229. margin-top: 20px;
  230. height: 60px;
  231. border-bottom: 1px solid #DCDFE6;
  232. margin-bottom: 20px;
  233. .title {
  234. font-size: 16px;
  235. font-weight: 600;
  236. padding-left: 10px;
  237. }
  238. }
  239. </style>