myOrder.vue 60 KB

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