myOrder.vue 49 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292
  1. <template>
  2. <div class="app-container">
  3. <div class="title-container">
  4. <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
  5. </div>
  6. <y-page-list-layout :page-list="pageData" :page-para="listQuery" :get-page-list="getList">
  7. <template slot="left">
  8. <el-col :xs="24" :sm="12" :lg="2" :span="6">
  9. <PermissionButton menu-code="_views_major_order" class-name="filter-item" type="danger" icon="el-icon-circle-plus-outline"
  10. :page-jump="true" round style="float: left" :page-query="{'couldEdit':true,'couldBack':true}" />
  11. </el-col>
  12. <MoreSearchBar business="MAJOR_BUSINESS" @fliterSearch="fliterSearch" @resetParams="resetParams" :listQuery="listQuery"
  13. :nodeCode="false" :financial="false" :clientManager="false" :businessObjectType="false" :department="false"></MoreSearchBar>
  14. </template>
  15. <parentTable :data="pageData.records" slot="table" style="width: 100%;">
  16. <el-table-column label="订单名称" align="center" show-overflow-tooltip width='300' >
  17. <template slot-scope="{row}">
  18. <span>{{ row.orderName }}</span>
  19. </template>
  20. </el-table-column>
  21. <el-table-column label="订单号" align="center" width='200' >
  22. <template slot-scope="{row}">
  23. <span>{{ row.orderId }}</span>
  24. </template>
  25. </el-table-column>
  26. <el-table-column label="负责人" align="center" width='120'>
  27. <template slot-scope="{row}">
  28. <span>{{ row.principal }}</span>
  29. </template>
  30. </el-table-column>
  31. <el-table-column label="客户经理" align="center" width='120'>
  32. <template slot-scope="{row}">
  33. <span>{{ row.clientManager }}</span>
  34. </template>
  35. </el-table-column>
  36. <el-table-column label="客户名称" align="center" width='120' show-overflow-tooltip>
  37. <template slot-scope="{row}">
  38. <span>{{ row.clienteleName }}</span>
  39. </template>
  40. </el-table-column>
  41. <el-table-column label="业务来源" align="center" width='120' show-overflow-tooltip>
  42. <template slot-scope="{row}">
  43. <span>{{ row.clienteleSubName }}</span>
  44. </template>
  45. </el-table-column>
  46. <el-table-column label="客户联系人" align="center" width='120' show-overflow-tooltip>
  47. <template slot-scope="{row}">
  48. <span>{{ row.clienteleContactName }}</span>
  49. </template>
  50. </el-table-column>
  51. <el-table-column label="委托人" align="center" show-overflow-tooltip>
  52. <template slot-scope="{row}">
  53. <span>{{ row.bailor }}</span>
  54. </template>
  55. </el-table-column>
  56. <el-table-column label="产权人" align="center" show-overflow-tooltip>
  57. <template slot-scope="{row}">
  58. <span>{{ row.owner }}</span>
  59. </template>
  60. </el-table-column>
  61. <el-table-column label="实收款(元)" align="center" width='120'>
  62. <template slot-scope="{row}">
  63. <span style="color:red;font-weight:bold">{{ row.realAmount }}</span>
  64. </template>
  65. </el-table-column>
  66. <el-table-column label="应收款(元)" align="center" width='120'>
  67. <template slot-scope="{row}">
  68. <span>{{ row.shouldAmount }}</span>
  69. </template>
  70. </el-table-column>
  71. <el-table-column label="应收款备注" align="center" width='120' show-overflow-tooltip>
  72. <template slot-scope="{row}">
  73. <span>{{ row.remark}}</span>
  74. </template>
  75. </el-table-column>
  76. <el-table-column label="下单时间" align="center" width='200'>
  77. <template slot-scope="{row}">
  78. <span>{{ row.created}}</span>
  79. </template>
  80. </el-table-column>
  81. <el-table-column fixed="right" label="操作" width="200" align="center">
  82. <template slot-scope="{row}">
  83. <div>
  84. <PermissionButton menu-code="_views_myOrder_detail" class-name="filter-item" type="text"
  85. :page-jump="true" size="mini" :page-query="{'couldEdit':false,'id':row.id, 'back':'/major/my/order','recall':true,'couldBack':true}" />
  86. <el-button type="text" size="small" @click="openShouldAmountDialog(row)">应收款</el-button>
  87. <el-button type="text" size="small" @click="openAllotProductionDialog(row)">实收款分配</el-button>
  88. </div>
  89. <div>
  90. <el-button type="text" size="small" @click="openFinanceInvoiceDialog(row.orderFundId)">申请开票</el-button>
  91. <el-button type="text" size="small" @click="productionList(row.id)">产品包</el-button>
  92. </div>
  93. </template>
  94. </el-table-column>
  95. </parentTable>
  96. </y-page-list-layout>
  97. <el-dialog :visible.sync="shouldAmountDialog" width="35%" center top="35vh" custom-class="doWarehouseClass" @closed="cleanData">
  98. <el-form ref="fund" :model="fund" style="margin-left:40px">
  99. <el-row>
  100. <el-col :xs="24" :sm="12" :lg="24" :span="12">
  101. <el-form-item label="应收款金额(元):" prop="shouldAmount" label-width="160px" class="postInfo-container-item"
  102. :rules="{required: true, message: '应收款金额不能为空', trigger: 'blur'}">
  103. <el-input-number :precision="2" :min="null" :value-on-clear="0" v-model.number="fund.shouldAmount" type="number"
  104. style="width:300px" class="filter-item" />
  105. </el-form-item >
  106. </el-col>
  107. </el-row>
  108. <el-row>
  109. <el-col :xs="24" :sm="12" :lg="24" :span="12">
  110. <el-form-item label="备注:" prop="remark" label-width="160px" class="postInfo-container-item">
  111. <el-input style="width:300px" type="textarea" v-model="fund.remark"></el-input>
  112. </el-form-item>
  113. </el-col>
  114. </el-row>
  115. </el-form>
  116. <span slot="footer" class="dialog-footer">
  117. <el-button @click="shouldAmountDialog = false">取 消</el-button>
  118. <el-button type="primary" @click="saveShouldAmount()">确 定</el-button>
  119. </span>
  120. </el-dialog>
  121. <el-dialog :visible.sync="makeInvoiceListDialog" width="90%" center custom-class="doWarehouseClass" >
  122. <el-button type="danger" round @click="openNewInvoiceDialog">新增开票</el-button>
  123. <div style="margin-top:30px;">
  124. <el-table
  125. :data="invoiceData"
  126. stripe
  127. style="width: 100%">
  128. <el-table-column
  129. align = "center"
  130. prop="title"
  131. label="发票抬头"
  132. width="180">
  133. </el-table-column>
  134. <el-table-column
  135. align = "center"
  136. prop="taxNo"
  137. label="税号"
  138. width="180">
  139. </el-table-column>
  140. <el-table-column
  141. align = "center"
  142. prop="type"
  143. label="发票类型">
  144. </el-table-column>
  145. <el-table-column
  146. align = "center"
  147. prop="state"
  148. label="开票状态">
  149. </el-table-column>
  150. <el-table-column
  151. align = "center"
  152. prop="planAmount"
  153. label="计划开票金额">
  154. </el-table-column>
  155. <el-table-column
  156. align = "center"
  157. prop="planMakeDate"
  158. label="计划开票日期">
  159. </el-table-column>
  160. <el-table-column
  161. align = "center"
  162. prop="realAmount"
  163. label="实际开票金额">
  164. </el-table-column>
  165. <el-table-column
  166. align = "center"
  167. prop="realMakeDate"
  168. label="实际开票日期">
  169. </el-table-column>
  170. <el-table-column
  171. align = "center"
  172. prop="reason"
  173. label="驳回/作废原因">
  174. </el-table-column>
  175. <el-table-column
  176. align = "center"
  177. prop="remark"
  178. label="备注">
  179. </el-table-column>
  180. <el-table-column fixed="right" label="操作" width="200" align = "center">
  181. <template slot-scope="{row}">
  182. <el-button @click="invoiceDetail(row.id)" type="text" size="small">修改</el-button>
  183. <el-button @click="cancellation(row.id)" type="text" size="small">作废</el-button>
  184. </template>
  185. </el-table-column>
  186. </el-table>
  187. </div>
  188. </el-dialog>
  189. <el-dialog :visible.sync="newInvoiceDialog" width="75%" center custom-class="doWarehouseClass" @closed="cleanFinanceInvoiceForm">
  190. <el-form ref="invoice" :model="invoice" >
  191. <el-divider content-position="left">开票信息</el-divider>
  192. <el-row>
  193. <el-col :xs="24" :sm="12" :lg="6" :span="6">
  194. <el-form-item
  195. label="发票抬头:"
  196. :rules="{required: true, message: '发票抬头不能为空', trigger: 'blur'}"
  197. prop="title"
  198. label-width="140px"
  199. class="postInfo-container-item"
  200. >
  201. <el-input v-model.trim="invoice.title" class="filter-item" />
  202. </el-form-item>
  203. </el-col>
  204. <el-col :xs="24" :sm="12" :lg="6" :span="6">
  205. <el-form-item
  206. label="发票类型:"
  207. :rules="{required: true, message: '发票类型不能为空', trigger: 'blur'}"
  208. prop="type"
  209. label-width="140px"
  210. class="postInfo-container-item"
  211. >
  212. <el-select v-model="invoice.type" style="width:206px">
  213. <el-option label="普票" value="普票"></el-option>
  214. <el-option label="专票" value="专票"></el-option>
  215. </el-select>
  216. </el-form-item>
  217. </el-col>
  218. <el-col :xs="24" :sm="12" :lg="6" :span="6">
  219. <el-form-item
  220. label="待开金额(元):"
  221. prop="planAmount"
  222. :rules="{required: true, message: '使用权面积不能为空', trigger: 'blur'}"
  223. label-width="140px"
  224. class="postInfo-container-item"
  225. >
  226. <el-input-number :precision="2" :min="0" :value-on-clear="0" v-model.number="invoice.planAmount" type="number"
  227. style="width:206px" class="filter-item" />
  228. </el-form-item>
  229. </el-col>
  230. </el-row>
  231. <el-row>
  232. <el-col :xs="24" :sm="12" :lg="6" :span="6">
  233. <el-form-item
  234. label="税号:"
  235. :rules="{required: true, message: '税号不能为空', trigger: 'blur'}"
  236. prop="taxNo"
  237. label-width="140px"
  238. class="postInfo-container-item"
  239. >
  240. <el-input v-model.trim="invoice.taxNo" class="filter-item" />
  241. </el-form-item>
  242. </el-col>
  243. <el-col :xs="24" :sm="12" :lg="6" :span="6">
  244. <el-form-item
  245. label="计划开票日期:"
  246. prop="planMakeDate"
  247. :rules="{required: true, message: '计划开票日期不能为空', trigger: 'blur'}"
  248. label-width="140px"
  249. class="postInfo-container-item"
  250. >
  251. <el-date-picker
  252. v-model="invoice.planMakeDate" type="date" placeholder="选择日期" style="width:206px">
  253. </el-date-picker>
  254. </el-form-item>
  255. </el-col>
  256. </el-row>
  257. <el-divider content-position="left">银行信息</el-divider>
  258. <el-row>
  259. <el-col :xs="24" :sm="12" :lg="6" :span="6">
  260. <el-form-item
  261. label="开户行:"
  262. prop="bankName"
  263. label-width="140px"
  264. class="postInfo-container-item"
  265. >
  266. <el-input v-model.trim="invoice.bankName" class="filter-item" />
  267. </el-form-item>
  268. </el-col>
  269. <el-col :xs="24" :sm="12" :lg="6" :span="6">
  270. <el-form-item
  271. label="银行账号:"
  272. prop="bankAccount"
  273. label-width="140px"
  274. class="postInfo-container-item"
  275. >
  276. <el-input v-model.trim="invoice.bankAccount" class="filter-item" />
  277. </el-form-item>
  278. </el-col>
  279. </el-row>
  280. <el-row>
  281. <el-col :xs="24" :sm="12" :lg="6" :span="6">
  282. <el-form-item
  283. label="地址:"
  284. prop="bankAddress"
  285. label-width="140px"
  286. class="postInfo-container-item"
  287. >
  288. <el-input v-model.trim="invoice.bankAddress" class="filter-item" />
  289. </el-form-item>
  290. </el-col>
  291. <el-col :xs="24" :sm="12" :lg="6" :span="6">
  292. <el-form-item
  293. label="电话:"
  294. prop="bankTel"
  295. label-width="140px"
  296. class="postInfo-container-item"
  297. >
  298. <el-input v-model.trim="invoice.bankTel" class="filter-item" />
  299. </el-form-item>
  300. </el-col>
  301. </el-row>
  302. <el-divider content-position="left">发票信息</el-divider>
  303. <el-row>
  304. <el-col :xs="24" :sm="12" :lg="6" :span="6">
  305. <el-form-item
  306. label="开票项目:"
  307. prop="makeItem"
  308. label-width="140px"
  309. class="postInfo-container-item"
  310. >
  311. <el-input v-model.trim="invoice.makeItem" class="filter-item" />
  312. </el-form-item>
  313. </el-col>
  314. <el-col :xs="24" :sm="12" :lg="6" :span="6">
  315. <el-form-item
  316. label="项目数量:"
  317. prop="itemQuantity"
  318. label-width="140px"
  319. class="postInfo-container-item"
  320. >
  321. <el-input v-model.trim="invoice.itemQuantity" class="filter-item" />
  322. </el-form-item>
  323. </el-col>
  324. <el-col :xs="24" :sm="12" :lg="6" :span="6">
  325. <el-form-item
  326. label="计量单位:"
  327. prop="itemUnit"
  328. label-width="140px"
  329. class="postInfo-container-item"
  330. >
  331. <el-input v-model.trim="invoice.itemUnit" class="filter-item" placeholder="个/套/箱/次/斤/公斤/..."/>
  332. </el-form-item>
  333. </el-col>
  334. </el-row>
  335. <el-row>
  336. <el-col :xs="24" :sm="12" :lg="6" :span="6">
  337. <el-form-item
  338. label="税点:"
  339. prop="taxRate"
  340. label-width="140px"
  341. class="postInfo-container-item"
  342. >
  343. <el-input-number :precision="2" :min="0" :value-on-clear="0" v-model.number="invoice.taxRate" type="number"
  344. style="width:206px" class="filter-item" />
  345. </el-form-item>
  346. </el-col>
  347. <el-col :xs="24" :sm="12" :lg="6" :span="6">
  348. <el-form-item
  349. label="税额:"
  350. prop="taxAmount"
  351. label-width="140px"
  352. class="postInfo-container-item"
  353. >
  354. <el-input-number :precision="2" :min="0" :value-on-clear="0" v-model.number="invoice.taxAmount" type="number"
  355. style="width:206px" class="filter-item" />
  356. </el-form-item>
  357. </el-col>
  358. </el-row>
  359. <el-row>
  360. <el-col :xs="24" :sm="12" :lg="18" :span="6">
  361. <el-form-item
  362. label="备注:"
  363. prop="remark"
  364. label-width="140px"
  365. class="postInfo-container-item"
  366. >
  367. <el-input v-model.trim="invoice.remark" type="textarea" class="filter-item" />
  368. </el-form-item>
  369. </el-col>
  370. </el-row>
  371. </el-form>
  372. <span slot="footer" class="dialog-footer">
  373. <el-button @click="newInvoiceDialog = false">取 消</el-button>
  374. <el-button type="primary" @click="saveInvoice()">确 定</el-button>
  375. </span>
  376. </el-dialog>
  377. <el-dialog :visible.sync="outWarehouseListDialog" width="90%" center custom-class="doWarehouseClass" >
  378. <el-button type="danger" round @click="outWarehouseDialog = true">新增出库申请</el-button>
  379. <div style="margin-top:30px;">
  380. <el-table
  381. :data="outApllyList"
  382. stripe
  383. style="width: 100%">
  384. <el-table-column
  385. align = "center"
  386. prop="realAmount"
  387. label="申请时实收款金额(元)"
  388. width="180">
  389. <template slot-scope="{row}">
  390. <span>{{ row.realAmount==null?'-': row.realAmount}}</span>
  391. </template>
  392. </el-table-column>
  393. <el-table-column
  394. align = "center"
  395. prop="applyName"
  396. label="申请人">
  397. <template slot-scope="{row}">
  398. <span>{{ row.applyName }}</span>
  399. </template>
  400. </el-table-column>
  401. <el-table-column
  402. align = "center"
  403. prop="remark"
  404. label="申请原因" show-overflow-tooltip>
  405. <template slot-scope="{row}">
  406. <span>{{ row.remark==null?'-':row.remark }}</span>
  407. </template>
  408. </el-table-column>
  409. <el-table-column
  410. align = "center"
  411. prop="created"
  412. label="申请日期" width="150">
  413. <template slot-scope="{row}">
  414. <span>{{ row.created }}</span>
  415. </template>
  416. </el-table-column>
  417. <el-table-column
  418. align = "center"
  419. prop="departmentCheckState"
  420. label="部门审核状态">
  421. <template slot-scope="{row}">
  422. <span>{{ row.departmentCheckState==null?'-':row.departmentCheckState }}</span>
  423. </template>
  424. </el-table-column>
  425. <el-table-column
  426. align = "center"
  427. prop="departmentChecker"
  428. label="部门审核人">
  429. <template slot-scope="{row}">
  430. <span>{{ row.departmentChecker==null?'-':row.departmentChecker }}</span>
  431. </template>
  432. </el-table-column>
  433. <el-table-column
  434. align = "center"
  435. prop="departmentCheckTime"
  436. label="部门审核时间" width="150">
  437. <template slot-scope="{row}">
  438. <span>{{ row.departmentCheckTime==null?'-': row.departmentCheckTime}}</span>
  439. </template>
  440. </el-table-column>
  441. <el-table-column
  442. align = "center"
  443. prop="departmentReply"
  444. label="部门审核回复" show-overflow-tooltip>
  445. <template slot-scope="{row}">
  446. <span>{{ row.departmentReply==null?'-':row.departmentReply }}</span>
  447. </template>
  448. </el-table-column>
  449. <el-table-column
  450. align = "center"
  451. prop="financeCheckState"
  452. label="财务审核状态">
  453. <template slot-scope="{row}">
  454. <span>{{ row.financeCheckState==null?'-':row.financeCheckState }}</span>
  455. </template>
  456. </el-table-column>
  457. <el-table-column
  458. align = "center"
  459. prop="financeChecker"
  460. label="财务审核人">
  461. <template slot-scope="{row}">
  462. <span>{{ row.financeChecker==null?'-':row.financeChecker }}</span>
  463. </template>
  464. </el-table-column>
  465. <el-table-column
  466. align = "center"
  467. prop="financeCheckTime"
  468. label="财务审核时间" width="150">
  469. <template slot-scope="{row}">
  470. <span>{{ row.financeCheckTime==null?'-':row.financeCheckTime }}</span>
  471. </template>
  472. </el-table-column>
  473. <el-table-column
  474. align = "center"
  475. prop="financeReply"
  476. label="财务审核回复" show-overflow-tooltip>
  477. <template slot-scope="{row}">
  478. <span>{{ row.financeReply==null?'-':row.financeReply }}</span>
  479. </template>
  480. </el-table-column>
  481. <!-- <el-table-column fixed="right" label="操作" width="100" align = "center">
  482. <template slot-scope="{row}">
  483. <el-button @click="outApplyCancel(row.id,row.productionId,row.financeCheckState)" type="text" size="small">撤销</el-button>
  484. </template>
  485. </el-table-column> -->
  486. </el-table>
  487. </div>
  488. </el-dialog>
  489. <el-dialog :visible.sync="outWarehouseDialog" width="35%" center top="35vh" custom-class="doWarehouseClass" >
  490. <el-form ref="outWarehouse" :model="outWarehouse" style="margin-left:40px">
  491. <el-row>
  492. <el-col :xs="24" :sm="12" :lg="24" :span="12">
  493. <el-form-item label="出库原因:" prop="remark" label-width="160px" class="postInfo-container-item">
  494. <el-input style="width:300px" type="textarea" v-model="outWarehouse.remark"></el-input>
  495. </el-form-item>
  496. </el-col>
  497. </el-row>
  498. </el-form>
  499. <span slot="footer" class="dialog-footer">
  500. <el-button @click="outWarehouseDialog = false">取 消</el-button>
  501. <el-button type="primary" @click="doApplyOut()">确 定</el-button>
  502. </span>
  503. </el-dialog>
  504. <el-dialog :visible.sync="productionListDialog" width="55%" center custom-class="doWarehouseClass">
  505. <el-collapse v-model="activeName" accordion v-if="bag.productions.length>0">
  506. <el-collapse-item v-for="(r,index) in bag.productions" :name="index">
  507. <template slot="title">
  508. <i class="el-icon-document"></i>
  509. <span style="font-weight:bold;margin-left:10px;margin-right:10px">{{ aliasProductionType(r.production) }}</span>
  510. {{r.productionNo}}
  511. </template>
  512. <el-card style="margin-top:20px" shadow="hover">
  513. <div slot="header" class="clearfix">
  514. <!-- <span style="font-size:16px;font-weight:bold;">{{aliasProductionType(r.production)}}</span> -->
  515. <span style="margin-left:30px;font-size:16px;font-weight:bold; color:red">实收款金额:{{r.realAmount!=null?r.realAmount:0}}¥</span>
  516. <el-button v-if="(r.production!='STATEMENT' && r.repertoryState !=null && !r.repertoryState)"
  517. style="float: right; padding: 3px 0;margin-left:10px" type="text" @click="openApplyOutWarehouseList(r)">出库申请</el-button>
  518. <el-button v-if="r.production==='STATEMENT' && !r.delivery" style="float: right; padding: 3px 0;" type="text" @click="confirmDelivery(r.id)">确认送达</el-button>
  519. </div>
  520. <el-form :model="r">
  521. <el-row>
  522. <el-col :xs="24" :sm="12" :lg="24" :span="12">
  523. <el-form-item label="项目名称:" prop="name" label-width="120px" class="postInfo-container-item">
  524. <el-input :value="r.name" type="text" class="filter-item" disabled readonly/>
  525. </el-form-item >
  526. </el-col>
  527. </el-row>
  528. <el-row>
  529. <el-col :xs="24" :sm="12" :lg="12" :span="12">
  530. <el-form-item label="委托方:" prop="clientName" label-width="120px" class="postInfo-container-item">
  531. <el-input :value="r.clientName" type="text" class="filter-item" disabled readonly/>
  532. </el-form-item >
  533. </el-col>
  534. <el-col :xs="24" :sm="12" :lg="12" :span="12">
  535. <el-form-item label="产权人:" prop="owner" label-width="120px" class="postInfo-container-item">
  536. <el-input :value="r.owner" type="text" class="filter-item" disabled readonly/>
  537. </el-form-item >
  538. </el-col>
  539. </el-row>
  540. <el-row>
  541. <el-col :xs="24" :sm="12" :lg="8" :span="12">
  542. <el-form-item label="评估总价:" prop="evaluateAmount" label-width="120px" class="postInfo-container-item">
  543. <el-input :value="r.evaluateAmount/10000" type="text" class="filter-item" disabled readonly>
  544. <template slot="append">万元</template>
  545. </el-input>
  546. </el-form-item >
  547. </el-col>
  548. <el-col :xs="24" :sm="12" :lg="8" :span="12">
  549. <el-form-item label="评估面积:" prop="evaluateAcreage" label-width="120px" class="postInfo-container-item">
  550. <el-input :value="r.evaluateAcreage" type="text" class="filter-item" disabled readonly>
  551. <template slot="append">平方</template>
  552. </el-input>
  553. </el-form-item >
  554. </el-col>
  555. <el-col :xs="24" :sm="12" :lg="8" :span="12">
  556. <el-form-item label="评估单价:" prop="evaluatePrice" label-width="120px" class="postInfo-container-item">
  557. <el-input :value="r.evaluatePrice/10000" type="text" class="filter-item" disabled readonly>
  558. <template slot="append">万元</template>
  559. </el-input>
  560. </el-form-item >
  561. </el-col>
  562. </el-row>
  563. <el-row>
  564. <el-col :xs="24" :sm="12" :lg="8" :span="12">
  565. <el-form-item label="库存状态:" prop="repertoryState" label-width="120px" class="postInfo-container-item">
  566. <el-input :value="r.repertoryState==null?'未入库':(r.repertoryState?'已出库':'已入库')" type="text" class="filter-item" disabled readonly />
  567. </el-form-item >
  568. </el-col>
  569. <el-col :xs="24" :sm="12" :lg="8" :span="12">
  570. <el-form-item label="入库时间:" prop="repertoryInTime" label-width="120px" class="postInfo-container-item">
  571. <el-input :value="r.repertoryInTime" type="text" class="filter-item" disabled readonly />
  572. </el-form-item >
  573. </el-col>
  574. <el-col :xs="24" :sm="12" :lg="8" :span="12">
  575. <el-form-item label="出库时间:" prop="repertoryOutTime" label-width="120px" class="postInfo-container-item">
  576. <el-input :value="r.repertoryOutTime" type="text" class="filter-item" disabled readonly />
  577. </el-form-item >
  578. </el-col>
  579. </el-row>
  580. <el-row>
  581. <el-col :xs="24" :sm="12" :lg="8" :span="12">
  582. <el-form-item label="送达状态:" prop="delivery" label-width="120px" class="postInfo-container-item">
  583. <el-input :value="r.delivery?'已送达':'未送达'" type="text" class="filter-item" disabled readonly />
  584. </el-form-item >
  585. </el-col>
  586. <el-col :xs="24" :sm="12" :lg="8" :span="12">
  587. <el-form-item label="归档状态:" prop="ifSaveFile" label-width="120px" class="postInfo-container-item">
  588. <el-input :value="r.ifSaveFile?'已归档':'未归档'" type="text" class="filter-item" disabled readonly />
  589. </el-form-item >
  590. </el-col>
  591. <el-col :xs="24" :sm="12" :lg="8" :span="12">
  592. <el-form-item label="归档时间:" prop="saveFileDate" label-width="120px" class="postInfo-container-item">
  593. <el-input :value="r.saveFileDate" type="text" class="filter-item" disabled readonly />
  594. </el-form-item >
  595. </el-col>
  596. </el-row>
  597. </el-form>
  598. </el-card>
  599. </el-collapse-item>
  600. </el-collapse>
  601. <el-empty v-else description="暂无产品"></el-empty>
  602. </el-dialog>
  603. <el-dialog :visible.sync="allotAmountDialog" width="65%" center custom-class="doWarehouseClass" >
  604. <el-form v-model="orderProduction" ref="orderProduction">
  605. <el-row>
  606. <el-col :xs="24" :sm="12" :lg="24" :span="6">
  607. <el-button style="float:right" type="success" @click="allotProduction()">确认分配</el-button>
  608. </el-col>
  609. </el-row>
  610. <el-card style="margin-top:20px" shadow="hover">
  611. <div slot="header" class="clearfix">
  612. <el-row>
  613. <el-col :xs="24" :sm="12" :lg="12" :span="6">
  614. <el-form-item label="订单名称:" prop="orderName" label-width="140px" class="postInfo-container-item">
  615. <el-input :value="orderProduction.orderName" type="text" class="filter-item" disabled readonly />
  616. </el-form-item >
  617. </el-col>
  618. <el-col :xs="24" :sm="12" :lg="12" :span="6">
  619. <el-form-item label="订单号:" prop="orderId" label-width="140px" class="postInfo-container-item">
  620. <el-input :value="orderProduction.orderId" type="text" class="filter-item" disabled readonly />
  621. </el-form-item >
  622. </el-col>
  623. </el-row>
  624. <el-row>
  625. <el-col :xs="24" :sm="12" :lg="12" :span="6">
  626. <el-form-item label="订单已认领金额:" prop="realAmount" label-width="160px" :class="['postInfo-container-item','real-amount']">
  627. <el-input :value="orderProduction.realAmount" type="text" class="filter-item" disabled readonly>
  628. <template slot="append">元</template>
  629. </el-input>
  630. </el-form-item >
  631. </el-col>
  632. <el-col :xs="24" :sm="12" :lg="12" :span="6">
  633. <el-form-item label="未分配金额:" prop="notAllotAmount" label-width="160px" :class="['postInfo-container-item','real-amount']">
  634. <el-input :value="notAllotAmount" type="text" class="filter-item" disabled readonly >
  635. <template slot="append">元</template>
  636. </el-input>
  637. </el-form-item >
  638. </el-col>
  639. </el-row>
  640. </div>
  641. <el-row>
  642. <el-col :xs="24" :sm="12" :lg="12" :span="6">
  643. <el-form-item label="产品列表:" prop="orderName" label-width="140px" class="postInfo-container-item" />
  644. </el-col>
  645. </el-row>
  646. <div v-if="orderProduction.reports!=null && orderProduction.reports.length>0">
  647. <el-row v-for="(r,index) in orderProduction.reports">
  648. <div >
  649. <el-col :xs="24" :sm="12" :lg="6" :span="6">
  650. <el-form-item :label="productionLabel+(index+1)+':'" prop="productionType" label-width="120px" class="postInfo-container-item">
  651. <el-input :value="r.productionType" type="text" class="filter-item" disabled readonly />
  652. </el-form-item >
  653. </el-col>
  654. <el-col :xs="24" :sm="12" :lg="10" :span="6">
  655. <el-form-item label="报告号:" prop="businessSubId" label-width="120px" class="postInfo-container-item">
  656. <el-input :value="r.businessSubId" type="text" class="filter-item" disabled readonly />
  657. </el-form-item >
  658. </el-col>
  659. <el-col :xs="24" :sm="12" :lg="8" :span="6">
  660. <el-form-item label="已分配金额:" prop="claimedAmount" label-width="140px" class="postInfo-container-item">
  661. <el-input-number :precision="2" :min="0" :value-on-clear="0" v-model.number="r.claimedAmount" type="number"
  662. style="width:100%" class="filter-item" readonly disabled/>
  663. </el-form-item >
  664. </el-col>
  665. </div>
  666. </el-row>
  667. </div>
  668. <span v-else style="margin-left:140px;color:RGB(153,153,153)">暂无产品</span>
  669. </el-card>
  670. </el-form>
  671. </el-dialog>
  672. </div>
  673. </template>
  674. <script>
  675. import YPageListLayout from '@/components/YPageListLayout'
  676. import Breadcrumb from '@/components/Breadcrumb'
  677. import MoreSearchBar from '@/components/MoreSearchBar'
  678. export default {
  679. name: 'myOrder',
  680. components: {
  681. Breadcrumb,
  682. YPageListLayout,
  683. MoreSearchBar
  684. },
  685. filters: {
  686. },
  687. data() {
  688. return {
  689. pageData: { records: [] },
  690. listQuery: {
  691. page: 1,
  692. size: 10,
  693. descs: 'id',
  694. keyword:null,
  695. startDate:null,
  696. endDate:null,
  697. },
  698. shouldAmountDialog:false,
  699. makeInvoiceListDialog:false,
  700. newInvoiceDialog:false,
  701. outWarehouseDialog:false,
  702. outWarehouseListDialog:false,
  703. productionListDialog:false,
  704. allotAmountDialog:false,
  705. fund:{
  706. id:null,
  707. businessType:null,
  708. orderName:null,
  709. orderId:null,
  710. shouldAmount:null,
  711. remark:null,
  712. businessType:null,
  713. businessId:null,
  714. businessSubId:null,
  715. productionFundId:null,
  716. evaluateAmount:null
  717. },
  718. invoiceData:[],
  719. invoice:{
  720. id:null,
  721. orderFundId:null,
  722. title:null,
  723. type:null,
  724. taxNo:null,
  725. planAmount:null,
  726. planMakeDate:null,
  727. bankName:null,
  728. bankAccount:null,
  729. bankAddress:null,
  730. bankTel:null,
  731. makeItem:null,
  732. itemQuantity:null,
  733. itemUnit:null,
  734. taxRate:null,
  735. taxAmount:null,
  736. remark:null
  737. },
  738. outWarehouse:{
  739. id:null,
  740. productionFundId:null,
  741. remark:null,
  742. realAmount:null
  743. },
  744. outApllyList:[],
  745. bag:{
  746. businessId:null,
  747. businessType:null,
  748. reportNo:null,
  749. productions:[]
  750. },
  751. activeName: '0',
  752. todoBusinessId:null,
  753. taskId:null,
  754. orderProduction:{
  755. reports:[],
  756. orderName:null,
  757. orderId:null,
  758. realAmount:null,
  759. id:null
  760. },
  761. productionLabel:"产品",
  762. notAllotAmount:null,
  763. orderDate:'',
  764. pickerOptions: {
  765. shortcuts: [{
  766. text: '最近一周',
  767. onClick(picker) {
  768. const end = new Date();
  769. const start = new Date();
  770. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
  771. picker.$emit('pick', [start, end]);
  772. }
  773. }, {
  774. text: '最近一个月',
  775. onClick(picker) {
  776. const end = new Date();
  777. const start = new Date();
  778. start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
  779. picker.$emit('pick', [start, end]);
  780. }
  781. }, {
  782. text: '最近三个月',
  783. onClick(picker) {
  784. const end = new Date();
  785. const start = new Date();
  786. start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
  787. picker.$emit('pick', [start, end]);
  788. }
  789. }]
  790. },
  791. }
  792. },
  793. created() {
  794. this.getList();
  795. this.todoBusinessId = this.$route.query.todoBusinessId;
  796. this.taskId = this.$route.query.tId;
  797. this.currentNodeId = this.$route.query.cId;
  798. this.statementNo = this.$route.query.sNo;
  799. this.reportNo = typeof(this.$route.query.rNo)==undefined?null:this.$route.query.rNo;
  800. if(this.todoBusinessId){
  801. this.productionListDialog = true;
  802. this.productionList(this.todoBusinessId,this.reportNo==null?this.statementNo:this.reportNo)
  803. }
  804. },
  805. methods: {
  806. resetSearch() {
  807. this.$router.push({ query: {} });
  808. this.orderDate = '';
  809. this.listQuery = {
  810. current: 1,
  811. size: 10,
  812. descs: 'id',
  813. }
  814. this.getList()
  815. },
  816. searchList() {
  817. // 重置分页
  818. this.listQuery.page = 1;
  819. this.listQuery.size = 10;
  820. if (this.orderDate){
  821. this.listQuery.startDate = this.orderDate[0]+' 00:00:00';
  822. this.listQuery.endDate = this.orderDate[1]+ ' 23:59:59';
  823. }
  824. this.getList()
  825. },
  826. getList() {
  827. this.$api.majorProduction.myOrder(Object.assign({}, this.listQuery)).then(res=>{
  828. if (res.code ===200){
  829. this.pageData = res.data;
  830. }
  831. })
  832. },
  833. aliasProductionType(code){
  834. if (code === 'STATEMENT'){
  835. return '价值意见书';
  836. }
  837. if (code === 'LETTER'){
  838. return '复评函';
  839. }
  840. return '报告';
  841. },
  842. openShouldAmountDialog(row){
  843. this.shouldAmountDialog = true;
  844. this.fund.id = row.orderFundId;
  845. this.fund.businessType = 'MAJOR_BUSINESS';
  846. this.fund.businessId= row.id;
  847. this.fund.orderFundId = row.orderFundId;
  848. this.fund.shouldAmount = row.shouldAmount;
  849. this.fund.remark = row.remark;
  850. this.fund.orderId = row.orderId;
  851. this.fund.orderName = row.orderName;
  852. },
  853. saveShouldAmount(){
  854. this.$refs.fund.validate(valid=>{
  855. if (valid){
  856. if(this.fund.orderFundId){
  857. this.$api.orderFund.edit(this.fund).then(res=>{
  858. if (res.code ===200 && res.data){
  859. this.$notify({
  860. title: '成功',
  861. message: '订单应收款已完善',
  862. type: 'success',
  863. duration: 1000
  864. });
  865. this.getList();
  866. this.shouldAmountDialog = false;
  867. }else{
  868. this.$notify({
  869. title: '失败',
  870. message: '订单应收款保存错误',
  871. type: 'error',
  872. duration: 1000
  873. });
  874. }
  875. })
  876. }else {
  877. this.$api.orderFund.add(this.fund).then(res=>{
  878. if (res.code ===200 && res.data){
  879. this.$notify({
  880. title: '成功',
  881. message: '订单应收款已完善',
  882. type: 'success',
  883. duration: 1000
  884. });
  885. this.getList();
  886. this.shouldAmountDialog = false;
  887. }else {
  888. this.$notify({
  889. title: '失败',
  890. message: '订单应收款保存错误',
  891. type: 'error',
  892. duration: 1000
  893. });
  894. }
  895. })
  896. }
  897. }
  898. })
  899. },
  900. cleanData(){
  901. this.fund.shouldAmount = null;
  902. this.fund.id = null;
  903. this.fund.businessType=null;
  904. this.fund.remark=null;
  905. this.fund.businessType=null;
  906. this.fund.businessId=null;
  907. this.fund.businessSubId=null;
  908. this.fund.productionFundId =null;
  909. this.fund.remark = null;
  910. this.fund.evaluateAmount = null
  911. },
  912. getFinanceInvoiceList(){
  913. this.$api.financeInvoice.getList(this.invoice.orderFundId).then(res=>{
  914. if (res.code === 200){
  915. this.invoiceData = res.data
  916. }
  917. })
  918. },
  919. openFinanceInvoiceDialog(orderFundId){
  920. if (!orderFundId){
  921. this.$notify({
  922. title: '提示',
  923. message: '请先完善应收款,再操作。',
  924. type: 'info',
  925. duration: 2000
  926. });
  927. return;
  928. }
  929. this.makeInvoiceListDialog = true;
  930. if (orderFundId){
  931. this.invoice.orderFundId = orderFundId;
  932. this.getFinanceInvoiceList();
  933. }
  934. },
  935. openNewInvoiceDialog(){
  936. if (!this.invoice.orderFundId){
  937. this.$notify({
  938. title: '提示',
  939. message: '申请开票前,请先完善应收款金额。',
  940. type: 'info',
  941. duration: 2000
  942. });
  943. return ;
  944. }else {
  945. this.newInvoiceDialog = true;
  946. }
  947. },
  948. saveInvoice(){
  949. this.$refs.invoice.validate(valid=>{
  950. if (valid){
  951. if (this.invoice.id){
  952. this.$api.financeInvoice.edit(this.invoice).then(res=>{
  953. if (res.code ===200 && res.data){
  954. this.$notify({
  955. title: '成功',
  956. message: '开票申请修改成功',
  957. type: 'success',
  958. duration: 2000
  959. });
  960. this.getFinanceInvoiceList();
  961. this.newInvoiceDialog = false;
  962. }else{
  963. this.$notify({
  964. title: '失败',
  965. message: '开票申请修改失败',
  966. type: 'error',
  967. duration: 2000
  968. });
  969. }
  970. })
  971. }else{
  972. this.$api.financeInvoice.add(this.invoice).then(res=>{
  973. if (res.code ===200 && res.data){
  974. this.$notify({
  975. title: '成功',
  976. message: '开票申请提交成功',
  977. type: 'success',
  978. duration: 2000
  979. });
  980. this.getFinanceInvoiceList();
  981. this.newInvoiceDialog = false;
  982. }else{
  983. this.$notify({
  984. title: '失败',
  985. message: '开票申请提交失败',
  986. type: 'error',
  987. duration: 2000
  988. });
  989. }
  990. })
  991. }
  992. }
  993. })
  994. },
  995. cleanFinanceInvoiceForm(){
  996. },
  997. invoiceDetail(id){
  998. this.$api.financeInvoice.detail(id).then(res=>{
  999. if (res.code===200){
  1000. this.invoice = res.data;
  1001. }
  1002. })
  1003. this.newInvoiceDialog = true;
  1004. },
  1005. cancellation(id){
  1006. this.$confirm('请确认是否作废此开票?', '提示',{
  1007. confirmButtonText: '确定',
  1008. cancelButtonText: '取消',
  1009. type: 'warning',
  1010. center: true
  1011. }).then(()=>{
  1012. this.$api.financeInvoice.cancellation(id).then(res=>{
  1013. if (res.code === 200 && res.data){
  1014. this.$notify({
  1015. title: '成功',
  1016. message: '开票已作废',
  1017. type: 'success',
  1018. duration: 2000
  1019. });
  1020. this.getFinanceInvoiceList();
  1021. }else {
  1022. this.$notify({
  1023. title: '失败',
  1024. message: '开票作废失败',
  1025. type: 'error',
  1026. duration: 2000
  1027. });
  1028. }
  1029. })
  1030. })
  1031. },
  1032. openApplyOutWarehouseList(row){
  1033. this.getListByBizTypeProductionId('MAJOR_BUSINESS',row.id)
  1034. this.outWarehouseListDialog = true;
  1035. this.outWarehouse.productionFundId= row.productionFundId;
  1036. this.outWarehouse.realAmount = row.realAmount
  1037. this.outWarehouse.ifProductionFund = row.realAmount!=null
  1038. this.outWarehouse.id = row.id;
  1039. this.outWarehouse.businessType = 'MAJOR_BUSINESS';
  1040. },
  1041. getApplyOutList(productionFundId){
  1042. this.$api.productionOutWarehouse.getList(productionFundId).then(res=>{
  1043. if (res.code === 200){
  1044. this.outApllyList = res.data;
  1045. }
  1046. })
  1047. },
  1048. getListByBizTypeProductionId(businessType,productionId){
  1049. this.$api.productionOutWarehouse.getListByBizTypeProductionId(businessType,productionId).then(res=>{
  1050. if (res.code === 200){
  1051. this.outApllyList = res.data;
  1052. }
  1053. })
  1054. },
  1055. doApplyOut(){
  1056. let taskRecordDTO = new Object();
  1057. taskRecordDTO.recordId = this.taskId;
  1058. taskRecordDTO.taskData = this.outWarehouse;
  1059. this.$api.productionOutWarehouse.add(taskRecordDTO).then(res=>{
  1060. if (res.code === 200 && res.data){
  1061. this.$notify({
  1062. title: '成功',
  1063. message: '出库申请已提交',
  1064. type: 'success',
  1065. duration: 2000
  1066. });
  1067. this.commitNode();
  1068. this.outWarehouseDialog = false;
  1069. this.outWarehouseListDialog = false;
  1070. }else {
  1071. this.$notify({
  1072. title: '失败',
  1073. message: '出库申请提交失败',
  1074. type: 'error',
  1075. duration: 2000
  1076. });
  1077. }
  1078. })
  1079. },
  1080. outApplyCancel(id,productionId,state){
  1081. this.$confirm('请确认是否撤销此出库申请?','提示',{
  1082. confirmButtonText: '确定',
  1083. cancelButtonText: '取消',
  1084. type: 'warning',
  1085. center: true
  1086. }).then(()=>{
  1087. if (state==='审核通过'){
  1088. this.$notify({
  1089. title: '提示',
  1090. message: '出库申请已通过,无法撤销。',
  1091. type: 'info',
  1092. duration: 2000
  1093. });
  1094. return;
  1095. }
  1096. if (id){
  1097. this.$api.productionOutWarehouse.cancel(id).then(res=>{
  1098. if (res.code === 200 && res.data){
  1099. this.$notify({
  1100. title: '成功',
  1101. message: '申请已撤销',
  1102. type: 'success',
  1103. duration: 2000
  1104. });
  1105. this.getListByBizTypeProductionId('MAJOR_BUSINESS',productionId);
  1106. }
  1107. })
  1108. }
  1109. })
  1110. },
  1111. productionList(id){
  1112. this.productionListDialog = true;
  1113. this.bag.businessId = id;
  1114. if (id){
  1115. this.$api.businessProduction.bag(id).then(res=>{
  1116. if (res.code === 200){
  1117. this.bag = res.data;
  1118. }
  1119. })
  1120. }
  1121. },
  1122. aliasProductionType(code){
  1123. let name = '价值意见书';
  1124. if (code ==='REPORT'){
  1125. name = '报告';
  1126. }
  1127. if (code ==='LETTER'){
  1128. name = '复评函';
  1129. }
  1130. return name;
  1131. },
  1132. confirmDelivery(id){
  1133. this.$confirm('确认执行产品送达操作?','提示',{
  1134. confirmButtonText: '确认送达',
  1135. cancelButtonText: '取消',
  1136. type: 'warning',
  1137. center: true
  1138. }).then(()=>{
  1139. let taskRecordDTO = new Object();
  1140. taskRecordDTO.recordId = this.taskId;
  1141. taskRecordDTO.taskData = id;
  1142. this.$api.majorProduction.confirmDelivery(taskRecordDTO).then(res=>{
  1143. if (res.code ===200 && res.data ){
  1144. this.$notify({
  1145. title: '成功',
  1146. message: '产品送达状态修改成功',
  1147. type: 'success',
  1148. duration: 2000
  1149. });
  1150. this.commitNode();
  1151. // if (this.bag.businessId){
  1152. // this.$api.businessProduction.bag(this.bag.businessId,this.reportNo).then(res=>{
  1153. // if (res.code === 200){
  1154. // this.bag = res.data;
  1155. // }
  1156. // })
  1157. // }
  1158. }else {
  1159. this.$notify({
  1160. title: '失败',
  1161. message: '产品送达状态修改失败',
  1162. type: 'error',
  1163. duration: 2000
  1164. });
  1165. }
  1166. })
  1167. })
  1168. },
  1169. commitNode(){
  1170. let commit = new Object;
  1171. commit.instanceNodeId = this.currentNodeId;
  1172. commit.state = 'PASS';
  1173. commit.comments = this.outWarehouse.remark;
  1174. commit.businessMinId = this.reportNo;
  1175. commit.businessSubId = this.statementNo;
  1176. commit.ifProductionFund = this.outWarehouse.ifProductionFund;
  1177. this.$api.workflow.commit(commit).then(res=>{
  1178. if (res.code === 200 && res.data){
  1179. this.$notify({
  1180. title: '成功',
  1181. message: '工作流节点提交成功。',
  1182. type: 'success',
  1183. duration: 2000
  1184. });
  1185. }else{
  1186. this.$notify({
  1187. title: '失败',
  1188. message: '工作流节点提交失败,请联系管理员。',
  1189. type: 'error',
  1190. duration: 2000
  1191. });
  1192. }
  1193. })
  1194. },
  1195. openAllotProductionDialog(row){
  1196. if (!row.orderFundId){
  1197. this.$notify({
  1198. title: '提示',
  1199. message: '该订单还没有认领实收款,请先认领实收款后再分配给产品。',
  1200. type: 'info',
  1201. duration: 3000
  1202. });
  1203. return ;
  1204. }
  1205. this.getProductionList(row.orderFundId);
  1206. this.orderProduction.orderId = row.orderId;
  1207. this.orderProduction.orderName = row.orderName;
  1208. this.orderProduction.realAmount= row.realAmount;
  1209. this.orderProduction.orderFundId = row.orderFundId;
  1210. },
  1211. getProductionList(orderFundId){
  1212. if (orderFundId){
  1213. this.$api.businessProduction.getProductionByOrderFundId(orderFundId).then(res=>{
  1214. if (res.code === 200){
  1215. this.orderProduction.reports = res.data;
  1216. let allotAmount = res.data.map(item=>item.realAmount).reduce(function(prev,cur){
  1217. return prev + cur;
  1218. },0);
  1219. this.notAllotAmount = this.orderProduction.realAmount -allotAmount;
  1220. this.allotAmountDialog = true;
  1221. }
  1222. })
  1223. }
  1224. },
  1225. allotProduction(){
  1226. this.$api.businessProduction.allotMajorProduction(this.orderProduction).then(res=>{
  1227. if (res.code ===200 && res.data){
  1228. this.$notify({
  1229. title: '成功',
  1230. message: '实收款分配成功',
  1231. type: 'success',
  1232. duration: 2000
  1233. });
  1234. this.allotAmountDialog = false;
  1235. }else {
  1236. this.$notify({
  1237. title: '失败',
  1238. message: '实收款分配失败',
  1239. type: 'error',
  1240. duration: 2000
  1241. });
  1242. }
  1243. })
  1244. },
  1245. fliterSearch(params){
  1246. this.$api.majorProduction.myOrder(Object.assign({}, params)).then(res=>{
  1247. if (res.code ===200){
  1248. this.pageData = res.data;
  1249. }
  1250. })
  1251. },
  1252. searchList() {
  1253. // 重置分页
  1254. this.listQuery.page = 1
  1255. this.listQuery.size = 10
  1256. this.getList()
  1257. },
  1258. resetParams(){
  1259. this.$router.push({ query: {} });
  1260. this.listQuery = {
  1261. current: 1,
  1262. size: 10,
  1263. descs: 'created',
  1264. }
  1265. this.getList();
  1266. },
  1267. },
  1268. }
  1269. </script>
  1270. <style lang="scss" scoped>
  1271. /deep/.doWarehouseClass {
  1272. border-radius: 10px;
  1273. }
  1274. .real-amount{
  1275. /deep/ .el-form-item__label {
  1276. color: red;
  1277. font-weight:bold
  1278. }
  1279. }
  1280. </style>