engin_detail.vue 9.0 KB

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