index.vue 132 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012
  1. <template>
  2. <div class="app-container">
  3. <el-form
  4. :model="queryParams"
  5. ref="queryForm"
  6. :inline="true"
  7. v-show="showSearch"
  8. label-width="88px"
  9. >
  10. <el-form-item label="业务编号" prop="fBillno">
  11. <el-input
  12. v-model="queryParams.fBillno"
  13. placeholder="请输入业务编号"
  14. style="width: 80%"
  15. clearable
  16. size="small"
  17. @keyup.enter.native="handleQuery"
  18. />
  19. </el-form-item>
  20. <el-form-item label="制单人" prop="createBy">
  21. <el-select
  22. v-model="queryParams.createBy"
  23. filterable
  24. remote
  25. clearable
  26. style="width: 80%"
  27. :remote-method="userRemoteMethod"
  28. placeholder="请选择制单人"
  29. >
  30. <el-option
  31. v-for="(dict, index) in userOptions"
  32. :key="index.userName"
  33. :label="dict.nickName"
  34. :value="dict.userName"
  35. ></el-option>
  36. </el-select>
  37. </el-form-item>
  38. <el-form-item label="调拨日期" prop="timeInterval">
  39. <el-date-picker
  40. v-model="queryParams.timeInterval"
  41. type="daterange"
  42. value-format="yyyy-MM-dd"
  43. clearable
  44. style="width: 60%"
  45. range-separator="至"
  46. start-placeholder="开始日期"
  47. end-placeholder="结束日期"
  48. @keyup.enter.native="handleQuery"
  49. >
  50. </el-date-picker>
  51. </el-form-item>
  52. <el-form-item label="贸易方式" prop="fTrademodeid">
  53. <el-select
  54. v-model="queryParams.fTrademodeid"
  55. placeholder="请选择贸易方式"
  56. clearable
  57. style="width: 80%"
  58. @keyup.enter.native="handleQuery"
  59. >
  60. <el-option
  61. v-for="(dict, index) in fTrademodeidOptions"
  62. :key="index.dictValue"
  63. :label="dict.dictLabel"
  64. :value="dict.dictValue"
  65. />
  66. </el-select>
  67. </el-form-item>
  68. <el-form-item label="货权方" prop="fCorpid">
  69. <el-select
  70. v-model="queryParams.fCorpid"
  71. filterable
  72. remote
  73. clearable
  74. style="width: 80%"
  75. @keyup.enter.native="handleQuery"
  76. :remote-method="corpsRemoteMethod"
  77. placeholder="请选择货权方"
  78. >
  79. <el-option
  80. v-for="(dict, index) in fMblnoOptions"
  81. :key="index.fId"
  82. :label="dict.fName"
  83. :value="dict.fId"
  84. ></el-option>
  85. </el-select>
  86. </el-form-item>
  87. <el-form-item label="提单号" prop="fMblno">
  88. <el-input
  89. v-model="queryParams.fMblno"
  90. placeholder="请输入提单号"
  91. clearable
  92. style="width: 80%"
  93. size="small"
  94. @keyup.enter.native="handleQuery"
  95. />
  96. </el-form-item>
  97. <el-form-item label="经营单位" prop="fSbu">
  98. <el-select
  99. v-model="queryParams.fSbu"
  100. filterable
  101. remote
  102. clearable
  103. :remote-method="fSbuRemoteMethod"
  104. @keyup.enter.native="handleQuery"
  105. style="width: 80%"
  106. placeholder="请选择经营单位"
  107. >
  108. <el-option
  109. v-for="(dict, index) in fSbuOptions"
  110. :key="index.fId"
  111. :label="dict.fName"
  112. :value="dict.fId"
  113. ></el-option>
  114. </el-select>
  115. </el-form-item>
  116. <el-form-item label="货物名称" prop="fGoodsid">
  117. <el-select
  118. v-model="queryParams.fGoodsid"
  119. filterable
  120. remote
  121. clearable
  122. :remote-method="goodsRemoteMethod"
  123. @keyup.enter.native="handleQuery"
  124. placeholder="请选择货物名称"
  125. >
  126. <el-option
  127. v-for="(dict, index) in goodsOptions"
  128. :key="index.fId"
  129. :label="dict.fName"
  130. :value="dict.fId"
  131. ></el-option>
  132. </el-select>
  133. </el-form-item>
  134. <el-form-item label="仓库" prop="fWarehouseid">
  135. <el-select
  136. v-model="queryParams.fWarehouseid"
  137. filterable
  138. :disabled="browseStatus"
  139. remote
  140. clearable
  141. style="width: 80%"
  142. :remote-method="warehouseRemoteMethod"
  143. @keyup.enter.native="handleQuery"
  144. placeholder="请选择仓库"
  145. >
  146. <el-option
  147. v-for="(dict, index) in warehouseOptions"
  148. :key="index.fId"
  149. :label="dict.fName"
  150. :value="dict.fId"
  151. ></el-option>
  152. </el-select>
  153. </el-form-item>
  154. <el-form-item label="品牌" prop="fMarks">
  155. <el-input
  156. v-model="queryParams.fMarks"
  157. placeholder="请输入品牌"
  158. clearable
  159. size="small"
  160. style="width: 80%"
  161. @keyup.enter.native="handleQuery"
  162. />
  163. </el-form-item>
  164. <el-form-item>
  165. <el-button
  166. type="cyan"
  167. icon="el-icon-search"
  168. size="mini"
  169. @click="handleQuery"
  170. >搜索
  171. </el-button>
  172. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  173. >重置
  174. </el-button>
  175. </el-form-item>
  176. </el-form>
  177. <el-row :gutter="10" class="mb8">
  178. <el-col :span="1.5">
  179. <el-button
  180. type="primary"
  181. icon="el-icon-plus"
  182. size="mini"
  183. @click="handleAdd(false)"
  184. v-hasPermi="['warehouseBusiness:stockTransfer:add']"
  185. >新增
  186. </el-button>
  187. </el-col>
  188. <el-col :span="1.5">
  189. <el-button
  190. type="success"
  191. icon="el-icon-edit"
  192. size="mini"
  193. :disabled="single"
  194. @click="handleUpdate"
  195. v-hasPermi="['warehouseBusiness:stockTransfer:edit']"
  196. >修改
  197. </el-button>
  198. </el-col>
  199. <el-col :span="1.5">
  200. <el-button
  201. type="warning"
  202. icon="el-icon-download"
  203. size="mini"
  204. @click="handleExport"
  205. v-hasPermi="['warehouseBusiness:stockTransfer:export']"
  206. >导出
  207. </el-button>
  208. </el-col>
  209. <el-col :span="1.5">
  210. <el-button
  211. type="warning"
  212. icon="el-icon-download"
  213. size="mini"
  214. @click="handleExport"
  215. :disabled="multiple"
  216. v-hasPermi="['warehouseBusiness:stockTransfer:export']"
  217. >导入
  218. </el-button>
  219. </el-col>
  220. <right-toolbar
  221. :showSearch.sync="showSearch"
  222. @queryTable="getList"
  223. ></right-toolbar>
  224. </el-row>
  225. <el-table
  226. v-loading="loading"
  227. :data="warehousebillsList"
  228. @selection-change="handleSelectionChange"
  229. >
  230. <el-table-column type="selection" width="55" align="center" />
  231. <el-table-column type="index" label="行号" align="center" />
  232. <el-table-column
  233. :show-overflow-tooltip="true"
  234. label="货权方"
  235. align="center"
  236. prop="fCorpid"
  237. />
  238. <el-table-column label="提单号" align="center" prop="fMblno" />
  239. <el-table-column label="品名" :show-overflow-tooltip="true" align="ceter" prop="fProductName" />
  240. <el-table-column label="品牌" align="center" prop="fMarks" />
  241. <el-table-column
  242. label="调拨日期"
  243. align="center"
  244. prop="createTime"
  245. style="width: 60%"
  246. ><template slot-scope="scope">
  247. <span>{{ parseTime(scope.row.fBsdate, "{y}-{m}-{d}") }}</span>
  248. </template>
  249. </el-table-column>
  250. <el-table-column label="仓库" align="center" prop="fWarehouseid" />
  251. <el-table-column label="计划调拨件数" align="center" prop="fPlanqty" />
  252. <el-table-column label="调拨件数" align="center" prop="fQty" />
  253. <el-table-column label="调拨毛重" align="center" prop="fGrossweight" />
  254. <el-table-column label="调拨净重" align="center" prop="fNetweight" />
  255. <el-table-column
  256. width="100"
  257. label="调拨状态"
  258. align="center"
  259. prop="fItemsStatus"
  260. >
  261. <template slot-scope="scope">
  262. <span v-if="scope.row.fItemsStatus === 1">计划</span>
  263. <span v-if="scope.row.fItemsStatus === 2">待调拨</span>
  264. <span v-if="scope.row.fItemsStatus === 6">已调拨</span>
  265. </template>
  266. </el-table-column>
  267. <el-table-column
  268. width="100"
  269. label="费用状态"
  270. align="center"
  271. prop="fBillstatus"
  272. >
  273. <template slot-scope="scope">
  274. <span v-if="scope.row.fBillstatus === 1">录入</span>
  275. <span v-if="scope.row.fBillstatus === 2">暂存</span>
  276. <span v-if="scope.row.fBillstatus === 3">驳回</span>
  277. <span v-if="scope.row.fBillstatus === 4">请核</span>
  278. <span v-if="scope.row.fBillstatus === 5">审核中</span>
  279. <span v-if="scope.row.fBillstatus === 6">全部入账</span>
  280. </template>
  281. </el-table-column>
  282. <el-table-column
  283. label="操作"
  284. align="center"
  285. class-name="small-padding fixed-width"
  286. width="180"
  287. >
  288. <template slot-scope="scope">
  289. <el-button
  290. size="mini"
  291. type="text"
  292. icon="el-icon-edit"
  293. @click="check(scope.row, true)"
  294. v-hasPermi="['warehouseBusiness:warehousebills:edit']"
  295. >查看
  296. </el-button>
  297. <el-button
  298. size="mini"
  299. type="text"
  300. icon="el-icon-edit"
  301. v-if="scope.row.fBillstatus === 4 || scope.row.fBillstatus === 5"
  302. @click="check(scope.row, true)"
  303. v-hasPermi="['warehouseBusiness:goodsTransfer:edit']"
  304. >审批进度
  305. </el-button>
  306. <el-button
  307. size="mini"
  308. type="text"
  309. icon="el-icon-edit"
  310. v-if="scope.row.fBillstatus <= 3"
  311. @click="handleUpdate(scope.row, false)"
  312. v-hasPermi="['warehouseBusiness:stockTransfer:edit']"
  313. >修改
  314. </el-button>
  315. <el-button
  316. size="mini"
  317. type="text"
  318. icon="el-icon-delete"
  319. @click="handleDelete(scope.row)"
  320. v-if="scope.row.fBillstatus <= 3"
  321. v-hasPermi="['warehouseBusiness:stockTransfer:remove']"
  322. >删除
  323. </el-button>
  324. </template>
  325. </el-table-column>
  326. </el-table>
  327. <pagination
  328. v-show="total > 0"
  329. :total="total"
  330. :page.sync="queryParams.pageNum"
  331. :limit.sync="queryParams.pageSize"
  332. @pagination="getList"
  333. />
  334. <!-- 新增或修改仓库主(出入库)对话框 -->
  335. <el-dialog
  336. :visible.sync="open"
  337. :close-on-click-modal="false"
  338. @close='addCloseDialog'
  339. width="80%"
  340. append-to-body
  341. :show-close="colseButton"
  342. >
  343. <el-form ref="form" :model="form" :rules="rules" label-width="120px">
  344. <el-row>
  345. <el-col :span="8">
  346. <el-form-item label="货权方" prop="fCorpid">
  347. <el-select
  348. v-model="form.fCorpid"
  349. filterable
  350. remote
  351. :disabled="notChange"
  352. @change="changefCorpid(form)"
  353. style="width: 80%"
  354. :remote-method="corpsRemoteMethod"
  355. placeholder="请输入模糊查找"
  356. >
  357. <el-option
  358. v-for="(dict, index) in fMblnoOptions"
  359. :key="index.fId"
  360. :label="dict.fName"
  361. :value="dict.fId"
  362. ></el-option>
  363. </el-select>
  364. </el-form-item>
  365. </el-col>
  366. <el-col :span="8">
  367. <el-form-item label="结算方式" prop="fstltypeid">
  368. <el-select
  369. v-model="form.fStltypeid"
  370. placeholder="请选择结算方式"
  371. :disabled="notChange"
  372. clearable
  373. style="width: 80%"
  374. >
  375. <el-option
  376. v-for="(dict, index) in fStltypeOptions"
  377. :key="index.dictValue"
  378. :label="dict.dictLabel"
  379. :value="dict.dictValue"
  380. />
  381. </el-select>
  382. </el-form-item>
  383. </el-col>
  384. <el-col :span="8">
  385. <el-form-item label="提单号" prop="fMblno">
  386. <el-input
  387. v-model="form.fMblno"
  388. style="width: 80%"
  389. :disabled="notChange"
  390. placeholder="手工输入"
  391. />
  392. </el-form-item>
  393. </el-col>
  394. </el-row>
  395. <el-row>
  396. <el-col :span="8">
  397. <el-form-item label="业务日期" prop="fBsdate">
  398. <el-date-picker
  399. v-model="form.fBsdate"
  400. style="width: 80%"
  401. type="date"
  402. :disabled="notChange"
  403. @change="changefBsdate"
  404. value-format="timestamp"
  405. placeholder="业务日期"
  406. >
  407. </el-date-picker>
  408. </el-form-item>
  409. </el-col>
  410. <el-col :span="8">
  411. <el-form-item label="仓管员" prop="fStorekeeper">
  412. <el-select
  413. v-model="form.fStorekeeper"
  414. filterable
  415. remote
  416. :disabled="notChange"
  417. style="width: 80%"
  418. :remote-method="userRemoteMethod"
  419. placeholder="请输入模糊查找"
  420. >
  421. <el-option
  422. v-for="dict in userOptions"
  423. :key="dict.userName"
  424. :label="dict.nickName"
  425. :value="dict.userName"
  426. ></el-option>
  427. </el-select>
  428. </el-form-item>
  429. </el-col>
  430. <el-col :span="8">
  431. <el-form-item label="仓库" prop="fWarehouseid">
  432. <el-select
  433. v-model="form.fWarehouseid"
  434. filterable
  435. remote
  436. @change="changefWarehouseid(form)"
  437. :disabled="notChange"
  438. style="width: 80%"
  439. :remote-method="warehouseRemoteMethod"
  440. placeholder="请输入模糊查找"
  441. >
  442. <el-option
  443. v-for="(dict, index) in warehouseOptions"
  444. :key="index.fId"
  445. :label="dict.fName"
  446. :value="dict.fId"
  447. ></el-option>
  448. </el-select>
  449. </el-form-item>
  450. </el-col>
  451. </el-row>
  452. <el-row>
  453. <el-col :span="8">
  454. <el-form-item label="单据编号" prop="fBillno">
  455. <el-input
  456. v-model="form.fBillno"
  457. style="width: 80%"
  458. disabled
  459. placeholder="单据编号"
  460. />
  461. </el-form-item>
  462. </el-col>
  463. <el-col :span="8">
  464. <el-form-item label="破损" prop="fifdamage">
  465. <el-select
  466. v-model="form.fIfdamage"
  467. placeholder="请选择是否破损"
  468. :disabled="notChange"
  469. clearable
  470. style="width: 80%"
  471. >
  472. <el-option
  473. v-for="dict in fIfdamageOptions"
  474. :key="dict.dictValue"
  475. :label="dict.dictLabel"
  476. :value="dict.dictValue"
  477. />
  478. </el-select>
  479. </el-form-item>
  480. </el-col>
  481. <el-col :span="8">
  482. <el-form-item label="过磅" prop="fifweigh">
  483. <el-select
  484. v-model="form.fIfweigh"
  485. placeholder="请选择是否过磅"
  486. :disabled="notChange"
  487. clearable
  488. style="width: 80%"
  489. >
  490. <el-option
  491. v-for="dict in fIfweighOptions"
  492. :key="dict.dictValue"
  493. :label="dict.dictLabel"
  494. :value="dict.dictValue"
  495. />
  496. </el-select>
  497. </el-form-item>
  498. </el-col>
  499. </el-row>
  500. <el-row>
  501. <el-col :span="8">
  502. <el-form-item label="贸易方式" prop="fTrademodeid">
  503. <el-select
  504. v-model="form.fTrademodeid"
  505. placeholder="请选择贸易方式"
  506. :disabled="notChange"
  507. clearable
  508. style="width: 80%"
  509. >
  510. <el-option
  511. v-for="dict in fTrademodeidOptions"
  512. :key="dict.dictValue"
  513. :label="dict.dictLabel"
  514. :value="dict.dictValue"
  515. />
  516. </el-select>
  517. </el-form-item>
  518. </el-col>
  519. <el-col :span="8">
  520. <el-form-item label="品牌" prop="fMarks">
  521. <el-input
  522. v-model="form.fMarks"
  523. style="width: 80%"
  524. disabled
  525. placeholder="品牌"
  526. />
  527. </el-form-item>
  528. </el-col>
  529. <el-col :span="8">
  530. <el-form-item label="品名" prop="fProductName">
  531. <el-input
  532. v-model="form.fProductName"
  533. style="width: 80%"
  534. disabled
  535. placeholder="品名"
  536. />
  537. </el-form-item>
  538. </el-col>
  539. </el-row>
  540. <el-row>
  541. <el-form-item label="备注" prop="remark">
  542. <el-input
  543. style="width: 100%"
  544. v-model="form.remark"
  545. :disabled="notChange"
  546. type="textarea"
  547. placeholder="请输入内容"
  548. />
  549. </el-form-item>
  550. </el-row>
  551. <div v-if="detailsHidden">
  552. <el-row style="margin-top: 30px">
  553. <el-col :span="8">
  554. <el-form-item label="仓库联系人" prop="fContacts">
  555. <el-input
  556. v-model="form.fContacts"
  557. :disabled="notChange"
  558. style="width: 80%"
  559. placeholder="仓库联系人"
  560. />
  561. </el-form-item>
  562. </el-col>
  563. <el-col :span="8">
  564. <el-form-item label="仓库电话" prop="ftel">
  565. <el-input
  566. v-model="form.fTel"
  567. :disabled="notChange"
  568. style="width: 80%"
  569. placeholder="请输仓库入电话"
  570. />
  571. </el-form-item>
  572. </el-col>
  573. </el-row>
  574. <el-row>
  575. <el-col :span="8">
  576. <el-form-item label="制单人" prop="createBy">
  577. <el-input
  578. disabled
  579. v-model="form.createBy"
  580. style="width: 80%"
  581. placeholder="制单人"
  582. />
  583. </el-form-item>
  584. </el-col>
  585. <el-col :span="8">
  586. <el-form-item label="制单部门" prop="fDeptid">
  587. <el-select
  588. v-model="form.fDeptid"
  589. filterable
  590. disabled
  591. style="width: 80%"
  592. remote
  593. >
  594. <el-option
  595. v-for="dict in deptOptions"
  596. :key="dict.deptId"
  597. :label="dict.deptName"
  598. :value="dict.deptId"
  599. ></el-option>
  600. </el-select>
  601. </el-form-item>
  602. </el-col>
  603. <el-col :span="8">
  604. <el-form-item disabled label="制单日期" prop="fbilldate">
  605. <el-date-picker
  606. v-model="form.createTime"
  607. size="large"
  608. type="date"
  609. disabled
  610. value-format="timestamp"
  611. placeholder="制单日期"
  612. >
  613. </el-date-picker>
  614. </el-form-item>
  615. </el-col>
  616. </el-row>
  617. </div>
  618. </el-form>
  619. <div style="
  620. display: flex;
  621. justify-content: space-between;
  622. align-items: center;
  623. margin: 10px 0;
  624. ">
  625. <div>
  626. <el-button
  627. type="primary"
  628. :disabled="browseStatus"
  629. @click.prevent="addRelevant"
  630. >新行
  631. </el-button>
  632. <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
  633. </div>
  634. <div style="display: flex">
  635. <el-button @click="detailsHidden ? (detailsHidden = false) : (detailsHidden = true)">{{ detailsHidden ? '隐藏' :
  636. '展开' }}
  637. </el-button>
  638. <!-- <el-button type="info" :disabled="printinglist.length <= 0" prop="打印" @click="printJobSheet">作业单</el-button>-->
  639. <!-- <el-button :disabled="printinglist.length <= 0" @click="discharge">装货</el-button>-->
  640. <el-button
  641. :disabled="dataListSelection.length <= 0 || browseStatus"
  642. @click.prevent="creditClick"
  643. >调拨确认
  644. </el-button>
  645. <el-button
  646. :disabled="dataWithdrawList.length <= 0 || browseStatus"
  647. @click.prevent="withdrawClick"
  648. >撤回调拨
  649. </el-button
  650. >
  651. <el-button
  652. style="background-color: #008000; color: #fff"
  653. @click="submitForm"
  654. :disabled="browseStatus"
  655. >请核
  656. </el-button
  657. >
  658. </div>
  659. <div style="font-size: 18px">调拨明细</div>
  660. <!--点击展开-->
  661. </div>
  662. <el-table
  663. :data="dataList"
  664. ref="tableList"
  665. tooltip-effect="dark"
  666. border
  667. stripe
  668. :summary-method="getSummaries"
  669. @selection-change="selectinventory"
  670. show-summary
  671. >
  672. <el-table-column type="selection" width="55" align="center" />
  673. <el-table-column label="序号" type="index" width="80">
  674. </el-table-column>
  675. <el-table-column
  676. prop="fMblno"
  677. header-align="center"
  678. align="center"
  679. width="140px"
  680. label="提单号"
  681. >
  682. </el-table-column>
  683. <el-table-column
  684. prop="fGoodsids"
  685. header-align="center"
  686. align="center"
  687. width="140px"
  688. label="品名"
  689. >
  690. </el-table-column>
  691. <el-table-column
  692. prop="fMarks"
  693. header-align="center"
  694. align="center"
  695. width="140px"
  696. label="*品牌"
  697. >
  698. </el-table-column>
  699. <el-table-column
  700. prop="fWarehouselocids"
  701. header-align="center"
  702. width="150px"
  703. align="center"
  704. label="*库区"
  705. >
  706. </el-table-column>
  707. <el-table-column
  708. prop="fTransferWarehouselocid"
  709. header-align="center"
  710. width="150px"
  711. align="center"
  712. label="*调拨库区"
  713. >
  714. <template slot-scope="scope">
  715. <el-select
  716. v-model="scope.row.fTransferWarehouselocid"
  717. :disabled="browseStatus || scope.row.fBillstatus === 6 || !form.fWarehouseid"
  718. filterable
  719. remote
  720. style="width: 80%"
  721. :remote-method="kqhouseRemoteMethod"
  722. placeholder="请输入模糊查找"
  723. >
  724. <el-option
  725. v-for="(dict, index) in kqhouseOptions"
  726. :key="index.fId"
  727. :label="dict.fName"
  728. :value="dict.fId"
  729. ></el-option>
  730. </el-select>
  731. </template>
  732. </el-table-column>
  733. <el-table-column
  734. prop="fPlanqty"
  735. header-align="center"
  736. align="center"
  737. width="180px"
  738. label="*当前库存"
  739. >
  740. </el-table-column>
  741. <el-table-column
  742. prop="fQty"
  743. header-align="center"
  744. width="180px"
  745. align="center"
  746. label="*调拨件数"
  747. >
  748. <template slot-scope="scope">
  749. <el-input
  750. oninput='this.value=this.value.replace(/[^\-?\d]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "")'
  751. @change="qtyChange(scope.row)"
  752. v-model="scope.row.fQty"
  753. :disabled="browseStatus || scope.row.fBillstatus === 6"
  754. placeholder="调拨件数"
  755. show-word-limit
  756. />
  757. </template>
  758. </el-table-column>
  759. <el-table-column
  760. prop="fGrossweight"
  761. header-align="center"
  762. width="180px"
  763. align="center"
  764. label="*调拨毛重"
  765. >
  766. <template slot-scope="scope">
  767. <el-input
  768. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  769. :disabled="browseStatus || scope.row.fBillstatus === 6"
  770. v-model="scope.row.fGrossweight"
  771. placeholder="调拨毛重"
  772. show-word-limit
  773. />
  774. </template>
  775. </el-table-column>
  776. <el-table-column
  777. prop="fNetweight"
  778. header-align="center"
  779. width="180px"
  780. align="center"
  781. label="*调拨净重"
  782. >
  783. <template slot-scope="scope">
  784. <el-input
  785. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  786. :disabled="browseStatus || scope.row.fBillstatus === 6"
  787. v-model="scope.row.fNetweight"
  788. placeholder="调拨净重"
  789. show-word-limit
  790. />
  791. </template>
  792. </el-table-column>
  793. <el-table-column
  794. prop="fVolumn"
  795. header-align="center"
  796. width="180px"
  797. align="center"
  798. label="调拨尺码"
  799. >
  800. <template slot-scope="scope">
  801. <el-input
  802. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d).*$/, "$1$2.$3")'
  803. :disabled="browseStatus || scope.row.fBillstatus === 6"
  804. v-model="scope.row.fVolumn"
  805. placeholder="调拨尺码"
  806. show-word-limit
  807. />
  808. </template>
  809. </el-table-column>
  810. <el-table-column
  811. prop="fPackagespecs"
  812. header-align="center"
  813. width="180px"
  814. align="center"
  815. label="*包装规格"
  816. >
  817. <template slot-scope="scope">
  818. <el-input
  819. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  820. v-model="scope.row.fPackagespecs"
  821. :disabled="browseStatus || scope.row.fBillstatus === 6"
  822. placeholder="包装规格"
  823. show-word-limit
  824. />
  825. </template>
  826. </el-table-column>
  827. <el-table-column
  828. prop="fCntrtype"
  829. header-align="center"
  830. align="center"
  831. width="140px"
  832. label="箱型"
  833. >
  834. <template slot-scope="scope">
  835. <el-input
  836. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  837. v-model="scope.row.fCntrtype"
  838. :disabled="browseStatus || scope.row.fBillstatus === 6"
  839. placeholder="箱型"
  840. show-word-limit
  841. />
  842. </template>
  843. </el-table-column>
  844. <el-table-column
  845. prop="fCntqty"
  846. header-align="center"
  847. align="center"
  848. width="140px"
  849. label="箱量"
  850. >
  851. <template slot-scope="scope">
  852. <el-input
  853. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  854. v-model="scope.row.fCntqty"
  855. placeholder="箱量"
  856. :disabled="browseStatus || scope.row.fBillstatus === 6"
  857. show-word-limit
  858. />
  859. </template>
  860. </el-table-column>
  861. <el-table-column
  862. prop="fCntrno"
  863. header-align="center"
  864. width="150px"
  865. align="center"
  866. label="箱号"
  867. >
  868. <template slot-scope="scope">
  869. <el-input
  870. v-model="scope.row.fCntrno"
  871. placeholder="箱号"
  872. :disabled="browseStatus || scope.row.fBillstatus === 6"
  873. show-word-limit
  874. />
  875. </template>
  876. </el-table-column>
  877. <el-table-column
  878. prop="fGoodsval"
  879. header-align="center"
  880. width="150px"
  881. align="center"
  882. label="货值"
  883. >
  884. <template slot-scope="scope">
  885. <el-input
  886. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
  887. v-model="scope.row.fGoodsval"
  888. placeholder="货值"
  889. :disabled="browseStatus || scope.row.fBillstatus === 6"
  890. show-word-limit
  891. />
  892. </template>
  893. </el-table-column>
  894. <!--<el-table-column
  895. prop="fSerialNumber"
  896. header-align="center"
  897. width="160px"
  898. align="center"
  899. label="流水号"
  900. >
  901. </el-table-column>-->
  902. <el-table-column
  903. prop="remark"
  904. header-align="center"
  905. width="150px"
  906. align="center"
  907. label="备注"
  908. >
  909. <template slot-scope="scope">
  910. <el-input
  911. v-model="scope.row.remark"
  912. placeholder="备注"
  913. :disabled="browseStatus || scope.row.fBillstatus === 6"
  914. show-word-limit
  915. />
  916. </template>
  917. </el-table-column>
  918. <el-table-column
  919. prop="fBillstatus"
  920. header-align="center"
  921. width="150px"
  922. align="center"
  923. label="状态"
  924. >
  925. <template slot-scope="scope">
  926. <span v-if="scope.row.fBillstatus === 6">已调拨</span>
  927. <span v-if="scope.row.fBillstatus === 2">未调拨</span>
  928. <span v-if="scope.row.fBillstatus === 1">计划</span>
  929. </template>
  930. </el-table-column>
  931. <el-table-column
  932. header-align="center"
  933. align="center"
  934. label="操作"
  935. width="130PX"
  936. >
  937. <template slot-scope="scope">
  938. <el-button
  939. @click.native.prevent="deleteRow(scope.$index, dataList)"
  940. size="small"
  941. :disabled="browseStatus || scope.row.fBillstatus === 6"
  942. >移除
  943. </el-button>
  944. </template>
  945. </el-table-column>
  946. </el-table>
  947. <div
  948. class="dialogTableTitle flex a-center jlr"
  949. style="
  950. display: flex;
  951. justify-content: space-between;
  952. align-items: center;
  953. margin: 10px 0;
  954. "
  955. >
  956. <div>
  957. <el-button :disabled="browseStatus" @click.prevent="addRelevt()"
  958. >新行
  959. </el-button>
  960. </div>
  961. <div style="font-size: 18px">附件明细</div>
  962. </div>
  963. <el-table
  964. :data="relevantAttachments"
  965. ref="table"
  966. tooltip-effect="dark"
  967. border
  968. stripe
  969. style="width: 100%"
  970. height="150"
  971. >
  972. <el-table-column label="序号" type="index" width="80">
  973. </el-table-column>
  974. <el-table-column
  975. prop="fName"
  976. header-align="center"
  977. align="center"
  978. width="250px"
  979. label="附件名称"
  980. >
  981. <template slot-scope="scope">
  982. <el-input
  983. v-model="scope.row.fName"
  984. :disabled="browseStatus"
  985. placeholder="附件名称"
  986. show-word-limit
  987. />
  988. </template>
  989. </el-table-column>
  990. <el-table-column
  991. prop="createBy"
  992. header-align="center"
  993. align="center"
  994. width="250px"
  995. label="上传人"
  996. >
  997. <template slot-scope="scope">
  998. <el-input
  999. v-model="scope.row.createBy"
  1000. disabled
  1001. placeholder="上传人"
  1002. show-word-limit
  1003. />
  1004. </template>
  1005. </el-table-column>
  1006. <el-table-column
  1007. prop="createTime"
  1008. header-align="center"
  1009. align="center"
  1010. label="上传时间"
  1011. >
  1012. <template slot-scope="scope">
  1013. <el-date-picker
  1014. v-model="scope.row.createTime"
  1015. type="date"
  1016. disabled
  1017. placeholder="上传时间"
  1018. format="yyyy-MM-dd HH:mm"
  1019. value-format="timestamp"
  1020. ></el-date-picker>
  1021. </template>
  1022. </el-table-column>
  1023. <el-table-column
  1024. prop="fUrl"
  1025. header-align="center"
  1026. align="center"
  1027. width="300px"
  1028. label="上传附件"
  1029. >
  1030. <template slot-scope="scope">
  1031. <uploadFile @input="showFile" v-model="scope.row.fUrl" />
  1032. </template>
  1033. </el-table-column>
  1034. <el-table-column header-align="center" align="center" label="操作">
  1035. <template slot-scope="scope">
  1036. <el-button
  1037. @click.native.prevent="deleteRow(scope.$index, relevantAttachments)"
  1038. :disabled="browseStatus"
  1039. size="small"
  1040. >移除
  1041. </el-button>
  1042. </template>
  1043. </el-table-column>
  1044. </el-table>
  1045. <div
  1046. class="dialogTableTitle flex a-center jlr"
  1047. style="
  1048. display: flex;
  1049. justify-content: space-between;
  1050. align-items: center;
  1051. margin: 10px 0;
  1052. "
  1053. >
  1054. <div>
  1055. <el-button :disabled="browseStatus" @click.prevent="addCollection()"
  1056. >新行
  1057. </el-button>
  1058. <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
  1059. <!--暂时隐藏-->
  1060. <!-- <el-button type="warning" @click.prevent="addStorages('Dr')">仓储费协议</el-button >-->
  1061. <el-button type="danger"
  1062. :disabled="browseStatus"
  1063. @click.prevent="addAgreement('Dr')"
  1064. >作业费协议</el-button
  1065. >
  1066. </div>
  1067. <div style="font-size: 18px">收款信息</div>
  1068. </div>
  1069. <el-table
  1070. :data="warehouseDrList"
  1071. ref="tableDr"
  1072. tooltip-effect="dark"
  1073. border
  1074. stripe
  1075. show-summary
  1076. @selection-change="collectionoptions"
  1077. :summary-method="warehouseDrSummaries"
  1078. >
  1079. <el-table-column type="selection" width="55" align="center" />
  1080. <el-table-column label="序号" type="index" width="80">
  1081. </el-table-column>
  1082. <el-table-column
  1083. prop="fCorpid"
  1084. header-align="center"
  1085. align="center"
  1086. width="180px"
  1087. label="客户名称"
  1088. >
  1089. <template slot-scope="scope">
  1090. <el-select
  1091. v-model="scope.row.fCorpid"
  1092. filterable
  1093. remote
  1094. :disabled="browseStatus"
  1095. :remote-method="corpsRemoteMethod"
  1096. placeholder="客户名称"
  1097. >
  1098. <el-option
  1099. v-for="(dict, index) in KHblnoOptions"
  1100. :key="index.fId"
  1101. :label="dict.fName"
  1102. :value="dict.fId"
  1103. ></el-option>
  1104. </el-select>
  1105. </template>
  1106. </el-table-column>
  1107. <el-table-column
  1108. prop="fFeeid"
  1109. header-align="center"
  1110. align="center"
  1111. width="180px"
  1112. label="费用名称"
  1113. >
  1114. <template slot-scope="scope">
  1115. <el-select
  1116. v-model="scope.row.fFeeid"
  1117. filterable
  1118. remote
  1119. :disabled="browseStatus"
  1120. :remote-method="fWRemoteMethod"
  1121. placeholder="费用名称"
  1122. >
  1123. <el-option
  1124. v-for="(dict, index) in fWbuOptions"
  1125. :key="index.fId"
  1126. :label="dict.fName"
  1127. :value="dict.fId"
  1128. ></el-option>
  1129. </el-select>
  1130. </template>
  1131. </el-table-column>
  1132. <el-table-column
  1133. prop="fFeeunitid"
  1134. header-align="center"
  1135. align="center"
  1136. width="180px"
  1137. label="计价单位"
  1138. >
  1139. <template slot-scope="scope">
  1140. <el-select
  1141. v-model="scope.row.fFeeunitid"
  1142. placeholder="请选择计费单位"
  1143. @change="changeFeeUnit(scope.row)"
  1144. :disabled="browseStatus"
  1145. clearable
  1146. >
  1147. <el-option
  1148. v-for="(dict, index) in jFeetunitOptions"
  1149. :key="index.dictValue"
  1150. :label="dict.dictLabel"
  1151. :value="dict.dictValue"
  1152. />
  1153. </el-select>
  1154. </template>
  1155. </el-table-column>
  1156. <el-table-column
  1157. prop="fQty"
  1158. header-align="center"
  1159. align="center"
  1160. width="150px"
  1161. label="数量"
  1162. >
  1163. <template slot-scope="scope">
  1164. <el-input
  1165. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1166. v-model="scope.row.fQty"
  1167. placeholder="数量"
  1168. :disabled="browseStatus"
  1169. @change="changeContractAmt(scope.row)"
  1170. show-word-limit
  1171. />
  1172. </template>
  1173. </el-table-column>
  1174. <el-table-column
  1175. prop="funitprice"
  1176. header-align="center"
  1177. align="center"
  1178. width="150px"
  1179. label="单价"
  1180. >
  1181. <template slot-scope="scope">
  1182. <el-input
  1183. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1184. v-model="scope.row.fUnitprice"
  1185. placeholder="单价"
  1186. :disabled="browseStatus"
  1187. @change="changeContractAmt(scope.row)"
  1188. show-word-limit
  1189. />
  1190. </template>
  1191. </el-table-column>
  1192. <el-table-column
  1193. prop="fAmount"
  1194. header-align="center"
  1195. align="center"
  1196. width="150px"
  1197. label="金额"
  1198. >
  1199. <template slot-scope="scope">
  1200. <el-input
  1201. disabled
  1202. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1203. v-model="scope.row.fAmount"
  1204. placeholder="金额"
  1205. show-word-limit
  1206. />
  1207. </template>
  1208. </el-table-column>
  1209. <el-table-column
  1210. prop="fCurrency"
  1211. header-align="center"
  1212. align="center"
  1213. width="150px"
  1214. label="币别"
  1215. >
  1216. <template slot-scope="scope">
  1217. <el-input
  1218. v-model="scope.row.fCurrency"
  1219. :disabled="browseStatus"
  1220. placeholder="币别"
  1221. show-word-limit
  1222. />
  1223. </template>
  1224. </el-table-column>
  1225. <el-table-column
  1226. prop="fExrate"
  1227. header-align="center"
  1228. align="center"
  1229. width="150px"
  1230. label="汇率"
  1231. >
  1232. <template slot-scope="scope">
  1233. <el-input
  1234. v-model="scope.row.fExrate"
  1235. :disabled="browseStatus"
  1236. placeholder="汇率"
  1237. show-word-limit
  1238. />
  1239. </template>
  1240. </el-table-column>
  1241. <el-table-column
  1242. prop="fTaxrate"
  1243. header-align="center"
  1244. align="center"
  1245. width="150px"
  1246. label="税率"
  1247. >
  1248. <template slot-scope="scope">
  1249. <el-input
  1250. v-model="scope.row.fTaxrate"
  1251. :disabled="browseStatus"
  1252. placeholder="税率"
  1253. show-word-limit
  1254. />
  1255. </template>
  1256. </el-table-column>
  1257. <el-table-column
  1258. prop="remarks"
  1259. header-align="center"
  1260. align="center"
  1261. width="150px"
  1262. label="备注"
  1263. >
  1264. <template slot-scope="scope">
  1265. <el-input
  1266. v-model="scope.row.remarks"
  1267. :disabled="browseStatus"
  1268. placeholder="备注"
  1269. show-word-limit
  1270. />
  1271. </template>
  1272. </el-table-column>
  1273. <el-table-column
  1274. header-align="center"
  1275. align="center"
  1276. label="操作"
  1277. width="200px"
  1278. >
  1279. <template slot-scope="scope">
  1280. <el-button
  1281. @click.native.prevent="deleteRow(scope.$index, warehouseDrList)"
  1282. size="small"
  1283. :disabled="browseStatus"
  1284. >移除</el-button
  1285. >
  1286. </template>
  1287. </el-table-column>
  1288. </el-table>
  1289. <div
  1290. class="dialogTableTitle flex a-center jlr"
  1291. style="
  1292. display: flex;
  1293. justify-content: space-between;
  1294. align-items: center;
  1295. margin: 10px 0;
  1296. "
  1297. >
  1298. <div>
  1299. <el-button :disabled="browseStatus" @click.prevent="addpayment()"
  1300. >新行
  1301. </el-button>
  1302. <!-- <el-button :disabled="browseStatus" @click.prevent="deleteRow(warehouseDrList)"
  1303. >删除
  1304. </el-button> -->
  1305. <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
  1306. <!--暂时隐藏-->
  1307. <!-- <el-button type="warning" @click.prevent="addStorages('Cr')">仓储费协议</el-button>-->
  1308. <el-button type="danger"
  1309. :disabled="browseStatus"
  1310. @click.prevent="addAgreement('Cr')"
  1311. >作业费协议</el-button
  1312. >
  1313. </div>
  1314. <div style="font-size: 18px">付款信息</div>
  1315. </div>
  1316. <el-table
  1317. :data="warehouseCrList"
  1318. ref="table"
  1319. tooltip-effect="dark"
  1320. border
  1321. stripe
  1322. show-summary
  1323. @selection-change="collectionoptions"
  1324. :summary-method="warehouseDrSummaries"
  1325. >
  1326. <el-table-column type="selection" width="55" align="center" />
  1327. <el-table-column label="序号" type="index" width="80">
  1328. </el-table-column>
  1329. <el-table-column
  1330. prop="fCorpid"
  1331. header-align="center"
  1332. align="center"
  1333. width="180px"
  1334. label="客户名称"
  1335. >
  1336. <template slot-scope="scope">
  1337. <el-select
  1338. v-model="scope.row.fCorpid"
  1339. filterable
  1340. remote
  1341. :disabled="browseStatus"
  1342. :remote-method="corpsRemoteMethod"
  1343. placeholder="客户名称"
  1344. >
  1345. <el-option
  1346. v-for="(dict, index) in KHblnoOptions"
  1347. :key="index.fId"
  1348. :label="dict.fName"
  1349. :value="dict.fId"
  1350. ></el-option>
  1351. </el-select>
  1352. </template>
  1353. </el-table-column>
  1354. <el-table-column
  1355. prop="fFeeid"
  1356. header-align="center"
  1357. align="center"
  1358. width="180px"
  1359. label="费用名称"
  1360. >
  1361. <template slot-scope="scope">
  1362. <el-select
  1363. v-model="scope.row.fFeeid"
  1364. filterable
  1365. remote
  1366. :disabled="browseStatus"
  1367. :remote-method="fWRemoteMethod"
  1368. placeholder="费用名称"
  1369. >
  1370. <el-option
  1371. v-for="(dict, index) in fWbuOptions"
  1372. :key="index.fId"
  1373. :label="dict.fName"
  1374. :value="dict.fId"
  1375. ></el-option>
  1376. </el-select>
  1377. </template>
  1378. </el-table-column>
  1379. <el-table-column
  1380. prop="fFeeunitid"
  1381. header-align="center"
  1382. align="center"
  1383. width="180px"
  1384. label="计价单位"
  1385. >
  1386. <template slot-scope="scope">
  1387. <el-select
  1388. v-model="scope.row.fFeeunitid"
  1389. placeholder="请选择计费单位"
  1390. @change="changeFeeUnit(scope.row)"
  1391. :disabled="browseStatus"
  1392. clearable
  1393. >
  1394. <el-option
  1395. v-for="(dict, index) in jFeetunitOptions"
  1396. :key="index.dictValue"
  1397. :label="dict.dictLabel"
  1398. :value="dict.dictValue"
  1399. ></el-option>
  1400. </el-select>
  1401. </template>
  1402. </el-table-column>
  1403. <el-table-column
  1404. prop="fQty"
  1405. header-align="center"
  1406. align="center"
  1407. width="150px"
  1408. label="数量"
  1409. >
  1410. <template slot-scope="scope">
  1411. <el-input
  1412. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1413. v-model="scope.row.fQty"
  1414. @change="changeContractAmt(scope.row)"
  1415. :disabled="browseStatus"
  1416. placeholder="数量"
  1417. show-word-limit
  1418. />
  1419. </template>
  1420. </el-table-column>
  1421. <el-table-column
  1422. prop="funitprice"
  1423. header-align="center"
  1424. align="center"
  1425. width="150px"
  1426. label="单价"
  1427. >
  1428. <template slot-scope="scope">
  1429. <el-input
  1430. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1431. v-model="scope.row.fUnitprice"
  1432. @change="changeContractAmt(scope.row)"
  1433. :disabled="browseStatus"
  1434. placeholder="单价"
  1435. show-word-limit
  1436. />
  1437. </template>
  1438. </el-table-column>
  1439. <el-table-column
  1440. prop="fAmount"
  1441. header-align="center"
  1442. align="center"
  1443. width="150px"
  1444. label="金额"
  1445. >
  1446. <template slot-scope="scope">
  1447. <el-input
  1448. disabled
  1449. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1450. v-model="scope.row.fAmount"
  1451. placeholder="金额"
  1452. show-word-limit
  1453. />
  1454. </template>
  1455. </el-table-column>
  1456. <el-table-column
  1457. prop="fCurrency"
  1458. header-align="center"
  1459. align="center"
  1460. width="150px"
  1461. label="币别"
  1462. >
  1463. <template slot-scope="scope">
  1464. <el-input
  1465. v-model="scope.row.fCurrency"
  1466. :disabled="browseStatus"
  1467. placeholder="币别"
  1468. show-word-limit
  1469. />
  1470. </template>
  1471. </el-table-column>
  1472. <el-table-column
  1473. prop="fExrate"
  1474. header-align="center"
  1475. align="center"
  1476. width="150px"
  1477. label="汇率"
  1478. >
  1479. <template slot-scope="scope">
  1480. <el-input
  1481. v-model="scope.row.fExrate"
  1482. :disabled="browseStatus"
  1483. placeholder="汇率"
  1484. show-word-limit
  1485. />
  1486. </template>
  1487. </el-table-column>
  1488. <el-table-column
  1489. prop="fTaxrate"
  1490. header-align="center"
  1491. align="center"
  1492. width="150px"
  1493. label="税率"
  1494. >
  1495. <template slot-scope="scope">
  1496. <el-input
  1497. v-model="scope.row.fTaxrate"
  1498. :disabled="browseStatus"
  1499. placeholder="税率"
  1500. show-word-limit
  1501. />
  1502. </template>
  1503. </el-table-column>
  1504. <el-table-column
  1505. prop="remarks"
  1506. header-align="center"
  1507. align="center"
  1508. width="150px"
  1509. label="备注"
  1510. >
  1511. <template slot-scope="scope">
  1512. <el-input
  1513. v-model="scope.row.remarks"
  1514. :disabled="browseStatus"
  1515. placeholder="备注"
  1516. show-word-limit
  1517. />
  1518. </template>
  1519. </el-table-column>
  1520. <el-table-column
  1521. header-align="center"
  1522. align="center"
  1523. width="200px"
  1524. label="操作"
  1525. >
  1526. <template slot-scope="scope">
  1527. <el-button
  1528. @click.native.prevent="deleteRow(scope.$index, warehouseCrList)"
  1529. size="small"
  1530. :disabled="browseStatus"
  1531. >移除</el-button
  1532. >
  1533. </template>
  1534. </el-table-column>
  1535. </el-table>
  1536. <div slot="footer" class="dialog-footer">
  1537. <!-- <el-button type="success" prop="打印" @click="showEditDialog_ss"
  1538. >收货单
  1539. </el-button> -->
  1540. <!--<el-button type="warning" prop="打印" :disabled="printinglist.length <= 0 || browseStatus" @click="showEditDialog_s"
  1541. >调拨单
  1542. </el-button>
  1543. <el-button :disabled="printinglist.length <= 0 || browseStatus" @click="discharge">装货</el-button>
  1544. <el-button type="info" prop="打印" :disabled="printinglist.length <= 0 || browseStatus" @click="printJobSheet"
  1545. >作业单
  1546. </el-button>-->
  1547. <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
  1548. <approval-comments v-if="addOrUpdateVisib" ref="ApprovalComments" @refreshDataList="returnData"></approval-comments>
  1549. <el-button v-if="approve === true" @click="goApproval">审批</el-button>
  1550. <el-button type="danger" :disabled="disappear" v-if="form.fBillstatus == '4'" @click="backApproval">撤销审批</el-button>
  1551. <el-button type="success" @click="backrRconciliation" v-if="form.fBillstatus == '6'">撤销请核</el-button>
  1552. <el-button type="primary" v-if="notChange" @click="addOrUpdateHandle()">查看审批流</el-button>
  1553. <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
  1554. <el-button
  1555. style="background-color: #008000; color: #fff"
  1556. @click="submitForm"
  1557. :disabled="browseStatus"
  1558. >请核</el-button
  1559. >
  1560. <el-button v-if="cancelButton === true" @click="cancel">取 消</el-button>
  1561. <el-button v-if="cancelButton === false" @click="homePage">取消</el-button>
  1562. </div>
  1563. <!-- 选择库存总账数据 -->
  1564. <el-dialog
  1565. title="库存总账"
  1566. :modal="false"
  1567. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  1568. :visible.sync="whgenlegVisible"
  1569. width="70%"
  1570. >
  1571. <el-table
  1572. :data="whgenlegList"
  1573. ref="table"
  1574. tooltip-effect="dark"
  1575. width="100%"
  1576. border
  1577. stripe
  1578. @selection-change="whgenlegSelectionChange"
  1579. >
  1580. <el-table-column type="selection" width="55"> </el-table-column>
  1581. <el-table-column
  1582. prop="fMblno"
  1583. header-align="center"
  1584. align="center"
  1585. label="提单号"
  1586. >
  1587. </el-table-column>
  1588. <el-table-column
  1589. prop="createTime"
  1590. header-align="center"
  1591. align="center"
  1592. width="180px"
  1593. label="入库日期"
  1594. >
  1595. </el-table-column>
  1596. <el-table-column
  1597. prop="fGoodsids"
  1598. header-align="center"
  1599. align="center"
  1600. label="品名"
  1601. >
  1602. </el-table-column>
  1603. <el-table-column
  1604. prop="fQtyblc"
  1605. header-align="center"
  1606. align="center"
  1607. label="结余数量"
  1608. >
  1609. </el-table-column>
  1610. <el-table-column
  1611. prop="fWarehouseLocationids"
  1612. header-align="center"
  1613. align="center"
  1614. label="库区"
  1615. >
  1616. </el-table-column>
  1617. <el-table-column
  1618. prop="fMarks"
  1619. header-align="center"
  1620. align="center"
  1621. label="品牌"
  1622. >
  1623. </el-table-column>
  1624. </el-table>
  1625. <pagination
  1626. v-show="whgenlegTotal > 0"
  1627. :total="whgenlegTotal"
  1628. :page.sync="whgenlegParams.pageNum"
  1629. :limit.sync="whgenlegParams.pageSize"
  1630. @pagination="getWhgenlegList"
  1631. />
  1632. <div slot="footer" class="dialog-footer">
  1633. <el-button type="primary" @click="whgenlegData">导入库存总账</el-button>
  1634. <el-button @click="whgenlegVisible = false">取 消</el-button>
  1635. </div>
  1636. </el-dialog>
  1637. <!-- 选择作业费协议数据 -->
  1638. <el-dialog
  1639. title="作业费协议"
  1640. :modal="false"
  1641. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  1642. :visible.sync="warehousingagreements"
  1643. width="70%"
  1644. >
  1645. <el-table
  1646. :data="tasklegList"
  1647. ref="table"
  1648. tooltip-effect="dark"
  1649. width="100%"
  1650. border
  1651. stripe
  1652. @selection-change="whgenlegSelectionChange"
  1653. >
  1654. <el-table-column type="selection" width="55"> </el-table-column>
  1655. <el-table-column label="行号" type="index" width="80">
  1656. </el-table-column>
  1657. <el-table-column
  1658. prop="fCorpname"
  1659. header-align="center"
  1660. align="center"
  1661. label="客户名称"
  1662. >
  1663. </el-table-column>
  1664. <el-table-column
  1665. prop="fName"
  1666. header-align="center"
  1667. align="center"
  1668. width="180px"
  1669. label="费用名称"
  1670. >
  1671. </el-table-column>
  1672. <el-table-column
  1673. prop="fFeeUnitid"
  1674. header-align="center"
  1675. align="center"
  1676. label="计价单位"
  1677. >
  1678. <template slot-scope="scope">
  1679. <span v-if="scope.row.fFeeUnitid === 1">件数</span>
  1680. <span v-if="scope.row.fFeeUnitid === 2">毛重</span>
  1681. <span v-if="scope.row.fFeeUnitid === 3">净重</span>
  1682. <span v-if="scope.row.fFeeUnitid === 4">尺码</span>
  1683. <span v-if="scope.row.fFeeUnitid === 5">固定</span>
  1684. </template>
  1685. </el-table-column>
  1686. <el-table-column
  1687. prop="fPrice"
  1688. header-align="center"
  1689. align="center"
  1690. label="单价"
  1691. >
  1692. </el-table-column>
  1693. </el-table>
  1694. <pagination
  1695. v-show="whgenlegTotal > 0"
  1696. :total="whgenlegTotal"
  1697. :page.sync="queryParams.pageNum"
  1698. :limit.sync="queryParams.pageSize"
  1699. @pagination="getWhgenlegList"
  1700. />
  1701. <div slot="footer" class="dialog-footer">
  1702. <el-button type="primary" @click="zhgenlegData">导入作业费</el-button>
  1703. <el-button @click="warehousingagreements = false">取 消</el-button>
  1704. </div>
  1705. </el-dialog>
  1706. <!-- 选择仓储费协议数据 -->
  1707. <el-dialog
  1708. title="仓储费协议"
  1709. :modal="false"
  1710. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  1711. :visible.sync="storageAgreements"
  1712. width="70%"
  1713. >
  1714. <el-table
  1715. :data="tasklegList"
  1716. ref="table"
  1717. tooltip-effect="dark"
  1718. width="100%"
  1719. border
  1720. stripe
  1721. @selection-change="whgenlegSelectionChange"
  1722. >
  1723. <el-table-column type="selection" width="55"> </el-table-column>
  1724. <el-table-column label="行号" type="index" width="80"></el-table-column>
  1725. <el-table-column
  1726. prop="fContractno"
  1727. header-align="center"
  1728. align="center"
  1729. label="提单号"
  1730. >
  1731. </el-table-column>
  1732. <el-table-column
  1733. prop="fCorpid"
  1734. header-align="center"
  1735. align="center"
  1736. label="客户名称"
  1737. >
  1738. </el-table-column>
  1739. <el-table-column
  1740. prop="fGoodsids"
  1741. header-align="center"
  1742. align="center"
  1743. label="品名"
  1744. >
  1745. </el-table-column>
  1746. <el-table-column
  1747. prop="fBegindate"
  1748. header-align="center"
  1749. align="center"
  1750. width="180px"
  1751. label="入库日期"
  1752. >
  1753. </el-table-column>
  1754. </el-table>
  1755. <pagination
  1756. v-show="whgenlegTotal > 0"
  1757. :total="whgenlegTotal"
  1758. :page.sync="whgenlegParams.pageNum"
  1759. :limit.sync="whgenlegParams.pageSize"
  1760. @pagination="getWhgenlegList"
  1761. />
  1762. <div slot="footer" class="dialog-footer">
  1763. <el-button type="primary" @click="storageFeeExport">导入仓储费</el-button>
  1764. <el-button @click="storageAgreements = false">取 消</el-button>
  1765. </div>
  1766. </el-dialog>
  1767. <el-dialog
  1768. title="入库页面"
  1769. :modal="false"
  1770. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  1771. :visible.sync="editDialogVisible_s"
  1772. :close-on-click-modal="false"
  1773. width="70%"
  1774. >
  1775. <table
  1776. id="print_area"
  1777. class="biaoge zzss"
  1778. border="1"
  1779. style="border-collapse: collapse; border: none"
  1780. >
  1781. <tr>
  1782. <td
  1783. width="100"
  1784. colspan="7"
  1785. class="zzss"
  1786. style="font-size: 28px; font-weight: bold; border: none"
  1787. >
  1788. 青岛大木进仓单
  1789. </td>
  1790. </tr>
  1791. <tr>
  1792. <td
  1793. width="100"
  1794. colspan="7"
  1795. class="zzss"
  1796. style="font-size: 28px; font-weight: bold; border: none"
  1797. >
  1798. &nbsp;
  1799. </td>
  1800. </tr>
  1801. <tr>
  1802. <td width="450" colspan="2" class="zzss">
  1803. 货权方:{{ form.fCorpName }}
  1804. </td>
  1805. <td width="450" colspan="2" class="zzss">
  1806. 仓库:{{ form.fWarehouseids }}
  1807. </td>
  1808. <td width="450" colspan="3" class="zzss">地址:{{ fAddr }}</td>
  1809. </tr>
  1810. <tr>
  1811. <td width="200" colspan="2" class="zzss">保管方:大木有限公司</td>
  1812. <td width="200" colspan="2" class="zzss">
  1813. 联系人:{{ form.fContacts }}
  1814. </td>
  1815. <td width="200" colspan="3" class="zzss">电话:{{ form.fTel }}</td>
  1816. </tr>
  1817. <tr>
  1818. <td width="100" border="1">提单号</td>
  1819. <td width="100">品名</td>
  1820. <td width="100">箱型</td>
  1821. <td width="100">品牌</td>
  1822. <td width="100">件数</td>
  1823. <td width="100">重量</td>
  1824. <td width="100">包装规格</td>
  1825. </tr>
  1826. <tr>
  1827. <td width="100">{{ form.fMblno }}</td>
  1828. <td width="100">{{ fGoodsids }}</td>
  1829. <td width="100">{{ fCntrtype }}</td>
  1830. <td width="100"></td>
  1831. <td width="100">包</td>
  1832. <td width="100">吨</td>
  1833. <td width="100"></td>
  1834. </tr>
  1835. <tr>
  1836. <td width="100">序号</td>
  1837. <td width="100">入货日期</td>
  1838. <td width="100">箱量(20GP)</td>
  1839. <td width="100">重量</td>
  1840. <td width="100">件数</td>
  1841. <td width="100">入库重量</td>
  1842. <td width="100">入库件数</td>
  1843. </tr>
  1844. <tr v-for="(item, index) in printinglist" :key="index">
  1845. <td width="100">{{ index + 1 }}</td>
  1846. <td width="100">{{ item.fChargedate }}</td>
  1847. <td width="100">{{ item.fCntqty }}</td>
  1848. <td width="100">{{ item.fGrossweight }}</td>
  1849. <td width="100">{{ item.fPlanqty }}</td>
  1850. <td width="100">{{ item.fNetweight }}</td>
  1851. <td width="100">{{ item.fQty }}</td>
  1852. </tr>
  1853. <tr>
  1854. <td width="100" colspan="2">合计:</td>
  1855. <td width="100">{{ fCntqty }}</td>
  1856. <td width="100">{{ fGrossweight }}</td>
  1857. <td width="100">{{ fPlanqty }}</td>
  1858. <td width="100">{{ fNetweight }}</td>
  1859. <td width="100">{{ fQty }}</td>
  1860. </tr>
  1861. <tr>
  1862. <td width="100">备注:</td>
  1863. <td width="100" colspan="6"></td>
  1864. </tr>
  1865. <tr>
  1866. <td width="100" colspan="7" class="zzss">
  1867. 本进仓单经仓管员签字并经保管方盖章后即专项作为货物所有人的货权证明,本单据不得转让。
  1868. </td>
  1869. </tr>
  1870. <tr style="border: none">
  1871. <td width="100" colspan="2" class="zzss" style="border: none">
  1872. 开单员:
  1873. </td>
  1874. <td width="100" colspan="3" class="zzss" style="border: none">
  1875. {{ form.createBy }}
  1876. </td>
  1877. <td width="100" colspan="2" class="zzss" style="border: none">
  1878. 仓管员:{{ form.fContacts }}
  1879. </td>
  1880. </tr>
  1881. <tr style="border: none">
  1882. <td width="100" colspan="2" class="zzss" style="border: none">
  1883. 开单时间:
  1884. </td>
  1885. <td width="100" colspan="3" class="zzss" style="border: none">
  1886. {{ fBsdate }}
  1887. </td>
  1888. <td width="100" colspan="2" class="zzss" style="border: none">
  1889. (盖章)
  1890. </td>
  1891. </tr>
  1892. </table>
  1893. <button @click="printSomething">打印</button>
  1894. </el-dialog>
  1895. <el-dialog
  1896. title="收货单打印"
  1897. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  1898. :visible.sync="editDialogVisible_ss"
  1899. :close-on-click-modal="false"
  1900. width="70%"
  1901. :modal="false"
  1902. >
  1903. <table
  1904. id="print_area"
  1905. class="biaoge zzss"
  1906. border="1"
  1907. style="border-collapse: collapse; border: none;margin-top;100px;"
  1908. >
  1909. <tr>
  1910. <td
  1911. width="1400"
  1912. colspan="6"
  1913. class="zzss"
  1914. style="font-size: 26px; font-weight: bold; border: none"
  1915. >
  1916. 大木国际物流(青岛)有限公司收货单
  1917. </td>
  1918. </tr>
  1919. <!-- <div v-for="{{}}" :key="index"> -->
  1920. <tr>
  1921. <td width="400">车号:</td>
  1922. <td width="400">{{ fTruckno }}</td>
  1923. <td
  1924. width="500"
  1925. colspan="2"
  1926. style="padding-bottom: 0px; font-weight: bold; border: none"
  1927. class="zzss"
  1928. >
  1929. 日期:
  1930. </td>
  1931. <td
  1932. width="500"
  1933. colspan="2"
  1934. style="padding-bottom: 0px; font-weight: bold; border: none"
  1935. class="zzss"
  1936. >
  1937. {{ fBsdate }}
  1938. </td>
  1939. </tr>
  1940. <tr v-for="(item, index) in printinglist" :key="index">
  1941. <td width="250">货物品名:</td>
  1942. <td width="250">{{ item.fGoodsids }}</td>
  1943. <td width="250">白色聚吕</td>
  1944. <!-- <td width="200" colspan="2">件数: 161件</td> -->
  1945. <!-- <td width="200"></td> -->
  1946. <td width="200" colspan="4" class="zzss">
  1947. 件数: {{ item.fQty }}件
  1948. </td>
  1949. </tr>
  1950. <!-- <tr>
  1951. <td width="1400" colspan="6">&nbsp;</td>
  1952. </tr> -->
  1953. <tr v-for="(item, index) in printinglist" :key="index">
  1954. <td>备注:</td>
  1955. <td colspan="5">{{ item.remark }}</td>
  1956. </tr>
  1957. <tr>
  1958. <td>司机签字:</td>
  1959. <td></td>
  1960. <td colspan="2">司机电话:</td>
  1961. <td colspan="2">{{ form.fTel }}</td>
  1962. </tr>
  1963. <tr>
  1964. <td>制单人:</td>
  1965. <td>{{ form.createBy }}</td>
  1966. <td colspan="2">收货人:</td>
  1967. <td colspan="2">{{ form.fContacts }}</td>
  1968. </tr>
  1969. <!-- <tr>
  1970. <td colspan="6" class="zzss">&nbsp;</td>
  1971. </tr> -->
  1972. <tr>
  1973. <td width="280" class="zzss"></td>
  1974. <td width="280" class="zzss"></td>
  1975. <td width="280" class="zzss"></td>
  1976. <td width="280" class="zzss"></td>
  1977. <td width="290" class="zzss">地址:{{ fAddr }}</td>
  1978. <td width="290" class="zzss">电话:{{ form.fTel }}</td>
  1979. </tr>
  1980. <!-- </div> -->
  1981. </table>
  1982. <button @click="printSomething">打印</button>
  1983. </el-dialog>
  1984. <el-dialog
  1985. title="调拨作业单打印"
  1986. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  1987. :visible.sync="openPrintJobSheet"
  1988. :close-on-click-modal="false"
  1989. width="70%"
  1990. :modal="false"
  1991. >
  1992. <table id="print_area"
  1993. class="biaoge zzss"
  1994. border="1"
  1995. style="border-collapse: collapse; border: none"
  1996. >
  1997. <tr>
  1998. <td
  1999. width="1400"
  2000. colspan="6"
  2001. class="zzss"
  2002. style="font-size: 28px; font-weight: bold; border: none"
  2003. >
  2004. 大木国际物流(青岛)有限公司作业单
  2005. </td>
  2006. </tr>
  2007. <tr>
  2008. <td
  2009. width="900"
  2010. colspan="4"
  2011. class="zzss"
  2012. style="font-size: 28px; font-weight: bold"
  2013. >
  2014. &nbsp;
  2015. </td>
  2016. <td
  2017. width="500"
  2018. colspan="2"
  2019. style="padding-bottom: 0px; font-weight: bold; border: none"
  2020. class="zzss"
  2021. >
  2022. 调拨日期:{{ fBsdate }}
  2023. </td>
  2024. </tr>
  2025. <tr v-for="(item, index) in printinglist" :key="index">
  2026. <td width="200">车号</td>
  2027. <td width="200">{{ item.fTruckno }}</td>
  2028. <td width="200">货物品名</td>
  2029. <td width="200">{{ item.fGoodsids }}</td>
  2030. </tr>
  2031. <tr>
  2032. <td width="1400" colspan="6">&nbsp;</td>
  2033. </tr>
  2034. <tr>
  2035. <td>备注:</td>
  2036. <td colspan="5">{{form.remark}}</td>
  2037. </tr>
  2038. <tr v-for="(item, index) in feelDrSelection" :key="'info2-'+index">
  2039. <td width="200">收费</td>
  2040. <td width="200">{{ item.fFeeName }}</td>
  2041. <td width="200">货物品名</td>
  2042. <td width="200">元</td>
  2043. <td width="200">{{ item.fAmount }}</td>
  2044. </tr>
  2045. <tr>
  2046. <td>司机签字:</td>
  2047. <td></td>
  2048. <td>电话</td>
  2049. <td>{{ form.fTel }}</td>
  2050. <td colspan="2" rowspan="2">
  2051. 确认货物数量无误,包装于货物完好!<br />调拨盖好篷布,如有违背责任自负<br />装卸工是否收小费
  2052. </td>
  2053. </tr>
  2054. <tr>
  2055. <td>制表:</td>
  2056. <td>{{ form.createBy }}</td>
  2057. <td>机械/人工:</td>
  2058. <td>{{ form.fContacts }}</td>
  2059. </tr>
  2060. <tr>
  2061. <td colspan="6" class="zzss">&nbsp;</td>
  2062. </tr>
  2063. <tr>
  2064. <td width="280" class="zzss"></td>
  2065. <td width="280" class="zzss"></td>
  2066. <td width="280" class="zzss"></td>
  2067. <td width="280" class="zzss"></td>
  2068. <td width="290" class="zzss">地址:{{ fAddr }}</td>
  2069. <td width="290" class="zzss">电话:{{ form.fTel }}</td>
  2070. </tr>
  2071. </table>
  2072. <div style="display: flex; justify-content: space-between">
  2073. <el-button type="primary" @click="printSomething">打印</el-button>
  2074. <el-button @click="closeWindow">取消</el-button>
  2075. </div>
  2076. </el-dialog>
  2077. </el-dialog>
  2078. </div>
  2079. </template>
  2080. <script>
  2081. import print from "print-js";
  2082. import {
  2083. backFee,
  2084. RevocationApproval,
  2085. addWhgenleg,
  2086. getStockTransferList,
  2087. getStockTransfer,
  2088. delStockTransfer,
  2089. updateCredit,
  2090. addJoblist,
  2091. disChargelist,
  2092. addStockTransfer,
  2093. warehouseSubmission,
  2094. updateStockTransfer,
  2095. exportStockTransfer,
  2096. } from "@/api/warehouseBusiness/stockTransfer";
  2097. import { listAgreement, operationAgreement } from "@/api/agreement/agreement";
  2098. import { listAgreements } from "@/api/warehouseBusiness/agreement";
  2099. import { listCorps } from "@/api/basicdata/corps";
  2100. import { listFees, getFees } from "@/api/basicdata/fees";
  2101. import { listWarehouse } from "@/api/basicdata/warehouse";
  2102. import { listArea } from "@/api/basicdata/area";
  2103. import { listGoods } from "@/api/basicdata/goods";
  2104. import { listUser, queryUserVal } from "@/api/system/user";
  2105. import UploadFile from "@/components/Uploadfile";
  2106. import { listWhgenleg } from "@/api/reportManagement/whgenleg";
  2107. import Global from '@/layout/components/global'
  2108. import AddOrUpdate from '@/views/viewApproval'
  2109. import ApprovalComments from '@/views/startApproval'
  2110. export default {
  2111. name: "Warehousebills",
  2112. components: {
  2113. UploadFile,
  2114. AddOrUpdate,
  2115. ApprovalComments
  2116. },
  2117. data() {
  2118. return {
  2119. cancelButton:true,
  2120. approve:false,
  2121. disappear:false,
  2122. colseButton:true,
  2123. addOrUpdateVisible: false,
  2124. addOrUpdateVisib:false,
  2125. stockTransferId:140,
  2126. notChange:false,
  2127. index: 0,
  2128. fFeeUnitid: null,
  2129. fFeeUnitids: null,
  2130. formBrowseStatus: false,
  2131. detailsHidden: false,
  2132. warehousingagreements: false,
  2133. fTruckno: null,
  2134. fBsdate: null,
  2135. fCntrtype: null,
  2136. fGoodsids: null,
  2137. fPlanqty: null,
  2138. fPlannetweight: null,
  2139. fPlanvolumn: null,
  2140. fGrossweight: 0,
  2141. fCntqty: 0,
  2142. fNetweight: 0,
  2143. fVolumn: 0,
  2144. fid: 0,
  2145. fQty: 0,
  2146. fSbu: 0,
  2147. // 遮罩层
  2148. loading: true,
  2149. // 打印地址
  2150. fAddr: "",
  2151. // 税率
  2152. fTaxrate: null,
  2153. // 选中数组
  2154. ids: [],
  2155. userVal: {
  2156. userName: null,
  2157. nickName: null,
  2158. deptId: null,
  2159. },
  2160. queryForm: {},
  2161. // 费用状态
  2162. costStatus: 'Dr',
  2163. // 库存总账表
  2164. whgenlegList: [],
  2165. whgenlegTotal: 0,
  2166. // 弹窗库存总账数据
  2167. dialogWhgenlegList: [],
  2168. // 库存总账对话框
  2169. whgenlegVisible: false,
  2170. // 收费多选框
  2171. feelDrSelection: [],
  2172. // 新增用户对话框
  2173. editDialogVisible_s: false,
  2174. editDialogVisible_ss: false,
  2175. openPrintJobSheet: false,
  2176. editDialogClosed_ss: false,
  2177. storageAgreements: false,
  2178. dataList: [],
  2179. warehouseCrList: [],
  2180. warehouseDrList: [],
  2181. printinglist: [],
  2182. browseStatus: false,
  2183. relevantAttachments: [],
  2184. // 非单个禁用
  2185. single: true,
  2186. // 非多个禁用
  2187. multiple: true,
  2188. // 显示搜索条件
  2189. showSearch: true,
  2190. // 总条数
  2191. total: 0,
  2192. // 仓库主(出入库)表格数据
  2193. warehousebillsList: [],
  2194. // 弹出层标题
  2195. title: "",
  2196. // 是否显示弹出层
  2197. open: false,
  2198. // 货权方(客户数据)
  2199. fMblnoOptions: [],
  2200. // 货权方(客户数据)
  2201. // 客户名称
  2202. KHblnoOptions: [],
  2203. // 作业费协议
  2204. tasklegList: [],
  2205. fSbuOptions: [],
  2206. // 操作员
  2207. userOptions: [],
  2208. // 操作员
  2209. goodsOptions: [],
  2210. // 制单部门
  2211. deptOptions: [],
  2212. // 仓库(仓库数据)
  2213. warehouseOptions: [],
  2214. // 库存明细入账数组
  2215. dataListSelection: [],
  2216. // 库存明细撤回入账数组
  2217. dataWithdrawList: [],
  2218. kqhouseOptions: [],
  2219. // 贸易方式(数据字典),对应t_trademodels 字典
  2220. fTrademodeidOptions: [],
  2221. // 结算方式(数据字典),下拉选择字典
  2222. fStltypeOptions: [],
  2223. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典
  2224. fIfweighOptions: [],
  2225. // 是否破损(数据字典),默认F否则T字典
  2226. fIfdamageOptions: [],
  2227. // 单据类型(数据字典)SJRK字典
  2228. fBilltypeOptions: [],
  2229. // 状态(数据字典),N 入字典
  2230. fBillstatusOptions: [],
  2231. // 费用名称
  2232. fWbuOptions: [],
  2233. // 计价单位
  2234. jFeetunitOptions: [
  2235. {dictLabel: "件数",dictValue: 1},
  2236. {dictLabel: "毛重",dictValue: 2},
  2237. {dictLabel: "净重",dictValue: 3},
  2238. {dictLabel: "尺码",dictValue: 4},
  2239. {dictLabel: "固定",dictValue: 5},
  2240. ],
  2241. // 查询参数
  2242. queryParams: {
  2243. pageNum: 1,
  2244. pageSize: 10,
  2245. fBillno: null,
  2246. createBy: null,
  2247. createTime: null,
  2248. fCustomsdeclartion: null,
  2249. fOriginalbillno: null,
  2250. fDeptid: null,
  2251. fBsdeptid: null,
  2252. fContacts: null,
  2253. fTel: null,
  2254. fCorpid: null,
  2255. fTocorpid: null,
  2256. fStltypeid: null,
  2257. fBscorpno: null,
  2258. fWarehouseid: null,
  2259. fStorekeeper: null,
  2260. fBsdate: null,
  2261. fPlanqty: null,
  2262. fPlangrossweight: null,
  2263. fPlannetweight: null,
  2264. fPlanvolumn: null,
  2265. fQty: null,
  2266. fGrossweight: null,
  2267. fNetweight: null,
  2268. fVolumn: null,
  2269. fTrademodeid: null,
  2270. fSbu: null,
  2271. fFeetunit: null,
  2272. fMblno: null,
  2273. fVslvoy: null,
  2274. fEta: null,
  2275. fCustomno: null,
  2276. fIfweigh: null,
  2277. fIfpledge: null,
  2278. fIfdamage: null,
  2279. fBankcorpid: null,
  2280. fBilltype: null,
  2281. fBillstatus: null,
  2282. fCreateby: null,
  2283. fCreatetime: null,
  2284. fGoodsid: null,
  2285. fCntrtype: null,
  2286. fCntqty: null,
  2287. },
  2288. // 库存总账参数
  2289. whgenlegParams: {
  2290. pageNum: 1,
  2291. pageSize: 10,
  2292. fMblno: null,
  2293. fCorpid: null,
  2294. fWarehouseid: null,
  2295. },
  2296. // 表单参数
  2297. form: {
  2298. fMblno: null,
  2299. fCorpid: null,
  2300. fTrademodeid: null,
  2301. fWarehouseid: null,
  2302. },
  2303. // 表单校验
  2304. rules: {
  2305. fDeptid: [{ required: true, message: " ", trigger: "blur" }],
  2306. fBsdeptid: [{ required: true, message: " ", trigger: "blur" }],
  2307. fCorpid: [{ required: true, message: " ", trigger: "blur"},],
  2308. fPlanqty: [{ required: true, message: " ", trigger: "blur"},],
  2309. fFeeUnitid: [{ required: true, message: " ", trigger: "blur" }],
  2310. fChargedate: [{ required: true, message: " ", trigger: "blur" }],
  2311. fBillingway: [{ required: true, message: " ", trigger: "blur" }],
  2312. fBsdate: [{ required: true, message: " ", trigger: "blur" }],
  2313. fTrademodeid: [{ required: true, message: " ", trigger: "blur" }],
  2314. fSbu: [{ required: true, message: " ", trigger: "blur" }],
  2315. fWarehouseid: [{ required: true, message: " ", trigger: "blur" }],
  2316. fPlannetweight: [{ required: true, message: " ", trigger: "blur"},],
  2317. fPlangrossweight: [{ required: true, message: " ", trigger: "blur"},],
  2318. fbillingway: [
  2319. {
  2320. required: true,
  2321. message: " ",
  2322. trigger: "blur",
  2323. },
  2324. ],
  2325. fTocorpid: [
  2326. {
  2327. required: true,
  2328. message: " ",
  2329. trigger: "blur",
  2330. },
  2331. ],
  2332. },
  2333. };
  2334. },
  2335. created() {
  2336. this.getList();
  2337. this.getDicts("data_trademodes").then((response) => {
  2338. this.fTrademodeidOptions = response.data;
  2339. });
  2340. this.getDicts("data_stltype_type").then((response) => {
  2341. this.fStltypeOptions = response.data;
  2342. });
  2343. this.getDicts("tax_rate").then((response) => {
  2344. this.fTaxrate = response.data[0].dictValue
  2345. });
  2346. this.getDicts("data_ifweigh_status").then((response) => {
  2347. this.fIfweighOptions = response.data;
  2348. });
  2349. this.getDicts("data_ifdamage_status").then((response) => {
  2350. this.fIfdamageOptions = response.data;
  2351. });
  2352. this.getDicts("data_billtype_type").then((response) => {
  2353. this.fBilltypeOptions = response.data;
  2354. });
  2355. this.getDicts("sys_common_status").then((response) => {
  2356. this.fBillstatusOptions = response.data;
  2357. });
  2358. this.register()
  2359. },
  2360. activated(){
  2361. this.Jump()
  2362. },
  2363. methods: {
  2364. // 撤销审核
  2365. backrRconciliation(){
  2366. this.form.fBillstatus = '1'
  2367. backFee(this.form.fId).then(response=>{
  2368. this.msgSuccess("撤回成功")
  2369. this.getList()
  2370. })
  2371. this.open = false
  2372. this.getList()
  2373. },
  2374. // 默认录入人
  2375. register() {
  2376. queryUserVal().then((response)=>{
  2377. this.Lander = response.user.userName
  2378. })
  2379. },
  2380. // 审批按钮
  2381. goApproval(){
  2382. this.addOrUpdateVisib = true
  2383. this.$nextTick(() => {
  2384. this.$refs.ApprovalComments.init(this.form.fId,this.stockTransferId)
  2385. })
  2386. },
  2387. Jump(){
  2388. this.approval = this.$route.query.data
  2389. if(this.approval){
  2390. this.colseButton = false
  2391. this.approval = JSON.parse(this.approval)
  2392. this.hide = false
  2393. this.open = true
  2394. this.browseStatus = true
  2395. this.notChange = true
  2396. this.approve = true
  2397. this.disappear = true
  2398. this.cancelButton = false
  2399. this.reset()
  2400. getStockTransfer(this.approval.billId).then((response) => {
  2401. if (response.data.warehousebills) {
  2402. this.form = response.data.warehousebills;
  2403. this.$set(this.form, "fEta", Date.parse(this.form.fEta));
  2404. this.$set(this.form, "fStltypeid", this.form.fStltypeid + '');
  2405. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  2406. this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
  2407. this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + '');
  2408. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  2409. }
  2410. if (response.data.corps) {
  2411. this.fMblnoOptions = response.data.corps;
  2412. this.KHblnoOptions = response.data.corps;
  2413. this.fSbuOptions = response.data.corps;
  2414. }
  2415. if (response.data.feesList) {
  2416. this.fWbuOptions = response.data.feesList;
  2417. }
  2418. if (response.data.warehouse) {
  2419. this.warehouseOptions = response.data.warehouse;
  2420. }
  2421. if (response.data.warehouseBillsItem) {
  2422. this.dataList = response.data.warehouseBillsItem;
  2423. for (let list in this.dataList) {
  2424. if (!this.form.fMblno) {
  2425. this.$set(this.form, "fMblno", this.dataList[list].fMblno);
  2426. }
  2427. if (this.dataList[list].fBillstatus >= 6) {
  2428. this.formBrowseStatus = true;
  2429. }
  2430. this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
  2431. }
  2432. }
  2433. if (response.data.enclosures) {
  2434. this.relevantAttachments = response.data.enclosures;
  2435. }
  2436. if (response.data.warehouse) {
  2437. this.warehouseDrList = response.data.warehousebillsfeesDr;
  2438. }
  2439. if (response.data.warehousebillsfeesCr) {
  2440. this.warehouseCrList = response.data.warehousebillsfeesCr;
  2441. }
  2442. if (response.data.sysUser) {
  2443. this.userVal = response.data.sysUser
  2444. this.userOptions = response.data.sysUser;
  2445. }
  2446. if (response.data.dept) {
  2447. this.deptOptions = []
  2448. this.deptOptions.push(response.data.dept)
  2449. }
  2450. if (response.data.feesList) {
  2451. this.fWbuOptions = response.data.feesList;
  2452. }
  2453. if (response.data.goodsList) {
  2454. this.goodsOptions = response.data.goodsList;
  2455. }
  2456. if (response.data.warehouse) {
  2457. this.warehouseOptions = response.data.warehouse;
  2458. }
  2459. if (response.data.warehouseAreas) {
  2460. this.kqhouseOptions = response.data.warehouseAreas;
  2461. }
  2462. this.open = true;
  2463. this.title = "修改调拨";
  2464. });
  2465. }
  2466. },
  2467. homepaGe(){
  2468. let view = {
  2469. fullPath: "/business/stockTransfer",
  2470. hash: "",
  2471. matched: Array(2),
  2472. meta: Object,
  2473. name: "StockTransfer",
  2474. params: Object,
  2475. path: "/business/stockTransfer",
  2476. query: Object,
  2477. title: "调拨"
  2478. }
  2479. this.$router.push({ path: '/index'})
  2480. this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
  2481. if (this.isActive(view)) {
  2482. this.toLastView(visitedViews, view)
  2483. }
  2484. })
  2485. Global.$emit("removeCache", "closeSelectedTag", view);
  2486. },
  2487. homePage() {
  2488. this.open = false
  2489. let view = {
  2490. fullPath: "/business/stockTransfer",
  2491. hash: "",
  2492. matched: Array(2),
  2493. meta: Object,
  2494. name: "StockTransfer",
  2495. params: Object,
  2496. path: "/business/stockTransfer",
  2497. query: Object,
  2498. title: "调拨"
  2499. }
  2500. this.$router.push({ path: '/index' })
  2501. this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
  2502. if (this.isActive(view)) {
  2503. this.toLastView(visitedViews, view)
  2504. }
  2505. })
  2506. Global.$emit("removeCache", "closeSelectedTag", view);
  2507. },
  2508. // 撤销审批
  2509. backApproval(){
  2510. let data = {
  2511. id:this.form.fId,
  2512. actId:this.stockTransferId,
  2513. billId:this.form.fId
  2514. }
  2515. RevocationApproval(data).then(response => {
  2516. this.msgSuccess("撤销审批成功")
  2517. this.disappear = true
  2518. this.open = false
  2519. this.getList()
  2520. })
  2521. },
  2522. returnData(){
  2523. this.addOrUpdateVisib = false
  2524. this.open = false
  2525. this.homepaGe()
  2526. },
  2527. getDataList(){
  2528. this.addOrUpdateVisible = false
  2529. },
  2530. // 查看审批流
  2531. addOrUpdateHandle(){
  2532. this.addOrUpdateVisible = true
  2533. this.addOrUpdateVisib = false
  2534. let id = '448'
  2535. let actId = '110'
  2536. this.$nextTick(() => {
  2537. this.$refs.addOrUpdate.init(this.form.fId,this.stockTransferId)
  2538. })
  2539. },
  2540. //关闭弹框的事件
  2541. addCloseDialog(){
  2542. this.getList()
  2543. },
  2544. // 上传成功返回数据
  2545. showFile(row) {
  2546. for(let list in this.relevantAttachments) {
  2547. this.$set(this.relevantAttachments[list], "fUrl", row.url);
  2548. this.$set(this.relevantAttachments[list], "fName", row.fileName);
  2549. }
  2550. },
  2551. printSomething() {
  2552. // 此处的style即为打印时的样式
  2553. const style = "@media print { .print-div{ padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center}}";
  2554. print({ printable: "print_area", type: "html",
  2555. style: style, // 亦可使用引入的外部css;
  2556. scanStyles: false,
  2557. });
  2558. this.addList();
  2559. this.openPrintJobSheet = false;
  2560. },
  2561. // 关闭二级弹窗
  2562. closeWindow () {
  2563. this.openPrintJobSheet = false
  2564. },
  2565. // 新增附件上传
  2566. addRelevt() {
  2567. this.relevantAttachments.push({
  2568. fUrl: null,
  2569. fName: null,
  2570. createBy: this.form.createBy,
  2571. createTime: Date.parse(new Date()),
  2572. });
  2573. },
  2574. // 新增作业费协议
  2575. addAgreement(status) {
  2576. this.costStatus = status
  2577. if (!this.form.fCorpid) {
  2578. this.$message({ message: "请维护货权方", type: "warning", });
  2579. } else {
  2580. this.whgenlegList = [];
  2581. this.dialogWhgenlegList = [];
  2582. this.whgenlegTotal = 0;
  2583. this.warehousingagreements = true;
  2584. this.getWhgenlegListt();
  2585. }
  2586. },
  2587. // 新增仓储费协议
  2588. addStorages() {
  2589. if (!this.form.fCorpid) {
  2590. this.$message({ message: "请维护货权方", type: "warning", });
  2591. return false
  2592. }
  2593. this.whgenlegList = [];
  2594. this.dialogWhgenlegList = [];
  2595. this.whgenlegTotal = 0;
  2596. this.storageAgreements = true;
  2597. this.getAgreement();
  2598. },
  2599. // 查询仓储费协议
  2600. getAgreement() {
  2601. this.queryParams.fCorpid = this.form.fCorpid;
  2602. listAgreements(this.queryParams).then((response) => {
  2603. this.tasklegList = response.rows;
  2604. this.whgenlegTotal = response.total;
  2605. });
  2606. },
  2607. // 查询作业费信息
  2608. getWhgenlegListt() {
  2609. this.queryParams.fLineno = this.form.fCorpid;
  2610. operationAgreement(this.queryParams).then((response) => {
  2611. this.tasklegList = response.rows;
  2612. this.whgenlegTotal = response.total;
  2613. });
  2614. },
  2615. // 导入付款信息
  2616. whgenlegDatas() {
  2617. if (this.dialogWhgenlegList.length === 0) {
  2618. this.$message({
  2619. message: "请选择需要导入的数据",
  2620. type: "warning",
  2621. });
  2622. } else {
  2623. for (let whgen in this.dialogWhgenlegList) {
  2624. let feeId = this.dialogWhgenlegList[whgen].feeFId;
  2625. getFees(feeId).then((response) => {
  2626. this.fWbuOptions.push(response.data);
  2627. });
  2628. this.warehouseDrList.push({
  2629. fCorpid: this.dialogWhgenlegList[whgen].fCorpid,
  2630. fFeeid: feeId,
  2631. fFeeUnitid: this.dialogWhgenlegList[whgen].fFeeUnitid + "",
  2632. fUnitprice: this.dialogWhgenlegList[whgen].fPrice,
  2633. fCurrency: "RMB",
  2634. fExrate: 1,
  2635. fTaxrate: this.fTaxrate
  2636. });
  2637. }
  2638. this.warehousingagreements = false;
  2639. }
  2640. },
  2641. // 导出作业费
  2642. zhgenlegData() {
  2643. if (this.dialogWhgenlegList.length === 0) {
  2644. this.$message({ message: "请选择需要导入的数据", type: "warning", });
  2645. return false
  2646. }
  2647. for (let zhgen in this.dialogWhgenlegList) {
  2648. let haveGoods = false
  2649. let feeId = this.dialogWhgenlegList[zhgen].feeFId
  2650. if (this.fWbuOptions.length !== 0) {
  2651. for (let wbu in this.fWbuOptions) {
  2652. if (this.fWbuOptions[wbu].fId === feeId) {
  2653. haveGoods = true
  2654. break
  2655. }
  2656. }
  2657. }
  2658. if (!haveGoods) {
  2659. getFees(feeId).then((response) => {
  2660. this.fWbuOptions.push(response.data)
  2661. })
  2662. }
  2663. let qty = 1;
  2664. if (this.dialogWhgenlegList[zhgen].fFeeUnitid === 1) {
  2665. qty = this.fQty
  2666. } else if (this.dialogWhgenlegList[zhgen].fFeeUnitid === 2) {
  2667. qty = this.fGrossweight
  2668. } else if (this.dialogWhgenlegList[zhgen].fFeeUnitid === 3) {
  2669. qty = this.fNetweight
  2670. } else if (this.dialogWhgenlegList[zhgen].fFeeUnitid === 4) {
  2671. qty = this.fVolumn
  2672. }
  2673. let fAmount = parseFloat(Number(this.dialogWhgenlegList[zhgen].fPrice) * Number(qty)).toFixed(2)
  2674. if (this.costStatus === 'Cr') {
  2675. this.warehouseCrList.push({
  2676. fQty: qty,
  2677. fCorpid: this.dialogWhgenlegList[zhgen].fCorpid,
  2678. fFeeid: feeId,
  2679. fFeeunitid: this.dialogWhgenlegList[zhgen].fFeeUnitid,
  2680. fUnitprice: this.dialogWhgenlegList[zhgen].fPrice,
  2681. fCurrency: 'RMB',
  2682. fExrate: 1,
  2683. fAmount: fAmount,
  2684. fTaxrate: this.fTaxrate
  2685. })
  2686. } else {
  2687. this.warehouseDrList.push({
  2688. fQty: qty,
  2689. fCorpid: this.dialogWhgenlegList[zhgen].fCorpid,
  2690. fFeeid: feeId,
  2691. fFeeunitid: this.dialogWhgenlegList[zhgen].fFeeUnitid,
  2692. fUnitprice: this.dialogWhgenlegList[zhgen].fPrice,
  2693. fCurrency: 'RMB',
  2694. fExrate: 1,
  2695. fAmount: fAmount,
  2696. fTaxrate: this.fTaxrate
  2697. })
  2698. }
  2699. }
  2700. this.warehousingagreements = false
  2701. },
  2702. // 导出仓储费
  2703. storageFeeExport () {
  2704. if (this.dialogWhgenlegList.length === 0) {
  2705. this.$message({ message: "请选择需要导入的数据", type: "warning", });
  2706. return false
  2707. }
  2708. for (let zhgen in this.dialogWhgenlegList) {
  2709. let haveGoods = false
  2710. if (this.fWbuOptions.length !== 0) {
  2711. for (let wbu in this.fWbuOptions) {
  2712. if (this.fWbuOptions[wbu].fId === this.dialogWhgenlegList[zhgen].fGoodsid) {
  2713. haveGoods = true
  2714. break
  2715. }
  2716. }
  2717. }
  2718. if (!haveGoods) {
  2719. let feeId = this.dialogWhgenlegList[zhgen].feeFId
  2720. getFees(feeId).then((response) => {
  2721. this.fWbuOptions.push(response.data)
  2722. })
  2723. }
  2724. if (this.costStatus === 'Cr') {
  2725. this.warehouseCrList.push({
  2726. fQty: 0,
  2727. fCorpid: this.dialogWhgenlegList[zhgen].fCorpid,
  2728. fFeeid: null,
  2729. fFeeunitid: this.dialogWhgenlegList[zhgen].fFeeUnitid,
  2730. fUnitprice: this.dialogWhgenlegList[zhgen].fPrice,
  2731. fCurrency: 'RMB',
  2732. fExrate: 1,
  2733. fAmount: 0,
  2734. fTaxrate: this.fTaxrate
  2735. })
  2736. } else {
  2737. this.warehouseDrList.push({
  2738. fQty: 0,
  2739. fCorpid: this.dialogWhgenlegList[zhgen].fCorpid,
  2740. fFeeid: null,
  2741. fFeeunitid: this.dialogWhgenlegList[zhgen].fFeeUnitid,
  2742. fUnitprice: this.dialogWhgenlegList[zhgen].fPrice,
  2743. fCurrency: 'RMB',
  2744. fExrate: 1,
  2745. fAmount: 0,
  2746. fTaxrate: this.fTaxrate
  2747. })
  2748. }
  2749. }
  2750. this.storageAgreements = false
  2751. },
  2752. // 新增list
  2753. addRelevant() {
  2754. this.$refs['form'].validate((valid) => {
  2755. if (valid) {
  2756. this.whgenlegList = [];
  2757. this.dialogWhgenlegList = [];
  2758. this.whgenlegTotal = 0;
  2759. this.whgenlegVisible = true;
  2760. this.getWhgenlegList();
  2761. }
  2762. })
  2763. },
  2764. // 库存总账导出数据
  2765. whgenlegData() {
  2766. if (this.dialogWhgenlegList.length === 0) {
  2767. this.$message({ message: "未勾选信息", type: "warning" });
  2768. return false;
  2769. }
  2770. for (let whgen in this.dialogWhgenlegList) {
  2771. if (!this.form.fMblno || this.form.fMblno === "") {
  2772. this.$set(this.form, "fMblno", this.dialogWhgenlegList[whgen].fMblno);
  2773. }
  2774. let haveGoods = false
  2775. if (this.kqhouseOptions.length !== 0) {
  2776. for (let house in this.kqhouseOptions) {
  2777. if (this.kqhouseOptions[house].fId === this.dialogWhgenlegList[whgen].fWarehouseLocationid) {
  2778. haveGoods = true
  2779. break;
  2780. }
  2781. }
  2782. }
  2783. if (!haveGoods) {
  2784. let queryParams = {
  2785. pageNum: 1,
  2786. pageSize: 10,
  2787. fId: this.dialogWhgenlegList[whgen].fWarehouseLocationid
  2788. };
  2789. listArea(queryParams).then((response) => {
  2790. for (let row in response.rows) {
  2791. this.kqhouseOptions.push(response.rows[row])
  2792. }
  2793. });
  2794. }
  2795. this.dataList.push({
  2796. fId: null,
  2797. fMblno: this.dialogWhgenlegList[whgen].fMblno,
  2798. fGoodsid: this.dialogWhgenlegList[whgen].fGoodsid,
  2799. fCntrtype: null,
  2800. fPlanqty: this.dialogWhgenlegList[whgen].fQtyblc,
  2801. fPlannetweight: this.dialogWhgenlegList[whgen].fNetweightblc,
  2802. fPlangrossweight: this.dialogWhgenlegList[whgen].fGrossweightblc,
  2803. fWarehouseLocationids: this.dialogWhgenlegList[whgen].fWarehouseLocationids,
  2804. fGoodsids: this.dialogWhgenlegList[whgen].fGoodsids,
  2805. fBillingway: this.dialogWhgenlegList[whgen].fBillingway,
  2806. fChargedate: this.dialogWhgenlegList[whgen].fChargedate,
  2807. fMarks: this.dialogWhgenlegList[whgen].fMarks,
  2808. fOriginalbilldate: this.dialogWhgenlegList[whgen].fOriginalbilldate,
  2809. fOriginalbillno: this.dialogWhgenlegList[whgen].fOriginalbillno,
  2810. fPackagespecs: this.dialogWhgenlegList[whgen].fPackagespecs,
  2811. fVolumn: this.dialogWhgenlegList[whgen].fVolumnblc,
  2812. fGrossweight: 0,
  2813. fNetweight: 0,
  2814. fQty: 0,
  2815. fCntqty: 1,
  2816. fTransferWarehouselocid: this.dialogWhgenlegList[whgen].fWarehouseLocationid,
  2817. fWarehouselocid: this.dialogWhgenlegList[whgen].fWarehouseLocationid,
  2818. fWarehouselocids: this.dialogWhgenlegList[whgen].fWarehouseLocationids,
  2819. fCntrno: this.dialogWhgenlegList[whgen].fCntrno,
  2820. fGoodsval: null,
  2821. fBillstatus: 1,
  2822. fTruckno: null,
  2823. remark: null,
  2824. fIsPass: 'F'
  2825. });
  2826. }
  2827. this.whgenlegVisible = false;
  2828. },
  2829. // 收货单打印界面
  2830. showEditDialog_s() {
  2831. if (this.printinglist.length <= 0) {
  2832. this.$message.error("请选择需要打印的明细!");
  2833. return false
  2834. }
  2835. for (let aorp in this.printinglist) {
  2836. var date = new Date(this.printinglist[aorp].fBsdate);
  2837. var Y = date.getFullYear() + "-";
  2838. var M = (date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1) + "-";
  2839. var D = (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
  2840. this.$set(this.printinglist[aorp], "fBsdate", Y + M + D);
  2841. }
  2842. this.editDialogVisible_s = true;
  2843. for (let corp in this.fMblnoOptions) {
  2844. if (this.form.fCorpid === this.fMblnoOptions[corp].fId) {
  2845. this.$set(this.form, "fCorpName", this.fMblnoOptions[corp].fName);
  2846. }
  2847. }
  2848. for (let sorp in this.warehouseOptions) {
  2849. if (this.form.fWarehouseid === this.warehouseOptions[sorp].fId) {
  2850. this.$set(this.form, "fWarehouseids", this.warehouseOptions[sorp].fName);
  2851. }
  2852. }
  2853. },
  2854. // 作业单打印
  2855. printJobSheet() {
  2856. // if (this.feelDrSelection.length <= 0) {
  2857. // this.$message.error("请勾选收款信息!");
  2858. // return false;
  2859. // }
  2860. for (let fee in this.feelDrSelection) {
  2861. if (!this.feelDrSelection[fee].fCorpid) {
  2862. this.$message.error("请维护收款费用客户名称!");
  2863. return false;
  2864. }
  2865. if (!this.feelDrSelection[fee].fFeeid) {
  2866. this.$message.error("请维护收款费用费用信息!");
  2867. return false;
  2868. }
  2869. }
  2870. for (let li in this.printinglist) {
  2871. if(!this.printinglist[li].fId) {
  2872. this.$message.error("请先保存!");
  2873. return false;
  2874. }
  2875. }
  2876. let fTruckno = this.printinglist[0].fTruckno
  2877. let fDriverName = this.printinglist[0].fDriverName
  2878. for (let warehouseCr in this.printinglist) {
  2879. if (!this.printinglist[warehouseCr].fTruckno || this.printinglist[warehouseCr].fTruckno !== fTruckno) {
  2880. this.$message.error('请填写车号或选择车相同车号')
  2881. return false
  2882. } else if (!this.printinglist[warehouseCr].fDriverName || this.printinglist[warehouseCr].fDriverName !== fDriverName) {
  2883. this.$message.error('请填写司机姓名选择相同司机姓名')
  2884. return false
  2885. } else if (!this.printinglist[warehouseCr].fGrossweight) {
  2886. this.$message.error('请选择调拨毛重')
  2887. return false
  2888. } else if (!this.printinglist[warehouseCr].fDriverTel) {
  2889. this.$message.error('请选填写司机电话')
  2890. return false
  2891. } else if (!this.printinglist[warehouseCr].fDriverIdCar) {
  2892. this.$message.error('请选填写司机身份证')
  2893. return false
  2894. } else if (!this.printinglist[warehouseCr].fNetweight) {
  2895. this.$message.error('请选择调拨净重')
  2896. return false
  2897. } else if (!this.printinglist[warehouseCr].fQty) {
  2898. this.$message.error('请选择调拨件数')
  2899. return false
  2900. } else if (!this.printinglist[warehouseCr].fDriverName) {
  2901. this.$message.error('请输入司机姓名')
  2902. return false
  2903. } else if (!this.printinglist[warehouseCr].fDriverTel) {
  2904. this.$message.error('请输入司机电话')
  2905. return false
  2906. }
  2907. }
  2908. // 获取业务日期
  2909. var date = new Date(this.form.fBsdate)
  2910. var Y = date.getFullYear() + '-'
  2911. var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
  2912. var D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' '
  2913. this.fBsdate = Y + M + D
  2914. for (let dr in this.feelDrSelection) {
  2915. for (let opt in this.fWbuOptions) {
  2916. if (this.fWbuOptions[opt].fId === this.feelDrSelection[dr].fFeeid) {
  2917. this.$set(this.feelDrSelection[dr], 'fFeeName', this.fWbuOptions[opt].fName)
  2918. break
  2919. }
  2920. }
  2921. }
  2922. setTimeout(() => {
  2923. this.openPrintJobSheet = true
  2924. }, 200);
  2925. },
  2926. showEditDialog_ss() {
  2927. if (this.printinglist.length > 0) {
  2928. for (let warehouseCr in this.printinglist) {
  2929. if (
  2930. this.printinglist[warehouseCr].fTruckno != this.printinglist[0].fTruckno
  2931. ) {
  2932. this.$message.error("请选择车相同车号");
  2933. return false;
  2934. }
  2935. if (!this.printinglist[warehouseCr].fGoodsid) {
  2936. this.$message.error("请选择品名");
  2937. return false;
  2938. }
  2939. if (!this.printinglist[warehouseCr].fWarehouselocid) {
  2940. this.$message.error("请选择库区");
  2941. return false;
  2942. }
  2943. if (!this.printinglist[warehouseCr].fGrossweight) {
  2944. this.$message.error("请选择入库毛重");
  2945. return false;
  2946. }
  2947. if (!this.printinglist[warehouseCr].fNetweight) {
  2948. this.$message.error("请选择入库净重");
  2949. return false;
  2950. }
  2951. if (!this.printinglist[warehouseCr].fQty) {
  2952. this.$message.error("请选择入库件数");
  2953. return false;
  2954. }
  2955. if (!this.printinglist[warehouseCr].fDriverName) {
  2956. this.$message.error("请输入司机姓名");
  2957. return false;
  2958. }
  2959. if (!this.printinglist[warehouseCr].fDriverTel) {
  2960. this.$message.error("请输入司机电话");
  2961. return false;
  2962. }
  2963. }
  2964. this.openPrintJobSheet = true;
  2965. // this.addList()
  2966. } else {
  2967. this.$message.error("请选择需要打印的明细!");
  2968. }
  2969. },
  2970. // 收款信息
  2971. addCollection() {
  2972. this.warehouseDrList.push({
  2973. fcorpid: this.form.fCorpid,
  2974. ffeeid: null,
  2975. fFeeUnitid: null,
  2976. fQty: 0,
  2977. funitprice: 0,
  2978. fAmount: 0,
  2979. fCurrency: "RMB",
  2980. fExrate: 1,
  2981. fTaxrate: this.fTaxrate,
  2982. remarks: null,
  2983. });
  2984. },
  2985. addpayment() {
  2986. this.warehouseCrList.push({
  2987. fcorpid: this.form.fCorpid,
  2988. ffeeid: null,
  2989. fFeeUnitid: null,
  2990. fQty: 0,
  2991. funitprice: 0,
  2992. fAmount: 0,
  2993. fCurrency: "RMB",
  2994. fExrate: 1,
  2995. fTaxrate: this.fTaxrate,
  2996. remarks: null,
  2997. });
  2998. },
  2999. queryUser() {
  3000. queryUserVal().then((response) => {
  3001. if (response.user !== null) {
  3002. this.userVal = response.user;
  3003. this.$set(this.form, "fDeptid", this.userVal.deptId);
  3004. this.$set(this.form, "createBy", this.userVal.userName);
  3005. this.$set(this.form, "fIfdamage", "1");
  3006. this.$set(this.form, "fIfweigh", "1");
  3007. this.$set(this.form, "fTrademodeid", "1");
  3008. this.$set(this.form, "createTime", Date.parse(new Date()));
  3009. }
  3010. if (response.dept !== null) {
  3011. this.deptOptions = [];
  3012. this.deptOptions.push(response.dept);
  3013. }
  3014. });
  3015. },
  3016. /** 查询仓库主(出入库)列表 */
  3017. getList() {
  3018. this.loading = true;
  3019. getStockTransferList(this.queryParams).then((response) => {
  3020. this.warehousebillsList = response.rows;
  3021. this.total = response.total;
  3022. this.loading = false;
  3023. });
  3024. },
  3025. // 查询库存总账信息
  3026. getWhgenlegList() {
  3027. this.whgenlegParams.fMblno = this.form.fMblno;
  3028. this.whgenlegParams.fCorpid = this.form.fCorpid;
  3029. this.whgenlegParams.fTrademodeid = this.form.fTrademodeid;
  3030. listWhgenleg(this.whgenlegParams).then((response) => {
  3031. this.whgenlegList = response.rows;
  3032. this.whgenlegTotal = response.total;
  3033. });
  3034. },
  3035. // 贸易方式(数据字典),对应t_trademodels 字典翻译
  3036. fTrademodeidFormat(row, column) {
  3037. return this.selectDictLabel(this.fTrademodeidOptions, row.fTrademodeid);
  3038. },
  3039. // 是否过磅(数据字典)默认 F ,过磅T 否者F 下拉选择字典翻译
  3040. fIfweighFormat(row, column) {
  3041. return this.selectDictLabel(this.fIfweighOptions, row.fIfweigh);
  3042. },
  3043. // 是否破损(数据字典),默认F否则T字典翻译
  3044. fIfdamageFormat(row, column) {
  3045. return this.selectDictLabel(this.fIfdamageOptions, row.fIfdamage);
  3046. },
  3047. // 单据类型(数据字典)SJRK字典翻译
  3048. fBilltypeFormat(row, column) {
  3049. return this.selectDictLabel(this.fBilltypeOptions, row.fBilltype);
  3050. },
  3051. // 状态(数据字典),N 入字典翻译
  3052. fBillstatusFormat(row, column) {
  3053. return this.selectDictLabel(this.fBillstatusOptions, row.fBillstatus);
  3054. },
  3055. // 取消按钮
  3056. cancel() {
  3057. this.open = false;
  3058. this.reset();
  3059. },
  3060. // 表单重置
  3061. reset() {
  3062. this.form = {
  3063. fId: null,
  3064. fBillno: null,
  3065. fCustomsdeclartion: null,
  3066. fOriginalbillno: null,
  3067. fDeptid: null,
  3068. fBsdeptid: null,
  3069. fContacts: null,
  3070. fTel: null,
  3071. fCorpid: null,
  3072. fTocorpid: null,
  3073. fStltypeid: null,
  3074. fBscorpno: null,
  3075. fWarehouseid: null,
  3076. fStorekeeper: null,
  3077. fBsdate: null,
  3078. fPlanqty: null,
  3079. fPlangrossweight: null,
  3080. fPlannetweight: null,
  3081. fPlanvolumn: null,
  3082. fQty: null,
  3083. fGrossweight: null,
  3084. fNetweight: null,
  3085. fVolumn: null,
  3086. fTrademodeid: null,
  3087. fSbu: null,
  3088. fFeetunit: null,
  3089. fMblno: null,
  3090. fVslvoy: null,
  3091. fEta: null,
  3092. fCustomno: null,
  3093. fIfweigh: null,
  3094. fIfpledge: null,
  3095. fIfdamage: null,
  3096. fBankcorpid: null,
  3097. fBilltype: null,
  3098. fBillstatus: null,
  3099. delFlag: null,
  3100. createBy: null,
  3101. createTime: null,
  3102. updateBy: null,
  3103. updateTime: null,
  3104. remark: null,
  3105. fCreateby: null,
  3106. fCreatetime: null,
  3107. fGoodsid: null,
  3108. fCntrtype: null,
  3109. fCntqty: null,
  3110. };
  3111. this.deptOptions = [];
  3112. this.userOptions = [];
  3113. this.fSbuOptions = [];
  3114. this.fWbuOptions = [];
  3115. this.goodsOptions = [];
  3116. this.KHblnoOptions = [];
  3117. this.fMblnoOptions = [];
  3118. this.kqhouseOptions = [];
  3119. this.resetForm("form");
  3120. },
  3121. /** 搜索按钮操作 */
  3122. handleQuery() {
  3123. this.queryParams.pageNum = 1;
  3124. this.getList();
  3125. },
  3126. /** 重置按钮操作 */
  3127. resetQuery() {
  3128. this.resetForm("queryForm");
  3129. this.handleQuery();
  3130. },
  3131. // 多选框选中数据
  3132. handleSelectionChange(selection) {
  3133. this.ids = selection;
  3134. // this.ids = selection.map((item) => item.fId);
  3135. this.single = selection.length !== 1;
  3136. this.multiple = !selection.length;
  3137. },
  3138. // 库存总账多选框
  3139. whgenlegSelectionChange(selection) {
  3140. this.dialogWhgenlegList = selection;
  3141. },
  3142. /** 新增按钮操作 */
  3143. handleAdd(status) {
  3144. this.form = {
  3145. fCorpid: '',
  3146. fTocorpid: '',
  3147. fBillno: '',
  3148. fBsdate: '',
  3149. fChargedate: '',
  3150. fWarehouseid: '',
  3151. fStltypeid: '',
  3152. fFeetunit: '',
  3153. fTrademodeid: '',
  3154. fMblno: '',
  3155. fOriginalbillno: '',
  3156. orgStorageDate: ''
  3157. }
  3158. this.browseStatus = status;
  3159. this.notChange = false
  3160. this.reset();
  3161. this.queryUser();
  3162. this.open = true;
  3163. this.detailsHidden = false;
  3164. this.dataList = [];
  3165. this.warehouseCrList = [];
  3166. this.warehouseDrList = [];
  3167. this.relevantAttachments = [];
  3168. this.title = "调拨单";
  3169. this.formBrowseStatus = false;
  3170. },
  3171. check(row, status){
  3172. this.disappear = false
  3173. this.notChange = true
  3174. this.browseStatus = status;
  3175. this.reset();
  3176. this.detailsHidden = false;
  3177. let data = row || this.ids;
  3178. getStockTransfer(data.fId).then((response) => {
  3179. if (response.data.warehousebills) {
  3180. this.form = response.data.warehousebills;
  3181. this.$set(this.form, "fEta", Date.parse(this.form.fEta));
  3182. this.$set(this.form, "fStltypeid", this.form.fStltypeid + '');
  3183. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  3184. this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
  3185. this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + '');
  3186. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  3187. }
  3188. if (response.data.corps) {
  3189. this.fMblnoOptions = response.data.corps;
  3190. this.KHblnoOptions = response.data.corps;
  3191. this.fSbuOptions = response.data.corps;
  3192. }
  3193. if (response.data.feesList) {
  3194. this.fWbuOptions = response.data.feesList;
  3195. }
  3196. if (response.data.warehouse) {
  3197. this.warehouseOptions = response.data.warehouse;
  3198. }
  3199. if (response.data.warehouseBillsItem) {
  3200. this.dataList = response.data.warehouseBillsItem;
  3201. for (let list in this.dataList) {
  3202. if (!this.form.fMblno) {
  3203. this.$set(this.form, "fMblno", this.dataList[list].fMblno);
  3204. }
  3205. if (this.dataList[list].fBillstatus >= 6) {
  3206. this.formBrowseStatus = true;
  3207. }
  3208. this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
  3209. }
  3210. }
  3211. if (response.data.enclosures) {
  3212. this.relevantAttachments = response.data.enclosures;
  3213. }
  3214. if (response.data.warehouse) {
  3215. this.warehouseDrList = response.data.warehousebillsfeesDr;
  3216. }
  3217. if (response.data.warehousebillsfeesCr) {
  3218. this.warehouseCrList = response.data.warehousebillsfeesCr;
  3219. }
  3220. if (response.data.sysUser) {
  3221. this.userVal = response.data.sysUser
  3222. this.userOptions = response.data.sysUser;
  3223. }
  3224. if (response.data.dept) {
  3225. this.deptOptions = []
  3226. this.deptOptions.push(response.data.dept)
  3227. }
  3228. if (response.data.feesList) {
  3229. this.fWbuOptions = response.data.feesList;
  3230. }
  3231. if (response.data.goodsList) {
  3232. this.goodsOptions = response.data.goodsList;
  3233. }
  3234. if (response.data.warehouse) {
  3235. this.warehouseOptions = response.data.warehouse;
  3236. }
  3237. if (response.data.warehouseAreas) {
  3238. this.kqhouseOptions = response.data.warehouseAreas;
  3239. }
  3240. this.open = true;
  3241. this.title = "修改调拨";
  3242. });
  3243. if (res == 1) {
  3244. this.notChange = true
  3245. if (this.Operator == this.Lander) {
  3246. this.disappear = false
  3247. this.reset()
  3248. }
  3249. }
  3250. },
  3251. /** 修改按钮操作 */
  3252. handleUpdate(row, status) {
  3253. this.notChange = false
  3254. this.browseStatus = status;
  3255. this.reset();
  3256. this.detailsHidden = false;
  3257. let data = row || this.ids;
  3258. getStockTransfer(data.fId).then((response) => {
  3259. if (response.data.warehousebills) {
  3260. this.form = response.data.warehousebills;
  3261. this.$set(this.form, "fEta", Date.parse(this.form.fEta));
  3262. this.$set(this.form, "fStltypeid", this.form.fStltypeid + '');
  3263. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  3264. this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
  3265. this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + '');
  3266. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  3267. }
  3268. if (response.data.corps) {
  3269. this.fMblnoOptions = response.data.corps;
  3270. this.KHblnoOptions = response.data.corps;
  3271. this.fSbuOptions = response.data.corps;
  3272. }
  3273. if (response.data.feesList) {
  3274. this.fWbuOptions = response.data.feesList;
  3275. }
  3276. if (response.data.warehouse) {
  3277. this.warehouseOptions = response.data.warehouse;
  3278. }
  3279. if (response.data.warehouseBillsItem) {
  3280. this.dataList = response.data.warehouseBillsItem;
  3281. for (let list in this.dataList) {
  3282. if (!this.form.fMblno) {
  3283. this.$set(this.form, "fMblno", this.dataList[list].fMblno);
  3284. }
  3285. if (this.dataList[list].fBillstatus >= 6) {
  3286. this.formBrowseStatus = true;
  3287. }
  3288. this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
  3289. }
  3290. }
  3291. if (response.data.enclosures) {
  3292. this.relevantAttachments = response.data.enclosures;
  3293. }
  3294. if (response.data.warehouse) {
  3295. this.warehouseDrList = response.data.warehousebillsfeesDr;
  3296. }
  3297. if (response.data.warehousebillsfeesCr) {
  3298. this.warehouseCrList = response.data.warehousebillsfeesCr;
  3299. }
  3300. if (response.data.sysUser) {
  3301. this.userVal = response.data.sysUser
  3302. this.userOptions = response.data.sysUser;
  3303. }
  3304. if (response.data.dept) {
  3305. this.deptOptions = []
  3306. this.deptOptions.push(response.data.dept)
  3307. }
  3308. if (response.data.feesList) {
  3309. this.fWbuOptions = response.data.feesList;
  3310. }
  3311. if (response.data.goodsList) {
  3312. this.goodsOptions = response.data.goodsList;
  3313. }
  3314. if (response.data.warehouse) {
  3315. this.warehouseOptions = response.data.warehouse;
  3316. }
  3317. if (response.data.warehouseAreas) {
  3318. this.kqhouseOptions = response.data.warehouseAreas;
  3319. }
  3320. this.open = true;
  3321. this.title = "修改调拨";
  3322. });
  3323. },
  3324. // 数量计算
  3325. changeContractAmt(row) {
  3326. let fQty = 0
  3327. let fUnitprice = 0
  3328. if (row.fUnitprice) {
  3329. fUnitprice = row.fUnitprice
  3330. }
  3331. if (row.fQty) {
  3332. fQty = row.fQty
  3333. }
  3334. this.$set(row, 'fAmount', parseFloat(Number(fUnitprice) * Number(fQty)).toFixed(2))
  3335. },
  3336. changefBsdate(row) {
  3337. if (this.dataList.length > 0) {
  3338. for (var i = 0; i < this.dataList.length; i++) {
  3339. this.$set(this.dataList[i], "fBsdate", row);
  3340. }
  3341. }
  3342. },
  3343. // change仓库
  3344. changefWarehouseid(row) {
  3345. for (let corp in this.warehouseOptions) {
  3346. if (row.fWarehouseid === this.warehouseOptions[corp].fId) {
  3347. this.$set(
  3348. this.form,
  3349. "fContacts",
  3350. this.warehouseOptions[corp].createBy
  3351. );
  3352. this.$set(this.form, "fTel", this.warehouseOptions[corp].fTotalgross);
  3353. this.fAddr = this.warehouseOptions[corp].fAddr;
  3354. }
  3355. }
  3356. },
  3357. // 选择按钮
  3358. collectionoptions(selection) {
  3359. this.feelDrSelection = selection
  3360. },
  3361. changefCorpid(row) {
  3362. this.$set(row, "fSbu", row.fCorpid);
  3363. for (let corp in this.fMblnoOptions) {
  3364. if (row.fCorpid === this.fMblnoOptions[corp].fId) {
  3365. this.$set(this.form, "fStltypeid", this.fMblnoOptions[corp].fStltypeid + "");
  3366. }
  3367. }
  3368. },
  3369. // 合计
  3370. getSummaries(param) {
  3371. const { columns, data } = param;
  3372. const sums = [];
  3373. var values = [];
  3374. columns.forEach((column, index) => {
  3375. if (index === 0) {
  3376. sums[index] = "合计";
  3377. return;
  3378. }
  3379. if (column.property === "fGrossweight") {
  3380. values = data.map((item) => Number(item["fGrossweight"]));
  3381. }
  3382. if (column.property === "fNetweight") {
  3383. values = data.map((item) => Number(item["fNetweight"]));
  3384. }
  3385. if (column.property === "fQty") {
  3386. values = data.map((item) => Number(item["fQty"]));
  3387. }
  3388. if (column.property === "fCntqty") {
  3389. values = data.map((item) => Number(item["fCntqty"]));
  3390. } // const values = data.map(item => Number(item[column.property]))
  3391. if (
  3392. column.property === "fGrossweight" ||
  3393. column.property === "fNetweight" ||
  3394. column.property === "fQty" ||
  3395. column.property === "fCntqty"
  3396. ) {
  3397. sums[index] = values.reduce((prev, curr) => {
  3398. const value = Number(curr);
  3399. if (!isNaN(value)) {
  3400. if (column.property === "fGrossweight") {
  3401. this.form.fGrossweight = prev + curr;
  3402. this.fGrossweight = prev + curr;
  3403. }
  3404. if (column.property === "fNetweight") {
  3405. this.form.fNetweight = prev + curr;
  3406. this.fNetweight = prev + curr;
  3407. }
  3408. if (column.property === "fVolumn") {
  3409. this.fVolumn = prev + curr;
  3410. }
  3411. if (column.property === "fQty") {
  3412. this.form.fQty = prev + curr;
  3413. this.fQty = prev + curr;
  3414. }
  3415. if (column.property === "fCntqty") {
  3416. this.fCntqty = prev + curr;
  3417. }
  3418. return prev + curr;
  3419. } else {
  3420. return prev;
  3421. }
  3422. }, 0); // sums[index]
  3423. }
  3424. });
  3425. this.sums = sums;
  3426. return sums;
  3427. },
  3428. // 付款合计
  3429. warehouseDrSummaries(param) {
  3430. const { columns, data } = param;
  3431. const sums = [];
  3432. columns.forEach((column, index) => {
  3433. if (index === 0) {
  3434. sums[index] = "合计";
  3435. return;
  3436. }
  3437. const values = data.map((item) => Number(item[column.property]));
  3438. if (
  3439. column.property === "fUnitprice" ||
  3440. column.property === "fAmount" ||
  3441. column.property === "fQty" ||
  3442. column.property === "fQty"
  3443. ) {
  3444. sums[index] = values.reduce((prev, curr) => {
  3445. const value = Number(curr);
  3446. if (!isNaN(value)) {
  3447. return prev + curr;
  3448. } else {
  3449. return prev;
  3450. }
  3451. }, 0); // sums[index]
  3452. }
  3453. });
  3454. return sums;
  3455. },
  3456. // 库存明细多选框结果
  3457. dataListChange(row) {
  3458. this.dataListSelection = row;
  3459. },
  3460. // 变更计价单位
  3461. changeFeeUnit(row) {
  3462. if (!row.fFeeunitid) {
  3463. return false
  3464. }
  3465. let fQty = 0;
  3466. let fGrossweight = 0;
  3467. let fNetweight = 0;
  3468. let volumn = 0;
  3469. let fixed = 1;
  3470. for (let li in this.dataList) {
  3471. if (this.dataList[li].fQty) {
  3472. fQty = parseFloat(Number(fQty) + Number(this.dataList[li].fQty)).toFixed(2)
  3473. }
  3474. if (this.dataList[li].fGrossweight) {
  3475. fGrossweight = parseFloat(Number(fGrossweight) + Number(this.dataList[li].fGrossweight)).toFixed(2)
  3476. }
  3477. if (this.dataList[li].fNetweight) {
  3478. fNetweight = parseFloat(Number(fNetweight) + Number(this.dataList[li].fNetweight)).toFixed(2)
  3479. }
  3480. if (this.dataList[li].volumn) {
  3481. volumn = parseFloat(Number(volumn) + Number(this.dataList[li].volumn)).toFixed(2)
  3482. }
  3483. }
  3484. if (row.fFeeunitid === 1) {
  3485. this.$set(row, 'fQty', fQty)
  3486. } else if (row.fFeeunitid === 2) {
  3487. this.$set(row, 'fQty', fGrossweight)
  3488. }else if (row.fFeeunitid === 3) {
  3489. this.$set(row, 'fQty', fNetweight)
  3490. }else if (row.fFeeunitid === 4) {
  3491. this.$set(row, 'fQty', volumn)
  3492. }else if (row.fFeeunitid === 5) {
  3493. this.$set(row, 'fQty', fixed)
  3494. }
  3495. if (row.fUnitprice) {
  3496. this.$set(row, 'fAmount', parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2))
  3497. }
  3498. },
  3499. // 调拨确认
  3500. creditClick() {
  3501. this.$refs["form"].validate((valid) => {
  3502. for (let warehouse in this.dataListSelection) {
  3503. if (!this.dataListSelection[warehouse].fId) {
  3504. this.$message.error("请先保存");
  3505. return false;
  3506. }
  3507. if (!this.dataListSelection[warehouse].fGrossweight) {
  3508. this.$message.error("请选择调拨毛重");
  3509. return false;
  3510. } else if (!this.dataListSelection[warehouse].fTransferWarehouselocid) {
  3511. this.$message.error("请选择调拨库区");
  3512. return false;
  3513. } else if (!this.dataListSelection[warehouse].fNetweight) {
  3514. this.$message.error("请选择调拨净重");
  3515. return false;
  3516. } else if (!this.dataListSelection[warehouse].fQty) {
  3517. this.$message.error("请维护调拨件数");
  3518. return false;
  3519. }
  3520. }
  3521. if (valid) {
  3522. let listSelection = JSON.parse(JSON.stringify(this.dataListSelection))
  3523. let formData = new window.FormData();
  3524. formData.append("warehouseBills", JSON.stringify(this.form));
  3525. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  3526. formData.append("warehousebillsitems", JSON.stringify(this.dataListSelection));
  3527. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  3528. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  3529. addWhgenleg(formData).then((response) => {
  3530. this.fid = response.data.fPid;
  3531. // 暂时注释掉,后续可能会加回来 仓储费得出的明细
  3532. /* this.fWbuOptions = response.data.fees;
  3533. let warehousebillsfees = response.data.warehousebillsfees;
  3534. for (let fees in warehousebillsfees) {
  3535. this.$set(warehousebillsfees[fees], "fFeeid", warehousebillsfees[fees].fFeeid + "");
  3536. this.$set(warehousebillsfees[fees], "fCorpid", warehousebillsfees[fees].fCorpid + "");
  3537. this.$set(warehousebillsfees[fees], "fFeeUnitid", warehousebillsfees[fees].fFeeUnitid + "");
  3538. this.warehouseDrList.push(warehousebillsfees[fees]);
  3539. } */
  3540. this.dataWithdrawList = []
  3541. this.dataListSelection = []
  3542. this.msgSuccess("调拨成功");
  3543. this.$refs.tableList.clearSelection();
  3544. this.formBrowseStatus = true;
  3545. for (let li in listSelection) {
  3546. for (let i in this.dataList) {
  3547. if (listSelection[li].fId === this.dataList[i].fId) {
  3548. this.$set(this.dataList[i], "fBillstatus", 6);
  3549. }
  3550. }
  3551. }
  3552. });
  3553. }
  3554. });
  3555. },
  3556. // 打印作业单
  3557. addList() {
  3558. this.$refs["form"].validate((valid) => {
  3559. if (valid) {
  3560. let listSelection = JSON.parse(JSON.stringify(this.dataListSelection))
  3561. let formData = new window.FormData();
  3562. formData.append("warehouseBills", JSON.stringify(this.form));
  3563. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  3564. formData.append("warehousebillsitems", JSON.stringify(this.dataListSelection));
  3565. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  3566. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  3567. addJoblist(formData).then((response) => {
  3568. this.formBrowseStatus = true;
  3569. this.$refs.tableDr.clearSelection();
  3570. this.$refs.tableList.clearSelection();
  3571. let dataitem = response.data.warehousebillsitems
  3572. for (let ite in dataitem) {
  3573. for (let li in this.dataList) {
  3574. if (this.dataList[li].fId === dataitem[ite].fId) {
  3575. this.$set(this.dataList[li], 'fBillstatus', dataitem[ite].fBillstatus)
  3576. this.$set(this.dataList[li], 'fSerialNumber', dataitem[ite].fSerialNumber)
  3577. }
  3578. }
  3579. }
  3580. });
  3581. }
  3582. });
  3583. },
  3584. // 撤回调拨
  3585. withdrawClick() {
  3586. for (let li in this.dataWithdrawList) {
  3587. if (this.dataWithdrawList[li].fBillstatus < 6) {
  3588. this.$message.error("所选信息中存在未调拨数据!");
  3589. return false
  3590. }
  3591. }
  3592. let formData = new window.FormData();
  3593. // 撤回调拨
  3594. let withdrawList = JSON.parse(JSON.stringify(this.dataWithdrawList))
  3595. formData.append("warehouseBills", JSON.stringify(this.form));
  3596. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  3597. formData.append("warehousebillsitems", JSON.stringify(this.dataWithdrawList));
  3598. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  3599. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  3600. updateCredit(formData).then((response) => {
  3601. this.fid = response.data;
  3602. this.formBrowseStatus = false;
  3603. this.msgSuccess("撤销入账成功");
  3604. this.$refs.tableList.clearSelection();
  3605. let mun = 0;
  3606. for (let i in this.dataList) {
  3607. for (let li in withdrawList) {
  3608. if (withdrawList[li].fId === this.dataList[i].fId) {
  3609. this.$set(this.dataList[i], 'fBillstatus', 1)
  3610. }
  3611. }
  3612. if (this.dataList[i].fBillstatus && this.dataList[i].fBillstatus > 1) {
  3613. mun ++;
  3614. }
  3615. }
  3616. if (mun > 0) {
  3617. this.formBrowseStatus = true
  3618. } else {
  3619. this.formBrowseStatus = false
  3620. }
  3621. });
  3622. },
  3623. // 装货按钮
  3624. discharge() {
  3625. if (this.printinglist.length <= 0) {
  3626. this.$message.error("请选择需要装货的明细!");
  3627. return false
  3628. }
  3629. for (let li in this.dataListSelection) {
  3630. if (!this.dataListSelection[li].fId) {
  3631. this.$message.error('请先保存!')
  3632. return false
  3633. } else if (this.dataListSelection[li].fBillstatus === 10) {
  3634. this.$message.error('请先打印')
  3635. return false
  3636. } else if (this.dataListSelection[li].fBillstatus >= 30) {
  3637. this.$message.error('请勿重复卸货')
  3638. return false
  3639. }
  3640. }
  3641. this.$refs['form'].validate((valid) => {
  3642. if (valid) {
  3643. let withdrawList = JSON.parse(JSON.stringify(this.dataListSelection))
  3644. let formData = new window.FormData()
  3645. formData.append("warehouseBills", JSON.stringify(this.form));
  3646. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  3647. formData.append("warehousebillsitems", JSON.stringify(this.dataListSelection));
  3648. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  3649. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  3650. for (let li in this.dataListSelection) {
  3651. this.dataListSelection[li].fBillstatus = 30
  3652. }
  3653. this.formBrowseStatus = true
  3654. this.$refs.tableList.clearSelection()
  3655. disChargelist(formData).then((response) => {
  3656. for (let li in withdrawList) {
  3657. for (let i in this.dataList) {
  3658. if (withdrawList.fId === this.dataList[i].fId) {
  3659. this.$set(this.dataList[i], 'fBillstatus', 30)
  3660. }
  3661. }
  3662. }
  3663. this.msgSuccess('装货成功')
  3664. })
  3665. }
  3666. })
  3667. },
  3668. // 付款信息计价单位合计
  3669. getwarehouseCrList(param) {
  3670. const { columns, data } = param
  3671. const sums = []
  3672. var values = []
  3673. columns.forEach((column, index) => {
  3674. if (index === 0) {
  3675. sums[index] = "合计";
  3676. return;
  3677. }
  3678. if (index === 3) {
  3679. // values = data.map((item) => Number(item["fFeeUnitid"]));
  3680. sums[index] = this.fFeeUnitids;
  3681. return;
  3682. }
  3683. });
  3684. this.sums = sums;
  3685. return sums;
  3686. },
  3687. // 库存明细多选
  3688. selectinventory(selection) {
  3689. this.printinglist = selection;
  3690. this.dataWithdrawList = [];
  3691. this.dataListSelection = [];
  3692. if (!selection || selection.length === 0) {
  3693. return false
  3694. }
  3695. for (let se in selection) {
  3696. if (!selection[se].fBillstatus || selection[se].fBillstatus !== 6) {
  3697. this.dataListSelection.push(selection[se])
  3698. } else if (selection[se].fBillstatus && selection[se].fBillstatus === 6) {
  3699. this.dataWithdrawList.push(selection[se])
  3700. }
  3701. }
  3702. this.fTruckno = selection[0].fTruckno
  3703. this.fCntrtype = selection[0].fCntrtype
  3704. this.fGoodsids = selection[0].fGoodsids
  3705. },
  3706. // 更新主表品名并去重
  3707. updateDeduplication: function() {
  3708. if (this.dataList.length === 0) {
  3709. return false
  3710. }
  3711. let fMarks = []
  3712. let fGoodsid = []
  3713. for (let li in this.dataList) {
  3714. fMarks.push(this.dataList[li].fMarks)
  3715. fGoodsid.push(this.dataList[li].fGoodsids)
  3716. }
  3717. this.$set(this.form, 'fMarks', Array.from(new Set(fMarks)).join(","))
  3718. this.$set(this.form, 'fProductName', Array.from(new Set(fGoodsid)).join(","))
  3719. },
  3720. // 保存agreementitemsList
  3721. saveForm () {
  3722. this.updateDeduplication()
  3723. this.$refs['form'].validate((valid) => {
  3724. if (this.dataList.length === 0) {
  3725. this.$message.error('请添加库存明细!')
  3726. return false
  3727. }
  3728. for (let list in this.dataList) {
  3729. if (!this.dataList[list].fQty || Number(this.dataList[list].fQty) === 0) {
  3730. this.$message.error('请维护序号为' + (Number(list) + 1) + '的调拨件数!')
  3731. return false
  3732. }
  3733. if (!this.dataList[list].fGrossweight || Number(this.dataList[list].fGrossweight) === 0) {
  3734. this.$message.error('请维护序号为' + (Number(list) + 1) + '的调拨毛重!')
  3735. return false
  3736. }
  3737. if (!this.dataList[list].fNetweight || Number(this.dataList[list].fNetweight) === 0) {
  3738. this.$message.error('请维护序号为' + (Number(list) + 1) + '的调拨净重!')
  3739. return false
  3740. }
  3741. }
  3742. if (valid) {
  3743. setTimeout(() => {
  3744. this.form.fBillstatus = 2
  3745. let formData = new window.FormData()
  3746. formData.append("warehouseBills", JSON.stringify(this.form));
  3747. formData.append("warehousebillsitems", JSON.stringify(this.dataList));
  3748. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  3749. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  3750. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  3751. addStockTransfer(formData).then((response) => {
  3752. this.msgSuccess('保存成功')
  3753. this.form = response.data.warehouseBills
  3754. this.$set(this.form, 'fEta', Date.parse(this.form.fEta))
  3755. this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
  3756. this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
  3757. this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
  3758. this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
  3759. this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
  3760. this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
  3761. this.dataList = response.data.warehousebillsitems
  3762. })
  3763. }, 200);
  3764. }
  3765. })
  3766. },
  3767. /** 提交按钮 */
  3768. submitForm() {
  3769. this.updateDeduplication()
  3770. this.$refs['form'].validate((valid) => {
  3771. if (this.dataList.length === 0) {
  3772. this.$message.error('请新增库存明细!')
  3773. return false
  3774. }
  3775. for (let list in this.dataList) {
  3776. if (!this.dataList[list].fQty || this.dataList[list].fQty === 0) {
  3777. this.$message.error('请输入调拨件数!')
  3778. return false
  3779. }
  3780. if (!this.dataList[list].fNetweight || this.dataList[list].fNetweight === 0) {
  3781. this.$message.error('请输入调拨净重!')
  3782. return false
  3783. }
  3784. if (!this.dataList[list].fGrossweight || this.dataList[list].fGrossweight === 0) {
  3785. this.$message.error('请输入调拨毛重!')
  3786. return false
  3787. }
  3788. if (!this.dataList[list].fTransferWarehouselocid || this.dataList[list].fTransferWarehouselocid === 0) {
  3789. this.$message.error('请选择调拨毛重!')
  3790. return false
  3791. }
  3792. if (this.dataList[list].fBillstatus !== 6) {
  3793. this.$message.error('请入账库存明细!')
  3794. return false
  3795. }
  3796. }
  3797. for (let list in this.warehouseDrList) {
  3798. if (!this.warehouseDrList[list].fCorpid) {
  3799. this.$message.error('请选择客户名称')
  3800. return false
  3801. }
  3802. }
  3803. for (let list in this.warehouseCrList) {
  3804. if (!this.warehouseCrList[list].fCorpid) {
  3805. this.$message.error('请选择客户名称')
  3806. return false
  3807. }
  3808. }
  3809. if (valid) {
  3810. setTimeout(() => {
  3811. this.form.fBillstatus = status
  3812. this.form.fNetweight = this.fNetweight
  3813. this.form.fPlangrossweight = this.fPlangrossweight
  3814. this.form.fPlannetweight = this.fPlannetweight
  3815. this.form.fPlanvolumn = this.fPlanvolumn
  3816. this.form.fPlanqty = this.fPlanqty
  3817. this.form.fGrossweight = this.fGrossweight
  3818. this.form.fQty = this.fQty
  3819. if (!this.form.fId) {
  3820. this.form.fId = this.fid
  3821. }
  3822. let formData = new window.FormData()
  3823. formData.append("warehouseBills", JSON.stringify(this.form));
  3824. formData.append("warehousebillsitems", JSON.stringify(this.dataList));
  3825. formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
  3826. formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
  3827. formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
  3828. warehouseSubmission(formData).then((response) => {
  3829. this.msgSuccess('提交成功')
  3830. this.cancel()
  3831. this.getList()
  3832. })
  3833. }, 200);
  3834. }
  3835. })
  3836. },
  3837. /** 删除按钮操作 */
  3838. handleDelete(row) {
  3839. const fIds = row.fId || this.ids.fId;
  3840. this.$confirm(
  3841. '是否确认删除仓库主(出入库)编号为"' + fIds + '"的数据项?',
  3842. "警告",
  3843. {
  3844. confirmButtonText: "确定",
  3845. cancelButtonText: "取消",
  3846. type: "warning",
  3847. }
  3848. )
  3849. .then(function () {
  3850. return delStockTransfer(fIds);
  3851. })
  3852. .then(() => {
  3853. this.getList();
  3854. this.msgSuccess("删除成功");
  3855. });
  3856. },
  3857. /** 导出按钮操作 */
  3858. handleExport() {
  3859. const queryParams = this.queryParams;
  3860. this.$confirm("是否确认导出所有仓库主(出入库)数据项?", "警告", {
  3861. confirmButtonText: "确定",
  3862. cancelButtonText: "取消",
  3863. type: "warning",
  3864. })
  3865. .then(function () {
  3866. return exportStockTransfer(queryParams);
  3867. })
  3868. .then((response) => {
  3869. this.download(response.msg);
  3870. });
  3871. },
  3872. // 调拨件数的计算
  3873. qtyChange(row) {
  3874. if (!row.fQty || row.fQty === "") {
  3875. this.$set(row, "fNetweight", 0);
  3876. this.$set(row, "fGrossweight", 0);
  3877. return false;
  3878. }
  3879. // 净重 fPlannetweight
  3880. // 毛重 fPlangrossweight
  3881. let fVolumn = parseFloat(Number(row.fVolumn) / Number(row.fPlanqty)).toFixed(2);
  3882. let netweight = parseFloat(Number(row.fPlannetweight) / Number(row.fPlanqty)).toFixed(2);
  3883. let grossweigh = parseFloat(Number(row.fPlangrossweight) / Number(row.fPlanqty)).toFixed(2);
  3884. this.$set(row, "fVolumn", parseFloat(Number(fVolumn) * Number(row.fQty)).toFixed(2));
  3885. this.$set(row, "fNetweight", parseFloat(Number(netweight) * Number(row.fQty)).toFixed(2));
  3886. this.$set(row, "fGrossweight", parseFloat(Number(grossweigh) * Number(row.fQty)).toFixed(2));
  3887. },
  3888. deleteRow(index, rows) {
  3889. rows.splice(index, 1);
  3890. },
  3891. /* 远程模糊查询用户 */
  3892. corpsRemoteMethod(name) {
  3893. if (name == null || name === "") {
  3894. return false;
  3895. }
  3896. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  3897. listCorps(queryParams).then((response) => {
  3898. this.fMblnoOptions = response.rows;
  3899. this.KHblnoOptions = response.rows;
  3900. });
  3901. },
  3902. /* 远程模糊查询商品 */
  3903. goodsRemoteMethod(name) {
  3904. if (name == null || name === "") {
  3905. return false;
  3906. }
  3907. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  3908. listGoods(queryParams).then((response) => {
  3909. this.goodsOptions = response.rows;
  3910. });
  3911. },
  3912. // 远程模糊查询费用名称
  3913. fWRemoteMethod(name) {
  3914. if (name == null || name === "") {
  3915. return false;
  3916. }
  3917. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  3918. listFees(queryParams).then((response) => {
  3919. this.fWbuOptions = response.rows;
  3920. });
  3921. },
  3922. /* 远程模糊查询经营单位 */
  3923. fSbuRemoteMethod(name) {
  3924. if (name == null || name === "") {
  3925. return false;
  3926. }
  3927. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  3928. listCorps(queryParams).then((response) => {
  3929. this.fSbuOptions = response.rows;
  3930. });
  3931. },
  3932. /* 远程模糊查询仓库 */
  3933. warehouseRemoteMethod(name) {
  3934. if (!name) {
  3935. return false;
  3936. }
  3937. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  3938. listWarehouse(queryParams).then((response) => {
  3939. this.warehouseOptions = response.rows;
  3940. });
  3941. },
  3942. /* 远程模糊查询库区 */
  3943. kqhouseRemoteMethod(name) {
  3944. if (!name) {
  3945. return false;
  3946. }
  3947. let queryParams = {
  3948. pageNum: 1,
  3949. pageSize: 10,
  3950. fWarehouseid: this.form.fWarehouseid,
  3951. fName: name
  3952. };
  3953. listArea(queryParams).then((response) => {
  3954. this.kqhouseOptions = response.rows;
  3955. });
  3956. },
  3957. /* 远程模糊查询操作用户 */
  3958. userRemoteMethod(name) {
  3959. if (name == null || name === "") {
  3960. return false;
  3961. }
  3962. let queryParams = { pageNum: 1, pageSize: 10, userName: name };
  3963. listUser(queryParams).then((response) => {
  3964. this.userOptions = response.rows;
  3965. });
  3966. },
  3967. },
  3968. };
  3969. </script>
  3970. <style lang="scss">
  3971. .juzhong > th {
  3972. text-align: center;
  3973. }
  3974. .biaoge > tr > td {
  3975. height: 50px;
  3976. text-align: center;
  3977. border-right: 1px solid #dfe6ec !important;
  3978. order-bottom: 1px solid #dfe6ec !important;
  3979. border-bottom: 1px solid #dfe6ec !important;
  3980. }
  3981. .el-table thead th {
  3982. background: #1890ff;
  3983. color: #fff;
  3984. }
  3985. .upload-demo {
  3986. margin-left: 50px;
  3987. }
  3988. .el-form-item {
  3989. margin-bottom: 5px !important;
  3990. }
  3991. .el-form-item__label {
  3992. font-size: 12px !important;
  3993. }
  3994. </style>