engin_detail.vue 10.0 KB

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