website-outside-new-parts-to-sales-information.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446
  1. <template>
  2. <div class="sales-order-information">
  3. <div class="sales-order-information-sl">
  4. <el-page-header @back="goBack" content="销售单信息"></el-page-header>
  5. <br />
  6. <el-descriptions :column="2" size="small" border labelClassName="labelClassName">
  7. <el-descriptions-item>
  8. <template slot="label"> 申请单号 </template>
  9. <el-input disabled size="small" v-model="form.applyNo"></el-input>
  10. </el-descriptions-item>
  11. <el-descriptions-item v-if="form.applyCategoryName">
  12. <template slot="label"> 申请类别 </template>
  13. <el-input disabled size="small" v-model="form.applyCategoryName"></el-input>
  14. </el-descriptions-item>
  15. <el-descriptions-item v-if="form.applyTypeName">
  16. <template slot="label"> 申请类型 </template>
  17. <el-input disabled size="small" v-model="form.applyTypeName"></el-input>
  18. </el-descriptions-item>
  19. <el-descriptions-item>
  20. <template slot="label"> 申请人 </template>
  21. <el-input disabled size="small" v-model="form.createBy"></el-input>
  22. </el-descriptions-item>
  23. <el-descriptions-item>
  24. <template slot="label"> 申请单位 </template>
  25. <el-input disabled size="small" v-model="form.receiveWebsitName"></el-input>
  26. </el-descriptions-item>
  27. <el-descriptions-item>
  28. <template slot="label"> 申请日期 </template>
  29. <el-input disabled size="small" v-model="form.createTime"></el-input>
  30. </el-descriptions-item>
  31. <el-descriptions-item>
  32. <template slot="label"> 退款金额 </template>
  33. <el-input disabled size="small" v-model="form.refundAmount"></el-input>
  34. </el-descriptions-item>
  35. <el-descriptions-item v-if="form.refundModeName">
  36. <template slot="label"> 退件方式 </template>
  37. <el-input disabled size="small" v-model="form.refundModeName"></el-input>
  38. </el-descriptions-item>
  39. <el-descriptions-item>
  40. <template slot="label"> 收货地址 </template>
  41. <div>{{ form.receiveAddress }}</div>
  42. </el-descriptions-item>
  43. <el-descriptions-item>
  44. <template slot="label"> 发货单位 </template>
  45. <el-input disabled size="small" v-model="form.createBy"></el-input>
  46. </el-descriptions-item>
  47. </el-descriptions>
  48. <div style="margin-top: -1px">
  49. <el-descriptions size="small" border labelClassName="labelClassName">
  50. <el-descriptions-item labelStyle="width:15.45%">
  51. <template slot="label"> 备注 </template>
  52. <el-input disabled type="textarea" :rows="1" size="small" v-model="form.remark"></el-input>
  53. </el-descriptions-item>
  54. </el-descriptions>
  55. </div>
  56. <div style="margin-top: -1px">
  57. <el-table
  58. :data="form.oldRefundManageItemBeanList || []"
  59. size="mini"
  60. border
  61. header-cell-class-name="headerRowColor"
  62. style="width: 100%"
  63. >
  64. <el-table-column label="序号" width="60">
  65. <template slot-scope="scope">
  66. <div class="serial_number">{{ scope.$index + 1 }}</div>
  67. </template>
  68. </el-table-column>
  69. <el-table-column label="旧件编码">
  70. <template slot-scope="scope">
  71. <div class="serial_number">{{ scope.row.oldPartsNumber }}</div>
  72. </template>
  73. </el-table-column>
  74. <el-table-column label="旧件名称">
  75. <template slot-scope="scope">
  76. <div class="serial_number">{{ scope.row.oldPartsName }}</div>
  77. </template>
  78. </el-table-column>
  79. <el-table-column label="数量">
  80. <template slot-scope="scope">
  81. <div class="serial_number">{{ scope.row.qty }}</div>
  82. </template>
  83. </el-table-column>
  84. <el-table-column label="审批数量">
  85. <template slot-scope="scope">
  86. <div class="serial_number">{{ scope.row.confirmQty }}</div>
  87. </template>
  88. </el-table-column>
  89. <el-table-column label="旧件图片">
  90. <template slot-scope="scope">
  91. <div v-if="scope.row.oldImage" class="serial_number">
  92. <el-image
  93. style="width: 100px; height: 100px"
  94. :src="$showImgUrl(scope.row.oldImage)"
  95. :preview-src-list="[$showImgUrl(scope.row.oldImage)]"
  96. >
  97. </el-image>
  98. </div>
  99. </template>
  100. </el-table-column>
  101. <el-table-column label="铭牌">
  102. <template slot-scope="scope">
  103. <div class="serial_number">{{ scope.row.tab }}</div>
  104. </template>
  105. </el-table-column>
  106. <el-table-column label="新件编码">
  107. <template slot-scope="scope">
  108. <div class="serial_number">{{ scope.row.newPartsNumber }}</div>
  109. </template>
  110. </el-table-column>
  111. <el-table-column label="新件名称">
  112. <template slot-scope="scope">
  113. <div class="serial_number">{{ scope.row.newPartsName }}</div>
  114. </template>
  115. </el-table-column>
  116. <el-table-column label="维修记录编号">
  117. <template slot-scope="scope">
  118. <div class="serial_number">
  119. {{ scope.row.repairRecordNumber }}
  120. </div>
  121. </template>
  122. </el-table-column>
  123. <el-table-column label="机器条形码">
  124. <template slot-scope="scope">
  125. <div class="serial_number">{{ scope.row.partsBarcode }}</div>
  126. </template>
  127. </el-table-column>
  128. <el-table-column label="修复时间">
  129. <template slot-scope="scope">
  130. <div class="serial_number">{{ scope.row.repairTime }}</div>
  131. </template>
  132. </el-table-column>
  133. </el-table>
  134. </div>
  135. <div style="margin-top: -1px">
  136. <el-table
  137. :data="form.partsOldRefundManageRecordList || []"
  138. size="mini"
  139. border
  140. header-cell-class-name="headerRowColor"
  141. style="width: 100%"
  142. >
  143. <el-table-column label="序号" width="60">
  144. <template slot-scope="scope">
  145. <div class="serial_number">{{ scope.$index + 1 }}</div>
  146. </template>
  147. </el-table-column>
  148. <el-table-column label="市场价">
  149. <template slot-scope="scope">
  150. <div class="serial_number">{{ scope.row.marketPrice }}</div>
  151. </template>
  152. </el-table-column>
  153. <el-table-column label="配件名称">
  154. <template slot-scope="scope">
  155. <div class="serial_number">{{ scope.row.partsName }}</div>
  156. </template>
  157. </el-table-column>
  158. <el-table-column label="配件编码">
  159. <template slot-scope="scope">
  160. <div class="serial_number">{{ scope.row.partsNumber }}</div>
  161. </template>
  162. </el-table-column>
  163. <el-table-column label="数量">
  164. <template slot-scope="scope">
  165. <div class="serial_number">{{ scope.row.qty }}</div>
  166. </template>
  167. </el-table-column>
  168. <el-table-column label="退款金额">
  169. <template slot-scope="scope">
  170. <div class="serial_number">{{ scope.row.refundAmount }}</div>
  171. </template>
  172. </el-table-column>
  173. <el-table-column label="销售单号">
  174. <template slot-scope="scope">
  175. <div class="serial_number">{{ scope.row.salesId }}</div>
  176. </template>
  177. </el-table-column>
  178. <el-table-column label="销售价">
  179. <template slot-scope="scope">
  180. <div class="serial_number">{{ scope.row.salesPrice }}</div>
  181. </template>
  182. </el-table-column>
  183. <el-table-column label="优惠价2">
  184. <template slot-scope="scope">
  185. <div class="serial_number">{{ scope.row.secondPrice }}</div>
  186. </template>
  187. </el-table-column>
  188. <el-table-column label="总金额">
  189. <template slot-scope="scope">
  190. <div class="serial_number">{{ scope.row.totalAmount }}</div>
  191. </template>
  192. </el-table-column>
  193. </el-table>
  194. </div>
  195. <p>网点审批信息</p>
  196. <div style="margin-top: -1px">
  197. <el-descriptions :column="2" size="small" border labelClassName="labelClassName">
  198. <el-descriptions-item>
  199. <template slot="label"> 审批人 </template>
  200. <el-input disabled size="small" v-model="form.examineBy"></el-input>
  201. </el-descriptions-item>
  202. <el-descriptions-item>
  203. <template slot="label"> *是否优惠价格结算 </template>
  204. <div>
  205. <el-radio
  206. :disabled="~['WAIT_REVIEW', 'REVIEWED', 'AGREE'].indexOf(form.flag) ? true : false"
  207. v-model="form.isDisc"
  208. :label="true"
  209. >有优惠价</el-radio
  210. >
  211. <el-radio
  212. :disabled="~['WAIT_REVIEW', 'REVIEWED', 'AGREE'].indexOf(form.flag) ? true : false"
  213. v-model="form.isDisc"
  214. :label="false"
  215. >无优惠价</el-radio
  216. >
  217. </div>
  218. </el-descriptions-item>
  219. </el-descriptions>
  220. </div>
  221. <div style="margin-top: -1px">
  222. <el-descriptions size="small" border labelClassName="labelClassName">
  223. <el-descriptions-item labelStyle="width:15.45%">
  224. <template slot="label"> 备注 </template>
  225. <el-input
  226. :disabled="~['WAIT_REVIEW', 'REVIEWED', 'AGREE'].indexOf(form.flag) ? true : false"
  227. type="textarea"
  228. :rows="1"
  229. size="small"
  230. v-model="form.examineRemark"
  231. ></el-input>
  232. </el-descriptions-item>
  233. </el-descriptions>
  234. </div>
  235. <p v-if="~['WAIT_REVIEW', 'REVIEWED'].indexOf(form.flag)">中心审批信息</p>
  236. <div v-if="~['WAIT_REVIEW', 'REVIEWED'].indexOf(form.flag)" style="margin-top: -1px">
  237. <el-descriptions :column="2" size="small" border labelClassName="labelClassName">
  238. <el-descriptions-item>
  239. <template slot="label"> 审批人 </template>
  240. <el-input disabled size="small" v-model="form.reviewBy"></el-input>
  241. </el-descriptions-item>
  242. <el-descriptions-item>
  243. <template slot="label"> *审批结果 </template>
  244. <div>
  245. <el-radio
  246. :disabled="~['REVIEWED'].indexOf(form.flag) ? true : false"
  247. v-model="form.reviewResult"
  248. :label="true"
  249. >可以返还差价</el-radio
  250. >
  251. <el-radio
  252. :disabled="~['REVIEWED'].indexOf(form.flag) ? true : false"
  253. v-model="form.reviewResult"
  254. :label="false"
  255. >无需返还差价</el-radio
  256. >
  257. </div>
  258. </el-descriptions-item>
  259. </el-descriptions>
  260. </div>
  261. <div v-if="~['WAIT_REVIEW', 'REVIEWED'].indexOf(form.flag)" style="margin-top: -1px">
  262. <el-descriptions size="small" border labelClassName="labelClassName">
  263. <el-descriptions-item labelStyle="width:15.45%">
  264. <template slot="label"> 备注 </template>
  265. <el-input
  266. :disabled="~['REVIEWED'].indexOf(form.flag) ? true : false"
  267. type="textarea"
  268. :rows="1"
  269. size="small"
  270. v-model="form.reviewRemark"
  271. ></el-input>
  272. </el-descriptions-item>
  273. </el-descriptions>
  274. </div>
  275. <br />
  276. <el-row style="text-align: right">
  277. <el-button v-if="apiType" size="small" type="primary" @click="determine">提交</el-button>
  278. <el-button v-if="apiType" size="small" @click="reset">重置</el-button>
  279. </el-row>
  280. </div>
  281. </div>
  282. </template>
  283. <script>
  284. import {
  285. workerOldRefundDetail,
  286. workerOldRefundExamine,
  287. workerOldRefundReview
  288. } from '@/api/material-system/website/website-parts-worker-refund-manage'
  289. export default {
  290. props: {
  291. type: {
  292. type: Number
  293. },
  294. apiType: {
  295. type: Number
  296. },
  297. item: {
  298. type: Object,
  299. default: () => {}
  300. }
  301. },
  302. data() {
  303. return {
  304. form: '',
  305. disabled: false,
  306. statest: '',
  307. t1options: [
  308. { label: '通过', value: 'AGREE' },
  309. { label: '驳回', value: 'REJECT' }
  310. ]
  311. }
  312. },
  313. mounted() {
  314. if (~[1, 2].indexOf(this.type) && this.item && this.item.applyNo) {
  315. if (this.type === 2) {
  316. this.disabled = true
  317. }
  318. workerOldRefundDetail({
  319. applyNo: this.item.applyNo
  320. })
  321. .then(res => {
  322. this.form = res.data
  323. if (this.type === 1) {
  324. this.form.refundedBy = this.$store.getters.name
  325. this.statest = this.form.flag
  326. }
  327. })
  328. .catch(err => {
  329. console.log(err)
  330. })
  331. }
  332. },
  333. methods: {
  334. goBack() {
  335. this.$emit('goBack')
  336. },
  337. reset() {
  338. this.form.examineRemark = ''
  339. },
  340. determine() {
  341. var { applyNo, flag, examineRemark, isDisc, reviewResult, reviewRemark } = this.form
  342. if (!applyNo || !flag) {
  343. this.$message({
  344. type: 'info',
  345. message: `必填信息不完整!`
  346. })
  347. return
  348. }
  349. if (isDisc === undefined || isDisc === '') {
  350. this.$message({
  351. type: 'info',
  352. message: `必填选择是否优惠价格结算!`
  353. })
  354. return
  355. }
  356. if (!this.apiType || this.apiType <= 0) {
  357. return
  358. }
  359. ;[workerOldRefundExamine, workerOldRefundReview]
  360. [this.apiType - 1]({
  361. isDisc,
  362. reviewResult,
  363. applyNo,
  364. flag,
  365. examineRemark,
  366. reviewRemark
  367. })
  368. .then(res => {
  369. this.$message({
  370. type: 'success',
  371. message: `提交成功!`
  372. })
  373. this.$emit('goBack', true)
  374. })
  375. }
  376. }
  377. }
  378. </script>
  379. <style lang="scss" scoped>
  380. .sales-order-information {
  381. min-width: 860px;
  382. position: absolute;
  383. top: 0;
  384. left: 0;
  385. right: 0;
  386. bottom: 0;
  387. z-index: 999;
  388. background: #fff;
  389. overflow: hidden;
  390. ::v-deep .labelClassName {
  391. width: 200px !important;
  392. }
  393. .sales-order-information-sl {
  394. padding: 20px;
  395. width: 100%;
  396. height: 100%;
  397. overflow: auto;
  398. }
  399. .serial_number {
  400. width: 100%;
  401. height: 100%;
  402. box-sizing: border-box;
  403. padding: 6px !important;
  404. text-align: center;
  405. }
  406. ::v-deep .is-disabled {
  407. .el-textarea__inner,
  408. .el-input__inner {
  409. background-color: #fff;
  410. color: #606266;
  411. border-color: #fff;
  412. }
  413. .el-input__suffix {
  414. display: none;
  415. }
  416. }
  417. ::v-deep th .cell {
  418. width: 100%;
  419. height: 100%;
  420. text-align: center;
  421. }
  422. ::v-deep .el-table__cell {
  423. .el-select,
  424. .el-input,
  425. .el-textarea__inner,
  426. .el-input__inner {
  427. height: 100%;
  428. border: none !important;
  429. }
  430. }
  431. ::v-deep .cell {
  432. height: 100%;
  433. padding: 0 !important;
  434. }
  435. ::v-deep .headerRowColor {
  436. .cell {
  437. height: 100%;
  438. padding: 6px !important;
  439. }
  440. }
  441. }
  442. </style>