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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451
  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. <el-input disabled size="small" v-model="form.examineTime"></el-input>
  205. </el-descriptions-item>
  206. <el-descriptions-item>
  207. <template slot="label"> *是否优惠价格结算 </template>
  208. <div>
  209. <el-radio
  210. :disabled="~['WAIT_REVIEW', 'REVIEWED', 'AGREE'].indexOf(form.flag) ? true : false"
  211. v-model="form.isDisc"
  212. :label="true"
  213. >有优惠价</el-radio
  214. >
  215. <el-radio
  216. :disabled="~['WAIT_REVIEW', 'REVIEWED', 'AGREE'].indexOf(form.flag) ? true : false"
  217. v-model="form.isDisc"
  218. :label="false"
  219. >无优惠价</el-radio
  220. >
  221. </div>
  222. </el-descriptions-item>
  223. <el-descriptions-item>
  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
  241. :disabled="~['WAIT_REVIEW'].indexOf(form.flag) && user_type == 1 ? false : true"
  242. size="small"
  243. v-model="form.reviewBy"
  244. ></el-input>
  245. </el-descriptions-item>
  246. <el-descriptions-item>
  247. <template slot="label"> 审批时间 </template>
  248. <el-input disabled size="small" v-model="form.reviewTime"></el-input>
  249. </el-descriptions-item>
  250. <el-descriptions-item>
  251. <template slot="label"> *审批结果 </template>
  252. <div>
  253. <el-radio
  254. :disabled="~['WAIT_REVIEW'].indexOf(form.flag) && user_type == 1 ? false : true"
  255. v-model="form.reviewResult"
  256. :label="true"
  257. >可以返还差价</el-radio
  258. >
  259. <el-radio
  260. :disabled="~['WAIT_REVIEW'].indexOf(form.flag) && user_type == 1 ? false : true"
  261. v-model="form.reviewResult"
  262. :label="false"
  263. >无需返还差价</el-radio
  264. >
  265. </div>
  266. </el-descriptions-item>
  267. <el-descriptions-item>
  268. <template slot="label"> 备注 </template>
  269. <el-input
  270. :disabled="~['WAIT_REVIEW'].indexOf(form.flag) && user_type == 1 ? false : true"
  271. type="textarea"
  272. :rows="1"
  273. size="small"
  274. v-model="form.reviewRemark"
  275. ></el-input>
  276. </el-descriptions-item>
  277. </el-descriptions>
  278. </div>
  279. <br />
  280. <el-row style="text-align: right">
  281. <el-button v-if="apiType" size="small" type="primary" @click="determine">提交</el-button>
  282. <el-button v-if="apiType" size="small" @click="reset">重置</el-button>
  283. </el-row>
  284. </div>
  285. </div>
  286. </template>
  287. <script>
  288. import {
  289. workerOldRefundDetail,
  290. workerOldRefundExamine,
  291. workerOldRefundReview
  292. } from '@/api/material-system/website/website-parts-worker-refund-manage'
  293. export default {
  294. props: {
  295. type: {
  296. type: Number
  297. },
  298. apiType: {
  299. type: Number
  300. },
  301. item: {
  302. type: Object,
  303. default: () => {}
  304. }
  305. },
  306. data() {
  307. return {
  308. user_type: JSON.parse(localStorage.getItem('greemall_user')).type,
  309. form: '',
  310. disabled: false,
  311. statest: '',
  312. t1options: [
  313. { label: '通过', value: 'AGREE' },
  314. { label: '驳回', value: 'REJECT' }
  315. ]
  316. }
  317. },
  318. mounted() {
  319. if (~[1, 2].indexOf(this.type) && this.item && this.item.applyNo) {
  320. if (this.type === 2) {
  321. this.disabled = true
  322. }
  323. workerOldRefundDetail({
  324. applyNo: this.item.applyNo
  325. })
  326. .then(res => {
  327. this.form = res.data
  328. if (this.type === 1) {
  329. this.form.refundedBy = this.$store.getters.name
  330. this.statest = this.form.flag
  331. }
  332. })
  333. .catch(err => {
  334. console.log(err)
  335. })
  336. }
  337. },
  338. methods: {
  339. goBack() {
  340. this.$emit('goBack')
  341. },
  342. reset() {
  343. this.form.examineRemark = ''
  344. },
  345. determine() {
  346. var { applyNo, flag, examineRemark, isDisc, reviewResult, reviewRemark } = this.form
  347. if (!applyNo || !flag) {
  348. this.$message({
  349. type: 'info',
  350. message: `必填信息不完整!`
  351. })
  352. return
  353. }
  354. if (isDisc === undefined || isDisc === '') {
  355. this.$message({
  356. type: 'info',
  357. message: `必填选择是否优惠价格结算!`
  358. })
  359. return
  360. }
  361. if (!this.apiType || this.apiType <= 0) {
  362. return
  363. }
  364. ;[workerOldRefundExamine, workerOldRefundReview]
  365. [this.apiType - 1]({
  366. isDisc,
  367. reviewResult,
  368. applyNo,
  369. flag,
  370. examineRemark,
  371. reviewRemark
  372. })
  373. .then(res => {
  374. this.$message({
  375. type: 'success',
  376. message: `提交成功!`
  377. })
  378. this.$emit('goBack', true)
  379. })
  380. }
  381. }
  382. }
  383. </script>
  384. <style lang="scss" scoped>
  385. .sales-order-information {
  386. min-width: 860px;
  387. position: absolute;
  388. top: 0;
  389. left: 0;
  390. right: 0;
  391. bottom: 0;
  392. z-index: 999;
  393. background: #fff;
  394. overflow: hidden;
  395. ::v-deep .labelClassName {
  396. width: 150px !important;
  397. }
  398. .sales-order-information-sl {
  399. padding: 20px;
  400. width: 100%;
  401. height: 100%;
  402. overflow: auto;
  403. }
  404. .serial_number {
  405. width: 100%;
  406. height: 100%;
  407. box-sizing: border-box;
  408. padding: 6px !important;
  409. text-align: center;
  410. }
  411. ::v-deep .is-disabled {
  412. .el-textarea__inner,
  413. .el-input__inner {
  414. background-color: #fff;
  415. color: #606266;
  416. border-color: #fff;
  417. }
  418. .el-input__suffix {
  419. display: none;
  420. }
  421. }
  422. ::v-deep th .cell {
  423. width: 100%;
  424. height: 100%;
  425. text-align: center;
  426. }
  427. ::v-deep .el-table__cell {
  428. .el-select,
  429. .el-input,
  430. .el-textarea__inner,
  431. .el-input__inner {
  432. height: 100%;
  433. border: none !important;
  434. }
  435. }
  436. ::v-deep .cell {
  437. height: 100%;
  438. padding: 0 !important;
  439. }
  440. ::v-deep .headerRowColor {
  441. .cell {
  442. height: 100%;
  443. padding: 6px !important;
  444. }
  445. }
  446. }
  447. </style>