home_examine.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676
  1. <template>
  2. <div class="detail-container">
  3. <el-page-header content="审批" @back="goBack" />
  4. <div class="main-title">
  5. <div class="title">工程订单 <span style="margin-left: 20px">经销商名称:{{detailData.customerName}}</span></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.enginOrderNo }}</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.examineStatus | statusFilter }}</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="16" class="item">
  26. <div class="label">经销商名称</div>
  27. <div class="value">{{ detailData.customerName }}</div>
  28. </el-col>
  29. <el-col :span="8" class="item">
  30. <div class="label">工程信息单号</div>
  31. <div class="value">{{ detailData.refEnginRecordNo }}</div>
  32. </el-col>
  33. <el-col :span="8" class="item">
  34. <div class="label">项目类别</div>
  35. <div class="value">
  36. <el-input v-model="detailData.refProjectCategory" placeholder="请输入项目类别" />
  37. </div>
  38. </el-col>
  39. <el-col :span="8" class="item">
  40. <div class="label">行业类别</div>
  41. <div class="value">
  42. <el-input v-model="detailData.refTradeCategory" :disabled="isDealer" placeholder="请输入行业类别" />
  43. </div>
  44. </el-col>
  45. <el-col :span="8" class="item">
  46. <div class="label">跨区厂编号</div>
  47. <div class="value">
  48. <el-input v-model="detailData.refFactoryNo" placeholder="请输入跨区厂编号" />
  49. </div>
  50. </el-col>
  51. <el-col :span="8" class="item">
  52. <div class="label">使用单位</div>
  53. <div class="value">
  54. <el-input v-model="detailData.refUseUnit" placeholder="请输入使用单位" />
  55. </div>
  56. </el-col>
  57. <el-col :span="8" class="item">
  58. <div class="label">购买单位</div>
  59. <div class="value">
  60. <el-input v-model="detailData.refBuyUnitName" placeholder="请输入购买单位" />
  61. </div>
  62. </el-col>
  63. <el-col :span="8" class="item">
  64. <div class="label">区域</div>
  65. <div class="value">{{ detailData.refRegionWork }}</div>
  66. </el-col>
  67. <el-col :span="8" class="item">
  68. <div class="label">销售类型</div>
  69. <div class="value">
  70. <el-select
  71. v-model="detailData.saleTypeId"
  72. placeholder="选择销售类型"
  73. size="small"
  74. style="width: 100%"
  75. :disabled="detailData.examineStatus == 'OK' && isDealer"
  76. clearable
  77. >
  78. <el-option v-for="item in salesTypeList" :key="item.id" :label="item.saleName" :value="item.id" >
  79. <span>{{ item.saleName }}</span> <span style="color: #f00">{{ item.saleCode }}</span>
  80. </el-option>
  81. </el-select>
  82. </div>
  83. </el-col>
  84. <el-col :span="8" class="item">
  85. <div class="label">第几申报</div>
  86. <div class="value">
  87. <el-input v-model="detailData.refDeclareNo" placeholder="请输入第几申报" />
  88. </div>
  89. </el-col>
  90. <el-col :span="8" class="item">
  91. <div class="label">联系人</div>
  92. <div class="value">
  93. <el-input v-model="detailData.refLinkman" placeholder="请输入联系人" />
  94. </div>
  95. </el-col>
  96. <el-col :span="8" class="item">
  97. <div class="label">固定电话</div>
  98. <div class="value">
  99. <el-input v-model="detailData.refTel" placeholder="请输入固定电话" />
  100. </div>
  101. </el-col>
  102. <el-col :span="8" class="item">
  103. <div class="label">移动电话</div>
  104. <div class="value">
  105. <el-input v-model="detailData.refPhone" placeholder="请输入移动电话" />
  106. </div>
  107. </el-col>
  108. <el-col :span="16" class="item">
  109. <div class="label">安装地址</div>
  110. <div class="value">
  111. <el-input v-model="detailData.refInstallAddress" placeholder="请输入安装地址" />
  112. </div>
  113. </el-col>
  114. <el-col :span="8" class="item">
  115. <div class="label">保证函</div>
  116. <div class="value">
  117. <el-select
  118. v-model="detailData.refPromiseProvide"
  119. placeholder="选择保证函状态"
  120. size="small"
  121. clearable
  122. style="width: 100%"
  123. >
  124. <el-option label="未保证" value="未保证" />
  125. <el-option label="已保证" value="已保证" />
  126. </el-select>
  127. </div>
  128. </el-col>
  129. <el-col :span="8" class="item">
  130. <div class="label">不扣押金</div>
  131. <div class="value">
  132. <!-- {{detailData.takeDeposit ? '是':'否'}} -->
  133. <el-checkbox v-model="detailData.takeDeposit">{{ detailData.takeDeposit ? '是' : '否' }}</el-checkbox>
  134. </div>
  135. </el-col>
  136. <el-col :span="8" class="item">
  137. <div class="label">文件编号</div>
  138. <div class="value">
  139. <el-input v-model="detailData.fileNo" placeholder="请输入文件编号" />
  140. </div>
  141. </el-col>
  142. <el-col :span="8" class="item">
  143. <div class="label">业务员</div>
  144. <div class="value">
  145. <el-select
  146. v-model="detailData.serviceId"
  147. placeholder="选择业务员"
  148. size="small"
  149. filterable
  150. clearable
  151. style="width: 100%"
  152. >
  153. <el-option
  154. v-for="item in salesmanList"
  155. :key="item.adminUserId"
  156. :label="item.nickName"
  157. :value="item.adminUserId"
  158. />
  159. </el-select>
  160. </div>
  161. </el-col>
  162. <!-- <el-col :span="24" class="item">
  163. <div class="label">格力回复</div>
  164. <div class="value">
  165. <el-input v-model="detailData.note1" placeholder="请输入格力回复"></el-input>
  166. </div>
  167. </el-col>
  168. <el-col :span="24" class="item">
  169. <div class="label">格力内部备注</div>
  170. <div class="value">
  171. <el-input v-model="detailData.note2" placeholder="请输入格力内部备注"></el-input>
  172. </div>
  173. </el-col> -->
  174. <el-col :span="16" class="item">
  175. <div class="label">项目说明</div>
  176. <div class="value">
  177. <el-input v-model="detailData.refProjectNote" placeholder="请输入项目说明" />
  178. </div>
  179. </el-col>
  180. <el-col :span="8" class="item">
  181. <div class="label">项目类型</div>
  182. <div class="value">
  183. <el-input v-model="detailData.refProjectType" placeholder="请输入项目类型" />
  184. </div>
  185. </el-col>
  186. <el-col :span="24" class="item">
  187. <div class="label">其他附件审批意见</div>
  188. <div class="value">{{ detailData.refOtherAnnexIdea }}</div>
  189. </el-col>
  190. <el-col :span="24" class="item">
  191. <div class="label">格力内部备注</div>
  192. <div class="value">
  193. <el-input v-model="detailData.geLiInerNote" placeholder="请输入格力内部备注" />
  194. </div>
  195. </el-col>
  196. <el-col :span="24" class="item">
  197. <div class="label">备注</div>
  198. <div class="value">
  199. <el-input v-model="detailData.remark" placeholder="请输入备注" />
  200. </div>
  201. </el-col>
  202. <el-col :span="6" class="item">
  203. <div class="label">制单人</div>
  204. <div class="value">{{ detailData.createName }}</div>
  205. </el-col>
  206. <el-col :span="6" class="item">
  207. <div class="label">制单日期</div>
  208. <div class="value">{{ detailData.createTime }}</div>
  209. </el-col>
  210. <el-col :span="6" class="item">
  211. <div class="label">关闭人</div>
  212. <div class="value">{{ detailData.closeName }}</div>
  213. </el-col>
  214. <el-col :span="6" class="item">
  215. <div class="label">关闭日期</div>
  216. <div class="value">{{ detailData.closeTime }}</div>
  217. </el-col>
  218. <el-col v-if="!isDealer" :span="24" class="item">
  219. <div class="label">引用记录</div>
  220. <div class="value">{{ goodsList[0] && goodsList[0].useRefCount }}</div>
  221. </el-col>
  222. </el-row>
  223. </div>
  224. <div class="main-title">
  225. <div class="title">货品信息</div>
  226. </div>
  227. <div class="table" style="margin-top: 20px">
  228. <el-table
  229. :data="goodsList"
  230. element-loading-text="Loading"
  231. border
  232. fit
  233. highlight-current-row
  234. stripe
  235. max-height="400"
  236. show-summary
  237. :summary-method="$getSummaries"
  238. >
  239. <el-table-column align="center" label="序号" type="index" width="50" />
  240. <!-- <el-table-column align="left" label="引用记录" prop="useRefCount" min-width="160" show-overflow-tooltip></el-table-column> -->
  241. <el-table-column align="left" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip />
  242. <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip />
  243. <el-table-column align="left" label="产品编码" prop="materialOldNumber" min-width="120" show-overflow-tooltip />
  244. <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip />
  245. <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip />
  246. <el-table-column
  247. align="left"
  248. label="实装规格型号"
  249. prop="realSpecification"
  250. min-width="300"
  251. show-overflow-tooltip
  252. >
  253. <template slot-scope="scope">
  254. <div :style="scope.row.realSpecification != scope.row.specification ? { color: 'blue' } : ''">
  255. {{ scope.row.realSpecification }}
  256. </div>
  257. </template>
  258. </el-table-column>
  259. <el-table-column align="right" label="数量" prop="qty" min-width="100" show-overflow-tooltip>
  260. <template slot-scope="scope">
  261. <!-- {{ (scope.row.qty*100 - scope.row.directTransferQty*100 - scope.row.retiredQty*100) / 100 }} -->
  262. <el-input v-model="scope.row.qty" size="small" type="number" @mousewheel.native.prevent />
  263. </template>
  264. </el-table-column>
  265. <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
  266. <template slot-scope="scope">
  267. <!-- {{ scope.row.price | numToFixed }} -->
  268. <el-input v-model="scope.row.price" size="small" type="number" @mousewheel.native.prevent />
  269. </template>
  270. </el-table-column>
  271. <el-table-column align="right" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip>
  272. <template slot-scope="scope">
  273. {{ scope.row.totalAmount | numToFixed }}
  274. </template>
  275. </el-table-column>
  276. <el-table-column align="right" label="工程登录数量" prop="enginNum" min-width="100" show-overflow-tooltip />
  277. <!-- <el-table-column align="left" label="现金钱包" prop="customerWalletName" min-width="140" show-overflow-tooltip></el-table-column>
  278. <el-table-column align="right" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip>
  279. <template slot-scope="scope">
  280. {{ scope.row.payAmount | numToFixed }}
  281. </template>
  282. </el-table-column> -->
  283. <el-table-column align="left" label="现金钱包" prop="customerWalletId" min-width="160" show-overflow-tooltip>
  284. <template slot-scope="scope">
  285. <el-select
  286. v-model="scope.row.customerWalletId"
  287. placeholder="选择现金钱包"
  288. size="small"
  289. clearable
  290. @change="changeXjWallet(scope.$index)"
  291. >
  292. <el-option
  293. v-for="item in scope.row.wallets"
  294. :key="item.customerWalletId"
  295. :label="item.customerWalletName"
  296. :value="item.customerWalletId"
  297. />
  298. </el-select>
  299. </template>
  300. </el-table-column>
  301. <!-- <el-table-column align="center" label="返利类型" prop="customerWalletName2" min-width="140" show-overflow-tooltip></el-table-column>
  302. <el-table-column align="right" label="使用返利金额" prop="rebateAmount" min-width="120" show-overflow-tooltip>
  303. <template slot-scope="scope">
  304. {{ scope.row.rebateAmount | numToFixed }}
  305. </template>
  306. </el-table-column> -->
  307. <el-table-column align="left" label="返利类型" prop="customerWalletId2" min-width="160" show-overflow-tooltip>
  308. <template slot-scope="scope">
  309. <el-select
  310. v-model="scope.row.customerWalletId2"
  311. placeholder="选择返利类型"
  312. size="small"
  313. clearable
  314. @change="changeFlWallet(scope.$index)"
  315. >
  316. <el-option
  317. v-for="item in scope.row.rebateWallets"
  318. :key="item.customerWalletId"
  319. :label="item.customerWalletName"
  320. :value="item.customerWalletId"
  321. />
  322. </el-select>
  323. </template>
  324. </el-table-column>
  325. <el-table-column align="right" label="返利金额" prop="compute_flAmount" min-width="100" show-overflow-tooltip>
  326. <template slot-scope="scope">
  327. {{ ((scope.row.price * scope.row.qty * (scope.row.rebateRate * 100)) / 100) | numToFixed }}
  328. </template>
  329. </el-table-column>
  330. <el-table-column align="right" label="格力折扣" prop="discAmount" min-width="100" show-overflow-tooltip>
  331. <template slot-scope="scope">
  332. {{ scope.row.discAmount | numToFixed }}
  333. </template>
  334. </el-table-column>
  335. <el-table-column align="right" label="实付金额" prop="compute_sfAmount" min-width="100" show-overflow-tooltip>
  336. <template slot-scope="scope">
  337. {{
  338. ((scope.row.price * scope.row.qty * 100 -
  339. ((scope.row.price * scope.row.qty * (scope.row.rebateRate * 100)) / 100) * 100 -
  340. ((scope.row.qty * (scope.row.discAmount * 100)) / 100) * 100) /
  341. 100)
  342. | numToFixed
  343. }}
  344. </template>
  345. </el-table-column>
  346. <el-table-column align="left" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
  347. <template slot-scope="scope">
  348. {{ scope.row.isDirectTransfer ? '是' : '否' }}
  349. </template>
  350. </el-table-column>
  351. <el-table-column
  352. align="right"
  353. label="直调数量"
  354. prop="directTransferQty"
  355. min-width="100"
  356. show-overflow-tooltip
  357. />
  358. <el-table-column align="right" label="已发货数量" prop="hasSendQty" min-width="100" show-overflow-tooltip />
  359. <el-table-column align="left" label="备注" prop="remark" min-width="160" show-overflow-tooltip />
  360. <el-table-column
  361. align="left"
  362. label="实装物料编号"
  363. prop="realMaterialNumber"
  364. min-width="150"
  365. show-overflow-tooltip
  366. >
  367. <template slot-scope="scope">
  368. <div :style="scope.row.realMaterialNumber != scope.row.materialNumber ? { color: 'blue' } : ''">
  369. {{ scope.row.realMaterialNumber }}
  370. </div>
  371. </template>
  372. </el-table-column>
  373. <el-table-column
  374. align="left"
  375. label="实装厂产品编码"
  376. prop="realMaterialOldNumber"
  377. min-width="200"
  378. show-overflow-tooltip
  379. >
  380. <template slot-scope="scope">
  381. <div :style="scope.row.realMaterialOldNumber != scope.row.materialOldNumber ? { color: 'blue' } : ''">
  382. {{ scope.row.realMaterialOldNumber }}
  383. </div>
  384. </template>
  385. </el-table-column>
  386. <el-table-column align="left" label="税率" prop="tax" min-width="100" show-overflow-tooltip />
  387. <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip />
  388. </el-table>
  389. </div>
  390. <div class="main-title">
  391. <div class="title">审批信息</div>
  392. </div>
  393. <div class="diy-table-1">
  394. <el-row :gutter="0">
  395. <el-col :span="12" class="item">
  396. <div class="label">审批人</div>
  397. <div class="value">{{ userName }}</div>
  398. </el-col>
  399. <el-col :span="12" class="item">
  400. <div class="label">审批日期</div>
  401. <div class="value">{{ getDate() }}</div>
  402. </el-col>
  403. <el-col :span="24" class="item">
  404. <div class="label">审批说明</div>
  405. <div class="value"><el-input v-model="examineForm.remark" placeholder="请输入审批说明" /></div>
  406. </el-col>
  407. </el-row>
  408. </div>
  409. <div class="page-footer">
  410. <div class="footer">
  411. <el-button type="primary" :loading="formLoading" @click="clickSubmitForm(1)">审批通过</el-button>
  412. <el-button type="warning" :loading="formLoading" @click="clickSubmitForm(0)">审批驳回</el-button>
  413. <el-popconfirm v-if="!isCustomer" title="确定关闭吗?" style="margin-left: 10px" @onConfirm="goBack">
  414. <el-button slot="reference">返回列表</el-button>
  415. </el-popconfirm>
  416. </div>
  417. </div>
  418. </div>
  419. </template>
  420. <script>
  421. import { getOrderDetail, examineHome } from '@/api/supply/engin'
  422. import { getTypeList, getSalesmanList, getHomeTypeList } from '@/api/common'
  423. import { mapGetters } from 'vuex'
  424. export default {
  425. name: 'HomeExamine',
  426. componentName: 'HomeExamine',
  427. filters: {
  428. statusFilter(val) {
  429. const statusList = [
  430. { label: '已保存', value: 'SAVE' },
  431. { label: '待审核', value: 'WAIT' },
  432. { label: '审核通过', value: 'OK' },
  433. // { label: '审核驳回', value: 'FAIL' },,
  434. { label: '已关闭', value: 'CLOSE' }
  435. ]
  436. const obj = statusList.find(o => o.value == val)
  437. return obj ? obj.label : ''
  438. }
  439. },
  440. props: ['listItem'],
  441. data() {
  442. return {
  443. userName: JSON.parse(localStorage.getItem('supply_user')).nickName,
  444. detailData: {},
  445. goodsList: [],
  446. examineForm: {
  447. remark: ''
  448. },
  449. salesTypeList: [],
  450. salesmanList: [],
  451. formLoading: false
  452. }
  453. },
  454. computed: {
  455. ...mapGetters(['isCustomer']),
  456. isDealer() {
  457. return JSON.parse(localStorage.getItem('supply_user')).isCustomer
  458. }
  459. },
  460. watch: {
  461. goodsList: {
  462. handler(newValue, oldValue) {
  463. if (newValue && newValue.length) {
  464. newValue.forEach((item, index) => {
  465. this.goodsList[index].compute_sfAmount =
  466. (item.price * item.qty * 100 -
  467. ((item.price * item.qty * (item.rebateRate * 100)) / 100) * 100 -
  468. ((item.qty * (item.discAmount * 100)) / 100) * 100) /
  469. 100
  470. this.goodsList[index].compute_flAmount = (item.price * item.qty * (item.rebateRate * 100)) / 100
  471. })
  472. }
  473. },
  474. immediate: true,
  475. deep: true
  476. }
  477. },
  478. async created() {
  479. await this.getSalesmanList()
  480. this.getSalesTypeList()
  481. this.getDetail()
  482. },
  483. methods: {
  484. getDate() {
  485. var date = new Date()
  486. var seperator1 = '-'
  487. var year = date.getFullYear()
  488. var month = date.getMonth() + 1
  489. var strDate = date.getDate()
  490. if (month >= 1 && month <= 9) {
  491. month = '0' + month
  492. }
  493. if (strDate >= 0 && strDate <= 9) {
  494. strDate = '0' + strDate
  495. }
  496. var currentdate = year + seperator1 + month + seperator1 + strDate
  497. return currentdate
  498. },
  499. // 获取销售类型列表
  500. getSalesTypeList() {
  501. getHomeTypeList().then(res => {
  502. this.salesTypeList = res.data
  503. console.log(res.data)
  504. })
  505. },
  506. async getSalesmanList() {
  507. const res = await getSalesmanList({
  508. pageNum: 1,
  509. pageSize: -1,
  510. isCustomer: 0,
  511. status: true
  512. })
  513. this.salesmanList = res.data.records
  514. },
  515. // 返回列表
  516. goBack() {
  517. this.$emit('backListFormDetail')
  518. },
  519. // 获取详情
  520. getDetail() {
  521. getOrderDetail({ id: this.listItem.parentId }).then(res => {
  522. if (res.data.items) {
  523. res.data.items.forEach(item => {
  524. item.sums1 = ['directTransferQty', 'qty', 'enginNum', 'refundableQty', 'tdQty', 'hasSendQty']
  525. item.sums2 = [
  526. 'totalAmount',
  527. 'payAmount',
  528. 'price',
  529. 'discAmount',
  530. 'payRebateAmount',
  531. 'compute_sfAmount',
  532. 'compute_flAmount'
  533. ]
  534. })
  535. }
  536. res.data.items.forEach(item => {
  537. item.rebateWallets = item.customerWalletList.filter(item => {
  538. return item.type === 'REBATE'
  539. })
  540. item.wallets = item.customerWalletList.filter(item => {
  541. return item.type === 'COMMONLY'
  542. })
  543. })
  544. // // 不扣押金状态默认false
  545. // res.data.takeDeposit = false
  546. this.detailData = res.data
  547. this.goodsList = res.data.items
  548. this.examineForm.remark = res.data.examineNote
  549. })
  550. },
  551. // 修改返利钱包
  552. changeFlWallet(index) {
  553. if (this.goodsList[index].customerWalletId2) {
  554. const obj = this.goodsList[index].rebateWallets.find(
  555. o => o.customerWalletId == this.goodsList[index].customerWalletId2
  556. )
  557. this.goodsList[index].rebateRate = obj.rebateRate
  558. this.goodsList[index].customerWalletName2 = obj.customerWalletName
  559. } else {
  560. this.goodsList[index].rebateRate = ''
  561. this.goodsList[index].customerWalletName2 = ''
  562. }
  563. },
  564. // 修改现金钱包
  565. changeXjWallet(index) {
  566. if (this.goodsList[index].customerWalletId) {
  567. const obj = this.goodsList[index].wallets.find(
  568. o => o.customerWalletId == this.goodsList[index].customerWalletId
  569. )
  570. this.goodsList[index].customerWalletName = obj.customerWalletName
  571. } else {
  572. this.goodsList[index].customerWalletName = ''
  573. }
  574. },
  575. // 审批
  576. clickSubmitForm(val) {
  577. if (!this.detailData.saleTypeId) {
  578. return this.$errorMsg('请选择销售类型')
  579. }
  580. if (!this.detailData.serviceId) {
  581. return this.$errorMsg('请选择业务员')
  582. }
  583. this.$confirm('此操作将审批订单, 是否继续?', '提示', {
  584. confirmButtonText: '确定',
  585. cancelButtonText: '取消',
  586. type: 'warning'
  587. })
  588. .then(() => {
  589. const saleTypeItem = this.salesTypeList.find(o => o.id == this.detailData.saleTypeId)
  590. const saleManItem = this.salesmanList.find(o => o.adminUserId == this.detailData.serviceId)
  591. const params = JSON.parse(JSON.stringify(this.detailData))
  592. params.examineNote = this.examineForm.remark
  593. params.examineResult = val
  594. ;(params.refEnginRecordNo = this.detailData.refEnginRecordNo),
  595. (params.saleTypeId = this.detailData.saleTypeId)
  596. params.saleTypeCode = saleTypeItem.saleCode
  597. params.saleTypeName = saleTypeItem.saleName
  598. params.serviceName = saleManItem.nickName
  599. this.formLoading = true
  600. examineHome(params)
  601. .then(res => {
  602. if (!res.data) {
  603. this.$successMsg()
  604. this.goBack()
  605. this.$parent.getList()
  606. } else {
  607. this.$confirm('审批成功!是否跳转下一张待审批订单?', '提示', {
  608. confirmButtonText: '跳转',
  609. cancelButtonText: '取消',
  610. type: 'warning'
  611. })
  612. .then(() => {
  613. this.$successMsg('进入下一张待审批订单')
  614. this.detailData = res.data
  615. this.goodsList = res.data.items
  616. this.examineForm.remark = ''
  617. })
  618. .catch(() => {
  619. this.goBack()
  620. this.$parent.getList()
  621. })
  622. }
  623. })
  624. .finally(res => {
  625. this.formLoading = false
  626. })
  627. })
  628. .catch(() => {})
  629. }
  630. }
  631. }
  632. </script>
  633. <style scoped lang="scss">
  634. .detail-container {
  635. width: 100%;
  636. height: 100%;
  637. }
  638. .main-title {
  639. display: flex;
  640. justify-content: space-between;
  641. align-items: center;
  642. margin-top: 20px;
  643. height: 60px;
  644. border-bottom: 1px solid #dcdfe6;
  645. margin-bottom: 20px;
  646. .title {
  647. font-size: 16px;
  648. font-weight: 600;
  649. padding-left: 10px;
  650. }
  651. }
  652. </style>