BillDetail.vue 106 KB

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