index.vue 154 KB

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