BillDetail.vue 100 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539
  1. <template>
  2. <j-modal
  3. :title="title"
  4. :width="width"
  5. :visible="visible"
  6. :maskClosable="false"
  7. :forceRender="true"
  8. :style="modalStyle"
  9. fullscreen
  10. switchFullscreen
  11. @cancel="handleCancel"
  12. wrapClassName="ant-modal-cust-warp"
  13. >
  14. <template slot="footer">
  15. <!--打印-->
  16. <a-button key="back" @click="handleCancel">取消(ESC)</a-button>
  17. <template v-if="isShowPrintBtn">
  18. <a-button v-if="billPrintFlag" @click="handlePrint">三联打印预览</a-button>
  19. <!--此处为解决缓存问题-->
  20. <a-button v-if="billType === '零售出库'" v-print="'#retailOutPrint'">普通打印</a-button>
  21. <a-button v-if="billType === '零售退货入库'" v-print="'#retailBackPrint'">普通打印</a-button>
  22. <a-button v-if="billType === '请购单'" v-print="'#purchaseApplyPrint'">普通打印</a-button>
  23. <a-button v-if="billType === '采购订单'" v-print="'#purchaseOrderPrint'">普通打印</a-button>
  24. <a-button v-if="billType === '采购入库'" v-print="'#purchaseInPrint'">普通打印</a-button>
  25. <a-button v-if="billType === '采购退货出库'" v-print="'#purchaseBackPrint'">普通打印</a-button>
  26. <a-button v-if="billType === '销售订单'" v-print="'#saleOrderPrint'">普通打印</a-button>
  27. <a-button v-if="billType === '销售出库'" v-print="'#saleOutPrint'">普通打印</a-button>
  28. <a-button v-if="billType === '销售退货入库'" v-print="'#saleBackPrint'">普通打印</a-button>
  29. <a-button v-if="billType === '其它入库'" v-print="'#otherInPrint'">普通打印</a-button>
  30. <a-button v-if="billType === '其它出库'" v-print="'#otherOutPrint'">普通打印</a-button>
  31. <a-button v-if="billType === '调拨出库'" v-print="'#allocationOutPrint'">普通打印</a-button>
  32. <a-button v-if="billType === '组装单'" v-print="'#assemblePrint'">普通打印</a-button>
  33. <a-button v-if="billType === '拆卸单'" v-print="'#disassemblePrint'">普通打印</a-button>
  34. <a-button v-if="billType === '盘点复盘'" v-print="'#stockCheckReplayPrint'">普通打印</a-button>
  35. </template>
  36. <!--导出Excel-->
  37. <a-button v-if="billType === '零售出库' || billType === '零售退货入库'" @click="retailExportExcel()"
  38. >导出</a-button
  39. >
  40. <a-button v-if="billType === '请购单'" @click="applyExportExcel()">导出</a-button>
  41. <a-button v-if="billType === '采购订单' || billType === '销售订单'" @click="orderExportExcel()">导出</a-button>
  42. <a-button
  43. v-if="
  44. billType === '采购入库' ||
  45. billType === '采购退货出库' ||
  46. billType === '销售出库' ||
  47. billType === '销售退货入库'
  48. "
  49. @click="purchaseSaleExportExcel()"
  50. >导出</a-button
  51. >
  52. <a-button v-if="billType === '其它入库' || billType === '其它出库'" @click="otherExportExcel()">导出</a-button>
  53. <a-button v-if="billType === '调拨出库'" @click="allocationOutExportExcel()">导出</a-button>
  54. <a-button v-if="billType === '组装单' || billType === '拆卸单'" @click="assembleExportExcel()">导出</a-button>
  55. <a-button v-if="billType === '盘点复盘'" @click="stockCheckReplayExportExcel()">导出</a-button>
  56. <!--反审核-->
  57. <a-button v-if="checkFlag && isCanBackCheck && model.status === '1'" @click="handleBackCheck()">反审核</a-button>
  58. </template>
  59. <a-form :form="form">
  60. <!--零售出库-->
  61. <template v-if="billType === '零售出库'">
  62. <section ref="print" id="retailOutPrint">
  63. <a-row class="form-row" :gutter="24">
  64. <a-col :span="6">
  65. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="会员卡号">
  66. <a-input v-decorator="['id']" hidden />
  67. {{ model.organName }}
  68. </a-form-item>
  69. </a-col>
  70. <a-col :span="6">
  71. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
  72. {{ model.operTimeStr }}
  73. </a-form-item>
  74. </a-col>
  75. <a-col :span="6">
  76. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
  77. {{ model.number }}
  78. </a-form-item>
  79. </a-col>
  80. <a-col :span="6">
  81. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收款类型">
  82. {{ model.payType }}
  83. </a-form-item>
  84. </a-col>
  85. </a-row>
  86. <a-row class="form-row" :gutter="24">
  87. <a-col :lg="18" :md="12" :sm="24">
  88. <div :style="tableWidthRetail">
  89. <a-table
  90. ref="table"
  91. size="middle"
  92. bordered
  93. rowKey="id"
  94. :pagination="false"
  95. :loading="loading"
  96. :columns="columns"
  97. :dataSource="dataSource"
  98. :scroll="scroll"
  99. style="width: 90%"
  100. >
  101. <template slot="customBarCode" slot-scope="text, record">
  102. <div :style="record.imgName ? 'float:left;line-height:30px' : 'float:left;'">
  103. {{ record.barCode }}
  104. </div>
  105. <a-popover placement="right" trigger="click">
  106. <template slot="content"
  107. ><img :src="getImgUrl(record.imgName, record.imgLarge)" width="500px"
  108. /></template>
  109. <div class="item-info" v-if="record.imgName">
  110. <img
  111. v-if="record.imgName"
  112. :src="getImgUrl(record.imgName, record.imgSmall)"
  113. class="item-img"
  114. title="查看大图"
  115. />
  116. </div>
  117. </a-popover>
  118. </template>
  119. </a-table>
  120. </div>
  121. </a-col>
  122. <a-col :span="6">
  123. <a-row class="form-row" :gutter="24">
  124. <a-col :lg="24" :md="6" :sm="6">
  125. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据金额">
  126. {{ model.changeAmount }}
  127. </a-form-item>
  128. </a-col>
  129. <a-col :lg="24" :md="6" :sm="6">
  130. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收款金额">
  131. {{ model.getAmount }}
  132. </a-form-item>
  133. </a-col>
  134. <a-col :lg="24" :md="6" :sm="6">
  135. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="找零">
  136. {{ model.backAmount }}
  137. </a-form-item>
  138. </a-col>
  139. <a-col :lg="24" :md="6" :sm="6">
  140. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收款账户">
  141. {{ model.accountName }}
  142. </a-form-item>
  143. </a-col>
  144. <a-col v-if="model.hasBackFlag" :lg="24" :md="6" :sm="6">
  145. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="退货单号">
  146. <template v-for="(item, index) in linkNumberList">
  147. <a @click="myHandleDetail(item.number)">{{ item.number }}</a
  148. ><br />
  149. </template>
  150. </a-form-item>
  151. </a-col>
  152. </a-row>
  153. </a-col>
  154. </a-row>
  155. <a-row class="form-row" :gutter="24">
  156. <a-col :lg="24" :md="24" :sm="24">
  157. <a-form-item
  158. :labelCol="labelCol"
  159. :wrapperCol="{ xs: { span: 24 }, sm: { span: 24 } }"
  160. label=""
  161. style="padding: 20px 10px"
  162. >
  163. {{ model.remark }}
  164. </a-form-item>
  165. </a-col>
  166. </a-row>
  167. </section>
  168. </template>
  169. <!--零售退货-->
  170. <template v-else-if="billType === '零售退货入库'">
  171. <section ref="print" id="retailBackPrint">
  172. <a-row class="form-row" :gutter="24">
  173. <a-col :span="6">
  174. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="会员卡号">
  175. <a-input v-decorator="['id']" hidden />
  176. {{ model.organName }}
  177. </a-form-item>
  178. </a-col>
  179. <a-col :span="6">
  180. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
  181. {{ model.operTimeStr }}
  182. </a-form-item>
  183. </a-col>
  184. <a-col :span="6">
  185. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
  186. {{ model.number }}
  187. </a-form-item>
  188. </a-col>
  189. <a-col :span="6">
  190. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联单据">
  191. <a @click="myHandleDetail(model.linkNumber)">{{ model.linkNumber }}</a>
  192. </a-form-item>
  193. </a-col>
  194. </a-row>
  195. <a-row class="form-row" :gutter="24">
  196. <a-col :lg="18" :md="12" :sm="24">
  197. <div :style="tableWidthRetail">
  198. <a-table
  199. ref="table"
  200. size="middle"
  201. bordered
  202. rowKey="id"
  203. :pagination="false"
  204. :loading="loading"
  205. :columns="columns"
  206. :dataSource="dataSource"
  207. >
  208. <template slot="customBarCode" slot-scope="text, record">
  209. <div :style="record.imgName ? 'float:left;line-height:30px' : 'float:left;'">
  210. {{ record.barCode }}
  211. </div>
  212. <a-popover placement="right" trigger="click">
  213. <template slot="content"
  214. ><img :src="getImgUrl(record.imgName, record.imgLarge)" width="500px"
  215. /></template>
  216. <div class="item-info" v-if="record.imgName">
  217. <img
  218. v-if="record.imgName"
  219. :src="getImgUrl(record.imgName, record.imgSmall)"
  220. class="item-img"
  221. title="查看大图"
  222. />
  223. </div>
  224. </a-popover>
  225. </template>
  226. </a-table>
  227. </div>
  228. </a-col>
  229. <a-col :span="6">
  230. <a-row class="form-row" :gutter="24">
  231. <a-col :lg="24" :md="6" :sm="6">
  232. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据金额">
  233. {{ model.changeAmount }}
  234. </a-form-item>
  235. </a-col>
  236. <a-col :lg="24" :md="6" :sm="6">
  237. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="付款金额">
  238. {{ model.getAmount }}
  239. </a-form-item>
  240. </a-col>
  241. <a-col :lg="24" :md="6" :sm="6">
  242. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="找零">
  243. {{ model.backAmount }}
  244. </a-form-item>
  245. </a-col>
  246. <a-col :lg="24" :md="6" :sm="6">
  247. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="付款账户">
  248. {{ model.accountName }}
  249. </a-form-item>
  250. </a-col>
  251. </a-row>
  252. </a-col>
  253. </a-row>
  254. <a-row class="form-row" :gutter="24">
  255. <a-col :lg="24" :md="24" :sm="24">
  256. <a-form-item
  257. :labelCol="labelCol"
  258. :wrapperCol="{ xs: { span: 24 }, sm: { span: 24 } }"
  259. label=""
  260. style="padding: 20px 10px"
  261. >
  262. {{ model.remark }}
  263. </a-form-item>
  264. </a-col>
  265. </a-row>
  266. </section>
  267. </template>
  268. <!--请购单-->
  269. <template v-else-if="billType === '请购单'">
  270. <section ref="print" id="purchaseApplyPrint">
  271. <a-row class="form-row" :gutter="24">
  272. <a-col :span="6">
  273. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
  274. {{ model.operTimeStr }}
  275. </a-form-item>
  276. </a-col>
  277. <a-col :span="6">
  278. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
  279. {{ model.number }}
  280. </a-form-item>
  281. </a-col>
  282. <a-col :span="6"> </a-col>
  283. <a-col :span="6"> </a-col>
  284. </a-row>
  285. <div :style="tableWidth">
  286. <a-table
  287. ref="table"
  288. size="middle"
  289. bordered
  290. rowKey="id"
  291. :pagination="false"
  292. :loading="loading"
  293. :columns="columns"
  294. :dataSource="dataSource"
  295. >
  296. <template slot="customBarCode" slot-scope="text, record">
  297. <div :style="record.imgName ? 'float:left;line-height:30px' : 'float:left;'">{{ record.barCode }}</div>
  298. <a-popover placement="right" trigger="click">
  299. <template slot="content"
  300. ><img :src="getImgUrl(record.imgName, record.imgLarge)" width="500px"
  301. /></template>
  302. <div class="item-info" v-if="record.imgName">
  303. <img
  304. v-if="record.imgName"
  305. :src="getImgUrl(record.imgName, record.imgSmall)"
  306. class="item-img"
  307. title="查看大图"
  308. />
  309. </div>
  310. </a-popover>
  311. </template>
  312. </a-table>
  313. </div>
  314. <a-row class="form-row" :gutter="24">
  315. <a-col :lg="24" :md="24" :sm="24">
  316. <a-form-item
  317. :labelCol="labelCol"
  318. :wrapperCol="{ xs: { span: 24 }, sm: { span: 24 } }"
  319. label=""
  320. style="padding: 20px 10px"
  321. >
  322. {{ model.remark }}
  323. </a-form-item>
  324. </a-col>
  325. </a-row>
  326. </section>
  327. </template>
  328. <!--采购订单-->
  329. <template v-else-if="billType === '采购订单'">
  330. <section ref="print" id="purchaseOrderPrint">
  331. <a-row class="form-row" :gutter="24">
  332. <a-col :span="6">
  333. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="供应商">
  334. <a-input v-decorator="['id']" hidden />
  335. {{ model.organName }}
  336. </a-form-item>
  337. </a-col>
  338. <a-col :span="6">
  339. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
  340. {{ model.operTimeStr }}
  341. </a-form-item>
  342. </a-col>
  343. <a-col :span="6">
  344. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
  345. {{ model.number }}
  346. </a-form-item>
  347. </a-col>
  348. <a-col :span="6" v-if="model.linkApply">
  349. <a-form-item
  350. :labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
  351. :wrapperCol="wrapperCol"
  352. label="关联请购单"
  353. >
  354. <a @click="myHandleDetail(model.linkApply)">{{ model.linkApply }}</a>
  355. </a-form-item>
  356. </a-col>
  357. <a-col :span="6" v-if="model.linkNumber">
  358. <a-form-item v-if="purchaseBySaleFlag" :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联订单">
  359. {{ model.linkNumber }}
  360. </a-form-item>
  361. </a-col>
  362. </a-row>
  363. <div :style="tableWidth">
  364. <a-table
  365. ref="table"
  366. size="middle"
  367. bordered
  368. rowKey="id"
  369. :pagination="false"
  370. :loading="loading"
  371. :columns="columns"
  372. :dataSource="dataSource"
  373. >
  374. <template slot="customBarCode" slot-scope="text, record">
  375. <div :style="record.imgName ? 'float:left;line-height:30px' : 'float:left;'">{{ record.barCode }}</div>
  376. <a-popover placement="right" trigger="click">
  377. <template slot="content"
  378. ><img :src="getImgUrl(record.imgName, record.imgLarge)" width="500px"
  379. /></template>
  380. <div class="item-info" v-if="record.imgName">
  381. <img
  382. v-if="record.imgName"
  383. :src="getImgUrl(record.imgName, record.imgSmall)"
  384. class="item-img"
  385. title="查看大图"
  386. />
  387. </div>
  388. </a-popover>
  389. </template>
  390. </a-table>
  391. </div>
  392. <a-row class="form-row" :gutter="24">
  393. <a-col :lg="24" :md="24" :sm="24">
  394. <a-form-item
  395. :labelCol="labelCol"
  396. :wrapperCol="{ xs: { span: 24 }, sm: { span: 24 } }"
  397. label=""
  398. style="padding: 20px 10px"
  399. >
  400. {{ model.remark }}
  401. </a-form-item>
  402. </a-col>
  403. </a-row>
  404. <a-row class="form-row" :gutter="24">
  405. <a-col :span="6">
  406. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优惠率">
  407. {{ model.discount }}%
  408. </a-form-item>
  409. </a-col>
  410. <a-col :span="6">
  411. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="付款优惠">
  412. {{ model.discountMoney }}
  413. </a-form-item>
  414. </a-col>
  415. <a-col :span="6">
  416. <a-form-item
  417. :labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
  418. :wrapperCol="wrapperCol"
  419. label="优惠后金额"
  420. >
  421. {{ model.discountLastMoney }}
  422. </a-form-item>
  423. </a-col>
  424. <a-col :span="6"></a-col>
  425. </a-row>
  426. <a-row class="form-row" :gutter="24">
  427. <a-col :span="6">
  428. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="结算账户">
  429. {{ model.accountName }}
  430. </a-form-item>
  431. </a-col>
  432. <a-col :span="6">
  433. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="支付订金">
  434. {{ model.changeAmount }}
  435. </a-form-item>
  436. </a-col>
  437. <a-col :span="6"></a-col>
  438. <a-col :span="6"></a-col>
  439. </a-row>
  440. </section>
  441. </template>
  442. <!--采购入库-->
  443. <template v-else-if="billType === '采购入库'">
  444. <section ref="print" id="purchaseInPrint">
  445. <a-row class="form-row" :gutter="24">
  446. <a-col :span="6">
  447. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="供应商">
  448. <a-input v-decorator="['id']" hidden />
  449. {{ model.organName }}
  450. </a-form-item>
  451. </a-col>
  452. <a-col :span="6">
  453. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
  454. {{ model.operTimeStr }}
  455. </a-form-item>
  456. </a-col>
  457. <a-col :span="6">
  458. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
  459. {{ model.number }}
  460. </a-form-item>
  461. </a-col>
  462. <a-col :span="6">
  463. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联订单">
  464. <a @click="myHandleDetail(model.linkNumber)">{{ model.linkNumber }}</a>
  465. </a-form-item>
  466. </a-col>
  467. </a-row>
  468. <div>
  469. <a-table
  470. ref="table"
  471. size="middle"
  472. bordered
  473. rowKey="id"
  474. :pagination="false"
  475. :loading="loading"
  476. :columns="columns"
  477. :dataSource="dataSource"
  478. :scroll="{ x: 1500, y: 300 }"
  479. >
  480. <template slot="customBarCode" slot-scope="text, record">
  481. <div :style="record.imgName ? 'float:left;line-height:30px' : 'float:left;'">{{ record.barCode }}</div>
  482. <a-popover placement="right" trigger="click">
  483. <template slot="content"
  484. ><img :src="getImgUrl(record.imgName, record.imgLarge)" width="500px"
  485. /></template>
  486. <div class="item-info" v-if="record.imgName">
  487. <img
  488. v-if="record.imgName"
  489. :src="getImgUrl(record.imgName, record.imgSmall)"
  490. class="item-img"
  491. title="查看大图"
  492. />
  493. </div>
  494. </a-popover>
  495. </template>
  496. </a-table>
  497. </div>
  498. <a-row class="form-row" :gutter="24">
  499. <a-col :lg="24" :md="24" :sm="24">
  500. <a-form-item
  501. :labelCol="labelCol"
  502. :wrapperCol="{ xs: { span: 24 }, sm: { span: 24 } }"
  503. label=""
  504. style="padding: 20px 10px"
  505. >
  506. {{ model.remark }}
  507. </a-form-item>
  508. </a-col>
  509. </a-row>
  510. <a-row class="form-row" :gutter="24">
  511. <a-col :span="6">
  512. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优惠率">
  513. {{ model.discount }}%
  514. </a-form-item>
  515. </a-col>
  516. <a-col :span="6">
  517. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="付款优惠">
  518. {{ model.discountMoney }}
  519. </a-form-item>
  520. </a-col>
  521. <a-col :span="6">
  522. <a-form-item
  523. :labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
  524. :wrapperCol="wrapperCol"
  525. label="优惠后金额"
  526. >
  527. {{ model.discountLastMoney }}
  528. </a-form-item>
  529. </a-col>
  530. <a-col :span="6">
  531. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="其它费用">
  532. {{ model.otherMoney }}
  533. </a-form-item>
  534. </a-col>
  535. </a-row>
  536. <a-row class="form-row" :gutter="24">
  537. <a-col :span="6">
  538. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="结算账户">
  539. {{ model.accountName }}
  540. </a-form-item>
  541. </a-col>
  542. <a-col v-if="model.deposit" :span="6">
  543. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="扣除订金">
  544. {{ model.deposit }}
  545. </a-form-item>
  546. </a-col>
  547. <a-col :span="6">
  548. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次付款">
  549. {{ model.changeAmount }}
  550. </a-form-item>
  551. </a-col>
  552. <a-col :span="6">
  553. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次欠款">
  554. {{ model.debt }}
  555. </a-form-item>
  556. </a-col>
  557. <a-col v-if="model.hasBackFlag" :span="6">
  558. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="退货单号">
  559. <template v-for="(item, index) in linkNumberList">
  560. <a @click="myHandleDetail(item.number)">{{ item.number }}</a
  561. ><br />
  562. </template>
  563. </a-form-item>
  564. </a-col>
  565. </a-row>
  566. <a-row class="form-row" :gutter="24">
  567. <a-col v-if="financialBillNoList.length" :span="6">
  568. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="付款单号">
  569. <template v-for="(item, index) in financialBillNoList">
  570. <a @click="myHandleFinancialDetail(item.billNo)">{{ item.billNo }}</a
  571. ><br />
  572. </template>
  573. </a-form-item>
  574. </a-col>
  575. </a-row>
  576. </section>
  577. </template>
  578. <!--采购退货-->
  579. <template v-else-if="billType === '采购退货出库'">
  580. <section ref="print" id="purchaseBackPrint">
  581. <a-row class="form-row" :gutter="24">
  582. <a-col :span="6">
  583. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="供应商">
  584. <a-input v-decorator="['id']" hidden />
  585. {{ model.organName }}
  586. </a-form-item>
  587. </a-col>
  588. <a-col :span="6">
  589. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
  590. {{ model.operTimeStr }}
  591. </a-form-item>
  592. </a-col>
  593. <a-col :span="6">
  594. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
  595. {{ model.number }}
  596. </a-form-item>
  597. </a-col>
  598. <a-col :span="6">
  599. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联单据">
  600. <a @click="myHandleDetail(model.linkNumber)">{{ model.linkNumber }}</a>
  601. </a-form-item>
  602. </a-col>
  603. </a-row>
  604. <div :style="tableWidth">
  605. <a-table
  606. ref="table"
  607. size="middle"
  608. bordered
  609. rowKey="id"
  610. :pagination="false"
  611. :loading="loading"
  612. :columns="columns"
  613. :dataSource="dataSource"
  614. >
  615. <template slot="customBarCode" slot-scope="text, record">
  616. <div :style="record.imgName ? 'float:left;line-height:30px' : 'float:left;'">{{ record.barCode }}</div>
  617. <a-popover placement="right" trigger="click">
  618. <template slot="content"
  619. ><img :src="getImgUrl(record.imgName, record.imgLarge)" width="500px"
  620. /></template>
  621. <div class="item-info" v-if="record.imgName">
  622. <img
  623. v-if="record.imgName"
  624. :src="getImgUrl(record.imgName, record.imgSmall)"
  625. class="item-img"
  626. title="查看大图"
  627. />
  628. </div>
  629. </a-popover>
  630. </template>
  631. </a-table>
  632. </div>
  633. <a-row class="form-row" :gutter="24">
  634. <a-col :lg="24" :md="24" :sm="24">
  635. <a-form-item
  636. :labelCol="labelCol"
  637. :wrapperCol="{ xs: { span: 24 }, sm: { span: 24 } }"
  638. label=""
  639. style="padding: 20px 10px"
  640. >
  641. {{ model.remark }}
  642. </a-form-item>
  643. </a-col>
  644. </a-row>
  645. <a-row class="form-row" :gutter="24">
  646. <a-col :span="6">
  647. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优惠率">
  648. {{ model.discount }}%
  649. </a-form-item>
  650. </a-col>
  651. <a-col :span="6">
  652. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="退款优惠">
  653. {{ model.discountMoney }}
  654. </a-form-item>
  655. </a-col>
  656. <a-col :span="6">
  657. <a-form-item
  658. :labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
  659. :wrapperCol="wrapperCol"
  660. label="优惠后金额"
  661. >
  662. {{ model.discountLastMoney }}
  663. </a-form-item>
  664. </a-col>
  665. <a-col :span="6">
  666. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="其它费用">
  667. {{ model.otherMoney }}
  668. </a-form-item>
  669. </a-col>
  670. </a-row>
  671. <a-row class="form-row" :gutter="24">
  672. <a-col :span="6">
  673. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="结算账户">
  674. {{ model.accountName }}
  675. </a-form-item>
  676. </a-col>
  677. <a-col :span="6">
  678. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次退款">
  679. {{ model.changeAmount }}
  680. </a-form-item>
  681. </a-col>
  682. <a-col :span="6">
  683. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次欠款">
  684. {{ model.debt }}
  685. </a-form-item>
  686. </a-col>
  687. <a-col :span="6"> </a-col>
  688. </a-row>
  689. </section>
  690. </template>
  691. <!--销售订单-->
  692. <template v-else-if="billType === '销售订单'">
  693. <section ref="print" id="saleOrderPrint">
  694. <a-row class="form-row" :gutter="24">
  695. <a-col :span="6">
  696. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="客户">
  697. <a-input v-decorator="['id']" hidden />
  698. {{ model.organName }}
  699. </a-form-item>
  700. </a-col>
  701. <a-col :span="6">
  702. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
  703. {{ model.operTimeStr }}
  704. </a-form-item>
  705. </a-col>
  706. <a-col :span="6">
  707. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
  708. {{ model.number }}
  709. </a-form-item>
  710. </a-col>
  711. <a-col :span="6">
  712. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="销售人员">
  713. {{ model.salesManStr }}
  714. </a-form-item>
  715. </a-col>
  716. </a-row>
  717. <div :style="tableWidth">
  718. <a-table
  719. ref="table"
  720. size="middle"
  721. bordered
  722. rowKey="id"
  723. :pagination="false"
  724. :loading="loading"
  725. :columns="columns"
  726. :dataSource="dataSource"
  727. >
  728. <template slot="customBarCode" slot-scope="text, record">
  729. <div :style="record.imgName ? 'float:left;line-height:30px' : 'float:left;'">{{ record.barCode }}</div>
  730. <a-popover placement="right" trigger="click">
  731. <template slot="content"
  732. ><img :src="getImgUrl(record.imgName, record.imgLarge)" width="500px"
  733. /></template>
  734. <div class="item-info" v-if="record.imgName">
  735. <img
  736. v-if="record.imgName"
  737. :src="getImgUrl(record.imgName, record.imgSmall)"
  738. class="item-img"
  739. title="查看大图"
  740. />
  741. </div>
  742. </a-popover>
  743. </template>
  744. </a-table>
  745. </div>
  746. <a-row class="form-row" :gutter="24">
  747. <a-col :lg="24" :md="24" :sm="24">
  748. <a-form-item
  749. :labelCol="labelCol"
  750. :wrapperCol="{ xs: { span: 24 }, sm: { span: 24 } }"
  751. label=""
  752. style="padding: 20px 10px"
  753. >
  754. {{ model.remark }}
  755. </a-form-item>
  756. </a-col>
  757. </a-row>
  758. <a-row class="form-row" :gutter="24">
  759. <a-col :span="6">
  760. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优惠率">
  761. {{ model.discount }}%
  762. </a-form-item>
  763. </a-col>
  764. <a-col :span="6">
  765. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="付款优惠">
  766. {{ model.discountMoney }}
  767. </a-form-item>
  768. </a-col>
  769. <a-col :span="6">
  770. <a-form-item
  771. :labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
  772. :wrapperCol="wrapperCol"
  773. label="优惠后金额"
  774. >
  775. {{ model.discountLastMoney }}
  776. </a-form-item>
  777. </a-col>
  778. <a-col :span="6"></a-col>
  779. </a-row>
  780. <a-row class="form-row" :gutter="24">
  781. <a-col :span="6">
  782. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="结算账户">
  783. {{ model.accountName }}
  784. </a-form-item>
  785. </a-col>
  786. <a-col :span="6">
  787. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收取订金">
  788. {{ model.changeAmount }}
  789. </a-form-item>
  790. </a-col>
  791. <a-col :span="6"></a-col>
  792. <a-col :span="6"></a-col>
  793. </a-row>
  794. </section>
  795. </template>
  796. <!--销售出库-->
  797. <template v-else-if="billType === '销售出库'">
  798. <section ref="print" id="saleOutPrint">
  799. <a-row class="form-row" :gutter="24">
  800. <a-col :span="6">
  801. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="客户">
  802. <a-input v-decorator="['id']" hidden />
  803. {{ model.organName }}
  804. </a-form-item>
  805. </a-col>
  806. <a-col :span="6">
  807. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
  808. {{ model.operTimeStr }}
  809. </a-form-item>
  810. </a-col>
  811. <a-col :span="6">
  812. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
  813. {{ model.number }}
  814. </a-form-item>
  815. </a-col>
  816. <a-col :span="6">
  817. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联订单">
  818. <a @click="myHandleDetail(model.linkNumber)">{{ model.linkNumber }}</a>
  819. </a-form-item>
  820. </a-col>
  821. </a-row>
  822. <div :style="tableWidth">
  823. <a-table
  824. ref="table"
  825. size="middle"
  826. bordered
  827. rowKey="id"
  828. :pagination="false"
  829. :loading="loading"
  830. :columns="columns"
  831. :dataSource="dataSource"
  832. >
  833. <template slot="customBarCode" slot-scope="text, record">
  834. <div :style="record.imgName ? 'float:left;line-height:30px' : 'float:left;'">{{ record.barCode }}</div>
  835. <a-popover placement="right" trigger="click">
  836. <template slot="content"
  837. ><img :src="getImgUrl(record.imgName, record.imgLarge)" width="500px"
  838. /></template>
  839. <div class="item-info" v-if="record.imgName">
  840. <img
  841. v-if="record.imgName"
  842. :src="getImgUrl(record.imgName, record.imgSmall)"
  843. class="item-img"
  844. title="查看大图"
  845. />
  846. </div>
  847. </a-popover>
  848. </template>
  849. </a-table>
  850. </div>
  851. <a-row class="form-row" :gutter="24">
  852. <a-col :lg="24" :md="24" :sm="24">
  853. <a-form-item
  854. :labelCol="labelCol"
  855. :wrapperCol="{ xs: { span: 24 }, sm: { span: 24 } }"
  856. label=""
  857. style="padding: 20px 10px"
  858. >
  859. {{ model.remark }}
  860. </a-form-item>
  861. </a-col>
  862. </a-row>
  863. <a-row class="form-row" :gutter="24">
  864. <a-col :span="6">
  865. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优惠率">
  866. {{ model.discount }}%
  867. </a-form-item>
  868. </a-col>
  869. <a-col :span="6">
  870. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收款优惠">
  871. {{ model.discountMoney }}
  872. </a-form-item>
  873. </a-col>
  874. <a-col :span="6">
  875. <a-form-item
  876. :labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
  877. :wrapperCol="wrapperCol"
  878. label="优惠后金额"
  879. >
  880. {{ model.discountLastMoney }}
  881. </a-form-item>
  882. </a-col>
  883. <a-col :span="6">
  884. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="其它费用">
  885. {{ model.otherMoney }}
  886. </a-form-item>
  887. </a-col>
  888. </a-row>
  889. <a-row class="form-row" :gutter="24">
  890. <a-col :span="6">
  891. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="结算账户">
  892. {{ model.accountName }}
  893. </a-form-item>
  894. </a-col>
  895. <a-col v-if="model.deposit" :span="6">
  896. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="扣除订金">
  897. {{ model.deposit }}
  898. </a-form-item>
  899. </a-col>
  900. <a-col :span="6">
  901. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次收款">
  902. {{ model.changeAmount }}
  903. </a-form-item>
  904. </a-col>
  905. <a-col :span="6">
  906. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次欠款">
  907. {{ model.debt }}
  908. </a-form-item>
  909. </a-col>
  910. <a-col v-if="model.hasBackFlag" :span="6">
  911. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="退货单号">
  912. <template v-for="(item, index) in linkNumberList">
  913. <a @click="myHandleDetail(item.number)">{{ item.number }}</a
  914. ><br />
  915. </template>
  916. </a-form-item>
  917. </a-col>
  918. </a-row>
  919. <a-row class="form-row" :gutter="24">
  920. <a-col :span="6">
  921. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="销售人员">
  922. {{ model.salesManStr }}
  923. </a-form-item>
  924. </a-col>
  925. <a-col v-if="financialBillNoList.length" :span="6">
  926. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收款单号">
  927. <template v-for="(item, index) in financialBillNoList">
  928. <a @click="myHandleFinancialDetail(item.billNo)">{{ item.billNo }}</a
  929. ><br />
  930. </template>
  931. </a-form-item>
  932. </a-col>
  933. </a-row>
  934. </section>
  935. </template>
  936. <!--销售退货-->
  937. <template v-else-if="billType === '销售退货入库'">
  938. <section ref="print" id="saleBackPrint">
  939. <a-row class="form-row" :gutter="24">
  940. <a-col :span="6">
  941. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="客户">
  942. <a-input v-decorator="['id']" hidden />
  943. {{ model.organName }}
  944. </a-form-item>
  945. </a-col>
  946. <a-col :span="6">
  947. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
  948. {{ model.operTimeStr }}
  949. </a-form-item>
  950. </a-col>
  951. <a-col :span="6">
  952. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
  953. {{ model.number }}
  954. </a-form-item>
  955. </a-col>
  956. <a-col :span="6">
  957. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联单据">
  958. <a @click="myHandleDetail(model.linkNumber)">{{ model.linkNumber }}</a>
  959. </a-form-item>
  960. </a-col>
  961. </a-row>
  962. <div :style="tableWidth">
  963. <a-table
  964. ref="table"
  965. size="middle"
  966. bordered
  967. rowKey="id"
  968. :pagination="false"
  969. :loading="loading"
  970. :columns="columns"
  971. :dataSource="dataSource"
  972. >
  973. <template slot="customBarCode" slot-scope="text, record">
  974. <div :style="record.imgName ? 'float:left;line-height:30px' : 'float:left;'">{{ record.barCode }}</div>
  975. <a-popover placement="right" trigger="click">
  976. <template slot="content"
  977. ><img :src="getImgUrl(record.imgName, record.imgLarge)" width="500px"
  978. /></template>
  979. <div class="item-info" v-if="record.imgName">
  980. <img
  981. v-if="record.imgName"
  982. :src="getImgUrl(record.imgName, record.imgSmall)"
  983. class="item-img"
  984. title="查看大图"
  985. />
  986. </div>
  987. </a-popover>
  988. </template>
  989. </a-table>
  990. </div>
  991. <a-row class="form-row" :gutter="24">
  992. <a-col :lg="24" :md="24" :sm="24">
  993. <a-form-item
  994. :labelCol="labelCol"
  995. :wrapperCol="{ xs: { span: 24 }, sm: { span: 24 } }"
  996. label=""
  997. style="padding: 20px 10px"
  998. >
  999. {{ model.remark }}
  1000. </a-form-item>
  1001. </a-col>
  1002. </a-row>
  1003. <a-row class="form-row" :gutter="24">
  1004. <a-col :span="6">
  1005. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优惠率">
  1006. {{ model.discount }}%
  1007. </a-form-item>
  1008. </a-col>
  1009. <a-col :span="6">
  1010. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="退款优惠">
  1011. {{ model.discountMoney }}
  1012. </a-form-item>
  1013. </a-col>
  1014. <a-col :span="6">
  1015. <a-form-item
  1016. :labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
  1017. :wrapperCol="wrapperCol"
  1018. label="优惠后金额"
  1019. >
  1020. {{ model.discountLastMoney }}
  1021. </a-form-item>
  1022. </a-col>
  1023. <a-col :span="6">
  1024. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="其它费用">
  1025. {{ model.otherMoney }}
  1026. </a-form-item>
  1027. </a-col>
  1028. </a-row>
  1029. <a-row class="form-row" :gutter="24">
  1030. <a-col :span="6">
  1031. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="结算账户">
  1032. {{ model.accountName }}
  1033. </a-form-item>
  1034. </a-col>
  1035. <a-col :span="6">
  1036. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次退款">
  1037. {{ model.changeAmount }}
  1038. </a-form-item>
  1039. </a-col>
  1040. <a-col :span="6">
  1041. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次欠款">
  1042. {{ model.debt }}
  1043. </a-form-item>
  1044. </a-col>
  1045. <a-col :span="6">
  1046. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="销售人员">
  1047. {{ model.salesManStr }}
  1048. </a-form-item>
  1049. </a-col>
  1050. </a-row>
  1051. </section>
  1052. </template>
  1053. <!--其它入库-->
  1054. <template v-else-if="billType === '其它入库'">
  1055. <section ref="print" id="otherInPrint">
  1056. <a-row class="form-row" :gutter="24">
  1057. <a-col :span="6">
  1058. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="供应商">
  1059. <a-input v-decorator="['id']" hidden />
  1060. {{ model.organName }}
  1061. </a-form-item>
  1062. </a-col>
  1063. <a-col :span="6">
  1064. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
  1065. {{ model.operTimeStr }}
  1066. </a-form-item>
  1067. </a-col>
  1068. <a-col :span="6">
  1069. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
  1070. {{ model.number }}
  1071. </a-form-item>
  1072. </a-col>
  1073. <a-col :span="6">
  1074. <a-form-item v-if="model.billType" :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联单据">
  1075. {{ model.linkNumber }} {{ model.billType }}
  1076. </a-form-item>
  1077. <a-form-item v-if="!model.billType" :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联单据">
  1078. <a @click="myHandleDetail(model.linkNumber)">{{ model.linkNumber }}</a>
  1079. </a-form-item>
  1080. </a-col>
  1081. </a-row>
  1082. <div :style="tableWidth">
  1083. <a-table
  1084. ref="table"
  1085. size="middle"
  1086. bordered
  1087. rowKey="id"
  1088. :pagination="false"
  1089. :loading="loading"
  1090. :columns="columns"
  1091. :dataSource="dataSource"
  1092. >
  1093. <template slot="customBarCode" slot-scope="text, record">
  1094. <div :style="record.imgName ? 'float:left;line-height:30px' : 'float:left;'">{{ record.barCode }}</div>
  1095. <a-popover placement="right" trigger="click">
  1096. <template slot="content"
  1097. ><img :src="getImgUrl(record.imgName, record.imgLarge)" width="500px"
  1098. /></template>
  1099. <div class="item-info" v-if="record.imgName">
  1100. <img
  1101. v-if="record.imgName"
  1102. :src="getImgUrl(record.imgName, record.imgSmall)"
  1103. class="item-img"
  1104. title="查看大图"
  1105. />
  1106. </div>
  1107. </a-popover>
  1108. </template>
  1109. </a-table>
  1110. </div>
  1111. <a-row class="form-row" :gutter="24">
  1112. <a-col :lg="24" :md="24" :sm="24">
  1113. <a-form-item
  1114. :labelCol="labelCol"
  1115. :wrapperCol="{ xs: { span: 24 }, sm: { span: 24 } }"
  1116. label=""
  1117. style="padding: 20px 10px"
  1118. >
  1119. {{ model.remark }}
  1120. </a-form-item>
  1121. </a-col>
  1122. </a-row>
  1123. </section>
  1124. </template>
  1125. <!--其它出库-->
  1126. <template v-else-if="billType === '其它出库'">
  1127. <section ref="print" id="otherOutPrint">
  1128. <a-row class="form-row" :gutter="24">
  1129. <a-col :span="6">
  1130. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="客户">
  1131. <a-input v-decorator="['id']" hidden />
  1132. {{ model.organName }}
  1133. </a-form-item>
  1134. </a-col>
  1135. <a-col :span="6">
  1136. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
  1137. {{ model.operTimeStr }}
  1138. </a-form-item>
  1139. </a-col>
  1140. <a-col :span="6">
  1141. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
  1142. {{ model.number }}
  1143. </a-form-item>
  1144. </a-col>
  1145. <a-col :span="6">
  1146. <a-form-item v-if="model.billType" :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联单据">
  1147. {{ model.linkNumber }} {{ model.billType }}
  1148. </a-form-item>
  1149. <a-form-item v-if="!model.billType" :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联单据">
  1150. <a @click="myHandleDetail(model.linkNumber)">{{ model.linkNumber }}</a>
  1151. </a-form-item>
  1152. </a-col>
  1153. </a-row>
  1154. <div :style="tableWidth">
  1155. <a-table
  1156. ref="table"
  1157. size="middle"
  1158. bordered
  1159. rowKey="id"
  1160. :pagination="false"
  1161. :loading="loading"
  1162. :columns="columns"
  1163. :dataSource="dataSource"
  1164. >
  1165. <template slot="customBarCode" slot-scope="text, record">
  1166. <div :style="record.imgName ? 'float:left;line-height:30px' : 'float:left;'">{{ record.barCode }}</div>
  1167. <a-popover placement="right" trigger="click">
  1168. <template slot="content"
  1169. ><img :src="getImgUrl(record.imgName, record.imgLarge)" width="500px"
  1170. /></template>
  1171. <div class="item-info" v-if="record.imgName">
  1172. <img
  1173. v-if="record.imgName"
  1174. :src="getImgUrl(record.imgName, record.imgSmall)"
  1175. class="item-img"
  1176. title="查看大图"
  1177. />
  1178. </div>
  1179. </a-popover>
  1180. </template>
  1181. </a-table>
  1182. </div>
  1183. <a-row class="form-row" :gutter="24">
  1184. <a-col :lg="24" :md="24" :sm="24">
  1185. <a-form-item
  1186. :labelCol="labelCol"
  1187. :wrapperCol="{ xs: { span: 24 }, sm: { span: 24 } }"
  1188. label=""
  1189. style="padding: 20px 10px"
  1190. >
  1191. {{ model.remark }}
  1192. </a-form-item>
  1193. </a-col>
  1194. </a-row>
  1195. </section>
  1196. </template>
  1197. <!--调拨出库-->
  1198. <template v-else-if="billType === '调拨出库'">
  1199. <section ref="print" id="allocationOutPrint">
  1200. <a-row class="form-row" :gutter="24">
  1201. <a-col :span="6">
  1202. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
  1203. {{ model.operTimeStr }}
  1204. </a-form-item>
  1205. </a-col>
  1206. <a-col :span="6">
  1207. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
  1208. {{ model.number }}
  1209. </a-form-item>
  1210. </a-col>
  1211. <a-col :span="6"></a-col>
  1212. <a-col :span="6"></a-col>
  1213. </a-row>
  1214. <div :style="tableWidth">
  1215. <a-table
  1216. ref="table"
  1217. size="middle"
  1218. bordered
  1219. rowKey="id"
  1220. :scroll="scroll"
  1221. :pagination="false"
  1222. :loading="loading"
  1223. :columns="columns"
  1224. :dataSource="dataSource"
  1225. >
  1226. <template slot="customBarCode" slot-scope="text, record">
  1227. <div :style="record.imgName ? 'float:left;line-height:30px' : 'float:left;'">{{ record.barCode }}</div>
  1228. <a-popover placement="right" trigger="click">
  1229. <template slot="content"
  1230. ><img :src="getImgUrl(record.imgName, record.imgLarge)" width="500px"
  1231. /></template>
  1232. <div class="item-info" v-if="record.imgName">
  1233. <img
  1234. v-if="record.imgName"
  1235. :src="getImgUrl(record.imgName, record.imgSmall)"
  1236. class="item-img"
  1237. title="查看大图"
  1238. />
  1239. </div>
  1240. </a-popover>
  1241. </template>
  1242. </a-table>
  1243. </div>
  1244. <a-row class="form-row" :gutter="24">
  1245. <a-col :lg="24" :md="24" :sm="24">
  1246. <a-form-item
  1247. :labelCol="labelCol"
  1248. :wrapperCol="{ xs: { span: 24 }, sm: { span: 24 } }"
  1249. label=""
  1250. style="padding: 20px 10px"
  1251. >
  1252. {{ model.remark }}
  1253. </a-form-item>
  1254. </a-col>
  1255. </a-row>
  1256. </section>
  1257. </template>
  1258. <!--组装单-->
  1259. <template v-else-if="billType === '组装单'">
  1260. <section ref="print" id="assemblePrint">
  1261. <a-row class="form-row" :gutter="24">
  1262. <a-col :span="6">
  1263. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
  1264. {{ model.operTimeStr }}
  1265. </a-form-item>
  1266. </a-col>
  1267. <a-col :span="6">
  1268. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
  1269. {{ model.number }}
  1270. </a-form-item>
  1271. </a-col>
  1272. <a-col :span="6"></a-col>
  1273. <a-col :span="6"></a-col>
  1274. </a-row>
  1275. <div :style="tableWidth">
  1276. <a-table
  1277. ref="table"
  1278. size="middle"
  1279. bordered
  1280. rowKey="id"
  1281. :pagination="false"
  1282. :loading="loading"
  1283. :columns="columns"
  1284. :dataSource="dataSource"
  1285. >
  1286. <template slot="customBarCode" slot-scope="text, record">
  1287. <div :style="record.imgName ? 'float:left;line-height:30px' : 'float:left;'">{{ record.barCode }}</div>
  1288. <a-popover placement="right" trigger="click">
  1289. <template slot="content"
  1290. ><img :src="getImgUrl(record.imgName, record.imgLarge)" width="500px"
  1291. /></template>
  1292. <div class="item-info" v-if="record.imgName">
  1293. <img
  1294. v-if="record.imgName"
  1295. :src="getImgUrl(record.imgName, record.imgSmall)"
  1296. class="item-img"
  1297. title="查看大图"
  1298. />
  1299. </div>
  1300. </a-popover>
  1301. </template>
  1302. </a-table>
  1303. </div>
  1304. <a-row class="form-row" :gutter="24">
  1305. <a-col :lg="24" :md="24" :sm="24">
  1306. <a-form-item
  1307. :labelCol="labelCol"
  1308. :wrapperCol="{ xs: { span: 24 }, sm: { span: 24 } }"
  1309. label=""
  1310. style="padding: 20px 10px"
  1311. >
  1312. {{ model.remark }}
  1313. </a-form-item>
  1314. </a-col>
  1315. </a-row>
  1316. </section>
  1317. </template>
  1318. <!--拆卸单-->
  1319. <template v-else-if="billType === '拆卸单'">
  1320. <section ref="print" id="disassemblePrint">
  1321. <a-row class="form-row" :gutter="24">
  1322. <a-col :span="6">
  1323. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
  1324. {{ model.operTimeStr }}
  1325. </a-form-item>
  1326. </a-col>
  1327. <a-col :span="6">
  1328. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
  1329. {{ model.number }}
  1330. </a-form-item>
  1331. </a-col>
  1332. <a-col :span="6"></a-col>
  1333. <a-col :span="6"></a-col>
  1334. </a-row>
  1335. <div :style="tableWidth">
  1336. <a-table
  1337. ref="table"
  1338. size="middle"
  1339. bordered
  1340. rowKey="id"
  1341. :pagination="false"
  1342. :loading="loading"
  1343. :columns="columns"
  1344. :dataSource="dataSource"
  1345. >
  1346. <template slot="customBarCode" slot-scope="text, record">
  1347. <div :style="record.imgName ? 'float:left;line-height:30px' : 'float:left;'">{{ record.barCode }}</div>
  1348. <a-popover placement="right" trigger="click">
  1349. <template slot="content"
  1350. ><img :src="getImgUrl(record.imgName, record.imgLarge)" width="500px"
  1351. /></template>
  1352. <div class="item-info" v-if="record.imgName">
  1353. <img
  1354. v-if="record.imgName"
  1355. :src="getImgUrl(record.imgName, record.imgSmall)"
  1356. class="item-img"
  1357. title="查看大图"
  1358. />
  1359. </div>
  1360. </a-popover>
  1361. </template>
  1362. </a-table>
  1363. </div>
  1364. <a-row class="form-row" :gutter="24">
  1365. <a-col :lg="24" :md="24" :sm="24">
  1366. <a-form-item
  1367. :labelCol="labelCol"
  1368. :wrapperCol="{ xs: { span: 24 }, sm: { span: 24 } }"
  1369. label=""
  1370. style="padding: 20px 10px"
  1371. >
  1372. {{ model.remark }}
  1373. </a-form-item>
  1374. </a-col>
  1375. </a-row>
  1376. </section>
  1377. </template>
  1378. <!--盘点复盘-->
  1379. <template v-else-if="billType === '盘点复盘'">
  1380. <section ref="print" id="stockCheckReplayPrint">
  1381. <a-row class="form-row" :gutter="24">
  1382. <a-col :span="6">
  1383. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
  1384. {{ model.operTimeStr }}
  1385. </a-form-item>
  1386. </a-col>
  1387. <a-col :span="6">
  1388. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
  1389. {{ model.number }}
  1390. </a-form-item>
  1391. </a-col>
  1392. <a-col :span="6">
  1393. <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联单据">
  1394. {{ model.linkNumber }}
  1395. </a-form-item>
  1396. </a-col>
  1397. <a-col :span="6"></a-col>
  1398. </a-row>
  1399. <div :style="tableWidth">
  1400. <a-table
  1401. ref="table"
  1402. size="middle"
  1403. bordered
  1404. rowKey="id"
  1405. :pagination="false"
  1406. :loading="loading"
  1407. :columns="columns"
  1408. :dataSource="dataSource"
  1409. >
  1410. <template slot="customBarCode" slot-scope="text, record">
  1411. <div :style="record.imgName ? 'float:left;line-height:30px' : 'float:left;'">{{ record.barCode }}</div>
  1412. <a-popover placement="right" trigger="click">
  1413. <template slot="content"
  1414. ><img :src="getImgUrl(record.imgName, record.imgLarge)" width="500px"
  1415. /></template>
  1416. <div class="item-info" v-if="record.imgName">
  1417. <img
  1418. v-if="record.imgName"
  1419. :src="getImgUrl(record.imgName, record.imgSmall)"
  1420. class="item-img"
  1421. title="查看大图"
  1422. />
  1423. </div>
  1424. </a-popover>
  1425. </template>
  1426. </a-table>
  1427. </div>
  1428. <a-row class="form-row" :gutter="24">
  1429. <a-col :lg="24" :md="24" :sm="24">
  1430. <a-form-item
  1431. :labelCol="labelCol"
  1432. :wrapperCol="{ xs: { span: 24 }, sm: { span: 24 } }"
  1433. label=""
  1434. style="padding: 20px 10px"
  1435. >
  1436. {{ model.remark }}
  1437. </a-form-item>
  1438. </a-col>
  1439. </a-row>
  1440. </section>
  1441. </template>
  1442. <template v-if="fileList && fileList.length > 0">
  1443. <a-row class="form-row" :gutter="24">
  1444. <a-col :span="10">
  1445. <a-form-item
  1446. :labelCol="{ xs: { span: 24 }, sm: { span: 3 } }"
  1447. :wrapperCol="{ xs: { span: 24 }, sm: { span: 21 } }"
  1448. label="附件"
  1449. >
  1450. <j-upload v-model="fileList" bizPath="bill" :disabled="true" :buttonVisible="false"></j-upload>
  1451. </a-form-item>
  1452. </a-col>
  1453. <a-col :span="14"></a-col>
  1454. </a-row>
  1455. </template>
  1456. </a-form>
  1457. <bill-print-iframe ref="modalDetail"></bill-print-iframe>
  1458. <financial-detail ref="financialDetailModal"></financial-detail>
  1459. </j-modal>
  1460. </template>
  1461. <script>
  1462. import pick from 'lodash.pick'
  1463. import { getAction, postAction, getFileAccessHttpUrl } from '@/api/manage'
  1464. import {
  1465. findBillDetailByNumber,
  1466. findFinancialDetailByNumber,
  1467. getPlatformConfigByKey,
  1468. getCurrentSystemConfig,
  1469. } from '@/api/api'
  1470. import { getMpListShort, getCheckFlag, exportXlsPost } from '@/utils/util'
  1471. import BillPrintIframe from './BillPrintIframe'
  1472. import FinancialDetail from '../../financial/dialog/FinancialDetail'
  1473. import JUpload from '@/components/jeecg/JUpload'
  1474. import Vue from 'vue'
  1475. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  1476. export default {
  1477. name: 'BillDetail',
  1478. mixins: [JeecgListMixin],
  1479. components: {
  1480. BillPrintIframe,
  1481. FinancialDetail,
  1482. JUpload,
  1483. },
  1484. data() {
  1485. return {
  1486. title: '详情',
  1487. width: '1600px',
  1488. visible: false,
  1489. modalStyle: '',
  1490. model: {},
  1491. isCanBackCheck: true,
  1492. billType: '',
  1493. billPrintFlag: false,
  1494. fileList: [],
  1495. purchaseBySaleFlag: false,
  1496. linkNumberList: [],
  1497. financialBillNoList: [],
  1498. /* 原始反审核是否开启 */
  1499. checkFlag: true,
  1500. /* 是否显示打印按钮 */
  1501. isShowPrintBtn: true,
  1502. tableWidth: {
  1503. width: '1700px',
  1504. },
  1505. tableWidthRetail: {
  1506. width: '1200px',
  1507. },
  1508. labelCol: {
  1509. xs: { span: 24 },
  1510. sm: { span: 5 },
  1511. },
  1512. wrapperCol: {
  1513. xs: { span: 24 },
  1514. sm: { span: 16 },
  1515. },
  1516. form: this.$form.createForm(this),
  1517. loading: false,
  1518. dataSource: [],
  1519. url: {
  1520. detailList: '/depotItem/getDetailList',
  1521. batchSetStatusUrl: '/depotHead/batchSetStatus',
  1522. },
  1523. //表头
  1524. columns: [],
  1525. //列定义
  1526. defColumns: [],
  1527. retailOutColumns: [
  1528. { title: '仓库名称', dataIndex: 'depotName' },
  1529. { title: '条码', dataIndex: 'barCode' },
  1530. { title: '名称', dataIndex: 'name' },
  1531. { title: '规格', dataIndex: 'standard' },
  1532. { title: '型号', dataIndex: 'model' },
  1533. { title: '颜色', dataIndex: 'color' },
  1534. { title: '品牌', dataIndex: 'brand' },
  1535. { title: '制造商', dataIndex: 'mfrs' },
  1536. { title: '扩展信息', dataIndex: 'materialOther' },
  1537. { title: '库存', dataIndex: 'stock' },
  1538. { title: '单位', dataIndex: 'unit' },
  1539. { title: '序列号', dataIndex: 'snList', width: 300 },
  1540. { title: '批号', dataIndex: 'batchNumber' },
  1541. { title: '有效期', dataIndex: 'expirationDate' },
  1542. { title: '多属性', dataIndex: 'sku' },
  1543. { title: '数量', dataIndex: 'operNumber' },
  1544. { title: '单价', dataIndex: 'unitPrice' },
  1545. { title: '金额', dataIndex: 'allPrice' },
  1546. { title: '重量', dataIndex: 'weight' },
  1547. { title: '仓位货架', dataIndex: 'position' },
  1548. { title: '备注', dataIndex: 'remark' },
  1549. ],
  1550. retailBackColumns: [
  1551. { title: '仓库名称', dataIndex: 'depotName' },
  1552. { title: '条码', dataIndex: 'barCode' },
  1553. { title: '名称', dataIndex: 'name' },
  1554. { title: '规格', dataIndex: 'standard' },
  1555. { title: '型号', dataIndex: 'model' },
  1556. { title: '颜色', dataIndex: 'color' },
  1557. { title: '品牌', dataIndex: 'brand' },
  1558. { title: '制造商', dataIndex: 'mfrs' },
  1559. { title: '扩展信息', dataIndex: 'materialOther' },
  1560. { title: '库存', dataIndex: 'stock' },
  1561. { title: '单位', dataIndex: 'unit' },
  1562. { title: '序列号', dataIndex: 'snList', width: 300 },
  1563. { title: '批号', dataIndex: 'batchNumber' },
  1564. { title: '有效期', dataIndex: 'expirationDate' },
  1565. { title: '多属性', dataIndex: 'sku' },
  1566. { title: '数量', dataIndex: 'operNumber' },
  1567. { title: '单价', dataIndex: 'unitPrice' },
  1568. { title: '金额', dataIndex: 'allPrice' },
  1569. { title: '重量', dataIndex: 'weight' },
  1570. { title: '仓位货架', dataIndex: 'position' },
  1571. { title: '备注', dataIndex: 'remark' },
  1572. ],
  1573. purchaseApplyColumns: [
  1574. { title: '条码', dataIndex: 'barCode' },
  1575. { title: '名称', dataIndex: 'name' },
  1576. { title: '规格', dataIndex: 'standard' },
  1577. { title: '型号', dataIndex: 'model' },
  1578. { title: '颜色', dataIndex: 'color' },
  1579. { title: '品牌', dataIndex: 'brand' },
  1580. { title: '制造商', dataIndex: 'mfrs' },
  1581. { title: '扩展信息', dataIndex: 'materialOther' },
  1582. { title: '单位', dataIndex: 'unit' },
  1583. { title: '多属性', dataIndex: 'sku' },
  1584. { title: '数量', dataIndex: 'operNumber' },
  1585. { title: '已采购', dataIndex: 'finishNumber' },
  1586. { title: '备注', dataIndex: 'remark' },
  1587. ],
  1588. purchaseOrderColumns: [
  1589. { title: '条码', dataIndex: 'barCode' },
  1590. { title: '名称', dataIndex: 'name' },
  1591. { title: '规格', dataIndex: 'standard' },
  1592. { title: '型号', dataIndex: 'model' },
  1593. { title: '颜色', dataIndex: 'color' },
  1594. { title: '品牌', dataIndex: 'brand' },
  1595. { title: '制造商', dataIndex: 'mfrs' },
  1596. { title: '扩展信息', dataIndex: 'materialOther' },
  1597. { title: '库存', dataIndex: 'stock' },
  1598. { title: '单位', dataIndex: 'unit' },
  1599. { title: '多属性', dataIndex: 'sku' },
  1600. { title: '数量', dataIndex: 'operNumber' },
  1601. { title: '已采购', dataIndex: 'finishNumber' },
  1602. { title: '单价', dataIndex: 'unitPrice' },
  1603. { title: '金额', dataIndex: 'allPrice' },
  1604. { title: '税率(%)', dataIndex: 'taxRate' },
  1605. { title: '税额', dataIndex: 'taxMoney' },
  1606. { title: '价税合计', dataIndex: 'taxLastMoney' },
  1607. { title: '备注', dataIndex: 'remark' },
  1608. ],
  1609. purchaseInColumns: [
  1610. { title: '批次号', dataIndex: 'batchNumber', width: 90 },
  1611. { title: '名称', dataIndex: 'name', width: 115 },
  1612. { title: '规格', dataIndex: 'standard', width: 90 },
  1613. { title: '生产日期', dataIndex: 'productionDate', width: 100 },
  1614. { title: '保质期', dataIndex: 'expiryNum', width: 60 },
  1615. { title: '商品条码', dataIndex: 'barCode', width: 90 },
  1616. { title: '仓库名称', dataIndex: 'depotName', width: 90 },
  1617. { title: '仓库货架', dataIndex: 'position', width: 90 },
  1618. { title: '包装规格', dataIndex: 'unitName', width: 90 },
  1619. { title: '型号', dataIndex: 'model', width: 60 },
  1620. { title: '颜色', dataIndex: 'color', width: 60 },
  1621. { title: '品牌', dataIndex: 'brand', width: 90 },
  1622. { title: '制造商', dataIndex: 'mfrs', width: 90 },
  1623. { title: '扩展信息', dataIndex: 'materialOther', width: 90 },
  1624. { title: '库存', dataIndex: 'stock', width: 90 },
  1625. { title: '单位', dataIndex: 'unit', width: 90 },
  1626. { title: '序列号', dataIndex: 'snList', width: 300 },
  1627. { title: '有效期', dataIndex: 'expirationDate', width: 90 },
  1628. { title: '多属性', dataIndex: 'sku', width: 90 },
  1629. { title: '数量', dataIndex: 'operNumber', width: 90 },
  1630. { title: '已入库', dataIndex: 'finishNumber', width: 90 },
  1631. { title: '单价', dataIndex: 'unitPrice', width: 90 },
  1632. { title: '金额', dataIndex: 'allPrice', width: 90 },
  1633. { title: '税率(%)', dataIndex: 'taxRate', width: 90 },
  1634. { title: '税额', dataIndex: 'taxMoney', width: 90 },
  1635. { title: '价税合计', dataIndex: 'taxLastMoney', width: 90 },
  1636. { title: '实际入库数量', dataIndex: 'actualQuantityInStorage', width: 115 },
  1637. { title: '入库差异', dataIndex: 'warehousingVariance', width: 90 },
  1638. { title: '入库差异原因', dataIndex: 'reasonOfDifference', width: 115 },
  1639. { title: '入库人', dataIndex: 'warehousingUser', width: 90 },
  1640. { title: '入库时间', dataIndex: 'warehousingTime', width: 90 },
  1641. { title: '重量', dataIndex: 'weight', width: 90 },
  1642. { title: '仓位货架', dataIndex: 'position', width: 90 },
  1643. { title: '备注', dataIndex: 'remark', width: 90 },
  1644. ],
  1645. purchaseBackColumns: [
  1646. { title: '仓库名称', dataIndex: 'depotName' },
  1647. { title: '条码', dataIndex: 'barCode' },
  1648. { title: '名称', dataIndex: 'name' },
  1649. { title: '规格', dataIndex: 'standard' },
  1650. { title: '型号', dataIndex: 'model' },
  1651. { title: '颜色', dataIndex: 'color' },
  1652. { title: '品牌', dataIndex: 'brand' },
  1653. { title: '制造商', dataIndex: 'mfrs' },
  1654. { title: '扩展信息', dataIndex: 'materialOther' },
  1655. { title: '库存', dataIndex: 'stock' },
  1656. { title: '单位', dataIndex: 'unit' },
  1657. { title: '序列号', dataIndex: 'snList', width: 300 },
  1658. { title: '批号', dataIndex: 'batchNumber' },
  1659. { title: '有效期', dataIndex: 'expirationDate' },
  1660. { title: '多属性', dataIndex: 'sku' },
  1661. { title: '数量', dataIndex: 'operNumber' },
  1662. { title: '已出库', dataIndex: 'finishNumber' },
  1663. { title: '单价', dataIndex: 'unitPrice' },
  1664. { title: '金额', dataIndex: 'allPrice' },
  1665. { title: '税率(%)', dataIndex: 'taxRate' },
  1666. { title: '税额', dataIndex: 'taxMoney' },
  1667. { title: '价税合计', dataIndex: 'taxLastMoney' },
  1668. { title: '重量', dataIndex: 'weight' },
  1669. { title: '仓位货架', dataIndex: 'position' },
  1670. { title: '备注', dataIndex: 'remark' },
  1671. ],
  1672. saleOrderColumns: [
  1673. { title: '条码', dataIndex: 'barCode' },
  1674. { title: '名称', dataIndex: 'name' },
  1675. { title: '规格', dataIndex: 'standard' },
  1676. { title: '型号', dataIndex: 'model' },
  1677. { title: '颜色', dataIndex: 'color' },
  1678. { title: '品牌', dataIndex: 'brand' },
  1679. { title: '制造商', dataIndex: 'mfrs' },
  1680. { title: '扩展信息', dataIndex: 'materialOther' },
  1681. { title: '库存', dataIndex: 'stock' },
  1682. { title: '单位', dataIndex: 'unit' },
  1683. { title: '多属性', dataIndex: 'sku' },
  1684. { title: '数量', dataIndex: 'operNumber' },
  1685. { title: '已销售', dataIndex: 'finishNumber' },
  1686. { title: '单价', dataIndex: 'unitPrice' },
  1687. { title: '金额', dataIndex: 'allPrice' },
  1688. { title: '税率(%)', dataIndex: 'taxRate' },
  1689. { title: '税额', dataIndex: 'taxMoney' },
  1690. { title: '价税合计', dataIndex: 'taxLastMoney' },
  1691. { title: '备注', dataIndex: 'remark' },
  1692. ],
  1693. saleOutColumns: [
  1694. { title: '仓库名称', dataIndex: 'depotName' },
  1695. { title: '条码', dataIndex: 'barCode' },
  1696. { title: '名称', dataIndex: 'name' },
  1697. { title: '规格', dataIndex: 'standard' },
  1698. { title: '型号', dataIndex: 'model' },
  1699. { title: '颜色', dataIndex: 'color' },
  1700. { title: '品牌', dataIndex: 'brand' },
  1701. { title: '制造商', dataIndex: 'mfrs' },
  1702. { title: '扩展信息', dataIndex: 'materialOther' },
  1703. { title: '库存', dataIndex: 'stock' },
  1704. { title: '单位', dataIndex: 'unit' },
  1705. { title: '序列号', dataIndex: 'snList', width: 300 },
  1706. { title: '批号', dataIndex: 'batchNumber' },
  1707. { title: '有效期', dataIndex: 'expirationDate' },
  1708. { title: '多属性', dataIndex: 'sku' },
  1709. { title: '数量', dataIndex: 'operNumber' },
  1710. { title: '已出库', dataIndex: 'finishNumber' },
  1711. { title: '单价', dataIndex: 'unitPrice' },
  1712. { title: '金额', dataIndex: 'allPrice' },
  1713. { title: '税率(%)', dataIndex: 'taxRate' },
  1714. { title: '税额', dataIndex: 'taxMoney' },
  1715. { title: '价税合计', dataIndex: 'taxLastMoney' },
  1716. { title: '重量', dataIndex: 'weight' },
  1717. { title: '仓位货架', dataIndex: 'position' },
  1718. { title: '备注', dataIndex: 'remark' },
  1719. ],
  1720. saleBackColumns: [
  1721. { title: '仓库名称', dataIndex: 'depotName' },
  1722. { title: '条码', dataIndex: 'barCode' },
  1723. { title: '名称', dataIndex: 'name' },
  1724. { title: '规格', dataIndex: 'standard' },
  1725. { title: '型号', dataIndex: 'model' },
  1726. { title: '颜色', dataIndex: 'color' },
  1727. { title: '品牌', dataIndex: 'brand' },
  1728. { title: '制造商', dataIndex: 'mfrs' },
  1729. { title: '扩展信息', dataIndex: 'materialOther' },
  1730. { title: '库存', dataIndex: 'stock' },
  1731. { title: '单位', dataIndex: 'unit' },
  1732. { title: '序列号', dataIndex: 'snList', width: 300 },
  1733. { title: '批号', dataIndex: 'batchNumber' },
  1734. { title: '有效期', dataIndex: 'expirationDate' },
  1735. { title: '多属性', dataIndex: 'sku' },
  1736. { title: '数量', dataIndex: 'operNumber' },
  1737. { title: '已入库', dataIndex: 'finishNumber' },
  1738. { title: '单价', dataIndex: 'unitPrice' },
  1739. { title: '金额', dataIndex: 'allPrice' },
  1740. { title: '税率(%)', dataIndex: 'taxRate' },
  1741. { title: '税额', dataIndex: 'taxMoney' },
  1742. { title: '价税合计', dataIndex: 'taxLastMoney' },
  1743. { title: '重量', dataIndex: 'weight' },
  1744. { title: '仓位货架', dataIndex: 'position' },
  1745. { title: '备注', dataIndex: 'remark' },
  1746. ],
  1747. otherInColumns: [
  1748. { title: '批次号', dataIndex: 'batchNumber', width: 90 },
  1749. { title: '名称', dataIndex: 'name', width: 115 },
  1750. { title: '规格', dataIndex: 'standard', width: 90 },
  1751. { title: '生产日期', dataIndex: 'productionDate', width: 100 },
  1752. { title: '保质期', dataIndex: 'expiryNum', width: 60 },
  1753. { title: '商品条码', dataIndex: 'barCode', width: 90 },
  1754. { title: '仓库名称', dataIndex: 'depotName', width: 90 },
  1755. { title: '仓库货架', dataIndex: 'position', width: 90 },
  1756. { title: '包装规格', dataIndex: 'unitName', width: 90 },
  1757. { title: '型号', dataIndex: 'model', width: 60 },
  1758. { title: '颜色', dataIndex: 'color', width: 60 },
  1759. { title: '品牌', dataIndex: 'brand', width: 90 },
  1760. { title: '制造商', dataIndex: 'mfrs', width: 90 },
  1761. { title: '扩展信息', dataIndex: 'materialOther', width: 90 },
  1762. { title: '库存', dataIndex: 'stock', width: 90 },
  1763. { title: '单位', dataIndex: 'unit', width: 90 },
  1764. { title: '序列号', dataIndex: 'snList', width: 300 },
  1765. { title: '有效期', dataIndex: 'expirationDate', width: 90 },
  1766. { title: '多属性', dataIndex: 'sku', width: 90 },
  1767. { title: '数量', dataIndex: 'operNumber', width: 90 },
  1768. { title: '单价', dataIndex: 'unitPrice', width: 90 },
  1769. { title: '金额', dataIndex: 'allPrice', width: 90 },
  1770. { title: '实际入库数量', dataIndex: 'actualQuantityInStorage', width: 115 },
  1771. { title: '入库差异', dataIndex: 'warehousingVariance', width: 90 },
  1772. { title: '入库差异原因', dataIndex: 'reasonOfDifference', width: 115 },
  1773. { title: '入库人', dataIndex: 'warehousingUser', width: 90 },
  1774. { title: '入库时间', dataIndex: 'warehousingTime', width: 90 },
  1775. { title: '重量', dataIndex: 'weight', width: 90 },
  1776. { title: '仓位货架', dataIndex: 'position', width: 90 },
  1777. ],
  1778. otherOutColumns: [
  1779. { title: '仓库名称', dataIndex: 'depotName' },
  1780. { title: '条码', dataIndex: 'barCode' },
  1781. { title: '名称', dataIndex: 'name' },
  1782. { title: '规格', dataIndex: 'standard' },
  1783. { title: '型号', dataIndex: 'model' },
  1784. { title: '颜色', dataIndex: 'color' },
  1785. { title: '品牌', dataIndex: 'brand' },
  1786. { title: '制造商', dataIndex: 'mfrs' },
  1787. { title: '扩展信息', dataIndex: 'materialOther' },
  1788. { title: '库存', dataIndex: 'stock' },
  1789. { title: '单位', dataIndex: 'unit' },
  1790. { title: '序列号', dataIndex: 'snList', width: 300 },
  1791. { title: '批号', dataIndex: 'batchNumber' },
  1792. { title: '有效期', dataIndex: 'expirationDate' },
  1793. { title: '多属性', dataIndex: 'sku' },
  1794. { title: '数量', dataIndex: 'operNumber' },
  1795. { title: '单价', dataIndex: 'unitPrice' },
  1796. { title: '金额', dataIndex: 'allPrice' },
  1797. { title: '重量', dataIndex: 'weight' },
  1798. { title: '仓位货架', dataIndex: 'position' },
  1799. { title: '备注', dataIndex: 'remark' },
  1800. ],
  1801. allocationOutColumns: [
  1802. { title: '仓库名称', dataIndex: 'depotName' },
  1803. { title: '条码', dataIndex: 'barCode' },
  1804. { title: '名称', dataIndex: 'name' },
  1805. { title: '规格', dataIndex: 'standard' },
  1806. { title: '型号', dataIndex: 'model' },
  1807. { title: '颜色', dataIndex: 'color' },
  1808. { title: '品牌', dataIndex: 'brand' },
  1809. { title: '制造商', dataIndex: 'mfrs' },
  1810. { title: '扩展信息', dataIndex: 'materialOther' },
  1811. { title: '库存', dataIndex: 'stock' },
  1812. { title: '调入仓库', dataIndex: 'anotherDepotName' },
  1813. { title: '单位', dataIndex: 'unit' },
  1814. { title: '多属性', dataIndex: 'sku' },
  1815. { title: '数量', dataIndex: 'operNumber' },
  1816. { title: '单价', dataIndex: 'unitPrice' },
  1817. { title: '金额', dataIndex: 'allPrice' },
  1818. { title: '重量', dataIndex: 'weight' },
  1819. { title: '仓位货架', dataIndex: 'position' },
  1820. { title: '备注', dataIndex: 'remark' },
  1821. ],
  1822. assembleColumns: [
  1823. { title: '商品类型', dataIndex: 'mType' },
  1824. { title: '仓库名称', dataIndex: 'depotName' },
  1825. { title: '条码', dataIndex: 'barCode' },
  1826. { title: '名称', dataIndex: 'name' },
  1827. { title: '规格', dataIndex: 'standard' },
  1828. { title: '型号', dataIndex: 'model' },
  1829. { title: '颜色', dataIndex: 'color' },
  1830. { title: '品牌', dataIndex: 'brand' },
  1831. { title: '制造商', dataIndex: 'mfrs' },
  1832. { title: '扩展信息', dataIndex: 'materialOther' },
  1833. { title: '库存', dataIndex: 'stock' },
  1834. { title: '单位', dataIndex: 'unit' },
  1835. { title: '多属性', dataIndex: 'sku' },
  1836. { title: '数量', dataIndex: 'operNumber' },
  1837. { title: '单价', dataIndex: 'unitPrice' },
  1838. { title: '金额', dataIndex: 'allPrice' },
  1839. { title: '备注', dataIndex: 'remark' },
  1840. ],
  1841. disassembleColumns: [
  1842. { title: '商品类型', dataIndex: 'mType' },
  1843. { title: '仓库名称', dataIndex: 'depotName' },
  1844. { title: '条码', dataIndex: 'barCode' },
  1845. { title: '名称', dataIndex: 'name' },
  1846. { title: '规格', dataIndex: 'standard' },
  1847. { title: '型号', dataIndex: 'model' },
  1848. { title: '颜色', dataIndex: 'color' },
  1849. { title: '品牌', dataIndex: 'brand' },
  1850. { title: '制造商', dataIndex: 'mfrs' },
  1851. { title: '扩展信息', dataIndex: 'materialOther' },
  1852. { title: '库存', dataIndex: 'stock' },
  1853. { title: '单位', dataIndex: 'unit' },
  1854. { title: '多属性', dataIndex: 'sku' },
  1855. { title: '数量', dataIndex: 'operNumber' },
  1856. { title: '单价', dataIndex: 'unitPrice' },
  1857. { title: '金额', dataIndex: 'allPrice' },
  1858. { title: '备注', dataIndex: 'remark' },
  1859. ],
  1860. stockCheckReplayColumns: [
  1861. { title: '仓库名称', dataIndex: 'depotName' },
  1862. { title: '条码', dataIndex: 'barCode' },
  1863. { title: '名称', dataIndex: 'name' },
  1864. { title: '规格', dataIndex: 'standard' },
  1865. { title: '型号', dataIndex: 'model' },
  1866. { title: '品牌', dataIndex: 'brand' },
  1867. { title: '制造商', dataIndex: 'mfrs' },
  1868. { title: '扩展信息', dataIndex: 'materialOther' },
  1869. { title: '库存', dataIndex: 'stock' },
  1870. { title: '单位', dataIndex: 'unit' },
  1871. { title: '多属性', dataIndex: 'sku' },
  1872. { title: '数量', dataIndex: 'operNumber' },
  1873. { title: '单价', dataIndex: 'unitPrice' },
  1874. { title: '金额', dataIndex: 'allPrice' },
  1875. { title: '备注', dataIndex: 'remark' },
  1876. ],
  1877. }
  1878. },
  1879. created() {
  1880. let realScreenWidth = window.screen.width
  1881. this.width = realScreenWidth < 1500 ? '1200px' : '1600px'
  1882. this.tableWidth = {
  1883. width: '100%',
  1884. }
  1885. this.tableWidthRetail = {
  1886. width: '100%',
  1887. }
  1888. },
  1889. methods: {
  1890. initSetting(record, type, ds) {
  1891. if (type === '零售出库') {
  1892. this.defColumns = this.retailOutColumns
  1893. } else if (type === '零售退货入库') {
  1894. this.defColumns = this.retailBackColumns
  1895. } else if (type === '请购单') {
  1896. this.defColumns = this.purchaseApplyColumns
  1897. } else if (type === '采购订单') {
  1898. this.defColumns = this.purchaseOrderColumns
  1899. } else if (type === '采购入库') {
  1900. this.defColumns = this.purchaseInColumns
  1901. } else if (type === '采购退货出库') {
  1902. this.defColumns = this.purchaseBackColumns
  1903. } else if (type === '销售订单') {
  1904. this.defColumns = this.saleOrderColumns
  1905. } else if (type === '销售出库') {
  1906. this.defColumns = this.saleOutColumns
  1907. } else if (type === '销售退货入库') {
  1908. this.defColumns = this.saleBackColumns
  1909. } else if (type === '其它入库') {
  1910. this.defColumns = this.otherInColumns
  1911. } else if (type === '其它出库') {
  1912. this.defColumns = this.otherOutColumns
  1913. } else if (type === '调拨出库') {
  1914. this.defColumns = this.allocationOutColumns
  1915. } else if (type === '组装单') {
  1916. this.defColumns = this.assembleColumns
  1917. } else if (type === '拆卸单') {
  1918. this.defColumns = this.disassembleColumns
  1919. } else if (type === '盘点复盘') {
  1920. this.defColumns = this.stockCheckReplayColumns
  1921. }
  1922. //判断序列号、批号、有效期、多属性、重量、仓位货架是否有值
  1923. let needAddkeywords = []
  1924. for (let i = 0; i < ds.length; i++) {
  1925. if (ds[i].snList) {
  1926. needAddkeywords.push('snList')
  1927. }
  1928. if (ds[i].batchNumber) {
  1929. needAddkeywords.push('batchNumber')
  1930. }
  1931. if (ds[i].expirationDate) {
  1932. needAddkeywords.push('expirationDate')
  1933. }
  1934. if (ds[i].sku) {
  1935. needAddkeywords.push('sku')
  1936. }
  1937. if (ds[i].weight) {
  1938. needAddkeywords.push('weight')
  1939. }
  1940. if (ds[i].position) {
  1941. needAddkeywords.push('position')
  1942. }
  1943. if (ds[i].brand) {
  1944. needAddkeywords.push('brand')
  1945. }
  1946. if (ds[i].mfrs) {
  1947. needAddkeywords.push('mfrs')
  1948. }
  1949. }
  1950. let currentCol = [
  1951. {
  1952. title: '#',
  1953. dataIndex: '',
  1954. align: 'center',
  1955. width: 30,
  1956. customRender: function (t, r, index) {
  1957. return parseInt(index) + 1
  1958. },
  1959. },
  1960. ]
  1961. if (record.status === '3') {
  1962. //部分采购|部分销售的时候显示全部列
  1963. for (let i = 0; i < this.defColumns.length; i++) {
  1964. currentCol.push(this.defColumns[i])
  1965. }
  1966. this.columns = currentCol
  1967. } else if (record.purchaseStatus === '3') {
  1968. //将已出库的标题转为已采购,针对销售订单转采购订单的场景
  1969. for (let i = 0; i < this.defColumns.length; i++) {
  1970. let info = {}
  1971. info.title = this.defColumns[i].title
  1972. info.dataIndex = this.defColumns[i].dataIndex
  1973. if (this.defColumns[i].width) {
  1974. info.width = this.defColumns[i].width
  1975. }
  1976. if (this.defColumns[i].dataIndex === 'finishNumber') {
  1977. info.title = '已采购'
  1978. }
  1979. if (this.defColumns[i].dataIndex === 'barCode') {
  1980. info.scopedSlots = { customRender: 'customBarCode' }
  1981. }
  1982. currentCol.push(info)
  1983. }
  1984. this.columns = currentCol
  1985. } else {
  1986. for (let i = 0; i < this.defColumns.length; i++) {
  1987. //移除列
  1988. let needRemoveKeywords = [
  1989. 'finishNumber',
  1990. 'snList',
  1991. 'batchNumber',
  1992. 'expirationDate',
  1993. 'sku',
  1994. 'weight',
  1995. 'position',
  1996. 'brand',
  1997. 'mfrs',
  1998. ]
  1999. if (needRemoveKeywords.indexOf(this.defColumns[i].dataIndex) === -1) {
  2000. let info = {}
  2001. info.title = this.defColumns[i].title
  2002. info.dataIndex = this.defColumns[i].dataIndex
  2003. if (this.defColumns[i].width) {
  2004. info.width = this.defColumns[i].width
  2005. }
  2006. if (this.defColumns[i].dataIndex === 'barCode') {
  2007. info.scopedSlots = { customRender: 'customBarCode' }
  2008. }
  2009. currentCol.push(info)
  2010. }
  2011. //添加有数据的列
  2012. if (needAddkeywords.indexOf(this.defColumns[i].dataIndex) > -1) {
  2013. let info = {}
  2014. info.title = this.defColumns[i].title
  2015. info.dataIndex = this.defColumns[i].dataIndex
  2016. if (this.defColumns[i].width) {
  2017. info.width = this.defColumns[i].width
  2018. }
  2019. currentCol.push(info)
  2020. }
  2021. }
  2022. this.columns = currentCol
  2023. }
  2024. },
  2025. initPlatform() {
  2026. getPlatformConfigByKey({ platformKey: 'bill_print_flag' }).then((res) => {
  2027. if (res && res.code === 200) {
  2028. if (
  2029. this.billType === '零售出库' ||
  2030. this.billType === '零售退货入库' ||
  2031. this.billType === '请购单' ||
  2032. this.billType === '采购订单' ||
  2033. this.billType === '采购入库' ||
  2034. this.billType === '采购退货出库' ||
  2035. this.billType === '销售订单' ||
  2036. this.billType === '销售出库' ||
  2037. this.billType === '销售退货入库' ||
  2038. this.billType === '其它入库' ||
  2039. this.billType === '其它出库' ||
  2040. this.billType === '调拨出库' ||
  2041. this.billType === '组装单' ||
  2042. this.billType === '拆卸单'
  2043. ) {
  2044. this.billPrintFlag = res.data.platformValue === '1' ? true : false
  2045. }
  2046. }
  2047. })
  2048. },
  2049. getSystemConfig() {
  2050. getCurrentSystemConfig().then((res) => {
  2051. if (res.code === 200 && res.data) {
  2052. this.purchaseBySaleFlag = res.data.purchaseBySaleFlag === '1' ? true : false
  2053. let multiBillType = res.data.multiBillType
  2054. let multiLevelApprovalFlag = res.data.multiLevelApprovalFlag
  2055. this.checkFlag = getCheckFlag(multiBillType, multiLevelApprovalFlag, this.prefixNo)
  2056. if (res.data.auditPrintFlag === '1') {
  2057. if (this.model.status === '0' || this.model.status === '9') {
  2058. this.isShowPrintBtn = false
  2059. } else {
  2060. this.isShowPrintBtn = true
  2061. }
  2062. } else {
  2063. this.isShowPrintBtn = true
  2064. }
  2065. }
  2066. })
  2067. },
  2068. getBillListByLinkNumber(number) {
  2069. getAction('/depotHead/getBillListByLinkNumber', { number: number }).then((res) => {
  2070. if (res && res.code === 200) {
  2071. this.linkNumberList = res.data
  2072. }
  2073. })
  2074. },
  2075. getFinancialBillNoByBillId(billId) {
  2076. getAction('/accountHead/getFinancialBillNoByBillId', { billId: billId }).then((res) => {
  2077. if (res && res.code === 200) {
  2078. this.financialBillNoList = res.data
  2079. }
  2080. })
  2081. },
  2082. show(record, type, prefixNo) {
  2083. //查询单条单据信息
  2084. findBillDetailByNumber({ number: record.number }).then((res) => {
  2085. if (res && res.code === 200) {
  2086. let item = res.data
  2087. this.billType = type
  2088. this.prefixNo = prefixNo
  2089. //附件下载
  2090. this.fileList = item.fileName
  2091. this.visible = true
  2092. this.modalStyle = 'top:20px;height: 95%;'
  2093. this.model = Object.assign({}, item)
  2094. if (this.model.backAmount) {
  2095. this.model.getAmount = (this.model.changeAmount + this.model.backAmount).toFixed(2)
  2096. } else {
  2097. this.model.getAmount = this.model.changeAmount
  2098. }
  2099. this.model.debt = (
  2100. this.model.discountLastMoney +
  2101. this.model.otherMoney -
  2102. (this.model.deposit + this.model.changeAmount)
  2103. ).toFixed(2)
  2104. this.$nextTick(() => {
  2105. this.form.setFieldsValue(pick(this.model, 'id'))
  2106. })
  2107. let showType = 'basic'
  2108. if (
  2109. item.subType === '采购' ||
  2110. item.subType === '采购退货' ||
  2111. item.subType === '销售' ||
  2112. item.subType === '销售退货'
  2113. ) {
  2114. if (item.status === '3') {
  2115. showType = 'other'
  2116. }
  2117. } else {
  2118. if (item.status === '3') {
  2119. showType = 'basic'
  2120. } else if (item.purchaseStatus === '3') {
  2121. showType = 'purchase'
  2122. }
  2123. }
  2124. let isReadOnly = '1'
  2125. if (item.subType === '组装单' || item.subType === '拆卸单') {
  2126. isReadOnly = '0'
  2127. }
  2128. let params = {
  2129. headerId: this.model.id,
  2130. mpList: getMpListShort(Vue.ls.get('materialPropertyList')), //扩展属性
  2131. linkType: showType,
  2132. isReadOnly: isReadOnly,
  2133. }
  2134. let url = this.readOnly ? this.url.detailList : this.url.detailList
  2135. this.requestSubTableData(item, type, url, params)
  2136. this.initPlatform()
  2137. this.getSystemConfig()
  2138. this.getBillListByLinkNumber(this.model.number)
  2139. this.getFinancialBillNoByBillId(this.model.id)
  2140. }
  2141. })
  2142. },
  2143. requestSubTableData(record, type, url, params, success) {
  2144. this.loading = true
  2145. getAction(url, params)
  2146. .then((res) => {
  2147. if (res && res.code === 200) {
  2148. this.dataSource = res.data.rows
  2149. this.initSetting(record, type, this.dataSource)
  2150. typeof success === 'function' ? success(res) : ''
  2151. }
  2152. })
  2153. .finally(() => {
  2154. this.loading = false
  2155. })
  2156. },
  2157. handleBackCheck() {
  2158. let that = this
  2159. this.$confirm({
  2160. title: '确认操作',
  2161. content: '是否对该单据进行反审核?',
  2162. onOk: function () {
  2163. that.loading = true
  2164. postAction(that.url.batchSetStatusUrl, { status: '0', ids: that.model.id })
  2165. .then((res) => {
  2166. if (res.code === 200) {
  2167. that.$emit('ok')
  2168. that.loading = false
  2169. that.close()
  2170. } else {
  2171. that.$message.warning(res.data.message)
  2172. that.loading = false
  2173. }
  2174. })
  2175. .finally(() => {})
  2176. },
  2177. })
  2178. },
  2179. handleCancel() {
  2180. this.close()
  2181. },
  2182. close() {
  2183. this.$emit('close')
  2184. this.visible = false
  2185. this.modalStyle = ''
  2186. },
  2187. myHandleDetail(billNumber) {
  2188. findBillDetailByNumber({ number: billNumber }).then((res) => {
  2189. if (res && res.code === 200) {
  2190. let type = res.data.type === '其它' ? '' : res.data.type
  2191. this.show(res.data, res.data.subType + type)
  2192. this.title = res.data.subType + type + '-详情'
  2193. }
  2194. })
  2195. },
  2196. myHandleFinancialDetail(billNo) {
  2197. let that = this
  2198. findFinancialDetailByNumber({ billNo: billNo }).then((res) => {
  2199. if (res && res.code === 200) {
  2200. if (that.$refs.financialDetailModal) {
  2201. that.$refs.financialDetailModal.show(res.data, res.data.type)
  2202. that.$refs.financialDetailModal.title = res.data.type + '-详情'
  2203. }
  2204. }
  2205. })
  2206. },
  2207. getImgUrl(imgName, type) {
  2208. if (imgName && imgName.split(',')) {
  2209. type = type ? type + '/' : ''
  2210. return getFileAccessHttpUrl('systemConfig/static/' + type + imgName.split(',')[0])
  2211. } else {
  2212. return ''
  2213. }
  2214. },
  2215. //三联打印预览
  2216. handlePrint() {
  2217. getPlatformConfigByKey({ platformKey: 'bill_print_url' }).then((res) => {
  2218. if (res && res.code === 200) {
  2219. let billPrintUrl = res.data.platformValue + '?no=' + this.model.number
  2220. let billPrintHeight = this.dataSource.length * 50 + 600
  2221. this.$refs.modalDetail.show(this.model, billPrintUrl, billPrintHeight)
  2222. this.$refs.modalDetail.title = this.billType + '-三联打印预览'
  2223. }
  2224. })
  2225. },
  2226. //零售出库|零售退货入库
  2227. retailExportExcel() {
  2228. let list = []
  2229. let head = '仓库名称,条码,名称,规格,型号,颜色,扩展信息,库存,单位,序列号,批号,有效期,多属性,数量,单价,金额,备注'
  2230. for (let i = 0; i < this.dataSource.length; i++) {
  2231. let item = []
  2232. let ds = this.dataSource[i]
  2233. item.push(
  2234. ds.depotName,
  2235. ds.barCode,
  2236. ds.name,
  2237. ds.standard,
  2238. ds.model,
  2239. ds.color,
  2240. ds.materialOther,
  2241. ds.stock,
  2242. ds.unit,
  2243. ds.snList,
  2244. ds.batchNumber,
  2245. ds.expirationDate,
  2246. ds.sku,
  2247. ds.operNumber,
  2248. ds.unitPrice,
  2249. ds.allPrice,
  2250. ds.remark
  2251. )
  2252. list.push(item)
  2253. }
  2254. let organName = this.model.organName ? '会员卡号' + this.model.organName : ''
  2255. let tip = organName + ' ' + '单据日期:' + this.model.operTimeStr + ' ' + '单据编号:' + this.model.number
  2256. exportXlsPost(this.billType + '_' + this.model.number, '单据导出', head, tip, list)
  2257. },
  2258. //请购单
  2259. applyExportExcel() {
  2260. let list = []
  2261. let head = '条码,名称,规格,型号,颜色,扩展信息,单位,多属性,原数量,已采购,数量,备注'
  2262. for (let i = 0; i < this.dataSource.length; i++) {
  2263. let item = []
  2264. let ds = this.dataSource[i]
  2265. item.push(
  2266. ds.barCode,
  2267. ds.name,
  2268. ds.standard,
  2269. ds.model,
  2270. ds.color,
  2271. ds.materialOther,
  2272. ds.unit,
  2273. ds.sku,
  2274. ds.preNumber,
  2275. ds.finishNumber,
  2276. ds.operNumber,
  2277. ds.remark
  2278. )
  2279. list.push(item)
  2280. }
  2281. let tip = '单据日期:' + this.model.operTimeStr + ' ' + '单据编号:' + this.model.number
  2282. exportXlsPost(this.billType + '_' + this.model.number, '单据导出', head, tip, list)
  2283. },
  2284. //采购订单|销售订单
  2285. orderExportExcel() {
  2286. let list = []
  2287. let finishType = ''
  2288. let organType = ''
  2289. if (this.billType === '采购订单') {
  2290. finishType = '已入库'
  2291. organType = '供应商:'
  2292. } else if (this.billType === '销售订单') {
  2293. finishType = '已出库'
  2294. organType = '客户:'
  2295. }
  2296. let head =
  2297. '条码,名称,规格,型号,颜色,扩展信息,库存,单位,多属性,数量,' +
  2298. finishType +
  2299. ',单价,金额,税率(%),税额,价税合计,备注'
  2300. for (let i = 0; i < this.dataSource.length; i++) {
  2301. let item = []
  2302. let ds = this.dataSource[i]
  2303. item.push(
  2304. ds.barCode,
  2305. ds.name,
  2306. ds.standard,
  2307. ds.model,
  2308. ds.color,
  2309. ds.materialOther,
  2310. ds.stock,
  2311. ds.unit,
  2312. ds.sku,
  2313. ds.operNumber,
  2314. ds.finishNumber,
  2315. ds.unitPrice,
  2316. ds.allPrice,
  2317. ds.taxRate,
  2318. ds.taxMoney,
  2319. ds.taxLastMoney,
  2320. ds.remark
  2321. )
  2322. list.push(item)
  2323. }
  2324. let organName = this.model.organName ? this.model.organName : ''
  2325. let tip =
  2326. organType + organName + ' ' + '单据日期:' + this.model.operTimeStr + ' ' + '单据编号:' + this.model.number
  2327. exportXlsPost(this.billType + '_' + this.model.number, '单据导出', head, tip, list)
  2328. },
  2329. //采购入库|采购退货出库|销售出库|销售退货入库
  2330. purchaseSaleExportExcel() {
  2331. let list = []
  2332. let organType = ''
  2333. if (this.billType === '采购入库' || this.billType === '采购退货出库') {
  2334. organType = '供应商:'
  2335. } else if (this.billType === '销售出库' || this.billType === '销售退货入库') {
  2336. organType = '客户:'
  2337. }
  2338. let head =
  2339. '仓库名称,条码,名称,规格,型号,颜色,扩展信息,库存,单位,序列号,批号,有效期,多属性,数量,单价,金额,税率(%),税额,价税合计,重量,备注'
  2340. for (let i = 0; i < this.dataSource.length; i++) {
  2341. let item = []
  2342. let ds = this.dataSource[i]
  2343. item.push(
  2344. ds.depotName,
  2345. ds.barCode,
  2346. ds.name,
  2347. ds.standard,
  2348. ds.model,
  2349. ds.color,
  2350. ds.materialOther,
  2351. ds.stock,
  2352. ds.unit,
  2353. ds.snList,
  2354. ds.batchNumber,
  2355. ds.expirationDate,
  2356. ds.sku,
  2357. ds.operNumber,
  2358. ds.unitPrice,
  2359. ds.allPrice,
  2360. ds.taxRate,
  2361. ds.taxMoney,
  2362. ds.taxLastMoney,
  2363. ds.weight,
  2364. ds.remark
  2365. )
  2366. list.push(item)
  2367. }
  2368. let organName = this.model.organName ? this.model.organName : ''
  2369. let linkNumber = this.model.linkNumber ? this.model.linkNumber : ''
  2370. let tip =
  2371. organType +
  2372. organName +
  2373. ' ' +
  2374. '单据日期:' +
  2375. this.model.operTimeStr +
  2376. ' ' +
  2377. '单据编号:' +
  2378. this.model.number +
  2379. '' +
  2380. '关联单号:' +
  2381. linkNumber
  2382. exportXlsPost(this.billType + '_' + this.model.number, '单据导出', head, tip, list)
  2383. },
  2384. //其它入库|其它出库
  2385. otherExportExcel() {
  2386. let list = []
  2387. let organType = ''
  2388. if (this.billType === '其它入库') {
  2389. organType = '供应商:'
  2390. } else if (this.billType === '其它出库') {
  2391. organType = '客户:'
  2392. }
  2393. let head = '仓库名称,条码,名称,规格,型号,颜色,扩展信息,库存,单位,序列号,批号,有效期,多属性,数量,单价,金额,备注'
  2394. for (let i = 0; i < this.dataSource.length; i++) {
  2395. let item = []
  2396. let ds = this.dataSource[i]
  2397. item.push(
  2398. ds.depotName,
  2399. ds.barCode,
  2400. ds.name,
  2401. ds.standard,
  2402. ds.model,
  2403. ds.color,
  2404. ds.materialOther,
  2405. ds.stock,
  2406. ds.unit,
  2407. ds.snList,
  2408. ds.batchNumber,
  2409. ds.expirationDate,
  2410. ds.sku,
  2411. ds.operNumber,
  2412. ds.unitPrice,
  2413. ds.allPrice,
  2414. ds.remark
  2415. )
  2416. list.push(item)
  2417. }
  2418. let organName = this.model.organName ? this.model.organName : ''
  2419. let tip =
  2420. organType + organName + ' ' + '单据日期:' + this.model.operTimeStr + ' ' + '单据编号:' + this.model.number
  2421. exportXlsPost(this.billType + '_' + this.model.number, '单据导出', head, tip, list)
  2422. },
  2423. //调拨出库
  2424. allocationOutExportExcel() {
  2425. let list = []
  2426. let head = '仓库名称,条码,名称,规格,型号,颜色,扩展信息,库存,调入仓库,单位,多属性,数量,单价,金额,备注'
  2427. for (let i = 0; i < this.dataSource.length; i++) {
  2428. let item = []
  2429. let ds = this.dataSource[i]
  2430. item.push(
  2431. ds.depotName,
  2432. ds.barCode,
  2433. ds.name,
  2434. ds.standard,
  2435. ds.model,
  2436. ds.color,
  2437. ds.materialOther,
  2438. ds.stock,
  2439. ds.anotherDepotName,
  2440. ds.unit,
  2441. ds.sku,
  2442. ds.operNumber,
  2443. ds.unitPrice,
  2444. ds.allPrice,
  2445. ds.remark
  2446. )
  2447. list.push(item)
  2448. }
  2449. let tip = '单据日期:' + this.model.operTimeStr + ' ' + '单据编号:' + this.model.number
  2450. exportXlsPost(this.billType + '_' + this.model.number, '单据导出', head, tip, list)
  2451. },
  2452. //组装单|拆卸单
  2453. assembleExportExcel() {
  2454. let list = []
  2455. let head = ['商品类型,仓库名称,条码,名称,规格,型号,颜色,扩展信息,库存,单位,多属性,数量,单价,金额,备注']
  2456. for (let i = 0; i < this.dataSource.length; i++) {
  2457. let item = []
  2458. let ds = this.dataSource[i]
  2459. item.push(
  2460. ds.mType,
  2461. ds.depotName,
  2462. ds.barCode,
  2463. ds.name,
  2464. ds.standard,
  2465. ds.model,
  2466. ds.color,
  2467. ds.materialOther,
  2468. ds.stock,
  2469. ds.unit,
  2470. ds.sku,
  2471. ds.operNumber,
  2472. ds.unitPrice,
  2473. ds.allPrice,
  2474. ds.remark
  2475. )
  2476. list.push(item)
  2477. }
  2478. let tip = '单据日期:' + this.model.operTimeStr + ' ' + '单据编号:' + this.model.number
  2479. exportXlsPost(this.billType + '_' + this.model.number, '单据导出', head, tip, list)
  2480. },
  2481. //盘点复盘
  2482. stockCheckReplayExportExcel() {
  2483. let list = []
  2484. let head = '仓库名称,条码,名称,规格,型号,扩展信息,库存,单位,多属性,数量,单价,金额,备注'
  2485. for (let i = 0; i < this.dataSource.length; i++) {
  2486. let item = []
  2487. let ds = this.dataSource[i]
  2488. item.push(
  2489. ds.depotName,
  2490. ds.barCode,
  2491. ds.name,
  2492. ds.standard,
  2493. ds.model,
  2494. ds.materialOther,
  2495. ds.stock,
  2496. ds.unit,
  2497. ds.sku,
  2498. ds.operNumber,
  2499. ds.unitPrice,
  2500. ds.allPrice,
  2501. ds.remark
  2502. )
  2503. list.push(item)
  2504. }
  2505. let linkNumber = this.model.linkNumber ? this.model.linkNumber : ''
  2506. let tip =
  2507. '单据日期:' + this.model.operTimeStr + ' ' + '单据编号:' + this.model.number + '' + '关联单号:' + linkNumber
  2508. exportXlsPost(this.billType + '_' + this.model.number, '单据导出', head, tip, list)
  2509. },
  2510. },
  2511. }
  2512. </script>
  2513. <style scoped>
  2514. .item-info {
  2515. float: left;
  2516. width: 30px;
  2517. height: 30px;
  2518. margin-left: 8px;
  2519. }
  2520. .item-img {
  2521. cursor: pointer;
  2522. position: static;
  2523. display: block;
  2524. width: 100%;
  2525. height: 100%;
  2526. object-fit: cover;
  2527. }
  2528. </style>