myOrder.vue 59 KB

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