myOrder.vue 50 KB

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