BillDetail.vue 106 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625
  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: 'remark', width: 90 },
  1634. ],
  1635. purchaseInColumns: [
  1636. { title: '批次号', dataIndex: 'batchNumber', width: 90 },
  1637. { title: '名称', dataIndex: 'name', width: 115 },
  1638. { title: '规格', dataIndex: 'standard', width: 90 },
  1639. { title: '生产日期', dataIndex: 'productionDate', width: 100 },
  1640. { title: '保质期', dataIndex: 'expiryNum', width: 60 },
  1641. { title: '商品条码', dataIndex: 'barCode', width: 90 },
  1642. { title: '仓库名称', dataIndex: 'depotName', width: 90 },
  1643. { title: '仓库货架', dataIndex: 'position', width: 90 },
  1644. { title: '包装规格', dataIndex: 'unitName', width: 90 },
  1645. { title: '型号', dataIndex: 'model', width: 60 },
  1646. { title: '颜色', dataIndex: 'color', width: 60 },
  1647. { title: '品牌', dataIndex: 'brand', width: 90 },
  1648. { title: '制造商', dataIndex: 'mfrs', width: 90 },
  1649. { title: '扩展信息', dataIndex: 'materialOther', width: 90 },
  1650. { title: '库存', dataIndex: 'stock', width: 90 },
  1651. { title: '单位', dataIndex: 'unit', width: 90 },
  1652. { title: '序列号', dataIndex: 'snList', width: 300 },
  1653. { title: '有效期', dataIndex: 'expirationDate', width: 90 },
  1654. { title: '多属性', dataIndex: 'sku', width: 90 },
  1655. { title: '数量', dataIndex: 'operNumber', width: 90 },
  1656. { title: '已入库', dataIndex: 'finishNumber', width: 90 },
  1657. { title: '单价', dataIndex: 'unitPrice', width: 90 },
  1658. { title: '金额', dataIndex: 'allPrice', width: 90 },
  1659. { title: '税率(%)', dataIndex: 'taxRate', width: 90 },
  1660. { title: '税额', dataIndex: 'taxMoney', width: 90 },
  1661. { title: '价税合计', dataIndex: 'taxLastMoney', width: 90 },
  1662. { title: '实际入库数量', dataIndex: 'actualQuantityInStorage', width: 115 },
  1663. { title: '入库差异', dataIndex: 'warehousingVariance', width: 90 },
  1664. { title: '入库差异原因', dataIndex: 'reasonOfDifference', width: 115 },
  1665. { title: '入库人', dataIndex: 'warehousingUser', width: 90 },
  1666. { title: '入库时间', dataIndex: 'warehousingTime', width: 90 },
  1667. { title: '重量', dataIndex: 'weight', width: 90 },
  1668. { title: '备注', dataIndex: 'remark', width: 90 },
  1669. ],
  1670. purchaseBackColumns: [
  1671. { title: '仓库名称', dataIndex: 'depotName' },
  1672. { title: '条码', dataIndex: 'barCode' },
  1673. { title: '名称', dataIndex: 'name' },
  1674. { title: '规格', dataIndex: 'standard' },
  1675. { title: '型号', dataIndex: 'model' },
  1676. { title: '颜色', dataIndex: 'color' },
  1677. { title: '品牌', dataIndex: 'brand' },
  1678. { title: '制造商', dataIndex: 'mfrs' },
  1679. { title: '扩展信息', dataIndex: 'materialOther' },
  1680. { title: '库存', dataIndex: 'stock' },
  1681. { title: '单位', dataIndex: 'unit' },
  1682. { title: '序列号', dataIndex: 'snList', width: 300 },
  1683. { title: '批号', dataIndex: 'batchNumber' },
  1684. { title: '有效期', dataIndex: 'expirationDate' },
  1685. { title: '多属性', dataIndex: 'sku' },
  1686. { title: '数量', dataIndex: 'operNumber' },
  1687. { title: '已出库', dataIndex: 'finishNumber' },
  1688. { title: '单价', dataIndex: 'unitPrice' },
  1689. { title: '金额', dataIndex: 'allPrice' },
  1690. { title: '税率(%)', dataIndex: 'taxRate' },
  1691. { title: '税额', dataIndex: 'taxMoney' },
  1692. { title: '价税合计', dataIndex: 'taxLastMoney' },
  1693. { title: '重量', dataIndex: 'weight' },
  1694. { title: '仓位货架', dataIndex: 'position' },
  1695. { title: '备注', dataIndex: 'remark' },
  1696. ],
  1697. saleOrderColumns: [
  1698. { title: '批次号', dataIndex: 'batchNumber', width: 90 },
  1699. { title: '名称', dataIndex: 'name', width: 115 },
  1700. { title: '规格', dataIndex: 'standard', width: 90 },
  1701. { title: '生产日期', dataIndex: 'productionDate', width: 100 },
  1702. { title: '保质期', dataIndex: 'expiryNum', width: 60 },
  1703. { title: '商品条码', dataIndex: 'barCode', width: 90 },
  1704. { title: '仓库名称', dataIndex: 'depotName', width: 90 },
  1705. { title: '仓库货架', dataIndex: 'position', width: 90 },
  1706. { title: '包装规格', dataIndex: 'unitName', width: 90 },
  1707. { title: '规格', dataIndex: 'standard', width: 60 },
  1708. { title: '型号', dataIndex: 'model', width: 60 },
  1709. { title: '颜色', dataIndex: 'color', width: 60 },
  1710. { title: '品牌', dataIndex: 'brand', width: 90 },
  1711. { title: '制造商', dataIndex: 'mfrs', width: 90 },
  1712. { title: '扩展信息', dataIndex: 'materialOther', width: 90 },
  1713. { title: '库存', dataIndex: 'stock', width: 90 },
  1714. { title: '单位', dataIndex: 'unit', width: 90 },
  1715. { title: '序列号', dataIndex: 'snList', width: 300 },
  1716. { title: '有效期', dataIndex: 'expirationDate', width: 90 },
  1717. { title: '多属性', dataIndex: 'sku', width: 90 },
  1718. { title: '数量', dataIndex: 'operNumber', width: 90 },
  1719. { title: '已出库', dataIndex: 'finishNumber', width: 90 },
  1720. { title: '单价', dataIndex: 'unitPrice', width: 90 },
  1721. { title: '金额', dataIndex: 'allPrice', width: 90 },
  1722. { title: '税率(%)', dataIndex: 'taxRate', width: 90 },
  1723. { title: '税额', dataIndex: 'taxMoney', width: 90 },
  1724. { title: '价税合计', dataIndex: 'taxLastMoney', width: 90 },
  1725. { title: '实际出库数量', dataIndex: 'actualQuantityInStorage', width: 115 },
  1726. { title: '出库差异', dataIndex: 'warehousingVariance', width: 90 },
  1727. { title: '出库差异原因', dataIndex: 'reasonOfDifference', width: 115 },
  1728. { title: '出库人', dataIndex: 'warehousingUser', width: 90 },
  1729. { title: '出库时间', dataIndex: 'warehousingTime', width: 90 },
  1730. { title: '重量', dataIndex: 'weight', width: 90 },
  1731. { title: '备注', dataIndex: 'remark', width: 90 },
  1732. ],
  1733. saleOutColumns: [
  1734. { title: '批次号', dataIndex: 'batchNumber', width: 90 },
  1735. { title: '名称', dataIndex: 'name', width: 115 },
  1736. { title: '规格', dataIndex: 'standard', width: 90 },
  1737. { title: '生产日期', dataIndex: 'productionDate', width: 100 },
  1738. { title: '保质期', dataIndex: 'expiryNum', width: 60 },
  1739. { title: '商品条码', dataIndex: 'barCode', width: 90 },
  1740. { title: '仓库名称', dataIndex: 'depotName', width: 90 },
  1741. { title: '仓库货架', dataIndex: 'position', width: 90 },
  1742. { title: '包装规格', dataIndex: 'unitName', width: 90 },
  1743. { title: '规格', dataIndex: 'standard', width: 60 },
  1744. { title: '型号', dataIndex: 'model', width: 60 },
  1745. { title: '颜色', dataIndex: 'color', width: 60 },
  1746. { title: '品牌', dataIndex: 'brand', width: 90 },
  1747. { title: '制造商', dataIndex: 'mfrs', width: 90 },
  1748. { title: '扩展信息', dataIndex: 'materialOther', width: 90 },
  1749. { title: '库存', dataIndex: 'stock', width: 90 },
  1750. { title: '单位', dataIndex: 'unit', width: 90 },
  1751. { title: '序列号', dataIndex: 'snList', width: 300 },
  1752. { title: '有效期', dataIndex: 'expirationDate', width: 90 },
  1753. { title: '多属性', dataIndex: 'sku', width: 90 },
  1754. { title: '数量', dataIndex: 'operNumber', width: 90 },
  1755. { title: '已出库', dataIndex: 'finishNumber', width: 90 },
  1756. { title: '单价', dataIndex: 'unitPrice', width: 90 },
  1757. { title: '金额', dataIndex: 'allPrice', width: 90 },
  1758. { title: '税率(%)', dataIndex: 'taxRate', width: 90 },
  1759. { title: '税额', dataIndex: 'taxMoney', width: 90 },
  1760. { title: '价税合计', dataIndex: 'taxLastMoney', width: 90 },
  1761. { title: '实际出库数量', dataIndex: 'actualQuantityInStorage', width: 115 },
  1762. { title: '出库差异', dataIndex: 'warehousingVariance', width: 90 },
  1763. { title: '出库差异原因', dataIndex: 'reasonOfDifference', width: 115 },
  1764. { title: '出库人', dataIndex: 'warehousingUser', width: 90 },
  1765. { title: '出库时间', dataIndex: 'warehousingTime', width: 90 },
  1766. { title: '重量', dataIndex: 'weight', width: 90 },
  1767. { title: '备注', dataIndex: 'remark', width: 90 },
  1768. ],
  1769. saleBackColumns: [
  1770. { title: '仓库名称', dataIndex: 'depotName' },
  1771. { title: '条码', dataIndex: 'barCode' },
  1772. { title: '名称', dataIndex: 'name' },
  1773. { title: '规格', dataIndex: 'standard' },
  1774. { title: '型号', dataIndex: 'model' },
  1775. { title: '颜色', dataIndex: 'color' },
  1776. { title: '品牌', dataIndex: 'brand' },
  1777. { title: '制造商', dataIndex: 'mfrs' },
  1778. { title: '扩展信息', dataIndex: 'materialOther' },
  1779. { title: '库存', dataIndex: 'stock' },
  1780. { title: '单位', dataIndex: 'unit' },
  1781. { title: '序列号', dataIndex: 'snList', width: 300 },
  1782. { title: '批号', dataIndex: 'batchNumber' },
  1783. { title: '有效期', dataIndex: 'expirationDate' },
  1784. { title: '多属性', dataIndex: 'sku' },
  1785. { title: '数量', dataIndex: 'operNumber' },
  1786. { title: '已入库', dataIndex: 'finishNumber' },
  1787. { title: '单价', dataIndex: 'unitPrice' },
  1788. { title: '金额', dataIndex: 'allPrice' },
  1789. { title: '税率(%)', dataIndex: 'taxRate' },
  1790. { title: '税额', dataIndex: 'taxMoney' },
  1791. { title: '价税合计', dataIndex: 'taxLastMoney' },
  1792. { title: '重量', dataIndex: 'weight' },
  1793. { title: '仓位货架', dataIndex: 'position' },
  1794. { title: '备注', dataIndex: 'remark' },
  1795. ],
  1796. otherInColumns: [
  1797. { title: '批次号', dataIndex: 'batchNumber', width: 90 },
  1798. { title: '名称', dataIndex: 'name', width: 115 },
  1799. { title: '规格', dataIndex: 'standard', width: 90 },
  1800. { title: '生产日期', dataIndex: 'productionDate', width: 100 },
  1801. { title: '保质期', dataIndex: 'expiryNum', width: 60 },
  1802. { title: '商品条码', dataIndex: 'barCode', width: 90 },
  1803. { title: '仓库名称', dataIndex: 'depotName', width: 90 },
  1804. { title: '仓库货架', dataIndex: 'position', width: 90 },
  1805. { title: '包装规格', dataIndex: 'unitName', width: 90 },
  1806. { title: '型号', dataIndex: 'model', width: 60 },
  1807. { title: '颜色', dataIndex: 'color', width: 60 },
  1808. { title: '品牌', dataIndex: 'brand', width: 90 },
  1809. { title: '制造商', dataIndex: 'mfrs', width: 90 },
  1810. { title: '扩展信息', dataIndex: 'materialOther', width: 90 },
  1811. { title: '库存', dataIndex: 'stock', width: 90 },
  1812. { title: '单位', dataIndex: 'unit', width: 90 },
  1813. { title: '序列号', dataIndex: 'snList', width: 300 },
  1814. { title: '有效期', dataIndex: 'expirationDate', width: 90 },
  1815. { title: '多属性', dataIndex: 'sku', width: 90 },
  1816. { title: '数量', dataIndex: 'operNumber', width: 90 },
  1817. { title: '单价', dataIndex: 'unitPrice', width: 90 },
  1818. { title: '金额', dataIndex: 'allPrice', width: 90 },
  1819. { title: '实际入库数量', dataIndex: 'actualQuantityInStorage', width: 115 },
  1820. { title: '入库差异', dataIndex: 'warehousingVariance', width: 90 },
  1821. { title: '入库差异原因', dataIndex: 'reasonOfDifference', width: 115 },
  1822. { title: '入库人', dataIndex: 'warehousingUser', width: 90 },
  1823. { title: '入库时间', dataIndex: 'warehousingTime', width: 90 },
  1824. { title: '重量', dataIndex: 'weight', width: 90 },
  1825. ],
  1826. otherOutColumns: [
  1827. { title: '批次号', dataIndex: 'batchNumber', width: 90 },
  1828. { title: '名称', dataIndex: 'name', width: 115 },
  1829. { title: '规格', dataIndex: 'standard', width: 90 },
  1830. { title: '生产日期', dataIndex: 'productionDate', width: 100 },
  1831. { title: '保质期', dataIndex: 'expiryNum', width: 60 },
  1832. { title: '商品条码', dataIndex: 'barCode', width: 90 },
  1833. { title: '仓库名称', dataIndex: 'depotName', width: 90 },
  1834. { title: '仓库货架', dataIndex: 'position', width: 90 },
  1835. { title: '包装规格', dataIndex: 'unitName', width: 90 },
  1836. { title: '规格', dataIndex: 'standard', width: 60 },
  1837. { title: '型号', dataIndex: 'model', width: 60 },
  1838. { title: '颜色', dataIndex: 'color', width: 60 },
  1839. { title: '品牌', dataIndex: 'brand', width: 90 },
  1840. { title: '制造商', dataIndex: 'mfrs', width: 90 },
  1841. { title: '扩展信息', dataIndex: 'materialOther', width: 90 },
  1842. { title: '库存', dataIndex: 'stock', width: 90 },
  1843. { title: '单位', dataIndex: 'unit', width: 90 },
  1844. { title: '序列号', dataIndex: 'snList', width: 300 },
  1845. { title: '有效期', dataIndex: 'expirationDate', width: 90 },
  1846. { title: '多属性', dataIndex: 'sku', width: 90 },
  1847. { title: '数量', dataIndex: 'operNumber', width: 90 },
  1848. { title: '单价', dataIndex: 'unitPrice', width: 90 },
  1849. { title: '金额', dataIndex: 'allPrice', width: 90 },
  1850. { title: '实际出库数量', dataIndex: 'actualQuantityInStorage', width: 115 },
  1851. { title: '出库差异', dataIndex: 'warehousingVariance', width: 90 },
  1852. { title: '出库差异原因', dataIndex: 'reasonOfDifference', width: 115 },
  1853. { title: '出库人', dataIndex: 'warehousingUser', width: 90 },
  1854. { title: '出库时间', dataIndex: 'warehousingTime', width: 90 },
  1855. { title: '重量', dataIndex: 'weight', width: 90 },
  1856. { title: '备注', dataIndex: 'remark', width: 90 },
  1857. ],
  1858. allocationOutColumns: [
  1859. { title: '批次号', dataIndex: 'batchNumber', width: 90 },
  1860. { title: '名称', dataIndex: 'name', width: 115 },
  1861. { title: '规格', dataIndex: 'standard', width: 90 },
  1862. { title: '生产日期', dataIndex: 'productionDate', width: 100 },
  1863. { title: '保质期', dataIndex: 'expiryNum', width: 60 },
  1864. { title: '商品条码', dataIndex: 'barCode', width: 90 },
  1865. { title: '仓库名称', dataIndex: 'depotName', width: 90 },
  1866. { title: '仓库货架', dataIndex: 'position', width: 90 },
  1867. { title: '包装规格', dataIndex: 'unitName', width: 90 },
  1868. { title: '规格', dataIndex: 'standard', width: 60 },
  1869. { title: '型号', dataIndex: 'model', width: 60 },
  1870. { title: '颜色', dataIndex: 'color', width: 60 },
  1871. { title: '品牌', dataIndex: 'brand', width: 90 },
  1872. { title: '制造商', dataIndex: 'mfrs', width: 90 },
  1873. { title: '扩展信息', dataIndex: 'materialOther', width: 90 },
  1874. { title: '库存', dataIndex: 'stock', width: 90 },
  1875. { title: '调入仓库', dataIndex: 'anotherDepotName' },
  1876. { title: '单位', dataIndex: 'unit', width: 90 },
  1877. { title: '多属性', dataIndex: 'sku' },
  1878. { title: '数量', dataIndex: 'operNumber', width: 90 },
  1879. { title: '单价', dataIndex: 'unitPrice', width: 90 },
  1880. { title: '金额', dataIndex: 'allPrice', width: 90 },
  1881. { title: '实际出库数量', dataIndex: 'actualQuantityInStorage', width: 115 },
  1882. { title: '出库差异', dataIndex: 'warehousingVariance', width: 90 },
  1883. { title: '出库差异原因', dataIndex: 'reasonOfDifference', width: 115 },
  1884. { title: '出库人', dataIndex: 'warehousingUser', width: 90 },
  1885. { title: '出库时间', dataIndex: 'warehousingTime', width: 90 },
  1886. { title: '重量', dataIndex: 'weight', width: 90 },
  1887. { title: '备注', dataIndex: 'remark', width: 90 },
  1888. ],
  1889. assembleColumns: [
  1890. { title: '商品类型', dataIndex: 'mType' },
  1891. { title: '仓库名称', dataIndex: 'depotName' },
  1892. { title: '条码', dataIndex: 'barCode' },
  1893. { title: '名称', dataIndex: 'name' },
  1894. { title: '规格', dataIndex: 'standard' },
  1895. { title: '型号', dataIndex: 'model' },
  1896. { title: '颜色', dataIndex: 'color' },
  1897. { title: '品牌', dataIndex: 'brand' },
  1898. { title: '制造商', dataIndex: 'mfrs' },
  1899. { title: '扩展信息', dataIndex: 'materialOther' },
  1900. { title: '库存', dataIndex: 'stock' },
  1901. { title: '单位', dataIndex: 'unit' },
  1902. { title: '多属性', dataIndex: 'sku' },
  1903. { title: '数量', dataIndex: 'operNumber' },
  1904. { title: '单价', dataIndex: 'unitPrice' },
  1905. { title: '金额', dataIndex: 'allPrice' },
  1906. { title: '备注', dataIndex: 'remark' },
  1907. ],
  1908. disassembleColumns: [
  1909. { title: '商品类型', dataIndex: 'mType' },
  1910. { title: '仓库名称', dataIndex: 'depotName' },
  1911. { title: '条码', dataIndex: 'barCode' },
  1912. { title: '名称', dataIndex: 'name' },
  1913. { title: '规格', dataIndex: 'standard' },
  1914. { title: '型号', dataIndex: 'model' },
  1915. { title: '颜色', dataIndex: 'color' },
  1916. { title: '品牌', dataIndex: 'brand' },
  1917. { title: '制造商', dataIndex: 'mfrs' },
  1918. { title: '扩展信息', dataIndex: 'materialOther' },
  1919. { title: '库存', dataIndex: 'stock' },
  1920. { title: '单位', dataIndex: 'unit' },
  1921. { title: '多属性', dataIndex: 'sku' },
  1922. { title: '数量', dataIndex: 'operNumber' },
  1923. { title: '单价', dataIndex: 'unitPrice' },
  1924. { title: '金额', dataIndex: 'allPrice' },
  1925. { title: '备注', dataIndex: 'remark' },
  1926. ],
  1927. stockCheckReplayColumns: [
  1928. { title: '仓库名称', dataIndex: 'depotName' },
  1929. { title: '条码', dataIndex: 'barCode' },
  1930. { title: '名称', dataIndex: 'name' },
  1931. { title: '规格', dataIndex: 'standard' },
  1932. { title: '型号', dataIndex: 'model' },
  1933. { title: '品牌', dataIndex: 'brand' },
  1934. { title: '制造商', dataIndex: 'mfrs' },
  1935. { title: '扩展信息', dataIndex: 'materialOther' },
  1936. { title: '库存', dataIndex: 'stock' },
  1937. { title: '单位', dataIndex: 'unit' },
  1938. { title: '多属性', dataIndex: 'sku' },
  1939. { title: '数量', dataIndex: 'operNumber' },
  1940. { title: '单价', dataIndex: 'unitPrice' },
  1941. { title: '金额', dataIndex: 'allPrice' },
  1942. { title: '备注', dataIndex: 'remark' },
  1943. ],
  1944. }
  1945. },
  1946. created() {
  1947. let realScreenWidth = window.screen.width
  1948. this.width = realScreenWidth < 1500 ? '1200px' : '1600px'
  1949. this.tableWidth = {
  1950. width: '100%',
  1951. }
  1952. this.tableWidthRetail = {
  1953. width: '100%',
  1954. }
  1955. },
  1956. methods: {
  1957. initSetting(record, type, ds) {
  1958. if (type === '零售出库') {
  1959. this.defColumns = this.retailOutColumns
  1960. } else if (type === '零售退货入库') {
  1961. this.defColumns = this.retailBackColumns
  1962. } else if (type === '请购单') {
  1963. this.defColumns = this.purchaseApplyColumns
  1964. } else if (type === '采购订单') {
  1965. this.defColumns = this.purchaseOrderColumns
  1966. } else if (type === '采购入库') {
  1967. this.defColumns = this.purchaseInColumns
  1968. } else if (type === '采购退货出库') {
  1969. this.defColumns = this.purchaseBackColumns
  1970. } else if (type === '销售订单') {
  1971. this.defColumns = this.saleOrderColumns
  1972. } else if (type === '销售出库') {
  1973. this.defColumns = this.saleOutColumns
  1974. } else if (type === '销售退货入库') {
  1975. this.defColumns = this.saleBackColumns
  1976. } else if (type === '其它入库') {
  1977. this.defColumns = this.otherInColumns
  1978. } else if (type === '其它出库') {
  1979. this.defColumns = this.otherOutColumns
  1980. } else if (type === '调拨出库') {
  1981. this.defColumns = this.allocationOutColumns
  1982. } else if (type === '组装单') {
  1983. this.defColumns = this.assembleColumns
  1984. } else if (type === '拆卸单') {
  1985. this.defColumns = this.disassembleColumns
  1986. } else if (type === '盘点复盘') {
  1987. this.defColumns = this.stockCheckReplayColumns
  1988. }
  1989. //判断序列号、批号、有效期、多属性、重量、仓位货架是否有值
  1990. let needAddkeywords = []
  1991. for (let i = 0; i < ds.length; i++) {
  1992. if (ds[i].snList) {
  1993. needAddkeywords.push('snList')
  1994. }
  1995. if (ds[i].batchNumber) {
  1996. needAddkeywords.push('batchNumber')
  1997. }
  1998. if (ds[i].expirationDate) {
  1999. needAddkeywords.push('expirationDate')
  2000. }
  2001. if (ds[i].sku) {
  2002. needAddkeywords.push('sku')
  2003. }
  2004. if (ds[i].weight) {
  2005. needAddkeywords.push('weight')
  2006. }
  2007. if (ds[i].position) {
  2008. needAddkeywords.push('position')
  2009. }
  2010. if (ds[i].brand) {
  2011. needAddkeywords.push('brand')
  2012. }
  2013. if (ds[i].mfrs) {
  2014. needAddkeywords.push('mfrs')
  2015. }
  2016. }
  2017. let currentCol = [
  2018. {
  2019. title: '#',
  2020. dataIndex: '',
  2021. align: 'center',
  2022. width: 30,
  2023. customRender: function (t, r, index) {
  2024. return parseInt(index) + 1
  2025. },
  2026. },
  2027. ]
  2028. if (record.status === '3') {
  2029. //部分采购|部分销售的时候显示全部列
  2030. for (let i = 0; i < this.defColumns.length; i++) {
  2031. currentCol.push(this.defColumns[i])
  2032. }
  2033. this.columns = currentCol
  2034. } else if (record.purchaseStatus === '3') {
  2035. //将已出库的标题转为已采购,针对销售订单转采购订单的场景
  2036. for (let i = 0; i < this.defColumns.length; i++) {
  2037. let info = {}
  2038. info.title = this.defColumns[i].title
  2039. info.dataIndex = this.defColumns[i].dataIndex
  2040. if (this.defColumns[i].width) {
  2041. info.width = this.defColumns[i].width
  2042. }
  2043. if (this.defColumns[i].dataIndex === 'finishNumber') {
  2044. info.title = '已采购'
  2045. }
  2046. if (this.defColumns[i].dataIndex === 'barCode') {
  2047. info.scopedSlots = { customRender: 'customBarCode' }
  2048. }
  2049. currentCol.push(info)
  2050. }
  2051. this.columns = currentCol
  2052. } else {
  2053. for (let i = 0; i < this.defColumns.length; i++) {
  2054. //移除列
  2055. let needRemoveKeywords = [
  2056. 'finishNumber',
  2057. 'snList',
  2058. 'batchNumber',
  2059. 'expirationDate',
  2060. 'sku',
  2061. 'weight',
  2062. 'position',
  2063. 'brand',
  2064. 'mfrs',
  2065. ]
  2066. if (needRemoveKeywords.indexOf(this.defColumns[i].dataIndex) === -1) {
  2067. let info = {}
  2068. info.title = this.defColumns[i].title
  2069. info.dataIndex = this.defColumns[i].dataIndex
  2070. if (this.defColumns[i].width) {
  2071. info.width = this.defColumns[i].width
  2072. }
  2073. if (this.defColumns[i].dataIndex === 'barCode') {
  2074. info.scopedSlots = { customRender: 'customBarCode' }
  2075. }
  2076. currentCol.push(info)
  2077. }
  2078. //添加有数据的列
  2079. if (needAddkeywords.indexOf(this.defColumns[i].dataIndex) > -1) {
  2080. let info = {}
  2081. info.title = this.defColumns[i].title
  2082. info.dataIndex = this.defColumns[i].dataIndex
  2083. if (this.defColumns[i].width) {
  2084. info.width = this.defColumns[i].width
  2085. }
  2086. currentCol.push(info)
  2087. }
  2088. }
  2089. this.columns = currentCol
  2090. }
  2091. },
  2092. initPlatform() {
  2093. getPlatformConfigByKey({ platformKey: 'bill_print_flag' }).then((res) => {
  2094. if (res && res.code === 200) {
  2095. if (
  2096. this.billType === '零售出库' ||
  2097. this.billType === '零售退货入库' ||
  2098. this.billType === '请购单' ||
  2099. this.billType === '采购订单' ||
  2100. this.billType === '采购入库' ||
  2101. this.billType === '采购退货出库' ||
  2102. this.billType === '销售订单' ||
  2103. this.billType === '销售出库' ||
  2104. this.billType === '销售退货入库' ||
  2105. this.billType === '其它入库' ||
  2106. this.billType === '其它出库' ||
  2107. this.billType === '调拨出库' ||
  2108. this.billType === '组装单' ||
  2109. this.billType === '拆卸单'
  2110. ) {
  2111. this.billPrintFlag = res.data.platformValue === '1' ? true : false
  2112. }
  2113. }
  2114. })
  2115. },
  2116. getSystemConfig() {
  2117. getCurrentSystemConfig().then((res) => {
  2118. if (res.code === 200 && res.data) {
  2119. this.purchaseBySaleFlag = res.data.purchaseBySaleFlag === '1' ? true : false
  2120. let multiBillType = res.data.multiBillType
  2121. let multiLevelApprovalFlag = res.data.multiLevelApprovalFlag
  2122. this.checkFlag = getCheckFlag(multiBillType, multiLevelApprovalFlag, this.prefixNo)
  2123. if (res.data.auditPrintFlag === '1') {
  2124. if (this.model.status === '0' || this.model.status === '9') {
  2125. this.isShowPrintBtn = false
  2126. } else {
  2127. this.isShowPrintBtn = true
  2128. }
  2129. } else {
  2130. this.isShowPrintBtn = true
  2131. }
  2132. }
  2133. })
  2134. },
  2135. getBillListByLinkNumber(number) {
  2136. getAction('/depotHead/getBillListByLinkNumber', { number: number }).then((res) => {
  2137. if (res && res.code === 200) {
  2138. this.linkNumberList = res.data
  2139. }
  2140. })
  2141. },
  2142. getFinancialBillNoByBillId(billId) {
  2143. getAction('/accountHead/getFinancialBillNoByBillId', { billId: billId }).then((res) => {
  2144. if (res && res.code === 200) {
  2145. this.financialBillNoList = res.data
  2146. }
  2147. })
  2148. },
  2149. show(record, type, prefixNo) {
  2150. //查询单条单据信息
  2151. findBillDetailByNumber({ number: record.number }).then((res) => {
  2152. if (res && res.code === 200) {
  2153. let item = res.data
  2154. this.billType = type
  2155. this.prefixNo = prefixNo
  2156. //附件下载
  2157. this.fileList = item.fileName
  2158. this.visible = true
  2159. this.modalStyle = 'top:20px;height: 95%;'
  2160. this.model = Object.assign({}, item)
  2161. if (this.model.backAmount) {
  2162. this.model.getAmount = (this.model.changeAmount + this.model.backAmount).toFixed(2)
  2163. } else {
  2164. this.model.getAmount = this.model.changeAmount
  2165. }
  2166. this.model.debt = (
  2167. this.model.discountLastMoney +
  2168. this.model.otherMoney -
  2169. (this.model.deposit + this.model.changeAmount)
  2170. ).toFixed(2)
  2171. this.$nextTick(() => {
  2172. this.form.setFieldsValue(pick(this.model, 'id'))
  2173. })
  2174. let showType = 'basic'
  2175. if (
  2176. item.subType === '采购' ||
  2177. item.subType === '采购退货' ||
  2178. item.subType === '销售' ||
  2179. item.subType === '销售退货'
  2180. ) {
  2181. if (item.status === '3') {
  2182. showType = 'other'
  2183. }
  2184. } else {
  2185. if (item.status === '3') {
  2186. showType = 'basic'
  2187. } else if (item.purchaseStatus === '3') {
  2188. showType = 'purchase'
  2189. }
  2190. }
  2191. let isReadOnly = '1'
  2192. if (item.subType === '组装单' || item.subType === '拆卸单') {
  2193. isReadOnly = '0'
  2194. }
  2195. let params = {
  2196. headerId: this.model.id,
  2197. mpList: getMpListShort(Vue.ls.get('materialPropertyList')), //扩展属性
  2198. linkType: showType,
  2199. isReadOnly: isReadOnly,
  2200. }
  2201. let url = this.readOnly ? this.url.detailList : this.url.detailList
  2202. this.requestSubTableData(item, type, url, params)
  2203. this.initPlatform()
  2204. this.getSystemConfig()
  2205. this.getBillListByLinkNumber(this.model.number)
  2206. this.getFinancialBillNoByBillId(this.model.id)
  2207. }
  2208. })
  2209. },
  2210. requestSubTableData(record, type, url, params, success) {
  2211. this.loading = true
  2212. getAction(url, params)
  2213. .then((res) => {
  2214. if (res && res.code === 200) {
  2215. this.dataSource = res.data.rows
  2216. this.initSetting(record, type, this.dataSource)
  2217. typeof success === 'function' ? success(res) : ''
  2218. }
  2219. })
  2220. .finally(() => {
  2221. this.loading = false
  2222. })
  2223. },
  2224. handleBackCheck() {
  2225. let that = this
  2226. this.$confirm({
  2227. title: '确认操作',
  2228. content: '是否对该单据进行反审核?',
  2229. onOk: function () {
  2230. that.loading = true
  2231. postAction(that.url.batchSetStatusUrl, { status: '0', ids: that.model.id })
  2232. .then((res) => {
  2233. if (res.code === 200) {
  2234. that.$emit('ok')
  2235. that.loading = false
  2236. that.close()
  2237. } else {
  2238. that.$message.warning(res.data.message)
  2239. that.loading = false
  2240. }
  2241. })
  2242. .finally(() => {})
  2243. },
  2244. })
  2245. },
  2246. handleCancel() {
  2247. this.close()
  2248. },
  2249. close() {
  2250. this.$emit('close')
  2251. this.visible = false
  2252. this.modalStyle = ''
  2253. },
  2254. myHandleDetail(billNumber) {
  2255. findBillDetailByNumber({ number: billNumber }).then((res) => {
  2256. if (res && res.code === 200) {
  2257. let type = res.data.type === '其它' ? '' : res.data.type
  2258. this.show(res.data, res.data.subType + type)
  2259. this.title = res.data.subType + type + '-详情'
  2260. }
  2261. })
  2262. },
  2263. myHandleFinancialDetail(billNo) {
  2264. let that = this
  2265. findFinancialDetailByNumber({ billNo: billNo }).then((res) => {
  2266. if (res && res.code === 200) {
  2267. if (that.$refs.financialDetailModal) {
  2268. that.$refs.financialDetailModal.show(res.data, res.data.type)
  2269. that.$refs.financialDetailModal.title = res.data.type + '-详情'
  2270. }
  2271. }
  2272. })
  2273. },
  2274. getImgUrl(imgName, type) {
  2275. if (imgName && imgName.split(',')) {
  2276. type = type ? type + '/' : ''
  2277. return getFileAccessHttpUrl('systemConfig/static/' + type + imgName.split(',')[0])
  2278. } else {
  2279. return ''
  2280. }
  2281. },
  2282. //三联打印预览
  2283. handlePrint() {
  2284. getPlatformConfigByKey({ platformKey: 'bill_print_url' }).then((res) => {
  2285. if (res && res.code === 200) {
  2286. let billPrintUrl = res.data.platformValue + '?no=' + this.model.number
  2287. let billPrintHeight = this.dataSource.length * 50 + 600
  2288. this.$refs.modalDetail.show(this.model, billPrintUrl, billPrintHeight)
  2289. this.$refs.modalDetail.title = this.billType + '-三联打印预览'
  2290. }
  2291. })
  2292. },
  2293. //零售出库|零售退货入库
  2294. retailExportExcel() {
  2295. let list = []
  2296. let head = '仓库名称,条码,名称,规格,型号,颜色,扩展信息,库存,单位,序列号,批号,有效期,多属性,数量,单价,金额,备注'
  2297. for (let i = 0; i < this.dataSource.length; i++) {
  2298. let item = []
  2299. let ds = this.dataSource[i]
  2300. item.push(
  2301. ds.depotName,
  2302. ds.barCode,
  2303. ds.name,
  2304. ds.standard,
  2305. ds.model,
  2306. ds.color,
  2307. ds.materialOther,
  2308. ds.stock,
  2309. ds.unit,
  2310. ds.snList,
  2311. ds.batchNumber,
  2312. ds.expirationDate,
  2313. ds.sku,
  2314. ds.operNumber,
  2315. ds.unitPrice,
  2316. ds.allPrice,
  2317. ds.remark
  2318. )
  2319. list.push(item)
  2320. }
  2321. let organName = this.model.organName ? '会员卡号' + this.model.organName : ''
  2322. let tip = organName + ' ' + '单据日期:' + this.model.operTimeStr + ' ' + '单据编号:' + this.model.number
  2323. exportXlsPost(this.billType + '_' + this.model.number, '单据导出', head, tip, list)
  2324. },
  2325. //请购单
  2326. applyExportExcel() {
  2327. let list = []
  2328. let head = '条码,名称,规格,型号,颜色,扩展信息,单位,多属性,原数量,已采购,数量,备注'
  2329. for (let i = 0; i < this.dataSource.length; i++) {
  2330. let item = []
  2331. let ds = this.dataSource[i]
  2332. item.push(
  2333. ds.barCode,
  2334. ds.name,
  2335. ds.standard,
  2336. ds.model,
  2337. ds.color,
  2338. ds.materialOther,
  2339. ds.unit,
  2340. ds.sku,
  2341. ds.preNumber,
  2342. ds.finishNumber,
  2343. ds.operNumber,
  2344. ds.remark
  2345. )
  2346. list.push(item)
  2347. }
  2348. let tip = '单据日期:' + this.model.operTimeStr + ' ' + '单据编号:' + this.model.number
  2349. exportXlsPost(this.billType + '_' + this.model.number, '单据导出', head, tip, list)
  2350. },
  2351. //采购订单|销售订单
  2352. orderExportExcel() {
  2353. let list = []
  2354. let finishType = ''
  2355. let organType = ''
  2356. if (this.billType === '采购订单') {
  2357. finishType = '已入库'
  2358. organType = '供应商:'
  2359. } else if (this.billType === '销售订单') {
  2360. finishType = '已出库'
  2361. organType = '客户:'
  2362. }
  2363. let head =
  2364. '条码,名称,规格,型号,颜色,扩展信息,库存,单位,多属性,数量,' +
  2365. finishType +
  2366. ',单价,金额,税率(%),税额,价税合计,备注'
  2367. for (let i = 0; i < this.dataSource.length; i++) {
  2368. let item = []
  2369. let ds = this.dataSource[i]
  2370. item.push(
  2371. ds.barCode,
  2372. ds.name,
  2373. ds.standard,
  2374. ds.model,
  2375. ds.color,
  2376. ds.materialOther,
  2377. ds.stock,
  2378. ds.unit,
  2379. ds.sku,
  2380. ds.operNumber,
  2381. ds.finishNumber,
  2382. ds.unitPrice,
  2383. ds.allPrice,
  2384. ds.taxRate,
  2385. ds.taxMoney,
  2386. ds.taxLastMoney,
  2387. ds.remark
  2388. )
  2389. list.push(item)
  2390. }
  2391. let organName = this.model.organName ? this.model.organName : ''
  2392. let tip =
  2393. organType + organName + ' ' + '单据日期:' + this.model.operTimeStr + ' ' + '单据编号:' + this.model.number
  2394. exportXlsPost(this.billType + '_' + this.model.number, '单据导出', head, tip, list)
  2395. },
  2396. //采购入库|采购退货出库|销售出库|销售退货入库
  2397. purchaseSaleExportExcel() {
  2398. let list = []
  2399. let organType = ''
  2400. if (this.billType === '采购入库' || this.billType === '采购退货出库') {
  2401. organType = '供应商:'
  2402. } else if (this.billType === '销售出库' || this.billType === '销售退货入库') {
  2403. organType = '客户:'
  2404. }
  2405. let head =
  2406. '仓库名称,条码,名称,规格,型号,颜色,扩展信息,库存,单位,序列号,批号,有效期,多属性,数量,单价,金额,税率(%),税额,价税合计,重量,备注'
  2407. for (let i = 0; i < this.dataSource.length; i++) {
  2408. let item = []
  2409. let ds = this.dataSource[i]
  2410. item.push(
  2411. ds.depotName,
  2412. ds.barCode,
  2413. ds.name,
  2414. ds.standard,
  2415. ds.model,
  2416. ds.color,
  2417. ds.materialOther,
  2418. ds.stock,
  2419. ds.unit,
  2420. ds.snList,
  2421. ds.batchNumber,
  2422. ds.expirationDate,
  2423. ds.sku,
  2424. ds.operNumber,
  2425. ds.unitPrice,
  2426. ds.allPrice,
  2427. ds.taxRate,
  2428. ds.taxMoney,
  2429. ds.taxLastMoney,
  2430. ds.weight,
  2431. ds.remark
  2432. )
  2433. list.push(item)
  2434. }
  2435. let organName = this.model.organName ? this.model.organName : ''
  2436. let linkNumber = this.model.linkNumber ? this.model.linkNumber : ''
  2437. let tip =
  2438. organType +
  2439. organName +
  2440. ' ' +
  2441. '单据日期:' +
  2442. this.model.operTimeStr +
  2443. ' ' +
  2444. '单据编号:' +
  2445. this.model.number +
  2446. '' +
  2447. '关联单号:' +
  2448. linkNumber
  2449. exportXlsPost(this.billType + '_' + this.model.number, '单据导出', head, tip, list)
  2450. },
  2451. //其它入库|其它出库
  2452. otherExportExcel() {
  2453. let list = []
  2454. let organType = ''
  2455. if (this.billType === '其它入库') {
  2456. organType = '供应商:'
  2457. } else if (this.billType === '其它出库') {
  2458. organType = '客户:'
  2459. }
  2460. let head = '仓库名称,条码,名称,规格,型号,颜色,扩展信息,库存,单位,序列号,批号,有效期,多属性,数量,单价,金额,备注'
  2461. for (let i = 0; i < this.dataSource.length; i++) {
  2462. let item = []
  2463. let ds = this.dataSource[i]
  2464. item.push(
  2465. ds.depotName,
  2466. ds.barCode,
  2467. ds.name,
  2468. ds.standard,
  2469. ds.model,
  2470. ds.color,
  2471. ds.materialOther,
  2472. ds.stock,
  2473. ds.unit,
  2474. ds.snList,
  2475. ds.batchNumber,
  2476. ds.expirationDate,
  2477. ds.sku,
  2478. ds.operNumber,
  2479. ds.unitPrice,
  2480. ds.allPrice,
  2481. ds.remark
  2482. )
  2483. list.push(item)
  2484. }
  2485. let organName = this.model.organName ? this.model.organName : ''
  2486. let tip =
  2487. organType + organName + ' ' + '单据日期:' + this.model.operTimeStr + ' ' + '单据编号:' + this.model.number
  2488. exportXlsPost(this.billType + '_' + this.model.number, '单据导出', head, tip, list)
  2489. },
  2490. //调拨出库
  2491. allocationOutExportExcel() {
  2492. let list = []
  2493. let head = '仓库名称,条码,名称,规格,型号,颜色,扩展信息,库存,调入仓库,单位,多属性,数量,单价,金额,备注'
  2494. for (let i = 0; i < this.dataSource.length; i++) {
  2495. let item = []
  2496. let ds = this.dataSource[i]
  2497. item.push(
  2498. ds.depotName,
  2499. ds.barCode,
  2500. ds.name,
  2501. ds.standard,
  2502. ds.model,
  2503. ds.color,
  2504. ds.materialOther,
  2505. ds.stock,
  2506. ds.anotherDepotName,
  2507. ds.unit,
  2508. ds.sku,
  2509. ds.operNumber,
  2510. ds.unitPrice,
  2511. ds.allPrice,
  2512. ds.remark
  2513. )
  2514. list.push(item)
  2515. }
  2516. let tip = '单据日期:' + this.model.operTimeStr + ' ' + '单据编号:' + this.model.number
  2517. exportXlsPost(this.billType + '_' + this.model.number, '单据导出', head, tip, list)
  2518. },
  2519. //组装单|拆卸单
  2520. assembleExportExcel() {
  2521. let list = []
  2522. let head = ['商品类型,仓库名称,条码,名称,规格,型号,颜色,扩展信息,库存,单位,多属性,数量,单价,金额,备注']
  2523. for (let i = 0; i < this.dataSource.length; i++) {
  2524. let item = []
  2525. let ds = this.dataSource[i]
  2526. item.push(
  2527. ds.mType,
  2528. ds.depotName,
  2529. ds.barCode,
  2530. ds.name,
  2531. ds.standard,
  2532. ds.model,
  2533. ds.color,
  2534. ds.materialOther,
  2535. ds.stock,
  2536. ds.unit,
  2537. ds.sku,
  2538. ds.operNumber,
  2539. ds.unitPrice,
  2540. ds.allPrice,
  2541. ds.remark
  2542. )
  2543. list.push(item)
  2544. }
  2545. let tip = '单据日期:' + this.model.operTimeStr + ' ' + '单据编号:' + this.model.number
  2546. exportXlsPost(this.billType + '_' + this.model.number, '单据导出', head, tip, list)
  2547. },
  2548. //盘点复盘
  2549. stockCheckReplayExportExcel() {
  2550. let list = []
  2551. let head = '仓库名称,条码,名称,规格,型号,扩展信息,库存,单位,多属性,数量,单价,金额,备注'
  2552. for (let i = 0; i < this.dataSource.length; i++) {
  2553. let item = []
  2554. let ds = this.dataSource[i]
  2555. item.push(
  2556. ds.depotName,
  2557. ds.barCode,
  2558. ds.name,
  2559. ds.standard,
  2560. ds.model,
  2561. ds.materialOther,
  2562. ds.stock,
  2563. ds.unit,
  2564. ds.sku,
  2565. ds.operNumber,
  2566. ds.unitPrice,
  2567. ds.allPrice,
  2568. ds.remark
  2569. )
  2570. list.push(item)
  2571. }
  2572. let linkNumber = this.model.linkNumber ? this.model.linkNumber : ''
  2573. let tip =
  2574. '单据日期:' + this.model.operTimeStr + ' ' + '单据编号:' + this.model.number + '' + '关联单号:' + linkNumber
  2575. exportXlsPost(this.billType + '_' + this.model.number, '单据导出', head, tip, list)
  2576. },
  2577. },
  2578. }
  2579. </script>
  2580. <style scoped>
  2581. .item-info {
  2582. float: left;
  2583. width: 30px;
  2584. height: 30px;
  2585. margin-left: 8px;
  2586. }
  2587. .item-img {
  2588. cursor: pointer;
  2589. position: static;
  2590. display: block;
  2591. width: 100%;
  2592. height: 100%;
  2593. object-fit: cover;
  2594. }
  2595. </style>